react-semaphor 0.1.554 → 0.1.556
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 +10 -10
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +438 -455
- package/dist/briefings/index.js +6 -6
- package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
- package/dist/chunks/{assistant-chat-ngs5dTvo.js → assistant-chat-C7Acww1T.js} +15 -15
- package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-7iZErWnR.js} +3 -3
- package/dist/chunks/comparison-window-caption-BseG5aOZ.js +1221 -0
- package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-cTHqcqPu.js → custom-visual-inputs-ChuKjx27.js} +31 -33
- package/dist/chunks/{dashboard-548YvEW5.js → dashboard-BU6rE5kV.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-ptIRn5FS.js → dashboard-briefing-launcher-qrYd2zkN.js} +15 -15
- package/dist/chunks/{dashboard-controls-CqyUTN6Q.js → dashboard-controls-BsapXI2H.js} +14 -14
- package/dist/chunks/{dashboard-json-CvDFipA0.js → dashboard-json-CJqPqYnI.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-DrA9m-5H.js → document-dashboard-inputs-BNSprf5_.js} +12 -12
- package/dist/chunks/{edit-dashboard-visual-BHL0AlIj.js → edit-dashboard-visual-CjAdV-WG.js} +4603 -4687
- package/dist/chunks/{filter-reach-copy-CyftKCZE.js → filter-reach-copy-BTrqtFkh.js} +917 -987
- package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CJTJDCym.js} +4 -4
- package/dist/chunks/{global-date-filter-utils-Or-3DL3k.js → global-date-filter-utils-CTVf3dG3.js} +2904 -3102
- package/dist/chunks/{index-ClwmmbUH.js → index-B_vIRa-q.js} +12 -19
- package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
- package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-Cg0ioFGQ.js} +21 -21
- package/dist/chunks/matrix-card-yYibXSw1.js +42 -0
- package/dist/chunks/{matrix-formatter-K2OVPJQI.js → matrix-formatter-C2kjsCDf.js} +44 -44
- package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-DEEauKXC.js} +1 -1
- package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-C1G6AJNh.js} +33 -33
- package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-BfcmwxM1.js} +4 -4
- package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +56 -0
- package/dist/chunks/pivot-result-identity-CWi5WrrY.js +77 -0
- package/dist/chunks/{raw-temporal-contract-WuXA8jBP.js → raw-temporal-contract-CjHaUIsE.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-gooAp93G.js → raw-temporal-presentation-DWzLIHc3.js} +8 -8
- package/dist/chunks/{report-preferences-dialog-2tqY0BMQ.js → report-preferences-dialog-D_wrbIQt.js} +17 -17
- package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-BgM-iNWB.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-bOKDTHfJ.js → resolve-dashboard-input-context-Df8V5QHW.js} +1415 -1567
- package/dist/chunks/{saved-dashboard-context--Hq1juf9.js → saved-dashboard-context-VvXI6r03.js} +9 -9
- package/dist/chunks/{selection-reducer-yw_JgICP.js → selection-reducer-By4CSmEF.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-yM4wo-FH.js → semaphor-ready-indicator-fejZmdq9.js} +49593 -56071
- package/dist/chunks/{shelf-drop-preview-context-BuLzyT1T.js → shelf-drop-preview-context-BuTCXe-S.js} +7 -7
- package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-B46EZIzX.js} +1 -1
- package/dist/chunks/{switch-B-UTI6v-.js → switch-Bq92UGId.js} +3 -3
- package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-noKl8-en.js} +1 -1
- package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-PpINOzw8.js} +3 -3
- package/dist/chunks/{temporal-bucket-C4rqmwaQ.js → temporal-bucket-DzyadxVY.js} +53 -53
- package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +879 -0
- package/dist/chunks/{token-types-DYECHYGH.js → token-types--0bgRCaO.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DSXC-LD7.js → use-create-flow-overlay-state-Cz-ve64t.js} +7 -7
- package/dist/chunks/{validators-ClKLGDGZ.js → validators-CZo_H4E6.js} +305 -307
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +65 -63
- package/dist/data-app-sdk/index.js +6 -6
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +207 -223
- package/dist/index.js +96 -97
- package/dist/layouts/index.js +1 -1
- package/dist/pdf-export-policy/index.js +9 -11
- 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/brand-studio/brand-studio-draft.d.ts +0 -3
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
- package/dist/types/index.js +27 -28
- package/dist/types/lib/api/exports-api.d.ts +1 -1
- package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
- package/dist/types/lib/charts/types.d.ts +2 -2
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
- package/dist/types/lib/document/document-edits.d.ts +1 -1
- package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
- package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
- package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
- package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
- package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
- package/dist/types/lib/types/common-types.d.ts +0 -7
- package/dist/types/lib/types/explorer-types.d.ts +1 -14
- package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
- package/dist/types/shared/dashboard-authoring/matrix-card.d.ts +8 -0
- package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
- package/dist/types/shared/format-utils/index.d.ts +0 -2
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
- package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
- package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
- package/package.json +2 -2
- package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
- package/dist/chunks/matrix-card-CVFVtqyo.js +0 -38
- package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
- package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
- package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
- package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
- package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
- package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { al as
|
|
2
|
-
import {
|
|
3
|
-
import "./matrix-operation-contract
|
|
4
|
-
import { r as
|
|
5
|
-
import "./analytics-base-schemas-
|
|
1
|
+
import { al as oi, am as si, an as li, ao as dt, ap as ci, aq as K, ar as ft, as as ui, at as di, au as Se, av as fi, aw as mt, ax as mi, ay as pi, az as hi, aA as gi, aB as yi, aC as bi, aD as pt, aE as vi, aF as Fi, aG as Ci, aH as ge, aI as Ii, aJ as xi, aK as Si, b as Mi, aL as Di, v as Ti, z as wi, aM as Pi, aN as Oi } from "./resolve-dashboard-input-context-Df8V5QHW.js";
|
|
2
|
+
import { ab as ht, f as Ai, e as _i, a8 as gt, am as Ni, v as Ei } from "./validators-CZo_H4E6.js";
|
|
3
|
+
import "./matrix-operation-contract-C1G6AJNh.js";
|
|
4
|
+
import { r as Ri, C as Vi } from "./metric-comparison-BfcmwxM1.js";
|
|
5
|
+
import "./analytics-base-schemas-BUFUoO6G.js";
|
|
6
6
|
import "zod";
|
|
7
|
-
import { q as
|
|
8
|
-
import { f as
|
|
9
|
-
import {
|
|
7
|
+
import { q as ki } from "./temporal-input-presentation-CJWS4d0L.js";
|
|
8
|
+
import { f as W } from "./matrix-formatter-C2kjsCDf.js";
|
|
9
|
+
import { a as yt, l as Bi, g as Ki, b as Fe, d as Li, i as R, t as _, R as qi, v as $i, r as zi, y as ji } from "./temporal-bucket-DzyadxVY.js";
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
|
-
import { L as
|
|
12
|
-
import { dp as
|
|
13
|
-
import { r as
|
|
14
|
-
import { g as
|
|
15
|
-
import { e as
|
|
16
|
-
import "./index-
|
|
11
|
+
import { L as Ui, w as de } from "./table-settings-PpINOzw8.js";
|
|
12
|
+
import { dp as bt, dw as vt, dx as Hi, dy as Gi, cS as Me, dz as Wi, cT as Qi, dA as A, as as Yi, dB as Ft, dC as De, dD as Ji, dE as Xi, dF as He, dG as Zi, dH as Ge, dI as en, dJ as tn, Q as Ct, dK as It, dL as xt, v as St, dM as We, Y as $, dN as Te, d1 as Qe, d3 as we, c_ as Ye, dO as Je, ds as nn, bb as Pe, dP as rn, dQ as an, dR as on, cX as G, be as Xe, dS as sn, a2 as Mt, a3 as Dt, d as ln, dT as z, bg as cn, dU as un, bh as dn, aA as Tt, dV as fn, dW as mn, dX as pn, dY as hn, b as wt, dr as gn, cW as yn, dZ as bn, d8 as Ce, d_ as vn, d$ as ye, c8 as Pt, e0 as Ze, e1 as Fn, bI as Cn, cb as et, ca as In, e2 as xn } from "./global-date-filter-utils-CTVf3dG3.js";
|
|
13
|
+
import { r as Sn } from "./pivot-result-identity-CWi5WrrY.js";
|
|
14
|
+
import { g as Mn } from "./_commonjsHelpers-DimLPMtv.js";
|
|
15
|
+
import { e as Dn, d as Tn } from "./raw-temporal-presentation-DWzLIHc3.js";
|
|
16
|
+
import "./index-dIV-Gdsb.js";
|
|
17
17
|
import "./index-CuHybtft.js";
|
|
18
|
-
import { i as
|
|
19
|
-
import { R as
|
|
20
|
-
import { r as
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
return e != null && e.trim() ?
|
|
24
|
-
}
|
|
25
|
-
function
|
|
26
|
-
return !(e != null && e.trim()) ||
|
|
18
|
+
import { i as wn } from "./source-entity-resolution-B46EZIzX.js";
|
|
19
|
+
import { R as Pn } from "./matrix-analytical-definition-Cg0ioFGQ.js";
|
|
20
|
+
import { r as Ot } from "./applied-constraints-DU-wndZ7.js";
|
|
21
|
+
const Ha = 15, On = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, An = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, _n = /\bwhere\b/i;
|
|
22
|
+
function Nn(e) {
|
|
23
|
+
return e != null && e.trim() ? On.test(e) || An.test(e) : !1;
|
|
24
|
+
}
|
|
25
|
+
function Ga(e) {
|
|
26
|
+
return !(e != null && e.trim()) || Nn(e) ? null : _n.test(e) ? {
|
|
27
27
|
helper: "{{ filters | and }}",
|
|
28
28
|
description: "For queries with an existing WHERE clause."
|
|
29
29
|
} : {
|
|
@@ -31,60 +31,60 @@ function Wa(e) {
|
|
|
31
31
|
description: "For queries without a WHERE clause."
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
const
|
|
35
|
-
function
|
|
36
|
-
return e && e > 0 ? e :
|
|
34
|
+
const tt = [10, 20, 50, 100, 500, 1e3], En = 50;
|
|
35
|
+
function Rn(e) {
|
|
36
|
+
return e && e > 0 ? e : En;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const t =
|
|
40
|
-
return
|
|
38
|
+
function Wa(e) {
|
|
39
|
+
const t = Rn(e), i = [...tt];
|
|
40
|
+
return tt.includes(
|
|
41
41
|
t
|
|
42
42
|
) || (i.push(t), i.sort((n, r) => n - r)), i;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Qa(e) {
|
|
45
45
|
var t, i;
|
|
46
|
-
return !!((e.type === "table" || e.type === "detailTable") && e.sql && !
|
|
46
|
+
return !!((e.type === "table" || e.type === "detailTable") && e.sql && !bt(e.config) && !((i = (t = e.preferences) == null ? void 0 : t.tablePrefs) != null && i.forceClientPagination));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Vn(e, t) {
|
|
49
49
|
var n, r, a, o;
|
|
50
50
|
if (t === "table-print")
|
|
51
51
|
return "disabled";
|
|
52
52
|
if ((r = (n = e.preferences) == null ? void 0 : n.tablePrefs) != null && r.forceClientPagination)
|
|
53
53
|
return "client";
|
|
54
|
-
const i =
|
|
55
|
-
return e.sql && !i ? (o = (a = e.preferences) == null ? void 0 : a.tablePrefs) != null && o.enableDevModePagination ? "server" : "client" : i &&
|
|
54
|
+
const i = bt(e.config);
|
|
55
|
+
return e.sql && !i ? (o = (a = e.preferences) == null ? void 0 : a.tablePrefs) != null && o.enableDevModePagination ? "server" : "client" : i && oi(e) ? "server" : "client";
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const At = Object.freeze({}), Ya = {
|
|
58
58
|
access: "session-only",
|
|
59
59
|
printMode: !1,
|
|
60
60
|
baseline: null,
|
|
61
61
|
applied: null,
|
|
62
62
|
appliedBookmark: null,
|
|
63
|
-
tableSettings:
|
|
63
|
+
tableSettings: At,
|
|
64
64
|
notices: [],
|
|
65
65
|
isFavorite: !1,
|
|
66
66
|
fetchedAt: 0
|
|
67
67
|
};
|
|
68
|
-
function
|
|
68
|
+
function Ja(e) {
|
|
69
69
|
return !e.viewer.printMode && e.viewer.access !== "session-only" && !!e.viewer.baseline && !!e.viewerStateClient && !e.isDashboardEditing;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return e.isDashboardEditing ?
|
|
71
|
+
function kn(e) {
|
|
72
|
+
return e.isDashboardEditing ? At : e.viewer.tableSettings;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
return
|
|
74
|
+
function Bn(e, t) {
|
|
75
|
+
return kn(e)[t];
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
if (!(i.isEditorPreview || e.isDashboardEditing) &&
|
|
79
|
-
return { settings:
|
|
77
|
+
function Xa(e, t, i) {
|
|
78
|
+
if (!(i.isEditorPreview || e.isDashboardEditing) && Ui(e.dashboard, t))
|
|
79
|
+
return { settings: Bn(e, t) };
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Kn(e) {
|
|
82
82
|
var t;
|
|
83
|
-
return
|
|
83
|
+
return si({
|
|
84
84
|
card: e.card,
|
|
85
|
-
paginationMode:
|
|
85
|
+
paginationMode: Vn(e.card) === "server" ? "server" : "client",
|
|
86
86
|
result: {
|
|
87
|
-
keys: e.keys ??
|
|
87
|
+
keys: e.keys ?? li(e.records),
|
|
88
88
|
rows: e.records,
|
|
89
89
|
columns: e.resultColumns,
|
|
90
90
|
columnKeyMap: e.columnKeyMap,
|
|
@@ -94,11 +94,7 @@ function Ln(e) {
|
|
|
94
94
|
projection: "export"
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
e = e.replace("#", "");
|
|
99
|
-
const t = Number.parseInt(e.substr(0, 2), 16), i = Number.parseInt(e.substr(2, 2), 16), n = Number.parseInt(e.substr(4, 2), 16);
|
|
100
|
-
return (0.299 * t + 0.587 * i + 0.114 * n) / 255 > 0.5 ? "#000000" : "#ffffff";
|
|
101
|
-
}, qn = () => ({
|
|
97
|
+
const Ln = () => ({
|
|
102
98
|
urlTemplate: "{value}",
|
|
103
99
|
// Default: use cell value as-is
|
|
104
100
|
labelType: "value",
|
|
@@ -107,7 +103,7 @@ const eo = (e) => {
|
|
|
107
103
|
labelColumn: "",
|
|
108
104
|
openInNewTab: !0
|
|
109
105
|
// Default: open in new tab (current behavior)
|
|
110
|
-
}),
|
|
106
|
+
}), Oe = () => ({
|
|
111
107
|
type: "none",
|
|
112
108
|
inheritMetricFormat: !0,
|
|
113
109
|
textAlign: "left",
|
|
@@ -142,13 +138,13 @@ const eo = (e) => {
|
|
|
142
138
|
sourceTimezone: "auto"
|
|
143
139
|
// Default to auto (use explicit timezone if present, otherwise assume UTC)
|
|
144
140
|
},
|
|
145
|
-
linkFormat:
|
|
141
|
+
linkFormat: Ln(),
|
|
146
142
|
colorRanges: []
|
|
147
143
|
});
|
|
148
|
-
function
|
|
144
|
+
function Za(e, t, i, n) {
|
|
149
145
|
return t && t !== "auto" ? t : i;
|
|
150
146
|
}
|
|
151
|
-
const
|
|
147
|
+
const eo = (e) => !e || e === "auto" ? "local time" : {
|
|
152
148
|
"America/New_York": "Eastern Time",
|
|
153
149
|
"America/Chicago": "Central Time",
|
|
154
150
|
"America/Denver": "Mountain Time",
|
|
@@ -159,11 +155,11 @@ const io = (e) => !e || e === "auto" ? "local time" : {
|
|
|
159
155
|
"Asia/Shanghai": "China Time",
|
|
160
156
|
UTC: "UTC"
|
|
161
157
|
}[e] || e;
|
|
162
|
-
function
|
|
163
|
-
const t =
|
|
164
|
-
return !!(t &&
|
|
158
|
+
function qn(e) {
|
|
159
|
+
const t = W(e == null ? void 0 : e.format);
|
|
160
|
+
return !!(t && yt(t));
|
|
165
161
|
}
|
|
166
|
-
function
|
|
162
|
+
function $n(e, t) {
|
|
167
163
|
var o, s;
|
|
168
164
|
if (!(e != null && e.config) || e.type === "matrixTable" || (o = e.sql) != null && o.trim() || (s = e.python) != null && s.trim())
|
|
169
165
|
return;
|
|
@@ -201,16 +197,16 @@ function Me(e, t) {
|
|
|
201
197
|
t.metricAlias,
|
|
202
198
|
...t.columnIds || []
|
|
203
199
|
].filter((f) => f !== void 0), c = n.map((f) => {
|
|
204
|
-
var d,
|
|
200
|
+
var d, g;
|
|
205
201
|
return {
|
|
206
202
|
...f,
|
|
207
203
|
bindings: [
|
|
208
|
-
|
|
204
|
+
Sn(
|
|
209
205
|
t.columnKeyMap,
|
|
210
206
|
f.field.id,
|
|
211
207
|
f.role
|
|
212
208
|
),
|
|
213
|
-
f.role === "metric" && f.field.alias ? (
|
|
209
|
+
f.role === "metric" && f.field.alias ? (g = (d = t.columnKeyMap) == null ? void 0 : d.byMetricAlias) == null ? void 0 : g[f.field.alias] : void 0
|
|
214
210
|
]
|
|
215
211
|
};
|
|
216
212
|
}), u = c.filter(
|
|
@@ -243,46 +239,15 @@ function Me(e, t) {
|
|
|
243
239
|
)
|
|
244
240
|
);
|
|
245
241
|
}
|
|
246
|
-
function
|
|
247
|
-
return Me(e, {
|
|
248
|
-
fieldId: t.id,
|
|
249
|
-
fieldRole: "groupby"
|
|
250
|
-
}) ?? Me(
|
|
251
|
-
e,
|
|
252
|
-
i ? {
|
|
253
|
-
columnIds: [t.alias, t.name, t.id].filter(
|
|
254
|
-
(n) => !!n
|
|
255
|
-
),
|
|
256
|
-
columnKeyMap: i,
|
|
257
|
-
fieldRole: "groupby"
|
|
258
|
-
} : { fieldId: t.id, fieldRole: "groupby" }
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
function no(e, t, i) {
|
|
262
|
-
return e.map((n) => {
|
|
263
|
-
const r = zn(
|
|
264
|
-
t,
|
|
265
|
-
n,
|
|
266
|
-
i
|
|
267
|
-
);
|
|
268
|
-
if (!r) return n;
|
|
269
|
-
const { format: a, ...o } = n;
|
|
270
|
-
return {
|
|
271
|
-
...o,
|
|
272
|
-
...r.label ? { label: r.label } : {},
|
|
273
|
-
...r.format !== void 0 ? { format: r.format } : {}
|
|
274
|
-
};
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
function Et(e, t) {
|
|
242
|
+
function _t(e, t) {
|
|
278
243
|
const i = typeof e.decimalPlaces == "number", n = typeof e.minimumFractionDigits == "number" ? e.minimumFractionDigits : i ? e.decimalPlaces : t.min, r = typeof e.maximumFractionDigits == "number" ? e.maximumFractionDigits : i ? e.decimalPlaces : t.max;
|
|
279
244
|
return {
|
|
280
245
|
minimumFractionDigits: n,
|
|
281
246
|
maximumFractionDigits: Math.max(n, r)
|
|
282
247
|
};
|
|
283
248
|
}
|
|
284
|
-
function
|
|
285
|
-
const i =
|
|
249
|
+
function le(e, t) {
|
|
250
|
+
const i = _t(e, t), n = typeof e.suffix == "string" && e.suffix.length > 0;
|
|
286
251
|
return {
|
|
287
252
|
style: "decimal",
|
|
288
253
|
locale: e.locale,
|
|
@@ -299,42 +264,42 @@ function de(e, t) {
|
|
|
299
264
|
percentValueMode: e.percentValueMode
|
|
300
265
|
};
|
|
301
266
|
}
|
|
302
|
-
function
|
|
303
|
-
switch (t === "auto" && (t =
|
|
267
|
+
function Nt(e, t = "auto", i = {}) {
|
|
268
|
+
switch (t === "auto" && (t = Gn(e, i)), t) {
|
|
304
269
|
case "number":
|
|
305
|
-
return
|
|
270
|
+
return Et(e, i);
|
|
306
271
|
case "currency":
|
|
307
|
-
return
|
|
272
|
+
return Rt(e, i);
|
|
308
273
|
case "percent":
|
|
309
|
-
return
|
|
274
|
+
return zn(e, i);
|
|
310
275
|
case "date":
|
|
311
|
-
return
|
|
276
|
+
return jn(e, i);
|
|
312
277
|
case "scientific":
|
|
313
|
-
return
|
|
278
|
+
return Un(e, i);
|
|
314
279
|
case "duration":
|
|
315
|
-
return
|
|
280
|
+
return Hn(e, i);
|
|
316
281
|
default:
|
|
317
282
|
return String(e);
|
|
318
283
|
}
|
|
319
284
|
}
|
|
320
|
-
function
|
|
321
|
-
return e < 0 && !!t.prefix && !t.negativeInParentheses ? `-${
|
|
285
|
+
function Et(e, t = {}) {
|
|
286
|
+
return e < 0 && !!t.prefix && !t.negativeInParentheses ? `-${Fe(
|
|
322
287
|
Math.abs(e),
|
|
323
|
-
|
|
288
|
+
le(t, {
|
|
324
289
|
min: 0,
|
|
325
290
|
max: 0
|
|
326
291
|
})
|
|
327
|
-
)}` :
|
|
292
|
+
)}` : Fe(
|
|
328
293
|
e,
|
|
329
|
-
|
|
294
|
+
le(t, {
|
|
330
295
|
min: 0,
|
|
331
296
|
max: 0
|
|
332
297
|
})
|
|
333
298
|
);
|
|
334
299
|
}
|
|
335
|
-
function
|
|
336
|
-
return
|
|
337
|
-
...
|
|
300
|
+
function Rt(e, t = {}) {
|
|
301
|
+
return Li(e, {
|
|
302
|
+
...le(t, {
|
|
338
303
|
min: 2,
|
|
339
304
|
max: 2
|
|
340
305
|
}),
|
|
@@ -342,9 +307,9 @@ function kt(e, t = {}) {
|
|
|
342
307
|
currency: t.currency || "USD"
|
|
343
308
|
});
|
|
344
309
|
}
|
|
345
|
-
function
|
|
346
|
-
const i =
|
|
347
|
-
return
|
|
310
|
+
function zn(e, t = {}) {
|
|
311
|
+
const i = _t(t, { min: 1, max: 1 }), r = typeof t.multiplyBy == "number" && Number.isFinite(t.multiplyBy) ? t.multiplyBy : t.percentValueMode === "whole" ? 1 : 100, a = e * r;
|
|
312
|
+
return Fe(a, {
|
|
348
313
|
locale: t.locale,
|
|
349
314
|
minimumFractionDigits: i.minimumFractionDigits,
|
|
350
315
|
maximumFractionDigits: i.maximumFractionDigits,
|
|
@@ -355,7 +320,7 @@ function jn(e, t = {}) {
|
|
|
355
320
|
useSuffix: !1
|
|
356
321
|
});
|
|
357
322
|
}
|
|
358
|
-
function
|
|
323
|
+
function jn(e, t = {}) {
|
|
359
324
|
const { locale: i = "en-US" } = t;
|
|
360
325
|
try {
|
|
361
326
|
const n = new Date(e);
|
|
@@ -366,14 +331,14 @@ function Un(e, t = {}) {
|
|
|
366
331
|
return String(e);
|
|
367
332
|
}
|
|
368
333
|
}
|
|
369
|
-
function
|
|
370
|
-
return
|
|
334
|
+
function Un(e, t = {}) {
|
|
335
|
+
return Ki(
|
|
371
336
|
e,
|
|
372
|
-
|
|
337
|
+
le(t, { min: 2, max: 2 })
|
|
373
338
|
);
|
|
374
339
|
}
|
|
375
|
-
function
|
|
376
|
-
return
|
|
340
|
+
function Hn(e, t = {}) {
|
|
341
|
+
return Bi(e, {
|
|
377
342
|
inputUnit: t.durationInputUnit,
|
|
378
343
|
outputStyle: t.durationDisplayStyle,
|
|
379
344
|
largestUnit: t.durationLargestUnit,
|
|
@@ -384,13 +349,13 @@ function Gn(e, t = {}) {
|
|
|
384
349
|
negativeInParentheses: t.negativeInParentheses
|
|
385
350
|
});
|
|
386
351
|
}
|
|
387
|
-
function
|
|
352
|
+
function Gn(e, t) {
|
|
388
353
|
return t.currency ? "currency" : typeof e == "string" && !isNaN(Date.parse(e)) ? "date" : "number";
|
|
389
354
|
}
|
|
390
|
-
function
|
|
391
|
-
return (i) =>
|
|
355
|
+
function to(e, t = {}) {
|
|
356
|
+
return (i) => Nt(i, e, t);
|
|
392
357
|
}
|
|
393
|
-
function
|
|
358
|
+
function Wn({
|
|
394
359
|
number: e,
|
|
395
360
|
decimalPlaces: t = 0,
|
|
396
361
|
useSuffix: i = !1,
|
|
@@ -399,7 +364,7 @@ function Qn({
|
|
|
399
364
|
locale: a = "en-US"
|
|
400
365
|
}) {
|
|
401
366
|
if (r) {
|
|
402
|
-
const o =
|
|
367
|
+
const o = Rt(e, {
|
|
403
368
|
currency: r,
|
|
404
369
|
decimalPlaces: t,
|
|
405
370
|
locale: a,
|
|
@@ -407,14 +372,14 @@ function Qn({
|
|
|
407
372
|
});
|
|
408
373
|
return i && n ? `${o}${n}` : o;
|
|
409
374
|
}
|
|
410
|
-
return
|
|
375
|
+
return Et(e, {
|
|
411
376
|
decimalPlaces: t,
|
|
412
377
|
useSuffix: i && !n,
|
|
413
378
|
suffix: n,
|
|
414
379
|
locale: a
|
|
415
380
|
});
|
|
416
381
|
}
|
|
417
|
-
var
|
|
382
|
+
var Qn = function e(t, i) {
|
|
418
383
|
if (t === i) return !0;
|
|
419
384
|
if (t && i && typeof t == "object" && typeof i == "object") {
|
|
420
385
|
if (t.constructor !== i.constructor) return !1;
|
|
@@ -440,8 +405,8 @@ var Yn = function e(t, i) {
|
|
|
440
405
|
}
|
|
441
406
|
return t !== t && i !== i;
|
|
442
407
|
};
|
|
443
|
-
const
|
|
444
|
-
function
|
|
408
|
+
const ce = /* @__PURE__ */ Mn(Qn);
|
|
409
|
+
function Yn(e) {
|
|
445
410
|
if (typeof e == "number")
|
|
446
411
|
return Number.isFinite(e);
|
|
447
412
|
if (typeof e != "string")
|
|
@@ -449,7 +414,7 @@ function Jn(e) {
|
|
|
449
414
|
const t = e.trim().replace(/,/g, "");
|
|
450
415
|
return t !== "" && Number.isFinite(Number(t));
|
|
451
416
|
}
|
|
452
|
-
function
|
|
417
|
+
function Jn(e) {
|
|
453
418
|
if (!(e != null && e.length))
|
|
454
419
|
return [];
|
|
455
420
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -457,33 +422,33 @@ function Xn(e) {
|
|
|
457
422
|
Object.keys(i).forEach((n) => t.add(n));
|
|
458
423
|
}), [...t];
|
|
459
424
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
462
|
-
(i) => e == null ? void 0 : e.some((n) =>
|
|
425
|
+
function Xn(e) {
|
|
426
|
+
return Jn(e).filter(
|
|
427
|
+
(i) => e == null ? void 0 : e.some((n) => Yn(n[i]))
|
|
463
428
|
);
|
|
464
429
|
}
|
|
465
|
-
function
|
|
430
|
+
function Ae(e, t) {
|
|
466
431
|
var i;
|
|
467
432
|
if (t.id)
|
|
468
433
|
return (i = e.sql) != null && i.trim() ? { kind: "column", columnKey: t.id } : { kind: "metric", metricId: t.id };
|
|
469
434
|
}
|
|
470
|
-
function
|
|
435
|
+
function Vt(e) {
|
|
471
436
|
const t = e.context.preferences;
|
|
472
437
|
if (!t)
|
|
473
438
|
return e.authoredFormat;
|
|
474
|
-
const i =
|
|
439
|
+
const i = Ae(e.card, e.metric);
|
|
475
440
|
return _(
|
|
476
441
|
e.authoredFormat,
|
|
477
442
|
t,
|
|
478
443
|
i ? e.context.resolveBoundCurrency(i) : void 0
|
|
479
444
|
);
|
|
480
445
|
}
|
|
481
|
-
function
|
|
446
|
+
function Zn(e) {
|
|
482
447
|
var a, o, s;
|
|
483
|
-
const t = (s = (o = (a = e.card.preferences) == null ? void 0 : a.tablePrefs) == null ? void 0 : o.columnSettingsMap) == null ? void 0 : s[e.columnKey], i = (t == null ? void 0 : t.type) === "number" ?
|
|
448
|
+
const t = (s = (o = (a = e.card.preferences) == null ? void 0 : a.tablePrefs) == null ? void 0 : o.columnSettingsMap) == null ? void 0 : s[e.columnKey], i = (t == null ? void 0 : t.type) === "number" ? ci(
|
|
484
449
|
{ dataType: "number", format: void 0 },
|
|
485
450
|
t
|
|
486
|
-
) : void 0, n = i == null ? void 0 : i.authoredFormat, r =
|
|
451
|
+
) : void 0, n = i == null ? void 0 : i.authoredFormat, r = R(n) ? Vt({
|
|
487
452
|
card: e.card,
|
|
488
453
|
metric: {
|
|
489
454
|
id: e.columnKey
|
|
@@ -501,10 +466,10 @@ function er(e) {
|
|
|
501
466
|
format: r
|
|
502
467
|
};
|
|
503
468
|
}
|
|
504
|
-
function
|
|
469
|
+
function io(e) {
|
|
505
470
|
var r, a;
|
|
506
471
|
const t = new Set(
|
|
507
|
-
|
|
472
|
+
Xn(e.records)
|
|
508
473
|
), i = new Set(
|
|
509
474
|
e.renderedMetricKeys || e.resultKeys
|
|
510
475
|
), n = ((a = (r = e.card.preferences) == null ? void 0 : r.tablePrefs) == null ? void 0 : a.columnSettingsMap) || {};
|
|
@@ -515,29 +480,29 @@ function ao(e) {
|
|
|
515
480
|
}
|
|
516
481
|
);
|
|
517
482
|
}
|
|
518
|
-
function
|
|
483
|
+
function no(e) {
|
|
519
484
|
var a, o;
|
|
520
485
|
const { card: t, context: i } = e;
|
|
521
|
-
if (!(i != null && i.preferences) || !
|
|
486
|
+
if (!(i != null && i.preferences) || !vt(t.type))
|
|
522
487
|
return t;
|
|
523
488
|
const n = i.preferences, r = (a = t.sql) != null && a.trim() ? e.resultMetricKeys.map(
|
|
524
|
-
(s) =>
|
|
489
|
+
(s) => Zn({
|
|
525
490
|
card: t,
|
|
526
491
|
columnKey: s,
|
|
527
492
|
context: i
|
|
528
493
|
})
|
|
529
494
|
) : (((o = t.config) == null ? void 0 : o.metricColumns) || []).map((s) => {
|
|
530
|
-
const l =
|
|
531
|
-
if (!
|
|
495
|
+
const l = dt(t, s), c = l.authoredFormat;
|
|
496
|
+
if (!R(c))
|
|
532
497
|
return s;
|
|
533
|
-
const u =
|
|
498
|
+
const u = Ae(t, s), f = u ? i.resolveBoundCurrency(u) : void 0;
|
|
534
499
|
return l.source === "inferred" && !f ? s : {
|
|
535
500
|
...s,
|
|
536
501
|
format: l.source === "inferred" ? _(
|
|
537
502
|
c,
|
|
538
503
|
n,
|
|
539
504
|
f
|
|
540
|
-
) :
|
|
505
|
+
) : Vt({
|
|
541
506
|
card: t,
|
|
542
507
|
metric: s,
|
|
543
508
|
context: i,
|
|
@@ -553,16 +518,16 @@ function oo(e) {
|
|
|
553
518
|
}
|
|
554
519
|
};
|
|
555
520
|
}
|
|
556
|
-
function
|
|
521
|
+
function fe(e) {
|
|
557
522
|
var l;
|
|
558
523
|
const { card: t, context: i, formatOptions: n } = e, r = i == null ? void 0 : i.preferences;
|
|
559
|
-
if (!t || !r || !
|
|
524
|
+
if (!t || !r || !vt(t.type))
|
|
560
525
|
return n;
|
|
561
526
|
if (!n) {
|
|
562
527
|
const c = e.metrics.filter(
|
|
563
528
|
(f) => !!f
|
|
564
529
|
), u = c.some(
|
|
565
|
-
(f) =>
|
|
530
|
+
(f) => R(f.format)
|
|
566
531
|
);
|
|
567
532
|
return c.length < 2 || !u ? n : K(
|
|
568
533
|
_({ type: "number" }, r),
|
|
@@ -573,7 +538,7 @@ function he(e) {
|
|
|
573
538
|
const c = e.metrics.filter(
|
|
574
539
|
(f) => !!f
|
|
575
540
|
), u = c.filter(
|
|
576
|
-
(f) =>
|
|
541
|
+
(f) => R(f.format)
|
|
577
542
|
);
|
|
578
543
|
if (u.length === 0)
|
|
579
544
|
return n;
|
|
@@ -583,15 +548,15 @@ function he(e) {
|
|
|
583
548
|
{ preserveOmittedProperties: !0 }
|
|
584
549
|
);
|
|
585
550
|
}
|
|
586
|
-
const a =
|
|
551
|
+
const a = ft(n, {
|
|
587
552
|
preserveOmittedProperties: !0
|
|
588
553
|
});
|
|
589
|
-
if (!
|
|
554
|
+
if (!R(a))
|
|
590
555
|
return n;
|
|
591
556
|
const o = e.metrics.flatMap((c) => {
|
|
592
557
|
if (!c)
|
|
593
558
|
return [];
|
|
594
|
-
const u =
|
|
559
|
+
const u = Ae(t, c);
|
|
595
560
|
return [
|
|
596
561
|
_(
|
|
597
562
|
a,
|
|
@@ -606,7 +571,7 @@ function he(e) {
|
|
|
606
571
|
{ preserveOmittedProperties: !0 }
|
|
607
572
|
);
|
|
608
573
|
const [s] = o;
|
|
609
|
-
if (o.some((c) => !
|
|
574
|
+
if (o.some((c) => !ce(c, s))) {
|
|
610
575
|
const c = _(
|
|
611
576
|
{
|
|
612
577
|
...a,
|
|
@@ -623,84 +588,84 @@ function he(e) {
|
|
|
623
588
|
preserveOmittedProperties: !0
|
|
624
589
|
});
|
|
625
590
|
}
|
|
626
|
-
const
|
|
591
|
+
const er = /* @__PURE__ */ new Set([
|
|
627
592
|
"horizontalBar",
|
|
628
593
|
"tornado",
|
|
629
594
|
"pyramid",
|
|
630
595
|
"range"
|
|
631
|
-
]),
|
|
596
|
+
]), tr = /* @__PURE__ */ new Set([
|
|
632
597
|
"tornado",
|
|
633
598
|
"pyramid",
|
|
634
599
|
"range"
|
|
635
|
-
]),
|
|
600
|
+
]), ir = /* @__PURE__ */ new Set([
|
|
636
601
|
"tornado",
|
|
637
602
|
"pyramid",
|
|
638
603
|
"range"
|
|
639
604
|
]);
|
|
640
|
-
function
|
|
605
|
+
function nr(e) {
|
|
641
606
|
const { chartType: t, resultKeys: i, config: n } = e, r = 1 + (n != null && n.enableGrouping && (n.groupKey || i[1]) ? 1 : 0), a = i.slice(r), o = (n == null ? void 0 : n.xMetricKey) ?? a[0], s = (n == null ? void 0 : n.yMetricKey) ?? a[1] ?? a[0], l = t === "bubble" ? (n == null ? void 0 : n.radiusMetricKey) ?? a[2] ?? a[1] ?? a[0] : void 0, c = new Set(i);
|
|
642
607
|
return [o, s, l].filter((u) => !!u).filter((u) => c.has(u));
|
|
643
608
|
}
|
|
644
|
-
function
|
|
609
|
+
function ro(e) {
|
|
645
610
|
const { chartType: t, resultKeys: i, preferences: n } = e;
|
|
646
611
|
return t === "scatter" || t === "bubble" ? [
|
|
647
612
|
...new Set(
|
|
648
|
-
|
|
613
|
+
nr({
|
|
649
614
|
chartType: t,
|
|
650
615
|
resultKeys: i,
|
|
651
616
|
config: n == null ? void 0 : n.bubbleScatterConfig
|
|
652
617
|
})
|
|
653
618
|
)
|
|
654
|
-
] :
|
|
619
|
+
] : ir.has(t || "") ? i.slice(2) : i.length === 1 ? [i[0]] : i.slice(1);
|
|
655
620
|
}
|
|
656
|
-
function
|
|
621
|
+
function te(e, t) {
|
|
657
622
|
var i;
|
|
658
|
-
return ((i = t == null ? void 0 : t.chartOptions) == null ? void 0 : i.indexAxis) === "y" ||
|
|
623
|
+
return ((i = t == null ? void 0 : t.chartOptions) == null ? void 0 : i.indexAxis) === "y" || er.has(e || "") ? "x" : "y";
|
|
659
624
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
625
|
+
function ao(e, t) {
|
|
626
|
+
return te(e, t) === "x";
|
|
662
627
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
628
|
+
function rr(e, t) {
|
|
629
|
+
return te(e, t) === "y" ? t == null ? void 0 : t.yAxisConfig : (t == null ? void 0 : t.xAxisConfig) || (tr.has(e || "") ? t == null ? void 0 : t.yAxisConfig : void 0);
|
|
665
630
|
}
|
|
666
|
-
function
|
|
631
|
+
function X(e) {
|
|
667
632
|
return e ? Object.entries(e).some(([t, i]) => i == null || i === "" ? !1 : t === "type" ? i !== "auto" : !0) : !1;
|
|
668
633
|
}
|
|
669
|
-
function
|
|
634
|
+
function kt(e) {
|
|
670
635
|
if (e)
|
|
671
636
|
return e.alias || e.label || e.name;
|
|
672
637
|
}
|
|
673
|
-
function
|
|
638
|
+
function Ie(e, t) {
|
|
674
639
|
var n;
|
|
675
640
|
return (((n = e == null ? void 0 : e.config) == null ? void 0 : n.metricColumns) || []).find((r) => {
|
|
676
|
-
const a =
|
|
641
|
+
const a = kt(r);
|
|
677
642
|
return t.metricId && r.id === t.metricId || t.metricAlias && a === t.metricAlias || t.metricAlias && r.alias === t.metricAlias || t.columnId && a === t.columnId || t.columnId && r.alias === t.columnId || t.columnId && r.label === t.columnId || t.columnId && r.name === t.columnId;
|
|
678
643
|
});
|
|
679
644
|
}
|
|
680
|
-
function
|
|
645
|
+
function ie(e, t) {
|
|
681
646
|
var n, r;
|
|
682
|
-
const i =
|
|
683
|
-
if (!(i && ((r = (n = e == null ? void 0 : e.config) == null ? void 0 : n.groupByColumns) != null && r.includes(i)) &&
|
|
647
|
+
const i = $n(e, t);
|
|
648
|
+
if (!(i && ((r = (n = e == null ? void 0 : e.config) == null ? void 0 : n.groupByColumns) != null && r.includes(i)) && !qn(i)))
|
|
684
649
|
return i;
|
|
685
650
|
}
|
|
686
|
-
function
|
|
687
|
-
return !!e && !(e != null && e.format) &&
|
|
651
|
+
function ar(e) {
|
|
652
|
+
return !!e && !(e != null && e.format) && ht(e == null ? void 0 : e.dataType) === "number";
|
|
688
653
|
}
|
|
689
|
-
const
|
|
654
|
+
const or = {
|
|
690
655
|
style: "decimal",
|
|
691
656
|
showDataBar: !1,
|
|
692
657
|
dataBarColor: "#3b82f6"
|
|
693
658
|
};
|
|
694
|
-
function
|
|
659
|
+
function Bt(e) {
|
|
695
660
|
if (!e)
|
|
696
661
|
return;
|
|
697
|
-
const t =
|
|
662
|
+
const t = Oe();
|
|
698
663
|
return {
|
|
699
664
|
...t,
|
|
700
665
|
...e,
|
|
701
666
|
inheritMetricFormat: e.numberFormat ? e.inheritMetricFormat : e.inheritMetricFormat ?? t.inheritMetricFormat,
|
|
702
667
|
numberFormat: {
|
|
703
|
-
...
|
|
668
|
+
...or,
|
|
704
669
|
...e.numberFormat
|
|
705
670
|
},
|
|
706
671
|
dateFormat: {
|
|
@@ -713,21 +678,21 @@ function Lt(e) {
|
|
|
713
678
|
}
|
|
714
679
|
};
|
|
715
680
|
}
|
|
716
|
-
function
|
|
681
|
+
function oo(e) {
|
|
717
682
|
return Object.fromEntries(
|
|
718
683
|
Object.entries(e || {}).map(([t, i]) => [
|
|
719
684
|
t,
|
|
720
|
-
|
|
685
|
+
Bt(i)
|
|
721
686
|
])
|
|
722
687
|
);
|
|
723
688
|
}
|
|
724
|
-
function
|
|
689
|
+
function ae(e) {
|
|
725
690
|
return !!(e && typeof e == "object" && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype);
|
|
726
691
|
}
|
|
727
|
-
function
|
|
728
|
-
if (!
|
|
692
|
+
function Kt(e, t, i) {
|
|
693
|
+
if (!ae(i))
|
|
729
694
|
return i;
|
|
730
|
-
const n =
|
|
695
|
+
const n = ae(e) ? e : {}, r = ae(t) ? t : {}, a = {};
|
|
731
696
|
for (const o of Object.keys(i)) {
|
|
732
697
|
const s = i[o];
|
|
733
698
|
if (s === void 0)
|
|
@@ -736,23 +701,23 @@ function qt(e, t, i) {
|
|
|
736
701
|
n,
|
|
737
702
|
o
|
|
738
703
|
), c = r[o];
|
|
739
|
-
if (l &&
|
|
704
|
+
if (l && ce(s, c)) {
|
|
740
705
|
a[o] = n[o];
|
|
741
706
|
continue;
|
|
742
707
|
}
|
|
743
|
-
if (!l &&
|
|
708
|
+
if (!l && ce(s, c))
|
|
744
709
|
continue;
|
|
745
|
-
const u =
|
|
710
|
+
const u = Kt(
|
|
746
711
|
n[o],
|
|
747
712
|
c,
|
|
748
713
|
s
|
|
749
714
|
);
|
|
750
|
-
|
|
715
|
+
ae(u) && Object.keys(u).length === 0 && !l || (a[o] = u);
|
|
751
716
|
}
|
|
752
717
|
return a;
|
|
753
718
|
}
|
|
754
|
-
function
|
|
755
|
-
let t =
|
|
719
|
+
function sr(e) {
|
|
720
|
+
let t = Kt(
|
|
756
721
|
e.persisted,
|
|
757
722
|
e.baseline,
|
|
758
723
|
e.next
|
|
@@ -760,11 +725,11 @@ function lr(e) {
|
|
|
760
725
|
if (e.enforceDeclaredSqlTemporalFormat && e.next.type === "date" && !e.next.dateFormat.useRelativeTime && e.next.dateFormat.useCustomFormat) {
|
|
761
726
|
const i = e.next.dateFormat.customFormat;
|
|
762
727
|
if (!(i != null && i.trim()))
|
|
763
|
-
throw new
|
|
728
|
+
throw new qi(
|
|
764
729
|
"invalid_raw_temporal_format",
|
|
765
730
|
"Custom table date formatting requires a non-empty pattern."
|
|
766
731
|
);
|
|
767
|
-
|
|
732
|
+
$i({
|
|
768
733
|
dialect: "date_fns",
|
|
769
734
|
pattern: i,
|
|
770
735
|
valueKind: e.rawTemporalValueKind
|
|
@@ -777,7 +742,7 @@ function lr(e) {
|
|
|
777
742
|
}
|
|
778
743
|
};
|
|
779
744
|
}
|
|
780
|
-
return e.next.type === "number" && !
|
|
745
|
+
return e.next.type === "number" && !ce(e.next.numberFormat, e.baseline.numberFormat) && t.numberFormat ? {
|
|
781
746
|
...t,
|
|
782
747
|
type: "number",
|
|
783
748
|
inheritMetricFormat: e.next.inheritMetricFormat ?? !1
|
|
@@ -790,10 +755,10 @@ function lr(e) {
|
|
|
790
755
|
type: "date"
|
|
791
756
|
} : t;
|
|
792
757
|
}
|
|
793
|
-
function
|
|
794
|
-
return e.reset ?
|
|
758
|
+
function so(e) {
|
|
759
|
+
return e.reset ? lr(e.persisted, e.columnId) : {
|
|
795
760
|
...e.persisted,
|
|
796
|
-
[e.columnId]:
|
|
761
|
+
[e.columnId]: sr({
|
|
797
762
|
persisted: e.persisted[e.columnId],
|
|
798
763
|
baseline: e.baseline,
|
|
799
764
|
next: e.next,
|
|
@@ -803,14 +768,14 @@ function uo(e) {
|
|
|
803
768
|
})
|
|
804
769
|
};
|
|
805
770
|
}
|
|
806
|
-
function
|
|
771
|
+
function lr(e, t) {
|
|
807
772
|
if (!(t in e))
|
|
808
773
|
return e;
|
|
809
774
|
const i = { ...e };
|
|
810
775
|
return delete i[t], i;
|
|
811
776
|
}
|
|
812
|
-
function
|
|
813
|
-
const i = e ||
|
|
777
|
+
function cr(e, t) {
|
|
778
|
+
const i = e || Oe(), n = !t;
|
|
814
779
|
return {
|
|
815
780
|
...i,
|
|
816
781
|
type: "number",
|
|
@@ -828,25 +793,25 @@ function ur(e, t) {
|
|
|
828
793
|
}
|
|
829
794
|
};
|
|
830
795
|
}
|
|
831
|
-
function
|
|
796
|
+
function be(e) {
|
|
832
797
|
if (e)
|
|
833
798
|
return e.trim().toLowerCase();
|
|
834
799
|
}
|
|
835
|
-
const
|
|
836
|
-
function
|
|
800
|
+
const Lt = /\s*(?:\((?:previous|last year|start|target|comparison)\)|δ)\s*$/i;
|
|
801
|
+
function ur(e) {
|
|
837
802
|
const t = e == null ? void 0 : e.trim();
|
|
838
|
-
return t ? t.replace(
|
|
803
|
+
return t ? t.replace(Lt, "").trim() || t : void 0;
|
|
839
804
|
}
|
|
840
|
-
function
|
|
805
|
+
function dr(e) {
|
|
841
806
|
const t = e == null ? void 0 : e.trim();
|
|
842
|
-
return t ?
|
|
807
|
+
return t ? Lt.test(t) : !1;
|
|
843
808
|
}
|
|
844
|
-
function
|
|
809
|
+
function fr(e, t) {
|
|
845
810
|
return t.metricAlias ? e.find(
|
|
846
|
-
(i) =>
|
|
811
|
+
(i) => Ri(i) === t.metricAlias
|
|
847
812
|
) : t.metricId ? e.find((i) => i.id === t.metricId) : void 0;
|
|
848
813
|
}
|
|
849
|
-
function
|
|
814
|
+
function mr(e) {
|
|
850
815
|
var b;
|
|
851
816
|
const {
|
|
852
817
|
card: t,
|
|
@@ -857,26 +822,26 @@ function pr(e) {
|
|
|
857
822
|
metricKey: o
|
|
858
823
|
} = e, s = ((b = t == null ? void 0 : t.config) == null ? void 0 : b.metricColumns) || [];
|
|
859
824
|
if (n || i)
|
|
860
|
-
return
|
|
825
|
+
return fr(s, {
|
|
861
826
|
metricAlias: n,
|
|
862
827
|
metricId: i
|
|
863
828
|
});
|
|
864
829
|
const l = [o, a], c = l.some(
|
|
865
|
-
(m) =>
|
|
830
|
+
(m) => dr(m)
|
|
866
831
|
), u = l.filter(
|
|
867
832
|
(m) => !!m
|
|
868
833
|
);
|
|
869
834
|
for (const m of u) {
|
|
870
|
-
const y =
|
|
835
|
+
const y = Ie(t, {
|
|
871
836
|
columnId: m,
|
|
872
837
|
metricAlias: m
|
|
873
838
|
});
|
|
874
839
|
if (y)
|
|
875
840
|
return y;
|
|
876
841
|
}
|
|
877
|
-
const f = u.map((m) =>
|
|
842
|
+
const f = u.map((m) => be(m)).filter((m) => !!m), d = u.map((m) => ur(m)).filter((m) => !!m);
|
|
878
843
|
for (const m of d) {
|
|
879
|
-
const y =
|
|
844
|
+
const y = Ie(t, {
|
|
880
845
|
columnId: m,
|
|
881
846
|
metricAlias: m
|
|
882
847
|
});
|
|
@@ -887,9 +852,9 @@ function pr(e) {
|
|
|
887
852
|
return s[0];
|
|
888
853
|
if (!c && typeof r == "number" && r >= 0 && r < s.length)
|
|
889
854
|
return s[r];
|
|
890
|
-
const
|
|
855
|
+
const g = d.map((m) => be(m)).filter((m) => !!m), v = [
|
|
891
856
|
...f,
|
|
892
|
-
...
|
|
857
|
+
...g
|
|
893
858
|
];
|
|
894
859
|
if (v.length !== 0)
|
|
895
860
|
return s.find((m) => {
|
|
@@ -897,59 +862,59 @@ function pr(e) {
|
|
|
897
862
|
m.alias,
|
|
898
863
|
m.label,
|
|
899
864
|
m.name,
|
|
900
|
-
|
|
901
|
-
].map((C) =>
|
|
865
|
+
kt(m)
|
|
866
|
+
].map((C) => be(C)).filter((C) => !!C);
|
|
902
867
|
return v.some(
|
|
903
868
|
(C) => y.includes(C)
|
|
904
869
|
);
|
|
905
870
|
});
|
|
906
871
|
}
|
|
907
|
-
function
|
|
908
|
-
const t =
|
|
872
|
+
function pr(e) {
|
|
873
|
+
const t = W(e == null ? void 0 : e.format);
|
|
909
874
|
return K(t);
|
|
910
875
|
}
|
|
911
|
-
function
|
|
876
|
+
function it(e, t) {
|
|
912
877
|
if (t)
|
|
913
|
-
return
|
|
878
|
+
return Ie(e, {
|
|
914
879
|
columnId: t,
|
|
915
880
|
metricAlias: t
|
|
916
881
|
});
|
|
917
882
|
}
|
|
918
|
-
function
|
|
919
|
-
const t =
|
|
883
|
+
function nt(e) {
|
|
884
|
+
const t = ft(e);
|
|
920
885
|
if (t)
|
|
921
886
|
return JSON.stringify(t);
|
|
922
887
|
}
|
|
923
|
-
function
|
|
924
|
-
const i =
|
|
888
|
+
function hr(e, t) {
|
|
889
|
+
const i = nt(e), n = nt(t);
|
|
925
890
|
return !!(i && n && i === n);
|
|
926
891
|
}
|
|
927
892
|
function gr(e) {
|
|
928
893
|
if (e.length === 0)
|
|
929
894
|
return;
|
|
930
895
|
const t = e.map(
|
|
931
|
-
(o) =>
|
|
896
|
+
(o) => pr(o)
|
|
932
897
|
);
|
|
933
898
|
if (!t.every(
|
|
934
|
-
(o) =>
|
|
899
|
+
(o) => X(o)
|
|
935
900
|
))
|
|
936
901
|
return;
|
|
937
902
|
const n = t, [r] = n;
|
|
938
903
|
return n.every(
|
|
939
|
-
(o) =>
|
|
904
|
+
(o) => hr(r, o)
|
|
940
905
|
) ? r : void 0;
|
|
941
906
|
}
|
|
942
|
-
function
|
|
907
|
+
function yr(e) {
|
|
943
908
|
const t = e.formatMode || e.legacyMode;
|
|
944
|
-
return t === "override" ? "override" : t === "inherit" ? "inherit" : e.legacyMode && e.legacyMode !== "auto" && e.legacyMode !== "inherit" && e.legacyMode !== "override" ||
|
|
909
|
+
return t === "override" ? "override" : t === "inherit" ? "inherit" : e.legacyMode && e.legacyMode !== "auto" && e.legacyMode !== "inherit" && e.legacyMode !== "override" || X(e.formatOptions) ? "override" : "inherit";
|
|
945
910
|
}
|
|
946
|
-
function
|
|
947
|
-
const t =
|
|
911
|
+
function me(e) {
|
|
912
|
+
const t = yr({
|
|
948
913
|
formatMode: e.formatMode,
|
|
949
914
|
legacyMode: e.legacyMode,
|
|
950
915
|
formatOptions: e.overrideFormatOptions
|
|
951
916
|
});
|
|
952
|
-
if (t === "override" &&
|
|
917
|
+
if (t === "override" && X(e.overrideFormatOptions))
|
|
953
918
|
return {
|
|
954
919
|
formatOptions: e.overrideFormatOptions || void 0,
|
|
955
920
|
source: "override"
|
|
@@ -963,13 +928,13 @@ function ye(e) {
|
|
|
963
928
|
const i = gr(
|
|
964
929
|
e.metrics || []
|
|
965
930
|
);
|
|
966
|
-
if (
|
|
931
|
+
if (X(i))
|
|
967
932
|
return {
|
|
968
933
|
formatOptions: i,
|
|
969
934
|
source: "metric"
|
|
970
935
|
};
|
|
971
|
-
const n =
|
|
972
|
-
return
|
|
936
|
+
const n = Sr(e.preferences);
|
|
937
|
+
return X(n) ? {
|
|
973
938
|
formatOptions: n,
|
|
974
939
|
source: "legacy"
|
|
975
940
|
} : {
|
|
@@ -977,38 +942,38 @@ function ye(e) {
|
|
|
977
942
|
source: "auto"
|
|
978
943
|
};
|
|
979
944
|
}
|
|
980
|
-
function
|
|
945
|
+
function qt(e) {
|
|
981
946
|
var l, c, u;
|
|
982
947
|
const { card: t, chartType: i, axis: n, preferences: r } = e, a = ((l = t == null ? void 0 : t.config) == null ? void 0 : l.metricColumns) || [], o = (r == null ? void 0 : r.datasetOptions) || [];
|
|
983
948
|
if (!a.length)
|
|
984
949
|
return [];
|
|
985
950
|
if (i === "combo")
|
|
986
951
|
return n === "x" ? [] : a.filter((f, d) => {
|
|
987
|
-
const
|
|
988
|
-
return ((
|
|
952
|
+
const g = o.find((b) => b.idx === d);
|
|
953
|
+
return ((g == null ? void 0 : g.yAxisId) === "y2" ? "y2" : "y") === n;
|
|
989
954
|
});
|
|
990
955
|
if (i === "bubble" || i === "scatter") {
|
|
991
956
|
if (n === "y2")
|
|
992
957
|
return [];
|
|
993
|
-
const f =
|
|
958
|
+
const f = it(
|
|
994
959
|
t,
|
|
995
960
|
(c = r == null ? void 0 : r.bubbleScatterConfig) == null ? void 0 : c.xMetricKey
|
|
996
|
-
) || a[0], d =
|
|
961
|
+
) || a[0], d = it(
|
|
997
962
|
t,
|
|
998
963
|
(u = r == null ? void 0 : r.bubbleScatterConfig) == null ? void 0 : u.yMetricKey
|
|
999
964
|
) || a[1] || a[0];
|
|
1000
965
|
return n === "x" ? f ? [f] : [] : d ? [d] : [];
|
|
1001
966
|
}
|
|
1002
|
-
const s =
|
|
967
|
+
const s = te(i, r);
|
|
1003
968
|
return i === "radar" ? n === "y" ? a : [] : n !== s ? [] : a;
|
|
1004
969
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const { card: t, chartType: i, axis: n, preferences: r, axisConfig: a } = e, o =
|
|
970
|
+
function _e(e) {
|
|
971
|
+
const { card: t, chartType: i, axis: n, preferences: r, axisConfig: a } = e, o = qt({
|
|
1007
972
|
card: t,
|
|
1008
973
|
chartType: i,
|
|
1009
974
|
axis: n,
|
|
1010
975
|
preferences: r
|
|
1011
|
-
}), s =
|
|
976
|
+
}), s = me({
|
|
1012
977
|
formatMode: a == null ? void 0 : a.formatMode,
|
|
1013
978
|
overrideFormatOptions: a == null ? void 0 : a.formatOptions,
|
|
1014
979
|
metrics: o,
|
|
@@ -1016,7 +981,7 @@ function Ve(e) {
|
|
|
1016
981
|
});
|
|
1017
982
|
return {
|
|
1018
983
|
...s,
|
|
1019
|
-
formatOptions:
|
|
984
|
+
formatOptions: fe({
|
|
1020
985
|
card: t,
|
|
1021
986
|
metrics: o,
|
|
1022
987
|
formatOptions: s.formatOptions,
|
|
@@ -1024,7 +989,7 @@ function Ve(e) {
|
|
|
1024
989
|
})
|
|
1025
990
|
};
|
|
1026
991
|
}
|
|
1027
|
-
function
|
|
992
|
+
function $t(e, t) {
|
|
1028
993
|
if (!e && (!t || t === "auto" || t === "none"))
|
|
1029
994
|
return;
|
|
1030
995
|
const i = {
|
|
@@ -1032,8 +997,8 @@ function jt(e, t) {
|
|
|
1032
997
|
};
|
|
1033
998
|
return t && t !== "auto" && t !== "none" && !i.type && (i.type = t), i;
|
|
1034
999
|
}
|
|
1035
|
-
function
|
|
1036
|
-
const { preferences: t, metric: i } = e, n = t == null ? void 0 : t.tooltipConfig, r =
|
|
1000
|
+
function br(e) {
|
|
1001
|
+
const { preferences: t, metric: i } = e, n = t == null ? void 0 : t.tooltipConfig, r = me({
|
|
1037
1002
|
formatMode: n == null ? void 0 : n.formatMode,
|
|
1038
1003
|
legacyMode: n == null ? void 0 : n.mode,
|
|
1039
1004
|
overrideFormatOptions: n == null ? void 0 : n.formatOptions,
|
|
@@ -1042,7 +1007,7 @@ function vr(e) {
|
|
|
1042
1007
|
});
|
|
1043
1008
|
return {
|
|
1044
1009
|
...r,
|
|
1045
|
-
formatOptions:
|
|
1010
|
+
formatOptions: fe({
|
|
1046
1011
|
card: e.card,
|
|
1047
1012
|
metrics: e.metric ? [e.metric] : [],
|
|
1048
1013
|
formatOptions: r.formatOptions,
|
|
@@ -1050,14 +1015,14 @@ function vr(e) {
|
|
|
1050
1015
|
})
|
|
1051
1016
|
};
|
|
1052
1017
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return t ===
|
|
1018
|
+
function Ne(e, t, i) {
|
|
1019
|
+
return t === te(i, e) ? rr(i, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
|
|
1055
1020
|
}
|
|
1056
|
-
function
|
|
1021
|
+
function Ee(e) {
|
|
1057
1022
|
const { chartType: t, preferences: i } = e;
|
|
1058
|
-
return t === "bubble" || t === "scatter" ? "y" :
|
|
1023
|
+
return t === "bubble" || t === "scatter" ? "y" : te(t, i);
|
|
1059
1024
|
}
|
|
1060
|
-
function
|
|
1025
|
+
function zt(e) {
|
|
1061
1026
|
switch (e) {
|
|
1062
1027
|
case "pie":
|
|
1063
1028
|
case "doughnut":
|
|
@@ -1070,8 +1035,8 @@ function Ut(e) {
|
|
|
1070
1035
|
return !0;
|
|
1071
1036
|
}
|
|
1072
1037
|
}
|
|
1073
|
-
function
|
|
1074
|
-
const { card: t, chartType: i, preferences: n, metric: r } = e, a =
|
|
1038
|
+
function lo(e) {
|
|
1039
|
+
const { card: t, chartType: i, preferences: n, metric: r } = e, a = br({
|
|
1075
1040
|
card: t,
|
|
1076
1041
|
preferences: n,
|
|
1077
1042
|
metric: r,
|
|
@@ -1079,29 +1044,29 @@ function fo(e) {
|
|
|
1079
1044
|
});
|
|
1080
1045
|
if (a.source === "override")
|
|
1081
1046
|
return a;
|
|
1082
|
-
const o = e.axis ||
|
|
1047
|
+
const o = e.axis || Ee({ chartType: i, preferences: n }), s = _e({
|
|
1083
1048
|
card: t,
|
|
1084
1049
|
chartType: i,
|
|
1085
1050
|
axis: o,
|
|
1086
1051
|
preferences: n,
|
|
1087
|
-
axisConfig:
|
|
1052
|
+
axisConfig: Ne(n, o, i),
|
|
1088
1053
|
numericPresentation: e.numericPresentation
|
|
1089
1054
|
});
|
|
1090
1055
|
return s.source === "override" ? s : a;
|
|
1091
1056
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const { card: t, chartType: i, preferences: n, dataLabelsConfig: r } = e, a = i || (t == null ? void 0 : t.type), o =
|
|
1057
|
+
function co(e) {
|
|
1058
|
+
const { card: t, chartType: i, preferences: n, dataLabelsConfig: r } = e, a = i || (t == null ? void 0 : t.type), o = Ee({
|
|
1094
1059
|
chartType: a,
|
|
1095
1060
|
preferences: n
|
|
1096
|
-
}), s =
|
|
1061
|
+
}), s = qt({
|
|
1097
1062
|
card: t,
|
|
1098
1063
|
chartType: a,
|
|
1099
1064
|
axis: o,
|
|
1100
1065
|
preferences: n
|
|
1101
|
-
}), l =
|
|
1066
|
+
}), l = me({
|
|
1102
1067
|
formatMode: r == null ? void 0 : r.formatMode,
|
|
1103
1068
|
legacyMode: r == null ? void 0 : r.format,
|
|
1104
|
-
overrideFormatOptions:
|
|
1069
|
+
overrideFormatOptions: $t(
|
|
1105
1070
|
r == null ? void 0 : r.formatOptions,
|
|
1106
1071
|
r == null ? void 0 : r.format
|
|
1107
1072
|
),
|
|
@@ -1109,21 +1074,21 @@ function mo(e) {
|
|
|
1109
1074
|
preferences: n
|
|
1110
1075
|
}), c = {
|
|
1111
1076
|
...l,
|
|
1112
|
-
formatOptions:
|
|
1077
|
+
formatOptions: fe({
|
|
1113
1078
|
card: t,
|
|
1114
1079
|
metrics: s,
|
|
1115
1080
|
formatOptions: l.formatOptions,
|
|
1116
1081
|
context: e.numericPresentation
|
|
1117
1082
|
})
|
|
1118
1083
|
};
|
|
1119
|
-
if (c.source === "override" || !
|
|
1084
|
+
if (c.source === "override" || !zt(a))
|
|
1120
1085
|
return c;
|
|
1121
|
-
const u =
|
|
1086
|
+
const u = _e({
|
|
1122
1087
|
card: t,
|
|
1123
1088
|
chartType: a,
|
|
1124
1089
|
axis: o,
|
|
1125
1090
|
preferences: n,
|
|
1126
|
-
axisConfig:
|
|
1091
|
+
axisConfig: Ne(
|
|
1127
1092
|
n,
|
|
1128
1093
|
o,
|
|
1129
1094
|
a
|
|
@@ -1132,11 +1097,11 @@ function mo(e) {
|
|
|
1132
1097
|
});
|
|
1133
1098
|
return u.source === "override" ? u : c;
|
|
1134
1099
|
}
|
|
1135
|
-
function
|
|
1136
|
-
const { preferences: t, dataLabelsConfig: i, metric: n } = e, r =
|
|
1100
|
+
function vr(e) {
|
|
1101
|
+
const { preferences: t, dataLabelsConfig: i, metric: n } = e, r = me({
|
|
1137
1102
|
formatMode: i == null ? void 0 : i.formatMode,
|
|
1138
1103
|
legacyMode: i == null ? void 0 : i.format,
|
|
1139
|
-
overrideFormatOptions:
|
|
1104
|
+
overrideFormatOptions: $t(
|
|
1140
1105
|
i == null ? void 0 : i.formatOptions,
|
|
1141
1106
|
i == null ? void 0 : i.format
|
|
1142
1107
|
),
|
|
@@ -1145,7 +1110,7 @@ function Fr(e) {
|
|
|
1145
1110
|
});
|
|
1146
1111
|
return {
|
|
1147
1112
|
...r,
|
|
1148
|
-
formatOptions:
|
|
1113
|
+
formatOptions: fe({
|
|
1149
1114
|
card: e.card,
|
|
1150
1115
|
metrics: e.metric ? [e.metric] : [],
|
|
1151
1116
|
formatOptions: r.formatOptions,
|
|
@@ -1153,16 +1118,16 @@ function Fr(e) {
|
|
|
1153
1118
|
})
|
|
1154
1119
|
};
|
|
1155
1120
|
}
|
|
1156
|
-
function
|
|
1121
|
+
function uo(e) {
|
|
1157
1122
|
var o, s;
|
|
1158
|
-
const t =
|
|
1123
|
+
const t = mr({
|
|
1159
1124
|
card: e.card,
|
|
1160
1125
|
metricId: e.metricId,
|
|
1161
1126
|
metricAlias: e.metricAlias,
|
|
1162
1127
|
datasetIndex: e.datasetIndex,
|
|
1163
1128
|
datasetLabel: e.datasetLabel,
|
|
1164
1129
|
metricKey: e.metricKey
|
|
1165
|
-
}), i =
|
|
1130
|
+
}), i = vr({
|
|
1166
1131
|
card: e.card,
|
|
1167
1132
|
preferences: e.preferences,
|
|
1168
1133
|
dataLabelsConfig: e.dataLabelsConfig,
|
|
@@ -1172,9 +1137,9 @@ function po(e) {
|
|
|
1172
1137
|
if (i.source === "override")
|
|
1173
1138
|
return i;
|
|
1174
1139
|
const n = (o = e.card) == null ? void 0 : o.type;
|
|
1175
|
-
if (!
|
|
1140
|
+
if (!zt(n))
|
|
1176
1141
|
return i;
|
|
1177
|
-
let r =
|
|
1142
|
+
let r = Ee({
|
|
1178
1143
|
chartType: n,
|
|
1179
1144
|
preferences: e.preferences
|
|
1180
1145
|
});
|
|
@@ -1184,12 +1149,12 @@ function po(e) {
|
|
|
1184
1149
|
);
|
|
1185
1150
|
r = (c == null ? void 0 : c.yAxisId) === "y2" ? "y2" : "y";
|
|
1186
1151
|
}
|
|
1187
|
-
const a =
|
|
1152
|
+
const a = _e({
|
|
1188
1153
|
card: e.card,
|
|
1189
1154
|
chartType: n,
|
|
1190
1155
|
axis: r,
|
|
1191
1156
|
preferences: e.preferences,
|
|
1192
|
-
axisConfig:
|
|
1157
|
+
axisConfig: Ne(
|
|
1193
1158
|
e.preferences,
|
|
1194
1159
|
r,
|
|
1195
1160
|
n
|
|
@@ -1198,15 +1163,15 @@ function po(e) {
|
|
|
1198
1163
|
});
|
|
1199
1164
|
return a.source === "override" ? a : i;
|
|
1200
1165
|
}
|
|
1201
|
-
function
|
|
1166
|
+
function fo(e) {
|
|
1202
1167
|
return (e == null ? void 0 : e.rawValue) === !0;
|
|
1203
1168
|
}
|
|
1204
|
-
function
|
|
1169
|
+
function Fr(e) {
|
|
1205
1170
|
const t = e == null ? void 0 : e.numberFormat;
|
|
1206
1171
|
if (!t)
|
|
1207
1172
|
return;
|
|
1208
1173
|
if (t.style === "duration")
|
|
1209
|
-
return K(
|
|
1174
|
+
return K(Se(t), {
|
|
1210
1175
|
preserveOmittedProperties: !0
|
|
1211
1176
|
});
|
|
1212
1177
|
const i = t.style === "currency" ? "currency" : t.style === "percent" ? "percent" : t.style === "scientific" ? "scientific" : "number", n = t.minimumFractionDigits, r = t.maximumFractionDigits;
|
|
@@ -1226,14 +1191,14 @@ function Cr(e) {
|
|
|
1226
1191
|
suffix: t.suffix
|
|
1227
1192
|
};
|
|
1228
1193
|
}
|
|
1229
|
-
function
|
|
1230
|
-
const n = i ? { preserveOmittedProperties: !0 } : void 0, r =
|
|
1194
|
+
function Cr(e, t, i = !1) {
|
|
1195
|
+
const n = i ? { preserveOmittedProperties: !0 } : void 0, r = W(e == null ? void 0 : e.format, n), a = mt(
|
|
1231
1196
|
r,
|
|
1232
1197
|
n
|
|
1233
1198
|
);
|
|
1234
1199
|
if (!a)
|
|
1235
1200
|
return;
|
|
1236
|
-
const o = t ||
|
|
1201
|
+
const o = t || Oe(), s = i ? {
|
|
1237
1202
|
showDataBar: o.numberFormat.showDataBar,
|
|
1238
1203
|
showHeatmap: o.numberFormat.showHeatmap,
|
|
1239
1204
|
dataBarColor: o.numberFormat.dataBarColor,
|
|
@@ -1256,8 +1221,8 @@ function Ir(e, t, i = !1) {
|
|
|
1256
1221
|
}
|
|
1257
1222
|
};
|
|
1258
1223
|
}
|
|
1259
|
-
function
|
|
1260
|
-
var
|
|
1224
|
+
function jt(e) {
|
|
1225
|
+
var T, V, N, O;
|
|
1261
1226
|
const {
|
|
1262
1227
|
card: t,
|
|
1263
1228
|
columnId: i,
|
|
@@ -1271,56 +1236,56 @@ function Ht(e) {
|
|
|
1271
1236
|
columnKeyMap: u,
|
|
1272
1237
|
valueFormatPreferences: f,
|
|
1273
1238
|
boundCurrency: d,
|
|
1274
|
-
preserveOmittedProperties:
|
|
1275
|
-
} = e, v = n ?? ((
|
|
1239
|
+
preserveOmittedProperties: g
|
|
1240
|
+
} = e, v = n ?? ((N = (V = (T = t == null ? void 0 : t.preferences) == null ? void 0 : T.tablePrefs) == null ? void 0 : V.columnSettingsMap) == null ? void 0 : N[i]), b = !((O = t == null ? void 0 : t.sql) != null && O.trim()) || ui(v), m = b ? f : null, y = b ? d : void 0, C = di(
|
|
1276
1241
|
v == null ? void 0 : v.numberFormat
|
|
1277
|
-
),
|
|
1278
|
-
if (
|
|
1279
|
-
return
|
|
1280
|
-
|
|
1242
|
+
), S = r ?? Bt(v);
|
|
1243
|
+
if (S && S.inheritMetricFormat !== !0)
|
|
1244
|
+
return rt(
|
|
1245
|
+
S,
|
|
1281
1246
|
m,
|
|
1282
1247
|
y,
|
|
1283
1248
|
{
|
|
1284
1249
|
preserveHistoricalPersistedPrecision: C
|
|
1285
1250
|
}
|
|
1286
1251
|
);
|
|
1287
|
-
const w =
|
|
1252
|
+
const w = ie(t, {
|
|
1288
1253
|
columnId: i,
|
|
1289
1254
|
metricId: o,
|
|
1290
1255
|
metricAlias: s,
|
|
1291
1256
|
columnKeyMap: u,
|
|
1292
1257
|
fieldId: l,
|
|
1293
1258
|
fieldRole: c
|
|
1294
|
-
}),
|
|
1259
|
+
}), h = Cr(
|
|
1295
1260
|
w,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
),
|
|
1299
|
-
|
|
1261
|
+
S || a,
|
|
1262
|
+
g ?? !!f
|
|
1263
|
+
), F = !h && m && ar(w) ? cr(
|
|
1264
|
+
S || a,
|
|
1300
1265
|
y
|
|
1301
1266
|
) : void 0;
|
|
1302
|
-
return
|
|
1303
|
-
|
|
1267
|
+
return rt(
|
|
1268
|
+
h || F || S || a,
|
|
1304
1269
|
m,
|
|
1305
1270
|
y,
|
|
1306
1271
|
{
|
|
1307
|
-
preserveHistoricalPersistedPrecision: !!(
|
|
1272
|
+
preserveHistoricalPersistedPrecision: !!(S && C && !h && !F)
|
|
1308
1273
|
}
|
|
1309
1274
|
);
|
|
1310
1275
|
}
|
|
1311
|
-
function
|
|
1276
|
+
function rt(e, t, i, n) {
|
|
1312
1277
|
if (!e || e.type !== "number" || !t)
|
|
1313
1278
|
return e;
|
|
1314
|
-
const r = e.numberFormat, a = r ? n != null && n.preserveHistoricalPersistedPrecision ?
|
|
1279
|
+
const r = e.numberFormat, a = r ? n != null && n.preserveHistoricalPersistedPrecision ? fi(r) : Se(r, {
|
|
1315
1280
|
preserveOmittedProperties: !0
|
|
1316
1281
|
}) : { type: "number" };
|
|
1317
|
-
if (!a || !
|
|
1282
|
+
if (!a || !R(a))
|
|
1318
1283
|
return e;
|
|
1319
1284
|
const o = _(
|
|
1320
1285
|
a,
|
|
1321
1286
|
t,
|
|
1322
1287
|
i
|
|
1323
|
-
), s =
|
|
1288
|
+
), s = mt(o, {
|
|
1324
1289
|
preserveOmittedProperties: !0
|
|
1325
1290
|
});
|
|
1326
1291
|
return s ? {
|
|
@@ -1336,30 +1301,30 @@ function ot(e, t, i, n) {
|
|
|
1336
1301
|
}
|
|
1337
1302
|
} : e;
|
|
1338
1303
|
}
|
|
1339
|
-
function
|
|
1304
|
+
function ue(e) {
|
|
1340
1305
|
if (!e.valueFormatPreferences)
|
|
1341
1306
|
return;
|
|
1342
|
-
const t =
|
|
1307
|
+
const t = jt(e);
|
|
1343
1308
|
if (!t || t.type !== "number")
|
|
1344
1309
|
return;
|
|
1345
|
-
const i =
|
|
1310
|
+
const i = Se(t.numberFormat, {
|
|
1346
1311
|
preserveOmittedProperties: !0
|
|
1347
1312
|
});
|
|
1348
|
-
if (!(!i || !
|
|
1313
|
+
if (!(!i || !yt(i)))
|
|
1349
1314
|
return i;
|
|
1350
1315
|
}
|
|
1351
|
-
function
|
|
1316
|
+
function Ir(e) {
|
|
1352
1317
|
var n, r;
|
|
1353
1318
|
if (!e.presentation.preferences)
|
|
1354
1319
|
return;
|
|
1355
|
-
const t =
|
|
1320
|
+
const t = ie(e.card, {
|
|
1356
1321
|
columnId: e.columnId,
|
|
1357
1322
|
metricId: e.metricId,
|
|
1358
1323
|
metricAlias: e.metricAlias,
|
|
1359
1324
|
columnKeyMap: e.columnKeyMap
|
|
1360
1325
|
});
|
|
1361
1326
|
if (e.comparisonValueKind === "percent_change" || e.comparisonValueKind === "ratio") {
|
|
1362
|
-
const a =
|
|
1327
|
+
const a = ue({
|
|
1363
1328
|
card: e.card,
|
|
1364
1329
|
columnId: e.columnId,
|
|
1365
1330
|
persistedSettings: e.persistedSettings,
|
|
@@ -1369,7 +1334,7 @@ function xr(e) {
|
|
|
1369
1334
|
columnKeyMap: e.columnKeyMap,
|
|
1370
1335
|
metricAlias: e.metricAlias ?? (t == null ? void 0 : t.alias),
|
|
1371
1336
|
valueFormatPreferences: e.presentation.preferences
|
|
1372
|
-
}), o =
|
|
1337
|
+
}), o = hi(e.comparisonPrecision) ?? (R(a) ? a.maximumFractionDigits : void 0) ?? (e.comparisonValueKind === "percent_change" ? 1 : 2);
|
|
1373
1338
|
return e.comparisonValueKind === "percent_change" ? {
|
|
1374
1339
|
type: "percent",
|
|
1375
1340
|
locale: e.presentation.preferences.locale,
|
|
@@ -1384,12 +1349,12 @@ function xr(e) {
|
|
|
1384
1349
|
suffix: "×"
|
|
1385
1350
|
};
|
|
1386
1351
|
}
|
|
1387
|
-
const i =
|
|
1352
|
+
const i = gi({
|
|
1388
1353
|
card: e.card,
|
|
1389
1354
|
columnKey: e.columnId,
|
|
1390
1355
|
metricId: e.metricId ?? (t && !((r = (n = e.card.config) == null ? void 0 : n.groupByColumns) != null && r.includes(t)) ? t.id : void 0)
|
|
1391
1356
|
});
|
|
1392
|
-
return
|
|
1357
|
+
return ue({
|
|
1393
1358
|
card: e.card,
|
|
1394
1359
|
columnId: e.columnId,
|
|
1395
1360
|
persistedSettings: e.persistedSettings,
|
|
@@ -1402,10 +1367,10 @@ function xr(e) {
|
|
|
1402
1367
|
boundCurrency: i ? e.presentation.resolveBoundCurrency(i) : void 0
|
|
1403
1368
|
});
|
|
1404
1369
|
}
|
|
1405
|
-
function
|
|
1406
|
-
var s, l, c, u, f, d,
|
|
1370
|
+
function xr(e) {
|
|
1371
|
+
var s, l, c, u, f, d, g;
|
|
1407
1372
|
if (e.card.type === "matrixTable" && e.target.kind === "matrix_measure") {
|
|
1408
|
-
const v = e.target, b =
|
|
1373
|
+
const v = e.target, b = yi(e.card, e.matrixCatalog).find(
|
|
1409
1374
|
(y) => y.measureId === v.measureId
|
|
1410
1375
|
), m = b == null ? void 0 : b.canonical;
|
|
1411
1376
|
return m && (m.type === "number" || m.type === "currency") ? _(
|
|
@@ -1422,44 +1387,44 @@ function Sr(e) {
|
|
|
1422
1387
|
)) ?? -1 : 0;
|
|
1423
1388
|
if (b < 0)
|
|
1424
1389
|
return;
|
|
1425
|
-
const m =
|
|
1390
|
+
const m = bi(e.card, {
|
|
1426
1391
|
metricIndex: b,
|
|
1427
1392
|
resultColumnKey: e.target.kind === "column" ? e.target.columnKey : void 0
|
|
1428
1393
|
}), y = m.authoredFormat;
|
|
1429
|
-
return m.currencyBindable && y &&
|
|
1394
|
+
return m.currencyBindable && y && R(y) ? _(
|
|
1430
1395
|
y,
|
|
1431
1396
|
e.valueFormatPreferences,
|
|
1432
1397
|
e.boundCurrency
|
|
1433
1398
|
) : void 0;
|
|
1434
1399
|
}
|
|
1435
|
-
if (!((c = e.card.sql) != null && c.trim()) && !
|
|
1400
|
+
if (!((c = e.card.sql) != null && c.trim()) && !Hi(e.card.type) && e.target.kind === "metric") {
|
|
1436
1401
|
const v = e.target.metricId, b = (f = (u = e.card.config) == null ? void 0 : u.metricColumns) == null ? void 0 : f.find(
|
|
1437
1402
|
(C) => C.id === v
|
|
1438
1403
|
);
|
|
1439
1404
|
if (!b)
|
|
1440
1405
|
return;
|
|
1441
|
-
const m =
|
|
1406
|
+
const m = dt(
|
|
1442
1407
|
e.card,
|
|
1443
1408
|
b
|
|
1444
1409
|
), y = m.authoredFormat;
|
|
1445
|
-
return m.currencyBindable && y &&
|
|
1410
|
+
return m.currencyBindable && y && R(y) ? _(
|
|
1446
1411
|
y,
|
|
1447
1412
|
e.valueFormatPreferences,
|
|
1448
1413
|
e.boundCurrency
|
|
1449
1414
|
) : void 0;
|
|
1450
1415
|
}
|
|
1451
|
-
const i = ((
|
|
1416
|
+
const i = ((g = (d = e.card.preferences) == null ? void 0 : d.tablePrefs) == null ? void 0 : g.columnSettingsMap) || {}, n = e.target.kind === "metric" ? e.target.metricId : void 0, r = e.target.kind === "column" ? [e.target.columnKey] : [
|
|
1452
1417
|
...e.resultColumnKeys || [],
|
|
1453
1418
|
...Object.keys(i),
|
|
1454
1419
|
e.target.metricId
|
|
1455
1420
|
], a = e.target.kind === "column" ? e.target.columnKey : r.find(
|
|
1456
1421
|
(v) => {
|
|
1457
1422
|
var b;
|
|
1458
|
-
return ((b =
|
|
1423
|
+
return ((b = ie(e.card, {
|
|
1459
1424
|
columnId: v
|
|
1460
1425
|
})) == null ? void 0 : b.id) === n;
|
|
1461
1426
|
}
|
|
1462
|
-
) || n, o =
|
|
1427
|
+
) || n, o = ue({
|
|
1463
1428
|
card: e.card,
|
|
1464
1429
|
columnId: a,
|
|
1465
1430
|
metricId: n,
|
|
@@ -1467,14 +1432,14 @@ function Sr(e) {
|
|
|
1467
1432
|
valueFormatPreferences: e.valueFormatPreferences,
|
|
1468
1433
|
boundCurrency: e.boundCurrency
|
|
1469
1434
|
});
|
|
1470
|
-
return
|
|
1435
|
+
return R(o) ? o : void 0;
|
|
1471
1436
|
}
|
|
1472
|
-
function
|
|
1437
|
+
function mo(e) {
|
|
1473
1438
|
var i, n, r, a, o, s;
|
|
1474
1439
|
const t = e.persistedSettings ?? ((a = (r = (n = (i = e.card) == null ? void 0 : i.preferences) == null ? void 0 : n.tablePrefs) == null ? void 0 : r.columnSettingsMap) == null ? void 0 : a[e.columnId]);
|
|
1475
1440
|
if (!t && !e.resolvedSettings || (t == null ? void 0 : t.inheritMetricFormat) === !0 || ((o = e.resolvedSettings) == null ? void 0 : o.inheritMetricFormat) === !0) {
|
|
1476
|
-
const l =
|
|
1477
|
-
(s =
|
|
1441
|
+
const l = W(
|
|
1442
|
+
(s = ie(e.card, {
|
|
1478
1443
|
columnId: e.columnId,
|
|
1479
1444
|
metricId: e.metricId,
|
|
1480
1445
|
metricAlias: e.metricAlias,
|
|
@@ -1487,33 +1452,33 @@ function yo(e) {
|
|
|
1487
1452
|
preserveOmittedProperties: !0
|
|
1488
1453
|
});
|
|
1489
1454
|
}
|
|
1490
|
-
return
|
|
1491
|
-
|
|
1455
|
+
return Fr(
|
|
1456
|
+
jt({
|
|
1492
1457
|
...e,
|
|
1493
1458
|
persistedSettings: t
|
|
1494
1459
|
})
|
|
1495
1460
|
);
|
|
1496
1461
|
}
|
|
1497
|
-
function
|
|
1498
|
-
var v, b, m, y, C,
|
|
1499
|
-
const t = (v = e == null ? void 0 : e.formatNumber) == null ? void 0 : v.enabled, i = typeof t == "string" ? t.trim().toLowerCase() !== "false" : t !== !1, n =
|
|
1462
|
+
function Sr(e) {
|
|
1463
|
+
var v, b, m, y, C, S, w;
|
|
1464
|
+
const t = (v = e == null ? void 0 : e.formatNumber) == null ? void 0 : v.enabled, i = typeof t == "string" ? t.trim().toLowerCase() !== "false" : t !== !1, n = mi(e == null ? void 0 : e.numberAxisFormat) || (i ? pi(e == null ? void 0 : e.formatNumber) : void 0), r = K(n);
|
|
1500
1465
|
if (!r || !r.type || r.type === "auto")
|
|
1501
1466
|
return r;
|
|
1502
|
-
const a = (b = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : b.decimalPlaces, o = i ? (m = e == null ? void 0 : e.formatNumber) == null ? void 0 : m.decimalPlaces : void 0, s = typeof a == "number" ? a : typeof o == "number" ? o : void 0, l = (y = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : y.minimumFractionDigits, c = (C = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : C.maximumFractionDigits, u = i ? (
|
|
1467
|
+
const a = (b = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : b.decimalPlaces, o = i ? (m = e == null ? void 0 : e.formatNumber) == null ? void 0 : m.decimalPlaces : void 0, s = typeof a == "number" ? a : typeof o == "number" ? o : void 0, l = (y = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : y.minimumFractionDigits, c = (C = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : C.maximumFractionDigits, u = i ? (S = e == null ? void 0 : e.formatNumber) == null ? void 0 : S.minimumFractionDigits : void 0, f = i ? (w = e == null ? void 0 : e.formatNumber) == null ? void 0 : w.maximumFractionDigits : void 0, d = typeof s == "number" ? s : typeof l == "number" ? l : typeof u == "number" ? u : 0, g = typeof s == "number" ? s : typeof c == "number" ? c : typeof f == "number" ? f : 0;
|
|
1503
1468
|
return {
|
|
1504
1469
|
...r,
|
|
1505
|
-
decimalPlaces: d ===
|
|
1470
|
+
decimalPlaces: d === g ? g : r.decimalPlaces,
|
|
1506
1471
|
minimumFractionDigits: d,
|
|
1507
1472
|
maximumFractionDigits: Math.max(
|
|
1508
1473
|
d,
|
|
1509
|
-
|
|
1474
|
+
g
|
|
1510
1475
|
)
|
|
1511
1476
|
};
|
|
1512
1477
|
}
|
|
1513
|
-
function
|
|
1478
|
+
function po(e) {
|
|
1514
1479
|
var r, a, o, s, l;
|
|
1515
1480
|
const { value: t, formatOptions: i, preferences: n } = e;
|
|
1516
|
-
return i != null && i.type && i.type !== "auto" ?
|
|
1481
|
+
return i != null && i.type && i.type !== "auto" ? Nt(t, i.type, i) : Wn({
|
|
1517
1482
|
number: t,
|
|
1518
1483
|
decimalPlaces: ((r = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : r.decimalPlaces) ?? 0,
|
|
1519
1484
|
useSuffix: !!((a = n == null ? void 0 : n.numberAxisFormat) != null && a.suffix),
|
|
@@ -1522,18 +1487,18 @@ function go(e) {
|
|
|
1522
1487
|
currency: ((l = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : l.currency) || ""
|
|
1523
1488
|
});
|
|
1524
1489
|
}
|
|
1525
|
-
function
|
|
1526
|
-
return
|
|
1490
|
+
function Mr(e) {
|
|
1491
|
+
return Gi({
|
|
1527
1492
|
...e,
|
|
1528
|
-
activation:
|
|
1493
|
+
activation: Me({
|
|
1529
1494
|
card: e.card,
|
|
1530
1495
|
cardConfig: e.cardConfig
|
|
1531
1496
|
})
|
|
1532
1497
|
});
|
|
1533
1498
|
}
|
|
1534
|
-
function
|
|
1535
|
-
return
|
|
1536
|
-
activation:
|
|
1499
|
+
function ho(e) {
|
|
1500
|
+
return Wi({
|
|
1501
|
+
activation: Me({
|
|
1537
1502
|
card: e.card,
|
|
1538
1503
|
cardConfig: e.cardConfig
|
|
1539
1504
|
}),
|
|
@@ -1541,9 +1506,9 @@ function bo(e) {
|
|
|
1541
1506
|
expectedResultOwner: e.expectedResultOwner
|
|
1542
1507
|
});
|
|
1543
1508
|
}
|
|
1544
|
-
function
|
|
1509
|
+
function Dr(e) {
|
|
1545
1510
|
var n, r;
|
|
1546
|
-
const t =
|
|
1511
|
+
const t = pt(e.card, e.effectiveCardConfig), i = Kn({
|
|
1547
1512
|
card: t,
|
|
1548
1513
|
records: e.rows,
|
|
1549
1514
|
keys: e.rows.length === 0 ? e.resultKeys : void 0,
|
|
@@ -1566,35 +1531,35 @@ function Tr(e) {
|
|
|
1566
1531
|
}
|
|
1567
1532
|
};
|
|
1568
1533
|
}
|
|
1569
|
-
function
|
|
1534
|
+
function Tr(e) {
|
|
1570
1535
|
var i;
|
|
1571
1536
|
const t = (i = e.preferences) == null ? void 0 : i.comparisonPresentation;
|
|
1572
1537
|
return {
|
|
1573
|
-
...
|
|
1538
|
+
...Vi,
|
|
1574
1539
|
...t,
|
|
1575
1540
|
...t != null && t.conditionalLabels ? { conditionalLabels: { ...t.conditionalLabels } } : {},
|
|
1576
1541
|
...t != null && t.colors ? { colors: { ...t.colors } } : {}
|
|
1577
1542
|
};
|
|
1578
1543
|
}
|
|
1579
|
-
function
|
|
1580
|
-
var
|
|
1581
|
-
const t =
|
|
1544
|
+
function wr(e) {
|
|
1545
|
+
var S, w;
|
|
1546
|
+
const t = pt(e.card, e.effectiveCardConfig), { cardId: i, ...n } = e.requestPayloadBase, r = e.formatOptions.visibleColumns ?? [], a = [
|
|
1582
1547
|
...r,
|
|
1583
1548
|
...Object.keys(e.formatOptions.columnSettings ?? {})
|
|
1584
|
-
], o =
|
|
1549
|
+
], o = vi(
|
|
1585
1550
|
e.card,
|
|
1586
1551
|
r,
|
|
1587
1552
|
e.effectiveCardConfig
|
|
1588
|
-
), s =
|
|
1553
|
+
), s = Fi(
|
|
1589
1554
|
e.card,
|
|
1590
1555
|
e.effectiveCardConfig,
|
|
1591
1556
|
o
|
|
1592
|
-
), l =
|
|
1557
|
+
), l = Ci(
|
|
1593
1558
|
t,
|
|
1594
1559
|
a
|
|
1595
1560
|
), c = new Set(
|
|
1596
|
-
l.eligibleTargets.map(
|
|
1597
|
-
), u = (p) => c.has(
|
|
1561
|
+
l.eligibleTargets.map(ge)
|
|
1562
|
+
), u = (p) => c.has(ge(p)) ? xi({
|
|
1598
1563
|
bindings: n.controlBindings,
|
|
1599
1564
|
controls: [
|
|
1600
1565
|
...n.controlDefinitions ?? [],
|
|
@@ -1604,23 +1569,18 @@ function Pr(e) {
|
|
|
1604
1569
|
target: p,
|
|
1605
1570
|
knownTargets: l.knownTargets,
|
|
1606
1571
|
eligibleTargets: l.eligibleTargets
|
|
1607
|
-
}).currency : void 0, f =
|
|
1572
|
+
}).currency : void 0, f = Ii({
|
|
1608
1573
|
card: e.card,
|
|
1609
1574
|
comparisonMetadata: e.comparisonMetadata,
|
|
1610
|
-
columnKeyMap:
|
|
1611
|
-
}), d =
|
|
1575
|
+
columnKeyMap: e.columnKeyMap
|
|
1576
|
+
}), d = Me({
|
|
1612
1577
|
card: e.card,
|
|
1613
1578
|
cardConfig: e.effectiveCardConfig
|
|
1614
|
-
})
|
|
1615
|
-
if (e.card.type === "pivotTable" && d && !e.canonicalPivotResult)
|
|
1616
|
-
throw new Error(
|
|
1617
|
-
"Canonical pivot export requires a parsed pivot result lifecycle."
|
|
1618
|
-
);
|
|
1619
|
-
const h = Dr({
|
|
1579
|
+
}), g = Mr({
|
|
1620
1580
|
card: e.card,
|
|
1621
1581
|
cardConfig: e.effectiveCardConfig,
|
|
1622
|
-
columns:
|
|
1623
|
-
columnKeyMap:
|
|
1582
|
+
columns: e.resultColumns,
|
|
1583
|
+
columnKeyMap: e.columnKeyMap,
|
|
1624
1584
|
resultRowCount: e.totalRows,
|
|
1625
1585
|
valueFormatPreferences: e.reportContext.valueFormat
|
|
1626
1586
|
}), v = (d == null ? void 0 : d.fields) ?? [], b = new Map(
|
|
@@ -1632,13 +1592,13 @@ function Pr(e) {
|
|
|
1632
1592
|
if (e.card.type === "detailTable" && n.resultOwner === "config") {
|
|
1633
1593
|
const p = e.resultColumns || [];
|
|
1634
1594
|
if (p.filter(
|
|
1635
|
-
(
|
|
1595
|
+
(F) => F.rawTemporal
|
|
1636
1596
|
).length > 0) {
|
|
1637
1597
|
if (!e.columnKeyMap)
|
|
1638
1598
|
throw new Error(
|
|
1639
1599
|
"Canonical raw temporal export requires an authoritative columnKeyMap."
|
|
1640
1600
|
);
|
|
1641
|
-
const
|
|
1601
|
+
const F = Dn({
|
|
1642
1602
|
cardType: e.card.type,
|
|
1643
1603
|
resultOwner: n.resultOwner,
|
|
1644
1604
|
effectiveCardConfig: e.effectiveCardConfig,
|
|
@@ -1650,21 +1610,21 @@ function Pr(e) {
|
|
|
1650
1610
|
preferences: e.reportContext.valueFormat,
|
|
1651
1611
|
calendar: e.reportContext.calendar
|
|
1652
1612
|
});
|
|
1653
|
-
if (
|
|
1654
|
-
if (
|
|
1655
|
-
for (const [
|
|
1656
|
-
m.set(
|
|
1613
|
+
if (F.kind === "invalid") throw F.error;
|
|
1614
|
+
if (F.kind === "loaded_empty" || F.kind === "loaded_valid")
|
|
1615
|
+
for (const [D, T] of F.presentation.byColumnKey)
|
|
1616
|
+
m.set(D, T.format);
|
|
1657
1617
|
}
|
|
1658
1618
|
} else if (n.resultOwner === "freeform" && n.sql.trim() && !n.python.trim())
|
|
1659
|
-
for (const [p,
|
|
1660
|
-
((
|
|
1619
|
+
for (const [p, h] of Object.entries(
|
|
1620
|
+
((w = (S = e.card.preferences) == null ? void 0 : S.tablePrefs) == null ? void 0 : w.columnSettingsMap) || {}
|
|
1661
1621
|
)) {
|
|
1662
|
-
if (
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1622
|
+
if (h.type !== "date") continue;
|
|
1623
|
+
const F = Tn(h.dateFormat);
|
|
1624
|
+
F && m.set(
|
|
1665
1625
|
p,
|
|
1666
|
-
|
|
1667
|
-
format:
|
|
1626
|
+
zi({
|
|
1627
|
+
format: F,
|
|
1668
1628
|
preferences: e.reportContext.valueFormat,
|
|
1669
1629
|
calendar: e.reportContext.calendar
|
|
1670
1630
|
})
|
|
@@ -1673,66 +1633,66 @@ function Pr(e) {
|
|
|
1673
1633
|
const y = [
|
|
1674
1634
|
...new Set(a)
|
|
1675
1635
|
].flatMap((p) => {
|
|
1676
|
-
var
|
|
1677
|
-
if (
|
|
1636
|
+
var q, E, re, P, Y, J;
|
|
1637
|
+
if (g.byColumnKey.has(p) || m.has(p))
|
|
1678
1638
|
return [];
|
|
1679
|
-
const
|
|
1639
|
+
const h = f.columnPresentationOwners.get(p), F = (q = t.sql) != null && q.trim() ? void 0 : ie(t, {
|
|
1680
1640
|
columnId: p,
|
|
1681
1641
|
columnKeyMap: e.columnKeyMap,
|
|
1682
|
-
metricId:
|
|
1683
|
-
metricAlias:
|
|
1684
|
-
}),
|
|
1685
|
-
|
|
1686
|
-
),
|
|
1642
|
+
metricId: h == null ? void 0 : h.metricId,
|
|
1643
|
+
metricAlias: h == null ? void 0 : h.metricAlias
|
|
1644
|
+
}), D = F ? { kind: "metric", metricId: F.id } : { kind: "column", columnKey: p }, T = c.has(
|
|
1645
|
+
ge(D)
|
|
1646
|
+
), V = u(D), N = (P = (re = (E = t.preferences) == null ? void 0 : E.tablePrefs) == null ? void 0 : re.columnSettingsMap) == null ? void 0 : P[p], O = {
|
|
1687
1647
|
dashboardId: e.dashboardId,
|
|
1688
1648
|
cardId: t.id
|
|
1689
|
-
},
|
|
1649
|
+
}, H = { kind: "column", columnKey: p }, M = F && (!N || N.inheritMetricFormat === !0) ? W(F.format, {
|
|
1690
1650
|
preserveOmittedProperties: !0
|
|
1691
1651
|
}) : void 0;
|
|
1692
|
-
if ((
|
|
1652
|
+
if ((M == null ? void 0 : M.type) === "date")
|
|
1693
1653
|
return [
|
|
1694
1654
|
{
|
|
1695
|
-
scope:
|
|
1696
|
-
target:
|
|
1655
|
+
scope: O,
|
|
1656
|
+
target: H,
|
|
1697
1657
|
format: {
|
|
1698
1658
|
type: "date",
|
|
1699
|
-
locale:
|
|
1700
|
-
...
|
|
1701
|
-
...
|
|
1702
|
-
...
|
|
1659
|
+
locale: M.locale ?? e.reportContext.valueFormat.locale,
|
|
1660
|
+
...M.pattern ? { pattern: M.pattern } : {},
|
|
1661
|
+
...M.timezone ? { timezone: M.timezone } : {},
|
|
1662
|
+
...M.sourceTimezone ? { sourceTimezone: M.sourceTimezone } : {}
|
|
1703
1663
|
}
|
|
1704
1664
|
}
|
|
1705
1665
|
];
|
|
1706
|
-
const
|
|
1666
|
+
const k = (h ? Ir({
|
|
1707
1667
|
card: t,
|
|
1708
1668
|
columnId: p,
|
|
1709
1669
|
columnKeyMap: e.columnKeyMap,
|
|
1710
|
-
persistedSettings:
|
|
1711
|
-
metricId:
|
|
1712
|
-
metricAlias:
|
|
1713
|
-
comparisonValueKind:
|
|
1714
|
-
comparisonPrecision: (
|
|
1670
|
+
persistedSettings: N,
|
|
1671
|
+
metricId: h.metricId,
|
|
1672
|
+
metricAlias: h.metricAlias,
|
|
1673
|
+
comparisonValueKind: h.kind,
|
|
1674
|
+
comparisonPrecision: (J = (Y = t.preferences) == null ? void 0 : Y.comparisonPresentation) == null ? void 0 : J.precision,
|
|
1715
1675
|
presentation: {
|
|
1716
1676
|
preferences: e.reportContext.valueFormat,
|
|
1717
1677
|
resolveBoundCurrency: u
|
|
1718
1678
|
}
|
|
1719
|
-
}) : void 0) ?? (
|
|
1679
|
+
}) : void 0) ?? (T ? xr({
|
|
1720
1680
|
card: t,
|
|
1721
|
-
target:
|
|
1681
|
+
target: D,
|
|
1722
1682
|
resultColumnKeys: a,
|
|
1723
1683
|
valueFormatPreferences: e.reportContext.valueFormat,
|
|
1724
|
-
boundCurrency:
|
|
1725
|
-
}) : void 0) ??
|
|
1684
|
+
boundCurrency: V
|
|
1685
|
+
}) : void 0) ?? ue({
|
|
1726
1686
|
card: t,
|
|
1727
1687
|
columnId: p,
|
|
1728
1688
|
columnKeyMap: e.columnKeyMap,
|
|
1729
|
-
metricId:
|
|
1730
|
-
persistedSettings:
|
|
1689
|
+
metricId: h == null ? void 0 : h.metricId,
|
|
1690
|
+
persistedSettings: N,
|
|
1731
1691
|
valueFormatPreferences: e.reportContext.valueFormat
|
|
1732
|
-
}),
|
|
1733
|
-
|
|
1692
|
+
}), B = (k == null ? void 0 : k.type) === "duration" ? k : k ? _(
|
|
1693
|
+
k,
|
|
1734
1694
|
e.reportContext.valueFormat,
|
|
1735
|
-
|
|
1695
|
+
V
|
|
1736
1696
|
) : _(
|
|
1737
1697
|
{
|
|
1738
1698
|
type: "number",
|
|
@@ -1742,15 +1702,15 @@ function Pr(e) {
|
|
|
1742
1702
|
e.reportContext.valueFormat
|
|
1743
1703
|
);
|
|
1744
1704
|
return [
|
|
1745
|
-
|
|
1705
|
+
B.type === "duration" ? { scope: O, target: H, format: B } : { scope: O, target: H, format: B }
|
|
1746
1706
|
];
|
|
1747
1707
|
});
|
|
1748
1708
|
y.push(
|
|
1749
|
-
...[...
|
|
1750
|
-
const
|
|
1709
|
+
...[...g.byColumnKey.values()].map((p) => {
|
|
1710
|
+
const h = b.get(
|
|
1751
1711
|
`${p.role ?? "groupby"}:${p.fieldId}`
|
|
1752
1712
|
);
|
|
1753
|
-
if (!
|
|
1713
|
+
if (!h)
|
|
1754
1714
|
throw new Error(
|
|
1755
1715
|
`Unable to resolve temporal export field "${p.fieldId}".`
|
|
1756
1716
|
);
|
|
@@ -1760,8 +1720,8 @@ function Pr(e) {
|
|
|
1760
1720
|
cardId: e.card.id
|
|
1761
1721
|
},
|
|
1762
1722
|
target: { kind: "column", columnKey: p.columnKey },
|
|
1763
|
-
format:
|
|
1764
|
-
|
|
1723
|
+
format: Qi(
|
|
1724
|
+
h,
|
|
1765
1725
|
{
|
|
1766
1726
|
dateStyle: e.reportContext.valueFormat.dateStyle,
|
|
1767
1727
|
dateTime: { ...e.reportContext.valueFormat.dateTime }
|
|
@@ -1771,37 +1731,13 @@ function Pr(e) {
|
|
|
1771
1731
|
};
|
|
1772
1732
|
})
|
|
1773
1733
|
), y.push(
|
|
1774
|
-
...((
|
|
1775
|
-
(p) => p.role === "pivotby" ? [
|
|
1776
|
-
{
|
|
1777
|
-
scope: {
|
|
1778
|
-
dashboardId: e.dashboardId,
|
|
1779
|
-
cardId: e.card.id
|
|
1780
|
-
},
|
|
1781
|
-
target: {
|
|
1782
|
-
kind: "field",
|
|
1783
|
-
fieldId: p.id,
|
|
1784
|
-
role: p.role
|
|
1785
|
-
},
|
|
1786
|
-
format: Ge(
|
|
1787
|
-
p,
|
|
1788
|
-
{
|
|
1789
|
-
dateStyle: e.reportContext.valueFormat.dateStyle,
|
|
1790
|
-
dateTime: { ...e.reportContext.valueFormat.dateTime }
|
|
1791
|
-
},
|
|
1792
|
-
e.reportContext.valueFormat.locale
|
|
1793
|
-
)
|
|
1794
|
-
}
|
|
1795
|
-
] : []
|
|
1796
|
-
)
|
|
1797
|
-
), y.push(
|
|
1798
|
-
...[...m].map(([p, g]) => ({
|
|
1734
|
+
...[...m].map(([p, h]) => ({
|
|
1799
1735
|
scope: { dashboardId: e.dashboardId, cardId: e.card.id },
|
|
1800
1736
|
target: { kind: "column", columnKey: p },
|
|
1801
|
-
format:
|
|
1737
|
+
format: h
|
|
1802
1738
|
}))
|
|
1803
1739
|
);
|
|
1804
|
-
const C =
|
|
1740
|
+
const C = ki({
|
|
1805
1741
|
reportContext: e.reportContext,
|
|
1806
1742
|
resolvedFormats: y
|
|
1807
1743
|
});
|
|
@@ -1809,17 +1745,17 @@ function Pr(e) {
|
|
|
1809
1745
|
formatOptions: {
|
|
1810
1746
|
...e.formatOptions,
|
|
1811
1747
|
...o ? { tableTotalsLabelColumnKey: o } : {},
|
|
1812
|
-
comparisonPresentation:
|
|
1748
|
+
comparisonPresentation: Tr(e.card),
|
|
1813
1749
|
presentationExecutionSnapshot: C
|
|
1814
1750
|
},
|
|
1815
1751
|
...s ? { tableTotalsRequest: s } : {}
|
|
1816
1752
|
};
|
|
1817
1753
|
}
|
|
1818
|
-
function
|
|
1819
|
-
const t =
|
|
1754
|
+
function Pr(e) {
|
|
1755
|
+
const t = Mi(
|
|
1820
1756
|
e.card,
|
|
1821
1757
|
e.requestPayloadBase
|
|
1822
|
-
), { cardId: i, ...n } = t.requestPayloadBase, r =
|
|
1758
|
+
), { cardId: i, ...n } = t.requestPayloadBase, r = wr(e);
|
|
1823
1759
|
return {
|
|
1824
1760
|
type: "card",
|
|
1825
1761
|
dashboardId: e.dashboardId,
|
|
@@ -1833,13 +1769,13 @@ function Or(e) {
|
|
|
1833
1769
|
formatOptions: r.formatOptions
|
|
1834
1770
|
};
|
|
1835
1771
|
}
|
|
1836
|
-
function
|
|
1772
|
+
function go(e) {
|
|
1837
1773
|
const { card: t, result: i } = e;
|
|
1838
1774
|
if (t.type !== "table" && t.type !== "detailTable")
|
|
1839
1775
|
return { status: "refused", reason: "not_a_table" };
|
|
1840
|
-
if (
|
|
1776
|
+
if (Si({ card: t, comparisonMetadata: i.comparisonMetadata }))
|
|
1841
1777
|
return { status: "refused", reason: "comparison_metadata_missing" };
|
|
1842
|
-
const n =
|
|
1778
|
+
const n = Dr({
|
|
1843
1779
|
card: t,
|
|
1844
1780
|
effectiveCardConfig: e.effectiveCardConfig,
|
|
1845
1781
|
rows: e.rows,
|
|
@@ -1850,7 +1786,7 @@ function vo(e) {
|
|
|
1850
1786
|
});
|
|
1851
1787
|
return n ? {
|
|
1852
1788
|
status: "ready",
|
|
1853
|
-
request:
|
|
1789
|
+
request: Pr({
|
|
1854
1790
|
card: t,
|
|
1855
1791
|
dashboardId: e.dashboardId,
|
|
1856
1792
|
title: e.title,
|
|
@@ -1866,9 +1802,9 @@ function vo(e) {
|
|
|
1866
1802
|
})
|
|
1867
1803
|
} : { status: "refused", reason: "columns_unresolved" };
|
|
1868
1804
|
}
|
|
1869
|
-
function
|
|
1870
|
-
if (
|
|
1871
|
-
|
|
1805
|
+
function Or(e, t, i) {
|
|
1806
|
+
if (Ai(
|
|
1807
|
+
_i(t),
|
|
1872
1808
|
e.aggregateOrigin
|
|
1873
1809
|
))
|
|
1874
1810
|
return { aggregate: void 0, aggregateOrigin: void 0 };
|
|
@@ -1878,7 +1814,7 @@ function Ar(e, t, i) {
|
|
|
1878
1814
|
aggregateOrigin: e.aggregate ? e.aggregateOrigin : n ? t.aggregateOrigin : void 0
|
|
1879
1815
|
};
|
|
1880
1816
|
}
|
|
1881
|
-
function
|
|
1817
|
+
function Ar(e, t, i) {
|
|
1882
1818
|
var n, r, a, o, s, l;
|
|
1883
1819
|
if (i === "domain")
|
|
1884
1820
|
return {
|
|
@@ -1891,7 +1827,7 @@ function Nr(e, t, i) {
|
|
|
1891
1827
|
windowTransform: ((s = e.parameters) == null ? void 0 : s.windowTransform) ?? ((l = t.parameters) == null ? void 0 : l.windowTransform)
|
|
1892
1828
|
};
|
|
1893
1829
|
}
|
|
1894
|
-
function
|
|
1830
|
+
function yo(e, t, i) {
|
|
1895
1831
|
const n = e;
|
|
1896
1832
|
return {
|
|
1897
1833
|
id: e.id,
|
|
@@ -1903,13 +1839,13 @@ function Fo(e, t, i) {
|
|
|
1903
1839
|
dateFormat: e.dateFormat,
|
|
1904
1840
|
customFormat: e.customFormat,
|
|
1905
1841
|
semanticTemporalPresentation: t.semanticTemporalPresentation || e.semanticTemporalPresentation,
|
|
1906
|
-
...
|
|
1842
|
+
...Or(e, t, i),
|
|
1907
1843
|
...e.role === "metric" ? {
|
|
1908
1844
|
aliasTemplate: n.aliasTemplate,
|
|
1909
1845
|
valueAliases: n.valueAliases,
|
|
1910
1846
|
comparison: n.comparison,
|
|
1911
1847
|
comparisonPolarity: n.comparisonPolarity,
|
|
1912
|
-
parameters:
|
|
1848
|
+
parameters: Ar(
|
|
1913
1849
|
n,
|
|
1914
1850
|
t,
|
|
1915
1851
|
"domain"
|
|
@@ -1944,73 +1880,73 @@ function _r(e) {
|
|
|
1944
1880
|
return t;
|
|
1945
1881
|
}
|
|
1946
1882
|
}
|
|
1947
|
-
const
|
|
1948
|
-
function
|
|
1883
|
+
const Nr = "table";
|
|
1884
|
+
function bo({ preferences: e, ...t }) {
|
|
1949
1885
|
return {
|
|
1950
1886
|
...t,
|
|
1951
|
-
type:
|
|
1887
|
+
type: Nr,
|
|
1952
1888
|
preferences: e ?? { onClickFilter: [{ columnIndex: 0, expression: "" }] },
|
|
1953
1889
|
sql: "",
|
|
1954
1890
|
data: []
|
|
1955
1891
|
};
|
|
1956
1892
|
}
|
|
1957
|
-
function
|
|
1893
|
+
function Er(e, t) {
|
|
1958
1894
|
const i = e.sheets ?? [], n = i.findIndex((o) => o.id === t.sheetId), r = i[n];
|
|
1959
1895
|
if (!r)
|
|
1960
|
-
throw new
|
|
1961
|
-
if (
|
|
1962
|
-
throw new
|
|
1896
|
+
throw new A("sheet_not_found", `No sheet ${t.sheetId} on this dashboard.`);
|
|
1897
|
+
if (Yi(r))
|
|
1898
|
+
throw new A(
|
|
1963
1899
|
"sheet_not_a_grid",
|
|
1964
1900
|
"This sheet is a document: it has no grid to arrange.",
|
|
1965
1901
|
"Arrange a grid sheet; Document sheets are laid out in the editor."
|
|
1966
1902
|
);
|
|
1967
|
-
const a =
|
|
1903
|
+
const a = Ft(r, { kind: "arrange", keepOrder: t.keepOrder === !0 });
|
|
1968
1904
|
return {
|
|
1969
1905
|
dashboard: { ...e, sheets: i.map((o, s) => s === n ? a : o) },
|
|
1970
|
-
clauses: [
|
|
1906
|
+
clauses: [De.arranged(r.title || "the dashboard", t.keepOrder === !0, !(r.frames ?? []).length)]
|
|
1971
1907
|
};
|
|
1972
1908
|
}
|
|
1973
|
-
function
|
|
1909
|
+
function Rr(e) {
|
|
1974
1910
|
return !!(e && Object.prototype.hasOwnProperty.call(e, "calculatedFields"));
|
|
1975
1911
|
}
|
|
1976
|
-
function
|
|
1977
|
-
return
|
|
1912
|
+
function j(...e) {
|
|
1913
|
+
return Ji(e.flatMap((t) => t || []));
|
|
1978
1914
|
}
|
|
1979
|
-
function
|
|
1915
|
+
function Q(e, t) {
|
|
1980
1916
|
return {
|
|
1981
1917
|
...e,
|
|
1982
1918
|
fieldScope: t
|
|
1983
1919
|
};
|
|
1984
1920
|
}
|
|
1985
|
-
function
|
|
1986
|
-
return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => t.fieldScope === "sheet").map((t) =>
|
|
1921
|
+
function Re(e) {
|
|
1922
|
+
return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => t.fieldScope === "sheet").map((t) => Q(t, "sheet"));
|
|
1987
1923
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => !t.fieldScope).map((t) =>
|
|
1924
|
+
function Ut(e) {
|
|
1925
|
+
return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => !t.fieldScope).map((t) => Q(t, "sheet"));
|
|
1990
1926
|
}
|
|
1991
|
-
function
|
|
1927
|
+
function Vr(e) {
|
|
1992
1928
|
return e ? [
|
|
1993
1929
|
...(e.calculatedFields || []).filter(
|
|
1994
1930
|
(t) => t.fieldScope === "dashboard"
|
|
1995
1931
|
),
|
|
1996
1932
|
...(e.frames || []).flatMap((t) => t.calculatedFields || [])
|
|
1997
|
-
].map((t) =>
|
|
1933
|
+
].map((t) => Q(t, "dashboard")) : [];
|
|
1998
1934
|
}
|
|
1999
|
-
function
|
|
1935
|
+
function kr(e) {
|
|
2000
1936
|
if (e !== void 0)
|
|
2001
|
-
return
|
|
2002
|
-
e.map((t) =>
|
|
1937
|
+
return j(
|
|
1938
|
+
e.map((t) => Q(t, "dashboard"))
|
|
2003
1939
|
);
|
|
2004
1940
|
}
|
|
2005
|
-
function
|
|
1941
|
+
function vo(e) {
|
|
2006
1942
|
var n;
|
|
2007
1943
|
const t = [], i = (e.sheets || []).map((r) => {
|
|
2008
1944
|
var a;
|
|
2009
|
-
return t.push(...
|
|
1945
|
+
return t.push(...Vr(r)), {
|
|
2010
1946
|
...r,
|
|
2011
|
-
calculatedFields:
|
|
2012
|
-
|
|
2013
|
-
|
|
1947
|
+
calculatedFields: j(
|
|
1948
|
+
Re(r),
|
|
1949
|
+
Ut(r)
|
|
2014
1950
|
),
|
|
2015
1951
|
frames: (a = r.frames) == null ? void 0 : a.map(
|
|
2016
1952
|
(o) => o.calculatedFields === void 0 ? o : { ...o, calculatedFields: void 0 }
|
|
@@ -2019,10 +1955,10 @@ function Io(e) {
|
|
|
2019
1955
|
});
|
|
2020
1956
|
return {
|
|
2021
1957
|
...e,
|
|
2022
|
-
calculatedFields:
|
|
2023
|
-
|
|
1958
|
+
calculatedFields: kr(
|
|
1959
|
+
j(
|
|
2024
1960
|
(n = e.calculatedFields) == null ? void 0 : n.map(
|
|
2025
|
-
(r) =>
|
|
1961
|
+
(r) => Q(r, "dashboard")
|
|
2026
1962
|
),
|
|
2027
1963
|
t
|
|
2028
1964
|
)
|
|
@@ -2030,42 +1966,42 @@ function Io(e) {
|
|
|
2030
1966
|
sheets: i
|
|
2031
1967
|
};
|
|
2032
1968
|
}
|
|
2033
|
-
function
|
|
1969
|
+
function at(e, t) {
|
|
2034
1970
|
var r;
|
|
2035
1971
|
if (!((r = e == null ? void 0 : e.frames) != null && r.length))
|
|
2036
1972
|
return [];
|
|
2037
1973
|
const i = t ? e.frames.find((a) => a.id === t) : void 0, n = e.frames.filter(
|
|
2038
1974
|
(a) => !t || a.id !== t
|
|
2039
1975
|
);
|
|
2040
|
-
return
|
|
1976
|
+
return j(
|
|
2041
1977
|
i == null ? void 0 : i.calculatedFields,
|
|
2042
1978
|
...n.map((a) => a.calculatedFields)
|
|
2043
1979
|
);
|
|
2044
1980
|
}
|
|
2045
|
-
function
|
|
2046
|
-
return e ?
|
|
1981
|
+
function Fo(e, t) {
|
|
1982
|
+
return e ? Re(e) : [];
|
|
2047
1983
|
}
|
|
2048
|
-
function
|
|
1984
|
+
function Co(e, t) {
|
|
2049
1985
|
if (!e)
|
|
2050
1986
|
return [];
|
|
2051
|
-
const i =
|
|
1987
|
+
const i = Re(e), n = Ut(e), r = j(
|
|
2052
1988
|
i,
|
|
2053
1989
|
n
|
|
2054
1990
|
);
|
|
2055
|
-
return
|
|
1991
|
+
return Rr(e) ? r.length === 0 ? [] : n.length === 0 ? r : j(
|
|
2056
1992
|
r,
|
|
2057
|
-
|
|
2058
|
-
) :
|
|
1993
|
+
at(e, t)
|
|
1994
|
+
) : at(e, t);
|
|
2059
1995
|
}
|
|
2060
|
-
function
|
|
1996
|
+
function Br(e) {
|
|
2061
1997
|
if (e !== void 0)
|
|
2062
|
-
return
|
|
2063
|
-
e.map((t) =>
|
|
1998
|
+
return j(
|
|
1999
|
+
e.map((t) => Q(t, "sheet"))
|
|
2064
2000
|
);
|
|
2065
2001
|
}
|
|
2066
|
-
function
|
|
2002
|
+
function Io(e) {
|
|
2067
2003
|
const { field: t, sheetFields: i = [], dashboardFields: n = [] } = e, r = (s) => s.find(
|
|
2068
|
-
(l) =>
|
|
2004
|
+
(l) => Xi(l, t, {
|
|
2069
2005
|
allowComparableFallback: !0
|
|
2070
2006
|
})
|
|
2071
2007
|
);
|
|
@@ -2079,48 +2015,48 @@ function Mo(e) {
|
|
|
2079
2015
|
const o = r(n);
|
|
2080
2016
|
return o ? { scope: "dashboard", matchedField: o } : { scope: "card" };
|
|
2081
2017
|
}
|
|
2082
|
-
function
|
|
2083
|
-
var C,
|
|
2084
|
-
const i = (e.sheets ?? []).findIndex((
|
|
2018
|
+
function Kr(e, t) {
|
|
2019
|
+
var C, S, w;
|
|
2020
|
+
const i = (e.sheets ?? []).findIndex((p) => p.id === t.sheetId), n = (C = e.sheets) == null ? void 0 : C[i];
|
|
2085
2021
|
if (!(n != null && n.frames))
|
|
2086
|
-
throw new
|
|
2087
|
-
const { frame: r } = t, a = n.frames.findIndex((
|
|
2022
|
+
throw new A("sheet_not_found", `No sheet ${t.sheetId} with frames on this dashboard.`);
|
|
2023
|
+
const { frame: r } = t, a = n.frames.findIndex((p) => p.id === r.id);
|
|
2088
2024
|
if (a === -1)
|
|
2089
|
-
throw new
|
|
2090
|
-
const o = n.frames[a], s =
|
|
2091
|
-
const
|
|
2092
|
-
return
|
|
2093
|
-
})() : [r], f = new Map(u.map((
|
|
2094
|
-
let
|
|
2095
|
-
const v =
|
|
2096
|
-
const
|
|
2097
|
-
d.layouts !== n.layouts && (
|
|
2098
|
-
const
|
|
2099
|
-
return
|
|
2025
|
+
throw new A("frame_not_found", `No frame ${r.id} on sheet ${t.sheetId}.`);
|
|
2026
|
+
const o = n.frames[a], s = He(n), l = (p) => p.calculatedFields === void 0 ? p : { ...p, calculatedFields: void 0 }, c = t.rewrittenFrames, u = c && c.length > 0 ? (() => {
|
|
2027
|
+
const p = c.map((h) => h.id === r.id ? r : h);
|
|
2028
|
+
return p.some((h) => h.id === r.id) ? p : [r, ...p];
|
|
2029
|
+
})() : [r], f = new Map(u.map((p) => [p.id, p])), d = Ft(n, { kind: "frame_updated", frame: r, resizeForNewKind: t.resizeLayouts });
|
|
2030
|
+
let g = /* @__PURE__ */ new Set();
|
|
2031
|
+
const v = Zi.produce(e, (p) => {
|
|
2032
|
+
const h = p.sheets[i];
|
|
2033
|
+
d.layouts !== n.layouts && (h.layouts = Ge(d.layouts)), d.customizedBreakpoints !== n.customizedBreakpoints && (h.customizedBreakpoints = d.customizedBreakpoints), t.sheetCalculatedFields !== void 0 && (h.calculatedFields = Br(t.sheetCalculatedFields)), h.frames = h.frames.map((D) => {
|
|
2034
|
+
const T = f.get(D.id);
|
|
2035
|
+
return T ? Ge(l(T)) : D.calculatedFields === void 0 ? D : { ...D, calculatedFields: void 0 };
|
|
2100
2036
|
});
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2103
|
-
}), b = v.sheets[i].frames.find((
|
|
2104
|
-
...
|
|
2037
|
+
const F = He(h);
|
|
2038
|
+
g = new Set([...s].filter((D) => !F.has(D))), en(p, g), t.dashboardCalculatedFields && (p.calculatedFields = t.dashboardCalculatedFields);
|
|
2039
|
+
}), b = v.sheets[i].frames.find((p) => p.id === r.id), m = [
|
|
2040
|
+
...g.size ? [{ kind: "cards_removed", cardIds: [...g] }] : [],
|
|
2105
2041
|
{ kind: "frame_committed", sheetId: t.sheetId, before: o, after: b }
|
|
2106
|
-
], y = ((
|
|
2107
|
-
return { dashboard: v, runtimeEffects: m, clauses: [
|
|
2042
|
+
], y = ((S = r.cards) == null ? void 0 : S.find((p) => p.id === r.activeCardId)) ?? ((w = r.cards) == null ? void 0 : w[0]);
|
|
2043
|
+
return { dashboard: v, runtimeEffects: m, clauses: [De.committed(y == null ? void 0 : y.title)] };
|
|
2108
2044
|
}
|
|
2109
|
-
function
|
|
2045
|
+
function Lr(e, t, i) {
|
|
2110
2046
|
var a;
|
|
2111
2047
|
if (!e || !t || t.customFilterPreferences) return;
|
|
2112
2048
|
const n = t.defaultDateFilter;
|
|
2113
|
-
return (t.dateSelectionMode === "day" ?
|
|
2049
|
+
return (t.dateSelectionMode === "day" ? rn(n) : t.dateSelectionMode === "months" && (an(n) || on(n) && n.unit === "month" && (n.mode === "previous" || n.mode === "this" && !n.toDate && !n.boundary))) && ((a = G(t, i)) == null ? void 0 : a.valueType) === "date" ? !0 : void 0;
|
|
2114
2050
|
}
|
|
2115
|
-
function
|
|
2116
|
-
const t = e.createId ??
|
|
2051
|
+
function xo(e) {
|
|
2052
|
+
const t = e.createId ?? St, i = t(), n = Di({
|
|
2117
2053
|
field: e.field,
|
|
2118
2054
|
dataSource: e.dataSource,
|
|
2119
2055
|
connectionId: e.connectionId,
|
|
2120
2056
|
connectionType: e.connectionType,
|
|
2121
2057
|
filterId: t()
|
|
2122
2058
|
});
|
|
2123
|
-
return
|
|
2059
|
+
return qr({
|
|
2124
2060
|
filter: e.label ? { ...n, title: e.label } : n,
|
|
2125
2061
|
label: e.label || e.field.label || e.field.name,
|
|
2126
2062
|
scope: e.scope,
|
|
@@ -2128,11 +2064,11 @@ function Do(e) {
|
|
|
2128
2064
|
createId: () => i
|
|
2129
2065
|
});
|
|
2130
2066
|
}
|
|
2131
|
-
function
|
|
2132
|
-
const t = e.createId ??
|
|
2067
|
+
function qr(e) {
|
|
2068
|
+
const t = e.createId ?? St, i = e.label || e.filter.title || e.filter.column || e.filter.id, n = tn(i, [
|
|
2133
2069
|
...e.existingInputs
|
|
2134
2070
|
]), r = {
|
|
2135
|
-
...
|
|
2071
|
+
...Ct(e.filter),
|
|
2136
2072
|
variableName: n
|
|
2137
2073
|
};
|
|
2138
2074
|
return {
|
|
@@ -2143,22 +2079,22 @@ function $r(e) {
|
|
|
2143
2079
|
requiredAtExecution: !1,
|
|
2144
2080
|
scope: e.scope,
|
|
2145
2081
|
runtimeScope: "shared",
|
|
2146
|
-
presentation:
|
|
2082
|
+
presentation: xt(r),
|
|
2147
2083
|
filter: r,
|
|
2148
|
-
exports:
|
|
2084
|
+
exports: It(r)
|
|
2149
2085
|
};
|
|
2150
2086
|
}
|
|
2151
|
-
function
|
|
2152
|
-
var J,
|
|
2153
|
-
const r =
|
|
2087
|
+
function $r(e, t, i, n = { calendar: null }) {
|
|
2088
|
+
var Y, J, Be, Ke, Le, qe, $e, ze;
|
|
2089
|
+
const r = $(e), a = r.findFilterInput(t), o = (x, I) => ({
|
|
2154
2090
|
ok: !1,
|
|
2155
2091
|
issues: [
|
|
2156
2092
|
{
|
|
2157
2093
|
code: "invalidSettings",
|
|
2158
|
-
message:
|
|
2094
|
+
message: x,
|
|
2159
2095
|
ref: t,
|
|
2160
2096
|
...a ? { inputId: a.input.id } : {},
|
|
2161
|
-
...
|
|
2097
|
+
...I ? { contractIssue: I } : {}
|
|
2162
2098
|
}
|
|
2163
2099
|
]
|
|
2164
2100
|
});
|
|
@@ -2176,139 +2112,139 @@ function zr(e, t, i, n = { calendar: null }) {
|
|
|
2176
2112
|
if (a.origin !== "embeddedInput")
|
|
2177
2113
|
return o("This filter can not be edited here.");
|
|
2178
2114
|
const s = a.input, l = s.filter;
|
|
2179
|
-
if (((
|
|
2115
|
+
if (((Y = i.mapping) == null ? void 0 : Y.kind) === "save") {
|
|
2180
2116
|
if (!i.mapping.draft.acceptance.ok)
|
|
2181
2117
|
return { ok: !1, issues: i.mapping.draft.acceptance.issues };
|
|
2182
2118
|
if (i.mapping.draft.inputId !== s.id)
|
|
2183
2119
|
return o("The card mapping was prepared for another filter.");
|
|
2184
2120
|
}
|
|
2185
|
-
const c = i.definition ?
|
|
2186
|
-
if (c.kind === "global-date" && i.scope && !
|
|
2121
|
+
const c = i.definition ? Ct(i.definition) : l;
|
|
2122
|
+
if (c.kind === "global-date" && i.scope && !zr(i.scope))
|
|
2187
2123
|
return o("The Global Date filter applies to regular tabs only.");
|
|
2188
|
-
const u = (
|
|
2124
|
+
const u = (J = n.calendar) == null ? void 0 : J.tz, f = i.definition !== void 0, d = i.forceSelection !== void 0 || f ? Lr(
|
|
2189
2125
|
i.forceSelection ?? s.forceSelection,
|
|
2190
2126
|
c,
|
|
2191
2127
|
u
|
|
2192
|
-
) : s.forceSelection ? !0 : void 0,
|
|
2193
|
-
...
|
|
2194
|
-
...r.inputs.filter((
|
|
2195
|
-
]) : s.variableName, b = f && (l.title || l.column) !== (c.title || c.column), m = i.label ?? (b ? c.title || c.column || c.id : void 0), y = f && l.hide !== c.hide, C = f && l.toolbarWidth !== c.toolbarWidth,
|
|
2196
|
-
var
|
|
2197
|
-
const
|
|
2198
|
-
if (m !== void 0 && (
|
|
2199
|
-
const
|
|
2200
|
-
|
|
2128
|
+
) : s.forceSelection ? !0 : void 0, g = (Array.isArray(e.inputs) ? e.inputs : []).filter((x) => x.id !== s.id), v = i.variableName !== void 0 ? nn(i.variableName, [
|
|
2129
|
+
...g,
|
|
2130
|
+
...r.inputs.filter((x) => x.input.id !== s.id).map((x) => x.input)
|
|
2131
|
+
]) : s.variableName, b = f && (l.title || l.column) !== (c.title || c.column), m = i.label ?? (b ? c.title || c.column || c.id : void 0), y = f && l.hide !== c.hide, C = f && l.toolbarWidth !== c.toolbarWidth, S = (x) => {
|
|
2132
|
+
var je, Ue;
|
|
2133
|
+
const I = { ...x };
|
|
2134
|
+
if (m !== void 0 && (I.label = m), i.variableName !== void 0 && (I.variableName = v), i.scope && (I.scope = i.scope), y || C) {
|
|
2135
|
+
const he = xt(c);
|
|
2136
|
+
I.presentation = { ...x.presentation }, y && (I.presentation.placement = he.placement), C && (he.widthPx === void 0 ? delete I.presentation.widthPx : I.presentation.widthPx = he.widthPx);
|
|
2201
2137
|
}
|
|
2202
|
-
return (i.forceSelection !== void 0 || f) && (d ?
|
|
2203
|
-
}, w = i.label !== void 0 && i.label !== s.label && i.label !== c.title ? i.label : void 0,
|
|
2204
|
-
...
|
|
2138
|
+
return (i.forceSelection !== void 0 || f) && (d ? I.forceSelection = d : delete I.forceSelection), i.requiredAtExecution !== void 0 && (i.requiredAtExecution ? I.requiredAtExecution = !0 : delete I.requiredAtExecution), ve(I, "optionSource", i.optionSource), ve(I, "optionDependencies", i.optionDependencies), ve(I, "optionPopulation", i.optionPopulation), ((je = i.mapping) == null ? void 0 : je.kind) === "save" && i.mapping.draft.acceptance.ok ? I.application = i.mapping.draft.acceptance.application : ((Ue = i.mapping) == null ? void 0 : Ue.kind) === "remove" && delete I.application, I;
|
|
2139
|
+
}, w = i.label !== void 0 && i.label !== s.label && i.label !== c.title ? i.label : void 0, p = f || i.variableName !== void 0 || w !== void 0, h = (x) => ({
|
|
2140
|
+
...x,
|
|
2205
2141
|
...i.variableName !== void 0 ? { variableName: v } : {},
|
|
2206
2142
|
...w !== void 0 ? { title: w } : {}
|
|
2207
|
-
}),
|
|
2208
|
-
if (
|
|
2143
|
+
}), F = Array.isArray(e.inputs) ? [...e.inputs] : [], D = F.findIndex((x) => x.id === s.id), T = F[D];
|
|
2144
|
+
if (D < 0 || (T == null ? void 0 : T.kind) !== "filter" || !T.filter)
|
|
2209
2145
|
return o("This filter can not be edited here.");
|
|
2210
|
-
const
|
|
2211
|
-
|
|
2212
|
-
...
|
|
2213
|
-
filter:
|
|
2214
|
-
} :
|
|
2146
|
+
const V = S(
|
|
2147
|
+
p ? {
|
|
2148
|
+
...T,
|
|
2149
|
+
filter: h(c)
|
|
2150
|
+
} : T
|
|
2215
2151
|
);
|
|
2216
|
-
f && (
|
|
2217
|
-
const
|
|
2218
|
-
inputs: [
|
|
2152
|
+
f && (V.exports = It(c)), F[D] = V;
|
|
2153
|
+
const N = Pe({
|
|
2154
|
+
inputs: [V],
|
|
2219
2155
|
dashboardFilters: []
|
|
2220
2156
|
});
|
|
2221
|
-
if (!
|
|
2157
|
+
if (!N.ok)
|
|
2222
2158
|
return o(
|
|
2223
|
-
((
|
|
2224
|
-
|
|
2159
|
+
((Be = N.issues[0]) == null ? void 0 : Be.message) ?? "These settings could not be saved.",
|
|
2160
|
+
N.issues[0]
|
|
2225
2161
|
);
|
|
2226
|
-
let O = { ...e, inputs:
|
|
2227
|
-
const
|
|
2228
|
-
if (!
|
|
2162
|
+
let O = { ...e, inputs: F };
|
|
2163
|
+
const H = $(O), M = H.findFilterInput({ filterId: c.id });
|
|
2164
|
+
if (!M)
|
|
2229
2165
|
return o(
|
|
2230
|
-
((
|
|
2166
|
+
((Ke = H.issues[0]) == null ? void 0 : Ke.message) ?? "These settings could not be saved."
|
|
2231
2167
|
);
|
|
2232
|
-
const
|
|
2233
|
-
if (
|
|
2168
|
+
const k = i.variableName !== void 0 || i.scope !== void 0 ? jr(O, M.input) : void 0;
|
|
2169
|
+
if (k)
|
|
2234
2170
|
return o(
|
|
2235
|
-
`Another filter on the same cards is already named "${
|
|
2171
|
+
`Another filter on the same cards is already named "${k}". Choose another name.`
|
|
2236
2172
|
);
|
|
2237
|
-
const B = [],
|
|
2238
|
-
id:
|
|
2239
|
-
runtimeScope:
|
|
2173
|
+
const B = [], q = {
|
|
2174
|
+
id: M.input.id,
|
|
2175
|
+
runtimeScope: M.input.runtimeScope
|
|
2240
2176
|
};
|
|
2241
|
-
let
|
|
2177
|
+
let E = {
|
|
2242
2178
|
defaultInputValues: O.defaultInputValues,
|
|
2243
2179
|
dashboardInputValues: {}
|
|
2244
2180
|
};
|
|
2245
|
-
const
|
|
2181
|
+
const re = ((Le = i.values) == null ? void 0 : Le.target) ?? {}, P = Gr(
|
|
2246
2182
|
l,
|
|
2247
2183
|
c,
|
|
2248
2184
|
{
|
|
2249
|
-
defaultValueChanged: (
|
|
2250
|
-
selectionIdentityChanged: (
|
|
2251
|
-
...((
|
|
2185
|
+
defaultValueChanged: (qe = i.values) == null ? void 0 : qe.defaultChanged,
|
|
2186
|
+
selectionIdentityChanged: ($e = i.values) == null ? void 0 : $e.selectionIdentityChanged,
|
|
2187
|
+
...((ze = i.values) == null ? void 0 : ze.defaultComparisonSelection) !== void 0 ? {
|
|
2252
2188
|
defaultComparisonChanged: !0,
|
|
2253
2189
|
defaultComparisonSelection: i.values.defaultComparisonSelection ?? void 0
|
|
2254
2190
|
} : {}
|
|
2255
2191
|
},
|
|
2256
|
-
|
|
2192
|
+
re,
|
|
2257
2193
|
n.calendar ?? void 0
|
|
2258
2194
|
);
|
|
2259
2195
|
if (P.defaultValueChanged || P.selectionIdentityChanged || P.defaultComparisonChanged) {
|
|
2260
|
-
const
|
|
2261
|
-
state: { ...
|
|
2262
|
-
input:
|
|
2196
|
+
const x = Ht({
|
|
2197
|
+
state: { ...E, dashboardInputValues: {} },
|
|
2198
|
+
input: q,
|
|
2263
2199
|
settings: P
|
|
2264
2200
|
});
|
|
2265
|
-
|
|
2201
|
+
E = { ...E, defaultInputValues: x.defaultInputValues }, P.selectionIdentityChanged && B.push({
|
|
2266
2202
|
kind: "clear",
|
|
2267
|
-
inputId:
|
|
2203
|
+
inputId: q.id,
|
|
2268
2204
|
target: P.target
|
|
2269
2205
|
}), P.defaultValueChanged && B.push({
|
|
2270
2206
|
kind: "resetToDefault",
|
|
2271
|
-
inputId:
|
|
2207
|
+
inputId: q.id,
|
|
2272
2208
|
target: P.target,
|
|
2273
2209
|
...P.defaultFilterValue ? { filterValue: P.defaultFilterValue } : {}
|
|
2274
2210
|
}), P.defaultComparisonChanged && B.push({
|
|
2275
2211
|
kind: "setDefaultComparison",
|
|
2276
|
-
inputId:
|
|
2212
|
+
inputId: q.id,
|
|
2277
2213
|
target: P.target
|
|
2278
2214
|
});
|
|
2279
2215
|
}
|
|
2280
|
-
if (i.scope &&
|
|
2281
|
-
const
|
|
2216
|
+
if (i.scope && M.input.runtimeScope !== "shared") {
|
|
2217
|
+
const x = Ur(
|
|
2282
2218
|
O,
|
|
2283
2219
|
s,
|
|
2284
|
-
|
|
2285
|
-
|
|
2220
|
+
M.input,
|
|
2221
|
+
E.defaultInputValues
|
|
2286
2222
|
);
|
|
2287
|
-
|
|
2288
|
-
...
|
|
2289
|
-
defaultInputValues:
|
|
2223
|
+
E = {
|
|
2224
|
+
...E,
|
|
2225
|
+
defaultInputValues: x.defaultInputValues
|
|
2290
2226
|
}, B.push(
|
|
2291
|
-
...
|
|
2227
|
+
...x.dropped.map((I) => ({
|
|
2292
2228
|
kind: "dropTargetSlot",
|
|
2293
|
-
inputId:
|
|
2294
|
-
target:
|
|
2229
|
+
inputId: q.id,
|
|
2230
|
+
target: I
|
|
2295
2231
|
}))
|
|
2296
2232
|
);
|
|
2297
2233
|
}
|
|
2298
|
-
return O =
|
|
2234
|
+
return O = Hr(O, E), {
|
|
2299
2235
|
ok: !0,
|
|
2300
2236
|
dashboard: O,
|
|
2301
|
-
inputId:
|
|
2237
|
+
inputId: M.input.id,
|
|
2302
2238
|
valueEffects: B
|
|
2303
2239
|
};
|
|
2304
2240
|
}
|
|
2305
|
-
function
|
|
2306
|
-
let t =
|
|
2241
|
+
function So(e) {
|
|
2242
|
+
let t = We({
|
|
2307
2243
|
dashboard: e.before,
|
|
2308
2244
|
runtimeValues: e.dashboardInputValues,
|
|
2309
2245
|
calendar: e.calendar
|
|
2310
2246
|
});
|
|
2311
|
-
const i =
|
|
2247
|
+
const i = $(e.after), n = (r) => {
|
|
2312
2248
|
var a;
|
|
2313
2249
|
return (a = i.findFilterInput({ inputId: r })) == null ? void 0 : a.input;
|
|
2314
2250
|
};
|
|
@@ -2319,7 +2255,7 @@ function To(e) {
|
|
|
2319
2255
|
case "setDefaultComparison": {
|
|
2320
2256
|
const a = n(r.inputId);
|
|
2321
2257
|
if (!a) break;
|
|
2322
|
-
t =
|
|
2258
|
+
t = Ht({
|
|
2323
2259
|
state: { dashboardInputValues: t },
|
|
2324
2260
|
input: a,
|
|
2325
2261
|
settings: {
|
|
@@ -2335,7 +2271,7 @@ function To(e) {
|
|
|
2335
2271
|
case "dropTargetSlot": {
|
|
2336
2272
|
const a = n(r.inputId);
|
|
2337
2273
|
if (!a) break;
|
|
2338
|
-
t =
|
|
2274
|
+
t = Te(
|
|
2339
2275
|
t,
|
|
2340
2276
|
a,
|
|
2341
2277
|
r.target
|
|
@@ -2343,22 +2279,22 @@ function To(e) {
|
|
|
2343
2279
|
break;
|
|
2344
2280
|
}
|
|
2345
2281
|
}
|
|
2346
|
-
return
|
|
2282
|
+
return We({
|
|
2347
2283
|
dashboard: e.after,
|
|
2348
2284
|
runtimeValues: t,
|
|
2349
2285
|
calendar: e.calendar
|
|
2350
2286
|
});
|
|
2351
2287
|
}
|
|
2352
|
-
function
|
|
2288
|
+
function zr(e) {
|
|
2353
2289
|
var t;
|
|
2354
2290
|
return e.kind !== "documentSections" && (e.kind !== "allSheets" || ((t = e.sheetKinds) == null ? void 0 : t.length) === 1 && e.sheetKinds[0] === "dashboard");
|
|
2355
2291
|
}
|
|
2356
|
-
function
|
|
2292
|
+
function ve(e, t, i) {
|
|
2357
2293
|
i !== void 0 && (i === null ? delete e[t] : e[t] = i);
|
|
2358
2294
|
}
|
|
2359
|
-
function
|
|
2295
|
+
function jr(e, t) {
|
|
2360
2296
|
const i = [
|
|
2361
|
-
|
|
2297
|
+
...$(e).inputs.map((r) => r.input),
|
|
2362
2298
|
...(Array.isArray(e.inputs) ? e.inputs : []).filter(
|
|
2363
2299
|
(r) => r.kind === "control"
|
|
2364
2300
|
)
|
|
@@ -2366,21 +2302,21 @@ function Ur(e, t) {
|
|
|
2366
2302
|
(r) => r.id !== t.id && r.variableName === t.variableName
|
|
2367
2303
|
);
|
|
2368
2304
|
if (!i.length) return;
|
|
2369
|
-
const n =
|
|
2305
|
+
const n = Xe(e, t);
|
|
2370
2306
|
return i.some(
|
|
2371
|
-
(r) => [...
|
|
2307
|
+
(r) => [...Xe(e, r)].some(
|
|
2372
2308
|
(a) => n.has(a)
|
|
2373
2309
|
)
|
|
2374
2310
|
) ? t.variableName : void 0;
|
|
2375
2311
|
}
|
|
2376
|
-
function
|
|
2312
|
+
function Ur(e, t, i, n) {
|
|
2377
2313
|
var u, f;
|
|
2378
|
-
const r = [], a =
|
|
2314
|
+
const r = [], a = Mt(e), o = (d) => ot(t, d, a), s = (d) => ot(i, d, a), l = [];
|
|
2379
2315
|
if (i.runtimeScope === "perSheet")
|
|
2380
2316
|
for (const d of a.values())
|
|
2381
2317
|
l.push({ sheetId: d.sheetId, sheetKind: d.sheetKind });
|
|
2382
2318
|
else if (i.runtimeScope === "perCard")
|
|
2383
|
-
for (const d of
|
|
2319
|
+
for (const d of de(e))
|
|
2384
2320
|
l.push({
|
|
2385
2321
|
sheetId: d.sheetId,
|
|
2386
2322
|
cardId: d.cardId,
|
|
@@ -2388,65 +2324,65 @@ function Hr(e, t, i, n) {
|
|
|
2388
2324
|
});
|
|
2389
2325
|
else if (i.runtimeScope === "perDocumentSection")
|
|
2390
2326
|
for (const d of e.sheets ?? [])
|
|
2391
|
-
for (const
|
|
2327
|
+
for (const g of ((f = d.document) == null ? void 0 : f.sections) ?? [])
|
|
2392
2328
|
l.push({
|
|
2393
2329
|
sheetId: d.id,
|
|
2394
|
-
sectionId:
|
|
2330
|
+
sectionId: g.id,
|
|
2395
2331
|
sheetKind: "document"
|
|
2396
2332
|
});
|
|
2397
2333
|
let c = n;
|
|
2398
2334
|
for (const d of l) {
|
|
2399
2335
|
if (s(d)) continue;
|
|
2400
|
-
const
|
|
2401
|
-
if (
|
|
2336
|
+
const g = !!(c && we(c, i, d));
|
|
2337
|
+
if (g && (c = Te(c, i, d)), g || o(d)) {
|
|
2402
2338
|
const { sheetKind: v, ...b } = d;
|
|
2403
2339
|
r.push(b);
|
|
2404
2340
|
}
|
|
2405
2341
|
}
|
|
2406
2342
|
return { defaultInputValues: c, dropped: r };
|
|
2407
2343
|
}
|
|
2408
|
-
function
|
|
2344
|
+
function ot(e, t, i) {
|
|
2409
2345
|
if (e.runtimeScope === "perSheet" && t.sheetId && !t.cardId && !t.sectionId) {
|
|
2410
2346
|
const n = i.get(t.sheetId);
|
|
2411
|
-
return n ?
|
|
2347
|
+
return n ? Dt(e, n) : !1;
|
|
2412
2348
|
}
|
|
2413
|
-
return
|
|
2349
|
+
return ln(e, t);
|
|
2414
2350
|
}
|
|
2415
|
-
function
|
|
2351
|
+
function Hr(e, t) {
|
|
2416
2352
|
const i = { ...e };
|
|
2417
2353
|
return t.defaultInputValues && Object.keys(t.defaultInputValues).length ? i.defaultInputValues = t.defaultInputValues : e.defaultInputValues !== void 0 && delete i.defaultInputValues, i;
|
|
2418
2354
|
}
|
|
2419
|
-
function
|
|
2420
|
-
const a = !!(i != null && i.defaultValueChanged || i != null && i.selectionIdentityChanged) ||
|
|
2355
|
+
function Gr(e, t, i, n, r) {
|
|
2356
|
+
const a = !!(i != null && i.defaultValueChanged || i != null && i.selectionIdentityChanged) || sn(e, t);
|
|
2421
2357
|
return {
|
|
2422
2358
|
...i,
|
|
2423
2359
|
target: (i == null ? void 0 : i.target) ?? n,
|
|
2424
2360
|
defaultValueChanged: a,
|
|
2425
|
-
defaultFilterValue: a ?
|
|
2361
|
+
defaultFilterValue: a ? G(t, r) : void 0
|
|
2426
2362
|
};
|
|
2427
2363
|
}
|
|
2428
|
-
function
|
|
2364
|
+
function Ht(e) {
|
|
2429
2365
|
const { settings: t } = e;
|
|
2430
2366
|
if (!t) return e.state;
|
|
2431
2367
|
const i = e.input;
|
|
2432
2368
|
let n = e.state.dashboardInputValues, r = e.state.defaultInputValues;
|
|
2433
|
-
if (t.selectionIdentityChanged && (n =
|
|
2369
|
+
if (t.selectionIdentityChanged && (n = Qe(
|
|
2434
2370
|
n,
|
|
2435
2371
|
i,
|
|
2436
2372
|
t.target,
|
|
2437
2373
|
{ status: "cleared" }
|
|
2438
2374
|
)), t.defaultValueChanged) {
|
|
2439
|
-
const a =
|
|
2375
|
+
const a = we(
|
|
2440
2376
|
r,
|
|
2441
2377
|
i,
|
|
2442
2378
|
t.target
|
|
2443
2379
|
);
|
|
2444
|
-
let o =
|
|
2380
|
+
let o = Te(
|
|
2445
2381
|
r || {},
|
|
2446
2382
|
i,
|
|
2447
2383
|
t.target
|
|
2448
2384
|
);
|
|
2449
|
-
t.defaultFilterValue ? o =
|
|
2385
|
+
t.defaultFilterValue ? o = Ye(
|
|
2450
2386
|
o,
|
|
2451
2387
|
i,
|
|
2452
2388
|
t.target,
|
|
@@ -2458,12 +2394,12 @@ function Wt(e) {
|
|
|
2458
2394
|
},
|
|
2459
2395
|
...a != null && a.comparisonSelection ? { comparisonSelection: a.comparisonSelection } : {}
|
|
2460
2396
|
}
|
|
2461
|
-
) : a != null && a.comparisonSelection && (o =
|
|
2397
|
+
) : a != null && a.comparisonSelection && (o = Ye(
|
|
2462
2398
|
o,
|
|
2463
2399
|
i,
|
|
2464
2400
|
t.target,
|
|
2465
2401
|
{ comparisonSelection: a.comparisonSelection }
|
|
2466
|
-
)), r = Object.keys(o).length ? o : void 0, n =
|
|
2402
|
+
)), r = Object.keys(o).length ? o : void 0, n = Qe(
|
|
2467
2403
|
n,
|
|
2468
2404
|
i,
|
|
2469
2405
|
t.target,
|
|
@@ -2476,12 +2412,12 @@ function Wt(e) {
|
|
|
2476
2412
|
} : { status: "cleared" }
|
|
2477
2413
|
);
|
|
2478
2414
|
}
|
|
2479
|
-
return t.defaultComparisonChanged && (r =
|
|
2415
|
+
return t.defaultComparisonChanged && (r = Je(
|
|
2480
2416
|
r || {},
|
|
2481
2417
|
i,
|
|
2482
2418
|
t.target,
|
|
2483
2419
|
t.defaultComparisonSelection
|
|
2484
|
-
), Object.keys(r).length || (r = void 0), n =
|
|
2420
|
+
), Object.keys(r).length || (r = void 0), n = Je(
|
|
2485
2421
|
n,
|
|
2486
2422
|
i,
|
|
2487
2423
|
t.target,
|
|
@@ -2492,57 +2428,57 @@ function Wt(e) {
|
|
|
2492
2428
|
defaultInputValues: r
|
|
2493
2429
|
};
|
|
2494
2430
|
}
|
|
2495
|
-
const
|
|
2496
|
-
function
|
|
2497
|
-
const i =
|
|
2431
|
+
const U = (e) => Array.isArray(e.inputs) ? e.inputs : [];
|
|
2432
|
+
function pe(e, t) {
|
|
2433
|
+
const i = U(e).find((n) => n.id === t);
|
|
2498
2434
|
if (!i || i.kind !== "filter")
|
|
2499
|
-
throw new
|
|
2435
|
+
throw new A("filter_not_found", `No filter ${t} on this dashboard.`, "Read the outline again and use its filter ids.");
|
|
2500
2436
|
return i;
|
|
2501
2437
|
}
|
|
2502
|
-
function
|
|
2438
|
+
function Gt(e, t) {
|
|
2503
2439
|
var i;
|
|
2504
|
-
return (i =
|
|
2440
|
+
return (i = de(e).find((n) => n.cardId === t)) == null ? void 0 : i.card.title;
|
|
2505
2441
|
}
|
|
2506
|
-
function
|
|
2507
|
-
const n =
|
|
2442
|
+
function Wr(e, t, i) {
|
|
2443
|
+
const n = $(e), r = n.findFilterInput({ inputId: t });
|
|
2508
2444
|
return r ? n.reachedCards({ inputId: t }).filter(
|
|
2509
2445
|
(a) => ["bound", "automatic", "sql", "relationshipApplied"].includes(
|
|
2510
|
-
|
|
2446
|
+
Ti(r.input, a.card, i).reach
|
|
2511
2447
|
)
|
|
2512
2448
|
).length : 0;
|
|
2513
2449
|
}
|
|
2514
|
-
function
|
|
2515
|
-
const i =
|
|
2516
|
-
return n ? i.reachedCards({ inputId: t }).filter((r) =>
|
|
2450
|
+
function Qr(e, t) {
|
|
2451
|
+
const i = $(e), n = i.findFilterInput({ inputId: t });
|
|
2452
|
+
return n ? i.reachedCards({ inputId: t }).filter((r) => wi(n.input, r.card) === "relationship").length : 0;
|
|
2517
2453
|
}
|
|
2518
|
-
function
|
|
2454
|
+
function Wt(e, t) {
|
|
2519
2455
|
if (t.scope.kind === "allSheets") return "every sheet";
|
|
2520
2456
|
if (t.scope.kind !== "sheets") return "its cards";
|
|
2521
|
-
const i = [...
|
|
2522
|
-
return
|
|
2457
|
+
const i = [...Mt(e).values()].filter((n) => Dt(t, n));
|
|
2458
|
+
return Tt(i.map((n) => {
|
|
2523
2459
|
var r, a;
|
|
2524
2460
|
return ((a = (r = e.sheets) == null ? void 0 : r.find((o) => o.id === n.sheetId)) == null ? void 0 : a.title) ?? n.sheetId;
|
|
2525
2461
|
}));
|
|
2526
2462
|
}
|
|
2527
|
-
const
|
|
2463
|
+
const Qt = (e) => {
|
|
2528
2464
|
var t;
|
|
2529
2465
|
return ((t = e.filter) == null ? void 0 : t.type) === "single" ? "single select" : "multi select";
|
|
2530
2466
|
};
|
|
2531
|
-
function
|
|
2467
|
+
function Yt(e) {
|
|
2532
2468
|
var t, i, n;
|
|
2533
2469
|
if ((i = (t = e.filter) == null ? void 0 : t.defaultValues) != null && i.length) return `default ${e.filter.defaultValues.join(", ")}`;
|
|
2534
2470
|
if ((n = e.filter) != null && n.defaultDateFilter) return "a default period";
|
|
2535
2471
|
}
|
|
2536
|
-
function
|
|
2537
|
-
return
|
|
2472
|
+
function ne(e) {
|
|
2473
|
+
return De.plain("filter", e);
|
|
2538
2474
|
}
|
|
2539
|
-
function
|
|
2540
|
-
const { input: i } = t, n =
|
|
2475
|
+
function Yr(e, t) {
|
|
2476
|
+
const { input: i } = t, n = U(e);
|
|
2541
2477
|
if (n.some((l) => l.id === i.id))
|
|
2542
|
-
throw new
|
|
2543
|
-
if (
|
|
2544
|
-
throw new
|
|
2545
|
-
const r = { ...e, inputs: [...n, i] }, a =
|
|
2478
|
+
throw new A("filter_id_taken", `A filter with id ${i.id} is already on this dashboard.`);
|
|
2479
|
+
if ($(e).findFilterInput({ filterId: i.filter.id }))
|
|
2480
|
+
throw new A("filter_id_taken", `A filter definition with id ${i.filter.id} is already on this dashboard.`);
|
|
2481
|
+
const r = { ...e, inputs: [...n, i] }, a = Wr(r, i.id), o = Qr(r, i.id), s = [Qt(i), Yt(i)].filter(Boolean).join(", ");
|
|
2546
2482
|
return {
|
|
2547
2483
|
dashboard: r,
|
|
2548
2484
|
created: [
|
|
@@ -2554,99 +2490,99 @@ function Jr(e, t) {
|
|
|
2554
2490
|
}
|
|
2555
2491
|
],
|
|
2556
2492
|
clauses: [
|
|
2557
|
-
|
|
2558
|
-
`adds the filter ${
|
|
2493
|
+
ne(
|
|
2494
|
+
`adds the filter ${z(i.label)} (${s}) to ${Wt(r, i)}; it filters ${a} card${a === 1 ? "" : "s"}${o ? ` and may filter ${o} more through the domain's relationships` : ""}`
|
|
2559
2495
|
)
|
|
2560
2496
|
]
|
|
2561
2497
|
};
|
|
2562
2498
|
}
|
|
2563
|
-
function
|
|
2564
|
-
const n =
|
|
2499
|
+
function Jr(e, t, i) {
|
|
2500
|
+
const n = $r(e, { inputId: t.filterId }, t.settings, {
|
|
2565
2501
|
calendar: i.calendar
|
|
2566
2502
|
});
|
|
2567
2503
|
if (!n.ok) {
|
|
2568
2504
|
const [o] = n.issues;
|
|
2569
|
-
throw new
|
|
2505
|
+
throw new A(
|
|
2570
2506
|
(o == null ? void 0 : o.code) === "inputNotFound" ? "filter_not_found" : "filter_invalid",
|
|
2571
2507
|
(o == null ? void 0 : o.message) ?? "These filter settings could not be saved.",
|
|
2572
2508
|
(o == null ? void 0 : o.code) === "inputNotFound" ? "Read the outline again and use its filter ids." : "Change the filter settings and propose again.",
|
|
2573
2509
|
{ issues: n.issues }
|
|
2574
2510
|
);
|
|
2575
2511
|
}
|
|
2576
|
-
const r =
|
|
2512
|
+
const r = U(e).find((o) => o.id === n.inputId), a = U(n.dashboard).find((o) => o.id === n.inputId);
|
|
2577
2513
|
return {
|
|
2578
2514
|
dashboard: n.dashboard,
|
|
2579
2515
|
runtimeEffects: [{ kind: "filter_value", effects: n.valueEffects }],
|
|
2580
|
-
clauses: [
|
|
2516
|
+
clauses: [ne(`changes the filter ${z((r == null ? void 0 : r.label) ?? a.label)}: ${Xr(n.dashboard, r, a)}`)]
|
|
2581
2517
|
};
|
|
2582
2518
|
}
|
|
2583
|
-
function
|
|
2519
|
+
function Xr(e, t, i) {
|
|
2584
2520
|
var o, s, l, c, u, f;
|
|
2585
2521
|
if (!t) return "updates its settings";
|
|
2586
2522
|
const n = [];
|
|
2587
|
-
t.label !== i.label && n.push(`renames it ${
|
|
2523
|
+
t.label !== i.label && n.push(`renames it ${z(i.label)}`), (((o = t.filter) == null ? void 0 : o.type) ?? "multiple") !== (((s = i.filter) == null ? void 0 : s.type) ?? "multiple") && n.push(`makes it ${Qt(i)}`);
|
|
2588
2524
|
const r = JSON.stringify([((l = t.filter) == null ? void 0 : l.defaultValues) ?? null, ((c = t.filter) == null ? void 0 : c.defaultDateFilter) ?? null]), a = JSON.stringify([((u = i.filter) == null ? void 0 : u.defaultValues) ?? null, ((f = i.filter) == null ? void 0 : f.defaultDateFilter) ?? null]);
|
|
2589
2525
|
if (r !== a) {
|
|
2590
|
-
const d =
|
|
2526
|
+
const d = Yt(i);
|
|
2591
2527
|
n.push(d ? `sets its ${d.replace(/^default /, "default to ").replace(/^a default period$/, "default period")}` : "removes its default");
|
|
2592
2528
|
}
|
|
2593
|
-
return JSON.stringify(t.scope) !== JSON.stringify(i.scope) && n.push(`applies it to ${
|
|
2529
|
+
return JSON.stringify(t.scope) !== JSON.stringify(i.scope) && n.push(`applies it to ${Wt(e, i)}`), n.length ? Tt(n) : "keeps its settings";
|
|
2594
2530
|
}
|
|
2595
|
-
function
|
|
2596
|
-
const i =
|
|
2531
|
+
function Zr(e, t) {
|
|
2532
|
+
const i = pe(e, t);
|
|
2597
2533
|
return {
|
|
2598
2534
|
dashboard: {
|
|
2599
2535
|
...e,
|
|
2600
|
-
inputs:
|
|
2601
|
-
defaultInputValues:
|
|
2536
|
+
inputs: U(e).filter((r) => r.id !== t),
|
|
2537
|
+
defaultInputValues: un(e.defaultInputValues, t)
|
|
2602
2538
|
},
|
|
2603
2539
|
runtimeEffects: [{ kind: "input_removed", inputId: t }],
|
|
2604
|
-
clauses: [
|
|
2540
|
+
clauses: [ne(`removes the filter ${z(i.label)}`)]
|
|
2605
2541
|
};
|
|
2606
2542
|
}
|
|
2607
|
-
function
|
|
2543
|
+
function ea(e, t, i) {
|
|
2608
2544
|
var o;
|
|
2609
|
-
if (!
|
|
2610
|
-
throw new
|
|
2611
|
-
const n =
|
|
2545
|
+
if (!de(e).some((s) => s.cardId === i))
|
|
2546
|
+
throw new A("card_not_found", `No card ${i} on this dashboard.`, "Read the outline again and use its card ids.");
|
|
2547
|
+
const n = dn(t.scope, i);
|
|
2612
2548
|
if (!n)
|
|
2613
|
-
throw new
|
|
2549
|
+
throw new A(
|
|
2614
2550
|
"filter_invalid",
|
|
2615
2551
|
"This filter applies to Document sections, so it can't leave out one card.",
|
|
2616
2552
|
"Change it in the editor."
|
|
2617
2553
|
);
|
|
2618
|
-
const r = { ...t, scope: n }, a =
|
|
2554
|
+
const r = { ...t, scope: n }, a = Pe({ inputs: [r], dashboardFilters: [] });
|
|
2619
2555
|
if (!a.ok)
|
|
2620
|
-
throw new
|
|
2556
|
+
throw new A("filter_invalid", ((o = a.issues[0]) == null ? void 0 : o.message) ?? "This filter could not be saved.", "Change it in the editor.");
|
|
2621
2557
|
return {
|
|
2622
2558
|
...e,
|
|
2623
|
-
inputs:
|
|
2559
|
+
inputs: U(e).map((s) => s.id === t.id ? r : s)
|
|
2624
2560
|
};
|
|
2625
2561
|
}
|
|
2626
|
-
function
|
|
2562
|
+
function Jt(e, t, i, n, r) {
|
|
2627
2563
|
var u, f;
|
|
2628
|
-
const a =
|
|
2629
|
-
if (!
|
|
2630
|
-
throw new
|
|
2564
|
+
const a = pe(e, t);
|
|
2565
|
+
if (!de(e).some((d) => d.cardId === i))
|
|
2566
|
+
throw new A("card_not_found", `No card ${i} on this dashboard.`, "Read the outline again and use its card ids.");
|
|
2631
2567
|
const o = [...((u = a.application) == null ? void 0 : u.cards) ?? []], s = o.findIndex((d) => d.cardId === i);
|
|
2632
2568
|
s >= 0 ? o[s] = n : o.push(n);
|
|
2633
2569
|
const l = {
|
|
2634
2570
|
...a,
|
|
2635
2571
|
...r ? { scope: r } : {},
|
|
2636
2572
|
application: { ...a.application ?? { kind: "cardMappings" }, cards: o }
|
|
2637
|
-
}, c =
|
|
2573
|
+
}, c = Pe({ inputs: [l], dashboardFilters: [] });
|
|
2638
2574
|
if (!c.ok)
|
|
2639
|
-
throw new
|
|
2575
|
+
throw new A(
|
|
2640
2576
|
"filter_invalid",
|
|
2641
2577
|
((f = c.issues[0]) == null ? void 0 : f.message) ?? "This filter mapping could not be saved.",
|
|
2642
2578
|
"Change the mapping and propose again."
|
|
2643
2579
|
);
|
|
2644
2580
|
return {
|
|
2645
2581
|
...e,
|
|
2646
|
-
inputs:
|
|
2582
|
+
inputs: U(e).map((d) => d.id === t ? l : d)
|
|
2647
2583
|
};
|
|
2648
2584
|
}
|
|
2649
|
-
function
|
|
2585
|
+
function ta(e) {
|
|
2650
2586
|
switch (e.kind) {
|
|
2651
2587
|
case "field":
|
|
2652
2588
|
return `by ${e.field.name}`;
|
|
@@ -2656,34 +2592,34 @@ function ia(e) {
|
|
|
2656
2592
|
return String(e.kind);
|
|
2657
2593
|
}
|
|
2658
2594
|
}
|
|
2659
|
-
function
|
|
2660
|
-
const i =
|
|
2595
|
+
function ia(e, t) {
|
|
2596
|
+
const i = pe(e, t.filterId), n = { ...t.binding, kind: "bound", cardId: t.cardId }, r = cn(i.scope, t.cardId), a = r !== i.scope;
|
|
2661
2597
|
return {
|
|
2662
|
-
dashboard:
|
|
2598
|
+
dashboard: Jt(e, t.filterId, t.cardId, n, a ? r : void 0),
|
|
2663
2599
|
clauses: [
|
|
2664
|
-
|
|
2665
|
-
`makes ${
|
|
2600
|
+
ne(
|
|
2601
|
+
`makes ${z(i.label)} filter ${z(Gt(e, t.cardId))} ${ta(n.target)}${a ? ", which it used to leave out" : ""}`
|
|
2666
2602
|
)
|
|
2667
2603
|
]
|
|
2668
2604
|
};
|
|
2669
2605
|
}
|
|
2670
|
-
function
|
|
2606
|
+
function na(e, t) {
|
|
2671
2607
|
var r;
|
|
2672
|
-
const i =
|
|
2608
|
+
const i = pe(e, t.filterId);
|
|
2673
2609
|
return {
|
|
2674
|
-
dashboard: ((r = i.filter) == null ? void 0 : r.kind) === "global-date" ?
|
|
2675
|
-
clauses: [
|
|
2610
|
+
dashboard: ((r = i.filter) == null ? void 0 : r.kind) === "global-date" ? ea(e, i, t.cardId) : Jt(e, t.filterId, t.cardId, { kind: "excluded", cardId: t.cardId }),
|
|
2611
|
+
clauses: [ne(`stops ${z(i.label)} from filtering ${z(Gt(e, t.cardId))}`)]
|
|
2676
2612
|
};
|
|
2677
2613
|
}
|
|
2678
|
-
function
|
|
2614
|
+
function Mo(e, t, i) {
|
|
2679
2615
|
let n = e;
|
|
2680
2616
|
const r = [], a = [], o = [];
|
|
2681
2617
|
for (const [s, l] of t.entries()) {
|
|
2682
2618
|
let c;
|
|
2683
2619
|
try {
|
|
2684
|
-
c =
|
|
2620
|
+
c = ra(n, l, i);
|
|
2685
2621
|
} catch (u) {
|
|
2686
|
-
if (!(u instanceof
|
|
2622
|
+
if (!(u instanceof A)) throw u;
|
|
2687
2623
|
return {
|
|
2688
2624
|
ok: !1,
|
|
2689
2625
|
failedAt: {
|
|
@@ -2698,33 +2634,33 @@ function wo(e, t, i) {
|
|
|
2698
2634
|
}
|
|
2699
2635
|
n = c.dashboard, r.push(...c.created ?? []), a.push(...c.runtimeEffects ?? []), o.push({ index: s, changeIndex: l.changeIndex, clauses: c.clauses });
|
|
2700
2636
|
}
|
|
2701
|
-
return { ok: !0, dashboard: n, created: r, descriptions:
|
|
2637
|
+
return { ok: !0, dashboard: n, created: r, descriptions: aa(o), runtimeEffects: a };
|
|
2702
2638
|
}
|
|
2703
|
-
function
|
|
2639
|
+
function ra(e, t, i) {
|
|
2704
2640
|
switch (t.op) {
|
|
2705
2641
|
case "card.add":
|
|
2706
|
-
return
|
|
2642
|
+
return pn(e, t);
|
|
2707
2643
|
case "card.remove":
|
|
2708
|
-
return
|
|
2644
|
+
return mn(e, t.cardId);
|
|
2709
2645
|
case "card.update":
|
|
2710
|
-
return
|
|
2646
|
+
return fn(e, t.cardId, t.update);
|
|
2711
2647
|
case "layout.arrange":
|
|
2712
|
-
return
|
|
2648
|
+
return Er(e, t);
|
|
2713
2649
|
case "frame.commit":
|
|
2714
|
-
return
|
|
2650
|
+
return Kr(e, t.commit);
|
|
2715
2651
|
case "filter.add":
|
|
2716
|
-
return
|
|
2652
|
+
return Yr(e, t);
|
|
2717
2653
|
case "filter.update":
|
|
2718
|
-
return
|
|
2654
|
+
return Jr(e, t, i);
|
|
2719
2655
|
case "filter.remove":
|
|
2720
|
-
return
|
|
2656
|
+
return Zr(e, t.filterId);
|
|
2721
2657
|
case "filter.bind":
|
|
2722
|
-
return
|
|
2658
|
+
return ia(e, t);
|
|
2723
2659
|
case "filter.exclude":
|
|
2724
|
-
return
|
|
2660
|
+
return na(e, t);
|
|
2725
2661
|
}
|
|
2726
2662
|
}
|
|
2727
|
-
function
|
|
2663
|
+
function aa(e) {
|
|
2728
2664
|
const t = [];
|
|
2729
2665
|
for (const i of e) {
|
|
2730
2666
|
const n = i.changeIndex === void 0 ? void 0 : t.find((r) => r.changeIndex === i.changeIndex);
|
|
@@ -2741,21 +2677,21 @@ function oa(e) {
|
|
|
2741
2677
|
}
|
|
2742
2678
|
return t.map(({ clauses: i, ...n }) => ({
|
|
2743
2679
|
...n,
|
|
2744
|
-
sentence:
|
|
2680
|
+
sentence: hn(oa(i))
|
|
2745
2681
|
}));
|
|
2746
2682
|
}
|
|
2747
|
-
function
|
|
2683
|
+
function oa(e) {
|
|
2748
2684
|
let t = !1;
|
|
2749
2685
|
return e.filter((i) => i.kind !== "detached" ? !0 : t ? !1 : (t = !0, !0));
|
|
2750
2686
|
}
|
|
2751
|
-
function
|
|
2687
|
+
function st(e) {
|
|
2752
2688
|
return Object.fromEntries(
|
|
2753
2689
|
Object.entries(e).filter(
|
|
2754
2690
|
(t) => typeof t[1] == "string" && t[1].length > 0
|
|
2755
2691
|
)
|
|
2756
2692
|
);
|
|
2757
2693
|
}
|
|
2758
|
-
function
|
|
2694
|
+
function ee(e) {
|
|
2759
2695
|
return e.kind === "semantic" ? [
|
|
2760
2696
|
e.kind,
|
|
2761
2697
|
e.domainId,
|
|
@@ -2770,18 +2706,18 @@ function re(e) {
|
|
|
2770
2706
|
e.tableName
|
|
2771
2707
|
].join(":");
|
|
2772
2708
|
}
|
|
2773
|
-
function
|
|
2709
|
+
function sa(e, t) {
|
|
2774
2710
|
if (e.kind === "semantic")
|
|
2775
2711
|
return {
|
|
2776
2712
|
status: "ready",
|
|
2777
|
-
request:
|
|
2713
|
+
request: st({
|
|
2778
2714
|
connection_id: e.connectionId,
|
|
2779
2715
|
domain_id: e.domainId,
|
|
2780
|
-
dataset_id:
|
|
2716
|
+
dataset_id: Ni(e),
|
|
2781
2717
|
dataset_name: e.datasetName
|
|
2782
2718
|
})
|
|
2783
2719
|
};
|
|
2784
|
-
const i =
|
|
2720
|
+
const i = wn({
|
|
2785
2721
|
source: e,
|
|
2786
2722
|
capabilities: t
|
|
2787
2723
|
});
|
|
@@ -2793,7 +2729,7 @@ function la(e, t) {
|
|
|
2793
2729
|
message: `Source is missing required field-metadata coordinates: ${i.missing.join(", ")}.`
|
|
2794
2730
|
} : {
|
|
2795
2731
|
status: "ready",
|
|
2796
|
-
request:
|
|
2732
|
+
request: st({
|
|
2797
2733
|
connection_id: e.connectionId,
|
|
2798
2734
|
datamodel_id: "",
|
|
2799
2735
|
database_name: i.coordinates.databaseName,
|
|
@@ -2802,14 +2738,14 @@ function la(e, t) {
|
|
|
2802
2738
|
})
|
|
2803
2739
|
};
|
|
2804
2740
|
}
|
|
2805
|
-
function
|
|
2741
|
+
function Do(e, t = /* @__PURE__ */ new Map()) {
|
|
2806
2742
|
const i = /* @__PURE__ */ new Map();
|
|
2807
2743
|
for (const { card: n } of e) {
|
|
2808
|
-
const r =
|
|
2744
|
+
const r = wt(n), a = r.kind === "config" ? r.executableSources : r.kind === "sql" ? r.pinnedCatalogSources.map((o) => o.source) : [];
|
|
2809
2745
|
for (const o of a) {
|
|
2810
|
-
const s =
|
|
2746
|
+
const s = ee(o);
|
|
2811
2747
|
if (!i.has(s)) {
|
|
2812
|
-
const l =
|
|
2748
|
+
const l = sa(
|
|
2813
2749
|
o,
|
|
2814
2750
|
o.connectionId ? t.get(o.connectionId) : void 0
|
|
2815
2751
|
);
|
|
@@ -2823,7 +2759,7 @@ function Po(e, t = /* @__PURE__ */ new Map()) {
|
|
|
2823
2759
|
}
|
|
2824
2760
|
return Array.from(i.values());
|
|
2825
2761
|
}
|
|
2826
|
-
function
|
|
2762
|
+
function la(e, t) {
|
|
2827
2763
|
if (e.kind !== "semantic" || !e.connectionId) return;
|
|
2828
2764
|
const i = (t.qualifiedEntityName || "").split(".").map((r) => r.trim()).filter(Boolean), n = i.at(-1);
|
|
2829
2765
|
if (n)
|
|
@@ -2835,48 +2771,48 @@ function ca(e, t) {
|
|
|
2835
2771
|
...i.length > 2 ? { databaseName: i.at(-3) } : {}
|
|
2836
2772
|
};
|
|
2837
2773
|
}
|
|
2838
|
-
function
|
|
2774
|
+
function oe(e, t) {
|
|
2839
2775
|
let i = e.get(t);
|
|
2840
2776
|
return i || (i = { fields: /* @__PURE__ */ new Map(), fieldConflicts: /* @__PURE__ */ new Set() }, e.set(t, i)), i;
|
|
2841
2777
|
}
|
|
2842
|
-
function
|
|
2778
|
+
function Xt(e, t) {
|
|
2843
2779
|
e.sourceLabel === void 0 ? e.sourceLabel = t : e.sourceLabel !== t && (e.sourceLabelConflict = !0);
|
|
2844
2780
|
}
|
|
2845
|
-
function
|
|
2781
|
+
function xe(e, t, i) {
|
|
2846
2782
|
for (const n of t) {
|
|
2847
2783
|
const r = n == null ? void 0 : n.trim();
|
|
2848
2784
|
if (!r) continue;
|
|
2849
|
-
const a =
|
|
2785
|
+
const a = gt(r), o = e.fields.get(a);
|
|
2850
2786
|
o === void 0 ? e.fields.set(a, i) : o !== i && e.fieldConflicts.add(a);
|
|
2851
2787
|
}
|
|
2852
2788
|
}
|
|
2853
|
-
function
|
|
2854
|
-
t.sourceLabel &&
|
|
2789
|
+
function Zt(e, t) {
|
|
2790
|
+
t.sourceLabel && Xt(e, t.sourceLabel), t.sourceLabelConflict && (e.sourceLabelConflict = !0);
|
|
2855
2791
|
for (const [i, n] of t.fields)
|
|
2856
|
-
|
|
2792
|
+
xe(e, [i], n);
|
|
2857
2793
|
for (const i of t.fieldConflicts ?? [])
|
|
2858
2794
|
e.fieldConflicts.add(i);
|
|
2859
2795
|
}
|
|
2860
|
-
function
|
|
2796
|
+
function ei(e) {
|
|
2861
2797
|
return e.kind === "semantic" && (e.label || e.datasetName || "").trim() || void 0;
|
|
2862
2798
|
}
|
|
2863
|
-
function
|
|
2799
|
+
function To(e, t) {
|
|
2864
2800
|
var n, r;
|
|
2865
2801
|
const i = /* @__PURE__ */ new Map();
|
|
2866
2802
|
for (const [a, o] of e) {
|
|
2867
2803
|
if (o.status !== "ready") continue;
|
|
2868
|
-
const s = t == null ? void 0 : t.get(a), l = s ?
|
|
2804
|
+
const s = t == null ? void 0 : t.get(a), l = s ? ei(s) : void 0;
|
|
2869
2805
|
for (const c of o.columns) {
|
|
2870
|
-
const u = (n = c.column_name) == null ? void 0 : n.trim(), f = (r = c.label) == null ? void 0 : r.trim(), d = s ?
|
|
2871
|
-
d && l &&
|
|
2872
|
-
|
|
2806
|
+
const u = (n = c.column_name) == null ? void 0 : n.trim(), f = (r = c.label) == null ? void 0 : r.trim(), d = s ? la(s, c) : void 0;
|
|
2807
|
+
d && l && Xt(
|
|
2808
|
+
oe(i, ee(d)),
|
|
2873
2809
|
l
|
|
2874
|
-
), !(!u || !f || f === u) && (
|
|
2875
|
-
|
|
2810
|
+
), !(!u || !f || f === u) && (xe(
|
|
2811
|
+
oe(i, a),
|
|
2876
2812
|
[u, c.sourceField],
|
|
2877
2813
|
f
|
|
2878
|
-
), d &&
|
|
2879
|
-
|
|
2814
|
+
), d && xe(
|
|
2815
|
+
oe(i, ee(d)),
|
|
2880
2816
|
[c.sourceField, u],
|
|
2881
2817
|
f
|
|
2882
2818
|
));
|
|
@@ -2884,56 +2820,56 @@ function Oo(e, t) {
|
|
|
2884
2820
|
}
|
|
2885
2821
|
return i;
|
|
2886
2822
|
}
|
|
2887
|
-
function
|
|
2823
|
+
function wo(...e) {
|
|
2888
2824
|
const t = /* @__PURE__ */ new Map();
|
|
2889
2825
|
for (const i of e)
|
|
2890
2826
|
for (const [n, r] of i ?? [])
|
|
2891
|
-
|
|
2827
|
+
Zt(oe(t, n), r);
|
|
2892
2828
|
return t;
|
|
2893
2829
|
}
|
|
2894
|
-
function
|
|
2830
|
+
function Ve(e) {
|
|
2895
2831
|
return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
|
|
2896
2832
|
}
|
|
2897
|
-
function
|
|
2833
|
+
function ca(e) {
|
|
2898
2834
|
return e.split(":").slice(2).filter(Boolean).join(".");
|
|
2899
2835
|
}
|
|
2900
|
-
function
|
|
2901
|
-
const i =
|
|
2836
|
+
function ti(e, t) {
|
|
2837
|
+
const i = ee(t), n = e.get(i);
|
|
2902
2838
|
if (t.kind !== "physical") return n;
|
|
2903
|
-
const r = `physical:${t.connectionId}:`, a =
|
|
2839
|
+
const r = `physical:${t.connectionId}:`, a = Ve(t), o = {
|
|
2904
2840
|
fields: /* @__PURE__ */ new Map(),
|
|
2905
2841
|
fieldConflicts: /* @__PURE__ */ new Set()
|
|
2906
2842
|
};
|
|
2907
2843
|
let s = !1;
|
|
2908
2844
|
for (const [l, c] of e)
|
|
2909
|
-
l.startsWith(r) && (l !== i && !
|
|
2845
|
+
l.startsWith(r) && (l !== i && !Pn(a, ca(l)) || (Zt(o, c), s = !0));
|
|
2910
2846
|
return s ? o : void 0;
|
|
2911
2847
|
}
|
|
2912
|
-
function
|
|
2848
|
+
function ua(e, t) {
|
|
2913
2849
|
var r;
|
|
2914
2850
|
if (!e) return;
|
|
2915
|
-
const i =
|
|
2851
|
+
const i = gt(t.name), n = ti(e, t.source);
|
|
2916
2852
|
return n && !((r = n.fieldConflicts) != null && r.has(i)) ? n.fields.get(i) : void 0;
|
|
2917
2853
|
}
|
|
2918
|
-
function
|
|
2854
|
+
function da(e, t) {
|
|
2919
2855
|
if (t.kind === "semantic")
|
|
2920
|
-
return
|
|
2921
|
-
const i = e ?
|
|
2922
|
-
return i != null && i.sourceLabel && !i.sourceLabelConflict ? i.sourceLabel :
|
|
2856
|
+
return ei(t) || t.datasetId || "Dataset";
|
|
2857
|
+
const i = e ? ti(e, t) : void 0;
|
|
2858
|
+
return i != null && i.sourceLabel && !i.sourceLabelConflict ? i.sourceLabel : Ve(t);
|
|
2923
2859
|
}
|
|
2924
|
-
function
|
|
2925
|
-
const i =
|
|
2860
|
+
function Po(e, t) {
|
|
2861
|
+
const i = ua(e, t);
|
|
2926
2862
|
return {
|
|
2927
2863
|
name: t.name,
|
|
2928
2864
|
...i ? { label: i } : {},
|
|
2929
|
-
entityName:
|
|
2930
|
-
...t.source.kind === "physical" ? { qualifiedEntityName:
|
|
2865
|
+
entityName: da(e, t.source),
|
|
2866
|
+
...t.source.kind === "physical" ? { qualifiedEntityName: Ve(t.source) } : {},
|
|
2931
2867
|
dataType: t.dataType
|
|
2932
2868
|
};
|
|
2933
2869
|
}
|
|
2934
|
-
function
|
|
2870
|
+
function fa(e, t) {
|
|
2935
2871
|
var r, a;
|
|
2936
|
-
const i = (r = t.column_name) == null ? void 0 : r.trim(), n =
|
|
2872
|
+
const i = (r = t.column_name) == null ? void 0 : r.trim(), n = ht(t.data_type);
|
|
2937
2873
|
if (!(!i || n === "unknown"))
|
|
2938
2874
|
return {
|
|
2939
2875
|
kind: "field",
|
|
@@ -2945,23 +2881,23 @@ function ma(e, t) {
|
|
|
2945
2881
|
}
|
|
2946
2882
|
};
|
|
2947
2883
|
}
|
|
2948
|
-
function
|
|
2884
|
+
function Oo(e) {
|
|
2949
2885
|
const t = {};
|
|
2950
2886
|
for (const { card: i } of e.cards) {
|
|
2951
|
-
const n =
|
|
2887
|
+
const n = wt(i), r = n.kind === "config" ? n.executableSources : n.kind === "sql" ? n.pinnedCatalogSources.map((s) => s.source) : [];
|
|
2952
2888
|
if (!r.length) continue;
|
|
2953
2889
|
const a = [];
|
|
2954
2890
|
let o;
|
|
2955
2891
|
for (const s of r) {
|
|
2956
2892
|
const l = e.metadataBySourceKey.get(
|
|
2957
|
-
|
|
2893
|
+
ee(s)
|
|
2958
2894
|
);
|
|
2959
2895
|
if (!l || l.status === "unavailable") {
|
|
2960
2896
|
o = (l == null ? void 0 : l.status) === "unavailable" ? l.message : "Field metadata is not available yet.";
|
|
2961
2897
|
break;
|
|
2962
2898
|
}
|
|
2963
2899
|
for (const c of l.columns) {
|
|
2964
|
-
const u =
|
|
2900
|
+
const u = fa(s, c);
|
|
2965
2901
|
u && a.push(u);
|
|
2966
2902
|
}
|
|
2967
2903
|
}
|
|
@@ -2969,20 +2905,20 @@ function _o(e) {
|
|
|
2969
2905
|
}
|
|
2970
2906
|
return t;
|
|
2971
2907
|
}
|
|
2972
|
-
function
|
|
2973
|
-
const { dashboard: t, target: i, calendar: n } = e, r =
|
|
2908
|
+
function Ao(e) {
|
|
2909
|
+
const { dashboard: t, target: i, calendar: n } = e, r = ni(i), a = ii(t, i, n);
|
|
2974
2910
|
return {
|
|
2975
2911
|
value: a,
|
|
2976
|
-
mode:
|
|
2977
|
-
|
|
2912
|
+
mode: Pi(
|
|
2913
|
+
Oi(a == null ? void 0 : a.operation) ? a.operation : r.operation
|
|
2978
2914
|
)
|
|
2979
2915
|
};
|
|
2980
2916
|
}
|
|
2981
|
-
function
|
|
2917
|
+
function ii(e, t, i) {
|
|
2982
2918
|
var n;
|
|
2983
2919
|
switch (t.kind) {
|
|
2984
2920
|
case "dashboardInput": {
|
|
2985
|
-
const r =
|
|
2921
|
+
const r = yn({
|
|
2986
2922
|
dashboard: e,
|
|
2987
2923
|
input: t.input,
|
|
2988
2924
|
target: t.scope,
|
|
@@ -2997,22 +2933,22 @@ function ri(e, t, i) {
|
|
|
2997
2933
|
return r ? gn({
|
|
2998
2934
|
filterDefinitions: [t.filter],
|
|
2999
2935
|
filterValues: [r]
|
|
3000
|
-
})[0] :
|
|
2936
|
+
})[0] : G(t.filter, i);
|
|
3001
2937
|
}
|
|
3002
2938
|
case "definition":
|
|
3003
|
-
return
|
|
2939
|
+
return G(t.filter, i);
|
|
3004
2940
|
}
|
|
3005
2941
|
}
|
|
3006
|
-
function
|
|
2942
|
+
function ni(e) {
|
|
3007
2943
|
return e.kind === "dashboardInput" ? e.input.filter : e.filter;
|
|
3008
2944
|
}
|
|
3009
|
-
function
|
|
2945
|
+
function _o(e) {
|
|
3010
2946
|
var a;
|
|
3011
2947
|
const { dashboard: t, filter: i, input: n, scope: r } = e;
|
|
3012
|
-
return n && (t.inputs || []).some((o) => o.id === n.id) ? { kind: "dashboardInput", input: n, scope: r } : ((a =
|
|
2948
|
+
return n && (t.inputs || []).some((o) => o.id === n.id) ? { kind: "dashboardInput", input: n, scope: r } : ((a = $(t).findFilterInput({ filterId: i.id })) == null ? void 0 : a.origin) === "toolbarFilter" ? { kind: "dashboardFilter", filter: i } : { kind: "definition", filter: i };
|
|
3013
2949
|
}
|
|
3014
|
-
function
|
|
3015
|
-
const { dashboard: t, target: i, calendar: n } = e, r =
|
|
2950
|
+
function No(e) {
|
|
2951
|
+
const { dashboard: t, target: i, calendar: n } = e, r = ni(i), a = bn(r), o = ma(t, i);
|
|
3016
2952
|
if (!o) return a;
|
|
3017
2953
|
if (o === "cleared")
|
|
3018
2954
|
return {
|
|
@@ -3020,13 +2956,13 @@ function Vo(e) {
|
|
|
3020
2956
|
defaultValues: void 0,
|
|
3021
2957
|
defaultDateFilter: void 0
|
|
3022
2958
|
};
|
|
3023
|
-
const s =
|
|
3024
|
-
if (!s ||
|
|
2959
|
+
const s = ii(t, i, n);
|
|
2960
|
+
if (!s || pa(s, G(r, n)))
|
|
3025
2961
|
return a;
|
|
3026
2962
|
if (s.valueType === "date") {
|
|
3027
|
-
const l =
|
|
2963
|
+
const l = Ei(
|
|
3028
2964
|
"relativeMeta" in s ? s.relativeMeta : void 0
|
|
3029
|
-
) ??
|
|
2965
|
+
) ?? ha(r, s, n);
|
|
3030
2966
|
return l ? {
|
|
3031
2967
|
operation: s.operation,
|
|
3032
2968
|
defaultValues: r.defaultValues,
|
|
@@ -3039,10 +2975,10 @@ function Vo(e) {
|
|
|
3039
2975
|
defaultDateFilter: r.defaultDateFilter
|
|
3040
2976
|
};
|
|
3041
2977
|
}
|
|
3042
|
-
function
|
|
2978
|
+
function ma(e, t) {
|
|
3043
2979
|
var i;
|
|
3044
2980
|
if (t.kind === "dashboardInput") {
|
|
3045
|
-
const n =
|
|
2981
|
+
const n = we(
|
|
3046
2982
|
e.defaultInputValues,
|
|
3047
2983
|
t.input,
|
|
3048
2984
|
t.scope
|
|
@@ -3054,19 +2990,19 @@ function pa(e, t) {
|
|
|
3054
2990
|
(n) => n.filterId === t.filter.id
|
|
3055
2991
|
) ? "set" : void 0;
|
|
3056
2992
|
}
|
|
3057
|
-
function
|
|
3058
|
-
return !!(t && e.operation === t.operation &&
|
|
2993
|
+
function pa(e, t) {
|
|
2994
|
+
return !!(t && e.operation === t.operation && Ce(lt(e), lt(t)) && Ce(
|
|
3059
2995
|
"relativeMeta" in e ? e.relativeMeta : void 0,
|
|
3060
2996
|
"relativeMeta" in t ? t.relativeMeta : void 0
|
|
3061
2997
|
));
|
|
3062
2998
|
}
|
|
3063
|
-
function
|
|
2999
|
+
function lt(e) {
|
|
3064
3000
|
return e.values.map(
|
|
3065
3001
|
(t) => t instanceof Date ? t.getTime() : t
|
|
3066
3002
|
);
|
|
3067
3003
|
}
|
|
3068
|
-
function
|
|
3069
|
-
const n =
|
|
3004
|
+
function ha(e, t, i) {
|
|
3005
|
+
const n = vn(i == null ? void 0 : i.tz), r = ye(t.values[0], n);
|
|
3070
3006
|
if (!r) return;
|
|
3071
3007
|
const [a, o, s] = new Intl.DateTimeFormat("en-CA", {
|
|
3072
3008
|
timeZone: n,
|
|
@@ -3083,19 +3019,19 @@ function ya(e, t, i) {
|
|
|
3083
3019
|
], c = t.values.map(
|
|
3084
3020
|
(u) => {
|
|
3085
3021
|
var f;
|
|
3086
|
-
return (f =
|
|
3022
|
+
return (f = ye(u, n)) == null ? void 0 : f.getTime();
|
|
3087
3023
|
}
|
|
3088
3024
|
);
|
|
3089
3025
|
return l.find((u) => {
|
|
3090
|
-
const f =
|
|
3026
|
+
const f = G(
|
|
3091
3027
|
{ ...e, defaultDateFilter: u },
|
|
3092
3028
|
i
|
|
3093
3029
|
);
|
|
3094
|
-
return (f == null ? void 0 : f.operation) === t.operation &&
|
|
3030
|
+
return (f == null ? void 0 : f.operation) === t.operation && Ce(
|
|
3095
3031
|
f.values.map(
|
|
3096
3032
|
(d) => {
|
|
3097
|
-
var
|
|
3098
|
-
return (
|
|
3033
|
+
var g;
|
|
3034
|
+
return (g = ye(d, n)) == null ? void 0 : g.getTime();
|
|
3099
3035
|
}
|
|
3100
3036
|
),
|
|
3101
3037
|
c
|
|
@@ -3103,10 +3039,10 @@ function ya(e, t, i) {
|
|
|
3103
3039
|
});
|
|
3104
3040
|
}
|
|
3105
3041
|
function ga(e) {
|
|
3106
|
-
const t =
|
|
3042
|
+
const t = W(e.format);
|
|
3107
3043
|
if ((t == null ? void 0 : t.type) === "temporal_bucket") {
|
|
3108
3044
|
if (!e.granularity) return {};
|
|
3109
|
-
const i =
|
|
3045
|
+
const i = ji(
|
|
3110
3046
|
t,
|
|
3111
3047
|
e.granularity
|
|
3112
3048
|
);
|
|
@@ -3123,34 +3059,34 @@ function ga(e) {
|
|
|
3123
3059
|
...t ? { format: t } : {}
|
|
3124
3060
|
};
|
|
3125
3061
|
}
|
|
3126
|
-
function
|
|
3062
|
+
function ya(e, t) {
|
|
3127
3063
|
var r, a;
|
|
3128
3064
|
const i = ((r = e.nativeDataType) == null ? void 0 : r.trim()) || ((a = e.native_data_type) == null ? void 0 : a.trim());
|
|
3129
3065
|
return i || ((e.dataTypeProvenance || t) === "physical" ? e.data_type : void 0);
|
|
3130
3066
|
}
|
|
3131
|
-
function
|
|
3067
|
+
function ri(e) {
|
|
3132
3068
|
const t = (e.label ?? "").trim();
|
|
3133
3069
|
return t ? e.derivedLabel === void 0 ? !0 : t !== e.derivedLabel.trim() : !1;
|
|
3134
3070
|
}
|
|
3135
|
-
function
|
|
3136
|
-
return
|
|
3071
|
+
function ke(e) {
|
|
3072
|
+
return ri(e) ? e.label.trim() : e.name || (e.label ?? "").trim();
|
|
3137
3073
|
}
|
|
3138
|
-
function
|
|
3139
|
-
return
|
|
3074
|
+
function ct(e) {
|
|
3075
|
+
return ke(e).toLowerCase().trim();
|
|
3140
3076
|
}
|
|
3141
|
-
function
|
|
3142
|
-
return
|
|
3077
|
+
function ba(e, t) {
|
|
3078
|
+
return ct(e).localeCompare(ct(t), void 0, {
|
|
3143
3079
|
numeric: !0,
|
|
3144
3080
|
sensitivity: "base"
|
|
3145
3081
|
});
|
|
3146
3082
|
}
|
|
3147
|
-
function
|
|
3083
|
+
function Z(e) {
|
|
3148
3084
|
return String(e ?? "").toLowerCase().replace(/[\s_\-.]+/g, "");
|
|
3149
3085
|
}
|
|
3150
|
-
function
|
|
3151
|
-
const i =
|
|
3086
|
+
function Eo(e, t) {
|
|
3087
|
+
const i = Z(t);
|
|
3152
3088
|
return i ? [
|
|
3153
|
-
|
|
3089
|
+
ke(e),
|
|
3154
3090
|
e.label,
|
|
3155
3091
|
e.name,
|
|
3156
3092
|
e.description,
|
|
@@ -3159,21 +3095,21 @@ function ko(e, t) {
|
|
|
3159
3095
|
e.entityName && e.name ? `${e.entityName}.${e.name}` : "",
|
|
3160
3096
|
e.dataType
|
|
3161
3097
|
].some(
|
|
3162
|
-
(r) => !!r &&
|
|
3098
|
+
(r) => !!r && Z(r).includes(i)
|
|
3163
3099
|
) : !0;
|
|
3164
3100
|
}
|
|
3165
|
-
function
|
|
3166
|
-
const i =
|
|
3101
|
+
function ut(e, t) {
|
|
3102
|
+
const i = Z(t);
|
|
3167
3103
|
if (!i) return 0;
|
|
3168
|
-
const n =
|
|
3169
|
-
return n.startsWith(i) ? 0 : n.includes(i) ? 1 : [e.label, e.name].filter(Boolean).map(
|
|
3104
|
+
const n = Z(ke(e));
|
|
3105
|
+
return n.startsWith(i) ? 0 : n.includes(i) ? 1 : [e.label, e.name].filter(Boolean).map(Z).some((a) => a.includes(i)) ? 2 : 3;
|
|
3170
3106
|
}
|
|
3171
|
-
function
|
|
3172
|
-
return
|
|
3107
|
+
function Ro(e, t, i) {
|
|
3108
|
+
return ut(e, i) - ut(t, i) || ba(e, t);
|
|
3173
3109
|
}
|
|
3174
|
-
function
|
|
3110
|
+
function va(e, t) {
|
|
3175
3111
|
var a;
|
|
3176
|
-
const i = e.type === "dataset" ? (a = t.find((o) => o.entityName)) == null ? void 0 : a.entityName : void 0, n = i || e.name, r =
|
|
3112
|
+
const i = e.type === "dataset" ? (a = t.find((o) => o.entityName)) == null ? void 0 : a.entityName : void 0, n = i || e.name, r = Ze(
|
|
3177
3113
|
e.type === "dataset" && i ? { ...e, name: i } : e
|
|
3178
3114
|
);
|
|
3179
3115
|
return {
|
|
@@ -3184,13 +3120,13 @@ function Fa(e, t) {
|
|
|
3184
3120
|
description: e.description,
|
|
3185
3121
|
qualifiedEntityName: r,
|
|
3186
3122
|
columns: t.map((o) => {
|
|
3187
|
-
var
|
|
3188
|
-
const s = e.type === "dataset" ? o.entityName || n : e.name, l = o.qualifiedEntityName || (e.type === "dataset" && s ?
|
|
3123
|
+
var g;
|
|
3124
|
+
const s = e.type === "dataset" ? o.entityName || n : e.name, l = o.qualifiedEntityName || (e.type === "dataset" && s ? Ze({ ...e, name: s }) : r), c = ya(
|
|
3189
3125
|
o,
|
|
3190
3126
|
e.type === "dataset" ? "semantic" : "physical"
|
|
3191
|
-
), u = (
|
|
3127
|
+
), u = (g = o.label) != null && g.trim() ? o.label : void 0, f = u ? void 0 : Fn(o.column_name);
|
|
3192
3128
|
return {
|
|
3193
|
-
id:
|
|
3129
|
+
id: Cn(s, o.column_name),
|
|
3194
3130
|
name: o.column_name,
|
|
3195
3131
|
qualifiedFieldName: o.qualifiedFieldName || o.column_name,
|
|
3196
3132
|
dataType: o.data_type,
|
|
@@ -3220,17 +3156,17 @@ function Fa(e, t) {
|
|
|
3220
3156
|
})
|
|
3221
3157
|
};
|
|
3222
3158
|
}
|
|
3223
|
-
function
|
|
3159
|
+
function Fa(e) {
|
|
3224
3160
|
return e.map((t) => ({
|
|
3225
3161
|
...t,
|
|
3226
|
-
id:
|
|
3162
|
+
id: Pt({ ...t }),
|
|
3227
3163
|
fieldScope: "domain"
|
|
3228
3164
|
}));
|
|
3229
3165
|
}
|
|
3230
|
-
function
|
|
3166
|
+
function Ca(e) {
|
|
3231
3167
|
return e.flatMap(
|
|
3232
3168
|
(t) => t.columns.map((i) => {
|
|
3233
|
-
const n =
|
|
3169
|
+
const n = ri(i) ? i.label : void 0, r = n ? void 0 : i.derivedLabel ?? xn(i.name), a = n ?? r ?? i.name;
|
|
3234
3170
|
return {
|
|
3235
3171
|
...i,
|
|
3236
3172
|
id: i.id || `${t.entityId}-${i.name}`,
|
|
@@ -3248,33 +3184,33 @@ function Ia(e) {
|
|
|
3248
3184
|
})
|
|
3249
3185
|
);
|
|
3250
3186
|
}
|
|
3251
|
-
function
|
|
3252
|
-
const t = e.map((n) =>
|
|
3187
|
+
function Vo(e) {
|
|
3188
|
+
const t = e.map((n) => va(n.target, n.columns || [])).filter((n) => {
|
|
3253
3189
|
var r;
|
|
3254
3190
|
return ((r = n == null ? void 0 : n.columns) == null ? void 0 : r.length) > 0;
|
|
3255
|
-
}), i =
|
|
3191
|
+
}), i = Fa(e.flatMap((n) => n.calculatedFields || []));
|
|
3256
3192
|
if (i.length > 0) {
|
|
3257
3193
|
const n = /* @__PURE__ */ new Map();
|
|
3258
3194
|
i.forEach((r) => {
|
|
3259
|
-
const a =
|
|
3195
|
+
const a = Pt(r);
|
|
3260
3196
|
n.has(a) || n.set(a, r);
|
|
3261
3197
|
}), t.unshift({
|
|
3262
|
-
entityId:
|
|
3198
|
+
entityId: In,
|
|
3263
3199
|
entityType: "dataset",
|
|
3264
|
-
entityName:
|
|
3200
|
+
entityName: et,
|
|
3265
3201
|
label: "Calculated Fields",
|
|
3266
3202
|
description: "Domain-level calculated metrics and dimensions",
|
|
3267
|
-
qualifiedEntityName:
|
|
3203
|
+
qualifiedEntityName: et,
|
|
3268
3204
|
columns: Array.from(n.values())
|
|
3269
3205
|
});
|
|
3270
3206
|
}
|
|
3271
|
-
return { columnGroups: t, columns:
|
|
3207
|
+
return { columnGroups: t, columns: Ca(t) };
|
|
3272
3208
|
}
|
|
3273
|
-
function
|
|
3209
|
+
function ko(e, t) {
|
|
3274
3210
|
const i = e.answers.relationshipIds;
|
|
3275
3211
|
return !i || !t ? !i && !t : i.length === t.length && i.every((n, r) => t[r] === n);
|
|
3276
3212
|
}
|
|
3277
|
-
const
|
|
3213
|
+
const Ia = /* @__PURE__ */ new Set([
|
|
3278
3214
|
"dataset_not_reachable",
|
|
3279
3215
|
"field_not_resolvable",
|
|
3280
3216
|
"missing_metadata",
|
|
@@ -3286,15 +3222,15 @@ const xa = /* @__PURE__ */ new Set([
|
|
|
3286
3222
|
function L(e) {
|
|
3287
3223
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
3288
3224
|
}
|
|
3289
|
-
function
|
|
3225
|
+
function xa(e) {
|
|
3290
3226
|
if (L(e))
|
|
3291
3227
|
switch (e.status) {
|
|
3292
3228
|
case "applied": {
|
|
3293
|
-
const t =
|
|
3229
|
+
const t = Ot(e.route);
|
|
3294
3230
|
return t ? { status: "applied", route: t } : void 0;
|
|
3295
3231
|
}
|
|
3296
3232
|
case "skipped":
|
|
3297
|
-
return typeof e.reason == "string" &&
|
|
3233
|
+
return typeof e.reason == "string" && Ia.has(e.reason) ? { status: "skipped", reason: e.reason } : void 0;
|
|
3298
3234
|
case "needsPath":
|
|
3299
3235
|
return { status: "needsPath" };
|
|
3300
3236
|
case "blocked":
|
|
@@ -3307,22 +3243,22 @@ function Sa(e) {
|
|
|
3307
3243
|
return;
|
|
3308
3244
|
}
|
|
3309
3245
|
}
|
|
3310
|
-
function
|
|
3246
|
+
function ai(e) {
|
|
3311
3247
|
if (e !== void 0)
|
|
3312
3248
|
return Array.isArray(e) && e.length > 0 && e.every((t) => typeof t == "string" && t.length > 0) ? e : null;
|
|
3313
3249
|
}
|
|
3314
|
-
function
|
|
3250
|
+
function Sa(e) {
|
|
3315
3251
|
if (!L(e)) return;
|
|
3316
|
-
const t =
|
|
3317
|
-
if (!(!t || !L(i) || i.kind !== "relationship" || !L(i.field) || typeof i.field.name != "string" || !L(i.field.source) || i.field.source.kind !== "semantic" || !
|
|
3252
|
+
const t = Ot(e.route), i = e.target;
|
|
3253
|
+
if (!(!t || !L(i) || i.kind !== "relationship" || !L(i.field) || typeof i.field.name != "string" || !L(i.field.source) || i.field.source.kind !== "semantic" || !ai(i.relationshipIds)))
|
|
3318
3254
|
return { route: t, target: i };
|
|
3319
3255
|
}
|
|
3320
|
-
function
|
|
3256
|
+
function Bo(e) {
|
|
3321
3257
|
if (!L(e) || !Array.isArray(e.previews)) return { previews: [] };
|
|
3322
3258
|
const t = [];
|
|
3323
3259
|
for (const n of e.previews) {
|
|
3324
3260
|
if (!L(n) || typeof n.cardId != "string" || !n.cardId || !L(n.answers)) continue;
|
|
3325
|
-
const r =
|
|
3261
|
+
const r = ai(n.answers.relationshipIds), a = xa(n.outcome), o = Array.isArray(n.paths) ? n.paths.map(Sa) : [];
|
|
3326
3262
|
r === null || !a || !o.every(Boolean) || a.status === "needsPath" && o.length < 2 || t.push({
|
|
3327
3263
|
cardId: n.cardId,
|
|
3328
3264
|
answers: r ? { relationshipIds: r } : {},
|
|
@@ -3333,22 +3269,22 @@ function qo(e) {
|
|
|
3333
3269
|
const i = L(e.manageRelationships) && typeof e.manageRelationships.href == "string" ? { href: e.manageRelationships.href } : void 0;
|
|
3334
3270
|
return { previews: t, ...i ? { manageRelationships: i } : {} };
|
|
3335
3271
|
}
|
|
3336
|
-
const
|
|
3337
|
-
function
|
|
3272
|
+
const se = (e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.name) || "";
|
|
3273
|
+
function Ma(e) {
|
|
3338
3274
|
return !e || /s$/i.test(e) ? e : /[^aeiou]y$/i.test(e) ? `${e.slice(0, -1)}ies` : `${e}s`;
|
|
3339
3275
|
}
|
|
3340
|
-
function
|
|
3276
|
+
function Ko(e) {
|
|
3341
3277
|
if (e.direction === "to_many") {
|
|
3342
|
-
const i =
|
|
3343
|
-
return `${e.base ?
|
|
3278
|
+
const i = se(e.matchingDataset ?? e.datasets[e.datasets.length - 1]);
|
|
3279
|
+
return `${e.base ? Ma(se(e.base)) : "Rows"} with at least one matching ${i}`;
|
|
3344
3280
|
}
|
|
3345
|
-
return `through ${(e.datasets.length > 1 ? e.datasets.slice(0, -1) : e.datasets).map(
|
|
3281
|
+
return `through ${(e.datasets.length > 1 ? e.datasets.slice(0, -1) : e.datasets).map(se).join(", ")}`;
|
|
3346
3282
|
}
|
|
3347
|
-
const
|
|
3348
|
-
function
|
|
3283
|
+
const Lo = "The relationship this card used changed; choose it again";
|
|
3284
|
+
function qo(e, t) {
|
|
3349
3285
|
switch (e) {
|
|
3350
3286
|
case "relationship_missing":
|
|
3351
|
-
return t ? `Not related to ${
|
|
3287
|
+
return t ? `Not related to ${se(t)}` : "Not related to this card";
|
|
3352
3288
|
case "relationship_ambiguous":
|
|
3353
3289
|
return "Connects through more than one path";
|
|
3354
3290
|
case "relationship_unsupported":
|
|
@@ -3363,120 +3299,114 @@ function jo(e, t) {
|
|
|
3363
3299
|
}
|
|
3364
3300
|
}
|
|
3365
3301
|
export {
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3302
|
+
mr as $,
|
|
3303
|
+
ke as A,
|
|
3304
|
+
xr as B,
|
|
3305
|
+
yr as C,
|
|
3306
|
+
Ha as D,
|
|
3307
|
+
Io as E,
|
|
3308
|
+
Fo as F,
|
|
3309
|
+
j as G,
|
|
3310
|
+
ce as H,
|
|
3311
|
+
Ya as I,
|
|
3312
|
+
kr as J,
|
|
3313
|
+
Br as K,
|
|
3314
|
+
vo as L,
|
|
3315
|
+
So as M,
|
|
3316
|
+
Nr as N,
|
|
3317
|
+
Bn as O,
|
|
3318
|
+
Vn as P,
|
|
3319
|
+
kn as Q,
|
|
3320
|
+
Lo as R,
|
|
3321
|
+
ho as S,
|
|
3322
|
+
ao as T,
|
|
3323
|
+
rr as U,
|
|
3324
|
+
_e as V,
|
|
3325
|
+
to as W,
|
|
3326
|
+
co as X,
|
|
3327
|
+
fo as Y,
|
|
3328
|
+
uo as Z,
|
|
3329
|
+
Nt as _,
|
|
3330
|
+
Mo as a,
|
|
3331
|
+
Sr as a0,
|
|
3332
|
+
te as a1,
|
|
3333
|
+
lo as a2,
|
|
3334
|
+
mo as a3,
|
|
3335
|
+
Wn as a4,
|
|
3336
|
+
nr as a5,
|
|
3337
|
+
br as a6,
|
|
3338
|
+
vr as a7,
|
|
3339
|
+
po as a8,
|
|
3340
|
+
Ie as a9,
|
|
3341
|
+
da as aA,
|
|
3342
|
+
ee as aB,
|
|
3343
|
+
Ve as aC,
|
|
3344
|
+
Do as aD,
|
|
3345
|
+
Oo as aE,
|
|
3346
|
+
To as aF,
|
|
3347
|
+
sa as aG,
|
|
3348
|
+
ya as aH,
|
|
3349
|
+
No as aI,
|
|
3350
|
+
_o as aJ,
|
|
3351
|
+
wo as aK,
|
|
3352
|
+
ua as aL,
|
|
3353
|
+
Co as aM,
|
|
3354
|
+
Rr as aN,
|
|
3355
|
+
fr as aO,
|
|
3420
3356
|
Ro as aP,
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
Zn as an,
|
|
3445
|
-
Xn as ao,
|
|
3446
|
-
Dr as ap,
|
|
3447
|
-
Me as aq,
|
|
3448
|
-
Za as ar,
|
|
3449
|
-
Vn as as,
|
|
3357
|
+
ut as aQ,
|
|
3358
|
+
ga as aR,
|
|
3359
|
+
Z as aS,
|
|
3360
|
+
Ja as aT,
|
|
3361
|
+
pr as aa,
|
|
3362
|
+
ro as ab,
|
|
3363
|
+
io as ac,
|
|
3364
|
+
no as ad,
|
|
3365
|
+
Xn as ae,
|
|
3366
|
+
Jn as af,
|
|
3367
|
+
oo as ag,
|
|
3368
|
+
jt as ah,
|
|
3369
|
+
$n as ai,
|
|
3370
|
+
Xa as aj,
|
|
3371
|
+
Mr as ak,
|
|
3372
|
+
Rn as al,
|
|
3373
|
+
Wa as am,
|
|
3374
|
+
Ln as an,
|
|
3375
|
+
Oe as ao,
|
|
3376
|
+
Za as ap,
|
|
3377
|
+
eo as aq,
|
|
3378
|
+
ue as ar,
|
|
3379
|
+
ie as as,
|
|
3450
3380
|
Qa as at,
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3381
|
+
so as au,
|
|
3382
|
+
lr as av,
|
|
3383
|
+
Lr as aw,
|
|
3384
|
+
Eo as ax,
|
|
3385
|
+
ri as ay,
|
|
3386
|
+
Po as az,
|
|
3387
|
+
xo as b,
|
|
3388
|
+
bo as c,
|
|
3389
|
+
fa as d,
|
|
3390
|
+
qr as e,
|
|
3391
|
+
$r as f,
|
|
3392
|
+
Ga as g,
|
|
3393
|
+
Nn as h,
|
|
3394
|
+
Dr as i,
|
|
3395
|
+
wr as j,
|
|
3396
|
+
Pr as k,
|
|
3397
|
+
go as l,
|
|
3398
|
+
Or as m,
|
|
3399
|
+
Ar as n,
|
|
3400
|
+
yo as o,
|
|
3471
3401
|
_r as p,
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3402
|
+
va as q,
|
|
3403
|
+
Ao as r,
|
|
3404
|
+
Fa as s,
|
|
3405
|
+
Ca as t,
|
|
3406
|
+
Vo as u,
|
|
3407
|
+
ko as v,
|
|
3408
|
+
Bo as w,
|
|
3409
|
+
Ma as x,
|
|
3410
|
+
Ko as y,
|
|
3411
|
+
qo as z
|
|
3482
3412
|
};
|