react-semaphor 0.1.591 → 0.1.593
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/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-Cazikwyh.js → assistant-chat-D05uNAeO.js} +7 -7
- package/dist/chunks/bookmark-impact-B0k90wq8.js +76 -0
- package/dist/chunks/{bookmark-state-Bt_eQEqt.js → bookmark-state-Be2W3s6t.js} +174 -166
- package/dist/chunks/{card-filter-builder-DFR-6Jpm.js → card-filter-builder-CiafWE26.js} +73 -73
- package/dist/chunks/{comparison-window-caption-CFaw-kIV.js → comparison-window-caption-h8w3ySL6.js} +88 -89
- package/dist/chunks/{dashboard-DCh9hKnJ.js → dashboard-T-gYKGTF.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-ob8G1b58.js → dashboard-briefing-launcher-CPh2B3Rf.js} +84 -84
- package/dist/chunks/{dashboard-controls-Nszg0k1A.js → dashboard-controls-Cijc9c3G.js} +9 -9
- package/dist/chunks/{dashboard-json-BpwnG23b.js → dashboard-json-D3m7h4VL.js} +1 -1
- package/dist/chunks/{dates-BOLBSBpn.js → dates-Bb0sn54j.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-BvM7br5P.js → edit-dashboard-visual-C0iSuX9t.js} +374 -374
- package/dist/chunks/{filter-reach-copy-By3r7O3G.js → filter-reach-copy-CifrEFxj.js} +221 -221
- package/dist/chunks/{filter-value-text-CFiIZWJP.js → filter-value-text-CHBm4IU7.js} +10 -10
- package/dist/chunks/{index-CsQYlwhU.js → index-CzM2w1kY.js} +22 -22
- package/dist/chunks/{pivot-result-contract-expectations-BkMRCjzf.js → pivot-result-contract-expectations-CaS0y823.js} +588 -552
- package/dist/chunks/{report-preferences-dialog-ChXt8wCt.js → report-preferences-dialog-GHvai50w.js} +9 -9
- package/dist/chunks/{resolve-dashboard-input-context-BlyFX8He.js → resolve-dashboard-input-context-BcQHmMlw.js} +7585 -6490
- package/dist/chunks/{saved-dashboard-context-BPSdH2jW.js → saved-dashboard-context-BHHEzmwM.js} +16 -16
- package/dist/chunks/{semaphor-ready-indicator-BZUMCHRU.js → semaphor-ready-indicator-AOUJrUAJ.js} +21334 -21330
- package/dist/chunks/{shelf-drop-preview-context-yJheoeTC.js → shelf-drop-preview-context-Cs62lWI1.js} +2 -2
- package/dist/chunks/stored-dashboard-Cmtl_Obh.js +4029 -0
- package/dist/chunks/{table-export-sheet-h7wm5TwP.js → table-export-sheet-Cd6z7SsG.js} +1 -1
- package/dist/chunks/{variable-draft-OpYyaVCW.js → variable-draft-CSK9Ps1o.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1097 -1105
- package/dist/format-utils/index.js +215 -216
- package/dist/index.js +56 -56
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +3 -3
- package/dist/types/components/visual/data-table/types/data-table.d.ts +24 -2
- package/dist/types/index.js +30 -29
- package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +27 -0
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +37 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +11 -0
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +56 -0
- package/dist/types/shared/dashboard-viewer/table-settings.d.ts +7 -0
- package/package.json +1 -1
- package/dist/chunks/bookmark-impact-rWjQgk8h.js +0 -75
- package/dist/chunks/pivot-header-presentation-gUxhdIdr.js +0 -42
- package/dist/chunks/stored-dashboard-CxQl9g0l.js +0 -4994
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -53
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a7 as
|
|
1
|
+
import { a7 as Y, f as Pe, r as Le, k as qe } from "./validators-BlEWWX9O.js";
|
|
2
2
|
import { z as l } from "zod";
|
|
3
3
|
import { Q as B, F as Be, r as je } from "./matrix-operation-contract-CAanJeCj.js";
|
|
4
4
|
import { D as Ue, C as ze, a as j, r as We, e as Qe } from "./metric-comparison-BeKnUD08.js";
|
|
5
5
|
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
6
6
|
import { a as N } from "./applied-constraints-DU-wndZ7.js";
|
|
7
7
|
import { r as Ge } from "./pivot-result-identity-BKUjYO1u.js";
|
|
8
|
-
const
|
|
8
|
+
const re = 8, se = 6, V = Object.freeze([]);
|
|
9
9
|
function Ye(e) {
|
|
10
10
|
switch (e.type) {
|
|
11
11
|
case "table":
|
|
@@ -105,9 +105,9 @@ function rn(e) {
|
|
|
105
105
|
if (!Array.isArray(n))
|
|
106
106
|
t.push({ path: "cards", message: "must be an array of KPI cards." });
|
|
107
107
|
else {
|
|
108
|
-
(n.length < 1 || n.length >
|
|
108
|
+
(n.length < 1 || n.length > re) && t.push({
|
|
109
109
|
path: "cards",
|
|
110
|
-
message: `must hold 1 to ${
|
|
110
|
+
message: `must hold 1 to ${re} KPI cards.`
|
|
111
111
|
});
|
|
112
112
|
const s = /* @__PURE__ */ new Set();
|
|
113
113
|
n.forEach((a, i) => {
|
|
@@ -128,13 +128,13 @@ function rn(e) {
|
|
|
128
128
|
return $(r) ? (r.layout !== "tiles" && r.layout !== "lines" ? t.push({
|
|
129
129
|
path: "kpi.layout",
|
|
130
130
|
message: "must be 'tiles' or 'lines'."
|
|
131
|
-
}) : r.layout === "tiles" && Array.isArray(n) && n.length >
|
|
131
|
+
}) : r.layout === "tiles" && Array.isArray(n) && n.length > se && t.push({
|
|
132
132
|
path: "kpi.layout",
|
|
133
|
-
message: `must be 'lines' for more than ${
|
|
133
|
+
message: `must be 'lines' for more than ${se} KPI cards.`
|
|
134
134
|
}), r.columns !== void 0 && r.columns !== 1 && r.columns !== 2 && t.push({ path: "kpi.columns", message: "must be 1 or 2." })) : t.push({ path: "kpi", message: "must be an object." }), t;
|
|
135
135
|
}
|
|
136
136
|
const Ie = "dashboardInput";
|
|
137
|
-
function
|
|
137
|
+
function ae(e) {
|
|
138
138
|
return e === "label" || e === "value" || e === "start" || e === "end" || e === "range";
|
|
139
139
|
}
|
|
140
140
|
function Xe(e) {
|
|
@@ -144,9 +144,9 @@ function v(e) {
|
|
|
144
144
|
if (!e || typeof e != "object" || Array.isArray(e)) return;
|
|
145
145
|
const t = e;
|
|
146
146
|
if (t.source === "input" || t.source === Ie)
|
|
147
|
-
return typeof t.inputId == "string" &&
|
|
147
|
+
return typeof t.inputId == "string" && ae(t.export) ? { source: "input", inputId: t.inputId, export: t.export } : void 0;
|
|
148
148
|
if (t.source === "dashboardInputAlias")
|
|
149
|
-
return typeof t.variableName != "string" || t.export !== void 0 && !
|
|
149
|
+
return typeof t.variableName != "string" || t.export !== void 0 && !ae(t.export) ? void 0 : {
|
|
150
150
|
source: "dashboardInputAlias",
|
|
151
151
|
variableName: t.variableName,
|
|
152
152
|
...t.export ? { export: t.export } : {}
|
|
@@ -178,7 +178,7 @@ function et(e, t) {
|
|
|
178
178
|
function x(e) {
|
|
179
179
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ie(e) {
|
|
182
182
|
return !!e && typeof e == "object" && e.source === Ie;
|
|
183
183
|
}
|
|
184
184
|
function an(e) {
|
|
@@ -200,13 +200,13 @@ function U(e) {
|
|
|
200
200
|
i !== t[a] && (n ?? (n = { ...t }), n[a] = i);
|
|
201
201
|
}, s = et(
|
|
202
202
|
t,
|
|
203
|
-
(a) =>
|
|
203
|
+
(a) => ie(a) ? v(a) ?? a : a
|
|
204
204
|
);
|
|
205
205
|
if (s !== t && (s.ref !== t.ref && r("ref", s.ref), s.test !== t.test && r("test", s.test)), t.inputAliases && typeof t.inputAliases == "object") {
|
|
206
206
|
const a = t.inputAliases;
|
|
207
207
|
let i = !1;
|
|
208
208
|
const o = Object.fromEntries(
|
|
209
|
-
Object.entries(a).map(([c, u]) =>
|
|
209
|
+
Object.entries(a).map(([c, u]) => ie(u) ? (i = !0, [c, v(u) ?? u]) : [c, u])
|
|
210
210
|
);
|
|
211
211
|
i && r("inputAliases", o);
|
|
212
212
|
}
|
|
@@ -250,9 +250,9 @@ function be(e, t) {
|
|
|
250
250
|
n.push({ ref: i, place: r, where: { kind: "section", sectionId: a.id } });
|
|
251
251
|
return n;
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const oe = /* @__PURE__ */ new WeakMap();
|
|
254
254
|
function Se(e) {
|
|
255
|
-
const t =
|
|
255
|
+
const t = oe.get(e);
|
|
256
256
|
if (t) return t;
|
|
257
257
|
const n = [];
|
|
258
258
|
for (const r of e.sheets ?? []) {
|
|
@@ -266,7 +266,7 @@ function Se(e) {
|
|
|
266
266
|
for (const o of tt(i))
|
|
267
267
|
n.push({ ref: o, place: s, where: { kind: "card", cardId: i.id } });
|
|
268
268
|
}
|
|
269
|
-
return
|
|
269
|
+
return oe.set(e, n), n;
|
|
270
270
|
}
|
|
271
271
|
function Ce(e, t) {
|
|
272
272
|
return e.kind === t.kind && e.sheetId === t.sheetId;
|
|
@@ -314,9 +314,9 @@ function C(e, t) {
|
|
|
314
314
|
const n = e.scope;
|
|
315
315
|
switch (n.kind) {
|
|
316
316
|
case "allSheets":
|
|
317
|
-
return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !at(n.exceptSheetIds, t) && !
|
|
317
|
+
return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !at(n.exceptSheetIds, t) && !de(n.exceptCardIds, t);
|
|
318
318
|
case "sheets":
|
|
319
|
-
return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !
|
|
319
|
+
return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !de(n.exceptCardIds, t);
|
|
320
320
|
case "cards":
|
|
321
321
|
return !!t.cardId && n.cardIds.includes(t.cardId);
|
|
322
322
|
case "documentSections":
|
|
@@ -347,9 +347,9 @@ function dn(e, t) {
|
|
|
347
347
|
return !1;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
const
|
|
350
|
+
const ce = /* @__PURE__ */ new WeakMap();
|
|
351
351
|
function rt(e) {
|
|
352
|
-
const t =
|
|
352
|
+
const t = ce.get(e);
|
|
353
353
|
if (t) return t;
|
|
354
354
|
const n = /* @__PURE__ */ new Map();
|
|
355
355
|
for (const a of _(e)) {
|
|
@@ -370,7 +370,7 @@ function rt(e) {
|
|
|
370
370
|
cardIds: n.get(a.id) ?? /* @__PURE__ */ new Set(),
|
|
371
371
|
variableIds: r.get(a.id) ?? /* @__PURE__ */ new Set()
|
|
372
372
|
});
|
|
373
|
-
return
|
|
373
|
+
return ce.set(e, s), s;
|
|
374
374
|
}
|
|
375
375
|
function ln(e, t) {
|
|
376
376
|
var s, a;
|
|
@@ -408,10 +408,10 @@ function mn(e, t) {
|
|
|
408
408
|
var a, i, o;
|
|
409
409
|
const n = (c) => {
|
|
410
410
|
var u, d;
|
|
411
|
-
return
|
|
411
|
+
return ue(c, t.removedSheetIds, t.renamedSheetIds, !1, (u = t.copiedTab) == null ? void 0 : u.sheetIds, (d = t.copiedTab) == null ? void 0 : d.mode);
|
|
412
412
|
}, r = (c) => {
|
|
413
413
|
var u, d;
|
|
414
|
-
return
|
|
414
|
+
return ue(
|
|
415
415
|
c,
|
|
416
416
|
t.removedCardIds,
|
|
417
417
|
t.renamedCardIds,
|
|
@@ -461,7 +461,7 @@ function mn(e, t) {
|
|
|
461
461
|
}
|
|
462
462
|
return st(e, s) ? e : s;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function ue(e, t, n, r, s, a) {
|
|
465
465
|
let i = e;
|
|
466
466
|
return t != null && t.size && (i = i.filter((o) => !t.has(o))), r && (i = i.filter((o) => n == null ? void 0 : n.has(o))), n != null && n.size && (i = i.map((o) => n.get(o) ?? o)), s != null && s.size && (i = a === "extend" ? [.../* @__PURE__ */ new Set([...i, ...i.flatMap((o) => s.has(o) ? [s.get(o)] : [])])] : i.map((o) => s.get(o) ?? o)), i;
|
|
467
467
|
}
|
|
@@ -471,7 +471,7 @@ function st(e, t) {
|
|
|
471
471
|
function at(e, t) {
|
|
472
472
|
return !!t.sheetId && !!(e != null && e.includes(t.sheetId));
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function de(e, t) {
|
|
475
475
|
return !!t.cardId && !!(e != null && e.includes(t.cardId));
|
|
476
476
|
}
|
|
477
477
|
function it(e, t) {
|
|
@@ -507,7 +507,7 @@ function In(e, t) {
|
|
|
507
507
|
function bn(e, t, n) {
|
|
508
508
|
var o;
|
|
509
509
|
if (t.kind !== "allSheets" && t.kind !== "sheets") return t;
|
|
510
|
-
const r = ot(e), s = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" &&
|
|
510
|
+
const r = ot(e), s = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" && le(e) ? [...n].filter((c) => {
|
|
511
511
|
var u;
|
|
512
512
|
return !((u = e.exceptSheetIds) != null && u.includes(c));
|
|
513
513
|
}) : [], a = [...n].filter((c) => !s.includes(c));
|
|
@@ -520,7 +520,7 @@ function bn(e, t, n) {
|
|
|
520
520
|
const i = e.kind === "allSheets" ? ((o = e.exceptSheetIds) == null ? void 0 : o.filter((c) => n.has(c))) ?? [] : [];
|
|
521
521
|
return {
|
|
522
522
|
kind: "allSheets",
|
|
523
|
-
...e.kind === "allSheets" &&
|
|
523
|
+
...e.kind === "allSheets" && le(e) ? {
|
|
524
524
|
...e.sheetKinds ? { sheetKinds: e.sheetKinds } : {},
|
|
525
525
|
...i.length ? { exceptSheetIds: i } : {}
|
|
526
526
|
} : s.length ? {
|
|
@@ -530,7 +530,7 @@ function bn(e, t, n) {
|
|
|
530
530
|
...r.length ? { exceptCardIds: [...r] } : {}
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function le(e) {
|
|
534
534
|
var t;
|
|
535
535
|
return e.kind === "allSheets" && (!((t = e.sheetKinds) != null && t.length) || e.sheetKinds.includes("document"));
|
|
536
536
|
}
|
|
@@ -567,7 +567,7 @@ function gn(e) {
|
|
|
567
567
|
function kn(e) {
|
|
568
568
|
return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) || Ue;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function J(e, t) {
|
|
571
571
|
const n = Object.entries(e || {}).filter(
|
|
572
572
|
([a, i]) => i.output.outputId === a
|
|
573
573
|
);
|
|
@@ -581,7 +581,7 @@ function Y(e, t) {
|
|
|
581
581
|
return s.length === 1 ? s[0][1] : void 0;
|
|
582
582
|
}
|
|
583
583
|
function wn(e, t) {
|
|
584
|
-
const n =
|
|
584
|
+
const n = J(e, t);
|
|
585
585
|
return {
|
|
586
586
|
comparisonKind: (n == null ? void 0 : n.type) ?? ut(t),
|
|
587
587
|
metadata: n
|
|
@@ -612,7 +612,7 @@ function vn(e) {
|
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
614
|
const dt = "SEMAPHOR_CALCULATED_FIELD";
|
|
615
|
-
function
|
|
615
|
+
function H(e, t, n) {
|
|
616
616
|
if (n && (t === "groupby" || t === "pivotby"))
|
|
617
617
|
return n;
|
|
618
618
|
if (t === "metric" && e.name === "*" && !e.expression)
|
|
@@ -633,7 +633,7 @@ function J(e, t, n) {
|
|
|
633
633
|
return r && r !== e.name ? `${r}_${e.name}` : e.name;
|
|
634
634
|
}
|
|
635
635
|
function Ae(e) {
|
|
636
|
-
return
|
|
636
|
+
return H(e, "detail");
|
|
637
637
|
}
|
|
638
638
|
function lt(e) {
|
|
639
639
|
const t = e.label;
|
|
@@ -648,7 +648,7 @@ function Tn(e) {
|
|
|
648
648
|
], n = ve(e.detailColumns ?? []), r = new Map((e.detailColumns ?? []).map((o, c) => [o, c])), s = new Map(
|
|
649
649
|
t.map(({ field: o, role: c }) => [
|
|
650
650
|
o,
|
|
651
|
-
c === "detail" ? n[r.get(o)] :
|
|
651
|
+
c === "detail" ? n[r.get(o)] : H(o, c)
|
|
652
652
|
])
|
|
653
653
|
), a = new Set(s.values()), i = /* @__PURE__ */ new Map();
|
|
654
654
|
for (const { field: o } of t)
|
|
@@ -698,7 +698,7 @@ function Kn(e, t, n) {
|
|
|
698
698
|
...e === "percentChange" && (n == null ? void 0 : n.percent) === void 0 ? { percent: !0 } : {}
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function X(e) {
|
|
702
702
|
var r, s, a, i;
|
|
703
703
|
if (e.get.kind !== "aggregate" || (r = e.query.sql) != null && r.trim()) return;
|
|
704
704
|
const t = (i = (a = (s = e.query.config) == null ? void 0 : s.metricColumns) == null ? void 0 : a[0]) == null ? void 0 : i.comparison;
|
|
@@ -706,7 +706,7 @@ function H(e) {
|
|
|
706
706
|
const n = t.spec;
|
|
707
707
|
return n.kind === "previous_period" || n.kind === "previous_year" ? n : void 0;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function fe(e, t) {
|
|
710
710
|
if (t === "preview" && e.get.kind !== "aggregate")
|
|
711
711
|
return M + 1;
|
|
712
712
|
switch (e.get.kind) {
|
|
@@ -718,13 +718,13 @@ function le(e, t) {
|
|
|
718
718
|
return 1;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
const
|
|
721
|
+
const me = {
|
|
722
722
|
answer: /* @__PURE__ */ new WeakMap(),
|
|
723
723
|
preview: /* @__PURE__ */ new WeakMap()
|
|
724
724
|
};
|
|
725
725
|
function ht(e, t = "answer") {
|
|
726
726
|
var a;
|
|
727
|
-
const n =
|
|
727
|
+
const n = me[t].get(e);
|
|
728
728
|
if (n) return n;
|
|
729
729
|
const { query: r } = e, s = {
|
|
730
730
|
id: e.id,
|
|
@@ -738,9 +738,9 @@ function ht(e, t = "answer") {
|
|
|
738
738
|
...r.connectionId ? { connectionId: r.connectionId } : {},
|
|
739
739
|
...r.dataSource ? { dataSource: r.dataSource } : {},
|
|
740
740
|
...r.calculatedFields ? { calculatedFields: r.calculatedFields } : {},
|
|
741
|
-
...(a = r.sql) != null && a.trim() ? { sql: r.sql, config: { rowLimit:
|
|
741
|
+
...(a = r.sql) != null && a.trim() ? { sql: r.sql, config: { rowLimit: fe(e, t) } } : { config: { ...r.config, rowLimit: fe(e, t) } }
|
|
742
742
|
};
|
|
743
|
-
return
|
|
743
|
+
return me[t].set(e, s), s;
|
|
744
744
|
}
|
|
745
745
|
function Dn(e) {
|
|
746
746
|
return e.type === Te && typeof e.dataVariableId == "string" && e.dataVariableId.length > 0;
|
|
@@ -754,7 +754,7 @@ function Nn(e, t, n) {
|
|
|
754
754
|
return n in t ? t[n] : void 0;
|
|
755
755
|
}
|
|
756
756
|
function z(e) {
|
|
757
|
-
const t =
|
|
757
|
+
const t = Y(e);
|
|
758
758
|
return t === "string" || t === "unknown" ? "text" : t;
|
|
759
759
|
}
|
|
760
760
|
function yt(e) {
|
|
@@ -767,7 +767,7 @@ function It(e, t, n, r) {
|
|
|
767
767
|
s == null ? void 0 : s.outputKey,
|
|
768
768
|
s == null ? void 0 : s.rawKey,
|
|
769
769
|
t === "metric" ? ((o = (i = r == null ? void 0 : r.byMetricAlias) == null ? void 0 : i[j(e)]) == null ? void 0 : o.outputKey) ?? j(e) : void 0,
|
|
770
|
-
|
|
770
|
+
H(e, t === "metric" ? "metric" : "groupby"),
|
|
771
771
|
e.label,
|
|
772
772
|
e.name
|
|
773
773
|
].find((c) => !!c && n.has(c));
|
|
@@ -775,7 +775,7 @@ function It(e, t, n, r) {
|
|
|
775
775
|
function On(e, t) {
|
|
776
776
|
var r;
|
|
777
777
|
if (e.get.kind === "aggregate")
|
|
778
|
-
return
|
|
778
|
+
return X(e) ? [S, ...Ee] : [S];
|
|
779
779
|
if (e.get.kind === "list") return [S];
|
|
780
780
|
if ((r = e.query.sql) != null && r.trim()) return [...t ?? []];
|
|
781
781
|
const n = e.query.config;
|
|
@@ -791,10 +791,10 @@ function xn(e, t) {
|
|
|
791
791
|
const n = e.query.config, r = (u, d) => {
|
|
792
792
|
if (!u) return;
|
|
793
793
|
const f = d === "metric" ? B(u) : u.dataType;
|
|
794
|
-
return
|
|
794
|
+
return Y(f) === "unknown" ? void 0 : z(f);
|
|
795
795
|
};
|
|
796
796
|
if (e.get.kind === "aggregate")
|
|
797
|
-
return mt(t) &&
|
|
797
|
+
return mt(t) && X(e) ? "number" : t === S ? r((i = n == null ? void 0 : n.metricColumns) == null ? void 0 : i[0], "metric") : void 0;
|
|
798
798
|
const s = (o = n == null ? void 0 : n.groupByColumns) == null ? void 0 : o.find((u) => u.name === t);
|
|
799
799
|
return s ? r(s, "groupby") : r((c = n == null ? void 0 : n.metricColumns) == null ? void 0 : c.find((u) => u.name === t), "metric");
|
|
800
800
|
}
|
|
@@ -810,15 +810,15 @@ function St(e, t, n) {
|
|
|
810
810
|
), i = (m, k) => a.has(m) ? z(a.get(m)) : k !== void 0 ? z(k) : yt(r[m]);
|
|
811
811
|
if ((I = e.query.sql) != null && I.trim())
|
|
812
812
|
return [...s].map((m) => ({ part: m, key: m, type: i(m, void 0) }));
|
|
813
|
-
const o = e.query.config ?? {}, c = [], u = s.size === 1 ? [...s][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", f = (m, k,
|
|
814
|
-
if (c.some(($e) => $e.part ===
|
|
813
|
+
const o = e.query.config ?? {}, c = [], u = s.size === 1 ? [...s][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", f = (m, k, ne) => {
|
|
814
|
+
if (c.some(($e) => $e.part === ne)) return;
|
|
815
815
|
const K = It(m, k, s, n.columnKeyMap) ?? (d ? u : void 0);
|
|
816
816
|
if (!K) return;
|
|
817
817
|
const Ve = k === "metric" ? i(K, B(m)) : i(K, m.dataType);
|
|
818
|
-
c.push({ part:
|
|
818
|
+
c.push({ part: ne, key: K, type: Ve });
|
|
819
819
|
}, y = o.metricColumns ?? [];
|
|
820
820
|
if (e.get.kind === "aggregate") {
|
|
821
|
-
const m = y[0] ? (g =
|
|
821
|
+
const m = y[0] ? (g = J(n.comparisonMetadata, y[0])) == null ? void 0 : g.output.currentColumnKey : void 0;
|
|
822
822
|
return m && s.has(m) ? c.push({ part: S, key: m, type: i(m, B(y[0])) }) : y[0] && f(y[0], "metric", S), c;
|
|
823
823
|
}
|
|
824
824
|
const h = o.groupByColumns ?? [];
|
|
@@ -872,7 +872,7 @@ function Rn(e, t, n = "answer") {
|
|
|
872
872
|
);
|
|
873
873
|
if (e.get.kind === "aggregate" && ((d = c[S]) == null ? void 0 : d.value) == null)
|
|
874
874
|
return { status: "none", why: "noRows", filterReach: s, ...a };
|
|
875
|
-
const u =
|
|
875
|
+
const u = X(e) ? Ct(e, o, t) : void 0;
|
|
876
876
|
return {
|
|
877
877
|
status: "answered",
|
|
878
878
|
parts: u && "parts" in u ? { ...c, ...u.parts } : c,
|
|
@@ -883,7 +883,7 @@ function Rn(e, t, n = "answer") {
|
|
|
883
883
|
}
|
|
884
884
|
function Ct(e, t, n) {
|
|
885
885
|
var o, c;
|
|
886
|
-
const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], s = r ?
|
|
886
|
+
const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], s = r ? J(n.comparisonMetadata, r) : void 0, a = s == null ? void 0 : s.output;
|
|
887
887
|
if (!a || a.availability.status !== "available" || !a.comparisonColumnKey)
|
|
888
888
|
return { unavailable: (a == null ? void 0 : a.availability.status) === "unavailable" ? a.availability.reason : "temporal_binding_missing" };
|
|
889
889
|
const i = (u) => {
|
|
@@ -898,9 +898,9 @@ function Ct(e, t, n) {
|
|
|
898
898
|
}
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
const
|
|
902
|
-
function
|
|
903
|
-
const t =
|
|
901
|
+
const pe = /* @__PURE__ */ new WeakMap();
|
|
902
|
+
function Z(e) {
|
|
903
|
+
const t = pe.get(e);
|
|
904
904
|
if (t) return t;
|
|
905
905
|
const n = new Map(
|
|
906
906
|
(e.sheets ?? []).map(
|
|
@@ -926,16 +926,16 @@ function X(e) {
|
|
|
926
926
|
})
|
|
927
927
|
)
|
|
928
928
|
], s = { targets: r, byId: new Map(r.map((a) => [a.id, a])) };
|
|
929
|
-
return
|
|
929
|
+
return pe.set(e, s), s;
|
|
930
930
|
}
|
|
931
931
|
function gt(e) {
|
|
932
|
-
return
|
|
932
|
+
return Z(e).targets;
|
|
933
933
|
}
|
|
934
934
|
function _n(e, t) {
|
|
935
|
-
return
|
|
935
|
+
return Z(e).byId.get(t);
|
|
936
936
|
}
|
|
937
937
|
function kt(e, t) {
|
|
938
|
-
return
|
|
938
|
+
return Z(e).byId.has(t);
|
|
939
939
|
}
|
|
940
940
|
function wt(e, t) {
|
|
941
941
|
return t.kind === "card" ? [
|
|
@@ -1084,7 +1084,7 @@ function E(e, t) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
);
|
|
1086
1086
|
}
|
|
1087
|
-
t.includeMetricFilterDatasets && "parameters" in e && ((u = e.parameters) != null && u.filters) &&
|
|
1087
|
+
t.includeMetricFilterDatasets && "parameters" in e && ((u = e.parameters) != null && u.filters) && ee(e.parameters.filters, t);
|
|
1088
1088
|
const s = (d = e.calculatedFormula) == null ? void 0 : d.inputFields, a = !!(s && s.length > 0);
|
|
1089
1089
|
a && s.forEach((y) => E(y, t));
|
|
1090
1090
|
let i = !1, o = !1;
|
|
@@ -1118,13 +1118,13 @@ function E(e, t) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
o && (t.complete = !1), r && !a && !i && (t.complete = !1);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function ee(e, t) {
|
|
1122
1122
|
if (e && !t.visitedGroups.has(e.id)) {
|
|
1123
1123
|
t.visitedGroups.add(e.id);
|
|
1124
1124
|
for (const n of e.conditions || [])
|
|
1125
1125
|
E(n.field, t);
|
|
1126
1126
|
for (const n of e.groups || [])
|
|
1127
|
-
|
|
1127
|
+
ee(n, t);
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
function F(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
|
|
@@ -1136,7 +1136,7 @@ function F(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
|
|
|
1136
1136
|
includeMetricFilterDatasets: e
|
|
1137
1137
|
};
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function te(e, t) {
|
|
1140
1140
|
var r;
|
|
1141
1141
|
const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
|
|
1142
1142
|
return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
|
|
@@ -1148,7 +1148,7 @@ function Un(e) {
|
|
|
1148
1148
|
function Ne(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = R) {
|
|
1149
1149
|
const a = { ...R, ...s }, i = F(a.includeMetricFilterDatasets, n, r);
|
|
1150
1150
|
E(e, i), i.found.forEach((o) => {
|
|
1151
|
-
const c =
|
|
1151
|
+
const c = te(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
1152
1152
|
c && t.add(c);
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
@@ -1160,7 +1160,7 @@ function zn(e, t) {
|
|
|
1160
1160
|
function Wn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
1161
1161
|
const s = F(!0, n, r);
|
|
1162
1162
|
E(e, s), s.found.forEach((a) => {
|
|
1163
|
-
const i =
|
|
1163
|
+
const i = te(a, "qualifiedOnly");
|
|
1164
1164
|
i && t.add(i);
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
@@ -1171,8 +1171,8 @@ function Qn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set())
|
|
|
1171
1171
|
}
|
|
1172
1172
|
function Gn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = R) {
|
|
1173
1173
|
const a = { ...R, ...s }, i = F(a.includeMetricFilterDatasets, n, r);
|
|
1174
|
-
|
|
1175
|
-
const c =
|
|
1174
|
+
ee(e, i), i.found.forEach((o) => {
|
|
1175
|
+
const c = te(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
1176
1176
|
c && t.add(c);
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
@@ -1223,7 +1223,7 @@ const Jn = {
|
|
|
1223
1223
|
boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
|
|
1224
1224
|
};
|
|
1225
1225
|
function Mt(e) {
|
|
1226
|
-
const t =
|
|
1226
|
+
const t = Y(e);
|
|
1227
1227
|
return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
|
|
1228
1228
|
}
|
|
1229
1229
|
function Xn(e, t) {
|
|
@@ -1349,9 +1349,9 @@ function Pt(e) {
|
|
|
1349
1349
|
function O(e) {
|
|
1350
1350
|
return typeof e == "string" && Pt(e) !== void 0;
|
|
1351
1351
|
}
|
|
1352
|
-
const
|
|
1353
|
-
order:
|
|
1354
|
-
hidden:
|
|
1352
|
+
const he = l.array(l.string()).max(2e3), Lt = l.object({
|
|
1353
|
+
order: he.optional(),
|
|
1354
|
+
hidden: he.optional(),
|
|
1355
1355
|
labels: l.record(l.string(), l.string().max(Q.columnLabelMaxChars)).optional(),
|
|
1356
1356
|
sort: l.array(
|
|
1357
1357
|
l.object({
|
|
@@ -1364,15 +1364,22 @@ const pe = l.array(l.string()).max(2e3), Lt = l.object({
|
|
|
1364
1364
|
l.number().int().min(1).max(Q.columnWidthMaxPx)
|
|
1365
1365
|
).optional()
|
|
1366
1366
|
}).strict();
|
|
1367
|
-
function
|
|
1367
|
+
function G(e) {
|
|
1368
1368
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1369
1369
|
for (const r of e)
|
|
1370
1370
|
!O(r) || t.has(r) || (t.add(r), n.push(r));
|
|
1371
1371
|
return n;
|
|
1372
1372
|
}
|
|
1373
|
+
function er(e) {
|
|
1374
|
+
if (!Array.isArray(e)) return;
|
|
1375
|
+
const t = G(
|
|
1376
|
+
e.filter((n) => typeof n == "string")
|
|
1377
|
+
);
|
|
1378
|
+
return t.length ? t : void 0;
|
|
1379
|
+
}
|
|
1373
1380
|
function xe(e) {
|
|
1374
1381
|
if (!e) return;
|
|
1375
|
-
const t = e.order ?
|
|
1382
|
+
const t = e.order ? G(e.order) : void 0, n = e.hidden ? G(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
|
|
1376
1383
|
([c, u]) => {
|
|
1377
1384
|
const d = typeof u == "string" ? u.trim() : "";
|
|
1378
1385
|
return O(c) && d ? [
|
|
@@ -1390,7 +1397,7 @@ function xe(e) {
|
|
|
1390
1397
|
direction: u
|
|
1391
1398
|
}))), i.length && (o.widths = Object.fromEntries(i)), Object.keys(o).length ? o : void 0;
|
|
1392
1399
|
}
|
|
1393
|
-
function
|
|
1400
|
+
function tr(e) {
|
|
1394
1401
|
var t, n;
|
|
1395
1402
|
return !!((t = e == null ? void 0 : e.order) != null && t.length) || !!((n = e == null ? void 0 : e.hidden) != null && n.length) || Object.keys((e == null ? void 0 : e.labels) ?? {}).length > 0 || Object.keys((e == null ? void 0 : e.widths) ?? {}).length > 0;
|
|
1396
1403
|
}
|
|
@@ -1409,7 +1416,7 @@ function Re(e, t) {
|
|
|
1409
1416
|
value: xe(n.data) ?? {}
|
|
1410
1417
|
} : { ok: !1, error: "Table settings are invalid." };
|
|
1411
1418
|
}
|
|
1412
|
-
function
|
|
1419
|
+
function nr(e, t, n) {
|
|
1413
1420
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
1414
1421
|
const r = {};
|
|
1415
1422
|
for (const [s, a] of Object.entries(
|
|
@@ -1432,17 +1439,17 @@ function Bt(e) {
|
|
|
1432
1439
|
var t, n;
|
|
1433
1440
|
return _e(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
|
|
1434
1441
|
}
|
|
1435
|
-
function
|
|
1442
|
+
function rr(e) {
|
|
1436
1443
|
return new Set(
|
|
1437
1444
|
T(e).filter(({ card: t }) => _e(t)).map(({ card: t }) => t.id)
|
|
1438
1445
|
);
|
|
1439
1446
|
}
|
|
1440
|
-
function
|
|
1447
|
+
function sr(e) {
|
|
1441
1448
|
return new Set(
|
|
1442
1449
|
T(e).filter(({ card: t }) => Bt(t)).map(({ card: t }) => t.id)
|
|
1443
1450
|
);
|
|
1444
1451
|
}
|
|
1445
|
-
const L = 1,
|
|
1452
|
+
const L = 1, ar = ["PRIVATE", "TEAM", "DASHBOARD"], jt = l.object({
|
|
1446
1453
|
filterId: l.string().min(1),
|
|
1447
1454
|
name: l.string(),
|
|
1448
1455
|
operation: l.string(),
|
|
@@ -1539,97 +1546,98 @@ function Gt(e, t) {
|
|
|
1539
1546
|
unknownKeys: r
|
|
1540
1547
|
};
|
|
1541
1548
|
}
|
|
1542
|
-
function
|
|
1549
|
+
function ir(e, t) {
|
|
1543
1550
|
const n = Gt(e, t);
|
|
1544
1551
|
return n.ok ? n.issues.some((r) => r.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : n.issues.length || n.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: n.value } : n;
|
|
1545
1552
|
}
|
|
1546
1553
|
export {
|
|
1547
1554
|
re as $,
|
|
1548
|
-
|
|
1555
|
+
qn as A,
|
|
1549
1556
|
L as B,
|
|
1550
1557
|
Hn as C,
|
|
1551
|
-
|
|
1558
|
+
_ as D,
|
|
1552
1559
|
Jn as E,
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1560
|
+
C as F,
|
|
1561
|
+
fn as G,
|
|
1562
|
+
_n as H,
|
|
1563
|
+
Tn as I,
|
|
1564
|
+
Ye as J,
|
|
1565
|
+
Tt as K,
|
|
1566
|
+
ot as L,
|
|
1567
|
+
gt as M,
|
|
1568
|
+
yn as N,
|
|
1569
|
+
le as O,
|
|
1570
|
+
rt as P,
|
|
1571
|
+
dn as Q,
|
|
1572
|
+
ge as R,
|
|
1573
|
+
bn as S,
|
|
1574
|
+
On as T,
|
|
1575
|
+
Cn as U,
|
|
1569
1576
|
Q as V,
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1577
|
+
H as W,
|
|
1578
|
+
Ae as X,
|
|
1579
|
+
lt as Y,
|
|
1580
|
+
ve as Z,
|
|
1581
|
+
En as _,
|
|
1575
1582
|
jn as a,
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1583
|
+
se as a0,
|
|
1584
|
+
Je as a1,
|
|
1585
|
+
nn as a2,
|
|
1586
|
+
He as a3,
|
|
1587
|
+
rn as a4,
|
|
1588
|
+
ln as a5,
|
|
1589
|
+
mn as a6,
|
|
1590
|
+
pn as a7,
|
|
1591
|
+
hn as a8,
|
|
1592
|
+
In as a9,
|
|
1593
|
+
Xn as aA,
|
|
1594
|
+
Rt as aB,
|
|
1595
|
+
Ft as aC,
|
|
1596
|
+
$n as aD,
|
|
1597
|
+
an as aE,
|
|
1598
|
+
et as aF,
|
|
1599
|
+
v as aG,
|
|
1600
|
+
T as aH,
|
|
1601
|
+
ut as aI,
|
|
1602
|
+
kn as aJ,
|
|
1603
|
+
J as aK,
|
|
1604
|
+
ae as aL,
|
|
1605
|
+
wn as aM,
|
|
1606
|
+
gn as aN,
|
|
1607
|
+
Vn as aO,
|
|
1608
|
+
vn as aP,
|
|
1609
|
+
An as aQ,
|
|
1610
|
+
Xe as aR,
|
|
1611
|
+
Pn as aS,
|
|
1612
|
+
Ln as aT,
|
|
1613
|
+
Bn as aU,
|
|
1614
|
+
sn as aV,
|
|
1615
|
+
Sn as aa,
|
|
1616
|
+
Te as ab,
|
|
1617
|
+
M as ac,
|
|
1618
|
+
ft as ad,
|
|
1619
|
+
S as ae,
|
|
1620
|
+
Ee as af,
|
|
1621
|
+
mt as ag,
|
|
1622
|
+
pt as ah,
|
|
1623
|
+
Kn as ai,
|
|
1624
|
+
X as aj,
|
|
1625
|
+
ht as ak,
|
|
1626
|
+
Dn as al,
|
|
1627
|
+
Nn as am,
|
|
1628
|
+
xn as an,
|
|
1629
|
+
Mn as ao,
|
|
1630
|
+
Rn as ap,
|
|
1631
|
+
on as aq,
|
|
1632
|
+
nt as ar,
|
|
1633
|
+
cn as as,
|
|
1634
|
+
un as at,
|
|
1635
|
+
ke as au,
|
|
1636
|
+
kt as av,
|
|
1637
|
+
wt as aw,
|
|
1638
|
+
At as ax,
|
|
1639
|
+
Fn as ay,
|
|
1640
|
+
Mt as az,
|
|
1633
1641
|
zn as b,
|
|
1634
1642
|
Ne as c,
|
|
1635
1643
|
De as d,
|
|
@@ -1640,19 +1648,19 @@ export {
|
|
|
1640
1648
|
Gt as i,
|
|
1641
1649
|
Oe as j,
|
|
1642
1650
|
Pt as k,
|
|
1643
|
-
|
|
1651
|
+
xe as l,
|
|
1644
1652
|
Zn as m,
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1653
|
+
er as n,
|
|
1654
|
+
tr as o,
|
|
1655
|
+
ir as p,
|
|
1656
|
+
Me as q,
|
|
1649
1657
|
Un as r,
|
|
1650
|
-
|
|
1658
|
+
Re as s,
|
|
1651
1659
|
$t as t,
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1660
|
+
nr as u,
|
|
1661
|
+
_e as v,
|
|
1662
|
+
Bt as w,
|
|
1655
1663
|
rr as x,
|
|
1656
1664
|
sr as y,
|
|
1657
|
-
|
|
1665
|
+
ar as z
|
|
1658
1666
|
};
|