react-semaphor 0.1.560 → 0.1.561
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 +353 -349
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-CB3oFAXk.js} +199 -171
- package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-DiVHY3Hw.js} +27 -28
- package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
- package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
- package/dist/chunks/{braces-Da41xfUd.js → braces-u8VorWJc.js} +1 -1
- package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-DDsIWJYT.js} +108 -108
- package/dist/chunks/{context-BgPDzLHZ.js → context-TUjw9eqr.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-Dz-enUNR.js → custom-visual-inputs-DfolidZ9.js} +1 -1
- package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-BRdZBPqr.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-CgvTLndW.js} +161 -162
- package/dist/chunks/{dashboard-controls-Bi7fyG-4.js → dashboard-controls-B4vfSzTF.js} +881 -945
- package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-Y3MF59g7.js} +5 -5
- package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
- package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-DwjZcxj-.js} +6112 -6146
- package/dist/chunks/{filter-reach-copy-BF4w4kI2.js → filter-reach-copy-bijwf_-b.js} +1250 -1392
- package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-DFnhwuEW.js} +3 -3
- package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
- package/dist/chunks/{index-DtHidOPV.js → index-ClwbY3BL.js} +197 -198
- package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-CtvCBfOm.js} +1 -1
- package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BklYgciR.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
- package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CUorIB7Q.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-BSiGEXVC.js} +255 -248
- package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-95aC0uEO.js} +6 -6
- package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-B5wQhg5G.js} +1 -1
- package/dist/chunks/{palette-Bsh376zO.js → palette-DTnMhipt.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
- package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-olvXJoB9.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C2YUIwKG.js} +14 -14
- package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-DoIUr3MP.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
- package/dist/chunks/{save-B5EAsgQF.js → save-DH4RyrnG.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-8jqfI7hI.js} +12 -12
- package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-CV7K4FI6.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-E2XWyibu.js} +30253 -31076
- package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-C29EUzDp.js} +7 -7
- package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
- package/dist/chunks/{switch-ByxH4M7t.js → switch-balDSHc7.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-CK8tvh4d.js} +1 -1
- package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
- package/dist/chunks/{token-types-CQtXUVMy.js → token-types-DhYH5YKb.js} +1 -1
- package/dist/chunks/{upload-wbR-NVzq.js → upload-Ufj8vjyn.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
- package/dist/chunks/{validators-CXTneCA4.js → validators-BtaCFIEB.js} +37 -37
- package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2400 -1856
- package/dist/data-app-sdk/index.js +20 -20
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +10 -10
- package/dist/format-utils/index.js +257 -256
- package/dist/index.js +214 -215
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
- package/dist/types/index.js +50 -51
- package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
- package/dist/types/lib/stores/editor-store.d.ts +9 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +10 -0
- package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
- package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +539 -22
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
- package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
- package/dist/types/shared/format-utils/raw-temporal.d.ts +16 -0
- package/package.json +2 -2
- package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
- package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
- package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
- package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
- package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
- package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
- package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
- package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
|
@@ -0,0 +1,743 @@
|
|
|
1
|
+
import { k as Y, u as W, aj as H } from "./validators-BtaCFIEB.js";
|
|
2
|
+
import { z as c } from "zod";
|
|
3
|
+
import { E as J, u as Z } from "./matrix-operation-contract-BSiGEXVC.js";
|
|
4
|
+
import { d as X } from "./metric-comparison-95aC0uEO.js";
|
|
5
|
+
import "./analytics-base-schemas-CB3oFAXk.js";
|
|
6
|
+
const _ = 8, V = 6, v = Object.freeze([]);
|
|
7
|
+
function ee(e) {
|
|
8
|
+
switch (e.type) {
|
|
9
|
+
case "table":
|
|
10
|
+
case "chart":
|
|
11
|
+
return e.card ? [e.card] : v;
|
|
12
|
+
case "kpi":
|
|
13
|
+
return Array.isArray(e.cards) ? e.cards : v;
|
|
14
|
+
default:
|
|
15
|
+
return v;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function te(e, t) {
|
|
19
|
+
switch (e.type) {
|
|
20
|
+
case "table":
|
|
21
|
+
case "chart": {
|
|
22
|
+
if (!e.card) return e;
|
|
23
|
+
const n = t(e.card);
|
|
24
|
+
return n === e.card ? e : { ...e, card: n };
|
|
25
|
+
}
|
|
26
|
+
case "kpi": {
|
|
27
|
+
if (!Array.isArray(e.cards)) return e;
|
|
28
|
+
const n = e.cards.map(t);
|
|
29
|
+
return n.every((r, i) => r === e.cards[i]) ? e : { ...e, cards: n };
|
|
30
|
+
}
|
|
31
|
+
default:
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function L(e) {
|
|
36
|
+
var n;
|
|
37
|
+
const t = [];
|
|
38
|
+
for (const r of e.sheets || []) {
|
|
39
|
+
const i = r.id;
|
|
40
|
+
for (const s of r.cards || [])
|
|
41
|
+
t.push({ kind: "sheetCard", sheetId: i, cardId: s.id, card: s });
|
|
42
|
+
for (const s of r.frames || [])
|
|
43
|
+
for (const a of s.cards || [])
|
|
44
|
+
t.push({
|
|
45
|
+
kind: "frameCard",
|
|
46
|
+
sheetId: i,
|
|
47
|
+
frameId: s.id,
|
|
48
|
+
cardId: a.id,
|
|
49
|
+
card: a
|
|
50
|
+
});
|
|
51
|
+
for (const s of ((n = r.document) == null ? void 0 : n.sections) || [])
|
|
52
|
+
for (const a of ee(s))
|
|
53
|
+
t.push({
|
|
54
|
+
kind: "documentSectionCard",
|
|
55
|
+
sheetId: i,
|
|
56
|
+
sectionId: s.id,
|
|
57
|
+
cardId: a.id,
|
|
58
|
+
card: a
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return t;
|
|
62
|
+
}
|
|
63
|
+
function Fe(e, t) {
|
|
64
|
+
const n = (i, s) => {
|
|
65
|
+
const a = i.map((o) => t(o, s(o)));
|
|
66
|
+
return a.every((o, u) => o === i[u]) ? i : a;
|
|
67
|
+
}, r = (e.sheets || []).map((i) => {
|
|
68
|
+
var b, p, f;
|
|
69
|
+
const s = i.id, a = i.cards && n(i.cards, (d) => ({ kind: "sheetCard", sheetId: s, cardId: d.id, card: d })), o = (b = i.frames) == null ? void 0 : b.map((d) => {
|
|
70
|
+
if (!d.cards) return d;
|
|
71
|
+
const m = n(d.cards, (F) => ({ kind: "frameCard", sheetId: s, frameId: d.id, cardId: F.id, card: F }));
|
|
72
|
+
return m === d.cards ? d : { ...d, cards: m };
|
|
73
|
+
}), u = (f = (p = i.document) == null ? void 0 : p.sections) == null ? void 0 : f.map(
|
|
74
|
+
(d) => te(d, (m) => t(m, { kind: "documentSectionCard", sheetId: s, sectionId: d.id, cardId: m.id, card: m }))
|
|
75
|
+
), l = !!o && o.some((d, m) => d !== i.frames[m]), h = !!u && u.some((d, m) => d !== i.document.sections[m]);
|
|
76
|
+
return a === i.cards && !l && !h ? i : {
|
|
77
|
+
...i,
|
|
78
|
+
...a === i.cards ? {} : { cards: a },
|
|
79
|
+
...l ? { frames: o } : {},
|
|
80
|
+
...h ? { document: { ...i.document, sections: u } } : {}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
return r.every((i, s) => i === e.sheets[s]) ? e : { ...e, sheets: r };
|
|
84
|
+
}
|
|
85
|
+
function E(e) {
|
|
86
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
87
|
+
}
|
|
88
|
+
function _e(e) {
|
|
89
|
+
if (!E(e))
|
|
90
|
+
return [{ path: "", message: "must be an object." }];
|
|
91
|
+
const t = [];
|
|
92
|
+
e.title !== void 0 && typeof e.title != "string" && t.push({ path: "title", message: "must be a string." });
|
|
93
|
+
const n = e.cards;
|
|
94
|
+
if (!Array.isArray(n))
|
|
95
|
+
t.push({ path: "cards", message: "must be an array of KPI cards." });
|
|
96
|
+
else {
|
|
97
|
+
(n.length < 1 || n.length > _) && t.push({
|
|
98
|
+
path: "cards",
|
|
99
|
+
message: `must hold 1 to ${_} KPI cards.`
|
|
100
|
+
});
|
|
101
|
+
const i = /* @__PURE__ */ new Set();
|
|
102
|
+
n.forEach((s, a) => {
|
|
103
|
+
if (!E(s)) {
|
|
104
|
+
t.push({ path: `cards[${a}]`, message: "must be a card." });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
typeof s.id != "string" || !s.id ? t.push({
|
|
108
|
+
path: `cards[${a}].id`,
|
|
109
|
+
message: "must be a non-empty string."
|
|
110
|
+
}) : i.has(s.id) ? t.push({
|
|
111
|
+
path: `cards[${a}].id`,
|
|
112
|
+
message: `duplicates card id '${s.id}'.`
|
|
113
|
+
}) : i.add(s.id), s.type !== "kpi" && t.push({ path: `cards[${a}].type`, message: "must be 'kpi'." });
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const r = e.kpi;
|
|
117
|
+
return E(r) ? (r.layout !== "tiles" && r.layout !== "lines" ? t.push({
|
|
118
|
+
path: "kpi.layout",
|
|
119
|
+
message: "must be 'tiles' or 'lines'."
|
|
120
|
+
}) : r.layout === "tiles" && Array.isArray(n) && n.length > V && t.push({
|
|
121
|
+
path: "kpi.layout",
|
|
122
|
+
message: `must be 'lines' for more than ${V} KPI cards.`
|
|
123
|
+
}), 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;
|
|
124
|
+
}
|
|
125
|
+
const ne = ["new", "edit", "delete", "create", "update", "remove"];
|
|
126
|
+
function B(e, t) {
|
|
127
|
+
return (e.sheets || []).flatMap(
|
|
128
|
+
(n) => L({ sheets: [n] }).filter(t).map((r) => ({
|
|
129
|
+
card: r.card,
|
|
130
|
+
sheet: n,
|
|
131
|
+
...r.kind === "frameCard" && { frameId: r.frameId },
|
|
132
|
+
...r.kind === "documentSectionCard" && {
|
|
133
|
+
sectionId: r.sectionId
|
|
134
|
+
}
|
|
135
|
+
}))
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function S(e) {
|
|
139
|
+
return B(e, (t) => t.kind !== "documentSectionCard");
|
|
140
|
+
}
|
|
141
|
+
function Ve(e) {
|
|
142
|
+
return [
|
|
143
|
+
...S(e),
|
|
144
|
+
...B(e, (t) => t.kind === "documentSectionCard")
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
function $e(e) {
|
|
148
|
+
return S(e).map((t) => t.card);
|
|
149
|
+
}
|
|
150
|
+
function Re(e, t, n) {
|
|
151
|
+
return n && t === n ? !0 : !L(e).some(
|
|
152
|
+
(r) => r.cardId === t
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
function Me(e) {
|
|
156
|
+
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) ? ne.includes(e.toLowerCase()) ? {
|
|
157
|
+
isValid: !1,
|
|
158
|
+
error: `"${e}" is a reserved keyword and cannot be used`
|
|
159
|
+
} : { isValid: !0 } : {
|
|
160
|
+
isValid: !1,
|
|
161
|
+
error: "Card ID must start with a letter or number"
|
|
162
|
+
} : {
|
|
163
|
+
isValid: !1,
|
|
164
|
+
error: "Card ID can only contain letters, numbers, hyphens, and underscores"
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function Le(e, t) {
|
|
168
|
+
var n;
|
|
169
|
+
return (n = re(e, t)) == null ? void 0 : n.card;
|
|
170
|
+
}
|
|
171
|
+
function re(e, t) {
|
|
172
|
+
for (const n of S(e))
|
|
173
|
+
if (n.card.id === t)
|
|
174
|
+
return n;
|
|
175
|
+
}
|
|
176
|
+
function Be(e, t) {
|
|
177
|
+
for (const n of e.sheets || [])
|
|
178
|
+
for (const r of n.frames || [])
|
|
179
|
+
for (const i of r.cards || [])
|
|
180
|
+
if (i.id === t)
|
|
181
|
+
return { card: i, sheet: n };
|
|
182
|
+
}
|
|
183
|
+
const k = {
|
|
184
|
+
includeMetricFilterDatasets: !0,
|
|
185
|
+
preferQualifiedIdentity: !1
|
|
186
|
+
};
|
|
187
|
+
function P(e) {
|
|
188
|
+
if (!e) return;
|
|
189
|
+
if (e.kind === "semantic")
|
|
190
|
+
return { entityName: e.datasetName, entityId: e.datasetId, label: e.label };
|
|
191
|
+
const t = [e.databaseName, e.schemaName, e.tableName].filter((n) => !!(n && n.trim())).join(".");
|
|
192
|
+
return {
|
|
193
|
+
entityName: e.tableName,
|
|
194
|
+
qualifiedEntityName: t.includes(".") ? t : void 0,
|
|
195
|
+
label: e.label
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function ie(e) {
|
|
199
|
+
var n;
|
|
200
|
+
const t = P(e.source);
|
|
201
|
+
return t ? `${(n = e.source) == null ? void 0 : n.kind}:${t.qualifiedEntityName || t.entityName}` : "";
|
|
202
|
+
}
|
|
203
|
+
function se(e) {
|
|
204
|
+
return [
|
|
205
|
+
e.id,
|
|
206
|
+
e.qualifiedEntityName,
|
|
207
|
+
e.entityId,
|
|
208
|
+
e.entityName,
|
|
209
|
+
e.qualifiedFieldName,
|
|
210
|
+
e.name,
|
|
211
|
+
// Source-only fields from different datasets can otherwise share a key
|
|
212
|
+
// and the second dataset would be silently dropped.
|
|
213
|
+
ie(e)
|
|
214
|
+
].join("|");
|
|
215
|
+
}
|
|
216
|
+
function ae(e) {
|
|
217
|
+
return [e.entityName, e.qualifiedEntityName || "", e.entityId || ""].join("|");
|
|
218
|
+
}
|
|
219
|
+
function Pe(e) {
|
|
220
|
+
return e.entityName || e.qualifiedEntityName || "";
|
|
221
|
+
}
|
|
222
|
+
function oe(e) {
|
|
223
|
+
var t, n;
|
|
224
|
+
return !!(e.expression || e.derivedField || (n = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && n.length);
|
|
225
|
+
}
|
|
226
|
+
function ce(e) {
|
|
227
|
+
return Y(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || oe(e);
|
|
228
|
+
}
|
|
229
|
+
function w(e, t) {
|
|
230
|
+
const n = ae(t);
|
|
231
|
+
e.found.has(n) || e.found.set(n, t);
|
|
232
|
+
}
|
|
233
|
+
function I(e, t) {
|
|
234
|
+
var l, h, b;
|
|
235
|
+
if (!e) return;
|
|
236
|
+
const n = se(e);
|
|
237
|
+
if (t.visitedFields.has(n)) return;
|
|
238
|
+
t.visitedFields.add(n);
|
|
239
|
+
const r = ce(e);
|
|
240
|
+
if (!r) {
|
|
241
|
+
const p = !e.entityName && !e.qualifiedEntityName ? P(e.source) : void 0;
|
|
242
|
+
w(
|
|
243
|
+
t,
|
|
244
|
+
p || {
|
|
245
|
+
// May be empty for qualified-only metadata; identity then comes from
|
|
246
|
+
// `qualifiedEntityName` (see `identityFor` and the calculator).
|
|
247
|
+
entityName: e.entityName || "",
|
|
248
|
+
entityId: e.entityId,
|
|
249
|
+
qualifiedEntityName: e.qualifiedEntityName,
|
|
250
|
+
label: e.source && e.source.kind === "semantic" ? e.source.label : void 0
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
t.includeMetricFilterDatasets && "parameters" in e && ((l = e.parameters) != null && l.filters) && O(e.parameters.filters, t);
|
|
255
|
+
const i = (h = e.calculatedFormula) == null ? void 0 : h.inputFields, s = !!(i && i.length > 0);
|
|
256
|
+
s && i.forEach((p) => I(p, t));
|
|
257
|
+
let a = !1, o = !1;
|
|
258
|
+
const u = s || (b = e.derivedField) == null ? void 0 : b.inputs;
|
|
259
|
+
if (u && Object.keys(u).length > 0)
|
|
260
|
+
for (const p of Object.values(u)) {
|
|
261
|
+
const f = p.field.source;
|
|
262
|
+
if (!f) {
|
|
263
|
+
s || (o = !0);
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
if (f.kind === "sql") {
|
|
267
|
+
o = !0;
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
if (f.kind === "semantic")
|
|
271
|
+
w(t, {
|
|
272
|
+
entityName: f.datasetName,
|
|
273
|
+
entityId: f.datasetId,
|
|
274
|
+
label: f.label
|
|
275
|
+
});
|
|
276
|
+
else {
|
|
277
|
+
const d = [f.databaseName, f.schemaName, f.tableName].filter((m) => !!(m && m.trim())).join(".");
|
|
278
|
+
w(t, {
|
|
279
|
+
entityName: f.tableName,
|
|
280
|
+
qualifiedEntityName: d.includes(".") ? d : void 0,
|
|
281
|
+
label: f.label
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
a = !0;
|
|
285
|
+
}
|
|
286
|
+
o && (t.complete = !1), r && !s && !a && (t.complete = !1);
|
|
287
|
+
}
|
|
288
|
+
function O(e, t) {
|
|
289
|
+
if (e && !t.visitedGroups.has(e.id)) {
|
|
290
|
+
t.visitedGroups.add(e.id);
|
|
291
|
+
for (const n of e.conditions || [])
|
|
292
|
+
I(n.field, t);
|
|
293
|
+
for (const n of e.groups || [])
|
|
294
|
+
O(n, t);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function C(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
|
|
298
|
+
return {
|
|
299
|
+
found: /* @__PURE__ */ new Map(),
|
|
300
|
+
complete: !0,
|
|
301
|
+
visitedFields: t,
|
|
302
|
+
visitedGroups: n,
|
|
303
|
+
includeMetricFilterDatasets: e
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function A(e, t) {
|
|
307
|
+
var r;
|
|
308
|
+
const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
|
|
309
|
+
return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
|
|
310
|
+
}
|
|
311
|
+
function qe(e) {
|
|
312
|
+
const t = C(!1);
|
|
313
|
+
return I(e, t), { datasets: Array.from(t.found.values()), complete: t.complete };
|
|
314
|
+
}
|
|
315
|
+
function q(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = k) {
|
|
316
|
+
const s = { ...k, ...i }, a = C(s.includeMetricFilterDatasets, n, r);
|
|
317
|
+
I(e, a), a.found.forEach((o) => {
|
|
318
|
+
const u = A(o, s.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
319
|
+
u && t.add(u);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
function xe(e, t) {
|
|
323
|
+
q(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
|
|
324
|
+
preferQualifiedIdentity: !0
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
function Ke(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
328
|
+
const i = C(!0, n, r);
|
|
329
|
+
I(e, i), i.found.forEach((s) => {
|
|
330
|
+
const a = A(s, "qualifiedOnly");
|
|
331
|
+
a && t.add(a);
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
function je(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
|
|
335
|
+
q(e, t, n, r, {
|
|
336
|
+
includeMetricFilterDatasets: !1
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
function Ue(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = k) {
|
|
340
|
+
const s = { ...k, ...i }, a = C(s.includeMetricFilterDatasets, n, r);
|
|
341
|
+
O(e, a), a.found.forEach((o) => {
|
|
342
|
+
const u = A(o, s.preferQualifiedIdentity ? "preferQualified" : "name");
|
|
343
|
+
u && t.add(u);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function ze(e, t) {
|
|
347
|
+
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());
|
|
348
|
+
}
|
|
349
|
+
const ue = {
|
|
350
|
+
date: /* @__PURE__ */ new Set([
|
|
351
|
+
"between",
|
|
352
|
+
"not between",
|
|
353
|
+
"=",
|
|
354
|
+
"!=",
|
|
355
|
+
">",
|
|
356
|
+
">=",
|
|
357
|
+
"<",
|
|
358
|
+
"<=",
|
|
359
|
+
"is null",
|
|
360
|
+
"is not null"
|
|
361
|
+
]),
|
|
362
|
+
number: /* @__PURE__ */ new Set([
|
|
363
|
+
"between",
|
|
364
|
+
"not between",
|
|
365
|
+
"=",
|
|
366
|
+
"!=",
|
|
367
|
+
">",
|
|
368
|
+
">=",
|
|
369
|
+
"<",
|
|
370
|
+
"<=",
|
|
371
|
+
"in",
|
|
372
|
+
"not in",
|
|
373
|
+
"is null",
|
|
374
|
+
"is not null"
|
|
375
|
+
]),
|
|
376
|
+
string: /* @__PURE__ */ new Set([
|
|
377
|
+
"=",
|
|
378
|
+
"!=",
|
|
379
|
+
"in",
|
|
380
|
+
"not in",
|
|
381
|
+
"like",
|
|
382
|
+
"not like",
|
|
383
|
+
"is null",
|
|
384
|
+
"is not null"
|
|
385
|
+
]),
|
|
386
|
+
boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
|
|
387
|
+
};
|
|
388
|
+
function de(e) {
|
|
389
|
+
const t = H(e);
|
|
390
|
+
return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
|
|
391
|
+
}
|
|
392
|
+
function Qe(e, t) {
|
|
393
|
+
return typeof t != "string" ? !1 : ue[de(e)].has(t);
|
|
394
|
+
}
|
|
395
|
+
const le = /* @__PURE__ */ new Set([
|
|
396
|
+
"=",
|
|
397
|
+
">",
|
|
398
|
+
"<",
|
|
399
|
+
">=",
|
|
400
|
+
"<=",
|
|
401
|
+
"!=",
|
|
402
|
+
"in",
|
|
403
|
+
"not in",
|
|
404
|
+
"like",
|
|
405
|
+
"not like",
|
|
406
|
+
"between",
|
|
407
|
+
"not between",
|
|
408
|
+
"is null",
|
|
409
|
+
"is not null"
|
|
410
|
+
]);
|
|
411
|
+
function fe(e, t) {
|
|
412
|
+
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";
|
|
413
|
+
}
|
|
414
|
+
function me(e, t, n, r) {
|
|
415
|
+
if (W(e.relativeMeta)) {
|
|
416
|
+
r.push(
|
|
417
|
+
`${n}.relativeMeta counts back from the latest data; a dashboard filter's dates run to now. Use a period counted back from today.`
|
|
418
|
+
);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
pe(e.operation, e.values, t, `${n}.values`, r);
|
|
422
|
+
}
|
|
423
|
+
function pe(e, t, n, r, i) {
|
|
424
|
+
if (e === "is null" || e === "is not null") {
|
|
425
|
+
t.length !== 0 && i.push(`${r} must be empty for null filter operations.`);
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
if (e === "between" || e === "not between") {
|
|
429
|
+
if (t.length !== 2) {
|
|
430
|
+
i.push(
|
|
431
|
+
`${r} must contain exactly two values for between operations.`
|
|
432
|
+
);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
} else if (e === "in" || e === "not in") {
|
|
436
|
+
if (t.length === 0) {
|
|
437
|
+
i.push(
|
|
438
|
+
`${r} must contain at least one value for set operations.`
|
|
439
|
+
);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
} else if (t.length !== 1) {
|
|
443
|
+
i.push(
|
|
444
|
+
`${r} must contain exactly one value for '${String(e)}' operations.`
|
|
445
|
+
);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
for (const s of t)
|
|
449
|
+
if (!fe(s, n)) {
|
|
450
|
+
i.push(
|
|
451
|
+
`${r} contains a value that is incompatible with valueType '${n}'.`
|
|
452
|
+
);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const Ge = {
|
|
457
|
+
database: null,
|
|
458
|
+
schema: null,
|
|
459
|
+
table: null
|
|
460
|
+
}, Ye = "__card_default__", x = {
|
|
461
|
+
bookmarksPerViewerPerDashboard: 20,
|
|
462
|
+
bookmarkNameMaxChars: 100,
|
|
463
|
+
columnLabelMaxChars: 120,
|
|
464
|
+
tableSettingsMaxBytes: 65536,
|
|
465
|
+
rememberedTableSettingsMaxBytes: 262144,
|
|
466
|
+
bookmarkStateMaxBytes: 65536
|
|
467
|
+
}, K = 1;
|
|
468
|
+
function We(e) {
|
|
469
|
+
return new TextEncoder().encode(JSON.stringify(e ?? null)).length;
|
|
470
|
+
}
|
|
471
|
+
function he(e) {
|
|
472
|
+
const t = encodeURIComponent;
|
|
473
|
+
switch (e.kind) {
|
|
474
|
+
case "dimension":
|
|
475
|
+
return `dim:${e.role}:${t(e.fieldId)}`;
|
|
476
|
+
case "metric":
|
|
477
|
+
return `metric:${t(e.metricId)}:${t(
|
|
478
|
+
e.metricAlias
|
|
479
|
+
)}`;
|
|
480
|
+
case "result":
|
|
481
|
+
return `result:${t(e.key)}`;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function g(e) {
|
|
485
|
+
if (e)
|
|
486
|
+
try {
|
|
487
|
+
return decodeURIComponent(e);
|
|
488
|
+
} catch {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
function be(e) {
|
|
493
|
+
if (typeof e != "string") return;
|
|
494
|
+
const t = e.split(":");
|
|
495
|
+
let n;
|
|
496
|
+
if (t[0] === "dim" && t.length === 3) {
|
|
497
|
+
const r = t[1], i = g(t[2]);
|
|
498
|
+
(r === "detail" || r === "groupby") && i && (n = { kind: "dimension", role: r, fieldId: i });
|
|
499
|
+
} else if (t[0] === "metric" && t.length === 3) {
|
|
500
|
+
const r = g(t[1]), i = g(t[2]);
|
|
501
|
+
r && i && (n = { kind: "metric", metricId: r, metricAlias: i });
|
|
502
|
+
} else if (t[0] === "result" && t.length === 2) {
|
|
503
|
+
const r = g(t[1]);
|
|
504
|
+
r && (n = { kind: "result", key: r });
|
|
505
|
+
}
|
|
506
|
+
return n && he(n) === e ? n : void 0;
|
|
507
|
+
}
|
|
508
|
+
function T(e) {
|
|
509
|
+
return typeof e == "string" && be(e) !== void 0;
|
|
510
|
+
}
|
|
511
|
+
const $ = c.array(c.string()).max(2e3), ye = c.object({
|
|
512
|
+
order: $.optional(),
|
|
513
|
+
hidden: $.optional(),
|
|
514
|
+
labels: c.record(c.string(), c.string().max(x.columnLabelMaxChars)).optional(),
|
|
515
|
+
sort: c.array(
|
|
516
|
+
c.object({
|
|
517
|
+
columnId: c.string(),
|
|
518
|
+
direction: c.enum(["asc", "desc"])
|
|
519
|
+
}).strict()
|
|
520
|
+
).max(2e3).optional()
|
|
521
|
+
}).strict();
|
|
522
|
+
function R(e) {
|
|
523
|
+
const t = /* @__PURE__ */ new Set(), n = [];
|
|
524
|
+
for (const r of e)
|
|
525
|
+
!T(r) || t.has(r) || (t.add(r), n.push(r));
|
|
526
|
+
return n;
|
|
527
|
+
}
|
|
528
|
+
function j(e) {
|
|
529
|
+
if (!e) return;
|
|
530
|
+
const t = e.order ? R(e.order) : void 0, n = e.hidden ? R(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
|
|
531
|
+
([o, u]) => {
|
|
532
|
+
const l = typeof u == "string" ? u.trim() : "";
|
|
533
|
+
return T(o) && l ? [
|
|
534
|
+
[
|
|
535
|
+
o,
|
|
536
|
+
l.slice(0, x.columnLabelMaxChars)
|
|
537
|
+
]
|
|
538
|
+
] : [];
|
|
539
|
+
}
|
|
540
|
+
), i = /* @__PURE__ */ new Set(), s = e.sort ? e.sort.filter((o) => !T(o.columnId) || i.has(o.columnId) ? !1 : (i.add(o.columnId), !0)) : void 0, a = {};
|
|
541
|
+
return t != null && t.length && (a.order = t), n != null && n.length && (a.hidden = n), r.length && (a.labels = Object.fromEntries(r)), s && (a.sort = s.map(({ columnId: o, direction: u }) => ({
|
|
542
|
+
columnId: o,
|
|
543
|
+
direction: u
|
|
544
|
+
}))), Object.keys(a).length ? a : void 0;
|
|
545
|
+
}
|
|
546
|
+
function U(e) {
|
|
547
|
+
return j(e) === void 0;
|
|
548
|
+
}
|
|
549
|
+
function z(e, t) {
|
|
550
|
+
if (t !== K)
|
|
551
|
+
return {
|
|
552
|
+
ok: !1,
|
|
553
|
+
error: `Unsupported table settings version ${t}.`
|
|
554
|
+
};
|
|
555
|
+
const n = ye.safeParse(e);
|
|
556
|
+
return n.success ? {
|
|
557
|
+
ok: !0,
|
|
558
|
+
value: j(n.data) ?? {}
|
|
559
|
+
} : { ok: !1, error: "Table settings are invalid." };
|
|
560
|
+
}
|
|
561
|
+
function He(e, t, n) {
|
|
562
|
+
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
563
|
+
const r = {};
|
|
564
|
+
for (const [i, s] of Object.entries(
|
|
565
|
+
e
|
|
566
|
+
)) {
|
|
567
|
+
if (!n.has(i)) continue;
|
|
568
|
+
const a = z(s, t);
|
|
569
|
+
a.ok && !U(a.value) && (r[i] = a.value);
|
|
570
|
+
}
|
|
571
|
+
return r;
|
|
572
|
+
}
|
|
573
|
+
const Se = /* @__PURE__ */ new Set([
|
|
574
|
+
"table",
|
|
575
|
+
"detailTable"
|
|
576
|
+
]);
|
|
577
|
+
function Q(e) {
|
|
578
|
+
return Se.has(e.type);
|
|
579
|
+
}
|
|
580
|
+
function Ie(e) {
|
|
581
|
+
var t, n;
|
|
582
|
+
return Q(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
|
|
583
|
+
}
|
|
584
|
+
function Je(e) {
|
|
585
|
+
return new Set(
|
|
586
|
+
S(e).filter(({ card: t }) => Q(t)).map(({ card: t }) => t.id)
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
function Ze(e) {
|
|
590
|
+
return new Set(
|
|
591
|
+
S(e).filter(({ card: t }) => Ie(t)).map(({ card: t }) => t.id)
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
const N = 1, Xe = ["PRIVATE", "TEAM", "DASHBOARD"], ge = c.object({
|
|
595
|
+
filterId: c.string().min(1),
|
|
596
|
+
name: c.string(),
|
|
597
|
+
operation: c.string(),
|
|
598
|
+
valueType: c.enum(["string", "number", "date", "boolean"]),
|
|
599
|
+
values: c.array(c.unknown())
|
|
600
|
+
}).passthrough().superRefine((e, t) => {
|
|
601
|
+
const n = [];
|
|
602
|
+
le.has(e.operation) ? me(e, e.valueType, "filterValue", n) : n.push("filterValue.operation must be a valid filter operation.");
|
|
603
|
+
for (const r of n) t.addIssue({ code: "custom", message: r });
|
|
604
|
+
}), D = c.unknown().superRefine((e, t) => {
|
|
605
|
+
for (const n of X(e).errors)
|
|
606
|
+
t.addIssue({ code: "custom", message: n.message });
|
|
607
|
+
}), ke = c.discriminatedUnion("kind", [
|
|
608
|
+
c.object({ kind: c.literal("filter"), filterValue: ge }).strict(),
|
|
609
|
+
c.object({ kind: c.literal("control"), value: c.unknown() }).strict(),
|
|
610
|
+
c.object({
|
|
611
|
+
kind: c.literal("selection"),
|
|
612
|
+
selection: J
|
|
613
|
+
}).strict()
|
|
614
|
+
]), Ce = c.union([
|
|
615
|
+
c.object({
|
|
616
|
+
status: c.literal("set"),
|
|
617
|
+
value: ke,
|
|
618
|
+
comparisonSelection: D.optional()
|
|
619
|
+
}).strict(),
|
|
620
|
+
c.object({
|
|
621
|
+
status: c.literal("cleared"),
|
|
622
|
+
comparisonSelection: D.optional()
|
|
623
|
+
}).strict(),
|
|
624
|
+
c.object({ comparisonSelection: D }).strict()
|
|
625
|
+
]), G = ["bySheetId", "byCardId", "byDocumentSectionId"], ve = /* @__PURE__ */ new Set(["version", "selectedSheetId", "inputs", "tableSettings"]), Ee = /* @__PURE__ */ new Set(["shared", ...G]), y = (e) => !!e && typeof e == "object" && !Array.isArray(e);
|
|
626
|
+
function M(e, t, n) {
|
|
627
|
+
if (e === void 0) return;
|
|
628
|
+
if (!y(e)) {
|
|
629
|
+
t.push({ target: "input", id: n });
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
const r = {};
|
|
633
|
+
for (const [i, s] of Object.entries(e)) {
|
|
634
|
+
const a = i ? Ce.safeParse(s) : void 0;
|
|
635
|
+
a != null && a.success ? r[i] = a.data : t.push({
|
|
636
|
+
target: Z(i) ? "selection" : "input",
|
|
637
|
+
id: i
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
return Object.keys(r).length ? r : void 0;
|
|
641
|
+
}
|
|
642
|
+
function we(e, t) {
|
|
643
|
+
if (t !== N)
|
|
644
|
+
return { ok: !1, error: `Unsupported bookmark version ${t}.` };
|
|
645
|
+
if (!y(e) || e.version !== N)
|
|
646
|
+
return { ok: !1, error: "The bookmark state is invalid." };
|
|
647
|
+
const n = [], r = Object.keys(e).filter((o) => !ve.has(o));
|
|
648
|
+
let i;
|
|
649
|
+
typeof e.selectedSheetId == "string" && e.selectedSheetId ? i = e.selectedSheetId : e.selectedSheetId !== void 0 && n.push({ target: "sheet", id: String(e.selectedSheetId) });
|
|
650
|
+
const s = {};
|
|
651
|
+
if (y(e.inputs)) {
|
|
652
|
+
r.push(
|
|
653
|
+
...Object.keys(e.inputs).filter((u) => !Ee.has(u)).map((u) => `inputs.${u}`)
|
|
654
|
+
);
|
|
655
|
+
const o = M(e.inputs.shared, n, "shared");
|
|
656
|
+
o && (s.shared = o);
|
|
657
|
+
for (const u of G) {
|
|
658
|
+
const l = e.inputs[u];
|
|
659
|
+
if (l === void 0) continue;
|
|
660
|
+
if (!y(l)) {
|
|
661
|
+
n.push({ target: "input", id: u });
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
const h = {};
|
|
665
|
+
for (const [b, p] of Object.entries(l)) {
|
|
666
|
+
const f = M(p, n, `${u}.${b}`);
|
|
667
|
+
f && (h[b] = f);
|
|
668
|
+
}
|
|
669
|
+
Object.keys(h).length && (s[u] = h);
|
|
670
|
+
}
|
|
671
|
+
} else e.inputs !== void 0 && r.push("inputs");
|
|
672
|
+
const a = {};
|
|
673
|
+
if (y(e.tableSettings))
|
|
674
|
+
for (const [o, u] of Object.entries(e.tableSettings)) {
|
|
675
|
+
const l = o ? z(u, K) : void 0;
|
|
676
|
+
l != null && l.ok ? U(l.value) || (a[o] = l.value) : n.push({ target: "card", id: o });
|
|
677
|
+
}
|
|
678
|
+
else e.tableSettings !== void 0 && r.push("tableSettings");
|
|
679
|
+
return {
|
|
680
|
+
ok: !0,
|
|
681
|
+
value: {
|
|
682
|
+
version: N,
|
|
683
|
+
...i ? { selectedSheetId: i } : {},
|
|
684
|
+
...Object.keys(s).length ? { inputs: s } : {},
|
|
685
|
+
...Object.keys(a).length ? { tableSettings: a } : {}
|
|
686
|
+
},
|
|
687
|
+
issues: n,
|
|
688
|
+
unknownKeys: r
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
function et(e, t) {
|
|
692
|
+
const n = we(e, t);
|
|
693
|
+
return n.ok ? n.issues.some((r) => r.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : n.issues.length || n.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: n.value } : n;
|
|
694
|
+
}
|
|
695
|
+
export {
|
|
696
|
+
ee as A,
|
|
697
|
+
N as B,
|
|
698
|
+
Ye as C,
|
|
699
|
+
_ as D,
|
|
700
|
+
Ge as E,
|
|
701
|
+
V as F,
|
|
702
|
+
te as G,
|
|
703
|
+
Fe as H,
|
|
704
|
+
_e as I,
|
|
705
|
+
de as J,
|
|
706
|
+
Qe as K,
|
|
707
|
+
le as L,
|
|
708
|
+
me as M,
|
|
709
|
+
re as N,
|
|
710
|
+
S as O,
|
|
711
|
+
$e as P,
|
|
712
|
+
Ve as Q,
|
|
713
|
+
Re as R,
|
|
714
|
+
Me as S,
|
|
715
|
+
Be as T,
|
|
716
|
+
x as V,
|
|
717
|
+
Pe as a,
|
|
718
|
+
xe as b,
|
|
719
|
+
q as c,
|
|
720
|
+
P as d,
|
|
721
|
+
Ke as e,
|
|
722
|
+
je as f,
|
|
723
|
+
Ue as g,
|
|
724
|
+
ze as h,
|
|
725
|
+
we as i,
|
|
726
|
+
K as j,
|
|
727
|
+
be as k,
|
|
728
|
+
U as l,
|
|
729
|
+
We as m,
|
|
730
|
+
j as n,
|
|
731
|
+
z as o,
|
|
732
|
+
et as p,
|
|
733
|
+
He as q,
|
|
734
|
+
qe as r,
|
|
735
|
+
Q as s,
|
|
736
|
+
he as t,
|
|
737
|
+
Ie as u,
|
|
738
|
+
Je as v,
|
|
739
|
+
Ze as w,
|
|
740
|
+
Xe as x,
|
|
741
|
+
Le as y,
|
|
742
|
+
L as z
|
|
743
|
+
};
|