react-semaphor 0.1.568 → 0.1.570
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/README.md +0 -7
- package/dist/analytics-protocol/index.js +434 -454
- package/dist/appearance/index.js +6 -3
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +572 -436
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
- package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/brand-B4BdpAB_.js +54 -0
- package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
- package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
- package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
- package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
- package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
- package/dist/chunks/edit-Bpdh_P_a.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
- package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
- package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
- package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
- package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
- package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
- package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
- package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +55 -0
- package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
- package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Yvhv3WX2.js} +95 -97
- package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-Lkbwycwe.js} +5491 -5683
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
- package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
- package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
- package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1888 -1826
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +349 -353
- package/dist/layouts/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/appearance/index.d.ts +1 -0
- package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
- package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
- package/dist/types/components/surfboard/filter/types.d.ts +5 -4
- package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
- package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
- package/dist/types/index.js +9 -9
- package/dist/types/lib/appearance/aliases.d.ts +42 -0
- package/dist/types/lib/appearance/compiler.d.ts +6 -0
- package/dist/types/lib/appearance/defaults.d.ts +6 -0
- package/dist/types/lib/appearance/index.d.ts +2 -0
- package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
- package/dist/types/lib/appearance/resolver.d.ts +2 -2
- package/dist/types/lib/appearance/types.d.ts +38 -1
- package/dist/types/lib/charts/types.d.ts +6 -2
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
- package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
- package/dist/types/lib/download-pdf.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
- package/dist/types/lib/stores/editor-store.d.ts +0 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
- package/dist/types/lib/types/common-types.d.ts +3 -2
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/lib/types/index.d.ts +1 -1
- package/dist/types/lib/types/summary-types.d.ts +0 -5
- package/dist/types/lib/utils/card-definition.d.ts +7 -7
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +72 -72
- package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +30 -30
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +344 -1772
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
- package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +10 -10
- package/dist/types/shared/temporal/index.d.ts +0 -2
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
- package/package.json +7 -26
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
- package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
- package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CLIro-EG.js +0 -425
- package/dist/chunks/index-CuHybtft.js +0 -51
- package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
- package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
- package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
- package/dist/chunks/operators-B3zZoskU.js +0 -66
- package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
- package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
- package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
- package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
- package/dist/chunks/validators-wtjw0aw6.js +0 -3332
- package/dist/data-app-sdk/index.js +0 -1412
- package/dist/data-app-sdk-adapters/index.js +0 -361
- package/dist/data-app-sdk-validation/index.js +0 -1031
- package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
- package/dist/types/data-app-sdk/adapters.d.ts +0 -35
- package/dist/types/data-app-sdk/builders.d.ts +0 -62
- package/dist/types/data-app-sdk/contracts.d.ts +0 -419
- package/dist/types/data-app-sdk/executor.d.ts +0 -5
- package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
- package/dist/types/data-app-sdk/hooks.d.ts +0 -11
- package/dist/types/data-app-sdk/index.d.ts +0 -9
- package/dist/types/data-app-sdk/provider.d.ts +0 -8
- package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
- package/dist/types/data-app-sdk/selection.d.ts +0 -2
- package/dist/types/data-app-sdk/validation.d.ts +0 -58
- package/dist/types/data-app-sdk-adapters.d.ts +0 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -2
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
- package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
- package/dist/types/shared/temporal/relative-date.d.ts +0 -21
- package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
- package/src/data-app-sdk/README.md +0 -402
package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { au as
|
|
2
|
-
import { h as W, e as
|
|
3
|
-
import {
|
|
4
|
-
import "./matrix-operation-contract-
|
|
1
|
+
import { au as We, i as Ye, j, m as Ze, K as Me, av as ie, aw as De, ax as Je, ay as Ae, az as ke, ai as Qe, an as et, aj as tt, f as rt, a as B, $ as pe, ab as nt, Z as ot, ac as at, ad as st, o as he, s as it, R as be, T as ct, V as lt, a0 as ut, aA as A, aB as U } from "./temporal-input-presentation-CqbJjIuu.js";
|
|
2
|
+
import { h as W, e as mt, p as dt, k as ft } from "./export-file-format-C-tJsxsf.js";
|
|
3
|
+
import { aU as K, a5 as pt, m as G, aT as ht, j as bt, r as Y } from "./validators-B8fpdinG.js";
|
|
4
|
+
import "./matrix-operation-contract-DCVinw1o.js";
|
|
5
5
|
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { readPdfCapacityFacts as yt, PDF_SAFETY_LIMIT_EXCEEDED as ce, PDF_CAPACITY as D, PDF_NUMBER_COLUMN_TOO_WIDE as Re, getUtf8ByteLength as gt, FAST_PDF_POLICY as wt, isPdfCapacityRefusalCode as Ct } from "../pdf-export-policy/index.js";
|
|
7
|
+
import { p as vt } from "./pivot-result-contract-expectations-C-HnUKYe.js";
|
|
8
|
+
import { c as _t, b as ye } from "./pivot-result-identity-B89X5xjb.js";
|
|
9
|
+
import { v as xt, c as Tt } from "./raw-temporal-value-DdT0s47W.js";
|
|
10
|
+
import { a as Ne } from "./metric-comparison-n9NsIa-2.js";
|
|
11
11
|
import "../value-format-preferences/index.js";
|
|
12
12
|
function Et(e, t, r) {
|
|
13
13
|
const n = {
|
|
@@ -22,13 +22,13 @@ function Et(e, t, r) {
|
|
|
22
22
|
negativeStyle: n.type === "currency" ? n.negativeStyle : "minus"
|
|
23
23
|
})}${c ?? ""}`;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return e === null ? { value: e, text: null } : !t || !
|
|
25
|
+
function ee(e, t, r) {
|
|
26
|
+
return e === null ? { value: e, text: null } : !t || !Ye(t) && t.type !== "duration" ? {
|
|
27
27
|
value: e,
|
|
28
28
|
text: j(e, { type: "number", locale: r })
|
|
29
29
|
} : t.type === "duration" ? {
|
|
30
30
|
value: e,
|
|
31
|
-
text:
|
|
31
|
+
text: Ze(e, {
|
|
32
32
|
inputUnit: t.inputUnit,
|
|
33
33
|
outputStyle: t.outputStyle,
|
|
34
34
|
largestUnit: t.largestUnit,
|
|
@@ -70,20 +70,20 @@ function we(e, t) {
|
|
|
70
70
|
function Or(e, t) {
|
|
71
71
|
const r = {
|
|
72
72
|
mode: t.displayMode,
|
|
73
|
-
current:
|
|
73
|
+
current: ee(
|
|
74
74
|
e.currentValue,
|
|
75
75
|
t.metricFormat,
|
|
76
76
|
t.locale
|
|
77
77
|
),
|
|
78
|
-
comparison:
|
|
78
|
+
comparison: ee(
|
|
79
79
|
e.comparisonValue,
|
|
80
80
|
t.metricFormat,
|
|
81
81
|
t.locale
|
|
82
82
|
)
|
|
83
83
|
};
|
|
84
|
-
return (t.displayMode === "difference" || t.displayMode === "both") && (r.difference =
|
|
84
|
+
return (t.displayMode === "difference" || t.displayMode === "both") && (r.difference = ee(
|
|
85
85
|
e.delta,
|
|
86
|
-
|
|
86
|
+
We(t.metricFormat),
|
|
87
87
|
t.locale
|
|
88
88
|
)), (t.displayMode === "percent_change" || t.displayMode === "both") && (r.percentChange = ge(
|
|
89
89
|
e.percentChange,
|
|
@@ -106,7 +106,7 @@ function St(e) {
|
|
|
106
106
|
const t = (o, c) => Number.isInteger(o) ? Math.min(20, Math.max(0, o)) : c, r = t(e.minimumFractionDigits, 0), n = Math.max(r, t(e.maximumFractionDigits, 2));
|
|
107
107
|
return n === 0 ? "" : `.${"0".repeat(n)}`;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function te(e) {
|
|
110
110
|
return `"${e.replace(/"/g, "")}"`;
|
|
111
111
|
}
|
|
112
112
|
function Lt(e) {
|
|
@@ -136,8 +136,8 @@ function Pt(e) {
|
|
|
136
136
|
const n = `${e.useGrouping === !1 ? "0" : "#,##0"}${t}`;
|
|
137
137
|
if (e.type === "currency") {
|
|
138
138
|
const o = Lt(e);
|
|
139
|
-
r = o ? o.side === "before" ? `${
|
|
140
|
-
} else e.type === "percent" ? r = e.percentValueMode === "whole" ? `${n}${
|
|
139
|
+
r = o ? o.side === "before" ? `${te(o.text)}${n}` : `${n}${te(o.text)}` : n;
|
|
140
|
+
} else e.type === "percent" ? r = e.percentValueMode === "whole" ? `${n}${te("%")}` : `${n}%` : r = n;
|
|
141
141
|
}
|
|
142
142
|
return e.negativeStyle === "parentheses" ? `${r};(${r})` : r;
|
|
143
143
|
}
|
|
@@ -162,13 +162,13 @@ function Ce(e) {
|
|
|
162
162
|
...r === void 0 ? {} : { numberFormat: r }
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
167
|
-
return
|
|
165
|
+
const Mt = 15, Dt = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
|
|
166
|
+
function Oe(e) {
|
|
167
|
+
return Dt.test(e) ? e : void 0;
|
|
168
168
|
}
|
|
169
169
|
function ve(e) {
|
|
170
170
|
const r = e.replace(/^-/, "").replace(/[eE].*$/, "").replace(".", "").replace(/^0+/, "").replace(/0+$/, "");
|
|
171
|
-
if (r.length >
|
|
171
|
+
if (r.length > Mt) return !1;
|
|
172
172
|
const n = Number(e);
|
|
173
173
|
return Number.isFinite(n) && (n !== 0 || r.length === 0);
|
|
174
174
|
}
|
|
@@ -191,7 +191,7 @@ function _e(e, t, r) {
|
|
|
191
191
|
if (K(e))
|
|
192
192
|
return ve(e.value) ? { kind: "number", text: t, value: e } : void 0;
|
|
193
193
|
if (r && typeof e == "string") {
|
|
194
|
-
const n =
|
|
194
|
+
const n = Oe(e);
|
|
195
195
|
return n !== void 0 && ve(n) ? { kind: "number", text: t, value: n } : void 0;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
@@ -217,12 +217,12 @@ function X(e) {
|
|
|
217
217
|
function Ur(e) {
|
|
218
218
|
return e.kind === "empty" ? "" : e.text;
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const Ue = 1e4, Ut = 1e6, jr = 5e6, Kr = 1024 ** 3, Vr = 1024 ** 3;
|
|
221
221
|
function Br(e) {
|
|
222
|
-
return e >
|
|
222
|
+
return e > Ue;
|
|
223
223
|
}
|
|
224
224
|
function Xr(e) {
|
|
225
|
-
return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <=
|
|
225
|
+
return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= Ue ? "direct" : e.loadedRowCount <= Ut ? "background" : "blocked";
|
|
226
226
|
}
|
|
227
227
|
const zr = {
|
|
228
228
|
rowLabels: "tabular",
|
|
@@ -253,15 +253,15 @@ function Kt(e) {
|
|
|
253
253
|
}
|
|
254
254
|
function Vt(e, t, r) {
|
|
255
255
|
const n = e.descriptors.measures.filter(
|
|
256
|
-
(s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 &&
|
|
256
|
+
(s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 && pt(s.column.dataType) === "number"
|
|
257
257
|
);
|
|
258
258
|
if (n.length === 0) return r;
|
|
259
259
|
const o = /* @__PURE__ */ new Set();
|
|
260
260
|
e.columns.forEach((s, l) => {
|
|
261
261
|
if (!(s.kind !== "measure" || o.has(s.measureId)))
|
|
262
262
|
for (const f of t) {
|
|
263
|
-
const
|
|
264
|
-
if ((
|
|
263
|
+
const h = f.values[l];
|
|
264
|
+
if ((h == null ? void 0 : h.kind) === "value" && !Kt(h.value)) {
|
|
265
265
|
o.add(s.measureId);
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
@@ -296,54 +296,54 @@ function Xt(e) {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
const zt = "pdf-group-continuation";
|
|
299
|
-
function
|
|
299
|
+
function je(e, t, r) {
|
|
300
300
|
return !(r != null && r.hasTextAffixes) && t.kind === "value" && (typeof t.value == "number" || K(t.value)) ? e : W(e);
|
|
301
301
|
}
|
|
302
302
|
function Ht(e, t, r) {
|
|
303
|
-
const n =
|
|
303
|
+
const n = Me(e.descriptors, t.presentation, r), o = e.columns.map((u) => {
|
|
304
304
|
var a;
|
|
305
305
|
return u.kind === "measure" && ((a = n.measureSemantics.get(u.measureId)) == null ? void 0 : a.isNumeric) === !0;
|
|
306
|
-
}), c = (u) =>
|
|
306
|
+
}), c = (u) => ie([u], n.levels), s = (u, a, m) => De(u, a, t.presentation.totals[m], n.levels), l = e.columns.map((u) => {
|
|
307
307
|
if (u.kind !== "measure") return u.label;
|
|
308
308
|
const a = u.columnPath.map(c);
|
|
309
309
|
return u.role !== "member" && a.push(s(u.columnPath, u.role, "columns")), [...a, u.label].join(" / ");
|
|
310
310
|
}), f = Math.min(t.spec.columns.length, Math.max(
|
|
311
311
|
0,
|
|
312
312
|
...e.columns.map((u) => u.kind === "measure" ? u.columnPath.length + (u.role !== "member" ? 1 : 0) : 0)
|
|
313
|
-
)),
|
|
313
|
+
)), h = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? c(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), d = (u, a) => Je({
|
|
314
314
|
path: u.rowPath,
|
|
315
315
|
role: u.kind === "layout" ? u.role : "member",
|
|
316
316
|
levelCount: Math.max(1, t.spec.rows.length),
|
|
317
317
|
repeatLabels: t.presentation.layout.kind !== "tabular" || t.presentation.layout.repeatLabels,
|
|
318
318
|
previousPath: a == null ? void 0 : a.rowPath
|
|
319
|
-
}),
|
|
319
|
+
}), p = (u, a) => {
|
|
320
320
|
if (u.kind !== "layout") throw new Error("Layout presentation requires layout rows.");
|
|
321
321
|
if (u.values.length !== e.columns.length) throw new Error("Matrix row does not match its frozen layout.");
|
|
322
|
-
const m =
|
|
323
|
-
return e.columns.map((
|
|
324
|
-
if (
|
|
322
|
+
const m = d(u, a);
|
|
323
|
+
return e.columns.map((y, b) => {
|
|
324
|
+
if (y.kind === "hierarchy")
|
|
325
325
|
return `${" ".repeat(Math.max(0, u.rowPath.length - 1))}${s(u.rowPath, u.role, "rows")}`;
|
|
326
|
-
if (
|
|
327
|
-
const C = t.spec.rows.findIndex((S) => S.id ===
|
|
328
|
-
return
|
|
326
|
+
if (y.kind === "level") {
|
|
327
|
+
const C = t.spec.rows.findIndex((S) => S.id === y.levelId), _ = m[C];
|
|
328
|
+
return _ != null && _.visible ? _.total ? s(u.rowPath, u.role, "rows") : ie(_.path, n.levels) : "";
|
|
329
329
|
}
|
|
330
|
-
const
|
|
331
|
-
if (
|
|
330
|
+
const v = u.values[b], w = n.measures.get(y.measureId);
|
|
331
|
+
if (v.kind === "value" && !w)
|
|
332
332
|
throw new Error("Matrix value is missing its measure descriptor.");
|
|
333
|
-
return Ae(
|
|
333
|
+
return Ae(v, w, t.presentation.absence);
|
|
334
334
|
});
|
|
335
|
-
},
|
|
336
|
-
const
|
|
337
|
-
return
|
|
335
|
+
}, x = (u, a) => p(u, a).map((m, y) => {
|
|
336
|
+
const b = e.columns[y];
|
|
337
|
+
return b.kind === "measure" ? je(m, u.values[y], n.measureSemantics.get(b.measureId)) : W(m);
|
|
338
338
|
});
|
|
339
339
|
return {
|
|
340
340
|
headers: l,
|
|
341
|
-
headerBands:
|
|
341
|
+
headerBands: h,
|
|
342
342
|
numericColumns: o,
|
|
343
343
|
/** The card's prepared formats this presentation formats with (the Excel form reads its measure formats). */
|
|
344
344
|
formatting: n,
|
|
345
345
|
/** A row's cells; after `previous`, a tabular layout prints each label once. */
|
|
346
|
-
row: (u, a) =>
|
|
346
|
+
row: (u, a) => p(u, a),
|
|
347
347
|
/**
|
|
348
348
|
* Level columns whose group label the row above shows, so this row
|
|
349
349
|
* continues the group (Plan 2, 2d, C8). Only a member row after a member
|
|
@@ -351,17 +351,17 @@ function Ht(e, t, r) {
|
|
|
351
351
|
* above and below it.
|
|
352
352
|
*/
|
|
353
353
|
continuedColumns: (u, a) => {
|
|
354
|
-
const m = (
|
|
354
|
+
const m = (b) => (b == null ? void 0 : b.kind) === "layout" && b.role === "member";
|
|
355
355
|
if (!m(u) || !m(a)) return [];
|
|
356
|
-
const
|
|
357
|
-
return e.columns.flatMap((
|
|
356
|
+
const y = d(u, a);
|
|
357
|
+
return e.columns.flatMap((b, v) => {
|
|
358
358
|
var C;
|
|
359
|
-
if (
|
|
360
|
-
const
|
|
361
|
-
return
|
|
359
|
+
if (b.kind !== "level") return [];
|
|
360
|
+
const w = t.spec.rows.findIndex((_) => _.id === b.levelId);
|
|
361
|
+
return w < u.rowPath.length && ((C = y[w]) == null ? void 0 : C.visible) === !1 ? [v] : [];
|
|
362
362
|
});
|
|
363
363
|
},
|
|
364
|
-
csvRow: (u) =>
|
|
364
|
+
csvRow: (u) => x(u),
|
|
365
365
|
/**
|
|
366
366
|
* `previousRow` is the row before `data[0]`, carried by the export's
|
|
367
367
|
* continuation, so a tabular layout prints each label once across the
|
|
@@ -369,7 +369,7 @@ function Ht(e, t, r) {
|
|
|
369
369
|
* formatter state or an earlier worker. Without it, the first row prints
|
|
370
370
|
* its labels.
|
|
371
371
|
*/
|
|
372
|
-
csvRows: (u, a) => u.map((m,
|
|
372
|
+
csvRows: (u, a) => u.map((m, y) => x(m, y ? u[y - 1] : a ?? void 0))
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
375
|
function Gr(e) {
|
|
@@ -378,7 +378,7 @@ function Gr(e) {
|
|
|
378
378
|
function qr(e, t, r) {
|
|
379
379
|
return Gt(e, t, r).map((n, o) => {
|
|
380
380
|
const c = t.columns[o];
|
|
381
|
-
return c.kind === "measure" ?
|
|
381
|
+
return c.kind === "measure" ? je(n, e.values[o], r.measureSemantics.get(c.measureId)) : W(n);
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
function Gt(e, t, r) {
|
|
@@ -393,7 +393,7 @@ function Gt(e, t, r) {
|
|
|
393
393
|
}
|
|
394
394
|
const s = o.kind === "level" ? n.find((l) => l.levelId === o.levelId) : void 0;
|
|
395
395
|
if (!s) throw new Error("Flat Matrix row does not match its frozen layout.");
|
|
396
|
-
return
|
|
396
|
+
return ie([s], r.levels);
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
function qt(e) {
|
|
@@ -430,7 +430,7 @@ function qt(e) {
|
|
|
430
430
|
repeatHeader: !0,
|
|
431
431
|
headerType: s === t.headerBands.length - 1 ? "metrics" : "pivot-level",
|
|
432
432
|
headerRowIndex: o.length,
|
|
433
|
-
cells: l.map((f,
|
|
433
|
+
cells: l.map((f, h) => n(f, h, !0))
|
|
434
434
|
});
|
|
435
435
|
return {
|
|
436
436
|
headers: o,
|
|
@@ -442,7 +442,7 @@ function qt(e) {
|
|
|
442
442
|
subtotalLevel: String(s.rowPath.length),
|
|
443
443
|
// A tabular layout prints each label once unless it repeats them; the
|
|
444
444
|
// blank cell continues its group, so a grid draws no rule above it.
|
|
445
|
-
cells: t.row(s, e.rows[l - 1]).map((
|
|
445
|
+
cells: t.row(s, e.rows[l - 1]).map((h, d) => f.has(d) ? { ...n(h, d, !1), className: zt } : n(h, d, !1))
|
|
446
446
|
};
|
|
447
447
|
}),
|
|
448
448
|
grandTotal: null,
|
|
@@ -460,11 +460,11 @@ function qt(e) {
|
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
function Wt(e, t, r) {
|
|
463
|
-
const { levels: n } =
|
|
464
|
-
if (
|
|
465
|
-
const
|
|
466
|
-
let
|
|
467
|
-
return
|
|
463
|
+
const { levels: n } = Me(e.descriptors, t.presentation, r), o = t.spec.columns.length > 0, c = [], s = [], l = e.columns.map((h, d) => {
|
|
464
|
+
if (h.kind !== "measure") return null;
|
|
465
|
+
const p = o ? `${h.role}:${G(h.columnPath)}` : `measure:${d}`;
|
|
466
|
+
let x = c.indexOf(p);
|
|
467
|
+
return x < 0 && (x = c.push(p) - 1, s.push(o ? De(h.columnPath, h.role, t.presentation.totals.columns, n) : h.label)), x;
|
|
468
468
|
}), f = t.spec.columns[t.spec.columns.length - 1];
|
|
469
469
|
return {
|
|
470
470
|
columnGroups: l,
|
|
@@ -479,35 +479,35 @@ function Wr(e) {
|
|
|
479
479
|
presentation: Vt(t, r, e.request.presentation)
|
|
480
480
|
}, c = qt({ layout: t, rows: r, request: o, report: n }), s = Xt(r), l = Wt(t, o, n), f = {
|
|
481
481
|
...c,
|
|
482
|
-
rows: c.rows.map((
|
|
482
|
+
rows: c.rows.map((h, d) => ({ ...h, keepWithPrevious: s[d] })),
|
|
483
483
|
metadata: { ...c.metadata, ...l }
|
|
484
484
|
};
|
|
485
485
|
return { request: o, table: f, ...l };
|
|
486
486
|
}
|
|
487
|
-
const F = (e) => e.toLocaleString("en-US"), H = (e) => `${F(Math.ceil(e / 1048576))} MB`,
|
|
487
|
+
const F = (e) => e.toLocaleString("en-US"), H = (e) => `${F(Math.ceil(e / 1048576))} MB`, re = "export the data as CSV or Excel";
|
|
488
488
|
function Yr(e) {
|
|
489
|
-
const t =
|
|
489
|
+
const t = yt(e.facts), r = e.dataExport ? `Add a filter to narrow it, or ${re}.` : "Add a filter to narrow it, then export again.";
|
|
490
490
|
switch (e.code) {
|
|
491
491
|
case "PDF_ROW_LIMIT_EXCEEDED": {
|
|
492
|
-
const n = e.subject ?? "This table", o = t.rowLimit ??
|
|
492
|
+
const n = e.subject ?? "This table", o = t.rowLimit ?? D.maxTableRows;
|
|
493
493
|
return t.rowCount !== void 0 ? `${n} has ${F(t.rowCount)} rows. A PDF holds up to ${F(o)} rows per table. ${r}` : `${n} has more than ${F(o)} rows, the most a PDF holds per table. ${r}`;
|
|
494
494
|
}
|
|
495
495
|
case "PDF_PAGE_LIMIT_EXCEEDED": {
|
|
496
|
-
const n = e.subject ?? "This PDF", o = t.pageLimit ??
|
|
496
|
+
const n = e.subject ?? "This PDF", o = t.pageLimit ?? D.maxPages;
|
|
497
497
|
return t.pageCount !== void 0 ? `${n} is ${F(t.pageCount)} pages. A PDF holds up to ${F(o)}. ${r}` : `${n} is longer than ${F(o)} pages, the most a PDF holds. ${r}`;
|
|
498
498
|
}
|
|
499
499
|
case "PDF_SIZE_LIMIT_EXCEEDED": {
|
|
500
|
-
const n = e.subject ?? "This PDF", o = t.byteLimit ??
|
|
500
|
+
const n = e.subject ?? "This PDF", o = t.byteLimit ?? D.maxFileBytes;
|
|
501
501
|
return t.bytes !== void 0 ? `${n} is ${H(t.bytes)}. A PDF file holds up to ${H(o)}. ${r}` : `${n} is larger than ${H(o)}, the most a PDF file holds. ${r}`;
|
|
502
502
|
}
|
|
503
503
|
case "PDF_CAPTURE_TOO_TALL":
|
|
504
|
-
return `${e.subject ?? "This dashboard"} is too long to print as one PDF. Print one sheet or fewer cards${e.dataExport ? `, or ${
|
|
504
|
+
return `${e.subject ?? "This dashboard"} is too long to print as one PDF. Print one sheet or fewer cards${e.dataExport ? `, or ${re}` : ""}.`;
|
|
505
505
|
case Re:
|
|
506
|
-
return `A number in this table is too wide for its column in a PDF. Use landscape or fewer columns${e.dataExport ? `, or ${
|
|
506
|
+
return `A number in this table is too wide for its column in a PDF. Use landscape or fewer columns${e.dataExport ? `, or ${re}` : ""}.`;
|
|
507
507
|
case ce:
|
|
508
|
-
return `This PDF is over what a PDF holds: ${F(
|
|
509
|
-
|
|
510
|
-
)} pages and ${H(
|
|
508
|
+
return `This PDF is over what a PDF holds: ${F(D.maxTableRows)} rows per table, ${F(
|
|
509
|
+
D.maxPages
|
|
510
|
+
)} pages and ${H(D.maxFileBytes)}. ${r}`;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
class Yt extends Error {
|
|
@@ -516,7 +516,7 @@ class Yt extends Error {
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
function Zt(e) {
|
|
519
|
-
return
|
|
519
|
+
return Ct(e) || e === ce || e === Re;
|
|
520
520
|
}
|
|
521
521
|
function xe(e) {
|
|
522
522
|
if (!e || typeof e != "object")
|
|
@@ -551,7 +551,7 @@ async function Jt(e) {
|
|
|
551
551
|
}
|
|
552
552
|
async function Zr(e) {
|
|
553
553
|
if (!e.token) throw new Error("Missing auth token for PDF export");
|
|
554
|
-
if (
|
|
554
|
+
if (gt(e.serializedPayload) > wt.maxRequestBytes)
|
|
555
555
|
throw new Error("Fast-path PDF request exceeds the structured body limit");
|
|
556
556
|
const t = await (e.fetchImpl ?? fetch)(e.url, {
|
|
557
557
|
method: "POST",
|
|
@@ -569,7 +569,7 @@ async function Zr(e) {
|
|
|
569
569
|
throw new Error("Fast-path PDF response missing download URL");
|
|
570
570
|
return r;
|
|
571
571
|
}
|
|
572
|
-
const Jr = 1,
|
|
572
|
+
const Jr = 1, Ke = ["loading", "measuring", "checking", "laidOut"], Qt = [
|
|
573
573
|
// Already emitted before these contracts; names kept.
|
|
574
574
|
"document_matrix_too_large",
|
|
575
575
|
"document_matrix_unavailable",
|
|
@@ -592,14 +592,14 @@ const Jr = 1, je = ["loading", "measuring", "checking", "laidOut"], Qt = [
|
|
|
592
592
|
function Qr(e) {
|
|
593
593
|
return Qt.includes(e);
|
|
594
594
|
}
|
|
595
|
-
const er = 64, tr = 120, rr = 3, nr = 80, or = [...
|
|
596
|
-
function
|
|
595
|
+
const er = 64, tr = 120, rr = 3, nr = 80, or = [...Ke, "noPageStack", "unknown"];
|
|
596
|
+
function ne(e, t) {
|
|
597
597
|
return typeof e != "string" ? void 0 : e.trim().slice(0, t).trim() || void 0;
|
|
598
598
|
}
|
|
599
599
|
function $(e, t) {
|
|
600
600
|
return typeof e == "number" && Number.isInteger(e) && e >= t ? e : void 0;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function oe(e, t) {
|
|
603
603
|
return t.includes(e) ? e : void 0;
|
|
604
604
|
}
|
|
605
605
|
function ar(e) {
|
|
@@ -611,17 +611,17 @@ function ar(e) {
|
|
|
611
611
|
return {};
|
|
612
612
|
}
|
|
613
613
|
if (!t || typeof t != "object" || Array.isArray(t)) return {};
|
|
614
|
-
const r = t, n = Array.isArray(r.inputLabels) ? r.inputLabels.map((c) =>
|
|
615
|
-
sectionId:
|
|
616
|
-
sectionTitle:
|
|
614
|
+
const r = t, n = Array.isArray(r.inputLabels) ? r.inputLabels.map((c) => ne(c, nr)).filter((c) => c !== void 0).slice(0, rr) : [], o = {
|
|
615
|
+
sectionId: ne(r.sectionId, er),
|
|
616
|
+
sectionTitle: ne(r.sectionTitle, tr),
|
|
617
617
|
pageNumber: $(r.pageNumber, 1),
|
|
618
618
|
rowCount: $(r.rowCount, 0),
|
|
619
619
|
rowLimit: $(r.rowLimit, 1),
|
|
620
620
|
inputLabels: n.length ? n : void 0,
|
|
621
|
-
overflowAxis:
|
|
621
|
+
overflowAxis: oe(r.overflowAxis, ["height", "width"]),
|
|
622
622
|
overflowPx: $(r.overflowPx, 0),
|
|
623
|
-
matrixLimit:
|
|
624
|
-
layoutStage:
|
|
623
|
+
matrixLimit: oe(r.matrixLimit, ["rows", "bytes"]),
|
|
624
|
+
layoutStage: oe(r.layoutStage, or),
|
|
625
625
|
loadingSectionCount: $(r.loadingSectionCount, 0),
|
|
626
626
|
measuredRowCount: $(r.measuredRowCount, 0),
|
|
627
627
|
totalRowCount: $(r.totalRowCount, 0),
|
|
@@ -674,9 +674,9 @@ function en(e) {
|
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
function sr(e) {
|
|
677
|
-
return
|
|
677
|
+
return Ke.includes(e);
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ae(e) {
|
|
680
680
|
return typeof e == "number" && Number.isInteger(e) && e >= 0;
|
|
681
681
|
}
|
|
682
682
|
function tn(e) {
|
|
@@ -689,25 +689,25 @@ function tn(e) {
|
|
|
689
689
|
}
|
|
690
690
|
if (!t || typeof t != "object" || Array.isArray(t)) return;
|
|
691
691
|
const { stage: r, measuredRowCount: n, totalRowCount: o, pageCount: c } = t;
|
|
692
|
-
if (!(!sr(r) || !
|
|
692
|
+
if (!(!sr(r) || !ae(n) || o !== null && !ae(o) || c !== null && !ae(c)))
|
|
693
693
|
return { stage: r, measuredRowCount: n, totalRowCount: o, pageCount: c };
|
|
694
694
|
}
|
|
695
695
|
function ir(e, t) {
|
|
696
696
|
return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === void 0;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Ve(e) {
|
|
699
699
|
return new Map(
|
|
700
700
|
e.presentationExecutionSnapshot.resolvedFormats.flatMap(
|
|
701
701
|
(t) => t.format.type === "raw_temporal" && t.target.kind === "column" && ir(t.scope, e.scope) ? [[t.target.columnKey, t.format]] : []
|
|
702
702
|
)
|
|
703
703
|
);
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Be(e) {
|
|
706
706
|
const t = e == null ? void 0 : e.sql, r = e == null ? void 0 : e.python;
|
|
707
707
|
return (e == null ? void 0 : e.resultOwner) === "freeform" && typeof t == "string" && !!t.trim() && (typeof r != "string" || !r.trim());
|
|
708
708
|
}
|
|
709
709
|
function rn(e) {
|
|
710
|
-
return e.formatting.useFormattedValues !== !1 &&
|
|
710
|
+
return e.formatting.useFormattedValues !== !1 && Be(e.queryPayload) && Ve(e.formatting).size > 0;
|
|
711
711
|
}
|
|
712
712
|
function cr(e, t) {
|
|
713
713
|
return e.map((r, n) => {
|
|
@@ -725,7 +725,7 @@ function lr(e) {
|
|
|
725
725
|
activatedColumnKeys: /* @__PURE__ */ new Set(),
|
|
726
726
|
byColumnKey: /* @__PURE__ */ new Map()
|
|
727
727
|
};
|
|
728
|
-
const t =
|
|
728
|
+
const t = Ve(e.formatting), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
|
|
729
729
|
if (t.size === 0)
|
|
730
730
|
return { activatedColumnKeys: r, byColumnKey: n };
|
|
731
731
|
const o = new Map(
|
|
@@ -733,34 +733,34 @@ function lr(e) {
|
|
|
733
733
|
const f = l.key || l.field;
|
|
734
734
|
return f ? [[f, l]] : [];
|
|
735
735
|
})
|
|
736
|
-
), c =
|
|
736
|
+
), c = Be(e.queryPayload), s = /* @__PURE__ */ new Map();
|
|
737
737
|
for (const [l, f] of t) {
|
|
738
|
-
const
|
|
739
|
-
let
|
|
740
|
-
if (
|
|
741
|
-
|
|
738
|
+
const h = o.get(l);
|
|
739
|
+
let d;
|
|
740
|
+
if (h != null && h.rawTemporal)
|
|
741
|
+
d = xt(h, {
|
|
742
742
|
metadataRequired: !0
|
|
743
743
|
}), r.add(l);
|
|
744
744
|
else if (c) {
|
|
745
745
|
r.add(l);
|
|
746
|
-
const
|
|
746
|
+
const p = Qe({
|
|
747
747
|
columnKey: l,
|
|
748
748
|
values: cr(e.records, l)
|
|
749
749
|
});
|
|
750
|
-
s.set(l,
|
|
750
|
+
s.set(l, p), p.status === "classified" && (d = p.metadata);
|
|
751
751
|
} else
|
|
752
752
|
continue;
|
|
753
|
-
|
|
754
|
-
metadata:
|
|
753
|
+
d && n.set(l, {
|
|
754
|
+
metadata: d,
|
|
755
755
|
format: f,
|
|
756
|
-
formatValue:
|
|
756
|
+
formatValue: et({ metadata: d, format: f })
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
759
|
return {
|
|
760
760
|
activatedColumnKeys: r,
|
|
761
761
|
byColumnKey: n,
|
|
762
762
|
...c ? {
|
|
763
|
-
sqlChunkEvidence:
|
|
763
|
+
sqlChunkEvidence: tt(s)
|
|
764
764
|
} : {}
|
|
765
765
|
};
|
|
766
766
|
}
|
|
@@ -783,7 +783,7 @@ function Te(e, t) {
|
|
|
783
783
|
const r = e.byColumnKey.get(t);
|
|
784
784
|
return r ? r.metadata.valueKind === "date" : void 0;
|
|
785
785
|
}
|
|
786
|
-
const mr = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), dr = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, fr = /^\d{4}-\d{2}-\d{2}$/,
|
|
786
|
+
const mr = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), dr = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, fr = /^\d{4}-\d{2}-\d{2}$/, Xe = "MM/dd/yyyy";
|
|
787
787
|
function q(e) {
|
|
788
788
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
789
789
|
}
|
|
@@ -800,7 +800,7 @@ function $e(e, t) {
|
|
|
800
800
|
return q(r.dateFormat) ? r.dateFormat : {};
|
|
801
801
|
}
|
|
802
802
|
function Fe(e) {
|
|
803
|
-
return e.useCustomFormat && e.customFormat ? e.customFormat : e.format ||
|
|
803
|
+
return e.useCustomFormat && e.customFormat ? e.customFormat : e.format || Xe;
|
|
804
804
|
}
|
|
805
805
|
function Se(e, t) {
|
|
806
806
|
return e && e !== "auto" ? e : t;
|
|
@@ -815,10 +815,10 @@ function hr(e) {
|
|
|
815
815
|
return Number.isFinite(t) ? t : null;
|
|
816
816
|
}
|
|
817
817
|
function br(e) {
|
|
818
|
-
const t =
|
|
818
|
+
const t = Oe(e);
|
|
819
819
|
if (t !== void 0)
|
|
820
820
|
try {
|
|
821
|
-
return
|
|
821
|
+
return ht(t, /[.eE]/.test(t) ? "decimal" : "integer");
|
|
822
822
|
} catch {
|
|
823
823
|
return;
|
|
824
824
|
}
|
|
@@ -827,82 +827,82 @@ function yr(e) {
|
|
|
827
827
|
return e.calendar.fiscalCalendar && (e.granularity === "quarter" || e.granularity === "year") ? "fiscal" : e.granularity;
|
|
828
828
|
}
|
|
829
829
|
function nn(e) {
|
|
830
|
-
const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, c = (a) =>
|
|
830
|
+
const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, c = (a) => rt({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } }), s = (a) => ot({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } });
|
|
831
831
|
function l(a) {
|
|
832
|
-
var
|
|
833
|
-
if ((
|
|
834
|
-
const m = a.columns.map(O).filter((
|
|
832
|
+
var y;
|
|
833
|
+
if ((y = t.visibleColumns) != null && y.length) return t.visibleColumns;
|
|
834
|
+
const m = a.columns.map(O).filter((b) => !!b);
|
|
835
835
|
return m.length > 0 ? m : a.records[0] ? Object.keys(a.records[0]) : [];
|
|
836
836
|
}
|
|
837
837
|
function f(a, m) {
|
|
838
|
-
return t.columnLabels && Object.prototype.hasOwnProperty.call(t.columnLabels, a) && t.columnLabels[a] || void 0 ||
|
|
838
|
+
return t.columnLabels && Object.prototype.hasOwnProperty.call(t.columnLabels, a) && t.columnLabels[a] || void 0 || h(m) || (m == null ? void 0 : m.label) || (m == null ? void 0 : m.headerName) || a;
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
const
|
|
842
|
-
if (!
|
|
843
|
-
const
|
|
844
|
-
return
|
|
845
|
-
members:
|
|
840
|
+
function h(a, m) {
|
|
841
|
+
const y = a == null ? void 0 : a.pivotIdentity;
|
|
842
|
+
if (!y || !y.members || y.members.length === 0) return;
|
|
843
|
+
const b = ye({ identity: y, columnKey: (a == null ? void 0 : a.key) || (a == null ? void 0 : a.field) || "" });
|
|
844
|
+
return vt({
|
|
845
|
+
members: b,
|
|
846
846
|
metricLabel: (a == null ? void 0 : a.label) || (a == null ? void 0 : a.headerName),
|
|
847
847
|
mode: n ? "formatted" : "canonical",
|
|
848
|
-
resolveTemporalFormat: (
|
|
849
|
-
const
|
|
850
|
-
if (!(
|
|
848
|
+
resolveTemporalFormat: (v) => {
|
|
849
|
+
const w = b.find((_) => _.fieldId === v);
|
|
850
|
+
if (!(w != null && w.temporalBucket)) return;
|
|
851
851
|
const C = pe({
|
|
852
852
|
snapshot: t.presentationExecutionSnapshot,
|
|
853
853
|
scope: o,
|
|
854
|
-
target: { kind: "field", fieldId:
|
|
854
|
+
target: { kind: "field", fieldId: v, role: "pivotby" }
|
|
855
855
|
});
|
|
856
|
-
return C ?
|
|
856
|
+
return C ? d(w.temporalBucket, C) : void 0;
|
|
857
857
|
}
|
|
858
858
|
}).flattenedLabel;
|
|
859
859
|
}
|
|
860
|
-
function
|
|
861
|
-
return
|
|
860
|
+
function d(a, m) {
|
|
861
|
+
return nt({
|
|
862
862
|
metadata: a,
|
|
863
863
|
cardFormat: m,
|
|
864
864
|
locale: m.locale,
|
|
865
865
|
...m.presentation.mode === "auto" ? { styles: m.presentation.styles } : {}
|
|
866
866
|
}).format;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
const { records:
|
|
868
|
+
function p(a, m) {
|
|
869
|
+
const { records: y, columns: b } = a, v = q(r.cardConfig) ? r.cardConfig : void 0, w = v == null ? void 0 : v.pivotByColumns, C = Array.isArray(w) ? w.flatMap(
|
|
870
870
|
(i) => q(i) && typeof i.id == "string" && i.id ? [i.id] : []
|
|
871
871
|
) : [];
|
|
872
|
-
|
|
873
|
-
|
|
872
|
+
_t(
|
|
873
|
+
b.map((i) => ({ key: O(i) || "<unknown>", pivotIdentity: i.pivotIdentity })),
|
|
874
874
|
{ expectedPivotFieldIds: C }
|
|
875
875
|
);
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
const
|
|
879
|
-
return
|
|
876
|
+
const _ = l(a), S = new Map(
|
|
877
|
+
b.flatMap((i) => {
|
|
878
|
+
const g = O(i);
|
|
879
|
+
return g ? [[g, i]] : [];
|
|
880
880
|
})
|
|
881
|
-
),
|
|
882
|
-
records:
|
|
883
|
-
columns:
|
|
881
|
+
), He = new Map(a.resultColumns.map((i) => [i.key, i.dataType])), I = lr({
|
|
882
|
+
records: y,
|
|
883
|
+
columns: b,
|
|
884
884
|
formatting: t,
|
|
885
885
|
queryPayload: r
|
|
886
|
-
}),
|
|
887
|
-
|
|
888
|
-
const
|
|
889
|
-
return
|
|
886
|
+
}), Z = new Map(
|
|
887
|
+
b.flatMap((i) => {
|
|
888
|
+
const g = O(i);
|
|
889
|
+
return g && i.temporalBucket ? [[g, i.temporalBucket]] : [];
|
|
890
890
|
})
|
|
891
891
|
), ue = /* @__PURE__ */ new Map();
|
|
892
|
-
for (const i of
|
|
893
|
-
const
|
|
892
|
+
for (const i of _) {
|
|
893
|
+
const g = pe({
|
|
894
894
|
snapshot: t.presentationExecutionSnapshot,
|
|
895
895
|
scope: o,
|
|
896
896
|
target: { kind: "column", columnKey: i }
|
|
897
|
-
}), T =
|
|
897
|
+
}), T = Z.get(i);
|
|
898
898
|
if (n) {
|
|
899
|
-
if (
|
|
900
|
-
if (T && !
|
|
899
|
+
if (g && !T) throw new Error(`Missing temporal bucket metadata for column "${i}"`);
|
|
900
|
+
if (T && !g) throw new Error(`Missing resolved temporal presentation for column "${i}"`);
|
|
901
901
|
}
|
|
902
|
-
|
|
902
|
+
g && T && ue.set(i, d(T, g));
|
|
903
903
|
}
|
|
904
|
-
const
|
|
905
|
-
const
|
|
904
|
+
const J = _.map((i) => {
|
|
905
|
+
const g = He.get(i), T = g && mr.has(g) ? g : "unknown", E = n ? x(i, I, Z) : void 0, P = f(i, S.get(i)), k = n && I.activatedColumnKeys.has(i) && Te(I, i) === void 0;
|
|
906
906
|
return {
|
|
907
907
|
key: i,
|
|
908
908
|
label: P,
|
|
@@ -912,104 +912,104 @@ function nn(e) {
|
|
|
912
912
|
...k ? { xlsxPending: !0 } : {}
|
|
913
913
|
};
|
|
914
914
|
});
|
|
915
|
-
function
|
|
915
|
+
function Ge(i, g, T, E) {
|
|
916
916
|
if (!n) return { text: Ee(i), value: i };
|
|
917
|
-
const P = ur({ value: i, columnKey:
|
|
917
|
+
const P = ur({ value: i, columnKey: g, rowIndex: T, resolution: I });
|
|
918
918
|
if (P !== void 0) return { text: P.text, value: i, ...P.wallClock ? { wallClock: P.wallClock } : {} };
|
|
919
|
-
const k =
|
|
919
|
+
const k = Z.get(g);
|
|
920
920
|
if (k) {
|
|
921
|
-
const L = ue.get(
|
|
922
|
-
if (!L) throw new Error(`Missing resolved temporal presentation for column "${
|
|
921
|
+
const L = ue.get(g);
|
|
922
|
+
if (!L) throw new Error(`Missing resolved temporal presentation for column "${g}"`);
|
|
923
923
|
if (i != null && typeof i != "string")
|
|
924
|
-
throw new Error(`Canonical temporal column "${
|
|
925
|
-
const R = i ?? null, N =
|
|
924
|
+
throw new Error(`Canonical temporal column "${g}" must contain a string or null`);
|
|
925
|
+
const R = i ?? null, N = at(R, k);
|
|
926
926
|
return {
|
|
927
|
-
text:
|
|
927
|
+
text: st({ value: R, metadata: k, format: L }),
|
|
928
928
|
value: i,
|
|
929
929
|
...N ? { wallClock: N } : {}
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
932
|
if (i == null) return { text: "", value: i };
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
933
|
+
const Q = s(g);
|
|
934
|
+
if (Q && typeof i == "number" && Number.isFinite(i))
|
|
935
935
|
return {
|
|
936
936
|
text: he(
|
|
937
937
|
new Date(i).toISOString(),
|
|
938
|
-
|
|
939
|
-
Se(
|
|
938
|
+
Q.pattern || Xe,
|
|
939
|
+
Se(Q.timezone, t.timezone),
|
|
940
940
|
"UTC"
|
|
941
941
|
),
|
|
942
942
|
value: i
|
|
943
943
|
};
|
|
944
|
-
const
|
|
944
|
+
const M = c(g);
|
|
945
945
|
if (typeof i == "number")
|
|
946
|
-
return { text:
|
|
946
|
+
return { text: M ? B(i, M) : String(i), value: i };
|
|
947
947
|
if (K(i))
|
|
948
|
-
return { text:
|
|
949
|
-
const V = $e(t,
|
|
948
|
+
return { text: M ? B(i, M) : i.value, value: i };
|
|
949
|
+
const V = $e(t, g);
|
|
950
950
|
if (V && (i instanceof Date || typeof i == "string" && dr.test(i))) {
|
|
951
|
-
const L = i instanceof Date ? i.toISOString() : i, R = typeof i == "string" && fr.test(i), N = R ? "UTC" : Se(V.timezone, t.timezone), de = R ? "UTC" : V.sourceTimezone || "auto", fe =
|
|
951
|
+
const L = i instanceof Date ? i.toISOString() : i, R = typeof i == "string" && fr.test(i), N = R ? "UTC" : Se(V.timezone, t.timezone), de = R ? "UTC" : V.sourceTimezone || "auto", fe = it(L, N, de);
|
|
952
952
|
return {
|
|
953
953
|
text: he(L, Fe(V), N, de),
|
|
954
954
|
value: i,
|
|
955
955
|
...fe ? { wallClock: fe } : {}
|
|
956
956
|
};
|
|
957
957
|
}
|
|
958
|
-
if (typeof i == "string" &&
|
|
958
|
+
if (typeof i == "string" && M && E.dataType === "number") {
|
|
959
959
|
const L = br(i);
|
|
960
|
-
if (L) return { text: B(L,
|
|
960
|
+
if (L) return { text: B(L, M), value: i };
|
|
961
961
|
}
|
|
962
962
|
return { text: Ee(i), value: i };
|
|
963
963
|
}
|
|
964
|
-
const
|
|
965
|
-
(i,
|
|
966
|
-
const E =
|
|
964
|
+
const qe = y.map(
|
|
965
|
+
(i, g) => J.map((T) => {
|
|
966
|
+
const E = Ge(i[T.key], T.key, g, T);
|
|
967
967
|
return X({ value: E.value, text: E.text, column: T.xlsx, wallClock: E.wallClock });
|
|
968
968
|
})
|
|
969
969
|
), me = (m == null ? void 0 : m.withHeader) !== !1 && t.includeHeaders;
|
|
970
970
|
if (me)
|
|
971
|
-
for (const i of
|
|
972
|
-
const
|
|
973
|
-
|
|
971
|
+
for (const i of _) {
|
|
972
|
+
const g = S.get(i);
|
|
973
|
+
g != null && g.pivotIdentity && ye({ identity: g.pivotIdentity, columnKey: O(g) || i });
|
|
974
974
|
}
|
|
975
975
|
return {
|
|
976
|
-
...me ? { header:
|
|
977
|
-
columns:
|
|
978
|
-
rows:
|
|
976
|
+
...me ? { header: J.map((i) => i.label) } : {},
|
|
977
|
+
columns: J,
|
|
978
|
+
rows: qe,
|
|
979
979
|
...I.sqlChunkEvidence ? { rawTemporalClassification: I.sqlChunkEvidence } : {}
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function x(a, m, y) {
|
|
983
983
|
if (m.activatedColumnKeys.has(a)) {
|
|
984
984
|
const C = Te(m, a);
|
|
985
985
|
return C === void 0 ? { kind: "text" } : { kind: "datetime", dateOnly: C };
|
|
986
986
|
}
|
|
987
|
-
const
|
|
988
|
-
if (
|
|
987
|
+
const b = y.get(a);
|
|
988
|
+
if (b) return { kind: "temporal_bucket", grain: yr(b) };
|
|
989
989
|
if (s(a)) return { kind: "text" };
|
|
990
|
-
const
|
|
991
|
-
if (
|
|
992
|
-
const
|
|
993
|
-
return
|
|
990
|
+
const v = $e(t, a);
|
|
991
|
+
if (v) return { kind: "datetime", dateOnly: pr(Fe(v)) };
|
|
992
|
+
const w = c(a);
|
|
993
|
+
return w ? { kind: "measure", format: w } : void 0;
|
|
994
994
|
}
|
|
995
995
|
function u(a, m) {
|
|
996
996
|
if (!Number.isInteger(m) || m < 0)
|
|
997
997
|
throw new Error("totalRows must be a non-negative integer");
|
|
998
|
-
return m === 0 ? void 0 : (t.visibleColumns ?? Object.keys(a)).map((
|
|
999
|
-
const
|
|
1000
|
-
key:
|
|
1001
|
-
label:
|
|
998
|
+
return m === 0 ? void 0 : (t.visibleColumns ?? Object.keys(a)).map((b) => {
|
|
999
|
+
const w = Object.prototype.hasOwnProperty.call(a, b) ? a[b] : b === t.tableTotalsLabelColumnKey ? "Total" : null, C = n ? c(b) : void 0, _ = Ce({
|
|
1000
|
+
key: b,
|
|
1001
|
+
label: b,
|
|
1002
1002
|
formattedValues: n,
|
|
1003
1003
|
dataType: "unknown",
|
|
1004
1004
|
...C ? { presentation: { kind: "measure", format: C } } : {}
|
|
1005
1005
|
});
|
|
1006
|
-
if (
|
|
1007
|
-
if (!n) return X({ value:
|
|
1008
|
-
const S = C ? hr(
|
|
1009
|
-
return X(C && S !== null ? { value: S, text: B(S, C), column:
|
|
1006
|
+
if (w == null) return { kind: "empty" };
|
|
1007
|
+
if (!n) return X({ value: w, text: String(w), column: _ });
|
|
1008
|
+
const S = C ? hr(w) : null;
|
|
1009
|
+
return X(C && S !== null ? { value: S, text: B(S, C), column: _ } : { value: w, text: String(w), column: _ });
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
|
-
return { format:
|
|
1012
|
+
return { format: p, totals: u };
|
|
1013
1013
|
}
|
|
1014
1014
|
const gr = /* @__PURE__ */ new Set([
|
|
1015
1015
|
"scope",
|
|
@@ -1052,17 +1052,17 @@ function on(e) {
|
|
|
1052
1052
|
const n = typeof e.timezone == "string" ? e.timezone.trim() : "";
|
|
1053
1053
|
if (!n)
|
|
1054
1054
|
throw new Error("formatting.timezone must be a non-empty string");
|
|
1055
|
-
const o =
|
|
1055
|
+
const o = mt(e.delimiter);
|
|
1056
1056
|
if (!o)
|
|
1057
1057
|
throw new Error("formatting.delimiter must be a comma, semicolon or tab");
|
|
1058
|
-
const c =
|
|
1058
|
+
const c = dt(e.csvEncoding);
|
|
1059
1059
|
if (!c)
|
|
1060
1060
|
throw new Error("formatting.csvEncoding must be 'utf-8-bom' or 'utf-8'");
|
|
1061
1061
|
if (typeof e.includeHeaders != "boolean")
|
|
1062
1062
|
throw new Error("formatting.includeHeaders must be a boolean");
|
|
1063
1063
|
if (e.useFormattedValues !== void 0 && typeof e.useFormattedValues != "boolean")
|
|
1064
1064
|
throw new Error("formatting.useFormattedValues must be a boolean");
|
|
1065
|
-
const s = e.fileFormat === void 0 ? void 0 :
|
|
1065
|
+
const s = e.fileFormat === void 0 ? void 0 : ft(e.fileFormat);
|
|
1066
1066
|
if (e.fileFormat !== void 0 && !s)
|
|
1067
1067
|
throw new Error("formatting.fileFormat must be 'csv' or 'xlsx'");
|
|
1068
1068
|
if (e.title !== void 0 && typeof e.title != "string")
|
|
@@ -1073,25 +1073,25 @@ function on(e) {
|
|
|
1073
1073
|
const f = Le(e.columnLabels, "columnLabels");
|
|
1074
1074
|
if (f && Object.values(f).some((a) => typeof a != "string"))
|
|
1075
1075
|
throw new Error("formatting.columnLabels values must be strings");
|
|
1076
|
-
const
|
|
1077
|
-
if (
|
|
1076
|
+
const h = Le(e.columnSettings, "columnSettings"), d = e.tableTotalsLabelColumnKey === void 0 ? void 0 : typeof e.tableTotalsLabelColumnKey == "string" && e.tableTotalsLabelColumnKey.trim() ? e.tableTotalsLabelColumnKey : null;
|
|
1077
|
+
if (d === null)
|
|
1078
1078
|
throw new Error("formatting.tableTotalsLabelColumnKey must be a non-empty string");
|
|
1079
|
-
if (
|
|
1079
|
+
if (d && !(l != null && l.includes(d)))
|
|
1080
1080
|
throw new Error("formatting.tableTotalsLabelColumnKey must identify a visible column");
|
|
1081
|
-
const
|
|
1082
|
-
if (!
|
|
1081
|
+
const p = ct(e.scope, "formatting.scope");
|
|
1082
|
+
if (!p.cardId || p.attachmentIndex !== void 0)
|
|
1083
1083
|
throw new Error("formatting.scope must identify exactly one dashboard card");
|
|
1084
|
-
const
|
|
1084
|
+
const x = e.useFormattedValues !== !1, u = lt(e.presentationExecutionSnapshot);
|
|
1085
1085
|
if (n !== u.reportContext.calendar.tz)
|
|
1086
1086
|
throw new Error(
|
|
1087
1087
|
"formatting.timezone must equal presentationExecutionSnapshot.reportContext.calendar.tz"
|
|
1088
1088
|
);
|
|
1089
1089
|
try {
|
|
1090
|
-
|
|
1090
|
+
ut({
|
|
1091
1091
|
snapshot: u,
|
|
1092
|
-
expectedScope: { dashboardId:
|
|
1092
|
+
expectedScope: { dashboardId: p.dashboardId, cardId: p.cardId },
|
|
1093
1093
|
visibleColumns: l,
|
|
1094
|
-
useFormattedValues:
|
|
1094
|
+
useFormattedValues: x
|
|
1095
1095
|
});
|
|
1096
1096
|
} catch (a) {
|
|
1097
1097
|
throw new be(
|
|
@@ -1099,17 +1099,17 @@ function on(e) {
|
|
|
1099
1099
|
);
|
|
1100
1100
|
}
|
|
1101
1101
|
return {
|
|
1102
|
-
scope: { dashboardId:
|
|
1103
|
-
useFormattedValues:
|
|
1102
|
+
scope: { dashboardId: p.dashboardId, cardId: p.cardId },
|
|
1103
|
+
useFormattedValues: x,
|
|
1104
1104
|
timezone: n,
|
|
1105
1105
|
presentationExecutionSnapshot: u,
|
|
1106
1106
|
delimiter: o,
|
|
1107
1107
|
csvEncoding: c,
|
|
1108
1108
|
includeHeaders: e.includeHeaders,
|
|
1109
|
-
...
|
|
1109
|
+
...h ? { columnSettings: h } : {},
|
|
1110
1110
|
...l ? { visibleColumns: l } : {},
|
|
1111
1111
|
...f ? { columnLabels: f } : {},
|
|
1112
|
-
...
|
|
1112
|
+
...d ? { tableTotalsLabelColumnKey: d } : {},
|
|
1113
1113
|
...s ? { fileFormat: s } : {},
|
|
1114
1114
|
...typeof e.title == "string" ? { title: e.title } : {}
|
|
1115
1115
|
};
|
|
@@ -1133,104 +1133,103 @@ function an(e) {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
}
|
|
1135
1135
|
const wr = /^\d{4}-\d{2}-\d{2}$/;
|
|
1136
|
-
function
|
|
1136
|
+
function ze(e) {
|
|
1137
1137
|
const t = e.split(".");
|
|
1138
1138
|
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(" ");
|
|
1139
1139
|
}
|
|
1140
1140
|
const Pe = 10;
|
|
1141
|
-
function
|
|
1141
|
+
function se(e, t) {
|
|
1142
1142
|
const r = e.slice(0, Pe).map(t).join(", "), n = e.length - Pe;
|
|
1143
1143
|
return n > 0 ? `${r}, and ${n} more` : r;
|
|
1144
1144
|
}
|
|
1145
1145
|
function Cr(e) {
|
|
1146
1146
|
if (e.valueType !== "date" || e.operation !== "between" && e.operation !== "not between")
|
|
1147
1147
|
return;
|
|
1148
|
-
const t =
|
|
1149
|
-
|
|
1150
|
-
return ht(t) || t.unit === "quarter" || t.unit === "year" ? t : void 0;
|
|
1148
|
+
const t = Y(e.relativeMeta);
|
|
1149
|
+
return t && Ne(t).printsByName ? t : void 0;
|
|
1151
1150
|
}
|
|
1152
1151
|
function vr(e, t) {
|
|
1153
1152
|
if (t !== "label") return Cr(e);
|
|
1154
1153
|
if (!(e.valueType !== "date" || e.operation !== "between" && e.operation !== "not between"))
|
|
1155
|
-
return
|
|
1154
|
+
return Y(e.relativeMeta);
|
|
1156
1155
|
}
|
|
1157
1156
|
function Ie(e, t = {}) {
|
|
1158
|
-
const { name: r, operation: n, values: o, valueType: c } = e, s = t.label ??
|
|
1157
|
+
const { name: r, operation: n, values: o, valueType: c } = e, s = t.label ?? ze(r), l = vr(e, t.relativeDates);
|
|
1159
1158
|
if (l) {
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1162
|
-
return n === "between" ? `${s}: ${
|
|
1159
|
+
const p = bt(l).label;
|
|
1160
|
+
if (p)
|
|
1161
|
+
return n === "between" ? `${s}: ${p}` : `${s} not in ${p}`;
|
|
1163
1162
|
}
|
|
1164
1163
|
if (!o || o.length === 0)
|
|
1165
1164
|
return n === "is null" ? `${s} is empty` : n === "is not null" ? `${s} is not empty` : "";
|
|
1166
|
-
const f = (d) => {
|
|
1167
|
-
if (c === "date" &&
|
|
1168
|
-
const
|
|
1165
|
+
const f = Y(e.relativeMeta), h = e.temporalPrecision === "minute" || !!(f && Ne(f).subDay), d = (p) => {
|
|
1166
|
+
if (c === "date" && p) {
|
|
1167
|
+
const x = {
|
|
1169
1168
|
year: "numeric",
|
|
1170
1169
|
month: "short",
|
|
1171
1170
|
day: "numeric",
|
|
1172
|
-
...
|
|
1171
|
+
...h ? {
|
|
1173
1172
|
hour: "numeric",
|
|
1174
1173
|
minute: "2-digit"
|
|
1175
1174
|
} : {}
|
|
1176
1175
|
};
|
|
1177
|
-
if (typeof
|
|
1178
|
-
const [
|
|
1176
|
+
if (typeof p == "string" && wr.test(p)) {
|
|
1177
|
+
const [a, m, y] = p.split("-").map(Number);
|
|
1179
1178
|
return new Intl.DateTimeFormat(void 0, {
|
|
1180
1179
|
year: "numeric",
|
|
1181
1180
|
month: "short",
|
|
1182
1181
|
day: "numeric",
|
|
1183
1182
|
timeZone: "UTC"
|
|
1184
|
-
}).format(new Date(Date.UTC(
|
|
1183
|
+
}).format(new Date(Date.UTC(a, m - 1, y)));
|
|
1185
1184
|
}
|
|
1186
|
-
if (typeof
|
|
1187
|
-
const [
|
|
1185
|
+
if (typeof p == "string" && Tt(p) === "wall_datetime") {
|
|
1186
|
+
const [a, m, y, b, v] = p.split(/[-T :.]/).map(Number);
|
|
1188
1187
|
return new Intl.DateTimeFormat(void 0, {
|
|
1189
|
-
...
|
|
1188
|
+
...x,
|
|
1190
1189
|
timeZone: "UTC"
|
|
1191
|
-
}).format(new Date(Date.UTC(
|
|
1190
|
+
}).format(new Date(Date.UTC(a, m - 1, y, b, v)));
|
|
1192
1191
|
}
|
|
1193
|
-
const
|
|
1194
|
-
if (!isNaN(
|
|
1192
|
+
const u = new Date(p);
|
|
1193
|
+
if (!isNaN(u.getTime()))
|
|
1195
1194
|
try {
|
|
1196
1195
|
return new Intl.DateTimeFormat(void 0, {
|
|
1197
|
-
...
|
|
1196
|
+
...x,
|
|
1198
1197
|
...t.timezone ? { timeZone: t.timezone } : {}
|
|
1199
|
-
}).format(
|
|
1198
|
+
}).format(u);
|
|
1200
1199
|
} catch {
|
|
1201
|
-
return
|
|
1200
|
+
return h ? u.toLocaleString(void 0, x) : u.toLocaleDateString(void 0, x);
|
|
1202
1201
|
}
|
|
1203
1202
|
}
|
|
1204
|
-
return String(
|
|
1203
|
+
return String(p);
|
|
1205
1204
|
};
|
|
1206
1205
|
switch (n) {
|
|
1207
1206
|
case "=":
|
|
1208
|
-
return `${s}: ${
|
|
1207
|
+
return `${s}: ${d(o[0])}`;
|
|
1209
1208
|
case "!=":
|
|
1210
|
-
return `${s} ≠ ${
|
|
1209
|
+
return `${s} ≠ ${d(o[0])}`;
|
|
1211
1210
|
case ">":
|
|
1212
|
-
return `${s} > ${
|
|
1211
|
+
return `${s} > ${d(o[0])}`;
|
|
1213
1212
|
case "<":
|
|
1214
|
-
return `${s} < ${
|
|
1213
|
+
return `${s} < ${d(o[0])}`;
|
|
1215
1214
|
case ">=":
|
|
1216
|
-
return `${s} ≥ ${
|
|
1215
|
+
return `${s} ≥ ${d(o[0])}`;
|
|
1217
1216
|
case "<=":
|
|
1218
|
-
return `${s} ≤ ${
|
|
1217
|
+
return `${s} ≤ ${d(o[0])}`;
|
|
1219
1218
|
case "between":
|
|
1220
1219
|
case "not between": {
|
|
1221
|
-
const
|
|
1222
|
-
return n === "between" ? `${s}: ${
|
|
1220
|
+
const p = `${d(o[0])} - ${d(o[1])}`;
|
|
1221
|
+
return n === "between" ? `${s}: ${p}` : `${s} not in ${p}`;
|
|
1223
1222
|
}
|
|
1224
1223
|
case "in":
|
|
1225
|
-
return o.length === 1 ? `${s}: ${
|
|
1224
|
+
return o.length === 1 ? `${s}: ${d(o[0])}` : `${s}: ${se(o, d)}`;
|
|
1226
1225
|
case "not in":
|
|
1227
|
-
return `${s} not in (${
|
|
1226
|
+
return `${s} not in (${se(o, d)})`;
|
|
1228
1227
|
case "like":
|
|
1229
1228
|
return `${s} contains "${o[0]}"`;
|
|
1230
1229
|
case "not like":
|
|
1231
1230
|
return `${s} doesn't contain "${o[0]}"`;
|
|
1232
1231
|
default:
|
|
1233
|
-
return `${s}: ${
|
|
1232
|
+
return `${s}: ${se(o, d)}`;
|
|
1234
1233
|
}
|
|
1235
1234
|
}
|
|
1236
1235
|
function sn(e, t = {}) {
|
|
@@ -1247,7 +1246,7 @@ function sn(e, t = {}) {
|
|
|
1247
1246
|
const s = Ie(o[0], t);
|
|
1248
1247
|
s && n.push(s);
|
|
1249
1248
|
} else {
|
|
1250
|
-
const s =
|
|
1249
|
+
const s = ze(c), l = o.map((f) => Ie(f, t).replace(`${s}: `, "").replace(`${s} `, "")).filter(Boolean);
|
|
1251
1250
|
l.length > 0 && n.push(`${s}: ${l.join(" and ")}`);
|
|
1252
1251
|
}
|
|
1253
1252
|
}), n.join(" | ");
|
|
@@ -1260,7 +1259,7 @@ function _r(e) {
|
|
|
1260
1259
|
}
|
|
1261
1260
|
function xr(e) {
|
|
1262
1261
|
if (!("relativeMeta" in e) || e.relativeMeta === void 0) return e;
|
|
1263
|
-
const { relativeMeta: t, ...r } = e, n =
|
|
1262
|
+
const { relativeMeta: t, ...r } = e, n = Y(t);
|
|
1264
1263
|
return n ? { ...r, relativeMeta: n } : r;
|
|
1265
1264
|
}
|
|
1266
1265
|
const Tr = /* @__PURE__ */ new Set([
|
|
@@ -1330,7 +1329,7 @@ export {
|
|
|
1330
1329
|
Qt as A,
|
|
1331
1330
|
Qr as B,
|
|
1332
1331
|
ar as C,
|
|
1333
|
-
|
|
1332
|
+
Ue as D,
|
|
1334
1333
|
en as E,
|
|
1335
1334
|
Ut as F,
|
|
1336
1335
|
tn as G,
|