react-semaphor 0.1.540 → 0.1.541
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +41 -38
- package/dist/chunks/{aggregate-table-row-presentation-BjK9YfMI.js → aggregate-table-row-presentation-B_vQjYR3.js} +319 -302
- package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-D1fDZD6O.js} +3 -3
- package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-B6IrON_Q.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-DwjFpewq.js} +4 -4
- package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-C_BI28ME.js} +5 -5
- package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-DDY15Trn.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-DP_Op5mu.js} +1168 -1166
- package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-CH2dzWW-.js} +4 -4
- package/dist/chunks/{index-CqMiAkay.js → index-DaQlghLY.js} +547 -511
- package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-DpNkFfQO.js} +5 -5
- package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-CJ2WpoMF.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-KT598QJq.js} +29621 -29528
- package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-BxV3Fl8h.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-DdD12SMY.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +582 -568
- package/dist/format-utils/index.js +117 -114
- package/dist/index.js +10 -10
- package/dist/pdf-export-policy/index.js +20 -10
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
- package/dist/types/briefings/index.d.ts +1 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
- package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
- package/dist/types/lib/types/common-types.d.ts +7 -0
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
- package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
- package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
var we = Object.defineProperty;
|
|
2
|
-
var Fe = (e, t,
|
|
3
|
-
var z = (e, t,
|
|
2
|
+
var Fe = (e, t, r) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var z = (e, t, r) => Fe(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { D as B, a as xe, r as H } from "../chunks/apply-dashboard-operations-C-iahGka.js";
|
|
5
|
-
import { N as
|
|
6
|
-
import { c as ke, r as Ae, v as
|
|
7
|
-
import { A as
|
|
5
|
+
import { N as cr, d as lr, p as ur, f as fr, i as pr, b as mr, o as hr, j as gr, k as br, m as Ir, g as Cr, l as yr, h as _r, n as Dr, e as Sr, s as vr } from "../chunks/apply-dashboard-operations-C-iahGka.js";
|
|
6
|
+
import { c as ke, r as Ae, v as Re, f as Oe, a as Ee, p as Ne } from "../chunks/calculated-field-identity-DcBS2NPP.js";
|
|
7
|
+
import { A as wr, N as Fr, O as xr, P as kr, K as Ar, L as Rr, M as Or, G as Er, H as Nr, J as Mr, I as Pr, Q as $r, a1 as Lr, S as Br, R as qr, b as Vr, a0 as zr, $ as jr, l as Ur, q as Gr, m as Hr, n as Wr, o as Kr, a4 as Qr, F as Xr, E as Yr, y as Jr, a5 as Zr, g as ea, e as ta, Y as ra, i as aa, Z as na, _ as ia, x as oa, z as sa, w as da, a2 as ca, a3 as la, d as ua, a6 as fa, C as pa, j as ma, U as ha, k as ga, W as ba, X as Ia, V as Ca, h as ya, B as _a, u as Da, s as Sa, t as va, D as Ta, T as wa } from "../chunks/calculated-field-identity-DcBS2NPP.js";
|
|
8
8
|
import { q as Me, E as Y, av as Pe, F as fe, l as $e, ah as Le } from "../chunks/validators-Ej1DdCXa.js";
|
|
9
9
|
import "../chunks/matrix-operation-contract-B8PBF1Gd.js";
|
|
10
10
|
import "../chunks/analytics-base-schemas-BFAoRlkU.js";
|
|
11
11
|
import "zod";
|
|
12
12
|
import { m as j } from "../chunks/document-sheet-utils-C1eEldxs.js";
|
|
13
|
-
import { k as
|
|
13
|
+
import { k as xa, D as ka, i as Aa, q as Ra, h as Oa, d as Ea, a as Na, b as Ma, n as Pa, p as $a, g as La, r as Ba, c as qa, l as Va, o as za, f as ja, j as Ua, s as Ga, w as Ha } from "../chunks/document-sheet-utils-C1eEldxs.js";
|
|
14
14
|
import { n as Be } from "../chunks/operators-B3zZoskU.js";
|
|
15
|
-
import { a as
|
|
16
|
-
import { D as
|
|
15
|
+
import { a as Ka, b as Qa, r as Xa } from "../chunks/canonical-result-keys-CEQefvdO.js";
|
|
16
|
+
import { D as Ja, i as Za, k as en, j as tn, l as rn, m as an } from "../chunks/common-types-CUf03Htv.js";
|
|
17
17
|
import { D as on, d as sn, i as dn, v as cn } from "../chunks/dashboard-filter-value-compatibility-D95O4nd7.js";
|
|
18
18
|
import { b as un, c as fn, g as pn, a as mn, m as hn, r as gn } from "../chunks/matrix-definition-DQDI2okF.js";
|
|
19
19
|
import { d as qe, w as Ve } from "../chunks/metric-comparison-CojWeLqx.js";
|
|
20
20
|
import { p as ze } from "../chunks/report-runtime-context-B984Nq1E.js";
|
|
21
21
|
import { m as In, a as Cn, r as yn } from "../chunks/matrix-card-CJn1hB5V.js";
|
|
22
|
-
function
|
|
22
|
+
function S(e) {
|
|
23
23
|
return e && typeof e == "object" ? e : null;
|
|
24
24
|
}
|
|
25
25
|
function T(e) {
|
|
26
26
|
return typeof e == "string" ? e : null;
|
|
27
27
|
}
|
|
28
28
|
function je(e) {
|
|
29
|
-
var t,
|
|
30
|
-
return !!(e && typeof e == "object") && (((t =
|
|
29
|
+
var t, r, a;
|
|
30
|
+
return !!(e && typeof e == "object") && (((t = S(e)) == null ? void 0 : t.kind) === "semantic" || ((r = S(e)) == null ? void 0 : r.kind) === "physical" || ((a = S(e)) == null ? void 0 : a.kind) === "sql");
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function O(e) {
|
|
33
33
|
return je(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
|
|
34
34
|
}
|
|
35
35
|
function Xt(e) {
|
|
@@ -43,13 +43,13 @@ function Ue(e, t) {
|
|
|
43
43
|
}
|
|
44
44
|
function q(e) {
|
|
45
45
|
const t = [];
|
|
46
|
-
for (const
|
|
47
|
-
const
|
|
48
|
-
(
|
|
46
|
+
for (const r of e) {
|
|
47
|
+
const a = t.findIndex(
|
|
48
|
+
(n) => pe(n, r)
|
|
49
49
|
);
|
|
50
|
-
|
|
51
|
-
t[
|
|
52
|
-
|
|
50
|
+
a === -1 ? t.push(r) : t[a] = Ue(
|
|
51
|
+
t[a],
|
|
52
|
+
r
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
return t;
|
|
@@ -61,78 +61,78 @@ function W(e, t) {
|
|
|
61
61
|
return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !Y(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
|
|
62
62
|
}
|
|
63
63
|
function K(e) {
|
|
64
|
-
return
|
|
64
|
+
return O(e) ? e : void 0;
|
|
65
65
|
}
|
|
66
66
|
function le(e, t) {
|
|
67
67
|
if (!(e.kind !== "semantic" || e.connectionId))
|
|
68
68
|
return t.find(
|
|
69
|
-
(
|
|
69
|
+
(r) => (r == null ? void 0 : r.kind) === "semantic" && Y(e, r) && !!r.connectionId
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
function v(e, t) {
|
|
73
|
-
const
|
|
74
|
-
return
|
|
73
|
+
const r = K(e == null ? void 0 : e.source);
|
|
74
|
+
return r ? W(r, t) : void 0;
|
|
75
75
|
}
|
|
76
76
|
function Ge({
|
|
77
77
|
explicitSource: e,
|
|
78
78
|
field: t,
|
|
79
|
-
defaultSource:
|
|
80
|
-
fallbackSources:
|
|
79
|
+
defaultSource: r,
|
|
80
|
+
fallbackSources: a
|
|
81
81
|
}) {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
le(
|
|
82
|
+
const n = [r, ...a || []], i = K(e), o = i ? W(
|
|
83
|
+
i,
|
|
84
|
+
le(i, n)
|
|
85
85
|
) : void 0;
|
|
86
|
-
if (
|
|
87
|
-
return
|
|
86
|
+
if (o)
|
|
87
|
+
return o;
|
|
88
88
|
if (e !== void 0)
|
|
89
89
|
return;
|
|
90
|
-
const s = v(t,
|
|
90
|
+
const s = v(t, r), l = s ? W(
|
|
91
91
|
s,
|
|
92
|
-
le(s,
|
|
92
|
+
le(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 K(
|
|
97
|
+
return K(r);
|
|
98
98
|
}
|
|
99
99
|
function Jt(e, t) {
|
|
100
100
|
if (!(e != null && e.name) || !(t != null && t.name) || e.name !== t.name)
|
|
101
101
|
return !1;
|
|
102
|
-
const
|
|
103
|
-
return !
|
|
102
|
+
const r = v(e), a = v(t);
|
|
103
|
+
return !r || !a ? !0 : pe(r, a);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function k(e) {
|
|
106
106
|
var t;
|
|
107
|
-
return T((t =
|
|
107
|
+
return T((t = S(e)) == null ? void 0 : t.kind);
|
|
108
108
|
}
|
|
109
109
|
function me(e) {
|
|
110
|
-
var t,
|
|
111
|
-
return
|
|
110
|
+
var t, r;
|
|
111
|
+
return k(e) !== "semantic" ? null : ((r = T((t = S(e)) == null ? void 0 : t.domainId)) == null ? void 0 : r.trim()) || null;
|
|
112
112
|
}
|
|
113
113
|
function He(e) {
|
|
114
114
|
var t;
|
|
115
|
-
return
|
|
115
|
+
return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetName);
|
|
116
116
|
}
|
|
117
117
|
function We(e) {
|
|
118
118
|
var t;
|
|
119
|
-
return
|
|
119
|
+
return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetId);
|
|
120
120
|
}
|
|
121
121
|
function Ke(e) {
|
|
122
122
|
var t;
|
|
123
|
-
return
|
|
123
|
+
return k(e) !== "physical" ? null : T((t = S(e)) == null ? void 0 : t.connectionId);
|
|
124
124
|
}
|
|
125
125
|
function Qe(e) {
|
|
126
126
|
var t;
|
|
127
|
-
return
|
|
127
|
+
return k(e) !== "physical" ? null : T((t = S(e)) == null ? void 0 : t.tableName);
|
|
128
128
|
}
|
|
129
129
|
function Xe(e) {
|
|
130
130
|
var t;
|
|
131
|
-
return
|
|
131
|
+
return k(e) !== "physical" ? "" : T((t = S(e)) == null ? void 0 : t.databaseName) || "";
|
|
132
132
|
}
|
|
133
133
|
function Ye(e) {
|
|
134
134
|
var t;
|
|
135
|
-
return
|
|
135
|
+
return k(e) !== "physical" ? "" : T((t = S(e)) == null ? void 0 : t.schemaName) || "";
|
|
136
136
|
}
|
|
137
137
|
function Je(e) {
|
|
138
138
|
if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
|
|
@@ -146,47 +146,47 @@ function Ze({
|
|
|
146
146
|
return { ok: !1, issue: "invalid_dataset_count" };
|
|
147
147
|
if (e.length <= 1)
|
|
148
148
|
return { ok: !0 };
|
|
149
|
-
const
|
|
150
|
-
return
|
|
149
|
+
const r = e.map(me), a = new Set(r.filter(Boolean));
|
|
150
|
+
return r.some((n) => !n) || a.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
|
|
151
151
|
}
|
|
152
152
|
function J(e, t) {
|
|
153
153
|
if (!t)
|
|
154
154
|
return !1;
|
|
155
155
|
if (t.kind === "semantic") {
|
|
156
|
-
const
|
|
157
|
-
return me(e) === t.domainId ?
|
|
156
|
+
const r = We(e);
|
|
157
|
+
return me(e) === t.domainId ? r && t.datasetId ? r === t.datasetId : He(e) === t.datasetName : !1;
|
|
158
158
|
}
|
|
159
159
|
return t.kind === "physical" ? Ke(e) === t.connectionId && Qe(e) === t.tableName && Xe(e) === (t.databaseName || "") && Ye(e) === (t.schemaName || "") : !1;
|
|
160
160
|
}
|
|
161
161
|
function Zt(e, t) {
|
|
162
162
|
return e.find(
|
|
163
|
-
(
|
|
163
|
+
(r) => J(r, t)
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
function f(e, t,
|
|
167
|
-
return
|
|
166
|
+
function f(e, t, r) {
|
|
167
|
+
return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
|
|
168
168
|
}
|
|
169
169
|
function M(e) {
|
|
170
170
|
const t = /* @__PURE__ */ new Set();
|
|
171
|
-
for (const
|
|
172
|
-
if (t.has(
|
|
173
|
-
return
|
|
174
|
-
t.add(
|
|
171
|
+
for (const r of e) {
|
|
172
|
+
if (t.has(r))
|
|
173
|
+
return r;
|
|
174
|
+
t.add(r);
|
|
175
175
|
}
|
|
176
176
|
return null;
|
|
177
177
|
}
|
|
178
178
|
function he({
|
|
179
179
|
card: e,
|
|
180
180
|
datasets: t,
|
|
181
|
-
errors:
|
|
181
|
+
errors: r
|
|
182
182
|
}) {
|
|
183
183
|
if (e.type === "text")
|
|
184
184
|
return;
|
|
185
|
-
const
|
|
186
|
-
if (!
|
|
185
|
+
const a = Je(e);
|
|
186
|
+
if (!a) {
|
|
187
187
|
if (t.length <= 1)
|
|
188
188
|
return;
|
|
189
|
-
|
|
189
|
+
r.push(
|
|
190
190
|
f(
|
|
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.",
|
|
@@ -195,7 +195,7 @@ function he({
|
|
|
195
195
|
);
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
t.some((
|
|
198
|
+
t.some((n) => J(n, a)) || r.push(
|
|
199
199
|
f(
|
|
200
200
|
"invalid_card_analytics_source",
|
|
201
201
|
"Dashboard cards with an explicit analytics source must use one of the selected datasets.",
|
|
@@ -217,7 +217,7 @@ function ue(e) {
|
|
|
217
217
|
) : [];
|
|
218
218
|
}
|
|
219
219
|
function et(e) {
|
|
220
|
-
var
|
|
220
|
+
var r, a;
|
|
221
221
|
if (!e)
|
|
222
222
|
return [];
|
|
223
223
|
const t = [e.source];
|
|
@@ -227,16 +227,16 @@ function et(e) {
|
|
|
227
227
|
e.primaryMeasure,
|
|
228
228
|
e.dateField,
|
|
229
229
|
...U(e.dimensions),
|
|
230
|
-
...ue(e.filters).map((
|
|
230
|
+
...ue(e.filters).map((n) => n.field)
|
|
231
231
|
])
|
|
232
232
|
) : e.kind === "records" ? t.push(
|
|
233
233
|
...P([
|
|
234
234
|
...U(e.fields),
|
|
235
235
|
e.dateField,
|
|
236
|
-
(
|
|
237
|
-
...ue(e.filters).map((
|
|
236
|
+
(r = e.orderBy) == null ? void 0 : r.field,
|
|
237
|
+
...ue(e.filters).map((n) => n.field)
|
|
238
238
|
])
|
|
239
|
-
) : e.kind === "inputOptions" ? (((
|
|
239
|
+
) : e.kind === "inputOptions" ? (((a = e.population) == null ? void 0 : a.kind) === "related_population" && t.push(e.population.baseSource), t.push(
|
|
240
240
|
...P([
|
|
241
241
|
e.labelField,
|
|
242
242
|
e.valueField,
|
|
@@ -248,14 +248,14 @@ function et(e) {
|
|
|
248
248
|
function ge({
|
|
249
249
|
card: e,
|
|
250
250
|
datasets: t,
|
|
251
|
-
errors:
|
|
251
|
+
errors: r
|
|
252
252
|
}) {
|
|
253
253
|
if (e.type !== "text") {
|
|
254
|
-
for (const
|
|
255
|
-
if (
|
|
256
|
-
(
|
|
254
|
+
for (const a of et(e.analyticsIntent))
|
|
255
|
+
if (a && !t.some(
|
|
256
|
+
(n) => J(n, a)
|
|
257
257
|
)) {
|
|
258
|
-
|
|
258
|
+
r.push(
|
|
259
259
|
f(
|
|
260
260
|
"invalid_card_query_source",
|
|
261
261
|
"Dashboard card query field references must use one of the selected datasets.",
|
|
@@ -272,13 +272,13 @@ function be({
|
|
|
272
272
|
}) {
|
|
273
273
|
if (e.type === "text" || !e.analyticsIntent)
|
|
274
274
|
return;
|
|
275
|
-
const
|
|
276
|
-
if (!
|
|
277
|
-
for (const
|
|
275
|
+
const r = fe(e.analyticsIntent);
|
|
276
|
+
if (!r.ok)
|
|
277
|
+
for (const a of r.errors)
|
|
278
278
|
t.push(
|
|
279
279
|
f(
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
a.code,
|
|
281
|
+
a.path ? `${a.path}: ${a.message}` : a.message,
|
|
282
282
|
e.id
|
|
283
283
|
)
|
|
284
284
|
);
|
|
@@ -286,14 +286,14 @@ function be({
|
|
|
286
286
|
function Ie({
|
|
287
287
|
datasets: e,
|
|
288
288
|
errors: t,
|
|
289
|
-
requireAtLeastOne:
|
|
289
|
+
requireAtLeastOne: r
|
|
290
290
|
}) {
|
|
291
|
-
const
|
|
291
|
+
const a = Ze({
|
|
292
292
|
datasets: e,
|
|
293
|
-
requireAtLeastOne:
|
|
293
|
+
requireAtLeastOne: r
|
|
294
294
|
});
|
|
295
|
-
if (!
|
|
296
|
-
if (
|
|
295
|
+
if (!a.ok) {
|
|
296
|
+
if (a.issue === "invalid_dataset_count") {
|
|
297
297
|
t.push(
|
|
298
298
|
f(
|
|
299
299
|
"invalid_dataset_count",
|
|
@@ -314,8 +314,8 @@ function Ce({
|
|
|
314
314
|
input: e,
|
|
315
315
|
errors: t
|
|
316
316
|
}) {
|
|
317
|
-
var
|
|
318
|
-
(
|
|
317
|
+
var r;
|
|
318
|
+
(r = e.filter.sql) != null && r.trim() && t.push(
|
|
319
319
|
f(
|
|
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.`
|
|
@@ -360,20 +360,20 @@ function tt(e) {
|
|
|
360
360
|
],
|
|
361
361
|
warnings: []
|
|
362
362
|
};
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
Ie({ datasets:
|
|
363
|
+
const r = e, a = [...r.warnings || []];
|
|
364
|
+
r.version !== 1 && t.push(f("invalid_version", "Dashboard plan version must be 1.")), (m = r.title) != null && m.trim() || t.push(f("missing_title", "Dashboard plan needs a title."));
|
|
365
|
+
const n = Array.isArray(r.datasets) ? r.datasets : [], i = Array.isArray(r.sheets) ? r.sheets : [];
|
|
366
|
+
Ie({ datasets: n, errors: t, requireAtLeastOne: !0 }), i.length !== 1 && t.push(
|
|
367
367
|
f(
|
|
368
368
|
"invalid_sheet_count",
|
|
369
369
|
"MVP dashboard authoring creates exactly one dashboard sheet."
|
|
370
370
|
)
|
|
371
371
|
);
|
|
372
|
-
const
|
|
373
|
-
|
|
372
|
+
const o = i[0];
|
|
373
|
+
o && o.kind !== "dashboard" && t.push(
|
|
374
374
|
f("invalid_sheet_kind", 'Generated sheet must use kind "dashboard".')
|
|
375
375
|
);
|
|
376
|
-
const s = (
|
|
376
|
+
const s = (o == null ? void 0 : o.cards) || [];
|
|
377
377
|
s.length > B && t.push(
|
|
378
378
|
f(
|
|
379
379
|
"too_many_cards",
|
|
@@ -398,14 +398,14 @@ function tt(e) {
|
|
|
398
398
|
"Whole-dashboard authoring supports built-in visual types only.",
|
|
399
399
|
u.id
|
|
400
400
|
)
|
|
401
|
-
), u.type !== "text" && !u.analyticsIntent &&
|
|
401
|
+
), u.type !== "text" && !u.analyticsIntent && a.push(
|
|
402
402
|
f(
|
|
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
|
-
), he({ card: u, datasets:
|
|
408
|
-
const p = Array.isArray(
|
|
407
|
+
), he({ card: u, datasets: n, errors: t }), be({ card: u, errors: t }), ge({ card: u, datasets: n, errors: t }), Q({ card: u, errors: t });
|
|
408
|
+
const p = Array.isArray(r.filterInputs) ? r.filterInputs : [], h = p.map((u) => u.id), y = M(h);
|
|
409
409
|
y && t.push(
|
|
410
410
|
f(
|
|
411
411
|
"duplicate_input_id",
|
|
@@ -421,7 +421,7 @@ function tt(e) {
|
|
|
421
421
|
);
|
|
422
422
|
for (const u of p)
|
|
423
423
|
Ce({ input: u, errors: t });
|
|
424
|
-
const c = Array.isArray(
|
|
424
|
+
const c = Array.isArray(r.calculatedFields) ? r.calculatedFields : [];
|
|
425
425
|
for (const u of c)
|
|
426
426
|
u.scope === "domain" && u.reuseOnly !== !0 && t.push(
|
|
427
427
|
f(
|
|
@@ -429,10 +429,10 @@ function tt(e) {
|
|
|
429
429
|
`Creating domain calculated field "${u.name}" is outside MVP.`
|
|
430
430
|
)
|
|
431
431
|
);
|
|
432
|
-
return { ok: t.length === 0, errors: t, warnings:
|
|
432
|
+
return { ok: t.length === 0, errors: t, warnings: a };
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
var
|
|
434
|
+
function rt(e) {
|
|
435
|
+
var o;
|
|
436
436
|
const t = [];
|
|
437
437
|
if (!e || typeof e != "object")
|
|
438
438
|
return {
|
|
@@ -445,17 +445,17 @@ function at(e) {
|
|
|
445
445
|
],
|
|
446
446
|
warnings: []
|
|
447
447
|
};
|
|
448
|
-
const
|
|
449
|
-
|
|
448
|
+
const r = e, a = [...r.warnings || []];
|
|
449
|
+
r.version !== 1 && t.push(
|
|
450
450
|
f("invalid_version", "Dashboard change plan version must be 1.")
|
|
451
|
-
), (
|
|
451
|
+
), (o = r.dashboardId) != null && o.trim() || t.push(
|
|
452
452
|
f("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
|
|
453
453
|
);
|
|
454
|
-
const
|
|
455
|
-
Ie({ datasets:
|
|
456
|
-
for (const s of
|
|
454
|
+
const n = Array.isArray(r.datasets) ? r.datasets : [], i = Array.isArray(r.operations) ? r.operations : [];
|
|
455
|
+
Ie({ datasets: n, errors: t, requireAtLeastOne: !1 });
|
|
456
|
+
for (const s of i) {
|
|
457
457
|
if (s.kind === "unsupported") {
|
|
458
|
-
|
|
458
|
+
a.push(
|
|
459
459
|
f("unsupported_operation", s.reason || s.requestedAction)
|
|
460
460
|
);
|
|
461
461
|
continue;
|
|
@@ -468,14 +468,14 @@ function at(e) {
|
|
|
468
468
|
)
|
|
469
469
|
), s.kind === "addCard" && (he({
|
|
470
470
|
card: s.card,
|
|
471
|
-
datasets:
|
|
471
|
+
datasets: n,
|
|
472
472
|
errors: t
|
|
473
473
|
}), be({
|
|
474
474
|
card: s.card,
|
|
475
475
|
errors: t
|
|
476
476
|
}), ge({
|
|
477
477
|
card: s.card,
|
|
478
|
-
datasets:
|
|
478
|
+
datasets: n,
|
|
479
479
|
errors: t
|
|
480
480
|
}), Q({ card: s.card, errors: t })), s.kind === "updateCardSelectionSettings") {
|
|
481
481
|
const l = s.card;
|
|
@@ -505,9 +505,9 @@ function at(e) {
|
|
|
505
505
|
)
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
return { ok: t.length === 0, errors: t, warnings:
|
|
508
|
+
return { ok: t.length === 0, errors: t, warnings: a };
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const at = {
|
|
511
511
|
lg: 48,
|
|
512
512
|
md: 36,
|
|
513
513
|
sm: 24,
|
|
@@ -515,96 +515,96 @@ const rt = {
|
|
|
515
515
|
xxs: 6
|
|
516
516
|
};
|
|
517
517
|
function nt(e, t) {
|
|
518
|
-
let
|
|
519
|
-
return e.map((
|
|
520
|
-
const
|
|
521
|
-
|
|
518
|
+
let r = 0, a = 0, n = 0;
|
|
519
|
+
return e.map((i) => {
|
|
520
|
+
const o = Math.min(i.w, t);
|
|
521
|
+
r > 0 && r + o > t && (r = 0, a += n, n = 0);
|
|
522
522
|
const s = {
|
|
523
|
-
i:
|
|
524
|
-
x:
|
|
525
|
-
y:
|
|
526
|
-
w:
|
|
527
|
-
h:
|
|
528
|
-
minW: Math.min(
|
|
529
|
-
minH:
|
|
523
|
+
i: i.frameId,
|
|
524
|
+
x: r,
|
|
525
|
+
y: a,
|
|
526
|
+
w: o,
|
|
527
|
+
h: i.h,
|
|
528
|
+
minW: Math.min(i.minW, t),
|
|
529
|
+
minH: i.minH,
|
|
530
530
|
static: !1
|
|
531
531
|
};
|
|
532
|
-
return
|
|
532
|
+
return r += o, n = Math.max(n, i.h), s;
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
function it(e) {
|
|
536
|
-
const t = [...e].sort((l, d) => l.priority - d.priority),
|
|
537
|
-
return { kpis:
|
|
536
|
+
const t = [...e].sort((l, d) => l.priority - d.priority), r = t.filter((l) => l.role === "kpi"), a = 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
|
+
return { kpis: r, introText: o, charts: a, tables: n, supportingText: s };
|
|
538
538
|
}
|
|
539
|
-
function ot(e, t,
|
|
540
|
-
return t === "xxs" || t === "xs" ?
|
|
539
|
+
function ot(e, t, r) {
|
|
540
|
+
return t === "xxs" || t === "xs" ? r : t === "sm" ? Math.min(12, r) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
|
|
541
541
|
}
|
|
542
|
-
function st(e, t,
|
|
543
|
-
return
|
|
542
|
+
function st(e, t, r, a) {
|
|
543
|
+
return r === "xxs" || r === "xs" || r === "sm" || r === "md" || t === 1 || t % 2 === 1 && e === 0 ? a : a / 2;
|
|
544
544
|
}
|
|
545
545
|
function dt(e) {
|
|
546
|
-
const { item: t, band:
|
|
547
|
-
return
|
|
546
|
+
const { item: t, band: r, index: a, bandCount: n, breakpoint: i, columns: o } = e;
|
|
547
|
+
return r === "kpi" ? {
|
|
548
548
|
...t,
|
|
549
|
-
band:
|
|
550
|
-
w: ot(i, o
|
|
549
|
+
band: r,
|
|
550
|
+
w: ot(n, i, o),
|
|
551
551
|
h: 15,
|
|
552
|
-
minW: Math.min(6,
|
|
552
|
+
minW: Math.min(6, o),
|
|
553
553
|
minH: 12
|
|
554
|
-
} :
|
|
554
|
+
} : r === "table" ? {
|
|
555
555
|
...t,
|
|
556
|
-
band:
|
|
557
|
-
w:
|
|
558
|
-
h:
|
|
559
|
-
minW: Math.min(12,
|
|
556
|
+
band: r,
|
|
557
|
+
w: o,
|
|
558
|
+
h: i === "xxs" || i === "xs" ? 34 : 38,
|
|
559
|
+
minW: Math.min(12, o),
|
|
560
560
|
minH: 18
|
|
561
|
-
} :
|
|
561
|
+
} : r === "introText" ? {
|
|
562
562
|
...t,
|
|
563
|
-
band:
|
|
564
|
-
w:
|
|
565
|
-
h:
|
|
566
|
-
minW: Math.min(12,
|
|
563
|
+
band: r,
|
|
564
|
+
w: o,
|
|
565
|
+
h: i === "xxs" || i === "xs" ? 12 : 10,
|
|
566
|
+
minW: Math.min(12, o),
|
|
567
567
|
minH: 8
|
|
568
|
-
} :
|
|
568
|
+
} : r === "supportingText" ? {
|
|
569
569
|
...t,
|
|
570
|
-
band:
|
|
571
|
-
w:
|
|
572
|
-
h:
|
|
573
|
-
minW: Math.min(12,
|
|
570
|
+
band: r,
|
|
571
|
+
w: i === "lg" ? o / 2 : o,
|
|
572
|
+
h: i === "xxs" || i === "xs" ? 12 : 10,
|
|
573
|
+
minW: Math.min(12, o),
|
|
574
574
|
minH: 8
|
|
575
575
|
} : {
|
|
576
576
|
...t,
|
|
577
|
-
band:
|
|
578
|
-
w: st(
|
|
579
|
-
h:
|
|
580
|
-
minW: Math.min(12,
|
|
577
|
+
band: r,
|
|
578
|
+
w: st(a, n, i, o),
|
|
579
|
+
h: i === "xxs" || i === "xs" ? 28 : 30,
|
|
580
|
+
minW: Math.min(12, o),
|
|
581
581
|
minH: 16
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
function A(e, t,
|
|
584
|
+
function A(e, t, r, a) {
|
|
585
585
|
return e.map(
|
|
586
|
-
(
|
|
587
|
-
item:
|
|
586
|
+
(n, i) => dt({
|
|
587
|
+
item: n,
|
|
588
588
|
band: t,
|
|
589
|
-
index:
|
|
589
|
+
index: i,
|
|
590
590
|
bandCount: e.length,
|
|
591
|
-
breakpoint:
|
|
592
|
-
columns:
|
|
591
|
+
breakpoint: r,
|
|
592
|
+
columns: a
|
|
593
593
|
})
|
|
594
594
|
);
|
|
595
595
|
}
|
|
596
596
|
function Z(e) {
|
|
597
597
|
const t = it(e);
|
|
598
598
|
return Object.fromEntries(
|
|
599
|
-
xe.map((
|
|
600
|
-
const
|
|
601
|
-
...A(t.introText, "introText",
|
|
602
|
-
...A(t.kpis, "kpi",
|
|
603
|
-
...A(t.charts, "chart",
|
|
604
|
-
...A(t.tables, "table",
|
|
605
|
-
...A(t.supportingText, "supportingText",
|
|
599
|
+
xe.map((r) => {
|
|
600
|
+
const a = at[r], n = [
|
|
601
|
+
...A(t.introText, "introText", r, a),
|
|
602
|
+
...A(t.kpis, "kpi", r, a),
|
|
603
|
+
...A(t.charts, "chart", r, a),
|
|
604
|
+
...A(t.tables, "table", r, a),
|
|
605
|
+
...A(t.supportingText, "supportingText", r, a)
|
|
606
606
|
];
|
|
607
|
-
return [
|
|
607
|
+
return [r, nt(n, a)];
|
|
608
608
|
})
|
|
609
609
|
);
|
|
610
610
|
}
|
|
@@ -631,7 +631,7 @@ function pt(e) {
|
|
|
631
631
|
function ee(e, t) {
|
|
632
632
|
if (t === void 0)
|
|
633
633
|
return;
|
|
634
|
-
const
|
|
634
|
+
const r = ct(e.dataType), a = e.operation || "in";
|
|
635
635
|
if (ut(t))
|
|
636
636
|
return j({
|
|
637
637
|
definition: e,
|
|
@@ -640,64 +640,64 @@ function ee(e, t) {
|
|
|
640
640
|
...t,
|
|
641
641
|
filterId: e.id,
|
|
642
642
|
name: t.name || e.column,
|
|
643
|
-
valueType:
|
|
643
|
+
valueType: r,
|
|
644
644
|
dataType: e.dataType,
|
|
645
645
|
fieldMeta: e.fieldMeta,
|
|
646
646
|
semanticContext: e.semanticContext
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
|
-
if (
|
|
649
|
+
if (a === "is null" || a === "is not null")
|
|
650
650
|
return j({
|
|
651
651
|
definition: e,
|
|
652
652
|
value: {
|
|
653
653
|
filterId: e.id,
|
|
654
654
|
name: e.column,
|
|
655
|
-
operation:
|
|
656
|
-
valueType:
|
|
655
|
+
operation: a,
|
|
656
|
+
valueType: r,
|
|
657
657
|
values: [],
|
|
658
658
|
dataType: e.dataType,
|
|
659
659
|
fieldMeta: e.fieldMeta,
|
|
660
660
|
semanticContext: e.semanticContext
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
|
-
const
|
|
664
|
-
if (
|
|
663
|
+
const n = Array.isArray(t) ? t : [t], i = r === "date" ? pt(n) : ft(n);
|
|
664
|
+
if (i.length !== 0 && !((a === "between" || a === "not between") && i.length < 2))
|
|
665
665
|
return j({
|
|
666
666
|
definition: e,
|
|
667
667
|
value: {
|
|
668
668
|
filterId: e.id,
|
|
669
669
|
name: e.column,
|
|
670
|
-
operation:
|
|
671
|
-
valueType:
|
|
672
|
-
values:
|
|
670
|
+
operation: a,
|
|
671
|
+
valueType: r,
|
|
672
|
+
values: i,
|
|
673
673
|
dataType: e.dataType,
|
|
674
674
|
fieldMeta: e.fieldMeta,
|
|
675
675
|
semanticContext: e.semanticContext
|
|
676
676
|
}
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
function ye(e, t,
|
|
680
|
-
return
|
|
679
|
+
function ye(e, t, r) {
|
|
680
|
+
return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
|
|
681
681
|
}
|
|
682
|
-
function mt(e, t,
|
|
683
|
-
const
|
|
684
|
-
(
|
|
685
|
-
).map((
|
|
686
|
-
return
|
|
682
|
+
function mt(e, t, r) {
|
|
683
|
+
const a = (t || []).filter(
|
|
684
|
+
(n) => n.scope === "card" && n.targetCardId === r
|
|
685
|
+
).map((n) => n.field).filter(Boolean);
|
|
686
|
+
return a.length === 0 ? e : {
|
|
687
687
|
...e,
|
|
688
688
|
calculatedFields: [
|
|
689
689
|
...e.calculatedFields || [],
|
|
690
|
-
...
|
|
690
|
+
...a
|
|
691
691
|
]
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
function ht(e, t,
|
|
694
|
+
function ht(e, t, r) {
|
|
695
695
|
return t.clickToFilter === void 0 && t.respondsToSelections === void 0 ? e : {
|
|
696
696
|
...e,
|
|
697
697
|
...t.clickToFilter ? {
|
|
698
698
|
clickToFilter: H(
|
|
699
699
|
t.clickToFilter,
|
|
700
|
-
{ cardIds: Object.fromEntries(
|
|
700
|
+
{ cardIds: Object.fromEntries(r) }
|
|
701
701
|
)
|
|
702
702
|
} : {},
|
|
703
703
|
...t.respondsToSelections !== void 0 ? { respondsToSelections: t.respondsToSelections } : {}
|
|
@@ -706,15 +706,15 @@ function ht(e, t, a) {
|
|
|
706
706
|
function X(e, t) {
|
|
707
707
|
return Array.from(
|
|
708
708
|
new Set(
|
|
709
|
-
(e || []).map((
|
|
709
|
+
(e || []).map((r) => t.get(r)).filter((r) => !!r)
|
|
710
710
|
)
|
|
711
711
|
);
|
|
712
712
|
}
|
|
713
713
|
function gt(e, t) {
|
|
714
714
|
if ((e == null ? void 0 : e.kind) !== "cards")
|
|
715
715
|
return e;
|
|
716
|
-
const
|
|
717
|
-
return
|
|
716
|
+
const r = X(e.cardIds, t);
|
|
717
|
+
return r.length > 0 ? { ...e, cardIds: r } : null;
|
|
718
718
|
}
|
|
719
719
|
function bt(e, t) {
|
|
720
720
|
return !e.applyToCardIds && !e.excludeCardIds ? e : {
|
|
@@ -734,23 +734,23 @@ function bt(e, t) {
|
|
|
734
734
|
};
|
|
735
735
|
}
|
|
736
736
|
function It(e, t) {
|
|
737
|
-
const
|
|
737
|
+
const r = {}, a = [];
|
|
738
738
|
return {
|
|
739
739
|
inputs: (e.filterInputs || []).flatMap(
|
|
740
|
-
(
|
|
741
|
-
const s = gt(
|
|
740
|
+
(i, o) => {
|
|
741
|
+
const s = gt(i.scope, t);
|
|
742
742
|
if (s === null)
|
|
743
|
-
return
|
|
743
|
+
return a.push(
|
|
744
744
|
ye(
|
|
745
745
|
"filter_input_scope_empty",
|
|
746
|
-
`Filter input "${
|
|
746
|
+
`Filter input "${i.label}" was skipped because all scoped cards were skipped during query validation.`
|
|
747
747
|
)
|
|
748
748
|
), [];
|
|
749
749
|
const l = ee(
|
|
750
|
-
|
|
751
|
-
|
|
750
|
+
i.filter,
|
|
751
|
+
i.defaultValue
|
|
752
752
|
);
|
|
753
|
-
return l && (
|
|
753
|
+
return l && (r.shared ?? (r.shared = {}), r.shared[i.id] = {
|
|
754
754
|
status: "set",
|
|
755
755
|
value: {
|
|
756
756
|
kind: "filter",
|
|
@@ -758,27 +758,27 @@ function It(e, t) {
|
|
|
758
758
|
}
|
|
759
759
|
}), [
|
|
760
760
|
{
|
|
761
|
-
id:
|
|
761
|
+
id: i.id,
|
|
762
762
|
kind: "filter",
|
|
763
|
-
label:
|
|
764
|
-
variableName:
|
|
763
|
+
label: i.label,
|
|
764
|
+
variableName: i.variableName,
|
|
765
765
|
scope: s || { kind: "allSheets", sheetKinds: ["dashboard"] },
|
|
766
766
|
runtimeScope: "shared",
|
|
767
767
|
presentation: {
|
|
768
768
|
placement: "toolbar",
|
|
769
|
-
order:
|
|
769
|
+
order: o
|
|
770
770
|
},
|
|
771
771
|
exports: ["label", "value", "start", "end", "range"],
|
|
772
|
-
filter: bt(
|
|
772
|
+
filter: bt(i.filter, t)
|
|
773
773
|
}
|
|
774
774
|
];
|
|
775
775
|
}
|
|
776
776
|
),
|
|
777
|
-
warnings:
|
|
778
|
-
defaultInputValues:
|
|
777
|
+
warnings: a,
|
|
778
|
+
defaultInputValues: r.shared && Object.keys(r.shared).length > 0 ? r : void 0
|
|
779
779
|
};
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function er(e) {
|
|
782
782
|
var g, b;
|
|
783
783
|
const t = tt(e.plan);
|
|
784
784
|
if (!t.ok)
|
|
@@ -786,26 +786,26 @@ function ea(e) {
|
|
|
786
786
|
t.errors.map((c) => c.message).join(`
|
|
787
787
|
`) || "Dashboard plan is invalid."
|
|
788
788
|
);
|
|
789
|
-
const
|
|
789
|
+
const r = e.plan.sheets[0], a = [...t.warnings], n = [], i = new Map(
|
|
790
790
|
e.cardArtifacts.map((c) => [c.planCardId, c])
|
|
791
|
-
),
|
|
791
|
+
), o = new Map(
|
|
792
792
|
e.cardArtifacts.map((c) => [
|
|
793
793
|
c.planCardId,
|
|
794
794
|
c.card.id
|
|
795
795
|
])
|
|
796
796
|
), s = [];
|
|
797
|
-
for (const c of
|
|
798
|
-
const m =
|
|
797
|
+
for (const c of r.cards) {
|
|
798
|
+
const m = i.get(c.id);
|
|
799
799
|
if (!m) {
|
|
800
800
|
const u = ye(
|
|
801
801
|
"missing_card_artifact",
|
|
802
802
|
`Card "${c.title}" was skipped because no generated artifact was supplied.`,
|
|
803
803
|
c.id
|
|
804
804
|
);
|
|
805
|
-
|
|
805
|
+
n.push(u);
|
|
806
806
|
continue;
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
a.push(...m.warnings || []);
|
|
809
809
|
const C = ht(
|
|
810
810
|
mt(
|
|
811
811
|
m.card,
|
|
@@ -813,7 +813,7 @@ function ea(e) {
|
|
|
813
813
|
c.id
|
|
814
814
|
),
|
|
815
815
|
c,
|
|
816
|
-
|
|
816
|
+
o
|
|
817
817
|
);
|
|
818
818
|
s.push({
|
|
819
819
|
id: c.frameId,
|
|
@@ -823,10 +823,10 @@ function ea(e) {
|
|
|
823
823
|
}
|
|
824
824
|
if (s.length === 0)
|
|
825
825
|
throw new Error("Dashboard plan did not produce any persistable cards.");
|
|
826
|
-
const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan,
|
|
827
|
-
|
|
826
|
+
const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan, o);
|
|
827
|
+
a.push(...p);
|
|
828
828
|
const h = Z(
|
|
829
|
-
|
|
829
|
+
r.cards.filter((c) => s.some((m) => m.id === c.frameId)).map((c) => ({
|
|
830
830
|
frameId: c.frameId,
|
|
831
831
|
priority: c.priority,
|
|
832
832
|
role: c.role
|
|
@@ -841,10 +841,10 @@ function ea(e) {
|
|
|
841
841
|
interactionDefaults: { clickToFilter: "on" },
|
|
842
842
|
sheets: [
|
|
843
843
|
{
|
|
844
|
-
id:
|
|
844
|
+
id: r.id,
|
|
845
845
|
kind: "dashboard",
|
|
846
|
-
title:
|
|
847
|
-
description:
|
|
846
|
+
title: r.title,
|
|
847
|
+
description: r.description,
|
|
848
848
|
frames: s,
|
|
849
849
|
layouts: h,
|
|
850
850
|
calculatedFields: (g = e.plan.calculatedFields) == null ? void 0 : g.filter((c) => c.scope === "sheet" && c.field).map((c) => c.field)
|
|
@@ -853,10 +853,10 @@ function ea(e) {
|
|
|
853
853
|
calculatedFields: (b = e.plan.calculatedFields) == null ? void 0 : b.filter((c) => c.scope === "dashboard" && c.field).map((c) => c.field),
|
|
854
854
|
inputs: l,
|
|
855
855
|
...d ? { defaultInputValues: d } : {}
|
|
856
|
-
}, warnings:
|
|
856
|
+
}, warnings: a, skippedOperations: n };
|
|
857
857
|
}
|
|
858
|
-
function w(e, t,
|
|
859
|
-
return
|
|
858
|
+
function w(e, t, r) {
|
|
859
|
+
return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
|
|
860
860
|
}
|
|
861
861
|
function Ct(e) {
|
|
862
862
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -864,42 +864,42 @@ function Ct(e) {
|
|
|
864
864
|
function yt(e) {
|
|
865
865
|
var t;
|
|
866
866
|
return (t = e.sheets) == null ? void 0 : t.find(
|
|
867
|
-
(
|
|
867
|
+
(r) => (r.kind || "dashboard") === "dashboard"
|
|
868
868
|
);
|
|
869
869
|
}
|
|
870
870
|
function $(e, t) {
|
|
871
|
-
var
|
|
872
|
-
for (const
|
|
873
|
-
for (const
|
|
874
|
-
const
|
|
875
|
-
if (
|
|
876
|
-
return { sheet:
|
|
871
|
+
var r;
|
|
872
|
+
for (const a of e.sheets || [])
|
|
873
|
+
for (const n of a.frames || []) {
|
|
874
|
+
const i = (r = n.cards) == null ? void 0 : r.find((o) => o.id === t);
|
|
875
|
+
if (i)
|
|
876
|
+
return { sheet: a, frame: n, card: i };
|
|
877
877
|
}
|
|
878
878
|
return null;
|
|
879
879
|
}
|
|
880
880
|
function _e(e) {
|
|
881
|
-
var
|
|
882
|
-
const t = (
|
|
881
|
+
var r, a;
|
|
882
|
+
const t = (a = (r = e.cards) == null ? void 0 : r[0]) == null ? void 0 : a.type;
|
|
883
883
|
return t === "kpi" ? "kpi" : t === "table" || t === "detailTable" || t === "pivotTable" ? "table" : t === "text" ? "text" : "chart";
|
|
884
884
|
}
|
|
885
885
|
function _t(e) {
|
|
886
886
|
var t;
|
|
887
887
|
return new Map(
|
|
888
|
-
(((t = e.layouts) == null ? void 0 : t.lg) || []).map((
|
|
888
|
+
(((t = e.layouts) == null ? void 0 : t.lg) || []).map((r, a) => [r.i, a])
|
|
889
889
|
);
|
|
890
890
|
}
|
|
891
891
|
function De(e, t = /* @__PURE__ */ new Map()) {
|
|
892
|
-
const
|
|
893
|
-
|
|
892
|
+
const r = _t(e), a = Math.max(
|
|
893
|
+
r.size,
|
|
894
894
|
t.size
|
|
895
|
-
),
|
|
896
|
-
(
|
|
897
|
-
frameId:
|
|
898
|
-
role: _e(
|
|
899
|
-
priority: t.get(
|
|
895
|
+
), n = (e.frames || []).map(
|
|
896
|
+
(i, o) => ({
|
|
897
|
+
frameId: i.id,
|
|
898
|
+
role: _e(i),
|
|
899
|
+
priority: t.get(i.id) ?? r.get(i.id) ?? a + o
|
|
900
900
|
})
|
|
901
901
|
);
|
|
902
|
-
e.layouts = Z(
|
|
902
|
+
e.layouts = Z(n);
|
|
903
903
|
}
|
|
904
904
|
function Dt(e) {
|
|
905
905
|
return Object.values(e.layouts || {}).some((t) => t.length > 0);
|
|
@@ -909,57 +909,57 @@ function St(e, t) {
|
|
|
909
909
|
De(e);
|
|
910
910
|
return;
|
|
911
911
|
}
|
|
912
|
-
const
|
|
912
|
+
const r = Z([
|
|
913
913
|
{ frameId: t.id, role: _e(t), priority: 0 }
|
|
914
914
|
]);
|
|
915
915
|
e.layouts ?? (e.layouts = {});
|
|
916
|
-
for (const [
|
|
917
|
-
const
|
|
918
|
-
if (
|
|
916
|
+
for (const [a, n] of Object.entries(r)) {
|
|
917
|
+
const i = e.layouts[a] || [];
|
|
918
|
+
if (i.some((l) => l.i === t.id))
|
|
919
919
|
continue;
|
|
920
|
-
const
|
|
921
|
-
if (!
|
|
920
|
+
const o = n[0];
|
|
921
|
+
if (!o)
|
|
922
922
|
continue;
|
|
923
|
-
const s =
|
|
923
|
+
const s = i.reduce(
|
|
924
924
|
(l, d) => Math.max(l, d.y + d.h),
|
|
925
925
|
0
|
|
926
926
|
);
|
|
927
|
-
e.layouts[
|
|
928
|
-
...
|
|
929
|
-
{ ...
|
|
927
|
+
e.layouts[a] = [
|
|
928
|
+
...i,
|
|
929
|
+
{ ...o, y: s }
|
|
930
930
|
];
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
function vt(e, t) {
|
|
934
|
-
var
|
|
935
|
-
const
|
|
934
|
+
var a;
|
|
935
|
+
const r = ee(
|
|
936
936
|
t.filter,
|
|
937
937
|
t.defaultValue
|
|
938
938
|
);
|
|
939
|
-
|
|
939
|
+
r && (e.defaultInputValues ?? (e.defaultInputValues = {}), (a = e.defaultInputValues).shared ?? (a.shared = {}), e.defaultInputValues.shared[t.id] = {
|
|
940
940
|
status: "set",
|
|
941
941
|
value: {
|
|
942
942
|
kind: "filter",
|
|
943
|
-
filterValue:
|
|
943
|
+
filterValue: r
|
|
944
944
|
}
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function tr(e) {
|
|
948
948
|
var l;
|
|
949
|
-
const t =
|
|
949
|
+
const t = rt(e.changePlan);
|
|
950
950
|
if (!t.ok)
|
|
951
951
|
throw new Error(
|
|
952
952
|
t.errors.map((d) => d.message).join(`
|
|
953
953
|
`) || "Dashboard change plan is invalid."
|
|
954
954
|
);
|
|
955
|
-
const
|
|
955
|
+
const r = Ct(e.dashboard), a = [...t.warnings], n = [], i = new Map(
|
|
956
956
|
e.cardArtifacts.map((d) => [d.planCardId, d])
|
|
957
|
-
),
|
|
957
|
+
), o = new Map(
|
|
958
958
|
e.cardArtifacts.map((d) => [
|
|
959
959
|
d.planCardId,
|
|
960
960
|
d.card.id
|
|
961
961
|
])
|
|
962
|
-
), s = yt(
|
|
962
|
+
), s = yt(r);
|
|
963
963
|
if (!s)
|
|
964
964
|
throw new Error("Dashboard has no editable dashboard sheet.");
|
|
965
965
|
s.frames ?? (s.frames = []);
|
|
@@ -973,7 +973,7 @@ function ta(e) {
|
|
|
973
973
|
},
|
|
974
974
|
0
|
|
975
975
|
) >= B) {
|
|
976
|
-
|
|
976
|
+
n.push(
|
|
977
977
|
w(
|
|
978
978
|
"generated_card_limit_reached",
|
|
979
979
|
`AI refinement is capped at ${B} cards.`,
|
|
@@ -982,9 +982,9 @@ function ta(e) {
|
|
|
982
982
|
);
|
|
983
983
|
break;
|
|
984
984
|
}
|
|
985
|
-
const h =
|
|
985
|
+
const h = i.get(d.card.id);
|
|
986
986
|
if (!h) {
|
|
987
|
-
|
|
987
|
+
n.push(
|
|
988
988
|
w(
|
|
989
989
|
"missing_card_artifact",
|
|
990
990
|
`Card "${d.card.title}" was skipped because no generated artifact was supplied.`,
|
|
@@ -998,7 +998,7 @@ function ta(e) {
|
|
|
998
998
|
...d.card.clickToFilter ? {
|
|
999
999
|
clickToFilter: H(
|
|
1000
1000
|
d.card.clickToFilter,
|
|
1001
|
-
{ cardIds: Object.fromEntries(
|
|
1001
|
+
{ cardIds: Object.fromEntries(o) }
|
|
1002
1002
|
)
|
|
1003
1003
|
} : {},
|
|
1004
1004
|
...d.card.respondsToSelections !== void 0 ? {
|
|
@@ -1013,7 +1013,7 @@ function ta(e) {
|
|
|
1013
1013
|
break;
|
|
1014
1014
|
}
|
|
1015
1015
|
case "addFilterInput": {
|
|
1016
|
-
|
|
1016
|
+
r.inputs ?? (r.inputs = []);
|
|
1017
1017
|
const p = {
|
|
1018
1018
|
id: d.input.id,
|
|
1019
1019
|
kind: "filter",
|
|
@@ -1026,22 +1026,22 @@ function ta(e) {
|
|
|
1026
1026
|
runtimeScope: "shared",
|
|
1027
1027
|
presentation: {
|
|
1028
1028
|
placement: "toolbar",
|
|
1029
|
-
order:
|
|
1029
|
+
order: r.inputs.length
|
|
1030
1030
|
},
|
|
1031
1031
|
exports: ["label", "value", "start", "end", "range"],
|
|
1032
1032
|
filter: d.input.filter
|
|
1033
1033
|
};
|
|
1034
|
-
|
|
1034
|
+
r.inputs.push(p), vt(r, d.input);
|
|
1035
1035
|
break;
|
|
1036
1036
|
}
|
|
1037
1037
|
case "addCalculatedField": {
|
|
1038
1038
|
if (d.field.scope === "dashboard" && d.field.field)
|
|
1039
|
-
|
|
1039
|
+
r.calculatedFields ?? (r.calculatedFields = []), r.calculatedFields.push(d.field.field);
|
|
1040
1040
|
else if (d.field.scope === "sheet" && d.field.field)
|
|
1041
1041
|
s.calculatedFields ?? (s.calculatedFields = []), s.calculatedFields.push(d.field.field);
|
|
1042
1042
|
else if (d.field.scope === "card" && d.field.field) {
|
|
1043
|
-
const p = d.field.targetCardId ? $(
|
|
1044
|
-
p ? ((l = p.card).calculatedFields ?? (l.calculatedFields = []), p.card.calculatedFields.push(d.field.field)) :
|
|
1043
|
+
const p = d.field.targetCardId ? $(r, d.field.targetCardId) : null;
|
|
1044
|
+
p ? ((l = p.card).calculatedFields ?? (l.calculatedFields = []), p.card.calculatedFields.push(d.field.field)) : n.push(
|
|
1045
1045
|
w(
|
|
1046
1046
|
"missing_calculated_field_target",
|
|
1047
1047
|
`Calculated field "${d.field.name}" needs a valid target card.`
|
|
@@ -1051,9 +1051,9 @@ function ta(e) {
|
|
|
1051
1051
|
break;
|
|
1052
1052
|
}
|
|
1053
1053
|
case "renameCard": {
|
|
1054
|
-
const p = $(
|
|
1054
|
+
const p = $(r, d.cardId);
|
|
1055
1055
|
if (!p) {
|
|
1056
|
-
|
|
1056
|
+
n.push(
|
|
1057
1057
|
w(
|
|
1058
1058
|
"card_not_found",
|
|
1059
1059
|
`Card "${d.cardId}" could not be renamed because it was not found.`,
|
|
@@ -1066,9 +1066,9 @@ function ta(e) {
|
|
|
1066
1066
|
break;
|
|
1067
1067
|
}
|
|
1068
1068
|
case "updateCardSelectionSettings": {
|
|
1069
|
-
const p =
|
|
1069
|
+
const p = o.get(d.cardId) ?? d.cardId, h = $(r, p);
|
|
1070
1070
|
if (!h) {
|
|
1071
|
-
|
|
1071
|
+
n.push(
|
|
1072
1072
|
w(
|
|
1073
1073
|
"card_not_found",
|
|
1074
1074
|
`Card "${d.cardId}" could not be updated because it was not found.`,
|
|
@@ -1079,21 +1079,21 @@ function ta(e) {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
d.card.clickToFilter !== void 0 && (h.card.clickToFilter = H(
|
|
1081
1081
|
d.card.clickToFilter,
|
|
1082
|
-
{ cardIds: Object.fromEntries(
|
|
1082
|
+
{ cardIds: Object.fromEntries(o) }
|
|
1083
1083
|
)), d.card.respondsToSelections !== void 0 && (h.card.respondsToSelections = d.card.respondsToSelections);
|
|
1084
1084
|
break;
|
|
1085
1085
|
}
|
|
1086
1086
|
case "reorderCards": {
|
|
1087
1087
|
const p = /* @__PURE__ */ new Map();
|
|
1088
1088
|
for (let h = 0; h < d.cardIds.length; h += 1) {
|
|
1089
|
-
const y = d.cardIds[h], g = $(
|
|
1089
|
+
const y = d.cardIds[h], g = $(r, y);
|
|
1090
1090
|
g && p.set(g.frame.id, h);
|
|
1091
1091
|
}
|
|
1092
1092
|
De(s, p);
|
|
1093
1093
|
break;
|
|
1094
1094
|
}
|
|
1095
1095
|
case "reuseCalculatedField":
|
|
1096
|
-
|
|
1096
|
+
a.push(
|
|
1097
1097
|
w(
|
|
1098
1098
|
"reused_calculated_field",
|
|
1099
1099
|
`Calculated field "${d.fieldId}" is reused by reference.`
|
|
@@ -1101,26 +1101,26 @@ function ta(e) {
|
|
|
1101
1101
|
);
|
|
1102
1102
|
break;
|
|
1103
1103
|
case "unsupported":
|
|
1104
|
-
|
|
1104
|
+
n.push(
|
|
1105
1105
|
w("unsupported_operation", d.reason || d.requestedAction)
|
|
1106
1106
|
);
|
|
1107
1107
|
break;
|
|
1108
1108
|
}
|
|
1109
|
-
return { dashboard:
|
|
1109
|
+
return { dashboard: r, warnings: a, skippedOperations: n };
|
|
1110
1110
|
}
|
|
1111
|
-
function _(e, t,
|
|
1112
|
-
return
|
|
1111
|
+
function _(e, t, r) {
|
|
1112
|
+
return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function R(e, t) {
|
|
1115
1115
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || t;
|
|
1116
1116
|
}
|
|
1117
1117
|
function Se(e, t) {
|
|
1118
1118
|
if (!t.has(e))
|
|
1119
1119
|
return t.add(e), e;
|
|
1120
|
-
let
|
|
1121
|
-
for (; t.has(
|
|
1122
|
-
|
|
1123
|
-
return t.add(
|
|
1120
|
+
let r = 2, a = `${e}-${r}`;
|
|
1121
|
+
for (; t.has(a); )
|
|
1122
|
+
r += 1, a = `${e}-${r}`;
|
|
1123
|
+
return t.add(a), a;
|
|
1124
1124
|
}
|
|
1125
1125
|
function E(e) {
|
|
1126
1126
|
return !!(e && typeof e == "object");
|
|
@@ -1135,7 +1135,7 @@ function te(e) {
|
|
|
1135
1135
|
(t) => E(t)
|
|
1136
1136
|
) : [];
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function re(e) {
|
|
1139
1139
|
return Array.isArray(e.views) ? e.views.filter(
|
|
1140
1140
|
(t) => E(t)
|
|
1141
1141
|
) : [];
|
|
@@ -1144,104 +1144,104 @@ function F(e) {
|
|
|
1144
1144
|
if (!Array.isArray(e))
|
|
1145
1145
|
return [];
|
|
1146
1146
|
const t = [];
|
|
1147
|
-
for (const
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1147
|
+
for (const r of e) {
|
|
1148
|
+
const a = v(r);
|
|
1149
|
+
a && t.push(a);
|
|
1150
1150
|
}
|
|
1151
1151
|
return t;
|
|
1152
1152
|
}
|
|
1153
1153
|
function Tt(e) {
|
|
1154
|
-
var
|
|
1154
|
+
var a, n, i;
|
|
1155
1155
|
if (!e)
|
|
1156
1156
|
return [];
|
|
1157
1157
|
const t = [];
|
|
1158
|
-
if (
|
|
1158
|
+
if (O(e.source) && t.push(e.source), e.kind === "metric") {
|
|
1159
1159
|
t.push(...F(e.measures));
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1160
|
+
const o = v(e.dateField);
|
|
1161
|
+
o && t.push(o), t.push(...F(e.dimensions)), t.push(
|
|
1162
1162
|
...F(
|
|
1163
|
-
(
|
|
1163
|
+
(a = e.filters) == null ? void 0 : a.map((s) => s.field)
|
|
1164
1164
|
)
|
|
1165
1165
|
);
|
|
1166
1166
|
} else if (e.kind === "records") {
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1167
|
+
const o = v(e.dateField);
|
|
1168
|
+
o && t.push(o), t.push(...F(e.fields)), t.push(
|
|
1169
1169
|
...F(
|
|
1170
|
-
(
|
|
1170
|
+
(n = e.filters) == null ? void 0 : n.map((s) => s.field)
|
|
1171
1171
|
)
|
|
1172
1172
|
);
|
|
1173
|
-
} else e.kind === "inputOptions" ? (((
|
|
1173
|
+
} else e.kind === "inputOptions" ? (((i = e.population) == null ? void 0 : i.kind) === "related_population" && O(e.population.baseSource) && t.push(e.population.baseSource), t.push(
|
|
1174
1174
|
...F([
|
|
1175
1175
|
e.labelField,
|
|
1176
1176
|
e.valueField,
|
|
1177
1177
|
e.searchField,
|
|
1178
1178
|
...e.disambiguationFields || []
|
|
1179
|
-
].filter((
|
|
1179
|
+
].filter((o) => !!o))
|
|
1180
1180
|
)) : e.kind === "sql" && t.push(...F(e.fields));
|
|
1181
|
-
const
|
|
1182
|
-
for (const
|
|
1183
|
-
const s = v(
|
|
1181
|
+
const r = "inputs" in e && Array.isArray(e.inputs) ? e.inputs : [];
|
|
1182
|
+
for (const o of r) {
|
|
1183
|
+
const s = v(o.field);
|
|
1184
1184
|
s && t.push(s);
|
|
1185
1185
|
}
|
|
1186
1186
|
return t;
|
|
1187
1187
|
}
|
|
1188
1188
|
function wt(e) {
|
|
1189
1189
|
const t = [];
|
|
1190
|
-
for (const
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1190
|
+
for (const r of ve(e)) {
|
|
1191
|
+
const a = v(r.field);
|
|
1192
|
+
a && t.push(a);
|
|
1193
1193
|
}
|
|
1194
|
-
for (const
|
|
1195
|
-
for (const
|
|
1196
|
-
t.push(...Tt(
|
|
1194
|
+
for (const r of te(e))
|
|
1195
|
+
for (const a of re(r))
|
|
1196
|
+
t.push(...Tt(a.analytics));
|
|
1197
1197
|
return t;
|
|
1198
1198
|
}
|
|
1199
1199
|
function Ft(e) {
|
|
1200
|
-
var
|
|
1200
|
+
var r;
|
|
1201
1201
|
const t = [];
|
|
1202
|
-
for (const
|
|
1203
|
-
for (const
|
|
1204
|
-
|
|
1202
|
+
for (const a of te(e))
|
|
1203
|
+
for (const n of re(a))
|
|
1204
|
+
O((r = n.analytics) == null ? void 0 : r.source) && t.push(n.analytics.source);
|
|
1205
1205
|
return t;
|
|
1206
1206
|
}
|
|
1207
1207
|
function xt(e, t) {
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1208
|
+
const r = q(e).filter(O);
|
|
1209
|
+
if (r.length === 0)
|
|
1210
1210
|
return t.push(
|
|
1211
1211
|
_(
|
|
1212
1212
|
"missing_materializable_dataset",
|
|
1213
1213
|
"No semantic or physical source could be converted into the current dashboard authoring dataset reference."
|
|
1214
1214
|
)
|
|
1215
1215
|
), [];
|
|
1216
|
-
const
|
|
1216
|
+
const a = r.every((i) => i.kind === "semantic"), n = Array.from(
|
|
1217
1217
|
new Set(
|
|
1218
|
-
|
|
1218
|
+
r.filter((i) => i.kind === "semantic").map((i) => i.domainId)
|
|
1219
1219
|
)
|
|
1220
1220
|
);
|
|
1221
|
-
return
|
|
1221
|
+
return r.length > 1 && (!a || n.length !== 1) ? (t.push(
|
|
1222
1222
|
_(
|
|
1223
1223
|
"multiple_datasets_out_of_scope",
|
|
1224
1224
|
"The dashboard authoring compiler supports multiple datasets only within one semantic domain; using the first source and deferring the rest."
|
|
1225
1225
|
)
|
|
1226
|
-
), [
|
|
1226
|
+
), [r[0]]) : r;
|
|
1227
1227
|
}
|
|
1228
1228
|
function kt(e, t) {
|
|
1229
|
-
const
|
|
1229
|
+
const r = te(e), a = ve(e), n = q(wt(e)), i = q(
|
|
1230
1230
|
Ft(e)
|
|
1231
1231
|
);
|
|
1232
1232
|
return {
|
|
1233
|
-
sections:
|
|
1234
|
-
inputs:
|
|
1235
|
-
sources:
|
|
1236
|
-
primarySources:
|
|
1237
|
-
defaultSource:
|
|
1238
|
-
datasets: xt(
|
|
1233
|
+
sections: r,
|
|
1234
|
+
inputs: a,
|
|
1235
|
+
sources: n,
|
|
1236
|
+
primarySources: i,
|
|
1237
|
+
defaultSource: i.length === 1 ? i[0] : void 0,
|
|
1238
|
+
datasets: xt(n, t)
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
1241
1241
|
function At(e) {
|
|
1242
1242
|
return e && fe(e).ok ? e : void 0;
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1244
|
+
function Rt(e) {
|
|
1245
1245
|
var t;
|
|
1246
1246
|
switch ((t = e.presentation) == null ? void 0 : t.kind) {
|
|
1247
1247
|
case "kpi":
|
|
@@ -1260,9 +1260,9 @@ function Ot(e) {
|
|
|
1260
1260
|
return null;
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
var t,
|
|
1265
|
-
return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((
|
|
1263
|
+
function Ot(e) {
|
|
1264
|
+
var t, r, a;
|
|
1265
|
+
return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((r = e.presentation) == null ? void 0 : r.kind) === "table" ? "table" : ((a = e.presentation) == null ? void 0 : a.kind) === "text" ? "text" : "chart";
|
|
1266
1266
|
}
|
|
1267
1267
|
function Et(e) {
|
|
1268
1268
|
const t = Be(e);
|
|
@@ -1286,29 +1286,29 @@ function Mt(e) {
|
|
|
1286
1286
|
if (!(!e || e.kind !== "physical"))
|
|
1287
1287
|
return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
|
|
1288
1288
|
}
|
|
1289
|
-
function Pt(e, t, a,
|
|
1289
|
+
function Pt(e, t, r, a, n, i) {
|
|
1290
1290
|
if (e.kind !== "filter")
|
|
1291
|
-
return
|
|
1291
|
+
return i.push(
|
|
1292
1292
|
_(
|
|
1293
1293
|
"control_inputs_deferred",
|
|
1294
1294
|
`Control input "${e.label}" is represented in the protocol but not yet materialized by the dashboard authoring adapter.`
|
|
1295
1295
|
)
|
|
1296
1296
|
), null;
|
|
1297
1297
|
if (!E(e.field) || typeof e.field.name != "string")
|
|
1298
|
-
return
|
|
1298
|
+
return i.push(
|
|
1299
1299
|
_(
|
|
1300
1300
|
"filter_requires_field",
|
|
1301
1301
|
`Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
|
|
1302
1302
|
)
|
|
1303
1303
|
), null;
|
|
1304
|
-
const
|
|
1304
|
+
const o = Ge({
|
|
1305
1305
|
explicitSource: void 0,
|
|
1306
1306
|
field: e.field,
|
|
1307
1307
|
defaultSource: t,
|
|
1308
|
-
fallbackSources:
|
|
1309
|
-
}), s = (
|
|
1308
|
+
fallbackSources: r
|
|
1309
|
+
}), s = (o == null ? void 0 : o.kind) === "semantic" || (o == null ? void 0 : o.kind) === "physical" ? o.connectionId : void 0;
|
|
1310
1310
|
if (!s)
|
|
1311
|
-
return
|
|
1311
|
+
return i.push(
|
|
1312
1312
|
_(
|
|
1313
1313
|
"filter_requires_connection_id",
|
|
1314
1314
|
`Filter "${e.label}" needs a source connectionId before the dashboard compiler can materialize it.`
|
|
@@ -1316,41 +1316,41 @@ function Pt(e, t, a, r, i, o) {
|
|
|
1316
1316
|
), null;
|
|
1317
1317
|
const p = {
|
|
1318
1318
|
id: `filter-${Se(
|
|
1319
|
-
|
|
1320
|
-
|
|
1319
|
+
R(e.id, e.field.name),
|
|
1320
|
+
n
|
|
1321
1321
|
)}`,
|
|
1322
1322
|
variableName: e.id,
|
|
1323
1323
|
connectionId: s,
|
|
1324
1324
|
title: e.label,
|
|
1325
1325
|
column: e.field.name,
|
|
1326
1326
|
dataType: Nt(e),
|
|
1327
|
-
qualifiedTableName: Mt(
|
|
1327
|
+
qualifiedTableName: Mt(o),
|
|
1328
1328
|
sql: "",
|
|
1329
1329
|
operation: Et(e.operator),
|
|
1330
1330
|
type: e.multi === !1 ? "single" : "multiple",
|
|
1331
1331
|
location: "dashboard",
|
|
1332
1332
|
displayMode: "toolbar",
|
|
1333
|
-
fieldMeta: (
|
|
1333
|
+
fieldMeta: (o == null ? void 0 : o.kind) === "semantic" ? {
|
|
1334
1334
|
name: e.field.name,
|
|
1335
1335
|
qualifiedFieldName: e.field.name,
|
|
1336
1336
|
dataType: e.field.dataType,
|
|
1337
1337
|
role: e.field.role === "measure" ? "metric" : "groupby"
|
|
1338
1338
|
} : void 0,
|
|
1339
|
-
semanticContext: (
|
|
1340
|
-
semanticDomainId:
|
|
1341
|
-
connectionId:
|
|
1342
|
-
} : (
|
|
1343
|
-
connectionId:
|
|
1344
|
-
connectionType:
|
|
1339
|
+
semanticContext: (o == null ? void 0 : o.kind) === "semantic" ? {
|
|
1340
|
+
semanticDomainId: o.domainId,
|
|
1341
|
+
connectionId: o.connectionId
|
|
1342
|
+
} : (o == null ? void 0 : o.kind) === "physical" ? {
|
|
1343
|
+
connectionId: o.connectionId,
|
|
1344
|
+
connectionType: o.connectionType,
|
|
1345
1345
|
selectedEntities: [
|
|
1346
1346
|
{
|
|
1347
1347
|
type: "table",
|
|
1348
|
-
connectionId:
|
|
1349
|
-
connectionType:
|
|
1350
|
-
dialect:
|
|
1351
|
-
database:
|
|
1352
|
-
schema:
|
|
1353
|
-
name:
|
|
1348
|
+
connectionId: o.connectionId,
|
|
1349
|
+
connectionType: o.connectionType,
|
|
1350
|
+
dialect: o.dialect,
|
|
1351
|
+
database: o.databaseName,
|
|
1352
|
+
schema: o.schemaName,
|
|
1353
|
+
name: o.tableName
|
|
1354
1354
|
}
|
|
1355
1355
|
]
|
|
1356
1356
|
} : void 0
|
|
@@ -1359,7 +1359,7 @@ function Pt(e, t, a, r, i, o) {
|
|
|
1359
1359
|
id: e.id,
|
|
1360
1360
|
label: e.label,
|
|
1361
1361
|
variableName: e.id,
|
|
1362
|
-
scope:
|
|
1362
|
+
scope: a,
|
|
1363
1363
|
filter: p,
|
|
1364
1364
|
defaultValue: ee(
|
|
1365
1365
|
p,
|
|
@@ -1368,28 +1368,28 @@ function Pt(e, t, a, r, i, o) {
|
|
|
1368
1368
|
};
|
|
1369
1369
|
}
|
|
1370
1370
|
function G(e) {
|
|
1371
|
-
const t = [],
|
|
1372
|
-
for (const
|
|
1373
|
-
const
|
|
1374
|
-
|
|
1371
|
+
const t = [], r = [];
|
|
1372
|
+
for (const a of e.viewIds) {
|
|
1373
|
+
const n = e.viewIdToCardId.get(a);
|
|
1374
|
+
n ? t.push(n) : r.push(a);
|
|
1375
1375
|
}
|
|
1376
|
-
return
|
|
1376
|
+
return r.length > 0 && e.warnings.push(
|
|
1377
1377
|
_(
|
|
1378
1378
|
"input_scope_view_not_found",
|
|
1379
|
-
`Filter "${e.inputLabel}" referenced unknown view ids: ${
|
|
1379
|
+
`Filter "${e.inputLabel}" referenced unknown view ids: ${r.join(", ")}.`
|
|
1380
1380
|
)
|
|
1381
1381
|
), Array.from(new Set(t));
|
|
1382
1382
|
}
|
|
1383
1383
|
function $t(e) {
|
|
1384
|
-
var
|
|
1384
|
+
var a, n;
|
|
1385
1385
|
if (!e.protocolScope) {
|
|
1386
|
-
const
|
|
1387
|
-
return
|
|
1386
|
+
const i = Array.from(new Set(e.boundCardIds));
|
|
1387
|
+
return i.length > 0 && i.length < e.allCardIds.length ? { kind: "cards", cardIds: i } : void 0;
|
|
1388
1388
|
}
|
|
1389
1389
|
if (e.protocolScope.level === "dashboard") {
|
|
1390
|
-
if (!((
|
|
1390
|
+
if (!((a = e.protocolScope.excludeViewIds) != null && a.length))
|
|
1391
1391
|
return;
|
|
1392
|
-
const
|
|
1392
|
+
const i = new Set(
|
|
1393
1393
|
G({
|
|
1394
1394
|
inputLabel: e.inputLabel,
|
|
1395
1395
|
viewIds: e.protocolScope.excludeViewIds,
|
|
@@ -1399,22 +1399,22 @@ function $t(e) {
|
|
|
1399
1399
|
);
|
|
1400
1400
|
return {
|
|
1401
1401
|
kind: "cards",
|
|
1402
|
-
cardIds: e.allCardIds.filter((
|
|
1402
|
+
cardIds: e.allCardIds.filter((o) => !i.has(o))
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
1405
|
if (e.protocolScope.level === "view") {
|
|
1406
|
-
const
|
|
1406
|
+
const i = G({
|
|
1407
1407
|
inputLabel: e.inputLabel,
|
|
1408
1408
|
viewIds: e.protocolScope.viewIds,
|
|
1409
1409
|
viewIdToCardId: e.viewIdToCardId,
|
|
1410
1410
|
warnings: e.warnings
|
|
1411
1411
|
});
|
|
1412
|
-
return
|
|
1412
|
+
return i.length === 0 ? (e.warnings.push(
|
|
1413
1413
|
_(
|
|
1414
1414
|
"input_scope_has_no_materialized_cards",
|
|
1415
1415
|
`Filter "${e.inputLabel}" was deferred because its view scope does not match any materialized cards.`
|
|
1416
1416
|
)
|
|
1417
|
-
), null) : { kind: "cards", cardIds:
|
|
1417
|
+
), null) : { kind: "cards", cardIds: i };
|
|
1418
1418
|
}
|
|
1419
1419
|
const t = e.sectionIdToCardIds.get(e.protocolScope.sectionId) || [];
|
|
1420
1420
|
if (t.length === 0)
|
|
@@ -1424,9 +1424,9 @@ function $t(e) {
|
|
|
1424
1424
|
`Filter "${e.inputLabel}" was deferred because section "${e.protocolScope.sectionId}" does not match any materialized cards.`
|
|
1425
1425
|
)
|
|
1426
1426
|
), null;
|
|
1427
|
-
if (!((
|
|
1427
|
+
if (!((n = e.protocolScope.excludeViewIds) != null && n.length))
|
|
1428
1428
|
return { kind: "cards", cardIds: t };
|
|
1429
|
-
const
|
|
1429
|
+
const r = new Set(
|
|
1430
1430
|
G({
|
|
1431
1431
|
inputLabel: e.inputLabel,
|
|
1432
1432
|
viewIds: e.protocolScope.excludeViewIds,
|
|
@@ -1436,23 +1436,23 @@ function $t(e) {
|
|
|
1436
1436
|
);
|
|
1437
1437
|
return {
|
|
1438
1438
|
kind: "cards",
|
|
1439
|
-
cardIds: t.filter((
|
|
1439
|
+
cardIds: t.filter((i) => !r.has(i))
|
|
1440
1440
|
};
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function rr(e) {
|
|
1443
1443
|
var g, b, c;
|
|
1444
|
-
const t = [],
|
|
1445
|
-
for (const m of
|
|
1444
|
+
const t = [], r = Le(e);
|
|
1445
|
+
for (const m of r.warnings)
|
|
1446
1446
|
t.push(_(m.code, m.message));
|
|
1447
|
-
for (const m of
|
|
1447
|
+
for (const m of r.errors)
|
|
1448
1448
|
t.push(_(m.code, m.message));
|
|
1449
|
-
const
|
|
1449
|
+
const a = kt(e, t), n = [], i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
1450
1450
|
let p = 0;
|
|
1451
|
-
for (const [m, C] of
|
|
1452
|
-
const u = typeof C.title == "string" ? C.title : `Section ${m + 1}`, ne = C.id ||
|
|
1453
|
-
|
|
1454
|
-
for (const [ie, I] of
|
|
1455
|
-
const oe =
|
|
1451
|
+
for (const [m, C] of a.sections.entries()) {
|
|
1452
|
+
const u = typeof C.title == "string" ? C.title : `Section ${m + 1}`, ne = C.id || R(u, `section-${m + 1}`);
|
|
1453
|
+
o.set(ne, []);
|
|
1454
|
+
for (const [ie, I] of re(C).entries()) {
|
|
1455
|
+
const oe = Rt(I), V = R(
|
|
1456
1456
|
I.id || `${u}-${I.title || `View ${ie + 1}`}`,
|
|
1457
1457
|
`card-${m + 1}-${ie + 1}`
|
|
1458
1458
|
);
|
|
@@ -1477,19 +1477,19 @@ function aa(e) {
|
|
|
1477
1477
|
continue;
|
|
1478
1478
|
}
|
|
1479
1479
|
const se = Se(V, l), N = `card-${se}`;
|
|
1480
|
-
I.id &&
|
|
1480
|
+
I.id && i.set(I.id, N), (c = o.get(ne)) == null || c.push(N);
|
|
1481
1481
|
const Te = I.analytics && "inputs" in I.analytics ? I.analytics.inputs : void 0;
|
|
1482
1482
|
for (const de of Te || []) {
|
|
1483
1483
|
const ce = s.get(de.inputId) || [];
|
|
1484
1484
|
ce.push(N), s.set(de.inputId, ce);
|
|
1485
1485
|
}
|
|
1486
|
-
|
|
1486
|
+
n.push({
|
|
1487
1487
|
id: N,
|
|
1488
1488
|
frameId: `frame-${se}`,
|
|
1489
1489
|
title: I.title,
|
|
1490
1490
|
description: I.description,
|
|
1491
1491
|
type: oe,
|
|
1492
|
-
role:
|
|
1492
|
+
role: Ot(I),
|
|
1493
1493
|
priority: p,
|
|
1494
1494
|
section: u,
|
|
1495
1495
|
analyticsIntent: At(I.analytics),
|
|
@@ -1497,20 +1497,20 @@ function aa(e) {
|
|
|
1497
1497
|
}), p += 1;
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
const h =
|
|
1500
|
+
const h = a.inputs.map((m) => {
|
|
1501
1501
|
const C = $t({
|
|
1502
1502
|
protocolScope: m.scope,
|
|
1503
1503
|
inputLabel: m.label,
|
|
1504
|
-
allCardIds:
|
|
1504
|
+
allCardIds: n.map((u) => u.id),
|
|
1505
1505
|
boundCardIds: s.get(m.id) || [],
|
|
1506
|
-
viewIdToCardId:
|
|
1507
|
-
sectionIdToCardIds:
|
|
1506
|
+
viewIdToCardId: i,
|
|
1507
|
+
sectionIdToCardIds: o,
|
|
1508
1508
|
warnings: t
|
|
1509
1509
|
});
|
|
1510
1510
|
return C === null ? null : Pt(
|
|
1511
1511
|
m,
|
|
1512
|
-
|
|
1513
|
-
|
|
1512
|
+
a.defaultSource,
|
|
1513
|
+
a.sources,
|
|
1514
1514
|
C,
|
|
1515
1515
|
d,
|
|
1516
1516
|
t
|
|
@@ -1518,25 +1518,25 @@ function aa(e) {
|
|
|
1518
1518
|
}).filter((m) => !!m);
|
|
1519
1519
|
return { plan: {
|
|
1520
1520
|
version: 1,
|
|
1521
|
-
id: `plan-${
|
|
1521
|
+
id: `plan-${R(e.title, "dashboard")}`,
|
|
1522
1522
|
title: e.title,
|
|
1523
1523
|
description: e.description,
|
|
1524
|
-
datasets:
|
|
1524
|
+
datasets: a.datasets,
|
|
1525
1525
|
sheets: [
|
|
1526
1526
|
{
|
|
1527
|
-
id: `sheet-${
|
|
1527
|
+
id: `sheet-${R(e.title, "dashboard")}`,
|
|
1528
1528
|
title: e.title,
|
|
1529
1529
|
description: e.description,
|
|
1530
1530
|
kind: "dashboard",
|
|
1531
|
-
cards:
|
|
1531
|
+
cards: n
|
|
1532
1532
|
}
|
|
1533
1533
|
],
|
|
1534
1534
|
filterInputs: h.length ? h : void 0,
|
|
1535
1535
|
warnings: t.length ? t : void 0,
|
|
1536
|
-
unresolvedRequests:
|
|
1536
|
+
unresolvedRequests: r.ok ? void 0 : r.errors.map((m) => m.message)
|
|
1537
1537
|
}, warnings: t };
|
|
1538
1538
|
}
|
|
1539
|
-
const
|
|
1539
|
+
const ar = [
|
|
1540
1540
|
"cardType",
|
|
1541
1541
|
"sql",
|
|
1542
1542
|
"python",
|
|
@@ -1551,273 +1551,287 @@ const ra = [
|
|
|
1551
1551
|
"resolvedPrimaryDateField",
|
|
1552
1552
|
"globalDateComparison",
|
|
1553
1553
|
"calendarContext"
|
|
1554
|
-
],
|
|
1554
|
+
], nr = [
|
|
1555
1555
|
"cardId",
|
|
1556
1556
|
"cardTitle",
|
|
1557
1557
|
"cache_config",
|
|
1558
1558
|
"queryConfig",
|
|
1559
1559
|
"tableConfig"
|
|
1560
1560
|
];
|
|
1561
|
-
class
|
|
1562
|
-
constructor(
|
|
1563
|
-
super(
|
|
1561
|
+
class D extends Error {
|
|
1562
|
+
constructor(r, a, n) {
|
|
1563
|
+
super(r);
|
|
1564
1564
|
z(this, "field");
|
|
1565
1565
|
z(this, "details");
|
|
1566
|
-
Object.setPrototypeOf(this,
|
|
1566
|
+
Object.setPrototypeOf(this, D.prototype), this.name = "CardQueryRequestError", this.field = a, this.details = n;
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function ae(e) {
|
|
1570
1570
|
return e.label ? `${e.label}.` : "";
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function x(e) {
|
|
1573
1573
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : { ...e };
|
|
1574
1574
|
}
|
|
1575
1575
|
function L(e) {
|
|
1576
1576
|
return typeof e == "string" ? e : "";
|
|
1577
1577
|
}
|
|
1578
1578
|
function Lt(e, t = {}) {
|
|
1579
|
-
const
|
|
1580
|
-
if (
|
|
1581
|
-
const
|
|
1582
|
-
if (!
|
|
1583
|
-
throw new
|
|
1584
|
-
`${
|
|
1579
|
+
const r = x(e), a = ae(t), n = {};
|
|
1580
|
+
if (r.calendarContext !== void 0) {
|
|
1581
|
+
const o = ze(r.calendarContext);
|
|
1582
|
+
if (!o.ok)
|
|
1583
|
+
throw new D(
|
|
1584
|
+
`${a}calendarContext: ${o.issues.map((s) => s.message).join("; ")}`,
|
|
1585
1585
|
"calendarContext",
|
|
1586
|
-
|
|
1586
|
+
o.issues
|
|
1587
1587
|
);
|
|
1588
|
-
|
|
1588
|
+
n.calendarContext = o.value;
|
|
1589
1589
|
}
|
|
1590
|
-
const
|
|
1591
|
-
if (!
|
|
1592
|
-
throw new
|
|
1593
|
-
`${
|
|
1590
|
+
const i = Re(r.resolvedPrimaryDateField);
|
|
1591
|
+
if (!i.ok)
|
|
1592
|
+
throw new D(
|
|
1593
|
+
`${a}${Oe(i.issues)}`,
|
|
1594
1594
|
"resolvedPrimaryDateField",
|
|
1595
|
-
|
|
1595
|
+
i.issues
|
|
1596
1596
|
);
|
|
1597
|
-
if (
|
|
1598
|
-
const
|
|
1599
|
-
if (!
|
|
1600
|
-
throw new
|
|
1601
|
-
`${
|
|
1597
|
+
if (r.resolvedPrimaryDateField && (n.resolvedPrimaryDateField = r.resolvedPrimaryDateField), r.globalDateComparison !== void 0) {
|
|
1598
|
+
const o = qe(r.globalDateComparison);
|
|
1599
|
+
if (!o.ok)
|
|
1600
|
+
throw new D(
|
|
1601
|
+
`${a}Invalid globalDateComparison: ${o.errors.map((s) => `${s.path}: ${s.message}`).join("; ")}`,
|
|
1602
1602
|
"globalDateComparison",
|
|
1603
|
-
|
|
1603
|
+
o.errors
|
|
1604
1604
|
);
|
|
1605
|
-
|
|
1606
|
-
|
|
1605
|
+
n.globalDateComparison = Ve(
|
|
1606
|
+
r.globalDateComparison
|
|
1607
1607
|
);
|
|
1608
1608
|
}
|
|
1609
|
-
return
|
|
1610
|
-
}
|
|
1611
|
-
function
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
const
|
|
1615
|
-
if (!Number.isInteger(
|
|
1616
|
-
throw new
|
|
1617
|
-
`${
|
|
1609
|
+
return n;
|
|
1610
|
+
}
|
|
1611
|
+
function ir(e, t = {}) {
|
|
1612
|
+
const r = x(e), a = ae(t), n = {};
|
|
1613
|
+
if (r.pagination !== void 0) {
|
|
1614
|
+
const i = x(r.pagination), o = i.page, s = i.pageSize;
|
|
1615
|
+
if (!Number.isInteger(o) || o < 1 || !Number.isInteger(s) || s < 1)
|
|
1616
|
+
throw new D(
|
|
1617
|
+
`${a}pagination must name a page and a page size of at least 1`,
|
|
1618
1618
|
"pagination"
|
|
1619
1619
|
);
|
|
1620
|
-
|
|
1620
|
+
n.pagination = { page: o, pageSize: s };
|
|
1621
|
+
}
|
|
1622
|
+
if (r.tableTotalsRequest !== void 0) {
|
|
1623
|
+
if (!r.tableTotalsRequest || typeof r.tableTotalsRequest != "object" || Array.isArray(r.tableTotalsRequest))
|
|
1624
|
+
throw new D(`${a}tableTotalsRequest must be an object`, "tableTotalsRequest");
|
|
1625
|
+
n.tableTotalsRequest = r.tableTotalsRequest;
|
|
1621
1626
|
}
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1627
|
+
if (r.sourceRowProbe !== void 0) {
|
|
1628
|
+
const i = x(r.sourceRowProbe).limit;
|
|
1629
|
+
if (!Number.isInteger(i) || i < 1)
|
|
1630
|
+
throw new D(
|
|
1631
|
+
`${a}sourceRowProbe must name a limit of at least 1`,
|
|
1632
|
+
"sourceRowProbe"
|
|
1633
|
+
);
|
|
1634
|
+
if (n.pagination)
|
|
1635
|
+
throw new D(
|
|
1636
|
+
`${a}sourceRowProbe cannot be combined with pagination`,
|
|
1637
|
+
"sourceRowProbe"
|
|
1638
|
+
);
|
|
1639
|
+
n.sourceRowProbe = { limit: i };
|
|
1626
1640
|
}
|
|
1627
|
-
return
|
|
1628
|
-
}
|
|
1629
|
-
function
|
|
1630
|
-
const
|
|
1631
|
-
if (!
|
|
1632
|
-
const
|
|
1633
|
-
if (!
|
|
1634
|
-
const s =
|
|
1641
|
+
return n;
|
|
1642
|
+
}
|
|
1643
|
+
function or(e, t = {}) {
|
|
1644
|
+
const r = x(e), a = ae(t), n = (c) => new D(`${a}${c} is required`, c), i = L(r.connection_id).trim();
|
|
1645
|
+
if (!i) throw n("connection_id");
|
|
1646
|
+
const o = L(r.cardType).trim();
|
|
1647
|
+
if (!o) throw n("cardType");
|
|
1648
|
+
const s = r.resultOwner;
|
|
1635
1649
|
if (s !== "config" && s !== "freeform" && s !== "none")
|
|
1636
|
-
throw
|
|
1637
|
-
const l =
|
|
1638
|
-
if (s === "config" && !h) throw
|
|
1639
|
-
if (s === "freeform" && !d.trim()) throw
|
|
1650
|
+
throw n("resultOwner");
|
|
1651
|
+
const l = x(r.cardConfig), d = L(r.sql), p = L(r.python), h = !!t.configOptional || Object.keys(l).length > 0;
|
|
1652
|
+
if (s === "config" && !h) throw n("cardConfig");
|
|
1653
|
+
if (s === "freeform" && !d.trim()) throw n("sql");
|
|
1640
1654
|
const y = Ee({
|
|
1641
1655
|
hasExecutableConfig: h,
|
|
1642
1656
|
sql: d,
|
|
1643
1657
|
normalizedPython: p
|
|
1644
1658
|
});
|
|
1645
1659
|
if (s !== y)
|
|
1646
|
-
throw new
|
|
1647
|
-
`${
|
|
1660
|
+
throw new D(
|
|
1661
|
+
`${a}resultOwner must match the normalized execution owner "${y}"`,
|
|
1648
1662
|
"resultOwner"
|
|
1649
1663
|
);
|
|
1650
|
-
if (s === "none") throw
|
|
1651
|
-
const g =
|
|
1652
|
-
if (Object.keys(g).length === 0) throw
|
|
1664
|
+
if (s === "none") throw n("cardConfig");
|
|
1665
|
+
const g = x(r.cardDataSource);
|
|
1666
|
+
if (Object.keys(g).length === 0) throw n("cardDataSource");
|
|
1653
1667
|
const b = Ne({
|
|
1654
|
-
controlValues:
|
|
1655
|
-
controlDefinitions:
|
|
1656
|
-
cardControlDefinitions:
|
|
1657
|
-
controlBindings:
|
|
1668
|
+
controlValues: r.controlValues,
|
|
1669
|
+
controlDefinitions: r.controlDefinitions,
|
|
1670
|
+
cardControlDefinitions: r.cardControlDefinitions,
|
|
1671
|
+
controlBindings: r.controlBindings
|
|
1658
1672
|
});
|
|
1659
1673
|
return {
|
|
1660
|
-
connection_id:
|
|
1661
|
-
cardType:
|
|
1674
|
+
connection_id: i,
|
|
1675
|
+
cardType: o,
|
|
1662
1676
|
sql: d,
|
|
1663
1677
|
python: p,
|
|
1664
1678
|
resultOwner: s,
|
|
1665
1679
|
cardConfig: l,
|
|
1666
1680
|
cardDataSource: g,
|
|
1667
|
-
active_filters: Array.isArray(
|
|
1681
|
+
active_filters: Array.isArray(r.active_filters) ? r.active_filters : [],
|
|
1668
1682
|
controlValues: b.controlValues,
|
|
1669
1683
|
controlDefinitions: b.controlDefinitions,
|
|
1670
1684
|
cardControlDefinitions: b.cardControlDefinitions,
|
|
1671
1685
|
controlBindings: b.controlBindings,
|
|
1672
|
-
...Lt(
|
|
1686
|
+
...Lt(r, t)
|
|
1673
1687
|
};
|
|
1674
1688
|
}
|
|
1675
1689
|
export {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
$
|
|
1690
|
+
wr as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
1691
|
+
nr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
1692
|
+
ar as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
1693
|
+
Fr as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
1694
|
+
xr as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
1695
|
+
kr as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
1696
|
+
Ar as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
1697
|
+
Rr as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
1698
|
+
Or as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
1699
|
+
Er as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
1700
|
+
Nr as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
1701
|
+
Mr as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
1702
|
+
Pr as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
1703
|
+
D as CardQueryRequestError,
|
|
1704
|
+
$r as ControlResolutionError,
|
|
1691
1705
|
xe as DASHBOARD_AUTHORING_BREAKPOINTS,
|
|
1692
1706
|
B as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
|
|
1693
|
-
|
|
1707
|
+
xa as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
1694
1708
|
on as DASHBOARD_FILTER_OPERATIONS,
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1709
|
+
Ja as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
1710
|
+
Za as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
1711
|
+
ka as DashboardFilterMappingContractError,
|
|
1712
|
+
Lr as ExecutionControlContractError,
|
|
1713
|
+
cr as NEW_CARD_TYPE,
|
|
1714
|
+
Br as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
1715
|
+
lr as applyCardReferenceRemapping,
|
|
1716
|
+
tr as applyDashboardChangePlan,
|
|
1717
|
+
ur as applyDashboardOperations,
|
|
1718
|
+
Aa as applyGroupByOverride,
|
|
1719
|
+
fr as applyLinkedClickToFilterOverrides,
|
|
1720
|
+
Ra as applyOptionDependencyOverride,
|
|
1721
|
+
qr as buildControlDefinitionIndex,
|
|
1722
|
+
Vr as buildDashboardCardSourceIndex,
|
|
1723
|
+
pr as buildLinkedClickToFilterOverrides,
|
|
1710
1724
|
ke as clickToFilterSettingsSchema,
|
|
1711
|
-
|
|
1725
|
+
er as compileDashboardFromPlan,
|
|
1712
1726
|
Z as compileResponsiveDashboardLayouts,
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1727
|
+
mr as composeCardReferenceRemapping,
|
|
1728
|
+
zr as controlBindingExecutionSchema,
|
|
1729
|
+
jr as controlDefinitionExecutionSchema,
|
|
1730
|
+
Oa as createDashboardFilterBindingId,
|
|
1717
1731
|
un as createMatrixAuthoringDraft,
|
|
1718
1732
|
fn as createMatrixConfig,
|
|
1719
|
-
|
|
1733
|
+
hr as createNewCard,
|
|
1720
1734
|
J as dashboardAuthoringDatasetMatchesSource,
|
|
1721
1735
|
Jt as dashboardAuthoringFieldsReferToSameTarget,
|
|
1722
1736
|
v as dashboardAuthoringSourceFromField,
|
|
1723
1737
|
Xt as dashboardAuthoringSourceKey,
|
|
1724
1738
|
pe as dashboardAuthoringSourcesReferToSameDataset,
|
|
1725
|
-
|
|
1726
|
-
|
|
1739
|
+
Ur as dashboardCardFilterSourceInventoryContains,
|
|
1740
|
+
Ea as dashboardFilterTargetMatchesLogicalValue,
|
|
1727
1741
|
sn as dashboardFilterValueTypeForDataType,
|
|
1728
|
-
|
|
1729
|
-
|
|
1742
|
+
rr as dashboardPlanFromSemaphorDashboardIntent,
|
|
1743
|
+
Gr as defaultClickToFilterSettings,
|
|
1730
1744
|
Zt as findDashboardAuthoringDatasetForSource,
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1745
|
+
Hr as findDashboardCardExecutableSource,
|
|
1746
|
+
Wr as findDashboardCardPinnedCatalogSource,
|
|
1747
|
+
Kr as findDashboardSqlPinnedCatalogSource,
|
|
1748
|
+
Oe as formatResolvedPrimaryDateFieldIssues,
|
|
1749
|
+
gr as getCalculatedFieldAggregateOverrides,
|
|
1750
|
+
Qr as getCalculatedFieldNamespace,
|
|
1751
|
+
br as getCalculatedFieldParameters,
|
|
1752
|
+
Ir as getCalculatedFieldShelfOverrides,
|
|
1753
|
+
Xr as getColumnCatalogFieldId,
|
|
1740
1754
|
Je as getDashboardAuthoringCardSource,
|
|
1741
|
-
|
|
1755
|
+
Cr as getDashboardFilterSubscriptionHint,
|
|
1742
1756
|
en as getDocumentKpiSectionShapeIssues,
|
|
1743
1757
|
tn as getDocumentSectionCards,
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1758
|
+
yr as getDomainCalculatedSelectionOverrides,
|
|
1759
|
+
Yr as getFieldAggregationOptions,
|
|
1760
|
+
Jr as getMatrixBindingTargets,
|
|
1747
1761
|
pn as getMatrixLevelLabel,
|
|
1748
1762
|
mn as getMatrixMeasureLabel,
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1763
|
+
Zr as getStableDomainCalculatedFieldId,
|
|
1764
|
+
ea as getTemporalBucketAuthoringOptions,
|
|
1765
|
+
ta as getTemporalBucketAuthoringSelection,
|
|
1766
|
+
_r as hasDashboardFilterSubscription,
|
|
1753
1767
|
dn as isDashboardFilterOperationCompatible,
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1768
|
+
O as isMaterializableDashboardAuthoringSource,
|
|
1769
|
+
ra as isPresentationCurrencyBinding,
|
|
1770
|
+
aa as isSemaphorCartesianChartType,
|
|
1757
1771
|
je as isSemaphorSourceRef,
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1772
|
+
na as isStructuralControlBinding,
|
|
1773
|
+
ia as isValidControlOptionPresentation,
|
|
1774
|
+
oa as linkedClickToFilterOverridesSchema,
|
|
1775
|
+
rn as listDashboardCardLocations,
|
|
1776
|
+
an as mapDocumentSectionCards,
|
|
1777
|
+
Na as matrixCatalogSources,
|
|
1764
1778
|
In as matrixDefinitionFields,
|
|
1765
1779
|
Cn as matrixDefinitionSources,
|
|
1766
|
-
|
|
1780
|
+
Ma as matrixExecutionSources,
|
|
1767
1781
|
q as mergeDashboardAuthoringSources,
|
|
1768
1782
|
hn as mergeMatrixSorts,
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1783
|
+
sa as moveMatrixLevel,
|
|
1784
|
+
da as normalizeClickToFilterSettings,
|
|
1785
|
+
Pa as normalizeDashboardInputs,
|
|
1786
|
+
Dr as normalizeLegacyLinkedTargetOverrides,
|
|
1787
|
+
or as parseCardQueryRequest,
|
|
1774
1788
|
Lt as parseCardQueryRequestContext,
|
|
1775
|
-
|
|
1776
|
-
|
|
1789
|
+
ir as parseCardQueryRequestExtras,
|
|
1790
|
+
ca as parseExecutionControlBindingsShallow,
|
|
1777
1791
|
Ne as parseExecutionControlContext,
|
|
1778
|
-
|
|
1792
|
+
la as parseExecutionControlContract,
|
|
1779
1793
|
Ue as preferDashboardAuthoringSourceMetadata,
|
|
1780
1794
|
Yt as preferredDashboardAuthoringSource,
|
|
1781
|
-
|
|
1782
|
-
|
|
1795
|
+
ua as previewTemporalBucketAuthoringFormat,
|
|
1796
|
+
fa as readExactDomainCalculatedFieldReference,
|
|
1783
1797
|
yn as readMatrixCardConfig,
|
|
1784
|
-
$
|
|
1785
|
-
|
|
1786
|
-
|
|
1798
|
+
$a as rebindDashboardOptionDependencyInputId,
|
|
1799
|
+
pa as reconcileMatrixSpecStructure,
|
|
1800
|
+
ma as reconcileTemporalBucketAuthoringFormat,
|
|
1787
1801
|
H as remapClickToFilterReferences,
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1802
|
+
Sr as remapLinkedClickToFilterOverrides,
|
|
1803
|
+
La as requireNormalizedDashboardInputs,
|
|
1804
|
+
ha as resolveBindingControlValue,
|
|
1805
|
+
Ka as resolveCanonicalDetailResultRawKey,
|
|
1806
|
+
Qa as resolveCanonicalResultOutputKey,
|
|
1807
|
+
Xa as resolveCanonicalResultRawKey,
|
|
1794
1808
|
Ge as resolveDashboardAuthoringSource,
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1809
|
+
ga as resolveDashboardEntitySource,
|
|
1810
|
+
Ba as resolveDashboardFilterAutomaticTarget,
|
|
1811
|
+
qa as resolveDashboardFilterInheritedTarget,
|
|
1812
|
+
Va as resolveDashboardOptionDependencies,
|
|
1813
|
+
za as resolveDashboardOptionPopulation,
|
|
1814
|
+
ja as resolveDashboardSqlFilterTarget,
|
|
1815
|
+
ba as resolveGroupByFieldTarget,
|
|
1816
|
+
Ua as resolveMatrixControlBindings,
|
|
1803
1817
|
gn as resolveMatrixDefinition,
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1818
|
+
Ia as resolveMetricFieldTarget,
|
|
1819
|
+
Ca as resolveScalarMappedValue,
|
|
1820
|
+
ya as resolveTemporalBucketAuthoringFormat,
|
|
1807
1821
|
Ee as resolveTemporalResultOwner,
|
|
1808
1822
|
Ae as respondsToSelectionsSchema,
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1823
|
+
_a as retainMatrixConditionalFormatting,
|
|
1824
|
+
Ga as selectDashboardOptionDependencyInputIds,
|
|
1825
|
+
Da as selectionFieldFromExplorerField,
|
|
1826
|
+
vr as stripInstanceTargetsForLibrarySave,
|
|
1827
|
+
Sa as supportsCanonicalDashboardTemporalResult,
|
|
1828
|
+
va as transformComparisonDocument,
|
|
1829
|
+
Ta as updateMatrixConfig,
|
|
1830
|
+
wa as validateControlValue,
|
|
1817
1831
|
Ze as validateDashboardAuthoringDatasetScope,
|
|
1818
|
-
|
|
1832
|
+
rt as validateDashboardChangePlan,
|
|
1819
1833
|
cn as validateDashboardFilterValues,
|
|
1820
1834
|
tt as validateDashboardPlan,
|
|
1821
|
-
|
|
1822
|
-
|
|
1835
|
+
Re as validateResolvedPrimaryDateFieldShape,
|
|
1836
|
+
Ha as withDashboardOptionDependencyOverride
|
|
1823
1837
|
};
|