react-semaphor 0.1.553 → 0.1.555
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 +228 -227
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{assistant-chat-DaIdRbbd.js → assistant-chat-8NZP6m-u.js} +12 -12
- package/dist/chunks/{bookmark-state-aGO7_ryE.js → bookmark-state-BAeGKd3s.js} +3 -3
- package/dist/chunks/{comparison-window-caption-BugAu7zS.js → comparison-window-caption-C2WNTlxK.js} +44 -44
- package/dist/chunks/{custom-visual-inputs-D7ez5sab.js → custom-visual-inputs-Gw-Ggg3O.js} +1 -1
- package/dist/chunks/{dashboard-z3GYw7xR.js → dashboard-Ds68ckO3.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DBJ0xrfF.js → dashboard-briefing-launcher-DlTr-VGc.js} +13 -13
- package/dist/chunks/{dashboard-controls-CDX74NTl.js → dashboard-controls-oNXJZN6x.js} +13 -13
- package/dist/chunks/{dashboard-json-Cf5dpYTr.js → dashboard-json-CW7Q_efH.js} +4 -4
- package/dist/chunks/{document-dashboard-inputs-LMMWPOwU.js → document-dashboard-inputs-C21mL3ib.js} +10 -10
- package/dist/chunks/{edit-dashboard-visual-hCGiyxgm.js → edit-dashboard-visual-BnnT_oKR.js} +4087 -3979
- package/dist/chunks/{filter-reach-copy-BG5qVZKS.js → filter-reach-copy-DlNPHbE-.js} +13 -13
- package/dist/chunks/{filter-value-text-DwP5dN9m.js → filter-value-text-DMrpj4h9.js} +2 -2
- package/dist/chunks/{global-date-filter-utils-Ce6Ydv2W.js → global-date-filter-utils-7OboTgrM.js} +2358 -2301
- package/dist/chunks/{index-C_UIqop8.js → index-B2k6KtUN.js} +9 -9
- package/dist/chunks/{matrix-analytical-definition-cvzKdxPE.js → matrix-analytical-definition-DPVGg1mU.js} +12 -12
- package/dist/chunks/matrix-card-D9bsdAye.js +42 -0
- package/dist/chunks/{matrix-formatter-B27bz08Y.js → matrix-formatter-K2OVPJQI.js} +18 -18
- package/dist/chunks/{matrix-member-presentation-DyC-e9pD.js → matrix-member-presentation-DRWcJ8Mi.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-L_SiObB7.js → matrix-operation-contract--lMaLlpV.js} +64 -61
- package/dist/chunks/{metric-comparison-B5gyyW9k.js → metric-comparison-CYIt2F5X.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-BQFfowp1.js → pivot-header-presentation-CX4fkRuG.js} +1 -1
- package/dist/chunks/{pivot-result-identity-dZIYsMrY.js → pivot-result-identity-BHJGZwIc.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-D0kSz5QX.js → pivot-result-lifecycle-BygCpOhk.js} +20 -20
- package/dist/chunks/{raw-temporal-presentation-BWRH754b.js → raw-temporal-presentation-CivONfcO.js} +6 -6
- package/dist/chunks/{report-preferences-dialog-DvabpYcC.js → report-preferences-dialog-D_KyuEFx.js} +15 -15
- package/dist/chunks/{report-runtime-context-CKiIubIu.js → report-runtime-context-BaIKSaja.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Ctq1YCDV.js → resolve-dashboard-input-context-CIm9A8_j.js} +431 -429
- package/dist/chunks/{saved-dashboard-context-Bt1E9d1l.js → saved-dashboard-context-akb9JfOL.js} +8 -8
- package/dist/chunks/{selection-reducer-DdPwKDDQ.js → selection-reducer-yw_JgICP.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-Cc1TG_gw.js → semaphor-ready-indicator-Ba7dwP5_.js} +26 -26
- package/dist/chunks/{shelf-drop-preview-context-Ch9XqytU.js → shelf-drop-preview-context-5rg3pJHW.js} +6 -6
- package/dist/chunks/{source-entity-resolution-DkW3Iek5.js → source-entity-resolution-CGymm5td.js} +1 -1
- package/dist/chunks/{switch-gm7RW-PW.js → switch-B-UTI6v-.js} +2 -2
- package/dist/chunks/{table-export-sheet-C7bDdC8r.js → table-export-sheet-CgO6gaSM.js} +1 -1
- package/dist/chunks/{table-settings-CBm7G0yx.js → table-settings-DOT_Bv1m.js} +2 -2
- package/dist/chunks/{temporal-bucket-BikY3FFR.js → temporal-bucket-C4rqmwaQ.js} +24 -24
- package/dist/chunks/{token-types-B1p9F_wS.js → token-types-DYECHYGH.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CZdDRUpc.js → use-create-flow-overlay-state-BHNs0wl7.js} +6 -6
- package/dist/chunks/{validators-BdBzm_EV.js → validators-ClKLGDGZ.js} +1078 -1056
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +21 -19
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.js +15 -15
- package/dist/index.js +21 -21
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/index.js +6 -6
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +3 -2
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -2
- package/dist/types/lib/utils/card-config-utils.d.ts +1 -1
- package/dist/types/lib/utils/card-definition.d.ts +2 -1
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/matrix-analytical-definition.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +59 -21
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +12 -7
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +16 -9
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +14 -16
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/matrix-card.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +4 -2
- package/package.json +1 -1
- package/dist/chunks/matrix-card-VFE-yDlr.js +0 -38
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { canonicalizeSupportedCurrencyCode as
|
|
2
|
-
import { e7 as
|
|
3
|
-
import { B as
|
|
4
|
-
import {
|
|
5
|
-
import { s as Te, t as $e, u as
|
|
1
|
+
import { canonicalizeSupportedCurrencyCode as Vt } from "../value-format-preferences/index.js";
|
|
2
|
+
import { e7 as pi, P as mi, e8 as U, e9 as Me, b4 as yi, aj as gi, aC as bi, g as hi, b2 as Ii, r as ce, ea as Ci, cY as vi, eb as Lt, aS as Ti, dw as jt, ec as Fi, dx as Si, b_ as zt, s as B, dp as $t, n as xi, ed as Di, bU as Ut, bW as Gt, bE as ki, bZ as Mi, bX as yt, bY as Ai, bH as Ei, bG as wi, bT as _i, bR as Ni, v as Bi, b as qe, ee as Qt, cP as Wt, ef as Pi, b6 as Ht, b7 as Ki, b0 as Ve, b5 as Yt, eg as Oi, eh as Ri, cQ as qi, a as Vi, Y as K, a2 as Jt, a3 as Xt, d0 as Zt, c_ as gt, O as en, ei as Li, bs as ji, dK as tn, ds as Ae, dJ as zi, ej as $i, i as Le, bb as je, M as Ui, b8 as Gi, bc as Qi, bx as Wi, d as nn, ek as Hi, d4 as ze, d3 as Ee, el as Yi, cW as rn, c$ as Ji, em as bt, en as Xi, eo as Zi, d7 as er, ep as tr } from "./global-date-filter-utils-7OboTgrM.js";
|
|
3
|
+
import { B as nr, J as ir, n as rr, q as or, t as j, p as on, C as we, e as ar, c as an, H as sr, z as sn, K as lr, M as ln } from "./table-settings-DOT_Bv1m.js";
|
|
4
|
+
import { a9 as Q, ap as ae, ac as J, R as cr, B as ur, E as dr, ae as ht, q as cn, _ as fr, c as W, C as pr, v as mr } from "./validators-ClKLGDGZ.js";
|
|
5
|
+
import { s as Te, t as $e, u as yr, b as gr, r as _e } from "./matrix-operation-contract--lMaLlpV.js";
|
|
6
6
|
import { S as Ue } from "./analytics-base-schemas-BKs3flFS.js";
|
|
7
|
-
import { ZodError as
|
|
8
|
-
import { z as
|
|
9
|
-
import { i as ue } from "./temporal-bucket-
|
|
10
|
-
import { i as
|
|
11
|
-
import { E as
|
|
7
|
+
import { ZodError as br } from "zod";
|
|
8
|
+
import { z as hr, A as un, B as Fe, f as X, D as Ir, C as se, E as Cr } from "./matrix-formatter-K2OVPJQI.js";
|
|
9
|
+
import { i as ue } from "./temporal-bucket-C4rqmwaQ.js";
|
|
10
|
+
import { i as vr, b as dn } from "./matrix-card-D9bsdAye.js";
|
|
11
|
+
import { E as Tr, y as Fr } from "./pivot-result-lifecycle-BygCpOhk.js";
|
|
12
12
|
import "./index-CtoK1Lgu.js";
|
|
13
13
|
import "./index-CuHybtft.js";
|
|
14
14
|
import "./_commonjsHelpers-DimLPMtv.js";
|
|
15
|
-
import { g as
|
|
16
|
-
import { D as
|
|
17
|
-
import { r as _r } from "./pivot-result-identity-
|
|
18
|
-
import { p as
|
|
19
|
-
import { isPdfTableCardType as
|
|
20
|
-
import { k as
|
|
21
|
-
const
|
|
15
|
+
import { g as Sr, f as xr, a as Dr, h as kr, j as Mr, e as Ar } from "./matrix-analytical-definition-DPVGg1mU.js";
|
|
16
|
+
import { D as Er, C as Ge, r as R, a as wr } from "./metric-comparison-CYIt2F5X.js";
|
|
17
|
+
import { r as _r } from "./pivot-result-identity-BHJGZwIc.js";
|
|
18
|
+
import { p as Nr } from "./pivot-header-presentation-CX4fkRuG.js";
|
|
19
|
+
import { isPdfTableCardType as Br, FAST_PDF_POLICY as Pr } from "../pdf-export-policy/index.js";
|
|
20
|
+
import { k as Kr, c as It, g as Or, p as Ct, a as Rr } from "./source-entity-resolution-CGymm5td.js";
|
|
21
|
+
const qr = (e, t) => {
|
|
22
22
|
const n = {};
|
|
23
23
|
if (e === null || t === null)
|
|
24
24
|
return t;
|
|
@@ -33,23 +33,23 @@ const Vr = (e, t) => {
|
|
|
33
33
|
continue;
|
|
34
34
|
}
|
|
35
35
|
const o = e[r], a = t[r];
|
|
36
|
-
if (!
|
|
36
|
+
if (!Ne(o, a))
|
|
37
37
|
if (Array.isArray(o) && Array.isArray(a))
|
|
38
38
|
n[r] = a;
|
|
39
39
|
else if (vt(o) && vt(a)) {
|
|
40
|
-
const s =
|
|
40
|
+
const s = qr(o, a);
|
|
41
41
|
Object.keys(s).length > 0 && (n[r] = s);
|
|
42
42
|
} else
|
|
43
43
|
n[r] = a;
|
|
44
44
|
}
|
|
45
45
|
return n;
|
|
46
|
-
},
|
|
46
|
+
}, Ne = (e, t) => {
|
|
47
47
|
if (e === t) return !0;
|
|
48
48
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
49
49
|
if (Array.isArray(e) && Array.isArray(t))
|
|
50
|
-
return e.length !== t.length ? !1 : e.every((r, o) =>
|
|
50
|
+
return e.length !== t.length ? !1 : e.every((r, o) => Ne(r, t[o]));
|
|
51
51
|
const n = Object.keys(e), i = Object.keys(t);
|
|
52
|
-
return n.length !== i.length ? !1 : n.every((r) =>
|
|
52
|
+
return n.length !== i.length ? !1 : n.every((r) => Ne(e[r], t[r]));
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}, vt = (e) => e !== null && typeof e == "object" && !Array.isArray(e), be = (e) => {
|
|
@@ -65,29 +65,29 @@ const Vr = (e, t) => {
|
|
|
65
65
|
for (const n in e)
|
|
66
66
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = be(e[n]));
|
|
67
67
|
return t;
|
|
68
|
-
},
|
|
69
|
-
function
|
|
70
|
-
return typeof e == "string" &&
|
|
68
|
+
}, Vr = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
69
|
+
function Lr(e) {
|
|
70
|
+
return typeof e == "string" && Vr.test(e);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (!
|
|
72
|
+
function jr(e) {
|
|
73
|
+
if (!Lr(e))
|
|
74
74
|
throw TypeError("Invalid UUID");
|
|
75
75
|
let t;
|
|
76
76
|
const n = new Uint8Array(16);
|
|
77
77
|
return n[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24, n[1] = t >>> 16 & 255, n[2] = t >>> 8 & 255, n[3] = t & 255, n[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8, n[5] = t & 255, n[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8, n[7] = t & 255, n[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8, n[9] = t & 255, n[10] = (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, n[11] = t / 4294967296 & 255, n[12] = t >>> 24 & 255, n[13] = t >>> 16 & 255, n[14] = t >>> 8 & 255, n[15] = t & 255, n;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function zr(e) {
|
|
80
80
|
e = unescape(encodeURIComponent(e));
|
|
81
81
|
const t = [];
|
|
82
82
|
for (let n = 0; n < e.length; ++n)
|
|
83
83
|
t.push(e.charCodeAt(n));
|
|
84
84
|
return t;
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
86
|
+
const $r = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Ur = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
87
|
+
function Gr(e, t, n) {
|
|
88
88
|
function i(r, o, a, s) {
|
|
89
89
|
var l;
|
|
90
|
-
if (typeof r == "string" && (r =
|
|
90
|
+
if (typeof r == "string" && (r = zr(r)), typeof o == "string" && (o = jr(o)), ((l = o) === null || l === void 0 ? void 0 : l.length) !== 16)
|
|
91
91
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
92
92
|
let u = new Uint8Array(16 + r.length);
|
|
93
93
|
if (u.set(o), u.set(r, o.length), u = n(u), u[6] = u[6] & 15 | t, u[8] = u[8] & 63 | 128, a) {
|
|
@@ -96,15 +96,15 @@ function Qr(e, t, n) {
|
|
|
96
96
|
a[s + c] = u[c];
|
|
97
97
|
return a;
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return pi(u);
|
|
100
100
|
}
|
|
101
101
|
try {
|
|
102
102
|
i.name = e;
|
|
103
103
|
} catch {
|
|
104
104
|
}
|
|
105
|
-
return i.DNS =
|
|
105
|
+
return i.DNS = $r, i.URL = Ur, i;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Qr(e, t, n, i) {
|
|
108
108
|
switch (e) {
|
|
109
109
|
case 0:
|
|
110
110
|
return t & n ^ ~t & i;
|
|
@@ -119,7 +119,7 @@ function Wr(e, t, n, i) {
|
|
|
119
119
|
function De(e, t) {
|
|
120
120
|
return e << t | e >>> 32 - t;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Wr(e) {
|
|
123
123
|
const t = [1518500249, 1859775393, 2400959708, 3395469782], n = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
124
124
|
if (typeof e == "string") {
|
|
125
125
|
const a = unescape(encodeURIComponent(e));
|
|
@@ -144,15 +144,15 @@ function Hr(e) {
|
|
|
144
144
|
s[f] = De(s[f - 3] ^ s[f - 8] ^ s[f - 14] ^ s[f - 16], 1);
|
|
145
145
|
let l = n[0], u = n[1], c = n[2], p = n[3], y = n[4];
|
|
146
146
|
for (let f = 0; f < 80; ++f) {
|
|
147
|
-
const m = Math.floor(f / 20), d = De(l, 5) +
|
|
147
|
+
const m = Math.floor(f / 20), d = De(l, 5) + Qr(m, u, c, p) + y + t[m] + s[f] >>> 0;
|
|
148
148
|
y = p, p = c, c = De(u, 30) >>> 0, u = l, l = d;
|
|
149
149
|
}
|
|
150
150
|
n[0] = n[0] + l >>> 0, n[1] = n[1] + u >>> 0, n[2] = n[2] + c >>> 0, n[3] = n[3] + p >>> 0, n[4] = n[4] + y >>> 0;
|
|
151
151
|
}
|
|
152
152
|
return [n[0] >> 24 & 255, n[0] >> 16 & 255, n[0] >> 8 & 255, n[0] & 255, n[1] >> 24 & 255, n[1] >> 16 & 255, n[1] >> 8 & 255, n[1] & 255, n[2] >> 24 & 255, n[2] >> 16 & 255, n[2] >> 8 & 255, n[2] & 255, n[3] >> 24 & 255, n[3] >> 16 & 255, n[3] >> 8 & 255, n[3] & 255, n[4] >> 24 & 255, n[4] >> 16 & 255, n[4] >> 8 & 255, n[4] & 255];
|
|
153
153
|
}
|
|
154
|
-
const
|
|
155
|
-
function
|
|
154
|
+
const Hr = Gr("v5", 80, Wr), Tt = /\[\[\s*param\.([A-Za-z0-9_.-]+)\s*\]\]/g, Ft = /\bparam\s*\(\s*(['"])([^'"]+)\1/g;
|
|
155
|
+
function Yr(e) {
|
|
156
156
|
const t = [];
|
|
157
157
|
let n = 0;
|
|
158
158
|
for (; n < e.length; ) {
|
|
@@ -169,7 +169,7 @@ function Jr(e) {
|
|
|
169
169
|
}
|
|
170
170
|
return t;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function fn(e) {
|
|
173
173
|
var i, r;
|
|
174
174
|
if (!e)
|
|
175
175
|
return [];
|
|
@@ -179,38 +179,38 @@ function pn(e) {
|
|
|
179
179
|
const o = (i = n[1]) == null ? void 0 : i.trim();
|
|
180
180
|
o && t.add(o);
|
|
181
181
|
}
|
|
182
|
-
for (const o of
|
|
182
|
+
for (const o of Yr(e))
|
|
183
183
|
for (Ft.lastIndex = 0; (n = Ft.exec(o)) !== null; ) {
|
|
184
184
|
const a = (r = n[2]) == null ? void 0 : r.trim();
|
|
185
185
|
a && t.add(a);
|
|
186
186
|
}
|
|
187
187
|
return Array.from(t);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function pn(e) {
|
|
190
190
|
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
|
|
191
191
|
for (const i of e.controlBindings || [])
|
|
192
192
|
t.add(i.controlId), i.target === "sql_param" && n.set(i.paramId, i.controlId);
|
|
193
|
-
for (const i of
|
|
193
|
+
for (const i of fn(e.sql))
|
|
194
194
|
t.add(n.get(i) ?? i);
|
|
195
195
|
return Array.from(t);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Jr(e) {
|
|
198
198
|
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
199
199
|
for (const i of e.controlBindings || [])
|
|
200
200
|
i.target === "sql_param" && n.set(i.paramId, i.controlId);
|
|
201
|
-
for (const i of
|
|
201
|
+
for (const i of fn(e.sql))
|
|
202
202
|
t.set(i, {
|
|
203
203
|
paramId: i,
|
|
204
204
|
controlId: n.get(i) ?? i
|
|
205
205
|
});
|
|
206
206
|
return Array.from(t.values());
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Xr(e, t) {
|
|
209
209
|
var r;
|
|
210
210
|
const n = (r = e.controlBindings) == null ? void 0 : r.map((o) => ({
|
|
211
211
|
...o,
|
|
212
212
|
controlId: t.get(o.controlId) ?? o.controlId
|
|
213
|
-
})), i =
|
|
213
|
+
})), i = Jr(e).flatMap(
|
|
214
214
|
({ paramId: o, controlId: a }) => {
|
|
215
215
|
var l;
|
|
216
216
|
const s = t.get(a);
|
|
@@ -221,7 +221,7 @@ function Zr(e, t) {
|
|
|
221
221
|
);
|
|
222
222
|
return i.length ? [...n ?? [], ...i] : n;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function mn(e, t) {
|
|
225
225
|
var r, o;
|
|
226
226
|
const n = e.source === "dashboardInputAlias" ? ((r = t.inputAliases) == null ? void 0 : r[e.variableName]) ?? e : e, i = e.source === "dashboardInputAlias" && n !== e ? { ...n, export: e.export ?? "label" } : n;
|
|
227
227
|
return i.source === "dashboardInput" ? {
|
|
@@ -229,7 +229,7 @@ function yn(e, t) {
|
|
|
229
229
|
inputId: ((o = t.inputIds) == null ? void 0 : o[i.inputId]) ?? i.inputId
|
|
230
230
|
} : i;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Zr(e, t) {
|
|
233
233
|
var r;
|
|
234
234
|
const n = {};
|
|
235
235
|
for (const o of [
|
|
@@ -246,13 +246,13 @@ function eo(e, t) {
|
|
|
246
246
|
}
|
|
247
247
|
const i = { ...t.inputAliases };
|
|
248
248
|
for (const [o, a] of Object.entries((e == null ? void 0 : e.inputAliases) ?? {}))
|
|
249
|
-
i[o] =
|
|
249
|
+
i[o] = mn(a, t);
|
|
250
250
|
return Object.keys(i).length && (n.inputAliases = i), n;
|
|
251
251
|
}
|
|
252
252
|
function Pl(e, t) {
|
|
253
253
|
var r, o, a, s;
|
|
254
254
|
const n = be(e);
|
|
255
|
-
n.controlBindings =
|
|
255
|
+
n.controlBindings = Xr(
|
|
256
256
|
e,
|
|
257
257
|
new Map(Object.entries(t.controlIds ?? {}))
|
|
258
258
|
);
|
|
@@ -270,7 +270,7 @@ function Pl(e, t) {
|
|
|
270
270
|
const u = l;
|
|
271
271
|
if (u.type === "variable" && u.ref && typeof u.ref == "object") {
|
|
272
272
|
const f = u.ref;
|
|
273
|
-
u.ref = f.source === "input" ? { ...f, inputId: ((c = t.inputIds) == null ? void 0 : c[f.inputId]) ?? f.inputId } :
|
|
273
|
+
u.ref = f.source === "input" ? { ...f, inputId: ((c = t.inputIds) == null ? void 0 : c[f.inputId]) ?? f.inputId } : mn(f, t);
|
|
274
274
|
}
|
|
275
275
|
if (typeof u.entityId == "string") {
|
|
276
276
|
const f = u.entityId;
|
|
@@ -279,14 +279,14 @@ function Pl(e, t) {
|
|
|
279
279
|
for (const [f, m] of Object.entries(u))
|
|
280
280
|
f !== "linkedReferenceOverrides" && i(m);
|
|
281
281
|
};
|
|
282
|
-
i(n), n.clickToFilter && (n.clickToFilter =
|
|
282
|
+
i(n), n.clickToFilter && (n.clickToFilter = mi(n.clickToFilter, t));
|
|
283
283
|
for (const l of Object.values(
|
|
284
284
|
((a = n.customCardPreferences) == null ? void 0 : a.dataInputCardIds) ?? {}
|
|
285
285
|
))
|
|
286
286
|
l.cardId = ((s = t.cardIds) == null ? void 0 : s[l.cardId]) ?? l.cardId;
|
|
287
287
|
return n;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function eo({
|
|
290
290
|
capabilities: e,
|
|
291
291
|
database: t,
|
|
292
292
|
schema: n,
|
|
@@ -306,10 +306,10 @@ function Qe(e) {
|
|
|
306
306
|
function We(e) {
|
|
307
307
|
return U(e) === "number";
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function yn(e) {
|
|
310
310
|
return U(e) === "date";
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function gn(e) {
|
|
313
313
|
return U(e) === "boolean";
|
|
314
314
|
}
|
|
315
315
|
function Kl(e, t, n, i, r, o, a) {
|
|
@@ -317,7 +317,7 @@ function Kl(e, t, n, i, r, o, a) {
|
|
|
317
317
|
(m) => `${m.calc}(${m.name}) as ${m.calc}_${m.name.replace(/"/g, "")}`
|
|
318
318
|
).join(", "), c = (l == null ? void 0 : l.join(", ")) || "";
|
|
319
319
|
let p = "";
|
|
320
|
-
const f = (i ? `${Me}.${i}` : a ||
|
|
320
|
+
const f = (i ? `${Me}.${i}` : a || bn({
|
|
321
321
|
schemaName: t,
|
|
322
322
|
tableName: n,
|
|
323
323
|
databaseName: r,
|
|
@@ -360,22 +360,22 @@ function Ol(e, t, n = "AVG") {
|
|
|
360
360
|
]
|
|
361
361
|
}), i;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
return Qe(e.dataType) ? "string" : We(e.dataType) ? "number" :
|
|
363
|
+
function to(e) {
|
|
364
|
+
return Qe(e.dataType) ? "string" : We(e.dataType) ? "number" : yn(e.dataType) ? "date" : gn(e.dataType) ? "boolean" : "string";
|
|
365
365
|
}
|
|
366
366
|
function Rl(e) {
|
|
367
367
|
let t;
|
|
368
368
|
const n = e.data_type.toLowerCase();
|
|
369
|
-
return Qe(n) ? t = "T" : We(n) ? t = "#" :
|
|
369
|
+
return Qe(n) ? t = "T" : We(n) ? t = "#" : yn(n) ? t = "D" : gn(n) ? t = "B" : t = "?", t;
|
|
370
370
|
}
|
|
371
371
|
function ql(e, t) {
|
|
372
372
|
const { dimensions: n, measures: i } = t, r = n == null ? void 0 : n.includes(e.column_name), o = i == null ? void 0 : i.some((a) => a.name === e.column_name);
|
|
373
373
|
return r || o;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function no(e) {
|
|
376
376
|
return e ? e != null && e.startsWith(`${Me}.`) ? e : `${Me}.${e}` : "";
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function io({
|
|
379
379
|
schemaName: e,
|
|
380
380
|
tableName: t,
|
|
381
381
|
connectionType: n
|
|
@@ -392,44 +392,44 @@ function Vl({
|
|
|
392
392
|
// Legacy fallback when capabilities not available
|
|
393
393
|
}) {
|
|
394
394
|
let a;
|
|
395
|
-
r ? a =
|
|
395
|
+
r ? a = bn({
|
|
396
396
|
schemaName: e,
|
|
397
397
|
tableName: t,
|
|
398
398
|
databaseName: i,
|
|
399
399
|
capabilities: r
|
|
400
|
-
}) : a =
|
|
400
|
+
}) : a = io({
|
|
401
401
|
schemaName: e,
|
|
402
402
|
tableName: t,
|
|
403
403
|
connectionType: o
|
|
404
|
-
}), n && (a =
|
|
404
|
+
}), n && (a = no(n));
|
|
405
405
|
let s = a;
|
|
406
406
|
return ((u) => /[A-Z]/.test(u))(t) && (s = s.split(".").map((c) => `"${c}"`).join(".")), s;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function bn({
|
|
409
409
|
schemaName: e,
|
|
410
410
|
tableName: t,
|
|
411
411
|
databaseName: n,
|
|
412
412
|
capabilities: i
|
|
413
413
|
}) {
|
|
414
|
-
return
|
|
414
|
+
return eo({
|
|
415
415
|
capabilities: i,
|
|
416
416
|
database: n,
|
|
417
417
|
schema: e || void 0,
|
|
418
418
|
table: t
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
|
-
const
|
|
421
|
+
const ro = (e) => {
|
|
422
422
|
const t = new Date(e);
|
|
423
423
|
return !isNaN(t.getTime());
|
|
424
|
-
},
|
|
424
|
+
}, oo = (e) => !isNaN(Number(e)) && !isNaN(parseFloat(e)), Ll = (e) => {
|
|
425
425
|
let t;
|
|
426
|
-
return typeof e == "number" ? t = "number" : typeof e == "string" ?
|
|
427
|
-
},
|
|
428
|
-
function
|
|
426
|
+
return typeof e == "number" ? t = "number" : typeof e == "string" ? ro(e) ? t = "date" : oo(e) ? t = "number" : t = "string" : typeof e == "boolean" ? t = "boolean" : e instanceof Date ? t = "date" : t = "unknown", t;
|
|
427
|
+
}, ao = "9677efdd-86ec-4afb-b9bb-5ead8b5442af";
|
|
428
|
+
function so(e) {
|
|
429
429
|
let t = 0;
|
|
430
|
-
return () =>
|
|
430
|
+
return () => Hr(`${e}#${t++}`, ao);
|
|
431
431
|
}
|
|
432
|
-
const
|
|
432
|
+
const lo = [
|
|
433
433
|
{ code: "matrix_definition_incomplete", label: "Matrix definition" }
|
|
434
434
|
], ne = (e) => !Array.isArray(e) || e.length === 0;
|
|
435
435
|
function co(e) {
|
|
@@ -437,22 +437,24 @@ function co(e) {
|
|
|
437
437
|
const t = e.config ?? {};
|
|
438
438
|
return e.type === "pivotTable" && !((n = e.sql) != null && n.trim()) && (!ne(t.groupByColumns) || !ne(t.metricColumns)) && ne(t.pivotByColumns) && ne(t.rowAggregates) && ne(t.columnAggregates) ? "table" : "matrixTable";
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
if (!
|
|
442
|
-
const t = co(e) === "table" ?
|
|
443
|
-
|
|
440
|
+
function hn(e) {
|
|
441
|
+
if (!yi(e)) return { status: "not_legacy", card: e };
|
|
442
|
+
const t = co(e) === "table" ? gi(e, "table") : bi(e, "matrixTable", { createId: so(e.id) });
|
|
443
|
+
if (t.status !== "changed") throw new Error(`Card ${e.id} could not leave ${e.type}.`);
|
|
444
|
+
const n = t.card.type === "matrixTable" && hi(t.card).status !== "ready";
|
|
445
|
+
return { status: "routed", card: t.card, gaps: n ? [...t.gaps, ...lo] : t.gaps };
|
|
444
446
|
}
|
|
445
447
|
function jl(e) {
|
|
446
448
|
if (!e.cards) return e;
|
|
447
|
-
const t = e.cards.map((n) =>
|
|
449
|
+
const t = e.cards.map((n) => hn(n).card);
|
|
448
450
|
return t.every((n, i) => n === e.cards[i]) ? e : { ...e, cards: t };
|
|
449
451
|
}
|
|
450
452
|
function uo(e) {
|
|
451
453
|
const t = [];
|
|
452
|
-
return { dashboard:
|
|
453
|
-
const o =
|
|
454
|
-
return o.status === "
|
|
455
|
-
}),
|
|
454
|
+
return { dashboard: nr(e, (i, r) => {
|
|
455
|
+
const o = hn(i);
|
|
456
|
+
return o.status === "routed" && o.gaps.length && t.push({ location: r, gaps: o.gaps }), o.card;
|
|
457
|
+
}), routedWithGaps: t };
|
|
456
458
|
}
|
|
457
459
|
function fo(e) {
|
|
458
460
|
return (e.field.sourceField || e.field.name).trim() || void 0;
|
|
@@ -460,7 +462,7 @@ function fo(e) {
|
|
|
460
462
|
function po(e) {
|
|
461
463
|
if (e.inventory.kind !== "sql" || e.target.kind !== "field")
|
|
462
464
|
return { status: "ineligible" };
|
|
463
|
-
const t =
|
|
465
|
+
const t = Ii(
|
|
464
466
|
e.inventory,
|
|
465
467
|
e.target.field.source
|
|
466
468
|
), n = fo(e.target);
|
|
@@ -530,20 +532,20 @@ function $l(e) {
|
|
|
530
532
|
if (!(e === void 0 || !Number.isFinite(e)) && Number.isInteger(e))
|
|
531
533
|
return Math.max(0, Math.min(yo, e));
|
|
532
534
|
}
|
|
533
|
-
function
|
|
535
|
+
function In(e) {
|
|
534
536
|
var t;
|
|
535
537
|
return ((t = e == null ? void 0 : e.comparison) == null ? void 0 : t.mode) === "explicit" ? e.comparison.spec : void 0;
|
|
536
538
|
}
|
|
537
539
|
function go(e) {
|
|
538
540
|
var t;
|
|
539
|
-
return ((t =
|
|
541
|
+
return ((t = In(e)) == null ? void 0 : t.kind) || "none";
|
|
540
542
|
}
|
|
541
543
|
function Ul(e) {
|
|
542
|
-
const t =
|
|
544
|
+
const t = In(e);
|
|
543
545
|
return (t == null ? void 0 : t.kind) === "target" ? t.targetValue : void 0;
|
|
544
546
|
}
|
|
545
547
|
function Gl(e) {
|
|
546
|
-
return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) ||
|
|
548
|
+
return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) || Er;
|
|
547
549
|
}
|
|
548
550
|
function He(e, t) {
|
|
549
551
|
const n = Object.entries(e || {}).filter(
|
|
@@ -558,7 +560,7 @@ function He(e, t) {
|
|
|
558
560
|
);
|
|
559
561
|
return r.length === 1 ? r[0][1] : void 0;
|
|
560
562
|
}
|
|
561
|
-
function
|
|
563
|
+
function Cn(e, t) {
|
|
562
564
|
const n = He(e, t);
|
|
563
565
|
return {
|
|
564
566
|
comparisonKind: (n == null ? void 0 : n.type) ?? go(t),
|
|
@@ -588,7 +590,7 @@ function Ql(e, t) {
|
|
|
588
590
|
}
|
|
589
591
|
return n;
|
|
590
592
|
}
|
|
591
|
-
function
|
|
593
|
+
function vn(e) {
|
|
592
594
|
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
|
|
593
595
|
return Object.entries(e || {}).forEach(([l, u]) => {
|
|
594
596
|
const c = u.output;
|
|
@@ -621,7 +623,7 @@ function Wl(e) {
|
|
|
621
623
|
return "Comparison";
|
|
622
624
|
}
|
|
623
625
|
}
|
|
624
|
-
function
|
|
626
|
+
function Tn(e, t, n) {
|
|
625
627
|
var i;
|
|
626
628
|
if (((i = n == null ? void 0 : n.output) == null ? void 0 : i.availability.status) === "available" && n.output.comparisonColumnKey)
|
|
627
629
|
return n.output.comparisonColumnKey;
|
|
@@ -678,7 +680,7 @@ function Jl(e, t) {
|
|
|
678
680
|
const r = t.map((o, a) => ({ metric: o, index: a })).filter(({ metric: o }) => o.id === e.metricId);
|
|
679
681
|
return r.length === 1 ? r[0].index : -1;
|
|
680
682
|
}
|
|
681
|
-
function
|
|
683
|
+
function St(e) {
|
|
682
684
|
return JSON.stringify({
|
|
683
685
|
fields: e.pivotFields ?? [],
|
|
684
686
|
values: e.pivotValues ?? []
|
|
@@ -797,7 +799,7 @@ function de(e, t, n, i) {
|
|
|
797
799
|
(o) => n.includes(o)
|
|
798
800
|
);
|
|
799
801
|
}
|
|
800
|
-
function
|
|
802
|
+
function Fn(e, t, n) {
|
|
801
803
|
if (!O(t) || !n)
|
|
802
804
|
return;
|
|
803
805
|
const i = t.type === "detailTable" ? [{ role: "detail", fields: t.config.detailColumns }] : [
|
|
@@ -885,11 +887,11 @@ function xo(e) {
|
|
|
885
887
|
columnKeyMap: i
|
|
886
888
|
});
|
|
887
889
|
if (!s) return;
|
|
888
|
-
const { identity: l, pivotFields: u, authoredMetrics: c, authoredMetric: p } = s, f =
|
|
890
|
+
const { identity: l, pivotFields: u, authoredMetrics: c, authoredMetric: p } = s, f = Nr({
|
|
889
891
|
members: l.members,
|
|
890
892
|
resolveTemporalFormat: (C) => {
|
|
891
893
|
var v;
|
|
892
|
-
return (v =
|
|
894
|
+
return (v = Ci({
|
|
893
895
|
presentation: o,
|
|
894
896
|
fieldId: C,
|
|
895
897
|
role: "pivotby"
|
|
@@ -931,7 +933,7 @@ function L(e, t, n, i) {
|
|
|
931
933
|
)
|
|
932
934
|
).filter((r) => !!r) : [];
|
|
933
935
|
}
|
|
934
|
-
function
|
|
936
|
+
function xt(e, t, n, i) {
|
|
935
937
|
if (!O(t) || !i) return e;
|
|
936
938
|
const r = [], o = (a) => {
|
|
937
939
|
a && e.includes(a) && !r.includes(a) && r.push(a);
|
|
@@ -1012,7 +1014,7 @@ function Mo(e) {
|
|
|
1012
1014
|
var l;
|
|
1013
1015
|
const { keys: t, card: n, comparisonMetadata: i, columnKeyMap: r, resultColumns: o } = e;
|
|
1014
1016
|
if ((n == null ? void 0 : n.type) !== "table")
|
|
1015
|
-
return
|
|
1017
|
+
return xt(
|
|
1016
1018
|
t,
|
|
1017
1019
|
n,
|
|
1018
1020
|
void 0,
|
|
@@ -1020,7 +1022,7 @@ function Mo(e) {
|
|
|
1020
1022
|
);
|
|
1021
1023
|
const a = /* @__PURE__ */ new Map();
|
|
1022
1024
|
(((l = n.config) == null ? void 0 : l.metricColumns) || []).forEach((u) => {
|
|
1023
|
-
const { comparisonKind: c, metadata: p } =
|
|
1025
|
+
const { comparisonKind: c, metadata: p } = Cn(i, u);
|
|
1024
1026
|
if (c === "none") return;
|
|
1025
1027
|
const y = u.label || u.name, f = de(
|
|
1026
1028
|
u,
|
|
@@ -1029,7 +1031,7 @@ function Mo(e) {
|
|
|
1029
1031
|
r
|
|
1030
1032
|
);
|
|
1031
1033
|
if (!f) return;
|
|
1032
|
-
const m =
|
|
1034
|
+
const m = Tn(
|
|
1033
1035
|
y,
|
|
1034
1036
|
c,
|
|
1035
1037
|
p
|
|
@@ -1044,7 +1046,7 @@ function Mo(e) {
|
|
|
1044
1046
|
);
|
|
1045
1047
|
if (u) return u;
|
|
1046
1048
|
}
|
|
1047
|
-
return
|
|
1049
|
+
return xt(
|
|
1048
1050
|
t,
|
|
1049
1051
|
n,
|
|
1050
1052
|
s,
|
|
@@ -1097,8 +1099,8 @@ function ic(e, t, n) {
|
|
|
1097
1099
|
s.push(c), l += 1;
|
|
1098
1100
|
continue;
|
|
1099
1101
|
}
|
|
1100
|
-
const p =
|
|
1101
|
-
for (; l < e.length && e[l].isMetricColumn &&
|
|
1102
|
+
const p = St(c), y = [];
|
|
1103
|
+
for (; l < e.length && e[l].isMetricColumn && St(e[l]) === p; )
|
|
1102
1104
|
y.push(e[l]), l += 1;
|
|
1103
1105
|
s.push(...y.sort(a));
|
|
1104
1106
|
}
|
|
@@ -1153,8 +1155,8 @@ function $(e) {
|
|
|
1153
1155
|
}
|
|
1154
1156
|
function Eo(e, t) {
|
|
1155
1157
|
var n, i;
|
|
1156
|
-
return t.cardType === "detailTable" ? (n = H(e)) == null ? void 0 : n.map($) : !
|
|
1157
|
-
const o =
|
|
1158
|
+
return t.cardType === "detailTable" ? (n = H(e)) == null ? void 0 : n.map($) : !Ti(t.cardType) || t.temporalResultOwner !== "config" ? (i = H(e)) == null ? void 0 : i.map($) : e == null ? void 0 : e.map((r) => {
|
|
1159
|
+
const o = Lt(r), a = le(o ?? r);
|
|
1158
1160
|
if (!o)
|
|
1159
1161
|
return a;
|
|
1160
1162
|
const { dateFormat: s, customFormat: l, ...u } = a;
|
|
@@ -1164,21 +1166,21 @@ function Eo(e, t) {
|
|
|
1164
1166
|
function wo(e, t) {
|
|
1165
1167
|
var n;
|
|
1166
1168
|
return t.cardType !== "pivotTable" || t.temporalResultOwner !== "config" ? (n = H(e)) == null ? void 0 : n.map($) : e == null ? void 0 : e.map((i) => {
|
|
1167
|
-
const r =
|
|
1169
|
+
const r = Lt(i), o = le(r ?? i);
|
|
1168
1170
|
if (!r) return o;
|
|
1169
1171
|
const { dateFormat: a, customFormat: s, ...l } = o;
|
|
1170
1172
|
return l;
|
|
1171
1173
|
});
|
|
1172
1174
|
}
|
|
1173
|
-
function
|
|
1175
|
+
function _o(e) {
|
|
1174
1176
|
var t;
|
|
1175
1177
|
return (t = H(e)) == null ? void 0 : t.map($);
|
|
1176
1178
|
}
|
|
1177
|
-
function
|
|
1179
|
+
function No(e, t) {
|
|
1178
1180
|
if (!e)
|
|
1179
1181
|
return;
|
|
1180
1182
|
const n = { type: t.cardType, config: e };
|
|
1181
|
-
return
|
|
1183
|
+
return vi(n) ? Bo(n, t) : e.matrix === void 0 ? {} : { matrix: e.matrix };
|
|
1182
1184
|
}
|
|
1183
1185
|
function Bo(e, t = {}) {
|
|
1184
1186
|
var o, a;
|
|
@@ -1195,11 +1197,11 @@ function Bo(e, t = {}) {
|
|
|
1195
1197
|
sortByColumns: (a = H(n.sortByColumns)) == null ? void 0 : a.map(
|
|
1196
1198
|
$
|
|
1197
1199
|
),
|
|
1198
|
-
detailColumns:
|
|
1200
|
+
detailColumns: _o(n.detailColumns),
|
|
1199
1201
|
filters: Xe(n.filters)
|
|
1200
1202
|
};
|
|
1201
1203
|
}
|
|
1202
|
-
function
|
|
1204
|
+
function Sn(e, t) {
|
|
1203
1205
|
if (!(typeof e != "number" || typeof t != "number"))
|
|
1204
1206
|
return e === t ? t : void 0;
|
|
1205
1207
|
}
|
|
@@ -1207,7 +1209,7 @@ function Po(e, t) {
|
|
|
1207
1209
|
if (!(e != null && e.type) || e.type === "auto")
|
|
1208
1210
|
return;
|
|
1209
1211
|
if (e.type === "date")
|
|
1210
|
-
return
|
|
1212
|
+
return hr({
|
|
1211
1213
|
locale: e.locale,
|
|
1212
1214
|
pattern: e.dateFormat,
|
|
1213
1215
|
timezone: e.timezone,
|
|
@@ -1217,7 +1219,7 @@ function Po(e, t) {
|
|
|
1217
1219
|
suffix: e.suffix
|
|
1218
1220
|
});
|
|
1219
1221
|
if (e.type === "duration")
|
|
1220
|
-
return
|
|
1222
|
+
return un({
|
|
1221
1223
|
inputUnit: e.durationInputUnit,
|
|
1222
1224
|
outputStyle: e.durationDisplayStyle,
|
|
1223
1225
|
largestUnit: e.durationLargestUnit,
|
|
@@ -1261,7 +1263,7 @@ function Ko(e) {
|
|
|
1261
1263
|
currency: n ? "USD" : t.currency
|
|
1262
1264
|
};
|
|
1263
1265
|
}
|
|
1264
|
-
function
|
|
1266
|
+
function xn(e) {
|
|
1265
1267
|
if (!e)
|
|
1266
1268
|
return;
|
|
1267
1269
|
const t = se(e.currency), n = se(e.locale), i = typeof e.prefix == "string" ? e.prefix : void 0, r = typeof e.suffix == "string" ? e.suffix : void 0, o = t ? "currency" : r === "%" ? "percent" : "number";
|
|
@@ -1294,11 +1296,11 @@ function Oo(e) {
|
|
|
1294
1296
|
percentValueMode: r === "percent" ? e.percentValueMode || "whole" : void 0
|
|
1295
1297
|
});
|
|
1296
1298
|
}
|
|
1297
|
-
function
|
|
1299
|
+
function Dn(e, t) {
|
|
1298
1300
|
if (!e)
|
|
1299
1301
|
return;
|
|
1300
1302
|
if (e.style === "duration")
|
|
1301
|
-
return
|
|
1303
|
+
return un({
|
|
1302
1304
|
...e.duration,
|
|
1303
1305
|
prefix: e.prefix,
|
|
1304
1306
|
suffix: e.suffix,
|
|
@@ -1329,7 +1331,7 @@ function Ro(e) {
|
|
|
1329
1331
|
return !!(e && e.minimumFractionDigits === void 0 && e.maximumFractionDigits === void 0 && typeof e.currency == "string" && e.currency.length > 0 && typeof e.locale == "string" && e.locale.length > 0 && typeof e.showDataBar == "boolean" && typeof e.dataBarColor == "string" && e.dataBarColor.length > 0);
|
|
1330
1332
|
}
|
|
1331
1333
|
function rc(e) {
|
|
1332
|
-
const t =
|
|
1334
|
+
const t = Dn(e, {
|
|
1333
1335
|
preserveOmittedProperties: !0
|
|
1334
1336
|
});
|
|
1335
1337
|
return !t || !ue(t) || !Ro(e) ? t : {
|
|
@@ -1369,7 +1371,7 @@ function oc(e, t) {
|
|
|
1369
1371
|
type: n.type,
|
|
1370
1372
|
locale: n.locale,
|
|
1371
1373
|
currency: n.type === "currency" ? n.currency : void 0,
|
|
1372
|
-
decimalPlaces: t != null && t.preserveOmittedProperties ? void 0 :
|
|
1374
|
+
decimalPlaces: t != null && t.preserveOmittedProperties ? void 0 : Sn(
|
|
1373
1375
|
n.minimumFractionDigits,
|
|
1374
1376
|
n.maximumFractionDigits
|
|
1375
1377
|
),
|
|
@@ -1406,7 +1408,7 @@ function ac(e, t) {
|
|
|
1406
1408
|
} : !n || !ue(n) ? void 0 : {
|
|
1407
1409
|
style: n.type === "currency" ? "currency" : n.type === "percent" ? "percent" : n.type === "scientific" ? "scientific" : "decimal",
|
|
1408
1410
|
currency: n.type === "currency" && n.currency || (t != null && t.preserveOmittedProperties ? void 0 : "USD"),
|
|
1409
|
-
locale: n.locale || (t != null && t.preserveOmittedProperties ? void 0 :
|
|
1411
|
+
locale: n.locale || (t != null && t.preserveOmittedProperties ? void 0 : Ir),
|
|
1410
1412
|
minimumFractionDigits: n.minimumFractionDigits ?? (t != null && t.preserveOmittedProperties ? void 0 : 0),
|
|
1411
1413
|
maximumFractionDigits: n.maximumFractionDigits ?? (t != null && t.preserveOmittedProperties ? void 0 : 2),
|
|
1412
1414
|
useGrouping: typeof n.useGrouping == "boolean" ? n.useGrouping : !0,
|
|
@@ -1426,7 +1428,7 @@ function sc(e) {
|
|
|
1426
1428
|
const t = X(e);
|
|
1427
1429
|
if (!(!t || !ue(t)))
|
|
1428
1430
|
return {
|
|
1429
|
-
decimalPlaces:
|
|
1431
|
+
decimalPlaces: Sn(
|
|
1430
1432
|
t.minimumFractionDigits,
|
|
1431
1433
|
t.maximumFractionDigits
|
|
1432
1434
|
),
|
|
@@ -1444,7 +1446,7 @@ function sc(e) {
|
|
|
1444
1446
|
function Ie(e) {
|
|
1445
1447
|
return (e == null ? void 0 : e.type) === "number" || (e == null ? void 0 : e.type) === "currency";
|
|
1446
1448
|
}
|
|
1447
|
-
function
|
|
1449
|
+
function kn(e) {
|
|
1448
1450
|
var n, i;
|
|
1449
1451
|
const t = (i = (n = e.preferences) == null ? void 0 : n.formatNumber) == null ? void 0 : i.enabled;
|
|
1450
1452
|
return t === !1 || t === "false";
|
|
@@ -1463,7 +1465,7 @@ function Lo(e, t) {
|
|
|
1463
1465
|
const n = t == null ? void 0 : t.type;
|
|
1464
1466
|
if (n && n !== "none" && n !== "number")
|
|
1465
1467
|
return { currencyBindable: !1 };
|
|
1466
|
-
const i = n === "number" ? t != null && t.numberFormat ?
|
|
1468
|
+
const i = n === "number" ? t != null && t.numberFormat ? Dn(t.numberFormat, {
|
|
1467
1469
|
preserveOmittedProperties: !0
|
|
1468
1470
|
}) : { type: "number" } : void 0, r = X(e.format, {
|
|
1469
1471
|
preserveOmittedProperties: !0
|
|
@@ -1479,7 +1481,7 @@ function jo(e, t) {
|
|
|
1479
1481
|
preserveOmittedProperties: !0
|
|
1480
1482
|
}), i = Oo(
|
|
1481
1483
|
(l = e.preferences) == null ? void 0 : l.numberAxisFormat
|
|
1482
|
-
), r =
|
|
1484
|
+
), r = kn(e) ? void 0 : xn((u = e.preferences) == null ? void 0 : u.formatNumber), o = J(t.dataType) === "number" ? { type: "number" } : void 0, a = n || i || r || o;
|
|
1483
1485
|
return {
|
|
1484
1486
|
authoredFormat: a,
|
|
1485
1487
|
source: n ? "semantic" : i ? "number_axis" : r ? "legacy" : o ? "inferred" : void 0,
|
|
@@ -1490,7 +1492,7 @@ function Be(e, t = {}) {
|
|
|
1490
1492
|
var y, f, m, d, g, h;
|
|
1491
1493
|
const n = t.metricIndex ?? 0, i = !!((y = e.sql) != null && y.trim()), r = Ko(
|
|
1492
1494
|
(m = (f = e.preferences) == null ? void 0 : f.kpiVisualOptions) == null ? void 0 : m.formatOptions
|
|
1493
|
-
), o = n === 0 ?
|
|
1495
|
+
), o = n === 0 ? xn((d = e.preferences) == null ? void 0 : d.formatNumber) : void 0, a = kn(e);
|
|
1494
1496
|
if (i) {
|
|
1495
1497
|
const C = t.resultColumnKey ? {
|
|
1496
1498
|
kind: "column",
|
|
@@ -1511,17 +1513,17 @@ function Be(e, t = {}) {
|
|
|
1511
1513
|
return {
|
|
1512
1514
|
target: l,
|
|
1513
1515
|
authoredFormat: p,
|
|
1514
|
-
currencyBindable: !a &&
|
|
1516
|
+
currencyBindable: !a && jt(e.type) && !!l && Ie(p)
|
|
1515
1517
|
};
|
|
1516
1518
|
}
|
|
1517
|
-
function
|
|
1518
|
-
const n =
|
|
1519
|
+
function Mn(e, t = []) {
|
|
1520
|
+
const n = vr(e);
|
|
1519
1521
|
if (n.status !== "ready") return [];
|
|
1520
|
-
const { spec: i, presentation: r } = n.config, o =
|
|
1522
|
+
const { spec: i, presentation: r } = n.config, o = Fi(t);
|
|
1521
1523
|
return i.measures.map((a) => {
|
|
1522
1524
|
var m, d;
|
|
1523
|
-
const s = a.kind === "aggregate" ? o(a.field, i.source) : void 0, l = a.kind === "calculated" ? a.definition.format : ((m = a.field.derivedField) == null ? void 0 : m.format) ?? (s == null ? void 0 : s.format) ?? (s == null ? void 0 : s.resolvedField.format), u =
|
|
1524
|
-
return { measureId: a.id, label:
|
|
1525
|
+
const s = a.kind === "aggregate" ? o(a.field, i.source) : void 0, l = a.kind === "calculated" ? a.definition.format : ((m = a.field.derivedField) == null ? void 0 : m.format) ?? (s == null ? void 0 : s.format) ?? (s == null ? void 0 : s.resolvedField.format), u = Cr(r.measureFormats[a.id], l), c = a.kind === "calculated" ? a.definition.dataType : ["MIN", "MAX"].includes(a.aggregate) ? ((d = a.field.derivedField) == null ? void 0 : d.dataType) ?? (s == null ? void 0 : s.resolvedField.dataType) ?? a.field.dataType : "number", p = J(c) === "number", y = a.kind === "calculated" || !!(s || a.field.derivedField || a.field.name === "*"), f = u && ue(u) ? u : !u && p && y ? { type: "number" } : void 0;
|
|
1526
|
+
return { measureId: a.id, label: Tr(a, r), canonical: f };
|
|
1525
1527
|
});
|
|
1526
1528
|
}
|
|
1527
1529
|
function zo(e) {
|
|
@@ -1530,8 +1532,8 @@ function zo(e) {
|
|
|
1530
1532
|
}
|
|
1531
1533
|
function $o(e) {
|
|
1532
1534
|
return new Set(
|
|
1533
|
-
|
|
1534
|
-
(t) => (t.controlBindings || []).filter(
|
|
1535
|
+
ir(e).flatMap(
|
|
1536
|
+
(t) => (t.controlBindings || []).filter(zt).map((n) => n.controlId)
|
|
1535
1537
|
)
|
|
1536
1538
|
);
|
|
1537
1539
|
}
|
|
@@ -1553,7 +1555,7 @@ function Uo(e, t) {
|
|
|
1553
1555
|
);
|
|
1554
1556
|
return r == null ? void 0 : r[1];
|
|
1555
1557
|
}
|
|
1556
|
-
function
|
|
1558
|
+
function Dt(e) {
|
|
1557
1559
|
return [
|
|
1558
1560
|
...new Map(
|
|
1559
1561
|
e.map((t) => [
|
|
@@ -1564,10 +1566,10 @@ function kt(e) {
|
|
|
1564
1566
|
];
|
|
1565
1567
|
}
|
|
1566
1568
|
function Go(e, t = [], n) {
|
|
1567
|
-
var E, D,
|
|
1568
|
-
const i = !!((E = e.sql) != null && E.trim()), r =
|
|
1569
|
+
var E, D, _;
|
|
1570
|
+
const i = !!((E = e.sql) != null && E.trim()), r = jt(e.type), o = i && r && e.type !== "kpi" && e.type !== "matrixTable", a = zo(e), s = ((_ = (D = e.preferences) == null ? void 0 : D.tablePrefs) == null ? void 0 : _.columnSettingsMap) || {}, l = !i && e.type === "kpi" ? a.map(
|
|
1569
1571
|
(I, S) => Be(e, { metricIndex: S })
|
|
1570
|
-
) : [], u = !i && e.type === "matrixTable" ?
|
|
1572
|
+
) : [], u = !i && e.type === "matrixTable" ? Mn(e, n) : [], c = (i ? [] : a).map(
|
|
1571
1573
|
(I) => ({
|
|
1572
1574
|
kind: "metric",
|
|
1573
1575
|
metricId: I.id
|
|
@@ -1588,7 +1590,7 @@ function Go(e, t = [], n) {
|
|
|
1588
1590
|
), f = e.type === "matrixTable" ? [] : e.type === "kpi" ? l.filter((I) => I.currencyBindable).flatMap(
|
|
1589
1591
|
(I) => I.target ? [I.target] : []
|
|
1590
1592
|
) : (i || !r ? [] : a).filter(
|
|
1591
|
-
(I) => (
|
|
1593
|
+
(I) => (Si(e.type) ? Lo(
|
|
1592
1594
|
I,
|
|
1593
1595
|
Uo(s, I)
|
|
1594
1596
|
) : jo(e, I)).currencyBindable
|
|
@@ -1620,12 +1622,12 @@ function Go(e, t = [], n) {
|
|
|
1620
1622
|
resultColumnKey: m[0]
|
|
1621
1623
|
}) : void 0, v = r && (C != null && C.currencyBindable) ? h : [];
|
|
1622
1624
|
return {
|
|
1623
|
-
knownTargets:
|
|
1625
|
+
knownTargets: Dt([
|
|
1624
1626
|
...e.type === "matrixTable" ? p : c,
|
|
1625
1627
|
...d,
|
|
1626
1628
|
...h
|
|
1627
1629
|
]),
|
|
1628
|
-
eligibleTargets:
|
|
1630
|
+
eligibleTargets: Dt([
|
|
1629
1631
|
...f,
|
|
1630
1632
|
...y,
|
|
1631
1633
|
...g,
|
|
@@ -1657,20 +1659,20 @@ function Qo(e) {
|
|
|
1657
1659
|
if (t.kind === "matrix_measure" && typeof t.measureId == "string" && t.measureId.trim())
|
|
1658
1660
|
return { kind: "matrix_measure", measureId: t.measureId };
|
|
1659
1661
|
}
|
|
1660
|
-
function
|
|
1661
|
-
const t =
|
|
1662
|
+
function kt(e) {
|
|
1663
|
+
const t = Vt(e);
|
|
1662
1664
|
return typeof e == "string" && e === t ? t : void 0;
|
|
1663
1665
|
}
|
|
1664
|
-
function
|
|
1666
|
+
function An(e) {
|
|
1665
1667
|
if (e.type !== "enum" || e.source.kind !== "manual")
|
|
1666
1668
|
return { diagnostic: "invalid_control_type" };
|
|
1667
1669
|
const t = e.source.options.map(
|
|
1668
|
-
(n) =>
|
|
1670
|
+
(n) => kt(n.value)
|
|
1669
1671
|
);
|
|
1670
1672
|
if (t.length === 0 || t.some((n) => !n))
|
|
1671
1673
|
return { diagnostic: "invalid_currency_option" };
|
|
1672
1674
|
if (e.requiredAtExecution) {
|
|
1673
|
-
const n = e.initialValueStrategy === "saved_default" ?
|
|
1675
|
+
const n = e.initialValueStrategy === "saved_default" ? kt(e.defaultValue) : void 0;
|
|
1674
1676
|
if (!n || !t.includes(n))
|
|
1675
1677
|
return { diagnostic: "invalid_control_default" };
|
|
1676
1678
|
}
|
|
@@ -1680,9 +1682,9 @@ function En(e) {
|
|
|
1680
1682
|
};
|
|
1681
1683
|
}
|
|
1682
1684
|
function uc(e) {
|
|
1683
|
-
return "control" in
|
|
1685
|
+
return "control" in An(e);
|
|
1684
1686
|
}
|
|
1685
|
-
function
|
|
1687
|
+
function En(e) {
|
|
1686
1688
|
const t = $o(e.dashboard);
|
|
1687
1689
|
if (t.size === 0)
|
|
1688
1690
|
return {
|
|
@@ -1706,10 +1708,10 @@ function wn(e) {
|
|
|
1706
1708
|
};
|
|
1707
1709
|
}
|
|
1708
1710
|
function dc(e) {
|
|
1709
|
-
return
|
|
1711
|
+
return En({
|
|
1710
1712
|
...e,
|
|
1711
1713
|
referencedControlIds: new Set(
|
|
1712
|
-
|
|
1714
|
+
pn({
|
|
1713
1715
|
sql: e.filterSql,
|
|
1714
1716
|
controlBindings: []
|
|
1715
1717
|
})
|
|
@@ -1718,17 +1720,17 @@ function dc(e) {
|
|
|
1718
1720
|
}
|
|
1719
1721
|
function fc(e) {
|
|
1720
1722
|
var t;
|
|
1721
|
-
return
|
|
1723
|
+
return En({
|
|
1722
1724
|
...e,
|
|
1723
1725
|
referencedControlIds: new Set(
|
|
1724
|
-
|
|
1726
|
+
pn({
|
|
1725
1727
|
sql: (t = e.source) == null ? void 0 : t.sql,
|
|
1726
1728
|
controlBindings: []
|
|
1727
1729
|
})
|
|
1728
1730
|
)
|
|
1729
1731
|
});
|
|
1730
1732
|
}
|
|
1731
|
-
function
|
|
1733
|
+
function wn(e) {
|
|
1732
1734
|
return {
|
|
1733
1735
|
knownKeys: new Set(
|
|
1734
1736
|
e.knownTargets.map(Y)
|
|
@@ -1768,7 +1770,7 @@ function _n(e, t) {
|
|
|
1768
1770
|
return {
|
|
1769
1771
|
diagnostic: { code: "missing_control", controlId: i }
|
|
1770
1772
|
};
|
|
1771
|
-
const s =
|
|
1773
|
+
const s = An(a);
|
|
1772
1774
|
return "diagnostic" in s ? {
|
|
1773
1775
|
diagnostic: { code: s.diagnostic, controlId: i }
|
|
1774
1776
|
} : {
|
|
@@ -1781,7 +1783,7 @@ function _n(e, t) {
|
|
|
1781
1783
|
};
|
|
1782
1784
|
}
|
|
1783
1785
|
function pc(e) {
|
|
1784
|
-
const t =
|
|
1786
|
+
const t = wn(e);
|
|
1785
1787
|
return (e.bindings || []).flatMap((n) => {
|
|
1786
1788
|
const i = _n(n, t);
|
|
1787
1789
|
return "diagnostic" in i ? [i.diagnostic] : [];
|
|
@@ -1789,7 +1791,7 @@ function pc(e) {
|
|
|
1789
1791
|
}
|
|
1790
1792
|
function Wo(e) {
|
|
1791
1793
|
var r;
|
|
1792
|
-
const t = [], n = Y(e.target), i =
|
|
1794
|
+
const t = [], n = Y(e.target), i = wn(e);
|
|
1793
1795
|
for (const o of e.bindings || []) {
|
|
1794
1796
|
const a = _n(o, i);
|
|
1795
1797
|
if ("diagnostic" in a) {
|
|
@@ -1800,7 +1802,7 @@ function Wo(e) {
|
|
|
1800
1802
|
if (!s || Y(
|
|
1801
1803
|
s.presentationTarget
|
|
1802
1804
|
) !== n) continue;
|
|
1803
|
-
const u =
|
|
1805
|
+
const u = Vt(
|
|
1804
1806
|
(r = e.values) == null ? void 0 : r[s.control.id]
|
|
1805
1807
|
);
|
|
1806
1808
|
if (!(!u || !s.currencies.includes(u)))
|
|
@@ -1809,7 +1811,7 @@ function Wo(e) {
|
|
|
1809
1811
|
return { diagnostics: t };
|
|
1810
1812
|
}
|
|
1811
1813
|
function mc(e, t, n, i) {
|
|
1812
|
-
const r = { ...e, config: { ...e.config, matrix: t } }, o = Go(r, [], i), a =
|
|
1814
|
+
const r = { ...e, config: { ...e.config, matrix: t } }, o = Go(r, [], i), a = Mn(r, i), s = { ...t.presentation.measureFormats };
|
|
1813
1815
|
for (const l of a) {
|
|
1814
1816
|
const u = { kind: "matrix_measure", measureId: l.measureId }, { currency: c } = Wo({
|
|
1815
1817
|
...n,
|
|
@@ -1912,29 +1914,29 @@ function Jo(e, t) {
|
|
|
1912
1914
|
)
|
|
1913
1915
|
};
|
|
1914
1916
|
}
|
|
1915
|
-
function
|
|
1917
|
+
function Mt(e = [], t) {
|
|
1916
1918
|
return [...e].map((n) => Yo(n, t)).sort(
|
|
1917
1919
|
(n, i) => n.id.localeCompare(i.id) || n.scope.localeCompare(i.scope) || n.type.localeCompare(i.type)
|
|
1918
1920
|
);
|
|
1919
1921
|
}
|
|
1920
1922
|
function Xo(e = [], t) {
|
|
1921
1923
|
return e.filter(
|
|
1922
|
-
(n) => (t == null ? void 0 : t.includePresentation) ||
|
|
1924
|
+
(n) => (t == null ? void 0 : t.includePresentation) || !zt(n)
|
|
1923
1925
|
).map((n) => Jo(n, t)).sort(
|
|
1924
1926
|
(n, i) => B(n).localeCompare(B(i))
|
|
1925
1927
|
);
|
|
1926
1928
|
}
|
|
1927
1929
|
function Zo(e, t) {
|
|
1928
1930
|
return e ? B({
|
|
1929
|
-
controlDefinitions:
|
|
1930
|
-
cardControlDefinitions:
|
|
1931
|
+
controlDefinitions: Mt(e.controlDefinitions, t),
|
|
1932
|
+
cardControlDefinitions: Mt(
|
|
1931
1933
|
e.cardControlDefinitions,
|
|
1932
1934
|
t
|
|
1933
1935
|
),
|
|
1934
1936
|
controlBindings: Xo(e.controlBindings, t)
|
|
1935
1937
|
}) : "__none__";
|
|
1936
1938
|
}
|
|
1937
|
-
const ea = ["table", "detailTable"],
|
|
1939
|
+
const ea = ["table", "detailTable"], At = (e) => ea.includes(e.type), ta = "calendar-context";
|
|
1938
1940
|
function na(e) {
|
|
1939
1941
|
const { id: t, label: n, field: i, ...r } = e;
|
|
1940
1942
|
return {
|
|
@@ -1992,7 +1994,7 @@ function ia(e) {
|
|
|
1992
1994
|
function ra(e, t, n) {
|
|
1993
1995
|
if (!e)
|
|
1994
1996
|
return JSON.stringify(e);
|
|
1995
|
-
if (n === "matrixTable" && e.matrix) return B(
|
|
1997
|
+
if (n === "matrixTable" && e.matrix) return B(Sr(e.matrix.spec));
|
|
1996
1998
|
const { matrix: i, ...r } = e, o = t ? ia(r) : r;
|
|
1997
1999
|
return JSON.stringify({
|
|
1998
2000
|
...o,
|
|
@@ -2036,11 +2038,11 @@ function sa(e, {
|
|
|
2036
2038
|
const { filterColumns: p, ...y } = e.queryConfig || {}, f = p == null ? void 0 : p.filter(
|
|
2037
2039
|
(v) => {
|
|
2038
2040
|
var E, D;
|
|
2039
|
-
return (D = (E = e.queryConfig) == null ? void 0 : E.filters) == null ? void 0 : D.some((
|
|
2041
|
+
return (D = (E = e.queryConfig) == null ? void 0 : E.filters) == null ? void 0 : D.some((_) => _.filterColumnName === v.name);
|
|
2040
2042
|
}
|
|
2041
|
-
), m = (e == null ? void 0 : e.sql) || "", d =
|
|
2043
|
+
), m = (e == null ? void 0 : e.sql) || "", d = xi((e == null ? void 0 : e.python) || ""), g = e.type === "pivotTable" ? "pivotTable" : ["table", "aggregateTable", "detailTable", "matrixTable"].includes(
|
|
2042
2044
|
e.type
|
|
2043
|
-
) ? "table" : e.type === "kpi" ? "kpi" : "chart", h = s ||
|
|
2045
|
+
) ? "table" : e.type === "kpi" ? "kpi" : "chart", h = s || No(e.config, { cardType: e.type }), C = Di.includes(
|
|
2044
2046
|
e.type
|
|
2045
2047
|
);
|
|
2046
2048
|
return [
|
|
@@ -2077,7 +2079,7 @@ function sa(e, {
|
|
|
2077
2079
|
}
|
|
2078
2080
|
function la(e, t, n) {
|
|
2079
2081
|
var s, l, u;
|
|
2080
|
-
const i = sa(e, t), r = B(i), o = ((s = n == null ? void 0 : n.resolvePaginationConfig) == null ? void 0 : s.call(n, r)) ?? e.paginationConfig, a =
|
|
2082
|
+
const i = sa(e, t), r = B(i), o = ((s = n == null ? void 0 : n.resolvePaginationConfig) == null ? void 0 : s.call(n, r)) ?? e.paginationConfig, a = At(e) && $t(e.config) || At(e) && e.sql && ((u = (l = e.preferences) == null ? void 0 : l.tablePrefs) == null ? void 0 : u.enableDevModePagination);
|
|
2081
2083
|
return {
|
|
2082
2084
|
queryKey: [
|
|
2083
2085
|
...i,
|
|
@@ -2105,7 +2107,7 @@ function yc(e, t, n, i) {
|
|
|
2105
2107
|
i
|
|
2106
2108
|
);
|
|
2107
2109
|
}
|
|
2108
|
-
function
|
|
2110
|
+
function Nn(e) {
|
|
2109
2111
|
const t = {
|
|
2110
2112
|
...Ge,
|
|
2111
2113
|
...e.presentation
|
|
@@ -2115,7 +2117,7 @@ function Bn(e) {
|
|
|
2115
2117
|
deltaColumnKeys: o,
|
|
2116
2118
|
percentChangeColumnKeys: a,
|
|
2117
2119
|
ratioColumnKeys: s
|
|
2118
|
-
} =
|
|
2120
|
+
} = vn(e.comparisonMetadata), l = /* @__PURE__ */ new Set();
|
|
2119
2121
|
t.showComparison && (n === "difference" || n === "both") && o.forEach((y) => l.add(y)), t.showComparison && (n === "percent_change" || n === "both") && a.forEach((y) => l.add(y)), t.showComparison && n === "ratio" && s.forEach((y) => l.add(y));
|
|
2120
2122
|
const u = new Set(i);
|
|
2121
2123
|
t.showComparison || r.forEach((y) => u.add(y)), [o, a, s].forEach(
|
|
@@ -2170,7 +2172,7 @@ function Bn(e) {
|
|
|
2170
2172
|
}
|
|
2171
2173
|
function gc(e) {
|
|
2172
2174
|
var t, n;
|
|
2173
|
-
return
|
|
2175
|
+
return Nn({
|
|
2174
2176
|
comparisonMetadata: e.comparisonMetadata,
|
|
2175
2177
|
presentation: (n = (t = e.card) == null ? void 0 : t.preferences) == null ? void 0 : n.comparisonPresentation,
|
|
2176
2178
|
resolveMetricName: ({ metricId: i, metricAlias: r }) => {
|
|
@@ -2211,7 +2213,7 @@ function tt(e, t) {
|
|
|
2211
2213
|
metricAlias: R(e)
|
|
2212
2214
|
} : { kind: "dimension", role: t, fieldId: e.id };
|
|
2213
2215
|
}
|
|
2214
|
-
function
|
|
2216
|
+
function Et(e) {
|
|
2215
2217
|
const t = /* @__PURE__ */ new Map();
|
|
2216
2218
|
for (const n of e) t.set(n, (t.get(n) ?? 0) + 1);
|
|
2217
2219
|
return t;
|
|
@@ -2231,7 +2233,7 @@ function ca(e, t) {
|
|
|
2231
2233
|
}
|
|
2232
2234
|
] : [];
|
|
2233
2235
|
})
|
|
2234
|
-
), a =
|
|
2236
|
+
), a = Et(o.map((f) => f.columnId)), s = Et(
|
|
2235
2237
|
o.flatMap(
|
|
2236
2238
|
(f) => f.outputKey ? [f.outputKey] : []
|
|
2237
2239
|
)
|
|
@@ -2246,7 +2248,7 @@ function ca(e, t) {
|
|
|
2246
2248
|
baseKey: m,
|
|
2247
2249
|
// Today's header for the column's own key; a metric shown only as pivot
|
|
2248
2250
|
// members is named by its field.
|
|
2249
|
-
authorLabel: m ?
|
|
2251
|
+
authorLabel: m ? Fn(m, e, r) ?? m : f.field.label || f.field.name || f.columnId
|
|
2250
2252
|
}), m && u.set(m, { columnId: f.columnId, part: "base" });
|
|
2251
2253
|
}
|
|
2252
2254
|
const c = e.config;
|
|
@@ -2329,12 +2331,12 @@ function fa(e, t, n, i) {
|
|
|
2329
2331
|
let r = [...t.keys], o = /* @__PURE__ */ new Map();
|
|
2330
2332
|
const a = t.comparisonMetadata;
|
|
2331
2333
|
if (n === "screen") {
|
|
2332
|
-
const y =
|
|
2334
|
+
const y = vn(a);
|
|
2333
2335
|
r = r.filter((m) => !y.internalKeys.has(m));
|
|
2334
2336
|
const f = e.type === "table" ? (l = e.preferences) == null ? void 0 : l.comparisonPresentation : void 0;
|
|
2335
2337
|
Ye(f) || (r = r.filter((m) => !y.comparisonColumnKeys.has(m)));
|
|
2336
2338
|
} else {
|
|
2337
|
-
const y =
|
|
2339
|
+
const y = Nn({
|
|
2338
2340
|
comparisonMetadata: a,
|
|
2339
2341
|
presentation: (u = e.preferences) == null ? void 0 : u.comparisonPresentation,
|
|
2340
2342
|
resolveMetricName: i
|
|
@@ -2359,7 +2361,7 @@ function pa(e, t, n) {
|
|
|
2359
2361
|
if (e.type !== "table" || !Ye((r = e.preferences) == null ? void 0 : r.comparisonPresentation))
|
|
2360
2362
|
return i;
|
|
2361
2363
|
for (const a of ((o = e.config) == null ? void 0 : o.metricColumns) ?? []) {
|
|
2362
|
-
const { comparisonKind: s, metadata: l } =
|
|
2364
|
+
const { comparisonKind: s, metadata: l } = Cn(
|
|
2363
2365
|
t.comparisonMetadata,
|
|
2364
2366
|
a
|
|
2365
2367
|
);
|
|
@@ -2369,7 +2371,7 @@ function pa(e, t, n) {
|
|
|
2369
2371
|
[...n],
|
|
2370
2372
|
t.columnKeyMap
|
|
2371
2373
|
)) continue;
|
|
2372
|
-
const c =
|
|
2374
|
+
const c = Tn(
|
|
2373
2375
|
a.label || a.name,
|
|
2374
2376
|
s,
|
|
2375
2377
|
l
|
|
@@ -2389,7 +2391,7 @@ function ya(e, t, n) {
|
|
|
2389
2391
|
if (!t.length) return [];
|
|
2390
2392
|
const i = ma(e), r = [], o = /* @__PURE__ */ new Set();
|
|
2391
2393
|
for (const a of t) {
|
|
2392
|
-
const s =
|
|
2394
|
+
const s = xr(i, a);
|
|
2393
2395
|
if (!s) continue;
|
|
2394
2396
|
const l = i[s.group], u = tt(l.fields[s.index], l.role);
|
|
2395
2397
|
if (!u) continue;
|
|
@@ -2404,12 +2406,12 @@ function ya(e, t, n) {
|
|
|
2404
2406
|
function ga(e, t) {
|
|
2405
2407
|
return e ? "query" : t === "server" ? "page-only" : "browser";
|
|
2406
2408
|
}
|
|
2407
|
-
function
|
|
2409
|
+
function Bn(e, t) {
|
|
2408
2410
|
var n, i, r;
|
|
2409
2411
|
return !!t && ((r = (i = (n = e.preferences) == null ? void 0 : n.tablePrefs) == null ? void 0 : i.columnVisibility) == null ? void 0 : r[t]) === !1;
|
|
2410
2412
|
}
|
|
2411
2413
|
function ba(e) {
|
|
2412
|
-
return e.type !== "table" && e.type !== "detailTable" ? "card-type" :
|
|
2414
|
+
return e.type !== "table" && e.type !== "detailTable" ? "card-type" : or(e) ? void 0 : "author-disabled";
|
|
2413
2415
|
}
|
|
2414
2416
|
function Pe(e, t) {
|
|
2415
2417
|
const n = [], i = /* @__PURE__ */ new Map();
|
|
@@ -2476,7 +2478,7 @@ function Ic(e) {
|
|
|
2476
2478
|
return t;
|
|
2477
2479
|
}
|
|
2478
2480
|
function Cc(e) {
|
|
2479
|
-
const t =
|
|
2481
|
+
const t = on(e);
|
|
2480
2482
|
return (t == null ? void 0 : t.kind) === "metric" && t.metricId === Ue;
|
|
2481
2483
|
}
|
|
2482
2484
|
function vc(e) {
|
|
@@ -2493,7 +2495,7 @@ function vc(e) {
|
|
|
2493
2495
|
const T = p(b);
|
|
2494
2496
|
return c(u.entries.has(T) ? T : void 0) ?? ((x = u.entries.get(T)) == null ? void 0 : x.authorLabel);
|
|
2495
2497
|
}
|
|
2496
|
-
), m = (b) =>
|
|
2498
|
+
), m = (b) => Bn(t, b), d = (b) => {
|
|
2497
2499
|
const T = u.owners.get(b);
|
|
2498
2500
|
if (!T || o === "card-type") return;
|
|
2499
2501
|
const x = u.entries.get(T.columnId);
|
|
@@ -2510,7 +2512,7 @@ function vc(e) {
|
|
|
2510
2512
|
...(a == null ? void 0 : a.hidden) ?? [],
|
|
2511
2513
|
...Object.keys((a == null ? void 0 : a.labels) ?? {}),
|
|
2512
2514
|
...((a == null ? void 0 : a.sort) ?? []).map((b) => b.columnId)
|
|
2513
|
-
],
|
|
2515
|
+
], _ = [
|
|
2514
2516
|
...new Set(D.filter((b) => !v.has(b)))
|
|
2515
2517
|
];
|
|
2516
2518
|
let I;
|
|
@@ -2520,7 +2522,7 @@ function vc(e) {
|
|
|
2520
2522
|
);
|
|
2521
2523
|
I = b.length || !a.sort.length ? b : void 0;
|
|
2522
2524
|
}
|
|
2523
|
-
const S =
|
|
2525
|
+
const S = rr(
|
|
2524
2526
|
a ? {
|
|
2525
2527
|
order: (pt = a.order) == null ? void 0 : pt.filter(
|
|
2526
2528
|
(b) => v.has(b)
|
|
@@ -2535,7 +2537,7 @@ function vc(e) {
|
|
|
2535
2537
|
),
|
|
2536
2538
|
sort: I
|
|
2537
2539
|
} : void 0
|
|
2538
|
-
), F = S == null ? void 0 : S.order, k = F ? Ia(g, d, F, n.columns) : g,
|
|
2540
|
+
), F = S == null ? void 0 : S.order, k = F ? Ia(g, d, F, n.columns) : g, N = F ? [...k, ...y.filter(m)] : y, M = Pe(k, d).flatMap(
|
|
2539
2541
|
(b) => b.columnId ? [b.columnId] : []
|
|
2540
2542
|
), A = new Set((S == null ? void 0 : S.hidden) ?? []);
|
|
2541
2543
|
M.length && M.every((b) => A.has(b)) && A.delete(M[0]);
|
|
@@ -2559,8 +2561,8 @@ function vc(e) {
|
|
|
2559
2561
|
// as dates (its temporal activation covers group columns only).
|
|
2560
2562
|
metricLabelOverride: (T == null ? void 0 : T.part) === "pivot-member" ? x : void 0
|
|
2561
2563
|
});
|
|
2562
|
-
return te || (
|
|
2563
|
-
}, G =
|
|
2564
|
+
return te || (Fn(b, t, l) ?? b);
|
|
2565
|
+
}, G = N.map((b) => {
|
|
2564
2566
|
var x;
|
|
2565
2567
|
const T = d(b);
|
|
2566
2568
|
return {
|
|
@@ -2572,9 +2574,9 @@ function vc(e) {
|
|
|
2572
2574
|
};
|
|
2573
2575
|
}), me = Object.fromEntries(
|
|
2574
2576
|
G.map((b) => [b.outputKey, b.label])
|
|
2575
|
-
), ct = s === "page-only" ? [] : s === "query" ? E : (S == null ? void 0 : S.sort) ?? [],
|
|
2577
|
+
), ct = s === "page-only" ? [] : s === "query" ? E : (S == null ? void 0 : S.sort) ?? [], di = new Map(
|
|
2576
2578
|
ct.map((b) => [b.columnId, b.direction])
|
|
2577
|
-
),
|
|
2579
|
+
), fi = ct.flatMap((b) => {
|
|
2578
2580
|
var x;
|
|
2579
2581
|
const T = (x = u.entries.get(b.columnId)) == null ? void 0 : x.baseKey;
|
|
2580
2582
|
return T && g.includes(T) ? [{ outputKey: T, desc: b.direction === "desc" }] : [];
|
|
@@ -2592,7 +2594,7 @@ function vc(e) {
|
|
|
2592
2594
|
available: !0,
|
|
2593
2595
|
canReset: ut,
|
|
2594
2596
|
items: M.map((x) => {
|
|
2595
|
-
const V = u.entries.get(x), ee = A.has(x), te =
|
|
2597
|
+
const V = u.entries.get(x), ee = A.has(x), te = di.get(x);
|
|
2596
2598
|
return {
|
|
2597
2599
|
columnId: x,
|
|
2598
2600
|
label: c(x) ?? V.authorLabel,
|
|
@@ -2610,10 +2612,10 @@ function vc(e) {
|
|
|
2610
2612
|
visibleKeys: G.filter((b) => b.visible).map((b) => b.outputKey),
|
|
2611
2613
|
labels: me,
|
|
2612
2614
|
sortMode: s,
|
|
2613
|
-
clientSort:
|
|
2615
|
+
clientSort: fi,
|
|
2614
2616
|
panel: ye,
|
|
2615
2617
|
...S ? { settings: S } : {},
|
|
2616
|
-
dropped:
|
|
2618
|
+
dropped: _,
|
|
2617
2619
|
isCustomized: ut,
|
|
2618
2620
|
canSort: o !== "card-type" && s !== "page-only",
|
|
2619
2621
|
author: { order: C }
|
|
@@ -2621,10 +2623,10 @@ function vc(e) {
|
|
|
2621
2623
|
}
|
|
2622
2624
|
function Tc(e, t) {
|
|
2623
2625
|
var n;
|
|
2624
|
-
return (n =
|
|
2626
|
+
return (n = Pn(e, t)) == null ? void 0 : n.field;
|
|
2625
2627
|
}
|
|
2626
|
-
function
|
|
2627
|
-
const n =
|
|
2628
|
+
function Pn(e, t) {
|
|
2629
|
+
const n = on(t), i = e.config;
|
|
2628
2630
|
if (!n || !i) return;
|
|
2629
2631
|
let r = [], o;
|
|
2630
2632
|
if (n.kind === "dimension")
|
|
@@ -2642,10 +2644,10 @@ function Fc(e, t) {
|
|
|
2642
2644
|
if (!n || !e.config || e.type !== "table" && e.type !== "detailTable" || ce(e) !== "config")
|
|
2643
2645
|
return e.config;
|
|
2644
2646
|
const i = n.flatMap((r) => {
|
|
2645
|
-
const o =
|
|
2647
|
+
const o = Pn(e, r.columnId);
|
|
2646
2648
|
if (!o) return [];
|
|
2647
|
-
const a =
|
|
2648
|
-
return
|
|
2649
|
+
const a = Dr(o.field, o.role);
|
|
2650
|
+
return Bn(e, a) ? [] : [
|
|
2649
2651
|
{
|
|
2650
2652
|
...o.field,
|
|
2651
2653
|
alias: a,
|
|
@@ -2710,15 +2712,15 @@ function it(e) {
|
|
|
2710
2712
|
var t;
|
|
2711
2713
|
return e.type === "table" && !((t = e.sql) != null && t.trim()) && !!e.config;
|
|
2712
2714
|
}
|
|
2713
|
-
function
|
|
2715
|
+
function Kn(e) {
|
|
2714
2716
|
var t, n, i, r;
|
|
2715
2717
|
return ((r = (i = (n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.tableStyle) == null ? void 0 : i.totals) == null ? void 0 : r.enabled) === !0;
|
|
2716
2718
|
}
|
|
2717
|
-
function
|
|
2718
|
-
return it(e) ?
|
|
2719
|
+
function On(e) {
|
|
2720
|
+
return it(e) ? Kn(e) : !1;
|
|
2719
2721
|
}
|
|
2720
2722
|
function va(e, t, n) {
|
|
2721
|
-
if (!
|
|
2723
|
+
if (!On(e))
|
|
2722
2724
|
return;
|
|
2723
2725
|
const i = nt(e, n).filter((r) => r.role !== "metric").map((r) => new Set(fe(r)));
|
|
2724
2726
|
return t.find(
|
|
@@ -2731,7 +2733,7 @@ function Dc({
|
|
|
2731
2733
|
visibleColumnIds: n,
|
|
2732
2734
|
totalsByColumnId: i
|
|
2733
2735
|
}) {
|
|
2734
|
-
if (!
|
|
2736
|
+
if (!On(e) || !i || Object.keys(i).length === 0)
|
|
2735
2737
|
return;
|
|
2736
2738
|
const r = va(
|
|
2737
2739
|
e,
|
|
@@ -2767,10 +2769,10 @@ function kc(e) {
|
|
|
2767
2769
|
} : e;
|
|
2768
2770
|
}
|
|
2769
2771
|
function Ta(e, t, n) {
|
|
2770
|
-
if (!it(e) || !
|
|
2772
|
+
if (!it(e) || !Kn(e))
|
|
2771
2773
|
return;
|
|
2772
2774
|
const i = nt(e, t), r = new Set(
|
|
2773
|
-
|
|
2775
|
+
Fr(
|
|
2774
2776
|
i.filter((l) => l.role === "metric")
|
|
2775
2777
|
)
|
|
2776
2778
|
), o = i.filter((l) => l.role !== "metric"), a = n && o.find(
|
|
@@ -2839,7 +2841,7 @@ function Da({
|
|
|
2839
2841
|
documentTableDataPolicy: r
|
|
2840
2842
|
}) {
|
|
2841
2843
|
var u, c;
|
|
2842
|
-
const o = i && r !== void 0 && Ke(e), a = t && !o || e.type === "pivotTable" && n, s =
|
|
2844
|
+
const o = i && r !== void 0 && Ke(e), a = t && !o || e.type === "pivotTable" && n, s = $t(e.config) && Ke(e) && !e.sql, l = o ? xa(e) : !!(e.sql && ((c = (u = e.preferences) == null ? void 0 : u.tablePrefs) != null && c.enableDevModePagination));
|
|
2843
2845
|
return !a && (s || l);
|
|
2844
2846
|
}
|
|
2845
2847
|
function ka(e) {
|
|
@@ -2859,10 +2861,10 @@ function wc({
|
|
|
2859
2861
|
pageSize: (e == null ? void 0 : e.pageSize) ?? t
|
|
2860
2862
|
};
|
|
2861
2863
|
}
|
|
2862
|
-
function
|
|
2864
|
+
function _c(e, t, n) {
|
|
2863
2865
|
return (e == null ? void 0 : e.queryInputIdentity) === n && e.page === t.page && e.pageSize === t.pageSize;
|
|
2864
2866
|
}
|
|
2865
|
-
function
|
|
2867
|
+
function Nc(e, t) {
|
|
2866
2868
|
return !e || !t || e.page === t.page && e.pageSize === t.pageSize ? e : {
|
|
2867
2869
|
...e,
|
|
2868
2870
|
page: t.page,
|
|
@@ -2881,10 +2883,10 @@ function Pc(e) {
|
|
|
2881
2883
|
isPrintDisplayMode: ((s = e.display) == null ? void 0 : s.isPrintDisplayMode) ?? !1,
|
|
2882
2884
|
isDocumentSectionRuntime: !!e.documentSection,
|
|
2883
2885
|
documentTableDataPolicy: (l = e.documentSection) == null ? void 0 : l.documentTableDataPolicy
|
|
2884
|
-
}), { page: i } = e, r = e.tableTotalsRequest ?? (e.documentSection ? void 0 : Ta(t, e.finalConfig)), o = !!((u = e.display) != null && u.deliveryStrict && e.display.isTablePrintMode && !e.documentSection &&
|
|
2886
|
+
}), { page: i } = e, r = e.tableTotalsRequest ?? (e.documentSection ? void 0 : Ta(t, e.finalConfig)), o = !!((u = e.display) != null && u.deliveryStrict && e.display.isTablePrintMode && !e.documentSection && Br(t.type));
|
|
2885
2887
|
return {
|
|
2886
2888
|
...r ? { tableTotalsRequest: r } : {},
|
|
2887
|
-
...o ? { sourceRowProbe: { limit:
|
|
2889
|
+
...o ? { sourceRowProbe: { limit: Pr.maxRows } } : {},
|
|
2888
2890
|
...n ? {
|
|
2889
2891
|
pagination: {
|
|
2890
2892
|
page: (i == null ? void 0 : i.page) || 1,
|
|
@@ -2934,7 +2936,7 @@ const Ea = /* @__PURE__ */ new Set([
|
|
|
2934
2936
|
]);
|
|
2935
2937
|
function Oc(e) {
|
|
2936
2938
|
let t = e.spec;
|
|
2937
|
-
const n =
|
|
2939
|
+
const n = Ut(
|
|
2938
2940
|
e.controlDefinitions || [],
|
|
2939
2941
|
e.cardControlDefinitions || []
|
|
2940
2942
|
), i = (e.controlBindings || []).filter(
|
|
@@ -2955,7 +2957,7 @@ function Oc(e) {
|
|
|
2955
2957
|
return l = { refs: d, byId: g }, l;
|
|
2956
2958
|
}, c = (d, g) => {
|
|
2957
2959
|
throw new _i(d, {
|
|
2958
|
-
code:
|
|
2960
|
+
code: Ni,
|
|
2959
2961
|
...g ? { controlId: g } : {}
|
|
2960
2962
|
});
|
|
2961
2963
|
}, p = (d, g) => {
|
|
@@ -2963,11 +2965,11 @@ function Oc(e) {
|
|
|
2963
2965
|
if (d.derivedField) return d.derivedField.dataType;
|
|
2964
2966
|
const h = u().refs.filter((v) => v.field.name === d.name && ae(v.field.source ?? e.spec.source, d.source ?? e.spec.source));
|
|
2965
2967
|
return h.length > 1 ? c("The selected field is ambiguous in the authorized Matrix field catalog.", g) : J(((C = h[0]) == null ? void 0 : C.field.dataType) ?? d.dataType);
|
|
2966
|
-
}, y = (d, g) =>
|
|
2968
|
+
}, y = (d, g) => ki(d, g.target, (h) => p(h, g.controlId)), f = cr.safeParse(t);
|
|
2967
2969
|
if (!f.success) return c(f.error.message);
|
|
2968
2970
|
t = f.data;
|
|
2969
2971
|
const m = [...r, ...o].map((d) => {
|
|
2970
|
-
const g =
|
|
2972
|
+
const g = Gt({ binding: d, definitions: n, controlValues: e.controlValues }), h = !d.matrixTargetId && g !== void 0 && g !== we ? y(f.data, d) : [];
|
|
2971
2973
|
return {
|
|
2972
2974
|
binding: d,
|
|
2973
2975
|
selectedValue: g,
|
|
@@ -2981,11 +2983,11 @@ function Oc(e) {
|
|
|
2981
2983
|
(!g || !E.some((F) => F.id === g)) && C("Choose a valid Matrix level or measure target for this control.");
|
|
2982
2984
|
const D = `${d.target}:${g}`;
|
|
2983
2985
|
a.has(D) && C("Multiple controls cannot replace the same Matrix target."), a.add(D);
|
|
2984
|
-
const
|
|
2986
|
+
const _ = (F) => {
|
|
2985
2987
|
const k = (u().byId.get(F.id) ?? []).filter((M) => !F.source || ae(F.source, M.field.source ?? e.spec.source));
|
|
2986
2988
|
if (k.length !== 1) return C(k.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
|
|
2987
|
-
const
|
|
2988
|
-
return
|
|
2989
|
+
const N = dr.safeParse(k[0].field);
|
|
2990
|
+
return N.success ? N.data : C(N.error.message);
|
|
2989
2991
|
}, I = d.target === "config_metric_selector" || d.target === "config_field_selector" ? d.mapping[h] : void 0, S = I && typeof I == "object" && "kind" in I && I.kind === "matrix_instance" ? I.id : void 0;
|
|
2990
2992
|
if (v) {
|
|
2991
2993
|
s.set(g, d.controlId);
|
|
@@ -2993,13 +2995,13 @@ function Oc(e) {
|
|
|
2993
2995
|
(A) => A.id === S && A.kind === "aggregate"
|
|
2994
2996
|
);
|
|
2995
2997
|
S !== void 0 && !F && C("The selected Matrix aggregate measure is no longer available.");
|
|
2996
|
-
const k = d.target === "config_metric_selector" && !F ?
|
|
2998
|
+
const k = d.target === "config_metric_selector" && !F ? Mi({ binding: d, selectedValue: h }) : void 0, N = ((F == null ? void 0 : F.kind) === "aggregate" ? F.aggregate : k == null ? void 0 : k.aggregate) ?? (d.target === "config_aggregation" ? yt({ binding: d, selectedValue: h }) : void 0), M = N === void 0 ? void 0 : ur.safeParse(N);
|
|
2997
2999
|
M && !M.success && C("This aggregation is not supported by Matrix."), t = {
|
|
2998
3000
|
...t,
|
|
2999
3001
|
measures: t.measures.map(
|
|
3000
3002
|
(A) => A.id !== g || A.kind !== "aggregate" ? A : {
|
|
3001
3003
|
...A,
|
|
3002
|
-
...k ? { field:
|
|
3004
|
+
...k ? { field: _(k) } : {},
|
|
3003
3005
|
...(F == null ? void 0 : F.kind) === "aggregate" ? { field: F.field } : {},
|
|
3004
3006
|
aggregate: M != null && M.success ? M.data : A.aggregate
|
|
3005
3007
|
}
|
|
@@ -3010,11 +3012,11 @@ function Oc(e) {
|
|
|
3010
3012
|
(A) => A.id === S
|
|
3011
3013
|
);
|
|
3012
3014
|
S !== void 0 && !F && C("The selected Matrix level is no longer available.");
|
|
3013
|
-
const k = d.target === "config_field_selector" && !F ?
|
|
3014
|
-
|
|
3015
|
+
const k = d.target === "config_field_selector" && !F ? Ai({ binding: d, selectedValue: h }) : void 0, N = d.target === "config_grain" ? yt({ binding: d, selectedValue: h }) : F ? F.grain : k == null ? void 0 : k.granularity;
|
|
3016
|
+
N !== void 0 && !Ea.has(N) && C("This time grain is not supported by Matrix.");
|
|
3015
3017
|
const M = (A) => A.map((q) => {
|
|
3016
3018
|
if (q.id !== g) return q;
|
|
3017
|
-
const pe = (F == null ? void 0 : F.field) ?? (k ?
|
|
3019
|
+
const pe = (F == null ? void 0 : F.field) ?? (k ? _(k) : q.field), G = p(pe, d.controlId), me = N ?? (k && ht(G) ? q.grain : void 0);
|
|
3018
3020
|
return me && !ht(G) && C("A time grain requires a temporal Matrix level."), { ...q, field: pe, grain: me };
|
|
3019
3021
|
});
|
|
3020
3022
|
t = {
|
|
@@ -3028,19 +3030,19 @@ function Oc(e) {
|
|
|
3028
3030
|
const h = t.measures.find((v) => v.id === d);
|
|
3029
3031
|
if (!h || h.kind !== "aggregate") continue;
|
|
3030
3032
|
const C = p(h.field, g);
|
|
3031
|
-
|
|
3033
|
+
Ei(C).some((v) => v.value === h.aggregate) || c(`Aggregation '${h.aggregate}' is not eligible for this Matrix field datatype.`, g);
|
|
3032
3034
|
}
|
|
3033
3035
|
try {
|
|
3034
|
-
return
|
|
3036
|
+
return wi(f.data, t);
|
|
3035
3037
|
} catch (d) {
|
|
3036
|
-
if (d instanceof
|
|
3038
|
+
if (d instanceof br) return c(d.message);
|
|
3037
3039
|
throw d;
|
|
3038
3040
|
}
|
|
3039
3041
|
}
|
|
3040
|
-
function
|
|
3042
|
+
function Rn(e, t) {
|
|
3041
3043
|
const n = [], i = (r) => {
|
|
3042
3044
|
if (r.source) {
|
|
3043
|
-
const o =
|
|
3045
|
+
const o = fr.safeParse(r.source);
|
|
3044
3046
|
if (o.success) n.push(o.data);
|
|
3045
3047
|
else if (t) throw o.error;
|
|
3046
3048
|
}
|
|
@@ -3055,14 +3057,14 @@ function qn(e, t) {
|
|
|
3055
3057
|
return n;
|
|
3056
3058
|
}
|
|
3057
3059
|
function Rc(e, t = [], n = []) {
|
|
3058
|
-
return
|
|
3060
|
+
return cn([...dn(e), ...Rn(t), ...n]);
|
|
3059
3061
|
}
|
|
3060
3062
|
function qc(e, t = {}) {
|
|
3061
|
-
const n = t.controlBindings ?? [], i =
|
|
3062
|
-
return
|
|
3063
|
+
const n = t.controlBindings ?? [], i = Ut(t.controlDefinitions ?? [], t.cardControlDefinitions ?? []), r = new Map(n.filter((o) => o.target === "config_field_selector" || o.target === "config_metric_selector").map((o) => [o, Gt({ binding: o, definitions: i, controlValues: t.controlValues })]));
|
|
3064
|
+
return cn([...dn(e), ...Rn(n, r)]);
|
|
3063
3065
|
}
|
|
3064
3066
|
function wa(e) {
|
|
3065
|
-
const t =
|
|
3067
|
+
const t = Kr({
|
|
3066
3068
|
entities: e.entities,
|
|
3067
3069
|
connectionType: e.connectionType,
|
|
3068
3070
|
qualifiedHints: [e.identity.qualifiedEntityName],
|
|
@@ -3070,7 +3072,7 @@ function wa(e) {
|
|
|
3070
3072
|
});
|
|
3071
3073
|
return t.kind === "resolved" ? t.entity : void 0;
|
|
3072
3074
|
}
|
|
3073
|
-
function
|
|
3075
|
+
function _a(e, t) {
|
|
3074
3076
|
const n = t.split(".").pop() || t;
|
|
3075
3077
|
return e.fieldMeta && W(e.fieldMeta) ? { column: t, nativeDataType: void 0, fieldMeta: void 0 } : {
|
|
3076
3078
|
column: t,
|
|
@@ -3085,7 +3087,7 @@ function Na(e, t) {
|
|
|
3085
3087
|
} : {}
|
|
3086
3088
|
};
|
|
3087
3089
|
}
|
|
3088
|
-
function
|
|
3090
|
+
function Na(e) {
|
|
3089
3091
|
return e != null && e.length ? e.every((t) => t.type === "model" ? !0 : t.type !== "dataset" ? !1 : t.datasetType !== "physical") : !1;
|
|
3090
3092
|
}
|
|
3091
3093
|
function Ba(e) {
|
|
@@ -3112,7 +3114,7 @@ function Ba(e) {
|
|
|
3112
3114
|
function Pa(e, t, n) {
|
|
3113
3115
|
if (!e && !t)
|
|
3114
3116
|
return;
|
|
3115
|
-
const i = (e == null ? void 0 : e.selectedEntities) || [], r = e && e.mode !== "semanticDomain" && n && !W(n) && !
|
|
3117
|
+
const i = (e == null ? void 0 : e.selectedEntities) || [], r = e && e.mode !== "semanticDomain" && n && !W(n) && !Na(i) ? [
|
|
3116
3118
|
wa({
|
|
3117
3119
|
entities: i,
|
|
3118
3120
|
connectionType: e.connectionType,
|
|
@@ -3137,14 +3139,14 @@ function Ka(e, t, n) {
|
|
|
3137
3139
|
}
|
|
3138
3140
|
return !!(e && e.mode !== "semanticDomain" && !W(n)) || (s = (a = e == null ? void 0 : e.selectedEntities) == null ? void 0 : a[0]) == null ? void 0 : s.database;
|
|
3139
3141
|
}
|
|
3140
|
-
function
|
|
3142
|
+
function wt(e) {
|
|
3141
3143
|
return e != null && e.startsWith("card-source-") ? e.replace("card-source-", "") : e;
|
|
3142
3144
|
}
|
|
3143
3145
|
function Oa(e, t) {
|
|
3144
3146
|
var d, g, h, C, v, E, D;
|
|
3145
3147
|
if (!e.fieldMeta)
|
|
3146
3148
|
return e.column === t.qualifiedFieldName || e.column === t.name;
|
|
3147
|
-
const n =
|
|
3149
|
+
const n = wt((d = e.fieldMeta) == null ? void 0 : d.id), i = wt(t.id), r = ((g = e.fieldMeta) == null ? void 0 : g.qualifiedFieldName) || e.column, o = r === t.qualifiedFieldName || r === t.name, a = (h = e.fieldMeta) == null ? void 0 : h.qualifiedEntityName, s = !a || !t.qualifiedEntityName || a === t.qualifiedEntityName, l = (C = e.fieldMeta) == null ? void 0 : C.entityId, u = !l || !t.entityId || l === t.entityId, c = (v = e.fieldMeta) == null ? void 0 : v.fieldScope;
|
|
3148
3150
|
if (c && t.fieldScope && c !== t.fieldScope)
|
|
3149
3151
|
return !1;
|
|
3150
3152
|
const p = (E = e.fieldMeta) == null ? void 0 : E.role;
|
|
@@ -3178,7 +3180,7 @@ function Vc({
|
|
|
3178
3180
|
connectionType: i
|
|
3179
3181
|
}, e);
|
|
3180
3182
|
return {
|
|
3181
|
-
id: r ||
|
|
3183
|
+
id: r || Bi(),
|
|
3182
3184
|
title: e.label || e.name,
|
|
3183
3185
|
connectionId: n || (t == null ? void 0 : t.connectionId) || "",
|
|
3184
3186
|
column: o,
|
|
@@ -3208,19 +3210,19 @@ function qa(e) {
|
|
|
3208
3210
|
function $c(e) {
|
|
3209
3211
|
return e.map((t) => `Skipped filter ${t.filterId || t.name || "unknown"}: ${t.reason}`);
|
|
3210
3212
|
}
|
|
3211
|
-
function
|
|
3213
|
+
function qn(e) {
|
|
3212
3214
|
return e.replace(/[`"[\]]/g, "").trim().toLowerCase();
|
|
3213
3215
|
}
|
|
3214
3216
|
function oe(e) {
|
|
3215
3217
|
if (!e) return [];
|
|
3216
|
-
const t =
|
|
3218
|
+
const t = qn(e);
|
|
3217
3219
|
if (!t) return [];
|
|
3218
3220
|
const n = t.split(".").filter(Boolean);
|
|
3219
3221
|
if (n.length === 0) return [];
|
|
3220
3222
|
const i = /* @__PURE__ */ new Set();
|
|
3221
3223
|
return i.add(t), n.length === 1 || (n.length >= 2 && i.add(n.slice(-2).join(".")), n.length >= 3 && i.add(n.slice(-3).join("."))), Array.from(i);
|
|
3222
3224
|
}
|
|
3223
|
-
function
|
|
3225
|
+
function Vn(e) {
|
|
3224
3226
|
const t = e.table || e.name;
|
|
3225
3227
|
return e.database && e.schema ? `${e.database}.${e.schema}.${t}` : e.schema ? `${e.schema}.${t}` : e.database ? `${e.database}.${t}` : t;
|
|
3226
3228
|
}
|
|
@@ -3228,7 +3230,7 @@ function Va(e, t) {
|
|
|
3228
3230
|
var p, y, f, m;
|
|
3229
3231
|
if (((p = t.cardDataSource) == null ? void 0 : p.mode) === "semanticDomain") return;
|
|
3230
3232
|
const n = e.fieldMeta, i = /* @__PURE__ */ new Set();
|
|
3231
|
-
|
|
3233
|
+
ar(
|
|
3232
3234
|
n,
|
|
3233
3235
|
i
|
|
3234
3236
|
);
|
|
@@ -3237,7 +3239,7 @@ function Va(e, t) {
|
|
|
3237
3239
|
const o = Array.from(i).map(It).filter((d) => !!(d != null && d.includes(".")));
|
|
3238
3240
|
if (o.length === 0) return;
|
|
3239
3241
|
const a = /* @__PURE__ */ new Set();
|
|
3240
|
-
|
|
3242
|
+
an(n, a);
|
|
3241
3243
|
const s = new Set(
|
|
3242
3244
|
o.map((d) => {
|
|
3243
3245
|
const g = d.split(".");
|
|
@@ -3248,11 +3250,11 @@ function Va(e, t) {
|
|
|
3248
3250
|
(d) => !s.has(d)
|
|
3249
3251
|
))
|
|
3250
3252
|
return;
|
|
3251
|
-
const l =
|
|
3253
|
+
const l = Or(
|
|
3252
3254
|
(f = t.cardDataSource) == null ? void 0 : f.connectionType
|
|
3253
3255
|
), u = [
|
|
3254
3256
|
...(((m = t.cardDataSource) == null ? void 0 : m.selectedEntities) || []).map(
|
|
3255
|
-
(d) =>
|
|
3257
|
+
(d) => Vn(d)
|
|
3256
3258
|
),
|
|
3257
3259
|
t.targetQualifiedTableName,
|
|
3258
3260
|
...t.additionalAllowedIdentifiers || []
|
|
@@ -3265,7 +3267,7 @@ function Va(e, t) {
|
|
|
3265
3267
|
);
|
|
3266
3268
|
return o.every(
|
|
3267
3269
|
(d) => c.some(
|
|
3268
|
-
(g) =>
|
|
3270
|
+
(g) => Rr({
|
|
3269
3271
|
requested: Ct({
|
|
3270
3272
|
qualifiedName: d,
|
|
3271
3273
|
capabilities: l
|
|
@@ -3288,13 +3290,13 @@ function rt(e) {
|
|
|
3288
3290
|
var i;
|
|
3289
3291
|
const t = /* @__PURE__ */ new Set();
|
|
3290
3292
|
if ((((i = e.cardDataSource) == null ? void 0 : i.selectedEntities) || []).forEach((r) => {
|
|
3291
|
-
La(r).forEach((o) => t.add(o)), oe(
|
|
3293
|
+
La(r).forEach((o) => t.add(o)), oe(Vn(r)).forEach(
|
|
3292
3294
|
(o) => t.add(o)
|
|
3293
3295
|
);
|
|
3294
3296
|
}), oe(e.targetQualifiedTableName).forEach(
|
|
3295
3297
|
(r) => t.add(r)
|
|
3296
3298
|
), e.targetQualifiedTableName) {
|
|
3297
|
-
const r =
|
|
3299
|
+
const r = qn(e.targetQualifiedTableName).split(".").filter(Boolean), o = r[r.length - 1];
|
|
3298
3300
|
o && t.add(o);
|
|
3299
3301
|
}
|
|
3300
3302
|
return (e.additionalAllowedIdentifiers || []).forEach((r) => {
|
|
@@ -3302,7 +3304,7 @@ function rt(e) {
|
|
|
3302
3304
|
}), t;
|
|
3303
3305
|
}
|
|
3304
3306
|
function Oe(e) {
|
|
3305
|
-
const t = e.fieldMeta, n = /* @__PURE__ */ new Set(), i =
|
|
3307
|
+
const t = e.fieldMeta, n = /* @__PURE__ */ new Set(), i = pr.toLowerCase(), r = /* @__PURE__ */ new Set([
|
|
3306
3308
|
i,
|
|
3307
3309
|
"calculated_fields"
|
|
3308
3310
|
]), o = (s) => {
|
|
@@ -3312,7 +3314,7 @@ function Oe(e) {
|
|
|
3312
3314
|
}, a = (s) => {
|
|
3313
3315
|
if (!s) return;
|
|
3314
3316
|
const l = /* @__PURE__ */ new Set();
|
|
3315
|
-
|
|
3317
|
+
an(s, l), l.forEach((u) => o(u));
|
|
3316
3318
|
};
|
|
3317
3319
|
if (o(t == null ? void 0 : t.qualifiedEntityName), o(t == null ? void 0 : t.entityName), a(t), !n.size && e.name) {
|
|
3318
3320
|
const s = e.name.split(".");
|
|
@@ -3320,7 +3322,7 @@ function Oe(e) {
|
|
|
3320
3322
|
}
|
|
3321
3323
|
return Array.from(n);
|
|
3322
3324
|
}
|
|
3323
|
-
function
|
|
3325
|
+
function Ln(e) {
|
|
3324
3326
|
const t = e.fieldMeta;
|
|
3325
3327
|
return t ? W(t) : !1;
|
|
3326
3328
|
}
|
|
@@ -3347,7 +3349,7 @@ function Uc(e, t) {
|
|
|
3347
3349
|
};
|
|
3348
3350
|
for (const s of e) {
|
|
3349
3351
|
const l = Oe(s);
|
|
3350
|
-
if (!
|
|
3352
|
+
if (!Ln(s) || !o(s.fieldMeta) || !n.size || !l.length || l.some((c) => n.has(c))) {
|
|
3351
3353
|
i.push(s);
|
|
3352
3354
|
continue;
|
|
3353
3355
|
}
|
|
@@ -3356,8 +3358,8 @@ function Uc(e, t) {
|
|
|
3356
3358
|
}
|
|
3357
3359
|
return { applicableFilters: i, skippedFilters: r };
|
|
3358
3360
|
}
|
|
3359
|
-
function
|
|
3360
|
-
const i = n.size > 0, r = t.allowCalculated !== !1, a = (t.phase ?? "post_join") === "post_join", s = e.name, l =
|
|
3361
|
+
function jn(e, t, n) {
|
|
3362
|
+
const i = n.size > 0, r = t.allowCalculated !== !1, a = (t.phase ?? "post_join") === "post_join", s = e.name, l = Ln(e);
|
|
3361
3363
|
if (l && !r) return { kind: "skip", reason: "unsupported_calculated_filter" };
|
|
3362
3364
|
if (l && !e.fieldMeta) return { kind: "skip", reason: "missing_metadata" };
|
|
3363
3365
|
const u = Va(e, t);
|
|
@@ -3379,7 +3381,7 @@ function za(e, t) {
|
|
|
3379
3381
|
};
|
|
3380
3382
|
const n = rt(t), i = [], r = [];
|
|
3381
3383
|
return e.forEach((o) => {
|
|
3382
|
-
const a =
|
|
3384
|
+
const a = jn(o, t, n);
|
|
3383
3385
|
if (a.kind === "apply") {
|
|
3384
3386
|
i.push(o);
|
|
3385
3387
|
return;
|
|
@@ -3405,31 +3407,31 @@ function $a(e) {
|
|
|
3405
3407
|
}
|
|
3406
3408
|
function Ua(e, t) {
|
|
3407
3409
|
var r;
|
|
3408
|
-
const n = $a({ dataSource: t.dataSource, joinPlan: (r = t.config) == null ? void 0 : r.joinPlan }), i =
|
|
3410
|
+
const n = $a({ dataSource: t.dataSource, joinPlan: (r = t.config) == null ? void 0 : r.joinPlan }), i = jn(e, n, rt(n));
|
|
3409
3411
|
return i.kind === "skip" ? "unreachable" : i.proven ? "reachable" : "unknown";
|
|
3410
3412
|
}
|
|
3411
|
-
function
|
|
3413
|
+
function zn(e, t) {
|
|
3412
3414
|
if (!e.optionSource) return t;
|
|
3413
3415
|
const n = e.optionSource.valueField.dataType || e.filter.dataType || "string";
|
|
3414
3416
|
return {
|
|
3415
3417
|
...t,
|
|
3416
3418
|
name: e.optionSource.valueField.name,
|
|
3417
3419
|
dataType: n,
|
|
3418
|
-
valueType:
|
|
3420
|
+
valueType: $n(e.optionSource.valueField.dataType),
|
|
3419
3421
|
fieldMeta: {
|
|
3420
3422
|
...t.fieldMeta,
|
|
3421
3423
|
name: e.optionSource.valueField.name,
|
|
3422
3424
|
qualifiedFieldName: Wa(e),
|
|
3423
3425
|
entityId: Ga(e),
|
|
3424
3426
|
entityName: ot(e),
|
|
3425
|
-
qualifiedEntityName:
|
|
3427
|
+
qualifiedEntityName: Un(e),
|
|
3426
3428
|
entityType: Qa(e),
|
|
3427
3429
|
dataType: n
|
|
3428
3430
|
},
|
|
3429
3431
|
semanticContext: Ha(e)
|
|
3430
3432
|
};
|
|
3431
3433
|
}
|
|
3432
|
-
function
|
|
3434
|
+
function $n(e) {
|
|
3433
3435
|
switch (e) {
|
|
3434
3436
|
case "string":
|
|
3435
3437
|
case "number":
|
|
@@ -3454,9 +3456,9 @@ function ot(e) {
|
|
|
3454
3456
|
}
|
|
3455
3457
|
function Ga(e) {
|
|
3456
3458
|
const t = Z(e);
|
|
3457
|
-
return (t == null ? void 0 : t.kind) === "semantic" ? t.datasetId || t.datasetName :
|
|
3459
|
+
return (t == null ? void 0 : t.kind) === "semantic" ? t.datasetId || t.datasetName : Un(e);
|
|
3458
3460
|
}
|
|
3459
|
-
function
|
|
3461
|
+
function Un(e) {
|
|
3460
3462
|
const t = Z(e);
|
|
3461
3463
|
return !t || t.kind === "semantic" ? ot(e) : [t.databaseName, t.schemaName, t.tableName].filter(Boolean).join(".");
|
|
3462
3464
|
}
|
|
@@ -3519,7 +3521,7 @@ function Ya(e) {
|
|
|
3519
3521
|
return e === "date" || e === "datetime" ? "date" : e;
|
|
3520
3522
|
}
|
|
3521
3523
|
function Ja(e, t = e.field.source) {
|
|
3522
|
-
const n = e.field, i =
|
|
3524
|
+
const n = e.field, i = Qt(t), r = `${i.qualifiedEntityName}.${n.name}`;
|
|
3523
3525
|
return {
|
|
3524
3526
|
id: r,
|
|
3525
3527
|
name: n.name,
|
|
@@ -3536,8 +3538,8 @@ function Ja(e, t = e.field.source) {
|
|
|
3536
3538
|
...n.sourceField ? { sourceField: n.sourceField } : {}
|
|
3537
3539
|
};
|
|
3538
3540
|
}
|
|
3539
|
-
function
|
|
3540
|
-
const o = t.field, a =
|
|
3541
|
+
function Nt(e, t, n, i, r) {
|
|
3542
|
+
const o = t.field, a = Qt(n), s = r || o.name;
|
|
3541
3543
|
return {
|
|
3542
3544
|
...e,
|
|
3543
3545
|
name: s,
|
|
@@ -3562,17 +3564,17 @@ function Xa(e, t, n) {
|
|
|
3562
3564
|
const i = ((o = e.optionSource) == null ? void 0 : o.valueField.dataType) || e.filter.dataType || (t == null ? void 0 : t.dataType) || (t == null ? void 0 : t.valueType);
|
|
3563
3565
|
if (!i && !t) return !0;
|
|
3564
3566
|
const r = J(i);
|
|
3565
|
-
return
|
|
3567
|
+
return Gn(
|
|
3566
3568
|
r,
|
|
3567
3569
|
n.field.dataType
|
|
3568
3570
|
);
|
|
3569
3571
|
}
|
|
3570
|
-
function
|
|
3572
|
+
function Gn(e, t) {
|
|
3571
3573
|
return e === "unknown" ? !1 : (e === "date" || e === "datetime") && (t === "date" || t === "datetime") ? !0 : e === t;
|
|
3572
3574
|
}
|
|
3573
|
-
function
|
|
3575
|
+
function Qn(e) {
|
|
3574
3576
|
const { valueField: t, valueSources: n, sourceIndex: i } = e, r = [], o = (a) => {
|
|
3575
|
-
if (!
|
|
3577
|
+
if (!Yt(a, t)) return;
|
|
3576
3578
|
const s = Ve(
|
|
3577
3579
|
i,
|
|
3578
3580
|
a.field.source
|
|
@@ -3604,19 +3606,19 @@ function Wn(e) {
|
|
|
3604
3606
|
return r;
|
|
3605
3607
|
}
|
|
3606
3608
|
function Za(e, t, n) {
|
|
3607
|
-
const i =
|
|
3609
|
+
const i = Oi(e, t);
|
|
3608
3610
|
if (!i) return { candidates: [] };
|
|
3609
|
-
const r =
|
|
3611
|
+
const r = Ri(e);
|
|
3610
3612
|
return {
|
|
3611
3613
|
logicalValueField: i,
|
|
3612
|
-
candidates:
|
|
3614
|
+
candidates: Qn({
|
|
3613
3615
|
valueField: i,
|
|
3614
3616
|
valueSources: r,
|
|
3615
3617
|
sourceIndex: n
|
|
3616
3618
|
})
|
|
3617
3619
|
};
|
|
3618
3620
|
}
|
|
3619
|
-
function
|
|
3621
|
+
function Wn(e) {
|
|
3620
3622
|
const t = Ve(
|
|
3621
3623
|
e.sourceIndex,
|
|
3622
3624
|
e.target.field.source
|
|
@@ -3653,50 +3655,50 @@ function es(e, t) {
|
|
|
3653
3655
|
] : [];
|
|
3654
3656
|
});
|
|
3655
3657
|
}
|
|
3656
|
-
function
|
|
3658
|
+
function Hn(e, t) {
|
|
3657
3659
|
var n;
|
|
3658
3660
|
return ((n = e.application) == null ? void 0 : n.cards.some((i) => i.cardId === t && i.kind === "excluded")) ?? !1;
|
|
3659
3661
|
}
|
|
3660
|
-
function
|
|
3662
|
+
function Yn(e, t, n = qe(t), i) {
|
|
3661
3663
|
var p, y;
|
|
3662
3664
|
const r = t.id;
|
|
3663
|
-
if (
|
|
3665
|
+
if (Hn(e, r)) return { status: "excluded" };
|
|
3664
3666
|
const o = (p = e.application) == null ? void 0 : p.cards.find((f) => f.cardId === r);
|
|
3665
3667
|
if ((o == null ? void 0 : o.kind) === "bound") {
|
|
3666
3668
|
if (o.target.kind === "relationship") {
|
|
3667
3669
|
const m = o.target.field.source;
|
|
3668
|
-
return
|
|
3670
|
+
return Wt(t) && m.kind === "semantic" && m.domainId === ((y = t.dataSource) == null ? void 0 : y.semanticDomainId) && Pi(e, o.target) ? {
|
|
3669
3671
|
status: "relationship",
|
|
3670
3672
|
route: { bindingId: o.bindingId, relationshipIds: [...o.target.relationshipIds] }
|
|
3671
3673
|
} : { status: "stale", bindingId: o.bindingId };
|
|
3672
3674
|
}
|
|
3673
3675
|
if (o.target.kind !== "field") return { status: "unsupportedTarget", bindingId: o.bindingId };
|
|
3674
|
-
const f =
|
|
3676
|
+
const f = Wn({ sourceIndex: n, target: o.target });
|
|
3675
3677
|
return f.status === "stale" ? { status: "stale", bindingId: o.bindingId } : Xa(e, i, o.target) ? { status: "bound", bindingId: o.bindingId, target: o.target, validation: f } : { status: "incompatible", bindingId: o.bindingId };
|
|
3676
3678
|
}
|
|
3677
3679
|
if (e.filter.kind === "global-date") return { status: "notApplicable" };
|
|
3678
3680
|
if (n.kind === "sql")
|
|
3679
3681
|
return e.unmappedTargetPolicy === "requireFieldProof" ? { status: "notApplicable" } : { status: "sql" };
|
|
3680
3682
|
if (n.kind !== "config" || !n.executableSources.length) return { status: "notApplicable" };
|
|
3681
|
-
const a = Za(e, i, n), s = a.logicalValueField ?
|
|
3683
|
+
const a = Za(e, i, n), s = a.logicalValueField ? Ht({ logicalValueField: a.logicalValueField, candidates: a.candidates }) : { status: "notApplicable" }, l = s.status === "notApplicable" && a.logicalValueField ? Ki({
|
|
3682
3684
|
logicalValueField: a.logicalValueField,
|
|
3683
3685
|
acceptedTargets: es(e, n)
|
|
3684
3686
|
}) : s;
|
|
3685
3687
|
if (l.status === "matched") return { status: "automatic", target: l.target };
|
|
3686
3688
|
if (l.status === "ambiguous") return { status: "ambiguous" };
|
|
3687
|
-
const u = i ??
|
|
3689
|
+
const u = i ?? Jn(e);
|
|
3688
3690
|
return Ua(u, t) === "reachable" && e.unmappedTargetPolicy !== "requireFieldProof" ? { status: "passthrough" } : e.unmappedTargetPolicy !== "requireFieldProof" && ts(u, t, n) ? { status: "relationship" } : { status: "notApplicable" };
|
|
3689
3691
|
}
|
|
3690
3692
|
function ts(e, t, n) {
|
|
3691
3693
|
var r;
|
|
3692
|
-
if (n.kind !== "config" || !
|
|
3693
|
-
const i =
|
|
3694
|
+
if (n.kind !== "config" || !Wt(t)) return !1;
|
|
3695
|
+
const i = qi(e);
|
|
3694
3696
|
return !i || i.domainId !== ((r = t.dataSource) == null ? void 0 : r.semanticDomainId) ? !1 : !n.executableSources.some(
|
|
3695
3697
|
(o) => o.kind === "semantic" && (o.datasetName === i.datasetName || o.datasetId === i.datasetName)
|
|
3696
3698
|
);
|
|
3697
3699
|
}
|
|
3698
|
-
function
|
|
3699
|
-
return
|
|
3700
|
+
function Jn(e) {
|
|
3701
|
+
return zn(e, {
|
|
3700
3702
|
filterId: e.filter.id,
|
|
3701
3703
|
name: e.filter.column,
|
|
3702
3704
|
fieldMeta: e.filter.fieldMeta,
|
|
@@ -3711,7 +3713,7 @@ function Gc(e, t) {
|
|
|
3711
3713
|
}
|
|
3712
3714
|
function ns(e, t, n) {
|
|
3713
3715
|
var r;
|
|
3714
|
-
const i =
|
|
3716
|
+
const i = Yn(e, t);
|
|
3715
3717
|
switch (i.status) {
|
|
3716
3718
|
case "unsupportedTarget":
|
|
3717
3719
|
case "stale":
|
|
@@ -3721,7 +3723,7 @@ function ns(e, t, n) {
|
|
|
3721
3723
|
return { reach: "automatic" };
|
|
3722
3724
|
case "relationship": {
|
|
3723
3725
|
if (!(n != null && n.relationshipReach)) return { reach: "relationship" };
|
|
3724
|
-
const o =
|
|
3726
|
+
const o = Jn(e), a = i.route ? { ...o, relationshipRoute: { relationshipIds: i.route.relationshipIds } } : o, s = n.relationshipReach({ card: t, value: a });
|
|
3725
3727
|
return s.status === "applied" ? { reach: "relationshipApplied", route: s.route } : s.status === "kept" ? { reach: "automatic", kept: !0 } : s.status === "blocked" ? { reach: "blocked", message: s.message } : {
|
|
3726
3728
|
reach: "notApplicable",
|
|
3727
3729
|
reason: s.reason,
|
|
@@ -3774,7 +3776,7 @@ function Qc({
|
|
|
3774
3776
|
continue;
|
|
3775
3777
|
}
|
|
3776
3778
|
const y = a.get(c.id), f = (y == null ? void 0 : y.filterValue) || s.get(c.filter.id);
|
|
3777
|
-
if (!r && !
|
|
3779
|
+
if (!r && !Vi(c)) {
|
|
3778
3780
|
l.push({
|
|
3779
3781
|
status: "skip",
|
|
3780
3782
|
inputId: c.id,
|
|
@@ -3782,7 +3784,7 @@ function Qc({
|
|
|
3782
3784
|
});
|
|
3783
3785
|
continue;
|
|
3784
3786
|
}
|
|
3785
|
-
if (
|
|
3787
|
+
if (Hn(c, e.id)) {
|
|
3786
3788
|
l.push({
|
|
3787
3789
|
status: "skip",
|
|
3788
3790
|
inputId: c.id,
|
|
@@ -3806,7 +3808,7 @@ function Qc({
|
|
|
3806
3808
|
});
|
|
3807
3809
|
continue;
|
|
3808
3810
|
}
|
|
3809
|
-
const m =
|
|
3811
|
+
const m = Yn(c, e, o, f);
|
|
3810
3812
|
switch (m.status) {
|
|
3811
3813
|
case "excluded":
|
|
3812
3814
|
l.push({
|
|
@@ -3848,7 +3850,7 @@ function Qc({
|
|
|
3848
3850
|
});
|
|
3849
3851
|
break;
|
|
3850
3852
|
case "automatic":
|
|
3851
|
-
if (!
|
|
3853
|
+
if (!sr(
|
|
3852
3854
|
m.target.field.dataType,
|
|
3853
3855
|
f.operation
|
|
3854
3856
|
))
|
|
@@ -3858,7 +3860,7 @@ function Qc({
|
|
|
3858
3860
|
reason: "incompatibleValueType"
|
|
3859
3861
|
});
|
|
3860
3862
|
else {
|
|
3861
|
-
const d =
|
|
3863
|
+
const d = Nt(
|
|
3862
3864
|
_t(f),
|
|
3863
3865
|
m.target,
|
|
3864
3866
|
m.target.field.source,
|
|
@@ -3896,7 +3898,7 @@ function Qc({
|
|
|
3896
3898
|
});
|
|
3897
3899
|
break;
|
|
3898
3900
|
case "bound": {
|
|
3899
|
-
const d =
|
|
3901
|
+
const d = Nt(
|
|
3900
3902
|
_t(f),
|
|
3901
3903
|
m.target,
|
|
3902
3904
|
m.validation.source,
|
|
@@ -3975,9 +3977,9 @@ function cs(e, t) {
|
|
|
3975
3977
|
);
|
|
3976
3978
|
}
|
|
3977
3979
|
function us(e, t, n) {
|
|
3978
|
-
const i = t === "date" && "relativeMeta" in e ?
|
|
3980
|
+
const i = t === "date" && "relativeMeta" in e ? mr(e.relativeMeta) : void 0;
|
|
3979
3981
|
if (!i) return { values: e.values };
|
|
3980
|
-
const r =
|
|
3982
|
+
const r = Li(i, n ?? void 0), o = e.operation === "between" || e.operation === "not between";
|
|
3981
3983
|
return {
|
|
3982
3984
|
values: r && o ? r : e.values,
|
|
3983
3985
|
relativeMeta: i,
|
|
@@ -3985,8 +3987,8 @@ function us(e, t, n) {
|
|
|
3985
3987
|
};
|
|
3986
3988
|
}
|
|
3987
3989
|
function ds(e, t, n) {
|
|
3988
|
-
const i = t, r =
|
|
3989
|
-
return
|
|
3990
|
+
const i = t, r = to(e);
|
|
3991
|
+
return en({
|
|
3990
3992
|
definition: e,
|
|
3991
3993
|
sourceValue: i,
|
|
3992
3994
|
value: {
|
|
@@ -4011,7 +4013,7 @@ function Yc(e, t, n) {
|
|
|
4011
4013
|
a.push(s.filterId);
|
|
4012
4014
|
continue;
|
|
4013
4015
|
}
|
|
4014
|
-
const c =
|
|
4016
|
+
const c = Zt(
|
|
4015
4017
|
ds(u.filter, s, n.calendar)
|
|
4016
4018
|
);
|
|
4017
4019
|
if (c) {
|
|
@@ -4019,8 +4021,8 @@ function Yc(e, t, n) {
|
|
|
4019
4021
|
r = gt(r, u, {}, c);
|
|
4020
4022
|
continue;
|
|
4021
4023
|
}
|
|
4022
|
-
for (const p of
|
|
4023
|
-
|
|
4024
|
+
for (const p of Jt(e).values())
|
|
4025
|
+
Xt(u, p) && (r = gt(
|
|
4024
4026
|
r,
|
|
4025
4027
|
u,
|
|
4026
4028
|
{ sheetId: p.sheetId },
|
|
@@ -4033,8 +4035,8 @@ function Yc(e, t, n) {
|
|
|
4033
4035
|
function Jc(e) {
|
|
4034
4036
|
const { dashboard: t, sheetId: n } = e, i = [];
|
|
4035
4037
|
if (n)
|
|
4036
|
-
for (const { input: r } of
|
|
4037
|
-
const o =
|
|
4038
|
+
for (const { input: r } of ji(t, n, e.sheetKind)) {
|
|
4039
|
+
const o = li({
|
|
4038
4040
|
dashboard: t,
|
|
4039
4041
|
input: r,
|
|
4040
4042
|
runtimeValues: { dashboardInputValues: e.runtimeValues.dashboardInputValues },
|
|
@@ -4050,7 +4052,7 @@ function Xc(e, t) {
|
|
|
4050
4052
|
case "shared":
|
|
4051
4053
|
return [{}];
|
|
4052
4054
|
case "perSheet":
|
|
4053
|
-
return [...
|
|
4055
|
+
return [...Jt(e).values()].filter((n) => Xt(t, n)).map((n) => ({ sheetId: n.sheetId }));
|
|
4054
4056
|
case "perCard":
|
|
4055
4057
|
return K(e).reachedCards({ inputId: t.id }).map((n) => ({ sheetId: n.sheetId, cardId: n.cardId }));
|
|
4056
4058
|
case "perDocumentSection": {
|
|
@@ -4063,13 +4065,13 @@ function Xc(e, t) {
|
|
|
4063
4065
|
return [];
|
|
4064
4066
|
}
|
|
4065
4067
|
}
|
|
4066
|
-
function
|
|
4068
|
+
function Bt(e) {
|
|
4067
4069
|
var t;
|
|
4068
4070
|
return [
|
|
4069
4071
|
...e.cards ?? [],
|
|
4070
4072
|
...(e.frames ?? []).flatMap((n) => n.cards),
|
|
4071
4073
|
...(((t = e.document) == null ? void 0 : t.sections) ?? []).flatMap(
|
|
4072
|
-
(n) =>
|
|
4074
|
+
(n) => sn(n)
|
|
4073
4075
|
)
|
|
4074
4076
|
];
|
|
4075
4077
|
}
|
|
@@ -4080,7 +4082,7 @@ function fs(e, t) {
|
|
|
4080
4082
|
cardId: t.id,
|
|
4081
4083
|
sheetKind: e.kind ?? "dashboard",
|
|
4082
4084
|
sectionId: (i = (n = e.document) == null ? void 0 : n.sections.find(
|
|
4083
|
-
(r) =>
|
|
4085
|
+
(r) => sn(r).some(({ id: o }) => o === t.id)
|
|
4084
4086
|
)) == null ? void 0 : i.id
|
|
4085
4087
|
};
|
|
4086
4088
|
}
|
|
@@ -4116,13 +4118,13 @@ function ps(e, t, n, i) {
|
|
|
4116
4118
|
}
|
|
4117
4119
|
function ms(e, t) {
|
|
4118
4120
|
var o;
|
|
4119
|
-
const n =
|
|
4121
|
+
const n = Bt(e);
|
|
4120
4122
|
if (!n.some((a) => {
|
|
4121
4123
|
var s;
|
|
4122
4124
|
return (s = a.preferences) == null ? void 0 : s.textVisualOptions;
|
|
4123
4125
|
}))
|
|
4124
4126
|
return e;
|
|
4125
|
-
const i = be(e), r =
|
|
4127
|
+
const i = be(e), r = Bt(i);
|
|
4126
4128
|
for (let a = 0; a < r.length; a++) {
|
|
4127
4129
|
const s = ps(
|
|
4128
4130
|
r[a],
|
|
@@ -4132,7 +4134,7 @@ function ms(e, t) {
|
|
|
4132
4134
|
);
|
|
4133
4135
|
(o = e.frames) != null && o.some(
|
|
4134
4136
|
(l) => l.visualId && l.cards.some((u) => u.id === r[a].id)
|
|
4135
|
-
) && (r[a].linkedReferenceOverrides =
|
|
4137
|
+
) && (r[a].linkedReferenceOverrides = Zr(
|
|
4136
4138
|
r[a].linkedReferenceOverrides,
|
|
4137
4139
|
{ inputAliases: s }
|
|
4138
4140
|
));
|
|
@@ -4155,10 +4157,10 @@ function gs(e) {
|
|
|
4155
4157
|
function lt(e) {
|
|
4156
4158
|
return bs(e) ? ["label", "value"] : ["value"];
|
|
4157
4159
|
}
|
|
4158
|
-
function
|
|
4160
|
+
function Pt(e) {
|
|
4159
4161
|
return e.kind === "filter" ? `filter:${e.filter.id}` : `control:${e.control.id}`;
|
|
4160
4162
|
}
|
|
4161
|
-
function
|
|
4163
|
+
function Xn(e) {
|
|
4162
4164
|
return {
|
|
4163
4165
|
placement: e.hidden ? "hidden" : e.placement || (e.scope === "card" ? "card_header" : "toolbar"),
|
|
4164
4166
|
...e.toolbarWidth ? { widthPx: e.toolbarWidth } : {}
|
|
@@ -4170,24 +4172,24 @@ function Ce(e) {
|
|
|
4170
4172
|
function bs(e) {
|
|
4171
4173
|
return e.type === "enum" || e.type === "multi_enum" || e.type === "field_selector" || e.type === "metric_selector" || e.type === "aggregation_selector" || e.type === "grain_selector";
|
|
4172
4174
|
}
|
|
4173
|
-
function
|
|
4175
|
+
function Zn(e, t = {}) {
|
|
4174
4176
|
if (!e)
|
|
4175
4177
|
return [];
|
|
4176
4178
|
const n = [], i = [...t.existingInputs || []];
|
|
4177
4179
|
for (const r of e.inlineFilters || []) {
|
|
4178
4180
|
const o = r.title || r.column || r.id, a = hs(r), s = {
|
|
4179
|
-
id:
|
|
4181
|
+
id: kr(e.id, r.id),
|
|
4180
4182
|
kind: "filter",
|
|
4181
4183
|
label: o,
|
|
4182
4184
|
variableName: r.variableName ? Ae(
|
|
4183
4185
|
r.variableName,
|
|
4184
4186
|
i
|
|
4185
|
-
) :
|
|
4187
|
+
) : zi(o, i),
|
|
4186
4188
|
scope: { kind: "cards", cardIds: [e.id] },
|
|
4187
4189
|
runtimeScope: "perCard",
|
|
4188
4190
|
presentation: { placement: "card_header" },
|
|
4189
4191
|
filter: a,
|
|
4190
|
-
exports:
|
|
4192
|
+
exports: tn(a),
|
|
4191
4193
|
compatibility: {
|
|
4192
4194
|
source: "cardInlineFilter",
|
|
4193
4195
|
cardId: e.id,
|
|
@@ -4198,7 +4200,7 @@ function ei(e, t = {}) {
|
|
|
4198
4200
|
}
|
|
4199
4201
|
for (const r of e.controls || []) {
|
|
4200
4202
|
const o = r.label || r.id, a = {
|
|
4201
|
-
id:
|
|
4203
|
+
id: Mr(e.id, r.id),
|
|
4202
4204
|
kind: "control",
|
|
4203
4205
|
label: o,
|
|
4204
4206
|
variableName: Ae(
|
|
@@ -4207,7 +4209,7 @@ function ei(e, t = {}) {
|
|
|
4207
4209
|
),
|
|
4208
4210
|
scope: { kind: "cards", cardIds: [e.id] },
|
|
4209
4211
|
runtimeScope: "perCard",
|
|
4210
|
-
presentation:
|
|
4212
|
+
presentation: Xn(r),
|
|
4211
4213
|
control: r,
|
|
4212
4214
|
exports: lt(r),
|
|
4213
4215
|
requiredAtExecution: r.requiredAtExecution,
|
|
@@ -4222,7 +4224,7 @@ function ei(e, t = {}) {
|
|
|
4222
4224
|
return n;
|
|
4223
4225
|
}
|
|
4224
4226
|
function hs(e) {
|
|
4225
|
-
return
|
|
4227
|
+
return $i({
|
|
4226
4228
|
kind: "field",
|
|
4227
4229
|
id: e.id,
|
|
4228
4230
|
variableName: e.variableName,
|
|
@@ -4249,11 +4251,11 @@ function hs(e) {
|
|
|
4249
4251
|
toolbarWidth: e.width
|
|
4250
4252
|
});
|
|
4251
4253
|
}
|
|
4252
|
-
function
|
|
4254
|
+
function ei(e, t = {}) {
|
|
4253
4255
|
const n = [], i = [...t.existingInputs || []];
|
|
4254
4256
|
for (const r of e.controls || []) {
|
|
4255
4257
|
const o = r.label || r.id, a = {
|
|
4256
|
-
id:
|
|
4258
|
+
id: Ar(r.id),
|
|
4257
4259
|
kind: "control",
|
|
4258
4260
|
label: o,
|
|
4259
4261
|
variableName: Ae(
|
|
@@ -4262,7 +4264,7 @@ function ti(e, t = {}) {
|
|
|
4262
4264
|
),
|
|
4263
4265
|
scope: { kind: "allSheets", sheetKinds: ["dashboard"] },
|
|
4264
4266
|
runtimeScope: "shared",
|
|
4265
|
-
presentation:
|
|
4267
|
+
presentation: Xn(r),
|
|
4266
4268
|
control: r,
|
|
4267
4269
|
exports: lt(r),
|
|
4268
4270
|
requiredAtExecution: r.requiredAtExecution,
|
|
@@ -4276,7 +4278,7 @@ function ti(e, t = {}) {
|
|
|
4276
4278
|
return n;
|
|
4277
4279
|
}
|
|
4278
4280
|
const Re = { kind: "allSheets" }, Is = "global-date";
|
|
4279
|
-
function
|
|
4281
|
+
function ti(e, t) {
|
|
4280
4282
|
return {
|
|
4281
4283
|
namespace: e,
|
|
4282
4284
|
contextMode: t,
|
|
@@ -4288,7 +4290,7 @@ function ni(e, t) {
|
|
|
4288
4290
|
function ve(e, t) {
|
|
4289
4291
|
return `${e}:${t}`;
|
|
4290
4292
|
}
|
|
4291
|
-
function
|
|
4293
|
+
function ni(e, t) {
|
|
4292
4294
|
return `${e}_${t}`;
|
|
4293
4295
|
}
|
|
4294
4296
|
function Cs(e) {
|
|
@@ -4326,7 +4328,7 @@ function Ts(e, t, n, i) {
|
|
|
4326
4328
|
if (i === "selectedColumn")
|
|
4327
4329
|
return {
|
|
4328
4330
|
...d,
|
|
4329
|
-
...
|
|
4331
|
+
..._a(d, n.name)
|
|
4330
4332
|
};
|
|
4331
4333
|
const {
|
|
4332
4334
|
// Identity that the anchored value replaces.
|
|
@@ -4336,10 +4338,10 @@ function Ts(e, t, n, i) {
|
|
|
4336
4338
|
nativeDataType: v,
|
|
4337
4339
|
fieldMeta: E,
|
|
4338
4340
|
semanticContext: D,
|
|
4339
|
-
...
|
|
4341
|
+
..._
|
|
4340
4342
|
} = d, I = n.fieldMeta, S = n.nativeDataType ?? (I == null ? void 0 : I.nativeDataType);
|
|
4341
4343
|
return {
|
|
4342
|
-
...
|
|
4344
|
+
..._,
|
|
4343
4345
|
column: (I == null ? void 0 : I.name) || n.name,
|
|
4344
4346
|
dataType: n.dataType || (I == null ? void 0 : I.dataType) || e.dataType,
|
|
4345
4347
|
...S ? { nativeDataType: S } : {},
|
|
@@ -4366,7 +4368,7 @@ function Ss(e) {
|
|
|
4366
4368
|
id: ve(e.namespace, e.sourceDefinitionId),
|
|
4367
4369
|
kind: "filter",
|
|
4368
4370
|
label: e.label,
|
|
4369
|
-
variableName:
|
|
4371
|
+
variableName: ni(e.namespace, e.sourceAlias),
|
|
4370
4372
|
scope: Re,
|
|
4371
4373
|
runtimeScope: "shared",
|
|
4372
4374
|
presentation: { placement: "hidden" },
|
|
@@ -4393,7 +4395,7 @@ function xs(e, t) {
|
|
|
4393
4395
|
id: ve(e, $e(t.sourceCardId)),
|
|
4394
4396
|
kind: "selection",
|
|
4395
4397
|
label: t.label || "Selection",
|
|
4396
|
-
variableName:
|
|
4398
|
+
variableName: ni(
|
|
4397
4399
|
e,
|
|
4398
4400
|
`selection_${t.sourceCardId}`
|
|
4399
4401
|
),
|
|
@@ -4415,7 +4417,7 @@ function xs(e, t) {
|
|
|
4415
4417
|
}
|
|
4416
4418
|
function Zc(e) {
|
|
4417
4419
|
var l;
|
|
4418
|
-
const { namespace: t, contextMode: n } = e, i =
|
|
4420
|
+
const { namespace: t, contextMode: n } = e, i = ti(t, n);
|
|
4419
4421
|
if (n === "none") return i;
|
|
4420
4422
|
const r = {}, o = new Set(e.destinationCardIds), a = (l = e.selection) != null && l.tuples.length ? xs(t, e.selection) : void 0;
|
|
4421
4423
|
a && (i.selectionDefinitions.push(a.input), r[a.input.id] = {
|
|
@@ -4532,7 +4534,7 @@ const As = /* @__PURE__ */ new Set([
|
|
|
4532
4534
|
function ws(e, t) {
|
|
4533
4535
|
if (!P(e) || e.kind !== "selection" || typeof e.id != "string" || !e.id.startsWith(`${t}:`) || typeof e.label != "string" || typeof e.variableName != "string" || typeof e.sourceCardId != "string" || !e.sourceCardId.startsWith(`${t}:`))
|
|
4534
4536
|
return;
|
|
4535
|
-
const n =
|
|
4537
|
+
const n = Ui.safeParse(e.settings);
|
|
4536
4538
|
if (n.success)
|
|
4537
4539
|
return {
|
|
4538
4540
|
id: e.id,
|
|
@@ -4546,7 +4548,7 @@ function ws(e, t) {
|
|
|
4546
4548
|
settings: n.data
|
|
4547
4549
|
};
|
|
4548
4550
|
}
|
|
4549
|
-
function
|
|
4551
|
+
function _s(e, t) {
|
|
4550
4552
|
if (!P(e) || e.status !== "set" || !P(e.value))
|
|
4551
4553
|
return;
|
|
4552
4554
|
const n = e.value.filterValue;
|
|
@@ -4555,7 +4557,7 @@ function Ns(e, t) {
|
|
|
4555
4557
|
)))
|
|
4556
4558
|
return e;
|
|
4557
4559
|
}
|
|
4558
|
-
function
|
|
4560
|
+
function Ns(e, t) {
|
|
4559
4561
|
if (!P(e) || e.status !== "set" || !P(e.value) || e.value.kind !== "selection")
|
|
4560
4562
|
return;
|
|
4561
4563
|
const n = Te.safeParse(e.value.selection);
|
|
@@ -4572,7 +4574,7 @@ function tu(e) {
|
|
|
4572
4574
|
return [];
|
|
4573
4575
|
const i = n.namespace;
|
|
4574
4576
|
if (n.contextMode === "none")
|
|
4575
|
-
return [
|
|
4577
|
+
return [ti(i, "none")];
|
|
4576
4578
|
if (!Array.isArray(n.definitions) || !Array.isArray(n.selectionDefinitions) || !P(n.values))
|
|
4577
4579
|
return [];
|
|
4578
4580
|
const r = (p) => P(p) && typeof p.id == "string" && p.id.startsWith(`${i}:`), o = je({
|
|
@@ -4593,14 +4595,14 @@ function tu(e) {
|
|
|
4593
4595
|
}
|
|
4594
4596
|
), u = P(n.values.shared) ? n.values.shared : {}, c = {};
|
|
4595
4597
|
for (const p of s) {
|
|
4596
|
-
const y =
|
|
4598
|
+
const y = _s(
|
|
4597
4599
|
u[p.id],
|
|
4598
4600
|
p.filter.id
|
|
4599
4601
|
);
|
|
4600
4602
|
y && (c[p.id] = y);
|
|
4601
4603
|
}
|
|
4602
4604
|
for (const p of l) {
|
|
4603
|
-
const y =
|
|
4605
|
+
const y = Ns(
|
|
4604
4606
|
u[p.id],
|
|
4605
4607
|
p.sourceCardId
|
|
4606
4608
|
);
|
|
@@ -4641,18 +4643,18 @@ function Bs({
|
|
|
4641
4643
|
(m) => m.code === "contract" && m.contractIssue ? [m.contractIssue] : []
|
|
4642
4644
|
);
|
|
4643
4645
|
if (r.length)
|
|
4644
|
-
throw new
|
|
4645
|
-
const o =
|
|
4646
|
+
throw new Gi(r);
|
|
4647
|
+
const o = ii(e, i), a = ri(i), s = [], l = oi(o, a, i), u = ei(e, {
|
|
4646
4648
|
existingInputs: l
|
|
4647
4649
|
});
|
|
4648
4650
|
s.push(...u), l.push(...u);
|
|
4649
|
-
const c =
|
|
4651
|
+
const c = Zn(t, {
|
|
4650
4652
|
existingInputs: l
|
|
4651
4653
|
});
|
|
4652
4654
|
s.push(...c);
|
|
4653
4655
|
const p = [
|
|
4654
4656
|
...a,
|
|
4655
|
-
...
|
|
4657
|
+
...Qi({
|
|
4656
4658
|
inputs: s,
|
|
4657
4659
|
// Control and card compatibility inputs never reference a filter.
|
|
4658
4660
|
dashboardFilters: []
|
|
@@ -4676,7 +4678,7 @@ function Bs({
|
|
|
4676
4678
|
]
|
|
4677
4679
|
};
|
|
4678
4680
|
}
|
|
4679
|
-
function
|
|
4681
|
+
function ii(e, t) {
|
|
4680
4682
|
return (Array.isArray(e.inputs) ? e.inputs : []).flatMap((i) => {
|
|
4681
4683
|
const r = w(i, "id");
|
|
4682
4684
|
if (!r || t.rejectedInputIds.has(r)) return [];
|
|
@@ -4685,12 +4687,12 @@ function ri(e, t) {
|
|
|
4685
4687
|
return a && a.input.id === r && (a.origin === "embeddedInput" || a.origin === "referencedInput") ? [a.input] : [];
|
|
4686
4688
|
});
|
|
4687
4689
|
}
|
|
4688
|
-
function
|
|
4690
|
+
function ri(e) {
|
|
4689
4691
|
return e.inputs.filter(
|
|
4690
4692
|
(t) => t.origin === "prototypeDocumentInput" || t.origin === "toolbarFilter"
|
|
4691
4693
|
).map((t) => t.input);
|
|
4692
4694
|
}
|
|
4693
|
-
function
|
|
4695
|
+
function oi(e, t, n) {
|
|
4694
4696
|
const i = new Set(
|
|
4695
4697
|
n.inputs.flatMap((r) => r.origin === "toolbarFilter" ? [r.input.id] : [])
|
|
4696
4698
|
);
|
|
@@ -4700,16 +4702,16 @@ function ai(e, t, n) {
|
|
|
4700
4702
|
...n.toolbarFilterVariableNames.map((r) => ({ variableName: r }))
|
|
4701
4703
|
];
|
|
4702
4704
|
}
|
|
4703
|
-
const
|
|
4704
|
-
function
|
|
4705
|
+
const Kt = /* @__PURE__ */ new WeakMap();
|
|
4706
|
+
function Ot({
|
|
4705
4707
|
dashboard: e,
|
|
4706
4708
|
card: t
|
|
4707
4709
|
}) {
|
|
4708
|
-
let n =
|
|
4709
|
-
if (n || (n = Ps(e),
|
|
4710
|
-
const i =
|
|
4710
|
+
let n = Kt.get(e);
|
|
4711
|
+
if (n || (n = Ps(e), Kt.set(e, n)), !t) return n;
|
|
4712
|
+
const i = Zn(t, {
|
|
4711
4713
|
existingInputs: n.inputs
|
|
4712
|
-
}), r =
|
|
4714
|
+
}), r = ai(
|
|
4713
4715
|
i,
|
|
4714
4716
|
je({
|
|
4715
4717
|
inputs: i,
|
|
@@ -4721,33 +4723,33 @@ function Rt({
|
|
|
4721
4723
|
rejected: [...n.rejected, ...r.rejected],
|
|
4722
4724
|
knownFilterIds: /* @__PURE__ */ new Set([
|
|
4723
4725
|
...n.knownFilterIds,
|
|
4724
|
-
...
|
|
4726
|
+
...si(i)
|
|
4725
4727
|
])
|
|
4726
4728
|
};
|
|
4727
4729
|
}
|
|
4728
|
-
const
|
|
4730
|
+
const Rt = /* @__PURE__ */ new WeakMap();
|
|
4729
4731
|
function iu(e) {
|
|
4730
|
-
const t =
|
|
4732
|
+
const t = Rt.get(e);
|
|
4731
4733
|
if (t) return t;
|
|
4732
4734
|
const n = /* @__PURE__ */ new Map();
|
|
4733
|
-
for (const r of
|
|
4735
|
+
for (const r of Ot({
|
|
4734
4736
|
dashboard: e,
|
|
4735
4737
|
card: void 0
|
|
4736
4738
|
}).inputs)
|
|
4737
4739
|
n.set(r.id, r);
|
|
4738
|
-
for (const { card: r } of
|
|
4739
|
-
for (const o of
|
|
4740
|
+
for (const { card: r } of lr(e))
|
|
4741
|
+
for (const o of Ot({
|
|
4740
4742
|
dashboard: e,
|
|
4741
4743
|
card: r
|
|
4742
4744
|
}).inputs)
|
|
4743
4745
|
n.has(o.id) || n.set(o.id, o);
|
|
4744
4746
|
const i = [...n.values()];
|
|
4745
|
-
return
|
|
4747
|
+
return Rt.set(e, i), i;
|
|
4746
4748
|
}
|
|
4747
4749
|
function Ps(e) {
|
|
4748
|
-
const t = K(e), n = Array.isArray(e.inputs) ? e.inputs : [], i =
|
|
4750
|
+
const t = K(e), n = Array.isArray(e.inputs) ? e.inputs : [], i = ii(e, t), r = ri(t), o = oi(i, r, t), a = ei(e, {
|
|
4749
4751
|
existingInputs: o
|
|
4750
|
-
}), s =
|
|
4752
|
+
}), s = ai(
|
|
4751
4753
|
a,
|
|
4752
4754
|
je({
|
|
4753
4755
|
inputs: a,
|
|
@@ -4763,7 +4765,7 @@ function Ps(e) {
|
|
|
4763
4765
|
// Every filter the dashboard defines, a rejected one included, so its
|
|
4764
4766
|
// value is never read as an ad-hoc value.
|
|
4765
4767
|
knownFilterIds: /* @__PURE__ */ new Set([
|
|
4766
|
-
...
|
|
4768
|
+
...si(n),
|
|
4767
4769
|
...t.inputs.map((u) => u.input.filter.id),
|
|
4768
4770
|
...l.flatMap((u) => u.filterId ? [u.filterId] : [])
|
|
4769
4771
|
])
|
|
@@ -4795,7 +4797,7 @@ function Ks(e, t) {
|
|
|
4795
4797
|
};
|
|
4796
4798
|
});
|
|
4797
4799
|
}
|
|
4798
|
-
function
|
|
4800
|
+
function ai(e, t) {
|
|
4799
4801
|
if (t.ok) return { inputs: t.inputs, rejected: [] };
|
|
4800
4802
|
const n = /* @__PURE__ */ new Map();
|
|
4801
4803
|
for (const o of e) {
|
|
@@ -4821,7 +4823,7 @@ function si(e, t) {
|
|
|
4821
4823
|
rejected: r
|
|
4822
4824
|
};
|
|
4823
4825
|
}
|
|
4824
|
-
function
|
|
4826
|
+
function si(e) {
|
|
4825
4827
|
return e.flatMap((t) => {
|
|
4826
4828
|
if (!t || typeof t != "object") return [];
|
|
4827
4829
|
const n = t, i = w(n.filter, "id"), r = w(n.filterReference, "filterId");
|
|
@@ -4836,7 +4838,7 @@ function w(e, t) {
|
|
|
4836
4838
|
const ke = { kind: "cards", cardIds: [] };
|
|
4837
4839
|
function Os(e, t, n) {
|
|
4838
4840
|
var o, a;
|
|
4839
|
-
const i =
|
|
4841
|
+
const i = ln(n), r = (o = i.find(({ card: s }) => s.id === t)) == null ? void 0 : o.sheet;
|
|
4840
4842
|
if (!r) return e;
|
|
4841
4843
|
switch (e.kind) {
|
|
4842
4844
|
case "allSheets": {
|
|
@@ -4864,7 +4866,7 @@ function Rs(e) {
|
|
|
4864
4866
|
}
|
|
4865
4867
|
function qs(e, t) {
|
|
4866
4868
|
var r;
|
|
4867
|
-
const n =
|
|
4869
|
+
const n = Wi(
|
|
4868
4870
|
e,
|
|
4869
4871
|
((r = t.interactionDefaults) == null ? void 0 : r.clickToFilter) ?? "off"
|
|
4870
4872
|
);
|
|
@@ -4898,17 +4900,17 @@ function Vs(e, t) {
|
|
|
4898
4900
|
function Ls(e) {
|
|
4899
4901
|
var i;
|
|
4900
4902
|
const t = Object.keys(((i = e.dashboardInputValues) == null ? void 0 : i.shared) ?? {}).filter(
|
|
4901
|
-
|
|
4903
|
+
yr
|
|
4902
4904
|
);
|
|
4903
4905
|
if (!t.length) return [];
|
|
4904
4906
|
const n = new Map(
|
|
4905
|
-
|
|
4907
|
+
ln(e.dashboard).map((r) => [
|
|
4906
4908
|
r.card.id,
|
|
4907
4909
|
r.card
|
|
4908
4910
|
])
|
|
4909
4911
|
);
|
|
4910
4912
|
return t.flatMap((r) => {
|
|
4911
|
-
const o =
|
|
4913
|
+
const o = gr(r), a = o ? n.get(o) : void 0;
|
|
4912
4914
|
if (!o || !a) return [];
|
|
4913
4915
|
const s = Vs(e.dashboardInputValues, o), l = qs(a, e.dashboard);
|
|
4914
4916
|
return s && l ? [{ input: l, value: s, sourceCard: a }] : [];
|
|
@@ -4916,7 +4918,7 @@ function Ls(e) {
|
|
|
4916
4918
|
}
|
|
4917
4919
|
function js(e) {
|
|
4918
4920
|
const { card: t, input: n } = e;
|
|
4919
|
-
return t.id === n.sourceCardId ? "sourceCard" : t.respondsToSelections === !1 ? "receiverOptedOut" :
|
|
4921
|
+
return t.id === n.sourceCardId ? "sourceCard" : t.respondsToSelections === !1 ? "receiverOptedOut" : nn(
|
|
4920
4922
|
{ scope: n.settings.targets },
|
|
4921
4923
|
{ ...e.target, cardId: t.id }
|
|
4922
4924
|
) ? n.settings.cardMappings.some(
|
|
@@ -4926,11 +4928,11 @@ function js(e) {
|
|
|
4926
4928
|
function zs(e) {
|
|
4927
4929
|
var t;
|
|
4928
4930
|
for (const n of e.filterInputs) {
|
|
4929
|
-
if (!
|
|
4931
|
+
if (!Hi(n).some(
|
|
4930
4932
|
(o) => ae(
|
|
4931
4933
|
o.source,
|
|
4932
4934
|
e.clicked.source
|
|
4933
|
-
) &&
|
|
4935
|
+
) && Yt(
|
|
4934
4936
|
{ kind: "field", field: o },
|
|
4935
4937
|
e.clicked
|
|
4936
4938
|
)
|
|
@@ -4943,13 +4945,13 @@ function zs(e) {
|
|
|
4943
4945
|
}
|
|
4944
4946
|
}
|
|
4945
4947
|
function $s(e) {
|
|
4946
|
-
const { card: t, clicked: n, sourceIndex: i } = e, r =
|
|
4947
|
-
const p =
|
|
4948
|
+
const { card: t, clicked: n, sourceIndex: i } = e, r = _e(n), o = (c) => {
|
|
4949
|
+
const p = Wn({
|
|
4948
4950
|
sourceIndex: i,
|
|
4949
4951
|
target: c
|
|
4950
4952
|
});
|
|
4951
4953
|
return p.status === "valid" && p.grounding === "config" ? { kind: "field", field: { ...c.field, source: p.source } } : void 0;
|
|
4952
|
-
}, a = (c, p, y) =>
|
|
4954
|
+
}, a = (c, p, y) => Gn(n.dataType, c.field.dataType) ? {
|
|
4953
4955
|
status: "apply",
|
|
4954
4956
|
clickedFieldKey: r,
|
|
4955
4957
|
target: c,
|
|
@@ -4971,9 +4973,9 @@ function $s(e) {
|
|
|
4971
4973
|
const c = o(l.target);
|
|
4972
4974
|
return c ? a(c, "borrowedFromFilter", l.inputId) : { status: "block", clickedFieldKey: r, reason: "staleBinding" };
|
|
4973
4975
|
}
|
|
4974
|
-
const u =
|
|
4976
|
+
const u = Ht({
|
|
4975
4977
|
logicalValueField: n,
|
|
4976
|
-
candidates:
|
|
4978
|
+
candidates: Qn({
|
|
4977
4979
|
valueField: n,
|
|
4978
4980
|
valueSources: [n.source],
|
|
4979
4981
|
sourceIndex: i
|
|
@@ -4995,7 +4997,7 @@ function Gs(e) {
|
|
|
4995
4997
|
const { card: t, input: n, value: i } = e, r = { inputId: n.id, sourceCardId: n.sourceCardId }, o = qe(t), a = /* @__PURE__ */ new Map();
|
|
4996
4998
|
for (const c of i.tuples)
|
|
4997
4999
|
for (const p of c.conditions) {
|
|
4998
|
-
const y =
|
|
5000
|
+
const y = _e(p.field);
|
|
4999
5001
|
a.has(y) || a.set(y, p.field);
|
|
5000
5002
|
}
|
|
5001
5003
|
const s = js({
|
|
@@ -5030,7 +5032,7 @@ function Gs(e) {
|
|
|
5030
5032
|
const u = i.tuples.map((c, p) => ({
|
|
5031
5033
|
conditions: c.conditions.flatMap((y, f) => {
|
|
5032
5034
|
const m = l.get(
|
|
5033
|
-
|
|
5035
|
+
_e(y.field)
|
|
5034
5036
|
);
|
|
5035
5037
|
return (m == null ? void 0 : m.status) === "apply" ? [
|
|
5036
5038
|
Us(
|
|
@@ -5076,11 +5078,11 @@ function Qs({
|
|
|
5076
5078
|
);
|
|
5077
5079
|
Js(p);
|
|
5078
5080
|
const y = p.filter(
|
|
5079
|
-
(v) =>
|
|
5081
|
+
(v) => nn(v, u)
|
|
5080
5082
|
);
|
|
5081
5083
|
cl(y);
|
|
5082
5084
|
const f = y.map(
|
|
5083
|
-
(v) =>
|
|
5085
|
+
(v) => li({
|
|
5084
5086
|
dashboard: e,
|
|
5085
5087
|
input: v,
|
|
5086
5088
|
runtimeValues: l,
|
|
@@ -5097,14 +5099,14 @@ function Qs({
|
|
|
5097
5099
|
const D = y[E];
|
|
5098
5100
|
if (!D || !ze(D) || !v.comparisonSelection)
|
|
5099
5101
|
return [];
|
|
5100
|
-
const
|
|
5102
|
+
const _ = ((I = v.slot) == null ? void 0 : I.status) === "set" && v.slot.value.kind === "filter" ? v.slot.value.filterValue : void 0;
|
|
5101
5103
|
return [
|
|
5102
5104
|
{
|
|
5103
5105
|
inputId: v.id,
|
|
5104
5106
|
filterId: D.filter.id,
|
|
5105
5107
|
label: v.label,
|
|
5106
5108
|
filter: D.filter,
|
|
5107
|
-
filterValue:
|
|
5109
|
+
filterValue: _,
|
|
5108
5110
|
selection: v.comparisonSelection
|
|
5109
5111
|
}
|
|
5110
5112
|
];
|
|
@@ -5179,20 +5181,20 @@ function Js(e) {
|
|
|
5179
5181
|
}
|
|
5180
5182
|
function Xs(e) {
|
|
5181
5183
|
const t = new Set(
|
|
5182
|
-
e.filter((n) => !Ce(n)).map(
|
|
5184
|
+
e.filter((n) => !Ce(n)).map(Pt)
|
|
5183
5185
|
);
|
|
5184
5186
|
return e.filter(
|
|
5185
|
-
(n) => !Ce(n) || !t.has(
|
|
5187
|
+
(n) => !Ce(n) || !t.has(Pt(n))
|
|
5186
5188
|
);
|
|
5187
5189
|
}
|
|
5188
|
-
function
|
|
5190
|
+
function li(e) {
|
|
5189
5191
|
var p, y;
|
|
5190
5192
|
const t = Ee(
|
|
5191
5193
|
e.runtimeValues.dashboardInputValues,
|
|
5192
5194
|
e.input,
|
|
5193
5195
|
e.target
|
|
5194
5196
|
), n = Ee(
|
|
5195
|
-
|
|
5197
|
+
Yi(e.dashboard),
|
|
5196
5198
|
e.input,
|
|
5197
5199
|
e.target
|
|
5198
5200
|
), i = (t == null ? void 0 : t.comparisonSelection) ?? (n == null ? void 0 : n.comparisonSelection), r = ze(e.input);
|
|
@@ -5200,13 +5202,13 @@ function ci(e) {
|
|
|
5200
5202
|
throw new Error(
|
|
5201
5203
|
`Dashboard input "${e.input.id}" carries comparison state but is not a supported dashboard date filter.`
|
|
5202
5204
|
);
|
|
5203
|
-
const a = Ce(e.input) && ((p = e.input.compatibility) == null ? void 0 : p.source) !== "documentInput" ? nl(e) :
|
|
5205
|
+
const a = Ce(e.input) && ((p = e.input.compatibility) == null ? void 0 : p.source) !== "documentInput" ? nl(e) : rn({
|
|
5204
5206
|
dashboard: e.dashboard,
|
|
5205
5207
|
input: e.input,
|
|
5206
5208
|
runtimeValues: e.runtimeValues.dashboardInputValues,
|
|
5207
5209
|
target: e.target,
|
|
5208
5210
|
calendar: e.calendar
|
|
5209
|
-
}), s =
|
|
5211
|
+
}), s = Ji(
|
|
5210
5212
|
e.input,
|
|
5211
5213
|
a
|
|
5212
5214
|
), l = (s == null ? void 0 : s.status) === "set" && s.value.kind === e.input.kind ? s.value : void 0;
|
|
@@ -5215,7 +5217,7 @@ function ci(e) {
|
|
|
5215
5217
|
throw new Error(
|
|
5216
5218
|
`Dashboard input "${e.input.id}" carries comparison state but is not a supported dashboard date filter.`
|
|
5217
5219
|
);
|
|
5218
|
-
const f =
|
|
5220
|
+
const f = wr(
|
|
5219
5221
|
s.comparisonSelection,
|
|
5220
5222
|
`dashboardInputValues.${e.input.id}.comparisonSelection`
|
|
5221
5223
|
);
|
|
@@ -5223,7 +5225,7 @@ function ci(e) {
|
|
|
5223
5225
|
throw new Error(((y = f.errors[0]) == null ? void 0 : y.message) || "Invalid comparison selection.");
|
|
5224
5226
|
}
|
|
5225
5227
|
if (e.input.kind === "filter") {
|
|
5226
|
-
const f = (l == null ? void 0 : l.kind) === "filter", m = f ?
|
|
5228
|
+
const f = (l == null ? void 0 : l.kind) === "filter", m = f ? ci(e.input, l.filterValue) : void 0, d = ol({
|
|
5227
5229
|
input: e.input,
|
|
5228
5230
|
filterValue: m
|
|
5229
5231
|
});
|
|
@@ -5235,7 +5237,7 @@ function ci(e) {
|
|
|
5235
5237
|
requiredAtExecution: !!e.input.requiredAtExecution,
|
|
5236
5238
|
slot: s,
|
|
5237
5239
|
rawValue: m ? dl(m.values) : void 0,
|
|
5238
|
-
displayValue:
|
|
5240
|
+
displayValue: qt(d.label ?? d.value),
|
|
5239
5241
|
exports: d,
|
|
5240
5242
|
filter: e.input.filter,
|
|
5241
5243
|
filterValue: m,
|
|
@@ -5256,7 +5258,7 @@ function ci(e) {
|
|
|
5256
5258
|
requiredAtExecution: !!e.input.requiredAtExecution,
|
|
5257
5259
|
slot: s,
|
|
5258
5260
|
rawValue: u,
|
|
5259
|
-
displayValue:
|
|
5261
|
+
displayValue: qt(c.label ?? c.value),
|
|
5260
5262
|
exports: c,
|
|
5261
5263
|
control: e.input.control,
|
|
5262
5264
|
controlValue: u,
|
|
@@ -5313,7 +5315,7 @@ function nl(e) {
|
|
|
5313
5315
|
e.runtimeValues.dashboardInputValues,
|
|
5314
5316
|
e.input,
|
|
5315
5317
|
e.target
|
|
5316
|
-
), i =
|
|
5318
|
+
), i = rn({
|
|
5317
5319
|
dashboard: e.dashboard,
|
|
5318
5320
|
input: e.input,
|
|
5319
5321
|
runtimeValues: e.runtimeValues.dashboardInputValues,
|
|
@@ -5327,8 +5329,8 @@ function nl(e) {
|
|
|
5327
5329
|
e.input
|
|
5328
5330
|
) ? (i == null ? void 0 : i.comparisonSelection) ?? (c ? { mode: "off" } : void 0) : void 0;
|
|
5329
5331
|
if (c) {
|
|
5330
|
-
const y =
|
|
5331
|
-
|
|
5332
|
+
const y = Zt(
|
|
5333
|
+
ci(e.input, c)
|
|
5332
5334
|
);
|
|
5333
5335
|
return (y == null ? void 0 : y.status) === "set" ? {
|
|
5334
5336
|
...y,
|
|
@@ -5346,11 +5348,11 @@ function nl(e) {
|
|
|
5346
5348
|
return bt(o.values[r]);
|
|
5347
5349
|
if (!o.isExplicit)
|
|
5348
5350
|
return t === "dashboardControl" ? bt(
|
|
5349
|
-
|
|
5351
|
+
Xi(
|
|
5350
5352
|
e.input.control,
|
|
5351
5353
|
e.dashboard.defaultControlValues
|
|
5352
5354
|
)
|
|
5353
|
-
) :
|
|
5355
|
+
) : Zi(e.input, e.calendar);
|
|
5354
5356
|
}
|
|
5355
5357
|
function il({
|
|
5356
5358
|
source: e,
|
|
@@ -5369,11 +5371,11 @@ function il({
|
|
|
5369
5371
|
isExplicit: n.controlValues !== void 0
|
|
5370
5372
|
};
|
|
5371
5373
|
}
|
|
5372
|
-
function
|
|
5374
|
+
function ci(e, t) {
|
|
5373
5375
|
const n = t.filterId === e.filter.id ? t : {
|
|
5374
5376
|
...t,
|
|
5375
5377
|
filterId: e.filter.id
|
|
5376
|
-
}, i = e.optionSource ?
|
|
5378
|
+
}, i = e.optionSource ? $n(e.optionSource.valueField.dataType) : void 0, r = e.optionSource ? {
|
|
5377
5379
|
...n,
|
|
5378
5380
|
valueType: i,
|
|
5379
5381
|
dataType: e.optionSource.valueField.dataType || e.filter.dataType
|
|
@@ -5381,9 +5383,9 @@ function ui(e, t) {
|
|
|
5381
5383
|
...e.filter,
|
|
5382
5384
|
dataType: e.optionSource.valueField.dataType || e.filter.dataType
|
|
5383
5385
|
} : e.filter;
|
|
5384
|
-
if (!
|
|
5386
|
+
if (!er(o, r))
|
|
5385
5387
|
return;
|
|
5386
|
-
const a =
|
|
5388
|
+
const a = zn(e, r), s = en({
|
|
5387
5389
|
definition: e.filter,
|
|
5388
5390
|
value: a,
|
|
5389
5391
|
// Retargeting must not make exact metadata from the previous field appear
|
|
@@ -5394,7 +5396,7 @@ function ui(e, t) {
|
|
|
5394
5396
|
});
|
|
5395
5397
|
return rl(
|
|
5396
5398
|
e.filter,
|
|
5397
|
-
|
|
5399
|
+
tr(e, s)
|
|
5398
5400
|
);
|
|
5399
5401
|
}
|
|
5400
5402
|
function rl(e, t) {
|
|
@@ -5404,7 +5406,7 @@ function ol({
|
|
|
5404
5406
|
input: e,
|
|
5405
5407
|
filterValue: t
|
|
5406
5408
|
}) {
|
|
5407
|
-
const n = e.exports ||
|
|
5409
|
+
const n = e.exports || tn(e.filter), i = (t == null ? void 0 : t.values) || [], r = U(e.filter.dataType) === "date", o = i.map(ml), a = r ? o.length > 1 ? `${o[0]}/${o[1]}` : o[0] || "" : o.join(", "), s = {};
|
|
5408
5410
|
for (const l of n)
|
|
5409
5411
|
l === "start" ? s.start = o[0] || null : l === "end" ? s.end = o[1] || null : l === "range" ? s.range = a || null : s[l] = a || null;
|
|
5410
5412
|
return s;
|
|
@@ -5413,7 +5415,7 @@ function al({
|
|
|
5413
5415
|
input: e,
|
|
5414
5416
|
value: t
|
|
5415
5417
|
}) {
|
|
5416
|
-
const n = e.exports || lt(e.control), i = fl(t), r = i.map((s) => pl(e.control, s)).join(", "), o = i.map(
|
|
5418
|
+
const n = e.exports || lt(e.control), i = fl(t), r = i.map((s) => pl(e.control, s)).join(", "), o = i.map(ui).join(", "), a = {};
|
|
5417
5419
|
for (const s of n)
|
|
5418
5420
|
a[s] = s === "label" ? r || null : o || null;
|
|
5419
5421
|
return a;
|
|
@@ -5457,23 +5459,23 @@ function fl(e) {
|
|
|
5457
5459
|
}
|
|
5458
5460
|
function pl(e, t) {
|
|
5459
5461
|
var i;
|
|
5460
|
-
const n =
|
|
5462
|
+
const n = ui(t);
|
|
5461
5463
|
return e.source.kind === "manual" && ((i = e.source.options.find((r) => r.value === n)) == null ? void 0 : i.label) || n;
|
|
5462
5464
|
}
|
|
5463
|
-
function
|
|
5465
|
+
function ui(e) {
|
|
5464
5466
|
return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : e == null ? "" : JSON.stringify(e);
|
|
5465
5467
|
}
|
|
5466
5468
|
function ml(e) {
|
|
5467
5469
|
return e instanceof Date ? e.toISOString() : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : e == null ? "" : JSON.stringify(e);
|
|
5468
5470
|
}
|
|
5469
|
-
function
|
|
5471
|
+
function qt(e) {
|
|
5470
5472
|
return e == null ? "" : String(e);
|
|
5471
5473
|
}
|
|
5472
5474
|
export {
|
|
5473
5475
|
Xs as $,
|
|
5474
|
-
|
|
5476
|
+
so as A,
|
|
5475
5477
|
co as B,
|
|
5476
|
-
|
|
5478
|
+
hn as C,
|
|
5477
5479
|
jl as D,
|
|
5478
5480
|
uo as E,
|
|
5479
5481
|
po as F,
|
|
@@ -5482,10 +5484,10 @@ export {
|
|
|
5482
5484
|
Yc as I,
|
|
5483
5485
|
Jc as J,
|
|
5484
5486
|
Xc as K,
|
|
5485
|
-
|
|
5487
|
+
ao as L,
|
|
5486
5488
|
ls as M,
|
|
5487
5489
|
cs as N,
|
|
5488
|
-
|
|
5490
|
+
Zr as O,
|
|
5489
5491
|
Pl as P,
|
|
5490
5492
|
zl as Q,
|
|
5491
5493
|
Oc as R,
|
|
@@ -5505,13 +5507,13 @@ export {
|
|
|
5505
5507
|
tu as a2,
|
|
5506
5508
|
go as a3,
|
|
5507
5509
|
eu as a4,
|
|
5508
|
-
|
|
5510
|
+
pn as a5,
|
|
5509
5511
|
$o as a6,
|
|
5510
5512
|
Xe as a7,
|
|
5511
5513
|
Fc as a8,
|
|
5512
|
-
|
|
5514
|
+
No as a9,
|
|
5513
5515
|
cc as aA,
|
|
5514
|
-
|
|
5516
|
+
Mn as aB,
|
|
5515
5517
|
Be as aC,
|
|
5516
5518
|
Yl as aD,
|
|
5517
5519
|
va as aE,
|
|
@@ -5524,7 +5526,7 @@ export {
|
|
|
5524
5526
|
Vc as aL,
|
|
5525
5527
|
st as aM,
|
|
5526
5528
|
at as aN,
|
|
5527
|
-
|
|
5529
|
+
qr as aO,
|
|
5528
5530
|
Ba as aP,
|
|
5529
5531
|
Pa as aQ,
|
|
5530
5532
|
Ka as aR,
|
|
@@ -5534,9 +5536,9 @@ export {
|
|
|
5534
5536
|
zo as aV,
|
|
5535
5537
|
Ko as aW,
|
|
5536
5538
|
it as aX,
|
|
5537
|
-
|
|
5539
|
+
On as aY,
|
|
5538
5540
|
Gl as aZ,
|
|
5539
|
-
|
|
5541
|
+
Bt as a_,
|
|
5540
5542
|
Qc as aa,
|
|
5541
5543
|
nu as ab,
|
|
5542
5544
|
Pc as ac,
|
|
@@ -5548,7 +5550,7 @@ export {
|
|
|
5548
5550
|
Ic as ai,
|
|
5549
5551
|
Cc as aj,
|
|
5550
5552
|
Tc as ak,
|
|
5551
|
-
|
|
5553
|
+
At as al,
|
|
5552
5554
|
vc as am,
|
|
5553
5555
|
hc as an,
|
|
5554
5556
|
jo as ao,
|
|
@@ -5557,30 +5559,30 @@ export {
|
|
|
5557
5559
|
Po as ar,
|
|
5558
5560
|
qo as as,
|
|
5559
5561
|
Ro as at,
|
|
5560
|
-
|
|
5562
|
+
Dn as au,
|
|
5561
5563
|
rc as av,
|
|
5562
5564
|
ac as aw,
|
|
5563
5565
|
Oo as ax,
|
|
5564
|
-
|
|
5566
|
+
xn as ay,
|
|
5565
5567
|
$l as az,
|
|
5566
5568
|
Kc as b,
|
|
5567
5569
|
ps as b0,
|
|
5568
5570
|
ms as b1,
|
|
5569
|
-
|
|
5571
|
+
Ot as b2,
|
|
5570
5572
|
Ys as b3,
|
|
5571
5573
|
ll as b4,
|
|
5572
|
-
|
|
5574
|
+
li as b5,
|
|
5573
5575
|
el as b6,
|
|
5574
5576
|
Zo as b7,
|
|
5575
5577
|
Dc as b8,
|
|
5576
5578
|
nc as b9,
|
|
5577
5579
|
Xl as bA,
|
|
5578
5580
|
ec as bB,
|
|
5579
|
-
|
|
5581
|
+
fn as bC,
|
|
5580
5582
|
dc as bD,
|
|
5581
5583
|
Wc as bE,
|
|
5582
5584
|
is as bF,
|
|
5583
|
-
|
|
5585
|
+
_a as bG,
|
|
5584
5586
|
hs as bH,
|
|
5585
5587
|
Ul as bI,
|
|
5586
5588
|
fc as bJ,
|
|
@@ -5603,19 +5605,19 @@ export {
|
|
|
5603
5605
|
Da as bd,
|
|
5604
5606
|
ka as be,
|
|
5605
5607
|
wc as bf,
|
|
5606
|
-
|
|
5608
|
+
_c as bg,
|
|
5607
5609
|
Ke as bh,
|
|
5608
5610
|
xa as bi,
|
|
5609
5611
|
Ma as bj,
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
+
Nc as bk,
|
|
5613
|
+
vn as bl,
|
|
5612
5614
|
Ye as bm,
|
|
5613
5615
|
lc as bn,
|
|
5614
5616
|
Ql as bo,
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
+
Kn as bp,
|
|
5618
|
+
Cn as bq,
|
|
5617
5619
|
de as br,
|
|
5618
|
-
|
|
5620
|
+
Tn as bs,
|
|
5619
5621
|
Hl as bt,
|
|
5620
5622
|
Wl as bu,
|
|
5621
5623
|
Zl as bv,
|
|
@@ -5625,25 +5627,25 @@ export {
|
|
|
5625
5627
|
vo as bz,
|
|
5626
5628
|
yc as c,
|
|
5627
5629
|
We as d,
|
|
5628
|
-
|
|
5630
|
+
Jr as e,
|
|
5629
5631
|
he as f,
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
+
yn as g,
|
|
5633
|
+
gn as h,
|
|
5632
5634
|
Qe as i,
|
|
5633
5635
|
Kl as j,
|
|
5634
5636
|
Ol as k,
|
|
5635
5637
|
iu as l,
|
|
5636
|
-
|
|
5638
|
+
to as m,
|
|
5637
5639
|
Rl as n,
|
|
5638
5640
|
ql as o,
|
|
5639
5641
|
Hc as p,
|
|
5640
|
-
|
|
5642
|
+
no as q,
|
|
5641
5643
|
Qs as r,
|
|
5642
5644
|
Vl as s,
|
|
5643
|
-
|
|
5645
|
+
bn as t,
|
|
5644
5646
|
Ll as u,
|
|
5645
5647
|
ns as v,
|
|
5646
|
-
|
|
5648
|
+
Yn as w,
|
|
5647
5649
|
Rc as x,
|
|
5648
5650
|
qc as y,
|
|
5649
5651
|
Gc as z
|