react-semaphor 0.1.440 → 0.1.442
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.js +1 -1
- package/dist/chunks/{code-editor-CIWiSltV.js → code-editor-BpADiIlq.js} +26 -26
- package/dist/chunks/{dashboard-C-eTAAKs.js → dashboard-BRj8nq8w.js} +77 -77
- package/dist/chunks/{dashboard--bQrQeiz.js → dashboard-BjqymJeS.js} +4986 -4900
- package/dist/chunks/{dashboard-briefing-launcher-xulAb1Oz.js → dashboard-briefing-launcher-B7LrrGSM.js} +165 -176
- package/dist/chunks/{dashboard-briefing-launcher-dgTjPWHX.js → dashboard-briefing-launcher-D5oHvdYf.js} +6 -11
- package/dist/chunks/{dashboard-controls-CWu1wt6_.js → dashboard-controls-CUd1yfGB.js} +4 -4
- package/dist/chunks/{dashboard-controls-D8BDZ5_q.js → dashboard-controls-DjyNG67M.js} +1 -1
- package/dist/chunks/{dashboard-json-ZgLCrrSW.js → dashboard-json-C5_h_0OT.js} +2 -2
- package/dist/chunks/{dashboard-json-Bpm-ePrD.js → dashboard-json-CiMI9PO-.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DEtVA2re.js → edit-dashboard-visual-BOkzUd4b.js} +8260 -7877
- package/dist/chunks/edit-dashboard-visual-EwylNae5.js +182 -0
- package/dist/chunks/{use-create-flow-overlay-state-B6a3gmF0.js → editor-action-buttons-Bz4ik8DY.js} +887 -870
- package/dist/chunks/editor-action-buttons-C0EXI0VB.js +16 -0
- package/dist/chunks/{report-preferences-dialog-Bjj_tIgL.js → report-preferences-dialog-Ck94m-ik.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-Ju8DjgyW.js → report-preferences-dialog-Cw4Ti1lc.js} +1 -1
- 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 +171 -157
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +66 -66
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-BCMupXbq.js +0 -182
- package/dist/chunks/use-create-flow-overlay-state-wcIRGLSM.js +0 -11
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { D as P, a as
|
|
2
|
-
import { t as
|
|
3
|
-
import { c as
|
|
4
|
-
import { v as ae, c as
|
|
1
|
+
import { D as P, a as Ie } from "../chunks/comparison-document-migration-Dj6xZMCb.js";
|
|
2
|
+
import { t as Nt } from "../chunks/comparison-document-migration-Dj6xZMCb.js";
|
|
3
|
+
import { c as ye, b as E, d as _e } from "../chunks/source-identity-5OPV4gvg.js";
|
|
4
|
+
import { v as ae, c as we } from "../chunks/validators-Bce_J7Vd.js";
|
|
5
5
|
import "../chunks/analyze-result-contract-CfOBEwaC.js";
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as
|
|
6
|
+
import { n as ve } from "../chunks/catalog-field-grounding-AOGwWu0K.js";
|
|
7
|
+
import { n as Se } from "../chunks/operators-C8TxpM4C.js";
|
|
8
8
|
function _(e) {
|
|
9
9
|
return e && typeof e == "object" ? e : null;
|
|
10
10
|
}
|
|
11
11
|
function C(e) {
|
|
12
12
|
return typeof e == "string" ? e : null;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Ce(e) {
|
|
15
15
|
var t, n, r;
|
|
16
16
|
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");
|
|
17
17
|
}
|
|
18
18
|
function T(e) {
|
|
19
|
-
return
|
|
19
|
+
return Ce(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
21
|
+
function Ct(e) {
|
|
22
|
+
return ye(e);
|
|
23
23
|
}
|
|
24
24
|
function ie(e, t) {
|
|
25
25
|
return E(e, t);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function ke(e, t) {
|
|
28
|
+
return _e(e, t);
|
|
29
29
|
}
|
|
30
30
|
function z(e) {
|
|
31
31
|
const t = [];
|
|
@@ -33,14 +33,14 @@ function z(e) {
|
|
|
33
33
|
const r = t.findIndex(
|
|
34
34
|
(o) => ie(o, n)
|
|
35
35
|
);
|
|
36
|
-
r === -1 ? t.push(n) : t[r] =
|
|
36
|
+
r === -1 ? t.push(n) : t[r] = ke(
|
|
37
37
|
t[r],
|
|
38
38
|
n
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function kt(e) {
|
|
44
44
|
return z(e)[0];
|
|
45
45
|
}
|
|
46
46
|
function L(e, t) {
|
|
@@ -59,7 +59,7 @@ function S(e, t) {
|
|
|
59
59
|
const n = j(e == null ? void 0 : e.source);
|
|
60
60
|
return n ? L(n, t) : void 0;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function xe({
|
|
63
63
|
explicitSource: e,
|
|
64
64
|
field: t,
|
|
65
65
|
defaultSource: n,
|
|
@@ -82,7 +82,7 @@ function ke({
|
|
|
82
82
|
if ((t == null ? void 0 : t.source) === void 0)
|
|
83
83
|
return j(n);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function xt(e, t) {
|
|
86
86
|
if (!(e != null && e.name) || !(t != null && t.name) || e.name !== t.name)
|
|
87
87
|
return !1;
|
|
88
88
|
const n = S(e), r = S(t);
|
|
@@ -96,35 +96,35 @@ function oe(e) {
|
|
|
96
96
|
var t, n;
|
|
97
97
|
return x(e) !== "semantic" ? null : ((n = C((t = _(e)) == null ? void 0 : t.domainId)) == null ? void 0 : n.trim()) || null;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function De(e) {
|
|
100
100
|
var t;
|
|
101
101
|
return x(e) !== "semantic" ? null : C((t = _(e)) == null ? void 0 : t.datasetName);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Ae(e) {
|
|
104
104
|
var t;
|
|
105
105
|
return x(e) !== "semantic" ? null : C((t = _(e)) == null ? void 0 : t.datasetId);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Fe(e) {
|
|
108
108
|
var t;
|
|
109
109
|
return x(e) !== "physical" ? null : C((t = _(e)) == null ? void 0 : t.connectionId);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Te(e) {
|
|
112
112
|
var t;
|
|
113
113
|
return x(e) !== "physical" ? null : C((t = _(e)) == null ? void 0 : t.tableName);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function $e(e) {
|
|
116
116
|
var t;
|
|
117
117
|
return x(e) !== "physical" ? "" : C((t = _(e)) == null ? void 0 : t.databaseName) || "";
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Me(e) {
|
|
120
120
|
var t;
|
|
121
121
|
return x(e) !== "physical" ? "" : C((t = _(e)) == null ? void 0 : t.schemaName) || "";
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Ne(e) {
|
|
124
124
|
if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
|
|
125
125
|
return e.analyticsIntent.source;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Be({
|
|
128
128
|
datasets: e,
|
|
129
129
|
requireAtLeastOne: t
|
|
130
130
|
}) {
|
|
@@ -139,12 +139,12 @@ function H(e, t) {
|
|
|
139
139
|
if (!t)
|
|
140
140
|
return !1;
|
|
141
141
|
if (t.kind === "semantic") {
|
|
142
|
-
const n =
|
|
143
|
-
return oe(e) === t.domainId ? n && t.datasetId ? n === t.datasetId :
|
|
142
|
+
const n = Ae(e);
|
|
143
|
+
return oe(e) === t.domainId ? n && t.datasetId ? n === t.datasetId : De(e) === t.datasetName : !1;
|
|
144
144
|
}
|
|
145
|
-
return t.kind === "physical" ?
|
|
145
|
+
return t.kind === "physical" ? Fe(e) === t.connectionId && Te(e) === t.tableName && $e(e) === (t.databaseName || "") && Me(e) === (t.schemaName || "") : !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Dt(e, t) {
|
|
148
148
|
return e.find(
|
|
149
149
|
(n) => H(n, t)
|
|
150
150
|
);
|
|
@@ -168,7 +168,7 @@ function se({
|
|
|
168
168
|
}) {
|
|
169
169
|
if (e.type === "text")
|
|
170
170
|
return;
|
|
171
|
-
const r =
|
|
171
|
+
const r = Ne(e);
|
|
172
172
|
if (!r) {
|
|
173
173
|
if (t.length <= 1)
|
|
174
174
|
return;
|
|
@@ -202,7 +202,7 @@ function re(e) {
|
|
|
202
202
|
(t) => !!(t && typeof t == "object")
|
|
203
203
|
) : [];
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Pe(e) {
|
|
206
206
|
var n, r;
|
|
207
207
|
if (!e)
|
|
208
208
|
return [];
|
|
@@ -237,7 +237,7 @@ function de({
|
|
|
237
237
|
errors: n
|
|
238
238
|
}) {
|
|
239
239
|
if (e.type !== "text") {
|
|
240
|
-
for (const r of
|
|
240
|
+
for (const r of Pe(e.analyticsIntent))
|
|
241
241
|
if (r && !t.some(
|
|
242
242
|
(o) => H(o, r)
|
|
243
243
|
)) {
|
|
@@ -274,7 +274,7 @@ function le({
|
|
|
274
274
|
errors: t,
|
|
275
275
|
requireAtLeastOne: n
|
|
276
276
|
}) {
|
|
277
|
-
const r =
|
|
277
|
+
const r = Be({
|
|
278
278
|
datasets: e,
|
|
279
279
|
requireAtLeastOne: n
|
|
280
280
|
});
|
|
@@ -296,7 +296,19 @@ function le({
|
|
|
296
296
|
);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function ue({
|
|
300
|
+
input: e,
|
|
301
|
+
errors: t
|
|
302
|
+
}) {
|
|
303
|
+
var n;
|
|
304
|
+
(n = e.filter.sql) != null && n.trim() && t.push(
|
|
305
|
+
p(
|
|
306
|
+
"generated_filter_sql_out_of_scope",
|
|
307
|
+
`Generated dashboard filter "${e.label}" must use grounded filter configuration; custom SQL is outside the dashboard-authoring contract.`
|
|
308
|
+
)
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
function ze(e) {
|
|
300
312
|
var f, g;
|
|
301
313
|
const t = [];
|
|
302
314
|
if (!e || typeof e != "object")
|
|
@@ -369,6 +381,8 @@ function Pe(e) {
|
|
|
369
381
|
`Duplicate dashboard input variable name: ${y}.`
|
|
370
382
|
)
|
|
371
383
|
);
|
|
384
|
+
for (const l of h)
|
|
385
|
+
ue({ input: l, errors: t });
|
|
372
386
|
const c = Array.isArray(n.calculatedFields) ? n.calculatedFields : [];
|
|
373
387
|
for (const l of c)
|
|
374
388
|
l.scope === "domain" && l.reuseOnly !== !0 && t.push(
|
|
@@ -379,7 +393,7 @@ function Pe(e) {
|
|
|
379
393
|
);
|
|
380
394
|
return { ok: t.length === 0, errors: t, warnings: r };
|
|
381
395
|
}
|
|
382
|
-
function
|
|
396
|
+
function Ve(e) {
|
|
383
397
|
var i;
|
|
384
398
|
const t = [];
|
|
385
399
|
if (!e || typeof e != "object")
|
|
@@ -425,7 +439,7 @@ function ze(e) {
|
|
|
425
439
|
card: d.card,
|
|
426
440
|
datasets: o,
|
|
427
441
|
errors: t
|
|
428
|
-
})), d.kind === "addCalculatedField" && d.field.scope === "domain" && d.field.reuseOnly !== !0 && t.push(
|
|
442
|
+
})), d.kind === "addFilterInput" && ue({ input: d.input, errors: t }), d.kind === "addCalculatedField" && d.field.scope === "domain" && d.field.reuseOnly !== !0 && t.push(
|
|
429
443
|
p(
|
|
430
444
|
"domain_calculated_field_create_out_of_scope",
|
|
431
445
|
`Creating domain calculated field "${d.field.name}" is outside MVP.`
|
|
@@ -434,14 +448,14 @@ function ze(e) {
|
|
|
434
448
|
}
|
|
435
449
|
return { ok: t.length === 0, errors: t, warnings: r };
|
|
436
450
|
}
|
|
437
|
-
const
|
|
451
|
+
const qe = {
|
|
438
452
|
lg: 48,
|
|
439
453
|
md: 36,
|
|
440
454
|
sm: 24,
|
|
441
455
|
xs: 12,
|
|
442
456
|
xxs: 6
|
|
443
457
|
};
|
|
444
|
-
function
|
|
458
|
+
function Re(e, t) {
|
|
445
459
|
let n = 0, r = 0, o = 0;
|
|
446
460
|
return e.map((a) => {
|
|
447
461
|
const i = Math.min(a.w, t);
|
|
@@ -459,22 +473,22 @@ function qe(e, t) {
|
|
|
459
473
|
return n += i, o = Math.max(o, a.h), d;
|
|
460
474
|
});
|
|
461
475
|
}
|
|
462
|
-
function
|
|
476
|
+
function Oe(e) {
|
|
463
477
|
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"), a = t.filter((s) => s.role === "text"), i = a.slice(0, 1), d = a.slice(i.length);
|
|
464
478
|
return { kpis: n, introText: i, charts: r, tables: o, supportingText: d };
|
|
465
479
|
}
|
|
466
|
-
function
|
|
480
|
+
function Le(e, t, n) {
|
|
467
481
|
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;
|
|
468
482
|
}
|
|
469
|
-
function
|
|
483
|
+
function je(e, t, n, r) {
|
|
470
484
|
return n === "xxs" || n === "xs" || n === "sm" || n === "md" || t === 1 || t % 2 === 1 && e === 0 ? r : r / 2;
|
|
471
485
|
}
|
|
472
|
-
function
|
|
486
|
+
function We(e) {
|
|
473
487
|
const { item: t, band: n, index: r, bandCount: o, breakpoint: a, columns: i } = e;
|
|
474
488
|
return n === "kpi" ? {
|
|
475
489
|
...t,
|
|
476
490
|
band: n,
|
|
477
|
-
w:
|
|
491
|
+
w: Le(o, a, i),
|
|
478
492
|
h: 15,
|
|
479
493
|
minW: Math.min(6, i),
|
|
480
494
|
minH: 12
|
|
@@ -502,7 +516,7 @@ function je(e) {
|
|
|
502
516
|
} : {
|
|
503
517
|
...t,
|
|
504
518
|
band: n,
|
|
505
|
-
w:
|
|
519
|
+
w: je(r, o, a, i),
|
|
506
520
|
h: a === "xxs" || a === "xs" ? 28 : 30,
|
|
507
521
|
minW: Math.min(12, i),
|
|
508
522
|
minH: 16
|
|
@@ -510,7 +524,7 @@ function je(e) {
|
|
|
510
524
|
}
|
|
511
525
|
function A(e, t, n, r) {
|
|
512
526
|
return e.map(
|
|
513
|
-
(o, a) =>
|
|
527
|
+
(o, a) => We({
|
|
514
528
|
item: o,
|
|
515
529
|
band: t,
|
|
516
530
|
index: a,
|
|
@@ -520,46 +534,46 @@ function A(e, t, n, r) {
|
|
|
520
534
|
})
|
|
521
535
|
);
|
|
522
536
|
}
|
|
523
|
-
function
|
|
524
|
-
const t =
|
|
537
|
+
function G(e) {
|
|
538
|
+
const t = Oe(e);
|
|
525
539
|
return Object.fromEntries(
|
|
526
|
-
|
|
527
|
-
const r =
|
|
540
|
+
Ie.map((n) => {
|
|
541
|
+
const r = qe[n], o = [
|
|
528
542
|
...A(t.introText, "introText", n, r),
|
|
529
543
|
...A(t.kpis, "kpi", n, r),
|
|
530
544
|
...A(t.charts, "chart", n, r),
|
|
531
545
|
...A(t.tables, "table", n, r),
|
|
532
546
|
...A(t.supportingText, "supportingText", n, r)
|
|
533
547
|
];
|
|
534
|
-
return [n,
|
|
548
|
+
return [n, Re(o, r)];
|
|
535
549
|
})
|
|
536
550
|
);
|
|
537
551
|
}
|
|
538
|
-
function
|
|
539
|
-
const t =
|
|
552
|
+
function Ee(e) {
|
|
553
|
+
const t = ve(e);
|
|
540
554
|
return t === "datetime" ? "date" : t === "unknown" ? "string" : t;
|
|
541
555
|
}
|
|
542
|
-
function
|
|
556
|
+
function He(e) {
|
|
543
557
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
544
558
|
}
|
|
545
|
-
function
|
|
546
|
-
return
|
|
559
|
+
function Ge(e) {
|
|
560
|
+
return He(e) && typeof e.filterId == "string" && typeof e.operation == "string" && Array.isArray(e.values);
|
|
547
561
|
}
|
|
548
562
|
function Ke(e) {
|
|
549
563
|
return e.filter(
|
|
550
564
|
(t) => typeof t == "string" || typeof t == "number"
|
|
551
565
|
);
|
|
552
566
|
}
|
|
553
|
-
function
|
|
567
|
+
function Ue(e) {
|
|
554
568
|
return e.filter(
|
|
555
569
|
(t) => t instanceof Date || typeof t == "string"
|
|
556
570
|
);
|
|
557
571
|
}
|
|
558
|
-
function
|
|
572
|
+
function K(e, t) {
|
|
559
573
|
if (t === void 0)
|
|
560
574
|
return;
|
|
561
|
-
const n =
|
|
562
|
-
if (
|
|
575
|
+
const n = Ee(e.dataType), r = e.operation || "in";
|
|
576
|
+
if (Ge(t))
|
|
563
577
|
return {
|
|
564
578
|
...t,
|
|
565
579
|
filterId: e.id,
|
|
@@ -580,7 +594,7 @@ function G(e, t) {
|
|
|
580
594
|
fieldMeta: e.fieldMeta,
|
|
581
595
|
semanticContext: e.semanticContext
|
|
582
596
|
};
|
|
583
|
-
const o = Array.isArray(t) ? t : [t], a = n === "date" ?
|
|
597
|
+
const o = Array.isArray(t) ? t : [t], a = n === "date" ? Ue(o) : Ke(o);
|
|
584
598
|
if (a.length !== 0 && !((r === "between" || r === "not between") && a.length < 2))
|
|
585
599
|
return {
|
|
586
600
|
filterId: e.id,
|
|
@@ -593,10 +607,10 @@ function G(e, t) {
|
|
|
593
607
|
semanticContext: e.semanticContext
|
|
594
608
|
};
|
|
595
609
|
}
|
|
596
|
-
function
|
|
610
|
+
function fe(e, t, n) {
|
|
597
611
|
return n ? { code: e, message: t, cardId: n } : { code: e, message: t };
|
|
598
612
|
}
|
|
599
|
-
function
|
|
613
|
+
function Qe(e, t, n) {
|
|
600
614
|
const r = (t || []).filter(
|
|
601
615
|
(o) => o.scope === "card" && o.targetCardId === n
|
|
602
616
|
).map((o) => o.field).filter(Boolean);
|
|
@@ -621,7 +635,7 @@ function Je(e, t) {
|
|
|
621
635
|
const n = W(e.cardIds, t);
|
|
622
636
|
return n.length > 0 ? { ...e, cardIds: n } : null;
|
|
623
637
|
}
|
|
624
|
-
function
|
|
638
|
+
function Xe(e, t) {
|
|
625
639
|
return !e.applyToCardIds && !e.excludeCardIds ? e : {
|
|
626
640
|
...e,
|
|
627
641
|
...e.applyToCardIds ? {
|
|
@@ -638,7 +652,7 @@ function Qe(e, t) {
|
|
|
638
652
|
} : {}
|
|
639
653
|
};
|
|
640
654
|
}
|
|
641
|
-
function
|
|
655
|
+
function Ye(e, t) {
|
|
642
656
|
const n = {}, r = [];
|
|
643
657
|
return {
|
|
644
658
|
inputs: (e.filterInputs || []).flatMap(
|
|
@@ -646,12 +660,12 @@ function Xe(e, t) {
|
|
|
646
660
|
const d = Je(a.scope, t);
|
|
647
661
|
if (d === null)
|
|
648
662
|
return r.push(
|
|
649
|
-
|
|
663
|
+
fe(
|
|
650
664
|
"filter_input_scope_empty",
|
|
651
665
|
`Filter input "${a.label}" was skipped because all scoped cards were skipped during query validation.`
|
|
652
666
|
)
|
|
653
667
|
), [];
|
|
654
|
-
const s =
|
|
668
|
+
const s = K(
|
|
655
669
|
a.filter,
|
|
656
670
|
a.defaultValue
|
|
657
671
|
);
|
|
@@ -674,7 +688,7 @@ function Xe(e, t) {
|
|
|
674
688
|
order: i
|
|
675
689
|
},
|
|
676
690
|
exports: ["label", "value", "start", "end", "range"],
|
|
677
|
-
filter:
|
|
691
|
+
filter: Xe(a.filter, t)
|
|
678
692
|
}
|
|
679
693
|
];
|
|
680
694
|
}
|
|
@@ -683,9 +697,9 @@ function Xe(e, t) {
|
|
|
683
697
|
defaultInputValues: n.shared && Object.keys(n.shared).length > 0 ? n : void 0
|
|
684
698
|
};
|
|
685
699
|
}
|
|
686
|
-
function
|
|
700
|
+
function At(e) {
|
|
687
701
|
var v, y;
|
|
688
|
-
const t =
|
|
702
|
+
const t = ze(e.plan);
|
|
689
703
|
if (!t.ok)
|
|
690
704
|
throw new Error(
|
|
691
705
|
t.errors.map((c) => c.message).join(`
|
|
@@ -702,7 +716,7 @@ function Dt(e) {
|
|
|
702
716
|
for (const c of n.cards) {
|
|
703
717
|
const f = a.get(c.id);
|
|
704
718
|
if (!f) {
|
|
705
|
-
const l =
|
|
719
|
+
const l = fe(
|
|
706
720
|
"missing_card_artifact",
|
|
707
721
|
`Card "${c.title}" was skipped because no generated artifact was supplied.`,
|
|
708
722
|
c.id
|
|
@@ -711,7 +725,7 @@ function Dt(e) {
|
|
|
711
725
|
continue;
|
|
712
726
|
}
|
|
713
727
|
r.push(...f.warnings || []);
|
|
714
|
-
const g =
|
|
728
|
+
const g = Qe(
|
|
715
729
|
f.card,
|
|
716
730
|
e.plan.calculatedFields,
|
|
717
731
|
c.id
|
|
@@ -724,9 +738,9 @@ function Dt(e) {
|
|
|
724
738
|
}
|
|
725
739
|
if (d.length === 0)
|
|
726
740
|
throw new Error("Dashboard plan did not produce any persistable cards.");
|
|
727
|
-
const { inputs: s, defaultInputValues: u, warnings: h } =
|
|
741
|
+
const { inputs: s, defaultInputValues: u, warnings: h } = Ye(e.plan, i);
|
|
728
742
|
r.push(...h);
|
|
729
|
-
const I =
|
|
743
|
+
const I = G(
|
|
730
744
|
n.cards.filter((c) => d.some((f) => f.id === c.frameId)).map((c) => ({
|
|
731
745
|
frameId: c.frameId,
|
|
732
746
|
priority: c.priority,
|
|
@@ -756,10 +770,10 @@ function Dt(e) {
|
|
|
756
770
|
function D(e, t, n) {
|
|
757
771
|
return n ? { code: e, message: t, cardId: n } : { code: e, message: t };
|
|
758
772
|
}
|
|
759
|
-
function
|
|
773
|
+
function Ze(e) {
|
|
760
774
|
return JSON.parse(JSON.stringify(e));
|
|
761
775
|
}
|
|
762
|
-
function
|
|
776
|
+
function et(e) {
|
|
763
777
|
var t;
|
|
764
778
|
return (t = e.sheets) == null ? void 0 : t.find(
|
|
765
779
|
(n) => (n.kind || "dashboard") === "dashboard"
|
|
@@ -775,40 +789,40 @@ function R(e, t) {
|
|
|
775
789
|
}
|
|
776
790
|
return null;
|
|
777
791
|
}
|
|
778
|
-
function
|
|
792
|
+
function pe(e) {
|
|
779
793
|
var n, r;
|
|
780
794
|
const t = (r = (n = e.cards) == null ? void 0 : n[0]) == null ? void 0 : r.type;
|
|
781
795
|
return t === "kpi" ? "kpi" : t === "table" || t === "detailTable" || t === "pivotTable" ? "table" : t === "text" ? "text" : "chart";
|
|
782
796
|
}
|
|
783
|
-
function
|
|
797
|
+
function tt(e) {
|
|
784
798
|
var t;
|
|
785
799
|
return new Map(
|
|
786
800
|
(((t = e.layouts) == null ? void 0 : t.lg) || []).map((n, r) => [n.i, r])
|
|
787
801
|
);
|
|
788
802
|
}
|
|
789
|
-
function
|
|
790
|
-
const n =
|
|
803
|
+
function he(e, t = /* @__PURE__ */ new Map()) {
|
|
804
|
+
const n = tt(e), r = Math.max(
|
|
791
805
|
n.size,
|
|
792
806
|
t.size
|
|
793
807
|
), o = (e.frames || []).map(
|
|
794
808
|
(a, i) => ({
|
|
795
809
|
frameId: a.id,
|
|
796
|
-
role:
|
|
810
|
+
role: pe(a),
|
|
797
811
|
priority: t.get(a.id) ?? n.get(a.id) ?? r + i
|
|
798
812
|
})
|
|
799
813
|
);
|
|
800
|
-
e.layouts =
|
|
814
|
+
e.layouts = G(o);
|
|
801
815
|
}
|
|
802
|
-
function
|
|
816
|
+
function nt(e) {
|
|
803
817
|
return Object.values(e.layouts || {}).some((t) => t.length > 0);
|
|
804
818
|
}
|
|
805
|
-
function
|
|
806
|
-
if (!
|
|
807
|
-
|
|
819
|
+
function rt(e, t) {
|
|
820
|
+
if (!nt(e)) {
|
|
821
|
+
he(e);
|
|
808
822
|
return;
|
|
809
823
|
}
|
|
810
|
-
const n =
|
|
811
|
-
{ frameId: t.id, role:
|
|
824
|
+
const n = G([
|
|
825
|
+
{ frameId: t.id, role: pe(t), priority: 0 }
|
|
812
826
|
]);
|
|
813
827
|
e.layouts ?? (e.layouts = {});
|
|
814
828
|
for (const [r, o] of Object.entries(n)) {
|
|
@@ -828,9 +842,9 @@ function nt(e, t) {
|
|
|
828
842
|
];
|
|
829
843
|
}
|
|
830
844
|
}
|
|
831
|
-
function
|
|
845
|
+
function at(e, t) {
|
|
832
846
|
var r;
|
|
833
|
-
const n =
|
|
847
|
+
const n = K(
|
|
834
848
|
t.filter,
|
|
835
849
|
t.defaultValue
|
|
836
850
|
);
|
|
@@ -842,17 +856,17 @@ function rt(e, t) {
|
|
|
842
856
|
}
|
|
843
857
|
});
|
|
844
858
|
}
|
|
845
|
-
function
|
|
859
|
+
function Ft(e) {
|
|
846
860
|
var d;
|
|
847
|
-
const t =
|
|
861
|
+
const t = Ve(e.changePlan);
|
|
848
862
|
if (!t.ok)
|
|
849
863
|
throw new Error(
|
|
850
864
|
t.errors.map((s) => s.message).join(`
|
|
851
865
|
`) || "Dashboard change plan is invalid."
|
|
852
866
|
);
|
|
853
|
-
const n =
|
|
867
|
+
const n = Ze(e.dashboard), r = [...t.warnings], o = [], a = new Map(
|
|
854
868
|
e.cardArtifacts.map((s) => [s.planCardId, s])
|
|
855
|
-
), i =
|
|
869
|
+
), i = et(n);
|
|
856
870
|
if (!i)
|
|
857
871
|
throw new Error("Dashboard has no editable dashboard sheet.");
|
|
858
872
|
i.frames ?? (i.frames = []);
|
|
@@ -891,7 +905,7 @@ function At(e) {
|
|
|
891
905
|
cards: [h.card],
|
|
892
906
|
activeCardId: h.card.id
|
|
893
907
|
};
|
|
894
|
-
i.frames.push(I),
|
|
908
|
+
i.frames.push(I), rt(i, I);
|
|
895
909
|
break;
|
|
896
910
|
}
|
|
897
911
|
case "addFilterInput": {
|
|
@@ -913,7 +927,7 @@ function At(e) {
|
|
|
913
927
|
exports: ["label", "value", "start", "end", "range"],
|
|
914
928
|
filter: s.input.filter
|
|
915
929
|
};
|
|
916
|
-
n.inputs.push(u),
|
|
930
|
+
n.inputs.push(u), at(n, s.input);
|
|
917
931
|
break;
|
|
918
932
|
}
|
|
919
933
|
case "addCalculatedField": {
|
|
@@ -953,7 +967,7 @@ function At(e) {
|
|
|
953
967
|
const I = s.cardIds[h], w = R(n, I);
|
|
954
968
|
w && u.set(w.frame.id, h);
|
|
955
969
|
}
|
|
956
|
-
|
|
970
|
+
he(i, u);
|
|
957
971
|
break;
|
|
958
972
|
}
|
|
959
973
|
case "reuseCalculatedField":
|
|
@@ -978,7 +992,7 @@ function b(e, t, n) {
|
|
|
978
992
|
function F(e, t) {
|
|
979
993
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || t;
|
|
980
994
|
}
|
|
981
|
-
function
|
|
995
|
+
function me(e, t) {
|
|
982
996
|
if (!t.has(e))
|
|
983
997
|
return t.add(e), e;
|
|
984
998
|
let n = 2, r = `${e}-${n}`;
|
|
@@ -989,7 +1003,7 @@ function he(e, t) {
|
|
|
989
1003
|
function $(e) {
|
|
990
1004
|
return !!(e && typeof e == "object");
|
|
991
1005
|
}
|
|
992
|
-
function
|
|
1006
|
+
function ge(e) {
|
|
993
1007
|
return Array.isArray(e.inputs) ? e.inputs.filter(
|
|
994
1008
|
(t) => $(t) && typeof t.id == "string"
|
|
995
1009
|
) : [];
|
|
@@ -999,7 +1013,7 @@ function U(e) {
|
|
|
999
1013
|
(t) => $(t)
|
|
1000
1014
|
) : [];
|
|
1001
1015
|
}
|
|
1002
|
-
function
|
|
1016
|
+
function Q(e) {
|
|
1003
1017
|
return Array.isArray(e.views) ? e.views.filter(
|
|
1004
1018
|
(t) => $(t)
|
|
1005
1019
|
) : [];
|
|
@@ -1014,7 +1028,7 @@ function k(e) {
|
|
|
1014
1028
|
}
|
|
1015
1029
|
return t;
|
|
1016
1030
|
}
|
|
1017
|
-
function
|
|
1031
|
+
function it(e) {
|
|
1018
1032
|
var r, o, a;
|
|
1019
1033
|
if (!e)
|
|
1020
1034
|
return [];
|
|
@@ -1049,26 +1063,26 @@ function at(e) {
|
|
|
1049
1063
|
}
|
|
1050
1064
|
return t;
|
|
1051
1065
|
}
|
|
1052
|
-
function
|
|
1066
|
+
function ot(e) {
|
|
1053
1067
|
const t = [];
|
|
1054
|
-
for (const n of
|
|
1068
|
+
for (const n of ge(e)) {
|
|
1055
1069
|
const r = S(n.field);
|
|
1056
1070
|
r && t.push(r);
|
|
1057
1071
|
}
|
|
1058
1072
|
for (const n of U(e))
|
|
1059
|
-
for (const r of
|
|
1060
|
-
t.push(...
|
|
1073
|
+
for (const r of Q(n))
|
|
1074
|
+
t.push(...it(r.analytics));
|
|
1061
1075
|
return t;
|
|
1062
1076
|
}
|
|
1063
|
-
function
|
|
1077
|
+
function st(e) {
|
|
1064
1078
|
var n;
|
|
1065
1079
|
const t = [];
|
|
1066
1080
|
for (const r of U(e))
|
|
1067
|
-
for (const o of
|
|
1081
|
+
for (const o of Q(r))
|
|
1068
1082
|
T((n = o.analytics) == null ? void 0 : n.source) && t.push(o.analytics.source);
|
|
1069
1083
|
return t;
|
|
1070
1084
|
}
|
|
1071
|
-
function
|
|
1085
|
+
function dt(e, t) {
|
|
1072
1086
|
const n = z(e).filter(T);
|
|
1073
1087
|
if (n.length === 0)
|
|
1074
1088
|
return t.push(
|
|
@@ -1089,9 +1103,9 @@ function st(e, t) {
|
|
|
1089
1103
|
)
|
|
1090
1104
|
), [n[0]]) : n;
|
|
1091
1105
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const n = U(e), r =
|
|
1094
|
-
|
|
1106
|
+
function ct(e, t) {
|
|
1107
|
+
const n = U(e), r = ge(e), o = z(ot(e)), a = z(
|
|
1108
|
+
st(e)
|
|
1095
1109
|
);
|
|
1096
1110
|
return {
|
|
1097
1111
|
sections: n,
|
|
@@ -1099,13 +1113,13 @@ function dt(e, t) {
|
|
|
1099
1113
|
sources: o,
|
|
1100
1114
|
primarySources: a,
|
|
1101
1115
|
defaultSource: a.length === 1 ? a[0] : void 0,
|
|
1102
|
-
datasets:
|
|
1116
|
+
datasets: dt(o, t)
|
|
1103
1117
|
};
|
|
1104
1118
|
}
|
|
1105
|
-
function
|
|
1119
|
+
function lt(e) {
|
|
1106
1120
|
return e && ae(e).ok ? e : void 0;
|
|
1107
1121
|
}
|
|
1108
|
-
function
|
|
1122
|
+
function ut(e) {
|
|
1109
1123
|
var t;
|
|
1110
1124
|
switch ((t = e.presentation) == null ? void 0 : t.kind) {
|
|
1111
1125
|
case "kpi":
|
|
@@ -1124,12 +1138,12 @@ function lt(e) {
|
|
|
1124
1138
|
return null;
|
|
1125
1139
|
}
|
|
1126
1140
|
}
|
|
1127
|
-
function
|
|
1141
|
+
function ft(e) {
|
|
1128
1142
|
var t, n, r;
|
|
1129
1143
|
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";
|
|
1130
1144
|
}
|
|
1131
|
-
function
|
|
1132
|
-
const t =
|
|
1145
|
+
function pt(e) {
|
|
1146
|
+
const t = Se(e);
|
|
1133
1147
|
switch (t) {
|
|
1134
1148
|
case "not_in":
|
|
1135
1149
|
return "not in";
|
|
@@ -1143,14 +1157,14 @@ function ft(e) {
|
|
|
1143
1157
|
return t || "in";
|
|
1144
1158
|
}
|
|
1145
1159
|
}
|
|
1146
|
-
function
|
|
1160
|
+
function ht(e) {
|
|
1147
1161
|
return $(e.field) ? e.field.dataType === "datetime" ? "date" : e.field.dataType || "string" : "string";
|
|
1148
1162
|
}
|
|
1149
|
-
function
|
|
1163
|
+
function mt(e) {
|
|
1150
1164
|
if (!(!e || e.kind !== "physical"))
|
|
1151
1165
|
return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
|
|
1152
1166
|
}
|
|
1153
|
-
function
|
|
1167
|
+
function gt(e, t, n, r, o, a) {
|
|
1154
1168
|
if (e.kind !== "filter")
|
|
1155
1169
|
return a.push(
|
|
1156
1170
|
b(
|
|
@@ -1165,7 +1179,7 @@ function mt(e, t, n, r, o, a) {
|
|
|
1165
1179
|
`Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
|
|
1166
1180
|
)
|
|
1167
1181
|
), null;
|
|
1168
|
-
const i =
|
|
1182
|
+
const i = xe({
|
|
1169
1183
|
explicitSource: void 0,
|
|
1170
1184
|
field: e.field,
|
|
1171
1185
|
defaultSource: t,
|
|
@@ -1179,7 +1193,7 @@ function mt(e, t, n, r, o, a) {
|
|
|
1179
1193
|
)
|
|
1180
1194
|
), null;
|
|
1181
1195
|
const h = {
|
|
1182
|
-
id: `filter-${
|
|
1196
|
+
id: `filter-${me(
|
|
1183
1197
|
F(e.id, e.field.name),
|
|
1184
1198
|
o
|
|
1185
1199
|
)}`,
|
|
@@ -1187,10 +1201,10 @@ function mt(e, t, n, r, o, a) {
|
|
|
1187
1201
|
connectionId: d,
|
|
1188
1202
|
title: e.label,
|
|
1189
1203
|
column: e.field.name,
|
|
1190
|
-
dataType:
|
|
1191
|
-
qualifiedTableName:
|
|
1204
|
+
dataType: ht(e),
|
|
1205
|
+
qualifiedTableName: mt(i),
|
|
1192
1206
|
sql: "",
|
|
1193
|
-
operation:
|
|
1207
|
+
operation: pt(e.operator),
|
|
1194
1208
|
type: e.multi === !1 ? "single" : "multiple",
|
|
1195
1209
|
location: "dashboard",
|
|
1196
1210
|
displayMode: "toolbar",
|
|
@@ -1211,7 +1225,7 @@ function mt(e, t, n, r, o, a) {
|
|
|
1211
1225
|
variableName: e.id,
|
|
1212
1226
|
scope: r,
|
|
1213
1227
|
filter: h,
|
|
1214
|
-
defaultValue:
|
|
1228
|
+
defaultValue: K(
|
|
1215
1229
|
h,
|
|
1216
1230
|
e.defaultValue
|
|
1217
1231
|
)
|
|
@@ -1230,7 +1244,7 @@ function O(e) {
|
|
|
1230
1244
|
)
|
|
1231
1245
|
), Array.from(new Set(t));
|
|
1232
1246
|
}
|
|
1233
|
-
function
|
|
1247
|
+
function bt(e) {
|
|
1234
1248
|
var r, o;
|
|
1235
1249
|
if (!e.protocolScope) {
|
|
1236
1250
|
const a = Array.from(new Set(e.boundCardIds));
|
|
@@ -1289,20 +1303,20 @@ function gt(e) {
|
|
|
1289
1303
|
cardIds: t.filter((a) => !n.has(a))
|
|
1290
1304
|
};
|
|
1291
1305
|
}
|
|
1292
|
-
function
|
|
1306
|
+
function Tt(e) {
|
|
1293
1307
|
var v, y, c;
|
|
1294
|
-
const t = [], n =
|
|
1308
|
+
const t = [], n = we(e);
|
|
1295
1309
|
for (const f of n.warnings)
|
|
1296
1310
|
t.push(b(f.code, f.message));
|
|
1297
1311
|
for (const f of n.errors)
|
|
1298
1312
|
t.push(b(f.code, f.message));
|
|
1299
|
-
const r =
|
|
1313
|
+
const r = ct(e, t), o = [], a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
1300
1314
|
let h = 0;
|
|
1301
1315
|
for (const [f, g] of r.sections.entries()) {
|
|
1302
|
-
const l = typeof g.title == "string" ? g.title : `Section ${f + 1}`,
|
|
1303
|
-
i.set(
|
|
1304
|
-
for (const [X, m] of
|
|
1305
|
-
const Y =
|
|
1316
|
+
const l = typeof g.title == "string" ? g.title : `Section ${f + 1}`, J = g.id || F(l, `section-${f + 1}`);
|
|
1317
|
+
i.set(J, []);
|
|
1318
|
+
for (const [X, m] of Q(g).entries()) {
|
|
1319
|
+
const Y = ut(m), V = F(
|
|
1306
1320
|
m.id || `${l}-${m.title || `View ${X + 1}`}`,
|
|
1307
1321
|
`card-${f + 1}-${X + 1}`
|
|
1308
1322
|
);
|
|
@@ -1326,10 +1340,10 @@ function Ft(e) {
|
|
|
1326
1340
|
);
|
|
1327
1341
|
continue;
|
|
1328
1342
|
}
|
|
1329
|
-
const Z =
|
|
1330
|
-
m.id && a.set(m.id, M), (c = i.get(
|
|
1331
|
-
const
|
|
1332
|
-
for (const ee of
|
|
1343
|
+
const Z = me(V, s), M = `card-${Z}`;
|
|
1344
|
+
m.id && a.set(m.id, M), (c = i.get(J)) == null || c.push(M);
|
|
1345
|
+
const be = m.analytics && "inputs" in m.analytics ? m.analytics.inputs : void 0;
|
|
1346
|
+
for (const ee of be || []) {
|
|
1333
1347
|
const te = d.get(ee.inputId) || [];
|
|
1334
1348
|
te.push(M), d.set(ee.inputId, te);
|
|
1335
1349
|
}
|
|
@@ -1339,16 +1353,16 @@ function Ft(e) {
|
|
|
1339
1353
|
title: m.title,
|
|
1340
1354
|
description: m.description,
|
|
1341
1355
|
type: Y,
|
|
1342
|
-
role:
|
|
1356
|
+
role: ft(m),
|
|
1343
1357
|
priority: h,
|
|
1344
1358
|
section: l,
|
|
1345
|
-
analyticsIntent:
|
|
1359
|
+
analyticsIntent: lt(m.analytics),
|
|
1346
1360
|
text: m.text
|
|
1347
1361
|
}), h += 1;
|
|
1348
1362
|
}
|
|
1349
1363
|
}
|
|
1350
1364
|
const I = r.inputs.map((f) => {
|
|
1351
|
-
const g =
|
|
1365
|
+
const g = bt({
|
|
1352
1366
|
protocolScope: f.scope,
|
|
1353
1367
|
inputLabel: f.label,
|
|
1354
1368
|
allCardIds: o.map((l) => l.id),
|
|
@@ -1357,7 +1371,7 @@ function Ft(e) {
|
|
|
1357
1371
|
sectionIdToCardIds: i,
|
|
1358
1372
|
warnings: t
|
|
1359
1373
|
});
|
|
1360
|
-
return g === null ? null :
|
|
1374
|
+
return g === null ? null : gt(
|
|
1361
1375
|
f,
|
|
1362
1376
|
r.defaultSource,
|
|
1363
1377
|
r.sources,
|
|
@@ -1387,27 +1401,27 @@ function Ft(e) {
|
|
|
1387
1401
|
}, warnings: t };
|
|
1388
1402
|
}
|
|
1389
1403
|
export {
|
|
1390
|
-
|
|
1404
|
+
Ie as DASHBOARD_AUTHORING_BREAKPOINTS,
|
|
1391
1405
|
P as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1406
|
+
Ft as applyDashboardChangePlan,
|
|
1407
|
+
At as compileDashboardFromPlan,
|
|
1408
|
+
G as compileResponsiveDashboardLayouts,
|
|
1395
1409
|
H as dashboardAuthoringDatasetMatchesSource,
|
|
1396
|
-
|
|
1410
|
+
xt as dashboardAuthoringFieldsReferToSameTarget,
|
|
1397
1411
|
S as dashboardAuthoringSourceFromField,
|
|
1398
|
-
|
|
1412
|
+
Ct as dashboardAuthoringSourceKey,
|
|
1399
1413
|
ie as dashboardAuthoringSourcesReferToSameDataset,
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1414
|
+
Tt as dashboardPlanFromSemaphorDashboardIntent,
|
|
1415
|
+
Dt as findDashboardAuthoringDatasetForSource,
|
|
1416
|
+
Ne as getDashboardAuthoringCardSource,
|
|
1403
1417
|
T as isMaterializableDashboardAuthoringSource,
|
|
1404
|
-
|
|
1418
|
+
Ce as isSemaphorSourceRef,
|
|
1405
1419
|
z as mergeDashboardAuthoringSources,
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1420
|
+
ke as preferDashboardAuthoringSourceMetadata,
|
|
1421
|
+
kt as preferredDashboardAuthoringSource,
|
|
1422
|
+
xe as resolveDashboardAuthoringSource,
|
|
1423
|
+
Nt as transformComparisonDocument,
|
|
1424
|
+
Be as validateDashboardAuthoringDatasetScope,
|
|
1425
|
+
Ve as validateDashboardChangePlan,
|
|
1426
|
+
ze as validateDashboardPlan
|
|
1413
1427
|
};
|