react-semaphor 0.1.545 → 0.1.547
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 +408 -442
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +100 -76
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.js +6 -6
- package/dist/chunks/{add-to-dashboard-BuAqfA2Y.js → add-to-dashboard-BQRAAnc3.js} +55 -33
- package/dist/chunks/{analytics-base-schemas-BFAoRlkU.js → analytics-base-schemas-BKs3flFS.js} +2 -2
- package/dist/chunks/applied-constraints-DU-wndZ7.js +47 -0
- package/dist/chunks/{assistant-chat-D7sWTypJ.js → assistant-chat-CK84cPAB.js} +2826 -2595
- package/dist/chunks/{bookmark-state-CXw7lZ50.js → bookmark-state-Cu-a5ie_.js} +8 -15
- package/dist/chunks/comparison-window-caption-C2xF-eWw.js +1433 -0
- package/dist/chunks/{context-ClREvqCZ.js → context-BerEBuFR.js} +11 -6
- package/dist/chunks/custom-visual-inputs-ChL54gGm.js +295 -0
- package/dist/chunks/{dashboard-B1tMju0u.js → dashboard-DCk26-6i.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CePgIu0Z.js → dashboard-briefing-launcher-CQ1eYsGy.js} +1291 -1277
- package/dist/chunks/dashboard-controls-BMeZjF7r.js +2307 -0
- package/dist/chunks/{dashboard-json-CoYRPqxx.js → dashboard-json-BZqCoanC.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-BesAHZvB.js → document-dashboard-inputs-tYd7ao0o.js} +877 -979
- package/dist/chunks/{edit-dashboard-visual-JPtNfJRb.js → edit-dashboard-visual-Bv3MHM_G.js} +2157 -2243
- package/dist/chunks/filter-reach-copy-CGWsL_ez.js +3480 -0
- package/dist/chunks/{filter-value-text-ff7osJr7.js → filter-value-text-Ddf55Ku1.js} +9 -9
- package/dist/chunks/global-date-filter-utils-BhAu8zIM.js +12137 -0
- package/dist/chunks/index-CtoK1Lgu.js +586 -0
- package/dist/chunks/{index-DRWiuqyd.js → index-DmrLP5Ro.js} +105 -104
- package/dist/chunks/list-filter-DsaTbM3J.js +15 -0
- package/dist/chunks/matrix-analytical-definition-B9vW-osb.js +717 -0
- package/dist/chunks/{matrix-card-DjwWcCo8.js → matrix-card-LiMEipvq.js} +3 -3
- package/dist/chunks/{matrix-formatter-DnCyRXJE.js → matrix-formatter-DWEeC0_c.js} +44 -44
- package/dist/chunks/{matrix-member-presentation-CQGdVks6.js → matrix-member-presentation-DqzG-UhQ.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-8OIO4gob.js → matrix-operation-contract-D6vYkZK4.js} +72 -72
- package/dist/chunks/{metric-comparison-DEwi9uc2.js → metric-comparison-zpGw4lD6.js} +2 -2
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
- package/dist/chunks/{pivot-header-presentation-DHcx1XGQ.js → pivot-header-presentation-CQnIDtUv.js} +1 -1
- package/dist/chunks/{pivot-result-identity-DJhXXcns.js → pivot-result-identity-C-Q1j1Wb.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DM4CyGKs.js → pivot-result-lifecycle-pwq3b7LC.js} +571 -380
- package/dist/chunks/{raw-temporal-contract-C51YG48G.js → raw-temporal-contract-WuXA8jBP.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-C3mUgnEx.js → raw-temporal-presentation-DypB7sMX.js} +8 -8
- package/dist/chunks/{report-preferences-dialog-DUtuUL_5.js → report-preferences-dialog-DoVyriYC.js} +154 -155
- package/dist/chunks/{report-runtime-context-Dq8XyODK.js → report-runtime-context-hWiTCzFV.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-D0JDUa4h.js +5576 -0
- package/dist/chunks/{saved-dashboard-context-LrF_kW0l.js → saved-dashboard-context-BfAH5j4L.js} +34 -34
- package/dist/chunks/{selection-reducer-Dj_8xD69.js → selection-reducer-CJzkTZio.js} +15 -15
- package/dist/chunks/{semaphor-ready-indicator-BxF96Yhv.js → semaphor-ready-indicator-CRm17oIP.js} +51771 -52574
- package/dist/chunks/{shelf-drop-preview-context-CNaM_Gmh.js → shelf-drop-preview-context-vy6P9THz.js} +7 -7
- package/dist/chunks/{source-entity-resolution-BYn9giz3.js → source-entity-resolution-BIGRvtbG.js} +13 -13
- package/dist/chunks/{switch-uDtPgQlQ.js → switch-CEBOR4n7.js} +3 -3
- package/dist/chunks/{table-export-sheet-YzMioA7Y.js → table-export-sheet-4X9mAG3V.js} +1 -1
- package/dist/chunks/table-settings-WysCBj62.js +614 -0
- package/dist/chunks/{temporal-bucket-D7NBrrtL.js → temporal-bucket-CQOSbv9-.js} +26 -26
- package/dist/chunks/{token-types-DBbZVQsm.js → token-types-BMqRmT-C.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CjB7ig1o.js → use-create-flow-overlay-state-Csx_Xjsh.js} +101 -101
- package/dist/chunks/{validators-DMHTpf7a.js → validators-C-aOQlTB.js} +713 -658
- package/dist/chunks/{relative-date-label-Bk2j94pA.js → zoned-wall-clock-MulfA26h.js} +64 -21
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1895 -1163
- package/dist/data-app-sdk/index.js +6 -6
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +14 -14
- package/dist/format-utils/index.js +133 -133
- package/dist/index.js +192 -186
- package/dist/layouts/index.js +5 -242
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/shared/index.js +4 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/surfboard/arrange-layout-button.d.ts +8 -0
- package/dist/types/components/surfboard/filter/types.d.ts +7 -0
- package/dist/types/components/surfboard/screen-size-preview-button.d.ts +10 -0
- package/dist/types/components/visual/matrix-table/matrix-card-view.d.ts +3 -0
- package/dist/types/index.js +6 -6
- package/dist/types/lib/charts/table-chart-types.d.ts +4 -0
- package/dist/types/lib/charts/types.d.ts +2 -2
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +346 -21
- package/dist/types/lib/dashboard-inputs/dashboard-filter-value-identity.d.ts +65 -0
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +6 -0
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +2 -0
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +15 -0
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +3 -3
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-editor.d.ts +52 -0
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +9 -1
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +5 -1
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +149 -10
- package/dist/types/lib/stores/dashboard-store.d.ts +137 -6
- package/dist/types/lib/types/common-types.d.ts +8 -0
- package/dist/types/lib/types/explorer-types.d.ts +10 -0
- package/dist/types/lib/types/semantic-types.d.ts +84 -0
- package/dist/types/lib/utils/build-saved-editor-card.d.ts +20 -0
- package/dist/types/lib/utils/card-type-change.d.ts +16 -0
- package/dist/types/lib/utils/field-availability-context.d.ts +25 -0
- package/dist/types/lib/utils/field-placement.d.ts +96 -0
- package/dist/types/lib/utils/field-state-calculator.d.ts +161 -0
- package/dist/types/lib/utils/qualified-entity-name.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +57 -1
- package/dist/types/shared/analytics-protocol/field-provenance.d.ts +89 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/query-policies.d.ts +52 -0
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/time-window.d.ts +40 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -1
- package/dist/types/shared/assistant-protocol/answer-text.d.ts +20 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +29 -29
- package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +6 -1
- package/dist/types/shared/assistant-protocol/parts.d.ts +43 -3
- package/dist/types/shared/assistant-protocol/request.d.ts +14 -2
- package/dist/types/shared/dashboard-authoring/calculated-field-identity.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +487 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +34 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +7886 -0
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +45 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +54 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +96 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +3 -3
- package/dist/types/shared/dashboard-authoring/column-catalog.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -55
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +24 -14
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +9 -1
- package/dist/types/shared/dashboard-authoring/dashboard-filter-automatic-target.d.ts +4 -4
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-types.d.ts +27 -1
- package/dist/types/shared/dashboard-authoring/dashboard-filter-value-compatibility.d.ts +12 -3
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +26 -0
- package/dist/types/shared/dashboard-authoring/filter-applicability.d.ts +75 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-copy.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-preview.d.ts +97 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +22 -2
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +10 -37
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +189 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +101 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +100 -0
- package/dist/types/shared/dashboard-authoring/semantic-auto-join-card.d.ts +22 -0
- package/dist/types/shared/dashboard-authoring/validators.d.ts +1 -2
- package/dist/types/shared/layouts/engine/grid.d.ts +25 -0
- package/dist/types/shared/layouts/engine/index.d.ts +4 -0
- package/dist/types/shared/layouts/engine/sheet-layout.d.ts +7 -0
- package/dist/types/shared/layouts/engine/types.d.ts +125 -0
- package/dist/types/shared/layouts/index.d.ts +1 -2
- package/package.json +2 -2
- package/dist/chunks/apply-dashboard-operations-CZEMsx8E.js +0 -2080
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +0 -410
- package/dist/chunks/comparison-window-caption-D4E6IHPD.js +0 -1624
- package/dist/chunks/custom-visual-inputs-DLCD9Y5V.js +0 -329
- package/dist/chunks/dashboard-controls-Cq05n3e0.js +0 -2315
- package/dist/chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js +0 -108
- package/dist/chunks/matrix-analytical-definition-C7Gb0e12.js +0 -117
- package/dist/chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js +0 -67
- package/dist/chunks/numeric-presentation-7X_IrD58.js +0 -5226
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +0 -9415
- package/dist/chunks/stable-serialize-CfqXeiBP.js +0 -6
- package/dist/chunks/table-settings-CLZocegs.js +0 -501
- package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +0 -59
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +0 -46
- package/dist/types/shared/dashboard-authoring/change-compiler.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/layout-compiler.d.ts +0 -2
- package/dist/types/shared/layouts/create-frame-layouts.d.ts +0 -27
- package/dist/types/shared/layouts/frame-layouts.d.ts +0 -23
package/dist/chunks/{document-dashboard-inputs-BesAHZvB.js → document-dashboard-inputs-tYd7ao0o.js}
RENAMED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
1
|
+
import { cV as vt, cW as Se, cX as M, cY as R, cZ as Ve, d as W, c_ as Dt, c$ as yt, d0 as St, d1 as Vt, d2 as Ft, d3 as Fe, d4 as kt, d5 as ne, d6 as Y, d7 as oe, d8 as Mt, Y as se, i as z, d9 as Tt, da as Ot, db as j, dc as ie, dd as $, de as ke, df as xt, dg as Pt, dh as wt, v as Me, di as Et, dj as Rt, dk as Bt, bY as Te, dl as Oe, V as xe, dm as Pe, n as we, a as Ee, dn as qt, bp as At, _ as Nt, as as Re, bo as Be, dp as jt, ba as zt, a3 as qe, a2 as _t, dq as Ae } from "./global-date-filter-utils-BhAu8zIM.js";
|
|
2
|
+
import { K as Gt, r as re, S as Lt, T as Ht, U as Kt, V as Qt, W as $t, l as ae, X as Ut, D as Ne, Y as Wt, L as Yt, x as Zt, Z as Jt, _ as Xt, $ as en, a0 as tn, a1 as nn, a2 as on, a3 as sn, H as rn, a4 as an, c as ln, a5 as je, a6 as dn, a7 as cn, y as un, a8 as fn, E as pn, a9 as ze, aa as mn, ab as In } from "./resolve-dashboard-input-context-D0JDUa4h.js";
|
|
3
|
+
import { ao as bn } from "./validators-C-aOQlTB.js";
|
|
4
|
+
import { b as le } from "./matrix-operation-contract-D6vYkZK4.js";
|
|
5
|
+
import "./analytics-base-schemas-BKs3flFS.js";
|
|
5
6
|
import "zod";
|
|
6
7
|
import "./index-CuHybtft.js";
|
|
7
8
|
import "../value-format-preferences/index.js";
|
|
8
9
|
import "./_commonjsHelpers-DimLPMtv.js";
|
|
9
|
-
import "./pivot-result-lifecycle-
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import { r as
|
|
13
|
-
import { n as
|
|
14
|
-
import { r as
|
|
15
|
-
import { D as
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
function fe(e, t) {
|
|
10
|
+
import "./pivot-result-lifecycle-pwq3b7LC.js";
|
|
11
|
+
import { I as hn, z as de, J as B, H as X, q as gn, j as Cn, o as vn, K as G, A as Dn } from "./table-settings-WysCBj62.js";
|
|
12
|
+
import "./index-CtoK1Lgu.js";
|
|
13
|
+
import { r as _e, B as ce } from "./bookmark-state-Cu-a5ie_.js";
|
|
14
|
+
import { n as he } from "./matrix-formatter-DWEeC0_c.js";
|
|
15
|
+
import { r as yn, i as Ge } from "./matrix-card-LiMEipvq.js";
|
|
16
|
+
import { D as Sn } from "./report-runtime-context-hWiTCzFV.js";
|
|
17
|
+
import { c as Vn } from "./selection-filter-compiler-BKXmyLrS.js";
|
|
18
|
+
function ue(e, t) {
|
|
19
19
|
const n = {};
|
|
20
|
-
for (const o of
|
|
20
|
+
for (const o of hn(e)) {
|
|
21
21
|
if (!o.inlineFilters || o.inlineFilters.length === 0)
|
|
22
22
|
continue;
|
|
23
|
-
const
|
|
24
|
-
for (const
|
|
25
|
-
const r =
|
|
26
|
-
r &&
|
|
23
|
+
const s = [];
|
|
24
|
+
for (const i of o.inlineFilters) {
|
|
25
|
+
const r = vt(i, t);
|
|
26
|
+
r && s.push(r);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
s.length > 0 && (n[o.id] = s);
|
|
29
29
|
}
|
|
30
30
|
return n;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const Fn = [];
|
|
33
|
+
function kn(e) {
|
|
34
34
|
return e.label || e.name;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function ns(e, t, n) {
|
|
37
37
|
const o = e == null ? void 0 : e.drill;
|
|
38
38
|
return {
|
|
39
39
|
...e,
|
|
@@ -44,50 +44,50 @@ function gi(e, t, n) {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function os(e) {
|
|
48
48
|
const t = e == null ? void 0 : e.drill;
|
|
49
49
|
if (!e || !(t != null && t.steps.length)) return e;
|
|
50
|
-
const { drill: n, ...o } = e,
|
|
51
|
-
return
|
|
50
|
+
const { drill: n, ...o } = e, s = t.steps.slice(0, -1);
|
|
51
|
+
return s.length > 0 ? { ...o, drill: { ...t, steps: s } } : Object.keys(o).length > 0 ? o : void 0;
|
|
52
52
|
}
|
|
53
53
|
function E(e) {
|
|
54
54
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Mn(e) {
|
|
57
57
|
if (!E(e)) return !1;
|
|
58
58
|
const { toField: t, conditions: n } = e;
|
|
59
59
|
return E(t) && typeof t.name == "string" && Array.isArray(n) && n.every(
|
|
60
60
|
(o) => E(o) && E(o.field) && typeof o.field.name == "string"
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Tn(e) {
|
|
64
64
|
if (!E(e)) return {};
|
|
65
65
|
const t = {};
|
|
66
66
|
for (const [n, o] of Object.entries(e)) {
|
|
67
67
|
if (!E(o) || !E(o.drill)) continue;
|
|
68
|
-
const { steps:
|
|
69
|
-
!Array.isArray(
|
|
68
|
+
const { steps: s, hierarchyId: i } = o.drill;
|
|
69
|
+
!Array.isArray(s) || s.length === 0 || s.every(Mn) && (t[n] = {
|
|
70
70
|
drill: {
|
|
71
|
-
...typeof
|
|
72
|
-
steps:
|
|
71
|
+
...typeof i == "string" ? { hierarchyId: i } : {},
|
|
72
|
+
steps: s.map((r) => ({
|
|
73
73
|
...r,
|
|
74
|
-
label: typeof r.label == "string" && r.label ? r.label :
|
|
74
|
+
label: typeof r.label == "string" && r.label ? r.label : kn(r.toField)
|
|
75
75
|
}))
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
return t;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function On(e, t) {
|
|
82
82
|
const n = Object.entries(e ?? {}).filter(
|
|
83
|
-
([o,
|
|
84
|
-
var
|
|
85
|
-
return (((
|
|
83
|
+
([o, s]) => {
|
|
84
|
+
var i;
|
|
85
|
+
return (((i = s.drill) == null ? void 0 : i.steps.length) ?? 0) > 0 && (!t || t.has(o));
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
return n.length > 0 ? Object.fromEntries(n) : void 0;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function xn(e, t) {
|
|
91
91
|
return {
|
|
92
92
|
id: t,
|
|
93
93
|
field: e.field,
|
|
@@ -97,17 +97,17 @@ function An(e, t) {
|
|
|
97
97
|
temporalBucket: e.temporalBucket
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
100
|
+
function Pn(e, t) {
|
|
101
|
+
return Se(e) ? wn(e, t) : e.config ?? {};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function wn(e, t) {
|
|
104
104
|
var o;
|
|
105
105
|
const n = (o = t == null ? void 0 : t.steps[t.steps.length - 1]) == null ? void 0 : o.toField;
|
|
106
|
-
return n ?
|
|
106
|
+
return n ? Gt(e.config ?? {}, n, {
|
|
107
107
|
sortPolicy: "retargetDimensionSort"
|
|
108
108
|
}) : e.config ?? {};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function En(e, t) {
|
|
111
111
|
const n = (e == null ? void 0 : e.steps) ?? [];
|
|
112
112
|
if (n.length !== 0)
|
|
113
113
|
return {
|
|
@@ -115,20 +115,20 @@ function zn(e, t) {
|
|
|
115
115
|
logicalOperator: "AND",
|
|
116
116
|
negate: !1,
|
|
117
117
|
conditions: [],
|
|
118
|
-
groups: n.map((o,
|
|
119
|
-
id: `breadcrumb-${
|
|
118
|
+
groups: n.map((o, s) => ({
|
|
119
|
+
id: `breadcrumb-${s}`,
|
|
120
120
|
logicalOperator: "OR",
|
|
121
121
|
negate: !1,
|
|
122
122
|
conditions: [],
|
|
123
123
|
groups: [
|
|
124
124
|
{
|
|
125
|
-
id: `breadcrumb-${
|
|
125
|
+
id: `breadcrumb-${s}-group-0`,
|
|
126
126
|
logicalOperator: "AND",
|
|
127
127
|
negate: !1,
|
|
128
128
|
conditions: o.conditions.map(
|
|
129
|
-
(
|
|
130
|
-
|
|
131
|
-
`${
|
|
129
|
+
(i) => xn(
|
|
130
|
+
i,
|
|
131
|
+
`${i.field.id}-${i.value}`
|
|
132
132
|
)
|
|
133
133
|
),
|
|
134
134
|
groups: []
|
|
@@ -137,69 +137,69 @@ function zn(e, t) {
|
|
|
137
137
|
}))
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
const t =
|
|
140
|
+
function Le(e) {
|
|
141
|
+
const t = He(e);
|
|
142
142
|
return t.status === "unresolved" ? {} : t.values;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const t =
|
|
144
|
+
function ss(e) {
|
|
145
|
+
const t = He(e);
|
|
146
146
|
return t.status === "unresolved" ? t : { status: "resolved", uncaptured: t.cleared };
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function He({
|
|
149
149
|
dashboard: e,
|
|
150
150
|
dashboardInputValues: t,
|
|
151
151
|
sheetId: n,
|
|
152
152
|
cardId: o
|
|
153
153
|
}) {
|
|
154
|
-
let
|
|
154
|
+
let s = M(
|
|
155
155
|
t || {}
|
|
156
156
|
);
|
|
157
|
-
const
|
|
157
|
+
const i = [], r = Bn({
|
|
158
158
|
dashboard: e,
|
|
159
159
|
sheetId: n,
|
|
160
160
|
cardId: o
|
|
161
161
|
});
|
|
162
162
|
if (r.status === "unresolved")
|
|
163
163
|
return { status: "unresolved" };
|
|
164
|
-
|
|
165
|
-
dashboardInputValues:
|
|
164
|
+
s = Rn({
|
|
165
|
+
dashboardInputValues: s,
|
|
166
166
|
savedSheetId: n,
|
|
167
167
|
cardId: o,
|
|
168
168
|
targets: r.targets
|
|
169
169
|
});
|
|
170
170
|
for (const a of r.targets) {
|
|
171
|
-
const c =
|
|
172
|
-
|
|
171
|
+
const c = Qt(
|
|
172
|
+
$t({
|
|
173
173
|
dashboard: e,
|
|
174
174
|
card: a.card
|
|
175
175
|
}).allInputs
|
|
176
176
|
).filter(
|
|
177
|
-
(d) =>
|
|
177
|
+
(d) => St(d, a) && W(d, a)
|
|
178
178
|
);
|
|
179
179
|
for (const d of c) {
|
|
180
|
-
const l =
|
|
181
|
-
|
|
180
|
+
const l = Vt(
|
|
181
|
+
s,
|
|
182
182
|
d,
|
|
183
183
|
a
|
|
184
|
-
), u =
|
|
184
|
+
), u = Ve(
|
|
185
185
|
d,
|
|
186
186
|
l
|
|
187
187
|
);
|
|
188
|
-
if (u && u !== l && (
|
|
189
|
-
|
|
188
|
+
if (u && u !== l && (s = R(
|
|
189
|
+
s,
|
|
190
190
|
d,
|
|
191
191
|
a,
|
|
192
192
|
u
|
|
193
193
|
)), !u || u.status === void 0) {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
s = R(
|
|
195
|
+
s,
|
|
196
196
|
d,
|
|
197
197
|
a,
|
|
198
198
|
{
|
|
199
199
|
status: "cleared",
|
|
200
200
|
comparisonSelection: u == null ? void 0 : u.comparisonSelection
|
|
201
201
|
}
|
|
202
|
-
),
|
|
202
|
+
), i.push({
|
|
203
203
|
input: d,
|
|
204
204
|
target: {
|
|
205
205
|
sheetId: a.sheetId,
|
|
@@ -209,8 +209,8 @@ function $e({
|
|
|
209
209
|
});
|
|
210
210
|
continue;
|
|
211
211
|
}
|
|
212
|
-
u.status === "set" &&
|
|
213
|
-
|
|
212
|
+
u.status === "set" && Ft(d) && !u.comparisonSelection && (s = R(
|
|
213
|
+
s,
|
|
214
214
|
d,
|
|
215
215
|
a,
|
|
216
216
|
{
|
|
@@ -222,71 +222,71 @@ function $e({
|
|
|
222
222
|
}
|
|
223
223
|
return {
|
|
224
224
|
status: "resolved",
|
|
225
|
-
values: M(
|
|
226
|
-
cleared:
|
|
225
|
+
values: M(s),
|
|
226
|
+
cleared: i
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function Rn({
|
|
230
230
|
dashboardInputValues: e,
|
|
231
231
|
savedSheetId: t,
|
|
232
232
|
cardId: n,
|
|
233
233
|
targets: o
|
|
234
234
|
}) {
|
|
235
235
|
var c, d, l, u;
|
|
236
|
-
const
|
|
236
|
+
const s = {}, i = new Set(
|
|
237
237
|
o.flatMap((f) => f.sheetId ? [f.sheetId] : [])
|
|
238
238
|
), r = new Set(
|
|
239
239
|
o.flatMap((f) => f.cardId ? [f.cardId] : [])
|
|
240
240
|
), a = new Set(
|
|
241
241
|
o.flatMap((f) => f.sectionId ? [f.sectionId] : [])
|
|
242
242
|
);
|
|
243
|
-
if (e.shared && (
|
|
243
|
+
if (e.shared && (s.shared = { ...e.shared }), n) {
|
|
244
244
|
const f = o[0], p = (t ? (c = e.bySheetId) == null ? void 0 : c[t] : void 0) ?? (f.sheetId ? (d = e.bySheetId) == null ? void 0 : d[f.sheetId] : void 0);
|
|
245
|
-
f.sheetId && p && (
|
|
245
|
+
f.sheetId && p && (s.bySheetId = {
|
|
246
246
|
[f.sheetId]: { ...p }
|
|
247
247
|
});
|
|
248
248
|
const m = f.cardId ? (l = e.byCardId) == null ? void 0 : l[f.cardId] : void 0;
|
|
249
|
-
f.cardId && m && (
|
|
249
|
+
f.cardId && m && (s.byCardId = {
|
|
250
250
|
[f.cardId]: { ...m }
|
|
251
251
|
});
|
|
252
|
-
const
|
|
252
|
+
const I = Object.entries(
|
|
253
253
|
e.byDocumentSectionId || {}
|
|
254
|
-
),
|
|
255
|
-
return f.sectionId &&
|
|
256
|
-
[f.sectionId]: { ...
|
|
257
|
-
}), M(
|
|
254
|
+
), b = (f.sectionId ? (u = e.byDocumentSectionId) == null ? void 0 : u[f.sectionId] : void 0) ?? (I.length === 1 ? I[0][1] : void 0);
|
|
255
|
+
return f.sectionId && b && (s.byDocumentSectionId = {
|
|
256
|
+
[f.sectionId]: { ...b }
|
|
257
|
+
}), M(s);
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return s.bySheetId = Z(
|
|
260
260
|
e.bySheetId,
|
|
261
|
-
|
|
262
|
-
),
|
|
261
|
+
i
|
|
262
|
+
), s.byCardId = Z(
|
|
263
263
|
e.byCardId,
|
|
264
264
|
r
|
|
265
|
-
),
|
|
265
|
+
), s.byDocumentSectionId = Z(
|
|
266
266
|
e.byDocumentSectionId,
|
|
267
267
|
a
|
|
268
|
-
), M(
|
|
268
|
+
), M(s);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Z(e, t) {
|
|
271
271
|
if (!e) return;
|
|
272
272
|
const n = Object.entries(e).filter(
|
|
273
273
|
([o]) => t.has(o)
|
|
274
274
|
);
|
|
275
275
|
return n.length > 0 ? Object.fromEntries(
|
|
276
|
-
n.map(([o,
|
|
276
|
+
n.map(([o, s]) => [
|
|
277
277
|
o,
|
|
278
|
-
{ ...
|
|
278
|
+
{ ...s }
|
|
279
279
|
])
|
|
280
280
|
) : void 0;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Bn({
|
|
283
283
|
dashboard: e,
|
|
284
284
|
sheetId: t,
|
|
285
285
|
cardId: n
|
|
286
286
|
}) {
|
|
287
287
|
var r;
|
|
288
288
|
if (n) {
|
|
289
|
-
const a =
|
|
289
|
+
const a = qn(e, n);
|
|
290
290
|
return a ? {
|
|
291
291
|
status: "resolved",
|
|
292
292
|
targets: [a]
|
|
@@ -297,14 +297,14 @@ function Gn({
|
|
|
297
297
|
);
|
|
298
298
|
if (t && o.length === 0)
|
|
299
299
|
return { status: "unresolved", targetKind: "sheet" };
|
|
300
|
-
const
|
|
300
|
+
const s = o.map(
|
|
301
301
|
(a) => ({
|
|
302
302
|
sheetId: a.id,
|
|
303
303
|
sheetKind: a.kind || "dashboard"
|
|
304
304
|
})
|
|
305
|
-
),
|
|
306
|
-
for (const a of
|
|
307
|
-
|
|
305
|
+
), i = new Set(o.map((a) => a.id));
|
|
306
|
+
for (const a of B(e))
|
|
307
|
+
i.has(a.sheet.id) && s.push({
|
|
308
308
|
sheetId: a.sheet.id,
|
|
309
309
|
cardId: a.card.id,
|
|
310
310
|
card: a.card,
|
|
@@ -314,13 +314,13 @@ function Gn({
|
|
|
314
314
|
if (a.kind === "document")
|
|
315
315
|
for (const c of ((r = a.document) == null ? void 0 : r.sections) || []) {
|
|
316
316
|
const d = de(c);
|
|
317
|
-
d.length === 0 &&
|
|
317
|
+
d.length === 0 && s.push({
|
|
318
318
|
sheetId: a.id,
|
|
319
319
|
sectionId: c.id,
|
|
320
320
|
sheetKind: "document"
|
|
321
321
|
});
|
|
322
322
|
for (const l of d)
|
|
323
|
-
|
|
323
|
+
s.push({
|
|
324
324
|
sheetId: a.id,
|
|
325
325
|
sectionId: c.id,
|
|
326
326
|
cardId: l.id,
|
|
@@ -330,12 +330,12 @@ function Gn({
|
|
|
330
330
|
}
|
|
331
331
|
return {
|
|
332
332
|
status: "resolved",
|
|
333
|
-
targets:
|
|
333
|
+
targets: s.length > 0 ? s : [{}]
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function qn(e, t) {
|
|
337
337
|
var o;
|
|
338
|
-
const n =
|
|
338
|
+
const n = X(e, t);
|
|
339
339
|
if (n)
|
|
340
340
|
return {
|
|
341
341
|
sheetId: n.sheet.id,
|
|
@@ -343,29 +343,29 @@ function Ln(e, t) {
|
|
|
343
343
|
card: n.card,
|
|
344
344
|
sheetKind: n.sheet.kind || "dashboard"
|
|
345
345
|
};
|
|
346
|
-
for (const
|
|
347
|
-
if (
|
|
348
|
-
for (const
|
|
349
|
-
const r = de(
|
|
346
|
+
for (const s of e.sheets || [])
|
|
347
|
+
if (s.kind === "document")
|
|
348
|
+
for (const i of ((o = s.document) == null ? void 0 : o.sections) || []) {
|
|
349
|
+
const r = de(i).find(
|
|
350
350
|
(a) => a.id === t
|
|
351
351
|
);
|
|
352
352
|
if (r)
|
|
353
353
|
return {
|
|
354
|
-
sheetId:
|
|
355
|
-
sectionId:
|
|
354
|
+
sheetId: s.id,
|
|
355
|
+
sectionId: i.id,
|
|
356
356
|
cardId: r.id,
|
|
357
357
|
card: r,
|
|
358
358
|
sheetKind: "document"
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function is({
|
|
363
363
|
dashboardInputValues: e,
|
|
364
364
|
dashboard: t,
|
|
365
365
|
filterValues: n,
|
|
366
366
|
sheetId: o,
|
|
367
|
-
cardId:
|
|
368
|
-
sectionId:
|
|
367
|
+
cardId: s,
|
|
368
|
+
sectionId: i,
|
|
369
369
|
sheetKind: r
|
|
370
370
|
}) {
|
|
371
371
|
var d, l, u;
|
|
@@ -378,19 +378,19 @@ function yi({
|
|
|
378
378
|
for (const f of t.inputs) {
|
|
379
379
|
if (f.kind !== "filter" || !W(f, {
|
|
380
380
|
sheetId: o,
|
|
381
|
-
cardId:
|
|
382
|
-
sectionId:
|
|
381
|
+
cardId: s,
|
|
382
|
+
sectionId: i,
|
|
383
383
|
sheetKind: r
|
|
384
384
|
}))
|
|
385
385
|
continue;
|
|
386
386
|
const p = ((l = f.filter) == null ? void 0 : l.id) || ((u = f.filterReference) == null ? void 0 : u.filterId);
|
|
387
387
|
if (!p) continue;
|
|
388
|
-
const m = a.get(p),
|
|
389
|
-
c =
|
|
388
|
+
const m = a.get(p), I = m ? Dt(m) : void 0, b = (I == null ? void 0 : I.status) === "set" ? I : { status: "cleared" };
|
|
389
|
+
c = yt(
|
|
390
390
|
c,
|
|
391
391
|
f,
|
|
392
|
-
{ sheetId: o, cardId:
|
|
393
|
-
|
|
392
|
+
{ sheetId: o, cardId: s, sectionId: i },
|
|
393
|
+
b
|
|
394
394
|
);
|
|
395
395
|
}
|
|
396
396
|
return c;
|
|
@@ -400,19 +400,19 @@ function N({
|
|
|
400
400
|
sheetId: t,
|
|
401
401
|
card: n,
|
|
402
402
|
sectionId: o,
|
|
403
|
-
sheetKind:
|
|
404
|
-
mode:
|
|
403
|
+
sheetKind: s,
|
|
404
|
+
mode: i,
|
|
405
405
|
runtimeValues: r,
|
|
406
406
|
transientContexts: a,
|
|
407
407
|
generatedAt: c,
|
|
408
408
|
calendar: d
|
|
409
409
|
}) {
|
|
410
|
-
const l =
|
|
410
|
+
const l = Ln({
|
|
411
411
|
dashboard: e,
|
|
412
412
|
sheetId: t,
|
|
413
413
|
card: n,
|
|
414
414
|
sectionId: o,
|
|
415
|
-
sheetKind:
|
|
415
|
+
sheetKind: s,
|
|
416
416
|
runtimeValues: r,
|
|
417
417
|
calendar: d
|
|
418
418
|
});
|
|
@@ -421,9 +421,9 @@ function N({
|
|
|
421
421
|
snapshot: {
|
|
422
422
|
...t ? { sheetId: t } : {},
|
|
423
423
|
...n != null && n.id ? { cardId: n.id } : {},
|
|
424
|
-
mode:
|
|
425
|
-
dashboardInputValues:
|
|
426
|
-
|
|
424
|
+
mode: i,
|
|
425
|
+
dashboardInputValues: _n(
|
|
426
|
+
Gn({
|
|
427
427
|
inputs: l.inputs,
|
|
428
428
|
context: l,
|
|
429
429
|
sheetId: t,
|
|
@@ -432,17 +432,17 @@ function N({
|
|
|
432
432
|
}),
|
|
433
433
|
r.dashboardInputValues
|
|
434
434
|
),
|
|
435
|
-
...
|
|
435
|
+
...Ke(r.cardViewState, {
|
|
436
436
|
cardId: n == null ? void 0 : n.id,
|
|
437
|
-
sheetKind:
|
|
437
|
+
sheetKind: s
|
|
438
438
|
}),
|
|
439
|
-
...
|
|
439
|
+
...Qe(a, { sheetKind: s }),
|
|
440
440
|
generatedAt: c,
|
|
441
441
|
timezone: d == null ? void 0 : d.tz
|
|
442
442
|
}
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function An({
|
|
446
446
|
sheetIds: e,
|
|
447
447
|
sheetKind: t = "dashboard",
|
|
448
448
|
...n
|
|
@@ -454,8 +454,8 @@ function Hn({
|
|
|
454
454
|
sheetId: c,
|
|
455
455
|
sheetKind: t
|
|
456
456
|
})
|
|
457
|
-
),
|
|
458
|
-
(c) =>
|
|
457
|
+
), s = e.flatMap(
|
|
458
|
+
(c) => Nn(n.dashboard, c).map(
|
|
459
459
|
(d) => N({
|
|
460
460
|
...n,
|
|
461
461
|
sheetId: c,
|
|
@@ -463,59 +463,59 @@ function Hn({
|
|
|
463
463
|
sheetKind: t
|
|
464
464
|
})
|
|
465
465
|
)
|
|
466
|
-
),
|
|
466
|
+
), i = o[0] || s[0] || N({
|
|
467
467
|
...n,
|
|
468
468
|
sheetKind: t
|
|
469
|
-
}), r =
|
|
469
|
+
}), r = $e(
|
|
470
470
|
...o.map(
|
|
471
471
|
(c) => c.snapshot.dashboardInputValues
|
|
472
472
|
),
|
|
473
|
-
...
|
|
473
|
+
...s.map(
|
|
474
474
|
(c) => c.snapshot.dashboardInputValues
|
|
475
475
|
)
|
|
476
476
|
);
|
|
477
477
|
return {
|
|
478
|
-
context:
|
|
478
|
+
context: i.context,
|
|
479
479
|
snapshot: {
|
|
480
480
|
...e.length === 1 ? { sheetId: e[0] } : {},
|
|
481
481
|
mode: n.mode,
|
|
482
482
|
dashboardInputValues: r,
|
|
483
|
-
...
|
|
484
|
-
...
|
|
483
|
+
...Ke(n.runtimeValues.cardViewState, { sheetKind: t }),
|
|
484
|
+
...Qe(n.transientContexts, { sheetKind: t }),
|
|
485
485
|
generatedAt: n.generatedAt,
|
|
486
486
|
timezone: (a = n.calendar) == null ? void 0 : a.tz
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Nn(e, t) {
|
|
491
491
|
var r;
|
|
492
|
-
const n = (r = e.sheets) == null ? void 0 : r.find((a) => a.id === t), o = [],
|
|
493
|
-
!(a != null && a.id) ||
|
|
492
|
+
const n = (r = e.sheets) == null ? void 0 : r.find((a) => a.id === t), o = [], s = /* @__PURE__ */ new Set(), i = (a) => {
|
|
493
|
+
!(a != null && a.id) || s.has(a.id) || (s.add(a.id), o.push(a));
|
|
494
494
|
};
|
|
495
495
|
for (const a of (n == null ? void 0 : n.cards) || [])
|
|
496
|
-
|
|
496
|
+
i(a);
|
|
497
497
|
for (const a of (n == null ? void 0 : n.frames) || [])
|
|
498
498
|
for (const c of (a == null ? void 0 : a.cards) || [])
|
|
499
|
-
|
|
499
|
+
i(c);
|
|
500
500
|
return o;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function jn({
|
|
503
503
|
sectionIds: e,
|
|
504
504
|
...t
|
|
505
505
|
}) {
|
|
506
506
|
const n = N(t), o = e.map(
|
|
507
|
-
(
|
|
507
|
+
(i) => N({
|
|
508
508
|
...t,
|
|
509
|
-
sectionId:
|
|
509
|
+
sectionId: i
|
|
510
510
|
})
|
|
511
|
-
),
|
|
511
|
+
), s = zn(
|
|
512
512
|
t.dashboard,
|
|
513
513
|
t.sheetId,
|
|
514
514
|
e
|
|
515
515
|
).map(
|
|
516
|
-
({ sectionId:
|
|
516
|
+
({ sectionId: i, card: r }) => N({
|
|
517
517
|
...t,
|
|
518
|
-
sectionId:
|
|
518
|
+
sectionId: i,
|
|
519
519
|
card: r
|
|
520
520
|
})
|
|
521
521
|
);
|
|
@@ -523,60 +523,60 @@ function Qn({
|
|
|
523
523
|
...n,
|
|
524
524
|
snapshot: {
|
|
525
525
|
...n.snapshot,
|
|
526
|
-
dashboardInputValues:
|
|
526
|
+
dashboardInputValues: $e(
|
|
527
527
|
n.snapshot.dashboardInputValues,
|
|
528
528
|
...o.map(
|
|
529
|
-
(
|
|
529
|
+
(i) => i.snapshot.dashboardInputValues
|
|
530
530
|
),
|
|
531
|
-
...
|
|
532
|
-
(
|
|
531
|
+
...s.map(
|
|
532
|
+
(i) => i.snapshot.dashboardInputValues
|
|
533
533
|
)
|
|
534
534
|
)
|
|
535
535
|
}
|
|
536
536
|
};
|
|
537
537
|
}
|
|
538
|
-
function
|
|
539
|
-
var
|
|
540
|
-
const o = new Set(n),
|
|
541
|
-
return (((r =
|
|
538
|
+
function zn(e, t, n) {
|
|
539
|
+
var i, r;
|
|
540
|
+
const o = new Set(n), s = (i = e.sheets) == null ? void 0 : i.find((a) => a.id === t);
|
|
541
|
+
return (((r = s == null ? void 0 : s.document) == null ? void 0 : r.sections) || []).flatMap(
|
|
542
542
|
(a) => a.id && o.has(a.id) ? de(a).map((c) => ({
|
|
543
543
|
sectionId: a.id,
|
|
544
544
|
card: c
|
|
545
545
|
})) : []
|
|
546
546
|
);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function _n(e, t) {
|
|
549
549
|
let n = e;
|
|
550
550
|
for (const o of Object.keys((t == null ? void 0 : t.shared) ?? {})) {
|
|
551
|
-
const
|
|
552
|
-
!
|
|
551
|
+
const s = le(o), i = s ? Lt(t, s) : void 0;
|
|
552
|
+
!s || !i || (n = R(
|
|
553
553
|
n,
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
{ status: "set", value: { kind: "selection", selection:
|
|
554
|
+
Kt(s),
|
|
555
|
+
Ht,
|
|
556
|
+
{ status: "set", value: { kind: "selection", selection: i } }
|
|
557
557
|
));
|
|
558
558
|
}
|
|
559
559
|
return n;
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Ke(e, t) {
|
|
562
562
|
if (t.sheetKind === "document") return {};
|
|
563
|
-
const n =
|
|
563
|
+
const n = On(
|
|
564
564
|
e,
|
|
565
565
|
t.cardId ? /* @__PURE__ */ new Set([t.cardId]) : void 0
|
|
566
566
|
);
|
|
567
567
|
return n ? { cardViewState: n } : {};
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Qe(e, t) {
|
|
570
570
|
return t.sheetKind === "document" || !(e != null && e.length) ? {} : { transientContexts: [...e] };
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function Gn({
|
|
573
573
|
inputs: e,
|
|
574
574
|
context: t,
|
|
575
575
|
sheetId: n,
|
|
576
576
|
cardId: o,
|
|
577
|
-
sectionId:
|
|
577
|
+
sectionId: s
|
|
578
578
|
}) {
|
|
579
|
-
const
|
|
579
|
+
const i = new Map(
|
|
580
580
|
t.resolvedInputs.map((a) => [
|
|
581
581
|
a.id,
|
|
582
582
|
a
|
|
@@ -584,26 +584,26 @@ function Wn({
|
|
|
584
584
|
);
|
|
585
585
|
let r = {};
|
|
586
586
|
for (const a of e) {
|
|
587
|
-
const c =
|
|
587
|
+
const c = i.get(a.id), d = Ve(a, c == null ? void 0 : c.slot) || { status: "cleared" };
|
|
588
588
|
r = R(
|
|
589
589
|
r,
|
|
590
590
|
a,
|
|
591
|
-
{ sheetId: n, cardId: o, sectionId:
|
|
591
|
+
{ sheetId: n, cardId: o, sectionId: s },
|
|
592
592
|
d
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
595
|
return M(r);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Ln({
|
|
598
598
|
dashboard: e,
|
|
599
599
|
sheetId: t,
|
|
600
600
|
card: n,
|
|
601
601
|
sectionId: o,
|
|
602
|
-
sheetKind:
|
|
603
|
-
runtimeValues:
|
|
602
|
+
sheetKind: s,
|
|
603
|
+
runtimeValues: i,
|
|
604
604
|
calendar: r
|
|
605
605
|
}) {
|
|
606
|
-
return
|
|
606
|
+
return re({
|
|
607
607
|
// See `carryTransientContexts`: the snapshot's values are the dashboard's
|
|
608
608
|
// own, and carried contexts travel beside them.
|
|
609
609
|
transientContexts: void 0,
|
|
@@ -611,42 +611,42 @@ function Yn({
|
|
|
611
611
|
sheetId: t,
|
|
612
612
|
card: n,
|
|
613
613
|
sectionId: o,
|
|
614
|
-
sheetKind:
|
|
615
|
-
runtimeValues:
|
|
614
|
+
sheetKind: s,
|
|
615
|
+
runtimeValues: i,
|
|
616
616
|
calendar: r
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function $e(...e) {
|
|
620
620
|
const t = {};
|
|
621
621
|
for (const n of e)
|
|
622
622
|
n.shared && (t.shared = {
|
|
623
623
|
...t.shared,
|
|
624
624
|
...n.shared
|
|
625
|
-
}),
|
|
625
|
+
}), J(t, "bySheetId", n.bySheetId), J(t, "byCardId", n.byCardId), J(
|
|
626
626
|
t,
|
|
627
627
|
"byDocumentSectionId",
|
|
628
628
|
n.byDocumentSectionId
|
|
629
629
|
);
|
|
630
630
|
return M(t);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function J(e, t, n) {
|
|
633
633
|
if (n) {
|
|
634
634
|
e[t] || (e[t] = {});
|
|
635
|
-
for (const [o,
|
|
635
|
+
for (const [o, s] of Object.entries(n))
|
|
636
636
|
e[t][o] = {
|
|
637
637
|
...e[t][o],
|
|
638
|
-
...
|
|
638
|
+
...s
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
function _(e) {
|
|
643
643
|
const t = M(e ?? {}), n = [];
|
|
644
|
-
for (const [o,
|
|
645
|
-
n.push({ scope: "shared", target: null, inputId: o, slot:
|
|
644
|
+
for (const [o, s] of Object.entries(t.shared ?? {}))
|
|
645
|
+
n.push({ scope: "shared", target: null, inputId: o, slot: s });
|
|
646
646
|
for (const o of ["bySheetId", "byCardId"])
|
|
647
|
-
for (const [
|
|
648
|
-
for (const [r, a] of Object.entries(
|
|
649
|
-
n.push({ scope: o, target:
|
|
647
|
+
for (const [s, i] of Object.entries(t[o] ?? {}))
|
|
648
|
+
for (const [r, a] of Object.entries(i))
|
|
649
|
+
n.push({ scope: o, target: s, inputId: r, slot: a });
|
|
650
650
|
return n;
|
|
651
651
|
}
|
|
652
652
|
function U(e, t, n) {
|
|
@@ -655,11 +655,11 @@ function U(e, t, n) {
|
|
|
655
655
|
o.shared = { ...o.shared, [t.inputId]: n };
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
|
|
658
|
+
const s = { ...o[t.scope] ?? {} };
|
|
659
|
+
s[t.target] = { ...s[t.target], [t.inputId]: n }, o[t.scope] = s;
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
const o =
|
|
661
|
+
function Ue(e, t, n) {
|
|
662
|
+
const o = Fe(
|
|
663
663
|
e,
|
|
664
664
|
t.controlOverrides,
|
|
665
665
|
{ hasExplicitRuntimeOverrides: t.controlOverrides !== void 0 }
|
|
@@ -669,34 +669,34 @@ function Ze(e, t, n) {
|
|
|
669
669
|
controlValues: o.dashboardControlValues,
|
|
670
670
|
cardControlValuesMap: o.cardControlValuesMap,
|
|
671
671
|
dashboardInputValues: t.dashboardInputValues,
|
|
672
|
-
inlineFilterValuesMap: t.inlineFilterValuesMap ??
|
|
672
|
+
inlineFilterValuesMap: t.inlineFilterValuesMap ?? ue(e, n)
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
return
|
|
675
|
+
function fe(e, t, n) {
|
|
676
|
+
return We(
|
|
677
677
|
e,
|
|
678
|
-
|
|
678
|
+
Ue(e, t, n),
|
|
679
679
|
n
|
|
680
680
|
);
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
682
|
+
function rs(e, t, n) {
|
|
683
|
+
return We(e, t, n);
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
const o = e.sheets ?? [],
|
|
685
|
+
function We(e, t, n) {
|
|
686
|
+
const o = e.sheets ?? [], s = o.filter((a) => (a.kind ?? "dashboard") === "dashboard").map((a) => a.id), i = o.filter((a) => a.kind === "document"), r = s.length ? An({
|
|
687
687
|
dashboard: e,
|
|
688
|
-
sheetIds:
|
|
688
|
+
sheetIds: s,
|
|
689
689
|
mode: "dashboard",
|
|
690
690
|
runtimeValues: t,
|
|
691
691
|
transientContexts: void 0,
|
|
692
692
|
calendar: n ?? null
|
|
693
693
|
}).snapshot.dashboardInputValues : {};
|
|
694
|
-
return
|
|
694
|
+
return i.reduce(
|
|
695
695
|
(a, c) => {
|
|
696
696
|
var d;
|
|
697
|
-
return
|
|
697
|
+
return oe(
|
|
698
698
|
a,
|
|
699
|
-
|
|
699
|
+
jn({
|
|
700
700
|
dashboard: e,
|
|
701
701
|
sheetId: c.id,
|
|
702
702
|
sheetKind: "document",
|
|
@@ -713,109 +713,109 @@ function Je(e, t, n) {
|
|
|
713
713
|
r
|
|
714
714
|
);
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
const n = {}, o = {},
|
|
718
|
-
for (const
|
|
719
|
-
const r = e.get(
|
|
716
|
+
function Ye(e, t) {
|
|
717
|
+
const n = {}, o = {}, s = /* @__PURE__ */ new Map();
|
|
718
|
+
for (const i of _(t)) {
|
|
719
|
+
const r = e.get(i.inputId), { slot: a } = i, c = () => a.status === "set" && a.value.kind === "filter" ? a.value.filterValue : a.status === "cleared" ? null : void 0;
|
|
720
720
|
if ((r == null ? void 0 : r.source) === "cardInlineFilter") {
|
|
721
721
|
const d = c();
|
|
722
722
|
if (d !== void 0) {
|
|
723
|
-
const l =
|
|
724
|
-
l.set(r.filterId, d),
|
|
723
|
+
const l = s.get(r.cardId) ?? /* @__PURE__ */ new Map();
|
|
724
|
+
l.set(r.filterId, d), s.set(r.cardId, l);
|
|
725
725
|
}
|
|
726
726
|
} else if ((r == null ? void 0 : r.source) === "dashboardControl" || (r == null ? void 0 : r.source) === "cardControl")
|
|
727
727
|
a.status === "set" && a.value.kind === "control" ? o[r.controlId] = a.value.value : a.status === "cleared" && (o[r.controlId] = void 0);
|
|
728
728
|
else {
|
|
729
|
-
U(n,
|
|
729
|
+
U(n, i, a);
|
|
730
730
|
continue;
|
|
731
731
|
}
|
|
732
|
-
a.comparisonSelection && U(n,
|
|
732
|
+
a.comparisonSelection && U(n, i, {
|
|
733
733
|
comparisonSelection: a.comparisonSelection
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
736
|
return {
|
|
737
737
|
runtime: M(n),
|
|
738
738
|
controlValues: o,
|
|
739
|
-
inlineFilterValues:
|
|
739
|
+
inlineFilterValues: s
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function Hn(e, t) {
|
|
743
743
|
if (!t.size) return [...e];
|
|
744
|
-
const n = e.filter((
|
|
745
|
-
(
|
|
744
|
+
const n = e.filter((s) => !t.has(s.filterId)), o = [...t.values()].filter(
|
|
745
|
+
(s) => s !== null
|
|
746
746
|
);
|
|
747
|
-
return
|
|
747
|
+
return Mt(n, o);
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function Ze(e, t, n) {
|
|
750
750
|
if (!Object.keys(n).length) return t;
|
|
751
|
-
const o =
|
|
751
|
+
const o = Fe(
|
|
752
752
|
e,
|
|
753
753
|
t,
|
|
754
754
|
{ hasExplicitRuntimeOverrides: t !== void 0 }
|
|
755
755
|
);
|
|
756
756
|
return {
|
|
757
|
-
...
|
|
757
|
+
...kt({
|
|
758
758
|
dashboardValues: o.dashboardControlValues,
|
|
759
759
|
cardValuesMap: o.cardControlValuesMap
|
|
760
760
|
}),
|
|
761
761
|
...n
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Kn(e, t) {
|
|
765
765
|
if (!t.size) return;
|
|
766
766
|
const n = Object.fromEntries(
|
|
767
|
-
Object.entries(e).map(([o,
|
|
767
|
+
Object.entries(e).map(([o, s]) => [o, [...s]])
|
|
768
768
|
);
|
|
769
|
-
for (const [o,
|
|
770
|
-
n[o] =
|
|
769
|
+
for (const [o, s] of t)
|
|
770
|
+
n[o] = Hn(n[o] ?? [], s);
|
|
771
771
|
return n;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function Qn(e, t, n) {
|
|
774
774
|
const o = new Map(
|
|
775
|
-
|
|
775
|
+
B(e).map(({ card: r }) => [
|
|
776
776
|
r.id,
|
|
777
777
|
new Map((r.inlineFilters ?? []).map((a) => [a.id, a]))
|
|
778
778
|
])
|
|
779
779
|
);
|
|
780
|
-
let
|
|
781
|
-
const
|
|
780
|
+
let s = !1;
|
|
781
|
+
const i = Object.fromEntries(
|
|
782
782
|
Object.entries(t).map(([r, a]) => [r, [...a]])
|
|
783
783
|
);
|
|
784
784
|
for (const [r, a] of Object.entries(n)) {
|
|
785
785
|
const c = o.get(r), d = (a ?? []).filter((l) => {
|
|
786
786
|
const u = c == null ? void 0 : c.get(l.filterId);
|
|
787
|
-
return u ?
|
|
787
|
+
return u ? ne(u, l) : !1;
|
|
788
788
|
});
|
|
789
|
-
Y(d,
|
|
789
|
+
Y(d, i[r] ?? []) || (s = !0), i[r] = d;
|
|
790
790
|
}
|
|
791
|
-
return
|
|
791
|
+
return s ? i : void 0;
|
|
792
792
|
}
|
|
793
|
-
const
|
|
794
|
-
function
|
|
795
|
-
const n =
|
|
793
|
+
const $n = ["bySheetId", "byCardId", "byDocumentSectionId"];
|
|
794
|
+
function Un(e, t) {
|
|
795
|
+
const n = se(e);
|
|
796
796
|
let o = !1;
|
|
797
|
-
const
|
|
797
|
+
const s = (r) => {
|
|
798
798
|
if (!r) return r;
|
|
799
799
|
const a = Object.entries(r).filter(([c, d]) => {
|
|
800
800
|
var u;
|
|
801
801
|
if (d.status !== "set" || d.value.kind !== "filter") return !0;
|
|
802
802
|
const l = (u = n.findFilterInput({ inputId: c })) == null ? void 0 : u.input.filter;
|
|
803
|
-
return !l ||
|
|
803
|
+
return !l || ne(l, d.value.filterValue) ? !0 : (o = !0, !1);
|
|
804
804
|
});
|
|
805
805
|
return Object.fromEntries(a);
|
|
806
|
-
},
|
|
806
|
+
}, i = {
|
|
807
807
|
...t,
|
|
808
|
-
...t.shared ? { shared:
|
|
808
|
+
...t.shared ? { shared: s(t.shared) } : {}
|
|
809
809
|
};
|
|
810
|
-
for (const r of
|
|
810
|
+
for (const r of $n) {
|
|
811
811
|
const a = t[r];
|
|
812
|
-
a && (
|
|
813
|
-
Object.entries(a).map(([c, d]) => [c,
|
|
812
|
+
a && (i[r] = Object.fromEntries(
|
|
813
|
+
Object.entries(a).map(([c, d]) => [c, s(d) ?? {}])
|
|
814
814
|
));
|
|
815
815
|
}
|
|
816
|
-
return o ?
|
|
816
|
+
return o ? i : t;
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Wn(e) {
|
|
819
819
|
var t, n;
|
|
820
820
|
return ((n = (t = e.sheets) == null ? void 0 : t[0]) == null ? void 0 : n.id) ?? null;
|
|
821
821
|
}
|
|
@@ -823,71 +823,71 @@ function L(e, t) {
|
|
|
823
823
|
var n;
|
|
824
824
|
return !!t && !!((n = e.sheets) != null && n.some((o) => o.id === t));
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
const { dashboard: t, host: n, calendar: o } = e,
|
|
826
|
+
function as(e) {
|
|
827
|
+
const { dashboard: t, host: n, calendar: o } = e, s = Ne(t, n.filterValues, {
|
|
828
828
|
calendar: o
|
|
829
|
-
}).slots,
|
|
829
|
+
}).slots, i = n.controlValues, r = L(t, n.selectedSheetId) ? n.selectedSheetId : Wn(t);
|
|
830
830
|
return {
|
|
831
|
-
hostInputValues:
|
|
832
|
-
controlOverrides:
|
|
831
|
+
hostInputValues: s,
|
|
832
|
+
controlOverrides: i,
|
|
833
833
|
selectedSheetId: r,
|
|
834
834
|
hostSelectedSheetId: n.selectedSheetId ?? null,
|
|
835
|
-
materializedInputs: e.materializeInputs === !1 ? {} :
|
|
835
|
+
materializedInputs: e.materializeInputs === !1 ? {} : fe(
|
|
836
836
|
t,
|
|
837
837
|
{
|
|
838
838
|
adHocFilterValues: [],
|
|
839
|
-
controlOverrides:
|
|
840
|
-
dashboardInputValues:
|
|
839
|
+
controlOverrides: i,
|
|
840
|
+
dashboardInputValues: s
|
|
841
841
|
},
|
|
842
842
|
o
|
|
843
843
|
)
|
|
844
844
|
};
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function Je(e) {
|
|
847
847
|
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
848
|
-
for (const
|
|
849
|
-
|
|
848
|
+
for (const s of ae(e))
|
|
849
|
+
s.kind === "filter" && s.filter ? t.set(s.id, s.filter) : s.kind === "control" && n.add(s.id), s.compatibility && o.set(s.id, s.compatibility);
|
|
850
850
|
return { filterInputs: t, controlInputIds: n, compatibility: o };
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function Xe(e, t) {
|
|
853
853
|
const n = le(t);
|
|
854
854
|
if (!n) return;
|
|
855
855
|
const o = G(e, n);
|
|
856
|
-
return o ?
|
|
856
|
+
return o ? Ut(o, e) ? "applies" : "not-eligible" : "removed";
|
|
857
857
|
}
|
|
858
|
-
function
|
|
859
|
-
const n =
|
|
860
|
-
return n ? n === "applies" :
|
|
858
|
+
function ls(e, t) {
|
|
859
|
+
const n = Xe(e, t);
|
|
860
|
+
return n ? n === "applies" : ae(e).some(
|
|
861
861
|
(o) => o.id === t
|
|
862
862
|
);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function et(e, t, n, o) {
|
|
865
865
|
if (!n) return {};
|
|
866
|
-
const
|
|
867
|
-
|
|
868
|
-
), r =
|
|
866
|
+
const s = new Set((e.sheets ?? []).map((d) => d.id)), i = new Set(
|
|
867
|
+
B(e).map(({ card: d }) => d.id)
|
|
868
|
+
), r = se(e), a = (d) => {
|
|
869
869
|
var u;
|
|
870
870
|
if (!d) return;
|
|
871
871
|
const l = {};
|
|
872
872
|
for (const [f, p] of Object.entries(d)) {
|
|
873
873
|
const m = t.filterInputs.has(f) || t.controlInputIds.has(f) ? f : ((u = r.findFilterInput({ inputId: f })) == null ? void 0 : u.input.id) ?? f;
|
|
874
874
|
if (m !== f && d[m]) continue;
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
877
|
-
if (
|
|
875
|
+
const I = Xe(e, m);
|
|
876
|
+
if (I) {
|
|
877
|
+
if (I !== "applies") {
|
|
878
878
|
o.push({
|
|
879
879
|
kind: "setting-no-longer-applies",
|
|
880
880
|
target: "selection",
|
|
881
881
|
id: m,
|
|
882
|
-
reason:
|
|
882
|
+
reason: I
|
|
883
883
|
});
|
|
884
884
|
continue;
|
|
885
885
|
}
|
|
886
886
|
l[m] = p;
|
|
887
887
|
continue;
|
|
888
888
|
}
|
|
889
|
-
const
|
|
890
|
-
if (!
|
|
889
|
+
const b = t.filterInputs.get(m);
|
|
890
|
+
if (!b && !t.controlInputIds.has(m)) {
|
|
891
891
|
o.push({
|
|
892
892
|
kind: "setting-no-longer-applies",
|
|
893
893
|
target: "input",
|
|
@@ -896,7 +896,7 @@ function ot(e, t, n, o) {
|
|
|
896
896
|
});
|
|
897
897
|
continue;
|
|
898
898
|
}
|
|
899
|
-
if (
|
|
899
|
+
if (b && p.status === "set" && p.value.kind === "filter" && !ne(b, p.value.filterValue)) {
|
|
900
900
|
o.push({
|
|
901
901
|
kind: "setting-no-longer-applies",
|
|
902
902
|
target: "input",
|
|
@@ -913,11 +913,11 @@ function ot(e, t, n, o) {
|
|
|
913
913
|
const u = {};
|
|
914
914
|
for (const [f, p] of Object.entries(d)) {
|
|
915
915
|
if (!l(f)) {
|
|
916
|
-
for (const
|
|
916
|
+
for (const I of Object.keys(p))
|
|
917
917
|
o.push({
|
|
918
918
|
kind: "setting-no-longer-applies",
|
|
919
919
|
target: "input",
|
|
920
|
-
id:
|
|
920
|
+
id: I,
|
|
921
921
|
reason: "removed"
|
|
922
922
|
});
|
|
923
923
|
continue;
|
|
@@ -929,23 +929,23 @@ function ot(e, t, n, o) {
|
|
|
929
929
|
};
|
|
930
930
|
return M({
|
|
931
931
|
shared: a(n.shared),
|
|
932
|
-
bySheetId: c(n.bySheetId, (d) =>
|
|
933
|
-
byCardId: c(n.byCardId, (d) =>
|
|
932
|
+
bySheetId: c(n.bySheetId, (d) => s.has(d)),
|
|
933
|
+
byCardId: c(n.byCardId, (d) => i.has(d))
|
|
934
934
|
// Document sections are not viewer state.
|
|
935
935
|
});
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
),
|
|
937
|
+
function F(e, t, n, o = {}) {
|
|
938
|
+
const s = new Map(
|
|
939
|
+
B(e).map(({ card: r }) => [r.id, r])
|
|
940
|
+
), i = {};
|
|
941
941
|
for (const [r, a] of Object.entries(t ?? {})) {
|
|
942
|
-
const c =
|
|
943
|
-
if (c &&
|
|
944
|
-
|
|
942
|
+
const c = s.get(r);
|
|
943
|
+
if (c && gn(c)) {
|
|
944
|
+
Cn(a) || (i[r] = a);
|
|
945
945
|
continue;
|
|
946
946
|
}
|
|
947
|
-
if (c && o.sessionSorts &&
|
|
948
|
-
a.sort && (
|
|
947
|
+
if (c && o.sessionSorts && vn(c)) {
|
|
948
|
+
a.sort && (i[r] = { sort: a.sort });
|
|
949
949
|
continue;
|
|
950
950
|
}
|
|
951
951
|
n == null || n.push({
|
|
@@ -955,9 +955,9 @@ function V(e, t, n, o = {}) {
|
|
|
955
955
|
reason: G(e, r) ? "not-eligible" : "removed"
|
|
956
956
|
});
|
|
957
957
|
}
|
|
958
|
-
return
|
|
958
|
+
return i;
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function Yn(e, t, n) {
|
|
961
961
|
if (t) {
|
|
962
962
|
if (L(e, t)) return t;
|
|
963
963
|
n.push({
|
|
@@ -968,8 +968,8 @@ function oo(e, t, n) {
|
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
const
|
|
972
|
-
function
|
|
971
|
+
const pe = (e, t) => Y(e ?? null, t ?? null);
|
|
972
|
+
function tt(e) {
|
|
973
973
|
return {
|
|
974
974
|
adHocFilterValues: e.adHocFilterValues,
|
|
975
975
|
controlOverrides: e.controlOverrides,
|
|
@@ -988,39 +988,39 @@ function K(e, t) {
|
|
|
988
988
|
tableSettings: t
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function nt(e, t) {
|
|
992
992
|
const n = t.dashboardInputValues === e.baseline.hostInputValues && !t.inlineFilterValuesMap && !t.adHocFilterValues.length && t.controlOverrides === e.baseline.controlOverrides;
|
|
993
993
|
return {
|
|
994
994
|
selectedSheetId: t.selectedSheetId,
|
|
995
995
|
// Overlay: the bookmark's values on the baseline's runtime values.
|
|
996
|
-
inputs: n ? e.baseline.materializedInputs :
|
|
996
|
+
inputs: n ? e.baseline.materializedInputs : fe(e.dashboard, t, e.calendar),
|
|
997
997
|
tableSettings: t.tableSettings
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
1000
|
function A(e, t) {
|
|
1001
|
-
const n =
|
|
1001
|
+
const n = tt(t), o = t.restore ?? n;
|
|
1002
1002
|
return {
|
|
1003
1003
|
...n,
|
|
1004
1004
|
appliedBookmarkId: t.appliedBookmarkId,
|
|
1005
1005
|
rememberedWrites: t.rememberedWrites ?? [],
|
|
1006
1006
|
notices: t.notices ?? [],
|
|
1007
|
-
opened:
|
|
1007
|
+
opened: nt(e, o),
|
|
1008
1008
|
restore: o
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
const { dashboard:
|
|
1011
|
+
function ge(e, t, n, o) {
|
|
1012
|
+
const { dashboard: s, baseline: i } = e, r = [], a = _e(t.state, ce), c = a.ok ? a.value : {};
|
|
1013
1013
|
for (const m of a.ok ? a.issues : [])
|
|
1014
|
-
r.push(
|
|
1015
|
-
const d =
|
|
1014
|
+
r.push(Zn(m));
|
|
1015
|
+
const d = Je(s), l = Ye(
|
|
1016
1016
|
d.compatibility,
|
|
1017
|
-
|
|
1018
|
-
), u =
|
|
1019
|
-
|
|
1017
|
+
et(s, d, c.inputs, r)
|
|
1018
|
+
), u = Yn(s, c.selectedSheetId, r) ?? i.selectedSheetId, f = F(
|
|
1019
|
+
s,
|
|
1020
1020
|
c.tableSettings,
|
|
1021
1021
|
r
|
|
1022
|
-
), p =
|
|
1023
|
-
|
|
1022
|
+
), p = F(
|
|
1023
|
+
s,
|
|
1024
1024
|
n,
|
|
1025
1025
|
void 0
|
|
1026
1026
|
);
|
|
@@ -1028,19 +1028,19 @@ function De(e, t, n, o) {
|
|
|
1028
1028
|
appliedBookmarkId: t.id,
|
|
1029
1029
|
// A bookmark opens without ad-hoc values, as today (P4a-02 f).
|
|
1030
1030
|
adHocFilterValues: [],
|
|
1031
|
-
controlOverrides:
|
|
1032
|
-
|
|
1033
|
-
|
|
1031
|
+
controlOverrides: Ze(
|
|
1032
|
+
s,
|
|
1033
|
+
i.controlOverrides,
|
|
1034
1034
|
l.controlValues
|
|
1035
1035
|
),
|
|
1036
1036
|
// Overlay, never replacement: the bookmark's slots over the host's.
|
|
1037
|
-
dashboardInputValues:
|
|
1038
|
-
|
|
1037
|
+
dashboardInputValues: oe(
|
|
1038
|
+
i.hostInputValues,
|
|
1039
1039
|
l.runtime
|
|
1040
1040
|
),
|
|
1041
|
-
...
|
|
1042
|
-
|
|
1043
|
-
|
|
1041
|
+
...ot(
|
|
1042
|
+
Kn(
|
|
1043
|
+
ue(s, e.calendar),
|
|
1044
1044
|
l.inlineFilterValues
|
|
1045
1045
|
)
|
|
1046
1046
|
),
|
|
@@ -1050,16 +1050,16 @@ function De(e, t, n, o) {
|
|
|
1050
1050
|
{ ...f, ...p }
|
|
1051
1051
|
),
|
|
1052
1052
|
rememberedWrites: o.writeRemembered ? Object.entries(f).filter(
|
|
1053
|
-
([m,
|
|
1054
|
-
).map(([m,
|
|
1053
|
+
([m, I]) => !pe(p[m], I)
|
|
1054
|
+
).map(([m, I]) => ({
|
|
1055
1055
|
kind: "set",
|
|
1056
1056
|
cardId: m,
|
|
1057
|
-
settings:
|
|
1057
|
+
settings: I
|
|
1058
1058
|
})) : [],
|
|
1059
1059
|
notices: r
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function Zn(e) {
|
|
1063
1063
|
return {
|
|
1064
1064
|
kind: "setting-no-longer-applies",
|
|
1065
1065
|
target: e.target,
|
|
@@ -1067,35 +1067,35 @@ function io(e) {
|
|
|
1067
1067
|
reason: "invalid"
|
|
1068
1068
|
};
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function ot(e) {
|
|
1071
1071
|
return e ? { inlineFilterValuesMap: e } : {};
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1074
|
-
const { dashboard: o, baseline:
|
|
1073
|
+
function Ce(e, t, n) {
|
|
1074
|
+
const { dashboard: o, baseline: s } = e;
|
|
1075
1075
|
return {
|
|
1076
1076
|
// A reload in place keeps ad-hoc values, as today (P4a-02 f), unless the
|
|
1077
1077
|
// template now defines a filter with that id.
|
|
1078
1078
|
adHocFilterValues: t.adHocFilterValues.filter(
|
|
1079
|
-
(
|
|
1079
|
+
(i) => !se(o).findFilterInput({ filterId: i.filterId })
|
|
1080
1080
|
),
|
|
1081
1081
|
// A host's new control defaults are the baseline's, not the viewer's.
|
|
1082
|
-
controlOverrides: n.controlsChanged ?
|
|
1082
|
+
controlOverrides: n.controlsChanged ? s.controlOverrides : t.controlOverrides,
|
|
1083
1083
|
// Live slots stay, except a filter value this template no longer accepts:
|
|
1084
1084
|
// that filter loads its new default, as the old list did. The resolver
|
|
1085
1085
|
// ignores slots this template no longer has.
|
|
1086
|
-
dashboardInputValues:
|
|
1086
|
+
dashboardInputValues: Un(
|
|
1087
1087
|
o,
|
|
1088
1088
|
t.dashboardInputValues
|
|
1089
1089
|
),
|
|
1090
|
-
...
|
|
1091
|
-
|
|
1090
|
+
...ot(
|
|
1091
|
+
Qn(
|
|
1092
1092
|
o,
|
|
1093
|
-
|
|
1093
|
+
ue(o, e.calendar),
|
|
1094
1094
|
t.inlineFilterValuesMap ?? {}
|
|
1095
1095
|
)
|
|
1096
1096
|
),
|
|
1097
|
-
selectedSheetId: !n.sheetChanged && L(o, t.selectedSheetId) ? t.selectedSheetId :
|
|
1098
|
-
tableSettings:
|
|
1097
|
+
selectedSheetId: !n.sheetChanged && L(o, t.selectedSheetId) ? t.selectedSheetId : s.selectedSheetId,
|
|
1098
|
+
tableSettings: F(
|
|
1099
1099
|
o,
|
|
1100
1100
|
t.tableSettings,
|
|
1101
1101
|
void 0,
|
|
@@ -1103,42 +1103,42 @@ function Fe(e, t, n) {
|
|
|
1103
1103
|
)
|
|
1104
1104
|
};
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1107
|
-
const { dashboard: t, baseline: n, event: o } = e,
|
|
1106
|
+
function ds(e) {
|
|
1107
|
+
const { dashboard: t, baseline: n, event: o } = e, s = e.rememberedTableSettings;
|
|
1108
1108
|
switch (o.kind) {
|
|
1109
1109
|
case "initial-load":
|
|
1110
|
-
return o.defaultBookmark ?
|
|
1110
|
+
return o.defaultBookmark ? ge(e, o.defaultBookmark, s, {
|
|
1111
1111
|
writeRemembered: !1
|
|
1112
1112
|
}) : A(e, {
|
|
1113
1113
|
appliedBookmarkId: null,
|
|
1114
1114
|
...K(
|
|
1115
1115
|
n,
|
|
1116
|
-
|
|
1116
|
+
F(t, s, void 0, {
|
|
1117
1117
|
sessionSorts: o.captured
|
|
1118
1118
|
})
|
|
1119
1119
|
)
|
|
1120
1120
|
});
|
|
1121
1121
|
case "refetch": {
|
|
1122
|
-
const { live:
|
|
1123
|
-
sheetChanged: !!
|
|
1124
|
-
controlsChanged: !!
|
|
1125
|
-
|
|
1122
|
+
const { live: i } = o, r = i.applied, a = {
|
|
1123
|
+
sheetChanged: !!i.previousBaseline && i.previousBaseline.hostSelectedSheetId !== n.hostSelectedSheetId,
|
|
1124
|
+
controlsChanged: !!i.previousBaseline && !Y(
|
|
1125
|
+
i.previousBaseline.controlOverrides ?? null,
|
|
1126
1126
|
n.controlOverrides ?? null
|
|
1127
1127
|
)
|
|
1128
|
-
}, c =
|
|
1128
|
+
}, c = Ce(
|
|
1129
1129
|
e,
|
|
1130
1130
|
{
|
|
1131
|
-
adHocFilterValues:
|
|
1132
|
-
controlOverrides:
|
|
1133
|
-
dashboardInputValues:
|
|
1134
|
-
inlineFilterValuesMap:
|
|
1135
|
-
selectedSheetId:
|
|
1136
|
-
tableSettings:
|
|
1131
|
+
adHocFilterValues: i.adHocFilterValues,
|
|
1132
|
+
controlOverrides: i.controlValues ?? n.controlOverrides,
|
|
1133
|
+
dashboardInputValues: i.dashboardInputValues,
|
|
1134
|
+
inlineFilterValuesMap: i.inlineFilterValuesMap,
|
|
1135
|
+
selectedSheetId: i.selectedSheetId,
|
|
1136
|
+
tableSettings: i.tableSettings
|
|
1137
1137
|
},
|
|
1138
1138
|
a
|
|
1139
|
-
), d = r ?
|
|
1139
|
+
), d = r ? Ce(e, r.restore, a) : K(
|
|
1140
1140
|
n,
|
|
1141
|
-
|
|
1141
|
+
F(t, s, void 0)
|
|
1142
1142
|
);
|
|
1143
1143
|
return A(e, {
|
|
1144
1144
|
appliedBookmarkId: (r == null ? void 0 : r.appliedBookmarkId) ?? null,
|
|
@@ -1148,7 +1148,7 @@ function Vi(e) {
|
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
1150
|
case "open-bookmark":
|
|
1151
|
-
return
|
|
1151
|
+
return ge(e, o.bookmark, s, {
|
|
1152
1152
|
writeRemembered: !0
|
|
1153
1153
|
});
|
|
1154
1154
|
case "open-default-view":
|
|
@@ -1156,7 +1156,7 @@ function Vi(e) {
|
|
|
1156
1156
|
appliedBookmarkId: null,
|
|
1157
1157
|
...K(
|
|
1158
1158
|
n,
|
|
1159
|
-
|
|
1159
|
+
F(t, s, void 0)
|
|
1160
1160
|
)
|
|
1161
1161
|
});
|
|
1162
1162
|
case "reset-to-default-view":
|
|
@@ -1166,17 +1166,17 @@ function Vi(e) {
|
|
|
1166
1166
|
rememberedWrites: [{ kind: "clear-all" }]
|
|
1167
1167
|
});
|
|
1168
1168
|
case "discard-changes": {
|
|
1169
|
-
const { restore:
|
|
1169
|
+
const { restore: i } = o.applied, r = F(
|
|
1170
1170
|
t,
|
|
1171
|
-
|
|
1171
|
+
i.tableSettings,
|
|
1172
1172
|
void 0,
|
|
1173
1173
|
{ sessionSorts: !0 }
|
|
1174
|
-
), a =
|
|
1174
|
+
), a = F(t, r, void 0), c = F(t, s, void 0), d = [];
|
|
1175
1175
|
for (const l of /* @__PURE__ */ new Set([
|
|
1176
1176
|
...Object.keys(c),
|
|
1177
1177
|
...Object.keys(a)
|
|
1178
1178
|
])) {
|
|
1179
|
-
if (
|
|
1179
|
+
if (pe(c[l], a[l])) continue;
|
|
1180
1180
|
const u = a[l];
|
|
1181
1181
|
d.push(
|
|
1182
1182
|
u ? { kind: "set", cardId: l, settings: u } : { kind: "clear", cardId: l }
|
|
@@ -1184,21 +1184,21 @@ function Vi(e) {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
return A(e, {
|
|
1186
1186
|
appliedBookmarkId: o.applied.appliedBookmarkId,
|
|
1187
|
-
...
|
|
1188
|
-
selectedSheetId: L(t,
|
|
1187
|
+
...i,
|
|
1188
|
+
selectedSheetId: L(t, i.selectedSheetId) ? i.selectedSheetId : n.selectedSheetId,
|
|
1189
1189
|
tableSettings: r,
|
|
1190
1190
|
rememberedWrites: d,
|
|
1191
1191
|
notices: o.applied.notices,
|
|
1192
|
-
restore:
|
|
1192
|
+
restore: i
|
|
1193
1193
|
});
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const { dashboard: t, calendar: n } = e, o = e.hostControlValues,
|
|
1197
|
+
function cs(e) {
|
|
1198
|
+
const { dashboard: t, calendar: n } = e, o = e.hostControlValues, s = {
|
|
1199
1199
|
...e.baseline,
|
|
1200
1200
|
controlOverrides: o,
|
|
1201
|
-
materializedInputs:
|
|
1201
|
+
materializedInputs: fe(
|
|
1202
1202
|
t,
|
|
1203
1203
|
{
|
|
1204
1204
|
adHocFilterValues: [],
|
|
@@ -1208,38 +1208,38 @@ function ki(e) {
|
|
|
1208
1208
|
n
|
|
1209
1209
|
)
|
|
1210
1210
|
};
|
|
1211
|
-
let
|
|
1211
|
+
let i = o;
|
|
1212
1212
|
if (e.appliedBookmark) {
|
|
1213
|
-
const c =
|
|
1213
|
+
const c = _e(
|
|
1214
1214
|
e.appliedBookmark.state,
|
|
1215
1215
|
ce
|
|
1216
|
-
), d =
|
|
1216
|
+
), d = Je(t), l = Ye(
|
|
1217
1217
|
d.compatibility,
|
|
1218
|
-
|
|
1218
|
+
et(
|
|
1219
1219
|
t,
|
|
1220
1220
|
d,
|
|
1221
1221
|
c.ok ? c.value.inputs : void 0,
|
|
1222
1222
|
[]
|
|
1223
1223
|
)
|
|
1224
1224
|
).controlValues;
|
|
1225
|
-
|
|
1225
|
+
i = Ze(t, o, l);
|
|
1226
1226
|
}
|
|
1227
1227
|
const r = e.applied;
|
|
1228
|
-
if (!r) return { baseline:
|
|
1229
|
-
const a = { ...r.restore, controlOverrides:
|
|
1228
|
+
if (!r) return { baseline: s, controlOverrides: i, applied: null };
|
|
1229
|
+
const a = { ...r.restore, controlOverrides: i };
|
|
1230
1230
|
return {
|
|
1231
|
-
baseline:
|
|
1232
|
-
controlOverrides:
|
|
1231
|
+
baseline: s,
|
|
1232
|
+
controlOverrides: i,
|
|
1233
1233
|
applied: {
|
|
1234
1234
|
...r,
|
|
1235
|
-
controlOverrides:
|
|
1235
|
+
controlOverrides: i,
|
|
1236
1236
|
restore: a,
|
|
1237
|
-
opened:
|
|
1237
|
+
opened: nt({ dashboard: t, baseline: s, calendar: n }, a)
|
|
1238
1238
|
}
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
const o =
|
|
1241
|
+
function us(e, t, n) {
|
|
1242
|
+
const o = tt(n.values);
|
|
1243
1243
|
return {
|
|
1244
1244
|
...o,
|
|
1245
1245
|
appliedBookmarkId: t,
|
|
@@ -1249,30 +1249,30 @@ function Mi(e, t, n) {
|
|
|
1249
1249
|
restore: o
|
|
1250
1250
|
};
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1252
|
+
const ve = (e) => JSON.stringify([e.scope, e.target, e.inputId]);
|
|
1253
1253
|
function Q(e) {
|
|
1254
1254
|
return !e || e.status === "cleared" && !e.comparisonSelection;
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function st(e, t) {
|
|
1257
1257
|
const n = new Map(
|
|
1258
|
-
_(e).map((
|
|
1258
|
+
_(e).map((i) => [ve(i), i])
|
|
1259
1259
|
), o = new Map(
|
|
1260
|
-
_(t).map((
|
|
1261
|
-
),
|
|
1262
|
-
for (const [
|
|
1263
|
-
const a = n.get(
|
|
1260
|
+
_(t).map((i) => [ve(i), i])
|
|
1261
|
+
), s = {};
|
|
1262
|
+
for (const [i, r] of o) {
|
|
1263
|
+
const a = n.get(i);
|
|
1264
1264
|
a && Y(a.slot, r.slot) || Q(r.slot) && Q(a == null ? void 0 : a.slot) || U(
|
|
1265
|
-
|
|
1265
|
+
s,
|
|
1266
1266
|
r,
|
|
1267
1267
|
Q(r.slot) ? { status: "cleared" } : r.slot
|
|
1268
1268
|
);
|
|
1269
1269
|
}
|
|
1270
|
-
for (const [
|
|
1271
|
-
o.has(
|
|
1272
|
-
return M(
|
|
1270
|
+
for (const [i, r] of n)
|
|
1271
|
+
o.has(i) || Q(r.slot) || U(s, r, { status: "cleared" });
|
|
1272
|
+
return M(s);
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1275
|
-
const { dashboard: t, baseline: n, current: o } = e,
|
|
1274
|
+
function fs(e) {
|
|
1275
|
+
const { dashboard: t, baseline: n, current: o } = e, s = st(n.materializedInputs, o.inputs), i = F(
|
|
1276
1276
|
t,
|
|
1277
1277
|
o.tableSettings,
|
|
1278
1278
|
void 0
|
|
@@ -1280,42 +1280,42 @@ function Ti(e) {
|
|
|
1280
1280
|
return {
|
|
1281
1281
|
version: ce,
|
|
1282
1282
|
...r ? { selectedSheetId: r } : {},
|
|
1283
|
-
..._(
|
|
1284
|
-
...Object.keys(
|
|
1283
|
+
..._(s).length ? { inputs: s } : {},
|
|
1284
|
+
...Object.keys(i).length ? { tableSettings: i } : {}
|
|
1285
1285
|
};
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Jn(e) {
|
|
1288
1288
|
const t = /* @__PURE__ */ new Map();
|
|
1289
|
-
for (const n of
|
|
1289
|
+
for (const n of ae(e))
|
|
1290
1290
|
n.label && t.set(n.id, n.label);
|
|
1291
1291
|
return t;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1294
|
-
var
|
|
1293
|
+
function Xn(e, t, n) {
|
|
1294
|
+
var s, i;
|
|
1295
1295
|
const o = le(n);
|
|
1296
1296
|
if (o) {
|
|
1297
|
-
const r = (
|
|
1297
|
+
const r = (i = (s = G(e, o)) == null ? void 0 : s.title) == null ? void 0 : i.trim();
|
|
1298
1298
|
return r ? `Selection in ${r}` : "Selection";
|
|
1299
1299
|
}
|
|
1300
1300
|
return t.get(n) ?? n;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function ps(e) {
|
|
1303
1303
|
var d, l;
|
|
1304
|
-
const { dashboard: t, opened: n, current: o } = e,
|
|
1304
|
+
const { dashboard: t, opened: n, current: o } = e, s = [], i = Jn(t), r = /* @__PURE__ */ new Set();
|
|
1305
1305
|
for (const u of _(
|
|
1306
|
-
|
|
1306
|
+
st(n.inputs, o.inputs)
|
|
1307
1307
|
))
|
|
1308
|
-
r.has(u.inputId) || (r.add(u.inputId),
|
|
1308
|
+
r.has(u.inputId) || (r.add(u.inputId), s.push({
|
|
1309
1309
|
target: "input",
|
|
1310
1310
|
inputId: u.inputId,
|
|
1311
|
-
label:
|
|
1311
|
+
label: Xn(t, i, u.inputId)
|
|
1312
1312
|
}));
|
|
1313
|
-
(n.selectedSheetId ?? null) !== (o.selectedSheetId ?? null) &&
|
|
1314
|
-
const a =
|
|
1313
|
+
(n.selectedSheetId ?? null) !== (o.selectedSheetId ?? null) && s.push({ target: "sheet" });
|
|
1314
|
+
const a = F(
|
|
1315
1315
|
t,
|
|
1316
1316
|
n.tableSettings,
|
|
1317
1317
|
void 0
|
|
1318
|
-
), c =
|
|
1318
|
+
), c = F(
|
|
1319
1319
|
t,
|
|
1320
1320
|
o.tableSettings,
|
|
1321
1321
|
void 0
|
|
@@ -1324,145 +1324,51 @@ function Oi(e) {
|
|
|
1324
1324
|
...Object.keys(a),
|
|
1325
1325
|
...Object.keys(c)
|
|
1326
1326
|
]))
|
|
1327
|
-
|
|
1327
|
+
pe(a[u], c[u]) || s.push({
|
|
1328
1328
|
target: "table",
|
|
1329
1329
|
cardId: u,
|
|
1330
1330
|
cardTitle: ((l = (d = G(t, u)) == null ? void 0 : d.title) == null ? void 0 : l.trim()) || "Table"
|
|
1331
1331
|
});
|
|
1332
|
-
return
|
|
1333
|
-
}
|
|
1334
|
-
function ao(e) {
|
|
1335
|
-
const t = e.qualifiedFieldName, o = (e.qualifiedEntityName || e.qualifiedFieldName.split(".").slice(0, -1).join(".")).split(".").map((s) => ve(s)).join("."), i = ve(e.name);
|
|
1336
|
-
return {
|
|
1337
|
-
qualifiedColumnName: t,
|
|
1338
|
-
qualifiedTableName: o,
|
|
1339
|
-
formattedColumnName: i
|
|
1340
|
-
};
|
|
1341
|
-
}
|
|
1342
|
-
function xi({
|
|
1343
|
-
field: e,
|
|
1344
|
-
dataSource: t,
|
|
1345
|
-
connectionId: n,
|
|
1346
|
-
connectionType: o,
|
|
1347
|
-
filterId: i
|
|
1348
|
-
}) {
|
|
1349
|
-
const { qualifiedColumnName: s, qualifiedTableName: r } = ao(e), a = xe(e.dataType), c = a === "date" ? "between" : "in", d = zt(e), l = _t(t, {
|
|
1350
|
-
connectionId: n,
|
|
1351
|
-
connectionType: o
|
|
1352
|
-
}, e);
|
|
1353
|
-
return {
|
|
1354
|
-
id: i || ue(),
|
|
1355
|
-
title: e.label || e.name,
|
|
1356
|
-
connectionId: n || (t == null ? void 0 : t.connectionId) || "",
|
|
1357
|
-
column: s,
|
|
1358
|
-
dataType: e.dataType,
|
|
1359
|
-
table: e.entityName || "",
|
|
1360
|
-
database: Gt(t, l, e) || "",
|
|
1361
|
-
qualifiedTableName: r,
|
|
1362
|
-
operation: c,
|
|
1363
|
-
sql: "",
|
|
1364
|
-
fieldMeta: d,
|
|
1365
|
-
semanticContext: l,
|
|
1366
|
-
...a === "date" ? { dateSelectionMode: "range" } : { type: "single" }
|
|
1367
|
-
};
|
|
1368
|
-
}
|
|
1369
|
-
function lo(e, t) {
|
|
1370
|
-
return e.kind === "filter" && jt(e.filter, t);
|
|
1371
|
-
}
|
|
1372
|
-
function co(e) {
|
|
1373
|
-
return xe(e.dataType) === "date" ? ["label", "start", "end", "range"] : ["label", "value"];
|
|
1374
|
-
}
|
|
1375
|
-
function lt(e) {
|
|
1376
|
-
return uo(e) ? ["label", "value"] : ["value"];
|
|
1377
|
-
}
|
|
1378
|
-
function uo(e) {
|
|
1379
|
-
return e.type === "enum" || e.type === "multi_enum" || e.type === "field_selector" || e.type === "metric_selector" || e.type === "aggregation_selector" || e.type === "grain_selector";
|
|
1380
|
-
}
|
|
1381
|
-
function be(e) {
|
|
1382
|
-
return e === "in" || e === "not in";
|
|
1383
|
-
}
|
|
1384
|
-
function Ie(e) {
|
|
1385
|
-
return e === "not in" ? "exclude" : "include";
|
|
1386
|
-
}
|
|
1387
|
-
function fo(e) {
|
|
1388
|
-
return e === "exclude" ? "not in" : "in";
|
|
1389
|
-
}
|
|
1390
|
-
function wi(e) {
|
|
1391
|
-
var n;
|
|
1392
|
-
const t = (n = e.liveValue) == null ? void 0 : n.operation;
|
|
1393
|
-
return be(t) ? Ie(t) : e.pendingMode ?? e.authoredMode;
|
|
1394
|
-
}
|
|
1395
|
-
function po(e) {
|
|
1396
|
-
var o;
|
|
1397
|
-
let t = !1;
|
|
1398
|
-
const n = (o = e.inputs) == null ? void 0 : o.map((i) => {
|
|
1399
|
-
if (i.kind !== "filter" || !i.filter) return i;
|
|
1400
|
-
const s = mo(
|
|
1401
|
-
i.filter,
|
|
1402
|
-
new Set(bo(e.defaultInputValues, i))
|
|
1403
|
-
);
|
|
1404
|
-
return s === i.filter ? i : (t = !0, { ...i, filter: s });
|
|
1405
|
-
});
|
|
1406
|
-
return t ? { ...e, inputs: n } : e;
|
|
1407
|
-
}
|
|
1408
|
-
function mo(e, t) {
|
|
1409
|
-
if (t.size !== 1 || !be(e.operation))
|
|
1410
|
-
return e;
|
|
1411
|
-
const [n] = t;
|
|
1412
|
-
return Ie(e.operation) === n ? e : { ...e, operation: fo(n) };
|
|
1413
|
-
}
|
|
1414
|
-
function bo(e, t) {
|
|
1415
|
-
var i;
|
|
1416
|
-
const n = (s) => Object.values(s ?? {}).map((r) => r[t.id]);
|
|
1417
|
-
return (t.runtimeScope === "shared" ? [(i = e == null ? void 0 : e.shared) == null ? void 0 : i[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(
|
|
1418
|
-
(s) => (s == null ? void 0 : s.status) === "set" && s.value.kind === "filter" ? Io(s.value.filterValue) : []
|
|
1419
|
-
);
|
|
1420
|
-
}
|
|
1421
|
-
function Io(e) {
|
|
1422
|
-
return be(e.operation) ? [Ie(e.operation)] : [];
|
|
1423
|
-
}
|
|
1424
|
-
function Pi(e) {
|
|
1425
|
-
const n = Z(e).issues.length ? e : Lt(e);
|
|
1426
|
-
return po(n);
|
|
1332
|
+
return s;
|
|
1427
1333
|
}
|
|
1428
|
-
function
|
|
1334
|
+
function ms(e, t) {
|
|
1429
1335
|
const { controlContractOverrides: n, cardId: o } = t;
|
|
1430
1336
|
if (!n || (n.controlDefinitions !== void 0 && (e.controls = n.controlDefinitions), typeof o != "string" || o.trim().length === 0))
|
|
1431
1337
|
return e;
|
|
1432
|
-
const
|
|
1433
|
-
return
|
|
1338
|
+
const s = G(e, o);
|
|
1339
|
+
return s && (n.cardControlDefinitions !== void 0 && (s.controls = n.cardControlDefinitions), n.controlBindings !== void 0 && (s.controlBindings = n.controlBindings)), e;
|
|
1434
1340
|
}
|
|
1435
|
-
function
|
|
1436
|
-
const { dashboard: t, capture: n, calendar: o } = e,
|
|
1341
|
+
function Is(e) {
|
|
1342
|
+
const { dashboard: t, capture: n, calendar: o } = e, s = Ne(t, n.filterValues, {
|
|
1437
1343
|
calendar: o
|
|
1438
|
-
}),
|
|
1439
|
-
...
|
|
1344
|
+
}), i = n.dashboardInputExecutionSnapshot, r = n.controlValues, a = {
|
|
1345
|
+
...Ue(
|
|
1440
1346
|
t,
|
|
1441
1347
|
{
|
|
1442
|
-
adHocFilterValues:
|
|
1348
|
+
adHocFilterValues: s.adHocFilterValues,
|
|
1443
1349
|
controlOverrides: r,
|
|
1444
1350
|
// The snapshot replays exactly over the listed values.
|
|
1445
|
-
dashboardInputValues:
|
|
1446
|
-
|
|
1447
|
-
|
|
1351
|
+
dashboardInputValues: i ? oe(
|
|
1352
|
+
s.slots,
|
|
1353
|
+
Le({
|
|
1448
1354
|
dashboard: t,
|
|
1449
|
-
dashboardInputValues:
|
|
1450
|
-
sheetId:
|
|
1451
|
-
cardId:
|
|
1355
|
+
dashboardInputValues: i.dashboardInputValues,
|
|
1356
|
+
sheetId: i.sheetId,
|
|
1357
|
+
cardId: i.cardId
|
|
1452
1358
|
})
|
|
1453
|
-
) :
|
|
1359
|
+
) : s.slots
|
|
1454
1360
|
},
|
|
1455
1361
|
o
|
|
1456
1362
|
),
|
|
1457
|
-
cardViewState:
|
|
1458
|
-
}, c =
|
|
1363
|
+
cardViewState: i ? Tn(i.cardViewState) : {}
|
|
1364
|
+
}, c = i ? Wt(i.transientContexts) : void 0;
|
|
1459
1365
|
return {
|
|
1460
1366
|
runtimeValues: a,
|
|
1461
1367
|
controlOverrides: r,
|
|
1462
1368
|
...c != null && c.length ? { transientContexts: c } : {}
|
|
1463
1369
|
};
|
|
1464
1370
|
}
|
|
1465
|
-
function
|
|
1371
|
+
function De(e) {
|
|
1466
1372
|
const t = z(e.filter);
|
|
1467
1373
|
return {
|
|
1468
1374
|
inputId: e.inputId,
|
|
@@ -1476,9 +1382,9 @@ function Ve(e) {
|
|
|
1476
1382
|
}
|
|
1477
1383
|
};
|
|
1478
1384
|
}
|
|
1479
|
-
function
|
|
1480
|
-
var
|
|
1481
|
-
if ((
|
|
1385
|
+
function eo(e) {
|
|
1386
|
+
var s, i;
|
|
1387
|
+
if ((s = e.card.sql) != null && s.trim())
|
|
1482
1388
|
return {
|
|
1483
1389
|
inputs: e.inputs,
|
|
1484
1390
|
fieldCandidates: [],
|
|
@@ -1486,7 +1392,7 @@ function ho(e) {
|
|
|
1486
1392
|
};
|
|
1487
1393
|
const t = e.inputs.filter((r) => !z(r.filter)).map((r) => ({
|
|
1488
1394
|
input: r,
|
|
1489
|
-
resolution:
|
|
1395
|
+
resolution: Tt({
|
|
1490
1396
|
filter: r.filter,
|
|
1491
1397
|
filterValue: r.filterValue,
|
|
1492
1398
|
effectiveFilterValue: r.effectiveFilterValue,
|
|
@@ -1500,13 +1406,13 @@ function ho(e) {
|
|
|
1500
1406
|
const n = e.inputs.find(
|
|
1501
1407
|
(r) => z(r.filter)
|
|
1502
1408
|
);
|
|
1503
|
-
if (n && ((
|
|
1409
|
+
if (n && ((i = n.filterValue) == null ? void 0 : i.filterId) === n.filterId && n.effectiveFilterValue.filterId === n.filterId && Ot(n.effectiveFilterValue))
|
|
1504
1410
|
return {
|
|
1505
1411
|
inputs: e.inputs,
|
|
1506
1412
|
fieldCandidates: t,
|
|
1507
1413
|
resolution: {
|
|
1508
1414
|
status: "resolved",
|
|
1509
|
-
resolvedOwner:
|
|
1415
|
+
resolvedOwner: De(n)
|
|
1510
1416
|
}
|
|
1511
1417
|
};
|
|
1512
1418
|
const o = t.filter(
|
|
@@ -1517,7 +1423,7 @@ function ho(e) {
|
|
|
1517
1423
|
fieldCandidates: t,
|
|
1518
1424
|
resolution: {
|
|
1519
1425
|
status: "resolved",
|
|
1520
|
-
resolvedOwner:
|
|
1426
|
+
resolvedOwner: De(o[0].input)
|
|
1521
1427
|
}
|
|
1522
1428
|
} : o.length > 1 ? {
|
|
1523
1429
|
inputs: e.inputs,
|
|
@@ -1530,7 +1436,7 @@ function ho(e) {
|
|
|
1530
1436
|
}
|
|
1531
1437
|
} : { inputs: e.inputs, fieldCandidates: t, resolution: { status: "none" } };
|
|
1532
1438
|
}
|
|
1533
|
-
function
|
|
1439
|
+
function bs(e) {
|
|
1534
1440
|
var n, o;
|
|
1535
1441
|
const t = {
|
|
1536
1442
|
ownerCardCount: 0,
|
|
@@ -1539,20 +1445,20 @@ function qi(e) {
|
|
|
1539
1445
|
ambiguousCardCount: 0,
|
|
1540
1446
|
authorControlledCardCount: 0
|
|
1541
1447
|
};
|
|
1542
|
-
for (const
|
|
1543
|
-
const
|
|
1448
|
+
for (const s of e.targets) {
|
|
1449
|
+
const i = s.plan.fieldCandidates.find(
|
|
1544
1450
|
(a) => a.input.inputId === e.inputId
|
|
1545
1451
|
);
|
|
1546
|
-
if (!
|
|
1452
|
+
if (!i || i.resolution.status !== "eligible") continue;
|
|
1547
1453
|
t.matchingCardCount += 1;
|
|
1548
|
-
const { resolution: r } =
|
|
1549
|
-
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), (((n =
|
|
1454
|
+
const { resolution: r } = s.plan;
|
|
1455
|
+
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), (((n = s.card.preferences) == null ? void 0 : n.inheritGlobalComparison) === !1 || (((o = s.card.config) == null ? void 0 : o.metricColumns) || []).some(
|
|
1550
1456
|
(a) => a.comparison !== void 0
|
|
1551
1457
|
)) && (t.authorControlledCardCount += 1);
|
|
1552
1458
|
}
|
|
1553
1459
|
return t;
|
|
1554
1460
|
}
|
|
1555
|
-
const
|
|
1461
|
+
const to = /* @__PURE__ */ new Set([
|
|
1556
1462
|
"between",
|
|
1557
1463
|
"not between",
|
|
1558
1464
|
"=",
|
|
@@ -1563,50 +1469,50 @@ const go = /* @__PURE__ */ new Set([
|
|
|
1563
1469
|
"<=",
|
|
1564
1470
|
"is null",
|
|
1565
1471
|
"is not null"
|
|
1566
|
-
]),
|
|
1567
|
-
function
|
|
1568
|
-
return
|
|
1472
|
+
]), no = /^(\d{4}-\d{2}-\d{2})T/, oo = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/;
|
|
1473
|
+
function me(e) {
|
|
1474
|
+
return to.has(e);
|
|
1569
1475
|
}
|
|
1570
|
-
function
|
|
1476
|
+
function so(e, t) {
|
|
1571
1477
|
if (e instanceof Date)
|
|
1572
|
-
return Number.isNaN(e.getTime()) ? e : t ?
|
|
1478
|
+
return Number.isNaN(e.getTime()) ? e : t ? he(e, t, "yyyy-MM-dd") : e.toISOString().slice(0, 10);
|
|
1573
1479
|
if (typeof e != "string")
|
|
1574
1480
|
return e;
|
|
1575
1481
|
const n = e.trim();
|
|
1576
|
-
if (t &&
|
|
1577
|
-
const
|
|
1578
|
-
if (!Number.isNaN(
|
|
1579
|
-
return
|
|
1482
|
+
if (t && oo.test(n)) {
|
|
1483
|
+
const s = new Date(n);
|
|
1484
|
+
if (!Number.isNaN(s.getTime()))
|
|
1485
|
+
return he(s, t, "yyyy-MM-dd");
|
|
1580
1486
|
}
|
|
1581
|
-
const o =
|
|
1487
|
+
const o = no.exec(n);
|
|
1582
1488
|
return o ? o[1] : e;
|
|
1583
1489
|
}
|
|
1584
|
-
function
|
|
1490
|
+
function it(e, t) {
|
|
1585
1491
|
return Array.isArray(e) ? e.map(
|
|
1586
|
-
(n) =>
|
|
1492
|
+
(n) => so(n, t)
|
|
1587
1493
|
) : e;
|
|
1588
1494
|
}
|
|
1589
|
-
function
|
|
1590
|
-
return typeof e.allowMinutePrecision == "boolean" ? e.allowMinutePrecision :
|
|
1495
|
+
function rt(e) {
|
|
1496
|
+
return typeof e.allowMinutePrecision == "boolean" ? e.allowMinutePrecision : ie(
|
|
1591
1497
|
e.dashboard,
|
|
1592
1498
|
e.semanticExecutionPayload
|
|
1593
1499
|
).allEligibleTargetsAreDateTime;
|
|
1594
1500
|
}
|
|
1595
|
-
function
|
|
1501
|
+
function at(e) {
|
|
1596
1502
|
const {
|
|
1597
1503
|
globalDateFilter: t,
|
|
1598
1504
|
globalDateFilterValue: n,
|
|
1599
1505
|
timezone: o,
|
|
1600
|
-
allowMinutePrecision:
|
|
1506
|
+
allowMinutePrecision: s = !1
|
|
1601
1507
|
} = e;
|
|
1602
1508
|
if (!t || !n)
|
|
1603
1509
|
return;
|
|
1604
|
-
if (!
|
|
1510
|
+
if (!me(n.operation))
|
|
1605
1511
|
return {
|
|
1606
1512
|
...n,
|
|
1607
1513
|
filterId: t.id
|
|
1608
1514
|
};
|
|
1609
|
-
const
|
|
1515
|
+
const i = n, r = i.temporalPrecision === "minute" || $(i.relativeMeta), a = !s && r, c = i.operation === "is null" || i.operation === "is not null" ? [] : a ? it(i.values, o) : i.values, d = s || !$(i.relativeMeta) ? i.relativeMeta : void 0, l = s && i.temporalPrecision === "minute" ? i.temporalPrecision : void 0, {
|
|
1610
1516
|
relativeMeta: u,
|
|
1611
1517
|
temporalPrecision: f,
|
|
1612
1518
|
values: p,
|
|
@@ -1620,30 +1526,30 @@ function ut(e) {
|
|
|
1620
1526
|
...l ? { temporalPrecision: l } : {}
|
|
1621
1527
|
};
|
|
1622
1528
|
}
|
|
1623
|
-
function
|
|
1529
|
+
function io(e) {
|
|
1624
1530
|
const t = j(e.filters);
|
|
1625
1531
|
if (!t)
|
|
1626
1532
|
return e.filterValues;
|
|
1627
|
-
const n =
|
|
1628
|
-
return e.filterValues.map((o) => o.filterId !== t.id ? o :
|
|
1533
|
+
const n = rt(e);
|
|
1534
|
+
return e.filterValues.map((o) => o.filterId !== t.id ? o : at({
|
|
1629
1535
|
globalDateFilter: t,
|
|
1630
1536
|
globalDateFilterValue: o,
|
|
1631
1537
|
timezone: e.timezone,
|
|
1632
1538
|
allowMinutePrecision: n
|
|
1633
1539
|
}) || o);
|
|
1634
1540
|
}
|
|
1635
|
-
function
|
|
1541
|
+
function lt(e) {
|
|
1636
1542
|
const {
|
|
1637
1543
|
globalDateFilter: t,
|
|
1638
1544
|
globalDateFilterValue: n,
|
|
1639
1545
|
resolvedPrimaryDateField: o,
|
|
1640
|
-
semanticContext:
|
|
1641
|
-
timezone:
|
|
1546
|
+
semanticContext: s,
|
|
1547
|
+
timezone: i,
|
|
1642
1548
|
allowMinutePrecision: r = !1
|
|
1643
1549
|
} = e;
|
|
1644
|
-
if (!t || !n || !o || !
|
|
1550
|
+
if (!t || !n || !o || !me(n.operation))
|
|
1645
1551
|
return null;
|
|
1646
|
-
const a = n, c =
|
|
1552
|
+
const a = n, c = xt(
|
|
1647
1553
|
o.dataType
|
|
1648
1554
|
), d = r && c, l = a.temporalPrecision === "minute" || $(a.relativeMeta), u = d && a.temporalPrecision === "minute" ? a.temporalPrecision : void 0, f = d || !$(a.relativeMeta) ? a.relativeMeta : void 0, p = !d && l;
|
|
1649
1555
|
return {
|
|
@@ -1652,9 +1558,9 @@ function ft(e) {
|
|
|
1652
1558
|
name: o.qualifiedFieldName || o.name,
|
|
1653
1559
|
operation: a.operation,
|
|
1654
1560
|
valueType: "date",
|
|
1655
|
-
values: a.operation === "is null" || a.operation === "is not null" ? [] : p ?
|
|
1561
|
+
values: a.operation === "is null" || a.operation === "is not null" ? [] : p ? it(
|
|
1656
1562
|
a.values,
|
|
1657
|
-
|
|
1563
|
+
i
|
|
1658
1564
|
) : a.values,
|
|
1659
1565
|
dataType: o.dataType || "date",
|
|
1660
1566
|
// The exact type travels with the filter, so the server formats the predicate for
|
|
@@ -1672,58 +1578,58 @@ function ft(e) {
|
|
|
1672
1578
|
role: "groupby",
|
|
1673
1579
|
...t != null && t.title ? { label: t.title } : {}
|
|
1674
1580
|
},
|
|
1675
|
-
...
|
|
1581
|
+
...s ? { semanticContext: s } : {},
|
|
1676
1582
|
...f ? { relativeMeta: f } : {},
|
|
1677
1583
|
...u ? { temporalPrecision: u } : {}
|
|
1678
1584
|
};
|
|
1679
1585
|
}
|
|
1680
|
-
function
|
|
1586
|
+
function P(e) {
|
|
1681
1587
|
return typeof e == "string" ? e.trim() : "";
|
|
1682
1588
|
}
|
|
1683
|
-
function
|
|
1589
|
+
function ro(e) {
|
|
1684
1590
|
var t;
|
|
1685
1591
|
return (((t = e.semanticContext) == null ? void 0 : t.selectedEntities) || []).filter((n) => typeof n == "object" && n !== null).filter((n) => n.type === "dataset").map((n) => {
|
|
1686
1592
|
var o;
|
|
1687
1593
|
return {
|
|
1688
|
-
domainId:
|
|
1689
|
-
datasetName:
|
|
1690
|
-
selectedEntityId:
|
|
1594
|
+
domainId: P(n.domainId) || P((o = e.semanticContext) == null ? void 0 : o.semanticDomainId),
|
|
1595
|
+
datasetName: P(n.name),
|
|
1596
|
+
selectedEntityId: P(n.id)
|
|
1691
1597
|
};
|
|
1692
1598
|
}).filter((n) => n.domainId && n.datasetName);
|
|
1693
1599
|
}
|
|
1694
|
-
function
|
|
1600
|
+
function ao(e) {
|
|
1695
1601
|
var c, d, l, u, f;
|
|
1696
1602
|
if (z(e) || (c = e.sql) != null && c.trim())
|
|
1697
1603
|
return null;
|
|
1698
|
-
const t =
|
|
1604
|
+
const t = ro(e), n = P((d = e.semanticContext) == null ? void 0 : d.semanticDomainId), o = P((l = e.fieldMeta) == null ? void 0 : l.entityId), s = P((u = e.fieldMeta) == null ? void 0 : u.entityName), i = P((f = e.fieldMeta) == null ? void 0 : f.entityType) === "dataset", r = t.find(
|
|
1699
1605
|
(p) => o && p.selectedEntityId === o
|
|
1700
1606
|
);
|
|
1701
1607
|
if (r)
|
|
1702
1608
|
return r;
|
|
1703
1609
|
const a = t.find(
|
|
1704
|
-
(p) =>
|
|
1610
|
+
(p) => s && p.datasetName === s && (!n || p.domainId === n)
|
|
1705
1611
|
);
|
|
1706
|
-
return a || (t.length === 1 ? t[0] :
|
|
1612
|
+
return a || (t.length === 1 ? t[0] : i && s && n ? {
|
|
1707
1613
|
domainId: n,
|
|
1708
|
-
datasetName:
|
|
1614
|
+
datasetName: s
|
|
1709
1615
|
} : null);
|
|
1710
1616
|
}
|
|
1711
|
-
function
|
|
1712
|
-
var
|
|
1617
|
+
function lo(e) {
|
|
1618
|
+
var s, i;
|
|
1713
1619
|
const { filter: t, semanticExecutionPayload: n } = e;
|
|
1714
1620
|
if (!n)
|
|
1715
1621
|
return null;
|
|
1716
|
-
const o =
|
|
1717
|
-
return o && ((
|
|
1622
|
+
const o = ao(t);
|
|
1623
|
+
return o && ((i = (s = n.domainsById[o.domainId]) == null ? void 0 : s.datasetsByName[o.datasetName]) == null ? void 0 : i.primaryDateField) || null;
|
|
1718
1624
|
}
|
|
1719
|
-
function
|
|
1625
|
+
function dt(e) {
|
|
1720
1626
|
const t = j(e.filters);
|
|
1721
1627
|
return t ? e.filterValues.filter(
|
|
1722
1628
|
(n) => n.filterId !== t.id
|
|
1723
1629
|
) : e.filterValues;
|
|
1724
1630
|
}
|
|
1725
|
-
function
|
|
1726
|
-
const t = j(e.filters), n =
|
|
1631
|
+
function hs(e) {
|
|
1632
|
+
const t = j(e.filters), n = dt({
|
|
1727
1633
|
filters: e.filters,
|
|
1728
1634
|
filterValues: e.filterValues
|
|
1729
1635
|
});
|
|
@@ -1731,37 +1637,37 @@ function Bi(e) {
|
|
|
1731
1637
|
return n;
|
|
1732
1638
|
const o = e.filterValues.find(
|
|
1733
1639
|
(r) => r.filterId === t.id
|
|
1734
|
-
),
|
|
1640
|
+
), s = lo({
|
|
1735
1641
|
filter: e.filter,
|
|
1736
1642
|
semanticExecutionPayload: e.semanticExecutionPayload
|
|
1737
|
-
}),
|
|
1643
|
+
}), i = lt({
|
|
1738
1644
|
globalDateFilter: t,
|
|
1739
1645
|
globalDateFilterValue: o,
|
|
1740
|
-
resolvedPrimaryDateField:
|
|
1646
|
+
resolvedPrimaryDateField: s || void 0,
|
|
1741
1647
|
semanticContext: e.filter.semanticContext,
|
|
1742
1648
|
timezone: e.timezone,
|
|
1743
1649
|
allowMinutePrecision: e.allowMinutePrecision
|
|
1744
1650
|
});
|
|
1745
|
-
return
|
|
1651
|
+
return i ? [i, ...n] : n;
|
|
1746
1652
|
}
|
|
1747
|
-
function
|
|
1653
|
+
function co(e) {
|
|
1748
1654
|
var l;
|
|
1749
1655
|
const t = j(e.filters), n = t ? e.cardFilterValues.find(
|
|
1750
1656
|
(u) => u.filterId === t.id
|
|
1751
1657
|
) : void 0, o = t ? e.cardFilterValues.filter(
|
|
1752
1658
|
(u) => u.filterId !== t.id
|
|
1753
|
-
) : e.cardFilterValues,
|
|
1659
|
+
) : e.cardFilterValues, s = e.resolvedPrimaryDateField ?? ke({
|
|
1754
1660
|
card: e.card,
|
|
1755
1661
|
cardConfig: e.cardConfig,
|
|
1756
1662
|
resolvedFields: e.resolvedFields,
|
|
1757
1663
|
semanticExecutionPayload: e.semanticExecutionPayload
|
|
1758
|
-
}),
|
|
1664
|
+
}), i = lt({
|
|
1759
1665
|
globalDateFilter: t,
|
|
1760
1666
|
globalDateFilterValue: n,
|
|
1761
|
-
resolvedPrimaryDateField:
|
|
1667
|
+
resolvedPrimaryDateField: s || void 0,
|
|
1762
1668
|
timezone: e.timezone,
|
|
1763
1669
|
allowMinutePrecision: e.allowMinutePrecision
|
|
1764
|
-
}), r =
|
|
1670
|
+
}), r = i ? [i, ...o] : o, a = new Map(
|
|
1765
1671
|
r.map((u) => [
|
|
1766
1672
|
u.filterId,
|
|
1767
1673
|
u
|
|
@@ -1776,24 +1682,24 @@ function ko(e) {
|
|
|
1776
1682
|
effectiveFilterValue: f,
|
|
1777
1683
|
mappedFilterValue: (p = e.mappedFilterValuesByInputId) == null ? void 0 : p.get(u.inputId)
|
|
1778
1684
|
}] : [];
|
|
1779
|
-
})) || [], d =
|
|
1685
|
+
})) || [], d = eo({
|
|
1780
1686
|
inputs: c,
|
|
1781
|
-
temporalBinding:
|
|
1687
|
+
temporalBinding: s,
|
|
1782
1688
|
card: e.card
|
|
1783
1689
|
});
|
|
1784
1690
|
return {
|
|
1785
1691
|
cardFilterValues: r,
|
|
1786
|
-
resolvedPrimaryDateField:
|
|
1692
|
+
resolvedPrimaryDateField: s,
|
|
1787
1693
|
dateComparisonPlan: d
|
|
1788
1694
|
};
|
|
1789
1695
|
}
|
|
1790
|
-
function
|
|
1791
|
-
const t = j(e.filters), n =
|
|
1696
|
+
function gs(e) {
|
|
1697
|
+
const t = j(e.filters), n = rt(e), o = t ? e.filterValues.find(
|
|
1792
1698
|
(r) => r.filterId === t.id
|
|
1793
|
-
) : void 0,
|
|
1794
|
-
return !t || !o || !
|
|
1699
|
+
) : void 0, s = dt(e);
|
|
1700
|
+
return !t || !o || !me(o.operation) ? s : [
|
|
1795
1701
|
{
|
|
1796
|
-
...
|
|
1702
|
+
...at({
|
|
1797
1703
|
globalDateFilter: t,
|
|
1798
1704
|
globalDateFilterValue: o,
|
|
1799
1705
|
timezone: e.timezone,
|
|
@@ -1802,62 +1708,62 @@ function Ai(e) {
|
|
|
1802
1708
|
filterId: t.id,
|
|
1803
1709
|
name: t.title || t.column
|
|
1804
1710
|
},
|
|
1805
|
-
...
|
|
1711
|
+
...s
|
|
1806
1712
|
];
|
|
1807
1713
|
}
|
|
1808
|
-
class
|
|
1714
|
+
class uo extends Error {
|
|
1809
1715
|
}
|
|
1810
|
-
function
|
|
1811
|
-
const n = new Map((e ?
|
|
1716
|
+
function Cs(e, t) {
|
|
1717
|
+
const n = new Map((e ? B(e) : []).map(({ card: o }) => [o.id, o]));
|
|
1812
1718
|
return t && n.set(t.id, t), [...n.values()].flatMap((o) => {
|
|
1813
|
-
const
|
|
1814
|
-
return
|
|
1719
|
+
const s = Ge(o);
|
|
1720
|
+
return s.status === "ready" ? Zt(s.config.spec, o.controlBindings) : [];
|
|
1815
1721
|
});
|
|
1816
1722
|
}
|
|
1817
|
-
function
|
|
1818
|
-
const o =
|
|
1723
|
+
function fo(e, t, n) {
|
|
1724
|
+
const o = yn(e);
|
|
1819
1725
|
if (!o) throw new Error("Matrix card definition is required.");
|
|
1820
|
-
const
|
|
1726
|
+
const s = n && Yt({
|
|
1821
1727
|
...n,
|
|
1822
1728
|
spec: o.spec,
|
|
1823
1729
|
catalog: t.map((l) => ({ ...l, id: l.resolvedField.id }))
|
|
1824
|
-
}),
|
|
1825
|
-
const u = a(l,
|
|
1730
|
+
}), i = s ? { ...o, spec: s.spec } : o, r = Pt(t), a = wt(t), c = (l) => {
|
|
1731
|
+
const u = a(l, i.spec.source);
|
|
1826
1732
|
if (!(!u && l.derivedField)) {
|
|
1827
|
-
if (!u) throw new
|
|
1733
|
+
if (!u) throw new uo(`Matrix field metadata is unavailable: ${l.name}`);
|
|
1828
1734
|
return { ...u, ...l.derivedField ? { derivedField: l.derivedField } : {} };
|
|
1829
1735
|
}
|
|
1830
1736
|
}, d = {
|
|
1831
|
-
rows:
|
|
1737
|
+
rows: i.spec.rows.flatMap((l) => {
|
|
1832
1738
|
const u = c(l.field);
|
|
1833
1739
|
return u ? [{ ...u, id: l.id, granularity: l.grain, role: "groupby" }] : [];
|
|
1834
1740
|
}),
|
|
1835
|
-
columns:
|
|
1741
|
+
columns: i.spec.columns.flatMap((l) => {
|
|
1836
1742
|
const u = c(l.field);
|
|
1837
1743
|
return u ? [{ ...u, id: l.id, granularity: l.grain, role: "pivotby" }] : [];
|
|
1838
1744
|
}),
|
|
1839
1745
|
// Aggregate-stage expressions have no source-column filter target. They stay
|
|
1840
1746
|
// authoritative in matrix.spec, including all dependencies and controls.
|
|
1841
|
-
metrics:
|
|
1747
|
+
metrics: i.spec.measures.flatMap((l) => {
|
|
1842
1748
|
if (l.kind !== "aggregate" || l.field.name === "*") return [];
|
|
1843
1749
|
const u = c(l.field);
|
|
1844
1750
|
return u ? [{ ...u, id: l.id, aggregate: l.aggregate, role: "metric" }] : [];
|
|
1845
1751
|
})
|
|
1846
1752
|
};
|
|
1847
|
-
return { config:
|
|
1753
|
+
return { config: i, fields: d, resolveField: r };
|
|
1848
1754
|
}
|
|
1849
|
-
function
|
|
1755
|
+
function po(e) {
|
|
1850
1756
|
const t = e.filter(Boolean);
|
|
1851
1757
|
if (t.length !== 0)
|
|
1852
1758
|
return t.length === 1 ? t[0] : {
|
|
1853
|
-
id:
|
|
1759
|
+
id: Me(),
|
|
1854
1760
|
logicalOperator: "AND",
|
|
1855
1761
|
negate: !1,
|
|
1856
1762
|
conditions: [],
|
|
1857
1763
|
groups: t
|
|
1858
1764
|
};
|
|
1859
1765
|
}
|
|
1860
|
-
function
|
|
1766
|
+
function mo(e) {
|
|
1861
1767
|
if (!e) return;
|
|
1862
1768
|
const t = (n) => ({
|
|
1863
1769
|
logicalOperator: n.logicalOperator,
|
|
@@ -1875,14 +1781,14 @@ function xo(e) {
|
|
|
1875
1781
|
});
|
|
1876
1782
|
return JSON.stringify(t(e));
|
|
1877
1783
|
}
|
|
1878
|
-
function
|
|
1784
|
+
function Io(e, t) {
|
|
1879
1785
|
const n = e.metricColumns || [];
|
|
1880
1786
|
if (n.length === 0) return e;
|
|
1881
|
-
const o =
|
|
1787
|
+
const o = Et.includes(
|
|
1882
1788
|
t
|
|
1883
|
-
),
|
|
1789
|
+
), s = Rt.includes(
|
|
1884
1790
|
t
|
|
1885
|
-
),
|
|
1791
|
+
), i = (c) => {
|
|
1886
1792
|
var d;
|
|
1887
1793
|
return (d = c.parameters) != null && d.windowTransform ? {
|
|
1888
1794
|
...c,
|
|
@@ -1896,11 +1802,11 @@ function wo(e, t) {
|
|
|
1896
1802
|
const a = n.map(
|
|
1897
1803
|
(c) => {
|
|
1898
1804
|
var u;
|
|
1899
|
-
const d =
|
|
1805
|
+
const d = Jt(c);
|
|
1900
1806
|
if (d === "none")
|
|
1901
1807
|
return c;
|
|
1902
1808
|
let l = c;
|
|
1903
|
-
return (u = l.parameters) != null && u.windowTransform && (r = !0, l =
|
|
1809
|
+
return (u = l.parameters) != null && u.windowTransform && (r = !0, l = i(l)), o ? d === "target" && !s ? (r = !0, {
|
|
1904
1810
|
...l,
|
|
1905
1811
|
comparison: void 0
|
|
1906
1812
|
}) : l : (r = !0, { ...l, comparison: void 0 });
|
|
@@ -1911,42 +1817,42 @@ function wo(e, t) {
|
|
|
1911
1817
|
metricColumns: a
|
|
1912
1818
|
} : e;
|
|
1913
1819
|
}
|
|
1914
|
-
function
|
|
1915
|
-
return
|
|
1820
|
+
function vs(e, t = {}) {
|
|
1821
|
+
return ct(ut(e, t));
|
|
1916
1822
|
}
|
|
1917
|
-
function
|
|
1918
|
-
return
|
|
1823
|
+
function ct(e) {
|
|
1824
|
+
return po([e.authored, e.drill, e.selections]);
|
|
1919
1825
|
}
|
|
1920
|
-
function
|
|
1826
|
+
function ut(e, t = {}) {
|
|
1921
1827
|
return {
|
|
1922
|
-
authored: t.includeAuthoredFilters === !1 ? void 0 :
|
|
1923
|
-
drill:
|
|
1924
|
-
selections:
|
|
1828
|
+
authored: t.includeAuthoredFilters === !1 ? void 0 : Bt(e),
|
|
1829
|
+
drill: En(t.drill, e.id),
|
|
1830
|
+
selections: Vn(t.selections ?? [])
|
|
1925
1831
|
};
|
|
1926
1832
|
}
|
|
1927
|
-
function
|
|
1928
|
-
const o =
|
|
1929
|
-
return
|
|
1833
|
+
function bo(e, t, n) {
|
|
1834
|
+
const o = Pn(e, t);
|
|
1835
|
+
return Se(e) ? Io(
|
|
1930
1836
|
{ ...o, filters: n },
|
|
1931
1837
|
e.type
|
|
1932
1838
|
) : o;
|
|
1933
1839
|
}
|
|
1934
|
-
function
|
|
1935
|
-
const t =
|
|
1840
|
+
function ho(e) {
|
|
1841
|
+
const t = Xt(e);
|
|
1936
1842
|
return {
|
|
1937
1843
|
contextMode: t,
|
|
1938
1844
|
shouldApplyDashboardFilters: !t || t === "full"
|
|
1939
1845
|
};
|
|
1940
1846
|
}
|
|
1941
|
-
function
|
|
1847
|
+
function go(e) {
|
|
1942
1848
|
const t = e.dashboardControls || [], n = e.card.controls || [], o = /* @__PURE__ */ new Set([
|
|
1943
|
-
...t.map((
|
|
1944
|
-
...n.map((
|
|
1849
|
+
...t.map((s) => s.id),
|
|
1850
|
+
...n.map((s) => s.id)
|
|
1945
1851
|
]);
|
|
1946
|
-
return
|
|
1852
|
+
return ft(
|
|
1947
1853
|
e.card,
|
|
1948
1854
|
{
|
|
1949
|
-
controlValues:
|
|
1855
|
+
controlValues: Oe({
|
|
1950
1856
|
relevantControlIds: o,
|
|
1951
1857
|
dashboardValues: e.dashboardControlValues,
|
|
1952
1858
|
cardValues: e.cardControlValues
|
|
@@ -1958,17 +1864,17 @@ function Ro(e) {
|
|
|
1958
1864
|
e.presentationControlIds
|
|
1959
1865
|
);
|
|
1960
1866
|
}
|
|
1961
|
-
function
|
|
1962
|
-
const
|
|
1963
|
-
(f) => !
|
|
1964
|
-
),
|
|
1965
|
-
|
|
1867
|
+
function ft(e, t, n) {
|
|
1868
|
+
const s = t.controlBindings.filter(
|
|
1869
|
+
(f) => !Te(f)
|
|
1870
|
+
), i = new Set(
|
|
1871
|
+
en({
|
|
1966
1872
|
sql: e.sql,
|
|
1967
|
-
controlBindings:
|
|
1873
|
+
controlBindings: s
|
|
1968
1874
|
})
|
|
1969
1875
|
), r = new Set(
|
|
1970
1876
|
[...n].filter(
|
|
1971
|
-
(f) => !
|
|
1877
|
+
(f) => !i.has(f)
|
|
1972
1878
|
)
|
|
1973
1879
|
), a = t.controlDefinitions.filter(
|
|
1974
1880
|
(f) => !r.has(f.id)
|
|
@@ -1977,11 +1883,11 @@ function It(e, t, n) {
|
|
|
1977
1883
|
), d = /* @__PURE__ */ new Set([
|
|
1978
1884
|
...a.map((f) => f.id),
|
|
1979
1885
|
...c.map((f) => f.id)
|
|
1980
|
-
]), l =
|
|
1886
|
+
]), l = s.filter(
|
|
1981
1887
|
(f) => d.has(f.controlId)
|
|
1982
1888
|
);
|
|
1983
1889
|
return {
|
|
1984
|
-
controlValues:
|
|
1890
|
+
controlValues: Oe({
|
|
1985
1891
|
relevantControlIds: d,
|
|
1986
1892
|
dashboardValues: t.controlValues
|
|
1987
1893
|
}),
|
|
@@ -1990,13 +1896,13 @@ function It(e, t, n) {
|
|
|
1990
1896
|
controlBindings: l
|
|
1991
1897
|
};
|
|
1992
1898
|
}
|
|
1993
|
-
function
|
|
1899
|
+
function Co({
|
|
1994
1900
|
card: e,
|
|
1995
1901
|
dashboard: t,
|
|
1996
1902
|
transientContexts: n,
|
|
1997
1903
|
cardViewState: o,
|
|
1998
|
-
viewerTableSettings:
|
|
1999
|
-
adHocFilterValues:
|
|
1904
|
+
viewerTableSettings: s,
|
|
1905
|
+
adHocFilterValues: i,
|
|
2000
1906
|
selectedSheetId: r,
|
|
2001
1907
|
inlineFilterValuesMap: a,
|
|
2002
1908
|
dashboardControls: c,
|
|
@@ -2006,40 +1912,40 @@ function qo({
|
|
|
2006
1912
|
includeAuthoredFilters: f
|
|
2007
1913
|
}) {
|
|
2008
1914
|
var T;
|
|
2009
|
-
const p =
|
|
2010
|
-
for (const
|
|
2011
|
-
|
|
2012
|
-
const { shouldApplyDashboardFilters: m } =
|
|
1915
|
+
const p = tn(t);
|
|
1916
|
+
for (const V of e.controlBindings || [])
|
|
1917
|
+
Te(V) && p.add(V.controlId);
|
|
1918
|
+
const { shouldApplyDashboardFilters: m } = ho(n), I = u != null && u.inputs.length ? u : void 0, b = ut(e, {
|
|
2013
1919
|
includeAuthoredFilters: f,
|
|
2014
1920
|
// Blocked and skipped conditions are already projected away, so a
|
|
2015
1921
|
// selection can only ever narrow this card on its own fields. Carried
|
|
2016
1922
|
// selections are among them.
|
|
2017
1923
|
selections: ((u == null ? void 0 : u.selections) ?? []).filter(
|
|
2018
|
-
(
|
|
1924
|
+
(V) => V.status === "apply"
|
|
2019
1925
|
),
|
|
2020
1926
|
drill: o == null ? void 0 : o.drill
|
|
2021
|
-
}),
|
|
1927
|
+
}), D = ct(b), g = f === !1 ? nn(D, !0) : D, h = bo(
|
|
2022
1928
|
e,
|
|
2023
1929
|
o == null ? void 0 : o.drill,
|
|
2024
1930
|
g
|
|
2025
|
-
), v =
|
|
1931
|
+
), v = on({ ...e, config: h }, s) ?? h, C = sn(v, {
|
|
2026
1932
|
cardType: e.type,
|
|
2027
1933
|
dataSource: e.dataSource,
|
|
2028
|
-
temporalResultOwner:
|
|
2029
|
-
hasExecutableConfig:
|
|
1934
|
+
temporalResultOwner: xe({
|
|
1935
|
+
hasExecutableConfig: Pe(v, e.type),
|
|
2030
1936
|
sql: e.sql,
|
|
2031
|
-
normalizedPython:
|
|
1937
|
+
normalizedPython: we(e.python || "")
|
|
2032
1938
|
})
|
|
2033
|
-
}) || v, k =
|
|
1939
|
+
}) || v, k = mo(g) || "", H = I ? ft(
|
|
2034
1940
|
e,
|
|
2035
1941
|
{
|
|
2036
|
-
controlValues:
|
|
2037
|
-
controlDefinitions:
|
|
2038
|
-
cardControlDefinitions:
|
|
2039
|
-
controlBindings:
|
|
1942
|
+
controlValues: I.controlValues,
|
|
1943
|
+
controlDefinitions: I.controlDefinitions,
|
|
1944
|
+
cardControlDefinitions: I.cardControlDefinitions,
|
|
1945
|
+
controlBindings: I.controlBindings
|
|
2040
1946
|
},
|
|
2041
1947
|
p
|
|
2042
|
-
) :
|
|
1948
|
+
) : go({
|
|
2043
1949
|
card: e,
|
|
2044
1950
|
presentationControlIds: p,
|
|
2045
1951
|
dashboardControls: c,
|
|
@@ -2048,34 +1954,34 @@ function qo({
|
|
|
2048
1954
|
});
|
|
2049
1955
|
return {
|
|
2050
1956
|
filterCompilationInput: {
|
|
2051
|
-
adHocFilterValues:
|
|
1957
|
+
adHocFilterValues: i || [],
|
|
2052
1958
|
selectedSheetId: r,
|
|
2053
1959
|
inlineFilterValues: (a == null ? void 0 : a[e.id]) || [],
|
|
2054
1960
|
shouldApplyDashboardFilters: m,
|
|
2055
|
-
...
|
|
1961
|
+
...I ? {
|
|
2056
1962
|
dashboardInputContext: {
|
|
2057
|
-
inputs:
|
|
2058
|
-
resolvedInputs:
|
|
2059
|
-
activeFilters:
|
|
1963
|
+
inputs: I.inputs,
|
|
1964
|
+
resolvedInputs: I.resolvedInputs,
|
|
1965
|
+
activeFilters: I.activeFilters
|
|
2060
1966
|
}
|
|
2061
1967
|
} : {},
|
|
2062
|
-
...
|
|
2063
|
-
globalDateComparisonSelection:
|
|
1968
|
+
...I != null && I.globalDateComparisonSelection ? {
|
|
1969
|
+
globalDateComparisonSelection: I.globalDateComparisonSelection
|
|
2064
1970
|
} : {},
|
|
2065
|
-
...
|
|
2066
|
-
dateComparisonInputs:
|
|
1971
|
+
...I != null && I.dateComparisonInputs ? {
|
|
1972
|
+
dateComparisonInputs: I.dateComparisonInputs
|
|
2067
1973
|
} : {}
|
|
2068
1974
|
},
|
|
2069
1975
|
...H,
|
|
2070
1976
|
resolvedFilters: g,
|
|
2071
|
-
resolvedFilterParts:
|
|
2072
|
-
drillSteps: ((T = o == null ? void 0 : o.drill) == null ? void 0 : T.steps) ??
|
|
1977
|
+
resolvedFilterParts: b,
|
|
1978
|
+
drillSteps: ((T = o == null ? void 0 : o.drill) == null ? void 0 : T.steps) ?? Fn,
|
|
2073
1979
|
finalConfig: v,
|
|
2074
1980
|
queryRelevantConfig: C,
|
|
2075
1981
|
finalFiltersKey: k
|
|
2076
1982
|
};
|
|
2077
1983
|
}
|
|
2078
|
-
function
|
|
1984
|
+
function pt(e, t, n) {
|
|
2079
1985
|
var o;
|
|
2080
1986
|
if (t)
|
|
2081
1987
|
return {
|
|
@@ -2084,18 +1990,18 @@ function ht(e, t, n) {
|
|
|
2084
1990
|
...n ? { owner: n } : {}
|
|
2085
1991
|
};
|
|
2086
1992
|
}
|
|
2087
|
-
function
|
|
1993
|
+
function vo(e) {
|
|
2088
1994
|
if (e.resolution.status === "resolved")
|
|
2089
|
-
return
|
|
1995
|
+
return pt(
|
|
2090
1996
|
e.card,
|
|
2091
1997
|
e.resolution.resolvedOwner.selection,
|
|
2092
1998
|
e.resolution.resolvedOwner.owner
|
|
2093
1999
|
);
|
|
2094
2000
|
}
|
|
2095
|
-
function
|
|
2001
|
+
function Do(e) {
|
|
2096
2002
|
return `Set ${e.join(", ")} to run this card.`;
|
|
2097
2003
|
}
|
|
2098
|
-
function
|
|
2004
|
+
function yo({
|
|
2099
2005
|
dashboardInputContext: e,
|
|
2100
2006
|
shouldApplyDashboardFilters: t
|
|
2101
2007
|
}) {
|
|
@@ -2110,19 +2016,19 @@ function No({
|
|
|
2110
2016
|
(o) => n.has(o.filterId)
|
|
2111
2017
|
);
|
|
2112
2018
|
}
|
|
2113
|
-
function
|
|
2019
|
+
function So({
|
|
2114
2020
|
dashboardInputFilterValues: e,
|
|
2115
2021
|
adHocFilterValues: t
|
|
2116
2022
|
}) {
|
|
2117
2023
|
const n = [...e], o = new Set(
|
|
2118
|
-
n.map((
|
|
2024
|
+
n.map((s) => s.filterId)
|
|
2119
2025
|
);
|
|
2120
|
-
for (const
|
|
2121
|
-
o.has(
|
|
2026
|
+
for (const s of t)
|
|
2027
|
+
o.has(s.filterId) || (n.push(s), o.add(s.filterId));
|
|
2122
2028
|
return n;
|
|
2123
2029
|
}
|
|
2124
|
-
function
|
|
2125
|
-
const n = t.shouldApplyDashboardFilters ?
|
|
2030
|
+
function ee(e, t) {
|
|
2031
|
+
const n = t.shouldApplyDashboardFilters ? rn(t.adHocFilterValues, t.selectedSheetId) : [];
|
|
2126
2032
|
if (!t.dashboardInputContext)
|
|
2127
2033
|
return {
|
|
2128
2034
|
status: "ready",
|
|
@@ -2131,23 +2037,23 @@ function te(e, t) {
|
|
|
2131
2037
|
};
|
|
2132
2038
|
const o = t.dashboardInputContext.inputs.filter(
|
|
2133
2039
|
(l) => l.kind === "filter" && !!l.application
|
|
2134
|
-
), i = new Set(
|
|
2135
|
-
o.map((l) => l.filter.id)
|
|
2136
2040
|
), s = new Set(
|
|
2041
|
+
o.map((l) => l.filter.id)
|
|
2042
|
+
), i = new Set(
|
|
2137
2043
|
t.dashboardInputContext.inputs.flatMap(
|
|
2138
2044
|
(l) => {
|
|
2139
2045
|
var u;
|
|
2140
2046
|
return l.kind === "filter" && ((u = l.compatibility) == null ? void 0 : u.source) === "cardInlineFilter" ? [l.filter.id] : [];
|
|
2141
2047
|
}
|
|
2142
2048
|
)
|
|
2143
|
-
), r =
|
|
2049
|
+
), r = yo({
|
|
2144
2050
|
dashboardInputContext: t.dashboardInputContext,
|
|
2145
2051
|
shouldApplyDashboardFilters: t.shouldApplyDashboardFilters
|
|
2146
|
-
}).filter((l) => !
|
|
2147
|
-
(l) => !
|
|
2052
|
+
}).filter((l) => !s.has(l.filterId)), a = r.filter(
|
|
2053
|
+
(l) => !i.has(l.filterId)
|
|
2148
2054
|
), c = r.filter(
|
|
2149
|
-
(l) =>
|
|
2150
|
-
), d =
|
|
2055
|
+
(l) => i.has(l.filterId)
|
|
2056
|
+
), d = an({
|
|
2151
2057
|
card: e,
|
|
2152
2058
|
inputs: o,
|
|
2153
2059
|
resolvedInputs: t.dashboardInputContext.resolvedInputs,
|
|
@@ -2160,7 +2066,7 @@ function te(e, t) {
|
|
|
2160
2066
|
} : {
|
|
2161
2067
|
status: "ready",
|
|
2162
2068
|
filterValues: [
|
|
2163
|
-
...
|
|
2069
|
+
...So({
|
|
2164
2070
|
dashboardInputFilterValues: [
|
|
2165
2071
|
...a,
|
|
2166
2072
|
...d.filterValues
|
|
@@ -2172,34 +2078,34 @@ function te(e, t) {
|
|
|
2172
2078
|
mappingDispositions: d.dispositions
|
|
2173
2079
|
};
|
|
2174
2080
|
}
|
|
2175
|
-
function
|
|
2081
|
+
function Vo(e, t) {
|
|
2176
2082
|
const n = e.dashboardInputContext;
|
|
2177
2083
|
if (!n) return [];
|
|
2178
2084
|
const o = new Set(
|
|
2179
2085
|
t.flatMap(
|
|
2180
|
-
(
|
|
2086
|
+
(i) => i.status === "skip" && (i.reason === "explicitlyExcluded" || i.reason === "outsideScope") ? [i.inputId] : []
|
|
2181
2087
|
)
|
|
2182
|
-
),
|
|
2183
|
-
return n.resolvedInputs.flatMap((
|
|
2184
|
-
if (!
|
|
2185
|
-
const r =
|
|
2186
|
-
return r ? r.kind === "filter" && (!e.shouldApplyDashboardFilters && !Ee(r) || o.has(r.id)) ? [] : [
|
|
2088
|
+
), s = new Map(n.inputs.map((i) => [i.id, i]));
|
|
2089
|
+
return n.resolvedInputs.flatMap((i) => {
|
|
2090
|
+
if (!i.missingRequiredValue) return [];
|
|
2091
|
+
const r = s.get(i.id);
|
|
2092
|
+
return r ? r.kind === "filter" && (!e.shouldApplyDashboardFilters && !Ee(r) || o.has(r.id)) ? [] : [i.label] : [];
|
|
2187
2093
|
});
|
|
2188
2094
|
}
|
|
2189
|
-
function
|
|
2095
|
+
function Fo({
|
|
2190
2096
|
card: e,
|
|
2191
2097
|
cardConfig: t,
|
|
2192
2098
|
input: n,
|
|
2193
2099
|
resolvedPrimaryDateField: o,
|
|
2194
|
-
resolvedFields:
|
|
2195
|
-
semanticExecutionPayload:
|
|
2100
|
+
resolvedFields: s,
|
|
2101
|
+
semanticExecutionPayload: i,
|
|
2196
2102
|
timezone: r,
|
|
2197
2103
|
allowMinutePrecision: a
|
|
2198
2104
|
}) {
|
|
2199
|
-
var
|
|
2105
|
+
var I;
|
|
2200
2106
|
const c = n.dashboardInputContext ? n.dashboardInputContext.inputs.flatMap(
|
|
2201
|
-
(
|
|
2202
|
-
) : [], d =
|
|
2107
|
+
(b) => b.kind === "filter" ? [b.filter] : []
|
|
2108
|
+
) : [], d = ee(e, n), l = Vo(
|
|
2203
2109
|
n,
|
|
2204
2110
|
d.mappingDispositions
|
|
2205
2111
|
);
|
|
@@ -2219,28 +2125,28 @@ function _o({
|
|
|
2219
2125
|
mappingDispositions: d.mappingDispositions,
|
|
2220
2126
|
missingRequiredLabels: []
|
|
2221
2127
|
};
|
|
2222
|
-
const u =
|
|
2128
|
+
const u = co({
|
|
2223
2129
|
card: e,
|
|
2224
2130
|
cardConfig: t,
|
|
2225
2131
|
filters: c,
|
|
2226
2132
|
cardFilterValues: d.filterValues,
|
|
2227
2133
|
resolvedPrimaryDateField: o,
|
|
2228
|
-
resolvedFields:
|
|
2229
|
-
semanticExecutionPayload:
|
|
2134
|
+
resolvedFields: s,
|
|
2135
|
+
semanticExecutionPayload: i,
|
|
2230
2136
|
timezone: r,
|
|
2231
2137
|
allowMinutePrecision: a,
|
|
2232
2138
|
dateComparisonInputs: n.dateComparisonInputs,
|
|
2233
2139
|
mappedFilterValuesByInputId: new Map(
|
|
2234
2140
|
d.mappingDispositions.flatMap(
|
|
2235
|
-
(
|
|
2141
|
+
(b) => b.status === "apply" ? [[b.inputId, b.filterValue]] : []
|
|
2236
2142
|
)
|
|
2237
2143
|
)
|
|
2238
2144
|
}), f = j(c), p = !!(f && u.cardFilterValues.some(
|
|
2239
|
-
(
|
|
2240
|
-
)), m = u.resolvedPrimaryDateField && !((
|
|
2145
|
+
(b) => b.filterId === f.id
|
|
2146
|
+
)), m = u.resolvedPrimaryDateField && !((I = e.sql) != null && I.trim()) ? u.dateComparisonPlan.inputs.length ? vo({
|
|
2241
2147
|
card: e,
|
|
2242
2148
|
resolution: u.dateComparisonPlan.resolution
|
|
2243
|
-
}) : p ?
|
|
2149
|
+
}) : p ? pt(
|
|
2244
2150
|
e,
|
|
2245
2151
|
n.globalDateComparisonSelection
|
|
2246
2152
|
) : void 0 : void 0;
|
|
@@ -2252,8 +2158,8 @@ function _o({
|
|
|
2252
2158
|
mappingDispositions: d.mappingDispositions
|
|
2253
2159
|
};
|
|
2254
2160
|
}
|
|
2255
|
-
function
|
|
2256
|
-
const o =
|
|
2161
|
+
function mt(e, t, n) {
|
|
2162
|
+
const o = Fo({
|
|
2257
2163
|
resolvedFields: t.resolvedDateFields,
|
|
2258
2164
|
...n,
|
|
2259
2165
|
card: e,
|
|
@@ -2261,36 +2167,36 @@ function gt(e, t, n) {
|
|
|
2261
2167
|
input: t.filterCompilationInput
|
|
2262
2168
|
});
|
|
2263
2169
|
if (o.status === "blocked") return o;
|
|
2264
|
-
const { filterCompilationInput:
|
|
2170
|
+
const { filterCompilationInput: s, ...i } = t;
|
|
2265
2171
|
return { status: "ready", queryContext: {
|
|
2266
|
-
...
|
|
2172
|
+
...i,
|
|
2267
2173
|
cardFilterValues: o.cardFilterValues,
|
|
2268
2174
|
queryFilterDefinitions: o.queryFilterDefinitions,
|
|
2269
2175
|
resolvedPrimaryDateField: o.resolvedPrimaryDateField,
|
|
2270
2176
|
globalDateComparison: o.globalDateComparison,
|
|
2271
|
-
globalDateComparisonSelection:
|
|
2272
|
-
dateComparisonInputs:
|
|
2177
|
+
globalDateComparisonSelection: s.globalDateComparisonSelection,
|
|
2178
|
+
dateComparisonInputs: s.dateComparisonInputs
|
|
2273
2179
|
}, compiledFilters: o };
|
|
2274
2180
|
}
|
|
2275
|
-
function
|
|
2276
|
-
const o =
|
|
2181
|
+
function ko(e, t, n) {
|
|
2182
|
+
const o = qt(e), s = mt(e, t, {
|
|
2277
2183
|
resolvedPrimaryDateField: n.resolvedPrimaryDateField,
|
|
2278
2184
|
timezone: n.calendarContext.tz,
|
|
2279
2185
|
allowMinutePrecision: n.allowGlobalDateMinutePrecision
|
|
2280
2186
|
});
|
|
2281
|
-
if (
|
|
2282
|
-
return { ...
|
|
2283
|
-
const { compiledFilters:
|
|
2187
|
+
if (s.status === "blocked")
|
|
2188
|
+
return { ...s, tableConfig: o };
|
|
2189
|
+
const { compiledFilters: i } = s, {
|
|
2284
2190
|
cardFilterValues: r,
|
|
2285
2191
|
resolvedPrimaryDateField: a,
|
|
2286
2192
|
globalDateComparison: c
|
|
2287
|
-
} =
|
|
2193
|
+
} = i, { queryKey: d, queryInputIdentity: l, paginationConfig: u } = ln(
|
|
2288
2194
|
e,
|
|
2289
|
-
|
|
2195
|
+
s.queryContext,
|
|
2290
2196
|
n.calendarContext,
|
|
2291
2197
|
{ resolvePaginationConfig: n.resolvePaginationConfig }
|
|
2292
|
-
), f = t.queryRelevantConfig, p =
|
|
2293
|
-
hasExecutableConfig:
|
|
2198
|
+
), f = t.queryRelevantConfig, p = we(e.python || ""), m = xe({
|
|
2199
|
+
hasExecutableConfig: Pe(f, e.type),
|
|
2294
2200
|
sql: e.sql,
|
|
2295
2201
|
normalizedPython: p
|
|
2296
2202
|
});
|
|
@@ -2300,7 +2206,7 @@ function Go(e, t, n) {
|
|
|
2300
2206
|
queryInputIdentity: l,
|
|
2301
2207
|
paginationConfig: u,
|
|
2302
2208
|
tableConfig: o,
|
|
2303
|
-
compiledFilters:
|
|
2209
|
+
compiledFilters: i,
|
|
2304
2210
|
requestPayloadBase: {
|
|
2305
2211
|
cardId: e.id,
|
|
2306
2212
|
sql: (e == null ? void 0 : e.sql) || "",
|
|
@@ -2324,29 +2230,29 @@ function Go(e, t, n) {
|
|
|
2324
2230
|
}
|
|
2325
2231
|
};
|
|
2326
2232
|
}
|
|
2327
|
-
const
|
|
2328
|
-
function
|
|
2233
|
+
const ye = [], Mo = [], To = {};
|
|
2234
|
+
function Ds(e, t) {
|
|
2329
2235
|
return {
|
|
2330
2236
|
sheetId: e.sheetId,
|
|
2331
2237
|
sectionId: e.sectionId,
|
|
2332
|
-
documentFilterValues: e.documentFilterValues ??
|
|
2333
|
-
documentControlDefinitions: e.documentControlDefinitions ??
|
|
2334
|
-
documentControlValues: e.documentControlValues ??
|
|
2335
|
-
editorFilterValues: t ??
|
|
2238
|
+
documentFilterValues: e.documentFilterValues ?? ye,
|
|
2239
|
+
documentControlDefinitions: e.documentControlDefinitions ?? Mo,
|
|
2240
|
+
documentControlValues: e.documentControlValues ?? To,
|
|
2241
|
+
editorFilterValues: t ?? ye
|
|
2336
2242
|
};
|
|
2337
2243
|
}
|
|
2338
|
-
function
|
|
2244
|
+
function Oo({
|
|
2339
2245
|
card: e,
|
|
2340
2246
|
dashboard: t,
|
|
2341
2247
|
runtime: n,
|
|
2342
2248
|
dashboardRuntimeValues: o,
|
|
2343
|
-
calendar:
|
|
2249
|
+
calendar: s
|
|
2344
2250
|
}) {
|
|
2345
|
-
const
|
|
2251
|
+
const i = je({
|
|
2346
2252
|
dashboard: t,
|
|
2347
2253
|
dashboardInputValues: o.dashboardInputValues,
|
|
2348
2254
|
transientContexts: void 0
|
|
2349
|
-
}) ?
|
|
2255
|
+
}) ? re({
|
|
2350
2256
|
transientContexts: void 0,
|
|
2351
2257
|
dashboard: t,
|
|
2352
2258
|
sheetId: n.sheetId,
|
|
@@ -2357,13 +2263,13 @@ function Ko({
|
|
|
2357
2263
|
...o,
|
|
2358
2264
|
dashboardInputValues: n.documentDashboardInputValues || o.dashboardInputValues
|
|
2359
2265
|
},
|
|
2360
|
-
calendar:
|
|
2361
|
-
}) : void 0, r =
|
|
2266
|
+
calendar: s
|
|
2267
|
+
}) : void 0, r = i && (i.inputs.length > 0 || i.selections.length > 0) ? i : void 0, a = !!(i != null && i.inputs.length), c = [
|
|
2362
2268
|
...n.editorFilterValues || [],
|
|
2363
2269
|
...n.documentFilterValues
|
|
2364
2270
|
];
|
|
2365
2271
|
return {
|
|
2366
|
-
card: a ? e :
|
|
2272
|
+
card: a ? e : xo(
|
|
2367
2273
|
e,
|
|
2368
2274
|
n.documentControlDefinitions
|
|
2369
2275
|
),
|
|
@@ -2381,7 +2287,7 @@ function Ko({
|
|
|
2381
2287
|
dashboardInputContext: r
|
|
2382
2288
|
};
|
|
2383
2289
|
}
|
|
2384
|
-
function
|
|
2290
|
+
function xo(e, t) {
|
|
2385
2291
|
if (t.length === 0)
|
|
2386
2292
|
return e;
|
|
2387
2293
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -2394,22 +2300,22 @@ function Qo(e, t) {
|
|
|
2394
2300
|
controls: Array.from(n.values())
|
|
2395
2301
|
};
|
|
2396
2302
|
}
|
|
2397
|
-
function
|
|
2303
|
+
function ys({
|
|
2398
2304
|
card: e,
|
|
2399
2305
|
place: t,
|
|
2400
2306
|
source: n
|
|
2401
2307
|
}) {
|
|
2402
|
-
const o =
|
|
2308
|
+
const o = te(e, t, n);
|
|
2403
2309
|
return {
|
|
2404
2310
|
card: o.card,
|
|
2405
2311
|
context: o.context,
|
|
2406
2312
|
inputContext: o.inputContext
|
|
2407
2313
|
};
|
|
2408
2314
|
}
|
|
2409
|
-
function
|
|
2315
|
+
function Po(e, t, n) {
|
|
2410
2316
|
return {
|
|
2411
|
-
calendarContext: n ??
|
|
2412
|
-
allowGlobalDateMinutePrecision:
|
|
2317
|
+
calendarContext: n ?? Sn,
|
|
2318
|
+
allowGlobalDateMinutePrecision: ie(
|
|
2413
2319
|
e,
|
|
2414
2320
|
t
|
|
2415
2321
|
).allEligibleTargetsAreDateTime,
|
|
@@ -2417,17 +2323,17 @@ function $o(e, t, n) {
|
|
|
2417
2323
|
globalCacheConfig: e.globalCacheConfig
|
|
2418
2324
|
};
|
|
2419
2325
|
}
|
|
2420
|
-
function
|
|
2421
|
-
return
|
|
2326
|
+
function Ss(e, t) {
|
|
2327
|
+
return bt(
|
|
2422
2328
|
e,
|
|
2423
2329
|
t,
|
|
2424
2330
|
t.allowGlobalDateMinutePrecision
|
|
2425
2331
|
);
|
|
2426
2332
|
}
|
|
2427
|
-
function
|
|
2428
|
-
const o =
|
|
2333
|
+
function wo(e, t, n = {}) {
|
|
2334
|
+
const o = It(e, t);
|
|
2429
2335
|
return {
|
|
2430
|
-
...
|
|
2336
|
+
...ko(e.card, e.context, {
|
|
2431
2337
|
resolvedPrimaryDateField: o,
|
|
2432
2338
|
calendarContext: t.calendarContext,
|
|
2433
2339
|
allowGlobalDateMinutePrecision: t.allowGlobalDateMinutePrecision,
|
|
@@ -2437,75 +2343,75 @@ function Uo(e, t, n = {}) {
|
|
|
2437
2343
|
resolvedPrimaryDateField: o
|
|
2438
2344
|
};
|
|
2439
2345
|
}
|
|
2440
|
-
function
|
|
2346
|
+
function Eo({
|
|
2441
2347
|
card: e,
|
|
2442
2348
|
place: t,
|
|
2443
2349
|
source: n,
|
|
2444
2350
|
semanticExecutionPayload: o,
|
|
2445
|
-
matrixCatalog:
|
|
2446
|
-
withRequest:
|
|
2351
|
+
matrixCatalog: s,
|
|
2352
|
+
withRequest: i = !1
|
|
2447
2353
|
}) {
|
|
2448
|
-
var
|
|
2449
|
-
const { dashboard: r } = n, a = e.id, c = (
|
|
2354
|
+
var I, b;
|
|
2355
|
+
const { dashboard: r } = n, a = e.id, c = (D, g) => {
|
|
2450
2356
|
var v;
|
|
2451
2357
|
let h;
|
|
2452
2358
|
try {
|
|
2453
|
-
const C =
|
|
2359
|
+
const C = Ge(D);
|
|
2454
2360
|
if (C.status === "invalid") throw C.error;
|
|
2455
|
-
const k =
|
|
2456
|
-
|
|
2361
|
+
const k = te(
|
|
2362
|
+
D,
|
|
2457
2363
|
g,
|
|
2458
2364
|
n,
|
|
2459
2365
|
C.status === "absent"
|
|
2460
2366
|
);
|
|
2461
2367
|
if (h = k.context, C.status === "absent")
|
|
2462
2368
|
return { status: "ready", value: { assembled: k } };
|
|
2463
|
-
if (!
|
|
2369
|
+
if (!s)
|
|
2464
2370
|
return {
|
|
2465
2371
|
status: "blocked",
|
|
2466
2372
|
reason: "metadata",
|
|
2467
2373
|
message: "Matrix field metadata is required.",
|
|
2468
2374
|
context: h
|
|
2469
2375
|
};
|
|
2470
|
-
const H = un(C.config.spec, h), T =
|
|
2471
|
-
(
|
|
2472
|
-
(O) =>
|
|
2376
|
+
const H = un(C.config.spec, h), T = s.filter(
|
|
2377
|
+
(y) => y.field.source && H.some(
|
|
2378
|
+
(O) => bn(O, y.field.source)
|
|
2473
2379
|
)
|
|
2474
|
-
),
|
|
2475
|
-
|
|
2476
|
-
...
|
|
2380
|
+
), V = fo(D, T, h), { params: w } = k, x = w.dashboardInputContext;
|
|
2381
|
+
V.config = {
|
|
2382
|
+
...V.config,
|
|
2477
2383
|
presentation: fn(
|
|
2478
|
-
|
|
2479
|
-
|
|
2384
|
+
D,
|
|
2385
|
+
V.config,
|
|
2480
2386
|
{
|
|
2481
2387
|
controls: x ? [
|
|
2482
2388
|
...x.controlDefinitions,
|
|
2483
2389
|
...x.cardControlDefinitions
|
|
2484
2390
|
] : [
|
|
2485
|
-
...
|
|
2486
|
-
...
|
|
2391
|
+
...w.dashboardControls ?? r.controls ?? [],
|
|
2392
|
+
...w.card.controls ?? []
|
|
2487
2393
|
],
|
|
2488
2394
|
values: (x == null ? void 0 : x.controlValues) ?? {
|
|
2489
|
-
...
|
|
2490
|
-
...(v =
|
|
2395
|
+
...w.dashboardControlValues,
|
|
2396
|
+
...(v = w.cardControlValuesMap) == null ? void 0 : v[D.id]
|
|
2491
2397
|
}
|
|
2492
2398
|
},
|
|
2493
2399
|
T
|
|
2494
2400
|
)
|
|
2495
2401
|
};
|
|
2496
|
-
const
|
|
2497
|
-
...
|
|
2498
|
-
config: { matrix:
|
|
2499
|
-
},
|
|
2402
|
+
const q = {
|
|
2403
|
+
...D,
|
|
2404
|
+
config: { matrix: V.config }
|
|
2405
|
+
}, S = te(q, g, n, !1);
|
|
2500
2406
|
return {
|
|
2501
2407
|
status: "ready",
|
|
2502
2408
|
value: {
|
|
2503
2409
|
assembled: {
|
|
2504
|
-
card:
|
|
2505
|
-
context: { ...
|
|
2506
|
-
inputContext:
|
|
2410
|
+
card: q,
|
|
2411
|
+
context: { ...S.context, resolvedDateFields: V.fields },
|
|
2412
|
+
inputContext: S.inputContext
|
|
2507
2413
|
},
|
|
2508
|
-
matrix:
|
|
2414
|
+
matrix: V
|
|
2509
2415
|
}
|
|
2510
2416
|
};
|
|
2511
2417
|
} catch (C) {
|
|
@@ -2526,74 +2432,74 @@ function Wo({
|
|
|
2526
2432
|
missingRequiredLabels: [],
|
|
2527
2433
|
message: d.message
|
|
2528
2434
|
};
|
|
2529
|
-
const { assembled: l, matrix: u } = d.value, f =
|
|
2435
|
+
const { assembled: l, matrix: u } = d.value, f = Po(
|
|
2530
2436
|
r,
|
|
2531
2437
|
o,
|
|
2532
2438
|
n.calendar
|
|
2533
|
-
), p = l.context.filterCompilationInput, m =
|
|
2439
|
+
), p = l.context.filterCompilationInput, m = At(r);
|
|
2534
2440
|
try {
|
|
2535
|
-
const
|
|
2441
|
+
const D = ee(l.card, p), g = u && m && D.status === "ready" && D.filterValues.some((k) => k.filterId === m.id);
|
|
2536
2442
|
let h = f.allowGlobalDateMinutePrecision;
|
|
2537
2443
|
if (g) {
|
|
2538
|
-
const k = (
|
|
2539
|
-
(
|
|
2540
|
-
), T =
|
|
2541
|
-
({ card:
|
|
2542
|
-
cardId:
|
|
2543
|
-
sheetId:
|
|
2544
|
-
sheetKind:
|
|
2444
|
+
const k = (I = p.dashboardInputContext) == null ? void 0 : I.inputs.find(
|
|
2445
|
+
(S) => S.kind === "filter" && S.filter.id === m.id
|
|
2446
|
+
), T = Nt(r, m).filter(
|
|
2447
|
+
({ card: S, sheet: y }) => !k || W(k, {
|
|
2448
|
+
cardId: S.id,
|
|
2449
|
+
sheetId: y.id,
|
|
2450
|
+
sheetKind: Re(y) ? "document" : "dashboard"
|
|
2545
2451
|
})
|
|
2546
|
-
).map(({ card:
|
|
2547
|
-
card:
|
|
2548
|
-
value:
|
|
2549
|
-
})),
|
|
2550
|
-
T.map(({ card:
|
|
2551
|
-
|
|
2552
|
-
|
|
2452
|
+
).map(({ card: S, sheet: y }) => ({
|
|
2453
|
+
card: S,
|
|
2454
|
+
value: S.id === a ? d : c(S, { kind: "sheet", sheetId: y.id })
|
|
2455
|
+
})), V = new Map(
|
|
2456
|
+
T.map(({ card: S, value: y }) => [
|
|
2457
|
+
S.id,
|
|
2458
|
+
y.status === "ready" ? y.value.assembled.card : null
|
|
2553
2459
|
])
|
|
2554
|
-
),
|
|
2555
|
-
T.map(({ card:
|
|
2460
|
+
), w = new Map(
|
|
2461
|
+
T.map(({ card: S, value: y }) => {
|
|
2556
2462
|
var O;
|
|
2557
2463
|
return [
|
|
2558
|
-
|
|
2559
|
-
|
|
2464
|
+
S.id,
|
|
2465
|
+
y.status === "ready" ? (O = y.value.matrix) == null ? void 0 : O.fields : void 0
|
|
2560
2466
|
];
|
|
2561
2467
|
})
|
|
2562
2468
|
), x = T.flatMap(
|
|
2563
|
-
({ card:
|
|
2564
|
-
const O =
|
|
2565
|
-
if (!
|
|
2566
|
-
const
|
|
2469
|
+
({ card: S, value: y }) => {
|
|
2470
|
+
const O = S.id, Ie = y.status === "ready" ? y.value.assembled.context : y.context;
|
|
2471
|
+
if (!Ie) return [O];
|
|
2472
|
+
const gt = y.status === "ready" ? y.value.assembled.card : S;
|
|
2567
2473
|
try {
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2570
|
-
|
|
2474
|
+
const be = ee(
|
|
2475
|
+
gt,
|
|
2476
|
+
Ie.filterCompilationInput
|
|
2571
2477
|
);
|
|
2572
|
-
return
|
|
2478
|
+
return be.status === "blocked" || be.filterValues.some((Ct) => Ct.filterId === m.id) ? [O] : [];
|
|
2573
2479
|
} catch {
|
|
2574
|
-
return
|
|
2480
|
+
return V.set(O, null), [O];
|
|
2575
2481
|
}
|
|
2576
2482
|
}
|
|
2577
|
-
),
|
|
2483
|
+
), q = ie(
|
|
2578
2484
|
r,
|
|
2579
2485
|
o,
|
|
2580
2486
|
m,
|
|
2581
|
-
|
|
2582
|
-
|
|
2487
|
+
V,
|
|
2488
|
+
w,
|
|
2583
2489
|
x
|
|
2584
2490
|
);
|
|
2585
|
-
if ((
|
|
2491
|
+
if ((b = q.unresolvedCardIds) != null && b.length)
|
|
2586
2492
|
return {
|
|
2587
2493
|
status: "blocked",
|
|
2588
2494
|
cardId: a,
|
|
2589
2495
|
mappingDispositions: [],
|
|
2590
2496
|
reason: "coverage",
|
|
2591
2497
|
missingRequiredLabels: [],
|
|
2592
|
-
message: `Date precision requires field metadata and valid inputs for: ${
|
|
2498
|
+
message: `Date precision requires field metadata and valid inputs for: ${q.unresolvedCardIds.join(", ")}.`
|
|
2593
2499
|
};
|
|
2594
|
-
h =
|
|
2500
|
+
h = q.allEligibleTargetsAreDateTime;
|
|
2595
2501
|
}
|
|
2596
|
-
const v =
|
|
2502
|
+
const v = bt(l, f, h);
|
|
2597
2503
|
if (v.status === "blocked")
|
|
2598
2504
|
return {
|
|
2599
2505
|
status: "blocked",
|
|
@@ -2601,9 +2507,9 @@ function Wo({
|
|
|
2601
2507
|
mappingDispositions: v.mappingDispositions,
|
|
2602
2508
|
reason: v.reason,
|
|
2603
2509
|
missingRequiredLabels: v.missingRequiredLabels,
|
|
2604
|
-
...v.reason === "requiredInput" ? { message:
|
|
2510
|
+
...v.reason === "requiredInput" ? { message: Do(v.missingRequiredLabels) } : {}
|
|
2605
2511
|
};
|
|
2606
|
-
const C =
|
|
2512
|
+
const C = i && !u ? wo(l, f) : void 0;
|
|
2607
2513
|
return {
|
|
2608
2514
|
...v,
|
|
2609
2515
|
...u ? { matrix: u } : {},
|
|
@@ -2622,18 +2528,18 @@ function Wo({
|
|
|
2622
2528
|
}
|
|
2623
2529
|
} : {}
|
|
2624
2530
|
};
|
|
2625
|
-
} catch (
|
|
2531
|
+
} catch (D) {
|
|
2626
2532
|
return {
|
|
2627
2533
|
status: "blocked",
|
|
2628
2534
|
cardId: a,
|
|
2629
2535
|
mappingDispositions: [],
|
|
2630
2536
|
reason: "configuration",
|
|
2631
2537
|
missingRequiredLabels: [],
|
|
2632
|
-
message:
|
|
2538
|
+
message: D instanceof Error ? D.message : "Card filter configuration is invalid."
|
|
2633
2539
|
};
|
|
2634
2540
|
}
|
|
2635
2541
|
}
|
|
2636
|
-
function
|
|
2542
|
+
function Ro(e) {
|
|
2637
2543
|
const t = e.editor ? {
|
|
2638
2544
|
...e.inlineFilterValuesMap,
|
|
2639
2545
|
...Object.fromEntries(
|
|
@@ -2650,34 +2556,34 @@ function Yo(e) {
|
|
|
2650
2556
|
cardControlValuesMap: e.cardControlValuesMap
|
|
2651
2557
|
};
|
|
2652
2558
|
}
|
|
2653
|
-
function
|
|
2654
|
-
const { dashboard:
|
|
2655
|
-
...
|
|
2559
|
+
function te(e, t, n, o) {
|
|
2560
|
+
const { dashboard: s } = n, i = Ro(n), r = t.kind === "documentSection" ? {
|
|
2561
|
+
...Oo({
|
|
2656
2562
|
card: e,
|
|
2657
|
-
dashboard:
|
|
2563
|
+
dashboard: s,
|
|
2658
2564
|
runtime: t.section,
|
|
2659
|
-
dashboardRuntimeValues:
|
|
2565
|
+
dashboardRuntimeValues: i,
|
|
2660
2566
|
calendar: n.calendar
|
|
2661
2567
|
}),
|
|
2662
2568
|
selectedSheetId: t.section.sheetId,
|
|
2663
2569
|
includeAuthoredFilters: o
|
|
2664
|
-
} :
|
|
2570
|
+
} : Bo(e, t.sheetId, n, i, o);
|
|
2665
2571
|
return {
|
|
2666
2572
|
card: r.card,
|
|
2667
2573
|
params: r,
|
|
2668
|
-
context:
|
|
2574
|
+
context: Co(r),
|
|
2669
2575
|
inputContext: r.dashboardInputContext
|
|
2670
2576
|
};
|
|
2671
2577
|
}
|
|
2672
|
-
function
|
|
2578
|
+
function Bo(e, t, n, o, s) {
|
|
2673
2579
|
var c, d;
|
|
2674
|
-
const { dashboard:
|
|
2675
|
-
dashboard:
|
|
2580
|
+
const { dashboard: i, transientContexts: r } = n, a = je({
|
|
2581
|
+
dashboard: i,
|
|
2676
2582
|
dashboardInputValues: o.dashboardInputValues,
|
|
2677
2583
|
transientContexts: r
|
|
2678
|
-
}) ?
|
|
2584
|
+
}) ? re({
|
|
2679
2585
|
transientContexts: r,
|
|
2680
|
-
dashboard:
|
|
2586
|
+
dashboard: i,
|
|
2681
2587
|
sheetId: t,
|
|
2682
2588
|
card: e,
|
|
2683
2589
|
runtimeValues: o,
|
|
@@ -2685,68 +2591,68 @@ function Zo(e, t, n, o, i) {
|
|
|
2685
2591
|
}) : void 0;
|
|
2686
2592
|
return {
|
|
2687
2593
|
card: e,
|
|
2688
|
-
dashboard:
|
|
2594
|
+
dashboard: i,
|
|
2689
2595
|
transientContexts: r,
|
|
2690
2596
|
cardViewState: (c = n.cardViewStates) == null ? void 0 : c[e.id],
|
|
2691
2597
|
viewerTableSettings: n.editor || (d = n.viewerTableSettings) == null ? void 0 : d[e.id],
|
|
2692
2598
|
adHocFilterValues: o.adHocFilterValues,
|
|
2693
2599
|
selectedSheetId: t,
|
|
2694
2600
|
inlineFilterValuesMap: o.inlineFilterValuesMap,
|
|
2695
|
-
dashboardControls:
|
|
2601
|
+
dashboardControls: i.controls,
|
|
2696
2602
|
dashboardControlValues: o.controlValues,
|
|
2697
2603
|
cardControlValuesMap: o.cardControlValuesMap,
|
|
2698
2604
|
// Keep a selection-only context so the query has one resolved-input contract.
|
|
2699
2605
|
dashboardInputContext: a && (a.inputs.length > 0 || a.selections.length > 0) ? a : void 0,
|
|
2700
|
-
includeAuthoredFilters:
|
|
2606
|
+
includeAuthoredFilters: s
|
|
2701
2607
|
};
|
|
2702
2608
|
}
|
|
2703
|
-
function
|
|
2704
|
-
return
|
|
2609
|
+
function It({ card: e, context: t }, n) {
|
|
2610
|
+
return ke({
|
|
2705
2611
|
card: e,
|
|
2706
2612
|
cardConfig: t.queryRelevantConfig,
|
|
2707
2613
|
resolvedFields: t.resolvedDateFields,
|
|
2708
2614
|
semanticExecutionPayload: n.semanticExecutionPayload
|
|
2709
2615
|
});
|
|
2710
2616
|
}
|
|
2711
|
-
function
|
|
2712
|
-
const { card: o } = e,
|
|
2713
|
-
resolvedPrimaryDateField:
|
|
2617
|
+
function bt(e, t, n) {
|
|
2618
|
+
const { card: o } = e, s = It(e, t), i = mt(o, e.context, {
|
|
2619
|
+
resolvedPrimaryDateField: s,
|
|
2714
2620
|
timezone: t.calendarContext.tz,
|
|
2715
2621
|
allowMinutePrecision: n
|
|
2716
2622
|
});
|
|
2717
|
-
return
|
|
2623
|
+
return i.status === "blocked" ? { ...i, card: o, resolvedPrimaryDateField: s } : {
|
|
2718
2624
|
status: "ready",
|
|
2719
2625
|
card: o,
|
|
2720
|
-
queryContext:
|
|
2721
|
-
compiledFilters:
|
|
2722
|
-
resolvedPrimaryDateField:
|
|
2626
|
+
queryContext: i.queryContext,
|
|
2627
|
+
compiledFilters: i.compiledFilters,
|
|
2628
|
+
resolvedPrimaryDateField: s
|
|
2723
2629
|
};
|
|
2724
2630
|
}
|
|
2725
|
-
function
|
|
2631
|
+
function Vs({
|
|
2726
2632
|
dashboard: e,
|
|
2727
2633
|
dashboardInputValues: t,
|
|
2728
2634
|
adHocFilterValues: n,
|
|
2729
2635
|
calendar: o,
|
|
2730
|
-
selectedSheetId:
|
|
2731
|
-
sheetSelection:
|
|
2636
|
+
selectedSheetId: s,
|
|
2637
|
+
sheetSelection: i = "current",
|
|
2732
2638
|
dashboardControlValues: r,
|
|
2733
2639
|
cardControlValuesMap: a,
|
|
2734
2640
|
semanticExecutionPayload: c,
|
|
2735
2641
|
timezone: d
|
|
2736
2642
|
}) {
|
|
2737
|
-
const l = e ? [...Be(e)] : void 0, u =
|
|
2643
|
+
const l = e ? [...Be(e)] : void 0, u = s ?? null, f = (g) => {
|
|
2738
2644
|
var h;
|
|
2739
2645
|
return e ? pn({
|
|
2740
2646
|
dashboard: e,
|
|
2741
2647
|
runtimeValues: { dashboardInputValues: t },
|
|
2742
2648
|
adHocFilterValues: n,
|
|
2743
2649
|
sheetId: g,
|
|
2744
|
-
sheetKind:
|
|
2650
|
+
sheetKind: Re(
|
|
2745
2651
|
(h = e.sheets) == null ? void 0 : h.find((v) => v.id === g)
|
|
2746
2652
|
) ? "document" : "dashboard",
|
|
2747
2653
|
calendar: o
|
|
2748
2654
|
}) : [];
|
|
2749
|
-
}, p =
|
|
2655
|
+
}, p = i === "all" ? Array.from(
|
|
2750
2656
|
new Map(
|
|
2751
2657
|
((e == null ? void 0 : e.sheets) || []).flatMap(
|
|
2752
2658
|
(g) => f(g.id).map(
|
|
@@ -2756,34 +2662,34 @@ function Li({
|
|
|
2756
2662
|
).values()
|
|
2757
2663
|
) : f(u), m = {
|
|
2758
2664
|
...r || {}
|
|
2759
|
-
},
|
|
2665
|
+
}, I = i === "all" ? B({ sheets: (e == null ? void 0 : e.sheets) || [] }) : u ? B({ sheets: (e == null ? void 0 : e.sheets) || [] }).filter(
|
|
2760
2666
|
(g) => g.sheet.id === u
|
|
2761
2667
|
) : [];
|
|
2762
|
-
for (const g of
|
|
2668
|
+
for (const g of I)
|
|
2763
2669
|
Object.assign(m, (a == null ? void 0 : a[g.card.id]) || {});
|
|
2764
|
-
const
|
|
2670
|
+
const b = jt({
|
|
2765
2671
|
filterDefinitions: l,
|
|
2766
2672
|
filterValues: p
|
|
2767
|
-
}),
|
|
2673
|
+
}), D = io({
|
|
2768
2674
|
filters: l,
|
|
2769
|
-
filterValues:
|
|
2675
|
+
filterValues: b,
|
|
2770
2676
|
dashboard: e,
|
|
2771
2677
|
semanticExecutionPayload: c,
|
|
2772
2678
|
timezone: d
|
|
2773
2679
|
});
|
|
2774
2680
|
return {
|
|
2775
2681
|
selectedSheetId: u,
|
|
2776
|
-
filterValues:
|
|
2682
|
+
filterValues: D,
|
|
2777
2683
|
controlValues: m
|
|
2778
2684
|
};
|
|
2779
2685
|
}
|
|
2780
|
-
function
|
|
2686
|
+
function Fs({
|
|
2781
2687
|
dashboard: e,
|
|
2782
2688
|
cardId: t,
|
|
2783
2689
|
transientContexts: n,
|
|
2784
2690
|
cardViewStates: o,
|
|
2785
|
-
viewerTableSettings:
|
|
2786
|
-
semanticExecutionPayload:
|
|
2691
|
+
viewerTableSettings: s,
|
|
2692
|
+
semanticExecutionPayload: i,
|
|
2787
2693
|
adHocFilterValues: r,
|
|
2788
2694
|
inlineFilterValuesMap: a,
|
|
2789
2695
|
dashboardControlValues: c,
|
|
@@ -2793,20 +2699,20 @@ function Hi({
|
|
|
2793
2699
|
matrixCatalog: f,
|
|
2794
2700
|
cardOverride: p,
|
|
2795
2701
|
sheetId: m,
|
|
2796
|
-
documentSection:
|
|
2797
|
-
editor:
|
|
2798
|
-
withRequest:
|
|
2702
|
+
documentSection: I,
|
|
2703
|
+
editor: b,
|
|
2704
|
+
withRequest: D
|
|
2799
2705
|
}) {
|
|
2800
2706
|
var v;
|
|
2801
2707
|
if (!e)
|
|
2802
2708
|
return null;
|
|
2803
|
-
p && !
|
|
2804
|
-
const g =
|
|
2709
|
+
p && !X(e, t) && m && (e = { ...e, sheets: (v = e.sheets) == null ? void 0 : v.map((C) => C.id === m ? { ...C, cards: [...C.cards ?? [], p] } : C) });
|
|
2710
|
+
const g = X(e, t);
|
|
2805
2711
|
if (!g)
|
|
2806
2712
|
return null;
|
|
2807
|
-
const h =
|
|
2713
|
+
const h = Eo({
|
|
2808
2714
|
card: p ?? g.card,
|
|
2809
|
-
place:
|
|
2715
|
+
place: I ? { kind: "documentSection", section: I } : { kind: "sheet", sheetId: g.sheet.id },
|
|
2810
2716
|
source: {
|
|
2811
2717
|
dashboard: e,
|
|
2812
2718
|
adHocFilterValues: r,
|
|
@@ -2820,13 +2726,13 @@ function Hi({
|
|
|
2820
2726
|
dashboardInputValues: l,
|
|
2821
2727
|
transientContexts: n,
|
|
2822
2728
|
cardViewStates: o,
|
|
2823
|
-
viewerTableSettings:
|
|
2729
|
+
viewerTableSettings: s,
|
|
2824
2730
|
calendar: u,
|
|
2825
|
-
...
|
|
2731
|
+
...b ? { editor: b } : {}
|
|
2826
2732
|
},
|
|
2827
|
-
semanticExecutionPayload:
|
|
2733
|
+
semanticExecutionPayload: i,
|
|
2828
2734
|
matrixCatalog: f,
|
|
2829
|
-
withRequest:
|
|
2735
|
+
withRequest: D
|
|
2830
2736
|
});
|
|
2831
2737
|
return h.status === "blocked" ? h : {
|
|
2832
2738
|
status: "ready",
|
|
@@ -2837,31 +2743,31 @@ function Hi({
|
|
|
2837
2743
|
...h.request ? { request: h.request } : {}
|
|
2838
2744
|
};
|
|
2839
2745
|
}
|
|
2840
|
-
function
|
|
2841
|
-
const n =
|
|
2746
|
+
function qo(e, t) {
|
|
2747
|
+
const n = zt({
|
|
2842
2748
|
inputs: e.inputs,
|
|
2843
2749
|
dashboardFilters: [...Be(e)]
|
|
2844
|
-
}), o =
|
|
2750
|
+
}), o = ht(e, t);
|
|
2845
2751
|
return n.filter(
|
|
2846
|
-
(
|
|
2752
|
+
(s) => W(s, { sheetId: t, sheetKind: "document" }) || s.kind === "filter" && (s.runtimeScope === "shared" || s.runtimeScope === "perSheet") && qe(s, o)
|
|
2847
2753
|
);
|
|
2848
2754
|
}
|
|
2849
|
-
function
|
|
2755
|
+
function ht(e, t) {
|
|
2850
2756
|
return {
|
|
2851
|
-
...
|
|
2757
|
+
..._t(e).get(t) ?? {
|
|
2852
2758
|
sheetId: t,
|
|
2853
2759
|
cardIds: /* @__PURE__ */ new Set()
|
|
2854
2760
|
},
|
|
2855
2761
|
sheetKind: "document"
|
|
2856
2762
|
};
|
|
2857
2763
|
}
|
|
2858
|
-
function
|
|
2859
|
-
const n =
|
|
2764
|
+
function ks(e, t) {
|
|
2765
|
+
const n = ht(e, t);
|
|
2860
2766
|
return (e.inputs || []).some(
|
|
2861
|
-
(o) =>
|
|
2767
|
+
(o) => qe(o, n)
|
|
2862
2768
|
);
|
|
2863
2769
|
}
|
|
2864
|
-
function
|
|
2770
|
+
function Ao(e) {
|
|
2865
2771
|
const t = {
|
|
2866
2772
|
id: e.id,
|
|
2867
2773
|
label: e.label,
|
|
@@ -2882,36 +2788,36 @@ function Xo(e) {
|
|
|
2882
2788
|
exports: e.exports
|
|
2883
2789
|
};
|
|
2884
2790
|
}
|
|
2885
|
-
function
|
|
2791
|
+
function Ms({
|
|
2886
2792
|
control: e,
|
|
2887
2793
|
existingInputs: t,
|
|
2888
2794
|
sheetId: n,
|
|
2889
2795
|
inputId: o
|
|
2890
2796
|
}) {
|
|
2891
|
-
const
|
|
2797
|
+
const s = Ae(
|
|
2892
2798
|
e.id || e.label,
|
|
2893
2799
|
t
|
|
2894
|
-
),
|
|
2800
|
+
), i = e.id === s ? e : { ...e, id: s };
|
|
2895
2801
|
return {
|
|
2896
|
-
id: o ||
|
|
2802
|
+
id: o || Me(),
|
|
2897
2803
|
kind: "control",
|
|
2898
|
-
label:
|
|
2899
|
-
variableName:
|
|
2900
|
-
requiredAtExecution:
|
|
2804
|
+
label: i.label,
|
|
2805
|
+
variableName: s,
|
|
2806
|
+
requiredAtExecution: i.requiredAtExecution,
|
|
2901
2807
|
scope: { kind: "sheets", sheetIds: [n] },
|
|
2902
2808
|
runtimeScope: "perSheet",
|
|
2903
2809
|
presentation: { placement: "toolbar" },
|
|
2904
|
-
control:
|
|
2905
|
-
exports:
|
|
2810
|
+
control: i,
|
|
2811
|
+
exports: ze(i)
|
|
2906
2812
|
};
|
|
2907
2813
|
}
|
|
2908
|
-
function
|
|
2814
|
+
function Ts({
|
|
2909
2815
|
input: e,
|
|
2910
2816
|
allInputs: t,
|
|
2911
2817
|
label: n,
|
|
2912
2818
|
variableName: o
|
|
2913
2819
|
}) {
|
|
2914
|
-
const
|
|
2820
|
+
const s = (n == null ? void 0 : n.trim()) || e.label, i = o === void 0 ? e.variableName : Ae(
|
|
2915
2821
|
o,
|
|
2916
2822
|
t.filter((a) => a.id !== e.id)
|
|
2917
2823
|
);
|
|
@@ -2922,48 +2828,48 @@ function $i({
|
|
|
2922
2828
|
);
|
|
2923
2829
|
const a = {
|
|
2924
2830
|
...e.filter,
|
|
2925
|
-
title:
|
|
2926
|
-
variableName:
|
|
2831
|
+
title: s,
|
|
2832
|
+
variableName: i
|
|
2927
2833
|
};
|
|
2928
2834
|
return {
|
|
2929
2835
|
...e,
|
|
2930
|
-
label:
|
|
2931
|
-
variableName:
|
|
2836
|
+
label: s,
|
|
2837
|
+
variableName: i,
|
|
2932
2838
|
filter: a,
|
|
2933
|
-
exports:
|
|
2839
|
+
exports: mn(a)
|
|
2934
2840
|
};
|
|
2935
2841
|
}
|
|
2936
2842
|
const r = {
|
|
2937
2843
|
...e.control,
|
|
2938
|
-
id:
|
|
2939
|
-
label:
|
|
2844
|
+
id: i,
|
|
2845
|
+
label: s
|
|
2940
2846
|
};
|
|
2941
2847
|
return {
|
|
2942
2848
|
...e,
|
|
2943
|
-
label:
|
|
2944
|
-
variableName:
|
|
2849
|
+
label: s,
|
|
2850
|
+
variableName: i,
|
|
2945
2851
|
requiredAtExecution: r.requiredAtExecution,
|
|
2946
2852
|
control: r,
|
|
2947
|
-
exports:
|
|
2853
|
+
exports: ze(r)
|
|
2948
2854
|
};
|
|
2949
2855
|
}
|
|
2950
|
-
function
|
|
2856
|
+
function Os(e, t, n) {
|
|
2951
2857
|
return !t || !n || t === n ? e : {
|
|
2952
2858
|
...e,
|
|
2953
2859
|
sections: e.sections.map(
|
|
2954
2860
|
(o) => Dn(
|
|
2955
2861
|
o,
|
|
2956
|
-
(
|
|
2862
|
+
(s) => No(s, t, n)
|
|
2957
2863
|
)
|
|
2958
2864
|
)
|
|
2959
2865
|
};
|
|
2960
2866
|
}
|
|
2961
|
-
function
|
|
2962
|
-
var
|
|
2963
|
-
const o = `[[param.${t}]]`,
|
|
2867
|
+
function No(e, t, n) {
|
|
2868
|
+
var i;
|
|
2869
|
+
const o = `[[param.${t}]]`, s = `[[param.${n}]]`;
|
|
2964
2870
|
return {
|
|
2965
2871
|
...e,
|
|
2966
|
-
...(
|
|
2872
|
+
...(i = e.sql) != null && i.includes(o) ? { sql: e.sql.split(o).join(s) } : {},
|
|
2967
2873
|
...e.controls ? {
|
|
2968
2874
|
controls: e.controls.map(
|
|
2969
2875
|
(r) => r.id === t ? { ...r, id: n } : r
|
|
@@ -2978,39 +2884,39 @@ function ei(e, t, n) {
|
|
|
2978
2884
|
} : {}
|
|
2979
2885
|
};
|
|
2980
2886
|
}
|
|
2981
|
-
function
|
|
2982
|
-
return e.kind === "filter" &&
|
|
2983
|
-
|
|
2887
|
+
function xs(e, t) {
|
|
2888
|
+
return e.kind === "filter" && In(
|
|
2889
|
+
Ao(e),
|
|
2984
2890
|
t
|
|
2985
2891
|
);
|
|
2986
2892
|
}
|
|
2987
|
-
function
|
|
2893
|
+
function Ps(e) {
|
|
2988
2894
|
var n;
|
|
2989
2895
|
const t = {};
|
|
2990
2896
|
for (const o of e)
|
|
2991
2897
|
o.kind === "filter" && (t[o.id] = ((n = o.slot) == null ? void 0 : n.status) === "cleared" ? void 0 : o.filterValue);
|
|
2992
2898
|
return t;
|
|
2993
2899
|
}
|
|
2994
|
-
function
|
|
2900
|
+
function ws(e) {
|
|
2995
2901
|
var n;
|
|
2996
2902
|
const t = {};
|
|
2997
2903
|
for (const o of e)
|
|
2998
2904
|
o.kind === "control" && ((n = o.slot) == null ? void 0 : n.status) === "set" && (t[o.id] = o.controlValue);
|
|
2999
2905
|
return t;
|
|
3000
2906
|
}
|
|
3001
|
-
function
|
|
2907
|
+
function Es({
|
|
3002
2908
|
dashboard: e,
|
|
3003
2909
|
sheetId: t,
|
|
3004
2910
|
filterValuesByInputId: n,
|
|
3005
2911
|
controlValuesByInputId: o
|
|
3006
2912
|
}) {
|
|
3007
|
-
const
|
|
3008
|
-
let
|
|
3009
|
-
for (const r of
|
|
2913
|
+
const s = qo(e, t);
|
|
2914
|
+
let i = {};
|
|
2915
|
+
for (const r of s) {
|
|
3010
2916
|
if (r.kind === "filter" && n && Object.prototype.hasOwnProperty.call(n, r.id)) {
|
|
3011
2917
|
const a = n[r.id];
|
|
3012
|
-
|
|
3013
|
-
|
|
2918
|
+
i = R(
|
|
2919
|
+
i,
|
|
3014
2920
|
r,
|
|
3015
2921
|
{ sheetId: t },
|
|
3016
2922
|
a ? {
|
|
@@ -3024,8 +2930,8 @@ function Ji({
|
|
|
3024
2930
|
}
|
|
3025
2931
|
if (r.kind === "control" && o && Object.prototype.hasOwnProperty.call(o, r.id)) {
|
|
3026
2932
|
const a = o[r.id];
|
|
3027
|
-
|
|
3028
|
-
|
|
2933
|
+
i = R(
|
|
2934
|
+
i,
|
|
3029
2935
|
r,
|
|
3030
2936
|
{ sheetId: t },
|
|
3031
2937
|
a === void 0 ? { status: "cleared" } : {
|
|
@@ -3038,75 +2944,67 @@ function Ji({
|
|
|
3038
2944
|
);
|
|
3039
2945
|
}
|
|
3040
2946
|
}
|
|
3041
|
-
return
|
|
2947
|
+
return Le({
|
|
3042
2948
|
dashboard: e,
|
|
3043
|
-
dashboardInputValues:
|
|
2949
|
+
dashboardInputValues: i,
|
|
3044
2950
|
sheetId: t
|
|
3045
2951
|
});
|
|
3046
2952
|
}
|
|
3047
2953
|
export {
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
Ci as s,
|
|
3105
|
-
gi as t,
|
|
3106
|
-
Qn as u,
|
|
3107
|
-
Hn as v,
|
|
3108
|
-
vi as w,
|
|
3109
|
-
qn as x,
|
|
3110
|
-
Qe as y,
|
|
3111
|
-
yi as z
|
|
2954
|
+
ps as $,
|
|
2955
|
+
N as A,
|
|
2956
|
+
On as B,
|
|
2957
|
+
bo as C,
|
|
2958
|
+
vs as D,
|
|
2959
|
+
ys as E,
|
|
2960
|
+
wo as F,
|
|
2961
|
+
Ds as G,
|
|
2962
|
+
gs as H,
|
|
2963
|
+
Eo as I,
|
|
2964
|
+
kn as J,
|
|
2965
|
+
Cs as K,
|
|
2966
|
+
hs as L,
|
|
2967
|
+
bs as M,
|
|
2968
|
+
at as N,
|
|
2969
|
+
ee as O,
|
|
2970
|
+
uo as P,
|
|
2971
|
+
lt as Q,
|
|
2972
|
+
Fn as R,
|
|
2973
|
+
Ao as S,
|
|
2974
|
+
xs as T,
|
|
2975
|
+
Ts as U,
|
|
2976
|
+
Os as V,
|
|
2977
|
+
Es as W,
|
|
2978
|
+
Ps as X,
|
|
2979
|
+
ws as Y,
|
|
2980
|
+
_ as Z,
|
|
2981
|
+
rs as _,
|
|
2982
|
+
ms as a,
|
|
2983
|
+
fs as a0,
|
|
2984
|
+
ks as a1,
|
|
2985
|
+
Is as b,
|
|
2986
|
+
as as c,
|
|
2987
|
+
Fs as d,
|
|
2988
|
+
Xn as e,
|
|
2989
|
+
Ms as f,
|
|
2990
|
+
qo as g,
|
|
2991
|
+
ls as h,
|
|
2992
|
+
Ss as i,
|
|
2993
|
+
Po as j,
|
|
2994
|
+
ds as k,
|
|
2995
|
+
Jn as l,
|
|
2996
|
+
us as m,
|
|
2997
|
+
Ue as n,
|
|
2998
|
+
cs as o,
|
|
2999
|
+
os as p,
|
|
3000
|
+
ns as q,
|
|
3001
|
+
ho as r,
|
|
3002
|
+
jn as s,
|
|
3003
|
+
An as t,
|
|
3004
|
+
ss as u,
|
|
3005
|
+
Tn as v,
|
|
3006
|
+
Le as w,
|
|
3007
|
+
is as x,
|
|
3008
|
+
Do as y,
|
|
3009
|
+
Vs as z
|
|
3112
3010
|
};
|