react-semaphor 0.1.475 → 0.1.476
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/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +20 -20
- package/dist/chunks/{dashboard-briefing-launcher-B6tm7M3_.cjs → dashboard-briefing-launcher-ZfuxdRN2.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BZOpMkdj.js → dashboard-briefing-launcher-eBsB9kr8.js} +5 -5
- package/dist/chunks/{dashboard-controls-CHn88-1Q.js → dashboard-controls-BX6p6z8a.js} +5 -5
- package/dist/chunks/{dashboard-controls-CyoY0IC_.cjs → dashboard-controls-DwjEc7sO.cjs} +1 -1
- package/dist/chunks/dashboard-filter-value-compatibility-BCVF9IHg.js +1026 -0
- package/dist/chunks/dashboard-filter-value-compatibility-DLkdeypb.cjs +1 -0
- package/dist/chunks/{dashboard-json-Dh3UKm8Y.js → dashboard-json-BfgitBXc.js} +3 -3
- package/dist/chunks/{dashboard-json-BOsyKwip.cjs → dashboard-json-CdwYFOsc.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DK--eIEf.cjs → edit-dashboard-visual-Cbougpzc.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BCz0oRoM.js → edit-dashboard-visual-D80DLF7C.js} +6 -6
- package/dist/chunks/{editor-action-buttons-D7JDG5pX.cjs → editor-action-buttons-BDRLfaW-.cjs} +1 -1
- package/dist/chunks/{editor-action-buttons-Dp-j9gS6.js → editor-action-buttons-DjsEDQok.js} +3 -3
- package/dist/chunks/index-CneWIz__.cjs +1404 -0
- package/dist/chunks/{index-DodDy3sE.js → index-D9S3j7_z.js} +532 -463
- package/dist/chunks/{index-Dw2nLjUn.js → index-Dv5hbC1r.js} +40766 -40484
- package/dist/chunks/index-v2MZLyus.cjs +4 -0
- package/dist/chunks/{pivot-header-presentation-BBiJU_57.js → pivot-header-presentation-CaERAWpl.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-BMyOXlXL.cjs → pivot-header-presentation-CePk1R6g.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-PxmbJWkm.js → pivot-result-lifecycle-B9FTybxN.js} +176 -165
- package/dist/chunks/pivot-result-lifecycle-CcGt_29N.cjs +1 -0
- package/dist/chunks/{report-preferences-dialog-Di8MmnqB.js → report-preferences-dialog-BXBlvW79.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-B9JUV3Gr.cjs → report-preferences-dialog-cSMJYqns.cjs} +1 -1
- package/dist/chunks/switch-B1mZx2k9.cjs +138 -0
- package/dist/chunks/{switch-D20CIzj6.js → switch-C8NihGV4.js} +3326 -3318
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +298 -287
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +61 -60
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings.d.ts +13 -1
- package/dist/types/dashboard-assistant.d.ts +2 -0
- package/dist/types/dashboard-authoring.d.ts +13 -1
- package/dist/types/dashboard.d.ts +19 -1
- package/dist/types/format-utils.d.ts +7 -0
- package/dist/types/main.d.ts +19 -1
- package/dist/types/shared.d.ts +13 -1
- package/dist/types/surfboard.d.ts +19 -1
- package/dist/types/types.d.ts +19 -1
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-value-compatibility-9W8Ckcle.js +0 -846
- package/dist/chunks/dashboard-filter-value-compatibility-Co1dn9Bc.cjs +0 -1
- package/dist/chunks/index-B4VxBoJg.cjs +0 -4
- package/dist/chunks/index-DpbiVs0_.cjs +0 -1404
- package/dist/chunks/pivot-result-lifecycle-DJgO2P0H.cjs +0 -1
- package/dist/chunks/switch-B4eH4guz.cjs +0 -138
package/dist/chunks/{pivot-result-lifecycle-PxmbJWkm.js → pivot-result-lifecycle-B9FTybxN.js}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var g = (e, t, r) =>
|
|
4
|
-
import { b as k, ao as G, r as
|
|
5
|
-
import { p as
|
|
1
|
+
var te = Object.defineProperty;
|
|
2
|
+
var re = (e, t, r) => t in e ? te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var g = (e, t, r) => re(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { b as k, ao as G, r as ae } from "./validators-D-T-2HOR.js";
|
|
5
|
+
import { p as ne } from "./raw-temporal-contract-U8J9RlEH.js";
|
|
6
6
|
import { canonicalizeSupportedLocale as E, canonicalizeSupportedCurrencyCode as $ } from "../value-format-preferences/index.js";
|
|
7
|
-
import { l as h, j as
|
|
8
|
-
import { f as
|
|
9
|
-
import { b as
|
|
7
|
+
import { l as h, j as ie, a as oe } from "./temporal-bucket-CtP7hKLa.js";
|
|
8
|
+
import { f as se } from "./index-CACdoqu3.js";
|
|
9
|
+
import { b as ce } from "./report-runtime-context-DNbgCsko.js";
|
|
10
10
|
import "./analyze-result-contract-C8s8EUL5.js";
|
|
11
|
-
import { a as
|
|
12
|
-
import { d as
|
|
13
|
-
function
|
|
11
|
+
import { a as me } from "./temporal-bucket-contract-CZl5D7FZ.js";
|
|
12
|
+
import { d as le, P as ue } from "./pivot-result-identity-CIZXsI53.js";
|
|
13
|
+
function K(e) {
|
|
14
14
|
if (!e) return !1;
|
|
15
15
|
const t = e.toLowerCase().replace("_", "-");
|
|
16
16
|
return t === "en-in" || t.startsWith("en-in-");
|
|
17
17
|
}
|
|
18
18
|
function z(e, t) {
|
|
19
19
|
const r = Math.abs(e);
|
|
20
|
-
return r >= 1e12 ? { divisor: 1e12, suffix: "T" } : r >= 1e9 ? { divisor: 1e9, suffix: "B" } :
|
|
20
|
+
return r >= 1e12 ? { divisor: 1e12, suffix: "T" } : r >= 1e9 ? { divisor: 1e9, suffix: "B" } : K(t) && r >= 1e7 ? { divisor: 1e7, suffix: "Cr" } : r >= 1e6 ? { divisor: 1e6, suffix: "M" } : K(t) && r >= 1e5 ? { divisor: 1e5, suffix: "L" } : r >= 1e3 ? { divisor: 1e3, suffix: "K" } : { divisor: 1, suffix: "" };
|
|
21
21
|
}
|
|
22
22
|
function D(e, t) {
|
|
23
23
|
try {
|
|
@@ -27,7 +27,7 @@ function D(e, t) {
|
|
|
27
27
|
return z(e, "en-US");
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function de(e) {
|
|
31
31
|
try {
|
|
32
32
|
return new Intl.NumberFormat(e), !0;
|
|
33
33
|
} catch {
|
|
@@ -35,7 +35,7 @@ function ue(e) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
function x(e) {
|
|
38
|
-
return e &&
|
|
38
|
+
return e && de(e) ? e : "en-US";
|
|
39
39
|
}
|
|
40
40
|
function A(e, t) {
|
|
41
41
|
if (e == null || isNaN(e))
|
|
@@ -120,7 +120,7 @@ function Z(e, t) {
|
|
|
120
120
|
maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2
|
|
121
121
|
}).format(e);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function fe(e, t) {
|
|
124
124
|
if (e == null || Number.isNaN(e))
|
|
125
125
|
return "";
|
|
126
126
|
const r = t.scale === void 0 ? e : e * t.scale, a = t.negativeStyle === "parentheses" && r < 0, n = a ? Math.abs(r) : r, i = {
|
|
@@ -151,14 +151,14 @@ function de(e, t) {
|
|
|
151
151
|
const s = `${t.prefix ?? ""}${o}${t.suffix ?? ""}`;
|
|
152
152
|
return a ? `(${s})` : s;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function ct(e, t, r = "en-US") {
|
|
155
155
|
if (e == null || isNaN(e))
|
|
156
156
|
return "";
|
|
157
157
|
const a = x((t == null ? void 0 : t.locale) || r), n = (t == null ? void 0 : t.style) || "decimal", i = n === "decimal" ? "number" : n;
|
|
158
158
|
return i === "currency" && new Intl.NumberFormat(a, {
|
|
159
159
|
style: "currency",
|
|
160
160
|
currency: (t == null ? void 0 : t.currency) || "USD"
|
|
161
|
-
}),
|
|
161
|
+
}), fe(e, {
|
|
162
162
|
type: i,
|
|
163
163
|
locale: a,
|
|
164
164
|
currency: i === "currency" ? (t == null ? void 0 : t.currency) || "USD" : void 0,
|
|
@@ -173,7 +173,7 @@ function st(e, t, r = "en-US") {
|
|
|
173
173
|
suffix: t == null ? void 0 : t.suffix
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function mt(e, t, r) {
|
|
177
177
|
const a = {
|
|
178
178
|
style: t === "currency" ? "currency" : t === "percent" ? "percent" : "decimal",
|
|
179
179
|
locale: r == null ? void 0 : r.locale,
|
|
@@ -197,7 +197,7 @@ function ct(e, t, r) {
|
|
|
197
197
|
return A(e, a);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const ye = [
|
|
201
201
|
"type",
|
|
202
202
|
"locale",
|
|
203
203
|
"minimumFractionDigits",
|
|
@@ -211,13 +211,13 @@ const fe = [
|
|
|
211
211
|
"currency",
|
|
212
212
|
"percentValueMode"
|
|
213
213
|
];
|
|
214
|
-
function
|
|
214
|
+
function he(e) {
|
|
215
215
|
if (!h(e))
|
|
216
216
|
return {
|
|
217
217
|
ok: !1,
|
|
218
218
|
issues: [{ path: "$", message: "Numeric format must be an object." }]
|
|
219
219
|
};
|
|
220
|
-
const t = [], r = new Set(
|
|
220
|
+
const t = [], r = new Set(ye);
|
|
221
221
|
Object.keys(e).filter((i) => !r.has(i)).forEach(
|
|
222
222
|
(i) => t.push({ path: i, message: `Unknown property "${i}".` })
|
|
223
223
|
), e.type !== "number" && e.type !== "currency" && e.type !== "percent" && e.type !== "scientific" && t.push({
|
|
@@ -274,8 +274,8 @@ function ye(e) {
|
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
const t =
|
|
277
|
+
function ge(e) {
|
|
278
|
+
const t = he(e);
|
|
279
279
|
if (!t.ok)
|
|
280
280
|
return t;
|
|
281
281
|
const r = [];
|
|
@@ -293,7 +293,7 @@ function he(e) {
|
|
|
293
293
|
message: "Resolved currency formats require an explicit currency."
|
|
294
294
|
}), r.length > 0 ? { ok: !1, issues: r } : t;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function lt(e) {
|
|
297
297
|
var a;
|
|
298
298
|
const t = /* @__PURE__ */ new Set();
|
|
299
299
|
if (e.snapshot.resolvedFormats.forEach((n, i) => {
|
|
@@ -330,7 +330,7 @@ function mt(e) {
|
|
|
330
330
|
`resolvedFormats is missing visible export column "${r}"`
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ve(e, t) {
|
|
334
334
|
const r = new Intl.NumberFormat(e, {
|
|
335
335
|
style: "currency",
|
|
336
336
|
currency: t
|
|
@@ -340,7 +340,7 @@ function ge(e, t) {
|
|
|
340
340
|
maximumFractionDigits: r.maximumFractionDigits
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function we(e) {
|
|
344
344
|
if (e.minimumFractionDigits !== void 0 || e.maximumFractionDigits !== void 0) {
|
|
345
345
|
const r = e.minimumFractionDigits ?? 0;
|
|
346
346
|
return {
|
|
@@ -354,15 +354,15 @@ function ve(e) {
|
|
|
354
354
|
maximumFractionDigits: t
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function ut(e, t, r) {
|
|
358
358
|
const a = E(e.locale) ?? t.locale, n = e.type === "number" || e.type === "currency" ? $(r) : void 0;
|
|
359
359
|
if (!(e.type === "currency" || n !== void 0))
|
|
360
360
|
return {
|
|
361
361
|
...e,
|
|
362
362
|
locale: a,
|
|
363
|
-
...
|
|
363
|
+
...we(e)
|
|
364
364
|
};
|
|
365
|
-
const o = n ?? $(e.currency) ?? t.defaultCurrency, s =
|
|
365
|
+
const o = n ?? $(e.currency) ?? t.defaultCurrency, s = ve(
|
|
366
366
|
a,
|
|
367
367
|
o
|
|
368
368
|
), m = s.minimumFractionDigits ?? 0, l = s.maximumFractionDigits ?? m, c = e.minimumFractionDigits ?? Math.min(
|
|
@@ -388,7 +388,7 @@ class p extends Error {
|
|
|
388
388
|
this.name = "RawTemporalFormatContractError", this.code = r;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const pe = [
|
|
392
392
|
"SSSSSSSSS",
|
|
393
393
|
"SSSSSSSS",
|
|
394
394
|
"SSSSSSS",
|
|
@@ -398,7 +398,7 @@ const we = [
|
|
|
398
398
|
"SSS",
|
|
399
399
|
"SS",
|
|
400
400
|
"S"
|
|
401
|
-
], H = /^(\d{4})-(\d{2})-(\d{2})$/, Y = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, X = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/,
|
|
401
|
+
], H = /^(\d{4})-(\d{2})-(\d{2})$/, Y = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, X = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/, xe = [
|
|
402
402
|
"yyyy",
|
|
403
403
|
"MMMM",
|
|
404
404
|
"LLLL",
|
|
@@ -420,7 +420,7 @@ const we = [
|
|
|
420
420
|
"m",
|
|
421
421
|
"s",
|
|
422
422
|
"a"
|
|
423
|
-
],
|
|
423
|
+
], Se = /* @__PURE__ */ new Set([
|
|
424
424
|
"HH",
|
|
425
425
|
"H",
|
|
426
426
|
"hh",
|
|
@@ -430,8 +430,8 @@ const we = [
|
|
|
430
430
|
"ss",
|
|
431
431
|
"s",
|
|
432
432
|
"a",
|
|
433
|
-
...
|
|
434
|
-
]),
|
|
433
|
+
...pe
|
|
434
|
+
]), be = /* @__PURE__ */ new Set(["zzz", "XXX"]), F = /* @__PURE__ */ new Set(["short", "medium", "long"]);
|
|
435
435
|
function v(e, t) {
|
|
436
436
|
return Object.keys(e).length === t.length && t.every((a) => a in e);
|
|
437
437
|
}
|
|
@@ -488,7 +488,7 @@ function W(e) {
|
|
|
488
488
|
}), a = o;
|
|
489
489
|
continue;
|
|
490
490
|
}
|
|
491
|
-
const n =
|
|
491
|
+
const n = xe.find(
|
|
492
492
|
(o) => e.startsWith(o, a)
|
|
493
493
|
);
|
|
494
494
|
if (n) {
|
|
@@ -512,7 +512,7 @@ function J(e, t) {
|
|
|
512
512
|
}
|
|
513
513
|
W(t);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Te(e) {
|
|
516
516
|
return !h(e) || !v(e, ["dateStyle", "dateTime"]) ? d("Automatic raw temporal styles are incomplete.") : F.has(e.dateStyle) ? !h(e.dateTime) || !v(e.dateTime, ["dateStyle", "timeStyle"]) || !F.has(e.dateTime.dateStyle) || !F.has(e.dateTime.timeStyle) ? d(
|
|
517
517
|
"Automatic dateTime styles are incomplete or invalid."
|
|
518
518
|
) : {
|
|
@@ -539,7 +539,7 @@ function R(e) {
|
|
|
539
539
|
...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
|
|
540
540
|
presentation: {
|
|
541
541
|
mode: "auto",
|
|
542
|
-
styles:
|
|
542
|
+
styles: Te(e.presentation.styles)
|
|
543
543
|
}
|
|
544
544
|
} : d(
|
|
545
545
|
"Automatic raw temporal presentation has unknown fields."
|
|
@@ -557,7 +557,7 @@ function R(e) {
|
|
|
557
557
|
}
|
|
558
558
|
}) : d("Raw temporal presentation must be an object.") : d("Raw temporal locale is invalid or unsupported.");
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function dt(e) {
|
|
561
561
|
var s, m, l;
|
|
562
562
|
if (e.format) {
|
|
563
563
|
if (!h(e.format))
|
|
@@ -608,7 +608,7 @@ function _e(e) {
|
|
|
608
608
|
if (X.test(e)) return "instant";
|
|
609
609
|
if (Y.test(e)) return "wall_datetime";
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function ft(e) {
|
|
612
612
|
const t = /* @__PURE__ */ new Set();
|
|
613
613
|
let r = !1;
|
|
614
614
|
for (const a of e.values) {
|
|
@@ -632,7 +632,7 @@ function dt(e) {
|
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function yt(e) {
|
|
636
636
|
return {
|
|
637
637
|
version: 1,
|
|
638
638
|
columns: Object.fromEntries(
|
|
@@ -643,7 +643,7 @@ function ft(e) {
|
|
|
643
643
|
)
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function ke(e) {
|
|
647
647
|
if (!h(e) || e.version !== 1 || !h(e.columns) || Object.keys(e).some((a) => a !== "version" && a !== "columns"))
|
|
648
648
|
throw new p(
|
|
649
649
|
"invalid_raw_temporal_format",
|
|
@@ -666,9 +666,9 @@ function Te(e) {
|
|
|
666
666
|
}
|
|
667
667
|
return { version: 1, columns: t };
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function ht(e) {
|
|
670
670
|
if (e.length === 0) return;
|
|
671
|
-
const t = e.map(
|
|
671
|
+
const t = e.map(ke), r = Object.keys(t[0].columns).sort();
|
|
672
672
|
for (let a = 1; a < t.length; a += 1) {
|
|
673
673
|
const n = Object.keys(t[a].columns).sort();
|
|
674
674
|
if (n.length !== r.length || n.some((i, o) => i !== r[o]))
|
|
@@ -688,16 +688,16 @@ function yt(e) {
|
|
|
688
688
|
`Declared SQL temporal column "${a}" has inconsistent semantics across export chunks. Normalize it to one kind.`
|
|
689
689
|
);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function Ie(e) {
|
|
692
692
|
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
return t === 2 ?
|
|
696
|
-
}
|
|
697
|
-
function Fe(e) {
|
|
698
|
-
return e.year >= 1 && e.year <= 9999 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Ie(e.year, e.month) && e.hour >= 0 && e.hour <= 23 && e.minute >= 0 && e.minute <= 59 && e.second >= 0 && e.second <= 59;
|
|
694
|
+
function Fe(e, t) {
|
|
695
|
+
return t === 2 ? Ie(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
|
|
699
696
|
}
|
|
700
697
|
function $e(e) {
|
|
698
|
+
return e.year >= 1 && e.year <= 9999 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Fe(e.year, e.month) && e.hour >= 0 && e.hour <= 23 && e.minute >= 0 && e.minute <= 59 && e.second >= 0 && e.second <= 59;
|
|
699
|
+
}
|
|
700
|
+
function De(e) {
|
|
701
701
|
return {
|
|
702
702
|
year: Number(e[1]),
|
|
703
703
|
month: Number(e[2]),
|
|
@@ -708,11 +708,11 @@ function $e(e) {
|
|
|
708
708
|
fraction: e[7] ?? ""
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Ce(e, t) {
|
|
712
712
|
const r = t === "date" ? e.match(H) : t === "wall_datetime" ? e.match(Y) : e.match(X);
|
|
713
713
|
if (!r) return { status: "invalid_shape" };
|
|
714
|
-
const a =
|
|
715
|
-
if (
|
|
714
|
+
const a = De(r);
|
|
715
|
+
if (!$e(a)) return { status: "out_of_range" };
|
|
716
716
|
if (t === "instant") {
|
|
717
717
|
const n = r[8];
|
|
718
718
|
if (n && n !== "Z") {
|
|
@@ -730,12 +730,12 @@ function C(e) {
|
|
|
730
730
|
}
|
|
731
731
|
function Q(e, t) {
|
|
732
732
|
const r = e.fraction ? `.${e.fraction.padEnd(3, "0").slice(0, 3)}` : "";
|
|
733
|
-
return
|
|
733
|
+
return se(
|
|
734
734
|
`${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}T${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${r}`,
|
|
735
735
|
t
|
|
736
736
|
);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Ee(e, t) {
|
|
739
739
|
const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
740
740
|
let n, i, o, s;
|
|
741
741
|
return {
|
|
@@ -752,14 +752,14 @@ function Ce(e, t) {
|
|
|
752
752
|
const y = `${l}:${c ? "standalone" : "contextual"}`;
|
|
753
753
|
let f = a.get(y);
|
|
754
754
|
if (!f) {
|
|
755
|
-
const
|
|
755
|
+
const T = {
|
|
756
756
|
calendar: "gregory",
|
|
757
757
|
timeZone: "UTC",
|
|
758
758
|
month: l
|
|
759
759
|
};
|
|
760
|
-
c || (
|
|
760
|
+
c || (T.day = "numeric"), f = new Intl.DateTimeFormat(e, T), a.set(y, f);
|
|
761
761
|
}
|
|
762
|
-
return ((b = f.formatToParts(m).find((
|
|
762
|
+
return ((b = f.formatToParts(m).find((T) => T.type === "month")) == null ? void 0 : b.value) ?? "";
|
|
763
763
|
},
|
|
764
764
|
dayPeriod(m) {
|
|
765
765
|
var l;
|
|
@@ -820,7 +820,7 @@ function Ce(e, t) {
|
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Ae(e, t, r, a, n) {
|
|
824
824
|
if (/^S{1,9}$/.test(e)) {
|
|
825
825
|
const i = t.fraction.padEnd(e.length, "0").slice(0, e.length);
|
|
826
826
|
return a.number(Number(i), e.length);
|
|
@@ -881,34 +881,44 @@ function Ee(e, t, r, a, n) {
|
|
|
881
881
|
);
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Re(e, t, r, a) {
|
|
885
885
|
const n = C(t);
|
|
886
886
|
return e.map(
|
|
887
|
-
(i) => i.kind === "literal" ? i.value :
|
|
887
|
+
(i) => i.kind === "literal" ? i.value : Ae(i.value, t, n, r, a)
|
|
888
888
|
).join("");
|
|
889
889
|
}
|
|
890
|
-
function
|
|
891
|
-
const
|
|
892
|
-
const
|
|
893
|
-
return
|
|
894
|
-
})(),
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
890
|
+
function ee(e, t, r) {
|
|
891
|
+
const a = t === "date_fns" ? W(r) : (() => {
|
|
892
|
+
const i = G(r);
|
|
893
|
+
return i.ok ? i.segments : d(i.message);
|
|
894
|
+
})(), n = a.filter((i) => i.kind === "token").map((i) => i.value);
|
|
895
|
+
return e === "date" && n.some((i) => Se.has(i)) ? d("Date patterns cannot contain time tokens.") : e !== "instant" && n.some((i) => be.has(i)) ? d("Timezone pattern tokens require an instant value.") : a;
|
|
896
|
+
}
|
|
897
|
+
function gt(e) {
|
|
898
|
+
ee(
|
|
899
|
+
e.valueKind ?? "instant",
|
|
900
|
+
e.dialect,
|
|
901
|
+
e.pattern
|
|
902
|
+
);
|
|
903
|
+
}
|
|
904
|
+
function Me(e, t, r, a) {
|
|
905
|
+
const n = ee(
|
|
906
|
+
e.valueKind,
|
|
907
|
+
r,
|
|
908
|
+
a
|
|
909
|
+
), i = Ee(t.locale, t.calendarTimezone);
|
|
910
|
+
return (o) => {
|
|
911
|
+
const s = e.valueKind === "wall_datetime" && t.sourceTimezone ? Q(o.fields, t.sourceTimezone) : void 0, m = e.valueKind === "instant" ? {
|
|
912
|
+
...i.instantFields(o.instant),
|
|
913
|
+
fraction: o.fields.fraction
|
|
914
|
+
} : s ? {
|
|
915
|
+
...i.instantFields(s),
|
|
916
|
+
fraction: o.fields.fraction
|
|
917
|
+
} : o.fields;
|
|
918
|
+
return Re(n, m, i, o.instant ?? s);
|
|
909
919
|
};
|
|
910
920
|
}
|
|
911
|
-
function
|
|
921
|
+
function Ne(e, t) {
|
|
912
922
|
const r = t.presentation.mode === "auto" ? t.presentation.styles : d("Automatic raw temporal formatting requires styles.");
|
|
913
923
|
if (e.valueKind === "date") {
|
|
914
924
|
const o = new Intl.DateTimeFormat(t.locale, {
|
|
@@ -937,7 +947,7 @@ function P(e, t, r) {
|
|
|
937
947
|
};
|
|
938
948
|
}
|
|
939
949
|
function Ke(e) {
|
|
940
|
-
const t =
|
|
950
|
+
const t = ne(e.metadata), r = R(e.format), a = r.presentation.mode === "auto" ? Ne(t, r) : Me(
|
|
941
951
|
t,
|
|
942
952
|
r,
|
|
943
953
|
r.presentation.dialect,
|
|
@@ -946,11 +956,11 @@ function Ke(e) {
|
|
|
946
956
|
return (n) => {
|
|
947
957
|
if (n === null)
|
|
948
958
|
return { ok: !0, text: "", status: "empty" };
|
|
949
|
-
const i =
|
|
959
|
+
const i = Ce(n, t.valueKind);
|
|
950
960
|
return i.status === "invalid_shape" ? P(n, t, "invalid_raw_temporal_value") : i.status === "out_of_range" ? P(n, t, "out_of_range_raw_temporal_value") : { ok: !0, text: a(i), status: "formatted" };
|
|
951
961
|
};
|
|
952
962
|
}
|
|
953
|
-
function
|
|
963
|
+
function vt(e) {
|
|
954
964
|
return Ke({
|
|
955
965
|
metadata: e.metadata,
|
|
956
966
|
format: e.format
|
|
@@ -966,7 +976,7 @@ class j extends Error {
|
|
|
966
976
|
this.name = "PresentationExecutionSnapshotError";
|
|
967
977
|
}
|
|
968
978
|
}
|
|
969
|
-
class
|
|
979
|
+
class wt extends Error {
|
|
970
980
|
constructor(r) {
|
|
971
981
|
super(
|
|
972
982
|
`missing_resolved_raw_temporal_format: Column "${r}" has no captured presentation. Resave this report before running it again.`
|
|
@@ -981,7 +991,7 @@ function S(e, t, r) {
|
|
|
981
991
|
if (n)
|
|
982
992
|
throw new Error(`${r} contains unknown property "${n}"`);
|
|
983
993
|
}
|
|
984
|
-
function
|
|
994
|
+
function ze(e, t = "scope") {
|
|
985
995
|
if (!h(e))
|
|
986
996
|
throw new Error(`${t} must be an object`);
|
|
987
997
|
S(
|
|
@@ -1014,7 +1024,7 @@ function w(e, t, r, a) {
|
|
|
1014
1024
|
throw new Error(`${a}.${r} is required`);
|
|
1015
1025
|
return n;
|
|
1016
1026
|
}
|
|
1017
|
-
function
|
|
1027
|
+
function Pe(e, t) {
|
|
1018
1028
|
if (!h(e))
|
|
1019
1029
|
throw new Error(`${t} must be an object`);
|
|
1020
1030
|
const r = w(e, "metric", "metricId", t);
|
|
@@ -1030,7 +1040,7 @@ function ze(e, t) {
|
|
|
1030
1040
|
if (n) return { kind: "matrix_measure", measureId: n };
|
|
1031
1041
|
throw new Error(`${t} is not a valid numeric presentation target`);
|
|
1032
1042
|
}
|
|
1033
|
-
function
|
|
1043
|
+
function je(e, t) {
|
|
1034
1044
|
if (!h(e))
|
|
1035
1045
|
throw new Error(`${t} must be an object`);
|
|
1036
1046
|
if (e.kind === "field") {
|
|
@@ -1058,7 +1068,7 @@ function Pe(e, t) {
|
|
|
1058
1068
|
if (a) return { kind: "matrix_axis", axisInstanceId: a };
|
|
1059
1069
|
throw new Error(`${t} is not a valid temporal bucket presentation target`);
|
|
1060
1070
|
}
|
|
1061
|
-
function
|
|
1071
|
+
function Oe(e, t) {
|
|
1062
1072
|
if (!h(e))
|
|
1063
1073
|
throw new Error(`${t} must be an object`);
|
|
1064
1074
|
const r = w(e, "column", "columnKey", t);
|
|
@@ -1066,7 +1076,7 @@ function je(e, t) {
|
|
|
1066
1076
|
throw new Error(`${t} must identify a column`);
|
|
1067
1077
|
return { kind: "column", columnKey: r };
|
|
1068
1078
|
}
|
|
1069
|
-
function
|
|
1079
|
+
function Le(e) {
|
|
1070
1080
|
return [
|
|
1071
1081
|
e.dashboardId,
|
|
1072
1082
|
e.cardId ?? null,
|
|
@@ -1090,11 +1100,11 @@ function I(e) {
|
|
|
1090
1100
|
function M(e, t) {
|
|
1091
1101
|
return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === t.attachmentIndex;
|
|
1092
1102
|
}
|
|
1093
|
-
function
|
|
1103
|
+
function N(e, t) {
|
|
1094
1104
|
const r = I(e), a = I(t);
|
|
1095
1105
|
return r.length === a.length && r.every((n, i) => n === a[i]);
|
|
1096
1106
|
}
|
|
1097
|
-
function
|
|
1107
|
+
function qe(e) {
|
|
1098
1108
|
if (!Array.isArray(e))
|
|
1099
1109
|
throw new Error("resolvedFormats must be an array");
|
|
1100
1110
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -1104,20 +1114,20 @@ function Le(e) {
|
|
|
1104
1114
|
if (!h(r))
|
|
1105
1115
|
throw new Error(`${n} must be an object`);
|
|
1106
1116
|
S(r, ["scope", "target", "format"], n);
|
|
1107
|
-
const i =
|
|
1117
|
+
const i = ze(r.scope, `${n}.scope`);
|
|
1108
1118
|
if (!h(r.format))
|
|
1109
1119
|
throw new Error(`${n}.format must be an object`);
|
|
1110
1120
|
let o;
|
|
1111
1121
|
switch (r.format.type) {
|
|
1112
1122
|
case "temporal_bucket": {
|
|
1113
|
-
const c =
|
|
1123
|
+
const c = ie(r.format);
|
|
1114
1124
|
if (!c.ok)
|
|
1115
1125
|
throw new Error(
|
|
1116
1126
|
`${n}.format is invalid: ${((m = c.issues[0]) == null ? void 0 : m.message) ?? "invalid value"}`
|
|
1117
1127
|
);
|
|
1118
1128
|
o = {
|
|
1119
1129
|
scope: i,
|
|
1120
|
-
target:
|
|
1130
|
+
target: je(r.target, `${n}.target`),
|
|
1121
1131
|
format: c.value
|
|
1122
1132
|
};
|
|
1123
1133
|
break;
|
|
@@ -1125,7 +1135,7 @@ function Le(e) {
|
|
|
1125
1135
|
case "raw_temporal":
|
|
1126
1136
|
o = {
|
|
1127
1137
|
scope: i,
|
|
1128
|
-
target:
|
|
1138
|
+
target: Oe(r.target, `${n}.target`),
|
|
1129
1139
|
format: R(r.format)
|
|
1130
1140
|
};
|
|
1131
1141
|
break;
|
|
@@ -1133,14 +1143,14 @@ function Le(e) {
|
|
|
1133
1143
|
case "currency":
|
|
1134
1144
|
case "percent":
|
|
1135
1145
|
case "scientific": {
|
|
1136
|
-
const c =
|
|
1146
|
+
const c = ge(r.format);
|
|
1137
1147
|
if (!c.ok)
|
|
1138
1148
|
throw new Error(
|
|
1139
1149
|
`${n}.format is invalid: ${((l = c.issues[0]) == null ? void 0 : l.message) ?? "invalid value"}`
|
|
1140
1150
|
);
|
|
1141
1151
|
o = {
|
|
1142
1152
|
scope: i,
|
|
1143
|
-
target:
|
|
1153
|
+
target: Pe(r.target, `${n}.target`),
|
|
1144
1154
|
format: c.value
|
|
1145
1155
|
};
|
|
1146
1156
|
break;
|
|
@@ -1149,7 +1159,7 @@ function Le(e) {
|
|
|
1149
1159
|
throw new Error(`${n}.format.type is unsupported`);
|
|
1150
1160
|
}
|
|
1151
1161
|
const s = JSON.stringify([
|
|
1152
|
-
...
|
|
1162
|
+
...Le(o.scope),
|
|
1153
1163
|
...I(o.target)
|
|
1154
1164
|
]);
|
|
1155
1165
|
if (t.has(s))
|
|
@@ -1159,7 +1169,7 @@ function Le(e) {
|
|
|
1159
1169
|
return t.add(s), o;
|
|
1160
1170
|
});
|
|
1161
1171
|
}
|
|
1162
|
-
function
|
|
1172
|
+
function Ve(e) {
|
|
1163
1173
|
try {
|
|
1164
1174
|
if (!h(e))
|
|
1165
1175
|
throw new Error("presentation execution snapshot must be an object");
|
|
@@ -1169,7 +1179,7 @@ function qe(e) {
|
|
|
1169
1179
|
"presentation execution snapshot"
|
|
1170
1180
|
), e.version !== 1)
|
|
1171
1181
|
throw new Error("presentation execution snapshot version must be 1");
|
|
1172
|
-
const t =
|
|
1182
|
+
const t = ce(e.reportContext);
|
|
1173
1183
|
if (!t.ok) {
|
|
1174
1184
|
const r = t.issues[0];
|
|
1175
1185
|
throw new Error(
|
|
@@ -1179,7 +1189,7 @@ function qe(e) {
|
|
|
1179
1189
|
return {
|
|
1180
1190
|
version: 1,
|
|
1181
1191
|
reportContext: t.value,
|
|
1182
|
-
resolvedFormats:
|
|
1192
|
+
resolvedFormats: qe(e.resolvedFormats)
|
|
1183
1193
|
};
|
|
1184
1194
|
} catch (t) {
|
|
1185
1195
|
throw t instanceof j ? t : new j(
|
|
@@ -1187,32 +1197,32 @@ function qe(e) {
|
|
|
1187
1197
|
);
|
|
1188
1198
|
}
|
|
1189
1199
|
}
|
|
1190
|
-
function
|
|
1191
|
-
return
|
|
1200
|
+
function pt(e) {
|
|
1201
|
+
return Ve({
|
|
1192
1202
|
version: 1,
|
|
1193
1203
|
reportContext: e.reportContext,
|
|
1194
1204
|
resolvedFormats: [...e.resolvedFormats]
|
|
1195
1205
|
});
|
|
1196
1206
|
}
|
|
1197
|
-
function
|
|
1207
|
+
function xt(e) {
|
|
1198
1208
|
const t = e.snapshot.resolvedFormats.find(
|
|
1199
|
-
(r) => r.format.type !== "temporal_bucket" && r.format.type !== "raw_temporal" && M(r.scope, e.scope) &&
|
|
1209
|
+
(r) => r.format.type !== "temporal_bucket" && r.format.type !== "raw_temporal" && M(r.scope, e.scope) && N(r.target, e.target)
|
|
1200
1210
|
);
|
|
1201
1211
|
return t == null ? void 0 : t.format;
|
|
1202
1212
|
}
|
|
1203
|
-
function
|
|
1213
|
+
function St(e) {
|
|
1204
1214
|
const t = e.snapshot.resolvedFormats.find(
|
|
1205
|
-
(r) => r.format.type === "raw_temporal" && M(r.scope, e.scope) &&
|
|
1215
|
+
(r) => r.format.type === "raw_temporal" && M(r.scope, e.scope) && N(r.target, e.target)
|
|
1206
1216
|
);
|
|
1207
1217
|
return t == null ? void 0 : t.format;
|
|
1208
1218
|
}
|
|
1209
|
-
function
|
|
1219
|
+
function bt(e) {
|
|
1210
1220
|
const t = e.snapshot.resolvedFormats.find(
|
|
1211
|
-
(r) => r.format.type === "temporal_bucket" && M(r.scope, e.scope) &&
|
|
1221
|
+
(r) => r.format.type === "temporal_bucket" && M(r.scope, e.scope) && N(r.target, e.target)
|
|
1212
1222
|
);
|
|
1213
1223
|
return t == null ? void 0 : t.format;
|
|
1214
1224
|
}
|
|
1215
|
-
function
|
|
1225
|
+
function Tt(e) {
|
|
1216
1226
|
var n;
|
|
1217
1227
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1218
1228
|
if (e.snapshot.resolvedFormats.forEach((i, o) => {
|
|
@@ -1253,7 +1263,7 @@ function St(e) {
|
|
|
1253
1263
|
`resolvedFormats is missing visible export column "${a}"`
|
|
1254
1264
|
);
|
|
1255
1265
|
}
|
|
1256
|
-
function
|
|
1266
|
+
function _(e) {
|
|
1257
1267
|
return Array.from(
|
|
1258
1268
|
new Set(
|
|
1259
1269
|
(e ?? []).flatMap(
|
|
@@ -1262,24 +1272,24 @@ function T(e) {
|
|
|
1262
1272
|
)
|
|
1263
1273
|
);
|
|
1264
1274
|
}
|
|
1265
|
-
function
|
|
1275
|
+
function Ge(e) {
|
|
1266
1276
|
const t = /* @__PURE__ */ new Map();
|
|
1267
1277
|
return e.forEach((r) => {
|
|
1268
1278
|
r.id && t.set(r.id, (t.get(r.id) ?? 0) + 1);
|
|
1269
1279
|
}), e.flatMap(
|
|
1270
|
-
(r) => r.id && (t.get(r.id) ?? 0) > 1 ? [
|
|
1280
|
+
(r) => r.id && (t.get(r.id) ?? 0) > 1 ? [oe(r)] : []
|
|
1271
1281
|
);
|
|
1272
1282
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const t = e.metricFields ?? [], r =
|
|
1283
|
+
function _t(e) {
|
|
1284
|
+
const t = e.metricFields ?? [], r = _(t);
|
|
1275
1285
|
return {
|
|
1276
1286
|
expectedRoleFieldIds: {
|
|
1277
|
-
groupby:
|
|
1278
|
-
metric: r.length > 0 ? r : [
|
|
1279
|
-
pivotby:
|
|
1280
|
-
detail:
|
|
1287
|
+
groupby: _(e.groupByFields),
|
|
1288
|
+
metric: r.length > 0 ? r : [ae],
|
|
1289
|
+
pivotby: _(e.pivotByFields),
|
|
1290
|
+
detail: _(e.detailFields)
|
|
1281
1291
|
},
|
|
1282
|
-
expectedMetricAliases:
|
|
1292
|
+
expectedMetricAliases: Ge(t)
|
|
1283
1293
|
};
|
|
1284
1294
|
}
|
|
1285
1295
|
class u extends Error {
|
|
@@ -1290,7 +1300,7 @@ class u extends Error {
|
|
|
1290
1300
|
this.cause = a, this.name = "PivotResultLifecycleError";
|
|
1291
1301
|
}
|
|
1292
1302
|
}
|
|
1293
|
-
function
|
|
1303
|
+
function Be(e) {
|
|
1294
1304
|
if (!Array.isArray(e) || e.some(
|
|
1295
1305
|
(r) => !r || typeof r != "object" || Array.isArray(r) || typeof r.key != "string" || !r.key || typeof r.name != "string" || typeof r.label != "string"
|
|
1296
1306
|
))
|
|
@@ -1303,7 +1313,7 @@ function Ge(e) {
|
|
|
1303
1313
|
"Canonical pivot column keys must be unique."
|
|
1304
1314
|
);
|
|
1305
1315
|
for (const r of t) {
|
|
1306
|
-
const a =
|
|
1316
|
+
const a = me(r, {
|
|
1307
1317
|
metadataRequired: !1
|
|
1308
1318
|
});
|
|
1309
1319
|
if (!a.ok)
|
|
@@ -1345,7 +1355,7 @@ function O(e) {
|
|
|
1345
1355
|
}
|
|
1346
1356
|
return t;
|
|
1347
1357
|
}
|
|
1348
|
-
function
|
|
1358
|
+
function Ue(e) {
|
|
1349
1359
|
if (e === void 0) return {};
|
|
1350
1360
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1351
1361
|
throw new u(
|
|
@@ -1371,7 +1381,7 @@ function L(e, t) {
|
|
|
1371
1381
|
);
|
|
1372
1382
|
return e;
|
|
1373
1383
|
}
|
|
1374
|
-
function
|
|
1384
|
+
function Ze(e, t) {
|
|
1375
1385
|
if (!e || typeof e != "object" || Array.isArray(e) || e.version !== 1)
|
|
1376
1386
|
throw new u(
|
|
1377
1387
|
"A canonical pivot result requires its versioned result contract."
|
|
@@ -1415,7 +1425,7 @@ function Ue(e, t) {
|
|
|
1415
1425
|
throw new u(
|
|
1416
1426
|
"Canonical pivot contract must classify every authoritative result column exactly once."
|
|
1417
1427
|
);
|
|
1418
|
-
const y =
|
|
1428
|
+
const y = Ue(
|
|
1419
1429
|
r.columnClassifications
|
|
1420
1430
|
);
|
|
1421
1431
|
if (Object.keys(y).some(
|
|
@@ -1452,7 +1462,7 @@ function q(e, t) {
|
|
|
1452
1462
|
"The metric-alias bindings do not match the authored metric instances."
|
|
1453
1463
|
);
|
|
1454
1464
|
}
|
|
1455
|
-
function
|
|
1465
|
+
function He(e) {
|
|
1456
1466
|
if (!Array.isArray(e) || e.some(
|
|
1457
1467
|
(t) => !t || typeof t != "object" || Array.isArray(t)
|
|
1458
1468
|
))
|
|
@@ -1461,7 +1471,7 @@ function Ze(e) {
|
|
|
1461
1471
|
);
|
|
1462
1472
|
return e;
|
|
1463
1473
|
}
|
|
1464
|
-
function
|
|
1474
|
+
function Ye(e, t) {
|
|
1465
1475
|
e.forEach((r, a) => {
|
|
1466
1476
|
t.forEach((n) => {
|
|
1467
1477
|
if (!Object.prototype.hasOwnProperty.call(r, n.key) || r[n.key] === void 0)
|
|
@@ -1471,7 +1481,7 @@ function He(e, t) {
|
|
|
1471
1481
|
});
|
|
1472
1482
|
});
|
|
1473
1483
|
}
|
|
1474
|
-
function
|
|
1484
|
+
function Xe(e, t, r) {
|
|
1475
1485
|
const a = new Set(t.map((n) => n.key));
|
|
1476
1486
|
["groupby", "detail"].forEach((n) => {
|
|
1477
1487
|
Object.entries(e.byRole[n] ?? {}).forEach(
|
|
@@ -1498,8 +1508,8 @@ function V(e, t) {
|
|
|
1498
1508
|
);
|
|
1499
1509
|
});
|
|
1500
1510
|
}
|
|
1501
|
-
function
|
|
1502
|
-
const t =
|
|
1511
|
+
function We(e) {
|
|
1512
|
+
const t = He(e.records), r = Be(e.columns), a = Ze(
|
|
1503
1513
|
e.pivotResultContract,
|
|
1504
1514
|
r
|
|
1505
1515
|
), n = a.expectedRoleFieldIds.pivotby ?? [];
|
|
@@ -1533,7 +1543,7 @@ function Xe(e) {
|
|
|
1533
1543
|
"A loaded_valid pivot result must carry at least one record."
|
|
1534
1544
|
);
|
|
1535
1545
|
const i = O(e.columnKeyMap);
|
|
1536
|
-
q(i, a),
|
|
1546
|
+
q(i, a), Xe(i, r, a), V(a, r);
|
|
1537
1547
|
const o = r.filter(
|
|
1538
1548
|
(s) => a.columnKinds[s.key] === "pivot_metric"
|
|
1539
1549
|
);
|
|
@@ -1542,14 +1552,14 @@ function Xe(e) {
|
|
|
1542
1552
|
"A loaded_valid pivot result is missing its physical pivot columns."
|
|
1543
1553
|
);
|
|
1544
1554
|
try {
|
|
1545
|
-
|
|
1555
|
+
le(o, {
|
|
1546
1556
|
expectedPivotFieldIds: n,
|
|
1547
1557
|
columnClassifications: a.columnClassifications
|
|
1548
1558
|
});
|
|
1549
1559
|
} catch (s) {
|
|
1550
|
-
throw s instanceof
|
|
1560
|
+
throw s instanceof ue ? new u(s.message, s) : s;
|
|
1551
1561
|
}
|
|
1552
|
-
return
|
|
1562
|
+
return Ye(t, r), {
|
|
1553
1563
|
pivotResultState: "loaded_valid",
|
|
1554
1564
|
records: t,
|
|
1555
1565
|
columns: r,
|
|
@@ -1557,7 +1567,7 @@ function Xe(e) {
|
|
|
1557
1567
|
pivotResultContract: a
|
|
1558
1568
|
};
|
|
1559
1569
|
}
|
|
1560
|
-
function
|
|
1570
|
+
function kt(e) {
|
|
1561
1571
|
const t = /* @__PURE__ */ new Set();
|
|
1562
1572
|
["groupby", "detail"].forEach((i) => {
|
|
1563
1573
|
Object.values(e.columnKeyMap.byRole[i] ?? {}).forEach((o) => {
|
|
@@ -1595,7 +1605,7 @@ function _t(e) {
|
|
|
1595
1605
|
)
|
|
1596
1606
|
)
|
|
1597
1607
|
};
|
|
1598
|
-
return
|
|
1608
|
+
return We({
|
|
1599
1609
|
pivotResultState: e.records.length === 0 ? "loaded_empty" : "loaded_valid",
|
|
1600
1610
|
pivotResultContract: n,
|
|
1601
1611
|
records: e.records,
|
|
@@ -1604,40 +1614,41 @@ function _t(e) {
|
|
|
1604
1614
|
});
|
|
1605
1615
|
}
|
|
1606
1616
|
export {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1617
|
+
gt as A,
|
|
1618
|
+
Ke as B,
|
|
1619
|
+
vt as C,
|
|
1620
|
+
Ge as D,
|
|
1621
|
+
_t as E,
|
|
1622
|
+
u as F,
|
|
1623
|
+
We as G,
|
|
1624
|
+
kt as H,
|
|
1625
|
+
wt as M,
|
|
1615
1626
|
j as P,
|
|
1616
1627
|
p as R,
|
|
1617
|
-
|
|
1618
|
-
|
|
1628
|
+
xt as a,
|
|
1629
|
+
fe as b,
|
|
1619
1630
|
A as c,
|
|
1620
1631
|
B as d,
|
|
1621
1632
|
U as e,
|
|
1622
|
-
|
|
1633
|
+
ct as f,
|
|
1623
1634
|
Z as g,
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1635
|
+
mt as h,
|
|
1636
|
+
ge as i,
|
|
1637
|
+
ut as j,
|
|
1638
|
+
ze as k,
|
|
1639
|
+
qe as l,
|
|
1640
|
+
Ve as m,
|
|
1641
|
+
pt as n,
|
|
1642
|
+
St as o,
|
|
1643
|
+
he as p,
|
|
1644
|
+
bt as q,
|
|
1645
|
+
ve as r,
|
|
1646
|
+
Tt as s,
|
|
1636
1647
|
R as t,
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1648
|
+
dt as u,
|
|
1649
|
+
lt as v,
|
|
1650
|
+
ft as w,
|
|
1651
|
+
yt as x,
|
|
1652
|
+
ke as y,
|
|
1653
|
+
ht as z
|
|
1643
1654
|
};
|