react-semaphor 0.1.552 → 0.1.553
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/analytics-protocol/index.js +8 -8
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{assistant-chat-sWQaBT61.js → assistant-chat-DaIdRbbd.js} +1275 -1296
- package/dist/chunks/{bookmark-state-Cu-a5ie_.js → bookmark-state-aGO7_ryE.js} +3 -3
- package/dist/chunks/{comparison-window-caption-CF90-I0i.js → comparison-window-caption-BugAu7zS.js} +7 -7
- package/dist/chunks/{custom-visual-inputs-ByQUyWf4.js → custom-visual-inputs-D7ez5sab.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DUJQv719.js → dashboard-briefing-launcher-DBJ0xrfF.js} +62 -62
- package/dist/chunks/{dashboard-controls-BjnvfcQp.js → dashboard-controls-CDX74NTl.js} +46 -46
- package/dist/chunks/{dashboard-json-BqcLekhd.js → dashboard-json-Cf5dpYTr.js} +4 -4
- package/dist/chunks/{dashboard-BjoJI7NN.js → dashboard-z3GYw7xR.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-PoQihHLu.js → document-dashboard-inputs-LMMWPOwU.js} +119 -119
- package/dist/chunks/{edit-dashboard-visual-KNJQr60W.js → edit-dashboard-visual-hCGiyxgm.js} +18 -18
- package/dist/chunks/{filter-reach-copy-zdhUFn6t.js → filter-reach-copy-BG5qVZKS.js} +48 -48
- package/dist/chunks/{filter-value-text-Ddf55Ku1.js → filter-value-text-DwP5dN9m.js} +2 -2
- package/dist/chunks/{global-date-filter-utils-C1jCNWdV.js → global-date-filter-utils-Ce6Ydv2W.js} +5927 -5723
- package/dist/chunks/{index-Dp0ta6KB.js → index-C_UIqop8.js} +9 -9
- package/dist/chunks/{matrix-analytical-definition-B9vW-osb.js → matrix-analytical-definition-cvzKdxPE.js} +2 -2
- package/dist/chunks/{matrix-card-LiMEipvq.js → matrix-card-VFE-yDlr.js} +2 -2
- package/dist/chunks/{matrix-formatter-C_EpDP6o.js → matrix-formatter-B27bz08Y.js} +15 -15
- package/dist/chunks/{matrix-member-presentation-DqzG-UhQ.js → matrix-member-presentation-DyC-e9pD.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-D6vYkZK4.js → matrix-operation-contract-L_SiObB7.js} +1 -1
- package/dist/chunks/{metric-comparison-zpGw4lD6.js → metric-comparison-B5gyyW9k.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-CQnIDtUv.js → pivot-header-presentation-BQFfowp1.js} +1 -1
- package/dist/chunks/{pivot-result-identity-C-Q1j1Wb.js → pivot-result-identity-dZIYsMrY.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-pwq3b7LC.js → pivot-result-lifecycle-D0kSz5QX.js} +6 -6
- package/dist/chunks/{raw-temporal-presentation-D3i0mnUe.js → raw-temporal-presentation-BWRH754b.js} +6 -6
- package/dist/chunks/{report-preferences-dialog-C0uGI0v7.js → report-preferences-dialog-DvabpYcC.js} +49 -49
- package/dist/chunks/{report-runtime-context-hWiTCzFV.js → report-runtime-context-CKiIubIu.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Cm0b7s-d.js → resolve-dashboard-input-context-Ctq1YCDV.js} +2062 -1988
- package/dist/chunks/{saved-dashboard-context-DCtGmAWe.js → saved-dashboard-context-Bt1E9d1l.js} +8 -8
- package/dist/chunks/{selection-reducer-CJzkTZio.js → selection-reducer-DdPwKDDQ.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-ChyotaWB.js → semaphor-ready-indicator-Cc1TG_gw.js} +26 -26
- package/dist/chunks/{shelf-drop-preview-context-D09ATIXv.js → shelf-drop-preview-context-Ch9XqytU.js} +119 -119
- package/dist/chunks/{source-entity-resolution-D195CrYS.js → source-entity-resolution-DkW3Iek5.js} +1 -1
- package/dist/chunks/{switch-wJP6O7ZT.js → switch-gm7RW-PW.js} +2 -2
- package/dist/chunks/{table-export-sheet-DUS_s8Cj.js → table-export-sheet-C7bDdC8r.js} +1 -1
- package/dist/chunks/{table-settings-WysCBj62.js → table-settings-CBm7G0yx.js} +224 -201
- package/dist/chunks/{temporal-bucket-CQOSbv9-.js → temporal-bucket-BikY3FFR.js} +1 -1
- package/dist/chunks/{token-types-BMqRmT-C.js → token-types-B1p9F_wS.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-t7JLE_LV.js → use-create-flow-overlay-state-CZdDRUpc.js} +6 -6
- package/dist/chunks/{validators-C-aOQlTB.js → validators-BdBzm_EV.js} +17 -16
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +273 -264
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.js +15 -15
- package/dist/index.js +21 -21
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/index.js +6 -6
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +3 -0
- package/dist/types/lib/utils/card-config-utils.d.ts +61 -0
- package/dist/types/lib/utils/card-type-change.d.ts +5 -1
- package/dist/types/shared/analytics-protocol/explorer-input-schemas.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +64 -0
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { k as
|
|
2
|
-
import "./matrix-operation-contract-
|
|
1
|
+
import { k as P, u as B, ab as j } from "./validators-BdBzm_EV.js";
|
|
2
|
+
import "./matrix-operation-contract-L_SiObB7.js";
|
|
3
3
|
import "./analytics-base-schemas-BKs3flFS.js";
|
|
4
|
-
import { z as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
4
|
+
import { z as f } from "zod";
|
|
5
|
+
const T = 8, A = 6, E = Object.freeze([]);
|
|
6
|
+
function z(e) {
|
|
7
7
|
switch (e.type) {
|
|
8
8
|
case "table":
|
|
9
9
|
case "chart":
|
|
10
|
-
return e.card ? [e.card] :
|
|
10
|
+
return e.card ? [e.card] : E;
|
|
11
11
|
case "kpi":
|
|
12
|
-
return Array.isArray(e.cards) ? e.cards :
|
|
12
|
+
return Array.isArray(e.cards) ? e.cards : E;
|
|
13
13
|
default:
|
|
14
|
-
return
|
|
14
|
+
return E;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function K(e, t) {
|
|
18
18
|
switch (e.type) {
|
|
19
19
|
case "table":
|
|
20
20
|
case "chart": {
|
|
@@ -31,7 +31,7 @@ function fe(e, t) {
|
|
|
31
31
|
return e;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function $(e) {
|
|
35
35
|
var n;
|
|
36
36
|
const t = [];
|
|
37
37
|
for (const r of e.sheets || []) {
|
|
@@ -48,7 +48,7 @@ function O(e) {
|
|
|
48
48
|
card: s
|
|
49
49
|
});
|
|
50
50
|
for (const i of ((n = r.document) == null ? void 0 : n.sections) || [])
|
|
51
|
-
for (const s of
|
|
51
|
+
for (const s of z(i))
|
|
52
52
|
t.push({
|
|
53
53
|
kind: "documentSectionCard",
|
|
54
54
|
sheetId: a,
|
|
@@ -59,11 +59,33 @@ function O(e) {
|
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function pe(e, t) {
|
|
63
|
+
const n = (a, i) => {
|
|
64
|
+
const s = a.map((o) => t(o, i(o)));
|
|
65
|
+
return s.every((o, u) => o === a[u]) ? a : s;
|
|
66
|
+
}, r = (e.sheets || []).map((a) => {
|
|
67
|
+
var h, p, c;
|
|
68
|
+
const i = a.id, s = a.cards && n(a.cards, (d) => ({ kind: "sheetCard", sheetId: i, cardId: d.id, card: d })), o = (h = a.frames) == null ? void 0 : h.map((d) => {
|
|
69
|
+
if (!d.cards) return d;
|
|
70
|
+
const l = n(d.cards, (F) => ({ kind: "frameCard", sheetId: i, frameId: d.id, cardId: F.id, card: F }));
|
|
71
|
+
return l === d.cards ? d : { ...d, cards: l };
|
|
72
|
+
}), u = (c = (p = a.document) == null ? void 0 : p.sections) == null ? void 0 : c.map(
|
|
73
|
+
(d) => K(d, (l) => t(l, { kind: "documentSectionCard", sheetId: i, sectionId: d.id, cardId: l.id, card: l }))
|
|
74
|
+
), m = !!o && o.some((d, l) => d !== a.frames[l]), y = !!u && u.some((d, l) => d !== a.document.sections[l]);
|
|
75
|
+
return s === a.cards && !m && !y ? a : {
|
|
76
|
+
...a,
|
|
77
|
+
...s === a.cards ? {} : { cards: s },
|
|
78
|
+
...m ? { frames: o } : {},
|
|
79
|
+
...y ? { document: { ...a.document, sections: u } } : {}
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
return r.every((a, i) => a === e.sheets[i]) ? e : { ...e, sheets: r };
|
|
83
|
+
}
|
|
84
|
+
function N(e) {
|
|
63
85
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
64
86
|
}
|
|
65
|
-
function
|
|
66
|
-
if (!
|
|
87
|
+
function ye(e) {
|
|
88
|
+
if (!N(e))
|
|
67
89
|
return [{ path: "", message: "must be an object." }];
|
|
68
90
|
const t = [];
|
|
69
91
|
e.title !== void 0 && typeof e.title != "string" && t.push({ path: "title", message: "must be a string." });
|
|
@@ -71,13 +93,13 @@ function me(e) {
|
|
|
71
93
|
if (!Array.isArray(n))
|
|
72
94
|
t.push({ path: "cards", message: "must be an array of KPI cards." });
|
|
73
95
|
else {
|
|
74
|
-
(n.length < 1 || n.length >
|
|
96
|
+
(n.length < 1 || n.length > T) && t.push({
|
|
75
97
|
path: "cards",
|
|
76
|
-
message: `must hold 1 to ${
|
|
98
|
+
message: `must hold 1 to ${T} KPI cards.`
|
|
77
99
|
});
|
|
78
100
|
const a = /* @__PURE__ */ new Set();
|
|
79
101
|
n.forEach((i, s) => {
|
|
80
|
-
if (!
|
|
102
|
+
if (!N(i)) {
|
|
81
103
|
t.push({ path: `cards[${s}]`, message: "must be a card." });
|
|
82
104
|
return;
|
|
83
105
|
}
|
|
@@ -91,18 +113,18 @@ function me(e) {
|
|
|
91
113
|
});
|
|
92
114
|
}
|
|
93
115
|
const r = e.kpi;
|
|
94
|
-
return
|
|
116
|
+
return N(r) ? (r.layout !== "tiles" && r.layout !== "lines" ? t.push({
|
|
95
117
|
path: "kpi.layout",
|
|
96
118
|
message: "must be 'tiles' or 'lines'."
|
|
97
|
-
}) : r.layout === "tiles" && Array.isArray(n) && n.length >
|
|
119
|
+
}) : r.layout === "tiles" && Array.isArray(n) && n.length > A && t.push({
|
|
98
120
|
path: "kpi.layout",
|
|
99
|
-
message: `must be 'lines' for more than ${
|
|
121
|
+
message: `must be 'lines' for more than ${A} KPI cards.`
|
|
100
122
|
}), r.columns !== void 0 && r.columns !== 1 && r.columns !== 2 && t.push({ path: "kpi.columns", message: "must be 1 or 2." })) : t.push({ path: "kpi", message: "must be an object." }), t;
|
|
101
123
|
}
|
|
102
|
-
const
|
|
103
|
-
function
|
|
124
|
+
const U = ["new", "edit", "delete", "create", "update", "remove"];
|
|
125
|
+
function M(e, t) {
|
|
104
126
|
return (e.sheets || []).flatMap(
|
|
105
|
-
(n) =>
|
|
127
|
+
(n) => $({ sheets: [n] }).filter(t).map((r) => ({
|
|
106
128
|
card: r.card,
|
|
107
129
|
sheet: n,
|
|
108
130
|
...r.kind === "frameCard" && { frameId: r.frameId },
|
|
@@ -112,25 +134,25 @@ function $(e, t) {
|
|
|
112
134
|
}))
|
|
113
135
|
);
|
|
114
136
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
137
|
+
function b(e) {
|
|
138
|
+
return M(e, (t) => t.kind !== "documentSectionCard");
|
|
117
139
|
}
|
|
118
|
-
function
|
|
140
|
+
function he(e) {
|
|
119
141
|
return [
|
|
120
|
-
...
|
|
121
|
-
|
|
142
|
+
...b(e),
|
|
143
|
+
...M(e, (t) => t.kind === "documentSectionCard")
|
|
122
144
|
];
|
|
123
145
|
}
|
|
124
|
-
function
|
|
125
|
-
return
|
|
146
|
+
function be(e) {
|
|
147
|
+
return b(e).map((t) => t.card);
|
|
126
148
|
}
|
|
127
|
-
function
|
|
128
|
-
return n && t === n ? !0 :
|
|
149
|
+
function Ie(e, t, n) {
|
|
150
|
+
return n && t === n ? !0 : !$(e).some(
|
|
129
151
|
(r) => r.cardId === t
|
|
130
152
|
);
|
|
131
153
|
}
|
|
132
|
-
function
|
|
133
|
-
return !e || e.trim().length === 0 ? { isValid: !1, error: "Card ID cannot be empty" } : e.length < 3 ? { isValid: !1, error: "Card ID must be at least 3 characters" } : e.length > 50 ? { isValid: !1, error: "Card ID must be less than 50 characters" } : /^[a-zA-Z0-9-_]+$/.test(e) ? /^[a-zA-Z0-9]/.test(e) ?
|
|
154
|
+
function ge(e) {
|
|
155
|
+
return !e || e.trim().length === 0 ? { isValid: !1, error: "Card ID cannot be empty" } : e.length < 3 ? { isValid: !1, error: "Card ID must be at least 3 characters" } : e.length > 50 ? { isValid: !1, error: "Card ID must be less than 50 characters" } : /^[a-zA-Z0-9-_]+$/.test(e) ? /^[a-zA-Z0-9]/.test(e) ? U.includes(e.toLowerCase()) ? {
|
|
134
156
|
isValid: !1,
|
|
135
157
|
error: `"${e}" is a reserved keyword and cannot be used`
|
|
136
158
|
} : { isValid: !0 } : {
|
|
@@ -141,27 +163,27 @@ function be(e) {
|
|
|
141
163
|
error: "Card ID can only contain letters, numbers, hyphens, and underscores"
|
|
142
164
|
};
|
|
143
165
|
}
|
|
144
|
-
function
|
|
166
|
+
function Se(e, t) {
|
|
145
167
|
var n;
|
|
146
|
-
return (n =
|
|
168
|
+
return (n = Q(e, t)) == null ? void 0 : n.card;
|
|
147
169
|
}
|
|
148
|
-
function
|
|
149
|
-
for (const n of
|
|
170
|
+
function Q(e, t) {
|
|
171
|
+
for (const n of b(e))
|
|
150
172
|
if (n.card.id === t)
|
|
151
173
|
return n;
|
|
152
174
|
}
|
|
153
|
-
function
|
|
175
|
+
function Ce(e, t) {
|
|
154
176
|
for (const n of e.sheets || [])
|
|
155
177
|
for (const r of n.frames || [])
|
|
156
178
|
for (const a of r.cards || [])
|
|
157
179
|
if (a.id === t)
|
|
158
180
|
return { card: a, sheet: n };
|
|
159
181
|
}
|
|
160
|
-
const
|
|
182
|
+
const S = {
|
|
161
183
|
includeMetricFilterDatasets: !0,
|
|
162
184
|
preferQualifiedIdentity: !1
|
|
163
185
|
};
|
|
164
|
-
function
|
|
186
|
+
function V(e) {
|
|
165
187
|
if (!e) return;
|
|
166
188
|
if (e.kind === "semantic")
|
|
167
189
|
return { entityName: e.datasetName, entityId: e.datasetId, label: e.label };
|
|
@@ -172,12 +194,12 @@ function M(e) {
|
|
|
172
194
|
label: e.label
|
|
173
195
|
};
|
|
174
196
|
}
|
|
175
|
-
function
|
|
197
|
+
function G(e) {
|
|
176
198
|
var n;
|
|
177
|
-
const t =
|
|
199
|
+
const t = V(e.source);
|
|
178
200
|
return t ? `${(n = e.source) == null ? void 0 : n.kind}:${t.qualifiedEntityName || t.entityName}` : "";
|
|
179
201
|
}
|
|
180
|
-
function
|
|
202
|
+
function Y(e) {
|
|
181
203
|
return [
|
|
182
204
|
e.id,
|
|
183
205
|
e.qualifiedEntityName,
|
|
@@ -187,38 +209,38 @@ function Q(e) {
|
|
|
187
209
|
e.name,
|
|
188
210
|
// Source-only fields from different datasets can otherwise share a key
|
|
189
211
|
// and the second dataset would be silently dropped.
|
|
190
|
-
|
|
212
|
+
G(e)
|
|
191
213
|
].join("|");
|
|
192
214
|
}
|
|
193
|
-
function
|
|
215
|
+
function W(e) {
|
|
194
216
|
return [e.entityName, e.qualifiedEntityName || "", e.entityId || ""].join("|");
|
|
195
217
|
}
|
|
196
|
-
function
|
|
218
|
+
function Ee(e) {
|
|
197
219
|
return e.entityName || e.qualifiedEntityName || "";
|
|
198
220
|
}
|
|
199
|
-
function
|
|
221
|
+
function J(e) {
|
|
200
222
|
var t, n;
|
|
201
223
|
return !!(e.expression || e.derivedField || (n = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && n.length);
|
|
202
224
|
}
|
|
203
|
-
function
|
|
204
|
-
return
|
|
225
|
+
function Z(e) {
|
|
226
|
+
return P(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || J(e);
|
|
205
227
|
}
|
|
206
|
-
function
|
|
207
|
-
const n =
|
|
228
|
+
function w(e, t) {
|
|
229
|
+
const n = W(t);
|
|
208
230
|
e.found.has(n) || e.found.set(n, t);
|
|
209
231
|
}
|
|
210
|
-
function
|
|
211
|
-
var
|
|
232
|
+
function I(e, t) {
|
|
233
|
+
var m, y, h;
|
|
212
234
|
if (!e) return;
|
|
213
|
-
const n =
|
|
235
|
+
const n = Y(e);
|
|
214
236
|
if (t.visitedFields.has(n)) return;
|
|
215
237
|
t.visitedFields.add(n);
|
|
216
|
-
const r =
|
|
238
|
+
const r = Z(e);
|
|
217
239
|
if (!r) {
|
|
218
|
-
const
|
|
219
|
-
|
|
240
|
+
const p = !e.entityName && !e.qualifiedEntityName ? V(e.source) : void 0;
|
|
241
|
+
w(
|
|
220
242
|
t,
|
|
221
|
-
|
|
243
|
+
p || {
|
|
222
244
|
// May be empty for qualified-only metadata; identity then comes from
|
|
223
245
|
// `qualifiedEntityName` (see `identityFor` and the calculator).
|
|
224
246
|
entityName: e.entityName || "",
|
|
@@ -228,50 +250,50 @@ function p(e, t) {
|
|
|
228
250
|
}
|
|
229
251
|
);
|
|
230
252
|
}
|
|
231
|
-
t.includeMetricFilterDatasets && "parameters" in e && ((
|
|
232
|
-
const a = (
|
|
233
|
-
i && a.forEach((
|
|
253
|
+
t.includeMetricFilterDatasets && "parameters" in e && ((m = e.parameters) != null && m.filters) && D(e.parameters.filters, t);
|
|
254
|
+
const a = (y = e.calculatedFormula) == null ? void 0 : y.inputFields, i = !!(a && a.length > 0);
|
|
255
|
+
i && a.forEach((p) => I(p, t));
|
|
234
256
|
let s = !1, o = !1;
|
|
235
|
-
const u = i || (
|
|
257
|
+
const u = i || (h = e.derivedField) == null ? void 0 : h.inputs;
|
|
236
258
|
if (u && Object.keys(u).length > 0)
|
|
237
|
-
for (const
|
|
238
|
-
const
|
|
239
|
-
if (!
|
|
259
|
+
for (const p of Object.values(u)) {
|
|
260
|
+
const c = p.field.source;
|
|
261
|
+
if (!c) {
|
|
240
262
|
i || (o = !0);
|
|
241
263
|
continue;
|
|
242
264
|
}
|
|
243
|
-
if (
|
|
265
|
+
if (c.kind === "sql") {
|
|
244
266
|
o = !0;
|
|
245
267
|
continue;
|
|
246
268
|
}
|
|
247
|
-
if (
|
|
248
|
-
|
|
249
|
-
entityName:
|
|
250
|
-
entityId:
|
|
251
|
-
label:
|
|
269
|
+
if (c.kind === "semantic")
|
|
270
|
+
w(t, {
|
|
271
|
+
entityName: c.datasetName,
|
|
272
|
+
entityId: c.datasetId,
|
|
273
|
+
label: c.label
|
|
252
274
|
});
|
|
253
275
|
else {
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
entityName:
|
|
257
|
-
qualifiedEntityName:
|
|
258
|
-
label:
|
|
276
|
+
const d = [c.databaseName, c.schemaName, c.tableName].filter((l) => !!(l && l.trim())).join(".");
|
|
277
|
+
w(t, {
|
|
278
|
+
entityName: c.tableName,
|
|
279
|
+
qualifiedEntityName: d.includes(".") ? d : void 0,
|
|
280
|
+
label: c.label
|
|
259
281
|
});
|
|
260
282
|
}
|
|
261
283
|
s = !0;
|
|
262
284
|
}
|
|
263
285
|
o && (t.complete = !1), r && !i && !s && (t.complete = !1);
|
|
264
286
|
}
|
|
265
|
-
function
|
|
287
|
+
function D(e, t) {
|
|
266
288
|
if (e && !t.visitedGroups.has(e.id)) {
|
|
267
289
|
t.visitedGroups.add(e.id);
|
|
268
290
|
for (const n of e.conditions || [])
|
|
269
|
-
|
|
291
|
+
I(n.field, t);
|
|
270
292
|
for (const n of e.groups || [])
|
|
271
|
-
|
|
293
|
+
D(n, t);
|
|
272
294
|
}
|
|
273
295
|
}
|
|
274
|
-
function
|
|
296
|
+
function C(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
|
|
275
297
|
return {
|
|
276
298
|
found: /* @__PURE__ */ new Map(),
|
|
277
299
|
complete: !0,
|
|
@@ -280,50 +302,50 @@ function b(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
|
|
|
280
302
|
includeMetricFilterDatasets: e
|
|
281
303
|
};
|
|
282
304
|
}
|
|
283
|
-
function
|
|
305
|
+
function v(e, t) {
|
|
284
306
|
var r;
|
|
285
307
|
const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
|
|
286
308
|
return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
|
|
287
309
|
}
|
|
288
|
-
function
|
|
289
|
-
const t =
|
|
290
|
-
return
|
|
310
|
+
function Ne(e) {
|
|
311
|
+
const t = C(!1);
|
|
312
|
+
return I(e, t), { datasets: Array.from(t.found.values()), complete: t.complete };
|
|
291
313
|
}
|
|
292
|
-
function
|
|
293
|
-
const i = { ...
|
|
294
|
-
|
|
295
|
-
const u =
|
|
314
|
+
function L(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = S) {
|
|
315
|
+
const i = { ...S, ...a }, s = C(i.includeMetricFilterDatasets, n, r);
|
|
316
|
+
I(e, s), s.found.forEach((o) => {
|
|
317
|
+
const u = v(o, i.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
296
318
|
u && t.add(u);
|
|
297
319
|
});
|
|
298
320
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
321
|
+
function we(e, t) {
|
|
322
|
+
L(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
|
|
301
323
|
preferQualifiedIdentity: !0
|
|
302
324
|
});
|
|
303
325
|
}
|
|
304
|
-
function
|
|
305
|
-
const a =
|
|
306
|
-
|
|
307
|
-
const s =
|
|
326
|
+
function ke(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
327
|
+
const a = C(!0, n, r);
|
|
328
|
+
I(e, a), a.found.forEach((i) => {
|
|
329
|
+
const s = v(i, "qualifiedOnly");
|
|
308
330
|
s && t.add(s);
|
|
309
331
|
});
|
|
310
332
|
}
|
|
311
|
-
function
|
|
312
|
-
|
|
333
|
+
function De(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
334
|
+
L(e, t, n, r, {
|
|
313
335
|
includeMetricFilterDatasets: !1
|
|
314
336
|
});
|
|
315
337
|
}
|
|
316
|
-
function
|
|
317
|
-
const i = { ...
|
|
318
|
-
|
|
319
|
-
const u =
|
|
338
|
+
function ve(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = S) {
|
|
339
|
+
const i = { ...S, ...a }, s = C(i.includeMetricFilterDatasets, n, r);
|
|
340
|
+
D(e, s), s.found.forEach((o) => {
|
|
341
|
+
const u = v(o, i.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
320
342
|
u && t.add(u);
|
|
321
343
|
});
|
|
322
344
|
}
|
|
323
|
-
function
|
|
345
|
+
function Fe(e, t) {
|
|
324
346
|
return t != null && t[e] ? t[e] : (e.includes(".") ? e.slice(e.lastIndexOf(".") + 1) : e).replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/\b\w/g, (r) => r.toUpperCase());
|
|
325
347
|
}
|
|
326
|
-
const
|
|
348
|
+
const H = {
|
|
327
349
|
date: /* @__PURE__ */ new Set([
|
|
328
350
|
"between",
|
|
329
351
|
"not between",
|
|
@@ -362,14 +384,14 @@ const J = {
|
|
|
362
384
|
]),
|
|
363
385
|
boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
|
|
364
386
|
};
|
|
365
|
-
function
|
|
366
|
-
const t =
|
|
387
|
+
function X(e) {
|
|
388
|
+
const t = j(e);
|
|
367
389
|
return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
|
|
368
390
|
}
|
|
369
|
-
function
|
|
370
|
-
return typeof t != "string" ? !1 :
|
|
391
|
+
function Te(e, t) {
|
|
392
|
+
return typeof t != "string" ? !1 : H[X(e)].has(t);
|
|
371
393
|
}
|
|
372
|
-
const
|
|
394
|
+
const Ae = /* @__PURE__ */ new Set([
|
|
373
395
|
"=",
|
|
374
396
|
">",
|
|
375
397
|
"<",
|
|
@@ -385,19 +407,19 @@ const Fe = /* @__PURE__ */ new Set([
|
|
|
385
407
|
"is null",
|
|
386
408
|
"is not null"
|
|
387
409
|
]);
|
|
388
|
-
function
|
|
410
|
+
function ee(e, t) {
|
|
389
411
|
return t === "number" ? typeof e == "number" && Number.isFinite(e) : t === "boolean" ? typeof e == "boolean" : t === "date" ? e instanceof Date || typeof e == "string" && e.trim().length > 0 : typeof e == "string" || typeof e == "number" || typeof e == "boolean";
|
|
390
412
|
}
|
|
391
|
-
function
|
|
413
|
+
function _e(e, t, n, r) {
|
|
392
414
|
if (B(e.relativeMeta)) {
|
|
393
415
|
r.push(
|
|
394
416
|
`${n}.relativeMeta counts back from the latest data; a dashboard filter's dates run to now. Use a period counted back from today.`
|
|
395
417
|
);
|
|
396
418
|
return;
|
|
397
419
|
}
|
|
398
|
-
|
|
420
|
+
te(e.operation, e.values, t, `${n}.values`, r);
|
|
399
421
|
}
|
|
400
|
-
function
|
|
422
|
+
function te(e, t, n, r, a) {
|
|
401
423
|
if (e === "is null" || e === "is not null") {
|
|
402
424
|
t.length !== 0 && a.push(`${r} must be empty for null filter operations.`);
|
|
403
425
|
return;
|
|
@@ -423,29 +445,29 @@ function X(e, t, n, r, a) {
|
|
|
423
445
|
return;
|
|
424
446
|
}
|
|
425
447
|
for (const i of t)
|
|
426
|
-
if (!
|
|
448
|
+
if (!ee(i, n)) {
|
|
427
449
|
a.push(
|
|
428
450
|
`${r} contains a value that is incompatible with valueType '${n}'.`
|
|
429
451
|
);
|
|
430
452
|
return;
|
|
431
453
|
}
|
|
432
454
|
}
|
|
433
|
-
const
|
|
455
|
+
const Oe = {
|
|
434
456
|
database: null,
|
|
435
457
|
schema: null,
|
|
436
458
|
table: null
|
|
437
|
-
},
|
|
459
|
+
}, $e = "__card_default__", q = {
|
|
438
460
|
bookmarksPerViewerPerDashboard: 20,
|
|
439
461
|
bookmarkNameMaxChars: 100,
|
|
440
462
|
columnLabelMaxChars: 120,
|
|
441
463
|
tableSettingsMaxBytes: 65536,
|
|
442
464
|
rememberedTableSettingsMaxBytes: 262144,
|
|
443
465
|
bookmarkStateMaxBytes: 65536
|
|
444
|
-
},
|
|
445
|
-
function
|
|
466
|
+
}, ne = 1;
|
|
467
|
+
function Me(e) {
|
|
446
468
|
return new TextEncoder().encode(JSON.stringify(e ?? null)).length;
|
|
447
469
|
}
|
|
448
|
-
function
|
|
470
|
+
function re(e) {
|
|
449
471
|
const t = encodeURIComponent;
|
|
450
472
|
switch (e.kind) {
|
|
451
473
|
case "dimension":
|
|
@@ -458,7 +480,7 @@ function te(e) {
|
|
|
458
480
|
return `result:${t(e.key)}`;
|
|
459
481
|
}
|
|
460
482
|
}
|
|
461
|
-
function
|
|
483
|
+
function g(e) {
|
|
462
484
|
if (e)
|
|
463
485
|
try {
|
|
464
486
|
return decodeURIComponent(e);
|
|
@@ -466,149 +488,150 @@ function h(e) {
|
|
|
466
488
|
return;
|
|
467
489
|
}
|
|
468
490
|
}
|
|
469
|
-
function
|
|
491
|
+
function ae(e) {
|
|
470
492
|
if (typeof e != "string") return;
|
|
471
493
|
const t = e.split(":");
|
|
472
494
|
let n;
|
|
473
495
|
if (t[0] === "dim" && t.length === 3) {
|
|
474
|
-
const r = t[1], a =
|
|
496
|
+
const r = t[1], a = g(t[2]);
|
|
475
497
|
(r === "detail" || r === "groupby") && a && (n = { kind: "dimension", role: r, fieldId: a });
|
|
476
498
|
} else if (t[0] === "metric" && t.length === 3) {
|
|
477
|
-
const r =
|
|
499
|
+
const r = g(t[1]), a = g(t[2]);
|
|
478
500
|
r && a && (n = { kind: "metric", metricId: r, metricAlias: a });
|
|
479
501
|
} else if (t[0] === "result" && t.length === 2) {
|
|
480
|
-
const r =
|
|
502
|
+
const r = g(t[1]);
|
|
481
503
|
r && (n = { kind: "result", key: r });
|
|
482
504
|
}
|
|
483
|
-
return n &&
|
|
484
|
-
}
|
|
485
|
-
function
|
|
486
|
-
return typeof e == "string" &&
|
|
487
|
-
}
|
|
488
|
-
const
|
|
489
|
-
order:
|
|
490
|
-
hidden:
|
|
491
|
-
labels:
|
|
492
|
-
sort:
|
|
493
|
-
|
|
494
|
-
columnId:
|
|
495
|
-
direction:
|
|
505
|
+
return n && re(n) === e ? n : void 0;
|
|
506
|
+
}
|
|
507
|
+
function k(e) {
|
|
508
|
+
return typeof e == "string" && ae(e) !== void 0;
|
|
509
|
+
}
|
|
510
|
+
const _ = f.array(f.string()).max(2e3), ie = f.object({
|
|
511
|
+
order: _.optional(),
|
|
512
|
+
hidden: _.optional(),
|
|
513
|
+
labels: f.record(f.string(), f.string().max(q.columnLabelMaxChars)).optional(),
|
|
514
|
+
sort: f.array(
|
|
515
|
+
f.object({
|
|
516
|
+
columnId: f.string(),
|
|
517
|
+
direction: f.enum(["asc", "desc"])
|
|
496
518
|
}).strict()
|
|
497
519
|
).max(2e3).optional()
|
|
498
520
|
}).strict();
|
|
499
|
-
function
|
|
521
|
+
function O(e) {
|
|
500
522
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
501
523
|
for (const r of e)
|
|
502
|
-
!
|
|
524
|
+
!k(r) || t.has(r) || (t.add(r), n.push(r));
|
|
503
525
|
return n;
|
|
504
526
|
}
|
|
505
|
-
function
|
|
527
|
+
function x(e) {
|
|
506
528
|
if (!e) return;
|
|
507
|
-
const t = e.order ?
|
|
529
|
+
const t = e.order ? O(e.order) : void 0, n = e.hidden ? O(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
|
|
508
530
|
([o, u]) => {
|
|
509
|
-
const
|
|
510
|
-
return
|
|
531
|
+
const m = typeof u == "string" ? u.trim() : "";
|
|
532
|
+
return k(o) && m ? [
|
|
511
533
|
[
|
|
512
534
|
o,
|
|
513
|
-
|
|
535
|
+
m.slice(0, q.columnLabelMaxChars)
|
|
514
536
|
]
|
|
515
537
|
] : [];
|
|
516
538
|
}
|
|
517
|
-
), a = /* @__PURE__ */ new Set(), i = e.sort ? e.sort.filter((o) => !
|
|
539
|
+
), a = /* @__PURE__ */ new Set(), i = e.sort ? e.sort.filter((o) => !k(o.columnId) || a.has(o.columnId) ? !1 : (a.add(o.columnId), !0)) : void 0, s = {};
|
|
518
540
|
return t != null && t.length && (s.order = t), n != null && n.length && (s.hidden = n), r.length && (s.labels = Object.fromEntries(r)), i && (s.sort = i.map(({ columnId: o, direction: u }) => ({
|
|
519
541
|
columnId: o,
|
|
520
542
|
direction: u
|
|
521
543
|
}))), Object.keys(s).length ? s : void 0;
|
|
522
544
|
}
|
|
523
|
-
function
|
|
524
|
-
return
|
|
545
|
+
function se(e) {
|
|
546
|
+
return x(e) === void 0;
|
|
525
547
|
}
|
|
526
|
-
function
|
|
527
|
-
if (t !==
|
|
548
|
+
function oe(e, t) {
|
|
549
|
+
if (t !== ne)
|
|
528
550
|
return {
|
|
529
551
|
ok: !1,
|
|
530
552
|
error: `Unsupported table settings version ${t}.`
|
|
531
553
|
};
|
|
532
|
-
const n =
|
|
554
|
+
const n = ie.safeParse(e);
|
|
533
555
|
return n.success ? {
|
|
534
556
|
ok: !0,
|
|
535
|
-
value:
|
|
557
|
+
value: x(n.data) ?? {}
|
|
536
558
|
} : { ok: !1, error: "Table settings are invalid." };
|
|
537
559
|
}
|
|
538
|
-
function
|
|
560
|
+
function Ve(e, t, n) {
|
|
539
561
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
540
562
|
const r = {};
|
|
541
563
|
for (const [a, i] of Object.entries(
|
|
542
564
|
e
|
|
543
565
|
)) {
|
|
544
566
|
if (!n.has(a)) continue;
|
|
545
|
-
const s =
|
|
546
|
-
s.ok && !
|
|
567
|
+
const s = oe(i, t);
|
|
568
|
+
s.ok && !se(s.value) && (r[a] = s.value);
|
|
547
569
|
}
|
|
548
570
|
return r;
|
|
549
571
|
}
|
|
550
|
-
const
|
|
572
|
+
const ue = /* @__PURE__ */ new Set([
|
|
551
573
|
"table",
|
|
552
574
|
"detailTable"
|
|
553
575
|
]);
|
|
554
576
|
function R(e) {
|
|
555
|
-
return
|
|
577
|
+
return ue.has(e.type);
|
|
556
578
|
}
|
|
557
|
-
function
|
|
579
|
+
function de(e) {
|
|
558
580
|
var t, n;
|
|
559
581
|
return R(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
|
|
560
582
|
}
|
|
561
|
-
function
|
|
583
|
+
function Le(e) {
|
|
562
584
|
return new Set(
|
|
563
|
-
|
|
585
|
+
b(e).filter(({ card: t }) => R(t)).map(({ card: t }) => t.id)
|
|
564
586
|
);
|
|
565
587
|
}
|
|
566
|
-
function
|
|
588
|
+
function qe(e) {
|
|
567
589
|
return new Set(
|
|
568
|
-
|
|
590
|
+
b(e).filter(({ card: t }) => de(t)).map(({ card: t }) => t.id)
|
|
569
591
|
);
|
|
570
592
|
}
|
|
571
593
|
export {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
Ee as
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
De as
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
594
|
+
K as A,
|
|
595
|
+
pe as B,
|
|
596
|
+
$e as C,
|
|
597
|
+
Ae as D,
|
|
598
|
+
Oe as E,
|
|
599
|
+
ye as F,
|
|
600
|
+
X as G,
|
|
601
|
+
Te as H,
|
|
602
|
+
Q as I,
|
|
603
|
+
be as J,
|
|
604
|
+
b as K,
|
|
605
|
+
Se as L,
|
|
606
|
+
he as M,
|
|
607
|
+
Ie as N,
|
|
608
|
+
ge as O,
|
|
609
|
+
Ce as P,
|
|
610
|
+
q as V,
|
|
611
|
+
Ee as a,
|
|
612
|
+
we as b,
|
|
613
|
+
L as c,
|
|
614
|
+
V as d,
|
|
615
|
+
ke as e,
|
|
616
|
+
De as f,
|
|
617
|
+
ve as g,
|
|
618
|
+
Fe as h,
|
|
619
|
+
ne as i,
|
|
620
|
+
se as j,
|
|
621
|
+
oe as k,
|
|
622
|
+
Ve as l,
|
|
623
|
+
Me as m,
|
|
624
|
+
x as n,
|
|
602
625
|
R as o,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
626
|
+
ae as p,
|
|
627
|
+
de as q,
|
|
628
|
+
Ne as r,
|
|
629
|
+
Le as s,
|
|
630
|
+
re as t,
|
|
631
|
+
qe as u,
|
|
632
|
+
_e as v,
|
|
633
|
+
$ as w,
|
|
634
|
+
T as x,
|
|
635
|
+
A as y,
|
|
636
|
+
z
|
|
614
637
|
};
|