react-semaphor 0.1.419 → 0.1.421
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +28 -27
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/chunks/analyze-result-contract-B5Eeu7vD.js +1 -0
- package/dist/chunks/analyze-result-contract-sWcmvBOA.js +2070 -0
- package/dist/chunks/{calendar-preferences-dialog-f0Z7Kf-U.js → calendar-preferences-dialog-CscmhyuZ.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-DIfAbE_y.js → calendar-preferences-dialog-cN3_2C-u.js} +3 -3
- package/dist/chunks/{dashboard-briefing-launcher-anh-Jy5v.js → dashboard-briefing-launcher-BYTBNetR.js} +4 -4
- package/dist/chunks/{dashboard-briefing-launcher-C3tNkGFG.js → dashboard-briefing-launcher-DmZkzIC3.js} +1 -1
- package/dist/chunks/{dashboard-controls-DQxlOxzy.js → dashboard-controls-9DFeKIP4.js} +1 -1
- package/dist/chunks/{dashboard-controls-8dCQaPaq.js → dashboard-controls-PhzuaTBj.js} +5 -5
- package/dist/chunks/{dashboard-json-i7Ae9KGD.js → dashboard-json-Cxhw2TZc.js} +3 -3
- package/dist/chunks/{dashboard-json-B309EInF.js → dashboard-json-DyRHI3mL.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-4HycwBHR.js → edit-dashboard-visual-3_jiBXsu.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-z3IqzYnj.js → edit-dashboard-visual-BigSJ3-x.js} +4 -4
- package/dist/chunks/{index-yxKWKFdr.js → index-BKDQw0aK.js} +2 -2
- package/dist/chunks/{index-B6DLEXRX.js → index-CH2ZzQo4.js} +5 -5
- package/dist/chunks/{switch-D6Ygf3wA.js → switch-CiOjVyVI.js} +1 -1
- package/dist/chunks/{switch-COWQU8aK.js → switch-TbCsyhv9.js} +1 -1
- package/dist/chunks/{update-policy-BzT2k4n6.js → update-policy-2MZ-Vf7v.js} +211 -187
- package/dist/chunks/update-policy-qpyAkOyO.js +3 -0
- package/dist/chunks/{use-create-flow-overlay-state-CX0D-6HM.js → use-create-flow-overlay-state-BzcJWNzh.js} +3 -3
- package/dist/chunks/{use-create-flow-overlay-state-DENfd7sW.js → use-create-flow-overlay-state-DUQmgb9H.js} +1 -1
- package/dist/chunks/{validators-Cxr9qbrR.js → validators-D0pfj3jJ.js} +93 -93
- package/dist/chunks/validators-Dj1Y-46V.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +14 -14
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +251 -139
- package/dist/data-app-codegen-node/index.js +806 -657
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +743 -693
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +51 -51
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +12 -5
- package/dist/types/dashboard-assistant.d.ts +0 -5
- package/dist/types/data-app-codegen-node.d.ts +12 -2
- package/dist/types/data-app-codegen.d.ts +12 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -5
- package/dist/types/data-app-sdk.d.ts +17 -5
- package/package.json +1 -1
- package/dist/chunks/analyze-result-contract-DdhEt99q.js +0 -2004
- package/dist/chunks/analyze-result-contract-DwRzl7yJ.js +0 -1
- package/dist/chunks/update-policy-VloD-0YM.js +0 -3
- package/dist/chunks/validators-BMQo93Y0.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as K } from "./analyze-result-contract-
|
|
1
|
+
import { s as K, b as X } from "./analyze-result-contract-sWcmvBOA.js";
|
|
2
2
|
function a(e, i, t) {
|
|
3
3
|
return t ? { code: e, message: i, path: t } : { code: e, message: i };
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function Z(e) {
|
|
6
6
|
for (let i = 0; i < e.length; i += 1) {
|
|
7
7
|
const t = e[i];
|
|
8
8
|
if (e.some(
|
|
@@ -18,13 +18,13 @@ function L(e, i) {
|
|
|
18
18
|
function C(e, i) {
|
|
19
19
|
return L(e, i) && g(e) === g(i);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function J(e) {
|
|
22
22
|
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${g(e)}). Use different aggregates to request both, or remove one entry.`;
|
|
23
23
|
}
|
|
24
24
|
function P(e) {
|
|
25
25
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function W(e, i, t) {
|
|
28
28
|
if (e !== void 0) {
|
|
29
29
|
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
30
30
|
t.push(
|
|
@@ -57,43 +57,43 @@ function J(e, i, t) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function ee(e, i) {
|
|
61
61
|
return M(e, i).length === 1;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function ie(e, i) {
|
|
64
64
|
return M(e, i).length === 1;
|
|
65
65
|
}
|
|
66
66
|
function M(e, i) {
|
|
67
67
|
return i.filter(
|
|
68
|
-
(n) =>
|
|
68
|
+
(n) => te(e, n)
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
function ie(e, i) {
|
|
72
|
-
return te(e, i) ? e.source ? L(i, e) : !0 : !1;
|
|
73
|
-
}
|
|
74
71
|
function te(e, i) {
|
|
75
|
-
return
|
|
72
|
+
return ae(e, i) ? e.source ? L(i, e) : !0 : !1;
|
|
76
73
|
}
|
|
77
74
|
function ae(e, i) {
|
|
75
|
+
return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ne(e, i) && g(i) !== g(e));
|
|
76
|
+
}
|
|
77
|
+
function ne(e, i) {
|
|
78
78
|
return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
|
|
79
79
|
}
|
|
80
80
|
function g(e) {
|
|
81
|
-
return (e
|
|
81
|
+
return X(e);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const se = /^(\d{4})-(\d{2})-(\d{2})$/, oe = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
84
84
|
function T(e) {
|
|
85
85
|
if (typeof e != "string")
|
|
86
86
|
return null;
|
|
87
|
-
const i = e.trim(), t =
|
|
87
|
+
const i = e.trim(), t = se.exec(i);
|
|
88
88
|
if (t) {
|
|
89
89
|
const [, y, D, F] = t;
|
|
90
90
|
return E(y, D, F) ? new Date(Date.UTC(Number(y), Number(D) - 1, Number(F))) : null;
|
|
91
91
|
}
|
|
92
|
-
const n =
|
|
92
|
+
const n = oe.exec(i);
|
|
93
93
|
if (!n)
|
|
94
94
|
return null;
|
|
95
95
|
const [, o, s, r, c, d, p = "00", , f] = n;
|
|
96
|
-
if (!E(o, s, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !
|
|
96
|
+
if (!E(o, s, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !re(f))
|
|
97
97
|
return null;
|
|
98
98
|
const b = new Date(i);
|
|
99
99
|
return Number.isFinite(b.getTime()) ? b : null;
|
|
@@ -109,7 +109,7 @@ function v(e, i, t) {
|
|
|
109
109
|
const n = Number(e);
|
|
110
110
|
return Number.isInteger(n) && n >= i && n <= t;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function re(e) {
|
|
113
113
|
if (e === "Z")
|
|
114
114
|
return !0;
|
|
115
115
|
const i = /^([+-])(\d{2}):(\d{2})$/.exec(e);
|
|
@@ -118,13 +118,13 @@ function oe(e) {
|
|
|
118
118
|
function l(e) {
|
|
119
119
|
return typeof e == "string" && e.trim().length > 0;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function de(e) {
|
|
122
122
|
const i = /* @__PURE__ */ new Set();
|
|
123
123
|
let t = 0;
|
|
124
124
|
for (; t < e.length; ) {
|
|
125
125
|
const n = e[t];
|
|
126
126
|
if (n === "'" || n === '"') {
|
|
127
|
-
t =
|
|
127
|
+
t = le(e, t);
|
|
128
128
|
continue;
|
|
129
129
|
}
|
|
130
130
|
if (n === "{") {
|
|
@@ -141,7 +141,7 @@ function re(e) {
|
|
|
141
141
|
}
|
|
142
142
|
return Array.from(i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function le(e, i) {
|
|
145
145
|
const t = e[i];
|
|
146
146
|
let n = i + 1;
|
|
147
147
|
for (; n < e.length; ) {
|
|
@@ -206,7 +206,7 @@ function $(e, i, t, n) {
|
|
|
206
206
|
)
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const ue = /* @__PURE__ */ new Set([
|
|
210
210
|
"SUM",
|
|
211
211
|
"COUNT",
|
|
212
212
|
"AVG",
|
|
@@ -283,7 +283,7 @@ function m(e, i, t, n = {}) {
|
|
|
283
283
|
)
|
|
284
284
|
), e.source !== void 0 && S(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function ce(e, i, t) {
|
|
287
287
|
if (!u(e)) {
|
|
288
288
|
t.push(
|
|
289
289
|
a(
|
|
@@ -331,7 +331,7 @@ function k(e, i, t) {
|
|
|
331
331
|
)
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function pe(e, i) {
|
|
335
335
|
if (l(e.inputId) || i.push(
|
|
336
336
|
a(
|
|
337
337
|
"missing_input_options_input_id",
|
|
@@ -394,7 +394,7 @@ function ce(e, i) {
|
|
|
394
394
|
"dependencies.excludeInputIds",
|
|
395
395
|
i,
|
|
396
396
|
"Input options excludeInputIds must be non-empty strings."
|
|
397
|
-
),
|
|
397
|
+
), fe(e, i);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
if (e.population !== void 0) {
|
|
@@ -439,7 +439,7 @@ function ce(e, i) {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function me(e, i) {
|
|
443
443
|
if (!(!("inputs" in e) || e.inputs === void 0)) {
|
|
444
444
|
if (!Array.isArray(e.inputs)) {
|
|
445
445
|
i.push(
|
|
@@ -452,11 +452,11 @@ function pe(e, i) {
|
|
|
452
452
|
return;
|
|
453
453
|
}
|
|
454
454
|
e.inputs.forEach(
|
|
455
|
-
(t, n) =>
|
|
455
|
+
(t, n) => ce(t, `inputs.${n}`, i)
|
|
456
456
|
);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function fe(e, i) {
|
|
460
460
|
var n, o;
|
|
461
461
|
const t = new Set(
|
|
462
462
|
Array.isArray(e.inputs) ? e.inputs.map((s) => u(s) ? s.inputId : void 0).filter((s) => typeof s == "string") : []
|
|
@@ -482,7 +482,7 @@ function O(e, i, t, n) {
|
|
|
482
482
|
e !== void 0 && (!Array.isArray(e) || e.some((o) => !l(o))) && t.push(a("invalid_input_options_dependencies", n, i));
|
|
483
483
|
}
|
|
484
484
|
function _(e, i, t) {
|
|
485
|
-
e !== void 0 && (typeof e != "string" || !
|
|
485
|
+
e !== void 0 && (typeof e != "string" || !ue.has(e)) && t.push(
|
|
486
486
|
a(
|
|
487
487
|
"invalid_aggregate",
|
|
488
488
|
"Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
|
|
@@ -490,20 +490,20 @@ function _(e, i, t) {
|
|
|
490
490
|
)
|
|
491
491
|
);
|
|
492
492
|
}
|
|
493
|
-
const
|
|
493
|
+
const _e = /* @__PURE__ */ new Set([
|
|
494
494
|
"measure",
|
|
495
495
|
"dimension",
|
|
496
496
|
"date",
|
|
497
497
|
"id",
|
|
498
498
|
"unknown"
|
|
499
|
-
]),
|
|
499
|
+
]), ve = /* @__PURE__ */ new Set(["row", "aggregate"]), U = /* @__PURE__ */ new Set([
|
|
500
500
|
"string",
|
|
501
501
|
"number",
|
|
502
502
|
"boolean",
|
|
503
503
|
"date",
|
|
504
504
|
"datetime",
|
|
505
505
|
"unknown"
|
|
506
|
-
]),
|
|
506
|
+
]), ge = /* @__PURE__ */ new Set([
|
|
507
507
|
"number",
|
|
508
508
|
"currency",
|
|
509
509
|
"percent",
|
|
@@ -513,13 +513,13 @@ const fe = /* @__PURE__ */ new Set([
|
|
|
513
513
|
"datetime",
|
|
514
514
|
"duration",
|
|
515
515
|
"string"
|
|
516
|
-
]),
|
|
516
|
+
]), be = /* @__PURE__ */ new Set([
|
|
517
517
|
"millisecond",
|
|
518
518
|
"second",
|
|
519
519
|
"minute",
|
|
520
520
|
"hour",
|
|
521
521
|
"day"
|
|
522
|
-
]),
|
|
522
|
+
]), ye = /* @__PURE__ */ new Set([
|
|
523
523
|
"compact",
|
|
524
524
|
"digital",
|
|
525
525
|
"long"
|
|
@@ -538,7 +538,7 @@ function R(e, i, t) {
|
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
540
|
const n = e;
|
|
541
|
-
(typeof n.type != "string" || !
|
|
541
|
+
(typeof n.type != "string" || !ge.has(n.type)) && t.push(
|
|
542
542
|
a(
|
|
543
543
|
"invalid_value_format_type",
|
|
544
544
|
"Value format type must be number, currency, percent, scientific, date, datetime, duration, or string.",
|
|
@@ -573,7 +573,7 @@ function R(e, i, t) {
|
|
|
573
573
|
);
|
|
574
574
|
for (const o of ["inputUnit", "largestUnit", "smallestUnit"]) {
|
|
575
575
|
const s = e[o];
|
|
576
|
-
s !== void 0 && (typeof s != "string" || !
|
|
576
|
+
s !== void 0 && (typeof s != "string" || !be.has(s)) && t.push(
|
|
577
577
|
a(
|
|
578
578
|
"invalid_value_format_duration_unit",
|
|
579
579
|
"Duration format units must be millisecond, second, minute, hour, or day.",
|
|
@@ -581,7 +581,7 @@ function R(e, i, t) {
|
|
|
581
581
|
)
|
|
582
582
|
);
|
|
583
583
|
}
|
|
584
|
-
e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !
|
|
584
|
+
e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !ye.has(e.outputStyle)) && t.push(
|
|
585
585
|
a(
|
|
586
586
|
"invalid_value_format_duration_style",
|
|
587
587
|
"Duration format outputStyle must be compact, digital, or long.",
|
|
@@ -598,20 +598,20 @@ function h(e, i, t) {
|
|
|
598
598
|
)
|
|
599
599
|
);
|
|
600
600
|
}
|
|
601
|
-
const
|
|
601
|
+
const he = /* @__PURE__ */ new Set([
|
|
602
602
|
"additive",
|
|
603
603
|
"non_additive",
|
|
604
604
|
"ratio_of_sums",
|
|
605
605
|
"weighted",
|
|
606
606
|
"pre_aggregated",
|
|
607
607
|
"snapshot"
|
|
608
|
-
]),
|
|
608
|
+
]), xe = /* @__PURE__ */ new Set([
|
|
609
609
|
"default",
|
|
610
610
|
"symmetric_aggregate",
|
|
611
611
|
"aggregate_then_join",
|
|
612
612
|
"weighted"
|
|
613
613
|
]);
|
|
614
|
-
function
|
|
614
|
+
function $e(e, i, t) {
|
|
615
615
|
if (!e || !u(e)) {
|
|
616
616
|
t.push(
|
|
617
617
|
a(
|
|
@@ -660,7 +660,7 @@ function j(e, i, t) {
|
|
|
660
660
|
required: !0
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function we(e, i, t) {
|
|
664
664
|
if (!u(e)) {
|
|
665
665
|
t.push(
|
|
666
666
|
a(
|
|
@@ -685,7 +685,7 @@ function $e(e, i, t) {
|
|
|
685
685
|
)
|
|
686
686
|
), R(e.format, `${i}.format`, t);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Ie(e, i, t) {
|
|
689
689
|
e !== void 0 && e !== "hour" && e !== "day" && e !== "week" && e !== "month" && e !== "quarter" && e !== "year" && t.push(
|
|
690
690
|
a(
|
|
691
691
|
"invalid_time_grain",
|
|
@@ -711,7 +711,7 @@ function z(e, i, t, n) {
|
|
|
711
711
|
a(n, "Sort scope must be global or withinParent.", i)
|
|
712
712
|
);
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Ae(e, i, t) {
|
|
715
715
|
e.enabled !== void 0 && typeof e.enabled != "boolean" && t.push(
|
|
716
716
|
a(
|
|
717
717
|
"invalid_matrix_subtotal",
|
|
@@ -732,7 +732,7 @@ function Ie(e, i, t) {
|
|
|
732
732
|
)
|
|
733
733
|
);
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function Me(e, i, t) {
|
|
736
736
|
if (V(
|
|
737
737
|
e.direction,
|
|
738
738
|
`${i}.direction`,
|
|
@@ -818,13 +818,13 @@ function B(e, i, t, n) {
|
|
|
818
818
|
)
|
|
819
819
|
), m(d.field, `${c}.field`, t, {
|
|
820
820
|
required: !0
|
|
821
|
-
}),
|
|
821
|
+
}), Ie(d.grain, `${c}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
|
|
822
822
|
a(
|
|
823
823
|
"invalid_matrix_axis_label",
|
|
824
824
|
"Matrix axis level label must be a string.",
|
|
825
825
|
`${c}.label`
|
|
826
826
|
)
|
|
827
|
-
), d.subtotal !== void 0 && typeof d.subtotal != "boolean" && (u(d.subtotal) ?
|
|
827
|
+
), d.subtotal !== void 0 && typeof d.subtotal != "boolean" && (u(d.subtotal) ? Ae(
|
|
828
828
|
d.subtotal,
|
|
829
829
|
`${c}.subtotal`,
|
|
830
830
|
t
|
|
@@ -834,7 +834,7 @@ function B(e, i, t, n) {
|
|
|
834
834
|
"Matrix subtotal must be a boolean or structured options object.",
|
|
835
835
|
`${c}.subtotal`
|
|
836
836
|
)
|
|
837
|
-
)), d.sortBy !== void 0 && (u(d.sortBy) ?
|
|
837
|
+
)), d.sortBy !== void 0 && (u(d.sortBy) ? Me(
|
|
838
838
|
d.sortBy,
|
|
839
839
|
`${c}.sortBy`,
|
|
840
840
|
t
|
|
@@ -847,7 +847,7 @@ function B(e, i, t, n) {
|
|
|
847
847
|
));
|
|
848
848
|
}), o;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Se(e, i, t) {
|
|
851
851
|
if (!u(e)) {
|
|
852
852
|
t.push(
|
|
853
853
|
a(
|
|
@@ -888,7 +888,7 @@ function Me(e, i, t) {
|
|
|
888
888
|
)
|
|
889
889
|
);
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function ke(e, i, t) {
|
|
892
892
|
if (!Array.isArray(e) || e.length === 0)
|
|
893
893
|
return t.push(
|
|
894
894
|
a(
|
|
@@ -929,14 +929,14 @@ function Se(e, i, t) {
|
|
|
929
929
|
"Matrix value label must be a string.",
|
|
930
930
|
`${r}.label`
|
|
931
931
|
)
|
|
932
|
-
), c.totalBehavior !== void 0 &&
|
|
932
|
+
), c.totalBehavior !== void 0 && Se(
|
|
933
933
|
c.totalBehavior,
|
|
934
934
|
`${r}.totalBehavior`,
|
|
935
935
|
t
|
|
936
936
|
);
|
|
937
937
|
}), n;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Re(e, i, t) {
|
|
940
940
|
if (!u(e)) {
|
|
941
941
|
t.push(
|
|
942
942
|
a(
|
|
@@ -1078,7 +1078,7 @@ function q(e, i, t, n) {
|
|
|
1078
1078
|
)
|
|
1079
1079
|
));
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function De(e, i, t, n) {
|
|
1082
1082
|
if (e !== void 0) {
|
|
1083
1083
|
if (!u(e)) {
|
|
1084
1084
|
n.push(
|
|
@@ -1103,7 +1103,7 @@ function Re(e, i, t, n) {
|
|
|
1103
1103
|
);
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Fe(e, i, t, n, o) {
|
|
1107
1107
|
if (e !== void 0) {
|
|
1108
1108
|
if (!Array.isArray(e)) {
|
|
1109
1109
|
o.push(
|
|
@@ -1209,7 +1209,7 @@ function De(e, i, t, n, o) {
|
|
|
1209
1209
|
});
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Pe(e, i) {
|
|
1213
1213
|
if (e !== void 0) {
|
|
1214
1214
|
if (!u(e)) {
|
|
1215
1215
|
i.push(
|
|
@@ -1275,7 +1275,7 @@ function H(e, i, t) {
|
|
|
1275
1275
|
)
|
|
1276
1276
|
);
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Te(e, i) {
|
|
1279
1279
|
if (e !== void 0) {
|
|
1280
1280
|
if (!u(e)) {
|
|
1281
1281
|
i.push(
|
|
@@ -1306,7 +1306,7 @@ function Pe(e, i) {
|
|
|
1306
1306
|
);
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Ee(e, i) {
|
|
1310
1310
|
var d;
|
|
1311
1311
|
((d = e.source) == null ? void 0 : d.kind) === "sql" && i.push(
|
|
1312
1312
|
a(
|
|
@@ -1319,8 +1319,8 @@ function Te(e, i) {
|
|
|
1319
1319
|
required: !0
|
|
1320
1320
|
}), n = B(e.columns, "columns", i, {
|
|
1321
1321
|
required: !1
|
|
1322
|
-
}), o =
|
|
1323
|
-
x(e.filters, "filters", i), e.totals !== void 0 &&
|
|
1322
|
+
}), o = ke(e.values, "values", i);
|
|
1323
|
+
x(e.filters, "filters", i), e.totals !== void 0 && Re(e.totals, "totals", i), $(
|
|
1324
1324
|
t.map((p) => p.id),
|
|
1325
1325
|
"rows",
|
|
1326
1326
|
"row axis level",
|
|
@@ -1343,20 +1343,20 @@ function Te(e, i) {
|
|
|
1343
1343
|
), c = new Set(
|
|
1344
1344
|
o.map((p) => p.id).filter((p) => l(p))
|
|
1345
1345
|
);
|
|
1346
|
-
|
|
1346
|
+
Fe(
|
|
1347
1347
|
e.sort,
|
|
1348
1348
|
s,
|
|
1349
1349
|
r,
|
|
1350
1350
|
c,
|
|
1351
1351
|
i
|
|
1352
|
-
),
|
|
1352
|
+
), De(
|
|
1353
1353
|
e.expansion,
|
|
1354
1354
|
s,
|
|
1355
1355
|
r,
|
|
1356
1356
|
i
|
|
1357
|
-
),
|
|
1357
|
+
), Pe(e.layout, i), Te(e.displayLimits, i);
|
|
1358
1358
|
}
|
|
1359
|
-
function
|
|
1359
|
+
function Ne(e, i) {
|
|
1360
1360
|
if (e.analysis === void 0)
|
|
1361
1361
|
return;
|
|
1362
1362
|
if (!u(e.analysis)) {
|
|
@@ -1578,7 +1578,7 @@ function x(e, i, t) {
|
|
|
1578
1578
|
});
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Oe(e) {
|
|
1582
1582
|
const i = [];
|
|
1583
1583
|
if (!u(e))
|
|
1584
1584
|
return i.push(
|
|
@@ -1601,7 +1601,7 @@ function Ne(e) {
|
|
|
1601
1601
|
"Derived field needs a label.",
|
|
1602
1602
|
"label"
|
|
1603
1603
|
)
|
|
1604
|
-
),
|
|
1604
|
+
), _e.has(e.resultRole) || i.push(
|
|
1605
1605
|
a(
|
|
1606
1606
|
"invalid_derived_field_role",
|
|
1607
1607
|
"Derived field resultRole must be measure, dimension, date, id, or unknown.",
|
|
@@ -1613,7 +1613,7 @@ function Ne(e) {
|
|
|
1613
1613
|
"Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
|
|
1614
1614
|
"dataType"
|
|
1615
1615
|
)
|
|
1616
|
-
),
|
|
1616
|
+
), ve.has(e.computeStage) || i.push(
|
|
1617
1617
|
a(
|
|
1618
1618
|
"invalid_derived_field_compute_stage",
|
|
1619
1619
|
"Derived field computeStage must be row or aggregate.",
|
|
@@ -1641,7 +1641,7 @@ function Ne(e) {
|
|
|
1641
1641
|
e.defaultAggregate,
|
|
1642
1642
|
"defaultAggregate",
|
|
1643
1643
|
i
|
|
1644
|
-
), e.aggregationBehavior !== void 0 && !
|
|
1644
|
+
), e.aggregationBehavior !== void 0 && !he.has(
|
|
1645
1645
|
e.aggregationBehavior
|
|
1646
1646
|
) && i.push(
|
|
1647
1647
|
a(
|
|
@@ -1649,7 +1649,7 @@ function Ne(e) {
|
|
|
1649
1649
|
"Derived field aggregationBehavior is not supported.",
|
|
1650
1650
|
"aggregationBehavior"
|
|
1651
1651
|
)
|
|
1652
|
-
), e.aggregationStrategy !== void 0 && !
|
|
1652
|
+
), e.aggregationStrategy !== void 0 && !xe.has(
|
|
1653
1653
|
e.aggregationStrategy
|
|
1654
1654
|
) && i.push(
|
|
1655
1655
|
a(
|
|
@@ -1686,13 +1686,13 @@ function Ne(e) {
|
|
|
1686
1686
|
);
|
|
1687
1687
|
return;
|
|
1688
1688
|
}
|
|
1689
|
-
|
|
1689
|
+
$e(
|
|
1690
1690
|
n,
|
|
1691
1691
|
`inputs.${t}`,
|
|
1692
1692
|
i
|
|
1693
1693
|
);
|
|
1694
1694
|
}), l(e.expression) && u(e.inputs)) {
|
|
1695
|
-
const t =
|
|
1695
|
+
const t = de(e.expression), n = new Set(t), o = Object.keys(e.inputs).filter(
|
|
1696
1696
|
(s) => l(s)
|
|
1697
1697
|
);
|
|
1698
1698
|
t.forEach((s) => {
|
|
@@ -1721,7 +1721,7 @@ function Ne(e) {
|
|
|
1721
1721
|
)
|
|
1722
1722
|
), { ok: i.length === 0, errors: i, warnings: [] };
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function Ce(e) {
|
|
1725
1725
|
const i = [];
|
|
1726
1726
|
if (!u(e))
|
|
1727
1727
|
return i.push(
|
|
@@ -1744,7 +1744,7 @@ function Le(e) {
|
|
|
1744
1744
|
"Result calculation kind must be percent_of_total, rank, running_total, or previous_row_delta.",
|
|
1745
1745
|
"kind"
|
|
1746
1746
|
)
|
|
1747
|
-
), j(e.input, "input", i),
|
|
1747
|
+
), j(e.input, "input", i), we(e.output, "output", i), e.kind === "percent_of_total") {
|
|
1748
1748
|
const t = e.denominator;
|
|
1749
1749
|
t !== void 0 && (u(t) ? t.scope === "population" ? (m(t.metric, "denominator.metric", i, {
|
|
1750
1750
|
required: !0
|
|
@@ -1800,7 +1800,7 @@ function Q(e) {
|
|
|
1800
1800
|
"Analytics intent version must be 1.",
|
|
1801
1801
|
"version"
|
|
1802
1802
|
)
|
|
1803
|
-
), S(e.source, "source", i),
|
|
1803
|
+
), S(e.source, "source", i), je(e, i), me(e, i), "relationshipHint" in e && e.relationshipHint !== void 0 && k(
|
|
1804
1804
|
e.relationshipHint,
|
|
1805
1805
|
"relationshipHint",
|
|
1806
1806
|
i
|
|
@@ -1826,7 +1826,7 @@ function Q(e) {
|
|
|
1826
1826
|
m(s, `measures.${r}`, i, {
|
|
1827
1827
|
required: !0
|
|
1828
1828
|
});
|
|
1829
|
-
}), o.length > 0 && !
|
|
1829
|
+
}), o.length > 0 && !Z(o)) {
|
|
1830
1830
|
const s = o.find(
|
|
1831
1831
|
(r, c) => o.some(
|
|
1832
1832
|
(d, p) => p !== c && C(d, r)
|
|
@@ -1835,7 +1835,7 @@ function Q(e) {
|
|
|
1835
1835
|
s && i.push(
|
|
1836
1836
|
a(
|
|
1837
1837
|
"duplicate_measure",
|
|
1838
|
-
|
|
1838
|
+
J(s),
|
|
1839
1839
|
"measures"
|
|
1840
1840
|
)
|
|
1841
1841
|
);
|
|
@@ -1851,7 +1851,7 @@ function Q(e) {
|
|
|
1851
1851
|
)
|
|
1852
1852
|
), e.primaryMeasure !== void 0 && (m(e.primaryMeasure, "primaryMeasure", i, {
|
|
1853
1853
|
required: !0
|
|
1854
|
-
}), u(e.primaryMeasure) && l(e.primaryMeasure.name) && o.length > 0 && !
|
|
1854
|
+
}), u(e.primaryMeasure) && l(e.primaryMeasure.name) && o.length > 0 && !ee(
|
|
1855
1855
|
e.primaryMeasure,
|
|
1856
1856
|
o
|
|
1857
1857
|
) && i.push(
|
|
@@ -1907,7 +1907,7 @@ function Q(e) {
|
|
|
1907
1907
|
(r) => u(r) && l(r.name)
|
|
1908
1908
|
) : []
|
|
1909
1909
|
];
|
|
1910
|
-
s.length > 0 && !
|
|
1910
|
+
s.length > 0 && !ie(
|
|
1911
1911
|
e.orderBy.field,
|
|
1912
1912
|
s
|
|
1913
1913
|
) && i.push(
|
|
@@ -1919,7 +1919,7 @@ function Q(e) {
|
|
|
1919
1919
|
);
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
|
-
|
|
1922
|
+
Ne(e, i);
|
|
1923
1923
|
} else if (e.kind === "records") {
|
|
1924
1924
|
if (!Array.isArray(e.fields) || e.fields.length === 0 ? i.push(
|
|
1925
1925
|
a(
|
|
@@ -2001,7 +2001,7 @@ function Q(e) {
|
|
|
2001
2001
|
);
|
|
2002
2002
|
});
|
|
2003
2003
|
}
|
|
2004
|
-
} else e.kind === "inputOptions" ?
|
|
2004
|
+
} else e.kind === "inputOptions" ? pe(e, i) : e.kind === "matrix" ? Ee(e, i) : e.kind === "sql" ? (((n = e.source) == null ? void 0 : n.kind) !== "sql" && i.push(
|
|
2005
2005
|
a(
|
|
2006
2006
|
"invalid_sql_source",
|
|
2007
2007
|
"SQL analytics intent must use a SQL execution source.",
|
|
@@ -2009,7 +2009,7 @@ function Q(e) {
|
|
|
2009
2009
|
)
|
|
2010
2010
|
), l(e.sql) || i.push(
|
|
2011
2011
|
a("missing_sql", "SQL analytics intent needs SQL text.", "sql")
|
|
2012
|
-
),
|
|
2012
|
+
), W(
|
|
2013
2013
|
e.defaultParameters,
|
|
2014
2014
|
"defaultParameters",
|
|
2015
2015
|
i
|
|
@@ -2026,10 +2026,10 @@ function Q(e) {
|
|
|
2026
2026
|
ok: i.length === 0,
|
|
2027
2027
|
errors: i,
|
|
2028
2028
|
warnings: t,
|
|
2029
|
-
repairHints:
|
|
2029
|
+
repairHints: qe(i)
|
|
2030
2030
|
};
|
|
2031
2031
|
}
|
|
2032
|
-
function
|
|
2032
|
+
function je(e, i) {
|
|
2033
2033
|
if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
|
|
2034
2034
|
if (!Array.isArray(e.derivedFields)) {
|
|
2035
2035
|
i.push(
|
|
@@ -2042,7 +2042,7 @@ function Oe(e, i) {
|
|
|
2042
2042
|
return;
|
|
2043
2043
|
}
|
|
2044
2044
|
e.derivedFields.forEach((t, n) => {
|
|
2045
|
-
|
|
2045
|
+
Oe(
|
|
2046
2046
|
t
|
|
2047
2047
|
).errors.forEach((s) => {
|
|
2048
2048
|
i.push({
|
|
@@ -2053,7 +2053,7 @@ function Oe(e, i) {
|
|
|
2053
2053
|
});
|
|
2054
2054
|
}
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function Be(e) {
|
|
2057
2057
|
const i = [], t = [];
|
|
2058
2058
|
if (!e || typeof e != "object")
|
|
2059
2059
|
return {
|
|
@@ -2128,7 +2128,7 @@ function je(e) {
|
|
|
2128
2128
|
repairHints: Y(i)
|
|
2129
2129
|
};
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function Ue(e) {
|
|
2132
2132
|
const i = [], t = [];
|
|
2133
2133
|
if (!e || typeof e != "object")
|
|
2134
2134
|
return {
|
|
@@ -2156,7 +2156,7 @@ function Ce(e) {
|
|
|
2156
2156
|
"kind"
|
|
2157
2157
|
)
|
|
2158
2158
|
);
|
|
2159
|
-
const n =
|
|
2159
|
+
const n = Be(
|
|
2160
2160
|
e.operationIntent
|
|
2161
2161
|
);
|
|
2162
2162
|
return i.push(...n.errors), t.push(...n.warnings), Array.isArray(e.plannedToolCalls) || i.push(
|
|
@@ -2178,7 +2178,7 @@ function Y(e) {
|
|
|
2178
2178
|
recommendedNextStep: i.code === "missing_obligations" ? "Normalize the user request into one or more typed analytics obligations before recovery planning." : "Correct the operation/recovery contract shape before planning execution."
|
|
2179
2179
|
}));
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function qe(e) {
|
|
2182
2182
|
return e.map((i) => {
|
|
2183
2183
|
switch (i.code) {
|
|
2184
2184
|
case "missing_source":
|
|
@@ -2261,7 +2261,7 @@ function Be(e) {
|
|
|
2261
2261
|
}
|
|
2262
2262
|
}).filter((i) => !!i);
|
|
2263
2263
|
}
|
|
2264
|
-
function
|
|
2264
|
+
function He(e, i, t, n) {
|
|
2265
2265
|
if (!e || typeof e != "object") {
|
|
2266
2266
|
t.push(
|
|
2267
2267
|
a("invalid_view", "Dashboard view must be an object.", i)
|
|
@@ -2325,7 +2325,7 @@ function qe(e, i, t, n) {
|
|
|
2325
2325
|
)
|
|
2326
2326
|
);
|
|
2327
2327
|
}
|
|
2328
|
-
function
|
|
2328
|
+
function Ve(e) {
|
|
2329
2329
|
const i = [], t = [];
|
|
2330
2330
|
if (!e || typeof e != "object")
|
|
2331
2331
|
return {
|
|
@@ -2418,7 +2418,7 @@ function Ue(e) {
|
|
|
2418
2418
|
continue;
|
|
2419
2419
|
}
|
|
2420
2420
|
for (const [b, y] of p.views.entries())
|
|
2421
|
-
|
|
2421
|
+
He(
|
|
2422
2422
|
y,
|
|
2423
2423
|
`${f}.views.${b}`,
|
|
2424
2424
|
i,
|
|
@@ -2428,11 +2428,11 @@ function Ue(e) {
|
|
|
2428
2428
|
return { ok: i.length === 0, errors: i, warnings: t };
|
|
2429
2429
|
}
|
|
2430
2430
|
export {
|
|
2431
|
-
|
|
2431
|
+
Ce as a,
|
|
2432
2432
|
Q as b,
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2433
|
+
Be as c,
|
|
2434
|
+
Ue as d,
|
|
2435
|
+
Ve as e,
|
|
2436
2436
|
T as p,
|
|
2437
|
-
|
|
2437
|
+
Oe as v
|
|
2438
2438
|
};
|