react-semaphor 0.1.546 → 0.1.547
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 +70 -67
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/applied-constraints-DU-wndZ7.js +47 -0
- package/dist/chunks/{assistant-chat-BPXhulAx.js → assistant-chat-CK84cPAB.js} +106 -106
- package/dist/chunks/{bookmark-state-C4vetoa0.js → bookmark-state-Cu-a5ie_.js} +2 -8
- package/dist/chunks/{custom-visual-inputs-CkJW9pBS.js → custom-visual-inputs-ChL54gGm.js} +1 -1
- package/dist/chunks/{dashboard-C3CoKbGY.js → dashboard-DCk26-6i.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Be4h-7My.js → dashboard-briefing-launcher-CQ1eYsGy.js} +528 -528
- package/dist/chunks/{dashboard-controls-bxPrlSyp.js → dashboard-controls-BMeZjF7r.js} +45 -45
- package/dist/chunks/{dashboard-json-BrjxIiRt.js → dashboard-json-BZqCoanC.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-CRVHpIHp.js → document-dashboard-inputs-tYd7ao0o.js} +94 -94
- package/dist/chunks/{edit-dashboard-visual-DYYYDjY6.js → edit-dashboard-visual-Bv3MHM_G.js} +281 -281
- package/dist/chunks/{column-catalog-BYnochWQ.js → filter-reach-copy-CGWsL_ez.js} +978 -861
- package/dist/chunks/{global-date-filter-utils-9d6m9-FE.js → global-date-filter-utils-BhAu8zIM.js} +4070 -3792
- package/dist/chunks/{index-DkQkMKa1.js → index-DmrLP5Ro.js} +30 -30
- package/dist/chunks/{raw-temporal-presentation-CBzrDOjM.js → raw-temporal-presentation-DypB7sMX.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-4QEZWe5U.js → report-preferences-dialog-DoVyriYC.js} +59 -59
- package/dist/chunks/{resolve-dashboard-input-context-UpK_LBpL.js → resolve-dashboard-input-context-D0JDUa4h.js} +1511 -1612
- package/dist/chunks/{saved-dashboard-context-D_I3Lxk0.js → saved-dashboard-context-BfAH5j4L.js} +5 -5
- package/dist/chunks/{semaphor-ready-indicator-4zpRHE-X.js → semaphor-ready-indicator-CRm17oIP.js} +37137 -36459
- package/dist/chunks/{shelf-drop-preview-context-Cfw7TRAx.js → shelf-drop-preview-context-vy6P9THz.js} +80 -80
- package/dist/chunks/{table-settings-CunhoDUi.js → table-settings-WysCBj62.js} +133 -124
- package/dist/chunks/{use-create-flow-overlay-state-DZBZiiD-.js → use-create-flow-overlay-state-Csx_Xjsh.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1419 -1340
- package/dist/index.js +14 -14
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/surfboard/filter/types.d.ts +7 -0
- package/dist/types/components/surfboard/screen-size-preview-button.d.ts +7 -4
- package/dist/types/components/visual/matrix-table/matrix-card-view.d.ts +3 -0
- package/dist/types/index.js +2 -2
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +346 -21
- package/dist/types/lib/dashboard-inputs/dashboard-filter-value-identity.d.ts +65 -0
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +3 -3
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +9 -1
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +5 -1
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +83 -13
- package/dist/types/lib/stores/dashboard-store.d.ts +12 -0
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +57 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +3 -3
- package/dist/types/shared/dashboard-authoring/dashboard-filter-automatic-target.d.ts +4 -4
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-types.d.ts +27 -1
- package/dist/types/shared/dashboard-authoring/dashboard-filter-value-compatibility.d.ts +12 -3
- package/dist/types/shared/dashboard-authoring/filter-reach-copy.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-preview.d.ts +97 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +26 -4
- package/dist/types/shared/dashboard-authoring/semantic-auto-join-card.d.ts +22 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { k as
|
|
1
|
+
import { k as x, u as B, ab as P } from "./validators-C-aOQlTB.js";
|
|
2
2
|
import "./matrix-operation-contract-D6vYkZK4.js";
|
|
3
3
|
import "./analytics-base-schemas-BKs3flFS.js";
|
|
4
|
-
import { z as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
4
|
+
import { z as d } from "zod";
|
|
5
|
+
const F = 8, T = 6, g = Object.freeze([]);
|
|
6
|
+
function j(e) {
|
|
7
7
|
switch (e.type) {
|
|
8
8
|
case "table":
|
|
9
9
|
case "chart":
|
|
@@ -14,7 +14,7 @@ function P(e) {
|
|
|
14
14
|
return g;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function fe(e, t) {
|
|
18
18
|
switch (e.type) {
|
|
19
19
|
case "table":
|
|
20
20
|
case "chart": {
|
|
@@ -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 j(i))
|
|
52
52
|
t.push({
|
|
53
53
|
kind: "documentSectionCard",
|
|
54
54
|
sheetId: a,
|
|
@@ -62,7 +62,7 @@ function O(e) {
|
|
|
62
62
|
function S(e) {
|
|
63
63
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function me(e) {
|
|
66
66
|
if (!S(e))
|
|
67
67
|
return [{ path: "", message: "must be an object." }];
|
|
68
68
|
const t = [];
|
|
@@ -71,9 +71,9 @@ function de(e) {
|
|
|
71
71
|
if (!Array.isArray(n))
|
|
72
72
|
t.push({ path: "cards", message: "must be an array of KPI cards." });
|
|
73
73
|
else {
|
|
74
|
-
(n.length < 1 || n.length >
|
|
74
|
+
(n.length < 1 || n.length > F) && t.push({
|
|
75
75
|
path: "cards",
|
|
76
|
-
message: `must hold 1 to ${
|
|
76
|
+
message: `must hold 1 to ${F} KPI cards.`
|
|
77
77
|
});
|
|
78
78
|
const a = /* @__PURE__ */ new Set();
|
|
79
79
|
n.forEach((i, s) => {
|
|
@@ -99,7 +99,7 @@ function de(e) {
|
|
|
99
99
|
message: `must be 'lines' for more than ${T} KPI cards.`
|
|
100
100
|
}), 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
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const z = ["new", "edit", "delete", "create", "update", "remove"];
|
|
103
103
|
function $(e, t) {
|
|
104
104
|
return (e.sheets || []).flatMap(
|
|
105
105
|
(n) => O({ sheets: [n] }).filter(t).map((r) => ({
|
|
@@ -115,22 +115,22 @@ function $(e, t) {
|
|
|
115
115
|
function m(e) {
|
|
116
116
|
return $(e, (t) => t.kind !== "documentSectionCard");
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function pe(e) {
|
|
119
119
|
return [
|
|
120
120
|
...m(e),
|
|
121
121
|
...$(e, (t) => t.kind === "documentSectionCard")
|
|
122
122
|
];
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function he(e) {
|
|
125
125
|
return m(e).map((t) => t.card);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function ye(e, t, n) {
|
|
128
128
|
return n && t === n ? !0 : !O(e).some(
|
|
129
129
|
(r) => r.cardId === t
|
|
130
130
|
);
|
|
131
131
|
}
|
|
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) ?
|
|
132
|
+
function be(e) {
|
|
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) ? z.includes(e.toLowerCase()) ? {
|
|
134
134
|
isValid: !1,
|
|
135
135
|
error: `"${e}" is a reserved keyword and cannot be used`
|
|
136
136
|
} : { isValid: !0 } : {
|
|
@@ -141,23 +141,23 @@ function ye(e) {
|
|
|
141
141
|
error: "Card ID can only contain letters, numbers, hyphens, and underscores"
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function ge(e, t) {
|
|
145
145
|
var n;
|
|
146
|
-
return (n =
|
|
146
|
+
return (n = K(e, t)) == null ? void 0 : n.card;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function K(e, t) {
|
|
149
149
|
for (const n of m(e))
|
|
150
150
|
if (n.card.id === t)
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Se(e, t) {
|
|
154
154
|
for (const n of e.sheets || [])
|
|
155
155
|
for (const r of n.frames || [])
|
|
156
156
|
for (const a of r.cards || [])
|
|
157
157
|
if (a.id === t)
|
|
158
158
|
return { card: a, sheet: n };
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const y = {
|
|
161
161
|
includeMetricFilterDatasets: !0,
|
|
162
162
|
preferQualifiedIdentity: !1
|
|
163
163
|
};
|
|
@@ -172,12 +172,12 @@ function M(e) {
|
|
|
172
172
|
label: e.label
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function U(e) {
|
|
176
176
|
var n;
|
|
177
177
|
const t = M(e.source);
|
|
178
178
|
return t ? `${(n = e.source) == null ? void 0 : n.kind}:${t.qualifiedEntityName || t.entityName}` : "";
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Q(e) {
|
|
181
181
|
return [
|
|
182
182
|
e.id,
|
|
183
183
|
e.qualifiedEntityName,
|
|
@@ -187,33 +187,33 @@ function U(e) {
|
|
|
187
187
|
e.name,
|
|
188
188
|
// Source-only fields from different datasets can otherwise share a key
|
|
189
189
|
// and the second dataset would be silently dropped.
|
|
190
|
-
|
|
190
|
+
U(e)
|
|
191
191
|
].join("|");
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function G(e) {
|
|
194
194
|
return [e.entityName, e.qualifiedEntityName || "", e.entityId || ""].join("|");
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Ie(e) {
|
|
197
197
|
return e.entityName || e.qualifiedEntityName || "";
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Y(e) {
|
|
200
200
|
var t, n;
|
|
201
201
|
return !!(e.expression || e.derivedField || (n = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && n.length);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return
|
|
203
|
+
function W(e) {
|
|
204
|
+
return x(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || Y(e);
|
|
205
205
|
}
|
|
206
206
|
function I(e, t) {
|
|
207
|
-
const n =
|
|
207
|
+
const n = G(t);
|
|
208
208
|
e.found.has(n) || e.found.set(n, t);
|
|
209
209
|
}
|
|
210
210
|
function p(e, t) {
|
|
211
|
-
var
|
|
211
|
+
var c, w, D;
|
|
212
212
|
if (!e) return;
|
|
213
|
-
const n =
|
|
213
|
+
const n = Q(e);
|
|
214
214
|
if (t.visitedFields.has(n)) return;
|
|
215
215
|
t.visitedFields.add(n);
|
|
216
|
-
const r =
|
|
216
|
+
const r = W(e);
|
|
217
217
|
if (!r) {
|
|
218
218
|
const f = !e.entityName && !e.qualifiedEntityName ? M(e.source) : void 0;
|
|
219
219
|
I(
|
|
@@ -228,7 +228,7 @@ function p(e, t) {
|
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
}
|
|
231
|
-
t.includeMetricFilterDatasets && "parameters" in e && ((
|
|
231
|
+
t.includeMetricFilterDatasets && "parameters" in e && ((c = e.parameters) != null && c.filters) && E(e.parameters.filters, t);
|
|
232
232
|
const a = (w = e.calculatedFormula) == null ? void 0 : w.inputFields, i = !!(a && a.length > 0);
|
|
233
233
|
i && a.forEach((f) => p(f, t));
|
|
234
234
|
let s = !1, o = !1;
|
|
@@ -251,7 +251,7 @@ function p(e, t) {
|
|
|
251
251
|
label: l.label
|
|
252
252
|
});
|
|
253
253
|
else {
|
|
254
|
-
const k = [l.databaseName, l.schemaName, l.tableName].filter((
|
|
254
|
+
const k = [l.databaseName, l.schemaName, l.tableName].filter((v) => !!(v && v.trim())).join(".");
|
|
255
255
|
I(t, {
|
|
256
256
|
entityName: l.tableName,
|
|
257
257
|
qualifiedEntityName: k.includes(".") ? k : void 0,
|
|
@@ -285,45 +285,45 @@ function N(e, t) {
|
|
|
285
285
|
const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
|
|
286
286
|
return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Ce(e) {
|
|
289
289
|
const t = b(!1);
|
|
290
290
|
return p(e, t), { datasets: Array.from(t.found.values()), complete: t.complete };
|
|
291
291
|
}
|
|
292
|
-
function V(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a =
|
|
293
|
-
const i = { ...
|
|
292
|
+
function V(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = y) {
|
|
293
|
+
const i = { ...y, ...a }, s = b(i.includeMetricFilterDatasets, n, r);
|
|
294
294
|
p(e, s), s.found.forEach((o) => {
|
|
295
295
|
const u = N(o, i.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
296
296
|
u && t.add(u);
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Ee(e, t) {
|
|
300
300
|
V(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
|
|
301
301
|
preferQualifiedIdentity: !0
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function Ne(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
305
305
|
const a = b(!0, n, r);
|
|
306
306
|
p(e, a), a.found.forEach((i) => {
|
|
307
307
|
const s = N(i, "qualifiedOnly");
|
|
308
308
|
s && t.add(s);
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function we(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
312
312
|
V(e, t, n, r, {
|
|
313
313
|
includeMetricFilterDatasets: !1
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
const i = { ...
|
|
316
|
+
function De(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = y) {
|
|
317
|
+
const i = { ...y, ...a }, s = b(i.includeMetricFilterDatasets, n, r);
|
|
318
318
|
E(e, s), s.found.forEach((o) => {
|
|
319
319
|
const u = N(o, i.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
320
320
|
u && t.add(u);
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function ke(e, t) {
|
|
324
324
|
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
325
|
}
|
|
326
|
-
const
|
|
326
|
+
const J = {
|
|
327
327
|
date: /* @__PURE__ */ new Set([
|
|
328
328
|
"between",
|
|
329
329
|
"not between",
|
|
@@ -362,14 +362,14 @@ const W = {
|
|
|
362
362
|
]),
|
|
363
363
|
boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
|
|
364
364
|
};
|
|
365
|
-
function
|
|
366
|
-
const t =
|
|
365
|
+
function Z(e) {
|
|
366
|
+
const t = P(e);
|
|
367
367
|
return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
return typeof t != "string" ? !1 :
|
|
369
|
+
function ve(e, t) {
|
|
370
|
+
return typeof t != "string" ? !1 : J[Z(e)].has(t);
|
|
371
371
|
}
|
|
372
|
-
const
|
|
372
|
+
const Fe = /* @__PURE__ */ new Set([
|
|
373
373
|
"=",
|
|
374
374
|
">",
|
|
375
375
|
"<",
|
|
@@ -385,10 +385,19 @@ const ke = /* @__PURE__ */ new Set([
|
|
|
385
385
|
"is null",
|
|
386
386
|
"is not null"
|
|
387
387
|
]);
|
|
388
|
-
function
|
|
388
|
+
function H(e, t) {
|
|
389
389
|
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
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Te(e, t, n, r) {
|
|
392
|
+
if (B(e.relativeMeta)) {
|
|
393
|
+
r.push(
|
|
394
|
+
`${n}.relativeMeta counts back from the latest data; a dashboard filter's dates run to now. Use a period counted back from today.`
|
|
395
|
+
);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
X(e.operation, e.values, t, `${n}.values`, r);
|
|
399
|
+
}
|
|
400
|
+
function X(e, t, n, r, a) {
|
|
392
401
|
if (e === "is null" || e === "is not null") {
|
|
393
402
|
t.length !== 0 && a.push(`${r} must be empty for null filter operations.`);
|
|
394
403
|
return;
|
|
@@ -414,29 +423,29 @@ function Fe(e, t, n, r, a) {
|
|
|
414
423
|
return;
|
|
415
424
|
}
|
|
416
425
|
for (const i of t)
|
|
417
|
-
if (!
|
|
426
|
+
if (!H(i, n)) {
|
|
418
427
|
a.push(
|
|
419
428
|
`${r} contains a value that is incompatible with valueType '${n}'.`
|
|
420
429
|
);
|
|
421
430
|
return;
|
|
422
431
|
}
|
|
423
432
|
}
|
|
424
|
-
const
|
|
433
|
+
const Ae = {
|
|
425
434
|
database: null,
|
|
426
435
|
schema: null,
|
|
427
436
|
table: null
|
|
428
|
-
},
|
|
437
|
+
}, _e = "__card_default__", L = {
|
|
429
438
|
bookmarksPerViewerPerDashboard: 20,
|
|
430
439
|
bookmarkNameMaxChars: 100,
|
|
431
440
|
columnLabelMaxChars: 120,
|
|
432
441
|
tableSettingsMaxBytes: 65536,
|
|
433
442
|
rememberedTableSettingsMaxBytes: 262144,
|
|
434
443
|
bookmarkStateMaxBytes: 65536
|
|
435
|
-
},
|
|
436
|
-
function
|
|
444
|
+
}, ee = 1;
|
|
445
|
+
function Oe(e) {
|
|
437
446
|
return new TextEncoder().encode(JSON.stringify(e ?? null)).length;
|
|
438
447
|
}
|
|
439
|
-
function
|
|
448
|
+
function te(e) {
|
|
440
449
|
const t = encodeURIComponent;
|
|
441
450
|
switch (e.kind) {
|
|
442
451
|
case "dimension":
|
|
@@ -449,7 +458,7 @@ function X(e) {
|
|
|
449
458
|
return `result:${t(e.key)}`;
|
|
450
459
|
}
|
|
451
460
|
}
|
|
452
|
-
function
|
|
461
|
+
function h(e) {
|
|
453
462
|
if (e)
|
|
454
463
|
try {
|
|
455
464
|
return decodeURIComponent(e);
|
|
@@ -457,33 +466,33 @@ function y(e) {
|
|
|
457
466
|
return;
|
|
458
467
|
}
|
|
459
468
|
}
|
|
460
|
-
function
|
|
469
|
+
function ne(e) {
|
|
461
470
|
if (typeof e != "string") return;
|
|
462
471
|
const t = e.split(":");
|
|
463
472
|
let n;
|
|
464
473
|
if (t[0] === "dim" && t.length === 3) {
|
|
465
|
-
const r = t[1], a =
|
|
474
|
+
const r = t[1], a = h(t[2]);
|
|
466
475
|
(r === "detail" || r === "groupby") && a && (n = { kind: "dimension", role: r, fieldId: a });
|
|
467
476
|
} else if (t[0] === "metric" && t.length === 3) {
|
|
468
|
-
const r =
|
|
477
|
+
const r = h(t[1]), a = h(t[2]);
|
|
469
478
|
r && a && (n = { kind: "metric", metricId: r, metricAlias: a });
|
|
470
479
|
} else if (t[0] === "result" && t.length === 2) {
|
|
471
|
-
const r =
|
|
480
|
+
const r = h(t[1]);
|
|
472
481
|
r && (n = { kind: "result", key: r });
|
|
473
482
|
}
|
|
474
|
-
return n &&
|
|
483
|
+
return n && te(n) === e ? n : void 0;
|
|
475
484
|
}
|
|
476
485
|
function C(e) {
|
|
477
|
-
return typeof e == "string" &&
|
|
486
|
+
return typeof e == "string" && ne(e) !== void 0;
|
|
478
487
|
}
|
|
479
|
-
const A =
|
|
488
|
+
const A = d.array(d.string()).max(2e3), re = d.object({
|
|
480
489
|
order: A.optional(),
|
|
481
490
|
hidden: A.optional(),
|
|
482
|
-
labels:
|
|
483
|
-
sort:
|
|
484
|
-
|
|
485
|
-
columnId:
|
|
486
|
-
direction:
|
|
491
|
+
labels: d.record(d.string(), d.string().max(L.columnLabelMaxChars)).optional(),
|
|
492
|
+
sort: d.array(
|
|
493
|
+
d.object({
|
|
494
|
+
columnId: d.string(),
|
|
495
|
+
direction: d.enum(["asc", "desc"])
|
|
487
496
|
}).strict()
|
|
488
497
|
).max(2e3).optional()
|
|
489
498
|
}).strict();
|
|
@@ -497,11 +506,11 @@ function q(e) {
|
|
|
497
506
|
if (!e) return;
|
|
498
507
|
const t = e.order ? _(e.order) : void 0, n = e.hidden ? _(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
|
|
499
508
|
([o, u]) => {
|
|
500
|
-
const
|
|
501
|
-
return C(o) &&
|
|
509
|
+
const c = typeof u == "string" ? u.trim() : "";
|
|
510
|
+
return C(o) && c ? [
|
|
502
511
|
[
|
|
503
512
|
o,
|
|
504
|
-
|
|
513
|
+
c.slice(0, L.columnLabelMaxChars)
|
|
505
514
|
]
|
|
506
515
|
] : [];
|
|
507
516
|
}
|
|
@@ -511,95 +520,95 @@ function q(e) {
|
|
|
511
520
|
direction: u
|
|
512
521
|
}))), Object.keys(s).length ? s : void 0;
|
|
513
522
|
}
|
|
514
|
-
function
|
|
523
|
+
function ae(e) {
|
|
515
524
|
return q(e) === void 0;
|
|
516
525
|
}
|
|
517
|
-
function
|
|
518
|
-
if (t !==
|
|
526
|
+
function ie(e, t) {
|
|
527
|
+
if (t !== ee)
|
|
519
528
|
return {
|
|
520
529
|
ok: !1,
|
|
521
530
|
error: `Unsupported table settings version ${t}.`
|
|
522
531
|
};
|
|
523
|
-
const n =
|
|
532
|
+
const n = re.safeParse(e);
|
|
524
533
|
return n.success ? {
|
|
525
534
|
ok: !0,
|
|
526
535
|
value: q(n.data) ?? {}
|
|
527
536
|
} : { ok: !1, error: "Table settings are invalid." };
|
|
528
537
|
}
|
|
529
|
-
function
|
|
538
|
+
function $e(e, t, n) {
|
|
530
539
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
531
540
|
const r = {};
|
|
532
541
|
for (const [a, i] of Object.entries(
|
|
533
542
|
e
|
|
534
543
|
)) {
|
|
535
544
|
if (!n.has(a)) continue;
|
|
536
|
-
const s =
|
|
537
|
-
s.ok && !
|
|
545
|
+
const s = ie(i, t);
|
|
546
|
+
s.ok && !ae(s.value) && (r[a] = s.value);
|
|
538
547
|
}
|
|
539
548
|
return r;
|
|
540
549
|
}
|
|
541
|
-
const
|
|
550
|
+
const se = /* @__PURE__ */ new Set([
|
|
542
551
|
"table",
|
|
543
552
|
"detailTable"
|
|
544
553
|
]);
|
|
545
|
-
function
|
|
546
|
-
return
|
|
554
|
+
function R(e) {
|
|
555
|
+
return se.has(e.type);
|
|
547
556
|
}
|
|
548
|
-
function
|
|
557
|
+
function oe(e) {
|
|
549
558
|
var t, n;
|
|
550
|
-
return
|
|
559
|
+
return R(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
|
|
551
560
|
}
|
|
552
|
-
function
|
|
561
|
+
function Me(e) {
|
|
553
562
|
return new Set(
|
|
554
|
-
m(e).filter(({ card: t }) =>
|
|
563
|
+
m(e).filter(({ card: t }) => R(t)).map(({ card: t }) => t.id)
|
|
555
564
|
);
|
|
556
565
|
}
|
|
557
|
-
function
|
|
566
|
+
function Ve(e) {
|
|
558
567
|
return new Set(
|
|
559
|
-
m(e).filter(({ card: t }) =>
|
|
568
|
+
m(e).filter(({ card: t }) => oe(t)).map(({ card: t }) => t.id)
|
|
560
569
|
);
|
|
561
570
|
}
|
|
562
571
|
export {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
+
fe as A,
|
|
573
|
+
me as B,
|
|
574
|
+
_e as C,
|
|
575
|
+
Fe as D,
|
|
576
|
+
Ae as E,
|
|
577
|
+
Z as F,
|
|
578
|
+
ve as G,
|
|
579
|
+
K as H,
|
|
580
|
+
he as I,
|
|
572
581
|
m as J,
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
582
|
+
ge as K,
|
|
583
|
+
pe as L,
|
|
584
|
+
ye as M,
|
|
585
|
+
be as N,
|
|
586
|
+
Se as O,
|
|
578
587
|
L as V,
|
|
579
|
-
|
|
580
|
-
|
|
588
|
+
Ie as a,
|
|
589
|
+
Ee as b,
|
|
581
590
|
V as c,
|
|
582
591
|
M as d,
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
+
Ne as e,
|
|
593
|
+
we as f,
|
|
594
|
+
De as g,
|
|
595
|
+
ke as h,
|
|
596
|
+
ee as i,
|
|
597
|
+
ae as j,
|
|
598
|
+
ie as k,
|
|
599
|
+
$e as l,
|
|
600
|
+
Oe as m,
|
|
592
601
|
q as n,
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
602
|
+
R as o,
|
|
603
|
+
ne as p,
|
|
604
|
+
oe as q,
|
|
605
|
+
Ce as r,
|
|
606
|
+
Me as s,
|
|
607
|
+
te as t,
|
|
608
|
+
Ve as u,
|
|
609
|
+
Te as v,
|
|
601
610
|
O as w,
|
|
602
|
-
|
|
611
|
+
F as x,
|
|
603
612
|
T as y,
|
|
604
|
-
|
|
613
|
+
j as z
|
|
605
614
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as fe, C as Se } from "./x-4f5U2XwU.js";
|
|
2
2
|
import { useEffect as K, forwardRef as nt, useMemo as H, useState as M, useRef as ne, useCallback as A, Fragment as st } from "react";
|
|
3
|
-
import { a3 as qe, a4 as ot, aK as dt, u as it, i as ct, aL as ut, aM as mt, aN as De, aO as pt, aP as ft, aQ as ze, aR as Me, aS as ht, aT as gt, aU as bt, aV as xt, aW as vt, aX as yt, aY as Ct } from "./semaphor-ready-indicator-
|
|
3
|
+
import { a3 as qe, a4 as ot, aK as dt, u as it, i as ct, aL as ut, aM as mt, aN as De, aO as pt, aP as ft, aQ as ze, aR as Me, aS as ht, aT as gt, aU as bt, aV as xt, aW as vt, aX as yt, aY as Ct } from "./semaphor-ready-indicator-CRm17oIP.js";
|
|
4
4
|
import { jsx as t, jsxs as o, Fragment as X } from "react/jsx-runtime";
|
|
5
5
|
import "./index-CuHybtft.js";
|
|
6
6
|
import "./validators-C-aOQlTB.js";
|
|
@@ -10,7 +10,7 @@ import "zod";
|
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
11
|
import { c as R } from "./_commonjsHelpers-DimLPMtv.js";
|
|
12
12
|
import { m as Re, n as je, o as Be, p as $e, x as Ue, B as E, l as z, q as Qe, r as se, s as oe, t as de, u as ie, v as ce } from "./switch-CEBOR4n7.js";
|
|
13
|
-
import { c as kt, e as Nt, f as G, h as we, j as Te, k as ue, l as me, m as St, o as Dt, p as _e, q as wt, t as Tt, u as J, w as _t, x as Ve, y as Ye, z as He, A as Xe, B as Ge, C as Vt, I as Lt, D as Le, E as Et, F as Ee, G as It, H as At, J as Ft, K as Ot, L as pe } from "./global-date-filter-utils-
|
|
13
|
+
import { c as kt, e as Nt, f as G, h as we, j as Te, k as ue, l as me, m as St, o as Dt, p as _e, q as wt, t as Tt, u as J, w as _t, x as Ve, y as Ye, z as He, A as Xe, B as Ge, C as Vt, I as Lt, D as Le, E as Et, F as Ee, G as It, H as At, J as Ft, K as Ot, L as pe } from "./global-date-filter-utils-BhAu8zIM.js";
|
|
14
14
|
import { C as Ie } from "./selection-reducer-CJzkTZio.js";
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.453.0 - ISC
|
package/dist/dashboard/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as o } from "../chunks/dashboard-
|
|
2
|
-
import { C as s, E as C } from "../chunks/table-settings-
|
|
1
|
+
import { D as o } from "../chunks/dashboard-DCk26-6i.js";
|
|
2
|
+
import { C as s, E as C } from "../chunks/table-settings-WysCBj62.js";
|
|
3
3
|
export {
|
|
4
4
|
s as CONTROL_CARD_DEFAULT_VALUE,
|
|
5
5
|
o as Dashboard,
|