@sisense/sdk-ui 2.14.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +418 -28
- package/dist/ai.js +2080 -2112
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +998 -1466
- package/dist/analytics-composer.cjs +51 -51
- package/dist/analytics-composer.js +556 -565
- package/dist/{derive-chart-family-D_bylSQy.js → derive-chart-family-DLwnWblo.js} +10833 -10690
- package/dist/derive-chart-family-d7eaC45K.cjs +190 -0
- package/dist/{dimensions-CdNGgk9I.cjs → dimensions-BUWtZxix.cjs} +1 -1
- package/dist/{dimensions-CTUJhW-M.js → dimensions-DvDgZ8RW.js} +1 -1
- package/dist/execute-query-CB4XfUng.cjs +1 -0
- package/dist/{execute-query-DyjkDYHG.js → execute-query-CFK2R_1S.js} +868 -813
- package/dist/index.cjs +1549 -32
- package/dist/index.js +14200 -13185
- package/dist/index.umd.js +2726 -380
- package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/process-function/filter-processors.d.ts +9 -0
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +32 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/get-legacy-cartesian-chart-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/helpers/chart-data.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/helpers/design-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/highchart-options/axes.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/highchart-options/highcharts-options-builder.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/highchart-options/plot-options.d.ts +19 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/streamgraph-chart-builder.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/types.d.ts +24 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/funnel-chart/data-options/index.d.ts +0 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data-options.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data-options/index.d.ts +0 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/sunburst-chart/design-options/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +7 -11
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/sunburst-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +27 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-plot-options.d.ts +11 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +28 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/sunburst/sunburst-options.d.ts +28 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +6 -5
- package/dist/packages/sdk-ui/src/charts/table/styles/style-constants.d.ts +1 -1
- package/dist/packages/sdk-ui/src/common/icons/alert-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/common-filters/selection-utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dynamic-size-container/default-size.d.ts +20 -5
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/constants.d.ts +9 -0
- package/dist/packages/sdk-ui/src/highcharts-renderer.d.ts +13 -0
- package/dist/packages/sdk-ui/src/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/no-results-overlay/images/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +9 -1
- package/dist/packages/sdk-ui/src/pivot-table/pivot-table.d.ts +1 -0
- package/dist/packages/sdk-ui/src/props.d.ts +32 -1
- package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/streamgraph-chart.d.ts +42 -0
- package/dist/packages/sdk-ui/src/styled/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/styled/with-css-selector-prefix.d.ts +2 -0
- package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +1 -0
- package/dist/packages/sdk-ui/src/theme-provider/theme-context.d.ts +3 -1
- package/dist/packages/sdk-ui/src/theme-provider/utils.d.ts +8 -0
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +6 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +12 -0
- package/dist/packages/sdk-ui/src/types.d.ts +172 -5
- package/dist/packages/sdk-ui/src/utils/gradient.d.ts +37 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/translate-widget-style-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +3 -0
- package/dist/packages/sdk-ui/src/widgets/common/drilldown-utils.d.ts +17 -2
- package/dist/packages/sdk-ui/src/widgets/hooks/use-drilldown.d.ts +2 -3
- package/dist/packages/sdk-ui/src/widgets/hooks/use-with-drilldown.d.ts +1 -1
- package/dist/{types-D1qM-ltg.cjs → types-Clbnx4mQ.cjs} +1 -1
- package/dist/{types-DglXXR-Q.js → types-D1mqt0Mg.js} +2 -8
- package/dist/use-common-filters-CkQznSEt.cjs +1325 -0
- package/dist/{use-common-filters-BGrn7zoW.js → use-common-filters-CxoO7TzT.js} +47215 -36504
- package/dist/{widget-composer-C24YJEek.cjs → widget-composer-BaOTPn5w.cjs} +1 -1
- package/dist/{widget-composer-lBv40CFf.js → widget-composer-Dhl_nmhq.js} +115 -111
- package/package.json +8 -9
- package/dist/derive-chart-family-DJUpWKOP.cjs +0 -175
- package/dist/execute-query-CNt566O5.cjs +0 -1
- package/dist/packages/sdk-ui/src/common/icons/edit-pencil-icon.d.ts +0 -3
- package/dist/packages/sdk-ui/src/highcharts-memorized.d.ts +0 -7
- package/dist/use-common-filters-DxzCHhgF.cjs +0 -846
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var _e = Object.defineProperty, Le = Object.defineProperties;
|
|
2
2
|
var Ve = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var le = Object.getOwnPropertySymbols;
|
|
4
4
|
var Ue = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var ce = (e, r, t) => r in e ? _e(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, h = (e, r) => {
|
|
6
6
|
for (var t in r || (r = {}))
|
|
7
|
-
Ue.call(r, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
Je.call(r, t) &&
|
|
7
|
+
Ue.call(r, t) && ce(e, t, r[t]);
|
|
8
|
+
if (le)
|
|
9
|
+
for (var t of le(r))
|
|
10
|
+
Je.call(r, t) && ce(e, t, r[t]);
|
|
11
11
|
return e;
|
|
12
12
|
}, q = (e, r) => Le(e, Ve(r));
|
|
13
|
-
import { f as We, J as
|
|
14
|
-
import { b as
|
|
15
|
-
import { bW as
|
|
16
|
-
import { i as kr, b as Ir, D as _r, d as Lr } from "../dimensions-
|
|
13
|
+
import { f as We, J as je } from "../types-D1mqt0Mg.js";
|
|
14
|
+
import { b as si, E as ni, a as ai, i as oi, e as ui, d as li } from "../types-D1mqt0Mg.js";
|
|
15
|
+
import { bW as Ke, bB as Qe, bX as Ye, bY as He, bZ as Xe, av as ee, b_ as Ze, au as Ge, b$ as ve, b6 as er, aw as rr, c0 as tr, b9 as ir, b7 as sr, aI as nr, b5 as ar, b8 as or, e as ur, d as lr, l as cr, c1 as fr, c2 as dr, c3 as yr, c4 as pr, c5 as mr, c6 as gr, c7 as br, c8 as hr, c9 as Fr, ca as qr, cb as wr, at as Er, cc as Ar, cd as xr, S as Cr, i as $r, s as Dr, c as K, M as N, ce as Mr, cf as Rr, cg as Sr, ch as zr, aE as Nr, am as fe, al as Or, ci as Tr, x as Br, w as Pr } from "../execute-query-CFK2R_1S.js";
|
|
16
|
+
import { i as kr, b as Ir, D as _r, d as Lr } from "../dimensions-DvDgZ8RW.js";
|
|
17
17
|
class Vr {
|
|
18
18
|
constructor() {
|
|
19
19
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
@@ -84,14 +84,14 @@ function O(e, r) {
|
|
|
84
84
|
function V(e, r) {
|
|
85
85
|
return e.indexOf(r) !== -1;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function de(e, r) {
|
|
88
88
|
for (let t = 0; t < e.length; t++) {
|
|
89
89
|
const i = e[t];
|
|
90
90
|
if (r(i))
|
|
91
91
|
return i;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
class
|
|
94
|
+
class jr {
|
|
95
95
|
constructor() {
|
|
96
96
|
this.transfomers = {};
|
|
97
97
|
}
|
|
@@ -105,7 +105,7 @@ class Kr {
|
|
|
105
105
|
return this.transfomers[r];
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Kr = (e) => Object.prototype.toString.call(e).slice(8, -1), he = (e) => typeof e == "undefined", Qr = (e) => e === null, k = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, X = (e) => k(e) && Object.keys(e).length === 0, $ = (e) => Array.isArray(e), Yr = (e) => typeof e == "string", Hr = (e) => typeof e == "number" && !isNaN(e), Xr = (e) => typeof e == "boolean", Zr = (e) => e instanceof RegExp, I = (e) => e instanceof Map, _ = (e) => e instanceof Set, Fe = (e) => Kr(e) === "Symbol", Gr = (e) => e instanceof Date && !isNaN(e.valueOf()), vr = (e) => e instanceof Error, ye = (e) => typeof e == "number" && isNaN(e), et = (e) => Xr(e) || Qr(e) || he(e) || Hr(e) || Yr(e) || Fe(e), rt = (e) => typeof e == "bigint", tt = (e) => e === 1 / 0 || e === -1 / 0, it = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), st = (e) => e instanceof URL, qe = (e) => e.replace(/\./g, "\\."), Q = (e) => e.map(String).map(qe).join("."), P = (e) => {
|
|
109
109
|
const r = [];
|
|
110
110
|
let t = "";
|
|
111
111
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -163,7 +163,7 @@ const we = [
|
|
|
163
163
|
(e) => new Set(e)
|
|
164
164
|
),
|
|
165
165
|
E(I, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
166
|
-
E((e) =>
|
|
166
|
+
E((e) => ye(e) || tt(e), "number", (e) => ye(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
167
167
|
E((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
168
168
|
E(st, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
169
169
|
];
|
|
@@ -196,10 +196,10 @@ const Ee = U((e, r) => Fe(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r)
|
|
|
196
196
|
throw new Error("Trying to deserialize unknown typed array");
|
|
197
197
|
return new t(e);
|
|
198
198
|
});
|
|
199
|
-
function
|
|
199
|
+
function xe(e, r) {
|
|
200
200
|
return e != null && e.constructor ? !!r.classRegistry.getIdentifier(e.constructor) : !1;
|
|
201
201
|
}
|
|
202
|
-
const
|
|
202
|
+
const Ce = U(xe, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
|
|
203
203
|
const t = r.classRegistry.getAllowedProps(e.constructor);
|
|
204
204
|
if (!t)
|
|
205
205
|
return h({}, e);
|
|
@@ -217,14 +217,14 @@ const xe = U(Ce, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor
|
|
|
217
217
|
if (!i)
|
|
218
218
|
throw new Error("Trying to deserialize unknown custom value");
|
|
219
219
|
return i.deserialize(e);
|
|
220
|
-
}), at = [
|
|
221
|
-
const t =
|
|
220
|
+
}), at = [Ce, Ee, $e, Ae], pe = (e, r) => {
|
|
221
|
+
const t = de(at, (s) => s.isApplicable(e, r));
|
|
222
222
|
if (t)
|
|
223
223
|
return {
|
|
224
224
|
value: t.transform(e, r),
|
|
225
225
|
type: t.annotation(e, r)
|
|
226
226
|
};
|
|
227
|
-
const i =
|
|
227
|
+
const i = de(we, (s) => s.isApplicable(e, r));
|
|
228
228
|
if (i)
|
|
229
229
|
return {
|
|
230
230
|
value: i.transform(e, r),
|
|
@@ -240,7 +240,7 @@ const ot = (e, r, t) => {
|
|
|
240
240
|
case "symbol":
|
|
241
241
|
return Ee.untransform(e, r, t);
|
|
242
242
|
case "class":
|
|
243
|
-
return
|
|
243
|
+
return Ce.untransform(e, r, t);
|
|
244
244
|
case "custom":
|
|
245
245
|
return $e.untransform(e, r, t);
|
|
246
246
|
case "typed-array":
|
|
@@ -254,7 +254,7 @@ const ot = (e, r, t) => {
|
|
|
254
254
|
throw new Error("Unknown transformation: " + r);
|
|
255
255
|
return i.untransform(e, t);
|
|
256
256
|
}
|
|
257
|
-
},
|
|
257
|
+
}, z = (e, r) => {
|
|
258
258
|
if (r > e.size)
|
|
259
259
|
throw new Error("index out of bounds");
|
|
260
260
|
const t = e.keys();
|
|
@@ -275,9 +275,9 @@ const ut = (e, r) => {
|
|
|
275
275
|
for (let t = 0; t < r.length; t++) {
|
|
276
276
|
const i = r[t];
|
|
277
277
|
if (_(e))
|
|
278
|
-
e =
|
|
278
|
+
e = z(e, +i);
|
|
279
279
|
else if (I(e)) {
|
|
280
|
-
const s = +i, a = +r[++t] == 0 ? "key" : "value", n =
|
|
280
|
+
const s = +i, a = +r[++t] == 0 ? "key" : "value", n = z(e, s);
|
|
281
281
|
switch (a) {
|
|
282
282
|
case "key":
|
|
283
283
|
e = n;
|
|
@@ -303,11 +303,11 @@ const ut = (e, r) => {
|
|
|
303
303
|
i = i[n];
|
|
304
304
|
else if (_(i)) {
|
|
305
305
|
const o = +n;
|
|
306
|
-
i =
|
|
306
|
+
i = z(i, o);
|
|
307
307
|
} else if (I(i)) {
|
|
308
308
|
if (a === r.length - 2)
|
|
309
309
|
break;
|
|
310
|
-
const u = +n, c = +r[++a] == 0 ? "key" : "value", d =
|
|
310
|
+
const u = +n, c = +r[++a] == 0 ? "key" : "value", d = z(i, u);
|
|
311
311
|
switch (c) {
|
|
312
312
|
case "key":
|
|
313
313
|
i = d;
|
|
@@ -320,11 +320,11 @@ const ut = (e, r) => {
|
|
|
320
320
|
}
|
|
321
321
|
const s = r[r.length - 1];
|
|
322
322
|
if ($(i) ? i[+s] = t(i[+s]) : k(i) && (i[s] = t(i[s])), _(i)) {
|
|
323
|
-
const a =
|
|
323
|
+
const a = z(i, +s), n = t(a);
|
|
324
324
|
a !== n && (i.delete(a), i.add(n));
|
|
325
325
|
}
|
|
326
326
|
if (I(i)) {
|
|
327
|
-
const a = +r[r.length - 2], n =
|
|
327
|
+
const a = +r[r.length - 2], n = z(i, a);
|
|
328
328
|
switch (+s == 0 ? "key" : "value") {
|
|
329
329
|
case "key": {
|
|
330
330
|
const u = t(n);
|
|
@@ -372,7 +372,7 @@ function ct(e, r) {
|
|
|
372
372
|
O(r, t);
|
|
373
373
|
return e;
|
|
374
374
|
}
|
|
375
|
-
const ft = (e, r) => k(e) || $(e) || I(e) || _(e) ||
|
|
375
|
+
const ft = (e, r) => k(e) || $(e) || I(e) || _(e) || xe(e, r);
|
|
376
376
|
function dt(e, r, t) {
|
|
377
377
|
const i = t.get(e);
|
|
378
378
|
i ? i.push(r) : t.set(e, [r]);
|
|
@@ -400,7 +400,7 @@ const Re = (e, r, t, i, s = [], a = [], n = /* @__PURE__ */ new Map()) => {
|
|
|
400
400
|
} : f;
|
|
401
401
|
}
|
|
402
402
|
if (!ft(e, t)) {
|
|
403
|
-
const f =
|
|
403
|
+
const f = pe(e, t), y = f ? {
|
|
404
404
|
transformedValue: f.value,
|
|
405
405
|
annotations: [f.type]
|
|
406
406
|
} : {
|
|
@@ -412,12 +412,12 @@ const Re = (e, r, t, i, s = [], a = [], n = /* @__PURE__ */ new Map()) => {
|
|
|
412
412
|
return {
|
|
413
413
|
transformedValue: null
|
|
414
414
|
};
|
|
415
|
-
const u =
|
|
415
|
+
const u = pe(e, t), c = (b = u == null ? void 0 : u.value) != null ? b : e, d = $(c) ? [] : {}, g = {};
|
|
416
416
|
O(c, (f, y) => {
|
|
417
417
|
if (y === "__proto__" || y === "constructor" || y === "prototype")
|
|
418
418
|
throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);
|
|
419
|
-
const
|
|
420
|
-
d[y] =
|
|
419
|
+
const C = Re(f, r, t, i, [...s, y], [...a, e], n);
|
|
420
|
+
d[y] = C.transformedValue, $(C.annotations) ? g[y] = C.annotations : k(C.annotations) && O(C.annotations, (B, S) => {
|
|
421
421
|
g[qe(y) + "." + S] = B;
|
|
422
422
|
});
|
|
423
423
|
});
|
|
@@ -433,7 +433,7 @@ const Re = (e, r, t, i, s = [], a = [], n = /* @__PURE__ */ new Map()) => {
|
|
|
433
433
|
function Se(e) {
|
|
434
434
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function me(e) {
|
|
437
437
|
return Se(e) === "Array";
|
|
438
438
|
}
|
|
439
439
|
function pt(e) {
|
|
@@ -452,13 +452,13 @@ function mt(e, r, t, i, s) {
|
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
454
|
function v(e, r = {}) {
|
|
455
|
-
if (
|
|
455
|
+
if (me(e))
|
|
456
456
|
return e.map((s) => v(s, r));
|
|
457
457
|
if (!pt(e))
|
|
458
458
|
return e;
|
|
459
459
|
const t = Object.getOwnPropertyNames(e), i = Object.getOwnPropertySymbols(e);
|
|
460
460
|
return [...t, ...i].reduce((s, a) => {
|
|
461
|
-
if (
|
|
461
|
+
if (me(r.props) && !r.props.includes(a))
|
|
462
462
|
return s;
|
|
463
463
|
const n = e[a], o = v(n, r);
|
|
464
464
|
return mt(s, a, o, e, r.nonenumerable), s;
|
|
@@ -472,7 +472,7 @@ class l {
|
|
|
472
472
|
this.classRegistry = new Ur(), this.symbolRegistry = new be((t) => {
|
|
473
473
|
var i;
|
|
474
474
|
return (i = t.description) != null ? i : "";
|
|
475
|
-
}), this.customTransformerRegistry = new
|
|
475
|
+
}), this.customTransformerRegistry = new jr(), this.allowedErrorProps = [], this.dedupe = r;
|
|
476
476
|
}
|
|
477
477
|
serialize(r) {
|
|
478
478
|
const t = /* @__PURE__ */ new Map(), i = Re(r, t, this, this.dedupe), s = {
|
|
@@ -521,66 +521,111 @@ l.registerClass = l.defaultInstance.registerClass.bind(l.defaultInstance);
|
|
|
521
521
|
l.registerSymbol = l.defaultInstance.registerSymbol.bind(l.defaultInstance);
|
|
522
522
|
l.registerCustom = l.defaultInstance.registerCustom.bind(l.defaultInstance);
|
|
523
523
|
l.allowErrorProps = l.defaultInstance.allowErrorProps.bind(l.defaultInstance);
|
|
524
|
-
const R = (e) => e === void 0 ?
|
|
524
|
+
const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem, e.type), re = (e) => new ur(
|
|
525
|
+
e.name,
|
|
526
|
+
e.expression,
|
|
527
|
+
e.type,
|
|
528
|
+
e.description,
|
|
529
|
+
R(e.sort),
|
|
530
|
+
e.dataSource,
|
|
531
|
+
e.composeCode
|
|
532
|
+
), te = (e) => new lr(
|
|
533
|
+
e.name,
|
|
534
|
+
e.expression,
|
|
535
|
+
e.granularity,
|
|
536
|
+
e.format,
|
|
537
|
+
e.description,
|
|
538
|
+
R(e.sort),
|
|
539
|
+
e.dataSource,
|
|
540
|
+
e.composeCode
|
|
541
|
+
), F = (e) => {
|
|
525
542
|
switch (e.__serializable) {
|
|
526
543
|
case "DimensionalAttribute":
|
|
527
|
-
return ee(e);
|
|
528
|
-
case "DimensionalLevelAttribute":
|
|
529
544
|
return re(e);
|
|
545
|
+
case "DimensionalLevelAttribute":
|
|
546
|
+
return te(e);
|
|
530
547
|
default:
|
|
531
548
|
return e;
|
|
532
549
|
}
|
|
533
|
-
},
|
|
550
|
+
}, ze = (e) => new _r(
|
|
551
|
+
e.name,
|
|
552
|
+
e.expression,
|
|
553
|
+
e.attributes.map(F),
|
|
554
|
+
e.dimensions.map(bt),
|
|
555
|
+
e.type,
|
|
556
|
+
e.description,
|
|
557
|
+
R(e.sort),
|
|
558
|
+
e.dataSource,
|
|
559
|
+
e.composeCode,
|
|
560
|
+
e.defaultAttribute ? F(e.defaultAttribute) : void 0
|
|
561
|
+
), Ne = (e) => new Lr(
|
|
562
|
+
e.name,
|
|
563
|
+
e.expression,
|
|
564
|
+
e.description,
|
|
565
|
+
R(e.sort),
|
|
566
|
+
e.dataSource,
|
|
567
|
+
e.composeCode
|
|
568
|
+
), bt = (e) => {
|
|
534
569
|
switch (e.__serializable) {
|
|
535
570
|
case "DimensionalDimension":
|
|
536
|
-
return Ne(e);
|
|
537
|
-
case "DimensionalDateDimension":
|
|
538
571
|
return ze(e);
|
|
572
|
+
case "DimensionalDateDimension":
|
|
573
|
+
return Ne(e);
|
|
539
574
|
default:
|
|
540
575
|
return e;
|
|
541
576
|
}
|
|
542
|
-
},
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
te(i)
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
t,
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
}, ie = (e) => new cr(
|
|
578
|
+
e.name,
|
|
579
|
+
F(e.attribute),
|
|
580
|
+
e.aggregation,
|
|
581
|
+
e.format,
|
|
582
|
+
e.description,
|
|
583
|
+
R(e.sort),
|
|
584
|
+
e.dataSource,
|
|
585
|
+
e.composeCode
|
|
586
|
+
), se = (e) => {
|
|
587
|
+
const r = Object.fromEntries(
|
|
588
|
+
Object.entries(e.context).map(([t, i]) => {
|
|
589
|
+
if (i && typeof i == "object" && "__serializable" in i)
|
|
590
|
+
switch (i.__serializable) {
|
|
591
|
+
case "DimensionalAttribute":
|
|
592
|
+
return [t, re(i)];
|
|
593
|
+
case "DimensionalLevelAttribute":
|
|
594
|
+
return [t, te(i)];
|
|
595
|
+
case "DimensionalBaseMeasure":
|
|
596
|
+
return [t, ie(i)];
|
|
597
|
+
case "DimensionalCalculatedMeasure":
|
|
598
|
+
return [t, se(i)];
|
|
599
|
+
default:
|
|
600
|
+
return [t, i];
|
|
601
|
+
}
|
|
602
|
+
return [t, i];
|
|
603
|
+
})
|
|
604
|
+
);
|
|
605
|
+
return new fr(
|
|
606
|
+
e.name,
|
|
607
|
+
e.expression,
|
|
608
|
+
r,
|
|
609
|
+
e.format,
|
|
610
|
+
e.description,
|
|
611
|
+
R(e.sort),
|
|
612
|
+
e.dataSource,
|
|
613
|
+
e.composeCode
|
|
614
|
+
);
|
|
615
|
+
}, Oe = (e) => new dr(
|
|
616
|
+
e.name,
|
|
617
|
+
F(e.attribute),
|
|
618
|
+
e.format,
|
|
619
|
+
e.description,
|
|
620
|
+
R(e.sort),
|
|
621
|
+
e.dataSource,
|
|
622
|
+
e.composeCode
|
|
623
|
+
), Y = (e) => {
|
|
579
624
|
switch (e.__serializable) {
|
|
580
625
|
case "DimensionalBaseMeasure":
|
|
581
|
-
return te(e);
|
|
582
|
-
case "DimensionalCalculatedMeasure":
|
|
583
626
|
return ie(e);
|
|
627
|
+
case "DimensionalCalculatedMeasure":
|
|
628
|
+
return se(e);
|
|
584
629
|
case "DimensionalMeasureTemplate":
|
|
585
630
|
return Oe(e);
|
|
586
631
|
default:
|
|
@@ -589,143 +634,275 @@ const R = (e) => e === void 0 ? xr.None : e, gt = (e) => new Ke(e.metadataItem,
|
|
|
589
634
|
}, m = (e) => {
|
|
590
635
|
switch (e.__serializable) {
|
|
591
636
|
case "MembersFilter":
|
|
592
|
-
return new
|
|
593
|
-
|
|
594
|
-
|
|
637
|
+
return new xr(
|
|
638
|
+
F(e.attribute),
|
|
639
|
+
e.members,
|
|
640
|
+
e.config.backgroundFilter ? q(h({}, e.config), { backgroundFilter: m(e.config.backgroundFilter) }) : e.config,
|
|
641
|
+
e.composeCode
|
|
642
|
+
);
|
|
595
643
|
case "LogicalAttributeFilter":
|
|
596
|
-
return new Ar(
|
|
644
|
+
return new Ar(
|
|
645
|
+
e.filters.map((t) => m(t)),
|
|
646
|
+
e.operator,
|
|
647
|
+
e.config,
|
|
648
|
+
e.composeCode
|
|
649
|
+
);
|
|
597
650
|
case "CascadingFilter":
|
|
598
|
-
return new Er(
|
|
651
|
+
return new Er(
|
|
652
|
+
e._filters.map((t) => m(t)),
|
|
653
|
+
e.config,
|
|
654
|
+
e.composeCode
|
|
655
|
+
);
|
|
599
656
|
case "ExcludeFilter":
|
|
600
|
-
return new wr(
|
|
657
|
+
return new wr(
|
|
658
|
+
m(e.filter),
|
|
659
|
+
e.input ? m(e.input) : void 0,
|
|
660
|
+
e.config,
|
|
661
|
+
e.composeCode
|
|
662
|
+
);
|
|
601
663
|
case "MeasureFilter":
|
|
602
|
-
return new qr(
|
|
664
|
+
return new qr(
|
|
665
|
+
F(e.attribute),
|
|
666
|
+
Y(e.measure),
|
|
667
|
+
e.operatorA,
|
|
668
|
+
e.valueA,
|
|
669
|
+
e.operatorB,
|
|
670
|
+
e.valueB,
|
|
671
|
+
e.config,
|
|
672
|
+
e.composeCode
|
|
673
|
+
);
|
|
603
674
|
case "RankingFilter":
|
|
604
|
-
return new Fr(
|
|
675
|
+
return new Fr(
|
|
676
|
+
F(e.attribute),
|
|
677
|
+
Y(e.measure),
|
|
678
|
+
e.operator,
|
|
679
|
+
e.count,
|
|
680
|
+
e.config,
|
|
681
|
+
e.composeCode
|
|
682
|
+
);
|
|
605
683
|
case "MeasureRankingFilter":
|
|
606
|
-
return new hr(
|
|
684
|
+
return new hr(
|
|
685
|
+
Y(e.measure),
|
|
686
|
+
e.operator,
|
|
687
|
+
e.count,
|
|
688
|
+
e.config,
|
|
689
|
+
e.composeCode
|
|
690
|
+
);
|
|
607
691
|
case "NumericFilter":
|
|
608
|
-
return new br(
|
|
692
|
+
return new br(
|
|
693
|
+
F(e.attribute),
|
|
694
|
+
e.operatorA,
|
|
695
|
+
e.valueA,
|
|
696
|
+
e.operatorB,
|
|
697
|
+
e.valueB,
|
|
698
|
+
e.config,
|
|
699
|
+
e.composeCode
|
|
700
|
+
);
|
|
609
701
|
case "TextFilter":
|
|
610
|
-
return new gr(
|
|
702
|
+
return new gr(
|
|
703
|
+
F(e.attribute),
|
|
704
|
+
e.operatorA,
|
|
705
|
+
e.valueA,
|
|
706
|
+
e.config,
|
|
707
|
+
e.composeCode
|
|
708
|
+
);
|
|
611
709
|
case "DateRangeFilter": {
|
|
612
710
|
const { valueA: t, valueB: i } = e;
|
|
613
|
-
return new mr(
|
|
711
|
+
return new mr(
|
|
712
|
+
F(e.attribute),
|
|
713
|
+
t,
|
|
714
|
+
i,
|
|
715
|
+
e.config,
|
|
716
|
+
e.composeCode
|
|
717
|
+
);
|
|
614
718
|
}
|
|
615
719
|
case "RelativeDateFilter":
|
|
616
|
-
return new pr(
|
|
720
|
+
return new pr(
|
|
721
|
+
F(e.attribute),
|
|
722
|
+
e.offset,
|
|
723
|
+
e.count,
|
|
724
|
+
e.operator,
|
|
725
|
+
e.anchor,
|
|
726
|
+
e.config,
|
|
727
|
+
e.composeCode
|
|
728
|
+
);
|
|
617
729
|
case "CustomFilter":
|
|
618
|
-
return new yr(
|
|
730
|
+
return new yr(
|
|
731
|
+
F(e.attribute),
|
|
732
|
+
e.jaqlExpression,
|
|
733
|
+
e.config,
|
|
734
|
+
e.composeCode
|
|
735
|
+
);
|
|
619
736
|
default:
|
|
620
737
|
return e;
|
|
621
738
|
}
|
|
622
739
|
};
|
|
623
|
-
l.registerCustom(
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
},
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
l.registerCustom(
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
l.registerCustom(
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
740
|
+
l.registerCustom(
|
|
741
|
+
{
|
|
742
|
+
isApplicable: We,
|
|
743
|
+
serialize: (e) => e.serialize(),
|
|
744
|
+
deserialize: (e) => gt(e)
|
|
745
|
+
},
|
|
746
|
+
"JaqlElement"
|
|
747
|
+
);
|
|
748
|
+
l.registerCustom(
|
|
749
|
+
{
|
|
750
|
+
isApplicable: Ke,
|
|
751
|
+
serialize: (e) => e.serialize(),
|
|
752
|
+
deserialize: (e) => re(e)
|
|
753
|
+
},
|
|
754
|
+
"DimensionalAttribute"
|
|
755
|
+
);
|
|
756
|
+
l.registerCustom(
|
|
757
|
+
{
|
|
758
|
+
isApplicable: Qe,
|
|
759
|
+
serialize: (e) => e.serialize(),
|
|
760
|
+
deserialize: (e) => te(e)
|
|
761
|
+
},
|
|
762
|
+
"DimensionalLevelAttribute"
|
|
763
|
+
);
|
|
764
|
+
l.registerCustom(
|
|
765
|
+
{
|
|
766
|
+
isApplicable: kr,
|
|
767
|
+
serialize: (e) => e.serialize(),
|
|
768
|
+
deserialize: (e) => ze(e)
|
|
769
|
+
},
|
|
770
|
+
"DimensionalDimension"
|
|
771
|
+
);
|
|
772
|
+
l.registerCustom(
|
|
773
|
+
{
|
|
774
|
+
isApplicable: Ir,
|
|
775
|
+
serialize: (e) => e.serialize(),
|
|
776
|
+
deserialize: (e) => Ne(e)
|
|
777
|
+
},
|
|
778
|
+
"DimensionalDateDimension"
|
|
779
|
+
);
|
|
780
|
+
l.registerCustom(
|
|
781
|
+
{
|
|
782
|
+
isApplicable: Ye,
|
|
783
|
+
serialize: (e) => e.serialize(),
|
|
784
|
+
deserialize: (e) => ie(e)
|
|
785
|
+
},
|
|
786
|
+
"DimensionalBaseMeasure"
|
|
787
|
+
);
|
|
788
|
+
l.registerCustom(
|
|
789
|
+
{
|
|
790
|
+
isApplicable: He,
|
|
791
|
+
serialize: (e) => e.serialize(),
|
|
792
|
+
deserialize: (e) => se(e)
|
|
793
|
+
},
|
|
794
|
+
"DimensionalCalculatedMeasure"
|
|
795
|
+
);
|
|
796
|
+
l.registerCustom(
|
|
797
|
+
{
|
|
798
|
+
isApplicable: Xe,
|
|
799
|
+
serialize: (e) => e.serialize(),
|
|
800
|
+
deserialize: (e) => Oe(e)
|
|
801
|
+
},
|
|
802
|
+
"DimensionalMeasureTemplate"
|
|
803
|
+
);
|
|
804
|
+
l.registerCustom(
|
|
805
|
+
{
|
|
806
|
+
isApplicable: ee,
|
|
807
|
+
serialize: (e) => e.serialize(),
|
|
808
|
+
deserialize: (e) => m(e)
|
|
809
|
+
},
|
|
810
|
+
"MembersFilter"
|
|
811
|
+
);
|
|
812
|
+
l.registerCustom(
|
|
813
|
+
{
|
|
814
|
+
isApplicable: Ze,
|
|
815
|
+
serialize: (e) => e.serialize(),
|
|
816
|
+
deserialize: (e) => m(e)
|
|
817
|
+
},
|
|
818
|
+
"LogicalAttributeFilter"
|
|
819
|
+
);
|
|
820
|
+
l.registerCustom(
|
|
821
|
+
{
|
|
822
|
+
isApplicable: Ge,
|
|
823
|
+
serialize: (e) => e.serialize(),
|
|
824
|
+
deserialize: (e) => m(e)
|
|
825
|
+
},
|
|
826
|
+
"CascadingFilter"
|
|
827
|
+
);
|
|
828
|
+
l.registerCustom(
|
|
829
|
+
{
|
|
830
|
+
isApplicable: ve,
|
|
831
|
+
serialize: (e) => e.serialize(),
|
|
832
|
+
deserialize: (e) => m(e)
|
|
833
|
+
},
|
|
834
|
+
"ExcludeFilter"
|
|
835
|
+
);
|
|
836
|
+
l.registerCustom(
|
|
837
|
+
{
|
|
838
|
+
isApplicable: er,
|
|
839
|
+
serialize: (e) => e.serialize(),
|
|
840
|
+
deserialize: (e) => m(e)
|
|
841
|
+
},
|
|
842
|
+
"MeasureFilter"
|
|
843
|
+
);
|
|
844
|
+
l.registerCustom(
|
|
845
|
+
{
|
|
846
|
+
isApplicable: rr,
|
|
847
|
+
serialize: (e) => e.serialize(),
|
|
848
|
+
deserialize: (e) => m(e)
|
|
849
|
+
},
|
|
850
|
+
"RankingFilter"
|
|
851
|
+
);
|
|
852
|
+
l.registerCustom(
|
|
853
|
+
{
|
|
854
|
+
isApplicable: tr,
|
|
855
|
+
serialize: (e) => e.serialize(),
|
|
856
|
+
deserialize: (e) => m(e)
|
|
857
|
+
},
|
|
858
|
+
"MeasureRankingFilter"
|
|
859
|
+
);
|
|
860
|
+
l.registerCustom(
|
|
861
|
+
{
|
|
862
|
+
isApplicable: ir,
|
|
863
|
+
serialize: (e) => e.serialize(),
|
|
864
|
+
deserialize: (e) => m(e)
|
|
865
|
+
},
|
|
866
|
+
"NumericFilter"
|
|
867
|
+
);
|
|
868
|
+
l.registerCustom(
|
|
869
|
+
{
|
|
870
|
+
isApplicable: sr,
|
|
871
|
+
serialize: (e) => e.serialize(),
|
|
872
|
+
deserialize: (e) => m(e)
|
|
873
|
+
},
|
|
874
|
+
"TextFilter"
|
|
875
|
+
);
|
|
876
|
+
l.registerCustom(
|
|
877
|
+
{
|
|
878
|
+
isApplicable: nr,
|
|
879
|
+
serialize: (e) => e.serialize(),
|
|
880
|
+
deserialize: (e) => m(e)
|
|
881
|
+
},
|
|
882
|
+
"DateRangeFilter"
|
|
883
|
+
);
|
|
884
|
+
l.registerCustom(
|
|
885
|
+
{
|
|
886
|
+
isApplicable: ar,
|
|
887
|
+
serialize: (e) => e.serialize(),
|
|
888
|
+
deserialize: (e) => m(e)
|
|
889
|
+
},
|
|
890
|
+
"RelativeDateFilter"
|
|
891
|
+
);
|
|
892
|
+
l.registerCustom(
|
|
893
|
+
{
|
|
894
|
+
isApplicable: or,
|
|
895
|
+
serialize: (e) => e.serialize(),
|
|
896
|
+
deserialize: (e) => m(e)
|
|
897
|
+
},
|
|
898
|
+
"CustomFilter"
|
|
899
|
+
);
|
|
900
|
+
const vt = l, T = "DM.";
|
|
901
|
+
function x(e) {
|
|
725
902
|
return typeof e == "object" && e !== null && "function" in e && "args" in e;
|
|
726
903
|
}
|
|
727
|
-
function
|
|
728
|
-
return e.every(
|
|
904
|
+
function ne(e) {
|
|
905
|
+
return e.every(x);
|
|
729
906
|
}
|
|
730
907
|
function J(e) {
|
|
731
908
|
return "attribute" in e && "config" in e;
|
|
@@ -742,14 +919,12 @@ function ht(e) {
|
|
|
742
919
|
function Ft(e) {
|
|
743
920
|
const r = e.split(".");
|
|
744
921
|
if (r.length < 3 || `${r[0]}.` !== T)
|
|
745
|
-
throw new Error(
|
|
922
|
+
throw new Error(
|
|
923
|
+
`Invalid attribute name format: "${e}". Expected format: "${T}TableName.ColumnName[.Level]"`
|
|
924
|
+
);
|
|
746
925
|
const t = r[1], i = r[2];
|
|
747
926
|
let s;
|
|
748
|
-
return r.length === 4 && (s = r[3]), {
|
|
749
|
-
tableName: t,
|
|
750
|
-
columnName: i,
|
|
751
|
-
level: s
|
|
752
|
-
};
|
|
927
|
+
return r.length === 4 && (s = r[3]), { tableName: t, columnName: i, level: s };
|
|
753
928
|
}
|
|
754
929
|
function qt(e, r) {
|
|
755
930
|
const { tableName: t, columnName: i, level: s } = Ft(e), a = r.find((o) => o.name === t);
|
|
@@ -760,38 +935,45 @@ function qt(e, r) {
|
|
|
760
935
|
throw new Error(`Column "${i}" not found in table "${t}"`);
|
|
761
936
|
if (s) {
|
|
762
937
|
if (!Dr(n.dataType))
|
|
763
|
-
throw new Error(
|
|
764
|
-
|
|
938
|
+
throw new Error(
|
|
939
|
+
`Invalid date level "${s}" in attribute "${e}". Column "${t}.${i}" is not a datetime column`
|
|
940
|
+
);
|
|
941
|
+
const o = K.all;
|
|
765
942
|
if (!o.includes(s))
|
|
766
|
-
throw new Error(
|
|
767
|
-
|
|
943
|
+
throw new Error(
|
|
944
|
+
`Invalid date level "${s}" in attribute "${e}". Valid levels are: ${o.join(
|
|
945
|
+
", "
|
|
946
|
+
)}`
|
|
947
|
+
);
|
|
948
|
+
const u = K.dateOnly;
|
|
768
949
|
if (n.dataType === "date" && !u.includes(s))
|
|
769
|
-
throw new Error(
|
|
770
|
-
|
|
950
|
+
throw new Error(
|
|
951
|
+
`Invalid level "${s}" in attribute "${e}". Column "${t}.${i}" is only a date column, not a datetime column`
|
|
952
|
+
);
|
|
953
|
+
const c = K.timeOnly;
|
|
771
954
|
if (n.dataType === "time" && !c.includes(s))
|
|
772
|
-
throw new Error(
|
|
955
|
+
throw new Error(
|
|
956
|
+
`Invalid level "${s}" in attribute "${e}". Column "${t}.${i}" is only a time column, not a date column`
|
|
957
|
+
);
|
|
773
958
|
}
|
|
774
|
-
return {
|
|
775
|
-
field: n,
|
|
776
|
-
level: s
|
|
777
|
-
};
|
|
959
|
+
return { field: n, level: s };
|
|
778
960
|
}
|
|
779
961
|
function Be(e) {
|
|
780
|
-
return e.type ===
|
|
962
|
+
return e.type === N.TextAttribute;
|
|
781
963
|
}
|
|
782
964
|
function Pe(e) {
|
|
783
|
-
return e.type ===
|
|
965
|
+
return e.type === N.NumericAttribute;
|
|
784
966
|
}
|
|
785
967
|
function wt(e) {
|
|
786
|
-
return e.type ===
|
|
968
|
+
return e.type === N.DateLevel;
|
|
787
969
|
}
|
|
788
970
|
function Et(e) {
|
|
789
971
|
return Be(e) || Pe(e);
|
|
790
972
|
}
|
|
791
973
|
function W(e) {
|
|
792
|
-
return e.type ===
|
|
974
|
+
return e.type === N.TextAttribute ? "text" : e.type === N.NumericAttribute ? "numeric" : e.type === N.DateLevel ? "date/datetime" : "unknown";
|
|
793
975
|
}
|
|
794
|
-
function
|
|
976
|
+
function ae(e, r, t) {
|
|
795
977
|
const { field: i, level: s } = qt(e, t);
|
|
796
978
|
return $r({
|
|
797
979
|
expression: i.expression,
|
|
@@ -805,10 +987,7 @@ function ne(e, r, t) {
|
|
|
805
987
|
const At = (e) => {
|
|
806
988
|
const { data: r } = e, { dataSource: t, tables: i } = e.context;
|
|
807
989
|
if (!r)
|
|
808
|
-
return {
|
|
809
|
-
success: !0,
|
|
810
|
-
data: []
|
|
811
|
-
};
|
|
990
|
+
return { success: !0, data: [] };
|
|
812
991
|
if (!ht(r))
|
|
813
992
|
return {
|
|
814
993
|
success: !1,
|
|
@@ -829,44 +1008,36 @@ const At = (e) => {
|
|
|
829
1008
|
input: n
|
|
830
1009
|
};
|
|
831
1010
|
try {
|
|
832
|
-
const c =
|
|
1011
|
+
const c = ae(n, t, i);
|
|
833
1012
|
s.push(c);
|
|
834
1013
|
} catch (c) {
|
|
835
1014
|
const d = c instanceof Error ? c.message : "Unknown error";
|
|
836
|
-
a.push(q(h({}, u), {
|
|
837
|
-
message: d
|
|
838
|
-
}));
|
|
1015
|
+
a.push(q(h({}, u), { message: d }));
|
|
839
1016
|
}
|
|
840
|
-
}), a.length > 0 ? {
|
|
841
|
-
success: !1,
|
|
842
|
-
errors: a
|
|
843
|
-
} : {
|
|
844
|
-
success: !0,
|
|
845
|
-
data: s
|
|
846
|
-
};
|
|
1017
|
+
}), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
|
|
847
1018
|
};
|
|
848
|
-
function
|
|
1019
|
+
function oe(e, r) {
|
|
849
1020
|
const t = Reflect.get(e, r);
|
|
850
1021
|
if (typeof t != "function")
|
|
851
1022
|
throw new Error(`Function "${r}" not found or is not a function`);
|
|
852
1023
|
return t;
|
|
853
1024
|
}
|
|
854
|
-
function
|
|
855
|
-
const t = e.replace("measureFactory.", ""), s =
|
|
1025
|
+
function xt(e, r) {
|
|
1026
|
+
const t = e.replace("measureFactory.", ""), s = oe(Mr, t)(...r);
|
|
856
1027
|
if (!Te(s))
|
|
857
1028
|
throw new Error(`Function "${e}" did not return a valid Measure`);
|
|
858
1029
|
return s;
|
|
859
1030
|
}
|
|
860
|
-
function
|
|
861
|
-
const t = e.replace("filterFactory.logic.", ""), s =
|
|
1031
|
+
function Ct(e, r) {
|
|
1032
|
+
const t = e.replace("filterFactory.logic.", ""), s = oe(Rr, t)(...r);
|
|
862
1033
|
if (!L(s))
|
|
863
1034
|
throw new Error(`Function "${e}" did not return a valid FilterRelations`);
|
|
864
1035
|
return s;
|
|
865
1036
|
}
|
|
866
1037
|
function $t(e, r) {
|
|
867
1038
|
if (e.startsWith("filterFactory.logic."))
|
|
868
|
-
return
|
|
869
|
-
const t = e.replace("filterFactory.", ""), s =
|
|
1039
|
+
return Ct(e, r);
|
|
1040
|
+
const t = e.replace("filterFactory.", ""), s = oe(Sr, t)(...r);
|
|
870
1041
|
if (!J(s) && !L(s))
|
|
871
1042
|
throw new Error(`Function "${e}" did not return a valid Filter or FilterRelations`);
|
|
872
1043
|
return s;
|
|
@@ -874,14 +1045,21 @@ function $t(e, r) {
|
|
|
874
1045
|
function Dt(e, r) {
|
|
875
1046
|
const i = e.split(".")[0];
|
|
876
1047
|
if (i === "measureFactory")
|
|
877
|
-
return
|
|
1048
|
+
return xt(e, r);
|
|
878
1049
|
if (i === "filterFactory")
|
|
879
1050
|
return $t(e, r);
|
|
880
|
-
throw new Error(
|
|
1051
|
+
throw new Error(
|
|
1052
|
+
`Unsupported factory: "${i}". Supported factories: measureFactory, filterFactory`
|
|
1053
|
+
);
|
|
881
1054
|
}
|
|
882
1055
|
const Mt = /\[([a-zA-Z_][a-zA-Z0-9_.-]*)\]/g;
|
|
883
1056
|
function Rt(e, r, t = {}) {
|
|
884
|
-
const {
|
|
1057
|
+
const {
|
|
1058
|
+
warnUnusedContext: i = !0,
|
|
1059
|
+
errorOnUnusedContext: s = !0,
|
|
1060
|
+
allowEmptyFormula: a = !1,
|
|
1061
|
+
errorPrefix: n = "customFormula validation"
|
|
1062
|
+
} = t, o = {
|
|
885
1063
|
isValid: !0,
|
|
886
1064
|
errors: [],
|
|
887
1065
|
warnings: [],
|
|
@@ -892,21 +1070,33 @@ function Rt(e, r, t = {}) {
|
|
|
892
1070
|
return a || (o.errors.push(`${n}args[1]: Formula cannot be empty`), o.isValid = !1), o;
|
|
893
1071
|
const u = Object.keys(r);
|
|
894
1072
|
if (u.length === 0)
|
|
895
|
-
return o.errors.push(
|
|
1073
|
+
return o.errors.push(
|
|
1074
|
+
`${n}args[2]: Context cannot be empty - custom formulas require context definitions`
|
|
1075
|
+
), o.isValid = !1, o;
|
|
896
1076
|
const c = Mt, d = /* @__PURE__ */ new Set();
|
|
897
1077
|
let g;
|
|
898
1078
|
for (; (g = c.exec(e)) !== null; ) {
|
|
899
1079
|
const b = g[1];
|
|
900
1080
|
d.add(b);
|
|
901
1081
|
}
|
|
902
|
-
o.references = Array.from(d), o.references.length === 0 && o.warnings.push(
|
|
1082
|
+
o.references = Array.from(d), o.references.length === 0 && o.warnings.push(
|
|
1083
|
+
`${n}args[1]: No bracket references found in formula - ensure this is intentional`
|
|
1084
|
+
);
|
|
903
1085
|
const p = [];
|
|
904
1086
|
for (const b of o.references)
|
|
905
1087
|
u.includes(b) || p.push(b);
|
|
906
|
-
if (p.length > 0 && (o.isValid = !1, p.length === 1 ? o.errors.push(
|
|
1088
|
+
if (p.length > 0 && (o.isValid = !1, p.length === 1 ? o.errors.push(
|
|
1089
|
+
`${n}args[1]: Reference [${p[0]}] not found in context. Available keys: ${u.join(", ")}`
|
|
1090
|
+
) : o.errors.push(
|
|
1091
|
+
`${n}args[1]: References [${p.join(
|
|
1092
|
+
"], ["
|
|
1093
|
+
)}] not found in context. Available keys: ${u.join(", ")}`
|
|
1094
|
+
)), (i || s) && u.length > 0) {
|
|
907
1095
|
const b = u.filter((f) => !o.references.includes(f));
|
|
908
1096
|
if (o.unusedContextKeys = b, b.length > 0) {
|
|
909
|
-
const f = `${n}args[2]: Context keys [${b.join(
|
|
1097
|
+
const f = `${n}args[2]: Context keys [${b.join(
|
|
1098
|
+
", "
|
|
1099
|
+
)}] are defined but not used in formula`;
|
|
910
1100
|
s ? (o.errors.push(f), o.isValid = !1) : i && o.warnings.push(f);
|
|
911
1101
|
}
|
|
912
1102
|
}
|
|
@@ -918,19 +1108,21 @@ function St(e, r, t = {}) {
|
|
|
918
1108
|
throw new Error(i.errors.join("; "));
|
|
919
1109
|
i.warnings.length > 0 && console.warn("Formula validation warnings:", i.warnings.join("; "));
|
|
920
1110
|
}
|
|
921
|
-
function
|
|
1111
|
+
function zt(e, r) {
|
|
922
1112
|
if (e.length < 3)
|
|
923
1113
|
throw new Error(`${r.pathPrefix}Expected at least 3 arguments for customFormula`);
|
|
924
1114
|
const t = e[1], i = e[2];
|
|
925
1115
|
St(t, i, {
|
|
926
1116
|
errorPrefix: `${r.pathPrefix}`,
|
|
927
1117
|
errorOnUnusedContext: !0,
|
|
1118
|
+
// Strict validation: all context keys must be used
|
|
928
1119
|
allowEmptyFormula: !1
|
|
1120
|
+
// Custom formulas must have content
|
|
929
1121
|
});
|
|
930
1122
|
const s = {};
|
|
931
1123
|
for (const [a, n] of Object.entries(i)) {
|
|
932
1124
|
const o = `args[2].${a}`;
|
|
933
|
-
if (
|
|
1125
|
+
if (x(n))
|
|
934
1126
|
s[`${a}`] = w({
|
|
935
1127
|
data: n,
|
|
936
1128
|
context: {
|
|
@@ -941,7 +1133,11 @@ function Nt(e, r) {
|
|
|
941
1133
|
});
|
|
942
1134
|
else if (typeof n == "string" && n.startsWith(T))
|
|
943
1135
|
try {
|
|
944
|
-
s[`${a}`] =
|
|
1136
|
+
s[`${a}`] = ae(
|
|
1137
|
+
n,
|
|
1138
|
+
r.dataSource,
|
|
1139
|
+
r.tables
|
|
1140
|
+
);
|
|
945
1141
|
} catch (u) {
|
|
946
1142
|
const c = u instanceof Error ? u.message : "Unknown error";
|
|
947
1143
|
throw new Error(`${o}: ${c}`);
|
|
@@ -949,41 +1145,72 @@ function Nt(e, r) {
|
|
|
949
1145
|
else if (n && typeof n == "object" && "kind" in n)
|
|
950
1146
|
s[`${a}`] = n;
|
|
951
1147
|
else
|
|
952
|
-
throw new Error(
|
|
1148
|
+
throw new Error(
|
|
1149
|
+
`${o}: Invalid context value for key '${a}'. Expected a function call or attribute reference (${T}...), but got: ${typeof n}`
|
|
1150
|
+
);
|
|
953
1151
|
}
|
|
954
1152
|
e[2] = s;
|
|
955
1153
|
}
|
|
956
|
-
function
|
|
1154
|
+
function j(e, r) {
|
|
957
1155
|
const t = e[0];
|
|
958
1156
|
if (!t || typeof t != "object" || !("type" in t))
|
|
959
1157
|
throw new Error(`${r.pathPrefix}args[0]: Expected attribute as first argument`);
|
|
960
1158
|
return t;
|
|
961
1159
|
}
|
|
962
|
-
function
|
|
963
|
-
const t =
|
|
1160
|
+
function ge(e, r) {
|
|
1161
|
+
const t = j(e, r);
|
|
964
1162
|
if (!Et(t))
|
|
965
|
-
throw new Error(
|
|
1163
|
+
throw new Error(
|
|
1164
|
+
`${r.pathPrefix}args[0]: Attribute must be string or numeric type, got ${W(
|
|
1165
|
+
t
|
|
1166
|
+
)} attribute`
|
|
1167
|
+
);
|
|
966
1168
|
}
|
|
967
1169
|
function D(e, r) {
|
|
968
|
-
const t =
|
|
1170
|
+
const t = j(e, r);
|
|
969
1171
|
if (!Pe(t))
|
|
970
|
-
throw new Error(
|
|
1172
|
+
throw new Error(
|
|
1173
|
+
`${r.pathPrefix}args[0]: Attribute must be numeric type, got ${W(
|
|
1174
|
+
t
|
|
1175
|
+
)} attribute`
|
|
1176
|
+
);
|
|
971
1177
|
}
|
|
972
1178
|
function M(e, r) {
|
|
973
|
-
const t =
|
|
1179
|
+
const t = j(e, r);
|
|
974
1180
|
if (!Be(t))
|
|
975
|
-
throw new Error(
|
|
1181
|
+
throw new Error(
|
|
1182
|
+
`${r.pathPrefix}args[0]: Attribute must be string type, got ${W(
|
|
1183
|
+
t
|
|
1184
|
+
)} attribute`
|
|
1185
|
+
);
|
|
976
1186
|
}
|
|
977
1187
|
function A(e, r) {
|
|
978
|
-
const t =
|
|
1188
|
+
const t = j(e, r);
|
|
979
1189
|
if (!wt(t))
|
|
980
|
-
throw new Error(
|
|
1190
|
+
throw new Error(
|
|
1191
|
+
`${r.pathPrefix}args[0]: Attribute must be date/datetime type, got ${W(
|
|
1192
|
+
t
|
|
1193
|
+
)} attribute`
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
function Nt(e, r) {
|
|
1197
|
+
const t = e[0];
|
|
1198
|
+
if (!t || typeof t != "object" || !("attribute" in t))
|
|
1199
|
+
throw new Error(`${r.pathPrefix}args[0]: Expected filter as first argument`);
|
|
1200
|
+
return t;
|
|
1201
|
+
}
|
|
1202
|
+
function Ot(e, r) {
|
|
1203
|
+
const t = Nt(e, r);
|
|
1204
|
+
if (!ee(t))
|
|
1205
|
+
throw new Error(
|
|
1206
|
+
`${r.pathPrefix}args[0]: exclude filter only accepts members filter, got ${t.__serializable || "unknown"} filter`
|
|
1207
|
+
);
|
|
981
1208
|
}
|
|
982
|
-
const
|
|
983
|
-
"measureFactory.customFormula":
|
|
1209
|
+
const Tt = {
|
|
1210
|
+
"measureFactory.customFormula": zt,
|
|
984
1211
|
// String | Number filters
|
|
985
|
-
"filterFactory.equals":
|
|
986
|
-
"filterFactory.doesntEqual":
|
|
1212
|
+
"filterFactory.equals": ge,
|
|
1213
|
+
"filterFactory.doesntEqual": ge,
|
|
987
1214
|
// Numeric filters
|
|
988
1215
|
"filterFactory.greaterThan": D,
|
|
989
1216
|
"filterFactory.greaterThanOrEqual": D,
|
|
@@ -1010,1190 +1237,542 @@ const zt = {
|
|
|
1010
1237
|
"filterFactory.thisYear": A,
|
|
1011
1238
|
"filterFactory.thisMonth": A,
|
|
1012
1239
|
"filterFactory.thisQuarter": A,
|
|
1013
|
-
"filterFactory.today": A
|
|
1240
|
+
"filterFactory.today": A,
|
|
1241
|
+
// Exclude filter
|
|
1242
|
+
"filterFactory.exclude": Ot
|
|
1014
1243
|
};
|
|
1015
|
-
function
|
|
1016
|
-
return
|
|
1244
|
+
function Bt(e) {
|
|
1245
|
+
return Tt[`${e}`];
|
|
1017
1246
|
}
|
|
1018
|
-
const
|
|
1247
|
+
const Pt = {
|
|
1019
1248
|
// ==================== MEASURE FACTORY FUNCTIONS ====================
|
|
1020
1249
|
// Basic aggregations
|
|
1021
1250
|
"measureFactory.sum": [
|
|
1022
|
-
{
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
type: "string",
|
|
1028
|
-
required: !1
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
type: "string",
|
|
1032
|
-
required: !1
|
|
1033
|
-
}
|
|
1251
|
+
{ type: "Attribute", required: !0 },
|
|
1252
|
+
{ type: "string", required: !1 },
|
|
1253
|
+
// name
|
|
1254
|
+
{ type: "string", required: !1 }
|
|
1255
|
+
// format
|
|
1034
1256
|
],
|
|
1035
1257
|
"measureFactory.average": [
|
|
1036
|
-
{
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
type: "string",
|
|
1042
|
-
required: !1
|
|
1043
|
-
},
|
|
1044
|
-
{
|
|
1045
|
-
type: "string",
|
|
1046
|
-
required: !1
|
|
1047
|
-
}
|
|
1258
|
+
{ type: "Attribute", required: !0 },
|
|
1259
|
+
{ type: "string", required: !1 },
|
|
1260
|
+
// name
|
|
1261
|
+
{ type: "string", required: !1 }
|
|
1262
|
+
// format
|
|
1048
1263
|
],
|
|
1049
1264
|
"measureFactory.avg": [
|
|
1050
|
-
{
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
type: "string",
|
|
1056
|
-
required: !1
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
type: "string",
|
|
1060
|
-
required: !1
|
|
1061
|
-
}
|
|
1265
|
+
{ type: "Attribute", required: !0 },
|
|
1266
|
+
{ type: "string", required: !1 },
|
|
1267
|
+
// name
|
|
1268
|
+
{ type: "string", required: !1 }
|
|
1269
|
+
// format
|
|
1062
1270
|
],
|
|
1063
1271
|
"measureFactory.min": [
|
|
1064
|
-
{
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
type: "string",
|
|
1070
|
-
required: !1
|
|
1071
|
-
},
|
|
1072
|
-
{
|
|
1073
|
-
type: "string",
|
|
1074
|
-
required: !1
|
|
1075
|
-
}
|
|
1272
|
+
{ type: "Attribute", required: !0 },
|
|
1273
|
+
{ type: "string", required: !1 },
|
|
1274
|
+
// name
|
|
1275
|
+
{ type: "string", required: !1 }
|
|
1276
|
+
// format
|
|
1076
1277
|
],
|
|
1077
1278
|
"measureFactory.max": [
|
|
1078
|
-
{
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
type: "string",
|
|
1084
|
-
required: !1
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
type: "string",
|
|
1088
|
-
required: !1
|
|
1089
|
-
}
|
|
1279
|
+
{ type: "Attribute", required: !0 },
|
|
1280
|
+
{ type: "string", required: !1 },
|
|
1281
|
+
// name
|
|
1282
|
+
{ type: "string", required: !1 }
|
|
1283
|
+
// format
|
|
1090
1284
|
],
|
|
1091
1285
|
"measureFactory.median": [
|
|
1092
|
-
{
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
type: "string",
|
|
1098
|
-
required: !1
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
type: "string",
|
|
1102
|
-
required: !1
|
|
1103
|
-
}
|
|
1286
|
+
{ type: "Attribute", required: !0 },
|
|
1287
|
+
{ type: "string", required: !1 },
|
|
1288
|
+
// name
|
|
1289
|
+
{ type: "string", required: !1 }
|
|
1290
|
+
// format
|
|
1104
1291
|
],
|
|
1105
1292
|
"measureFactory.count": [
|
|
1106
|
-
{
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
type: "string",
|
|
1112
|
-
required: !1
|
|
1113
|
-
},
|
|
1114
|
-
{
|
|
1115
|
-
type: "string",
|
|
1116
|
-
required: !1
|
|
1117
|
-
}
|
|
1293
|
+
{ type: "Attribute", required: !0 },
|
|
1294
|
+
{ type: "string", required: !1 },
|
|
1295
|
+
// name
|
|
1296
|
+
{ type: "string", required: !1 }
|
|
1297
|
+
// format
|
|
1118
1298
|
],
|
|
1119
1299
|
"measureFactory.countDistinct": [
|
|
1120
|
-
{
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
type: "string",
|
|
1126
|
-
required: !1
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
type: "string",
|
|
1130
|
-
required: !1
|
|
1131
|
-
}
|
|
1300
|
+
{ type: "Attribute", required: !0 },
|
|
1301
|
+
{ type: "string", required: !1 },
|
|
1302
|
+
// name
|
|
1303
|
+
{ type: "string", required: !1 }
|
|
1304
|
+
// format
|
|
1132
1305
|
],
|
|
1133
1306
|
"measureFactory.aggregate": [
|
|
1134
|
-
{
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
},
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
type: "string",
|
|
1144
|
-
required: !1
|
|
1145
|
-
},
|
|
1146
|
-
{
|
|
1147
|
-
type: "string",
|
|
1148
|
-
required: !1
|
|
1149
|
-
}
|
|
1307
|
+
{ type: "Attribute", required: !0 },
|
|
1308
|
+
{ type: "string", required: !0 },
|
|
1309
|
+
// aggregationType
|
|
1310
|
+
{ type: "string", required: !1 },
|
|
1311
|
+
// name
|
|
1312
|
+
{ type: "string", required: !1 }
|
|
1313
|
+
// format
|
|
1150
1314
|
],
|
|
1151
1315
|
// Constants and formulas
|
|
1152
|
-
"measureFactory.constant": [
|
|
1153
|
-
{
|
|
1154
|
-
type: "number",
|
|
1155
|
-
required: !0
|
|
1156
|
-
}
|
|
1157
|
-
],
|
|
1316
|
+
"measureFactory.constant": [{ type: "number", required: !0 }],
|
|
1158
1317
|
"measureFactory.customFormula": [
|
|
1159
|
-
{
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
{
|
|
1164
|
-
|
|
1165
|
-
required: !0
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
type: "CustomFormulaContext",
|
|
1169
|
-
required: !0
|
|
1170
|
-
}
|
|
1318
|
+
{ type: "string", required: !0 },
|
|
1319
|
+
// title
|
|
1320
|
+
{ type: "string", required: !0 },
|
|
1321
|
+
// formula
|
|
1322
|
+
{ type: "CustomFormulaContext", required: !0 }
|
|
1323
|
+
// context
|
|
1171
1324
|
],
|
|
1172
1325
|
// Arithmetic operations
|
|
1173
1326
|
"measureFactory.add": [
|
|
1174
|
-
{
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
{
|
|
1179
|
-
|
|
1180
|
-
required: !0
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
type: "string",
|
|
1184
|
-
required: !1
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
type: "boolean",
|
|
1188
|
-
required: !1
|
|
1189
|
-
}
|
|
1327
|
+
{ type: "Measure | number", required: !0 },
|
|
1328
|
+
{ type: "Measure | number", required: !0 },
|
|
1329
|
+
{ type: "string", required: !1 },
|
|
1330
|
+
// name
|
|
1331
|
+
{ type: "boolean", required: !1 }
|
|
1332
|
+
// withParentheses
|
|
1190
1333
|
],
|
|
1191
1334
|
"measureFactory.subtract": [
|
|
1192
|
-
{
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
{
|
|
1197
|
-
|
|
1198
|
-
required: !0
|
|
1199
|
-
},
|
|
1200
|
-
{
|
|
1201
|
-
type: "string",
|
|
1202
|
-
required: !1
|
|
1203
|
-
},
|
|
1204
|
-
{
|
|
1205
|
-
type: "boolean",
|
|
1206
|
-
required: !1
|
|
1207
|
-
}
|
|
1335
|
+
{ type: "Measure | number", required: !0 },
|
|
1336
|
+
{ type: "Measure | number", required: !0 },
|
|
1337
|
+
{ type: "string", required: !1 },
|
|
1338
|
+
// name
|
|
1339
|
+
{ type: "boolean", required: !1 }
|
|
1340
|
+
// withParentheses
|
|
1208
1341
|
],
|
|
1209
1342
|
"measureFactory.multiply": [
|
|
1210
|
-
{
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
{
|
|
1215
|
-
|
|
1216
|
-
required: !0
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
type: "string",
|
|
1220
|
-
required: !1
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
type: "boolean",
|
|
1224
|
-
required: !1
|
|
1225
|
-
}
|
|
1343
|
+
{ type: "Measure | number", required: !0 },
|
|
1344
|
+
{ type: "Measure | number", required: !0 },
|
|
1345
|
+
{ type: "string", required: !1 },
|
|
1346
|
+
// name
|
|
1347
|
+
{ type: "boolean", required: !1 }
|
|
1348
|
+
// withParentheses
|
|
1226
1349
|
],
|
|
1227
1350
|
"measureFactory.divide": [
|
|
1228
|
-
{
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
{
|
|
1233
|
-
|
|
1234
|
-
required: !0
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
type: "string",
|
|
1238
|
-
required: !1
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
type: "boolean",
|
|
1242
|
-
required: !1
|
|
1243
|
-
}
|
|
1351
|
+
{ type: "Measure | number", required: !0 },
|
|
1352
|
+
{ type: "Measure | number", required: !0 },
|
|
1353
|
+
{ type: "string", required: !1 },
|
|
1354
|
+
// name
|
|
1355
|
+
{ type: "boolean", required: !1 }
|
|
1356
|
+
// withParentheses
|
|
1244
1357
|
],
|
|
1245
1358
|
// Advanced analytics
|
|
1246
1359
|
"measureFactory.measuredValue": [
|
|
1247
|
-
{
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
{
|
|
1252
|
-
|
|
1253
|
-
required: !0
|
|
1254
|
-
},
|
|
1255
|
-
{
|
|
1256
|
-
type: "string",
|
|
1257
|
-
required: !1
|
|
1258
|
-
},
|
|
1259
|
-
{
|
|
1260
|
-
type: "string",
|
|
1261
|
-
required: !1
|
|
1262
|
-
}
|
|
1360
|
+
{ type: "Measure", required: !0 },
|
|
1361
|
+
{ type: "Filter[]", required: !0 },
|
|
1362
|
+
{ type: "string", required: !1 },
|
|
1363
|
+
// name
|
|
1364
|
+
{ type: "string", required: !1 }
|
|
1365
|
+
// format
|
|
1263
1366
|
],
|
|
1264
1367
|
"measureFactory.rank": [
|
|
1265
|
-
{
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
},
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
type: "string",
|
|
1275
|
-
required: !1
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
type: "string",
|
|
1279
|
-
required: !1
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
type: "Attribute[]",
|
|
1283
|
-
required: !1
|
|
1284
|
-
}
|
|
1368
|
+
{ type: "Measure", required: !0 },
|
|
1369
|
+
{ type: "string", required: !1 },
|
|
1370
|
+
// name
|
|
1371
|
+
{ type: "string", required: !1 },
|
|
1372
|
+
// sort
|
|
1373
|
+
{ type: "string", required: !1 },
|
|
1374
|
+
// rankType
|
|
1375
|
+
{ type: "Attribute[]", required: !1 }
|
|
1376
|
+
// groupBy
|
|
1285
1377
|
],
|
|
1286
1378
|
"measureFactory.trend": [
|
|
1287
|
-
{
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
type: "string",
|
|
1293
|
-
required: !1
|
|
1294
|
-
},
|
|
1295
|
-
{
|
|
1296
|
-
type: "any",
|
|
1297
|
-
required: !1
|
|
1298
|
-
}
|
|
1379
|
+
{ type: "Measure", required: !0 },
|
|
1380
|
+
{ type: "string", required: !1 },
|
|
1381
|
+
// name
|
|
1382
|
+
{ type: "any", required: !1 }
|
|
1383
|
+
// options
|
|
1299
1384
|
],
|
|
1300
1385
|
"measureFactory.forecast": [
|
|
1301
|
-
{
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
type: "string",
|
|
1307
|
-
required: !1
|
|
1308
|
-
},
|
|
1309
|
-
{
|
|
1310
|
-
type: "any",
|
|
1311
|
-
required: !1
|
|
1312
|
-
}
|
|
1386
|
+
{ type: "Measure", required: !0 },
|
|
1387
|
+
{ type: "string", required: !1 },
|
|
1388
|
+
// name
|
|
1389
|
+
{ type: "any", required: !1 }
|
|
1390
|
+
// options
|
|
1313
1391
|
],
|
|
1314
1392
|
// Time-based aggregations
|
|
1315
1393
|
"measureFactory.yearToDateSum": [
|
|
1316
|
-
{
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
type: "string",
|
|
1322
|
-
required: !1
|
|
1323
|
-
}
|
|
1394
|
+
{ type: "Measure", required: !0 },
|
|
1395
|
+
{ type: "string", required: !1 }
|
|
1396
|
+
// name
|
|
1324
1397
|
],
|
|
1325
1398
|
"measureFactory.quarterToDateSum": [
|
|
1326
|
-
{
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
type: "string",
|
|
1332
|
-
required: !1
|
|
1333
|
-
}
|
|
1399
|
+
{ type: "Measure", required: !0 },
|
|
1400
|
+
{ type: "string", required: !1 }
|
|
1401
|
+
// name
|
|
1334
1402
|
],
|
|
1335
1403
|
"measureFactory.monthToDateSum": [
|
|
1336
|
-
{
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
type: "string",
|
|
1342
|
-
required: !1
|
|
1343
|
-
}
|
|
1404
|
+
{ type: "Measure", required: !0 },
|
|
1405
|
+
{ type: "string", required: !1 }
|
|
1406
|
+
// name
|
|
1344
1407
|
],
|
|
1345
1408
|
"measureFactory.weekToDateSum": [
|
|
1346
|
-
{
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
},
|
|
1350
|
-
{
|
|
1351
|
-
type: "string",
|
|
1352
|
-
required: !1
|
|
1353
|
-
}
|
|
1409
|
+
{ type: "Measure", required: !0 },
|
|
1410
|
+
{ type: "string", required: !1 }
|
|
1411
|
+
// name
|
|
1354
1412
|
],
|
|
1355
1413
|
"measureFactory.runningSum": [
|
|
1356
|
-
{
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
type: "boolean",
|
|
1362
|
-
required: !1
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
type: "string",
|
|
1366
|
-
required: !1
|
|
1367
|
-
}
|
|
1414
|
+
{ type: "Measure", required: !0 },
|
|
1415
|
+
{ type: "boolean", required: !1 },
|
|
1416
|
+
// continuous
|
|
1417
|
+
{ type: "string", required: !1 }
|
|
1418
|
+
// name
|
|
1368
1419
|
],
|
|
1369
1420
|
// Growth and difference calculations
|
|
1370
1421
|
"measureFactory.growth": [
|
|
1371
|
-
{
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
},
|
|
1375
|
-
{
|
|
1376
|
-
type: "string",
|
|
1377
|
-
required: !1
|
|
1378
|
-
}
|
|
1422
|
+
{ type: "Measure", required: !0 },
|
|
1423
|
+
{ type: "string", required: !1 }
|
|
1424
|
+
// name
|
|
1379
1425
|
],
|
|
1380
1426
|
"measureFactory.growthRate": [
|
|
1381
|
-
{
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
},
|
|
1385
|
-
{
|
|
1386
|
-
type: "string",
|
|
1387
|
-
required: !1
|
|
1388
|
-
}
|
|
1427
|
+
{ type: "Measure", required: !0 },
|
|
1428
|
+
{ type: "string", required: !1 }
|
|
1429
|
+
// name
|
|
1389
1430
|
],
|
|
1390
1431
|
"measureFactory.growthPastWeek": [
|
|
1391
|
-
{
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
},
|
|
1395
|
-
{
|
|
1396
|
-
type: "string",
|
|
1397
|
-
required: !1
|
|
1398
|
-
}
|
|
1432
|
+
{ type: "Measure", required: !0 },
|
|
1433
|
+
{ type: "string", required: !1 }
|
|
1434
|
+
// name
|
|
1399
1435
|
],
|
|
1400
1436
|
"measureFactory.growthPastMonth": [
|
|
1401
|
-
{
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
type: "string",
|
|
1407
|
-
required: !1
|
|
1408
|
-
}
|
|
1437
|
+
{ type: "Measure", required: !0 },
|
|
1438
|
+
{ type: "string", required: !1 }
|
|
1439
|
+
// name
|
|
1409
1440
|
],
|
|
1410
1441
|
"measureFactory.growthPastQuarter": [
|
|
1411
|
-
{
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
type: "string",
|
|
1417
|
-
required: !1
|
|
1418
|
-
}
|
|
1442
|
+
{ type: "Measure", required: !0 },
|
|
1443
|
+
{ type: "string", required: !1 }
|
|
1444
|
+
// name
|
|
1419
1445
|
],
|
|
1420
1446
|
"measureFactory.growthPastYear": [
|
|
1421
|
-
{
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
},
|
|
1425
|
-
{
|
|
1426
|
-
type: "string",
|
|
1427
|
-
required: !1
|
|
1428
|
-
}
|
|
1447
|
+
{ type: "Measure", required: !0 },
|
|
1448
|
+
{ type: "string", required: !1 }
|
|
1449
|
+
// name
|
|
1429
1450
|
],
|
|
1430
1451
|
"measureFactory.difference": [
|
|
1431
|
-
{
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
},
|
|
1435
|
-
{
|
|
1436
|
-
type: "string",
|
|
1437
|
-
required: !1
|
|
1438
|
-
}
|
|
1452
|
+
{ type: "Measure", required: !0 },
|
|
1453
|
+
{ type: "string", required: !1 }
|
|
1454
|
+
// name
|
|
1439
1455
|
],
|
|
1440
1456
|
"measureFactory.diffPastWeek": [
|
|
1441
|
-
{
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
},
|
|
1445
|
-
{
|
|
1446
|
-
type: "string",
|
|
1447
|
-
required: !1
|
|
1448
|
-
}
|
|
1457
|
+
{ type: "Measure", required: !0 },
|
|
1458
|
+
{ type: "string", required: !1 }
|
|
1459
|
+
// name
|
|
1449
1460
|
],
|
|
1450
1461
|
"measureFactory.diffPastMonth": [
|
|
1451
|
-
{
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
},
|
|
1455
|
-
{
|
|
1456
|
-
type: "string",
|
|
1457
|
-
required: !1
|
|
1458
|
-
}
|
|
1462
|
+
{ type: "Measure", required: !0 },
|
|
1463
|
+
{ type: "string", required: !1 }
|
|
1464
|
+
// name
|
|
1459
1465
|
],
|
|
1460
1466
|
"measureFactory.diffPastQuarter": [
|
|
1461
|
-
{
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
},
|
|
1465
|
-
{
|
|
1466
|
-
type: "string",
|
|
1467
|
-
required: !1
|
|
1468
|
-
}
|
|
1467
|
+
{ type: "Measure", required: !0 },
|
|
1468
|
+
{ type: "string", required: !1 }
|
|
1469
|
+
// name
|
|
1469
1470
|
],
|
|
1470
1471
|
"measureFactory.diffPastYear": [
|
|
1471
|
-
{
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
type: "string",
|
|
1477
|
-
required: !1
|
|
1478
|
-
}
|
|
1472
|
+
{ type: "Measure", required: !0 },
|
|
1473
|
+
{ type: "string", required: !1 }
|
|
1474
|
+
// name
|
|
1479
1475
|
],
|
|
1480
1476
|
// Past period measures
|
|
1481
1477
|
"measureFactory.pastDay": [
|
|
1482
|
-
{
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
},
|
|
1486
|
-
{
|
|
1487
|
-
type: "string",
|
|
1488
|
-
required: !1
|
|
1489
|
-
}
|
|
1478
|
+
{ type: "Measure", required: !0 },
|
|
1479
|
+
{ type: "string", required: !1 }
|
|
1480
|
+
// name
|
|
1490
1481
|
],
|
|
1491
1482
|
"measureFactory.pastWeek": [
|
|
1492
|
-
{
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
},
|
|
1496
|
-
{
|
|
1497
|
-
type: "string",
|
|
1498
|
-
required: !1
|
|
1499
|
-
}
|
|
1483
|
+
{ type: "Measure", required: !0 },
|
|
1484
|
+
{ type: "string", required: !1 }
|
|
1485
|
+
// name
|
|
1500
1486
|
],
|
|
1501
1487
|
"measureFactory.pastMonth": [
|
|
1502
|
-
{
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
},
|
|
1506
|
-
{
|
|
1507
|
-
type: "string",
|
|
1508
|
-
required: !1
|
|
1509
|
-
}
|
|
1488
|
+
{ type: "Measure", required: !0 },
|
|
1489
|
+
{ type: "string", required: !1 }
|
|
1490
|
+
// name
|
|
1510
1491
|
],
|
|
1511
1492
|
"measureFactory.pastQuarter": [
|
|
1512
|
-
{
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
},
|
|
1516
|
-
{
|
|
1517
|
-
type: "string",
|
|
1518
|
-
required: !1
|
|
1519
|
-
}
|
|
1493
|
+
{ type: "Measure", required: !0 },
|
|
1494
|
+
{ type: "string", required: !1 }
|
|
1495
|
+
// name
|
|
1520
1496
|
],
|
|
1521
1497
|
"measureFactory.pastYear": [
|
|
1522
|
-
{
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
type: "string",
|
|
1528
|
-
required: !1
|
|
1529
|
-
}
|
|
1498
|
+
{ type: "Measure", required: !0 },
|
|
1499
|
+
{ type: "string", required: !1 }
|
|
1500
|
+
// name
|
|
1530
1501
|
],
|
|
1531
1502
|
// Statistics
|
|
1532
1503
|
"measureFactory.contribution": [
|
|
1533
|
-
{
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
},
|
|
1537
|
-
{
|
|
1538
|
-
type: "string",
|
|
1539
|
-
required: !1
|
|
1540
|
-
}
|
|
1504
|
+
{ type: "Measure", required: !0 },
|
|
1505
|
+
{ type: "string", required: !1 }
|
|
1506
|
+
// name
|
|
1541
1507
|
],
|
|
1542
1508
|
// ==================== FILTER FACTORY FUNCTIONS ====================
|
|
1543
1509
|
// Logical filters
|
|
1544
1510
|
"filterFactory.union": [
|
|
1545
|
-
{
|
|
1546
|
-
|
|
1547
|
-
required: !0
|
|
1548
|
-
},
|
|
1549
|
-
{
|
|
1550
|
-
type: "BaseFilterConfig",
|
|
1551
|
-
required: !1
|
|
1552
|
-
}
|
|
1511
|
+
{ type: "Filter[]", required: !0 },
|
|
1512
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1553
1513
|
],
|
|
1554
1514
|
"filterFactory.intersection": [
|
|
1555
|
-
{
|
|
1556
|
-
|
|
1557
|
-
required: !0
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
type: "BaseFilterConfig",
|
|
1561
|
-
required: !1
|
|
1562
|
-
}
|
|
1515
|
+
{ type: "Filter[]", required: !0 },
|
|
1516
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1563
1517
|
],
|
|
1564
1518
|
"filterFactory.exclude": [
|
|
1565
|
-
{
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
}
|
|
1569
|
-
{
|
|
1570
|
-
type: "Filter",
|
|
1571
|
-
required: !1
|
|
1572
|
-
},
|
|
1573
|
-
{
|
|
1574
|
-
type: "BaseFilterConfig",
|
|
1575
|
-
required: !1
|
|
1576
|
-
}
|
|
1519
|
+
{ type: "Filter", required: !0 },
|
|
1520
|
+
{ type: "Filter", required: !1 },
|
|
1521
|
+
// input filter
|
|
1522
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1577
1523
|
],
|
|
1578
1524
|
// Text filters
|
|
1579
1525
|
"filterFactory.contains": [
|
|
1580
|
-
{
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
},
|
|
1584
|
-
{
|
|
1585
|
-
type: "string",
|
|
1586
|
-
required: !0
|
|
1587
|
-
},
|
|
1588
|
-
{
|
|
1589
|
-
type: "BaseFilterConfig",
|
|
1590
|
-
required: !1
|
|
1591
|
-
}
|
|
1526
|
+
{ type: "Attribute", required: !0 },
|
|
1527
|
+
{ type: "string", required: !0 },
|
|
1528
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1592
1529
|
],
|
|
1593
1530
|
"filterFactory.doesntContain": [
|
|
1594
|
-
{
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
type: "string",
|
|
1600
|
-
required: !0
|
|
1601
|
-
},
|
|
1602
|
-
{
|
|
1603
|
-
type: "BaseFilterConfig",
|
|
1604
|
-
required: !1
|
|
1605
|
-
}
|
|
1531
|
+
{ type: "Attribute", required: !0 },
|
|
1532
|
+
{ type: "string", required: !0 },
|
|
1533
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1606
1534
|
],
|
|
1607
1535
|
"filterFactory.startsWith": [
|
|
1608
|
-
{
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
},
|
|
1612
|
-
{
|
|
1613
|
-
type: "string",
|
|
1614
|
-
required: !0
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
type: "BaseFilterConfig",
|
|
1618
|
-
required: !1
|
|
1619
|
-
}
|
|
1536
|
+
{ type: "Attribute", required: !0 },
|
|
1537
|
+
{ type: "string", required: !0 },
|
|
1538
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1620
1539
|
],
|
|
1621
1540
|
"filterFactory.doesntStartWith": [
|
|
1622
|
-
{
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
type: "string",
|
|
1628
|
-
required: !0
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
type: "BaseFilterConfig",
|
|
1632
|
-
required: !1
|
|
1633
|
-
}
|
|
1541
|
+
{ type: "Attribute", required: !0 },
|
|
1542
|
+
{ type: "string", required: !0 },
|
|
1543
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1634
1544
|
],
|
|
1635
1545
|
"filterFactory.endsWith": [
|
|
1636
|
-
{
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
},
|
|
1640
|
-
{
|
|
1641
|
-
type: "string",
|
|
1642
|
-
required: !0
|
|
1643
|
-
},
|
|
1644
|
-
{
|
|
1645
|
-
type: "BaseFilterConfig",
|
|
1646
|
-
required: !1
|
|
1647
|
-
}
|
|
1546
|
+
{ type: "Attribute", required: !0 },
|
|
1547
|
+
{ type: "string", required: !0 },
|
|
1548
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1648
1549
|
],
|
|
1649
1550
|
"filterFactory.doesntEndWith": [
|
|
1650
|
-
{
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
},
|
|
1654
|
-
{
|
|
1655
|
-
type: "string",
|
|
1656
|
-
required: !0
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
type: "BaseFilterConfig",
|
|
1660
|
-
required: !1
|
|
1661
|
-
}
|
|
1551
|
+
{ type: "Attribute", required: !0 },
|
|
1552
|
+
{ type: "string", required: !0 },
|
|
1553
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1662
1554
|
],
|
|
1663
1555
|
"filterFactory.like": [
|
|
1664
|
-
{
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
type: "string",
|
|
1670
|
-
required: !0
|
|
1671
|
-
},
|
|
1672
|
-
{
|
|
1673
|
-
type: "BaseFilterConfig",
|
|
1674
|
-
required: !1
|
|
1675
|
-
}
|
|
1556
|
+
{ type: "Attribute", required: !0 },
|
|
1557
|
+
{ type: "string", required: !0 },
|
|
1558
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1676
1559
|
],
|
|
1677
1560
|
"filterFactory.equals": [
|
|
1678
|
-
{
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
type: "string | number",
|
|
1684
|
-
required: !0
|
|
1685
|
-
},
|
|
1686
|
-
{
|
|
1687
|
-
type: "BaseFilterConfig",
|
|
1688
|
-
required: !1
|
|
1689
|
-
}
|
|
1561
|
+
{ type: "Attribute", required: !0 },
|
|
1562
|
+
{ type: "string | number", required: !0 },
|
|
1563
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1690
1564
|
],
|
|
1691
1565
|
"filterFactory.doesntEqual": [
|
|
1692
|
-
{
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
},
|
|
1696
|
-
{
|
|
1697
|
-
type: "string | number",
|
|
1698
|
-
required: !0
|
|
1699
|
-
},
|
|
1700
|
-
{
|
|
1701
|
-
type: "BaseFilterConfig",
|
|
1702
|
-
required: !1
|
|
1703
|
-
}
|
|
1566
|
+
{ type: "Attribute", required: !0 },
|
|
1567
|
+
{ type: "string | number", required: !0 },
|
|
1568
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1704
1569
|
],
|
|
1705
1570
|
// Numeric filters
|
|
1706
1571
|
"filterFactory.greaterThan": [
|
|
1707
|
-
{
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
type: "number",
|
|
1713
|
-
required: !0
|
|
1714
|
-
},
|
|
1715
|
-
{
|
|
1716
|
-
type: "BaseFilterConfig",
|
|
1717
|
-
required: !1
|
|
1718
|
-
}
|
|
1572
|
+
{ type: "Attribute", required: !0 },
|
|
1573
|
+
{ type: "number", required: !0 },
|
|
1574
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1719
1575
|
],
|
|
1720
1576
|
"filterFactory.greaterThanOrEqual": [
|
|
1721
|
-
{
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
},
|
|
1725
|
-
{
|
|
1726
|
-
type: "number",
|
|
1727
|
-
required: !0
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
type: "BaseFilterConfig",
|
|
1731
|
-
required: !1
|
|
1732
|
-
}
|
|
1577
|
+
{ type: "Attribute", required: !0 },
|
|
1578
|
+
{ type: "number", required: !0 },
|
|
1579
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1733
1580
|
],
|
|
1734
1581
|
"filterFactory.lessThan": [
|
|
1735
|
-
{
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
},
|
|
1739
|
-
{
|
|
1740
|
-
type: "number",
|
|
1741
|
-
required: !0
|
|
1742
|
-
},
|
|
1743
|
-
{
|
|
1744
|
-
type: "BaseFilterConfig",
|
|
1745
|
-
required: !1
|
|
1746
|
-
}
|
|
1582
|
+
{ type: "Attribute", required: !0 },
|
|
1583
|
+
{ type: "number", required: !0 },
|
|
1584
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1747
1585
|
],
|
|
1748
1586
|
"filterFactory.lessThanOrEqual": [
|
|
1749
|
-
{
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
type: "number",
|
|
1755
|
-
required: !0
|
|
1756
|
-
},
|
|
1757
|
-
{
|
|
1758
|
-
type: "BaseFilterConfig",
|
|
1759
|
-
required: !1
|
|
1760
|
-
}
|
|
1587
|
+
{ type: "Attribute", required: !0 },
|
|
1588
|
+
{ type: "number", required: !0 },
|
|
1589
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1761
1590
|
],
|
|
1762
1591
|
"filterFactory.between": [
|
|
1763
|
-
{
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
},
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
required: !0
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
type: "number",
|
|
1773
|
-
required: !0
|
|
1774
|
-
},
|
|
1775
|
-
{
|
|
1776
|
-
type: "BaseFilterConfig",
|
|
1777
|
-
required: !1
|
|
1778
|
-
}
|
|
1592
|
+
{ type: "Attribute", required: !0 },
|
|
1593
|
+
{ type: "number", required: !0 },
|
|
1594
|
+
// valueA
|
|
1595
|
+
{ type: "number", required: !0 },
|
|
1596
|
+
// valueB
|
|
1597
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1779
1598
|
],
|
|
1780
1599
|
"filterFactory.betweenNotEqual": [
|
|
1781
|
-
{
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
},
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
required: !0
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
type: "number",
|
|
1791
|
-
required: !0
|
|
1792
|
-
},
|
|
1793
|
-
{
|
|
1794
|
-
type: "BaseFilterConfig",
|
|
1795
|
-
required: !1
|
|
1796
|
-
}
|
|
1600
|
+
{ type: "Attribute", required: !0 },
|
|
1601
|
+
{ type: "number", required: !0 },
|
|
1602
|
+
// valueA
|
|
1603
|
+
{ type: "number", required: !0 },
|
|
1604
|
+
// valueB
|
|
1605
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1797
1606
|
],
|
|
1798
1607
|
"filterFactory.numeric": [
|
|
1799
|
-
{
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
},
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
},
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
required: !1
|
|
1810
|
-
},
|
|
1811
|
-
{
|
|
1812
|
-
type: "string",
|
|
1813
|
-
required: !1
|
|
1814
|
-
},
|
|
1815
|
-
{
|
|
1816
|
-
type: "number",
|
|
1817
|
-
required: !1
|
|
1818
|
-
},
|
|
1819
|
-
{
|
|
1820
|
-
type: "BaseFilterConfig",
|
|
1821
|
-
required: !1
|
|
1822
|
-
}
|
|
1608
|
+
{ type: "Attribute", required: !0 },
|
|
1609
|
+
{ type: "string", required: !1 },
|
|
1610
|
+
// operatorA
|
|
1611
|
+
{ type: "number", required: !1 },
|
|
1612
|
+
// valueA
|
|
1613
|
+
{ type: "string", required: !1 },
|
|
1614
|
+
// operatorB
|
|
1615
|
+
{ type: "number", required: !1 },
|
|
1616
|
+
// valueB
|
|
1617
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1823
1618
|
],
|
|
1824
1619
|
// Member filters
|
|
1825
1620
|
"filterFactory.members": [
|
|
1826
|
-
{
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
},
|
|
1830
|
-
{
|
|
1831
|
-
type: "string[]",
|
|
1832
|
-
required: !0
|
|
1833
|
-
},
|
|
1834
|
-
{
|
|
1835
|
-
type: "MembersFilterConfig",
|
|
1836
|
-
required: !1
|
|
1837
|
-
}
|
|
1621
|
+
{ type: "Attribute", required: !0 },
|
|
1622
|
+
{ type: "string[]", required: !0 },
|
|
1623
|
+
{ type: "MembersFilterConfig", required: !1 }
|
|
1838
1624
|
],
|
|
1839
1625
|
// Date filters
|
|
1840
1626
|
"filterFactory.dateFrom": [
|
|
1841
|
-
{
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
type: "Date | string",
|
|
1847
|
-
required: !0
|
|
1848
|
-
},
|
|
1849
|
-
{
|
|
1850
|
-
type: "BaseFilterConfig",
|
|
1851
|
-
required: !1
|
|
1852
|
-
}
|
|
1627
|
+
{ type: "LevelAttribute", required: !0 },
|
|
1628
|
+
{ type: "Date | string", required: !0 },
|
|
1629
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1853
1630
|
],
|
|
1854
1631
|
"filterFactory.dateTo": [
|
|
1855
|
-
{
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
},
|
|
1859
|
-
{
|
|
1860
|
-
type: "Date | string",
|
|
1861
|
-
required: !0
|
|
1862
|
-
},
|
|
1863
|
-
{
|
|
1864
|
-
type: "BaseFilterConfig",
|
|
1865
|
-
required: !1
|
|
1866
|
-
}
|
|
1632
|
+
{ type: "LevelAttribute", required: !0 },
|
|
1633
|
+
{ type: "Date | string", required: !0 },
|
|
1634
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1867
1635
|
],
|
|
1868
1636
|
"filterFactory.dateRange": [
|
|
1869
|
-
{
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
},
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
required: !0
|
|
1876
|
-
},
|
|
1877
|
-
{
|
|
1878
|
-
type: "Date | string",
|
|
1879
|
-
required: !0
|
|
1880
|
-
},
|
|
1881
|
-
{
|
|
1882
|
-
type: "BaseFilterConfig",
|
|
1883
|
-
required: !1
|
|
1884
|
-
}
|
|
1637
|
+
{ type: "LevelAttribute", required: !0 },
|
|
1638
|
+
{ type: "Date | string", required: !0 },
|
|
1639
|
+
// from
|
|
1640
|
+
{ type: "Date | string", required: !0 },
|
|
1641
|
+
// to
|
|
1642
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1885
1643
|
],
|
|
1886
1644
|
"filterFactory.dateRelative": [
|
|
1887
|
-
{
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
},
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
required: !0
|
|
1894
|
-
},
|
|
1895
|
-
{
|
|
1896
|
-
type: "string",
|
|
1897
|
-
required: !0
|
|
1898
|
-
},
|
|
1899
|
-
{
|
|
1900
|
-
type: "BaseFilterConfig",
|
|
1901
|
-
required: !1
|
|
1902
|
-
}
|
|
1645
|
+
{ type: "LevelAttribute", required: !0 },
|
|
1646
|
+
{ type: "number", required: !0 },
|
|
1647
|
+
// offset
|
|
1648
|
+
{ type: "string", required: !0 },
|
|
1649
|
+
// anchor
|
|
1650
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1903
1651
|
],
|
|
1904
1652
|
"filterFactory.dateRelativeFrom": [
|
|
1905
|
-
{
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
},
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
required: !0
|
|
1912
|
-
},
|
|
1913
|
-
{
|
|
1914
|
-
type: "string",
|
|
1915
|
-
required: !0
|
|
1916
|
-
},
|
|
1917
|
-
{
|
|
1918
|
-
type: "BaseFilterConfig",
|
|
1919
|
-
required: !1
|
|
1920
|
-
}
|
|
1653
|
+
{ type: "LevelAttribute", required: !0 },
|
|
1654
|
+
{ type: "number", required: !0 },
|
|
1655
|
+
// offset
|
|
1656
|
+
{ type: "string", required: !0 },
|
|
1657
|
+
// anchor
|
|
1658
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1921
1659
|
],
|
|
1922
1660
|
"filterFactory.dateRelativeTo": [
|
|
1923
|
-
{
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
},
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
required: !0
|
|
1930
|
-
},
|
|
1931
|
-
{
|
|
1932
|
-
type: "string",
|
|
1933
|
-
required: !0
|
|
1934
|
-
},
|
|
1935
|
-
{
|
|
1936
|
-
type: "BaseFilterConfig",
|
|
1937
|
-
required: !1
|
|
1938
|
-
}
|
|
1661
|
+
{ type: "LevelAttribute", required: !0 },
|
|
1662
|
+
{ type: "number", required: !0 },
|
|
1663
|
+
// offset
|
|
1664
|
+
{ type: "string", required: !0 },
|
|
1665
|
+
// anchor
|
|
1666
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1939
1667
|
],
|
|
1940
1668
|
"filterFactory.thisYear": [
|
|
1941
|
-
{
|
|
1942
|
-
|
|
1943
|
-
required: !0
|
|
1944
|
-
},
|
|
1945
|
-
{
|
|
1946
|
-
type: "BaseFilterConfig",
|
|
1947
|
-
required: !1
|
|
1948
|
-
}
|
|
1669
|
+
{ type: "DateDimension", required: !0 },
|
|
1670
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1949
1671
|
],
|
|
1950
1672
|
"filterFactory.thisMonth": [
|
|
1951
|
-
{
|
|
1952
|
-
|
|
1953
|
-
required: !0
|
|
1954
|
-
},
|
|
1955
|
-
{
|
|
1956
|
-
type: "BaseFilterConfig",
|
|
1957
|
-
required: !1
|
|
1958
|
-
}
|
|
1673
|
+
{ type: "DateDimension", required: !0 },
|
|
1674
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1959
1675
|
],
|
|
1960
1676
|
"filterFactory.thisQuarter": [
|
|
1961
|
-
{
|
|
1962
|
-
|
|
1963
|
-
required: !0
|
|
1964
|
-
},
|
|
1965
|
-
{
|
|
1966
|
-
type: "BaseFilterConfig",
|
|
1967
|
-
required: !1
|
|
1968
|
-
}
|
|
1677
|
+
{ type: "DateDimension", required: !0 },
|
|
1678
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1969
1679
|
],
|
|
1970
1680
|
"filterFactory.today": [
|
|
1971
|
-
{
|
|
1972
|
-
|
|
1973
|
-
required: !0
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
type: "BaseFilterConfig",
|
|
1977
|
-
required: !1
|
|
1978
|
-
}
|
|
1681
|
+
{ type: "DateDimension", required: !0 },
|
|
1682
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1979
1683
|
],
|
|
1980
1684
|
// Measure filters
|
|
1981
1685
|
"filterFactory.measureEquals": [
|
|
1982
|
-
{
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
},
|
|
1986
|
-
{
|
|
1987
|
-
type: "number",
|
|
1988
|
-
required: !0
|
|
1989
|
-
},
|
|
1990
|
-
{
|
|
1991
|
-
type: "BaseFilterConfig",
|
|
1992
|
-
required: !1
|
|
1993
|
-
}
|
|
1686
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1687
|
+
{ type: "number", required: !0 },
|
|
1688
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
1994
1689
|
],
|
|
1995
1690
|
"filterFactory.measureGreaterThan": [
|
|
1996
|
-
{
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
type: "number",
|
|
2002
|
-
required: !0
|
|
2003
|
-
},
|
|
2004
|
-
{
|
|
2005
|
-
type: "BaseFilterConfig",
|
|
2006
|
-
required: !1
|
|
2007
|
-
}
|
|
1691
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1692
|
+
{ type: "number", required: !0 },
|
|
1693
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2008
1694
|
],
|
|
2009
1695
|
"filterFactory.measureGreaterThanOrEqual": [
|
|
2010
|
-
{
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
type: "number",
|
|
2016
|
-
required: !0
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
type: "BaseFilterConfig",
|
|
2020
|
-
required: !1
|
|
2021
|
-
}
|
|
1696
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1697
|
+
{ type: "number", required: !0 },
|
|
1698
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2022
1699
|
],
|
|
2023
1700
|
"filterFactory.measureLessThan": [
|
|
2024
|
-
{
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
},
|
|
2028
|
-
{
|
|
2029
|
-
type: "number",
|
|
2030
|
-
required: !0
|
|
2031
|
-
},
|
|
2032
|
-
{
|
|
2033
|
-
type: "BaseFilterConfig",
|
|
2034
|
-
required: !1
|
|
2035
|
-
}
|
|
1701
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1702
|
+
{ type: "number", required: !0 },
|
|
1703
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2036
1704
|
],
|
|
2037
1705
|
"filterFactory.measureLessThanOrEqual": [
|
|
2038
|
-
{
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
},
|
|
2042
|
-
{
|
|
2043
|
-
type: "number",
|
|
2044
|
-
required: !0
|
|
2045
|
-
},
|
|
2046
|
-
{
|
|
2047
|
-
type: "BaseFilterConfig",
|
|
2048
|
-
required: !1
|
|
2049
|
-
}
|
|
1706
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1707
|
+
{ type: "number", required: !0 },
|
|
1708
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2050
1709
|
],
|
|
2051
1710
|
"filterFactory.measureBetween": [
|
|
2052
|
-
{
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
},
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
required: !0
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
type: "number",
|
|
2062
|
-
required: !0
|
|
2063
|
-
},
|
|
2064
|
-
{
|
|
2065
|
-
type: "BaseFilterConfig",
|
|
2066
|
-
required: !1
|
|
2067
|
-
}
|
|
1711
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1712
|
+
{ type: "number", required: !0 },
|
|
1713
|
+
// valueA
|
|
1714
|
+
{ type: "number", required: !0 },
|
|
1715
|
+
// valueB
|
|
1716
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2068
1717
|
],
|
|
2069
1718
|
"filterFactory.measureBetweenNotEqual": [
|
|
2070
|
-
{
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
},
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
required: !0
|
|
2077
|
-
},
|
|
2078
|
-
{
|
|
2079
|
-
type: "number",
|
|
2080
|
-
required: !0
|
|
2081
|
-
},
|
|
2082
|
-
{
|
|
2083
|
-
type: "BaseFilterConfig",
|
|
2084
|
-
required: !1
|
|
2085
|
-
}
|
|
1719
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1720
|
+
{ type: "number", required: !0 },
|
|
1721
|
+
// valueA
|
|
1722
|
+
{ type: "number", required: !0 },
|
|
1723
|
+
// valueB
|
|
1724
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2086
1725
|
],
|
|
2087
1726
|
// Ranking filters
|
|
2088
1727
|
"filterFactory.topRanking": [
|
|
2089
|
-
{
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
}
|
|
2093
|
-
{
|
|
2094
|
-
type: "Measure",
|
|
2095
|
-
required: !0
|
|
2096
|
-
},
|
|
2097
|
-
{
|
|
2098
|
-
type: "number",
|
|
2099
|
-
required: !0
|
|
2100
|
-
},
|
|
2101
|
-
{
|
|
2102
|
-
type: "BaseFilterConfig",
|
|
2103
|
-
required: !1
|
|
2104
|
-
}
|
|
1728
|
+
{ type: "Attribute", required: !0 },
|
|
1729
|
+
{ type: "Measure", required: !0 },
|
|
1730
|
+
{ type: "number", required: !0 },
|
|
1731
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2105
1732
|
],
|
|
2106
1733
|
"filterFactory.bottomRanking": [
|
|
2107
|
-
{
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
}
|
|
2111
|
-
{
|
|
2112
|
-
type: "Measure",
|
|
2113
|
-
required: !0
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
type: "number",
|
|
2117
|
-
required: !0
|
|
2118
|
-
},
|
|
2119
|
-
{
|
|
2120
|
-
type: "BaseFilterConfig",
|
|
2121
|
-
required: !1
|
|
2122
|
-
}
|
|
1734
|
+
{ type: "Attribute", required: !0 },
|
|
1735
|
+
{ type: "Measure", required: !0 },
|
|
1736
|
+
{ type: "number", required: !0 },
|
|
1737
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2123
1738
|
],
|
|
2124
1739
|
"filterFactory.measureTopRanking": [
|
|
2125
|
-
{
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
},
|
|
2129
|
-
{
|
|
2130
|
-
type: "number",
|
|
2131
|
-
required: !0
|
|
2132
|
-
},
|
|
2133
|
-
{
|
|
2134
|
-
type: "BaseFilterConfig",
|
|
2135
|
-
required: !1
|
|
2136
|
-
}
|
|
1740
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1741
|
+
{ type: "number", required: !0 },
|
|
1742
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2137
1743
|
],
|
|
2138
1744
|
"filterFactory.measureBottomRanking": [
|
|
2139
|
-
{
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
},
|
|
2143
|
-
{
|
|
2144
|
-
type: "number",
|
|
2145
|
-
required: !0
|
|
2146
|
-
},
|
|
2147
|
-
{
|
|
2148
|
-
type: "BaseFilterConfig",
|
|
2149
|
-
required: !1
|
|
2150
|
-
}
|
|
1745
|
+
{ type: "BaseMeasure", required: !0 },
|
|
1746
|
+
{ type: "number", required: !0 },
|
|
1747
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2151
1748
|
],
|
|
2152
1749
|
// Advanced filters
|
|
2153
1750
|
"filterFactory.cascading": [
|
|
2154
|
-
{
|
|
2155
|
-
|
|
2156
|
-
required: !0
|
|
2157
|
-
},
|
|
2158
|
-
{
|
|
2159
|
-
type: "BaseFilterConfig",
|
|
2160
|
-
required: !1
|
|
2161
|
-
}
|
|
1751
|
+
{ type: "Filter[]", required: !0 },
|
|
1752
|
+
{ type: "BaseFilterConfig", required: !1 }
|
|
2162
1753
|
],
|
|
2163
1754
|
// Logic functions
|
|
2164
1755
|
"filterFactory.logic.and": [
|
|
2165
|
-
{
|
|
2166
|
-
|
|
2167
|
-
required: !0
|
|
2168
|
-
},
|
|
2169
|
-
{
|
|
2170
|
-
type: "FilterRelationsNode",
|
|
2171
|
-
required: !0
|
|
2172
|
-
}
|
|
1756
|
+
{ type: "FilterRelationsNode", required: !0 },
|
|
1757
|
+
{ type: "FilterRelationsNode", required: !0 }
|
|
2173
1758
|
],
|
|
2174
1759
|
"filterFactory.logic.or": [
|
|
2175
|
-
{
|
|
2176
|
-
|
|
2177
|
-
required: !0
|
|
2178
|
-
},
|
|
2179
|
-
{
|
|
2180
|
-
type: "FilterRelationsNode",
|
|
2181
|
-
required: !0
|
|
2182
|
-
}
|
|
1760
|
+
{ type: "FilterRelationsNode", required: !0 },
|
|
1761
|
+
{ type: "FilterRelationsNode", required: !0 }
|
|
2183
1762
|
]
|
|
2184
1763
|
};
|
|
2185
|
-
function
|
|
2186
|
-
return
|
|
1764
|
+
function ue(e) {
|
|
1765
|
+
return Pt[`${e}`];
|
|
2187
1766
|
}
|
|
2188
|
-
function
|
|
2189
|
-
const r =
|
|
1767
|
+
function kt(e) {
|
|
1768
|
+
const r = ue(e);
|
|
2190
1769
|
return r ? r.filter((t) => t.required).length : 0;
|
|
2191
1770
|
}
|
|
2192
|
-
function
|
|
2193
|
-
const r =
|
|
1771
|
+
function It(e) {
|
|
1772
|
+
const r = ue(e);
|
|
2194
1773
|
return r ? r.length : 0;
|
|
2195
1774
|
}
|
|
2196
|
-
function
|
|
1775
|
+
function _t(e) {
|
|
2197
1776
|
if (typeof e != "string")
|
|
2198
1777
|
return !1;
|
|
2199
1778
|
const r = Date.parse(e);
|
|
@@ -2205,14 +1784,16 @@ function kt(e) {
|
|
|
2205
1784
|
function H(e, r, t, i) {
|
|
2206
1785
|
if (e.startsWith(T))
|
|
2207
1786
|
try {
|
|
2208
|
-
return
|
|
1787
|
+
return ae(e, r, t);
|
|
2209
1788
|
} catch (s) {
|
|
2210
1789
|
const a = s instanceof Error ? s.message : "Unknown error";
|
|
2211
1790
|
throw new Error(`${i}: ${a}`);
|
|
2212
1791
|
}
|
|
2213
|
-
throw new Error(
|
|
1792
|
+
throw new Error(
|
|
1793
|
+
`${i}: Invalid attribute "${e}". Expected format: "${T}TableName.ColumnName[.Level]"`
|
|
1794
|
+
);
|
|
2214
1795
|
}
|
|
2215
|
-
function
|
|
1796
|
+
function Lt(e) {
|
|
2216
1797
|
const r = e.data, { argSchema: t, dataSource: i, tables: s, pathPrefix: a } = e.context, n = a;
|
|
2217
1798
|
if (r === void 0) {
|
|
2218
1799
|
if (t.required)
|
|
@@ -2234,23 +1815,35 @@ function It(e) {
|
|
|
2234
1815
|
return r;
|
|
2235
1816
|
case "string[]":
|
|
2236
1817
|
if (!Array.isArray(r))
|
|
2237
|
-
throw new Error(
|
|
1818
|
+
throw new Error(
|
|
1819
|
+
`${n}: Expected array of strings, got ${typeof r}. Example: ["value1", "value2"]`
|
|
1820
|
+
);
|
|
2238
1821
|
if (!r.every((o) => typeof o == "string"))
|
|
2239
|
-
throw new Error(
|
|
1822
|
+
throw new Error(
|
|
1823
|
+
`${n}: Expected array of strings, but contains non-string values`
|
|
1824
|
+
);
|
|
2240
1825
|
return r;
|
|
2241
1826
|
case "number[]":
|
|
2242
1827
|
if (!Array.isArray(r))
|
|
2243
|
-
throw new Error(
|
|
1828
|
+
throw new Error(
|
|
1829
|
+
`${n}: Expected array of numbers, got ${typeof r}. Example: [10, 20]`
|
|
1830
|
+
);
|
|
2244
1831
|
if (!r.every((o) => typeof o == "number"))
|
|
2245
|
-
throw new Error(
|
|
1832
|
+
throw new Error(
|
|
1833
|
+
`${n}: Expected array of numbers, but contains non-number values`
|
|
1834
|
+
);
|
|
2246
1835
|
return r;
|
|
2247
1836
|
case "Attribute":
|
|
2248
1837
|
if (typeof r != "string")
|
|
2249
|
-
throw new Error(
|
|
1838
|
+
throw new Error(
|
|
1839
|
+
`${n}: Expected attribute string, got ${typeof r}. Example: "DM.Commerce.Revenue"`
|
|
1840
|
+
);
|
|
2250
1841
|
return H(r, i, s, n);
|
|
2251
1842
|
case "Attribute[]":
|
|
2252
1843
|
if (!Array.isArray(r))
|
|
2253
|
-
throw new Error(
|
|
1844
|
+
throw new Error(
|
|
1845
|
+
`${n}: Expected array of attributes, got ${typeof r}. Example: ["DM.Commerce.AgeRange"]`
|
|
1846
|
+
);
|
|
2254
1847
|
return r.map((o, u) => {
|
|
2255
1848
|
if (typeof o != "string")
|
|
2256
1849
|
throw new Error(`${n}[${u}]: Expected attribute string, got ${typeof o}`);
|
|
@@ -2258,108 +1851,104 @@ function It(e) {
|
|
|
2258
1851
|
});
|
|
2259
1852
|
case "Measure":
|
|
2260
1853
|
case "BaseMeasure":
|
|
2261
|
-
if (!
|
|
2262
|
-
throw new Error(
|
|
1854
|
+
if (!x(r))
|
|
1855
|
+
throw new Error(
|
|
1856
|
+
`${n}: Expected measure function call, got ${typeof r}. Example: {"function": "measureFactory.sum", "args": ["DM.Commerce.Revenue"]}`
|
|
1857
|
+
);
|
|
2263
1858
|
return w({
|
|
2264
1859
|
data: r,
|
|
2265
|
-
context: {
|
|
2266
|
-
dataSource: i,
|
|
2267
|
-
tables: s,
|
|
2268
|
-
pathPrefix: n
|
|
2269
|
-
}
|
|
1860
|
+
context: { dataSource: i, tables: s, pathPrefix: n }
|
|
2270
1861
|
});
|
|
2271
1862
|
case "Measure[]":
|
|
2272
1863
|
if (!Array.isArray(r))
|
|
2273
|
-
throw new Error(
|
|
1864
|
+
throw new Error(
|
|
1865
|
+
`${n}: Expected array of measure function calls, got ${typeof r}`
|
|
1866
|
+
);
|
|
2274
1867
|
return r.map((o, u) => {
|
|
2275
|
-
if (!
|
|
2276
|
-
throw new Error(
|
|
1868
|
+
if (!x(o))
|
|
1869
|
+
throw new Error(
|
|
1870
|
+
`${n}[${u}]: Expected measure function call, got ${typeof o}`
|
|
1871
|
+
);
|
|
2277
1872
|
return w({
|
|
2278
1873
|
data: o,
|
|
2279
|
-
context: {
|
|
2280
|
-
dataSource: i,
|
|
2281
|
-
tables: s,
|
|
2282
|
-
pathPrefix: `${n}[${u}]: `
|
|
2283
|
-
}
|
|
1874
|
+
context: { dataSource: i, tables: s, pathPrefix: `${n}[${u}]: ` }
|
|
2284
1875
|
});
|
|
2285
1876
|
});
|
|
2286
1877
|
case "Filter":
|
|
2287
|
-
if (!
|
|
2288
|
-
throw new Error(
|
|
1878
|
+
if (!x(r))
|
|
1879
|
+
throw new Error(
|
|
1880
|
+
`${n}: Expected filter function call, got ${typeof r}. Example: {"function": "filterFactory.contains", "args": ["DM.Brand.Brand", "Apple"]}`
|
|
1881
|
+
);
|
|
2289
1882
|
return w({
|
|
2290
1883
|
data: r,
|
|
2291
|
-
context: {
|
|
2292
|
-
dataSource: i,
|
|
2293
|
-
tables: s,
|
|
2294
|
-
pathPrefix: n
|
|
2295
|
-
}
|
|
1884
|
+
context: { dataSource: i, tables: s, pathPrefix: n }
|
|
2296
1885
|
});
|
|
2297
1886
|
case "Filter[]":
|
|
2298
1887
|
if (!Array.isArray(r))
|
|
2299
|
-
throw new Error(
|
|
1888
|
+
throw new Error(
|
|
1889
|
+
`${n}: Expected array of filter function calls, got ${typeof r}`
|
|
1890
|
+
);
|
|
2300
1891
|
return r.map((o, u) => {
|
|
2301
|
-
if (!
|
|
2302
|
-
throw new Error(
|
|
1892
|
+
if (!x(o))
|
|
1893
|
+
throw new Error(
|
|
1894
|
+
`${n}[${u}]: Expected filter function call, got ${typeof o}`
|
|
1895
|
+
);
|
|
2303
1896
|
return w({
|
|
2304
1897
|
data: o,
|
|
2305
|
-
context: {
|
|
2306
|
-
dataSource: i,
|
|
2307
|
-
tables: s,
|
|
2308
|
-
pathPrefix: `${n}[${u}]: `
|
|
2309
|
-
}
|
|
1898
|
+
context: { dataSource: i, tables: s, pathPrefix: `${n}[${u}]: ` }
|
|
2310
1899
|
});
|
|
2311
1900
|
});
|
|
2312
1901
|
case "FilterRelationsNode":
|
|
2313
1902
|
if (Array.isArray(r))
|
|
2314
1903
|
return r.map((o, u) => {
|
|
2315
|
-
if (!
|
|
2316
|
-
throw new Error(
|
|
1904
|
+
if (!x(o))
|
|
1905
|
+
throw new Error(
|
|
1906
|
+
`${n}[${u}]: Expected filter function call, got ${typeof o}`
|
|
1907
|
+
);
|
|
2317
1908
|
return w({
|
|
2318
1909
|
data: o,
|
|
2319
|
-
context: {
|
|
2320
|
-
dataSource: i,
|
|
2321
|
-
tables: s,
|
|
2322
|
-
pathPrefix: `${n}[${u}]: `
|
|
2323
|
-
}
|
|
1910
|
+
context: { dataSource: i, tables: s, pathPrefix: `${n}[${u}]: ` }
|
|
2324
1911
|
});
|
|
2325
1912
|
});
|
|
2326
|
-
if (
|
|
1913
|
+
if (x(r))
|
|
2327
1914
|
return w({
|
|
2328
1915
|
data: r,
|
|
2329
|
-
context: {
|
|
2330
|
-
dataSource: i,
|
|
2331
|
-
tables: s,
|
|
2332
|
-
pathPrefix: n
|
|
2333
|
-
}
|
|
1916
|
+
context: { dataSource: i, tables: s, pathPrefix: n }
|
|
2334
1917
|
});
|
|
2335
|
-
throw new Error(
|
|
1918
|
+
throw new Error(
|
|
1919
|
+
`${n}: Expected filter function call or array of filters, got ${typeof r}`
|
|
1920
|
+
);
|
|
2336
1921
|
case "DateDimension":
|
|
2337
1922
|
case "LevelAttribute":
|
|
2338
1923
|
if (typeof r != "string")
|
|
2339
|
-
throw new Error(
|
|
1924
|
+
throw new Error(
|
|
1925
|
+
`${n}: Expected date attribute string, got ${typeof r}. Example: "DM.Commerce.Date.Years"`
|
|
1926
|
+
);
|
|
2340
1927
|
return H(r, i, s, n);
|
|
2341
1928
|
case "Measure | number":
|
|
2342
1929
|
if (typeof r == "number")
|
|
2343
1930
|
return r;
|
|
2344
|
-
if (
|
|
1931
|
+
if (x(r))
|
|
2345
1932
|
return w({
|
|
2346
1933
|
data: r,
|
|
2347
|
-
context: {
|
|
2348
|
-
dataSource: i,
|
|
2349
|
-
tables: s,
|
|
2350
|
-
pathPrefix: n
|
|
2351
|
-
}
|
|
1934
|
+
context: { dataSource: i, tables: s, pathPrefix: n }
|
|
2352
1935
|
});
|
|
2353
|
-
throw new Error(
|
|
1936
|
+
throw new Error(
|
|
1937
|
+
`${n}: Expected measure function call or number, got ${typeof r}`
|
|
1938
|
+
);
|
|
2354
1939
|
case "Date | string":
|
|
2355
1940
|
if (typeof r == "string") {
|
|
2356
|
-
if (
|
|
1941
|
+
if (_t(r))
|
|
2357
1942
|
return r;
|
|
2358
|
-
throw new Error(
|
|
1943
|
+
throw new Error(
|
|
1944
|
+
`${n}: Expected valid ISO date string or Date object, got invalid date string "${r}"`
|
|
1945
|
+
);
|
|
2359
1946
|
} else {
|
|
2360
1947
|
if (r instanceof Date)
|
|
2361
1948
|
return r;
|
|
2362
|
-
throw new Error(
|
|
1949
|
+
throw new Error(
|
|
1950
|
+
`${n}: Expected date string or Date object, got ${typeof r}`
|
|
1951
|
+
);
|
|
2363
1952
|
}
|
|
2364
1953
|
case "string | number":
|
|
2365
1954
|
if (typeof r == "string" || typeof r == "number")
|
|
@@ -2377,18 +1966,22 @@ function It(e) {
|
|
|
2377
1966
|
}
|
|
2378
1967
|
}
|
|
2379
1968
|
function w(e) {
|
|
2380
|
-
const { data: r } = e, { dataSource: t, tables: i, pathPrefix: s } = e.context, { function: a, args: n } = r, o = s ? `${s}.` : "", u =
|
|
1969
|
+
const { data: r } = e, { dataSource: t, tables: i, pathPrefix: s } = e.context, { function: a, args: n } = r, o = s ? `${s}.` : "", u = ue(a);
|
|
2381
1970
|
if (!u)
|
|
2382
1971
|
throw new Error(`${o}function: Unknown function "${a}"`);
|
|
2383
|
-
const c =
|
|
1972
|
+
const c = kt(a), d = It(a);
|
|
2384
1973
|
if (n.length < c)
|
|
2385
|
-
throw new Error(
|
|
1974
|
+
throw new Error(
|
|
1975
|
+
`${o}function: Expected at least ${c} arguments, got ${n.length}`
|
|
1976
|
+
);
|
|
2386
1977
|
if (n.length > d)
|
|
2387
|
-
throw new Error(
|
|
1978
|
+
throw new Error(
|
|
1979
|
+
`${o}function: Expected at most ${d} arguments, got ${n.length}`
|
|
1980
|
+
);
|
|
2388
1981
|
const g = [], p = [];
|
|
2389
1982
|
for (let f = 0; f < Math.max(n.length, u.length); f++) {
|
|
2390
|
-
const y = u[`${f}`],
|
|
2391
|
-
if (
|
|
1983
|
+
const y = u[`${f}`], C = n[`${f}`], B = o ? `${o}args[${f}]` : `args[${f}]`;
|
|
1984
|
+
if (C === void 0) {
|
|
2392
1985
|
y != null && y.required && p.push(`${B}: Missing required argument (expected ${y.type})`);
|
|
2393
1986
|
continue;
|
|
2394
1987
|
}
|
|
@@ -2397,8 +1990,8 @@ function w(e) {
|
|
|
2397
1990
|
continue;
|
|
2398
1991
|
}
|
|
2399
1992
|
try {
|
|
2400
|
-
const S =
|
|
2401
|
-
data:
|
|
1993
|
+
const S = Lt({
|
|
1994
|
+
data: C,
|
|
2402
1995
|
context: {
|
|
2403
1996
|
dataSource: t,
|
|
2404
1997
|
tables: i,
|
|
@@ -2416,7 +2009,7 @@ function w(e) {
|
|
|
2416
2009
|
const f = p.join("; ");
|
|
2417
2010
|
throw new Error(f);
|
|
2418
2011
|
}
|
|
2419
|
-
const b =
|
|
2012
|
+
const b = Bt(a);
|
|
2420
2013
|
if (b)
|
|
2421
2014
|
try {
|
|
2422
2015
|
b(g, {
|
|
@@ -2432,21 +2025,23 @@ function w(e) {
|
|
|
2432
2025
|
}
|
|
2433
2026
|
function ke(e) {
|
|
2434
2027
|
const { attribute: r, config: t } = e;
|
|
2435
|
-
if (
|
|
2028
|
+
if (ee(e) && zr(r)) {
|
|
2436
2029
|
const { granularity: i } = r;
|
|
2437
|
-
return
|
|
2030
|
+
return Nr(
|
|
2031
|
+
r,
|
|
2032
|
+
e.members.map((s) => i === "Years" && !isNaN(Number(s)) ? `${s}-01-01T00:00:00` : s),
|
|
2033
|
+
t
|
|
2034
|
+
);
|
|
2438
2035
|
}
|
|
2439
2036
|
return e;
|
|
2440
2037
|
}
|
|
2441
|
-
function
|
|
2038
|
+
function Vt(e) {
|
|
2442
2039
|
let r = [];
|
|
2443
2040
|
for (const t of e)
|
|
2444
|
-
L(t) ? r =
|
|
2445
|
-
ke(t)
|
|
2446
|
-
], r);
|
|
2041
|
+
L(t) ? r = fe(t, r) : r = fe([ke(t)], r);
|
|
2447
2042
|
return r != null ? r : [];
|
|
2448
2043
|
}
|
|
2449
|
-
const
|
|
2044
|
+
const Ut = (e) => {
|
|
2450
2045
|
const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = [];
|
|
2451
2046
|
return r.forEach((n, o) => {
|
|
2452
2047
|
const u = {
|
|
@@ -2457,36 +2052,19 @@ const Lt = (e) => {
|
|
|
2457
2052
|
try {
|
|
2458
2053
|
const c = w({
|
|
2459
2054
|
data: n,
|
|
2460
|
-
context: {
|
|
2461
|
-
dataSource: t,
|
|
2462
|
-
tables: i,
|
|
2463
|
-
pathPrefix: ""
|
|
2464
|
-
}
|
|
2055
|
+
context: { dataSource: t, tables: i, pathPrefix: "" }
|
|
2465
2056
|
});
|
|
2466
|
-
!L(c) && !J(c) ? a.push(q(h({}, u), {
|
|
2467
|
-
message: "Invalid filter JSON"
|
|
2468
|
-
})) : s.push(c);
|
|
2057
|
+
!L(c) && !J(c) ? a.push(q(h({}, u), { message: "Invalid filter JSON" })) : s.push(c);
|
|
2469
2058
|
} catch (c) {
|
|
2470
2059
|
const d = c instanceof Error ? c.message : "Unknown error";
|
|
2471
|
-
a.push(q(h({}, u), {
|
|
2472
|
-
message: d
|
|
2473
|
-
}));
|
|
2060
|
+
a.push(q(h({}, u), { message: d }));
|
|
2474
2061
|
}
|
|
2475
|
-
}), a.length > 0 ? {
|
|
2476
|
-
|
|
2477
|
-
errors: a
|
|
2478
|
-
} : {
|
|
2479
|
-
success: !0,
|
|
2480
|
-
data: _t(s)
|
|
2481
|
-
};
|
|
2482
|
-
}, Vt = (e) => {
|
|
2062
|
+
}), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: Vt(s) };
|
|
2063
|
+
}, Jt = (e) => {
|
|
2483
2064
|
const { data: r } = e, { dataSource: t, tables: i } = e.context;
|
|
2484
|
-
return r ?
|
|
2065
|
+
return r ? ne(r) ? Ut({
|
|
2485
2066
|
data: r,
|
|
2486
|
-
context: {
|
|
2487
|
-
dataSource: t,
|
|
2488
|
-
tables: i
|
|
2489
|
-
}
|
|
2067
|
+
context: { dataSource: t, tables: i }
|
|
2490
2068
|
}) : {
|
|
2491
2069
|
success: !1,
|
|
2492
2070
|
errors: [
|
|
@@ -2497,11 +2075,8 @@ const Lt = (e) => {
|
|
|
2497
2075
|
message: 'Invalid filters JSON. Expected an array of function calls with "function" and "args" properties.'
|
|
2498
2076
|
}
|
|
2499
2077
|
]
|
|
2500
|
-
} : {
|
|
2501
|
-
|
|
2502
|
-
data: []
|
|
2503
|
-
};
|
|
2504
|
-
}, Ut = (e) => {
|
|
2078
|
+
} : { success: !0, data: [] };
|
|
2079
|
+
}, Wt = (e) => {
|
|
2505
2080
|
const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = [];
|
|
2506
2081
|
return r.forEach((n, o) => {
|
|
2507
2082
|
const u = {
|
|
@@ -2512,36 +2087,19 @@ const Lt = (e) => {
|
|
|
2512
2087
|
try {
|
|
2513
2088
|
const c = w({
|
|
2514
2089
|
data: n,
|
|
2515
|
-
context: {
|
|
2516
|
-
dataSource: t,
|
|
2517
|
-
tables: i,
|
|
2518
|
-
pathPrefix: ""
|
|
2519
|
-
}
|
|
2090
|
+
context: { dataSource: t, tables: i, pathPrefix: "" }
|
|
2520
2091
|
});
|
|
2521
|
-
J(c) ? s.push(ke(c)) : a.push(q(h({}, u), {
|
|
2522
|
-
message: "Invalid filter JSON"
|
|
2523
|
-
}));
|
|
2092
|
+
J(c) ? s.push(ke(c)) : a.push(q(h({}, u), { message: "Invalid filter JSON" }));
|
|
2524
2093
|
} catch (c) {
|
|
2525
2094
|
const d = c instanceof Error ? c.message : "Unknown error";
|
|
2526
|
-
a.push(q(h({}, u), {
|
|
2527
|
-
message: d
|
|
2528
|
-
}));
|
|
2095
|
+
a.push(q(h({}, u), { message: d }));
|
|
2529
2096
|
}
|
|
2530
|
-
}), a.length > 0 ? {
|
|
2531
|
-
|
|
2532
|
-
errors: a
|
|
2533
|
-
} : {
|
|
2534
|
-
success: !0,
|
|
2535
|
-
data: s
|
|
2536
|
-
};
|
|
2537
|
-
}, Jt = (e) => {
|
|
2097
|
+
}), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
|
|
2098
|
+
}, jt = (e) => {
|
|
2538
2099
|
const { data: r } = e, { dataSource: t, tables: i } = e.context;
|
|
2539
|
-
return r ?
|
|
2100
|
+
return r ? ne(r) ? Wt({
|
|
2540
2101
|
data: r,
|
|
2541
|
-
context: {
|
|
2542
|
-
dataSource: t,
|
|
2543
|
-
tables: i
|
|
2544
|
-
}
|
|
2102
|
+
context: { dataSource: t, tables: i }
|
|
2545
2103
|
}) : {
|
|
2546
2104
|
success: !1,
|
|
2547
2105
|
errors: [
|
|
@@ -2552,11 +2110,8 @@ const Lt = (e) => {
|
|
|
2552
2110
|
message: 'Invalid highlights JSON. Expected an array of function calls with "function" and "args" properties.'
|
|
2553
2111
|
}
|
|
2554
2112
|
]
|
|
2555
|
-
} : {
|
|
2556
|
-
|
|
2557
|
-
data: []
|
|
2558
|
-
};
|
|
2559
|
-
}, Wt = (e) => {
|
|
2113
|
+
} : { success: !0, data: [] };
|
|
2114
|
+
}, Kt = (e) => {
|
|
2560
2115
|
const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = [];
|
|
2561
2116
|
return r.forEach((n, o) => {
|
|
2562
2117
|
const u = {
|
|
@@ -2567,36 +2122,19 @@ const Lt = (e) => {
|
|
|
2567
2122
|
try {
|
|
2568
2123
|
const c = w({
|
|
2569
2124
|
data: n,
|
|
2570
|
-
context: {
|
|
2571
|
-
dataSource: t,
|
|
2572
|
-
tables: i,
|
|
2573
|
-
pathPrefix: ""
|
|
2574
|
-
}
|
|
2125
|
+
context: { dataSource: t, tables: i, pathPrefix: "" }
|
|
2575
2126
|
});
|
|
2576
|
-
Te(c) ? s.push(c) : a.push(q(h({}, u), {
|
|
2577
|
-
message: "Invalid measure JSON"
|
|
2578
|
-
}));
|
|
2127
|
+
Te(c) ? s.push(c) : a.push(q(h({}, u), { message: "Invalid measure JSON" }));
|
|
2579
2128
|
} catch (c) {
|
|
2580
2129
|
const d = c instanceof Error ? c.message : "Unknown error";
|
|
2581
|
-
a.push(q(h({}, u), {
|
|
2582
|
-
message: d
|
|
2583
|
-
}));
|
|
2130
|
+
a.push(q(h({}, u), { message: d }));
|
|
2584
2131
|
}
|
|
2585
|
-
}), a.length > 0 ? {
|
|
2586
|
-
|
|
2587
|
-
errors: a
|
|
2588
|
-
} : {
|
|
2589
|
-
success: !0,
|
|
2590
|
-
data: s
|
|
2591
|
-
};
|
|
2592
|
-
}, Kt = (e) => {
|
|
2132
|
+
}), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
|
|
2133
|
+
}, Qt = (e) => {
|
|
2593
2134
|
const { data: r } = e, { dataSource: t, tables: i } = e.context;
|
|
2594
|
-
return r ?
|
|
2135
|
+
return r ? ne(r) ? Kt({
|
|
2595
2136
|
data: r,
|
|
2596
|
-
context: {
|
|
2597
|
-
dataSource: t,
|
|
2598
|
-
tables: i
|
|
2599
|
-
}
|
|
2137
|
+
context: { dataSource: t, tables: i }
|
|
2600
2138
|
}) : {
|
|
2601
2139
|
success: !1,
|
|
2602
2140
|
errors: [
|
|
@@ -2607,41 +2145,34 @@ const Lt = (e) => {
|
|
|
2607
2145
|
message: 'Invalid measures JSON. Expected an array of function calls with "function" and "args" properties.'
|
|
2608
2146
|
}
|
|
2609
2147
|
]
|
|
2610
|
-
} : {
|
|
2611
|
-
|
|
2612
|
-
data: []
|
|
2613
|
-
};
|
|
2614
|
-
}, Gt = (e) => {
|
|
2148
|
+
} : { success: !0, data: [] };
|
|
2149
|
+
}, ei = (e) => {
|
|
2615
2150
|
const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = (g) => {
|
|
2616
2151
|
const p = g();
|
|
2617
2152
|
return p.success ? p.data : (s.push(...p.errors), null);
|
|
2618
|
-
}, n = a(
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
dataSource: t,
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
tables: i
|
|
2635
|
-
}
|
|
2636
|
-
}));
|
|
2153
|
+
}, n = a(
|
|
2154
|
+
() => At({
|
|
2155
|
+
data: r.dimensions || [],
|
|
2156
|
+
context: { dataSource: t, tables: i }
|
|
2157
|
+
})
|
|
2158
|
+
), o = a(
|
|
2159
|
+
() => Qt({
|
|
2160
|
+
data: r.measures || [],
|
|
2161
|
+
context: { dataSource: t, tables: i }
|
|
2162
|
+
})
|
|
2163
|
+
), u = a(
|
|
2164
|
+
() => Jt({
|
|
2165
|
+
data: r.filters || [],
|
|
2166
|
+
context: { dataSource: t, tables: i }
|
|
2167
|
+
})
|
|
2168
|
+
);
|
|
2637
2169
|
let c = null;
|
|
2638
|
-
return r.highlights && (c = a(
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
dataSource: t,
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
}))), s.length > 0 ? {
|
|
2170
|
+
return r.highlights && (c = a(
|
|
2171
|
+
() => jt({
|
|
2172
|
+
data: r.highlights || [],
|
|
2173
|
+
context: { dataSource: t, tables: i }
|
|
2174
|
+
})
|
|
2175
|
+
)), s.length > 0 ? {
|
|
2645
2176
|
success: !1,
|
|
2646
2177
|
errors: s
|
|
2647
2178
|
} : {
|
|
@@ -2651,13 +2182,13 @@ const Lt = (e) => {
|
|
|
2651
2182
|
dimensions: n || [],
|
|
2652
2183
|
measures: o || [],
|
|
2653
2184
|
filters: u || []
|
|
2654
|
-
}, c && {
|
|
2655
|
-
highlights: c
|
|
2656
|
-
})
|
|
2185
|
+
}, c && { highlights: c })
|
|
2657
2186
|
};
|
|
2658
2187
|
};
|
|
2659
|
-
function
|
|
2660
|
-
const { filters: r, relations: t } = Pr(
|
|
2188
|
+
function Yt(e) {
|
|
2189
|
+
const { filters: r, relations: t } = Pr(
|
|
2190
|
+
e.filters || []
|
|
2191
|
+
);
|
|
2661
2192
|
return {
|
|
2662
2193
|
dataSource: e.dataSource,
|
|
2663
2194
|
dimensions: e.dimensions,
|
|
@@ -2665,20 +2196,21 @@ function jt(e) {
|
|
|
2665
2196
|
filters: r,
|
|
2666
2197
|
filterRelations: t,
|
|
2667
2198
|
highlights: e.highlights
|
|
2199
|
+
// No count/offset/ungroup - these are execution concerns, not translation concerns
|
|
2668
2200
|
};
|
|
2669
2201
|
}
|
|
2670
|
-
function
|
|
2671
|
-
const i =
|
|
2202
|
+
function ri(e, r, t = !1) {
|
|
2203
|
+
const i = Yt(e), s = Tr(i, r);
|
|
2672
2204
|
return Br(s, t);
|
|
2673
2205
|
}
|
|
2674
2206
|
export {
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2207
|
+
vt as CustomSuperJSON,
|
|
2208
|
+
si as EMPTY_EXPANDED_QUERY_MODEL,
|
|
2209
|
+
ni as EMPTY_SIMPLE_QUERY_MODEL,
|
|
2210
|
+
ai as isByIdDashboardCodeParams,
|
|
2211
|
+
oi as isByIdWidgetCodeParams,
|
|
2212
|
+
ui as isClientSideDashboardCodeParams,
|
|
2213
|
+
li as isClientSideWidgetCodeParams,
|
|
2214
|
+
ei as translateQueryJSON,
|
|
2215
|
+
ri as translateQueryToJaql
|
|
2684
2216
|
};
|