react-semaphor 0.1.474 → 0.1.476
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +20 -20
- package/dist/chunks/{dashboard-briefing-launcher-BjCkA5vw.cjs → dashboard-briefing-launcher-ZfuxdRN2.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-B0f28WrK.js → dashboard-briefing-launcher-eBsB9kr8.js} +5 -5
- package/dist/chunks/{dashboard-controls-CMJqSLgo.js → dashboard-controls-BX6p6z8a.js} +5 -5
- package/dist/chunks/{dashboard-controls-BRclCQEX.cjs → dashboard-controls-DwjEc7sO.cjs} +1 -1
- package/dist/chunks/dashboard-filter-value-compatibility-BCVF9IHg.js +1026 -0
- package/dist/chunks/dashboard-filter-value-compatibility-DLkdeypb.cjs +1 -0
- package/dist/chunks/{dashboard-json-1ohpjO_q.js → dashboard-json-BfgitBXc.js} +3 -3
- package/dist/chunks/{dashboard-json-DmtGHdDq.cjs → dashboard-json-CdwYFOsc.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DNqJHdHE.cjs → edit-dashboard-visual-Cbougpzc.cjs} +1 -1
- package/dist/chunks/{edit-dashboard-visual-D9oKtOo6.js → edit-dashboard-visual-D80DLF7C.js} +6 -6
- package/dist/chunks/{editor-action-buttons-DwI3FcSw.cjs → editor-action-buttons-BDRLfaW-.cjs} +1 -1
- package/dist/chunks/{editor-action-buttons-C_B8Wzkf.js → editor-action-buttons-DjsEDQok.js} +3 -3
- package/dist/chunks/index-CneWIz__.cjs +1404 -0
- package/dist/chunks/{index-DsvIlrI-.js → index-D9S3j7_z.js} +532 -463
- package/dist/chunks/{index-DalKzjEZ.js → index-Dv5hbC1r.js} +40833 -40225
- package/dist/chunks/index-v2MZLyus.cjs +4 -0
- package/dist/chunks/{pivot-header-presentation-Be3FyR0N.js → pivot-header-presentation-CaERAWpl.js} +144 -128
- package/dist/chunks/pivot-header-presentation-CePk1R6g.cjs +4 -0
- package/dist/chunks/{pivot-result-lifecycle-PxmbJWkm.js → pivot-result-lifecycle-B9FTybxN.js} +176 -165
- package/dist/chunks/pivot-result-lifecycle-CcGt_29N.cjs +1 -0
- package/dist/chunks/{report-preferences-dialog-C9mJffNQ.js → report-preferences-dialog-BXBlvW79.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-DGMd-eTT.cjs → report-preferences-dialog-cSMJYqns.cjs} +1 -1
- package/dist/chunks/switch-B1mZx2k9.cjs +138 -0
- package/dist/chunks/{switch-D20CIzj6.js → switch-C8NihGV4.js} +3326 -3318
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +298 -287
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +92 -82
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/pdf-export-policy/index.cjs +1 -0
- package/dist/pdf-export-policy/index.js +32 -0
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings.d.ts +13 -1
- package/dist/types/dashboard-assistant.d.ts +2 -0
- package/dist/types/dashboard-authoring.d.ts +13 -1
- package/dist/types/dashboard.d.ts +19 -1
- package/dist/types/format-utils.d.ts +46 -0
- package/dist/types/main.d.ts +19 -1
- package/dist/types/pdf-export-policy.d.ts +28 -0
- package/dist/types/shared.d.ts +13 -1
- package/dist/types/surfboard.d.ts +19 -1
- package/dist/types/types.d.ts +19 -1
- package/package.json +6 -1
- package/dist/chunks/dashboard-filter-value-compatibility-9W8Ckcle.js +0 -846
- package/dist/chunks/dashboard-filter-value-compatibility-Co1dn9Bc.cjs +0 -1
- package/dist/chunks/index-B4VxBoJg.cjs +0 -4
- package/dist/chunks/index-B6zSYUN4.cjs +0 -1404
- package/dist/chunks/pivot-header-presentation-Cr6pU5JL.cjs +0 -4
- package/dist/chunks/pivot-result-lifecycle-DJgO2P0H.cjs +0 -1
- package/dist/chunks/switch-B4eH4guz.cjs +0 -138
|
@@ -1,103 +1,104 @@
|
|
|
1
|
-
import { D as R, a as
|
|
2
|
-
import { A as
|
|
3
|
-
import { k as
|
|
1
|
+
import { D as R, a as ye } from "../chunks/contracts-CoCOpd_i.js";
|
|
2
|
+
import { A as Bt, S as Rt, g as Pt, a as zt, i as Ot, p as Vt, c as qt, b as Lt, r as jt, s as Et, t as Ht } from "../chunks/temporal-bucket-authoring-DJ9kK2wD.js";
|
|
3
|
+
import { k as _e, ai as W, aj as we, y as ie, F as ve, B as Se } from "../chunks/validators-D-T-2HOR.js";
|
|
4
4
|
import "../chunks/analyze-result-contract-C8s8EUL5.js";
|
|
5
5
|
import "../value-format-preferences/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { m as O } from "../chunks/dashboard-filter-value-compatibility-BCVF9IHg.js";
|
|
7
|
+
import { D as Kt, b as Gt, l as Ut, d as Qt, e as Yt, o as Jt, f as Xt, a as Zt, c as en, i as tn, h as nn, p as rn, n as an, k as on, r as sn, g as dn, j as cn } from "../chunks/dashboard-filter-value-compatibility-BCVF9IHg.js";
|
|
8
|
+
import { n as Ce } from "../chunks/operators-C8TxpM4C.js";
|
|
9
|
+
import { a as un, b as fn, r as pn } from "../chunks/canonical-result-keys-CEQefvdO.js";
|
|
9
10
|
function _(e) {
|
|
10
11
|
return e && typeof e == "object" ? e : null;
|
|
11
12
|
}
|
|
12
13
|
function C(e) {
|
|
13
14
|
return typeof e == "string" ? e : null;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function ke(e) {
|
|
16
17
|
var t, n, r;
|
|
17
18
|
return !!(e && typeof e == "object") && (((t = _(e)) == null ? void 0 : t.kind) === "semantic" || ((n = _(e)) == null ? void 0 : n.kind) === "physical" || ((r = _(e)) == null ? void 0 : r.kind) === "sql");
|
|
18
19
|
}
|
|
19
20
|
function T(e) {
|
|
20
|
-
return
|
|
21
|
+
return ke(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
23
|
+
function kt(e) {
|
|
24
|
+
return _e(e);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
26
|
+
function oe(e, t) {
|
|
27
|
+
return W(e, t);
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
29
|
+
function De(e, t) {
|
|
30
|
+
return we(e, t);
|
|
30
31
|
}
|
|
31
32
|
function P(e) {
|
|
32
33
|
const t = [];
|
|
33
34
|
for (const n of e) {
|
|
34
35
|
const r = t.findIndex(
|
|
35
|
-
(o) =>
|
|
36
|
+
(o) => oe(o, n)
|
|
36
37
|
);
|
|
37
|
-
r === -1 ? t.push(n) : t[r] =
|
|
38
|
+
r === -1 ? t.push(n) : t[r] = De(
|
|
38
39
|
t[r],
|
|
39
40
|
n
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
43
|
return t;
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function Dt(e) {
|
|
45
46
|
return P(e)[0];
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !
|
|
48
|
+
function j(e, t) {
|
|
49
|
+
return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !W(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function E(e) {
|
|
51
52
|
return T(e) ? e : void 0;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function re(e, t) {
|
|
54
55
|
if (!(e.kind !== "semantic" || e.connectionId))
|
|
55
56
|
return t.find(
|
|
56
|
-
(n) => (n == null ? void 0 : n.kind) === "semantic" &&
|
|
57
|
+
(n) => (n == null ? void 0 : n.kind) === "semantic" && W(e, n) && !!n.connectionId
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
60
|
function S(e, t) {
|
|
60
|
-
const n =
|
|
61
|
-
return n ?
|
|
61
|
+
const n = E(e == null ? void 0 : e.source);
|
|
62
|
+
return n ? j(n, t) : void 0;
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function Ae({
|
|
64
65
|
explicitSource: e,
|
|
65
66
|
field: t,
|
|
66
67
|
defaultSource: n,
|
|
67
68
|
fallbackSources: r
|
|
68
69
|
}) {
|
|
69
|
-
const o = [n, ...r || []], i =
|
|
70
|
+
const o = [n, ...r || []], i = E(e), a = i ? j(
|
|
70
71
|
i,
|
|
71
|
-
|
|
72
|
+
re(i, o)
|
|
72
73
|
) : void 0;
|
|
73
74
|
if (a)
|
|
74
75
|
return a;
|
|
75
76
|
if (e !== void 0)
|
|
76
77
|
return;
|
|
77
|
-
const d = S(t, n), s = d ?
|
|
78
|
+
const d = S(t, n), s = d ? j(
|
|
78
79
|
d,
|
|
79
|
-
|
|
80
|
+
re(d, o)
|
|
80
81
|
) : void 0;
|
|
81
82
|
if (s)
|
|
82
83
|
return s;
|
|
83
84
|
if ((t == null ? void 0 : t.source) === void 0)
|
|
84
|
-
return
|
|
85
|
+
return E(n);
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function At(e, t) {
|
|
87
88
|
if (!(e != null && e.name) || !(t != null && t.name) || e.name !== t.name)
|
|
88
89
|
return !1;
|
|
89
90
|
const n = S(e), r = S(t);
|
|
90
|
-
return !n || !r ? !0 :
|
|
91
|
+
return !n || !r ? !0 : oe(n, r);
|
|
91
92
|
}
|
|
92
93
|
function D(e) {
|
|
93
94
|
var t;
|
|
94
95
|
return C((t = _(e)) == null ? void 0 : t.kind);
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function se(e) {
|
|
97
98
|
var t, n;
|
|
98
99
|
return D(e) !== "semantic" ? null : ((n = C((t = _(e)) == null ? void 0 : t.domainId)) == null ? void 0 : n.trim()) || null;
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function Fe(e) {
|
|
101
102
|
var t;
|
|
102
103
|
return D(e) !== "semantic" ? null : C((t = _(e)) == null ? void 0 : t.datasetName);
|
|
103
104
|
}
|
|
@@ -105,27 +106,27 @@ function xe(e) {
|
|
|
105
106
|
var t;
|
|
106
107
|
return D(e) !== "semantic" ? null : C((t = _(e)) == null ? void 0 : t.datasetId);
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
+
function Te(e) {
|
|
109
110
|
var t;
|
|
110
111
|
return D(e) !== "physical" ? null : C((t = _(e)) == null ? void 0 : t.connectionId);
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
+
function $e(e) {
|
|
113
114
|
var t;
|
|
114
115
|
return D(e) !== "physical" ? null : C((t = _(e)) == null ? void 0 : t.tableName);
|
|
115
116
|
}
|
|
116
|
-
function
|
|
117
|
+
function Me(e) {
|
|
117
118
|
var t;
|
|
118
119
|
return D(e) !== "physical" ? "" : C((t = _(e)) == null ? void 0 : t.databaseName) || "";
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
+
function Ne(e) {
|
|
121
122
|
var t;
|
|
122
123
|
return D(e) !== "physical" ? "" : C((t = _(e)) == null ? void 0 : t.schemaName) || "";
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function Be(e) {
|
|
125
126
|
if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
|
|
126
127
|
return e.analyticsIntent.source;
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
+
function Re({
|
|
129
130
|
datasets: e,
|
|
130
131
|
requireAtLeastOne: t
|
|
131
132
|
}) {
|
|
@@ -133,21 +134,21 @@ function Be({
|
|
|
133
134
|
return { ok: !1, issue: "invalid_dataset_count" };
|
|
134
135
|
if (e.length <= 1)
|
|
135
136
|
return { ok: !0 };
|
|
136
|
-
const n = e.map(
|
|
137
|
+
const n = e.map(se), r = new Set(n.filter(Boolean));
|
|
137
138
|
return n.some((o) => !o) || r.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
+
function K(e, t) {
|
|
140
141
|
if (!t)
|
|
141
142
|
return !1;
|
|
142
143
|
if (t.kind === "semantic") {
|
|
143
144
|
const n = xe(e);
|
|
144
|
-
return
|
|
145
|
+
return se(e) === t.domainId ? n && t.datasetId ? n === t.datasetId : Fe(e) === t.datasetName : !1;
|
|
145
146
|
}
|
|
146
|
-
return t.kind === "physical" ?
|
|
147
|
+
return t.kind === "physical" ? Te(e) === t.connectionId && $e(e) === t.tableName && Me(e) === (t.databaseName || "") && Ne(e) === (t.schemaName || "") : !1;
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function Ft(e, t) {
|
|
149
150
|
return e.find(
|
|
150
|
-
(n) =>
|
|
151
|
+
(n) => K(n, t)
|
|
151
152
|
);
|
|
152
153
|
}
|
|
153
154
|
function p(e, t, n) {
|
|
@@ -162,14 +163,14 @@ function N(e) {
|
|
|
162
163
|
}
|
|
163
164
|
return null;
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
+
function de({
|
|
166
167
|
card: e,
|
|
167
168
|
datasets: t,
|
|
168
169
|
errors: n
|
|
169
170
|
}) {
|
|
170
171
|
if (e.type === "text")
|
|
171
172
|
return;
|
|
172
|
-
const r =
|
|
173
|
+
const r = Be(e);
|
|
173
174
|
if (!r) {
|
|
174
175
|
if (t.length <= 1)
|
|
175
176
|
return;
|
|
@@ -182,7 +183,7 @@ function se({
|
|
|
182
183
|
);
|
|
183
184
|
return;
|
|
184
185
|
}
|
|
185
|
-
t.some((o) =>
|
|
186
|
+
t.some((o) => K(o, r)) || n.push(
|
|
186
187
|
p(
|
|
187
188
|
"invalid_card_analytics_source",
|
|
188
189
|
"Dashboard cards with an explicit analytics source must use one of the selected datasets.",
|
|
@@ -193,35 +194,35 @@ function se({
|
|
|
193
194
|
function B(e) {
|
|
194
195
|
return e.map((t) => t == null ? void 0 : t.source).filter((t) => !!t);
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function V(e) {
|
|
197
198
|
return Array.isArray(e) ? e.filter(
|
|
198
199
|
(t) => !!(t && typeof t == "object")
|
|
199
200
|
) : [];
|
|
200
201
|
}
|
|
201
|
-
function
|
|
202
|
+
function ae(e) {
|
|
202
203
|
return Array.isArray(e) ? e.filter(
|
|
203
204
|
(t) => !!(t && typeof t == "object")
|
|
204
205
|
) : [];
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
+
function Pe(e) {
|
|
207
208
|
var n, r;
|
|
208
209
|
if (!e)
|
|
209
210
|
return [];
|
|
210
211
|
const t = [e.source];
|
|
211
212
|
return e.kind === "metric" ? t.push(
|
|
212
213
|
...B([
|
|
213
|
-
...
|
|
214
|
+
...V(e.measures),
|
|
214
215
|
e.primaryMeasure,
|
|
215
216
|
e.dateField,
|
|
216
|
-
...
|
|
217
|
-
...
|
|
217
|
+
...V(e.dimensions),
|
|
218
|
+
...ae(e.filters).map((o) => o.field)
|
|
218
219
|
])
|
|
219
220
|
) : e.kind === "records" ? t.push(
|
|
220
221
|
...B([
|
|
221
|
-
...
|
|
222
|
+
...V(e.fields),
|
|
222
223
|
e.dateField,
|
|
223
224
|
(n = e.orderBy) == null ? void 0 : n.field,
|
|
224
|
-
...
|
|
225
|
+
...ae(e.filters).map((o) => o.field)
|
|
225
226
|
])
|
|
226
227
|
) : e.kind === "inputOptions" ? (((r = e.population) == null ? void 0 : r.kind) === "related_population" && t.push(e.population.baseSource), t.push(
|
|
227
228
|
...B([
|
|
@@ -232,15 +233,15 @@ function Re(e) {
|
|
|
232
233
|
])
|
|
233
234
|
)) : e.kind === "sql" && t.push(...B(e.fields || [])), t;
|
|
234
235
|
}
|
|
235
|
-
function
|
|
236
|
+
function ce({
|
|
236
237
|
card: e,
|
|
237
238
|
datasets: t,
|
|
238
239
|
errors: n
|
|
239
240
|
}) {
|
|
240
241
|
if (e.type !== "text") {
|
|
241
|
-
for (const r of
|
|
242
|
+
for (const r of Pe(e.analyticsIntent))
|
|
242
243
|
if (r && !t.some(
|
|
243
|
-
(o) =>
|
|
244
|
+
(o) => K(o, r)
|
|
244
245
|
)) {
|
|
245
246
|
n.push(
|
|
246
247
|
p(
|
|
@@ -253,13 +254,13 @@ function de({
|
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
+
function le({
|
|
257
258
|
card: e,
|
|
258
259
|
errors: t
|
|
259
260
|
}) {
|
|
260
261
|
if (e.type === "text" || !e.analyticsIntent)
|
|
261
262
|
return;
|
|
262
|
-
const n =
|
|
263
|
+
const n = ie(e.analyticsIntent);
|
|
263
264
|
if (!n.ok)
|
|
264
265
|
for (const r of n.errors)
|
|
265
266
|
t.push(
|
|
@@ -270,12 +271,12 @@ function ce({
|
|
|
270
271
|
)
|
|
271
272
|
);
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
+
function ue({
|
|
274
275
|
datasets: e,
|
|
275
276
|
errors: t,
|
|
276
277
|
requireAtLeastOne: n
|
|
277
278
|
}) {
|
|
278
|
-
const r =
|
|
279
|
+
const r = Re({
|
|
279
280
|
datasets: e,
|
|
280
281
|
requireAtLeastOne: n
|
|
281
282
|
});
|
|
@@ -297,7 +298,7 @@ function le({
|
|
|
297
298
|
);
|
|
298
299
|
}
|
|
299
300
|
}
|
|
300
|
-
function
|
|
301
|
+
function fe({
|
|
301
302
|
input: e,
|
|
302
303
|
errors: t
|
|
303
304
|
}) {
|
|
@@ -309,7 +310,7 @@ function ue({
|
|
|
309
310
|
)
|
|
310
311
|
);
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
+
function ze(e) {
|
|
313
314
|
var f, b;
|
|
314
315
|
const t = [];
|
|
315
316
|
if (!e || typeof e != "object")
|
|
@@ -326,7 +327,7 @@ function Pe(e) {
|
|
|
326
327
|
const n = e, r = [...n.warnings || []];
|
|
327
328
|
n.version !== 1 && t.push(p("invalid_version", "Dashboard plan version must be 1.")), (f = n.title) != null && f.trim() || t.push(p("missing_title", "Dashboard plan needs a title."));
|
|
328
329
|
const o = Array.isArray(n.datasets) ? n.datasets : [], i = Array.isArray(n.sheets) ? n.sheets : [];
|
|
329
|
-
|
|
330
|
+
ue({ datasets: o, errors: t, requireAtLeastOne: !0 }), i.length !== 1 && t.push(
|
|
330
331
|
p(
|
|
331
332
|
"invalid_sheet_count",
|
|
332
333
|
"MVP dashboard authoring creates exactly one dashboard sheet."
|
|
@@ -367,7 +368,7 @@ function Pe(e) {
|
|
|
367
368
|
"Non-text card has no analytics intent and may be skipped by the app layer.",
|
|
368
369
|
l.id
|
|
369
370
|
)
|
|
370
|
-
),
|
|
371
|
+
), de({ card: l, datasets: o, errors: t }), le({ card: l, errors: t }), ce({ card: l, datasets: o, errors: t });
|
|
371
372
|
const h = Array.isArray(n.filterInputs) ? n.filterInputs : [], I = h.map((l) => l.id), w = N(I);
|
|
372
373
|
w && t.push(
|
|
373
374
|
p(
|
|
@@ -383,7 +384,7 @@ function Pe(e) {
|
|
|
383
384
|
)
|
|
384
385
|
);
|
|
385
386
|
for (const l of h)
|
|
386
|
-
|
|
387
|
+
fe({ input: l, errors: t });
|
|
387
388
|
const c = Array.isArray(n.calculatedFields) ? n.calculatedFields : [];
|
|
388
389
|
for (const l of c)
|
|
389
390
|
l.scope === "domain" && l.reuseOnly !== !0 && t.push(
|
|
@@ -415,7 +416,7 @@ function Oe(e) {
|
|
|
415
416
|
p("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
|
|
416
417
|
);
|
|
417
418
|
const o = Array.isArray(n.datasets) ? n.datasets : [], i = Array.isArray(n.operations) ? n.operations : [];
|
|
418
|
-
|
|
419
|
+
ue({ datasets: o, errors: t, requireAtLeastOne: !1 });
|
|
419
420
|
for (const d of i) {
|
|
420
421
|
if (d.kind === "unsupported") {
|
|
421
422
|
r.push(
|
|
@@ -429,18 +430,18 @@ function Oe(e) {
|
|
|
429
430
|
"Whole-dashboard authoring supports built-in visual types only.",
|
|
430
431
|
d.card.id
|
|
431
432
|
)
|
|
432
|
-
), d.kind === "addCard" && (
|
|
433
|
+
), d.kind === "addCard" && (de({
|
|
433
434
|
card: d.card,
|
|
434
435
|
datasets: o,
|
|
435
436
|
errors: t
|
|
436
|
-
}),
|
|
437
|
+
}), le({
|
|
437
438
|
card: d.card,
|
|
438
439
|
errors: t
|
|
439
|
-
}),
|
|
440
|
+
}), ce({
|
|
440
441
|
card: d.card,
|
|
441
442
|
datasets: o,
|
|
442
443
|
errors: t
|
|
443
|
-
})), d.kind === "addFilterInput" &&
|
|
444
|
+
})), d.kind === "addFilterInput" && fe({ input: d.input, errors: t }), d.kind === "addCalculatedField" && d.field.scope === "domain" && d.field.reuseOnly !== !0 && t.push(
|
|
444
445
|
p(
|
|
445
446
|
"domain_calculated_field_create_out_of_scope",
|
|
446
447
|
`Creating domain calculated field "${d.field.name}" is outside MVP.`
|
|
@@ -449,7 +450,7 @@ function Oe(e) {
|
|
|
449
450
|
}
|
|
450
451
|
return { ok: t.length === 0, errors: t, warnings: r };
|
|
451
452
|
}
|
|
452
|
-
const
|
|
453
|
+
const Ve = {
|
|
453
454
|
lg: 48,
|
|
454
455
|
md: 36,
|
|
455
456
|
sm: 24,
|
|
@@ -474,22 +475,22 @@ function qe(e, t) {
|
|
|
474
475
|
return n += a, o = Math.max(o, i.h), d;
|
|
475
476
|
});
|
|
476
477
|
}
|
|
477
|
-
function
|
|
478
|
+
function Le(e) {
|
|
478
479
|
const t = [...e].sort((s, u) => s.priority - u.priority), n = t.filter((s) => s.role === "kpi"), r = t.filter((s) => s.role === "chart"), o = t.filter((s) => s.role === "table"), i = t.filter((s) => s.role === "text"), a = i.slice(0, 1), d = i.slice(a.length);
|
|
479
480
|
return { kpis: n, introText: a, charts: r, tables: o, supportingText: d };
|
|
480
481
|
}
|
|
481
|
-
function
|
|
482
|
+
function je(e, t, n) {
|
|
482
483
|
return t === "xxs" || t === "xs" ? n : t === "sm" ? Math.min(12, n) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
|
|
483
484
|
}
|
|
484
|
-
function
|
|
485
|
+
function Ee(e, t, n, r) {
|
|
485
486
|
return n === "xxs" || n === "xs" || n === "sm" || n === "md" || t === 1 || t % 2 === 1 && e === 0 ? r : r / 2;
|
|
486
487
|
}
|
|
487
|
-
function
|
|
488
|
+
function He(e) {
|
|
488
489
|
const { item: t, band: n, index: r, bandCount: o, breakpoint: i, columns: a } = e;
|
|
489
490
|
return n === "kpi" ? {
|
|
490
491
|
...t,
|
|
491
492
|
band: n,
|
|
492
|
-
w:
|
|
493
|
+
w: je(o, i, a),
|
|
493
494
|
h: 15,
|
|
494
495
|
minW: Math.min(6, a),
|
|
495
496
|
minH: 12
|
|
@@ -517,15 +518,15 @@ function Ee(e) {
|
|
|
517
518
|
} : {
|
|
518
519
|
...t,
|
|
519
520
|
band: n,
|
|
520
|
-
w:
|
|
521
|
+
w: Ee(r, o, i, a),
|
|
521
522
|
h: i === "xxs" || i === "xs" ? 28 : 30,
|
|
522
523
|
minW: Math.min(12, a),
|
|
523
524
|
minH: 16
|
|
524
525
|
};
|
|
525
526
|
}
|
|
526
|
-
function
|
|
527
|
+
function F(e, t, n, r) {
|
|
527
528
|
return e.map(
|
|
528
|
-
(o, i) =>
|
|
529
|
+
(o, i) => He({
|
|
529
530
|
item: o,
|
|
530
531
|
band: t,
|
|
531
532
|
index: i,
|
|
@@ -535,83 +536,93 @@ function x(e, t, n, r) {
|
|
|
535
536
|
})
|
|
536
537
|
);
|
|
537
538
|
}
|
|
538
|
-
function
|
|
539
|
-
const t =
|
|
539
|
+
function G(e) {
|
|
540
|
+
const t = Le(e);
|
|
540
541
|
return Object.fromEntries(
|
|
541
|
-
|
|
542
|
-
const r =
|
|
543
|
-
...
|
|
544
|
-
...
|
|
545
|
-
...
|
|
546
|
-
...
|
|
547
|
-
...
|
|
542
|
+
ye.map((n) => {
|
|
543
|
+
const r = Ve[n], o = [
|
|
544
|
+
...F(t.introText, "introText", n, r),
|
|
545
|
+
...F(t.kpis, "kpi", n, r),
|
|
546
|
+
...F(t.charts, "chart", n, r),
|
|
547
|
+
...F(t.tables, "table", n, r),
|
|
548
|
+
...F(t.supportingText, "supportingText", n, r)
|
|
548
549
|
];
|
|
549
550
|
return [n, qe(o, r)];
|
|
550
551
|
})
|
|
551
552
|
);
|
|
552
553
|
}
|
|
553
|
-
function He(e) {
|
|
554
|
-
const t = we(e);
|
|
555
|
-
return t === "datetime" ? "date" : t === "unknown" ? "string" : t;
|
|
556
|
-
}
|
|
557
554
|
function We(e) {
|
|
558
|
-
|
|
555
|
+
const t = ve(e);
|
|
556
|
+
return t === "datetime" ? "date" : t === "unknown" ? "string" : t;
|
|
559
557
|
}
|
|
560
558
|
function Ke(e) {
|
|
561
|
-
return
|
|
559
|
+
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
562
560
|
}
|
|
563
561
|
function Ge(e) {
|
|
562
|
+
return Ke(e) && typeof e.filterId == "string" && typeof e.operation == "string" && Array.isArray(e.values);
|
|
563
|
+
}
|
|
564
|
+
function Ue(e) {
|
|
564
565
|
return e.filter(
|
|
565
566
|
(t) => typeof t == "string" || typeof t == "number"
|
|
566
567
|
);
|
|
567
568
|
}
|
|
568
|
-
function
|
|
569
|
+
function Qe(e) {
|
|
569
570
|
return e.filter(
|
|
570
571
|
(t) => t instanceof Date || typeof t == "string"
|
|
571
572
|
);
|
|
572
573
|
}
|
|
573
|
-
function
|
|
574
|
+
function U(e, t) {
|
|
574
575
|
if (t === void 0)
|
|
575
576
|
return;
|
|
576
|
-
const n =
|
|
577
|
-
if (
|
|
578
|
-
return {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
577
|
+
const n = We(e.dataType), r = e.operation || "in";
|
|
578
|
+
if (Ge(t))
|
|
579
|
+
return O({
|
|
580
|
+
definition: e,
|
|
581
|
+
sourceValue: t,
|
|
582
|
+
value: {
|
|
583
|
+
...t,
|
|
584
|
+
filterId: e.id,
|
|
585
|
+
name: t.name || e.column,
|
|
586
|
+
valueType: n,
|
|
587
|
+
dataType: e.dataType,
|
|
588
|
+
fieldMeta: e.fieldMeta,
|
|
589
|
+
semanticContext: e.semanticContext
|
|
590
|
+
}
|
|
591
|
+
});
|
|
587
592
|
if (r === "is null" || r === "is not null")
|
|
588
|
-
return {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
593
|
+
return O({
|
|
594
|
+
definition: e,
|
|
595
|
+
value: {
|
|
596
|
+
filterId: e.id,
|
|
597
|
+
name: e.column,
|
|
598
|
+
operation: r,
|
|
599
|
+
valueType: n,
|
|
600
|
+
values: [],
|
|
601
|
+
dataType: e.dataType,
|
|
602
|
+
fieldMeta: e.fieldMeta,
|
|
603
|
+
semanticContext: e.semanticContext
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
const o = Array.isArray(t) ? t : [t], i = n === "date" ? Qe(o) : Ue(o);
|
|
599
607
|
if (i.length !== 0 && !((r === "between" || r === "not between") && i.length < 2))
|
|
600
|
-
return {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
608
|
+
return O({
|
|
609
|
+
definition: e,
|
|
610
|
+
value: {
|
|
611
|
+
filterId: e.id,
|
|
612
|
+
name: e.column,
|
|
613
|
+
operation: r,
|
|
614
|
+
valueType: n,
|
|
615
|
+
values: i,
|
|
616
|
+
dataType: e.dataType,
|
|
617
|
+
fieldMeta: e.fieldMeta,
|
|
618
|
+
semanticContext: e.semanticContext
|
|
619
|
+
}
|
|
620
|
+
});
|
|
610
621
|
}
|
|
611
|
-
function
|
|
622
|
+
function pe(e, t, n) {
|
|
612
623
|
return n ? { code: e, message: t, cardId: n } : { code: e, message: t };
|
|
613
624
|
}
|
|
614
|
-
function
|
|
625
|
+
function Ye(e, t, n) {
|
|
615
626
|
const r = (t || []).filter(
|
|
616
627
|
(o) => o.scope === "card" && o.targetCardId === n
|
|
617
628
|
).map((o) => o.field).filter(Boolean);
|
|
@@ -623,50 +634,50 @@ function Qe(e, t, n) {
|
|
|
623
634
|
]
|
|
624
635
|
};
|
|
625
636
|
}
|
|
626
|
-
function
|
|
637
|
+
function H(e, t) {
|
|
627
638
|
return Array.from(
|
|
628
639
|
new Set(
|
|
629
640
|
(e || []).map((n) => t.get(n)).filter((n) => !!n)
|
|
630
641
|
)
|
|
631
642
|
);
|
|
632
643
|
}
|
|
633
|
-
function
|
|
644
|
+
function Je(e, t) {
|
|
634
645
|
if ((e == null ? void 0 : e.kind) !== "cards")
|
|
635
646
|
return e;
|
|
636
|
-
const n =
|
|
647
|
+
const n = H(e.cardIds, t);
|
|
637
648
|
return n.length > 0 ? { ...e, cardIds: n } : null;
|
|
638
649
|
}
|
|
639
|
-
function
|
|
650
|
+
function Xe(e, t) {
|
|
640
651
|
return !e.applyToCardIds && !e.excludeCardIds ? e : {
|
|
641
652
|
...e,
|
|
642
653
|
...e.applyToCardIds ? {
|
|
643
|
-
applyToCardIds:
|
|
654
|
+
applyToCardIds: H(
|
|
644
655
|
e.applyToCardIds,
|
|
645
656
|
t
|
|
646
657
|
)
|
|
647
658
|
} : {},
|
|
648
659
|
...e.excludeCardIds ? {
|
|
649
|
-
excludeCardIds:
|
|
660
|
+
excludeCardIds: H(
|
|
650
661
|
e.excludeCardIds,
|
|
651
662
|
t
|
|
652
663
|
)
|
|
653
664
|
} : {}
|
|
654
665
|
};
|
|
655
666
|
}
|
|
656
|
-
function
|
|
667
|
+
function Ze(e, t) {
|
|
657
668
|
const n = {}, r = [];
|
|
658
669
|
return {
|
|
659
670
|
inputs: (e.filterInputs || []).flatMap(
|
|
660
671
|
(i, a) => {
|
|
661
|
-
const d =
|
|
672
|
+
const d = Je(i.scope, t);
|
|
662
673
|
if (d === null)
|
|
663
674
|
return r.push(
|
|
664
|
-
|
|
675
|
+
pe(
|
|
665
676
|
"filter_input_scope_empty",
|
|
666
677
|
`Filter input "${i.label}" was skipped because all scoped cards were skipped during query validation.`
|
|
667
678
|
)
|
|
668
679
|
), [];
|
|
669
|
-
const s =
|
|
680
|
+
const s = U(
|
|
670
681
|
i.filter,
|
|
671
682
|
i.defaultValue
|
|
672
683
|
);
|
|
@@ -689,7 +700,7 @@ function Xe(e, t) {
|
|
|
689
700
|
order: a
|
|
690
701
|
},
|
|
691
702
|
exports: ["label", "value", "start", "end", "range"],
|
|
692
|
-
filter:
|
|
703
|
+
filter: Xe(i.filter, t)
|
|
693
704
|
}
|
|
694
705
|
];
|
|
695
706
|
}
|
|
@@ -698,9 +709,9 @@ function Xe(e, t) {
|
|
|
698
709
|
defaultInputValues: n.shared && Object.keys(n.shared).length > 0 ? n : void 0
|
|
699
710
|
};
|
|
700
711
|
}
|
|
701
|
-
function
|
|
712
|
+
function xt(e) {
|
|
702
713
|
var v, y;
|
|
703
|
-
const t =
|
|
714
|
+
const t = ze(e.plan);
|
|
704
715
|
if (!t.ok)
|
|
705
716
|
throw new Error(
|
|
706
717
|
t.errors.map((c) => c.message).join(`
|
|
@@ -717,7 +728,7 @@ function At(e) {
|
|
|
717
728
|
for (const c of n.cards) {
|
|
718
729
|
const f = i.get(c.id);
|
|
719
730
|
if (!f) {
|
|
720
|
-
const l =
|
|
731
|
+
const l = pe(
|
|
721
732
|
"missing_card_artifact",
|
|
722
733
|
`Card "${c.title}" was skipped because no generated artifact was supplied.`,
|
|
723
734
|
c.id
|
|
@@ -726,7 +737,7 @@ function At(e) {
|
|
|
726
737
|
continue;
|
|
727
738
|
}
|
|
728
739
|
r.push(...f.warnings || []);
|
|
729
|
-
const b =
|
|
740
|
+
const b = Ye(
|
|
730
741
|
f.card,
|
|
731
742
|
e.plan.calculatedFields,
|
|
732
743
|
c.id
|
|
@@ -739,9 +750,9 @@ function At(e) {
|
|
|
739
750
|
}
|
|
740
751
|
if (d.length === 0)
|
|
741
752
|
throw new Error("Dashboard plan did not produce any persistable cards.");
|
|
742
|
-
const { inputs: s, defaultInputValues: u, warnings: h } =
|
|
753
|
+
const { inputs: s, defaultInputValues: u, warnings: h } = Ze(e.plan, a);
|
|
743
754
|
r.push(...h);
|
|
744
|
-
const I =
|
|
755
|
+
const I = G(
|
|
745
756
|
n.cards.filter((c) => d.some((f) => f.id === c.frameId)).map((c) => ({
|
|
746
757
|
frameId: c.frameId,
|
|
747
758
|
priority: c.priority,
|
|
@@ -771,10 +782,10 @@ function At(e) {
|
|
|
771
782
|
function A(e, t, n) {
|
|
772
783
|
return n ? { code: e, message: t, cardId: n } : { code: e, message: t };
|
|
773
784
|
}
|
|
774
|
-
function
|
|
785
|
+
function et(e) {
|
|
775
786
|
return JSON.parse(JSON.stringify(e));
|
|
776
787
|
}
|
|
777
|
-
function
|
|
788
|
+
function tt(e) {
|
|
778
789
|
var t;
|
|
779
790
|
return (t = e.sheets) == null ? void 0 : t.find(
|
|
780
791
|
(n) => (n.kind || "dashboard") === "dashboard"
|
|
@@ -790,40 +801,40 @@ function q(e, t) {
|
|
|
790
801
|
}
|
|
791
802
|
return null;
|
|
792
803
|
}
|
|
793
|
-
function
|
|
804
|
+
function he(e) {
|
|
794
805
|
var n, r;
|
|
795
806
|
const t = (r = (n = e.cards) == null ? void 0 : n[0]) == null ? void 0 : r.type;
|
|
796
807
|
return t === "kpi" ? "kpi" : t === "table" || t === "detailTable" || t === "pivotTable" ? "table" : t === "text" ? "text" : "chart";
|
|
797
808
|
}
|
|
798
|
-
function
|
|
809
|
+
function nt(e) {
|
|
799
810
|
var t;
|
|
800
811
|
return new Map(
|
|
801
812
|
(((t = e.layouts) == null ? void 0 : t.lg) || []).map((n, r) => [n.i, r])
|
|
802
813
|
);
|
|
803
814
|
}
|
|
804
|
-
function
|
|
805
|
-
const n =
|
|
815
|
+
function me(e, t = /* @__PURE__ */ new Map()) {
|
|
816
|
+
const n = nt(e), r = Math.max(
|
|
806
817
|
n.size,
|
|
807
818
|
t.size
|
|
808
819
|
), o = (e.frames || []).map(
|
|
809
820
|
(i, a) => ({
|
|
810
821
|
frameId: i.id,
|
|
811
|
-
role:
|
|
822
|
+
role: he(i),
|
|
812
823
|
priority: t.get(i.id) ?? n.get(i.id) ?? r + a
|
|
813
824
|
})
|
|
814
825
|
);
|
|
815
|
-
e.layouts =
|
|
826
|
+
e.layouts = G(o);
|
|
816
827
|
}
|
|
817
|
-
function
|
|
828
|
+
function rt(e) {
|
|
818
829
|
return Object.values(e.layouts || {}).some((t) => t.length > 0);
|
|
819
830
|
}
|
|
820
|
-
function
|
|
821
|
-
if (!
|
|
822
|
-
|
|
831
|
+
function at(e, t) {
|
|
832
|
+
if (!rt(e)) {
|
|
833
|
+
me(e);
|
|
823
834
|
return;
|
|
824
835
|
}
|
|
825
|
-
const n =
|
|
826
|
-
{ frameId: t.id, role:
|
|
836
|
+
const n = G([
|
|
837
|
+
{ frameId: t.id, role: he(t), priority: 0 }
|
|
827
838
|
]);
|
|
828
839
|
e.layouts ?? (e.layouts = {});
|
|
829
840
|
for (const [r, o] of Object.entries(n)) {
|
|
@@ -843,9 +854,9 @@ function rt(e, t) {
|
|
|
843
854
|
];
|
|
844
855
|
}
|
|
845
856
|
}
|
|
846
|
-
function
|
|
857
|
+
function it(e, t) {
|
|
847
858
|
var r;
|
|
848
|
-
const n =
|
|
859
|
+
const n = U(
|
|
849
860
|
t.filter,
|
|
850
861
|
t.defaultValue
|
|
851
862
|
);
|
|
@@ -857,7 +868,7 @@ function at(e, t) {
|
|
|
857
868
|
}
|
|
858
869
|
});
|
|
859
870
|
}
|
|
860
|
-
function
|
|
871
|
+
function Tt(e) {
|
|
861
872
|
var d;
|
|
862
873
|
const t = Oe(e.changePlan);
|
|
863
874
|
if (!t.ok)
|
|
@@ -865,9 +876,9 @@ function xt(e) {
|
|
|
865
876
|
t.errors.map((s) => s.message).join(`
|
|
866
877
|
`) || "Dashboard change plan is invalid."
|
|
867
878
|
);
|
|
868
|
-
const n =
|
|
879
|
+
const n = et(e.dashboard), r = [...t.warnings], o = [], i = new Map(
|
|
869
880
|
e.cardArtifacts.map((s) => [s.planCardId, s])
|
|
870
|
-
), a =
|
|
881
|
+
), a = tt(n);
|
|
871
882
|
if (!a)
|
|
872
883
|
throw new Error("Dashboard has no editable dashboard sheet.");
|
|
873
884
|
a.frames ?? (a.frames = []);
|
|
@@ -906,7 +917,7 @@ function xt(e) {
|
|
|
906
917
|
cards: [h.card],
|
|
907
918
|
activeCardId: h.card.id
|
|
908
919
|
};
|
|
909
|
-
a.frames.push(I),
|
|
920
|
+
a.frames.push(I), at(a, I);
|
|
910
921
|
break;
|
|
911
922
|
}
|
|
912
923
|
case "addFilterInput": {
|
|
@@ -928,7 +939,7 @@ function xt(e) {
|
|
|
928
939
|
exports: ["label", "value", "start", "end", "range"],
|
|
929
940
|
filter: s.input.filter
|
|
930
941
|
};
|
|
931
|
-
n.inputs.push(u),
|
|
942
|
+
n.inputs.push(u), it(n, s.input);
|
|
932
943
|
break;
|
|
933
944
|
}
|
|
934
945
|
case "addCalculatedField": {
|
|
@@ -968,7 +979,7 @@ function xt(e) {
|
|
|
968
979
|
const I = s.cardIds[h], w = q(n, I);
|
|
969
980
|
w && u.set(w.frame.id, h);
|
|
970
981
|
}
|
|
971
|
-
|
|
982
|
+
me(a, u);
|
|
972
983
|
break;
|
|
973
984
|
}
|
|
974
985
|
case "reuseCalculatedField":
|
|
@@ -990,10 +1001,10 @@ function xt(e) {
|
|
|
990
1001
|
function g(e, t, n) {
|
|
991
1002
|
return n ? { code: e, message: t, cardId: n } : { code: e, message: t };
|
|
992
1003
|
}
|
|
993
|
-
function
|
|
1004
|
+
function x(e, t) {
|
|
994
1005
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || t;
|
|
995
1006
|
}
|
|
996
|
-
function
|
|
1007
|
+
function be(e, t) {
|
|
997
1008
|
if (!t.has(e))
|
|
998
1009
|
return t.add(e), e;
|
|
999
1010
|
let n = 2, r = `${e}-${n}`;
|
|
@@ -1004,17 +1015,17 @@ function me(e, t) {
|
|
|
1004
1015
|
function $(e) {
|
|
1005
1016
|
return !!(e && typeof e == "object");
|
|
1006
1017
|
}
|
|
1007
|
-
function
|
|
1018
|
+
function ge(e) {
|
|
1008
1019
|
return Array.isArray(e.inputs) ? e.inputs.filter(
|
|
1009
1020
|
(t) => $(t) && typeof t.id == "string"
|
|
1010
1021
|
) : [];
|
|
1011
1022
|
}
|
|
1012
|
-
function
|
|
1023
|
+
function Q(e) {
|
|
1013
1024
|
return Array.isArray(e.sections) ? e.sections.filter(
|
|
1014
1025
|
(t) => $(t)
|
|
1015
1026
|
) : [];
|
|
1016
1027
|
}
|
|
1017
|
-
function
|
|
1028
|
+
function Y(e) {
|
|
1018
1029
|
return Array.isArray(e.views) ? e.views.filter(
|
|
1019
1030
|
(t) => $(t)
|
|
1020
1031
|
) : [];
|
|
@@ -1029,7 +1040,7 @@ function k(e) {
|
|
|
1029
1040
|
}
|
|
1030
1041
|
return t;
|
|
1031
1042
|
}
|
|
1032
|
-
function
|
|
1043
|
+
function ot(e) {
|
|
1033
1044
|
var r, o, i;
|
|
1034
1045
|
if (!e)
|
|
1035
1046
|
return [];
|
|
@@ -1064,26 +1075,26 @@ function it(e) {
|
|
|
1064
1075
|
}
|
|
1065
1076
|
return t;
|
|
1066
1077
|
}
|
|
1067
|
-
function
|
|
1078
|
+
function st(e) {
|
|
1068
1079
|
const t = [];
|
|
1069
|
-
for (const n of
|
|
1080
|
+
for (const n of ge(e)) {
|
|
1070
1081
|
const r = S(n.field);
|
|
1071
1082
|
r && t.push(r);
|
|
1072
1083
|
}
|
|
1073
|
-
for (const n of
|
|
1074
|
-
for (const r of
|
|
1075
|
-
t.push(...
|
|
1084
|
+
for (const n of Q(e))
|
|
1085
|
+
for (const r of Y(n))
|
|
1086
|
+
t.push(...ot(r.analytics));
|
|
1076
1087
|
return t;
|
|
1077
1088
|
}
|
|
1078
|
-
function
|
|
1089
|
+
function dt(e) {
|
|
1079
1090
|
var n;
|
|
1080
1091
|
const t = [];
|
|
1081
|
-
for (const r of
|
|
1082
|
-
for (const o of
|
|
1092
|
+
for (const r of Q(e))
|
|
1093
|
+
for (const o of Y(r))
|
|
1083
1094
|
T((n = o.analytics) == null ? void 0 : n.source) && t.push(o.analytics.source);
|
|
1084
1095
|
return t;
|
|
1085
1096
|
}
|
|
1086
|
-
function
|
|
1097
|
+
function ct(e, t) {
|
|
1087
1098
|
const n = P(e).filter(T);
|
|
1088
1099
|
if (n.length === 0)
|
|
1089
1100
|
return t.push(
|
|
@@ -1104,9 +1115,9 @@ function dt(e, t) {
|
|
|
1104
1115
|
)
|
|
1105
1116
|
), [n[0]]) : n;
|
|
1106
1117
|
}
|
|
1107
|
-
function
|
|
1108
|
-
const n =
|
|
1109
|
-
|
|
1118
|
+
function lt(e, t) {
|
|
1119
|
+
const n = Q(e), r = ge(e), o = P(st(e)), i = P(
|
|
1120
|
+
dt(e)
|
|
1110
1121
|
);
|
|
1111
1122
|
return {
|
|
1112
1123
|
sections: n,
|
|
@@ -1114,13 +1125,13 @@ function ct(e, t) {
|
|
|
1114
1125
|
sources: o,
|
|
1115
1126
|
primarySources: i,
|
|
1116
1127
|
defaultSource: i.length === 1 ? i[0] : void 0,
|
|
1117
|
-
datasets:
|
|
1128
|
+
datasets: ct(o, t)
|
|
1118
1129
|
};
|
|
1119
1130
|
}
|
|
1120
|
-
function lt(e) {
|
|
1121
|
-
return e && ae(e).ok ? e : void 0;
|
|
1122
|
-
}
|
|
1123
1131
|
function ut(e) {
|
|
1132
|
+
return e && ie(e).ok ? e : void 0;
|
|
1133
|
+
}
|
|
1134
|
+
function ft(e) {
|
|
1124
1135
|
var t;
|
|
1125
1136
|
switch ((t = e.presentation) == null ? void 0 : t.kind) {
|
|
1126
1137
|
case "kpi":
|
|
@@ -1139,12 +1150,12 @@ function ut(e) {
|
|
|
1139
1150
|
return null;
|
|
1140
1151
|
}
|
|
1141
1152
|
}
|
|
1142
|
-
function
|
|
1153
|
+
function pt(e) {
|
|
1143
1154
|
var t, n, r;
|
|
1144
1155
|
return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((n = e.presentation) == null ? void 0 : n.kind) === "table" ? "table" : ((r = e.presentation) == null ? void 0 : r.kind) === "text" ? "text" : "chart";
|
|
1145
1156
|
}
|
|
1146
|
-
function
|
|
1147
|
-
const t =
|
|
1157
|
+
function ht(e) {
|
|
1158
|
+
const t = Ce(e);
|
|
1148
1159
|
switch (t) {
|
|
1149
1160
|
case "not_in":
|
|
1150
1161
|
return "not in";
|
|
@@ -1158,14 +1169,14 @@ function pt(e) {
|
|
|
1158
1169
|
return t || "in";
|
|
1159
1170
|
}
|
|
1160
1171
|
}
|
|
1161
|
-
function
|
|
1172
|
+
function mt(e) {
|
|
1162
1173
|
return $(e.field) ? e.field.dataType === "datetime" ? "date" : e.field.dataType || "string" : "string";
|
|
1163
1174
|
}
|
|
1164
|
-
function
|
|
1175
|
+
function bt(e) {
|
|
1165
1176
|
if (!(!e || e.kind !== "physical"))
|
|
1166
1177
|
return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
|
|
1167
1178
|
}
|
|
1168
|
-
function
|
|
1179
|
+
function gt(e, t, n, r, o, i) {
|
|
1169
1180
|
if (e.kind !== "filter")
|
|
1170
1181
|
return i.push(
|
|
1171
1182
|
g(
|
|
@@ -1180,7 +1191,7 @@ function bt(e, t, n, r, o, i) {
|
|
|
1180
1191
|
`Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
|
|
1181
1192
|
)
|
|
1182
1193
|
), null;
|
|
1183
|
-
const a =
|
|
1194
|
+
const a = Ae({
|
|
1184
1195
|
explicitSource: void 0,
|
|
1185
1196
|
field: e.field,
|
|
1186
1197
|
defaultSource: t,
|
|
@@ -1194,18 +1205,18 @@ function bt(e, t, n, r, o, i) {
|
|
|
1194
1205
|
)
|
|
1195
1206
|
), null;
|
|
1196
1207
|
const h = {
|
|
1197
|
-
id: `filter-${
|
|
1198
|
-
|
|
1208
|
+
id: `filter-${be(
|
|
1209
|
+
x(e.id, e.field.name),
|
|
1199
1210
|
o
|
|
1200
1211
|
)}`,
|
|
1201
1212
|
variableName: e.id,
|
|
1202
1213
|
connectionId: d,
|
|
1203
1214
|
title: e.label,
|
|
1204
1215
|
column: e.field.name,
|
|
1205
|
-
dataType:
|
|
1206
|
-
qualifiedTableName:
|
|
1216
|
+
dataType: mt(e),
|
|
1217
|
+
qualifiedTableName: bt(a),
|
|
1207
1218
|
sql: "",
|
|
1208
|
-
operation:
|
|
1219
|
+
operation: ht(e.operator),
|
|
1209
1220
|
type: e.multi === !1 ? "single" : "multiple",
|
|
1210
1221
|
location: "dashboard",
|
|
1211
1222
|
displayMode: "toolbar",
|
|
@@ -1240,13 +1251,13 @@ function bt(e, t, n, r, o, i) {
|
|
|
1240
1251
|
variableName: e.id,
|
|
1241
1252
|
scope: r,
|
|
1242
1253
|
filter: h,
|
|
1243
|
-
defaultValue:
|
|
1254
|
+
defaultValue: U(
|
|
1244
1255
|
h,
|
|
1245
1256
|
e.defaultValue
|
|
1246
1257
|
)
|
|
1247
1258
|
};
|
|
1248
1259
|
}
|
|
1249
|
-
function
|
|
1260
|
+
function L(e) {
|
|
1250
1261
|
const t = [], n = [];
|
|
1251
1262
|
for (const r of e.viewIds) {
|
|
1252
1263
|
const o = e.viewIdToCardId.get(r);
|
|
@@ -1259,7 +1270,7 @@ function V(e) {
|
|
|
1259
1270
|
)
|
|
1260
1271
|
), Array.from(new Set(t));
|
|
1261
1272
|
}
|
|
1262
|
-
function
|
|
1273
|
+
function It(e) {
|
|
1263
1274
|
var r, o;
|
|
1264
1275
|
if (!e.protocolScope) {
|
|
1265
1276
|
const i = Array.from(new Set(e.boundCardIds));
|
|
@@ -1269,7 +1280,7 @@ function gt(e) {
|
|
|
1269
1280
|
if (!((r = e.protocolScope.excludeViewIds) != null && r.length))
|
|
1270
1281
|
return;
|
|
1271
1282
|
const i = new Set(
|
|
1272
|
-
|
|
1283
|
+
L({
|
|
1273
1284
|
inputLabel: e.inputLabel,
|
|
1274
1285
|
viewIds: e.protocolScope.excludeViewIds,
|
|
1275
1286
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1282,7 +1293,7 @@ function gt(e) {
|
|
|
1282
1293
|
};
|
|
1283
1294
|
}
|
|
1284
1295
|
if (e.protocolScope.level === "view") {
|
|
1285
|
-
const i =
|
|
1296
|
+
const i = L({
|
|
1286
1297
|
inputLabel: e.inputLabel,
|
|
1287
1298
|
viewIds: e.protocolScope.viewIds,
|
|
1288
1299
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1306,7 +1317,7 @@ function gt(e) {
|
|
|
1306
1317
|
if (!((o = e.protocolScope.excludeViewIds) != null && o.length))
|
|
1307
1318
|
return { kind: "cards", cardIds: t };
|
|
1308
1319
|
const n = new Set(
|
|
1309
|
-
|
|
1320
|
+
L({
|
|
1310
1321
|
inputLabel: e.inputLabel,
|
|
1311
1322
|
viewIds: e.protocolScope.excludeViewIds,
|
|
1312
1323
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1318,29 +1329,29 @@ function gt(e) {
|
|
|
1318
1329
|
cardIds: t.filter((i) => !n.has(i))
|
|
1319
1330
|
};
|
|
1320
1331
|
}
|
|
1321
|
-
function
|
|
1332
|
+
function $t(e) {
|
|
1322
1333
|
var v, y, c;
|
|
1323
|
-
const t = [], n =
|
|
1334
|
+
const t = [], n = Se(e);
|
|
1324
1335
|
for (const f of n.warnings)
|
|
1325
1336
|
t.push(g(f.code, f.message));
|
|
1326
1337
|
for (const f of n.errors)
|
|
1327
1338
|
t.push(g(f.code, f.message));
|
|
1328
|
-
const r =
|
|
1339
|
+
const r = lt(e, t), o = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
1329
1340
|
let h = 0;
|
|
1330
1341
|
for (const [f, b] of r.sections.entries()) {
|
|
1331
|
-
const l = typeof b.title == "string" ? b.title : `Section ${f + 1}`,
|
|
1332
|
-
a.set(
|
|
1333
|
-
for (const [
|
|
1334
|
-
const
|
|
1335
|
-
m.id || `${l}-${m.title || `View ${
|
|
1336
|
-
`card-${f + 1}-${
|
|
1342
|
+
const l = typeof b.title == "string" ? b.title : `Section ${f + 1}`, J = b.id || x(l, `section-${f + 1}`);
|
|
1343
|
+
a.set(J, []);
|
|
1344
|
+
for (const [X, m] of Y(b).entries()) {
|
|
1345
|
+
const Z = ft(m), z = x(
|
|
1346
|
+
m.id || `${l}-${m.title || `View ${X + 1}`}`,
|
|
1347
|
+
`card-${f + 1}-${X + 1}`
|
|
1337
1348
|
);
|
|
1338
|
-
if (!
|
|
1349
|
+
if (!Z) {
|
|
1339
1350
|
t.push(
|
|
1340
1351
|
g(
|
|
1341
1352
|
"unsupported_presentation",
|
|
1342
1353
|
`Dashboard presentation "${((v = m.presentation) == null ? void 0 : v.kind) || "unknown"}" is not supported by the dashboard authoring adapter.`,
|
|
1343
|
-
`card-${
|
|
1354
|
+
`card-${z}`
|
|
1344
1355
|
)
|
|
1345
1356
|
);
|
|
1346
1357
|
continue;
|
|
@@ -1350,34 +1361,34 @@ function Ft(e) {
|
|
|
1350
1361
|
g(
|
|
1351
1362
|
"sql_intent_deferred",
|
|
1352
1363
|
"SQL analytics intent is valid protocol, but the current dashboard authoring adapter only materializes semantic and physical config-card intents.",
|
|
1353
|
-
`card-${
|
|
1364
|
+
`card-${z}`
|
|
1354
1365
|
)
|
|
1355
1366
|
);
|
|
1356
1367
|
continue;
|
|
1357
1368
|
}
|
|
1358
|
-
const
|
|
1359
|
-
m.id && i.set(m.id, M), (c = a.get(
|
|
1360
|
-
const
|
|
1361
|
-
for (const
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1369
|
+
const ee = be(z, s), M = `card-${ee}`;
|
|
1370
|
+
m.id && i.set(m.id, M), (c = a.get(J)) == null || c.push(M);
|
|
1371
|
+
const Ie = m.analytics && "inputs" in m.analytics ? m.analytics.inputs : void 0;
|
|
1372
|
+
for (const te of Ie || []) {
|
|
1373
|
+
const ne = d.get(te.inputId) || [];
|
|
1374
|
+
ne.push(M), d.set(te.inputId, ne);
|
|
1364
1375
|
}
|
|
1365
1376
|
o.push({
|
|
1366
1377
|
id: M,
|
|
1367
|
-
frameId: `frame-${
|
|
1378
|
+
frameId: `frame-${ee}`,
|
|
1368
1379
|
title: m.title,
|
|
1369
1380
|
description: m.description,
|
|
1370
|
-
type:
|
|
1371
|
-
role:
|
|
1381
|
+
type: Z,
|
|
1382
|
+
role: pt(m),
|
|
1372
1383
|
priority: h,
|
|
1373
1384
|
section: l,
|
|
1374
|
-
analyticsIntent:
|
|
1385
|
+
analyticsIntent: ut(m.analytics),
|
|
1375
1386
|
text: m.text
|
|
1376
1387
|
}), h += 1;
|
|
1377
1388
|
}
|
|
1378
1389
|
}
|
|
1379
1390
|
const I = r.inputs.map((f) => {
|
|
1380
|
-
const b =
|
|
1391
|
+
const b = It({
|
|
1381
1392
|
protocolScope: f.scope,
|
|
1382
1393
|
inputLabel: f.label,
|
|
1383
1394
|
allCardIds: o.map((l) => l.id),
|
|
@@ -1386,7 +1397,7 @@ function Ft(e) {
|
|
|
1386
1397
|
sectionIdToCardIds: a,
|
|
1387
1398
|
warnings: t
|
|
1388
1399
|
});
|
|
1389
|
-
return b === null ? null :
|
|
1400
|
+
return b === null ? null : gt(
|
|
1390
1401
|
f,
|
|
1391
1402
|
r.defaultSource,
|
|
1392
1403
|
r.sources,
|
|
@@ -1397,13 +1408,13 @@ function Ft(e) {
|
|
|
1397
1408
|
}).filter((f) => !!f);
|
|
1398
1409
|
return { plan: {
|
|
1399
1410
|
version: 1,
|
|
1400
|
-
id: `plan-${
|
|
1411
|
+
id: `plan-${x(e.title, "dashboard")}`,
|
|
1401
1412
|
title: e.title,
|
|
1402
1413
|
description: e.description,
|
|
1403
1414
|
datasets: r.datasets,
|
|
1404
1415
|
sheets: [
|
|
1405
1416
|
{
|
|
1406
|
-
id: `sheet-${
|
|
1417
|
+
id: `sheet-${x(e.title, "dashboard")}`,
|
|
1407
1418
|
title: e.title,
|
|
1408
1419
|
description: e.description,
|
|
1409
1420
|
kind: "dashboard",
|
|
@@ -1416,57 +1427,57 @@ function Ft(e) {
|
|
|
1416
1427
|
}, warnings: t };
|
|
1417
1428
|
}
|
|
1418
1429
|
export {
|
|
1419
|
-
|
|
1420
|
-
|
|
1430
|
+
Bt as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
1431
|
+
ye as DASHBOARD_AUTHORING_BREAKPOINTS,
|
|
1421
1432
|
R as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1433
|
+
Kt as DashboardFilterMappingContractError,
|
|
1434
|
+
Rt as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
1435
|
+
Tt as applyDashboardChangePlan,
|
|
1436
|
+
Gt as buildDashboardCardSourceIndex,
|
|
1437
|
+
xt as compileDashboardFromPlan,
|
|
1438
|
+
G as compileResponsiveDashboardLayouts,
|
|
1439
|
+
Ut as createDashboardFilterBindingId,
|
|
1440
|
+
K as dashboardAuthoringDatasetMatchesSource,
|
|
1441
|
+
At as dashboardAuthoringFieldsReferToSameTarget,
|
|
1431
1442
|
S as dashboardAuthoringSourceFromField,
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1443
|
+
kt as dashboardAuthoringSourceKey,
|
|
1444
|
+
oe as dashboardAuthoringSourcesReferToSameDataset,
|
|
1445
|
+
Qt as dashboardCardFilterSourceInventoryContains,
|
|
1446
|
+
Yt as dashboardFilterTargetMatchesLogicalValue,
|
|
1447
|
+
Jt as dashboardFilterValueTypeForDataType,
|
|
1448
|
+
$t as dashboardPlanFromSemaphorDashboardIntent,
|
|
1449
|
+
Ft as findDashboardAuthoringDatasetForSource,
|
|
1450
|
+
Xt as findDashboardCardExecutableSource,
|
|
1451
|
+
Zt as findDashboardCardPinnedCatalogSource,
|
|
1452
|
+
en as findDashboardSqlPinnedCatalogSource,
|
|
1453
|
+
Be as getDashboardAuthoringCardSource,
|
|
1454
|
+
tn as getDashboardFilterSubscriptionHint,
|
|
1455
|
+
Pt as getTemporalBucketAuthoringOptions,
|
|
1456
|
+
zt as getTemporalBucketAuthoringSelection,
|
|
1457
|
+
nn as hasDashboardFilterSubscription,
|
|
1458
|
+
rn as isDashboardFilterOperationCompatible,
|
|
1448
1459
|
T as isMaterializableDashboardAuthoringSource,
|
|
1449
|
-
|
|
1450
|
-
|
|
1460
|
+
Ot as isSemaphorCartesianChartType,
|
|
1461
|
+
ke as isSemaphorSourceRef,
|
|
1451
1462
|
P as mergeDashboardAuthoringSources,
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1463
|
+
an as normalizeDashboardInputs,
|
|
1464
|
+
De as preferDashboardAuthoringSourceMetadata,
|
|
1465
|
+
Dt as preferredDashboardAuthoringSource,
|
|
1466
|
+
Vt as previewTemporalBucketAuthoringFormat,
|
|
1467
|
+
qt as reconcileTemporalBucketAuthoringFormat,
|
|
1468
|
+
on as requireNormalizedDashboardInputs,
|
|
1469
|
+
un as resolveCanonicalDetailResultRawKey,
|
|
1470
|
+
fn as resolveCanonicalResultOutputKey,
|
|
1471
|
+
pn as resolveCanonicalResultRawKey,
|
|
1472
|
+
Ae as resolveDashboardAuthoringSource,
|
|
1473
|
+
sn as resolveDashboardFilterAutomaticTarget,
|
|
1474
|
+
dn as resolveDashboardFilterInheritedTarget,
|
|
1475
|
+
cn as resolveDashboardSqlFilterTarget,
|
|
1476
|
+
Lt as resolveTemporalBucketAuthoringFormat,
|
|
1477
|
+
jt as resolveTemporalResultOwner,
|
|
1478
|
+
Et as supportsCanonicalDashboardTemporalResult,
|
|
1479
|
+
Ht as transformComparisonDocument,
|
|
1480
|
+
Re as validateDashboardAuthoringDatasetScope,
|
|
1470
1481
|
Oe as validateDashboardChangePlan,
|
|
1471
|
-
|
|
1482
|
+
ze as validateDashboardPlan
|
|
1472
1483
|
};
|