UNPKG

igniteui-react-core

Version:
97 lines (96 loc) 3.16 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, markType } from "./type"; /** * @hidden */ export let SummaryParser = /*@__PURE__*/ (() => { class SummaryParser extends Base { a(a, b) { if (a == null) { return; } let c = a.split(','); for (let d = 0; d < c.length; d++) { let e = c[d].trim(); let f = ""; let g = 0; for (g = 0; g < e.length; g++) { let h = e.charAt(g); if (h != '(') { f += h; } else { break; } } if (g == e.length) { continue; } f = f.trim().toLowerCase(); let i = 4; switch (f) { case "avg": i = 3; break; case "sum": i = 2; break; case "min": i = 0; break; case "max": i = 1; break; case "count": i = 4; break; default: continue; } g++; let j = ""; for (; g < e.length; g++) { let k = e.charAt(g); if (k != ')') { j += k; } else { break; } } if (j.length == 0) { continue; } if (e.charAt(g) != ')') { continue; } g++; let l = null; if (g < e.length) { if (e.charAt(g) != ' ') { continue; } g++; if (e.substr(g, 2) != "as") { continue; } g += 2; if (e.charAt(g) != ' ') { continue; } g++; l = e.substr(g, e.length - g); } if (b != null) { b(j, i, l); } } } } SummaryParser.$t = /*@__PURE__*/ markType(SummaryParser, 'SummaryParser'); return SummaryParser; })();