react-semaphor 0.1.589 → 0.1.591
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 +254 -236
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +7 -7
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/{aggregate-measure-field-BrkXsSJp.js → aggregate-measure-field-DHlDj0Pc.js} +2 -2
- package/dist/chunks/{assistant-chat-DBPa6sJU.js → assistant-chat-Cazikwyh.js} +13 -13
- package/dist/chunks/{bookmark-impact-B7pbMx2e.js → bookmark-impact-rWjQgk8h.js} +2 -2
- package/dist/chunks/{bookmark-state-Bn7k3ttp.js → bookmark-state-Bt_eQEqt.js} +569 -537
- package/dist/chunks/{card-filter-builder-CGM7ROM0.js → card-filter-builder-DFR-6Jpm.js} +929 -910
- package/dist/chunks/{comparison-window-caption-fqijZdVd.js → comparison-window-caption-CFaw-kIV.js} +6 -6
- package/dist/chunks/{dashboard-UXH3E31V.js → dashboard-DCh9hKnJ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CTFuSWH_.js → dashboard-briefing-launcher-ob8G1b58.js} +91 -91
- package/dist/chunks/{dashboard-controls-BcxWhOKw.js → dashboard-controls-Nszg0k1A.js} +64 -64
- package/dist/chunks/{dashboard-json-C-oBcKKC.js → dashboard-json-BpwnG23b.js} +4 -4
- package/dist/chunks/{dates-BunbHJH0.js → dates-BOLBSBpn.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-COjKc_Du.js → edit-dashboard-visual-BvM7br5P.js} +5501 -5475
- package/dist/chunks/filter-line-CYT7KIXb.js +133 -0
- package/dist/chunks/{filter-reach-copy-D5AmDHda.js → filter-reach-copy-By3r7O3G.js} +11 -11
- package/dist/chunks/filter-value-text-CFiIZWJP.js +153 -0
- package/dist/chunks/{index-dGxJTaP1.js → index-CsQYlwhU.js} +5 -5
- package/dist/chunks/{layout-grid-BG__sPkb.js → layout-grid-DoFIfQGd.js} +1 -1
- package/dist/chunks/{list-filter-Cb8i7N8f.js → list-filter-BeTQxjNy.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-SN0JUJVk.js → matrix-analytical-definition-CyWOwLmE.js} +202 -190
- package/dist/chunks/{matrix-member-presentation-DVBJR0MA.js → matrix-member-presentation-Bj2YcHAP.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-JSmproo9.js → matrix-operation-contract-CAanJeCj.js} +60 -60
- package/dist/chunks/{metric-comparison-xE_J6hkg.js → metric-comparison-BeKnUD08.js} +27 -31
- package/dist/chunks/{paintbrush-C310xSuR.js → paintbrush-KeaU1L1a.js} +1 -1
- package/dist/chunks/{palette-Ci5P91Zb.js → palette-BcFJLeXB.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-D-DfPAjb.js → pivot-header-presentation-gUxhdIdr.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DbBahmgc.js → pivot-result-contract-expectations-BkMRCjzf.js} +111 -111
- package/dist/chunks/{pivot-result-identity-CUsMt_4r.js → pivot-result-identity-BKUjYO1u.js} +1 -1
- package/dist/chunks/raw-temporal-value-BzdgeDa7.js +454 -0
- package/dist/chunks/{report-preferences-dialog-DtuOcejh.js → report-preferences-dialog-ChXt8wCt.js} +13 -13
- package/dist/chunks/{report-runtime-context-CrOgmuxO.js → report-runtime-context-g4Zp_TU9.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-DFBIngUZ.js → resolve-dashboard-input-context-BlyFX8He.js} +5053 -4955
- package/dist/chunks/{save-BhhXfp4s.js → save-C9CZAk6V.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DKMTP9ib.js → saved-dashboard-context-BPSdH2jW.js} +7 -7
- package/dist/chunks/{selection-filter-compiler-DkIjp1yH.js → selection-filter-compiler-BclSpK3P.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-HGEnCavj.js → semaphor-ready-indicator-BZUMCHRU.js} +28972 -28922
- package/dist/chunks/{shelf-drop-preview-context-DaCXCdMA.js → shelf-drop-preview-context-yJheoeTC.js} +5 -5
- package/dist/chunks/{stored-dashboard-CksluF2S.js → stored-dashboard-CxQl9g0l.js} +654 -658
- package/dist/chunks/{style-sheet-parts-CmXmKqGw.js → style-sheet-parts-DM_Mw_sm.js} +45 -42
- package/dist/chunks/{table-export-sheet-ClSgERQC.js → table-export-sheet-h7wm5TwP.js} +1 -1
- package/dist/chunks/{token-types-DTocOcwt.js → token-types-BB2ImFx6.js} +1 -1
- package/dist/chunks/{upload-DDYc1Qjj.js → upload-CMTCg47S.js} +1 -1
- package/dist/chunks/{validators-CrYXNnNE.js → validators-BlEWWX9O.js} +576 -562
- package/dist/chunks/{variable-draft-rbtGPvmX.js → variable-draft-OpYyaVCW.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1602 -1555
- package/dist/format-utils/index.js +14 -14
- package/dist/index.js +18 -18
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/surfboard/filter/types.d.ts +7 -5
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/dashboard-date-comparison-plan.d.ts +0 -1
- package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +2 -2
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +2 -1
- package/dist/types/shared/analytics-protocol/relative-date/sentence.d.ts +81 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +0 -9
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +23 -2
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +84 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +36 -36
- package/dist/types/shared/dashboard-authoring/filter-model/date-filter-default.d.ts +37 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunks/filter-line-Dza3ee4w.js +0 -131
- package/dist/chunks/filter-value-text-DQw4v3nC.js +0 -146
- package/dist/chunks/raw-temporal-value-BnGCWJAL.js +0 -322
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as en } from "./matrix-operation-contract-
|
|
4
|
-
import { S as
|
|
1
|
+
import { hN as fo, cU as mo, ch as po, aX as go, bj as yo, f as bo, c9 as Co, N as ie, hO as ho, hP as ze, eC as Nt, eF as Io, bS as vo, hQ as Fo, ax as Do, gR as Lt, gT as So, bD as Ge, hR as jt, P as To, gV as Mo, dp as Te, s as R, gM as Me, n as He, hS as Vo, gZ as ko, dg as zt, di as Gt, d1 as Po, dn as xo, dl as Ct, dm as wo, b as Oo, d3 as Bo, df as Ao, dd as Eo, bG as Ht, be as _o, a4 as N, hp as Ro, hT as Ve, hU as Ut, hV as Ko, hW as Ue, hE as ke, hX as qo, hY as $e, hZ as No, h_ as Lo, h$ as jo, i0 as zo, i1 as Go, l as Qe, i2 as Ho, k as ne, r as Uo, h as $o, i3 as J, gD as We, i4 as ye, i5 as $t, i6 as Qo, J as Wo, i7 as Jo, i8 as Zo, gw as Qt, i9 as Yo, ia as Xo, e as er, ib as tr, ic as Wt, id as nr, a0 as Jt, ie as or, ig as rr, ih as Zt, j as Je, ii as ir, cI as sr, a5 as ar, o as Yt, cH as lr, hB as cr, q as dr, t as ht, C as ur, ij as fr, ik as mr, cJ as pr, il as gr } from "./resolve-dashboard-input-context-BlyFX8He.js";
|
|
2
|
+
import { am as yr, a7 as se, M as br, x as Cr, ay as _e, y as hr, a9 as be, aA as Xt, W as Ir, b as vr, r as Fr, k as Dr, aE as Sr } from "./validators-BlEWWX9O.js";
|
|
3
|
+
import { r as en } from "./matrix-operation-contract-CAanJeCj.js";
|
|
4
|
+
import { S as Ze } from "./analytics-base-schemas-8wz9vqn_.js";
|
|
5
5
|
import "./pickers-DkqmtnTL.js";
|
|
6
6
|
import { canonicalizeSupportedCurrencyCode as tn } from "../value-format-preferences/index.js";
|
|
7
|
-
import { ZodError as
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
7
|
+
import { ZodError as Tr } from "zod";
|
|
8
|
+
import { c as Ce, r as Mr, b4 as Vr, i as kr, aN as Pr, aj as It, aL as vt } from "./pivot-result-contract-expectations-BkMRCjzf.js";
|
|
9
|
+
import { aD as nn, aE as on, aF as Oe, a2 as xr, aG as rn, aH as sn, aC as an, aI as ln, n as wr, l as Or, v as cn, t as U, aJ as dn, k as un, C as Re, aK as Q, z as ae, i as fn, o as Br, u as Ar, B as Ye, aL as Er, ak as _r, F as mn, D as Rr, J as Ft, O as pn, P as gn, I as yn } from "./bookmark-state-Bt_eQEqt.js";
|
|
10
10
|
import "./schema-C9NPiIru.js";
|
|
11
11
|
import "./index-CV_Kzou0.js";
|
|
12
12
|
import "./context-CVXTFljo.js";
|
|
13
|
-
import { a as
|
|
14
|
-
import { D as
|
|
15
|
-
import { isPdfTableCardType as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import { a as le, C as
|
|
19
|
-
import { r as
|
|
20
|
-
import { p as
|
|
21
|
-
const
|
|
13
|
+
import { a as Kr, k as qr, s as Nr, i as Lr } from "./matrix-analytical-definition-CyWOwLmE.js";
|
|
14
|
+
import { D as jr } from "./report-runtime-context-g4Zp_TU9.js";
|
|
15
|
+
import { isPdfTableCardType as zr, PDF_CAPACITY as Gr } from "../pdf-export-policy/index.js";
|
|
16
|
+
import { K as Dt } from "./raw-temporal-value-BzdgeDa7.js";
|
|
17
|
+
import { t as Hr, n as Ur, c as $r } from "./selection-filter-compiler-BclSpK3P.js";
|
|
18
|
+
import { a as le, C as Qr } from "./metric-comparison-BeKnUD08.js";
|
|
19
|
+
import { r as Wr } from "./pivot-result-identity-BKUjYO1u.js";
|
|
20
|
+
import { p as Jr } from "./pivot-header-presentation-gUxhdIdr.js";
|
|
21
|
+
const Zr = (e, t) => {
|
|
22
22
|
const n = {};
|
|
23
23
|
if (e === null || t === null)
|
|
24
24
|
return t;
|
|
@@ -37,7 +37,7 @@ const Jr = (e, t) => {
|
|
|
37
37
|
if (Array.isArray(i) && Array.isArray(s))
|
|
38
38
|
n[r] = s;
|
|
39
39
|
else if (St(i) && St(s)) {
|
|
40
|
-
const a =
|
|
40
|
+
const a = Zr(i, s);
|
|
41
41
|
Object.keys(a).length > 0 && (n[r] = a);
|
|
42
42
|
} else
|
|
43
43
|
n[r] = s;
|
|
@@ -52,7 +52,7 @@ const Jr = (e, t) => {
|
|
|
52
52
|
return n.length !== o.length ? !1 : n.every((r) => Ke(e[r], t[r]));
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
|
-
}, St = (e) => e !== null && typeof e == "object" && !Array.isArray(e),
|
|
55
|
+
}, St = (e) => e !== null && typeof e == "object" && !Array.isArray(e), he = (e) => {
|
|
56
56
|
if (e === null || typeof e != "object")
|
|
57
57
|
return e;
|
|
58
58
|
if (e instanceof Date)
|
|
@@ -60,34 +60,34 @@ const Jr = (e, t) => {
|
|
|
60
60
|
if (e instanceof RegExp)
|
|
61
61
|
return new RegExp(e);
|
|
62
62
|
if (Array.isArray(e))
|
|
63
|
-
return e.map((n) =>
|
|
63
|
+
return e.map((n) => he(n));
|
|
64
64
|
const t = {};
|
|
65
65
|
for (const n in e)
|
|
66
|
-
Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
66
|
+
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = he(e[n]));
|
|
67
67
|
return t;
|
|
68
|
-
},
|
|
69
|
-
function
|
|
70
|
-
return typeof e == "string" &&
|
|
68
|
+
}, Yr = /^(?:[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 Xr(e) {
|
|
70
|
+
return typeof e == "string" && Yr.test(e);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (!
|
|
72
|
+
function ei(e) {
|
|
73
|
+
if (!Xr(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 ti(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 ni = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", oi = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
87
|
+
function ri(e, t, n) {
|
|
88
88
|
function o(r, i, s, a) {
|
|
89
89
|
var c;
|
|
90
|
-
if (typeof r == "string" && (r =
|
|
90
|
+
if (typeof r == "string" && (r = ti(r)), typeof i == "string" && (i = ei(i)), ((c = i) === null || c === void 0 ? void 0 : c.length) !== 16)
|
|
91
91
|
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
92
92
|
let l = new Uint8Array(16 + r.length);
|
|
93
93
|
if (l.set(i), l.set(r, i.length), l = n(l), l[6] = l[6] & 15 | t, l[8] = l[8] & 63 | 128, s) {
|
|
@@ -102,9 +102,9 @@ function ni(e, t, n) {
|
|
|
102
102
|
o.name = e;
|
|
103
103
|
} catch {
|
|
104
104
|
}
|
|
105
|
-
return o.DNS =
|
|
105
|
+
return o.DNS = ni, o.URL = oi, o;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function ii(e, t, n, o) {
|
|
108
108
|
switch (e) {
|
|
109
109
|
case 0:
|
|
110
110
|
return t & n ^ ~t & o;
|
|
@@ -119,7 +119,7 @@ function oi(e, t, n, o) {
|
|
|
119
119
|
function Be(e, t) {
|
|
120
120
|
return e << t | e >>> 32 - t;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function si(e) {
|
|
123
123
|
const t = [1518500249, 1859775393, 2400959708, 3395469782], n = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
124
124
|
if (typeof e == "string") {
|
|
125
125
|
const s = unescape(encodeURIComponent(e));
|
|
@@ -144,15 +144,15 @@ function ri(e) {
|
|
|
144
144
|
a[p] = Be(a[p - 3] ^ a[p - 8] ^ a[p - 14] ^ a[p - 16], 1);
|
|
145
145
|
let c = n[0], l = n[1], d = n[2], u = n[3], f = n[4];
|
|
146
146
|
for (let p = 0; p < 80; ++p) {
|
|
147
|
-
const g = Math.floor(p / 20), m = Be(c, 5) +
|
|
147
|
+
const g = Math.floor(p / 20), m = Be(c, 5) + ii(g, l, d, u) + f + t[g] + a[p] >>> 0;
|
|
148
148
|
f = u, u = d, d = Be(l, 30) >>> 0, l = c, c = m;
|
|
149
149
|
}
|
|
150
150
|
n[0] = n[0] + c >>> 0, n[1] = n[1] + l >>> 0, n[2] = n[2] + d >>> 0, n[3] = n[3] + u >>> 0, n[4] = n[4] + f >>> 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 ai = ri("v5", 80, si), Tt = /\[\[\s*param\.([A-Za-z0-9_.-]+)\s*\]\]/g, Mt = /\bparam\s*\(\s*(['"])([^'"]+)\1/g;
|
|
155
|
+
function li(e) {
|
|
156
156
|
const t = [];
|
|
157
157
|
let n = 0;
|
|
158
158
|
for (; n < e.length; ) {
|
|
@@ -179,7 +179,7 @@ function bn(e) {
|
|
|
179
179
|
const i = (o = n[1]) == null ? void 0 : o.trim();
|
|
180
180
|
i && t.add(i);
|
|
181
181
|
}
|
|
182
|
-
for (const i of
|
|
182
|
+
for (const i of li(e))
|
|
183
183
|
for (Mt.lastIndex = 0; (n = Mt.exec(i)) !== null; ) {
|
|
184
184
|
const s = (r = n[2]) == null ? void 0 : r.trim();
|
|
185
185
|
s && t.add(s);
|
|
@@ -194,7 +194,7 @@ function Xe(e) {
|
|
|
194
194
|
t.add(n.get(o) ?? o);
|
|
195
195
|
return Array.from(t);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function ci(e) {
|
|
198
198
|
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
199
199
|
for (const o of e.controlBindings || [])
|
|
200
200
|
o.target === "sql_param" && n.set(o.paramId, o.controlId);
|
|
@@ -205,12 +205,12 @@ function ai(e) {
|
|
|
205
205
|
});
|
|
206
206
|
return Array.from(t.values());
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function di(e, t) {
|
|
209
209
|
var r;
|
|
210
210
|
const n = (r = e.controlBindings) == null ? void 0 : r.map((i) => ({
|
|
211
211
|
...i,
|
|
212
212
|
controlId: t.get(i.controlId) ?? i.controlId
|
|
213
|
-
})), o =
|
|
213
|
+
})), o = ci(e).flatMap(
|
|
214
214
|
({ paramId: i, controlId: s }) => {
|
|
215
215
|
var c;
|
|
216
216
|
const a = t.get(s);
|
|
@@ -221,7 +221,7 @@ function li(e, t) {
|
|
|
221
221
|
);
|
|
222
222
|
return o.length ? [...n ?? [], ...o] : n;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Cn(e, t) {
|
|
225
225
|
var s, a;
|
|
226
226
|
const n = Oe(e) ?? e, o = n.source === "dashboardInputAlias" ? (s = t.inputAliases) == null ? void 0 : s[n.variableName] : void 0, r = n.source === "dashboardInputAlias" && o ? Oe(o) ?? Oe({ ...o, export: n.export ?? "label" }) ?? n : n, i = n.source === "dashboardInputAlias" && r !== n ? { ...r, export: n.export ?? "label" } : r;
|
|
227
227
|
return i.source === "input" ? {
|
|
@@ -229,7 +229,7 @@ function hn(e, t) {
|
|
|
229
229
|
inputId: ((a = t.inputIds) == null ? void 0 : a[i.inputId]) ?? i.inputId
|
|
230
230
|
} : i;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function ui(e, t) {
|
|
233
233
|
var r;
|
|
234
234
|
const n = {};
|
|
235
235
|
for (const i of [
|
|
@@ -246,13 +246,13 @@ function ci(e, t) {
|
|
|
246
246
|
}
|
|
247
247
|
const o = { ...t.inputAliases };
|
|
248
248
|
for (const [i, s] of Object.entries((e == null ? void 0 : e.inputAliases) ?? {}))
|
|
249
|
-
o[i] =
|
|
249
|
+
o[i] = Cn(s, t);
|
|
250
250
|
return Object.keys(o).length && (n.inputAliases = o), n;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function fl(e, t) {
|
|
253
253
|
var r, i, s, a;
|
|
254
|
-
const n =
|
|
255
|
-
n.controlBindings =
|
|
254
|
+
const n = he(nn(e));
|
|
255
|
+
n.controlBindings = di(
|
|
256
256
|
e,
|
|
257
257
|
new Map(Object.entries(t.controlIds ?? {}))
|
|
258
258
|
);
|
|
@@ -272,7 +272,7 @@ function dl(e, t) {
|
|
|
272
272
|
l,
|
|
273
273
|
on(
|
|
274
274
|
l,
|
|
275
|
-
(f) => f && typeof f == "object" ?
|
|
275
|
+
(f) => f && typeof f == "object" ? Cn(f, t) : f
|
|
276
276
|
)
|
|
277
277
|
), typeof l.entityId == "string") {
|
|
278
278
|
const f = l.entityId;
|
|
@@ -288,37 +288,37 @@ function dl(e, t) {
|
|
|
288
288
|
c.cardId = ((a = t.cardIds) == null ? void 0 : a[c.cardId]) ?? c.cardId;
|
|
289
289
|
return n;
|
|
290
290
|
}
|
|
291
|
-
const
|
|
292
|
-
function
|
|
291
|
+
const fi = "9677efdd-86ec-4afb-b9bb-5ead8b5442af";
|
|
292
|
+
function mi(e) {
|
|
293
293
|
let t = 0;
|
|
294
|
-
return () =>
|
|
294
|
+
return () => ai(`${e}#${t++}`, fi);
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const pi = [
|
|
297
297
|
{ code: "matrix_definition_incomplete", label: "Matrix definition" }
|
|
298
|
-
],
|
|
298
|
+
], gi = [
|
|
299
299
|
{ code: "connection_type_unresolved", label: "Connection type" }
|
|
300
300
|
], ee = (e) => !Array.isArray(e) || e.length === 0;
|
|
301
|
-
function
|
|
301
|
+
function yi(e) {
|
|
302
302
|
var i;
|
|
303
303
|
const t = e.config ?? {};
|
|
304
304
|
if ((i = e.sql) != null && i.trim() || !ee(t.pivotByColumns)) return "matrixTable";
|
|
305
305
|
const n = !ee(t.groupByColumns), o = !ee(t.metricColumns), r = e.type === "pivotTable" && (n || o) && ee(t.rowAggregates) && ee(t.columnAggregates);
|
|
306
306
|
return n && !o || r ? "table" : "matrixTable";
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function bi(e) {
|
|
309
309
|
var r;
|
|
310
310
|
const t = e.dataSource;
|
|
311
311
|
if (!t || (r = t.connectionType) != null && r.trim()) return e;
|
|
312
|
-
const n = yr(
|
|
312
|
+
const n = yr(Co(t.selectedEntities));
|
|
313
313
|
if (!n) return e;
|
|
314
314
|
const o = Array.isArray(t.selectedEntities) ? t.selectedEntities.map((i) => i && typeof i == "object" && "connectionType" in i && !String(i.connectionType ?? "").trim() ? { ...i, connectionType: n } : i) : t.selectedEntities;
|
|
315
315
|
return { ...e, dataSource: { ...t, connectionType: n, selectedEntities: o } };
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function hn(e) {
|
|
318
318
|
var s, a;
|
|
319
319
|
const t = e;
|
|
320
320
|
if (!po(t)) return { status: "not_legacy", card: e };
|
|
321
|
-
const n =
|
|
321
|
+
const n = bi(t), o = yi(t) === "table" ? go(n, "table") : yo(n, "matrixTable", { createId: mi(t.id) });
|
|
322
322
|
if (o.status !== "changed") throw new Error(`Card ${t.id} could not leave ${t.type}.`);
|
|
323
323
|
const r = o.card.type === "matrixTable" && bo(o.card).status !== "ready", i = !!n.dataSource && !((a = (s = n.dataSource) == null ? void 0 : s.connectionType) != null && a.trim());
|
|
324
324
|
return {
|
|
@@ -326,27 +326,27 @@ function Cn(e) {
|
|
|
326
326
|
card: o.card,
|
|
327
327
|
gaps: [
|
|
328
328
|
...o.gaps,
|
|
329
|
-
...r ?
|
|
330
|
-
...i ?
|
|
329
|
+
...r ? pi : [],
|
|
330
|
+
...i ? gi : []
|
|
331
331
|
]
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function ml(e) {
|
|
335
335
|
if (!e.cards) return e;
|
|
336
|
-
const t = e.cards.map((n) =>
|
|
336
|
+
const t = e.cards.map((n) => hn(n).card);
|
|
337
337
|
return t.every((n, o) => n === e.cards[o]) ? e : { ...e, cards: t };
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function Ci(e) {
|
|
340
340
|
const t = [];
|
|
341
|
-
return { dashboard:
|
|
342
|
-
const i =
|
|
341
|
+
return { dashboard: xr(e, (o, r) => {
|
|
342
|
+
const i = hn(o);
|
|
343
343
|
return i.status === "routed" && i.gaps.length && t.push({ location: r, gaps: i.gaps }), i.card;
|
|
344
344
|
}), routedWithGaps: t };
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function hi(e, t) {
|
|
347
347
|
return e.name === t.name && e.qualifiedEntityName === t.qualifiedEntityName;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Ii(e, t, n) {
|
|
350
350
|
var r, i;
|
|
351
351
|
if (n.sortPolicy === "dropUnrelatedSorts") {
|
|
352
352
|
const s = new Set(
|
|
@@ -365,7 +365,7 @@ function hi(e, t, n) {
|
|
|
365
365
|
...e,
|
|
366
366
|
groupByColumns: [t],
|
|
367
367
|
sortByColumns: (i = e.sortByColumns) == null ? void 0 : i.map(
|
|
368
|
-
(s) => o &&
|
|
368
|
+
(s) => o && hi(s, o) ? {
|
|
369
369
|
...t,
|
|
370
370
|
role: "sortby",
|
|
371
371
|
direction: s.direction
|
|
@@ -373,7 +373,7 @@ function hi(e, t, n) {
|
|
|
373
373
|
)
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function pl(e) {
|
|
377
377
|
switch (e) {
|
|
378
378
|
case "previous_period":
|
|
379
379
|
return "Previous";
|
|
@@ -390,13 +390,13 @@ function In(e, t, n) {
|
|
|
390
390
|
if (((o = n == null ? void 0 : n.output) == null ? void 0 : o.availability.status) === "available" && n.output.comparisonColumnKey)
|
|
391
391
|
return n.output.comparisonColumnKey;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function vi(e, t) {
|
|
394
394
|
return `${e} Δ`;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function gl(e, t) {
|
|
397
397
|
return rn(e, t);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function Fi(e, t) {
|
|
400
400
|
return e.rawKey === t.rawKey && e.outputKey === t.outputKey;
|
|
401
401
|
}
|
|
402
402
|
function vn(e) {
|
|
@@ -410,14 +410,14 @@ function vn(e) {
|
|
|
410
410
|
var d;
|
|
411
411
|
if (r && c.id !== r) return !1;
|
|
412
412
|
const l = (d = n.byMetricAlias) == null ? void 0 : d[le(c)];
|
|
413
|
-
return !!(l &&
|
|
413
|
+
return !!(l && Fi(i, l));
|
|
414
414
|
});
|
|
415
415
|
return s.length === 1 ? s[0] : void 0;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function yl(e, t) {
|
|
418
418
|
return t ? { ...e, config: t } : e;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Di(e) {
|
|
421
421
|
return [
|
|
422
422
|
e.alias,
|
|
423
423
|
e.name,
|
|
@@ -425,10 +425,10 @@ function vi(e) {
|
|
|
425
425
|
e.id
|
|
426
426
|
].filter((t) => !!t);
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Z(e) {
|
|
429
429
|
return e != null && e.config ? ie(e) === "config" : !1;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Si(e, t, n, o) {
|
|
432
432
|
if (t === -1 || n === -1 || t === n)
|
|
433
433
|
return null;
|
|
434
434
|
const r = [...e], [i] = r.splice(t, 1), s = o === "before" ? n > t ? n - 1 : n : n > t ? n : n + 1;
|
|
@@ -441,7 +441,7 @@ function Ae(e, t, n) {
|
|
|
441
441
|
), r = e.findIndex(
|
|
442
442
|
(i) => n(i).includes(t.targetColumnId)
|
|
443
443
|
);
|
|
444
|
-
return
|
|
444
|
+
return Si(e, o, r, t.side);
|
|
445
445
|
}
|
|
446
446
|
function Ee(e, t, n) {
|
|
447
447
|
return n ? {
|
|
@@ -449,8 +449,8 @@ function Ee(e, t, n) {
|
|
|
449
449
|
[t]: n
|
|
450
450
|
} : null;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
if (!
|
|
452
|
+
function bl(e, t, n) {
|
|
453
|
+
if (!Z(e) || !n) return null;
|
|
454
454
|
const o = e.config;
|
|
455
455
|
return e.type === "detailTable" ? Ee(
|
|
456
456
|
o,
|
|
@@ -478,12 +478,12 @@ function gl(e, t, n) {
|
|
|
478
478
|
)
|
|
479
479
|
);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Ti(e) {
|
|
482
482
|
var t, n, o, r, i, s;
|
|
483
|
-
return
|
|
483
|
+
return Z(e) ? e.type === "detailTable" ? !!((n = (t = e.config) == null ? void 0 : t.detailColumns) != null && n.length) : !!((r = (o = e.config) == null ? void 0 : o.groupByColumns) != null && r.length || (s = (i = e.config) == null ? void 0 : i.metricColumns) != null && s.length) : !1;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Cl(e, t) {
|
|
486
|
+
return Ti(e) && !!t;
|
|
487
487
|
}
|
|
488
488
|
function ge(e, t, n) {
|
|
489
489
|
if (!n) return [];
|
|
@@ -494,7 +494,7 @@ function ge(e, t, n) {
|
|
|
494
494
|
var a;
|
|
495
495
|
const s = (a = n.byMetricAlias) == null ? void 0 : a[i];
|
|
496
496
|
return s ? [s] : [];
|
|
497
|
-
}) : [], r =
|
|
497
|
+
}) : [], r = Wr(
|
|
498
498
|
n,
|
|
499
499
|
e.id,
|
|
500
500
|
t
|
|
@@ -509,12 +509,12 @@ function ce(e, t, n, o) {
|
|
|
509
509
|
);
|
|
510
510
|
return o ? r.find(
|
|
511
511
|
(i) => n.includes(i)
|
|
512
|
-
) :
|
|
512
|
+
) : Di(e).find(
|
|
513
513
|
(i) => n.includes(i)
|
|
514
514
|
);
|
|
515
515
|
}
|
|
516
516
|
function Fn(e, t, n) {
|
|
517
|
-
if (!
|
|
517
|
+
if (!Z(t) || !n)
|
|
518
518
|
return;
|
|
519
519
|
const o = t.type === "detailTable" ? [{ role: "detail", fields: t.config.detailColumns }] : [
|
|
520
520
|
{ role: "groupby", fields: t.config.groupByColumns },
|
|
@@ -530,12 +530,12 @@ function Fn(e, t, n) {
|
|
|
530
530
|
) === e && typeof s.label == "string" && s.label.length > 0)
|
|
531
531
|
return s.label;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Mi(e, t) {
|
|
534
534
|
if (!e) return;
|
|
535
535
|
const n = JSON.stringify(t), o = t.every((r) => r !== null) ? t.join("__") : void 0;
|
|
536
536
|
return e[n] || (o ? e[o] : void 0);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Vi(e, t, n) {
|
|
539
539
|
if (!e) return;
|
|
540
540
|
let o = e, r = !1;
|
|
541
541
|
return t.forEach((i, s) => {
|
|
@@ -548,7 +548,7 @@ function Ti(e, t, n) {
|
|
|
548
548
|
});
|
|
549
549
|
}), r && o.trim() ? o : void 0;
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function ki(e) {
|
|
552
552
|
const t = (e.card.config.metricColumns || []).filter(
|
|
553
553
|
(n) => n.id === e.metricId && le(n) === e.metricAlias
|
|
554
554
|
);
|
|
@@ -569,12 +569,12 @@ function et(e) {
|
|
|
569
569
|
}
|
|
570
570
|
))
|
|
571
571
|
return;
|
|
572
|
-
const o = e.card.config.metricColumns || [], r =
|
|
572
|
+
const o = e.card.config.metricColumns || [], r = ki({
|
|
573
573
|
card: e.card,
|
|
574
574
|
columnKeyMap: e.columnKeyMap,
|
|
575
575
|
metricId: t.metricId,
|
|
576
576
|
metricAlias: t.metricAlias
|
|
577
|
-
}), i = o.length === 0 && t.metricId ===
|
|
577
|
+
}), i = o.length === 0 && t.metricId === Ze;
|
|
578
578
|
if (!(!r && !i))
|
|
579
579
|
return {
|
|
580
580
|
resultColumn: e.resultColumn,
|
|
@@ -584,7 +584,7 @@ function et(e) {
|
|
|
584
584
|
authoredMetric: r
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Pi(e) {
|
|
588
588
|
const {
|
|
589
589
|
columnId: t,
|
|
590
590
|
card: n,
|
|
@@ -593,7 +593,7 @@ function Vi(e) {
|
|
|
593
593
|
temporalPresentation: i,
|
|
594
594
|
metricLabelOverride: s
|
|
595
595
|
} = e;
|
|
596
|
-
if (!
|
|
596
|
+
if (!Z(n) || n.type !== "table")
|
|
597
597
|
return;
|
|
598
598
|
const a = et({
|
|
599
599
|
resultColumn: r == null ? void 0 : r.find((I) => I.key === t),
|
|
@@ -601,11 +601,11 @@ function Vi(e) {
|
|
|
601
601
|
columnKeyMap: o
|
|
602
602
|
});
|
|
603
603
|
if (!a) return;
|
|
604
|
-
const { identity: c, pivotFields: l, authoredMetrics: d, authoredMetric: u } = a, p =
|
|
604
|
+
const { identity: c, pivotFields: l, authoredMetrics: d, authoredMetric: u } = a, p = Jr({
|
|
605
605
|
members: c.members,
|
|
606
606
|
resolveTemporalFormat: (I) => {
|
|
607
607
|
var v;
|
|
608
|
-
return (v =
|
|
608
|
+
return (v = ho({
|
|
609
609
|
presentation: i,
|
|
610
610
|
fieldId: I,
|
|
611
611
|
role: "pivotby"
|
|
@@ -613,7 +613,7 @@ function Vi(e) {
|
|
|
613
613
|
}
|
|
614
614
|
}).memberLabels.map(
|
|
615
615
|
(I) => I || "(Blank)"
|
|
616
|
-
), g = c.members.map((I) => I.value), m =
|
|
616
|
+
), g = c.members.map((I) => I.value), m = Mi(u == null ? void 0 : u.valueAliases, g) || Vi(
|
|
617
617
|
u == null ? void 0 : u.aliasTemplate,
|
|
618
618
|
l,
|
|
619
619
|
p
|
|
@@ -631,7 +631,7 @@ function H(e, t, n, o) {
|
|
|
631
631
|
).filter((r) => !!r) : [];
|
|
632
632
|
}
|
|
633
633
|
function Vt(e, t, n, o) {
|
|
634
|
-
if (!
|
|
634
|
+
if (!Z(t) || !o) return e;
|
|
635
635
|
const r = [], i = (s) => {
|
|
636
636
|
s && e.includes(s) && !r.includes(s) && r.push(s);
|
|
637
637
|
};
|
|
@@ -654,7 +654,7 @@ function Vt(e, t, n, o) {
|
|
|
654
654
|
i(s), i(n == null ? void 0 : n(s));
|
|
655
655
|
})), e.forEach(i), r;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function xi(e, t) {
|
|
658
658
|
var f, p, g;
|
|
659
659
|
const { keys: n, card: o, columnKeyMap: r, resultColumns: i } = e;
|
|
660
660
|
if (!((f = o.config.pivotByColumns) != null && f.length)) return null;
|
|
@@ -707,7 +707,7 @@ function ki(e, t) {
|
|
|
707
707
|
u(m), u(t(m));
|
|
708
708
|
}), n.forEach(u), d;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function wi(e) {
|
|
711
711
|
var c;
|
|
712
712
|
const { keys: t, card: n, comparisonMetadata: o, columnKeyMap: r, resultColumns: i } = e;
|
|
713
713
|
if ((n == null ? void 0 : n.type) !== "table")
|
|
@@ -736,8 +736,8 @@ function Pi(e) {
|
|
|
736
736
|
g && s.set(p, g);
|
|
737
737
|
});
|
|
738
738
|
const a = (l) => s.get(l) ?? null;
|
|
739
|
-
if (
|
|
740
|
-
const l =
|
|
739
|
+
if (Z(n)) {
|
|
740
|
+
const l = xi(
|
|
741
741
|
{ keys: t, card: n, columnKeyMap: r, resultColumns: i },
|
|
742
742
|
a
|
|
743
743
|
);
|
|
@@ -776,12 +776,12 @@ function Dn(e, t) {
|
|
|
776
776
|
(n) => Nt(oe(Ie([n])[0]), n.format, t)
|
|
777
777
|
);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function Oi(e, t) {
|
|
780
780
|
return e == null ? void 0 : e.map(
|
|
781
781
|
(n) => Io(oe(Ie([n])[0]), n.format, t)
|
|
782
782
|
);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function Bi(e, t) {
|
|
785
785
|
const { dateFormat: n, customFormat: o, ...r } = ve(e.field);
|
|
786
786
|
return {
|
|
787
787
|
...e,
|
|
@@ -792,7 +792,7 @@ function Pe(e, t = !1) {
|
|
|
792
792
|
if (e)
|
|
793
793
|
return {
|
|
794
794
|
...e,
|
|
795
|
-
conditions: e.conditions.map((n) =>
|
|
795
|
+
conditions: e.conditions.map((n) => Bi(n, t)),
|
|
796
796
|
groups: e.groups.map((n) => Pe(n, t))
|
|
797
797
|
};
|
|
798
798
|
}
|
|
@@ -809,7 +809,7 @@ function oe(e) {
|
|
|
809
809
|
filters: Pe(t.parameters.filters)
|
|
810
810
|
}), t;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function Ai(e, t) {
|
|
813
813
|
return t.cardType === "detailTable" || !vo(t.cardType) || t.temporalResultOwner !== "config" ? Dn(e, "grouped") : e == null ? void 0 : e.map((n) => {
|
|
814
814
|
const o = Fo(n), r = ve(o ?? n);
|
|
815
815
|
if (!o)
|
|
@@ -822,16 +822,16 @@ function Sn(e, t) {
|
|
|
822
822
|
if (!e)
|
|
823
823
|
return;
|
|
824
824
|
const n = { type: t.cardType, config: e };
|
|
825
|
-
return ze(n) ?
|
|
825
|
+
return ze(n) ? Ei(n, t) : e.matrix === void 0 ? {} : { matrix: e.matrix };
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Ei(e, t = {}) {
|
|
828
828
|
var i, s, a;
|
|
829
829
|
const n = e.config;
|
|
830
830
|
if (!n) return;
|
|
831
831
|
const o = { ...t, cardType: e.type };
|
|
832
832
|
return {
|
|
833
833
|
...n,
|
|
834
|
-
groupByColumns:
|
|
834
|
+
groupByColumns: Ai(n.groupByColumns, o),
|
|
835
835
|
metricColumns: (i = Ie(n.metricColumns)) == null ? void 0 : i.map(
|
|
836
836
|
oe
|
|
837
837
|
),
|
|
@@ -839,30 +839,30 @@ function Bi(e, t = {}) {
|
|
|
839
839
|
sortByColumns: (s = Ie(n.sortByColumns)) == null ? void 0 : s.map(
|
|
840
840
|
oe
|
|
841
841
|
),
|
|
842
|
-
detailColumns:
|
|
842
|
+
detailColumns: Oi(n.detailColumns, (a = o.dataSource) == null ? void 0 : a.connectionType),
|
|
843
843
|
filters: Pe(n.filters)
|
|
844
844
|
};
|
|
845
845
|
}
|
|
846
846
|
function Fe(e) {
|
|
847
847
|
return (e == null ? void 0 : e.type) === "number" || (e == null ? void 0 : e.type) === "currency";
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function _i(e) {
|
|
850
850
|
return (e == null ? void 0 : e.type) === "number";
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function Ri(e) {
|
|
853
853
|
var n;
|
|
854
|
-
if (!
|
|
854
|
+
if (!_i(e))
|
|
855
855
|
return !1;
|
|
856
856
|
const t = (n = e == null ? void 0 : e.numberFormat) == null ? void 0 : n.style;
|
|
857
857
|
return t === void 0 || t === "decimal" || t === "currency";
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Ki(e, t) {
|
|
860
860
|
const n = t == null ? void 0 : t.type;
|
|
861
861
|
if (n && n !== "none" && n !== "number")
|
|
862
862
|
return { currencyBindable: !1 };
|
|
863
863
|
const o = n === "number" ? t != null && t.numberFormat ? So(t.numberFormat, {
|
|
864
864
|
preserveOmittedProperties: !0
|
|
865
|
-
}) : { type: "number" } : void 0, r =
|
|
865
|
+
}) : { type: "number" } : void 0, r = Ce(e.format, {
|
|
866
866
|
preserveOmittedProperties: !0
|
|
867
867
|
}), i = se(e.dataType) === "number" ? { type: "number" } : void 0, a = (t == null ? void 0 : t.inheritMetricFormat) === !1 || !!(t != null && t.numberFormat) && (t == null ? void 0 : t.inheritMetricFormat) !== !0 ? o : r || i || o;
|
|
868
868
|
return {
|
|
@@ -870,8 +870,8 @@ function _i(e, t) {
|
|
|
870
870
|
currencyBindable: Fe(a)
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
const n =
|
|
873
|
+
function qi(e, t) {
|
|
874
|
+
const n = Ce(t.format, {
|
|
875
875
|
preserveOmittedProperties: !0
|
|
876
876
|
}), o = se(t.dataType) === "number" ? { type: "number" } : void 0, r = n || o;
|
|
877
877
|
return {
|
|
@@ -887,8 +887,8 @@ function qe(e, t = {}) {
|
|
|
887
887
|
const u = t.resultColumnKey ? {
|
|
888
888
|
kind: "column",
|
|
889
889
|
columnKey: t.resultColumnKey
|
|
890
|
-
} : void 0, f =
|
|
891
|
-
|
|
890
|
+
} : void 0, f = Ce(
|
|
891
|
+
Mr({ card: e, column: { kind: "sqlKpiValue" }, surface: "kpiValue" }).format,
|
|
892
892
|
{ preserveOmittedProperties: !0 }
|
|
893
893
|
);
|
|
894
894
|
return {
|
|
@@ -901,7 +901,7 @@ function qe(e, t = {}) {
|
|
|
901
901
|
const o = n ? (d = (l = e.config) == null ? void 0 : l.metricColumns) == null ? void 0 : d.find((u) => u.id === n.fieldId) : void 0, r = o != null && o.id ? {
|
|
902
902
|
kind: "metric",
|
|
903
903
|
metricId: o.id
|
|
904
|
-
} : void 0, i =
|
|
904
|
+
} : void 0, i = Ce(o == null ? void 0 : o.format, {
|
|
905
905
|
preserveOmittedProperties: !0
|
|
906
906
|
}), s = se(o == null ? void 0 : o.dataType) === "number" ? { type: "number" } : void 0, a = i || s;
|
|
907
907
|
return {
|
|
@@ -919,7 +919,7 @@ function Tn(e, t, n) {
|
|
|
919
919
|
function Mn(e, t, n) {
|
|
920
920
|
return e.kind === "calculated" ? e.definition.format : Tn(e.field, t, n);
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function hl(e, t) {
|
|
923
923
|
const n = jt(t), o = (r, i) => Object.fromEntries(r.flatMap((s) => {
|
|
924
924
|
const a = i(s);
|
|
925
925
|
return a ? [[s.id, a]] : [];
|
|
@@ -935,11 +935,11 @@ function Vn(e, t = []) {
|
|
|
935
935
|
const { spec: o, presentation: r } = n.config, i = jt(t);
|
|
936
936
|
return o.measures.map((s) => {
|
|
937
937
|
var p;
|
|
938
|
-
const a = s.kind === "aggregate" ? i(s.field, o.source) : void 0, c =
|
|
939
|
-
return { measureId: s.id, label:
|
|
938
|
+
const a = s.kind === "aggregate" ? i(s.field, o.source) : void 0, c = Vr(r.measureFormats[s.id], Mn(s, o.source, i)), l = s.kind === "calculated" ? s.definition.dataType : ["MIN", "MAX"].includes(s.aggregate) ? ((p = s.field.derivedField) == null ? void 0 : p.dataType) ?? (a == null ? void 0 : a.resolvedField.dataType) ?? s.field.dataType : "number", d = se(l) === "number", u = s.kind === "calculated" || !!(a || s.field.derivedField || s.field.name === "*"), f = c && kr(c) ? c : !c && d && u ? { type: "number" } : void 0;
|
|
939
|
+
return { measureId: s.id, label: Pr(s, r), canonical: f };
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Ni(e) {
|
|
943
943
|
var t, n;
|
|
944
944
|
return e.type === "detailTable" ? ((t = e.config) == null ? void 0 : t.detailColumns) || [] : ((n = e.config) == null ? void 0 : n.metricColumns) || [];
|
|
945
945
|
}
|
|
@@ -950,7 +950,7 @@ function kn(e) {
|
|
|
950
950
|
)
|
|
951
951
|
);
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Li(e, t) {
|
|
954
954
|
const n = [
|
|
955
955
|
t.id,
|
|
956
956
|
t.alias,
|
|
@@ -972,66 +972,66 @@ function kt(e) {
|
|
|
972
972
|
return [
|
|
973
973
|
...new Map(
|
|
974
974
|
e.map((t) => [
|
|
975
|
-
|
|
975
|
+
W(t),
|
|
976
976
|
t
|
|
977
977
|
])
|
|
978
978
|
).values()
|
|
979
979
|
];
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function ji(e, t = [], n) {
|
|
982
982
|
var M;
|
|
983
|
-
const o = !!((M = e.sql) != null && M.trim()), r = Lt(e.type), i = o && r && e.type !== "kpi" && e.type !== "matrixTable", s =
|
|
984
|
-
(
|
|
985
|
-
column: { kind: "field", fieldId:
|
|
983
|
+
const o = !!((M = e.sql) != null && M.trim()), r = Lt(e.type), i = o && r && e.type !== "kpi" && e.type !== "matrixTable", s = Ni(e), a = To(e), c = !o && e.type === "kpi" ? s.map(
|
|
984
|
+
(h) => qe(e, {
|
|
985
|
+
column: { kind: "field", fieldId: h.id }
|
|
986
986
|
})
|
|
987
987
|
) : [], l = !o && e.type === "matrixTable" ? Vn(e, n) : [], d = (o ? [] : s).map(
|
|
988
|
-
(
|
|
988
|
+
(h) => ({
|
|
989
989
|
kind: "metric",
|
|
990
|
-
metricId:
|
|
990
|
+
metricId: h.id
|
|
991
991
|
})
|
|
992
992
|
), u = l.map(
|
|
993
|
-
(
|
|
993
|
+
(h) => ({
|
|
994
994
|
kind: "matrix_measure",
|
|
995
|
-
measureId:
|
|
995
|
+
measureId: h.measureId
|
|
996
996
|
})
|
|
997
|
-
), f = l.filter((
|
|
997
|
+
), f = l.filter((h) => {
|
|
998
998
|
var w, B;
|
|
999
|
-
return ((w =
|
|
999
|
+
return ((w = h.canonical) == null ? void 0 : w.type) === "number" || ((B = h.canonical) == null ? void 0 : B.type) === "currency";
|
|
1000
1000
|
}).map(
|
|
1001
|
-
(
|
|
1001
|
+
(h) => ({
|
|
1002
1002
|
kind: "matrix_measure",
|
|
1003
|
-
measureId:
|
|
1003
|
+
measureId: h.measureId
|
|
1004
1004
|
})
|
|
1005
|
-
), p = e.type === "matrixTable" ? [] : e.type === "kpi" ? c.filter((
|
|
1006
|
-
(
|
|
1005
|
+
), p = e.type === "matrixTable" ? [] : e.type === "kpi" ? c.filter((h) => h.currencyBindable).flatMap(
|
|
1006
|
+
(h) => h.target ? [h.target] : []
|
|
1007
1007
|
) : (o || !r ? [] : s).filter(
|
|
1008
|
-
(
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
) :
|
|
1008
|
+
(h) => (Mo(e.type) ? Ki(
|
|
1009
|
+
h,
|
|
1010
|
+
Li(a, h)
|
|
1011
|
+
) : qi(e, h)).currencyBindable
|
|
1012
1012
|
).map(
|
|
1013
|
-
(
|
|
1013
|
+
(h) => ({
|
|
1014
1014
|
kind: "metric",
|
|
1015
|
-
metricId:
|
|
1015
|
+
metricId: h.id
|
|
1016
1016
|
})
|
|
1017
1017
|
), g = [...new Set(t)], m = (i ? g : []).map(
|
|
1018
|
-
(
|
|
1018
|
+
(h) => ({
|
|
1019
1019
|
kind: "column",
|
|
1020
|
-
columnKey:
|
|
1020
|
+
columnKey: h
|
|
1021
1021
|
})
|
|
1022
1022
|
), y = (i ? g : []).filter(
|
|
1023
|
-
(
|
|
1024
|
-
a[
|
|
1023
|
+
(h) => Ri(
|
|
1024
|
+
a[h]
|
|
1025
1025
|
)
|
|
1026
1026
|
).map(
|
|
1027
|
-
(
|
|
1027
|
+
(h) => ({
|
|
1028
1028
|
kind: "column",
|
|
1029
|
-
columnKey:
|
|
1029
|
+
columnKey: h
|
|
1030
1030
|
})
|
|
1031
1031
|
), b = (o && e.type === "kpi" ? g.slice(0, 1) : []).map(
|
|
1032
|
-
(
|
|
1032
|
+
(h) => ({
|
|
1033
1033
|
kind: "column",
|
|
1034
|
-
columnKey:
|
|
1034
|
+
columnKey: h
|
|
1035
1035
|
})
|
|
1036
1036
|
), I = o && e.type === "kpi" ? qe(e, {
|
|
1037
1037
|
resultColumnKey: g[0]
|
|
@@ -1050,20 +1050,20 @@ function Ni(e, t = [], n) {
|
|
|
1050
1050
|
])
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Il(e, t) {
|
|
1054
1054
|
const n = qe(e, {
|
|
1055
1055
|
resultColumnKey: t
|
|
1056
1056
|
});
|
|
1057
1057
|
return n.currencyBindable ? n.target : void 0;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function vl(e) {
|
|
1060
1060
|
var t;
|
|
1061
1061
|
return (t = e.card.sql) != null && t.trim() ? { kind: "column", columnKey: e.columnKey } : e.metricId ? { kind: "metric", metricId: e.metricId } : void 0;
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function W(e) {
|
|
1064
1064
|
return e.kind === "metric" ? `metric:${e.metricId}` : e.kind === "column" ? `column:${e.columnKey}` : `matrix_measure:${e.measureId}`;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function zi(e) {
|
|
1067
1067
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1068
1068
|
return;
|
|
1069
1069
|
const t = e;
|
|
@@ -1096,7 +1096,7 @@ function Pn(e) {
|
|
|
1096
1096
|
currencies: t
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function Fl(e) {
|
|
1100
1100
|
return "control" in Pn(e);
|
|
1101
1101
|
}
|
|
1102
1102
|
function xn(e) {
|
|
@@ -1122,7 +1122,7 @@ function xn(e) {
|
|
|
1122
1122
|
)
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function Dl(e) {
|
|
1126
1126
|
return xn({
|
|
1127
1127
|
...e,
|
|
1128
1128
|
referencedControlIds: new Set(
|
|
@@ -1133,7 +1133,7 @@ function vl(e) {
|
|
|
1133
1133
|
)
|
|
1134
1134
|
});
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function Sl(e) {
|
|
1137
1137
|
var t;
|
|
1138
1138
|
return xn({
|
|
1139
1139
|
...e,
|
|
@@ -1148,10 +1148,10 @@ function Fl(e) {
|
|
|
1148
1148
|
function wn(e) {
|
|
1149
1149
|
return {
|
|
1150
1150
|
knownKeys: new Set(
|
|
1151
|
-
e.knownTargets.map(
|
|
1151
|
+
e.knownTargets.map(W)
|
|
1152
1152
|
),
|
|
1153
1153
|
eligibleKeys: new Set(
|
|
1154
|
-
e.eligibleTargets.map(
|
|
1154
|
+
e.eligibleTargets.map(W)
|
|
1155
1155
|
),
|
|
1156
1156
|
controlsById: new Map(
|
|
1157
1157
|
(e.controls || []).map((t) => [t.id, t])
|
|
@@ -1164,14 +1164,14 @@ function On(e, t) {
|
|
|
1164
1164
|
const n = e, o = typeof n.controlId == "string" && n.controlId.trim() ? n.controlId : void 0;
|
|
1165
1165
|
if (!o)
|
|
1166
1166
|
return { diagnostic: { code: "invalid_binding_shape" } };
|
|
1167
|
-
const r =
|
|
1167
|
+
const r = zi(
|
|
1168
1168
|
n.presentationTarget
|
|
1169
1169
|
);
|
|
1170
1170
|
if (!r)
|
|
1171
1171
|
return {
|
|
1172
1172
|
diagnostic: { code: "missing_target", controlId: o }
|
|
1173
1173
|
};
|
|
1174
|
-
const i =
|
|
1174
|
+
const i = W(r);
|
|
1175
1175
|
if (!t.knownKeys.has(i))
|
|
1176
1176
|
return {
|
|
1177
1177
|
diagnostic: { code: "stale_target", controlId: o }
|
|
@@ -1197,16 +1197,16 @@ function On(e, t) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
};
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function Tl(e) {
|
|
1201
1201
|
const t = wn(e);
|
|
1202
1202
|
return (e.bindings || []).flatMap((n) => {
|
|
1203
1203
|
const o = On(n, t);
|
|
1204
1204
|
return "diagnostic" in o ? [o.diagnostic] : [];
|
|
1205
1205
|
});
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function Gi(e) {
|
|
1208
1208
|
var r;
|
|
1209
|
-
const t = [], n =
|
|
1209
|
+
const t = [], n = W(e.target), o = wn(e);
|
|
1210
1210
|
for (const i of e.bindings || []) {
|
|
1211
1211
|
const s = On(i, o);
|
|
1212
1212
|
if ("diagnostic" in s) {
|
|
@@ -1214,7 +1214,7 @@ function ji(e) {
|
|
|
1214
1214
|
continue;
|
|
1215
1215
|
}
|
|
1216
1216
|
const a = s.binding;
|
|
1217
|
-
if (!a ||
|
|
1217
|
+
if (!a || W(
|
|
1218
1218
|
a.presentationTarget
|
|
1219
1219
|
) !== n) continue;
|
|
1220
1220
|
const l = tn(
|
|
@@ -1225,10 +1225,10 @@ function ji(e) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
return { diagnostics: t };
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1229
|
-
const r = { ...e, config: { ...e.config, matrix: t } }, i =
|
|
1228
|
+
function Hi(e, t, n, o) {
|
|
1229
|
+
const r = { ...e, config: { ...e.config, matrix: t } }, i = ji(r, [], o), s = Vn(r, o), a = { ...t.presentation.measureFormats };
|
|
1230
1230
|
for (const c of s) {
|
|
1231
|
-
const l = { kind: "matrix_measure", measureId: c.measureId }, { currency: d } =
|
|
1231
|
+
const l = { kind: "matrix_measure", measureId: c.measureId }, { currency: d } = Gi({
|
|
1232
1232
|
...n,
|
|
1233
1233
|
...i,
|
|
1234
1234
|
bindings: e.controlBindings,
|
|
@@ -1240,7 +1240,7 @@ function zi(e, t, n, o) {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
return { ...t.presentation, measureFormats: a };
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function Ui(e, t) {
|
|
1244
1244
|
if (!e || typeof e != "object" || !("kind" in e))
|
|
1245
1245
|
return e;
|
|
1246
1246
|
switch (e.kind) {
|
|
@@ -1285,12 +1285,12 @@ function Gi(e, t) {
|
|
|
1285
1285
|
return e;
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function $i(e, t) {
|
|
1289
1289
|
return {
|
|
1290
1290
|
id: e.id,
|
|
1291
1291
|
scope: e.scope,
|
|
1292
1292
|
type: e.type,
|
|
1293
|
-
source:
|
|
1293
|
+
source: Ui(e.source, t),
|
|
1294
1294
|
initialValueStrategy: e.initialValueStrategy,
|
|
1295
1295
|
defaultValue: e.defaultValue,
|
|
1296
1296
|
requiredAtExecution: e.requiredAtExecution,
|
|
@@ -1305,7 +1305,7 @@ function Hi(e, t) {
|
|
|
1305
1305
|
} : {}
|
|
1306
1306
|
};
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Qi(e, t) {
|
|
1309
1309
|
return e.target === "sql_param" || e.target === "presentation_currency" ? e : e.target === "config_field_selector" && !(t != null && t.includePresentation) ? {
|
|
1310
1310
|
...e,
|
|
1311
1311
|
mapping: Object.fromEntries(
|
|
@@ -1330,29 +1330,29 @@ function Ui(e, t) {
|
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
1332
|
function xt(e = [], t) {
|
|
1333
|
-
return [...e].map((n) =>
|
|
1333
|
+
return [...e].map((n) => $i(n, t)).sort(
|
|
1334
1334
|
(n, o) => n.id.localeCompare(o.id) || n.scope.localeCompare(o.scope) || n.type.localeCompare(o.type)
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Wi(e = [], t) {
|
|
1338
1338
|
return e.filter(
|
|
1339
1339
|
(n) => (t == null ? void 0 : t.includePresentation) || !Te(n)
|
|
1340
|
-
).map((n) =>
|
|
1340
|
+
).map((n) => Qi(n, t)).sort(
|
|
1341
1341
|
(n, o) => R(n).localeCompare(R(o))
|
|
1342
1342
|
);
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function Ji(e, t) {
|
|
1345
1345
|
return e ? R({
|
|
1346
1346
|
controlDefinitions: xt(e.controlDefinitions, t),
|
|
1347
1347
|
cardControlDefinitions: xt(
|
|
1348
1348
|
e.cardControlDefinitions,
|
|
1349
1349
|
t
|
|
1350
1350
|
),
|
|
1351
|
-
controlBindings:
|
|
1351
|
+
controlBindings: Wi(e.controlBindings, t)
|
|
1352
1352
|
}) : "__none__";
|
|
1353
1353
|
}
|
|
1354
|
-
const
|
|
1355
|
-
function
|
|
1354
|
+
const Zi = ["table", "detailTable"], wt = (e) => Zi.includes(e.type), Yi = "calendar-context";
|
|
1355
|
+
function Xi(e) {
|
|
1356
1356
|
const { id: t, label: n, field: o, ...r } = e;
|
|
1357
1357
|
return {
|
|
1358
1358
|
...r,
|
|
@@ -1367,7 +1367,7 @@ function xe(e) {
|
|
|
1367
1367
|
const { id: t, conditions: n, groups: o, ...r } = e;
|
|
1368
1368
|
return {
|
|
1369
1369
|
...r,
|
|
1370
|
-
conditions: n.map(
|
|
1370
|
+
conditions: n.map(Xi),
|
|
1371
1371
|
groups: o.map((i) => xe(i))
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
@@ -1394,7 +1394,7 @@ function tt(e) {
|
|
|
1394
1394
|
} : {}
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function es(e) {
|
|
1398
1398
|
const t = (n) => n == null ? void 0 : n.map(tt);
|
|
1399
1399
|
return {
|
|
1400
1400
|
...e,
|
|
@@ -1406,23 +1406,23 @@ function Zi(e) {
|
|
|
1406
1406
|
filters: e.filters ? xe(e.filters) : void 0
|
|
1407
1407
|
};
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function ts(e, t, n) {
|
|
1410
1410
|
if (!e)
|
|
1411
1411
|
return JSON.stringify(e);
|
|
1412
|
-
if (n === "matrixTable" && e.matrix) return R(
|
|
1413
|
-
const { matrix: o, ...r } = e, i = t ?
|
|
1412
|
+
if (n === "matrixTable" && e.matrix) return R(Kr(e.matrix.spec));
|
|
1413
|
+
const { matrix: o, ...r } = e, i = t ? es(r) : r;
|
|
1414
1414
|
return JSON.stringify({
|
|
1415
1415
|
...i,
|
|
1416
1416
|
filters: xe(i.filters)
|
|
1417
1417
|
});
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function ns(e) {
|
|
1420
1420
|
if (!e)
|
|
1421
1421
|
return null;
|
|
1422
1422
|
const { format: t, ...n } = e;
|
|
1423
1423
|
return n;
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1425
|
+
function os(e, t) {
|
|
1426
1426
|
const n = /* @__PURE__ */ new Map();
|
|
1427
1427
|
for (const r of (t == null ? void 0 : t.controlDefinitions) || [])
|
|
1428
1428
|
n.set(r.id, r.type);
|
|
@@ -1438,7 +1438,7 @@ function ts(e, t) {
|
|
|
1438
1438
|
);
|
|
1439
1439
|
return R(o);
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function rs(e, {
|
|
1442
1442
|
finalFiltersKey: t,
|
|
1443
1443
|
cardFilterValues: n,
|
|
1444
1444
|
controlValues: o,
|
|
@@ -1452,8 +1452,8 @@ function ns(e, {
|
|
|
1452
1452
|
}) {
|
|
1453
1453
|
const { filterColumns: u, ...f } = e.queryConfig || {}, p = u == null ? void 0 : u.filter(
|
|
1454
1454
|
(v) => {
|
|
1455
|
-
var M,
|
|
1456
|
-
return (
|
|
1455
|
+
var M, h;
|
|
1456
|
+
return (h = (M = e.queryConfig) == null ? void 0 : M.filters) == null ? void 0 : h.some((w) => w.filterColumnName === v.name);
|
|
1457
1457
|
}
|
|
1458
1458
|
), g = (e == null ? void 0 : e.sql) || "", m = He((e == null ? void 0 : e.python) || ""), y = ["table", "detailTable", "matrixTable"].includes(
|
|
1459
1459
|
e.type
|
|
@@ -1467,24 +1467,24 @@ function ns(e, {
|
|
|
1467
1467
|
g,
|
|
1468
1468
|
m,
|
|
1469
1469
|
JSON.stringify(n),
|
|
1470
|
-
|
|
1470
|
+
os(o, {
|
|
1471
1471
|
controlDefinitions: r,
|
|
1472
1472
|
cardControlDefinitions: i
|
|
1473
1473
|
}),
|
|
1474
|
-
|
|
1474
|
+
Ji({
|
|
1475
1475
|
controlDefinitions: r,
|
|
1476
1476
|
cardControlDefinitions: i,
|
|
1477
1477
|
controlBindings: s
|
|
1478
1478
|
}),
|
|
1479
1479
|
R(
|
|
1480
|
-
|
|
1480
|
+
ns(c)
|
|
1481
1481
|
),
|
|
1482
1482
|
R(l ?? null),
|
|
1483
|
-
|
|
1483
|
+
Yi,
|
|
1484
1484
|
R(d),
|
|
1485
1485
|
JSON.stringify(f),
|
|
1486
1486
|
JSON.stringify(p),
|
|
1487
|
-
|
|
1487
|
+
ts(
|
|
1488
1488
|
b,
|
|
1489
1489
|
I,
|
|
1490
1490
|
e.type
|
|
@@ -1492,9 +1492,9 @@ function ns(e, {
|
|
|
1492
1492
|
t
|
|
1493
1493
|
];
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function is(e, t, n) {
|
|
1496
1496
|
var a, c, l;
|
|
1497
|
-
const o =
|
|
1497
|
+
const o = rs(e, t), r = R(o), i = ((a = n == null ? void 0 : n.resolvePaginationConfig) == null ? void 0 : a.call(n, r)) ?? e.paginationConfig, s = wt(e) && Me(e.config) || wt(e) && e.sql && ((l = (c = e.preferences) == null ? void 0 : c.tablePrefs) == null ? void 0 : l.enableDevModePagination);
|
|
1498
1498
|
return {
|
|
1499
1499
|
queryKey: [
|
|
1500
1500
|
...o,
|
|
@@ -1504,8 +1504,8 @@ function os(e, t, n) {
|
|
|
1504
1504
|
paginationConfig: i
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1507
|
+
function ss(e, t, n, o) {
|
|
1508
|
+
return is(
|
|
1509
1509
|
e,
|
|
1510
1510
|
{
|
|
1511
1511
|
finalFiltersKey: t.finalFiltersKey,
|
|
@@ -1524,7 +1524,7 @@ function rs(e, t, n, o) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
function Bn(e) {
|
|
1526
1526
|
const t = {
|
|
1527
|
-
...
|
|
1527
|
+
...Qr,
|
|
1528
1528
|
...e.presentation
|
|
1529
1529
|
}, n = t.displayMode, {
|
|
1530
1530
|
bookkeepingKeys: o,
|
|
@@ -1585,7 +1585,7 @@ function Bn(e) {
|
|
|
1585
1585
|
columnPresentationOwners: u
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function Ml(e) {
|
|
1589
1589
|
var t, n;
|
|
1590
1590
|
return Bn({
|
|
1591
1591
|
comparisonMetadata: e.comparisonMetadata,
|
|
@@ -1601,7 +1601,7 @@ function Sl(e) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
});
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Vl(e) {
|
|
1605
1605
|
var n;
|
|
1606
1606
|
return (((n = e.card.config) == null ? void 0 : n.metricColumns) || []).filter(
|
|
1607
1607
|
(o) => {
|
|
@@ -1612,7 +1612,7 @@ function Tl(e) {
|
|
|
1612
1612
|
(o) => !rn(e.comparisonMetadata, o)
|
|
1613
1613
|
);
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function as(e) {
|
|
1616
1616
|
return e.part === "base" && !!e.columnId;
|
|
1617
1617
|
}
|
|
1618
1618
|
function nt(e) {
|
|
@@ -1636,7 +1636,7 @@ function Ot(e) {
|
|
|
1636
1636
|
for (const n of e) t.set(n, (t.get(n) ?? 0) + 1);
|
|
1637
1637
|
return t;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function ls(e, t) {
|
|
1640
1640
|
var u, f;
|
|
1641
1641
|
const n = [...t.keys], o = new Set(n), r = t.columnKeyMap, i = nt(e).flatMap(
|
|
1642
1642
|
({ role: p, fields: g }) => g.flatMap((m) => {
|
|
@@ -1690,7 +1690,7 @@ function ss(e, t) {
|
|
|
1690
1690
|
if (!c.has(b))
|
|
1691
1691
|
continue;
|
|
1692
1692
|
} else {
|
|
1693
|
-
if (m.identity.metricId !==
|
|
1693
|
+
if (m.identity.metricId !== Ze)
|
|
1694
1694
|
continue;
|
|
1695
1695
|
c.has(b) || c.set(b, { columnId: b, identity: y, authorLabel: "Count" });
|
|
1696
1696
|
}
|
|
@@ -1719,7 +1719,7 @@ function ss(e, t) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
return { entries: c, owners: l };
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function cs(e) {
|
|
1723
1723
|
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
1724
1724
|
for (const o of e.keys) {
|
|
1725
1725
|
const r = { kind: "result", key: o }, i = U(r);
|
|
@@ -1732,19 +1732,19 @@ function as(e) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
return { entries: t, owners: n };
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1735
|
+
function kl(e) {
|
|
1736
1736
|
const t = /* @__PURE__ */ new Set();
|
|
1737
1737
|
for (const n of e ?? [])
|
|
1738
1738
|
if (n && typeof n == "object")
|
|
1739
1739
|
for (const o of Object.keys(n)) t.add(o);
|
|
1740
1740
|
return [...t];
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1742
|
+
function ds(e, t) {
|
|
1743
1743
|
if (e.toLowerCase() !== "count") return !1;
|
|
1744
1744
|
const n = t == null ? void 0 : t.find((o) => (o == null ? void 0 : o[e]) != null);
|
|
1745
1745
|
return n ? typeof n[e] == "number" : !1;
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1747
|
+
function us(e, t, n, o) {
|
|
1748
1748
|
var c, l, d, u;
|
|
1749
1749
|
let r = [...t.keys], i = /* @__PURE__ */ new Map();
|
|
1750
1750
|
const s = t.comparisonMetadata;
|
|
@@ -1762,8 +1762,8 @@ function cs(e, t, n, o) {
|
|
|
1762
1762
|
r = r.filter((p) => !f.excludedKeys.has(p)), i = f.columnLabels;
|
|
1763
1763
|
}
|
|
1764
1764
|
const a = e.config;
|
|
1765
|
-
return e.type === "table" && !((d = a == null ? void 0 : a.metricColumns) != null && d.length) && ((u = a == null ? void 0 : a.groupByColumns) != null && u.length) && !e.sql && (r = r.filter((f) => !
|
|
1766
|
-
keys:
|
|
1765
|
+
return e.type === "table" && !((d = a == null ? void 0 : a.metricColumns) != null && d.length) && ((u = a == null ? void 0 : a.groupByColumns) != null && u.length) && !e.sql && (r = r.filter((f) => !ds(f, t.rows))), {
|
|
1766
|
+
keys: wi({
|
|
1767
1767
|
keys: r,
|
|
1768
1768
|
card: e,
|
|
1769
1769
|
comparisonMetadata: s,
|
|
@@ -1773,7 +1773,7 @@ function cs(e, t, n, o) {
|
|
|
1773
1773
|
exportLabels: i
|
|
1774
1774
|
};
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function fs(e, t, n) {
|
|
1777
1777
|
var r, i;
|
|
1778
1778
|
const o = /* @__PURE__ */ new Map();
|
|
1779
1779
|
if (e.type !== "table" || !dn((r = e.preferences) == null ? void 0 : r.comparisonPresentation))
|
|
@@ -1798,18 +1798,18 @@ function ds(e, t, n) {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
return o;
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function ms(e) {
|
|
1802
1802
|
const t = nt(e);
|
|
1803
1803
|
return [
|
|
1804
1804
|
...t.filter((n) => n.role === "metric"),
|
|
1805
1805
|
...t.filter((n) => n.role !== "metric")
|
|
1806
1806
|
];
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function ps(e, t, n) {
|
|
1809
1809
|
if (!t.length) return [];
|
|
1810
|
-
const o =
|
|
1810
|
+
const o = ms(e), r = [], i = /* @__PURE__ */ new Set();
|
|
1811
1811
|
for (const s of t) {
|
|
1812
|
-
const a =
|
|
1812
|
+
const a = qr(o, s);
|
|
1813
1813
|
if (!a) continue;
|
|
1814
1814
|
const c = o[a.group], l = ot(c.fields[a.index], c.role);
|
|
1815
1815
|
if (!l) continue;
|
|
@@ -1821,14 +1821,14 @@ function fs(e, t, n) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
return r;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1824
|
+
function gs(e, t) {
|
|
1825
1825
|
return e ? "query" : t === "server" ? "page-only" : "browser";
|
|
1826
1826
|
}
|
|
1827
1827
|
function An(e, t) {
|
|
1828
1828
|
var n, o, r;
|
|
1829
1829
|
return !!t && ((r = (o = (n = e.preferences) == null ? void 0 : n.tablePrefs) == null ? void 0 : o.columnVisibility) == null ? void 0 : r[t]) === !1;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function ys(e) {
|
|
1832
1832
|
return e.type !== "table" && e.type !== "detailTable" ? "card-type" : cn(e) ? void 0 : "author-disabled";
|
|
1833
1833
|
}
|
|
1834
1834
|
function Ne(e, t) {
|
|
@@ -1855,10 +1855,10 @@ function fe(e, t, n) {
|
|
|
1855
1855
|
s.splice(d, 0, a);
|
|
1856
1856
|
}), s.flatMap((a) => a.keys);
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function bs(e) {
|
|
1859
1859
|
return e != null && e.pivotIdentity ? JSON.stringify(e.pivotIdentity.members.map((t) => t.value)) : void 0;
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1861
|
+
function Cs(e, t, n, o) {
|
|
1862
1862
|
const r = e.findIndex(
|
|
1863
1863
|
(l) => {
|
|
1864
1864
|
var d;
|
|
@@ -1876,7 +1876,7 @@ function ys(e, t, n, o) {
|
|
|
1876
1876
|
), a = [];
|
|
1877
1877
|
let c;
|
|
1878
1878
|
for (const l of e.slice(r, i + 1)) {
|
|
1879
|
-
const d =
|
|
1879
|
+
const d = bs(s.get(l)) ?? `key:${l}`;
|
|
1880
1880
|
(!a.length || d !== c) && a.push([]), a[a.length - 1].push(l), c = d;
|
|
1881
1881
|
}
|
|
1882
1882
|
return [
|
|
@@ -1885,7 +1885,7 @@ function ys(e, t, n, o) {
|
|
|
1885
1885
|
...fe(e.slice(i + 1), t, n)
|
|
1886
1886
|
];
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function Pl(e) {
|
|
1889
1889
|
if (ie(e) !== "config") return;
|
|
1890
1890
|
const t = /* @__PURE__ */ new Set();
|
|
1891
1891
|
for (const { role: n, fields: o } of nt(e))
|
|
@@ -1895,89 +1895,89 @@ function Vl(e) {
|
|
|
1895
1895
|
}
|
|
1896
1896
|
return t;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function xl(e) {
|
|
1899
1899
|
const t = un(e);
|
|
1900
|
-
return (t == null ? void 0 : t.kind) === "metric" && t.metricId ===
|
|
1900
|
+
return (t == null ? void 0 : t.kind) === "metric" && t.metricId === Ze;
|
|
1901
1901
|
}
|
|
1902
|
-
function
|
|
1902
|
+
function wl(e) {
|
|
1903
1903
|
var ut, ft, mt, pt, gt, yt, bt;
|
|
1904
|
-
const { card: t, result: n } = e, o = e.projection ?? "screen", r = ie(t) === "config", i =
|
|
1904
|
+
const { card: t, result: n } = e, o = e.projection ?? "screen", r = ie(t) === "config", i = ys(t), s = i === "card-type" ? void 0 : i === "author-disabled" ? (ut = e.settings) != null && ut.sort ? { sort: e.settings.sort } : void 0 : e.settings, a = gs(r, e.paginationMode), c = n.columnKeyMap, l = r ? ls(t, n) : cs(n), d = (C) => {
|
|
1905
1905
|
var F, P;
|
|
1906
|
-
return
|
|
1907
|
-
}, u = (
|
|
1906
|
+
return C && ((P = (F = s == null ? void 0 : s.labels) == null ? void 0 : F[C]) == null ? void 0 : P.trim()) || void 0;
|
|
1907
|
+
}, u = (C) => U({ kind: "metric", ...C }), { keys: f, exportLabels: p } = us(
|
|
1908
1908
|
t,
|
|
1909
1909
|
n,
|
|
1910
1910
|
o,
|
|
1911
|
-
(
|
|
1911
|
+
(C) => {
|
|
1912
1912
|
var P;
|
|
1913
|
-
const F = u(
|
|
1913
|
+
const F = u(C);
|
|
1914
1914
|
return d(l.entries.has(F) ? F : void 0) ?? ((P = l.entries.get(F)) == null ? void 0 : P.authorLabel);
|
|
1915
1915
|
}
|
|
1916
|
-
), g = (
|
|
1917
|
-
const F = l.owners.get(
|
|
1916
|
+
), g = (C) => An(t, C), m = (C) => {
|
|
1917
|
+
const F = l.owners.get(C);
|
|
1918
1918
|
if (!F || i === "card-type") return;
|
|
1919
1919
|
const P = l.entries.get(F.columnId);
|
|
1920
1920
|
if (!(!P || P.baseKey && g(P.baseKey)))
|
|
1921
1921
|
return F;
|
|
1922
|
-
}, y = f.filter((
|
|
1923
|
-
(
|
|
1924
|
-
), v = new Set(I), M = r ?
|
|
1922
|
+
}, y = f.filter((C) => !g(C)), I = Ne(y, m).flatMap(
|
|
1923
|
+
(C) => C.columnId ? [C.columnId] : []
|
|
1924
|
+
), v = new Set(I), M = r ? ps(
|
|
1925
1925
|
t,
|
|
1926
1926
|
((ft = t.config) == null ? void 0 : ft.sortByColumns) ?? [],
|
|
1927
1927
|
l.entries
|
|
1928
|
-
).filter((
|
|
1928
|
+
).filter((C) => v.has(C.columnId)) : [], h = [
|
|
1929
1929
|
...(s == null ? void 0 : s.order) ?? [],
|
|
1930
1930
|
...(s == null ? void 0 : s.hidden) ?? [],
|
|
1931
1931
|
...Object.keys((s == null ? void 0 : s.labels) ?? {}),
|
|
1932
|
-
...((s == null ? void 0 : s.sort) ?? []).map((
|
|
1932
|
+
...((s == null ? void 0 : s.sort) ?? []).map((C) => C.columnId),
|
|
1933
1933
|
...Object.keys((s == null ? void 0 : s.widths) ?? {})
|
|
1934
1934
|
], w = [
|
|
1935
|
-
...new Set(
|
|
1935
|
+
...new Set(h.filter((C) => !v.has(C)))
|
|
1936
1936
|
];
|
|
1937
1937
|
let B;
|
|
1938
1938
|
if (s != null && s.sort && a !== "page-only") {
|
|
1939
|
-
const
|
|
1939
|
+
const C = s.sort.filter(
|
|
1940
1940
|
(F) => v.has(F.columnId)
|
|
1941
1941
|
);
|
|
1942
|
-
B =
|
|
1942
|
+
B = C.length || !s.sort.length ? C : void 0;
|
|
1943
1943
|
}
|
|
1944
|
-
const T =
|
|
1944
|
+
const T = wr(
|
|
1945
1945
|
s ? {
|
|
1946
1946
|
order: (mt = s.order) == null ? void 0 : mt.filter(
|
|
1947
|
-
(
|
|
1947
|
+
(C) => v.has(C)
|
|
1948
1948
|
),
|
|
1949
1949
|
hidden: (pt = s.hidden) == null ? void 0 : pt.filter(
|
|
1950
|
-
(
|
|
1950
|
+
(C) => v.has(C)
|
|
1951
1951
|
),
|
|
1952
1952
|
labels: Object.fromEntries(
|
|
1953
1953
|
Object.entries(s.labels ?? {}).filter(
|
|
1954
|
-
([
|
|
1954
|
+
([C]) => v.has(C)
|
|
1955
1955
|
)
|
|
1956
1956
|
),
|
|
1957
1957
|
sort: B,
|
|
1958
1958
|
widths: Object.fromEntries(
|
|
1959
1959
|
Object.entries(s.widths ?? {}).filter(
|
|
1960
|
-
([
|
|
1960
|
+
([C]) => v.has(C)
|
|
1961
1961
|
)
|
|
1962
1962
|
)
|
|
1963
1963
|
} : void 0
|
|
1964
|
-
), D = T == null ? void 0 : T.order, V = D ?
|
|
1965
|
-
(
|
|
1964
|
+
), D = T == null ? void 0 : T.order, V = D ? Cs(y, m, D, n.columns) : y, O = D ? [...V, ...f.filter(g)] : f, x = Ne(V, m).flatMap(
|
|
1965
|
+
(C) => C.columnId ? [C.columnId] : []
|
|
1966
1966
|
), S = new Set((T == null ? void 0 : T.hidden) ?? []);
|
|
1967
|
-
x.length && x.every((
|
|
1968
|
-
const k = o === "screen" ?
|
|
1967
|
+
x.length && x.every((C) => S.has(C)) && S.delete(x[0]);
|
|
1968
|
+
const k = o === "screen" ? fs(t, n, f) : /* @__PURE__ */ new Map(), A = (C, F) => {
|
|
1969
1969
|
const P = d(F == null ? void 0 : F.columnId);
|
|
1970
1970
|
if ((F == null ? void 0 : F.part) === "base" && P) return P;
|
|
1971
|
-
const K = k.get(
|
|
1971
|
+
const K = k.get(C);
|
|
1972
1972
|
if (K)
|
|
1973
|
-
return
|
|
1973
|
+
return vi(
|
|
1974
1974
|
((F == null ? void 0 : F.part) === "comparison" ? P : void 0) ?? (K.metric.label || K.metric.name),
|
|
1975
1975
|
K.kind
|
|
1976
1976
|
);
|
|
1977
|
-
const
|
|
1978
|
-
if (
|
|
1979
|
-
const X =
|
|
1980
|
-
columnId:
|
|
1977
|
+
const Y = p.get(C);
|
|
1978
|
+
if (Y) return Y;
|
|
1979
|
+
const X = Pi({
|
|
1980
|
+
columnId: C,
|
|
1981
1981
|
card: t,
|
|
1982
1982
|
columnKeyMap: c,
|
|
1983
1983
|
resultColumns: n.columns,
|
|
@@ -1985,55 +1985,55 @@ function Pl(e) {
|
|
|
1985
1985
|
// as dates (its temporal activation covers group columns only).
|
|
1986
1986
|
metricLabelOverride: (F == null ? void 0 : F.part) === "pivot-member" ? P : void 0
|
|
1987
1987
|
});
|
|
1988
|
-
return X || (Fn(
|
|
1989
|
-
}, E = O.map((
|
|
1988
|
+
return X || (Fn(C, t, c) ?? C);
|
|
1989
|
+
}, E = O.map((C) => {
|
|
1990
1990
|
var K;
|
|
1991
|
-
const F = m(
|
|
1991
|
+
const F = m(C), P = (F == null ? void 0 : F.part) ?? ((K = l.owners.get(C)) == null ? void 0 : K.part) ?? "base";
|
|
1992
1992
|
return {
|
|
1993
|
-
outputKey:
|
|
1993
|
+
outputKey: C,
|
|
1994
1994
|
...F ? { columnId: F.columnId } : {},
|
|
1995
1995
|
part: P,
|
|
1996
|
-
visible: !g(
|
|
1997
|
-
label: A(
|
|
1998
|
-
resizable: !i &&
|
|
1996
|
+
visible: !g(C) && !(F && S.has(F.columnId)),
|
|
1997
|
+
label: A(C, F),
|
|
1998
|
+
resizable: !i && as({ part: P, columnId: F == null ? void 0 : F.columnId })
|
|
1999
1999
|
};
|
|
2000
2000
|
}), q = Object.fromEntries(
|
|
2001
|
-
E.map((
|
|
2001
|
+
E.map((C) => [C.outputKey, C.label])
|
|
2002
2002
|
), L = {
|
|
2003
2003
|
...((yt = (gt = t.preferences) == null ? void 0 : gt.tablePrefs) == null ? void 0 : yt.columnSizing) ?? {}
|
|
2004
2004
|
};
|
|
2005
|
-
for (const
|
|
2006
|
-
const F =
|
|
2007
|
-
F !== void 0 && (L[
|
|
2005
|
+
for (const C of E) {
|
|
2006
|
+
const F = C.resizable ? (bt = T == null ? void 0 : T.widths) == null ? void 0 : bt[C.columnId] : void 0;
|
|
2007
|
+
F !== void 0 && (L[C.outputKey] = F);
|
|
2008
2008
|
}
|
|
2009
2009
|
const G = a === "page-only" ? [] : a === "query" ? M : (T == null ? void 0 : T.sort) ?? [], j = new Map(
|
|
2010
|
-
G.map((
|
|
2011
|
-
), uo = G.flatMap((
|
|
2010
|
+
G.map((C) => [C.columnId, C.direction])
|
|
2011
|
+
), uo = G.flatMap((C) => {
|
|
2012
2012
|
var P;
|
|
2013
|
-
const F = (P = l.entries.get(
|
|
2014
|
-
return F && y.includes(F) ? [{ outputKey: F, desc:
|
|
2015
|
-
}), dt = !i &&
|
|
2013
|
+
const F = (P = l.entries.get(C.columnId)) == null ? void 0 : P.baseKey;
|
|
2014
|
+
return F && y.includes(F) ? [{ outputKey: F, desc: C.direction === "desc" }] : [];
|
|
2015
|
+
}), dt = !i && Or(T);
|
|
2016
2016
|
let ue;
|
|
2017
2017
|
if (i)
|
|
2018
2018
|
ue = { available: !1, reason: i };
|
|
2019
2019
|
else if (!x.length)
|
|
2020
2020
|
ue = { available: !1, reason: "no-addressable-columns" };
|
|
2021
2021
|
else {
|
|
2022
|
-
const
|
|
2022
|
+
const C = new Set(D ?? []), F = x.filter(
|
|
2023
2023
|
(P) => !S.has(P)
|
|
2024
2024
|
).length;
|
|
2025
2025
|
ue = {
|
|
2026
2026
|
available: !0,
|
|
2027
2027
|
canReset: dt,
|
|
2028
2028
|
items: x.map((P) => {
|
|
2029
|
-
const K = l.entries.get(P),
|
|
2029
|
+
const K = l.entries.get(P), Y = S.has(P), X = j.get(P);
|
|
2030
2030
|
return {
|
|
2031
2031
|
columnId: P,
|
|
2032
2032
|
label: d(P) ?? K.authorLabel,
|
|
2033
2033
|
authorLabel: K.authorLabel,
|
|
2034
|
-
hidden:
|
|
2035
|
-
isNew: D !== void 0 && !
|
|
2036
|
-
canHide: !
|
|
2034
|
+
hidden: Y,
|
|
2035
|
+
isNew: D !== void 0 && !C.has(P),
|
|
2036
|
+
canHide: !Y && F > 1,
|
|
2037
2037
|
...X ? { sort: X } : {}
|
|
2038
2038
|
};
|
|
2039
2039
|
})
|
|
@@ -2041,7 +2041,7 @@ function Pl(e) {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
return {
|
|
2043
2043
|
columns: E,
|
|
2044
|
-
visibleKeys: E.filter((
|
|
2044
|
+
visibleKeys: E.filter((C) => C.visible).map((C) => C.outputKey),
|
|
2045
2045
|
labels: q,
|
|
2046
2046
|
columnSizing: L,
|
|
2047
2047
|
sortMode: a,
|
|
@@ -2054,7 +2054,7 @@ function Pl(e) {
|
|
|
2054
2054
|
author: { order: I }
|
|
2055
2055
|
};
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function Ol(e, t) {
|
|
2058
2058
|
var n;
|
|
2059
2059
|
return (n = En(e, t)) == null ? void 0 : n.field;
|
|
2060
2060
|
}
|
|
@@ -2072,14 +2072,14 @@ function En(e, t) {
|
|
|
2072
2072
|
return;
|
|
2073
2073
|
return r.length === 1 ? { field: r[0], role: i } : void 0;
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function hs(e, t) {
|
|
2076
2076
|
const n = t == null ? void 0 : t.sort;
|
|
2077
2077
|
if (!n || !e.config || e.type !== "table" && e.type !== "detailTable" || ie(e) !== "config")
|
|
2078
2078
|
return e.config;
|
|
2079
2079
|
const o = n.flatMap((r) => {
|
|
2080
2080
|
const i = En(e, r.columnId);
|
|
2081
2081
|
if (!i) return [];
|
|
2082
|
-
const s =
|
|
2082
|
+
const s = Nr(i.field, i.role);
|
|
2083
2083
|
return An(e, s) ? [] : [
|
|
2084
2084
|
{
|
|
2085
2085
|
...i.field,
|
|
@@ -2091,32 +2091,32 @@ function bs(e, t) {
|
|
|
2091
2091
|
});
|
|
2092
2092
|
return n.length > 0 && o.length === 0 ? e.config : { ...e.config, sortByColumns: o };
|
|
2093
2093
|
}
|
|
2094
|
-
const
|
|
2094
|
+
const Is = 500, vs = 250;
|
|
2095
2095
|
function Le(e) {
|
|
2096
2096
|
return e.type === "table" || e.type === "detailTable";
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2098
|
+
function Fs(e) {
|
|
2099
2099
|
var t, n, o;
|
|
2100
2100
|
return !!((t = e.sql) != null && t.trim() && Le(e) && ((o = (n = e.preferences) == null ? void 0 : n.tablePrefs) != null && o.enableDevModePagination));
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2103
|
-
return e === "export-full-with-cap" ?
|
|
2102
|
+
function Bl(e) {
|
|
2103
|
+
return e === "export-full-with-cap" ? Is : vs;
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2105
|
+
function Ds({
|
|
2106
2106
|
card: e,
|
|
2107
2107
|
isTablePrintMode: t,
|
|
2108
2108
|
isDocumentSectionRuntime: n,
|
|
2109
2109
|
documentTableDataPolicy: o
|
|
2110
2110
|
}) {
|
|
2111
2111
|
var c, l;
|
|
2112
|
-
const r = n && o !== void 0 && Le(e), i = t && !r, s = Me(e.config) && Le(e) && !e.sql, a = r ?
|
|
2112
|
+
const r = n && o !== void 0 && Le(e), i = t && !r, s = Me(e.config) && Le(e) && !e.sql, a = r ? Fs(e) : !!(e.sql && ((l = (c = e.preferences) == null ? void 0 : c.tablePrefs) != null && l.enableDevModePagination));
|
|
2113
2113
|
return !i && (s || a);
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2115
|
+
function Ss(e) {
|
|
2116
2116
|
var t, n, o;
|
|
2117
2117
|
return ((t = e.paginationConfig) == null ? void 0 : t.pageSize) || ((o = (n = e.preferences) == null ? void 0 : n.tablePrefs) == null ? void 0 : o.pageSize) || 50;
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function Al({
|
|
2120
2120
|
current: e,
|
|
2121
2121
|
defaultPageSize: t,
|
|
2122
2122
|
queryInputIdentity: n
|
|
@@ -2129,10 +2129,10 @@ function Ol({
|
|
|
2129
2129
|
pageSize: (e == null ? void 0 : e.pageSize) ?? t
|
|
2130
2130
|
};
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function El(e, t, n) {
|
|
2133
2133
|
return (e == null ? void 0 : e.queryInputIdentity) === n && e.page === t.page && e.pageSize === t.pageSize;
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2135
|
+
function _l(e, t) {
|
|
2136
2136
|
return !e || !t || e.page === t.page && e.pageSize === t.pageSize ? e : {
|
|
2137
2137
|
...e,
|
|
2138
2138
|
page: t.page,
|
|
@@ -2140,20 +2140,20 @@ function Al(e, t) {
|
|
|
2140
2140
|
hasPrevPage: t.page > 1
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return { page: 1, pageSize:
|
|
2143
|
+
function Ts(e) {
|
|
2144
|
+
return { page: 1, pageSize: Ss(e) };
|
|
2145
2145
|
}
|
|
2146
|
-
function
|
|
2146
|
+
function Ms(e) {
|
|
2147
2147
|
var s, a, c, l, d;
|
|
2148
|
-
const { card: t } = e, n =
|
|
2148
|
+
const { card: t } = e, n = Ds({
|
|
2149
2149
|
card: t,
|
|
2150
2150
|
isTablePrintMode: ((s = e.display) == null ? void 0 : s.isTablePrintMode) ?? !1,
|
|
2151
2151
|
isDocumentSectionRuntime: !!e.documentSection,
|
|
2152
2152
|
documentTableDataPolicy: (a = e.documentSection) == null ? void 0 : a.documentTableDataPolicy
|
|
2153
|
-
}), { page: o } = e, r = e.documentSection && !e.documentSection.totalsRow ? void 0 : ko(t, e.finalConfig), i = !!((c = e.display) != null && c.deliveryStrict && e.display.isTablePrintMode && !e.documentSection &&
|
|
2153
|
+
}), { page: o } = e, r = e.documentSection && !e.documentSection.totalsRow ? void 0 : ko(t, e.finalConfig), i = !!((c = e.display) != null && c.deliveryStrict && e.display.isTablePrintMode && !e.documentSection && zr(t.type));
|
|
2154
2154
|
return {
|
|
2155
2155
|
...r ? { tableTotalsRequest: r } : {},
|
|
2156
|
-
...i ? { sourceRowProbe: { limit:
|
|
2156
|
+
...i ? { sourceRowProbe: { limit: Gr.maxTableRows } } : {},
|
|
2157
2157
|
...n ? {
|
|
2158
2158
|
pagination: {
|
|
2159
2159
|
page: (o == null ? void 0 : o.page) || 1,
|
|
@@ -2162,14 +2162,14 @@ function Ss(e) {
|
|
|
2162
2162
|
} : {}
|
|
2163
2163
|
};
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function Vs(e, t = {}) {
|
|
2166
2166
|
var r, i, s;
|
|
2167
2167
|
const n = ((r = e.connectionId) == null ? void 0 : r.trim()) || void 0;
|
|
2168
2168
|
if (t.editorDevMode) return n;
|
|
2169
2169
|
const o = ((s = (i = e.dataSource) == null ? void 0 : i.connectionId) == null ? void 0 : s.trim()) || void 0;
|
|
2170
2170
|
return e.sql ? n || o : o || n;
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function ks(e, t) {
|
|
2173
2173
|
var n;
|
|
2174
2174
|
return {
|
|
2175
2175
|
connectionId: t,
|
|
@@ -2178,8 +2178,8 @@ function Ms(e, t) {
|
|
|
2178
2178
|
selectedEntities: []
|
|
2179
2179
|
};
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2182
|
-
const o =
|
|
2181
|
+
function Rl(e, t, n = {}) {
|
|
2182
|
+
const o = Vs(e, n);
|
|
2183
2183
|
if (!o)
|
|
2184
2184
|
throw new Error("No connection ID found for card");
|
|
2185
2185
|
const r = t.cardDataSource || e.dataSource;
|
|
@@ -2187,11 +2187,11 @@ function El(e, t, n = {}) {
|
|
|
2187
2187
|
connectionId: o,
|
|
2188
2188
|
requestPayloadBase: {
|
|
2189
2189
|
...t,
|
|
2190
|
-
cardDataSource: n.liveDataSource ? r : r ||
|
|
2190
|
+
cardDataSource: n.liveDataSource ? r : r || ks(e, o)
|
|
2191
2191
|
}
|
|
2192
2192
|
};
|
|
2193
2193
|
}
|
|
2194
|
-
const
|
|
2194
|
+
const Ps = /* @__PURE__ */ new Set([
|
|
2195
2195
|
"day",
|
|
2196
2196
|
"week",
|
|
2197
2197
|
"month",
|
|
@@ -2201,7 +2201,7 @@ const Vs = /* @__PURE__ */ new Set([
|
|
|
2201
2201
|
"minute",
|
|
2202
2202
|
"second"
|
|
2203
2203
|
]);
|
|
2204
|
-
function
|
|
2204
|
+
function xs(e) {
|
|
2205
2205
|
let t = e.spec;
|
|
2206
2206
|
const n = zt(
|
|
2207
2207
|
e.controlDefinitions || [],
|
|
@@ -2248,12 +2248,12 @@ function ks(e) {
|
|
|
2248
2248
|
continue;
|
|
2249
2249
|
const I = (D) => d(D, m.controlId), v = m.target === "config_metric_selector" || m.target === "config_aggregation", M = f(t, m);
|
|
2250
2250
|
(!y || !M.some((D) => D.id === y)) && I("Choose a valid Matrix level or measure target for this control.");
|
|
2251
|
-
const
|
|
2252
|
-
s.has(
|
|
2251
|
+
const h = `${m.target}:${y}`;
|
|
2252
|
+
s.has(h) && I("Multiple controls cannot replace the same Matrix target."), s.add(h);
|
|
2253
2253
|
const w = (D) => {
|
|
2254
2254
|
const V = (l().byId.get(D.id) ?? []).filter((x) => !D.source || _e(D.source, x.field.source ?? e.spec.source));
|
|
2255
2255
|
if (V.length !== 1) return I(V.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
|
|
2256
|
-
const O =
|
|
2256
|
+
const O = hr.safeParse(V[0].field);
|
|
2257
2257
|
return O.success ? O.data : I(O.error.message);
|
|
2258
2258
|
}, B = m.target === "config_metric_selector" || m.target === "config_field_selector" ? m.mapping[b] : void 0, T = B && typeof B == "object" && "kind" in B && B.kind === "matrix_instance" ? B.id : void 0;
|
|
2259
2259
|
if (v) {
|
|
@@ -2262,7 +2262,7 @@ function ks(e) {
|
|
|
2262
2262
|
(S) => S.id === T && S.kind === "aggregate"
|
|
2263
2263
|
);
|
|
2264
2264
|
T !== void 0 && !D && I("The selected Matrix aggregate measure is no longer available.");
|
|
2265
|
-
const V = m.target === "config_metric_selector" && !D ? xo({ binding: m, selectedValue: b }) : void 0, O = ((D == null ? void 0 : D.kind) === "aggregate" ? D.aggregate : V == null ? void 0 : V.aggregate) ?? (m.target === "config_aggregation" ?
|
|
2265
|
+
const V = m.target === "config_metric_selector" && !D ? xo({ binding: m, selectedValue: b }) : void 0, O = ((D == null ? void 0 : D.kind) === "aggregate" ? D.aggregate : V == null ? void 0 : V.aggregate) ?? (m.target === "config_aggregation" ? Ct({ binding: m, selectedValue: b }) : void 0), x = O === void 0 ? void 0 : Cr.safeParse(O);
|
|
2266
2266
|
x && !x.success && I("This aggregation is not supported by Matrix."), t = {
|
|
2267
2267
|
...t,
|
|
2268
2268
|
measures: t.measures.map(
|
|
@@ -2279,8 +2279,8 @@ function ks(e) {
|
|
|
2279
2279
|
(S) => S.id === T
|
|
2280
2280
|
);
|
|
2281
2281
|
T !== void 0 && !D && I("The selected Matrix level is no longer available.");
|
|
2282
|
-
const V = m.target === "config_field_selector" && !D ? wo({ binding: m, selectedValue: b }) : void 0, O = m.target === "config_grain" ?
|
|
2283
|
-
O !== void 0 && !
|
|
2282
|
+
const V = m.target === "config_field_selector" && !D ? wo({ binding: m, selectedValue: b }) : void 0, O = m.target === "config_grain" ? Ct({ binding: m, selectedValue: b }) : D ? D.grain : V == null ? void 0 : V.granularity;
|
|
2283
|
+
O !== void 0 && !Ps.has(O) && I("This time grain is not supported by Matrix.");
|
|
2284
2284
|
const x = (S) => S.map((k) => {
|
|
2285
2285
|
if (k.id !== y) return k;
|
|
2286
2286
|
const A = (D == null ? void 0 : D.field) ?? (V ? w(V) : k.field), E = u(A, m.controlId), q = O ?? (V && be(E) ? k.grain : void 0);
|
|
@@ -2302,7 +2302,7 @@ function ks(e) {
|
|
|
2302
2302
|
try {
|
|
2303
2303
|
return Bo(p.data, t);
|
|
2304
2304
|
} catch (m) {
|
|
2305
|
-
if (m instanceof
|
|
2305
|
+
if (m instanceof Tr) return d(m.message);
|
|
2306
2306
|
throw m;
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
@@ -2323,24 +2323,24 @@ function _n(e, t) {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
return n;
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function ws(e, t = [], n = []) {
|
|
2327
2327
|
return Xt([...Ht(e), ..._n(t), ...n]);
|
|
2328
2328
|
}
|
|
2329
|
-
function
|
|
2329
|
+
function Os(e, t = {}) {
|
|
2330
2330
|
const n = t.controlBindings ?? [], o = zt(t.controlDefinitions ?? [], t.cardControlDefinitions ?? []), r = new Map(n.filter((i) => i.target === "config_field_selector" || i.target === "config_metric_selector").map((i) => [i, Gt({ binding: i, definitions: o, controlValues: t.controlValues })]));
|
|
2331
2331
|
return Xt([...Ht(e), ..._n(n, r)]);
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2334
|
-
return ze(e) ?
|
|
2333
|
+
function Bs(e, t) {
|
|
2334
|
+
return ze(e) ? As(e, t) : e.config ?? {};
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2336
|
+
function As(e, t) {
|
|
2337
2337
|
var o;
|
|
2338
2338
|
const n = (o = t == null ? void 0 : t.steps[t.steps.length - 1]) == null ? void 0 : o.toField;
|
|
2339
|
-
return n ?
|
|
2339
|
+
return n ? Ii(e.config ?? {}, n, {
|
|
2340
2340
|
sortPolicy: "retargetDimensionSort"
|
|
2341
2341
|
}) : e.config ?? {};
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function Es(e, t) {
|
|
2344
2344
|
const n = (e == null ? void 0 : e.steps) ?? [];
|
|
2345
2345
|
if (n.length !== 0)
|
|
2346
2346
|
return {
|
|
@@ -2359,7 +2359,7 @@ function Bs(e, t) {
|
|
|
2359
2359
|
logicalOperator: "AND",
|
|
2360
2360
|
negate: !1,
|
|
2361
2361
|
conditions: o.conditions.map(
|
|
2362
|
-
(i) =>
|
|
2362
|
+
(i) => Hr(
|
|
2363
2363
|
i,
|
|
2364
2364
|
`${i.field.id}-${i.value}`
|
|
2365
2365
|
)
|
|
@@ -2374,16 +2374,16 @@ const we = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
|
2374
2374
|
function te(e) {
|
|
2375
2375
|
return e instanceof Date ? JSON.stringify(Number.isNaN(e.getTime()) ? null : e.toISOString()) : Array.isArray(e) ? `[${e.map(te).join(",")}]` : we(e) ? `{${Object.keys(e).sort().filter((t) => e[t] !== void 0).map((t) => `${JSON.stringify(t)}:${te(e[t])}`).join(",")}}` : JSON.stringify(e) ?? "null";
|
|
2376
2376
|
}
|
|
2377
|
-
function
|
|
2377
|
+
function _s(e) {
|
|
2378
2378
|
const t = e;
|
|
2379
2379
|
return t.valueType === "date" || t.relativeMeta !== void 0 || t.temporalBucket !== void 0 || be(t.dataType);
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Rs(e) {
|
|
2382
2382
|
const t = we(e.field) ? e.field : void 0;
|
|
2383
2383
|
return e.temporalBucket !== void 0 || e.rawTemporal !== void 0 || e.relativeMeta !== void 0 || be(t == null ? void 0 : t.dataType);
|
|
2384
2384
|
}
|
|
2385
2385
|
function Rn(e) {
|
|
2386
|
-
return e ? [...(e.conditions ?? []).filter(
|
|
2386
|
+
return e ? [...(e.conditions ?? []).filter(Rs).map((n) => {
|
|
2387
2387
|
const o = we(n.field) ? n.field : {};
|
|
2388
2388
|
return {
|
|
2389
2389
|
field: o.qualifiedFieldName ?? o.name,
|
|
@@ -2396,7 +2396,7 @@ function Rn(e) {
|
|
|
2396
2396
|
}), ...(e.groups ?? []).flatMap((n) => Rn(n))] : [];
|
|
2397
2397
|
}
|
|
2398
2398
|
function Bt(e) {
|
|
2399
|
-
const t = e.filterValues.filter(
|
|
2399
|
+
const t = e.filterValues.filter(_s).map((o) => {
|
|
2400
2400
|
const r = o, i = we(r.fieldMeta) ? r.fieldMeta : void 0;
|
|
2401
2401
|
return {
|
|
2402
2402
|
field: (i == null ? void 0 : i.qualifiedFieldName) ?? r.name,
|
|
@@ -2411,7 +2411,7 @@ function Bt(e) {
|
|
|
2411
2411
|
...e.zoom ? { zoom: [e.zoom.from, e.zoom.to] } : {}
|
|
2412
2412
|
});
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function Ks(e, t, n) {
|
|
2415
2415
|
if (!t || n.drillActive || t.madeUnder !== n.currentFingerprint) return e;
|
|
2416
2416
|
const o = e.groupByColumns ?? [];
|
|
2417
2417
|
return o.some((r) => r.id === t.fieldId && r.grainMode === "automatic") ? {
|
|
@@ -2423,13 +2423,13 @@ function _s(e, t, n) {
|
|
|
2423
2423
|
})
|
|
2424
2424
|
} : e;
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function Kl(e) {
|
|
2427
2427
|
var t;
|
|
2428
2428
|
return (((t = e.config) == null ? void 0 : t.groupByColumns) ?? []).find(
|
|
2429
2429
|
(n) => n.grainMode === "automatic" && _o({ cardType: e.type, configBacked: !0, shelf: "groupBy", dataType: n.dataType }).ok
|
|
2430
2430
|
);
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function qs(e, t) {
|
|
2433
2433
|
if (!e || !t || t.id !== e.fieldId || vr(t)) return;
|
|
2434
2434
|
const {
|
|
2435
2435
|
granularity: n,
|
|
@@ -2454,34 +2454,34 @@ function Rs(e, t) {
|
|
|
2454
2454
|
groups: []
|
|
2455
2455
|
};
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function ql(e, t, n) {
|
|
2458
2458
|
const o = It(e, n), r = It(t, n);
|
|
2459
2459
|
if (!o || !r) return;
|
|
2460
2460
|
const [i, s] = o.first <= r.first ? [o, r] : [r, o];
|
|
2461
2461
|
return { from: i.first, to: s.last };
|
|
2462
2462
|
}
|
|
2463
|
-
function
|
|
2463
|
+
function Ns(e, t, n) {
|
|
2464
2464
|
if (!e || e.madeUnder !== n) return;
|
|
2465
|
-
const o = t == null ? void 0 : t.find((i) => i.id === e.fieldId && i.grainMode === "automatic"), r =
|
|
2465
|
+
const o = t == null ? void 0 : t.find((i) => i.id === e.fieldId && i.grainMode === "automatic"), r = qs(e, o);
|
|
2466
2466
|
return r ? { zoom: e, filterGroup: r } : void 0;
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2468
|
+
function Nl(e, t, n) {
|
|
2469
2469
|
if (!e) return;
|
|
2470
2470
|
const [o, r] = t <= n ? [t, n] : [n, t];
|
|
2471
2471
|
if (o < 0 || r >= e.length) return;
|
|
2472
2472
|
const i = e.slice(o, r + 1);
|
|
2473
2473
|
if (!i.every((d) => typeof d == "string" && d !== "")) return;
|
|
2474
2474
|
const s = [...i].sort(), a = s[0], c = s[s.length - 1];
|
|
2475
|
-
return
|
|
2475
|
+
return e.some(
|
|
2476
2476
|
(d, u) => (u < o || u > r) && typeof d == "string" && d > a && d < c
|
|
2477
2477
|
) ? void 0 : { first: a, last: c };
|
|
2478
2478
|
}
|
|
2479
|
-
function
|
|
2479
|
+
function Ll(e, t, n) {
|
|
2480
2480
|
if (!t || !n) return { from: e.from, to: e.to };
|
|
2481
2481
|
const o = Dt(new Date(t.startInclusive), n), r = Dt(new Date(Date.parse(t.endExclusive) - 1), n), i = e.from < o ? o : e.from, s = e.to > r ? r : e.to;
|
|
2482
2482
|
return i <= s ? { from: i, to: s } : { from: e.from, to: e.to };
|
|
2483
2483
|
}
|
|
2484
|
-
function
|
|
2484
|
+
function jl(e, t, n) {
|
|
2485
2485
|
const o = (i) => /* @__PURE__ */ new Date(`${i}T00:00:00.000Z`), r = new Intl.DateTimeFormat(t, { dateStyle: n, timeZone: "UTC" });
|
|
2486
2486
|
return e.from === e.to ? r.format(o(e.from)) : r.formatRange(o(e.from), o(e.to));
|
|
2487
2487
|
}
|
|
@@ -2491,46 +2491,46 @@ function rt(e) {
|
|
|
2491
2491
|
function it(e) {
|
|
2492
2492
|
return e === "not in" ? "exclude" : "include";
|
|
2493
2493
|
}
|
|
2494
|
-
function
|
|
2494
|
+
function Ls(e) {
|
|
2495
2495
|
return e === "exclude" ? "not in" : "in";
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2497
|
+
function zl(e) {
|
|
2498
2498
|
var n;
|
|
2499
2499
|
const t = (n = e.liveValue) == null ? void 0 : n.operation;
|
|
2500
2500
|
return rt(t) ? it(t) : e.pendingMode ?? e.authoredMode;
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function js(e) {
|
|
2503
2503
|
var o;
|
|
2504
2504
|
let t = !1;
|
|
2505
2505
|
const n = (o = e.inputs) == null ? void 0 : o.map((r) => {
|
|
2506
2506
|
if (r.kind !== "filter" || !r.filter) return r;
|
|
2507
|
-
const i =
|
|
2507
|
+
const i = zs(
|
|
2508
2508
|
r.filter,
|
|
2509
|
-
new Set(
|
|
2509
|
+
new Set(Gs(e.defaultInputValues, r))
|
|
2510
2510
|
);
|
|
2511
2511
|
return i === r.filter ? r : (t = !0, { ...r, filter: i });
|
|
2512
2512
|
});
|
|
2513
2513
|
return t ? { ...e, inputs: n } : e;
|
|
2514
2514
|
}
|
|
2515
|
-
function
|
|
2515
|
+
function zs(e, t) {
|
|
2516
2516
|
if (t.size !== 1 || !rt(e.operation))
|
|
2517
2517
|
return e;
|
|
2518
2518
|
const [n] = t;
|
|
2519
|
-
return it(e.operation) === n ? e : { ...e, operation:
|
|
2519
|
+
return it(e.operation) === n ? e : { ...e, operation: Ls(n) };
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2521
|
+
function Gs(e, t) {
|
|
2522
2522
|
var r;
|
|
2523
2523
|
const n = (i) => Object.values(i ?? {}).map((s) => s[t.id]);
|
|
2524
2524
|
return (t.runtimeScope === "shared" ? [(r = e == null ? void 0 : e.shared) == null ? void 0 : r[t.id]] : t.runtimeScope === "perSheet" ? n(e == null ? void 0 : e.bySheetId) : t.runtimeScope === "perCard" ? n(e == null ? void 0 : e.byCardId) : t.runtimeScope === "perDocumentSection" ? n(e == null ? void 0 : e.byDocumentSectionId) : []).flatMap(
|
|
2525
|
-
(i) => (i == null ? void 0 : i.status) === "set" && i.value.kind === "filter" ?
|
|
2525
|
+
(i) => (i == null ? void 0 : i.status) === "set" && i.value.kind === "filter" ? Hs(i.value.filterValue) : []
|
|
2526
2526
|
);
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2528
|
+
function Hs(e) {
|
|
2529
2529
|
return rt(e.operation) ? [it(e.operation)] : [];
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2532
|
-
const t = nn(e), o = N(t).issues.length ? t :
|
|
2533
|
-
return
|
|
2531
|
+
function Gl(e) {
|
|
2532
|
+
const t = nn(e), o = N(t).issues.length ? t : Ha(t);
|
|
2533
|
+
return Ci(js(o)).dashboard;
|
|
2534
2534
|
}
|
|
2535
2535
|
function st(e, t) {
|
|
2536
2536
|
const n = {};
|
|
@@ -2586,7 +2586,7 @@ function at(e, t, n) {
|
|
|
2586
2586
|
n
|
|
2587
2587
|
);
|
|
2588
2588
|
}
|
|
2589
|
-
function
|
|
2589
|
+
function Hl(e, t, n) {
|
|
2590
2590
|
return qn(e, t, n);
|
|
2591
2591
|
}
|
|
2592
2592
|
function qn(e, t, n) {
|
|
@@ -2646,7 +2646,7 @@ function Nn(e, t) {
|
|
|
2646
2646
|
inlineFilterValues: r
|
|
2647
2647
|
};
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2649
|
+
function Us(e, t) {
|
|
2650
2650
|
if (!t.size) return [...e];
|
|
2651
2651
|
const n = e.filter((r) => !t.has(r.filterId)), o = [...t.values()].filter(
|
|
2652
2652
|
(r) => r !== null
|
|
@@ -2668,16 +2668,16 @@ function Ln(e, t, n) {
|
|
|
2668
2668
|
...n
|
|
2669
2669
|
};
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2671
|
+
function $s(e, t) {
|
|
2672
2672
|
if (!t.size) return;
|
|
2673
2673
|
const n = Object.fromEntries(
|
|
2674
2674
|
Object.entries(e).map(([o, r]) => [o, [...r]])
|
|
2675
2675
|
);
|
|
2676
2676
|
for (const [o, r] of t)
|
|
2677
|
-
n[o] =
|
|
2677
|
+
n[o] = Us(n[o] ?? [], r);
|
|
2678
2678
|
return n;
|
|
2679
2679
|
}
|
|
2680
|
-
function
|
|
2680
|
+
function Qs(e, t, n) {
|
|
2681
2681
|
const o = new Map(
|
|
2682
2682
|
Q(e).map(({ card: s }) => [
|
|
2683
2683
|
s.id,
|
|
@@ -2697,7 +2697,7 @@ function Us(e, t, n) {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
return r ? i : void 0;
|
|
2699
2699
|
}
|
|
2700
|
-
function
|
|
2700
|
+
function Ul(e) {
|
|
2701
2701
|
const { dashboard: t, capture: n, calendar: o } = e, r = co(t, n.filterValues, {
|
|
2702
2702
|
calendar: o
|
|
2703
2703
|
}), i = n.dashboardInputExecutionSnapshot, s = n.controlValues, a = {
|
|
@@ -2727,15 +2727,15 @@ function Gl(e) {
|
|
|
2727
2727
|
...c != null && c.length ? { transientContexts: c } : {}
|
|
2728
2728
|
};
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2730
|
+
function $l(e, t) {
|
|
2731
2731
|
const { controlContractOverrides: n, cardId: o } = t;
|
|
2732
2732
|
if (!n || (n.controlDefinitions !== void 0 && (e.controls = n.controlDefinitions), typeof o != "string" || o.trim().length === 0))
|
|
2733
2733
|
return e;
|
|
2734
2734
|
const r = ae(e, o);
|
|
2735
2735
|
return r && (n.cardControlDefinitions !== void 0 && (r.controls = n.cardControlDefinitions), n.controlBindings !== void 0 && (r.controlBindings = n.controlBindings)), e;
|
|
2736
2736
|
}
|
|
2737
|
-
const
|
|
2738
|
-
function
|
|
2737
|
+
const Ws = ["bySheetId", "byCardId", "byDocumentSectionId"];
|
|
2738
|
+
function Js(e, t) {
|
|
2739
2739
|
const n = N(e);
|
|
2740
2740
|
let o = !1;
|
|
2741
2741
|
const r = (s) => {
|
|
@@ -2751,7 +2751,7 @@ function Qs(e, t) {
|
|
|
2751
2751
|
...t,
|
|
2752
2752
|
...t.shared ? { shared: r(t.shared) } : {}
|
|
2753
2753
|
};
|
|
2754
|
-
for (const s of
|
|
2754
|
+
for (const s of Ws) {
|
|
2755
2755
|
const a = t[s];
|
|
2756
2756
|
a && (i[s] = Object.fromEntries(
|
|
2757
2757
|
Object.entries(a).map(([c, l]) => [c, r(l) ?? {}])
|
|
@@ -2759,7 +2759,7 @@ function Qs(e, t) {
|
|
|
2759
2759
|
}
|
|
2760
2760
|
return o ? i : t;
|
|
2761
2761
|
}
|
|
2762
|
-
function
|
|
2762
|
+
function Zs(e) {
|
|
2763
2763
|
var t, n;
|
|
2764
2764
|
return ((n = (t = e.sheets) == null ? void 0 : t[0]) == null ? void 0 : n.id) ?? null;
|
|
2765
2765
|
}
|
|
@@ -2767,10 +2767,10 @@ function de(e, t) {
|
|
|
2767
2767
|
var n;
|
|
2768
2768
|
return !!t && !!((n = e.sheets) != null && n.some((o) => o.id === t));
|
|
2769
2769
|
}
|
|
2770
|
-
function
|
|
2770
|
+
function Ql(e) {
|
|
2771
2771
|
const { dashboard: t, host: n, calendar: o } = e, r = co(t, n.filterValues, {
|
|
2772
2772
|
calendar: o
|
|
2773
|
-
}).slots, i = n.controlValues, s = de(t, n.selectedSheetId) ? n.selectedSheetId :
|
|
2773
|
+
}).slots, i = n.controlValues, s = de(t, n.selectedSheetId) ? n.selectedSheetId : Zs(t);
|
|
2774
2774
|
return {
|
|
2775
2775
|
hostInputValues: r,
|
|
2776
2776
|
controlOverrides: i,
|
|
@@ -2799,7 +2799,7 @@ function zn(e, t) {
|
|
|
2799
2799
|
const o = ae(e, n);
|
|
2800
2800
|
return o ? Ho(o, e) ? "applies" : "not-eligible" : "removed";
|
|
2801
2801
|
}
|
|
2802
|
-
function
|
|
2802
|
+
function Wl(e, t) {
|
|
2803
2803
|
const n = zn(e, t);
|
|
2804
2804
|
return n ? n === "applies" : Qe(e).some(
|
|
2805
2805
|
(o) => o.id === t
|
|
@@ -2885,10 +2885,10 @@ function _(e, t, n, o = {}) {
|
|
|
2885
2885
|
for (const [s, a] of Object.entries(t ?? {})) {
|
|
2886
2886
|
const c = r.get(s);
|
|
2887
2887
|
if (c && cn(c)) {
|
|
2888
|
-
|
|
2888
|
+
Br(a) || (i[s] = a);
|
|
2889
2889
|
continue;
|
|
2890
2890
|
}
|
|
2891
|
-
if (c && o.sessionSorts &&
|
|
2891
|
+
if (c && o.sessionSorts && Ar(c)) {
|
|
2892
2892
|
a.sort && (i[s] = { sort: a.sort });
|
|
2893
2893
|
continue;
|
|
2894
2894
|
}
|
|
@@ -2901,7 +2901,7 @@ function _(e, t, n, o = {}) {
|
|
|
2901
2901
|
}
|
|
2902
2902
|
return i;
|
|
2903
2903
|
}
|
|
2904
|
-
function
|
|
2904
|
+
function Ys(e, t, n) {
|
|
2905
2905
|
if (t) {
|
|
2906
2906
|
if (de(e, t)) return t;
|
|
2907
2907
|
n.push({
|
|
@@ -2953,13 +2953,13 @@ function $(e, t) {
|
|
|
2953
2953
|
};
|
|
2954
2954
|
}
|
|
2955
2955
|
function At(e, t, n, o) {
|
|
2956
|
-
const { dashboard: r, baseline: i } = e, s = [], a = fn(t.state,
|
|
2956
|
+
const { dashboard: r, baseline: i } = e, s = [], a = fn(t.state, Ye), c = a.ok ? a.value : {};
|
|
2957
2957
|
for (const g of a.ok ? a.issues : [])
|
|
2958
|
-
s.push(
|
|
2958
|
+
s.push(Xs(g));
|
|
2959
2959
|
const l = jn(r), d = Nn(
|
|
2960
2960
|
l.compatibility,
|
|
2961
2961
|
Gn(r, l, c.inputs, s)
|
|
2962
|
-
), u =
|
|
2962
|
+
), u = Ys(r, c.selectedSheetId, s) ?? i.selectedSheetId, f = _(
|
|
2963
2963
|
r,
|
|
2964
2964
|
c.tableSettings,
|
|
2965
2965
|
s
|
|
@@ -2983,7 +2983,7 @@ function At(e, t, n, o) {
|
|
|
2983
2983
|
d.runtime
|
|
2984
2984
|
),
|
|
2985
2985
|
...$n(
|
|
2986
|
-
|
|
2986
|
+
$s(
|
|
2987
2987
|
st(r, e.calendar),
|
|
2988
2988
|
d.inlineFilterValues
|
|
2989
2989
|
)
|
|
@@ -3003,7 +3003,7 @@ function At(e, t, n, o) {
|
|
|
3003
3003
|
notices: s
|
|
3004
3004
|
});
|
|
3005
3005
|
}
|
|
3006
|
-
function
|
|
3006
|
+
function Xs(e) {
|
|
3007
3007
|
return {
|
|
3008
3008
|
kind: "setting-no-longer-applies",
|
|
3009
3009
|
target: e.target,
|
|
@@ -3027,12 +3027,12 @@ function Et(e, t, n) {
|
|
|
3027
3027
|
// Live slots stay, except a filter value this template no longer accepts:
|
|
3028
3028
|
// that filter loads its new default, as the old list did. The resolver
|
|
3029
3029
|
// ignores slots this template no longer has.
|
|
3030
|
-
dashboardInputValues:
|
|
3030
|
+
dashboardInputValues: Js(
|
|
3031
3031
|
o,
|
|
3032
3032
|
t.dashboardInputValues
|
|
3033
3033
|
),
|
|
3034
3034
|
...$n(
|
|
3035
|
-
|
|
3035
|
+
Qs(
|
|
3036
3036
|
o,
|
|
3037
3037
|
st(o, e.calendar),
|
|
3038
3038
|
t.inlineFilterValuesMap ?? {}
|
|
@@ -3047,7 +3047,7 @@ function Et(e, t, n) {
|
|
|
3047
3047
|
)
|
|
3048
3048
|
};
|
|
3049
3049
|
}
|
|
3050
|
-
function
|
|
3050
|
+
function Jl(e) {
|
|
3051
3051
|
const { dashboard: t, baseline: n, event: o } = e, r = e.rememberedTableSettings;
|
|
3052
3052
|
switch (o.kind) {
|
|
3053
3053
|
case "initial-load":
|
|
@@ -3138,7 +3138,7 @@ function Ql(e) {
|
|
|
3138
3138
|
}
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
3141
|
-
function
|
|
3141
|
+
function Zl(e) {
|
|
3142
3142
|
const { dashboard: t, calendar: n } = e, o = e.hostControlValues, r = {
|
|
3143
3143
|
...e.baseline,
|
|
3144
3144
|
controlOverrides: o,
|
|
@@ -3156,7 +3156,7 @@ function Jl(e) {
|
|
|
3156
3156
|
if (e.appliedBookmark) {
|
|
3157
3157
|
const c = fn(
|
|
3158
3158
|
e.appliedBookmark.state,
|
|
3159
|
-
|
|
3159
|
+
Ye
|
|
3160
3160
|
), l = jn(t), d = Nn(
|
|
3161
3161
|
l.compatibility,
|
|
3162
3162
|
Gn(
|
|
@@ -3182,7 +3182,7 @@ function Jl(e) {
|
|
|
3182
3182
|
}
|
|
3183
3183
|
};
|
|
3184
3184
|
}
|
|
3185
|
-
function
|
|
3185
|
+
function Yl(e, t, n) {
|
|
3186
3186
|
const o = Hn(n.values);
|
|
3187
3187
|
return {
|
|
3188
3188
|
...o,
|
|
@@ -3215,26 +3215,26 @@ function Qn(e, t) {
|
|
|
3215
3215
|
o.has(i) || pe(s.slot) || De(r, s, { status: "cleared" });
|
|
3216
3216
|
return Ve(r);
|
|
3217
3217
|
}
|
|
3218
|
-
function
|
|
3218
|
+
function Xl(e) {
|
|
3219
3219
|
const { dashboard: t, baseline: n, current: o } = e, r = Qn(n.materializedInputs, o.inputs), i = _(
|
|
3220
3220
|
t,
|
|
3221
3221
|
o.tableSettings,
|
|
3222
3222
|
void 0
|
|
3223
3223
|
), s = o.selectedSheetId && o.selectedSheetId !== n.selectedSheetId && de(t, o.selectedSheetId) ? o.selectedSheetId : void 0;
|
|
3224
3224
|
return {
|
|
3225
|
-
version:
|
|
3225
|
+
version: Ye,
|
|
3226
3226
|
...s ? { selectedSheetId: s } : {},
|
|
3227
3227
|
...re(r).length ? { inputs: r } : {},
|
|
3228
3228
|
...Object.keys(i).length ? { tableSettings: i } : {}
|
|
3229
3229
|
};
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3231
|
+
function ea(e) {
|
|
3232
3232
|
const t = /* @__PURE__ */ new Map();
|
|
3233
3233
|
for (const n of Qe(e))
|
|
3234
3234
|
n.label && t.set(n.id, n.label);
|
|
3235
3235
|
return t;
|
|
3236
3236
|
}
|
|
3237
|
-
function
|
|
3237
|
+
function ta(e, t, n) {
|
|
3238
3238
|
var r, i;
|
|
3239
3239
|
const o = en(n);
|
|
3240
3240
|
if (o) {
|
|
@@ -3243,16 +3243,16 @@ function Xs(e, t, n) {
|
|
|
3243
3243
|
}
|
|
3244
3244
|
return t.get(n) ?? n;
|
|
3245
3245
|
}
|
|
3246
|
-
function
|
|
3246
|
+
function ec(e) {
|
|
3247
3247
|
var l, d;
|
|
3248
|
-
const { dashboard: t, opened: n, current: o } = e, r = [], i =
|
|
3248
|
+
const { dashboard: t, opened: n, current: o } = e, r = [], i = ea(t), s = /* @__PURE__ */ new Set();
|
|
3249
3249
|
for (const u of re(
|
|
3250
3250
|
Qn(n.inputs, o.inputs)
|
|
3251
3251
|
))
|
|
3252
3252
|
s.has(u.inputId) || (s.add(u.inputId), r.push({
|
|
3253
3253
|
target: "input",
|
|
3254
3254
|
inputId: u.inputId,
|
|
3255
|
-
label:
|
|
3255
|
+
label: ta(t, i, u.inputId)
|
|
3256
3256
|
}));
|
|
3257
3257
|
(n.selectedSheetId ?? null) !== (o.selectedSheetId ?? null) && r.push({ target: "sheet" });
|
|
3258
3258
|
const a = _(
|
|
@@ -3289,7 +3289,7 @@ function Rt(e) {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
};
|
|
3291
3291
|
}
|
|
3292
|
-
function
|
|
3292
|
+
function na(e) {
|
|
3293
3293
|
var r, i;
|
|
3294
3294
|
if ((r = e.card.sql) != null && r.trim())
|
|
3295
3295
|
return {
|
|
@@ -3343,29 +3343,25 @@ function ea(e) {
|
|
|
3343
3343
|
}
|
|
3344
3344
|
} : { inputs: e.inputs, fieldCandidates: t, resolution: { status: "none" } };
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3347
|
-
var n, o;
|
|
3346
|
+
function tc(e) {
|
|
3348
3347
|
const t = {
|
|
3349
3348
|
ownerCardCount: 0,
|
|
3350
3349
|
matchingCardCount: 0,
|
|
3351
3350
|
globalPrecedenceCardCount: 0,
|
|
3352
|
-
ambiguousCardCount: 0
|
|
3353
|
-
authorControlledCardCount: 0
|
|
3351
|
+
ambiguousCardCount: 0
|
|
3354
3352
|
};
|
|
3355
|
-
for (const
|
|
3356
|
-
const
|
|
3357
|
-
(
|
|
3353
|
+
for (const n of e.targets) {
|
|
3354
|
+
const o = n.plan.fieldCandidates.find(
|
|
3355
|
+
(i) => i.input.inputId === e.inputId
|
|
3358
3356
|
);
|
|
3359
|
-
if (!
|
|
3357
|
+
if (!o || o.resolution.status !== "eligible") continue;
|
|
3360
3358
|
t.matchingCardCount += 1;
|
|
3361
|
-
const { resolution:
|
|
3362
|
-
|
|
3363
|
-
(a) => a.comparison !== void 0
|
|
3364
|
-
)) && (t.authorControlledCardCount += 1);
|
|
3359
|
+
const { resolution: r } = n.plan;
|
|
3360
|
+
r.status === "resolved" && r.resolvedOwner.inputId === e.inputId ? t.ownerCardCount += 1 : r.status === "resolved" && r.resolvedOwner.owner.kind === "global_date" ? t.globalPrecedenceCardCount += 1 : r.status === "ambiguous" && r.candidateInputIds.includes(e.inputId) && (t.ambiguousCardCount += 1);
|
|
3365
3361
|
}
|
|
3366
3362
|
return t;
|
|
3367
3363
|
}
|
|
3368
|
-
const
|
|
3364
|
+
const oa = /* @__PURE__ */ new Set([
|
|
3369
3365
|
"between",
|
|
3370
3366
|
"not between",
|
|
3371
3367
|
"=",
|
|
@@ -3376,36 +3372,36 @@ const ta = /* @__PURE__ */ new Set([
|
|
|
3376
3372
|
"<=",
|
|
3377
3373
|
"is null",
|
|
3378
3374
|
"is not null"
|
|
3379
|
-
]),
|
|
3375
|
+
]), ra = /^(\d{4}-\d{2}-\d{2})T/, ia = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/;
|
|
3380
3376
|
function ct(e) {
|
|
3381
|
-
return
|
|
3377
|
+
return oa.has(e);
|
|
3382
3378
|
}
|
|
3383
|
-
function
|
|
3379
|
+
function sa(e, t) {
|
|
3384
3380
|
if (e instanceof Date)
|
|
3385
3381
|
return Number.isNaN(e.getTime()) ? e : t ? vt(e, t, "yyyy-MM-dd") : e.toISOString().slice(0, 10);
|
|
3386
3382
|
if (typeof e != "string")
|
|
3387
3383
|
return e;
|
|
3388
3384
|
const n = e.trim();
|
|
3389
|
-
if (t &&
|
|
3385
|
+
if (t && ia.test(n)) {
|
|
3390
3386
|
const r = new Date(n);
|
|
3391
3387
|
if (!Number.isNaN(r.getTime()))
|
|
3392
3388
|
return vt(r, t, "yyyy-MM-dd");
|
|
3393
3389
|
}
|
|
3394
|
-
const o =
|
|
3390
|
+
const o = ra.exec(n);
|
|
3395
3391
|
return o ? o[1] : e;
|
|
3396
3392
|
}
|
|
3397
|
-
function
|
|
3393
|
+
function Wn(e, t) {
|
|
3398
3394
|
return Array.isArray(e) ? e.map(
|
|
3399
|
-
(n) =>
|
|
3395
|
+
(n) => sa(n, t)
|
|
3400
3396
|
) : e;
|
|
3401
3397
|
}
|
|
3402
|
-
function
|
|
3403
|
-
return typeof e.allowMinutePrecision == "boolean" ? e.allowMinutePrecision :
|
|
3398
|
+
function Jn(e) {
|
|
3399
|
+
return typeof e.allowMinutePrecision == "boolean" ? e.allowMinutePrecision : We(
|
|
3404
3400
|
e.dashboard,
|
|
3405
3401
|
e.semanticExecutionPayload
|
|
3406
3402
|
).allEligibleTargetsAreDateTime;
|
|
3407
3403
|
}
|
|
3408
|
-
function
|
|
3404
|
+
function Zn(e) {
|
|
3409
3405
|
const {
|
|
3410
3406
|
globalDateFilter: t,
|
|
3411
3407
|
globalDateFilterValue: n,
|
|
@@ -3419,7 +3415,7 @@ function Yn(e) {
|
|
|
3419
3415
|
...n,
|
|
3420
3416
|
filterId: t.id
|
|
3421
3417
|
};
|
|
3422
|
-
const i = n, s = i.temporalPrecision === "minute" || ye(i.relativeMeta) === "minute", a = !r && s, c = i.operation === "is null" || i.operation === "is not null" ? [] : a ?
|
|
3418
|
+
const i = n, s = i.temporalPrecision === "minute" || ye(i.relativeMeta) === "minute", a = !r && s, c = i.operation === "is null" || i.operation === "is not null" ? [] : a ? Wn(i.values, o) : i.values, l = r || ye(i.relativeMeta) !== "minute" ? i.relativeMeta : void 0, d = r && i.temporalPrecision === "minute" ? i.temporalPrecision : void 0, {
|
|
3423
3419
|
relativeMeta: u,
|
|
3424
3420
|
temporalPrecision: f,
|
|
3425
3421
|
values: p,
|
|
@@ -3433,19 +3429,19 @@ function Yn(e) {
|
|
|
3433
3429
|
...d ? { temporalPrecision: d } : {}
|
|
3434
3430
|
};
|
|
3435
3431
|
}
|
|
3436
|
-
function
|
|
3437
|
-
const t =
|
|
3432
|
+
function aa(e) {
|
|
3433
|
+
const t = J(e.filters);
|
|
3438
3434
|
if (!t)
|
|
3439
3435
|
return e.filterValues;
|
|
3440
|
-
const n =
|
|
3441
|
-
return e.filterValues.map((o) => o.filterId !== t.id ? o :
|
|
3436
|
+
const n = Jn(e);
|
|
3437
|
+
return e.filterValues.map((o) => o.filterId !== t.id ? o : Zn({
|
|
3442
3438
|
globalDateFilter: t,
|
|
3443
3439
|
globalDateFilterValue: o,
|
|
3444
3440
|
timezone: e.timezone,
|
|
3445
3441
|
allowMinutePrecision: n
|
|
3446
3442
|
}) || o);
|
|
3447
3443
|
}
|
|
3448
|
-
function
|
|
3444
|
+
function Yn(e) {
|
|
3449
3445
|
const {
|
|
3450
3446
|
globalDateFilter: t,
|
|
3451
3447
|
globalDateFilterValue: n,
|
|
@@ -3465,7 +3461,7 @@ function Zn(e) {
|
|
|
3465
3461
|
name: o.qualifiedFieldName || o.name,
|
|
3466
3462
|
operation: a.operation,
|
|
3467
3463
|
valueType: "date",
|
|
3468
|
-
values: a.operation === "is null" || a.operation === "is not null" ? [] : p ?
|
|
3464
|
+
values: a.operation === "is null" || a.operation === "is not null" ? [] : p ? Wn(
|
|
3469
3465
|
a.values,
|
|
3470
3466
|
i
|
|
3471
3467
|
) : a.values,
|
|
@@ -3493,7 +3489,7 @@ function Zn(e) {
|
|
|
3493
3489
|
function z(e) {
|
|
3494
3490
|
return typeof e == "string" ? e.trim() : "";
|
|
3495
3491
|
}
|
|
3496
|
-
function
|
|
3492
|
+
function la(e) {
|
|
3497
3493
|
var t;
|
|
3498
3494
|
return (((t = e.semanticContext) == null ? void 0 : t.selectedEntities) || []).filter((n) => typeof n == "object" && n !== null).filter((n) => n.type === "dataset").map((n) => {
|
|
3499
3495
|
var o;
|
|
@@ -3504,11 +3500,11 @@ function sa(e) {
|
|
|
3504
3500
|
};
|
|
3505
3501
|
}).filter((n) => n.domainId && n.datasetName);
|
|
3506
3502
|
}
|
|
3507
|
-
function
|
|
3503
|
+
function ca(e) {
|
|
3508
3504
|
var c, l, d, u, f;
|
|
3509
3505
|
if (ne(e) || (c = e.sql) != null && c.trim())
|
|
3510
3506
|
return null;
|
|
3511
|
-
const t =
|
|
3507
|
+
const t = la(e), n = z((l = e.semanticContext) == null ? void 0 : l.semanticDomainId), o = z((d = e.fieldMeta) == null ? void 0 : d.entityId), r = z((u = e.fieldMeta) == null ? void 0 : u.entityName), i = z((f = e.fieldMeta) == null ? void 0 : f.entityType) === "dataset", s = t.find(
|
|
3512
3508
|
(p) => o && p.selectedEntityId === o
|
|
3513
3509
|
);
|
|
3514
3510
|
if (s)
|
|
@@ -3521,22 +3517,22 @@ function aa(e) {
|
|
|
3521
3517
|
datasetName: r
|
|
3522
3518
|
} : null);
|
|
3523
3519
|
}
|
|
3524
|
-
function
|
|
3520
|
+
function da(e) {
|
|
3525
3521
|
var r, i;
|
|
3526
3522
|
const { filter: t, semanticExecutionPayload: n } = e;
|
|
3527
3523
|
if (!n)
|
|
3528
3524
|
return null;
|
|
3529
|
-
const o =
|
|
3525
|
+
const o = ca(t);
|
|
3530
3526
|
return o && ((i = (r = n.domainsById[o.domainId]) == null ? void 0 : r.datasetsByName[o.datasetName]) == null ? void 0 : i.primaryDateField) || null;
|
|
3531
3527
|
}
|
|
3532
3528
|
function Xn(e) {
|
|
3533
|
-
const t =
|
|
3529
|
+
const t = J(e.filters);
|
|
3534
3530
|
return t ? e.filterValues.filter(
|
|
3535
3531
|
(n) => n.filterId !== t.id
|
|
3536
3532
|
) : e.filterValues;
|
|
3537
3533
|
}
|
|
3538
|
-
function
|
|
3539
|
-
const t =
|
|
3534
|
+
function nc(e) {
|
|
3535
|
+
const t = J(e.filters), n = Xn({
|
|
3540
3536
|
filters: e.filters,
|
|
3541
3537
|
filterValues: e.filterValues
|
|
3542
3538
|
});
|
|
@@ -3544,10 +3540,10 @@ function ec(e) {
|
|
|
3544
3540
|
return n;
|
|
3545
3541
|
const o = e.filterValues.find(
|
|
3546
3542
|
(s) => s.filterId === t.id
|
|
3547
|
-
), r =
|
|
3543
|
+
), r = da({
|
|
3548
3544
|
filter: e.filter,
|
|
3549
3545
|
semanticExecutionPayload: e.semanticExecutionPayload
|
|
3550
|
-
}), i =
|
|
3546
|
+
}), i = Yn({
|
|
3551
3547
|
globalDateFilter: t,
|
|
3552
3548
|
globalDateFilterValue: o,
|
|
3553
3549
|
resolvedPrimaryDateField: r || void 0,
|
|
@@ -3557,9 +3553,9 @@ function ec(e) {
|
|
|
3557
3553
|
});
|
|
3558
3554
|
return i ? [i, ...n] : n;
|
|
3559
3555
|
}
|
|
3560
|
-
function
|
|
3556
|
+
function ua(e) {
|
|
3561
3557
|
var d;
|
|
3562
|
-
const t =
|
|
3558
|
+
const t = J(e.filters), n = t ? e.cardFilterValues.find(
|
|
3563
3559
|
(u) => u.filterId === t.id
|
|
3564
3560
|
) : void 0, o = t ? e.cardFilterValues.filter(
|
|
3565
3561
|
(u) => u.filterId !== t.id
|
|
@@ -3568,7 +3564,7 @@ function ca(e) {
|
|
|
3568
3564
|
cardConfig: e.cardConfig,
|
|
3569
3565
|
resolvedFields: e.resolvedFields,
|
|
3570
3566
|
semanticExecutionPayload: e.semanticExecutionPayload
|
|
3571
|
-
}), i =
|
|
3567
|
+
}), i = Yn({
|
|
3572
3568
|
globalDateFilter: t,
|
|
3573
3569
|
globalDateFilterValue: n,
|
|
3574
3570
|
resolvedPrimaryDateField: r || void 0,
|
|
@@ -3589,7 +3585,7 @@ function ca(e) {
|
|
|
3589
3585
|
effectiveFilterValue: f,
|
|
3590
3586
|
mappedFilterValue: (p = e.mappedFilterValuesByInputId) == null ? void 0 : p.get(u.inputId)
|
|
3591
3587
|
}] : [];
|
|
3592
|
-
})) || [], l =
|
|
3588
|
+
})) || [], l = na({
|
|
3593
3589
|
inputs: c,
|
|
3594
3590
|
temporalBinding: r,
|
|
3595
3591
|
card: e.card
|
|
@@ -3600,13 +3596,13 @@ function ca(e) {
|
|
|
3600
3596
|
dateComparisonPlan: l
|
|
3601
3597
|
};
|
|
3602
3598
|
}
|
|
3603
|
-
function
|
|
3604
|
-
const t =
|
|
3599
|
+
function oc(e) {
|
|
3600
|
+
const t = J(e.filters), n = Jn(e), o = t ? e.filterValues.find(
|
|
3605
3601
|
(s) => s.filterId === t.id
|
|
3606
3602
|
) : void 0, r = Xn(e);
|
|
3607
3603
|
return !t || !o || !ct(o.operation) ? r : [
|
|
3608
3604
|
{
|
|
3609
|
-
...
|
|
3605
|
+
...Zn({
|
|
3610
3606
|
globalDateFilter: t,
|
|
3611
3607
|
globalDateFilterValue: o,
|
|
3612
3608
|
timezone: e.timezone,
|
|
@@ -3618,26 +3614,26 @@ function tc(e) {
|
|
|
3618
3614
|
...r
|
|
3619
3615
|
];
|
|
3620
3616
|
}
|
|
3621
|
-
class
|
|
3617
|
+
class fa extends Error {
|
|
3622
3618
|
}
|
|
3623
|
-
function
|
|
3619
|
+
function rc(e, t) {
|
|
3624
3620
|
const n = new Map((e ? Q(e) : []).map(({ card: o }) => [o.id, o]));
|
|
3625
3621
|
return t && n.set(t.id, t), [...n.values()].flatMap((o) => {
|
|
3626
3622
|
const r = Ge(o);
|
|
3627
|
-
return r.status === "ready" ?
|
|
3623
|
+
return r.status === "ready" ? ws(r.config.spec, o.controlBindings) : [];
|
|
3628
3624
|
});
|
|
3629
3625
|
}
|
|
3630
|
-
function
|
|
3631
|
-
const o =
|
|
3626
|
+
function ma(e, t, n) {
|
|
3627
|
+
const o = Wo(e);
|
|
3632
3628
|
if (!o) throw new Error("Matrix card definition is required.");
|
|
3633
|
-
const r = n &&
|
|
3629
|
+
const r = n && xs({
|
|
3634
3630
|
...n,
|
|
3635
3631
|
spec: o.spec,
|
|
3636
3632
|
catalog: t.map((d) => ({ ...d, id: d.resolvedField.id }))
|
|
3637
|
-
}), i = r ? { ...o, spec: r.spec } : o, s =
|
|
3633
|
+
}), i = r ? { ...o, spec: r.spec } : o, s = Jo(t), a = Zo(t), c = (d) => {
|
|
3638
3634
|
const u = a(d, i.spec.source);
|
|
3639
3635
|
if (!(!u && d.derivedField)) {
|
|
3640
|
-
if (!u) throw new
|
|
3636
|
+
if (!u) throw new fa(`Matrix field metadata is unavailable: ${d.name}`);
|
|
3641
3637
|
return { ...u, ...d.derivedField ? { derivedField: d.derivedField } : {} };
|
|
3642
3638
|
}
|
|
3643
3639
|
}, l = {
|
|
@@ -3659,7 +3655,7 @@ function ua(e, t, n) {
|
|
|
3659
3655
|
};
|
|
3660
3656
|
return { config: i, fields: l, resolveField: s };
|
|
3661
3657
|
}
|
|
3662
|
-
function
|
|
3658
|
+
function pa(e) {
|
|
3663
3659
|
const t = e.filter(Boolean);
|
|
3664
3660
|
if (t.length !== 0)
|
|
3665
3661
|
return t.length === 1 ? t[0] : {
|
|
@@ -3670,7 +3666,7 @@ function fa(e) {
|
|
|
3670
3666
|
groups: t
|
|
3671
3667
|
};
|
|
3672
3668
|
}
|
|
3673
|
-
function
|
|
3669
|
+
function ga(e) {
|
|
3674
3670
|
if (!e) return;
|
|
3675
3671
|
const t = (n) => ({
|
|
3676
3672
|
logicalOperator: n.logicalOperator,
|
|
@@ -3690,10 +3686,10 @@ function ma(e) {
|
|
|
3690
3686
|
});
|
|
3691
3687
|
return JSON.stringify(t(e));
|
|
3692
3688
|
}
|
|
3693
|
-
function
|
|
3689
|
+
function ya(e, t, n = {}) {
|
|
3694
3690
|
const o = e.metricColumns || [];
|
|
3695
3691
|
if (o.length === 0) return e;
|
|
3696
|
-
const r =
|
|
3692
|
+
const r = Yo.includes(
|
|
3697
3693
|
t
|
|
3698
3694
|
), i = Xo.includes(
|
|
3699
3695
|
t
|
|
@@ -3711,7 +3707,7 @@ function pa(e, t, n = {}) {
|
|
|
3711
3707
|
const c = o.map(
|
|
3712
3708
|
(l) => {
|
|
3713
3709
|
var f;
|
|
3714
|
-
const d =
|
|
3710
|
+
const d = Er(l);
|
|
3715
3711
|
if (d === "none")
|
|
3716
3712
|
return l;
|
|
3717
3713
|
let u = l;
|
|
@@ -3726,38 +3722,38 @@ function pa(e, t, n = {}) {
|
|
|
3726
3722
|
metricColumns: c
|
|
3727
3723
|
} : e;
|
|
3728
3724
|
}
|
|
3729
|
-
function
|
|
3725
|
+
function ic(e, t = {}) {
|
|
3730
3726
|
return eo(to(e, t));
|
|
3731
3727
|
}
|
|
3732
3728
|
function eo(e) {
|
|
3733
3729
|
const t = [e.drill, e.selections, e.zoom];
|
|
3734
|
-
return e.authored ?
|
|
3730
|
+
return e.authored ? Ur(e.authored, t, Qt()) : pa(t);
|
|
3735
3731
|
}
|
|
3736
3732
|
function to(e, t = {}) {
|
|
3737
3733
|
return {
|
|
3738
3734
|
authored: t.includeAuthoredFilters === !1 ? void 0 : er(e),
|
|
3739
|
-
drill:
|
|
3740
|
-
selections:
|
|
3735
|
+
drill: Es(t.drill, e.id),
|
|
3736
|
+
selections: $r(t.selections ?? []),
|
|
3741
3737
|
...t.zoom ? { zoom: t.zoom } : {}
|
|
3742
3738
|
};
|
|
3743
3739
|
}
|
|
3744
|
-
function
|
|
3745
|
-
const o =
|
|
3746
|
-
return ze(e) ?
|
|
3740
|
+
function ba(e, t, n) {
|
|
3741
|
+
const o = Bs(e, t);
|
|
3742
|
+
return ze(e) ? ya(
|
|
3747
3743
|
{ ...o, filters: n },
|
|
3748
3744
|
e.type,
|
|
3749
3745
|
// A data variable's card keeps its own period comparison (P3b-03).
|
|
3750
|
-
{ keepsPeriodComparison:
|
|
3746
|
+
{ keepsPeriodComparison: _r(e) }
|
|
3751
3747
|
) : o;
|
|
3752
3748
|
}
|
|
3753
|
-
function
|
|
3749
|
+
function Ca(e) {
|
|
3754
3750
|
const t = tr(e);
|
|
3755
3751
|
return {
|
|
3756
3752
|
contextMode: t,
|
|
3757
3753
|
shouldApplyDashboardFilters: !t || t === "full"
|
|
3758
3754
|
};
|
|
3759
3755
|
}
|
|
3760
|
-
function
|
|
3756
|
+
function ha(e) {
|
|
3761
3757
|
const t = e.dashboardControls || [], n = e.card.controls || [], o = /* @__PURE__ */ new Set([
|
|
3762
3758
|
...t.map((r) => r.id),
|
|
3763
3759
|
...n.map((r) => r.id)
|
|
@@ -3765,7 +3761,7 @@ function ba(e) {
|
|
|
3765
3761
|
return no(
|
|
3766
3762
|
e.card,
|
|
3767
3763
|
{
|
|
3768
|
-
controlValues:
|
|
3764
|
+
controlValues: Wt({
|
|
3769
3765
|
relevantControlIds: o,
|
|
3770
3766
|
dashboardValues: e.dashboardControlValues,
|
|
3771
3767
|
cardValues: e.cardControlValues
|
|
@@ -3800,7 +3796,7 @@ function no(e, t, n) {
|
|
|
3800
3796
|
(f) => l.has(f.controlId)
|
|
3801
3797
|
);
|
|
3802
3798
|
return {
|
|
3803
|
-
controlValues:
|
|
3799
|
+
controlValues: Wt({
|
|
3804
3800
|
relevantControlIds: l,
|
|
3805
3801
|
dashboardValues: t.controlValues
|
|
3806
3802
|
}),
|
|
@@ -3809,12 +3805,12 @@ function no(e, t, n) {
|
|
|
3809
3805
|
controlBindings: d
|
|
3810
3806
|
};
|
|
3811
3807
|
}
|
|
3812
|
-
function
|
|
3808
|
+
function Ia(e, t) {
|
|
3813
3809
|
return !!t && e.endsWith(t);
|
|
3814
3810
|
}
|
|
3815
3811
|
function oo(e, t) {
|
|
3816
3812
|
return (e ?? []).filter(
|
|
3817
|
-
(n) =>
|
|
3813
|
+
(n) => Ia(n.filterId, t)
|
|
3818
3814
|
);
|
|
3819
3815
|
}
|
|
3820
3816
|
function ro(e, t, n) {
|
|
@@ -3826,7 +3822,7 @@ function ro(e, t, n) {
|
|
|
3826
3822
|
...n ? { owner: n } : {}
|
|
3827
3823
|
};
|
|
3828
3824
|
}
|
|
3829
|
-
function
|
|
3825
|
+
function va(e) {
|
|
3830
3826
|
if (e.resolution.status === "resolved")
|
|
3831
3827
|
return ro(
|
|
3832
3828
|
e.card,
|
|
@@ -3834,10 +3830,10 @@ function Ca(e) {
|
|
|
3834
3830
|
e.resolution.resolvedOwner.owner
|
|
3835
3831
|
);
|
|
3836
3832
|
}
|
|
3837
|
-
function
|
|
3833
|
+
function Fa(e) {
|
|
3838
3834
|
return `Set ${e.join(", ")} to run this card.`;
|
|
3839
3835
|
}
|
|
3840
|
-
function
|
|
3836
|
+
function Da({
|
|
3841
3837
|
dashboardInputContext: e,
|
|
3842
3838
|
shouldApplyDashboardFilters: t
|
|
3843
3839
|
}) {
|
|
@@ -3852,7 +3848,7 @@ function va({
|
|
|
3852
3848
|
(o) => n.has(o.filterId)
|
|
3853
3849
|
);
|
|
3854
3850
|
}
|
|
3855
|
-
function
|
|
3851
|
+
function Sa({
|
|
3856
3852
|
dashboardInputFilterValues: e,
|
|
3857
3853
|
adHocFilterValues: t
|
|
3858
3854
|
}) {
|
|
@@ -3882,7 +3878,7 @@ function Se(e, t) {
|
|
|
3882
3878
|
return u.kind === "filter" && ((f = u.compatibility) == null ? void 0 : f.source) === "cardInlineFilter" ? [u.filter.id] : [];
|
|
3883
3879
|
}
|
|
3884
3880
|
)
|
|
3885
|
-
), a =
|
|
3881
|
+
), a = Da({
|
|
3886
3882
|
dashboardInputContext: t.dashboardInputContext,
|
|
3887
3883
|
shouldApplyDashboardFilters: t.shouldApplyDashboardFilters
|
|
3888
3884
|
}).filter((u) => !i.has(u.filterId)), c = a.filter(
|
|
@@ -3902,7 +3898,7 @@ function Se(e, t) {
|
|
|
3902
3898
|
} : {
|
|
3903
3899
|
status: "ready",
|
|
3904
3900
|
filterValues: [
|
|
3905
|
-
...
|
|
3901
|
+
...Sa({
|
|
3906
3902
|
dashboardInputFilterValues: [
|
|
3907
3903
|
...c,
|
|
3908
3904
|
...d.filterValues
|
|
@@ -3915,7 +3911,7 @@ function Se(e, t) {
|
|
|
3915
3911
|
mappingDispositions: d.dispositions
|
|
3916
3912
|
};
|
|
3917
3913
|
}
|
|
3918
|
-
function
|
|
3914
|
+
function Ta(e, t) {
|
|
3919
3915
|
const n = e.dashboardInputContext;
|
|
3920
3916
|
if (!n) return [];
|
|
3921
3917
|
const o = new Set(
|
|
@@ -3929,7 +3925,7 @@ function Da(e, t) {
|
|
|
3929
3925
|
return s ? s.kind === "filter" && (!e.shouldApplyDashboardFilters && !mn(s) || o.has(s.id)) ? [] : [i.label] : [];
|
|
3930
3926
|
});
|
|
3931
3927
|
}
|
|
3932
|
-
function
|
|
3928
|
+
function Ma({
|
|
3933
3929
|
card: e,
|
|
3934
3930
|
cardConfig: t,
|
|
3935
3931
|
input: n,
|
|
@@ -3942,7 +3938,7 @@ function Sa({
|
|
|
3942
3938
|
var m;
|
|
3943
3939
|
const c = n.dashboardInputContext ? n.dashboardInputContext.inputs.flatMap(
|
|
3944
3940
|
(y) => y.kind === "filter" ? [y.filter] : []
|
|
3945
|
-
) : [], l = Se(e, n), d =
|
|
3941
|
+
) : [], l = Se(e, n), d = Ta(
|
|
3946
3942
|
n,
|
|
3947
3943
|
l.mappingDispositions
|
|
3948
3944
|
);
|
|
@@ -3962,7 +3958,7 @@ function Sa({
|
|
|
3962
3958
|
mappingDispositions: l.mappingDispositions,
|
|
3963
3959
|
missingRequiredLabels: []
|
|
3964
3960
|
};
|
|
3965
|
-
const u =
|
|
3961
|
+
const u = ua({
|
|
3966
3962
|
card: e,
|
|
3967
3963
|
cardConfig: t,
|
|
3968
3964
|
filters: c,
|
|
@@ -3978,9 +3974,9 @@ function Sa({
|
|
|
3978
3974
|
(y) => y.status === "apply" ? [[y.inputId, y.filterValue]] : []
|
|
3979
3975
|
)
|
|
3980
3976
|
)
|
|
3981
|
-
}), f =
|
|
3977
|
+
}), f = J(c), p = !!(f && u.cardFilterValues.some(
|
|
3982
3978
|
(y) => y.filterId === f.id
|
|
3983
|
-
)), g = u.resolvedPrimaryDateField && !((m = e.sql) != null && m.trim()) ? u.dateComparisonPlan.inputs.length ?
|
|
3979
|
+
)), g = u.resolvedPrimaryDateField && !((m = e.sql) != null && m.trim()) ? u.dateComparisonPlan.inputs.length ? va({
|
|
3984
3980
|
card: e,
|
|
3985
3981
|
resolution: u.dateComparisonPlan.resolution
|
|
3986
3982
|
}) : p ? ro(
|
|
@@ -3995,7 +3991,7 @@ function Sa({
|
|
|
3995
3991
|
mappingDispositions: l.mappingDispositions
|
|
3996
3992
|
};
|
|
3997
3993
|
}
|
|
3998
|
-
function
|
|
3994
|
+
function Va({
|
|
3999
3995
|
card: e,
|
|
4000
3996
|
dashboard: t,
|
|
4001
3997
|
transientContexts: n,
|
|
@@ -4014,7 +4010,7 @@ function Ta({
|
|
|
4014
4010
|
const p = kn(t);
|
|
4015
4011
|
for (const j of e.controlBindings || [])
|
|
4016
4012
|
Te(j) && p.add(j.controlId);
|
|
4017
|
-
const { shouldApplyDashboardFilters: g } =
|
|
4013
|
+
const { shouldApplyDashboardFilters: g } = Ca(n), m = u != null && u.inputs.length ? u : void 0, y = ((u == null ? void 0 : u.selections) ?? []).filter(
|
|
4018
4014
|
(j) => j.status === "apply"
|
|
4019
4015
|
), b = to(e, {
|
|
4020
4016
|
includeAuthoredFilters: f,
|
|
@@ -4044,22 +4040,22 @@ function Ta({
|
|
|
4044
4040
|
}, v = Se(e, I), M = {
|
|
4045
4041
|
filterValues: v.status === "ready" ? v.filterValues : [],
|
|
4046
4042
|
selectionFilters: b.selections
|
|
4047
|
-
},
|
|
4043
|
+
}, h = Bt(M), w = Ns(o == null ? void 0 : o.zoom, (q = e.config) == null ? void 0 : q.groupByColumns, h), B = w ? { ...b, zoom: w.filterGroup } : b, T = w ? Bt({ ...M, zoom: w.zoom }) : h, D = eo(B), V = f === !1 ? Pe(D, !0) : D, O = ba(
|
|
4048
4044
|
e,
|
|
4049
4045
|
o == null ? void 0 : o.drill,
|
|
4050
4046
|
V
|
|
4051
|
-
), x =
|
|
4047
|
+
), x = Ks(O, o == null ? void 0 : o.grainPick, {
|
|
4052
4048
|
currentFingerprint: T,
|
|
4053
4049
|
drillActive: (((L = o == null ? void 0 : o.drill) == null ? void 0 : L.steps.length) ?? 0) > 0
|
|
4054
|
-
}), S =
|
|
4050
|
+
}), S = hs({ ...e, config: x }, r) ?? x, k = Sn(S, {
|
|
4055
4051
|
cardType: e.type,
|
|
4056
4052
|
dataSource: e.dataSource,
|
|
4057
|
-
temporalResultOwner:
|
|
4053
|
+
temporalResultOwner: Jt({
|
|
4058
4054
|
hasExecutableConfig: Me(S, e.type),
|
|
4059
4055
|
sql: e.sql,
|
|
4060
4056
|
normalizedPython: He(e.python || "")
|
|
4061
4057
|
})
|
|
4062
|
-
}) || S, A =
|
|
4058
|
+
}) || S, A = ga(V) || "", E = m ? no(
|
|
4063
4059
|
e,
|
|
4064
4060
|
{
|
|
4065
4061
|
controlValues: m.controlValues,
|
|
@@ -4068,7 +4064,7 @@ function Ta({
|
|
|
4068
4064
|
controlBindings: m.controlBindings
|
|
4069
4065
|
},
|
|
4070
4066
|
p
|
|
4071
|
-
) :
|
|
4067
|
+
) : ha({
|
|
4072
4068
|
card: e,
|
|
4073
4069
|
presentationControlIds: p,
|
|
4074
4070
|
dashboardControls: c,
|
|
@@ -4082,7 +4078,7 @@ function Ta({
|
|
|
4082
4078
|
resolvedFilterParts: B,
|
|
4083
4079
|
drillSteps: ((G = o == null ? void 0 : o.drill) == null ? void 0 : G.steps) ?? or,
|
|
4084
4080
|
dateContextKey: T,
|
|
4085
|
-
zoomContextKey:
|
|
4081
|
+
zoomContextKey: h,
|
|
4086
4082
|
...w ? { activeZoom: w.zoom } : {},
|
|
4087
4083
|
finalConfig: S,
|
|
4088
4084
|
queryRelevantConfig: k,
|
|
@@ -4090,7 +4086,7 @@ function Ta({
|
|
|
4090
4086
|
};
|
|
4091
4087
|
}
|
|
4092
4088
|
function io(e, t, n) {
|
|
4093
|
-
const o =
|
|
4089
|
+
const o = Ma({
|
|
4094
4090
|
resolvedFields: t.resolvedDateFields,
|
|
4095
4091
|
...n,
|
|
4096
4092
|
card: e,
|
|
@@ -4109,7 +4105,7 @@ function io(e, t, n) {
|
|
|
4109
4105
|
dateComparisonInputs: r.dateComparisonInputs
|
|
4110
4106
|
}, compiledFilters: o };
|
|
4111
4107
|
}
|
|
4112
|
-
function
|
|
4108
|
+
function ka(e, t, n) {
|
|
4113
4109
|
const o = rr(e), r = io(e, t, {
|
|
4114
4110
|
resolvedPrimaryDateField: n.resolvedPrimaryDateField,
|
|
4115
4111
|
timezone: n.calendarContext.tz,
|
|
@@ -4121,12 +4117,12 @@ function Ma(e, t, n) {
|
|
|
4121
4117
|
cardFilterValues: s,
|
|
4122
4118
|
resolvedPrimaryDateField: a,
|
|
4123
4119
|
globalDateComparison: c
|
|
4124
|
-
} = i, { queryKey: l, queryInputIdentity: d, paginationConfig: u } =
|
|
4120
|
+
} = i, { queryKey: l, queryInputIdentity: d, paginationConfig: u } = ss(
|
|
4125
4121
|
e,
|
|
4126
4122
|
r.queryContext,
|
|
4127
4123
|
n.calendarContext,
|
|
4128
4124
|
{ resolvePaginationConfig: n.resolvePaginationConfig }
|
|
4129
|
-
), f = t.queryRelevantConfig, p = He(e.python || ""), g =
|
|
4125
|
+
), f = t.queryRelevantConfig, p = He(e.python || ""), g = Jt({
|
|
4130
4126
|
hasExecutableConfig: Me(f, e.type),
|
|
4131
4127
|
sql: e.sql,
|
|
4132
4128
|
normalizedPython: p
|
|
@@ -4162,29 +4158,29 @@ function Ma(e, t, n) {
|
|
|
4162
4158
|
}
|
|
4163
4159
|
};
|
|
4164
4160
|
}
|
|
4165
|
-
const Kt = [],
|
|
4166
|
-
function
|
|
4161
|
+
const Kt = [], Pa = [], xa = {};
|
|
4162
|
+
function sc(e, t) {
|
|
4167
4163
|
return {
|
|
4168
4164
|
sheetId: e.sheetId,
|
|
4169
4165
|
sectionId: e.sectionId,
|
|
4170
4166
|
documentFilterValues: e.documentFilterValues ?? Kt,
|
|
4171
|
-
documentControlDefinitions: e.documentControlDefinitions ??
|
|
4172
|
-
documentControlValues: e.documentControlValues ??
|
|
4167
|
+
documentControlDefinitions: e.documentControlDefinitions ?? Pa,
|
|
4168
|
+
documentControlValues: e.documentControlValues ?? xa,
|
|
4173
4169
|
editorFilterValues: t ?? Kt
|
|
4174
4170
|
};
|
|
4175
4171
|
}
|
|
4176
|
-
function
|
|
4172
|
+
function wa({
|
|
4177
4173
|
card: e,
|
|
4178
4174
|
dashboard: t,
|
|
4179
4175
|
runtime: n,
|
|
4180
4176
|
dashboardRuntimeValues: o,
|
|
4181
4177
|
calendar: r
|
|
4182
4178
|
}) {
|
|
4183
|
-
const i =
|
|
4179
|
+
const i = Zt({
|
|
4184
4180
|
dashboard: t,
|
|
4185
4181
|
dashboardInputValues: o.dashboardInputValues,
|
|
4186
4182
|
transientContexts: void 0
|
|
4187
|
-
}) ?
|
|
4183
|
+
}) ? Je({
|
|
4188
4184
|
transientContexts: void 0,
|
|
4189
4185
|
dashboard: t,
|
|
4190
4186
|
sheetId: n.sheetId,
|
|
@@ -4201,7 +4197,7 @@ function Pa({
|
|
|
4201
4197
|
...n.documentFilterValues
|
|
4202
4198
|
];
|
|
4203
4199
|
return {
|
|
4204
|
-
card: a ? e :
|
|
4200
|
+
card: a ? e : Oa(
|
|
4205
4201
|
e,
|
|
4206
4202
|
n.documentControlDefinitions
|
|
4207
4203
|
),
|
|
@@ -4219,7 +4215,7 @@ function Pa({
|
|
|
4219
4215
|
dashboardInputContext: s
|
|
4220
4216
|
};
|
|
4221
4217
|
}
|
|
4222
|
-
function
|
|
4218
|
+
function Oa(e, t) {
|
|
4223
4219
|
if (t.length === 0)
|
|
4224
4220
|
return e;
|
|
4225
4221
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -4232,7 +4228,7 @@ function xa(e, t) {
|
|
|
4232
4228
|
controls: Array.from(n.values())
|
|
4233
4229
|
};
|
|
4234
4230
|
}
|
|
4235
|
-
function
|
|
4231
|
+
function ac({
|
|
4236
4232
|
card: e,
|
|
4237
4233
|
place: t,
|
|
4238
4234
|
source: n
|
|
@@ -4244,10 +4240,10 @@ function ic({
|
|
|
4244
4240
|
inputContext: o.inputContext
|
|
4245
4241
|
};
|
|
4246
4242
|
}
|
|
4247
|
-
function
|
|
4243
|
+
function Ba(e, t, n) {
|
|
4248
4244
|
return {
|
|
4249
|
-
calendarContext: n ??
|
|
4250
|
-
allowGlobalDateMinutePrecision:
|
|
4245
|
+
calendarContext: n ?? jr,
|
|
4246
|
+
allowGlobalDateMinutePrecision: We(
|
|
4251
4247
|
e,
|
|
4252
4248
|
t
|
|
4253
4249
|
).allEligibleTargetsAreDateTime,
|
|
@@ -4255,17 +4251,17 @@ function wa(e, t, n) {
|
|
|
4255
4251
|
globalCacheConfig: e.globalCacheConfig
|
|
4256
4252
|
};
|
|
4257
4253
|
}
|
|
4258
|
-
function
|
|
4254
|
+
function lc(e, t) {
|
|
4259
4255
|
return lo(
|
|
4260
4256
|
e,
|
|
4261
4257
|
t,
|
|
4262
4258
|
t.allowGlobalDateMinutePrecision
|
|
4263
4259
|
);
|
|
4264
4260
|
}
|
|
4265
|
-
function
|
|
4261
|
+
function Aa(e, t, n = {}) {
|
|
4266
4262
|
const o = ao(e, t);
|
|
4267
4263
|
return {
|
|
4268
|
-
...
|
|
4264
|
+
...ka(e.card, e.context, {
|
|
4269
4265
|
resolvedPrimaryDateField: o,
|
|
4270
4266
|
calendarContext: t.calendarContext,
|
|
4271
4267
|
allowGlobalDateMinutePrecision: t.allowGlobalDateMinutePrecision,
|
|
@@ -4275,7 +4271,7 @@ function Oa(e, t, n = {}) {
|
|
|
4275
4271
|
resolvedPrimaryDateField: o
|
|
4276
4272
|
};
|
|
4277
4273
|
}
|
|
4278
|
-
function
|
|
4274
|
+
function Ea({
|
|
4279
4275
|
card: e,
|
|
4280
4276
|
place: t,
|
|
4281
4277
|
source: n,
|
|
@@ -4288,15 +4284,15 @@ function Ba({
|
|
|
4288
4284
|
var M;
|
|
4289
4285
|
let v;
|
|
4290
4286
|
try {
|
|
4291
|
-
const
|
|
4292
|
-
if (
|
|
4287
|
+
const h = Ge(b);
|
|
4288
|
+
if (h.status === "invalid") throw h.error;
|
|
4293
4289
|
const w = je(
|
|
4294
4290
|
b,
|
|
4295
4291
|
I,
|
|
4296
4292
|
n,
|
|
4297
|
-
|
|
4293
|
+
h.status === "absent"
|
|
4298
4294
|
);
|
|
4299
|
-
if (v = w.context,
|
|
4295
|
+
if (v = w.context, h.status === "absent")
|
|
4300
4296
|
return { status: "ready", value: { assembled: w } };
|
|
4301
4297
|
if (!r)
|
|
4302
4298
|
return {
|
|
@@ -4305,14 +4301,14 @@ function Ba({
|
|
|
4305
4301
|
message: "Matrix field metadata is required.",
|
|
4306
4302
|
context: v
|
|
4307
4303
|
};
|
|
4308
|
-
const B =
|
|
4304
|
+
const B = Os(h.config.spec, v), T = r.filter(
|
|
4309
4305
|
(k) => k.field.source && B.some(
|
|
4310
4306
|
(A) => _e(A, k.field.source)
|
|
4311
4307
|
)
|
|
4312
|
-
), D =
|
|
4308
|
+
), D = ma(b, T, v), { params: V } = w, O = V.dashboardInputContext;
|
|
4313
4309
|
D.config = {
|
|
4314
4310
|
...D.config,
|
|
4315
|
-
presentation:
|
|
4311
|
+
presentation: Hi(
|
|
4316
4312
|
b,
|
|
4317
4313
|
D.config,
|
|
4318
4314
|
{
|
|
@@ -4346,11 +4342,11 @@ function Ba({
|
|
|
4346
4342
|
matrix: D
|
|
4347
4343
|
}
|
|
4348
4344
|
};
|
|
4349
|
-
} catch (
|
|
4345
|
+
} catch (h) {
|
|
4350
4346
|
return {
|
|
4351
4347
|
status: "blocked",
|
|
4352
4348
|
reason: "configuration",
|
|
4353
|
-
message:
|
|
4349
|
+
message: h instanceof Error ? h.message : "Card configuration is invalid.",
|
|
4354
4350
|
context: v
|
|
4355
4351
|
};
|
|
4356
4352
|
}
|
|
@@ -4364,7 +4360,7 @@ function Ba({
|
|
|
4364
4360
|
missingRequiredLabels: [],
|
|
4365
4361
|
message: l.message
|
|
4366
4362
|
};
|
|
4367
|
-
const { assembled: d, matrix: u } = l.value, f =
|
|
4363
|
+
const { assembled: d, matrix: u } = l.value, f = Ba(
|
|
4368
4364
|
s,
|
|
4369
4365
|
o,
|
|
4370
4366
|
n.calendar
|
|
@@ -4376,10 +4372,10 @@ function Ba({
|
|
|
4376
4372
|
const w = (m = p.dashboardInputContext) == null ? void 0 : m.inputs.find(
|
|
4377
4373
|
(S) => S.kind === "filter" && S.filter.id === g.id
|
|
4378
4374
|
), T = ar(s, g).filter(
|
|
4379
|
-
({ card: S, sheet: k }) => !w ||
|
|
4375
|
+
({ card: S, sheet: k }) => !w || Rr(w, {
|
|
4380
4376
|
cardId: S.id,
|
|
4381
4377
|
sheetId: k.id,
|
|
4382
|
-
sheetKind:
|
|
4378
|
+
sheetKind: Yt(k) ? "document" : "dashboard"
|
|
4383
4379
|
})
|
|
4384
4380
|
).map(({ card: S, sheet: k }) => ({
|
|
4385
4381
|
card: S,
|
|
@@ -4412,7 +4408,7 @@ function Ba({
|
|
|
4412
4408
|
return D.set(A, null), [A];
|
|
4413
4409
|
}
|
|
4414
4410
|
}
|
|
4415
|
-
), x =
|
|
4411
|
+
), x = We(
|
|
4416
4412
|
s,
|
|
4417
4413
|
o,
|
|
4418
4414
|
g,
|
|
@@ -4439,24 +4435,24 @@ function Ba({
|
|
|
4439
4435
|
mappingDispositions: M.mappingDispositions,
|
|
4440
4436
|
reason: M.reason,
|
|
4441
4437
|
missingRequiredLabels: M.missingRequiredLabels,
|
|
4442
|
-
...M.reason === "requiredInput" ? { message:
|
|
4438
|
+
...M.reason === "requiredInput" ? { message: Fa(M.missingRequiredLabels) } : {},
|
|
4443
4439
|
...M.resolvedPrimaryDateField ? { resolvedPrimaryDateField: M.resolvedPrimaryDateField } : {}
|
|
4444
4440
|
};
|
|
4445
|
-
const
|
|
4441
|
+
const h = i && !u ? Aa(d, f) : void 0;
|
|
4446
4442
|
return {
|
|
4447
4443
|
...M,
|
|
4448
4444
|
...u ? { matrix: u } : {},
|
|
4449
4445
|
// The whole request a card runs with: the contract's payload and its
|
|
4450
4446
|
// extras (server pagination, table totals) from the one extras owner,
|
|
4451
4447
|
// on the first page a new viewer opens (ledger P3-78).
|
|
4452
|
-
...(
|
|
4448
|
+
...(h == null ? void 0 : h.status) === "ready" ? {
|
|
4453
4449
|
request: {
|
|
4454
|
-
...
|
|
4455
|
-
...
|
|
4450
|
+
...h.requestPayloadBase,
|
|
4451
|
+
...Ms({
|
|
4456
4452
|
card: d.card,
|
|
4457
4453
|
finalConfig: d.context.finalConfig,
|
|
4458
4454
|
documentSection: t.kind === "documentSection" ? {} : void 0,
|
|
4459
|
-
page:
|
|
4455
|
+
page: Ts(d.card)
|
|
4460
4456
|
})
|
|
4461
4457
|
}
|
|
4462
4458
|
} : {}
|
|
@@ -4472,7 +4468,7 @@ function Ba({
|
|
|
4472
4468
|
};
|
|
4473
4469
|
}
|
|
4474
4470
|
}
|
|
4475
|
-
function
|
|
4471
|
+
function _a(e) {
|
|
4476
4472
|
const t = e.editor ? {
|
|
4477
4473
|
...e.inlineFilterValuesMap,
|
|
4478
4474
|
...Object.fromEntries(
|
|
@@ -4491,8 +4487,8 @@ function Aa(e) {
|
|
|
4491
4487
|
}
|
|
4492
4488
|
function je(e, t, n, o) {
|
|
4493
4489
|
var l, d;
|
|
4494
|
-
const { dashboard: r } = n, i =
|
|
4495
|
-
...
|
|
4490
|
+
const { dashboard: r } = n, i = _a(n), s = t.kind === "documentSection" ? {
|
|
4491
|
+
...wa({
|
|
4496
4492
|
card: e,
|
|
4497
4493
|
dashboard: r,
|
|
4498
4494
|
runtime: t.section,
|
|
@@ -4501,7 +4497,7 @@ function je(e, t, n, o) {
|
|
|
4501
4497
|
}),
|
|
4502
4498
|
selectedSheetId: t.section.sheetId,
|
|
4503
4499
|
includeAuthoredFilters: o
|
|
4504
|
-
} :
|
|
4500
|
+
} : Ra(e, t.sheetId, n, i, o), a = Va(s), c = (l = e.config) == null ? void 0 : l.rowLimit;
|
|
4505
4501
|
return (d = e.sql) != null && d.trim() && c && so(r, e.id) && (a.sqlRowLimit = c), {
|
|
4506
4502
|
card: s.card,
|
|
4507
4503
|
params: s,
|
|
@@ -4512,13 +4508,13 @@ function je(e, t, n, o) {
|
|
|
4512
4508
|
function so(e, t) {
|
|
4513
4509
|
return (e.variables ?? []).some((n) => n.id === t);
|
|
4514
4510
|
}
|
|
4515
|
-
function
|
|
4511
|
+
function Ra(e, t, n, o, r) {
|
|
4516
4512
|
var l, d, u;
|
|
4517
|
-
const { dashboard: i } = n, s = so(i, e.id), a = s ? void 0 : n.transientContexts, c =
|
|
4513
|
+
const { dashboard: i } = n, s = so(i, e.id), a = s ? void 0 : n.transientContexts, c = Zt({
|
|
4518
4514
|
dashboard: i,
|
|
4519
4515
|
dashboardInputValues: o.dashboardInputValues,
|
|
4520
4516
|
transientContexts: a
|
|
4521
|
-
}) ?
|
|
4517
|
+
}) ? Je({
|
|
4522
4518
|
transientContexts: a,
|
|
4523
4519
|
dashboard: i,
|
|
4524
4520
|
sheetId: t,
|
|
@@ -4567,7 +4563,7 @@ function lo(e, t, n) {
|
|
|
4567
4563
|
resolvedPrimaryDateField: r
|
|
4568
4564
|
};
|
|
4569
4565
|
}
|
|
4570
|
-
function
|
|
4566
|
+
function cc({
|
|
4571
4567
|
dashboard: e,
|
|
4572
4568
|
dashboardInputValues: t,
|
|
4573
4569
|
adHocFilterValues: n,
|
|
@@ -4581,12 +4577,12 @@ function ac({
|
|
|
4581
4577
|
}) {
|
|
4582
4578
|
const d = e ? [...lr(e)] : void 0, u = r ?? null, f = (I) => {
|
|
4583
4579
|
var v;
|
|
4584
|
-
return e ?
|
|
4580
|
+
return e ? Na({
|
|
4585
4581
|
dashboard: e,
|
|
4586
4582
|
runtimeValues: { dashboardInputValues: t },
|
|
4587
4583
|
adHocFilterValues: n,
|
|
4588
4584
|
sheetId: I,
|
|
4589
|
-
sheetKind:
|
|
4585
|
+
sheetKind: Yt(
|
|
4590
4586
|
(v = e.sheets) == null ? void 0 : v.find((M) => M.id === I)
|
|
4591
4587
|
) ? "document" : "dashboard",
|
|
4592
4588
|
calendar: o
|
|
@@ -4609,7 +4605,7 @@ function ac({
|
|
|
4609
4605
|
const y = cr({
|
|
4610
4606
|
filterDefinitions: d,
|
|
4611
4607
|
filterValues: p
|
|
4612
|
-
}), b =
|
|
4608
|
+
}), b = aa({
|
|
4613
4609
|
filters: d,
|
|
4614
4610
|
filterValues: y,
|
|
4615
4611
|
dashboard: e,
|
|
@@ -4622,7 +4618,7 @@ function ac({
|
|
|
4622
4618
|
controlValues: g
|
|
4623
4619
|
};
|
|
4624
4620
|
}
|
|
4625
|
-
function
|
|
4621
|
+
function dc({
|
|
4626
4622
|
dashboard: e,
|
|
4627
4623
|
cardId: t,
|
|
4628
4624
|
transientContexts: n,
|
|
@@ -4645,11 +4641,11 @@ function lc({
|
|
|
4645
4641
|
var M;
|
|
4646
4642
|
if (!e)
|
|
4647
4643
|
return null;
|
|
4648
|
-
p && !Ft(e, t) && g && (e = { ...e, sheets: (M = e.sheets) == null ? void 0 : M.map((
|
|
4644
|
+
p && !Ft(e, t) && g && (e = { ...e, sheets: (M = e.sheets) == null ? void 0 : M.map((h) => h.id === g ? { ...h, cards: [...h.cards ?? [], p] } : h) });
|
|
4649
4645
|
const I = Ft(e, t);
|
|
4650
4646
|
if (!I)
|
|
4651
4647
|
return null;
|
|
4652
|
-
const v =
|
|
4648
|
+
const v = Ea({
|
|
4653
4649
|
card: p ?? I.card,
|
|
4654
4650
|
place: m ? { kind: "documentSection", section: m } : { kind: "sheet", sheetId: I.sheet.id },
|
|
4655
4651
|
source: {
|
|
@@ -4659,7 +4655,7 @@ function lc({
|
|
|
4659
4655
|
inlineFilterValuesMap: a,
|
|
4660
4656
|
cardControlValuesMap: l ? Object.fromEntries(
|
|
4661
4657
|
Object.entries(l).filter(
|
|
4662
|
-
(
|
|
4658
|
+
(h) => h[1] !== void 0
|
|
4663
4659
|
)
|
|
4664
4660
|
) : void 0,
|
|
4665
4661
|
dashboardInputValues: d,
|
|
@@ -4684,17 +4680,17 @@ function lc({
|
|
|
4684
4680
|
...v.request ? { request: v.request } : {}
|
|
4685
4681
|
};
|
|
4686
4682
|
}
|
|
4687
|
-
function
|
|
4683
|
+
function Ka(e, t, n) {
|
|
4688
4684
|
const o = t === "date" && "relativeMeta" in e ? Fr(e.relativeMeta) : void 0;
|
|
4689
4685
|
if (!o) return { values: e.values };
|
|
4690
|
-
const r = mr(o, n ?? void 0), i = e.operation
|
|
4686
|
+
const r = mr(o, n ?? void 0), i = Dr(String(e.operation), o);
|
|
4691
4687
|
return {
|
|
4692
|
-
values: r && i ? r : e.values,
|
|
4688
|
+
values: r && i ? Sr(String(e.operation), r) : e.values,
|
|
4693
4689
|
relativeMeta: o,
|
|
4694
4690
|
..."temporalPrecision" in e && e.temporalPrecision === "minute" ? { temporalPrecision: "minute" } : {}
|
|
4695
4691
|
};
|
|
4696
4692
|
}
|
|
4697
|
-
function
|
|
4693
|
+
function qa(e, t, n) {
|
|
4698
4694
|
const o = t, r = ur(e);
|
|
4699
4695
|
return fr({
|
|
4700
4696
|
definition: e,
|
|
@@ -4707,7 +4703,7 @@ function Ra(e, t, n) {
|
|
|
4707
4703
|
dataType: e.dataType,
|
|
4708
4704
|
fieldMeta: e.fieldMeta,
|
|
4709
4705
|
semanticContext: e.semanticContext,
|
|
4710
|
-
...
|
|
4706
|
+
...Ka(o, r, n)
|
|
4711
4707
|
}
|
|
4712
4708
|
});
|
|
4713
4709
|
}
|
|
@@ -4716,7 +4712,7 @@ function co(e, t, n) {
|
|
|
4716
4712
|
let r = {};
|
|
4717
4713
|
const i = [], s = [];
|
|
4718
4714
|
for (const a of t ?? []) {
|
|
4719
|
-
if (
|
|
4715
|
+
if (Lr(a.filterId)) {
|
|
4720
4716
|
s.push(a.filterId);
|
|
4721
4717
|
continue;
|
|
4722
4718
|
}
|
|
@@ -4726,15 +4722,15 @@ function co(e, t, n) {
|
|
|
4726
4722
|
continue;
|
|
4727
4723
|
}
|
|
4728
4724
|
const d = dr(
|
|
4729
|
-
|
|
4725
|
+
qa(l.filter, a, n.calendar)
|
|
4730
4726
|
);
|
|
4731
4727
|
if (d) {
|
|
4732
4728
|
if (l.runtimeScope === "shared") {
|
|
4733
|
-
r =
|
|
4729
|
+
r = ht(r, l, {}, d);
|
|
4734
4730
|
continue;
|
|
4735
4731
|
}
|
|
4736
4732
|
for (const u of pn(e).values())
|
|
4737
|
-
gn(l, u) && (r =
|
|
4733
|
+
gn(l, u) && (r = ht(
|
|
4738
4734
|
r,
|
|
4739
4735
|
l,
|
|
4740
4736
|
{ sheetId: u.sheetId },
|
|
@@ -4744,7 +4740,7 @@ function co(e, t, n) {
|
|
|
4744
4740
|
}
|
|
4745
4741
|
return { slots: r, adHocFilterValues: i, droppedFilterIds: s };
|
|
4746
4742
|
}
|
|
4747
|
-
function
|
|
4743
|
+
function Na(e) {
|
|
4748
4744
|
const { dashboard: t, sheetId: n } = e, o = [];
|
|
4749
4745
|
if (n)
|
|
4750
4746
|
for (const { input: r } of pr(t, n, e.sheetKind)) {
|
|
@@ -4759,7 +4755,7 @@ function Ka(e) {
|
|
|
4759
4755
|
}
|
|
4760
4756
|
return [...o, ...oo(e.adHocFilterValues, n)];
|
|
4761
4757
|
}
|
|
4762
|
-
function
|
|
4758
|
+
function uc(e, t) {
|
|
4763
4759
|
switch (t.runtimeScope) {
|
|
4764
4760
|
case "shared":
|
|
4765
4761
|
return [{}];
|
|
@@ -4795,7 +4791,7 @@ function qt(e) {
|
|
|
4795
4791
|
)
|
|
4796
4792
|
];
|
|
4797
4793
|
}
|
|
4798
|
-
function
|
|
4794
|
+
function La(e, t) {
|
|
4799
4795
|
var n, o;
|
|
4800
4796
|
return {
|
|
4801
4797
|
sheetId: e.id,
|
|
@@ -4806,15 +4802,15 @@ function qa(e, t) {
|
|
|
4806
4802
|
)) == null ? void 0 : o.id
|
|
4807
4803
|
};
|
|
4808
4804
|
}
|
|
4809
|
-
function
|
|
4805
|
+
function ja(e, t, n, o) {
|
|
4810
4806
|
var l, d, u;
|
|
4811
4807
|
const r = {}, i = (l = e.preferences) == null ? void 0 : l.textVisualOptions;
|
|
4812
4808
|
if (!i) return r;
|
|
4813
|
-
const s =
|
|
4809
|
+
const s = Je({
|
|
4814
4810
|
// Authoring: carried drill context never applies to a dashboard being edited.
|
|
4815
4811
|
transientContexts: void 0,
|
|
4816
4812
|
dashboard: n,
|
|
4817
|
-
...
|
|
4813
|
+
...La(o, t),
|
|
4818
4814
|
card: t,
|
|
4819
4815
|
runtimeValues: {},
|
|
4820
4816
|
// Aliases only: no input value is read.
|
|
@@ -4836,7 +4832,7 @@ function Na(e, t, n, o) {
|
|
|
4836
4832
|
f.type === "list" ? f.items.forEach((p) => p.forEach(c)) : f.children.forEach(c);
|
|
4837
4833
|
}), r;
|
|
4838
4834
|
}
|
|
4839
|
-
function
|
|
4835
|
+
function za(e, t) {
|
|
4840
4836
|
var i;
|
|
4841
4837
|
const n = qt(e);
|
|
4842
4838
|
if (!n.some((s) => {
|
|
@@ -4844,9 +4840,9 @@ function La(e, t) {
|
|
|
4844
4840
|
return (a = s.preferences) == null ? void 0 : a.textVisualOptions;
|
|
4845
4841
|
}))
|
|
4846
4842
|
return e;
|
|
4847
|
-
const o =
|
|
4843
|
+
const o = he(e), r = qt(o);
|
|
4848
4844
|
for (let s = 0; s < r.length; s++) {
|
|
4849
|
-
const a =
|
|
4845
|
+
const a = ja(
|
|
4850
4846
|
r[s],
|
|
4851
4847
|
n[s],
|
|
4852
4848
|
t,
|
|
@@ -4854,145 +4850,145 @@ function La(e, t) {
|
|
|
4854
4850
|
);
|
|
4855
4851
|
(i = e.frames) != null && i.some(
|
|
4856
4852
|
(c) => c.visualId && c.cards.some((l) => l.id === r[s].id)
|
|
4857
|
-
) && (r[s].linkedReferenceOverrides =
|
|
4853
|
+
) && (r[s].linkedReferenceOverrides = ui(
|
|
4858
4854
|
r[s].linkedReferenceOverrides,
|
|
4859
4855
|
{ inputAliases: a }
|
|
4860
4856
|
));
|
|
4861
4857
|
}
|
|
4862
4858
|
return o;
|
|
4863
4859
|
}
|
|
4864
|
-
function
|
|
4860
|
+
function Ga(e) {
|
|
4865
4861
|
var n;
|
|
4866
4862
|
const t = (n = e.sheets) == null ? void 0 : n.map(
|
|
4867
|
-
(o) =>
|
|
4863
|
+
(o) => za(o, e)
|
|
4868
4864
|
);
|
|
4869
4865
|
return t && t.some((o, r) => o !== e.sheets[r]) ? { ...e, sheets: t } : e;
|
|
4870
4866
|
}
|
|
4871
|
-
function
|
|
4867
|
+
function Ha(e) {
|
|
4872
4868
|
const t = N(e);
|
|
4873
4869
|
return t.issues.length === 0 && !t.needsUpgrade ? e : t.issues.length ? t.toStoredDashboard() : N(
|
|
4874
|
-
|
|
4870
|
+
Ga(e)
|
|
4875
4871
|
).toStoredDashboard();
|
|
4876
4872
|
}
|
|
4877
4873
|
export {
|
|
4878
|
-
|
|
4874
|
+
Zr as $,
|
|
4879
4875
|
co as A,
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4876
|
+
Na as B,
|
|
4877
|
+
uc as C,
|
|
4878
|
+
Ia as D,
|
|
4883
4879
|
oo as E,
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4880
|
+
ui as F,
|
|
4881
|
+
fl as G,
|
|
4882
|
+
Ii as H,
|
|
4883
|
+
xs as I,
|
|
4888
4884
|
wt as J,
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4885
|
+
wl as K,
|
|
4886
|
+
fi as L,
|
|
4887
|
+
kl as M,
|
|
4888
|
+
qi as N,
|
|
4889
|
+
Ki as O,
|
|
4890
|
+
_i as P,
|
|
4891
|
+
vl as Q,
|
|
4896
4892
|
Vn as R,
|
|
4897
4893
|
qe as S,
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4894
|
+
yl as T,
|
|
4895
|
+
ji as U,
|
|
4896
|
+
W as V,
|
|
4897
|
+
Ml as W,
|
|
4898
|
+
Gi as X,
|
|
4899
|
+
Vl as Y,
|
|
4904
4900
|
it as Z,
|
|
4905
4901
|
rt as _,
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4902
|
+
ta as a,
|
|
4903
|
+
Hl as a$,
|
|
4904
|
+
Fl as a0,
|
|
4905
|
+
Tl as a1,
|
|
4906
|
+
Ni as a2,
|
|
4907
|
+
hl as a3,
|
|
4908
|
+
lc as a4,
|
|
4909
|
+
Ba as a5,
|
|
4914
4910
|
qt as a6,
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4911
|
+
La as a7,
|
|
4912
|
+
ja as a8,
|
|
4913
|
+
za as a9,
|
|
4914
|
+
Ll as aA,
|
|
4915
|
+
jl as aB,
|
|
4920
4916
|
ce as aC,
|
|
4921
4917
|
In as aD,
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4918
|
+
gl as aE,
|
|
4919
|
+
pl as aF,
|
|
4920
|
+
Cl as aG,
|
|
4921
|
+
Ea as aH,
|
|
4922
|
+
Ti as aI,
|
|
4923
|
+
bl as aJ,
|
|
4924
|
+
rc as aK,
|
|
4929
4925
|
bn as aL,
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4926
|
+
Dl as aM,
|
|
4927
|
+
nc as aN,
|
|
4928
|
+
zl as aO,
|
|
4929
|
+
Ls as aP,
|
|
4930
|
+
tc as aQ,
|
|
4931
|
+
Zn as aR,
|
|
4936
4932
|
Se as aS,
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4933
|
+
Il as aT,
|
|
4934
|
+
fa as aU,
|
|
4935
|
+
Yn as aV,
|
|
4940
4936
|
Xe as aW,
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4937
|
+
Sl as aX,
|
|
4938
|
+
Bl as aY,
|
|
4939
|
+
vs as aZ,
|
|
4944
4940
|
re as a_,
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4941
|
+
as as aa,
|
|
4942
|
+
Yl as ab,
|
|
4943
|
+
Jl as ac,
|
|
4948
4944
|
Kn as ad,
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4945
|
+
Zl as ae,
|
|
4946
|
+
Ji as af,
|
|
4947
|
+
Fa as ag,
|
|
4948
|
+
cc as ah,
|
|
4949
|
+
ba as ai,
|
|
4950
|
+
ic as aj,
|
|
4951
|
+
ac as ak,
|
|
4952
|
+
Ds as al,
|
|
4953
|
+
Ss as am,
|
|
4954
|
+
Aa as an,
|
|
4955
|
+
Al as ao,
|
|
4956
|
+
El as ap,
|
|
4957
|
+
Ms as aq,
|
|
4962
4958
|
Le as ar,
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4959
|
+
Fs as as,
|
|
4960
|
+
Vs as at,
|
|
4961
|
+
_l as au,
|
|
4962
|
+
sc as av,
|
|
4963
|
+
oc as aw,
|
|
4964
|
+
Kl as ax,
|
|
4965
|
+
Nl as ay,
|
|
4966
|
+
ql as az,
|
|
4967
|
+
Pl as b,
|
|
4968
|
+
ec as b0,
|
|
4969
|
+
Xl as b1,
|
|
4970
|
+
ss as c,
|
|
4971
|
+
Ca as d,
|
|
4972
|
+
ci as e,
|
|
4973
|
+
Ol as f,
|
|
4974
|
+
Rl as g,
|
|
4975
|
+
Wl as h,
|
|
4976
|
+
xl as i,
|
|
4977
|
+
$l as j,
|
|
4978
|
+
he as k,
|
|
4979
|
+
ea as l,
|
|
4980
|
+
dc as m,
|
|
4981
|
+
Ql as n,
|
|
4986
4982
|
at as o,
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4983
|
+
Gl as p,
|
|
4984
|
+
qa as q,
|
|
4985
|
+
Ul as r,
|
|
4986
|
+
ws as s,
|
|
4987
|
+
Os as t,
|
|
4988
|
+
mi as u,
|
|
4989
|
+
yi as v,
|
|
4990
|
+
hn as w,
|
|
4991
|
+
ml as x,
|
|
4992
|
+
Ci as y,
|
|
4993
|
+
Ha as z
|
|
4998
4994
|
};
|