react-semaphor 0.1.541 → 0.1.542
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 +75 -75
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.js +51 -49
- package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
- package/dist/chunks/{assistant-chat-D1fDZD6O.js → assistant-chat-oHF5lTjA.js} +12 -12
- package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
- package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
- package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
- package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
- package/dist/chunks/{dashboard-briefing-launcher-DwjFpewq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
- package/dist/chunks/{dashboard-controls-C_BI28ME.js → dashboard-controls-CIn22Qgp.js} +69 -70
- package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
- package/dist/chunks/{dashboard-json-DDY15Trn.js → dashboard-json-ZUYsIExq.js} +4 -4
- package/dist/chunks/{dashboard-B6IrON_Q.js → dashboard-s5WJBcK8.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-DP_Op5mu.js → document-dashboard-inputs-C6MJVyoI.js} +2382 -4975
- package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
- package/dist/chunks/{edit-dashboard-visual-CH2dzWW-.js → edit-dashboard-visual-DLdereA7.js} +728 -728
- package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
- package/dist/chunks/{index-DaQlghLY.js → index-CV5rHq5D.js} +824 -1351
- package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
- package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
- package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
- package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
- package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
- package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
- package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
- package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
- package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
- package/dist/chunks/{report-preferences-dialog-DpNkFfQO.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
- package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CJ2WpoMF.js → saved-dashboard-context-DjPqgFly.js} +233 -206
- package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-KT598QJq.js → semaphor-ready-indicator-BWSpRsPj.js} +37489 -39476
- package/dist/chunks/{shelf-drop-preview-context-BxV3Fl8h.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
- package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
- package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
- package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
- package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
- package/dist/chunks/table-settings-CLZocegs.js +501 -0
- package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
- package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DdD12SMY.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
- package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +462 -457
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +9 -9
- package/dist/format-utils/index.js +346 -241
- package/dist/index.js +174 -175
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +17 -1
- package/dist/types/briefings/index.d.ts +5 -3
- package/dist/types/index.js +48 -48
- package/dist/types/lib/api/exports-api.d.ts +11 -65
- package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
- package/dist/types/lib/types/explorer-types.d.ts +6 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
- package/dist/types/shared/assistant-context/index.d.ts +1 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
- package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
- package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
- package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
- package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
- package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
- package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
- package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
- package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
- package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
- package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
- package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
- package/package.json +2 -1
- package/dist/chunks/aggregate-table-row-presentation-B_vQjYR3.js +0 -996
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
- package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
- package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
- package/dist/chunks/common-types-CUf03Htv.js +0 -288
- package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
- package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
- package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
- package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
- package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
- package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import { z as je, E as Fe, F as Le, I as Ue, J as qe, s as U, x as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
2
|
+
import { z as je, E as Fe, F as Le, I as Ue, J as qe, s as U, x as Z, n as De, C as Me, D as ce, f as Be, r as Ge, y as ze, m as Ve, o as We, t as le, u as Xe } from "./analytics-base-schemas-BFAoRlkU.js";
|
|
3
|
+
import { X as k, Q as ue, a0 as G, aH as ee, w as b, Y as Ke, aA as $, aI as Ze, R as $e, s as Ye, q as de, z as He, v as Qe, m as Je } from "./validators-DMHTpf7a.js";
|
|
4
|
+
const Y = {
|
|
5
5
|
answerSummary: "string",
|
|
6
6
|
responseDetail: "responseDetail",
|
|
7
7
|
mode: "string",
|
|
@@ -214,34 +214,34 @@ const it = t.object({
|
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
).size > 1 && f(n, ["members"], "One page must contain one child level."), v(
|
|
217
|
-
e.members.map((r) =>
|
|
217
|
+
e.members.map((r) => b(r.path)),
|
|
218
218
|
n,
|
|
219
219
|
["members"]
|
|
220
220
|
);
|
|
221
221
|
for (const r of e.members)
|
|
222
|
-
(r.path.length !== e.parent.length + 1 ||
|
|
222
|
+
(r.path.length !== e.parent.length + 1 || b(r.path.slice(0, -1)) !== b(e.parent)) && f(n, ["members"], "Page members must be immediate children.");
|
|
223
223
|
}), he = t.object({
|
|
224
224
|
rowPaths: t.array(k).readonly(),
|
|
225
225
|
columnPaths: t.array(k).readonly(),
|
|
226
226
|
measureIds: t.array(O).readonly()
|
|
227
227
|
}).strict();
|
|
228
228
|
function fe(e, n) {
|
|
229
|
-
const a = e.rowPaths.map(
|
|
229
|
+
const a = e.rowPaths.map(b), r = e.columnPaths.map(b);
|
|
230
230
|
return v(a, n, ["coverage", "rowPaths"]), v(r, n, ["coverage", "columnPaths"]), v(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
|
|
231
231
|
}
|
|
232
232
|
const ut = t.object({
|
|
233
233
|
requestId: y,
|
|
234
234
|
coverage: he,
|
|
235
235
|
cells: t.array(
|
|
236
|
-
|
|
236
|
+
Ke.extend({ value: $ }).strict()
|
|
237
237
|
).readonly()
|
|
238
238
|
}).strict().superRefine((e, n) => {
|
|
239
239
|
const { rows: a, columns: r } = fe(e.coverage, n), s = new Set(a), c = new Set(r), i = new Set(e.coverage.measureIds);
|
|
240
240
|
v(
|
|
241
241
|
e.cells.map(
|
|
242
242
|
(l) => JSON.stringify([
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
b(l.rowPath),
|
|
244
|
+
b(l.columnPath),
|
|
245
245
|
l.measureId
|
|
246
246
|
])
|
|
247
247
|
),
|
|
@@ -249,7 +249,7 @@ const ut = t.object({
|
|
|
249
249
|
["cells"]
|
|
250
250
|
);
|
|
251
251
|
for (const l of e.cells)
|
|
252
|
-
(!s.has(
|
|
252
|
+
(!s.has(b(l.rowPath)) || !c.has(b(l.columnPath)) || !i.has(l.measureId)) && f(n, ["cells"], "Cell is outside certified coverage.");
|
|
253
253
|
}), q = t.number().int().nonnegative(), dt = t.object({
|
|
254
254
|
requestId: y,
|
|
255
255
|
coverage: he,
|
|
@@ -271,11 +271,11 @@ const ut = t.object({
|
|
|
271
271
|
id: O,
|
|
272
272
|
column: je,
|
|
273
273
|
nativeDataType: y,
|
|
274
|
-
semanticFormat:
|
|
274
|
+
semanticFormat: Ze.optional()
|
|
275
275
|
}).strict(), ge = t.object({
|
|
276
276
|
levels: t.array(ne).readonly(),
|
|
277
277
|
measures: t.array(ne).readonly()
|
|
278
|
-
}).strict(),
|
|
278
|
+
}).strict(), H = t.object({
|
|
279
279
|
code: t.enum(st),
|
|
280
280
|
message: y,
|
|
281
281
|
/** Technical cause for dashboard owners; never shown as the primary copy. */
|
|
@@ -299,7 +299,7 @@ function ye(e) {
|
|
|
299
299
|
capabilities: mt,
|
|
300
300
|
pages: t.array(lt).readonly(),
|
|
301
301
|
blocks: t.array(e).readonly(),
|
|
302
|
-
failures: t.array(
|
|
302
|
+
failures: t.array(H).readonly()
|
|
303
303
|
}).strict().superRefine((n, a) => {
|
|
304
304
|
const r = new Set(
|
|
305
305
|
n.descriptors.levels.map((i) => i.id)
|
|
@@ -360,13 +360,13 @@ const Se = ye(
|
|
|
360
360
|
), pt = ye(
|
|
361
361
|
dt
|
|
362
362
|
);
|
|
363
|
-
function
|
|
363
|
+
function Ae(e) {
|
|
364
364
|
return t.union([
|
|
365
365
|
t.object({
|
|
366
366
|
status: t.enum(["success", "partial"]),
|
|
367
367
|
window: e
|
|
368
368
|
}).strict(),
|
|
369
|
-
t.object({ status: t.literal("failed"), failure:
|
|
369
|
+
t.object({ status: t.literal("failed"), failure: H }).strict()
|
|
370
370
|
]).superRefine((n, a) => {
|
|
371
371
|
const r = n;
|
|
372
372
|
if (r.status === "failed") return;
|
|
@@ -378,18 +378,18 @@ function be(e) {
|
|
|
378
378
|
), r.status === "success" != (s.failures.length === 0) && f(a, ["status"], "Status must match failure coverage.");
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
const un =
|
|
381
|
+
const un = Ae(
|
|
382
382
|
Se
|
|
383
|
-
), dn =
|
|
383
|
+
), dn = Ae(
|
|
384
384
|
pt
|
|
385
385
|
);
|
|
386
386
|
function ht(e) {
|
|
387
|
-
const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage, s = (m) => new Map(m.map((o, d) => [o, d])), c = s(n.map(
|
|
387
|
+
const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage, s = (m) => new Map(m.map((o, d) => [o, d])), c = s(n.map(b)), i = s(a.map(b)), l = s(r);
|
|
388
388
|
return {
|
|
389
389
|
requestId: e.requestId,
|
|
390
390
|
coverage: e.coverage,
|
|
391
391
|
values: e.cells.map((m) => {
|
|
392
|
-
const o = c.get(
|
|
392
|
+
const o = c.get(b(m.rowPath)), d = i.get(b(m.columnPath)), p = l.get(m.measureId);
|
|
393
393
|
if (o === void 0 || d === void 0 || p === void 0)
|
|
394
394
|
throw new Error("Cell is outside certified coverage.");
|
|
395
395
|
return [o, d, p, m.value];
|
|
@@ -418,7 +418,7 @@ function mn(e) {
|
|
|
418
418
|
function pn(e) {
|
|
419
419
|
return e.status === "failed" ? e : { status: e.status, window: gt(e.window) };
|
|
420
420
|
}
|
|
421
|
-
const
|
|
421
|
+
const be = t.object({
|
|
422
422
|
kind: t.literal("matrix"),
|
|
423
423
|
window: Se
|
|
424
424
|
}).strict(), Ie = t.enum(["member", "subtotal", "grand_total"]), yt = t.discriminatedUnion("kind", [
|
|
@@ -442,7 +442,7 @@ const Ae = t.object({
|
|
|
442
442
|
)
|
|
443
443
|
}).strict(),
|
|
444
444
|
t.object({ kind: t.enum(["null", "empty"]) }).strict()
|
|
445
|
-
]),
|
|
445
|
+
]), At = t.discriminatedUnion("kind", [
|
|
446
446
|
t.object({
|
|
447
447
|
kind: t.literal("layout"),
|
|
448
448
|
rowPath: k,
|
|
@@ -463,15 +463,15 @@ const Ae = t.object({
|
|
|
463
463
|
}).strict(),
|
|
464
464
|
t.object({
|
|
465
465
|
kind: t.literal("rows"),
|
|
466
|
-
rows: t.array(
|
|
466
|
+
rows: t.array(At).readonly(),
|
|
467
467
|
next: y.nullable()
|
|
468
468
|
}).strict()
|
|
469
|
-
]),
|
|
469
|
+
]), bt = t.union([
|
|
470
470
|
Fe,
|
|
471
471
|
Le,
|
|
472
472
|
Ue,
|
|
473
473
|
qe,
|
|
474
|
-
|
|
474
|
+
be
|
|
475
475
|
]), It = t.object({
|
|
476
476
|
status: t.enum([
|
|
477
477
|
"not_required",
|
|
@@ -516,7 +516,7 @@ const Ae = t.object({
|
|
|
516
516
|
queryId: t.string().optional(),
|
|
517
517
|
summary: t.string(),
|
|
518
518
|
evidenceIds: t.array(t.string()).optional(),
|
|
519
|
-
fieldsUsed: t.array(
|
|
519
|
+
fieldsUsed: t.array(Z).optional()
|
|
520
520
|
}).passthrough()
|
|
521
521
|
),
|
|
522
522
|
blocked: t.array(
|
|
@@ -563,8 +563,8 @@ const Ae = t.object({
|
|
|
563
563
|
]).optional(),
|
|
564
564
|
intent: t.unknown().optional(),
|
|
565
565
|
compiledQuery: t.unknown().optional(),
|
|
566
|
-
fieldsUsed: t.array(
|
|
567
|
-
result:
|
|
566
|
+
fieldsUsed: t.array(Z).optional(),
|
|
567
|
+
result: bt.optional(),
|
|
568
568
|
validation: ce,
|
|
569
569
|
coverage: ke.optional(),
|
|
570
570
|
missingFields: t.array(t.string()).optional(),
|
|
@@ -585,7 +585,7 @@ function wt(e) {
|
|
|
585
585
|
case "diagnosticFeedback":
|
|
586
586
|
return _e.optional();
|
|
587
587
|
case "executionFieldArray":
|
|
588
|
-
return t.array(
|
|
588
|
+
return t.array(Z).optional();
|
|
589
589
|
case "executionResult":
|
|
590
590
|
return _t.optional();
|
|
591
591
|
case "number":
|
|
@@ -611,15 +611,15 @@ function wt(e) {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
const kt = Object.fromEntries(
|
|
614
|
-
Object.entries(
|
|
614
|
+
Object.entries(Y).map(
|
|
615
615
|
([e, n]) => [e, wt(n)]
|
|
616
616
|
)
|
|
617
617
|
), vt = t.object(kt).strict(), Tt = new Set(
|
|
618
|
-
Object.keys(
|
|
618
|
+
Object.keys(Y)
|
|
619
619
|
);
|
|
620
620
|
function fn() {
|
|
621
621
|
return Object.keys(
|
|
622
|
-
|
|
622
|
+
Y
|
|
623
623
|
);
|
|
624
624
|
}
|
|
625
625
|
function Rt(e) {
|
|
@@ -641,7 +641,7 @@ const Te = 100, F = "selection:";
|
|
|
641
641
|
function Re(e) {
|
|
642
642
|
return [
|
|
643
643
|
de(e.source),
|
|
644
|
-
|
|
644
|
+
He(e.name),
|
|
645
645
|
e.sourceField ?? ""
|
|
646
646
|
].join("::");
|
|
647
647
|
}
|
|
@@ -689,7 +689,7 @@ function oe(e) {
|
|
|
689
689
|
e.conditions.map(z).sort()
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function An(e) {
|
|
693
693
|
const n = e.map((a) => a.id);
|
|
694
694
|
if (new Set(n).size !== n.length)
|
|
695
695
|
throw new Error("Data App selections require one active selection per id.");
|
|
@@ -714,7 +714,7 @@ function bn(e) {
|
|
|
714
714
|
function D(e, n) {
|
|
715
715
|
return e < n ? -1 : e > n ? 1 : 0;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function bn(e, n) {
|
|
718
718
|
return se(e) === se(n);
|
|
719
719
|
}
|
|
720
720
|
const Nt = "(Blank)";
|
|
@@ -771,7 +771,7 @@ const Ot = t.union([
|
|
|
771
771
|
for (let a = 0; a < e.conditions.length; a += 1) {
|
|
772
772
|
const r = e.conditions[a];
|
|
773
773
|
e.conditions.findIndex(
|
|
774
|
-
(c, i) => i < a &&
|
|
774
|
+
(c, i) => i < a && Ye(c.field, r.field)
|
|
775
775
|
) !== -1 && n.addIssue({
|
|
776
776
|
code: t.ZodIssueCode.custom,
|
|
777
777
|
message: "A selection tuple can contain only one condition per field.",
|
|
@@ -954,7 +954,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
954
954
|
e[h] === "'" || e[h] === '"' ? h = V(e, h) - 1 : e[h] === "(" ? h = P(e, h) - 1 : e[h] === "," && x++;
|
|
955
955
|
const C = /^\s*DISTINCT\b/i.test(T);
|
|
956
956
|
W(C ? T.replace(/^\s*DISTINCT\b/i, "") : T).calls.length > 0 && (s = !0);
|
|
957
|
-
let
|
|
957
|
+
let A = !1, _ = !1;
|
|
958
958
|
for (; ; ) {
|
|
959
959
|
const h = j(e, g);
|
|
960
960
|
if (!ie.test(e[h] || "")) break;
|
|
@@ -967,7 +967,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
if ((R === "FILTER" || R === "OVER") && e[u] === "(") {
|
|
970
|
-
|
|
970
|
+
A = A || R === "OVER", _ = _ || R === "FILTER", g = P(e, u);
|
|
971
971
|
continue;
|
|
972
972
|
}
|
|
973
973
|
break;
|
|
@@ -976,7 +976,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
|
|
|
976
976
|
name: d.toUpperCase(),
|
|
977
977
|
kind: Ne(d, C),
|
|
978
978
|
distinct: C,
|
|
979
|
-
windowed:
|
|
979
|
+
windowed: A,
|
|
980
980
|
tokens: Wt(e.slice(p, g)),
|
|
981
981
|
span: { start: l, end: E, argumentStart: p + 1, argumentEnd: I },
|
|
982
982
|
argumentCount: x,
|
|
@@ -1043,7 +1043,7 @@ function Xt(e, n) {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
return i() && s === a.length;
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function Kt(e) {
|
|
1047
1047
|
const n = [];
|
|
1048
1048
|
let a = 0;
|
|
1049
1049
|
for (; a < e.length; ) {
|
|
@@ -1087,8 +1087,8 @@ function Zt(e) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
return n;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
const n =
|
|
1090
|
+
function Zt(e) {
|
|
1091
|
+
const n = Kt(e), a = n.some((o) => o.type === "op" && o.value === "/");
|
|
1092
1092
|
if (n.some((o) => o.type === "other"))
|
|
1093
1093
|
return { kind: "other", hasDivision: a };
|
|
1094
1094
|
let r = 0, s = !0;
|
|
@@ -1178,7 +1178,7 @@ const Q = {
|
|
|
1178
1178
|
identity: "unresolved",
|
|
1179
1179
|
unresolved: !0
|
|
1180
1180
|
}, Pe = { ...Q, stage: "row" };
|
|
1181
|
-
function
|
|
1181
|
+
function K(e) {
|
|
1182
1182
|
return {
|
|
1183
1183
|
stage: "row",
|
|
1184
1184
|
outer: e,
|
|
@@ -1196,23 +1196,23 @@ function B(e, n) {
|
|
|
1196
1196
|
const a = (r = n.derivedField) == null ? void 0 : r.aggregationBehavior;
|
|
1197
1197
|
return !a || e.unresolved ? e : a === "additive" ? e.reaggregation.kind === "additive" ? e : { ...e, reaggregation: { kind: "additive" } } : { ...e, reaggregation: { kind: "none", reason: "declared" } };
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Yt(e, n) {
|
|
1200
1200
|
if (!e) return Q;
|
|
1201
1201
|
if (typeof e.expression == "string" && e.expression.trim()) {
|
|
1202
1202
|
const r = J(e, n + 1);
|
|
1203
1203
|
return r === "row_input" ? "raw" : r.unresolved || r.stage === "aggregate" || r.outer ? r : "raw";
|
|
1204
1204
|
}
|
|
1205
1205
|
const a = X(e.aggregate);
|
|
1206
|
-
return a ?
|
|
1206
|
+
return a ? K(a) : "raw";
|
|
1207
1207
|
}
|
|
1208
|
-
const
|
|
1208
|
+
const Ht = 12;
|
|
1209
1209
|
function J(e, n) {
|
|
1210
1210
|
var R;
|
|
1211
|
-
if (n >
|
|
1211
|
+
if (n > Ht) return Q;
|
|
1212
1212
|
const a = typeof e.expression == "string" ? e.expression.trim() : "";
|
|
1213
1213
|
if (!a)
|
|
1214
1214
|
return B(
|
|
1215
|
-
|
|
1215
|
+
K(X(e.aggregate) ?? "sum"),
|
|
1216
1216
|
e
|
|
1217
1217
|
);
|
|
1218
1218
|
const r = W(a), s = ((R = e.calculatedFormula) == null ? void 0 : R.inputFields) || [], c = (u) => {
|
|
@@ -1220,7 +1220,7 @@ function J(e, n) {
|
|
|
1220
1220
|
return S ? s[Number(S[1])] : void 0;
|
|
1221
1221
|
}, i = /* @__PURE__ */ new Map();
|
|
1222
1222
|
for (const u of r.tokensOutsideAggregates)
|
|
1223
|
-
i.has(u) || i.set(u,
|
|
1223
|
+
i.has(u) || i.set(u, Yt(c(u), n));
|
|
1224
1224
|
const l = r.calls.some(
|
|
1225
1225
|
(u) => u.tokens.some((S) => {
|
|
1226
1226
|
const w = c(S);
|
|
@@ -1238,7 +1238,7 @@ function J(e, n) {
|
|
|
1238
1238
|
if (!d) {
|
|
1239
1239
|
if (!g) return Pe;
|
|
1240
1240
|
const u = X(e.aggregate);
|
|
1241
|
-
return u ? B(
|
|
1241
|
+
return u ? B(K(u), e) : "row_input";
|
|
1242
1242
|
}
|
|
1243
1243
|
const I = !g || o || r.nestedAggregate || l || m.some((u) => u.unresolved) || r.calls.length === 0 && m.length === 0, E = [
|
|
1244
1244
|
...r.calls.map((u) => ({ kind: u.kind, distinct: u.distinct })),
|
|
@@ -1250,21 +1250,21 @@ function J(e, n) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
const S = i.get(u.token);
|
|
1252
1252
|
return S && S !== "raw" ? S.reaggregation : { kind: "none", reason: "unresolved" };
|
|
1253
|
-
},
|
|
1253
|
+
}, A = Zt(r.skeleton);
|
|
1254
1254
|
let _, h, N = "numeric";
|
|
1255
1255
|
if (I)
|
|
1256
1256
|
_ = { kind: "none", reason: "unresolved" }, h = "unresolved";
|
|
1257
1257
|
else if (T)
|
|
1258
1258
|
_ = { kind: "none", reason: "window" }, h = "expression";
|
|
1259
|
-
else if (
|
|
1260
|
-
if (_ = C(
|
|
1261
|
-
const u = r.calls[
|
|
1259
|
+
else if (A.kind === "single")
|
|
1260
|
+
if (_ = C(A.unit), A.unit.kind === "call") {
|
|
1261
|
+
const u = r.calls[A.unit.index];
|
|
1262
1262
|
h = u.kind, (u.kind === "min" || u.kind === "max") && (N = "input");
|
|
1263
1263
|
} else {
|
|
1264
|
-
const u = i.get(
|
|
1264
|
+
const u = i.get(A.unit.token);
|
|
1265
1265
|
h = u.identity, N = u.outputType;
|
|
1266
1266
|
}
|
|
1267
|
-
else
|
|
1267
|
+
else A.kind === "linear" ? (_ = A.units.every((S) => C(S).kind === "additive") ? { kind: "additive" } : { kind: "none", reason: "other" }, h = "linear") : (_ = { kind: "none", reason: A.hasDivision ? "ratio" : "other" }, h = A.hasDivision ? "ratio" : "expression");
|
|
1268
1268
|
return B(
|
|
1269
1269
|
{
|
|
1270
1270
|
stage: "aggregate",
|
|
@@ -1298,15 +1298,15 @@ const en = {
|
|
|
1298
1298
|
compiledQuery: t.never().optional(),
|
|
1299
1299
|
intent: Qt.shape.intent,
|
|
1300
1300
|
resultShape: t.literal("matrix"),
|
|
1301
|
-
result:
|
|
1302
|
-
metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure:
|
|
1301
|
+
result: be.optional(),
|
|
1302
|
+
metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: H.optional() }).passthrough()
|
|
1303
1303
|
}, tn = ve.extend(en), Rn = tn.superRefine((e, n) => {
|
|
1304
1304
|
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." });
|
|
1305
1305
|
});
|
|
1306
1306
|
export {
|
|
1307
1307
|
lt as $,
|
|
1308
1308
|
oe as A,
|
|
1309
|
-
|
|
1309
|
+
bn as B,
|
|
1310
1310
|
In as C,
|
|
1311
1311
|
xt as D,
|
|
1312
1312
|
Pt as E,
|
|
@@ -1318,12 +1318,12 @@ export {
|
|
|
1318
1318
|
Mt as K,
|
|
1319
1319
|
Ne as L,
|
|
1320
1320
|
W as M,
|
|
1321
|
-
|
|
1321
|
+
Zt as N,
|
|
1322
1322
|
vn as O,
|
|
1323
1323
|
me as P,
|
|
1324
1324
|
nt as Q,
|
|
1325
1325
|
at as R,
|
|
1326
|
-
|
|
1326
|
+
Y as S,
|
|
1327
1327
|
sn as T,
|
|
1328
1328
|
on as U,
|
|
1329
1329
|
st as V,
|
|
@@ -1336,7 +1336,7 @@ export {
|
|
|
1336
1336
|
ut as a0,
|
|
1337
1337
|
dt as a1,
|
|
1338
1338
|
ne as a2,
|
|
1339
|
-
|
|
1339
|
+
H as a3,
|
|
1340
1340
|
mt as a4,
|
|
1341
1341
|
Se as a5,
|
|
1342
1342
|
pt as a6,
|
|
@@ -1350,15 +1350,15 @@ export {
|
|
|
1350
1350
|
yt as ae,
|
|
1351
1351
|
St as af,
|
|
1352
1352
|
ae as ag,
|
|
1353
|
-
|
|
1353
|
+
At as ah,
|
|
1354
1354
|
hn as ai,
|
|
1355
1355
|
Jt as aj,
|
|
1356
1356
|
Tn as ak,
|
|
1357
1357
|
Rn as al,
|
|
1358
1358
|
Qt as am,
|
|
1359
1359
|
Sn as b,
|
|
1360
|
-
|
|
1361
|
-
|
|
1360
|
+
An as c,
|
|
1361
|
+
bt as d,
|
|
1362
1362
|
It as e,
|
|
1363
1363
|
_e as f,
|
|
1364
1364
|
fn as g,
|
|
@@ -1371,7 +1371,7 @@ export {
|
|
|
1371
1371
|
kt as n,
|
|
1372
1372
|
vt as o,
|
|
1373
1373
|
gn as p,
|
|
1374
|
-
|
|
1374
|
+
be as q,
|
|
1375
1375
|
Te as r,
|
|
1376
1376
|
_n as s,
|
|
1377
1377
|
Re as t,
|