react-semaphor 0.1.543 → 0.1.545
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/activity/index.js +73 -0
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +56 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/dashboard-B1tMju0u.js +14 -0
- package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
- package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +553 -541
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +241 -227
- package/dist/index.js +354 -331
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +6 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
- package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
|
@@ -1,144 +1,144 @@
|
|
|
1
1
|
var we = Object.defineProperty;
|
|
2
2
|
var xe = (e, t, a) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var z = (e, t, a) => xe(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
-
import { D as
|
|
5
|
-
import { N as
|
|
6
|
-
import { c as
|
|
7
|
-
import { A as
|
|
8
|
-
import { q as Me, A as X, au as
|
|
4
|
+
import { D as L, a as ke } from "../chunks/apply-dashboard-operations-CZEMsx8E.js";
|
|
5
|
+
import { N as la, m as ua, c as pa, e as fa, d as ha, b as ma, l as ba, f as ga, i as Ia, k as Ca, g as ya, j as _a, h as Da } from "../chunks/apply-dashboard-operations-CZEMsx8E.js";
|
|
6
|
+
import { c as Ae, a as Oe, v as Re, f as Ee, d as Ne, p as Pe } from "../chunks/numeric-presentation-7X_IrD58.js";
|
|
7
|
+
import { A as Ta, Q as va, R as Fa, T as wa, N as xa, O as ka, P as Aa, J as Oa, K as Ra, M as Ea, L as Na, U as Pa, a4 as Ma, S as $a, V as Ba, b as La, a3 as Va, a2 as qa, o as za, x as ja, q as Ua, u as Ha, w as Ga, a7 as Ka, I as Wa, H as Qa, C as Xa, a8 as Ya, h as Ja, j as Za, $ as er, i as tr, a0 as ar, a1 as rr, B as nr, D as ir, z as or, a5 as sr, a6 as dr, e as cr, a9 as lr, F as ur, l as pr, X as fr, m as hr, Z as mr, _ as br, Y as gr, k as Ir, E as Cr, y as yr, s as _r, t as Dr, G as Sr, W as Tr } from "../chunks/numeric-presentation-7X_IrD58.js";
|
|
8
|
+
import { q as Me, A as X, au as $e, B as ue, l as Be, ag as Le } from "../chunks/validators-DMHTpf7a.js";
|
|
9
9
|
import "../chunks/matrix-operation-contract-8OIO4gob.js";
|
|
10
10
|
import "../chunks/analytics-base-schemas-BFAoRlkU.js";
|
|
11
11
|
import "zod";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { n as
|
|
15
|
-
import { a as
|
|
16
|
-
import { D as
|
|
17
|
-
import { D as
|
|
18
|
-
import {
|
|
19
|
-
import { e as
|
|
20
|
-
import { p as
|
|
21
|
-
import { m as
|
|
12
|
+
import { x as j, y as G, z as pe, A as fe, B as Ve } from "../chunks/resolve-dashboard-input-context-DJ2tICwz.js";
|
|
13
|
+
import { ak as Fr, J as wr, I as xr, U as kr, Y as Ar, ac as Or, ad as Rr, af as Er, aq as Nr, b as Pr, ag as Mr, ab as $r, N as Br, E as Lr, d as Vr, a as qr, Z as zr, S as jr, V as Ur, a5 as Hr, _ as Gr, a0 as Kr, a1 as Wr, a9 as Qr, K as Xr, O as Yr, R as Jr, a7 as Zr, aa as en, a4 as tn, a6 as an, Q as rn, P as nn, a3 as on, a8 as sn, C as dn, D as cn, L as ln, ai as un, W as pn, a2 as fn, ao as hn, ae as mn, M as bn, F as gn, G as In, al as Cn, am as yn, H as _n, aj as Dn, an as Sn, ah as Tn, X as vn, $ as Fn, T as wn, ap as xn } from "../chunks/resolve-dashboard-input-context-DJ2tICwz.js";
|
|
14
|
+
import { n as qe } from "../chunks/operators-B3zZoskU.js";
|
|
15
|
+
import { a as An, b as On, r as Rn } from "../chunks/raw-temporal-presentation-C3mUgnEx.js";
|
|
16
|
+
import { D as Nn, w as Pn, z as Mn, x as $n, v as Bn, y as Ln } from "../chunks/table-settings-CLZocegs.js";
|
|
17
|
+
import { D as qn, d as zn, i as jn, v as Un } from "../chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js";
|
|
18
|
+
import { D as Gn, C as Kn, A as Wn, B as Qn, E as Xn, F as Yn } from "../chunks/pivot-result-lifecycle-DM4CyGKs.js";
|
|
19
|
+
import { e as ze, w as je } from "../chunks/metric-comparison-DEwi9uc2.js";
|
|
20
|
+
import { p as Ue } from "../chunks/report-runtime-context-Dq8XyODK.js";
|
|
21
|
+
import { m as Zn, a as ei, r as ti } from "../chunks/matrix-card-DjwWcCo8.js";
|
|
22
22
|
function S(e) {
|
|
23
23
|
return e && typeof e == "object" ? e : null;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function v(e) {
|
|
26
26
|
return typeof e == "string" ? e : null;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function He(e) {
|
|
29
29
|
var t, a, r;
|
|
30
30
|
return !!(e && typeof e == "object") && (((t = S(e)) == null ? void 0 : t.kind) === "semantic" || ((a = S(e)) == null ? void 0 : a.kind) === "physical" || ((r = S(e)) == null ? void 0 : r.kind) === "sql");
|
|
31
31
|
}
|
|
32
32
|
function R(e) {
|
|
33
|
-
return
|
|
33
|
+
return He(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
|
|
34
34
|
}
|
|
35
35
|
function Yt(e) {
|
|
36
36
|
return Me(e);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function he(e, t) {
|
|
39
39
|
return X(e, t);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function Ge(e, t) {
|
|
42
|
+
return $e(e, t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function V(e) {
|
|
45
45
|
const t = [];
|
|
46
46
|
for (const a of e) {
|
|
47
47
|
const r = t.findIndex(
|
|
48
|
-
(n) =>
|
|
48
|
+
(n) => he(n, a)
|
|
49
49
|
);
|
|
50
|
-
r === -1 ? t.push(a) : t[r] =
|
|
50
|
+
r === -1 ? t.push(a) : t[r] = Ge(
|
|
51
51
|
t[r],
|
|
52
52
|
a
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
return t;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
57
|
+
function Jt(e) {
|
|
58
|
+
return V(e)[0];
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function K(e, t) {
|
|
61
61
|
return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !X(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function W(e) {
|
|
64
64
|
return R(e) ? e : void 0;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ce(e, t) {
|
|
67
67
|
if (!(e.kind !== "semantic" || e.connectionId))
|
|
68
68
|
return t.find(
|
|
69
69
|
(a) => (a == null ? void 0 : a.kind) === "semantic" && X(e, a) && !!a.connectionId
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const a =
|
|
74
|
-
return a ?
|
|
72
|
+
function T(e, t) {
|
|
73
|
+
const a = W(e == null ? void 0 : e.source);
|
|
74
|
+
return a ? K(a, t) : void 0;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Ke({
|
|
77
77
|
explicitSource: e,
|
|
78
78
|
field: t,
|
|
79
79
|
defaultSource: a,
|
|
80
80
|
fallbackSources: r
|
|
81
81
|
}) {
|
|
82
|
-
const n = [a, ...r || []], i =
|
|
82
|
+
const n = [a, ...r || []], i = W(e), o = i ? K(
|
|
83
83
|
i,
|
|
84
|
-
|
|
84
|
+
ce(i, n)
|
|
85
85
|
) : void 0;
|
|
86
86
|
if (o)
|
|
87
87
|
return o;
|
|
88
88
|
if (e !== void 0)
|
|
89
89
|
return;
|
|
90
|
-
const s =
|
|
90
|
+
const s = T(t, a), l = s ? K(
|
|
91
91
|
s,
|
|
92
|
-
|
|
92
|
+
ce(s, n)
|
|
93
93
|
) : void 0;
|
|
94
94
|
if (l)
|
|
95
95
|
return l;
|
|
96
96
|
if ((t == null ? void 0 : t.source) === void 0)
|
|
97
|
-
return
|
|
97
|
+
return W(a);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Zt(e, t) {
|
|
100
100
|
if (!(e != null && e.name) || !(t != null && t.name) || e.name !== t.name)
|
|
101
101
|
return !1;
|
|
102
|
-
const a =
|
|
103
|
-
return !a || !r ? !0 :
|
|
102
|
+
const a = T(e), r = T(t);
|
|
103
|
+
return !a || !r ? !0 : he(a, r);
|
|
104
104
|
}
|
|
105
105
|
function k(e) {
|
|
106
106
|
var t;
|
|
107
|
-
return
|
|
107
|
+
return v((t = S(e)) == null ? void 0 : t.kind);
|
|
108
108
|
}
|
|
109
109
|
function me(e) {
|
|
110
110
|
var t, a;
|
|
111
|
-
return k(e) !== "semantic" ? null : ((a =
|
|
112
|
-
}
|
|
113
|
-
function He(e) {
|
|
114
|
-
var t;
|
|
115
|
-
return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetName);
|
|
111
|
+
return k(e) !== "semantic" ? null : ((a = v((t = S(e)) == null ? void 0 : t.domainId)) == null ? void 0 : a.trim()) || null;
|
|
116
112
|
}
|
|
117
113
|
function We(e) {
|
|
118
114
|
var t;
|
|
119
|
-
return k(e) !== "semantic" ? null :
|
|
115
|
+
return k(e) !== "semantic" ? null : v((t = S(e)) == null ? void 0 : t.datasetName);
|
|
120
116
|
}
|
|
121
|
-
function
|
|
117
|
+
function Qe(e) {
|
|
122
118
|
var t;
|
|
123
|
-
return k(e) !== "
|
|
119
|
+
return k(e) !== "semantic" ? null : v((t = S(e)) == null ? void 0 : t.datasetId);
|
|
124
120
|
}
|
|
125
|
-
function
|
|
121
|
+
function Xe(e) {
|
|
126
122
|
var t;
|
|
127
|
-
return k(e) !== "physical" ? null :
|
|
123
|
+
return k(e) !== "physical" ? null : v((t = S(e)) == null ? void 0 : t.connectionId);
|
|
128
124
|
}
|
|
129
125
|
function Ye(e) {
|
|
130
126
|
var t;
|
|
131
|
-
return k(e) !== "physical" ?
|
|
127
|
+
return k(e) !== "physical" ? null : v((t = S(e)) == null ? void 0 : t.tableName);
|
|
132
128
|
}
|
|
133
|
-
function
|
|
129
|
+
function Je(e) {
|
|
134
130
|
var t;
|
|
135
|
-
return k(e) !== "physical" ? "" :
|
|
131
|
+
return k(e) !== "physical" ? "" : v((t = S(e)) == null ? void 0 : t.databaseName) || "";
|
|
136
132
|
}
|
|
137
|
-
function
|
|
133
|
+
function Ze(e) {
|
|
134
|
+
var t;
|
|
135
|
+
return k(e) !== "physical" ? "" : v((t = S(e)) == null ? void 0 : t.schemaName) || "";
|
|
136
|
+
}
|
|
137
|
+
function et(e) {
|
|
138
138
|
if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
|
|
139
139
|
return e.analyticsIntent.source;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function tt({
|
|
142
142
|
datasets: e,
|
|
143
143
|
requireAtLeastOne: t
|
|
144
144
|
}) {
|
|
@@ -149,24 +149,24 @@ function Ze({
|
|
|
149
149
|
const a = e.map(me), r = new Set(a.filter(Boolean));
|
|
150
150
|
return a.some((n) => !n) || r.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Y(e, t) {
|
|
153
153
|
if (!t)
|
|
154
154
|
return !1;
|
|
155
155
|
if (t.kind === "semantic") {
|
|
156
|
-
const a =
|
|
157
|
-
return me(e) === t.domainId ? a && t.datasetId ? a === t.datasetId :
|
|
156
|
+
const a = Qe(e);
|
|
157
|
+
return me(e) === t.domainId ? a && t.datasetId ? a === t.datasetId : We(e) === t.datasetName : !1;
|
|
158
158
|
}
|
|
159
|
-
return t.kind === "physical" ?
|
|
159
|
+
return t.kind === "physical" ? Xe(e) === t.connectionId && Ye(e) === t.tableName && Je(e) === (t.databaseName || "") && Ze(e) === (t.schemaName || "") : !1;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function ea(e, t) {
|
|
162
162
|
return e.find(
|
|
163
|
-
(a) =>
|
|
163
|
+
(a) => Y(a, t)
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function p(e, t, a) {
|
|
167
167
|
return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function P(e) {
|
|
170
170
|
const t = /* @__PURE__ */ new Set();
|
|
171
171
|
for (const a of e) {
|
|
172
172
|
if (t.has(a))
|
|
@@ -175,19 +175,19 @@ function M(e) {
|
|
|
175
175
|
}
|
|
176
176
|
return null;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function be({
|
|
179
179
|
card: e,
|
|
180
180
|
datasets: t,
|
|
181
181
|
errors: a
|
|
182
182
|
}) {
|
|
183
183
|
if (e.type === "text")
|
|
184
184
|
return;
|
|
185
|
-
const r =
|
|
185
|
+
const r = et(e);
|
|
186
186
|
if (!r) {
|
|
187
187
|
if (t.length <= 1)
|
|
188
188
|
return;
|
|
189
189
|
a.push(
|
|
190
|
-
|
|
190
|
+
p(
|
|
191
191
|
"missing_card_analytics_source",
|
|
192
192
|
"Multi-dataset dashboard cards must include analytics intent with a source so the materializer can choose the correct dataset.",
|
|
193
193
|
e.id
|
|
@@ -195,15 +195,15 @@ function he({
|
|
|
195
195
|
);
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
t.some((n) =>
|
|
199
|
-
|
|
198
|
+
t.some((n) => Y(n, r)) || a.push(
|
|
199
|
+
p(
|
|
200
200
|
"invalid_card_analytics_source",
|
|
201
201
|
"Dashboard cards with an explicit analytics source must use one of the selected datasets.",
|
|
202
202
|
e.id
|
|
203
203
|
)
|
|
204
204
|
);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function M(e) {
|
|
207
207
|
return e.map((t) => t == null ? void 0 : t.source).filter((t) => !!t);
|
|
208
208
|
}
|
|
209
209
|
function U(e) {
|
|
@@ -211,39 +211,39 @@ function U(e) {
|
|
|
211
211
|
(t) => !!(t && typeof t == "object")
|
|
212
212
|
) : [];
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function le(e) {
|
|
215
215
|
return Array.isArray(e) ? e.filter(
|
|
216
216
|
(t) => !!(t && typeof t == "object")
|
|
217
217
|
) : [];
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function at(e) {
|
|
220
220
|
var a, r;
|
|
221
221
|
if (!e)
|
|
222
222
|
return [];
|
|
223
223
|
const t = [e.source];
|
|
224
224
|
return e.kind === "metric" ? t.push(
|
|
225
|
-
...
|
|
225
|
+
...M([
|
|
226
226
|
...U(e.measures),
|
|
227
227
|
e.primaryMeasure,
|
|
228
228
|
e.dateField,
|
|
229
229
|
...U(e.dimensions),
|
|
230
|
-
...
|
|
230
|
+
...le(e.filters).map((n) => n.field)
|
|
231
231
|
])
|
|
232
232
|
) : e.kind === "records" ? t.push(
|
|
233
|
-
...
|
|
233
|
+
...M([
|
|
234
234
|
...U(e.fields),
|
|
235
235
|
e.dateField,
|
|
236
236
|
(a = e.orderBy) == null ? void 0 : a.field,
|
|
237
|
-
...
|
|
237
|
+
...le(e.filters).map((n) => n.field)
|
|
238
238
|
])
|
|
239
239
|
) : e.kind === "inputOptions" ? (((r = e.population) == null ? void 0 : r.kind) === "related_population" && t.push(e.population.baseSource), t.push(
|
|
240
|
-
...
|
|
240
|
+
...M([
|
|
241
241
|
e.labelField,
|
|
242
242
|
e.valueField,
|
|
243
243
|
e.searchField,
|
|
244
244
|
...e.disambiguationFields || []
|
|
245
245
|
])
|
|
246
|
-
)) : e.kind === "sql" && t.push(...
|
|
246
|
+
)) : e.kind === "sql" && t.push(...M(e.fields || [])), t;
|
|
247
247
|
}
|
|
248
248
|
function ge({
|
|
249
249
|
card: e,
|
|
@@ -251,12 +251,12 @@ function ge({
|
|
|
251
251
|
errors: a
|
|
252
252
|
}) {
|
|
253
253
|
if (e.type !== "text") {
|
|
254
|
-
for (const r of
|
|
254
|
+
for (const r of at(e.analyticsIntent))
|
|
255
255
|
if (r && !t.some(
|
|
256
|
-
(n) =>
|
|
256
|
+
(n) => Y(n, r)
|
|
257
257
|
)) {
|
|
258
258
|
a.push(
|
|
259
|
-
|
|
259
|
+
p(
|
|
260
260
|
"invalid_card_query_source",
|
|
261
261
|
"Dashboard card query field references must use one of the selected datasets.",
|
|
262
262
|
e.id
|
|
@@ -266,36 +266,36 @@ function ge({
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Ie({
|
|
270
270
|
card: e,
|
|
271
271
|
errors: t
|
|
272
272
|
}) {
|
|
273
273
|
if (e.type === "text" || !e.analyticsIntent)
|
|
274
274
|
return;
|
|
275
|
-
const a =
|
|
275
|
+
const a = ue(e.analyticsIntent);
|
|
276
276
|
if (!a.ok)
|
|
277
277
|
for (const r of a.errors)
|
|
278
278
|
t.push(
|
|
279
|
-
|
|
279
|
+
p(
|
|
280
280
|
r.code,
|
|
281
281
|
r.path ? `${r.path}: ${r.message}` : r.message,
|
|
282
282
|
e.id
|
|
283
283
|
)
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Ce({
|
|
287
287
|
datasets: e,
|
|
288
288
|
errors: t,
|
|
289
289
|
requireAtLeastOne: a
|
|
290
290
|
}) {
|
|
291
|
-
const r =
|
|
291
|
+
const r = tt({
|
|
292
292
|
datasets: e,
|
|
293
293
|
requireAtLeastOne: a
|
|
294
294
|
});
|
|
295
295
|
if (!r.ok) {
|
|
296
296
|
if (r.issue === "invalid_dataset_count") {
|
|
297
297
|
t.push(
|
|
298
|
-
|
|
298
|
+
p(
|
|
299
299
|
"invalid_dataset_count",
|
|
300
300
|
"Dashboard authoring requires at least one selected dataset."
|
|
301
301
|
)
|
|
@@ -303,20 +303,20 @@ function Ie({
|
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
t.push(
|
|
306
|
-
|
|
306
|
+
p(
|
|
307
307
|
"invalid_multi_dataset_scope",
|
|
308
308
|
"Multi-dataset dashboard authoring is limited to semantic datasets from one domain."
|
|
309
309
|
)
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function ye({
|
|
314
314
|
input: e,
|
|
315
315
|
errors: t
|
|
316
316
|
}) {
|
|
317
317
|
var a;
|
|
318
318
|
(a = e.filter.sql) != null && a.trim() && t.push(
|
|
319
|
-
|
|
319
|
+
p(
|
|
320
320
|
"generated_filter_sql_out_of_scope",
|
|
321
321
|
`Generated dashboard filter "${e.label}" must use grounded filter configuration; custom SQL is outside the dashboard-authoring contract.`
|
|
322
322
|
)
|
|
@@ -327,33 +327,33 @@ function Q({
|
|
|
327
327
|
errors: t
|
|
328
328
|
}) {
|
|
329
329
|
"interactionConfig" in e && t.push(
|
|
330
|
-
|
|
330
|
+
p(
|
|
331
331
|
"legacy_card_interactions_unsupported",
|
|
332
332
|
"Dashboard authoring accepts click-to-filter settings only through card.clickToFilter.",
|
|
333
333
|
e.id
|
|
334
334
|
)
|
|
335
|
-
), e.clickToFilter !== void 0 && !
|
|
336
|
-
|
|
335
|
+
), e.clickToFilter !== void 0 && !Ae.safeParse(e.clickToFilter).success && t.push(
|
|
336
|
+
p(
|
|
337
337
|
"invalid_click_to_filter",
|
|
338
338
|
"Dashboard card clickToFilter settings do not match the canonical schema.",
|
|
339
339
|
e.id
|
|
340
340
|
)
|
|
341
|
-
), e.respondsToSelections !== void 0 && !
|
|
342
|
-
|
|
341
|
+
), e.respondsToSelections !== void 0 && !Oe.safeParse(e.respondsToSelections).success && t.push(
|
|
342
|
+
p(
|
|
343
343
|
"invalid_responds_to_selections",
|
|
344
344
|
"Dashboard card respondsToSelections must be a boolean.",
|
|
345
345
|
e.id
|
|
346
346
|
)
|
|
347
347
|
);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
var
|
|
349
|
+
function rt(e) {
|
|
350
|
+
var h, C;
|
|
351
351
|
const t = [];
|
|
352
352
|
if (!e || typeof e != "object")
|
|
353
353
|
return {
|
|
354
354
|
ok: !1,
|
|
355
355
|
errors: [
|
|
356
|
-
|
|
356
|
+
p(
|
|
357
357
|
"invalid_plan",
|
|
358
358
|
"Dashboard plan must be a structured object."
|
|
359
359
|
)
|
|
@@ -361,84 +361,84 @@ function tt(e) {
|
|
|
361
361
|
warnings: []
|
|
362
362
|
};
|
|
363
363
|
const a = e, r = [...a.warnings || []];
|
|
364
|
-
a.version !== 1 && t.push(
|
|
364
|
+
a.version !== 1 && t.push(p("invalid_version", "Dashboard plan version must be 1.")), (h = a.title) != null && h.trim() || t.push(p("missing_title", "Dashboard plan needs a title."));
|
|
365
365
|
const n = Array.isArray(a.datasets) ? a.datasets : [], i = Array.isArray(a.sheets) ? a.sheets : [];
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
Ce({ datasets: n, errors: t, requireAtLeastOne: !0 }), i.length !== 1 && t.push(
|
|
367
|
+
p(
|
|
368
368
|
"invalid_sheet_count",
|
|
369
369
|
"MVP dashboard authoring creates exactly one dashboard sheet."
|
|
370
370
|
)
|
|
371
371
|
);
|
|
372
372
|
const o = i[0];
|
|
373
373
|
o && o.kind !== "dashboard" && t.push(
|
|
374
|
-
|
|
374
|
+
p("invalid_sheet_kind", 'Generated sheet must use kind "dashboard".')
|
|
375
375
|
);
|
|
376
376
|
const s = (o == null ? void 0 : o.cards) || [];
|
|
377
|
-
s.length >
|
|
378
|
-
|
|
377
|
+
s.length > L && t.push(
|
|
378
|
+
p(
|
|
379
379
|
"too_many_cards",
|
|
380
|
-
`Generated dashboards can contain at most ${
|
|
380
|
+
`Generated dashboards can contain at most ${L} cards.`
|
|
381
381
|
)
|
|
382
382
|
);
|
|
383
|
-
const l =
|
|
383
|
+
const l = P(s.map((u) => u.id));
|
|
384
384
|
l && t.push(
|
|
385
|
-
|
|
385
|
+
p("duplicate_card_id", `Duplicate generated card id: ${l}.`)
|
|
386
386
|
);
|
|
387
|
-
const d =
|
|
387
|
+
const d = P(s.map((u) => u.frameId));
|
|
388
388
|
d && t.push(
|
|
389
|
-
|
|
389
|
+
p(
|
|
390
390
|
"duplicate_frame_id",
|
|
391
391
|
`Duplicate generated frame id: ${d}.`
|
|
392
392
|
)
|
|
393
393
|
);
|
|
394
394
|
for (const u of s)
|
|
395
|
-
(C = u.title) != null && C.trim() || t.push(
|
|
396
|
-
|
|
395
|
+
(C = u.title) != null && C.trim() || t.push(p("missing_card_title", "Card title is required.", u.id)), u.type === "custom" && t.push(
|
|
396
|
+
p(
|
|
397
397
|
"custom_visual_out_of_scope",
|
|
398
398
|
"Whole-dashboard authoring supports built-in visual types only.",
|
|
399
399
|
u.id
|
|
400
400
|
)
|
|
401
401
|
), u.type !== "text" && !u.analyticsIntent && r.push(
|
|
402
|
-
|
|
402
|
+
p(
|
|
403
403
|
"missing_analytics_intent",
|
|
404
404
|
"Non-text card has no analytics intent and may be skipped by the app layer.",
|
|
405
405
|
u.id
|
|
406
406
|
)
|
|
407
|
-
),
|
|
408
|
-
const
|
|
407
|
+
), be({ card: u, datasets: n, errors: t }), Ie({ card: u, errors: t }), ge({ card: u, datasets: n, errors: t }), Q({ card: u, errors: t });
|
|
408
|
+
const f = Array.isArray(a.filterInputs) ? a.filterInputs : [], m = f.map((u) => u.id), y = P(m);
|
|
409
409
|
y && t.push(
|
|
410
|
-
|
|
410
|
+
p(
|
|
411
411
|
"duplicate_input_id",
|
|
412
412
|
`Duplicate dashboard input id: ${y}.`
|
|
413
413
|
)
|
|
414
414
|
);
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
415
|
+
const b = f.map((u) => u.variableName).filter(Boolean) || [], g = P(b);
|
|
416
|
+
g && t.push(
|
|
417
|
+
p(
|
|
418
418
|
"duplicate_input_variable",
|
|
419
|
-
`Duplicate dashboard input variable name: ${
|
|
419
|
+
`Duplicate dashboard input variable name: ${g}.`
|
|
420
420
|
)
|
|
421
421
|
);
|
|
422
|
-
for (const u of
|
|
423
|
-
|
|
422
|
+
for (const u of f)
|
|
423
|
+
ye({ input: u, errors: t });
|
|
424
424
|
const c = Array.isArray(a.calculatedFields) ? a.calculatedFields : [];
|
|
425
425
|
for (const u of c)
|
|
426
426
|
u.scope === "domain" && u.reuseOnly !== !0 && t.push(
|
|
427
|
-
|
|
427
|
+
p(
|
|
428
428
|
"domain_calculated_field_create_out_of_scope",
|
|
429
429
|
`Creating domain calculated field "${u.name}" is outside MVP.`
|
|
430
430
|
)
|
|
431
431
|
);
|
|
432
432
|
return { ok: t.length === 0, errors: t, warnings: r };
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function nt(e) {
|
|
435
435
|
var o;
|
|
436
436
|
const t = [];
|
|
437
437
|
if (!e || typeof e != "object")
|
|
438
438
|
return {
|
|
439
439
|
ok: !1,
|
|
440
440
|
errors: [
|
|
441
|
-
|
|
441
|
+
p(
|
|
442
442
|
"invalid_change_plan",
|
|
443
443
|
"Dashboard change plan must be a structured object."
|
|
444
444
|
)
|
|
@@ -447,30 +447,30 @@ function at(e) {
|
|
|
447
447
|
};
|
|
448
448
|
const a = e, r = [...a.warnings || []];
|
|
449
449
|
a.version !== 1 && t.push(
|
|
450
|
-
|
|
450
|
+
p("invalid_version", "Dashboard change plan version must be 1.")
|
|
451
451
|
), (o = a.dashboardId) != null && o.trim() || t.push(
|
|
452
|
-
|
|
452
|
+
p("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
|
|
453
453
|
);
|
|
454
454
|
const n = Array.isArray(a.datasets) ? a.datasets : [], i = Array.isArray(a.operations) ? a.operations : [];
|
|
455
|
-
|
|
455
|
+
Ce({ datasets: n, errors: t, requireAtLeastOne: !1 });
|
|
456
456
|
for (const s of i) {
|
|
457
457
|
if (s.kind === "unsupported") {
|
|
458
458
|
r.push(
|
|
459
|
-
|
|
459
|
+
p("unsupported_operation", s.reason || s.requestedAction)
|
|
460
460
|
);
|
|
461
461
|
continue;
|
|
462
462
|
}
|
|
463
463
|
if (s.kind === "addCard" && s.card.type === "custom" && t.push(
|
|
464
|
-
|
|
464
|
+
p(
|
|
465
465
|
"custom_visual_out_of_scope",
|
|
466
466
|
"Whole-dashboard authoring supports built-in visual types only.",
|
|
467
467
|
s.card.id
|
|
468
468
|
)
|
|
469
|
-
), s.kind === "addCard" && (
|
|
469
|
+
), s.kind === "addCard" && (be({
|
|
470
470
|
card: s.card,
|
|
471
471
|
datasets: n,
|
|
472
472
|
errors: t
|
|
473
|
-
}),
|
|
473
|
+
}), Ie({
|
|
474
474
|
card: s.card,
|
|
475
475
|
errors: t
|
|
476
476
|
}), ge({
|
|
@@ -480,7 +480,7 @@ function at(e) {
|
|
|
480
480
|
}), Q({ card: s.card, errors: t })), s.kind === "updateCardSelectionSettings") {
|
|
481
481
|
const l = s.card;
|
|
482
482
|
s.card.clickToFilter === void 0 && s.card.respondsToSelections === void 0 && t.push(
|
|
483
|
-
|
|
483
|
+
p(
|
|
484
484
|
"empty_card_selection_settings_update",
|
|
485
485
|
"A card selection-settings update must provide clickToFilter or respondsToSelections.",
|
|
486
486
|
s.cardId
|
|
@@ -498,8 +498,8 @@ function at(e) {
|
|
|
498
498
|
errors: t
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
s.kind === "addFilterInput" &&
|
|
502
|
-
|
|
501
|
+
s.kind === "addFilterInput" && ye({ input: s.input, errors: t }), s.kind === "addCalculatedField" && s.field.scope === "domain" && s.field.reuseOnly !== !0 && t.push(
|
|
502
|
+
p(
|
|
503
503
|
"domain_calculated_field_create_out_of_scope",
|
|
504
504
|
`Creating domain calculated field "${s.field.name}" is outside MVP.`
|
|
505
505
|
)
|
|
@@ -507,14 +507,14 @@ function at(e) {
|
|
|
507
507
|
}
|
|
508
508
|
return { ok: t.length === 0, errors: t, warnings: r };
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const it = {
|
|
511
511
|
lg: 48,
|
|
512
512
|
md: 36,
|
|
513
513
|
sm: 24,
|
|
514
514
|
xs: 12,
|
|
515
515
|
xxs: 6
|
|
516
516
|
};
|
|
517
|
-
function
|
|
517
|
+
function ot(e, t) {
|
|
518
518
|
let a = 0, r = 0, n = 0;
|
|
519
519
|
return e.map((i) => {
|
|
520
520
|
const o = Math.min(i.w, t);
|
|
@@ -532,22 +532,22 @@ function nt(e, t) {
|
|
|
532
532
|
return a += o, n = Math.max(n, i.h), s;
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function st(e) {
|
|
536
536
|
const t = [...e].sort((l, d) => l.priority - d.priority), a = t.filter((l) => l.role === "kpi"), r = t.filter((l) => l.role === "chart"), n = t.filter((l) => l.role === "table"), i = t.filter((l) => l.role === "text"), o = i.slice(0, 1), s = i.slice(o.length);
|
|
537
537
|
return { kpis: a, introText: o, charts: r, tables: n, supportingText: s };
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function dt(e, t, a) {
|
|
540
540
|
return t === "xxs" || t === "xs" ? a : t === "sm" ? Math.min(12, a) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function ct(e, t, a, r) {
|
|
543
543
|
return a === "xxs" || a === "xs" || a === "sm" || a === "md" || t === 1 || t % 2 === 1 && e === 0 ? r : r / 2;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function lt(e) {
|
|
546
546
|
const { item: t, band: a, index: r, bandCount: n, breakpoint: i, columns: o } = e;
|
|
547
547
|
return a === "kpi" ? {
|
|
548
548
|
...t,
|
|
549
549
|
band: a,
|
|
550
|
-
w:
|
|
550
|
+
w: dt(n, i, o),
|
|
551
551
|
h: 15,
|
|
552
552
|
minW: Math.min(6, o),
|
|
553
553
|
minH: 12
|
|
@@ -575,7 +575,7 @@ function dt(e) {
|
|
|
575
575
|
} : {
|
|
576
576
|
...t,
|
|
577
577
|
band: a,
|
|
578
|
-
w:
|
|
578
|
+
w: ct(r, n, i, o),
|
|
579
579
|
h: i === "xxs" || i === "xs" ? 28 : 30,
|
|
580
580
|
minW: Math.min(12, o),
|
|
581
581
|
minH: 16
|
|
@@ -583,7 +583,7 @@ function dt(e) {
|
|
|
583
583
|
}
|
|
584
584
|
function A(e, t, a, r) {
|
|
585
585
|
return e.map(
|
|
586
|
-
(n, i) =>
|
|
586
|
+
(n, i) => lt({
|
|
587
587
|
item: n,
|
|
588
588
|
band: t,
|
|
589
589
|
index: i,
|
|
@@ -593,46 +593,46 @@ function A(e, t, a, r) {
|
|
|
593
593
|
})
|
|
594
594
|
);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
const t =
|
|
596
|
+
function J(e) {
|
|
597
|
+
const t = st(e);
|
|
598
598
|
return Object.fromEntries(
|
|
599
|
-
|
|
600
|
-
const r =
|
|
599
|
+
ke.map((a) => {
|
|
600
|
+
const r = it[a], n = [
|
|
601
601
|
...A(t.introText, "introText", a, r),
|
|
602
602
|
...A(t.kpis, "kpi", a, r),
|
|
603
603
|
...A(t.charts, "chart", a, r),
|
|
604
604
|
...A(t.tables, "table", a, r),
|
|
605
605
|
...A(t.supportingText, "supportingText", a, r)
|
|
606
606
|
];
|
|
607
|
-
return [a,
|
|
607
|
+
return [a, ot(n, r)];
|
|
608
608
|
})
|
|
609
609
|
);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
const t =
|
|
611
|
+
function ut(e) {
|
|
612
|
+
const t = Be(e);
|
|
613
613
|
return t === "datetime" ? "date" : t === "unknown" ? "string" : t;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function pt(e) {
|
|
616
616
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
617
617
|
}
|
|
618
|
-
function ut(e) {
|
|
619
|
-
return lt(e) && typeof e.filterId == "string" && typeof e.operation == "string" && Array.isArray(e.values);
|
|
620
|
-
}
|
|
621
618
|
function ft(e) {
|
|
619
|
+
return pt(e) && typeof e.filterId == "string" && typeof e.operation == "string" && Array.isArray(e.values);
|
|
620
|
+
}
|
|
621
|
+
function ht(e) {
|
|
622
622
|
return e.filter(
|
|
623
623
|
(t) => typeof t == "string" || typeof t == "number"
|
|
624
624
|
);
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function mt(e) {
|
|
627
627
|
return e.filter(
|
|
628
628
|
(t) => t instanceof Date || typeof t == "string"
|
|
629
629
|
);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Z(e, t) {
|
|
632
632
|
if (t === void 0)
|
|
633
633
|
return;
|
|
634
|
-
const a =
|
|
635
|
-
if (
|
|
634
|
+
const a = ut(e.dataType), r = e.operation || "in";
|
|
635
|
+
if (ft(t))
|
|
636
636
|
return j({
|
|
637
637
|
definition: e,
|
|
638
638
|
sourceValue: t,
|
|
@@ -660,7 +660,7 @@ function ee(e, t) {
|
|
|
660
660
|
semanticContext: e.semanticContext
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
|
-
const n = Array.isArray(t) ? t : [t], i = a === "date" ?
|
|
663
|
+
const n = Array.isArray(t) ? t : [t], i = a === "date" ? mt(n) : ht(n);
|
|
664
664
|
if (i.length !== 0 && !((r === "between" || r === "not between") && i.length < 2))
|
|
665
665
|
return j({
|
|
666
666
|
definition: e,
|
|
@@ -676,10 +676,10 @@ function ee(e, t) {
|
|
|
676
676
|
}
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function _e(e, t, a) {
|
|
680
680
|
return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function bt(e, t, a) {
|
|
683
683
|
const r = (t || []).filter(
|
|
684
684
|
(n) => n.scope === "card" && n.targetCardId === a
|
|
685
685
|
).map((n) => n.field).filter(Boolean);
|
|
@@ -691,11 +691,11 @@ function mt(e, t, a) {
|
|
|
691
691
|
]
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function gt(e, t, a) {
|
|
695
695
|
return t.clickToFilter === void 0 && t.respondsToSelections === void 0 ? e : {
|
|
696
696
|
...e,
|
|
697
697
|
...t.clickToFilter ? {
|
|
698
|
-
clickToFilter:
|
|
698
|
+
clickToFilter: G(
|
|
699
699
|
t.clickToFilter,
|
|
700
700
|
{ cardIds: Object.fromEntries(a) }
|
|
701
701
|
)
|
|
@@ -703,50 +703,28 @@ function ht(e, t, a) {
|
|
|
703
703
|
...t.respondsToSelections !== void 0 ? { respondsToSelections: t.respondsToSelections } : {}
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
function Y(e, t) {
|
|
707
|
-
return Array.from(
|
|
708
|
-
new Set(
|
|
709
|
-
(e || []).map((a) => t.get(a)).filter((a) => !!a)
|
|
710
|
-
)
|
|
711
|
-
);
|
|
712
|
-
}
|
|
713
|
-
function gt(e, t) {
|
|
714
|
-
if ((e == null ? void 0 : e.kind) !== "cards")
|
|
715
|
-
return e;
|
|
716
|
-
const a = Y(e.cardIds, t);
|
|
717
|
-
return a.length > 0 ? { ...e, cardIds: a } : null;
|
|
718
|
-
}
|
|
719
|
-
function bt(e, t) {
|
|
720
|
-
return !e.applyToCardIds && !e.excludeCardIds ? e : {
|
|
721
|
-
...e,
|
|
722
|
-
...e.applyToCardIds ? {
|
|
723
|
-
applyToCardIds: Y(
|
|
724
|
-
e.applyToCardIds,
|
|
725
|
-
t
|
|
726
|
-
)
|
|
727
|
-
} : {},
|
|
728
|
-
...e.excludeCardIds ? {
|
|
729
|
-
excludeCardIds: Y(
|
|
730
|
-
e.excludeCardIds,
|
|
731
|
-
t
|
|
732
|
-
)
|
|
733
|
-
} : {}
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
706
|
function It(e, t) {
|
|
707
|
+
if (!e) return e;
|
|
708
|
+
const a = fe(e, {
|
|
709
|
+
renamedCardIds: t,
|
|
710
|
+
keepOnlyRenamedCardIds: !0
|
|
711
|
+
});
|
|
712
|
+
return Ve(a) ? null : a;
|
|
713
|
+
}
|
|
714
|
+
function Ct(e, t) {
|
|
737
715
|
const a = {}, r = [];
|
|
738
716
|
return {
|
|
739
717
|
inputs: (e.filterInputs || []).flatMap(
|
|
740
718
|
(i, o) => {
|
|
741
|
-
const s =
|
|
719
|
+
const s = It(i.scope, t);
|
|
742
720
|
if (s === null)
|
|
743
721
|
return r.push(
|
|
744
|
-
|
|
722
|
+
_e(
|
|
745
723
|
"filter_input_scope_empty",
|
|
746
|
-
`Filter input "${i.label}" was skipped because all scoped cards were skipped during query validation.`
|
|
724
|
+
`Filter input "${i.label}" was skipped because all scoped cards or tabs were skipped during query validation.`
|
|
747
725
|
)
|
|
748
726
|
), [];
|
|
749
|
-
const l =
|
|
727
|
+
const l = Z(
|
|
750
728
|
i.filter,
|
|
751
729
|
i.defaultValue
|
|
752
730
|
);
|
|
@@ -769,7 +747,8 @@ function It(e, t) {
|
|
|
769
747
|
order: o
|
|
770
748
|
},
|
|
771
749
|
exports: ["label", "value", "start", "end", "range"],
|
|
772
|
-
|
|
750
|
+
// Reach is the scope (S-1): a filter definition stores none.
|
|
751
|
+
filter: pe(i.filter)
|
|
773
752
|
}
|
|
774
753
|
];
|
|
775
754
|
}
|
|
@@ -778,9 +757,9 @@ function It(e, t) {
|
|
|
778
757
|
defaultInputValues: a.shared && Object.keys(a.shared).length > 0 ? a : void 0
|
|
779
758
|
};
|
|
780
759
|
}
|
|
781
|
-
function
|
|
782
|
-
var
|
|
783
|
-
const t =
|
|
760
|
+
function ta(e) {
|
|
761
|
+
var b, g;
|
|
762
|
+
const t = rt(e.plan);
|
|
784
763
|
if (!t.ok)
|
|
785
764
|
throw new Error(
|
|
786
765
|
t.errors.map((c) => c.message).join(`
|
|
@@ -795,9 +774,9 @@ function ea(e) {
|
|
|
795
774
|
])
|
|
796
775
|
), s = [];
|
|
797
776
|
for (const c of a.cards) {
|
|
798
|
-
const
|
|
799
|
-
if (!
|
|
800
|
-
const u =
|
|
777
|
+
const h = i.get(c.id);
|
|
778
|
+
if (!h) {
|
|
779
|
+
const u = _e(
|
|
801
780
|
"missing_card_artifact",
|
|
802
781
|
`Card "${c.title}" was skipped because no generated artifact was supplied.`,
|
|
803
782
|
c.id
|
|
@@ -805,10 +784,10 @@ function ea(e) {
|
|
|
805
784
|
n.push(u);
|
|
806
785
|
continue;
|
|
807
786
|
}
|
|
808
|
-
r.push(...
|
|
809
|
-
const C =
|
|
810
|
-
|
|
811
|
-
|
|
787
|
+
r.push(...h.warnings || []);
|
|
788
|
+
const C = gt(
|
|
789
|
+
bt(
|
|
790
|
+
h.card,
|
|
812
791
|
e.plan.calculatedFields,
|
|
813
792
|
c.id
|
|
814
793
|
),
|
|
@@ -823,10 +802,10 @@ function ea(e) {
|
|
|
823
802
|
}
|
|
824
803
|
if (s.length === 0)
|
|
825
804
|
throw new Error("Dashboard plan did not produce any persistable cards.");
|
|
826
|
-
const { inputs: l, defaultInputValues: d, warnings:
|
|
827
|
-
r.push(...
|
|
828
|
-
const
|
|
829
|
-
a.cards.filter((c) => s.some((
|
|
805
|
+
const { inputs: l, defaultInputValues: d, warnings: f } = Ct(e.plan, o);
|
|
806
|
+
r.push(...f);
|
|
807
|
+
const m = J(
|
|
808
|
+
a.cards.filter((c) => s.some((h) => h.id === c.frameId)).map((c) => ({
|
|
830
809
|
frameId: c.frameId,
|
|
831
810
|
priority: c.priority,
|
|
832
811
|
role: c.role
|
|
@@ -846,22 +825,22 @@ function ea(e) {
|
|
|
846
825
|
title: a.title,
|
|
847
826
|
description: a.description,
|
|
848
827
|
frames: s,
|
|
849
|
-
layouts:
|
|
850
|
-
calculatedFields: (
|
|
828
|
+
layouts: m,
|
|
829
|
+
calculatedFields: (b = e.plan.calculatedFields) == null ? void 0 : b.filter((c) => c.scope === "sheet" && c.field).map((c) => c.field)
|
|
851
830
|
}
|
|
852
831
|
],
|
|
853
|
-
calculatedFields: (
|
|
832
|
+
calculatedFields: (g = e.plan.calculatedFields) == null ? void 0 : g.filter((c) => c.scope === "dashboard" && c.field).map((c) => c.field),
|
|
854
833
|
inputs: l,
|
|
855
834
|
...d ? { defaultInputValues: d } : {}
|
|
856
835
|
}, warnings: r, skippedOperations: n };
|
|
857
836
|
}
|
|
858
|
-
function
|
|
837
|
+
function F(e, t, a) {
|
|
859
838
|
return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
|
|
860
839
|
}
|
|
861
|
-
function
|
|
840
|
+
function yt(e) {
|
|
862
841
|
return JSON.parse(JSON.stringify(e));
|
|
863
842
|
}
|
|
864
|
-
function
|
|
843
|
+
function _t(e) {
|
|
865
844
|
var t;
|
|
866
845
|
return (t = e.sheets) == null ? void 0 : t.find(
|
|
867
846
|
(a) => (a.kind || "dashboard") === "dashboard"
|
|
@@ -877,40 +856,40 @@ function $(e, t) {
|
|
|
877
856
|
}
|
|
878
857
|
return null;
|
|
879
858
|
}
|
|
880
|
-
function
|
|
859
|
+
function De(e) {
|
|
881
860
|
var a, r;
|
|
882
861
|
const t = (r = (a = e.cards) == null ? void 0 : a[0]) == null ? void 0 : r.type;
|
|
883
862
|
return t === "kpi" ? "kpi" : t === "table" || t === "detailTable" || t === "pivotTable" ? "table" : t === "text" ? "text" : "chart";
|
|
884
863
|
}
|
|
885
|
-
function
|
|
864
|
+
function Dt(e) {
|
|
886
865
|
var t;
|
|
887
866
|
return new Map(
|
|
888
867
|
(((t = e.layouts) == null ? void 0 : t.lg) || []).map((a, r) => [a.i, r])
|
|
889
868
|
);
|
|
890
869
|
}
|
|
891
|
-
function
|
|
892
|
-
const a =
|
|
870
|
+
function Se(e, t = /* @__PURE__ */ new Map()) {
|
|
871
|
+
const a = Dt(e), r = Math.max(
|
|
893
872
|
a.size,
|
|
894
873
|
t.size
|
|
895
874
|
), n = (e.frames || []).map(
|
|
896
875
|
(i, o) => ({
|
|
897
876
|
frameId: i.id,
|
|
898
|
-
role:
|
|
877
|
+
role: De(i),
|
|
899
878
|
priority: t.get(i.id) ?? a.get(i.id) ?? r + o
|
|
900
879
|
})
|
|
901
880
|
);
|
|
902
|
-
e.layouts =
|
|
881
|
+
e.layouts = J(n);
|
|
903
882
|
}
|
|
904
|
-
function
|
|
883
|
+
function St(e) {
|
|
905
884
|
return Object.values(e.layouts || {}).some((t) => t.length > 0);
|
|
906
885
|
}
|
|
907
|
-
function
|
|
908
|
-
if (!
|
|
909
|
-
|
|
886
|
+
function Tt(e, t) {
|
|
887
|
+
if (!St(e)) {
|
|
888
|
+
Se(e);
|
|
910
889
|
return;
|
|
911
890
|
}
|
|
912
|
-
const a =
|
|
913
|
-
{ frameId: t.id, role:
|
|
891
|
+
const a = J([
|
|
892
|
+
{ frameId: t.id, role: De(t), priority: 0 }
|
|
914
893
|
]);
|
|
915
894
|
e.layouts ?? (e.layouts = {});
|
|
916
895
|
for (const [r, n] of Object.entries(a)) {
|
|
@@ -932,7 +911,7 @@ function St(e, t) {
|
|
|
932
911
|
}
|
|
933
912
|
function vt(e, t) {
|
|
934
913
|
var r;
|
|
935
|
-
const a =
|
|
914
|
+
const a = Z(
|
|
936
915
|
t.filter,
|
|
937
916
|
t.defaultValue
|
|
938
917
|
);
|
|
@@ -944,22 +923,22 @@ function vt(e, t) {
|
|
|
944
923
|
}
|
|
945
924
|
});
|
|
946
925
|
}
|
|
947
|
-
function
|
|
926
|
+
function aa(e) {
|
|
948
927
|
var l;
|
|
949
|
-
const t =
|
|
928
|
+
const t = nt(e.changePlan);
|
|
950
929
|
if (!t.ok)
|
|
951
930
|
throw new Error(
|
|
952
931
|
t.errors.map((d) => d.message).join(`
|
|
953
932
|
`) || "Dashboard change plan is invalid."
|
|
954
933
|
);
|
|
955
|
-
const a =
|
|
934
|
+
const a = yt(e.dashboard), r = [...t.warnings], n = [], i = new Map(
|
|
956
935
|
e.cardArtifacts.map((d) => [d.planCardId, d])
|
|
957
936
|
), o = new Map(
|
|
958
937
|
e.cardArtifacts.map((d) => [
|
|
959
938
|
d.planCardId,
|
|
960
939
|
d.card.id
|
|
961
940
|
])
|
|
962
|
-
), s =
|
|
941
|
+
), s = _t(a);
|
|
963
942
|
if (!s)
|
|
964
943
|
throw new Error("Dashboard has no editable dashboard sheet.");
|
|
965
944
|
s.frames ?? (s.frames = []);
|
|
@@ -967,25 +946,25 @@ function ta(e) {
|
|
|
967
946
|
switch (d.kind) {
|
|
968
947
|
case "addCard": {
|
|
969
948
|
if ((s.frames || []).reduce(
|
|
970
|
-
(
|
|
971
|
-
var
|
|
972
|
-
return
|
|
949
|
+
(g, c) => {
|
|
950
|
+
var h;
|
|
951
|
+
return g + (((h = c.cards) == null ? void 0 : h.length) || 0);
|
|
973
952
|
},
|
|
974
953
|
0
|
|
975
|
-
) >=
|
|
954
|
+
) >= L) {
|
|
976
955
|
n.push(
|
|
977
|
-
|
|
956
|
+
F(
|
|
978
957
|
"generated_card_limit_reached",
|
|
979
|
-
`AI refinement is capped at ${
|
|
958
|
+
`AI refinement is capped at ${L} cards.`,
|
|
980
959
|
d.card.id
|
|
981
960
|
)
|
|
982
961
|
);
|
|
983
962
|
break;
|
|
984
963
|
}
|
|
985
|
-
const
|
|
986
|
-
if (!
|
|
964
|
+
const m = i.get(d.card.id);
|
|
965
|
+
if (!m) {
|
|
987
966
|
n.push(
|
|
988
|
-
|
|
967
|
+
F(
|
|
989
968
|
"missing_card_artifact",
|
|
990
969
|
`Card "${d.card.title}" was skipped because no generated artifact was supplied.`,
|
|
991
970
|
d.card.id
|
|
@@ -994,9 +973,9 @@ function ta(e) {
|
|
|
994
973
|
break;
|
|
995
974
|
}
|
|
996
975
|
const y = {
|
|
997
|
-
...
|
|
976
|
+
...m.card,
|
|
998
977
|
...d.card.clickToFilter ? {
|
|
999
|
-
clickToFilter:
|
|
978
|
+
clickToFilter: G(
|
|
1000
979
|
d.card.clickToFilter,
|
|
1001
980
|
{ cardIds: Object.fromEntries(o) }
|
|
1002
981
|
)
|
|
@@ -1004,34 +983,36 @@ function ta(e) {
|
|
|
1004
983
|
...d.card.respondsToSelections !== void 0 ? {
|
|
1005
984
|
respondsToSelections: d.card.respondsToSelections
|
|
1006
985
|
} : {}
|
|
1007
|
-
},
|
|
986
|
+
}, b = {
|
|
1008
987
|
id: d.card.frameId,
|
|
1009
988
|
cards: [y],
|
|
1010
989
|
activeCardId: y.id
|
|
1011
990
|
};
|
|
1012
|
-
s.frames.push(
|
|
991
|
+
s.frames.push(b), Tt(s, b);
|
|
1013
992
|
break;
|
|
1014
993
|
}
|
|
1015
994
|
case "addFilterInput": {
|
|
1016
995
|
a.inputs ?? (a.inputs = []);
|
|
1017
|
-
const
|
|
996
|
+
const f = {
|
|
1018
997
|
id: d.input.id,
|
|
1019
998
|
kind: "filter",
|
|
1020
999
|
label: d.input.label,
|
|
1021
1000
|
variableName: d.input.variableName,
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1001
|
+
// A card this change adds is named by its plan id; an existing
|
|
1002
|
+
// card keeps its id (the scope rule's one rewrite, M2).
|
|
1003
|
+
scope: d.input.scope ? fe(d.input.scope, {
|
|
1004
|
+
renamedCardIds: o
|
|
1005
|
+
}) : { kind: "allSheets", sheetKinds: ["dashboard"] },
|
|
1026
1006
|
runtimeScope: "shared",
|
|
1027
1007
|
presentation: {
|
|
1028
1008
|
placement: "toolbar",
|
|
1029
1009
|
order: a.inputs.length
|
|
1030
1010
|
},
|
|
1031
1011
|
exports: ["label", "value", "start", "end", "range"],
|
|
1032
|
-
|
|
1012
|
+
// Reach is the scope (S-1): a filter definition stores none.
|
|
1013
|
+
filter: pe(d.input.filter)
|
|
1033
1014
|
};
|
|
1034
|
-
a.inputs.push(
|
|
1015
|
+
a.inputs.push(f), vt(a, d.input);
|
|
1035
1016
|
break;
|
|
1036
1017
|
}
|
|
1037
1018
|
case "addCalculatedField": {
|
|
@@ -1040,9 +1021,9 @@ function ta(e) {
|
|
|
1040
1021
|
else if (d.field.scope === "sheet" && d.field.field)
|
|
1041
1022
|
s.calculatedFields ?? (s.calculatedFields = []), s.calculatedFields.push(d.field.field);
|
|
1042
1023
|
else if (d.field.scope === "card" && d.field.field) {
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1045
|
-
|
|
1024
|
+
const f = d.field.targetCardId ? $(a, d.field.targetCardId) : null;
|
|
1025
|
+
f ? ((l = f.card).calculatedFields ?? (l.calculatedFields = []), f.card.calculatedFields.push(d.field.field)) : n.push(
|
|
1026
|
+
F(
|
|
1046
1027
|
"missing_calculated_field_target",
|
|
1047
1028
|
`Calculated field "${d.field.name}" needs a valid target card.`
|
|
1048
1029
|
)
|
|
@@ -1051,10 +1032,10 @@ function ta(e) {
|
|
|
1051
1032
|
break;
|
|
1052
1033
|
}
|
|
1053
1034
|
case "renameCard": {
|
|
1054
|
-
const
|
|
1055
|
-
if (!
|
|
1035
|
+
const f = $(a, d.cardId);
|
|
1036
|
+
if (!f) {
|
|
1056
1037
|
n.push(
|
|
1057
|
-
|
|
1038
|
+
F(
|
|
1058
1039
|
"card_not_found",
|
|
1059
1040
|
`Card "${d.cardId}" could not be renamed because it was not found.`,
|
|
1060
1041
|
d.cardId
|
|
@@ -1062,14 +1043,14 @@ function ta(e) {
|
|
|
1062
1043
|
);
|
|
1063
1044
|
break;
|
|
1064
1045
|
}
|
|
1065
|
-
|
|
1046
|
+
f.card.title = d.title, d.description !== void 0 && (f.card.description = d.description);
|
|
1066
1047
|
break;
|
|
1067
1048
|
}
|
|
1068
1049
|
case "updateCardSelectionSettings": {
|
|
1069
|
-
const
|
|
1070
|
-
if (!
|
|
1050
|
+
const f = o.get(d.cardId) ?? d.cardId, m = $(a, f);
|
|
1051
|
+
if (!m) {
|
|
1071
1052
|
n.push(
|
|
1072
|
-
|
|
1053
|
+
F(
|
|
1073
1054
|
"card_not_found",
|
|
1074
1055
|
`Card "${d.cardId}" could not be updated because it was not found.`,
|
|
1075
1056
|
d.cardId
|
|
@@ -1077,24 +1058,24 @@ function ta(e) {
|
|
|
1077
1058
|
);
|
|
1078
1059
|
break;
|
|
1079
1060
|
}
|
|
1080
|
-
d.card.clickToFilter !== void 0 && (
|
|
1061
|
+
d.card.clickToFilter !== void 0 && (m.card.clickToFilter = G(
|
|
1081
1062
|
d.card.clickToFilter,
|
|
1082
1063
|
{ cardIds: Object.fromEntries(o) }
|
|
1083
|
-
)), d.card.respondsToSelections !== void 0 && (
|
|
1064
|
+
)), d.card.respondsToSelections !== void 0 && (m.card.respondsToSelections = d.card.respondsToSelections);
|
|
1084
1065
|
break;
|
|
1085
1066
|
}
|
|
1086
1067
|
case "reorderCards": {
|
|
1087
|
-
const
|
|
1088
|
-
for (let
|
|
1089
|
-
const y = d.cardIds[
|
|
1090
|
-
|
|
1068
|
+
const f = /* @__PURE__ */ new Map();
|
|
1069
|
+
for (let m = 0; m < d.cardIds.length; m += 1) {
|
|
1070
|
+
const y = d.cardIds[m], b = $(a, y);
|
|
1071
|
+
b && f.set(b.frame.id, m);
|
|
1091
1072
|
}
|
|
1092
|
-
|
|
1073
|
+
Se(s, f);
|
|
1093
1074
|
break;
|
|
1094
1075
|
}
|
|
1095
1076
|
case "reuseCalculatedField":
|
|
1096
1077
|
r.push(
|
|
1097
|
-
|
|
1078
|
+
F(
|
|
1098
1079
|
"reused_calculated_field",
|
|
1099
1080
|
`Calculated field "${d.fieldId}" is reused by reference.`
|
|
1100
1081
|
)
|
|
@@ -1102,7 +1083,7 @@ function ta(e) {
|
|
|
1102
1083
|
break;
|
|
1103
1084
|
case "unsupported":
|
|
1104
1085
|
n.push(
|
|
1105
|
-
|
|
1086
|
+
F("unsupported_operation", d.reason || d.requestedAction)
|
|
1106
1087
|
);
|
|
1107
1088
|
break;
|
|
1108
1089
|
}
|
|
@@ -1114,7 +1095,7 @@ function _(e, t, a) {
|
|
|
1114
1095
|
function O(e, t) {
|
|
1115
1096
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || t;
|
|
1116
1097
|
}
|
|
1117
|
-
function
|
|
1098
|
+
function Te(e, t) {
|
|
1118
1099
|
if (!t.has(e))
|
|
1119
1100
|
return t.add(e), e;
|
|
1120
1101
|
let a = 2, r = `${e}-${a}`;
|
|
@@ -1130,57 +1111,57 @@ function ve(e) {
|
|
|
1130
1111
|
(t) => E(t) && typeof t.id == "string"
|
|
1131
1112
|
) : [];
|
|
1132
1113
|
}
|
|
1133
|
-
function
|
|
1114
|
+
function ee(e) {
|
|
1134
1115
|
return Array.isArray(e.sections) ? e.sections.filter(
|
|
1135
1116
|
(t) => E(t)
|
|
1136
1117
|
) : [];
|
|
1137
1118
|
}
|
|
1138
|
-
function
|
|
1119
|
+
function te(e) {
|
|
1139
1120
|
return Array.isArray(e.views) ? e.views.filter(
|
|
1140
1121
|
(t) => E(t)
|
|
1141
1122
|
) : [];
|
|
1142
1123
|
}
|
|
1143
|
-
function
|
|
1124
|
+
function w(e) {
|
|
1144
1125
|
if (!Array.isArray(e))
|
|
1145
1126
|
return [];
|
|
1146
1127
|
const t = [];
|
|
1147
1128
|
for (const a of e) {
|
|
1148
|
-
const r =
|
|
1129
|
+
const r = T(a);
|
|
1149
1130
|
r && t.push(r);
|
|
1150
1131
|
}
|
|
1151
1132
|
return t;
|
|
1152
1133
|
}
|
|
1153
|
-
function
|
|
1134
|
+
function Ft(e) {
|
|
1154
1135
|
var r, n, i;
|
|
1155
1136
|
if (!e)
|
|
1156
1137
|
return [];
|
|
1157
1138
|
const t = [];
|
|
1158
1139
|
if (R(e.source) && t.push(e.source), e.kind === "metric") {
|
|
1159
|
-
t.push(...
|
|
1160
|
-
const o =
|
|
1161
|
-
o && t.push(o), t.push(...
|
|
1162
|
-
...
|
|
1140
|
+
t.push(...w(e.measures));
|
|
1141
|
+
const o = T(e.dateField);
|
|
1142
|
+
o && t.push(o), t.push(...w(e.dimensions)), t.push(
|
|
1143
|
+
...w(
|
|
1163
1144
|
(r = e.filters) == null ? void 0 : r.map((s) => s.field)
|
|
1164
1145
|
)
|
|
1165
1146
|
);
|
|
1166
1147
|
} else if (e.kind === "records") {
|
|
1167
|
-
const o =
|
|
1168
|
-
o && t.push(o), t.push(...
|
|
1169
|
-
...
|
|
1148
|
+
const o = T(e.dateField);
|
|
1149
|
+
o && t.push(o), t.push(...w(e.fields)), t.push(
|
|
1150
|
+
...w(
|
|
1170
1151
|
(n = e.filters) == null ? void 0 : n.map((s) => s.field)
|
|
1171
1152
|
)
|
|
1172
1153
|
);
|
|
1173
1154
|
} else e.kind === "inputOptions" ? (((i = e.population) == null ? void 0 : i.kind) === "related_population" && R(e.population.baseSource) && t.push(e.population.baseSource), t.push(
|
|
1174
|
-
...
|
|
1155
|
+
...w([
|
|
1175
1156
|
e.labelField,
|
|
1176
1157
|
e.valueField,
|
|
1177
1158
|
e.searchField,
|
|
1178
1159
|
...e.disambiguationFields || []
|
|
1179
1160
|
].filter((o) => !!o))
|
|
1180
|
-
)) : e.kind === "sql" && t.push(...
|
|
1161
|
+
)) : e.kind === "sql" && t.push(...w(e.fields));
|
|
1181
1162
|
const a = "inputs" in e && Array.isArray(e.inputs) ? e.inputs : [];
|
|
1182
1163
|
for (const o of a) {
|
|
1183
|
-
const s =
|
|
1164
|
+
const s = T(o.field);
|
|
1184
1165
|
s && t.push(s);
|
|
1185
1166
|
}
|
|
1186
1167
|
return t;
|
|
@@ -1188,24 +1169,24 @@ function Tt(e) {
|
|
|
1188
1169
|
function wt(e) {
|
|
1189
1170
|
const t = [];
|
|
1190
1171
|
for (const a of ve(e)) {
|
|
1191
|
-
const r =
|
|
1172
|
+
const r = T(a.field);
|
|
1192
1173
|
r && t.push(r);
|
|
1193
1174
|
}
|
|
1194
|
-
for (const a of
|
|
1195
|
-
for (const r of
|
|
1196
|
-
t.push(...
|
|
1175
|
+
for (const a of ee(e))
|
|
1176
|
+
for (const r of te(a))
|
|
1177
|
+
t.push(...Ft(r.analytics));
|
|
1197
1178
|
return t;
|
|
1198
1179
|
}
|
|
1199
1180
|
function xt(e) {
|
|
1200
1181
|
var a;
|
|
1201
1182
|
const t = [];
|
|
1202
|
-
for (const r of
|
|
1203
|
-
for (const n of
|
|
1183
|
+
for (const r of ee(e))
|
|
1184
|
+
for (const n of te(r))
|
|
1204
1185
|
R((a = n.analytics) == null ? void 0 : a.source) && t.push(n.analytics.source);
|
|
1205
1186
|
return t;
|
|
1206
1187
|
}
|
|
1207
|
-
function
|
|
1208
|
-
const a =
|
|
1188
|
+
function kt(e, t) {
|
|
1189
|
+
const a = V(e).filter(R);
|
|
1209
1190
|
if (a.length === 0)
|
|
1210
1191
|
return t.push(
|
|
1211
1192
|
_(
|
|
@@ -1225,8 +1206,8 @@ function Ft(e, t) {
|
|
|
1225
1206
|
)
|
|
1226
1207
|
), [a[0]]) : a;
|
|
1227
1208
|
}
|
|
1228
|
-
function
|
|
1229
|
-
const a =
|
|
1209
|
+
function At(e, t) {
|
|
1210
|
+
const a = ee(e), r = ve(e), n = V(wt(e)), i = V(
|
|
1230
1211
|
xt(e)
|
|
1231
1212
|
);
|
|
1232
1213
|
return {
|
|
@@ -1235,13 +1216,13 @@ function kt(e, t) {
|
|
|
1235
1216
|
sources: n,
|
|
1236
1217
|
primarySources: i,
|
|
1237
1218
|
defaultSource: i.length === 1 ? i[0] : void 0,
|
|
1238
|
-
datasets:
|
|
1219
|
+
datasets: kt(n, t)
|
|
1239
1220
|
};
|
|
1240
1221
|
}
|
|
1241
|
-
function At(e) {
|
|
1242
|
-
return e && fe(e).ok ? e : void 0;
|
|
1243
|
-
}
|
|
1244
1222
|
function Ot(e) {
|
|
1223
|
+
return e && ue(e).ok ? e : void 0;
|
|
1224
|
+
}
|
|
1225
|
+
function Rt(e) {
|
|
1245
1226
|
var t;
|
|
1246
1227
|
switch ((t = e.presentation) == null ? void 0 : t.kind) {
|
|
1247
1228
|
case "kpi":
|
|
@@ -1260,12 +1241,12 @@ function Ot(e) {
|
|
|
1260
1241
|
return null;
|
|
1261
1242
|
}
|
|
1262
1243
|
}
|
|
1263
|
-
function
|
|
1244
|
+
function Et(e) {
|
|
1264
1245
|
var t, a, r;
|
|
1265
1246
|
return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((a = e.presentation) == null ? void 0 : a.kind) === "table" ? "table" : ((r = e.presentation) == null ? void 0 : r.kind) === "text" ? "text" : "chart";
|
|
1266
1247
|
}
|
|
1267
|
-
function
|
|
1268
|
-
const t =
|
|
1248
|
+
function Nt(e) {
|
|
1249
|
+
const t = qe(e);
|
|
1269
1250
|
switch (t) {
|
|
1270
1251
|
case "not_in":
|
|
1271
1252
|
return "not in";
|
|
@@ -1279,14 +1260,14 @@ function Et(e) {
|
|
|
1279
1260
|
return t || "in";
|
|
1280
1261
|
}
|
|
1281
1262
|
}
|
|
1282
|
-
function
|
|
1263
|
+
function Pt(e) {
|
|
1283
1264
|
return E(e.field) ? e.field.dataType === "datetime" ? "date" : e.field.dataType || "string" : "string";
|
|
1284
1265
|
}
|
|
1285
1266
|
function Mt(e) {
|
|
1286
1267
|
if (!(!e || e.kind !== "physical"))
|
|
1287
1268
|
return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
|
|
1288
1269
|
}
|
|
1289
|
-
function
|
|
1270
|
+
function $t(e, t, a, r, n, i) {
|
|
1290
1271
|
if (e.kind !== "filter")
|
|
1291
1272
|
return i.push(
|
|
1292
1273
|
_(
|
|
@@ -1301,7 +1282,7 @@ function Pt(e, t, a, r, n, i) {
|
|
|
1301
1282
|
`Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
|
|
1302
1283
|
)
|
|
1303
1284
|
), null;
|
|
1304
|
-
const o =
|
|
1285
|
+
const o = Ke({
|
|
1305
1286
|
explicitSource: void 0,
|
|
1306
1287
|
field: e.field,
|
|
1307
1288
|
defaultSource: t,
|
|
@@ -1314,8 +1295,8 @@ function Pt(e, t, a, r, n, i) {
|
|
|
1314
1295
|
`Filter "${e.label}" needs a source connectionId before the dashboard compiler can materialize it.`
|
|
1315
1296
|
)
|
|
1316
1297
|
), null;
|
|
1317
|
-
const
|
|
1318
|
-
id: `filter-${
|
|
1298
|
+
const f = {
|
|
1299
|
+
id: `filter-${Te(
|
|
1319
1300
|
O(e.id, e.field.name),
|
|
1320
1301
|
n
|
|
1321
1302
|
)}`,
|
|
@@ -1323,13 +1304,12 @@ function Pt(e, t, a, r, n, i) {
|
|
|
1323
1304
|
connectionId: s,
|
|
1324
1305
|
title: e.label,
|
|
1325
1306
|
column: e.field.name,
|
|
1326
|
-
dataType:
|
|
1307
|
+
dataType: Pt(e),
|
|
1327
1308
|
qualifiedTableName: Mt(o),
|
|
1328
1309
|
sql: "",
|
|
1329
|
-
operation:
|
|
1310
|
+
operation: Nt(e.operator),
|
|
1330
1311
|
type: e.multi === !1 ? "single" : "multiple",
|
|
1331
1312
|
location: "dashboard",
|
|
1332
|
-
displayMode: "toolbar",
|
|
1333
1313
|
fieldMeta: (o == null ? void 0 : o.kind) === "semantic" ? {
|
|
1334
1314
|
name: e.field.name,
|
|
1335
1315
|
qualifiedFieldName: e.field.name,
|
|
@@ -1360,14 +1340,14 @@ function Pt(e, t, a, r, n, i) {
|
|
|
1360
1340
|
label: e.label,
|
|
1361
1341
|
variableName: e.id,
|
|
1362
1342
|
scope: r,
|
|
1363
|
-
filter:
|
|
1364
|
-
defaultValue:
|
|
1365
|
-
|
|
1343
|
+
filter: f,
|
|
1344
|
+
defaultValue: Z(
|
|
1345
|
+
f,
|
|
1366
1346
|
e.defaultValue
|
|
1367
1347
|
)
|
|
1368
1348
|
};
|
|
1369
1349
|
}
|
|
1370
|
-
function
|
|
1350
|
+
function H(e) {
|
|
1371
1351
|
const t = [], a = [];
|
|
1372
1352
|
for (const r of e.viewIds) {
|
|
1373
1353
|
const n = e.viewIdToCardId.get(r);
|
|
@@ -1380,7 +1360,7 @@ function G(e) {
|
|
|
1380
1360
|
)
|
|
1381
1361
|
), Array.from(new Set(t));
|
|
1382
1362
|
}
|
|
1383
|
-
function
|
|
1363
|
+
function Bt(e) {
|
|
1384
1364
|
var r, n;
|
|
1385
1365
|
if (!e.protocolScope) {
|
|
1386
1366
|
const i = Array.from(new Set(e.boundCardIds));
|
|
@@ -1390,7 +1370,7 @@ function $t(e) {
|
|
|
1390
1370
|
if (!((r = e.protocolScope.excludeViewIds) != null && r.length))
|
|
1391
1371
|
return;
|
|
1392
1372
|
const i = new Set(
|
|
1393
|
-
|
|
1373
|
+
H({
|
|
1394
1374
|
inputLabel: e.inputLabel,
|
|
1395
1375
|
viewIds: e.protocolScope.excludeViewIds,
|
|
1396
1376
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1403,7 +1383,7 @@ function $t(e) {
|
|
|
1403
1383
|
};
|
|
1404
1384
|
}
|
|
1405
1385
|
if (e.protocolScope.level === "view") {
|
|
1406
|
-
const i =
|
|
1386
|
+
const i = H({
|
|
1407
1387
|
inputLabel: e.inputLabel,
|
|
1408
1388
|
viewIds: e.protocolScope.viewIds,
|
|
1409
1389
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1427,7 +1407,7 @@ function $t(e) {
|
|
|
1427
1407
|
if (!((n = e.protocolScope.excludeViewIds) != null && n.length))
|
|
1428
1408
|
return { kind: "cards", cardIds: t };
|
|
1429
1409
|
const a = new Set(
|
|
1430
|
-
|
|
1410
|
+
H({
|
|
1431
1411
|
inputLabel: e.inputLabel,
|
|
1432
1412
|
viewIds: e.protocolScope.excludeViewIds,
|
|
1433
1413
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1439,83 +1419,83 @@ function $t(e) {
|
|
|
1439
1419
|
cardIds: t.filter((i) => !a.has(i))
|
|
1440
1420
|
};
|
|
1441
1421
|
}
|
|
1442
|
-
function
|
|
1443
|
-
var
|
|
1422
|
+
function ra(e) {
|
|
1423
|
+
var b, g, c;
|
|
1444
1424
|
const t = [], a = Le(e);
|
|
1445
|
-
for (const
|
|
1446
|
-
t.push(_(
|
|
1447
|
-
for (const
|
|
1448
|
-
t.push(_(
|
|
1449
|
-
const r =
|
|
1450
|
-
let
|
|
1451
|
-
for (const [
|
|
1452
|
-
const u = typeof C.title == "string" ? C.title : `Section ${
|
|
1453
|
-
o.set(
|
|
1454
|
-
for (const [
|
|
1455
|
-
const
|
|
1456
|
-
I.id || `${u}-${I.title || `View ${
|
|
1457
|
-
`card-${
|
|
1425
|
+
for (const h of a.warnings)
|
|
1426
|
+
t.push(_(h.code, h.message));
|
|
1427
|
+
for (const h of a.errors)
|
|
1428
|
+
t.push(_(h.code, h.message));
|
|
1429
|
+
const r = At(e, t), n = [], i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
1430
|
+
let f = 0;
|
|
1431
|
+
for (const [h, C] of r.sections.entries()) {
|
|
1432
|
+
const u = typeof C.title == "string" ? C.title : `Section ${h + 1}`, re = C.id || O(u, `section-${h + 1}`);
|
|
1433
|
+
o.set(re, []);
|
|
1434
|
+
for (const [ne, I] of te(C).entries()) {
|
|
1435
|
+
const ie = Rt(I), q = O(
|
|
1436
|
+
I.id || `${u}-${I.title || `View ${ne + 1}`}`,
|
|
1437
|
+
`card-${h + 1}-${ne + 1}`
|
|
1458
1438
|
);
|
|
1459
|
-
if (!
|
|
1439
|
+
if (!ie) {
|
|
1460
1440
|
t.push(
|
|
1461
1441
|
_(
|
|
1462
1442
|
"unsupported_presentation",
|
|
1463
|
-
`Dashboard presentation "${((
|
|
1464
|
-
`card-${
|
|
1443
|
+
`Dashboard presentation "${((b = I.presentation) == null ? void 0 : b.kind) || "unknown"}" is not supported by the dashboard authoring adapter.`,
|
|
1444
|
+
`card-${q}`
|
|
1465
1445
|
)
|
|
1466
1446
|
);
|
|
1467
1447
|
continue;
|
|
1468
1448
|
}
|
|
1469
|
-
if (((
|
|
1449
|
+
if (((g = I.analytics) == null ? void 0 : g.kind) === "sql") {
|
|
1470
1450
|
t.push(
|
|
1471
1451
|
_(
|
|
1472
1452
|
"sql_intent_deferred",
|
|
1473
1453
|
"SQL analytics intent is valid protocol, but the current dashboard authoring adapter only materializes semantic and physical config-card intents.",
|
|
1474
|
-
`card-${
|
|
1454
|
+
`card-${q}`
|
|
1475
1455
|
)
|
|
1476
1456
|
);
|
|
1477
1457
|
continue;
|
|
1478
1458
|
}
|
|
1479
|
-
const
|
|
1480
|
-
I.id && i.set(I.id, N), (c = o.get(
|
|
1481
|
-
const
|
|
1482
|
-
for (const
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1459
|
+
const oe = Te(q, l), N = `card-${oe}`;
|
|
1460
|
+
I.id && i.set(I.id, N), (c = o.get(re)) == null || c.push(N);
|
|
1461
|
+
const Fe = I.analytics && "inputs" in I.analytics ? I.analytics.inputs : void 0;
|
|
1462
|
+
for (const se of Fe || []) {
|
|
1463
|
+
const de = s.get(se.inputId) || [];
|
|
1464
|
+
de.push(N), s.set(se.inputId, de);
|
|
1485
1465
|
}
|
|
1486
1466
|
n.push({
|
|
1487
1467
|
id: N,
|
|
1488
|
-
frameId: `frame-${
|
|
1468
|
+
frameId: `frame-${oe}`,
|
|
1489
1469
|
title: I.title,
|
|
1490
1470
|
description: I.description,
|
|
1491
|
-
type:
|
|
1492
|
-
role:
|
|
1493
|
-
priority:
|
|
1471
|
+
type: ie,
|
|
1472
|
+
role: Et(I),
|
|
1473
|
+
priority: f,
|
|
1494
1474
|
section: u,
|
|
1495
|
-
analyticsIntent:
|
|
1475
|
+
analyticsIntent: Ot(I.analytics),
|
|
1496
1476
|
text: I.text
|
|
1497
|
-
}),
|
|
1477
|
+
}), f += 1;
|
|
1498
1478
|
}
|
|
1499
1479
|
}
|
|
1500
|
-
const
|
|
1501
|
-
const C =
|
|
1502
|
-
protocolScope:
|
|
1503
|
-
inputLabel:
|
|
1480
|
+
const m = r.inputs.map((h) => {
|
|
1481
|
+
const C = Bt({
|
|
1482
|
+
protocolScope: h.scope,
|
|
1483
|
+
inputLabel: h.label,
|
|
1504
1484
|
allCardIds: n.map((u) => u.id),
|
|
1505
|
-
boundCardIds: s.get(
|
|
1485
|
+
boundCardIds: s.get(h.id) || [],
|
|
1506
1486
|
viewIdToCardId: i,
|
|
1507
1487
|
sectionIdToCardIds: o,
|
|
1508
1488
|
warnings: t
|
|
1509
1489
|
});
|
|
1510
|
-
return C === null ? null :
|
|
1511
|
-
|
|
1490
|
+
return C === null ? null : $t(
|
|
1491
|
+
h,
|
|
1512
1492
|
r.defaultSource,
|
|
1513
1493
|
r.sources,
|
|
1514
1494
|
C,
|
|
1515
1495
|
d,
|
|
1516
1496
|
t
|
|
1517
1497
|
);
|
|
1518
|
-
}).filter((
|
|
1498
|
+
}).filter((h) => !!h);
|
|
1519
1499
|
return { plan: {
|
|
1520
1500
|
version: 1,
|
|
1521
1501
|
id: `plan-${O(e.title, "dashboard")}`,
|
|
@@ -1531,12 +1511,12 @@ function aa(e) {
|
|
|
1531
1511
|
cards: n
|
|
1532
1512
|
}
|
|
1533
1513
|
],
|
|
1534
|
-
filterInputs:
|
|
1514
|
+
filterInputs: m.length ? m : void 0,
|
|
1535
1515
|
warnings: t.length ? t : void 0,
|
|
1536
|
-
unresolvedRequests: a.ok ? void 0 : a.errors.map((
|
|
1516
|
+
unresolvedRequests: a.ok ? void 0 : a.errors.map((h) => h.message)
|
|
1537
1517
|
}, warnings: t };
|
|
1538
1518
|
}
|
|
1539
|
-
const
|
|
1519
|
+
const na = [
|
|
1540
1520
|
"cardType",
|
|
1541
1521
|
"sql",
|
|
1542
1522
|
"python",
|
|
@@ -1551,7 +1531,7 @@ const ra = [
|
|
|
1551
1531
|
"resolvedPrimaryDateField",
|
|
1552
1532
|
"globalDateComparison",
|
|
1553
1533
|
"calendarContext"
|
|
1554
|
-
],
|
|
1534
|
+
], ia = [
|
|
1555
1535
|
"cardId",
|
|
1556
1536
|
"cardTitle",
|
|
1557
1537
|
"cache_config",
|
|
@@ -1566,19 +1546,19 @@ class D extends Error {
|
|
|
1566
1546
|
Object.setPrototypeOf(this, D.prototype), this.name = "CardQueryRequestError", this.field = r, this.details = n;
|
|
1567
1547
|
}
|
|
1568
1548
|
}
|
|
1569
|
-
function
|
|
1549
|
+
function ae(e) {
|
|
1570
1550
|
return e.label ? `${e.label}.` : "";
|
|
1571
1551
|
}
|
|
1572
|
-
function
|
|
1552
|
+
function x(e) {
|
|
1573
1553
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : { ...e };
|
|
1574
1554
|
}
|
|
1575
|
-
function
|
|
1555
|
+
function B(e) {
|
|
1576
1556
|
return typeof e == "string" ? e : "";
|
|
1577
1557
|
}
|
|
1578
1558
|
function Lt(e, t = {}) {
|
|
1579
|
-
const a =
|
|
1559
|
+
const a = x(e), r = ae(t), n = {};
|
|
1580
1560
|
if (a.calendarContext !== void 0) {
|
|
1581
|
-
const o =
|
|
1561
|
+
const o = Ue(a.calendarContext);
|
|
1582
1562
|
if (!o.ok)
|
|
1583
1563
|
throw new D(
|
|
1584
1564
|
`${r}calendarContext: ${o.issues.map((s) => s.message).join("; ")}`,
|
|
@@ -1587,31 +1567,31 @@ function Lt(e, t = {}) {
|
|
|
1587
1567
|
);
|
|
1588
1568
|
n.calendarContext = o.value;
|
|
1589
1569
|
}
|
|
1590
|
-
const i =
|
|
1570
|
+
const i = Re(a.resolvedPrimaryDateField);
|
|
1591
1571
|
if (!i.ok)
|
|
1592
1572
|
throw new D(
|
|
1593
|
-
`${r}${
|
|
1573
|
+
`${r}${Ee(i.issues)}`,
|
|
1594
1574
|
"resolvedPrimaryDateField",
|
|
1595
1575
|
i.issues
|
|
1596
1576
|
);
|
|
1597
1577
|
if (a.resolvedPrimaryDateField && (n.resolvedPrimaryDateField = a.resolvedPrimaryDateField), a.globalDateComparison !== void 0) {
|
|
1598
|
-
const o =
|
|
1578
|
+
const o = ze(a.globalDateComparison);
|
|
1599
1579
|
if (!o.ok)
|
|
1600
1580
|
throw new D(
|
|
1601
1581
|
`${r}Invalid globalDateComparison: ${o.errors.map((s) => `${s.path}: ${s.message}`).join("; ")}`,
|
|
1602
1582
|
"globalDateComparison",
|
|
1603
1583
|
o.errors
|
|
1604
1584
|
);
|
|
1605
|
-
n.globalDateComparison =
|
|
1585
|
+
n.globalDateComparison = je(
|
|
1606
1586
|
a.globalDateComparison
|
|
1607
1587
|
);
|
|
1608
1588
|
}
|
|
1609
1589
|
return n;
|
|
1610
1590
|
}
|
|
1611
|
-
function
|
|
1612
|
-
const a =
|
|
1591
|
+
function oa(e, t = {}) {
|
|
1592
|
+
const a = x(e), r = ae(t), n = {};
|
|
1613
1593
|
if (a.pagination !== void 0) {
|
|
1614
|
-
const i =
|
|
1594
|
+
const i = x(a.pagination), o = i.page, s = i.pageSize;
|
|
1615
1595
|
if (!Number.isInteger(o) || o < 1 || !Number.isInteger(s) || s < 1)
|
|
1616
1596
|
throw new D(
|
|
1617
1597
|
`${r}pagination must name a page and a page size of at least 1`,
|
|
@@ -1625,7 +1605,7 @@ function ia(e, t = {}) {
|
|
|
1625
1605
|
n.tableTotalsRequest = a.tableTotalsRequest;
|
|
1626
1606
|
}
|
|
1627
1607
|
if (a.sourceRowProbe !== void 0) {
|
|
1628
|
-
const i =
|
|
1608
|
+
const i = x(a.sourceRowProbe).limit;
|
|
1629
1609
|
if (!Number.isInteger(i) || i < 1)
|
|
1630
1610
|
throw new D(
|
|
1631
1611
|
`${r}sourceRowProbe must name a limit of at least 1`,
|
|
@@ -1640,21 +1620,21 @@ function ia(e, t = {}) {
|
|
|
1640
1620
|
}
|
|
1641
1621
|
return n;
|
|
1642
1622
|
}
|
|
1643
|
-
function
|
|
1644
|
-
const a =
|
|
1623
|
+
function sa(e, t = {}) {
|
|
1624
|
+
const a = x(e), r = ae(t), n = (c) => new D(`${r}${c} is required`, c), i = B(a.connection_id).trim();
|
|
1645
1625
|
if (!i) throw n("connection_id");
|
|
1646
|
-
const o =
|
|
1626
|
+
const o = B(a.cardType).trim();
|
|
1647
1627
|
if (!o) throw n("cardType");
|
|
1648
1628
|
const s = a.resultOwner;
|
|
1649
1629
|
if (s !== "config" && s !== "freeform" && s !== "none")
|
|
1650
1630
|
throw n("resultOwner");
|
|
1651
|
-
const l =
|
|
1652
|
-
if (s === "config" && !
|
|
1631
|
+
const l = x(a.cardConfig), d = B(a.sql), f = B(a.python), m = !!t.configOptional || Object.keys(l).length > 0;
|
|
1632
|
+
if (s === "config" && !m) throw n("cardConfig");
|
|
1653
1633
|
if (s === "freeform" && !d.trim()) throw n("sql");
|
|
1654
|
-
const y =
|
|
1655
|
-
hasExecutableConfig:
|
|
1634
|
+
const y = Ne({
|
|
1635
|
+
hasExecutableConfig: m,
|
|
1656
1636
|
sql: d,
|
|
1657
|
-
normalizedPython:
|
|
1637
|
+
normalizedPython: f
|
|
1658
1638
|
});
|
|
1659
1639
|
if (s !== y)
|
|
1660
1640
|
throw new D(
|
|
@@ -1662,9 +1642,9 @@ function oa(e, t = {}) {
|
|
|
1662
1642
|
"resultOwner"
|
|
1663
1643
|
);
|
|
1664
1644
|
if (s === "none") throw n("cardConfig");
|
|
1665
|
-
const
|
|
1666
|
-
if (Object.keys(
|
|
1667
|
-
const
|
|
1645
|
+
const b = x(a.cardDataSource);
|
|
1646
|
+
if (Object.keys(b).length === 0) throw n("cardDataSource");
|
|
1647
|
+
const g = Pe({
|
|
1668
1648
|
controlValues: a.controlValues,
|
|
1669
1649
|
controlDefinitions: a.controlDefinitions,
|
|
1670
1650
|
cardControlDefinitions: a.cardControlDefinitions,
|
|
@@ -1674,169 +1654,201 @@ function oa(e, t = {}) {
|
|
|
1674
1654
|
connection_id: i,
|
|
1675
1655
|
cardType: o,
|
|
1676
1656
|
sql: d,
|
|
1677
|
-
python:
|
|
1657
|
+
python: f,
|
|
1678
1658
|
resultOwner: s,
|
|
1679
1659
|
cardConfig: l,
|
|
1680
|
-
cardDataSource:
|
|
1660
|
+
cardDataSource: b,
|
|
1681
1661
|
active_filters: Array.isArray(a.active_filters) ? a.active_filters : [],
|
|
1682
|
-
controlValues:
|
|
1683
|
-
controlDefinitions:
|
|
1684
|
-
cardControlDefinitions:
|
|
1685
|
-
controlBindings:
|
|
1662
|
+
controlValues: g.controlValues,
|
|
1663
|
+
controlDefinitions: g.controlDefinitions,
|
|
1664
|
+
cardControlDefinitions: g.cardControlDefinitions,
|
|
1665
|
+
controlBindings: g.controlBindings,
|
|
1686
1666
|
...Lt(a, t)
|
|
1687
1667
|
};
|
|
1688
1668
|
}
|
|
1689
1669
|
export {
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1670
|
+
Ta as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
1671
|
+
ia as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
1672
|
+
na as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
1673
|
+
va as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
1674
|
+
Fa as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
1675
|
+
wa as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
1676
|
+
xa as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
1677
|
+
ka as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
1678
|
+
Aa as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
1679
|
+
Oa as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
1680
|
+
Ra as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
1681
|
+
Ea as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
1682
|
+
Na as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
1703
1683
|
D as CardQueryRequestError,
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
la as
|
|
1716
|
-
|
|
1684
|
+
Pa as ControlResolutionError,
|
|
1685
|
+
ke as DASHBOARD_AUTHORING_BREAKPOINTS,
|
|
1686
|
+
L as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
|
|
1687
|
+
Fr as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
1688
|
+
qn as DASHBOARD_FILTER_OPERATIONS,
|
|
1689
|
+
wr as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
|
|
1690
|
+
Nn as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
1691
|
+
Pn as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
1692
|
+
xr as DashboardFilterMappingContractError,
|
|
1693
|
+
Ma as ExecutionControlContractError,
|
|
1694
|
+
kr as FilterModelError,
|
|
1695
|
+
la as NEW_CARD_TYPE,
|
|
1696
|
+
$a as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
1697
|
+
Ar as TOOLBAR_FILTER_REACH_FIELDS,
|
|
1698
|
+
Or as applyCardReferenceRemapping,
|
|
1699
|
+
aa as applyDashboardChangePlan,
|
|
1717
1700
|
ua as applyDashboardOperations,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1701
|
+
Rr as applyGroupByOverride,
|
|
1702
|
+
Er as applyLinkedClickToFilterOverrides,
|
|
1703
|
+
Nr as applyOptionDependencyOverride,
|
|
1721
1704
|
pa as buildCardExportFormatOptions,
|
|
1722
1705
|
Pr as buildCardExportQueryContext,
|
|
1723
|
-
|
|
1706
|
+
fa as buildCardExportRequest,
|
|
1724
1707
|
ha as buildCardExportRequestFromOptions,
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1708
|
+
Ba as buildControlDefinitionIndex,
|
|
1709
|
+
La as buildDashboardCardSourceIndex,
|
|
1710
|
+
Mr as buildLinkedClickToFilterOverrides,
|
|
1711
|
+
ma as buildTableExportFormatOptions,
|
|
1712
|
+
Ae as clickToFilterSettingsSchema,
|
|
1713
|
+
ta as compileDashboardFromPlan,
|
|
1714
|
+
J as compileResponsiveDashboardLayouts,
|
|
1715
|
+
$r as composeCardReferenceRemapping,
|
|
1716
|
+
Va as controlBindingExecutionSchema,
|
|
1717
|
+
qa as controlDefinitionExecutionSchema,
|
|
1718
|
+
Br as createDashboardFilterBindingId,
|
|
1719
|
+
Gn as createMatrixAuthoringDraft,
|
|
1720
|
+
Kn as createMatrixConfig,
|
|
1721
|
+
ba as createNewCard,
|
|
1722
|
+
Y as dashboardAuthoringDatasetMatchesSource,
|
|
1723
|
+
Zt as dashboardAuthoringFieldsReferToSameTarget,
|
|
1724
|
+
T as dashboardAuthoringSourceFromField,
|
|
1742
1725
|
Yt as dashboardAuthoringSourceKey,
|
|
1743
|
-
|
|
1744
|
-
|
|
1726
|
+
he as dashboardAuthoringSourcesReferToSameDataset,
|
|
1727
|
+
za as dashboardCardFilterSourceInventoryContains,
|
|
1745
1728
|
Lr as dashboardFilterTargetMatchesLogicalValue,
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1729
|
+
zn as dashboardFilterValueTypeForDataType,
|
|
1730
|
+
ra as dashboardPlanFromSemaphorDashboardIntent,
|
|
1731
|
+
ja as defaultClickToFilterSettings,
|
|
1732
|
+
Vr as doesDashboardInputApplyToTarget,
|
|
1733
|
+
qr as doesDashboardInputSurviveCarriedContext,
|
|
1734
|
+
zr as doesToolbarFilterReachTab,
|
|
1735
|
+
ea as findDashboardAuthoringDatasetForSource,
|
|
1736
|
+
Ua as findDashboardCardExecutableSource,
|
|
1737
|
+
Ha as findDashboardCardPinnedCatalogSource,
|
|
1738
|
+
Ga as findDashboardSqlPinnedCatalogSource,
|
|
1739
|
+
jr as foldPrototypeDocumentInputs,
|
|
1740
|
+
Ur as formatFilterModelIssues,
|
|
1741
|
+
Ee as formatResolvedPrimaryDateFieldIssues,
|
|
1742
|
+
ga as getCalculatedFieldAggregateOverrides,
|
|
1743
|
+
Ka as getCalculatedFieldNamespace,
|
|
1744
|
+
Ia as getCalculatedFieldParameters,
|
|
1745
|
+
Ca as getCalculatedFieldShelfOverrides,
|
|
1746
|
+
Wa as getColumnCatalogFieldId,
|
|
1747
|
+
et as getDashboardAuthoringCardSource,
|
|
1748
|
+
ya as getDashboardFilterSubscriptionHint,
|
|
1749
|
+
Hr as getDashboardGlobalDateFilter,
|
|
1750
|
+
Mn as getDocumentKpiSectionShapeIssues,
|
|
1751
|
+
$n as getDocumentSectionCards,
|
|
1752
|
+
_a as getDomainCalculatedSelectionOverrides,
|
|
1753
|
+
Qa as getFieldAggregationOptions,
|
|
1754
|
+
Xa as getMatrixBindingTargets,
|
|
1755
|
+
Wn as getMatrixLevelLabel,
|
|
1756
|
+
Qn as getMatrixMeasureLabel,
|
|
1757
|
+
Ya as getStableDomainCalculatedFieldId,
|
|
1758
|
+
Ja as getTemporalBucketAuthoringOptions,
|
|
1759
|
+
Za as getTemporalBucketAuthoringSelection,
|
|
1760
|
+
Da as hasDashboardFilterSubscription,
|
|
1761
|
+
Gr as hasToolbarFilterReachField,
|
|
1762
|
+
Kr as hostFilterValueFor,
|
|
1763
|
+
Wr as hostFilterValuesToSlots,
|
|
1764
|
+
Qr as isAdHocFilterValueOnTab,
|
|
1765
|
+
Xr as isAllowedDashboardInputScopeCombination,
|
|
1766
|
+
jn as isDashboardFilterOperationCompatible,
|
|
1767
|
+
Yr as isDashboardInputOnTab,
|
|
1768
|
+
Jr as isDashboardInputOwnedBySheet,
|
|
1769
|
+
Ve as isDashboardInputScopeEmpty,
|
|
1770
|
+
Zr as isHiddenFilterInput,
|
|
1773
1771
|
R as isMaterializableDashboardAuthoringSource,
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1772
|
+
er as isPresentationCurrencyBinding,
|
|
1773
|
+
tr as isSemaphorCartesianChartType,
|
|
1774
|
+
He as isSemaphorSourceRef,
|
|
1775
|
+
ar as isStructuralControlBinding,
|
|
1776
|
+
rr as isValidControlOptionPresentation,
|
|
1777
|
+
nr as linkedClickToFilterOverridesSchema,
|
|
1778
|
+
en as listAdHocFilterValuesOnTab,
|
|
1779
|
+
Bn as listDashboardCardLocations,
|
|
1780
|
+
tn as listDashboardFilterDefinitions,
|
|
1781
|
+
an as listDashboardFilterInputsOnTab,
|
|
1782
|
+
rn as listDashboardInputReachKeys,
|
|
1783
|
+
nn as listDashboardTabTargets,
|
|
1784
|
+
on as listFilterInputValueTargets,
|
|
1785
|
+
sn as listStoredFilterDefinitions,
|
|
1786
|
+
Ln as mapDocumentSectionCards,
|
|
1787
|
+
dn as matrixCatalogSources,
|
|
1788
|
+
Zn as matrixDefinitionFields,
|
|
1789
|
+
ei as matrixDefinitionSources,
|
|
1790
|
+
cn as matrixExecutionSources,
|
|
1791
|
+
V as mergeDashboardAuthoringSources,
|
|
1792
|
+
Xn as mergeMatrixSorts,
|
|
1793
|
+
ir as moveMatrixLevel,
|
|
1794
|
+
or as normalizeClickToFilterSettings,
|
|
1795
|
+
ln as normalizeDashboardInputs,
|
|
1796
|
+
un as normalizeLegacyLinkedTargetOverrides,
|
|
1797
|
+
sa as parseCardQueryRequest,
|
|
1793
1798
|
Lt as parseCardQueryRequestContext,
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1799
|
+
oa as parseCardQueryRequestExtras,
|
|
1800
|
+
sr as parseExecutionControlBindingsShallow,
|
|
1801
|
+
Pe as parseExecutionControlContext,
|
|
1802
|
+
dr as parseExecutionControlContract,
|
|
1803
|
+
Ge as preferDashboardAuthoringSourceMetadata,
|
|
1804
|
+
Jt as preferredDashboardAuthoringSource,
|
|
1805
|
+
cr as previewTemporalBucketAuthoringFormat,
|
|
1806
|
+
pn as readDashboardFilterModel,
|
|
1807
|
+
lr as readExactDomainCalculatedFieldReference,
|
|
1808
|
+
fn as readFilterValueList,
|
|
1809
|
+
ti as readMatrixCardConfig,
|
|
1810
|
+
hn as rebindDashboardOptionDependencyInputId,
|
|
1811
|
+
ur as reconcileMatrixSpecStructure,
|
|
1812
|
+
pr as reconcileTemporalBucketAuthoringFormat,
|
|
1813
|
+
G as remapClickToFilterReferences,
|
|
1814
|
+
mn as remapLinkedClickToFilterOverrides,
|
|
1815
|
+
bn as requireNormalizedDashboardInputs,
|
|
1816
|
+
fr as resolveBindingControlValue,
|
|
1817
|
+
An as resolveCanonicalDetailResultRawKey,
|
|
1818
|
+
On as resolveCanonicalResultOutputKey,
|
|
1819
|
+
Rn as resolveCanonicalResultRawKey,
|
|
1820
|
+
Ke as resolveDashboardAuthoringSource,
|
|
1821
|
+
hr as resolveDashboardEntitySource,
|
|
1822
|
+
gn as resolveDashboardFilterAutomaticTarget,
|
|
1823
|
+
In as resolveDashboardFilterInheritedTarget,
|
|
1824
|
+
Cn as resolveDashboardOptionDependencies,
|
|
1825
|
+
yn as resolveDashboardOptionPopulation,
|
|
1826
|
+
_n as resolveDashboardSqlFilterTarget,
|
|
1827
|
+
mr as resolveGroupByFieldTarget,
|
|
1828
|
+
Dn as resolveMatrixControlBindings,
|
|
1829
|
+
Yn as resolveMatrixDefinition,
|
|
1830
|
+
br as resolveMetricFieldTarget,
|
|
1831
|
+
gr as resolveScalarMappedValue,
|
|
1832
|
+
Ir as resolveTemporalBucketAuthoringFormat,
|
|
1833
|
+
Ne as resolveTemporalResultOwner,
|
|
1834
|
+
Oe as respondsToSelectionsSchema,
|
|
1835
|
+
Cr as retainMatrixConditionalFormatting,
|
|
1836
|
+
fe as rewriteDashboardInputScopeIds,
|
|
1837
|
+
Sn as selectDashboardOptionDependencyInputIds,
|
|
1838
|
+
yr as selectionFieldFromExplorerField,
|
|
1839
|
+
Tn as stripInstanceTargetsForLibrarySave,
|
|
1840
|
+
_r as supportsCanonicalDashboardTemporalResult,
|
|
1841
|
+
vn as toolbarFilterInputFields,
|
|
1842
|
+
Fn as toolbarFilterScope,
|
|
1843
|
+
Dr as transformComparisonDocument,
|
|
1844
|
+
Sr as updateMatrixConfig,
|
|
1845
|
+
wn as upgradeToStoredDashboard,
|
|
1846
|
+
Tr as validateControlValue,
|
|
1847
|
+
tt as validateDashboardAuthoringDatasetScope,
|
|
1848
|
+
nt as validateDashboardChangePlan,
|
|
1849
|
+
Un as validateDashboardFilterValues,
|
|
1850
|
+
rt as validateDashboardPlan,
|
|
1851
|
+
Re as validateResolvedPrimaryDateFieldShape,
|
|
1852
|
+
xn as withDashboardOptionDependencyOverride,
|
|
1853
|
+
pe as withoutToolbarFilterReachFields
|
|
1842
1854
|
};
|