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
package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-DDsIWJYT.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var Ke = Object.defineProperty;
|
|
2
2
|
var Ve = (e, t, r) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var ae = (e, t, r) => Ve(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import "./
|
|
9
|
-
import "./analytics-base-schemas-CHLxsPfX.js";
|
|
4
|
+
import { au as Ue, i as je, j as N, m as Be, K as Ee, av as J, aw as Fe, ax as ze, ay as Se, az as ke, ai as Xe, an as He, aj as Ge, f as qe, a as V, _ as se, aa as We, Y as Ye, ab as Ze, ac as Je, o as ie, s as Qe, R as le, T as et, V as tt, $ as rt, ah as nt, aA as L, aB as R } from "./temporal-input-presentation-B77JsAzU.js";
|
|
5
|
+
import { h as X, e as ot, p as at, k as st } from "./export-file-format-C-tJsxsf.js";
|
|
6
|
+
import { aW as O, aj as it, t as B, aV as lt, v as Q, u as ct } from "./validators-BtaCFIEB.js";
|
|
7
|
+
import "./matrix-operation-contract-BSiGEXVC.js";
|
|
8
|
+
import "./analytics-base-schemas-CB3oFAXk.js";
|
|
10
9
|
import "zod";
|
|
11
|
-
import { PDF_SAFETY_LIMIT_EXCEEDED as Me, getUtf8ByteLength as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { PDF_SAFETY_LIMIT_EXCEEDED as Me, getUtf8ByteLength as ut, FAST_PDF_POLICY as mt } from "../pdf-export-policy/index.js";
|
|
11
|
+
import { p as dt } from "./pivot-result-contract-expectations-Bo-86vwS.js";
|
|
12
|
+
import { c as ft, b as ce } from "./pivot-result-identity-olvXJoB9.js";
|
|
13
|
+
import { v as pt, g as yt } from "./zoned-wall-clock-CGLVI40Q.js";
|
|
14
14
|
function ht(e, t, r) {
|
|
15
15
|
const n = {
|
|
16
16
|
...t,
|
|
@@ -129,7 +129,7 @@ function vt(e) {
|
|
|
129
129
|
text: o(n + 1, r) + t[r].value
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function xt(e) {
|
|
133
133
|
const t = wt(e);
|
|
134
134
|
let r;
|
|
135
135
|
if (e.type === "scientific")
|
|
@@ -143,11 +143,11 @@ function Ct(e) {
|
|
|
143
143
|
}
|
|
144
144
|
return e.negativeStyle === "parentheses" ? `${r};(${r})` : r;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Ct(e, t) {
|
|
147
147
|
if (!e.formattedValues) return;
|
|
148
148
|
const { presentation: r } = e;
|
|
149
149
|
if (t === "number" || t === "by_value")
|
|
150
|
-
return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 :
|
|
150
|
+
return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : xt(r.format);
|
|
151
151
|
if (t === "date") {
|
|
152
152
|
if ((r == null ? void 0 : r.kind) === "temporal_bucket")
|
|
153
153
|
return r.grain === "day" ? "yyyy-mm-dd" : r.grain === "month" ? "mmm yyyy" : "yyyy-mm-dd hh:mm";
|
|
@@ -156,7 +156,7 @@ function xt(e, t) {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
function de(e) {
|
|
159
|
-
const t = gt(e), r =
|
|
159
|
+
const t = gt(e), r = Ct(e, t);
|
|
160
160
|
return Object.freeze({
|
|
161
161
|
key: e.key,
|
|
162
162
|
label: e.label,
|
|
@@ -174,7 +174,7 @@ function fe(e) {
|
|
|
174
174
|
const n = Number(e);
|
|
175
175
|
return Number.isFinite(n) && (n !== 0 || r.length === 0);
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const Ft = Date.UTC(1900, 2, 1), St = Date.UTC(1e4, 0, 1), kt = Date.UTC(1899, 11, 30), Mt = 864e5;
|
|
178
178
|
function It(e) {
|
|
179
179
|
const t = Date.UTC(
|
|
180
180
|
e.year,
|
|
@@ -184,7 +184,7 @@ function It(e) {
|
|
|
184
184
|
e.minute,
|
|
185
185
|
e.second
|
|
186
186
|
);
|
|
187
|
-
if (!(e.year < 1900 || !Number.isFinite(t)) && !(t <
|
|
187
|
+
if (!(e.year < 1900 || !Number.isFinite(t)) && !(t < Ft || t >= St))
|
|
188
188
|
return (t - kt) / Mt;
|
|
189
189
|
}
|
|
190
190
|
function pe(e, t, r) {
|
|
@@ -216,14 +216,14 @@ function U(e) {
|
|
|
216
216
|
return typeof t == "boolean" ? { kind: "boolean", text: r, value: t } : pe(t, r, !1) ?? o;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function xr(e) {
|
|
220
220
|
return e.kind === "empty" ? "" : e.text;
|
|
221
221
|
}
|
|
222
|
-
const $e = 1e4, $t = 1e6,
|
|
223
|
-
function
|
|
222
|
+
const $e = 1e4, $t = 1e6, Cr = 5e6, Tr = 1024 ** 3, Er = 1024 ** 3;
|
|
223
|
+
function Fr(e) {
|
|
224
224
|
return e > $e;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Sr(e) {
|
|
227
227
|
return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= $e ? "direct" : e.loadedRowCount <= $t ? "background" : "blocked";
|
|
228
228
|
}
|
|
229
229
|
const kr = {
|
|
@@ -253,9 +253,9 @@ const Lt = 2;
|
|
|
253
253
|
function Pt(e) {
|
|
254
254
|
return typeof e == "number" ? Number.isInteger(e) : O(e) ? !e.value.includes(".") : !0;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function _t(e, t, r) {
|
|
257
257
|
const n = e.descriptors.measures.filter(
|
|
258
|
-
(s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 &&
|
|
258
|
+
(s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 && it(s.column.dataType) === "number"
|
|
259
259
|
);
|
|
260
260
|
if (n.length === 0) return r;
|
|
261
261
|
const o = /* @__PURE__ */ new Set();
|
|
@@ -284,7 +284,7 @@ function Dt(e, t, r) {
|
|
|
284
284
|
function j(e) {
|
|
285
285
|
return B(e.slice(0, -1));
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Dt(e, t) {
|
|
288
288
|
return t.length > e.length && B(t.slice(0, e.length)) === B(e);
|
|
289
289
|
}
|
|
290
290
|
function At(e) {
|
|
@@ -292,7 +292,7 @@ function At(e) {
|
|
|
292
292
|
if (r === 0 || t.kind !== "layout") return !1;
|
|
293
293
|
const n = e[r - 1];
|
|
294
294
|
if (n.kind !== "layout") return !1;
|
|
295
|
-
if (t.role !== "member" ||
|
|
295
|
+
if (t.role !== "member" || Dt(n.rowPath, t.rowPath)) return !0;
|
|
296
296
|
const o = e[r - 2];
|
|
297
297
|
return n.role === "member" && (!o || o.kind !== "layout" || o.role !== "member" || j(o.rowPath) !== j(n.rowPath)) && t.rowPath.length === n.rowPath.length && j(t.rowPath) === j(n.rowPath);
|
|
298
298
|
});
|
|
@@ -302,7 +302,7 @@ function Le(e, t, r) {
|
|
|
302
302
|
return !(r != null && r.hasTextAffixes) && t.kind === "value" && (typeof t.value == "number" || O(t.value)) ? e : X(e);
|
|
303
303
|
}
|
|
304
304
|
function Nt(e, t, r) {
|
|
305
|
-
const n =
|
|
305
|
+
const n = Ee(e.descriptors, t.presentation, r), o = e.columns.map((u) => {
|
|
306
306
|
var a;
|
|
307
307
|
return u.kind === "measure" && ((a = n.measureSemantics.get(u.measureId)) == null ? void 0 : a.isNumeric) === !0;
|
|
308
308
|
}), l = (u) => J([u], n.levels), s = (u, a, m) => Fe(u, a, t.presentation.totals[m], n.levels), c = e.columns.map((u) => {
|
|
@@ -312,7 +312,7 @@ function Nt(e, t, r) {
|
|
|
312
312
|
}), f = Math.min(t.spec.columns.length, Math.max(
|
|
313
313
|
0,
|
|
314
314
|
...e.columns.map((u) => u.kind === "measure" ? u.columnPath.length + (u.role !== "member" ? 1 : 0) : 0)
|
|
315
|
-
)), d = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? l(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), b = (u, a) =>
|
|
315
|
+
)), d = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? l(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), b = (u, a) => ze({
|
|
316
316
|
path: u.rowPath,
|
|
317
317
|
role: u.kind === "layout" ? u.role : "member",
|
|
318
318
|
levelCount: Math.max(1, t.spec.rows.length),
|
|
@@ -326,15 +326,15 @@ function Nt(e, t, r) {
|
|
|
326
326
|
if (h.kind === "hierarchy")
|
|
327
327
|
return `${" ".repeat(Math.max(0, u.rowPath.length - 1))}${s(u.rowPath, u.role, "rows")}`;
|
|
328
328
|
if (h.kind === "level") {
|
|
329
|
-
const v = t.spec.rows.findIndex((
|
|
330
|
-
return
|
|
329
|
+
const v = t.spec.rows.findIndex((S) => S.id === h.levelId), x = m[v];
|
|
330
|
+
return x != null && x.visible ? x.total ? s(u.rowPath, u.role, "rows") : J(x.path, n.levels) : "";
|
|
331
331
|
}
|
|
332
332
|
const T = u.values[p], g = n.measures.get(h.measureId);
|
|
333
333
|
if (T.kind === "value" && !g)
|
|
334
334
|
throw new Error("Matrix value is missing its measure descriptor.");
|
|
335
|
-
return
|
|
335
|
+
return Se(T, g, t.presentation.absence);
|
|
336
336
|
});
|
|
337
|
-
},
|
|
337
|
+
}, C = (u, a) => w(u, a).map((m, h) => {
|
|
338
338
|
const p = e.columns[h];
|
|
339
339
|
return p.kind === "measure" ? Le(m, u.values[h], n.measureSemantics.get(p.measureId)) : X(m);
|
|
340
340
|
});
|
|
@@ -359,11 +359,11 @@ function Nt(e, t, r) {
|
|
|
359
359
|
return e.columns.flatMap((p, T) => {
|
|
360
360
|
var v;
|
|
361
361
|
if (p.kind !== "level") return [];
|
|
362
|
-
const g = t.spec.rows.findIndex((
|
|
362
|
+
const g = t.spec.rows.findIndex((x) => x.id === p.levelId);
|
|
363
363
|
return g < u.rowPath.length && ((v = h[g]) == null ? void 0 : v.visible) === !1 ? [T] : [];
|
|
364
364
|
});
|
|
365
365
|
},
|
|
366
|
-
csvRow: (u) =>
|
|
366
|
+
csvRow: (u) => C(u),
|
|
367
367
|
/**
|
|
368
368
|
* `previousRow` is the row before `data[0]`, carried by the export's
|
|
369
369
|
* continuation, so a tabular layout prints each label once across the
|
|
@@ -371,7 +371,7 @@ function Nt(e, t, r) {
|
|
|
371
371
|
* formatter state or an earlier worker. Without it, the first row prints
|
|
372
372
|
* its labels.
|
|
373
373
|
*/
|
|
374
|
-
csvRows: (u, a) => u.map((m, h) =>
|
|
374
|
+
csvRows: (u, a) => u.map((m, h) => C(m, h ? u[h - 1] : a ?? void 0))
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
377
|
function Ir(e) {
|
|
@@ -391,7 +391,7 @@ function Ot(e, t, r) {
|
|
|
391
391
|
if (o.kind === "measure") {
|
|
392
392
|
const c = e.values[l], f = r.measures.get(o.measureId);
|
|
393
393
|
if (c.kind === "value" && !f) throw new Error("Matrix value is missing its measure descriptor.");
|
|
394
|
-
return
|
|
394
|
+
return Se(c, f, r.absence);
|
|
395
395
|
}
|
|
396
396
|
const s = o.kind === "level" ? n.find((c) => c.levelId === o.levelId) : void 0;
|
|
397
397
|
if (!s) throw new Error("Flat Matrix row does not match its frozen layout.");
|
|
@@ -420,7 +420,7 @@ function Kt(e) {
|
|
|
420
420
|
cells: [
|
|
421
421
|
...l ? [{ ...n("", 0, !0), colspan: l }] : [],
|
|
422
422
|
{
|
|
423
|
-
...n(e.request.spec.columns.map((s) =>
|
|
423
|
+
...n(e.request.spec.columns.map((s) => ke(s, e.request.presentation)).join(" / "), l, !0),
|
|
424
424
|
colspan: e.layout.columns.length - l,
|
|
425
425
|
isNumeric: !1,
|
|
426
426
|
className: ""
|
|
@@ -462,23 +462,23 @@ function Kt(e) {
|
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
464
|
function Vt(e, t, r) {
|
|
465
|
-
const { levels: n } =
|
|
465
|
+
const { levels: n } = Ee(e.descriptors, t.presentation, r), o = t.spec.columns.length > 0, l = [], s = [], c = e.columns.map((d, b) => {
|
|
466
466
|
if (d.kind !== "measure") return null;
|
|
467
467
|
const w = o ? `${d.role}:${B(d.columnPath)}` : `measure:${b}`;
|
|
468
|
-
let
|
|
469
|
-
return
|
|
468
|
+
let C = l.indexOf(w);
|
|
469
|
+
return C < 0 && (C = l.push(w) - 1, s.push(o ? Fe(d.columnPath, d.role, t.presentation.totals.columns, n) : d.label)), C;
|
|
470
470
|
}), f = t.spec.columns[t.spec.columns.length - 1];
|
|
471
471
|
return {
|
|
472
472
|
columnGroups: c,
|
|
473
473
|
groupLabels: s,
|
|
474
474
|
/** What bands name their groups by: the innermost column level, or "Measures". */
|
|
475
|
-
groupLevelLabel: f ?
|
|
475
|
+
groupLevelLabel: f ? ke(f, t.presentation) : "Measures"
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
function Lr(e) {
|
|
479
479
|
const { layout: t, rows: r, report: n } = e, o = {
|
|
480
480
|
...e.request,
|
|
481
|
-
presentation:
|
|
481
|
+
presentation: _t(t, r, e.request.presentation)
|
|
482
482
|
}, l = Kt({ layout: t, rows: r, request: o, report: n }), s = At(r), c = Vt(t, o, n), f = {
|
|
483
483
|
...l,
|
|
484
484
|
rows: l.rows.map((d, b) => ({ ...d, keepWithPrevious: s[b] })),
|
|
@@ -525,7 +525,7 @@ async function jt(e) {
|
|
|
525
525
|
}
|
|
526
526
|
async function Pr(e) {
|
|
527
527
|
if (!e.token) throw new Error("Missing auth token for PDF export");
|
|
528
|
-
if (
|
|
528
|
+
if (ut(e.serializedPayload) > mt.maxRequestBytes)
|
|
529
529
|
throw new Error("Fast-path PDF request exceeds the structured body limit");
|
|
530
530
|
const t = await (e.fetchImpl ?? fetch)(e.url, {
|
|
531
531
|
method: "POST",
|
|
@@ -553,12 +553,12 @@ function Pe(e) {
|
|
|
553
553
|
)
|
|
554
554
|
);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function _e(e) {
|
|
557
557
|
const t = e == null ? void 0 : e.sql, r = e == null ? void 0 : e.python;
|
|
558
558
|
return (e == null ? void 0 : e.resultOwner) === "freeform" && typeof t == "string" && !!t.trim() && (typeof r != "string" || !r.trim());
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
return e.formatting.useFormattedValues !== !1 &&
|
|
560
|
+
function _r(e) {
|
|
561
|
+
return e.formatting.useFormattedValues !== !1 && _e(e.queryPayload) && Pe(e.formatting).size > 0;
|
|
562
562
|
}
|
|
563
563
|
function zt(e, t) {
|
|
564
564
|
return e.map((r, n) => {
|
|
@@ -584,7 +584,7 @@ function Xt(e) {
|
|
|
584
584
|
const f = c.key || c.field;
|
|
585
585
|
return f ? [[f, c]] : [];
|
|
586
586
|
})
|
|
587
|
-
), l =
|
|
587
|
+
), l = _e(e.queryPayload), s = /* @__PURE__ */ new Map();
|
|
588
588
|
for (const [c, f] of t) {
|
|
589
589
|
const d = o.get(c);
|
|
590
590
|
let b;
|
|
@@ -594,7 +594,7 @@ function Xt(e) {
|
|
|
594
594
|
}), r.add(c);
|
|
595
595
|
else if (l) {
|
|
596
596
|
r.add(c);
|
|
597
|
-
const w =
|
|
597
|
+
const w = Xe({
|
|
598
598
|
columnKey: c,
|
|
599
599
|
values: zt(e.records, c)
|
|
600
600
|
});
|
|
@@ -604,14 +604,14 @@ function Xt(e) {
|
|
|
604
604
|
b && n.set(c, {
|
|
605
605
|
metadata: b,
|
|
606
606
|
format: f,
|
|
607
|
-
formatValue:
|
|
607
|
+
formatValue: He({ metadata: b, format: f })
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
return {
|
|
611
611
|
activatedColumnKeys: r,
|
|
612
612
|
byColumnKey: n,
|
|
613
613
|
...l ? {
|
|
614
|
-
sqlChunkEvidence:
|
|
614
|
+
sqlChunkEvidence: Ge(s)
|
|
615
615
|
} : {}
|
|
616
616
|
};
|
|
617
617
|
}
|
|
@@ -634,7 +634,7 @@ function he(e, t) {
|
|
|
634
634
|
const r = e.byColumnKey.get(t);
|
|
635
635
|
return r ? r.metadata.valueKind === "date" : void 0;
|
|
636
636
|
}
|
|
637
|
-
const Gt = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), qt = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, Wt = /^\d{4}-\d{2}-\d{2}$/,
|
|
637
|
+
const Gt = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), qt = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, Wt = /^\d{4}-\d{2}-\d{2}$/, De = "MM/dd/yyyy";
|
|
638
638
|
function z(e) {
|
|
639
639
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
640
640
|
}
|
|
@@ -651,7 +651,7 @@ function ge(e, t) {
|
|
|
651
651
|
return z(r.dateFormat) ? r.dateFormat : {};
|
|
652
652
|
}
|
|
653
653
|
function we(e) {
|
|
654
|
-
return e.useCustomFormat && e.customFormat ? e.customFormat : e.format ||
|
|
654
|
+
return e.useCustomFormat && e.customFormat ? e.customFormat : e.format || De;
|
|
655
655
|
}
|
|
656
656
|
function ve(e, t) {
|
|
657
657
|
return e && e !== "auto" ? e : t;
|
|
@@ -669,7 +669,7 @@ function Jt(e) {
|
|
|
669
669
|
const t = Ie(e);
|
|
670
670
|
if (t !== void 0)
|
|
671
671
|
try {
|
|
672
|
-
return
|
|
672
|
+
return lt(t, /[.eE]/.test(t) ? "decimal" : "integer");
|
|
673
673
|
} catch {
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
@@ -677,8 +677,8 @@ function Jt(e) {
|
|
|
677
677
|
function Qt(e) {
|
|
678
678
|
return e.calendar.fiscalCalendar && (e.granularity === "quarter" || e.granularity === "year") ? "fiscal" : e.granularity;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, l = (a) =>
|
|
680
|
+
function Dr(e) {
|
|
681
|
+
const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, l = (a) => qe({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } }), s = (a) => Ye({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } });
|
|
682
682
|
function c(a) {
|
|
683
683
|
var h;
|
|
684
684
|
if ((h = t.visibleColumns) != null && h.length) return t.visibleColumns;
|
|
@@ -692,12 +692,12 @@ function _r(e) {
|
|
|
692
692
|
const h = a == null ? void 0 : a.pivotIdentity;
|
|
693
693
|
if (!h || !h.members || h.members.length === 0) return;
|
|
694
694
|
const p = ce({ identity: h, columnKey: (a == null ? void 0 : a.key) || (a == null ? void 0 : a.field) || "" });
|
|
695
|
-
return
|
|
695
|
+
return dt({
|
|
696
696
|
members: p,
|
|
697
697
|
metricLabel: (a == null ? void 0 : a.label) || (a == null ? void 0 : a.headerName),
|
|
698
698
|
mode: n ? "formatted" : "canonical",
|
|
699
699
|
resolveTemporalFormat: (T) => {
|
|
700
|
-
const g = p.find((
|
|
700
|
+
const g = p.find((x) => x.fieldId === T);
|
|
701
701
|
if (!(g != null && g.temporalBucket)) return;
|
|
702
702
|
const v = se({
|
|
703
703
|
snapshot: t.presentationExecutionSnapshot,
|
|
@@ -709,7 +709,7 @@ function _r(e) {
|
|
|
709
709
|
}).flattenedLabel;
|
|
710
710
|
}
|
|
711
711
|
function b(a, m) {
|
|
712
|
-
return
|
|
712
|
+
return We({
|
|
713
713
|
metadata: a,
|
|
714
714
|
cardFormat: m,
|
|
715
715
|
locale: m.locale,
|
|
@@ -724,7 +724,7 @@ function _r(e) {
|
|
|
724
724
|
p.map((i) => ({ key: A(i) || "<unknown>", pivotIdentity: i.pivotIdentity })),
|
|
725
725
|
{ expectedPivotFieldIds: v }
|
|
726
726
|
);
|
|
727
|
-
const
|
|
727
|
+
const x = c(a), S = new Map(
|
|
728
728
|
p.flatMap((i) => {
|
|
729
729
|
const y = A(i);
|
|
730
730
|
return y ? [[y, i]] : [];
|
|
@@ -740,7 +740,7 @@ function _r(e) {
|
|
|
740
740
|
return y && i.temporalBucket ? [[y, i.temporalBucket]] : [];
|
|
741
741
|
})
|
|
742
742
|
), te = /* @__PURE__ */ new Map();
|
|
743
|
-
for (const i of
|
|
743
|
+
for (const i of x) {
|
|
744
744
|
const y = se({
|
|
745
745
|
snapshot: t.presentationExecutionSnapshot,
|
|
746
746
|
scope: o,
|
|
@@ -752,18 +752,18 @@ function _r(e) {
|
|
|
752
752
|
}
|
|
753
753
|
y && E && te.set(i, b(E, y));
|
|
754
754
|
}
|
|
755
|
-
const G =
|
|
756
|
-
const y = Re.get(i), E = y && Gt.has(y) ? y : "unknown",
|
|
755
|
+
const G = x.map((i) => {
|
|
756
|
+
const y = Re.get(i), E = y && Gt.has(y) ? y : "unknown", F = n ? C(i, I, H) : void 0, M = f(i, S.get(i)), P = n && I.activatedColumnKeys.has(i) && he(I, i) === void 0;
|
|
757
757
|
return {
|
|
758
758
|
key: i,
|
|
759
759
|
label: M,
|
|
760
760
|
dataType: E,
|
|
761
|
-
...
|
|
762
|
-
xlsx: de({ key: i, label: M, formattedValues: n, dataType: E, presentation:
|
|
761
|
+
...F ? { presentation: F } : {},
|
|
762
|
+
xlsx: de({ key: i, label: M, formattedValues: n, dataType: E, presentation: F }),
|
|
763
763
|
...P ? { xlsxPending: !0 } : {}
|
|
764
764
|
};
|
|
765
765
|
});
|
|
766
|
-
function Ne(i, y, E,
|
|
766
|
+
function Ne(i, y, E, F) {
|
|
767
767
|
if (!n) return { text: be(i), value: i };
|
|
768
768
|
const M = Ht({ value: i, columnKey: y, rowIndex: E, resolution: I });
|
|
769
769
|
if (M !== void 0) return { text: M.text, value: i, ...M.wallClock ? { wallClock: M.wallClock } : {} };
|
|
@@ -773,20 +773,20 @@ function _r(e) {
|
|
|
773
773
|
if (!k) throw new Error(`Missing resolved temporal presentation for column "${y}"`);
|
|
774
774
|
if (i != null && typeof i != "string")
|
|
775
775
|
throw new Error(`Canonical temporal column "${y}" must contain a string or null`);
|
|
776
|
-
const
|
|
776
|
+
const _ = i ?? null, D = Ze(_, P);
|
|
777
777
|
return {
|
|
778
|
-
text:
|
|
778
|
+
text: Je({ value: _, metadata: P, format: k }),
|
|
779
779
|
value: i,
|
|
780
|
-
...
|
|
780
|
+
...D ? { wallClock: D } : {}
|
|
781
781
|
};
|
|
782
782
|
}
|
|
783
783
|
if (i == null) return { text: "", value: i };
|
|
784
784
|
const q = s(y);
|
|
785
785
|
if (q && typeof i == "number" && Number.isFinite(i))
|
|
786
786
|
return {
|
|
787
|
-
text:
|
|
787
|
+
text: ie(
|
|
788
788
|
new Date(i).toISOString(),
|
|
789
|
-
q.pattern ||
|
|
789
|
+
q.pattern || De,
|
|
790
790
|
ve(q.timezone, t.timezone),
|
|
791
791
|
"UTC"
|
|
792
792
|
),
|
|
@@ -799,14 +799,14 @@ function _r(e) {
|
|
|
799
799
|
return { text: $ ? V(i, $) : i.value, value: i };
|
|
800
800
|
const K = ge(t, y);
|
|
801
801
|
if (K && (i instanceof Date || typeof i == "string" && qt.test(i))) {
|
|
802
|
-
const k = i instanceof Date ? i.toISOString() : i,
|
|
802
|
+
const k = i instanceof Date ? i.toISOString() : i, _ = typeof i == "string" && Wt.test(i), D = _ ? "UTC" : ve(K.timezone, t.timezone), ne = _ ? "UTC" : K.sourceTimezone || "auto", oe = Qe(k, D, ne);
|
|
803
803
|
return {
|
|
804
|
-
text:
|
|
804
|
+
text: ie(k, we(K), D, ne),
|
|
805
805
|
value: i,
|
|
806
806
|
...oe ? { wallClock: oe } : {}
|
|
807
807
|
};
|
|
808
808
|
}
|
|
809
|
-
if (typeof i == "string" && $ &&
|
|
809
|
+
if (typeof i == "string" && $ && F.dataType === "number") {
|
|
810
810
|
const k = Jt(i);
|
|
811
811
|
if (k) return { text: V(k, $), value: i };
|
|
812
812
|
}
|
|
@@ -814,13 +814,13 @@ function _r(e) {
|
|
|
814
814
|
}
|
|
815
815
|
const Oe = h.map(
|
|
816
816
|
(i, y) => G.map((E) => {
|
|
817
|
-
const
|
|
818
|
-
return U({ value:
|
|
817
|
+
const F = Ne(i[E.key], E.key, y, E);
|
|
818
|
+
return U({ value: F.value, text: F.text, column: E.xlsx, wallClock: F.wallClock });
|
|
819
819
|
})
|
|
820
820
|
), re = (m == null ? void 0 : m.withHeader) !== !1 && t.includeHeaders;
|
|
821
821
|
if (re)
|
|
822
|
-
for (const i of
|
|
823
|
-
const y =
|
|
822
|
+
for (const i of x) {
|
|
823
|
+
const y = S.get(i);
|
|
824
824
|
y != null && y.pivotIdentity && ce({ identity: y.pivotIdentity, columnKey: A(y) || i });
|
|
825
825
|
}
|
|
826
826
|
return {
|
|
@@ -830,7 +830,7 @@ function _r(e) {
|
|
|
830
830
|
...I.sqlChunkEvidence ? { rawTemporalClassification: I.sqlChunkEvidence } : {}
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function C(a, m, h) {
|
|
834
834
|
if (m.activatedColumnKeys.has(a)) {
|
|
835
835
|
const v = he(m, a);
|
|
836
836
|
return v === void 0 ? { kind: "text" } : { kind: "datetime", dateOnly: v };
|
|
@@ -847,7 +847,7 @@ function _r(e) {
|
|
|
847
847
|
if (!Number.isInteger(m) || m < 0)
|
|
848
848
|
throw new Error("totalRows must be a non-negative integer");
|
|
849
849
|
return m === 0 ? void 0 : (t.visibleColumns ?? Object.keys(a)).map((p) => {
|
|
850
|
-
const g = Object.prototype.hasOwnProperty.call(a, p) ? a[p] : p === t.tableTotalsLabelColumnKey ? "Total" : null, v = n ? l(p) : void 0,
|
|
850
|
+
const g = Object.prototype.hasOwnProperty.call(a, p) ? a[p] : p === t.tableTotalsLabelColumnKey ? "Total" : null, v = n ? l(p) : void 0, x = de({
|
|
851
851
|
key: p,
|
|
852
852
|
label: p,
|
|
853
853
|
formattedValues: n,
|
|
@@ -855,9 +855,9 @@ function _r(e) {
|
|
|
855
855
|
...v ? { presentation: { kind: "measure", format: v } } : {}
|
|
856
856
|
});
|
|
857
857
|
if (g == null) return { kind: "empty" };
|
|
858
|
-
if (!n) return U({ value: g, text: String(g), column:
|
|
859
|
-
const
|
|
860
|
-
return U(v &&
|
|
858
|
+
if (!n) return U({ value: g, text: String(g), column: x });
|
|
859
|
+
const S = v ? Zt(g) : null;
|
|
860
|
+
return U(v && S !== null ? { value: S, text: V(S, v), column: x } : { value: g, text: String(g), column: x });
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
863
|
return { format: w, totals: u };
|
|
@@ -880,7 +880,7 @@ const er = /* @__PURE__ */ new Set([
|
|
|
880
880
|
function ee(e) {
|
|
881
881
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function xe(e, t) {
|
|
884
884
|
if (e !== void 0) {
|
|
885
885
|
if (!ee(e))
|
|
886
886
|
throw new Error(`formatting.${t} must be an object`);
|
|
@@ -894,7 +894,7 @@ function Ar(e) {
|
|
|
894
894
|
(a) => Object.prototype.hasOwnProperty.call(e, a)
|
|
895
895
|
);
|
|
896
896
|
if (t)
|
|
897
|
-
throw new
|
|
897
|
+
throw new le(
|
|
898
898
|
`formatting.${t} is retired; formatting.presentationExecutionSnapshot is authoritative.`
|
|
899
899
|
);
|
|
900
900
|
const r = Object.keys(e).find((a) => !er.has(a));
|
|
@@ -903,17 +903,17 @@ function Ar(e) {
|
|
|
903
903
|
const n = typeof e.timezone == "string" ? e.timezone.trim() : "";
|
|
904
904
|
if (!n)
|
|
905
905
|
throw new Error("formatting.timezone must be a non-empty string");
|
|
906
|
-
const o =
|
|
906
|
+
const o = ot(e.delimiter);
|
|
907
907
|
if (!o)
|
|
908
908
|
throw new Error("formatting.delimiter must be a comma, semicolon or tab");
|
|
909
|
-
const l =
|
|
909
|
+
const l = at(e.csvEncoding);
|
|
910
910
|
if (!l)
|
|
911
911
|
throw new Error("formatting.csvEncoding must be 'utf-8-bom' or 'utf-8'");
|
|
912
912
|
if (typeof e.includeHeaders != "boolean")
|
|
913
913
|
throw new Error("formatting.includeHeaders must be a boolean");
|
|
914
914
|
if (e.useFormattedValues !== void 0 && typeof e.useFormattedValues != "boolean")
|
|
915
915
|
throw new Error("formatting.useFormattedValues must be a boolean");
|
|
916
|
-
const s = e.fileFormat === void 0 ? void 0 :
|
|
916
|
+
const s = e.fileFormat === void 0 ? void 0 : st(e.fileFormat);
|
|
917
917
|
if (e.fileFormat !== void 0 && !s)
|
|
918
918
|
throw new Error("formatting.fileFormat must be 'csv' or 'xlsx'");
|
|
919
919
|
if (e.title !== void 0 && typeof e.title != "string")
|
|
@@ -921,37 +921,37 @@ function Ar(e) {
|
|
|
921
921
|
const c = e.visibleColumns === void 0 ? void 0 : Array.isArray(e.visibleColumns) && e.visibleColumns.every((a) => typeof a == "string") ? e.visibleColumns : void 0;
|
|
922
922
|
if (e.visibleColumns !== void 0 && !c)
|
|
923
923
|
throw new Error("formatting.visibleColumns must be an array of strings");
|
|
924
|
-
const f =
|
|
924
|
+
const f = xe(e.columnLabels, "columnLabels");
|
|
925
925
|
if (f && Object.values(f).some((a) => typeof a != "string"))
|
|
926
926
|
throw new Error("formatting.columnLabels values must be strings");
|
|
927
|
-
const d =
|
|
927
|
+
const d = xe(e.columnSettings, "columnSettings"), b = e.tableTotalsLabelColumnKey === void 0 ? void 0 : typeof e.tableTotalsLabelColumnKey == "string" && e.tableTotalsLabelColumnKey.trim() ? e.tableTotalsLabelColumnKey : null;
|
|
928
928
|
if (b === null)
|
|
929
929
|
throw new Error("formatting.tableTotalsLabelColumnKey must be a non-empty string");
|
|
930
930
|
if (b && !(c != null && c.includes(b)))
|
|
931
931
|
throw new Error("formatting.tableTotalsLabelColumnKey must identify a visible column");
|
|
932
|
-
const w =
|
|
932
|
+
const w = et(e.scope, "formatting.scope");
|
|
933
933
|
if (!w.cardId || w.attachmentIndex !== void 0)
|
|
934
934
|
throw new Error("formatting.scope must identify exactly one dashboard card");
|
|
935
|
-
const
|
|
935
|
+
const C = e.useFormattedValues !== !1, u = tt(e.presentationExecutionSnapshot);
|
|
936
936
|
if (n !== u.reportContext.calendar.tz)
|
|
937
937
|
throw new Error(
|
|
938
938
|
"formatting.timezone must equal presentationExecutionSnapshot.reportContext.calendar.tz"
|
|
939
939
|
);
|
|
940
940
|
try {
|
|
941
|
-
|
|
941
|
+
rt({
|
|
942
942
|
snapshot: u,
|
|
943
943
|
expectedScope: { dashboardId: w.dashboardId, cardId: w.cardId },
|
|
944
944
|
visibleColumns: c,
|
|
945
|
-
useFormattedValues:
|
|
945
|
+
useFormattedValues: C
|
|
946
946
|
});
|
|
947
947
|
} catch (a) {
|
|
948
|
-
throw new
|
|
948
|
+
throw new le(
|
|
949
949
|
`formatting.presentationExecutionSnapshot.${a instanceof Error ? a.message : String(a)}`
|
|
950
950
|
);
|
|
951
951
|
}
|
|
952
952
|
return {
|
|
953
953
|
scope: { dashboardId: w.dashboardId, cardId: w.cardId },
|
|
954
|
-
useFormattedValues:
|
|
954
|
+
useFormattedValues: C,
|
|
955
955
|
timezone: n,
|
|
956
956
|
presentationExecutionSnapshot: u,
|
|
957
957
|
delimiter: o,
|
|
@@ -988,9 +988,9 @@ function Ae(e) {
|
|
|
988
988
|
const t = e.split(".");
|
|
989
989
|
return t[t.length - 1].replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(" ").map((o) => o.charAt(0).toUpperCase() + o.slice(1).toLowerCase()).join(" ");
|
|
990
990
|
}
|
|
991
|
-
const
|
|
991
|
+
const Ce = 10;
|
|
992
992
|
function Z(e, t) {
|
|
993
|
-
const r = e.slice(0,
|
|
993
|
+
const r = e.slice(0, Ce).map(t).join(", "), n = e.length - Ce;
|
|
994
994
|
return n > 0 ? `${r}, and ${n} more` : r;
|
|
995
995
|
}
|
|
996
996
|
function rr(e) {
|
|
@@ -998,7 +998,7 @@ function rr(e) {
|
|
|
998
998
|
return;
|
|
999
999
|
const t = Q(e.relativeMeta);
|
|
1000
1000
|
if (t)
|
|
1001
|
-
return
|
|
1001
|
+
return ct(t) || t.unit === "quarter" || t.unit === "year" ? t : void 0;
|
|
1002
1002
|
}
|
|
1003
1003
|
function nr(e, t) {
|
|
1004
1004
|
if (t !== "label") return rr(e);
|
|
@@ -1034,22 +1034,22 @@ function Te(e, t = {}) {
|
|
|
1034
1034
|
timeZone: "UTC"
|
|
1035
1035
|
}).format(new Date(Date.UTC(u, a - 1, m)));
|
|
1036
1036
|
}
|
|
1037
|
-
if (typeof d == "string" &&
|
|
1037
|
+
if (typeof d == "string" && nt(d) === "wall_datetime") {
|
|
1038
1038
|
const [u, a, m, h, p] = d.split(/[-T :.]/).map(Number);
|
|
1039
1039
|
return new Intl.DateTimeFormat(void 0, {
|
|
1040
1040
|
...w,
|
|
1041
1041
|
timeZone: "UTC"
|
|
1042
1042
|
}).format(new Date(Date.UTC(u, a - 1, m, h, p)));
|
|
1043
1043
|
}
|
|
1044
|
-
const
|
|
1045
|
-
if (!isNaN(
|
|
1044
|
+
const C = new Date(d);
|
|
1045
|
+
if (!isNaN(C.getTime()))
|
|
1046
1046
|
try {
|
|
1047
1047
|
return new Intl.DateTimeFormat(void 0, {
|
|
1048
1048
|
...w,
|
|
1049
1049
|
...t.timezone ? { timeZone: t.timezone } : {}
|
|
1050
|
-
}).format(
|
|
1050
|
+
}).format(C);
|
|
1051
1051
|
} catch {
|
|
1052
|
-
return b ?
|
|
1052
|
+
return b ? C.toLocaleString(void 0, w) : C.toLocaleDateString(void 0, w);
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
1055
|
return String(d);
|
|
@@ -1178,8 +1178,8 @@ function lr(e, t, r, n = !1) {
|
|
|
1178
1178
|
return { start: e.start, end: `before ${e.end}` };
|
|
1179
1179
|
}
|
|
1180
1180
|
export {
|
|
1181
|
-
|
|
1182
|
-
|
|
1181
|
+
_r as A,
|
|
1182
|
+
Ce as B,
|
|
1183
1183
|
rr as C,
|
|
1184
1184
|
$e as D,
|
|
1185
1185
|
Te as E,
|
|
@@ -1187,15 +1187,15 @@ export {
|
|
|
1187
1187
|
Nr as G,
|
|
1188
1188
|
Or as H,
|
|
1189
1189
|
lr as I,
|
|
1190
|
-
|
|
1190
|
+
Cr as M,
|
|
1191
1191
|
Rt as P,
|
|
1192
1192
|
vr as a,
|
|
1193
1193
|
Tr as b,
|
|
1194
1194
|
Er as c,
|
|
1195
|
-
|
|
1196
|
-
|
|
1195
|
+
Fr as d,
|
|
1196
|
+
xr as e,
|
|
1197
1197
|
Kr as f,
|
|
1198
|
-
|
|
1198
|
+
Sr as g,
|
|
1199
1199
|
Ir as h,
|
|
1200
1200
|
$r as i,
|
|
1201
1201
|
Kt as j,
|
|
@@ -1205,14 +1205,14 @@ export {
|
|
|
1205
1205
|
Mr as n,
|
|
1206
1206
|
Lt as o,
|
|
1207
1207
|
Nt as p,
|
|
1208
|
-
|
|
1208
|
+
_t as q,
|
|
1209
1209
|
de as r,
|
|
1210
1210
|
At as s,
|
|
1211
1211
|
U as t,
|
|
1212
1212
|
Ut as u,
|
|
1213
1213
|
jt as v,
|
|
1214
1214
|
Pr as w,
|
|
1215
|
-
|
|
1215
|
+
Dr as x,
|
|
1216
1216
|
Ar as y,
|
|
1217
1217
|
Rr as z
|
|
1218
1218
|
};
|