react-semaphor 0.1.583 → 0.1.585
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.js +470 -428
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +7 -7
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/aggregate-measure-field-DsFXETpI.js +22 -0
- package/dist/chunks/{assistant-chat-D3fm5qod.js → assistant-chat-BdbLmAnK.js} +12 -12
- package/dist/chunks/{bookmark-impact-Dpxl46Wd.js → bookmark-impact-BhT3k379.js} +2 -2
- package/dist/chunks/{bookmark-state-BEl_G9vr.js → bookmark-state-CL4WEpgB.js} +22 -22
- package/dist/chunks/{card-filter-builder-IxkFVxy2.js → card-filter-builder-CEcKF6Fw.js} +124 -124
- package/dist/chunks/comparison-window-caption-CoART8BC.js +1254 -0
- package/dist/chunks/{dashboard-BMqG98fc.js → dashboard-MPku_x1M.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D45YfCkm.js → dashboard-briefing-launcher-CkFNlkr1.js} +13 -13
- package/dist/chunks/{dashboard-controls-DOvZRfof.js → dashboard-controls-Clt4ovXS.js} +84 -84
- package/dist/chunks/{dashboard-json-B_4TqF_o.js → dashboard-json-DSmXazIg.js} +4 -4
- package/dist/chunks/{dates-44_rcNj2.js → dates-CYZW9owO.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-BBPKJWSe.js → edit-dashboard-visual-Dn2ECRbX.js} +2752 -2687
- package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
- package/dist/chunks/{filter-reach-copy-DWPq4Swi.js → filter-reach-copy-CmJpPa4G.js} +1745 -1326
- package/dist/chunks/{filter-value-text-DXGYypEd.js → filter-value-text-xefXzZlf.js} +6 -6
- package/dist/chunks/{index-DPRzcFp0.js → index-0WYn6RMz.js} +37 -37
- package/dist/chunks/{layout-grid-8rR-LPTk.js → layout-grid-9nSS2SL-.js} +1 -1
- package/dist/chunks/{list-filter-C1-uTgjR.js → list-filter-CfMPI6v4.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-D_HgptqZ.js → matrix-analytical-definition-QjBgUYhP.js} +382 -544
- package/dist/chunks/{matrix-member-presentation-DRa-9e6Q.js → matrix-member-presentation-BKDyxJho.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js} +153 -147
- package/dist/chunks/{metric-comparison-n9NsIa-2.js → metric-comparison-ZmurmEIs.js} +3 -3
- package/dist/chunks/{paintbrush-aR17Z3C9.js → paintbrush-LzAje2ff.js} +1 -1
- package/dist/chunks/{palette-a5FCZKFI.js → palette-DicJG0TC.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-CdeTU96P.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-8tuNjRvG.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1029 -1010
- package/dist/chunks/{pivot-result-identity-B89X5xjb.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
- package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
- package/dist/chunks/{report-preferences-dialog-B8PhISua.js → report-preferences-dialog-BRaeufEi.js} +63 -62
- package/dist/chunks/{report-runtime-context-BhPzLTbS.js → report-runtime-context-NlOXwyRB.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-BfT8y5xL.js → resolve-dashboard-input-context-Cn9jumxl.js} +4924 -4823
- package/dist/chunks/{save-D985VvYp.js → save-0wu1Z1U7.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DH91-2B9.js → saved-dashboard-context-CfqkUMzR.js} +6 -6
- package/dist/chunks/selection-filter-compiler-BReJy-uv.js +92 -0
- package/dist/chunks/{semaphor-ready-indicator-Cg_Z2IDc.js → semaphor-ready-indicator-D6WjdTGl.js} +48377 -47074
- package/dist/chunks/{shelf-drop-preview-context-C7-BgcP4.js → shelf-drop-preview-context-Bbbrr9u4.js} +5 -5
- package/dist/chunks/{stored-dashboard-BpyCiE49.js → stored-dashboard-sPkTjxYf.js} +210 -221
- package/dist/chunks/{style-sheet-parts-C7qGZuH1.js → style-sheet-parts-_dGSFzDi.js} +2 -2
- package/dist/chunks/{table-export-sheet-wBkk17aa.js → table-export-sheet-Dmtqi5NV.js} +1 -1
- package/dist/chunks/{token-types-iKMplaBL.js → token-types-DEe_FP4l.js} +1 -1
- package/dist/chunks/{upload-CiGNKJ_0.js → upload-CtyOkU_B.js} +1 -1
- package/dist/chunks/{validators-B8fpdinG.js → validators-CJ8Jh0E8.js} +2 -2
- package/dist/chunks/{variable-draft-D8GFhAkm.js → variable-draft-D1RotIEG.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +670 -647
- package/dist/format-utils/index.js +218 -215
- package/dist/index.js +234 -231
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/data-table/types/data-table.d.ts +3 -0
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
- package/dist/types/index.js +5 -5
- package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +9 -0
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -3
- package/dist/types/lib/query-context/compile-selection-filters.d.ts +1 -5
- package/dist/types/lib/see-records/click.d.ts +79 -0
- package/dist/types/lib/see-records/see-records-offer.d.ts +25 -0
- package/dist/types/lib/see-records/use-see-records-offer.d.ts +16 -0
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/aggregate-measure-field.d.ts +13 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/see-records/availability.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/see-records/click.d.ts +37 -0
- package/dist/types/shared/dashboard-authoring/see-records/index.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/see-records/limits.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +49 -0
- package/dist/types/shared/dashboard-authoring/see-records/request.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +94 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
- package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
- package/dist/types/shared/usage-events/envelope.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunks/comparison-window-caption-sRFtnX1q.js +0 -1371
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
- package/dist/chunks/selection-filter-compiler-CUDRnUxc.js +0 -80
package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import { y as Le, L as
|
|
3
|
-
import { A as k, u as de, J as G, aZ as ee, m as A, B as Ye, aS as $, v as He, l as Je, o as me, a2 as Qe, p as et, a5 as tt, aY as nt } from "./validators-
|
|
2
|
+
import { y as Le, L as De, V as Ue, W as qe, Z as Me, _ as Be, s as D, J as Z, n as Ge, Q as ze, U as ce, g as Ve, r as We, K as Ke, C as Xe, D as Ze, m as le, b as ue, G as $e } from "./analytics-base-schemas-BaIQrEzX.js";
|
|
3
|
+
import { A as k, u as de, J as G, aZ as ee, m as A, B as Ye, aS as $, v as He, l as Je, o as me, a2 as Qe, p as et, a5 as tt, aY as nt } from "./validators-CJ8Jh0E8.js";
|
|
4
4
|
const Y = {
|
|
5
5
|
answerSummary: "string",
|
|
6
6
|
responseDetail: "responseDetail",
|
|
@@ -129,7 +129,7 @@ const ct = [
|
|
|
129
129
|
function f(e, n, a) {
|
|
130
130
|
e.addIssue({ code: "custom", path: n, message: a });
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function T(e, n, a) {
|
|
133
133
|
new Set(e).size !== e.length && f(n, a, "Duplicate identity.");
|
|
134
134
|
}
|
|
135
135
|
const ut = t.object({
|
|
@@ -153,13 +153,13 @@ const ut = t.object({
|
|
|
153
153
|
pages: t.array(ut).readonly(),
|
|
154
154
|
blocks: t.array(dt).readonly()
|
|
155
155
|
}).strict().superRefine((e, n) => {
|
|
156
|
-
!e.pages.length && !e.blocks.length && f(n, [], "Request at least one page or block."),
|
|
156
|
+
!e.pages.length && !e.blocks.length && f(n, [], "Request at least one page or block."), T(
|
|
157
157
|
[...e.pages, ...e.blocks].map((a) => a.id),
|
|
158
158
|
n,
|
|
159
159
|
[]
|
|
160
160
|
);
|
|
161
161
|
for (const a of e.blocks) {
|
|
162
|
-
|
|
162
|
+
T(a.measureIds, n, ["blocks", a.id, "measureIds"]);
|
|
163
163
|
for (const r of ["rows", "columns"])
|
|
164
164
|
for (const s of a[r].pageIds)
|
|
165
165
|
e.pages.some(
|
|
@@ -213,7 +213,7 @@ const ut = t.object({
|
|
|
213
213
|
return (s = r.path[r.path.length - 1]) == null ? void 0 : s.levelId;
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
|
-
).size > 1 && f(n, ["members"], "One page must contain one child level."),
|
|
216
|
+
).size > 1 && f(n, ["members"], "One page must contain one child level."), T(
|
|
217
217
|
e.members.map((r) => A(r.path)),
|
|
218
218
|
n,
|
|
219
219
|
["members"]
|
|
@@ -227,7 +227,7 @@ const ut = t.object({
|
|
|
227
227
|
}).strict();
|
|
228
228
|
function ge(e, n) {
|
|
229
229
|
const a = e.rowPaths.map(A), r = e.columnPaths.map(A);
|
|
230
|
-
return
|
|
230
|
+
return T(a, n, ["coverage", "rowPaths"]), T(r, n, ["coverage", "columnPaths"]), T(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
|
|
231
231
|
}
|
|
232
232
|
const pt = t.object({
|
|
233
233
|
requestId: y,
|
|
@@ -237,7 +237,7 @@ const pt = t.object({
|
|
|
237
237
|
).readonly()
|
|
238
238
|
}).strict().superRefine((e, n) => {
|
|
239
239
|
const { rows: a, columns: r } = ge(e.coverage, n), s = new Set(a), c = new Set(r), i = new Set(e.coverage.measureIds);
|
|
240
|
-
|
|
240
|
+
T(
|
|
241
241
|
e.cells.map(
|
|
242
242
|
(l) => JSON.stringify([
|
|
243
243
|
A(l.rowPath),
|
|
@@ -250,11 +250,11 @@ const pt = t.object({
|
|
|
250
250
|
);
|
|
251
251
|
for (const l of e.cells)
|
|
252
252
|
(!s.has(A(l.rowPath)) || !c.has(A(l.columnPath)) || !i.has(l.measureId)) && f(n, ["cells"], "Cell is outside certified coverage.");
|
|
253
|
-
}),
|
|
253
|
+
}), U = t.number().int().nonnegative(), ht = t.object({
|
|
254
254
|
requestId: y,
|
|
255
255
|
coverage: fe,
|
|
256
256
|
values: t.array(
|
|
257
|
-
t.tuple([
|
|
257
|
+
t.tuple([U, U, U, $]).readonly()
|
|
258
258
|
).readonly()
|
|
259
259
|
}).strict().superRefine((e, n) => {
|
|
260
260
|
ge(e.coverage, n);
|
|
@@ -269,7 +269,7 @@ const pt = t.object({
|
|
|
269
269
|
}
|
|
270
270
|
}), ne = t.object({
|
|
271
271
|
id: O,
|
|
272
|
-
column:
|
|
272
|
+
column: De,
|
|
273
273
|
nativeDataType: y,
|
|
274
274
|
semanticFormat: Le.optional()
|
|
275
275
|
}).strict(), ye = t.object({
|
|
@@ -319,17 +319,17 @@ function Se(e) {
|
|
|
319
319
|
a,
|
|
320
320
|
["descriptors"],
|
|
321
321
|
"Acquired paths require level descriptors."
|
|
322
|
-
),
|
|
322
|
+
), T(
|
|
323
323
|
[...n.descriptors.levels, ...n.descriptors.measures].map(
|
|
324
324
|
(i) => i.id
|
|
325
325
|
),
|
|
326
326
|
a,
|
|
327
327
|
["descriptors"]
|
|
328
|
-
),
|
|
328
|
+
), T(
|
|
329
329
|
[...n.pages, ...n.blocks].map((i) => i.requestId),
|
|
330
330
|
a,
|
|
331
331
|
[]
|
|
332
|
-
),
|
|
332
|
+
), T(
|
|
333
333
|
n.failures.map(
|
|
334
334
|
(i) => i.scope.kind === "operation" ? "operation" : i.scope.requestId
|
|
335
335
|
),
|
|
@@ -467,7 +467,7 @@ const Ie = t.object({
|
|
|
467
467
|
next: y.nullable()
|
|
468
468
|
}).strict()
|
|
469
469
|
]), wt = t.union([
|
|
470
|
-
|
|
470
|
+
Ue,
|
|
471
471
|
qe,
|
|
472
472
|
Me,
|
|
473
473
|
Be,
|
|
@@ -481,15 +481,15 @@ const Ie = t.object({
|
|
|
481
481
|
"fanout_risk",
|
|
482
482
|
"unknown"
|
|
483
483
|
]),
|
|
484
|
-
requiredSources: t.array(
|
|
484
|
+
requiredSources: t.array(D).optional(),
|
|
485
485
|
relationshipsUsed: t.array(t.string()).optional(),
|
|
486
486
|
missingSources: t.array(t.string()).optional(),
|
|
487
487
|
warnings: t.array(t.string()).optional(),
|
|
488
488
|
message: t.string().optional(),
|
|
489
489
|
recommendedNextStep: t.string().optional(),
|
|
490
490
|
joinPlanSummary: t.object({
|
|
491
|
-
baseSource:
|
|
492
|
-
joinedSources: t.array(
|
|
491
|
+
baseSource: D.optional(),
|
|
492
|
+
joinedSources: t.array(D).optional(),
|
|
493
493
|
joinCount: t.number().optional()
|
|
494
494
|
}).passthrough().optional(),
|
|
495
495
|
fanoutRisk: t.object({
|
|
@@ -544,11 +544,11 @@ const Ie = t.object({
|
|
|
544
544
|
}).passthrough(), ke = t.object({
|
|
545
545
|
scope: t.literal("filtered_query"),
|
|
546
546
|
measures: t.record(Ge)
|
|
547
|
-
}).passthrough(),
|
|
547
|
+
}).passthrough(), Te = t.object({
|
|
548
548
|
answeredObligations: t.array(t.string()),
|
|
549
549
|
missingObligations: t.array(t.string()),
|
|
550
550
|
warnings: t.array(ze).optional()
|
|
551
|
-
}).passthrough(),
|
|
551
|
+
}).passthrough(), ve = t.object({
|
|
552
552
|
intentId: t.string().optional(),
|
|
553
553
|
queryId: t.string().optional(),
|
|
554
554
|
status: t.enum(["answered", "partial", "failed"]),
|
|
@@ -566,28 +566,28 @@ const Ie = t.object({
|
|
|
566
566
|
fieldsUsed: t.array(Z).optional(),
|
|
567
567
|
result: wt.optional(),
|
|
568
568
|
validation: ce,
|
|
569
|
-
coverage:
|
|
569
|
+
coverage: Te.optional(),
|
|
570
570
|
missingFields: t.array(t.string()).optional(),
|
|
571
571
|
warnings: t.array(t.string()).optional(),
|
|
572
572
|
relationshipDiagnostics: kt.optional(),
|
|
573
573
|
diagnosticFeedback: we.optional(),
|
|
574
574
|
population: ke.optional(),
|
|
575
575
|
metadata: t.record(t.string(), t.unknown()).optional()
|
|
576
|
-
}).passthrough(),
|
|
577
|
-
function
|
|
576
|
+
}).passthrough(), Tt = ve;
|
|
577
|
+
function vt(e) {
|
|
578
578
|
switch (e) {
|
|
579
579
|
case "boolean":
|
|
580
580
|
return t.boolean().optional();
|
|
581
581
|
case "compactExecutionFieldArray":
|
|
582
582
|
return t.array(Ke).optional();
|
|
583
583
|
case "coverage":
|
|
584
|
-
return
|
|
584
|
+
return Te.optional();
|
|
585
585
|
case "diagnosticFeedback":
|
|
586
586
|
return we.optional();
|
|
587
587
|
case "executionFieldArray":
|
|
588
588
|
return t.array(Z).optional();
|
|
589
589
|
case "executionResult":
|
|
590
|
-
return
|
|
590
|
+
return Tt.optional();
|
|
591
591
|
case "number":
|
|
592
592
|
return t.number().finite().optional();
|
|
593
593
|
case "population":
|
|
@@ -612,7 +612,7 @@ function Tt(e) {
|
|
|
612
612
|
}
|
|
613
613
|
const Et = Object.fromEntries(
|
|
614
614
|
Object.entries(Y).map(
|
|
615
|
-
([e, n]) => [e,
|
|
615
|
+
([e, n]) => [e, vt(n)]
|
|
616
616
|
)
|
|
617
617
|
), Rt = t.object(Et).strict(), Ct = new Set(
|
|
618
618
|
Object.keys(Y)
|
|
@@ -723,7 +723,7 @@ function kn(e, n) {
|
|
|
723
723
|
return se(e) === se(n);
|
|
724
724
|
}
|
|
725
725
|
const Pt = "(Blank)";
|
|
726
|
-
function
|
|
726
|
+
function Tn(e) {
|
|
727
727
|
return e.conditions.map((n) => n.label ? n.label : n.operator === "isNull" || n.value === null ? Pt : String(n.value)).join(" · ");
|
|
728
728
|
}
|
|
729
729
|
const jt = t.union([
|
|
@@ -748,7 +748,7 @@ const jt = t.union([
|
|
|
748
748
|
message: "isNull carries a null value, and only isNull does.",
|
|
749
749
|
path: ["value"]
|
|
750
750
|
});
|
|
751
|
-
}),
|
|
751
|
+
}), Dt = t.object({
|
|
752
752
|
conditions: t.array(Lt).min(1)
|
|
753
753
|
}).strict().superRefine((e, n) => {
|
|
754
754
|
const a = e.conditions.map((r) => Re(r.field));
|
|
@@ -757,11 +757,11 @@ const jt = t.union([
|
|
|
757
757
|
message: "A tuple holds one condition per field.",
|
|
758
758
|
path: ["conditions"]
|
|
759
759
|
});
|
|
760
|
-
}),
|
|
760
|
+
}), vn = t.object({
|
|
761
761
|
kind: t.literal("selection"),
|
|
762
762
|
sourceCardId: t.string().min(1),
|
|
763
|
-
tuples: t.array(
|
|
764
|
-
}).strict(),
|
|
763
|
+
tuples: t.array(Dt).min(1).max(Ee)
|
|
764
|
+
}).strict(), Ut = t.object({
|
|
765
765
|
field: $e,
|
|
766
766
|
operator: t.enum(["=", "isNull"]),
|
|
767
767
|
value: t.union([t.string(), t.number().finite(), t.null()]),
|
|
@@ -774,7 +774,7 @@ const jt = t.union([
|
|
|
774
774
|
path: ["value"]
|
|
775
775
|
});
|
|
776
776
|
}), qt = t.object({
|
|
777
|
-
conditions: t.array(
|
|
777
|
+
conditions: t.array(Ut).min(1)
|
|
778
778
|
}).strict().superRefine((e, n) => {
|
|
779
779
|
for (let a = 0; a < e.conditions.length; a += 1) {
|
|
780
780
|
const r = e.conditions[a];
|
|
@@ -789,21 +789,7 @@ const jt = t.union([
|
|
|
789
789
|
}), En = t.object({
|
|
790
790
|
id: t.string().min(1),
|
|
791
791
|
tuples: t.array(qt).min(1).max(Ee)
|
|
792
|
-
}).strict(),
|
|
793
|
-
executionInstant: t.string().refine((e) => et(e) !== null, {
|
|
794
|
-
message: "executionInstant must be an ISO instant"
|
|
795
|
-
}),
|
|
796
|
-
dataAnchors: t.array(Mt).default([])
|
|
797
|
-
}).strict().refine(
|
|
798
|
-
(e) => new Set(e.dataAnchors.map((n) => n.key)).size === e.dataAnchors.length,
|
|
799
|
-
{ message: "dataAnchors keys must be unique", path: ["dataAnchors"] }
|
|
800
|
-
);
|
|
801
|
-
function Rn(e) {
|
|
802
|
-
if (e == null) return;
|
|
803
|
-
const n = Bt.safeParse(e);
|
|
804
|
-
return n.success ? n.data : void 0;
|
|
805
|
-
}
|
|
806
|
-
const Oe = {
|
|
792
|
+
}).strict(), Oe = {
|
|
807
793
|
COUNT: "count",
|
|
808
794
|
COUNTIF: "count",
|
|
809
795
|
COUNT_IF: "count",
|
|
@@ -867,16 +853,16 @@ const Oe = {
|
|
|
867
853
|
COLLECT_SET: "other",
|
|
868
854
|
FIRST: "other",
|
|
869
855
|
LAST: "other"
|
|
870
|
-
},
|
|
871
|
-
function
|
|
856
|
+
}, Mt = /(?:_AGG$|^APPROX_[A-Z0-9_]+$|^COUNT_DISTINCT$|^HLL_(?:COUNT|ESTIMATE)$|^REGR_[A-Z_]+$)/;
|
|
857
|
+
function Bt(e) {
|
|
872
858
|
const n = e.toUpperCase();
|
|
873
|
-
return n in Oe ||
|
|
859
|
+
return n in Oe || Mt.test(n);
|
|
874
860
|
}
|
|
875
861
|
function xe(e, n = !1) {
|
|
876
862
|
const a = Oe[e.toUpperCase()] ?? "other";
|
|
877
863
|
return n ? a === "count" || a === "count_distinct" ? "count_distinct" : a === "min" || a === "max" ? a : "repeat_safe_other" : a;
|
|
878
864
|
}
|
|
879
|
-
const
|
|
865
|
+
const Gt = /* @__PURE__ */ new Set([
|
|
880
866
|
"NULLIF",
|
|
881
867
|
"COALESCE",
|
|
882
868
|
"IFNULL",
|
|
@@ -891,7 +877,7 @@ const Vt = /* @__PURE__ */ new Set([
|
|
|
891
877
|
"CAST",
|
|
892
878
|
"TRY_CAST",
|
|
893
879
|
"SAFE_CAST"
|
|
894
|
-
]),
|
|
880
|
+
]), zt = /* @__PURE__ */ new Set(["DECIMAL", "NUMERIC", "INTEGER", "INT", "BIGINT", "FLOAT", "DOUBLE", "REAL", "VARCHAR", "TEXT"]), ie = /[A-Za-z_]/, Vt = /[A-Za-z0-9_]/;
|
|
895
881
|
function V(e, n) {
|
|
896
882
|
const a = e[n];
|
|
897
883
|
let r = n + 1;
|
|
@@ -928,12 +914,12 @@ function j(e, n) {
|
|
|
928
914
|
}
|
|
929
915
|
function M(e, n) {
|
|
930
916
|
let a = n + 1;
|
|
931
|
-
for (; a < e.length &&
|
|
917
|
+
for (; a < e.length && Vt.test(e[a]); ) a += 1;
|
|
932
918
|
return a;
|
|
933
919
|
}
|
|
934
|
-
const
|
|
935
|
-
function
|
|
936
|
-
return Array.from(e.matchAll(
|
|
920
|
+
const Wt = /\{([A-Za-z_][A-Za-z0-9_]*)\}/g;
|
|
921
|
+
function Kt(e) {
|
|
922
|
+
return Array.from(e.matchAll(Wt), (n) => n[1]);
|
|
937
923
|
}
|
|
938
924
|
function W(e, n = /* @__PURE__ */ new Set()) {
|
|
939
925
|
const a = [], r = [];
|
|
@@ -955,16 +941,16 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
955
941
|
}
|
|
956
942
|
if (ie.test(m)) {
|
|
957
943
|
const o = M(e, l), d = e.slice(l, o), p = j(e, o);
|
|
958
|
-
if (e[p] === "(" &&
|
|
944
|
+
if (e[p] === "(" && Bt(d)) {
|
|
959
945
|
let g = P(e, p);
|
|
960
946
|
const I = g - 1;
|
|
961
947
|
let R = g;
|
|
962
|
-
const
|
|
963
|
-
let x =
|
|
948
|
+
const v = e.slice(p + 1, g - 1);
|
|
949
|
+
let x = v.trim() ? 1 : 0;
|
|
964
950
|
for (let h = p + 1; h < R - 1; h++)
|
|
965
951
|
e[h] === "'" || e[h] === '"' ? h = V(e, h) - 1 : e[h] === "(" ? h = P(e, h) - 1 : e[h] === "," && x++;
|
|
966
|
-
const C = /^\s*DISTINCT\b/i.test(
|
|
967
|
-
W(C ?
|
|
952
|
+
const C = /^\s*DISTINCT\b/i.test(v);
|
|
953
|
+
W(C ? v.replace(/^\s*DISTINCT\b/i, "") : v).calls.length > 0 && (s = !0);
|
|
968
954
|
let b = !1, _ = !1;
|
|
969
955
|
for (; ; ) {
|
|
970
956
|
const h = j(e, g);
|
|
@@ -988,7 +974,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
988
974
|
kind: xe(d, C),
|
|
989
975
|
distinct: C,
|
|
990
976
|
windowed: b,
|
|
991
|
-
tokens:
|
|
977
|
+
tokens: Kt(e.slice(p, g)),
|
|
992
978
|
span: { start: l, end: R, argumentStart: p + 1, argumentEnd: I },
|
|
993
979
|
argumentCount: x,
|
|
994
980
|
filtered: _
|
|
@@ -1005,11 +991,11 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
1005
991
|
nestedAggregate: s,
|
|
1006
992
|
windowed: a.some((m) => m.windowed),
|
|
1007
993
|
tokensOutsideAggregates: r,
|
|
1008
|
-
aggregateInputsComplete: i &&
|
|
994
|
+
aggregateInputsComplete: i && Xt(c, n),
|
|
1009
995
|
skeleton: c
|
|
1010
996
|
};
|
|
1011
997
|
}
|
|
1012
|
-
function
|
|
998
|
+
function Xt(e, n) {
|
|
1013
999
|
var m;
|
|
1014
1000
|
const a = [];
|
|
1015
1001
|
let r = 0;
|
|
@@ -1044,9 +1030,9 @@ function $t(e, n) {
|
|
|
1044
1030
|
}
|
|
1045
1031
|
if (o.startsWith("@") || o === "'S'" || ["NULL", "TRUE", "FALSE"].includes(o) || /^[0-9.]/.test(o))
|
|
1046
1032
|
return s++, !0;
|
|
1047
|
-
if (!
|
|
1033
|
+
if (!Gt.has(o) || (s++, !c("(") || !i())) return !1;
|
|
1048
1034
|
if (["CAST", "TRY_CAST", "SAFE_CAST"].includes(o)) {
|
|
1049
|
-
if (!c("AS") || !
|
|
1035
|
+
if (!c("AS") || !zt.has(a[s++]) || (c("PRECISION"), c("(") && (!/^\d+$/.test(a[s++] || "") || c(",") && !/^\d+$/.test(a[s++] || "") || !c(")"))))
|
|
1050
1036
|
return !1;
|
|
1051
1037
|
} else
|
|
1052
1038
|
for (; c(","); ) if (!i()) return !1;
|
|
@@ -1054,7 +1040,12 @@ function $t(e, n) {
|
|
|
1054
1040
|
};
|
|
1055
1041
|
return i() && s === a.length;
|
|
1056
1042
|
}
|
|
1057
|
-
function
|
|
1043
|
+
function Rn(e, n) {
|
|
1044
|
+
if (n.argumentCount !== 1 || n.windowed || n.filtered) return;
|
|
1045
|
+
const a = e.slice(n.span.argumentStart, n.span.argumentEnd).trim();
|
|
1046
|
+
return n.distinct ? a.replace(/^DISTINCT\s*/i, "") : a;
|
|
1047
|
+
}
|
|
1048
|
+
function Zt(e) {
|
|
1058
1049
|
const n = [];
|
|
1059
1050
|
let a = 0;
|
|
1060
1051
|
for (; a < e.length; ) {
|
|
@@ -1098,8 +1089,8 @@ function Yt(e) {
|
|
|
1098
1089
|
}
|
|
1099
1090
|
return n;
|
|
1100
1091
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const n =
|
|
1092
|
+
function $t(e) {
|
|
1093
|
+
const n = Zt(e), a = n.some((o) => o.type === "op" && o.value === "/");
|
|
1103
1094
|
if (n.some((o) => o.type === "other"))
|
|
1104
1095
|
return { kind: "other", hasDivision: a };
|
|
1105
1096
|
let r = 0, s = !0;
|
|
@@ -1147,6 +1138,20 @@ function Ht(e) {
|
|
|
1147
1138
|
}, m = c();
|
|
1148
1139
|
return !m || r !== n.length ? { kind: "other", hasDivision: a } : m.units.length === 1 && m.degree === 1 && s && !a && n.filter((d) => d.type !== "open" && d.type !== "close").length === 1 ? { kind: "single", unit: m.units[0] } : s && m.degree === 1 ? { kind: "linear", units: m.units } : { kind: "other", hasDivision: a };
|
|
1149
1140
|
}
|
|
1141
|
+
const Yt = t.object({ key: t.string().min(1), nativeText: t.string().nullable() }).strict(), Ht = t.object({
|
|
1142
|
+
executionInstant: t.string().refine((e) => et(e) !== null, {
|
|
1143
|
+
message: "executionInstant must be an ISO instant"
|
|
1144
|
+
}),
|
|
1145
|
+
dataAnchors: t.array(Yt).default([])
|
|
1146
|
+
}).strict().refine(
|
|
1147
|
+
(e) => new Set(e.dataAnchors.map((n) => n.key)).size === e.dataAnchors.length,
|
|
1148
|
+
{ message: "dataAnchors keys must be unique", path: ["dataAnchors"] }
|
|
1149
|
+
);
|
|
1150
|
+
function Cn(e) {
|
|
1151
|
+
if (e == null) return;
|
|
1152
|
+
const n = Ht.safeParse(e);
|
|
1153
|
+
return n.success ? n.data : void 0;
|
|
1154
|
+
}
|
|
1150
1155
|
const Pe = /* @__PURE__ */ new Set([
|
|
1151
1156
|
"min",
|
|
1152
1157
|
"max",
|
|
@@ -1254,18 +1259,18 @@ function Q(e, n) {
|
|
|
1254
1259
|
const I = !g || o || r.nestedAggregate || l || m.some((u) => u.unresolved) || r.calls.length === 0 && m.length === 0, R = [
|
|
1255
1260
|
...r.calls.map((u) => ({ kind: u.kind, distinct: u.distinct })),
|
|
1256
1261
|
...m.flatMap((u) => u.calls)
|
|
1257
|
-
],
|
|
1262
|
+
], v = r.windowed || m.some((u) => u.windowed), x = !I && !v && R.every((u) => Pe.has(u.kind)), C = (u) => {
|
|
1258
1263
|
if (u.kind === "call") {
|
|
1259
1264
|
const w = r.calls[u.index];
|
|
1260
1265
|
return w ? je(w.kind) : { kind: "none", reason: "unresolved" };
|
|
1261
1266
|
}
|
|
1262
1267
|
const S = i.get(u.token);
|
|
1263
1268
|
return S && S !== "raw" ? S.reaggregation : { kind: "none", reason: "unresolved" };
|
|
1264
|
-
}, b =
|
|
1269
|
+
}, b = $t(r.skeleton);
|
|
1265
1270
|
let _, h, N = "numeric";
|
|
1266
1271
|
if (I)
|
|
1267
1272
|
_ = { kind: "none", reason: "unresolved" }, h = "unresolved";
|
|
1268
|
-
else if (
|
|
1273
|
+
else if (v)
|
|
1269
1274
|
_ = { kind: "none", reason: "window" }, h = "expression";
|
|
1270
1275
|
else if (b.kind === "single")
|
|
1271
1276
|
if (_ = C(b.unit), b.unit.kind === "call") {
|
|
@@ -1280,7 +1285,7 @@ function Q(e, n) {
|
|
|
1280
1285
|
{
|
|
1281
1286
|
stage: "aggregate",
|
|
1282
1287
|
calls: R,
|
|
1283
|
-
windowed:
|
|
1288
|
+
windowed: v,
|
|
1284
1289
|
repeatSafe: x,
|
|
1285
1290
|
reaggregation: _,
|
|
1286
1291
|
outputType: N,
|
|
@@ -1294,7 +1299,7 @@ function tn(e) {
|
|
|
1294
1299
|
const n = Q(e, 0);
|
|
1295
1300
|
return n === "row_input" ? Fe : n;
|
|
1296
1301
|
}
|
|
1297
|
-
function
|
|
1302
|
+
function Nn(e) {
|
|
1298
1303
|
const n = tt((e == null ? void 0 : e.dataType) || "number");
|
|
1299
1304
|
if (!e) return n;
|
|
1300
1305
|
const a = tn(e);
|
|
@@ -1307,7 +1312,7 @@ const nn = t.object({
|
|
|
1307
1312
|
runtimeFilters: G.innerType().shape.filters,
|
|
1308
1313
|
runtimeSorts: G.innerType().shape.sorts.optional()
|
|
1309
1314
|
});
|
|
1310
|
-
function
|
|
1315
|
+
function On(e) {
|
|
1311
1316
|
return an.parse(e);
|
|
1312
1317
|
}
|
|
1313
1318
|
const rn = {
|
|
@@ -1317,87 +1322,88 @@ const rn = {
|
|
|
1317
1322
|
resultShape: t.literal("matrix"),
|
|
1318
1323
|
result: Ie.optional(),
|
|
1319
1324
|
metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: H.optional() }).passthrough()
|
|
1320
|
-
}, sn =
|
|
1325
|
+
}, sn = ve.extend(rn), xn = sn.superRefine((e, n) => {
|
|
1321
1326
|
e.status === "failed" == !!e.result && n.addIssue({ code: "custom", message: "Only answered or partial Matrix execution carries a window." }), e.result && e.status === "partial" != e.result.window.failures.length > 0 && n.addIssue({ code: "custom", message: "Matrix execution status must match acquired window failures." });
|
|
1322
1327
|
});
|
|
1323
1328
|
export {
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1329
|
+
dt as $,
|
|
1330
|
+
kn as A,
|
|
1331
|
+
Tn as B,
|
|
1332
|
+
Ft as C,
|
|
1333
|
+
Lt as D,
|
|
1334
|
+
Dt as E,
|
|
1335
|
+
vn as F,
|
|
1336
|
+
Ut as G,
|
|
1337
|
+
qt as H,
|
|
1338
|
+
En as I,
|
|
1339
|
+
Ht as J,
|
|
1340
|
+
Cn as K,
|
|
1341
|
+
Bt as L,
|
|
1342
|
+
xe as M,
|
|
1343
|
+
Rn as N,
|
|
1344
|
+
$t as O,
|
|
1345
|
+
tn as P,
|
|
1346
|
+
Nn as Q,
|
|
1347
|
+
pe as R,
|
|
1343
1348
|
Y as S,
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1349
|
+
st as T,
|
|
1350
|
+
ot as U,
|
|
1351
|
+
un as V,
|
|
1352
|
+
dn as W,
|
|
1353
|
+
ct as X,
|
|
1354
|
+
mn as Y,
|
|
1355
|
+
ut as Z,
|
|
1356
|
+
te as _,
|
|
1357
|
+
wt as a,
|
|
1358
|
+
he as a0,
|
|
1359
|
+
pn as a1,
|
|
1360
|
+
mt as a2,
|
|
1361
|
+
pt as a3,
|
|
1362
|
+
ht as a4,
|
|
1363
|
+
ne as a5,
|
|
1364
|
+
H as a6,
|
|
1365
|
+
ft as a7,
|
|
1366
|
+
be as a8,
|
|
1367
|
+
gt as a9,
|
|
1368
|
+
hn as aa,
|
|
1369
|
+
fn as ab,
|
|
1370
|
+
yt as ac,
|
|
1371
|
+
St as ad,
|
|
1372
|
+
bt as ae,
|
|
1373
|
+
gn as af,
|
|
1374
|
+
yn as ag,
|
|
1375
|
+
At as ah,
|
|
1376
|
+
It as ai,
|
|
1377
|
+
ae as aj,
|
|
1378
|
+
_t as ak,
|
|
1379
|
+
Sn as al,
|
|
1380
|
+
an as am,
|
|
1376
1381
|
On as an,
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1382
|
+
xn as ao,
|
|
1383
|
+
nn as ap,
|
|
1384
|
+
kt as b,
|
|
1385
|
+
we as c,
|
|
1386
|
+
ke as d,
|
|
1381
1387
|
Te as e,
|
|
1382
|
-
|
|
1388
|
+
ve as f,
|
|
1383
1389
|
bn as g,
|
|
1384
|
-
|
|
1390
|
+
Tt as h,
|
|
1385
1391
|
Nt as i,
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1392
|
+
Et as j,
|
|
1393
|
+
Rt as k,
|
|
1394
|
+
Ee as l,
|
|
1389
1395
|
Ie as m,
|
|
1390
|
-
|
|
1391
|
-
|
|
1396
|
+
Re as n,
|
|
1397
|
+
In as o,
|
|
1392
1398
|
An as p,
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1399
|
+
Ot as q,
|
|
1400
|
+
_n as r,
|
|
1401
|
+
W as s,
|
|
1396
1402
|
Ce as t,
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
+
Ne as u,
|
|
1404
|
+
xt as v,
|
|
1405
|
+
se as w,
|
|
1406
|
+
z as x,
|
|
1407
|
+
oe as y,
|
|
1408
|
+
wn as z
|
|
1403
1409
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as d, a as g, b as k } from "./analytics-base-schemas-BaIQrEzX.js";
|
|
2
|
-
import { p as C } from "./validators-
|
|
2
|
+
import { p as C } from "./validators-CJ8Jh0E8.js";
|
|
3
3
|
function N(e) {
|
|
4
4
|
switch (e.kind) {
|
|
5
5
|
case "monthDay":
|
|
@@ -528,7 +528,7 @@ function j(e) {
|
|
|
528
528
|
export {
|
|
529
529
|
I as C,
|
|
530
530
|
$ as D,
|
|
531
|
-
|
|
531
|
+
P as a,
|
|
532
532
|
B as b,
|
|
533
533
|
_ as c,
|
|
534
534
|
R as d,
|
|
@@ -539,7 +539,7 @@ export {
|
|
|
539
539
|
j as i,
|
|
540
540
|
f as j,
|
|
541
541
|
A as k,
|
|
542
|
-
|
|
542
|
+
N as r,
|
|
543
543
|
y as v,
|
|
544
544
|
O as w
|
|
545
545
|
};
|
package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-CdeTU96P.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var c = (e, r, t) => r in e ? d(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
3
|
var i = (e, r, t) => c(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
|
-
import { f } from "./pivot-result-contract-expectations-
|
|
4
|
+
import { f } from "./pivot-result-contract-expectations-Bx_BCu-7.js";
|
|
5
5
|
class v extends Error {
|
|
6
6
|
constructor(t, a) {
|
|
7
7
|
super(`${t}: ${a}`);
|