react-semaphor 0.1.543 → 0.1.545
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/activity/index.js +73 -0
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +56 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/dashboard-B1tMju0u.js +14 -0
- package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
- package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +553 -541
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +241 -227
- package/dist/index.js +354 -331
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +6 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
- package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js}
RENAMED
|
@@ -1,60 +1,57 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (e, t, r) =>
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { i as ye } from "./custom-visual-inputs-DUtpYZOk.js";
|
|
16
|
-
import { s as xe } from "./stable-serialize-CfqXeiBP.js";
|
|
17
|
-
function Ve(e) {
|
|
1
|
+
var Z = Object.defineProperty;
|
|
2
|
+
var G = (e, t, r) => t in e ? Z(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var k = (e, t, r) => G(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { c as Q, e as M, r as U, l as H, d as K, a as W, i as X, b as Y, f as ee } from "./resolve-dashboard-input-context-DJ2tICwz.js";
|
|
5
|
+
import { r as te, p as E, a as re, b as L, c as ae, d as ne, g as se } from "./document-dashboard-inputs-BesAHZvB.js";
|
|
6
|
+
import { v } from "./table-settings-CLZocegs.js";
|
|
7
|
+
import { f as g, A as P, c as oe, d as ie, e as D } from "./context-ClREvqCZ.js";
|
|
8
|
+
import { a as de, T as le, P as ce, o as I, d as O, b as _ } from "./filter-value-text-ff7osJr7.js";
|
|
9
|
+
import { y as ue, al as me } from "./validators-DMHTpf7a.js";
|
|
10
|
+
import { b as fe } from "./metric-comparison-DEwi9uc2.js";
|
|
11
|
+
import { n as pe, g as he, b as ge } from "./numeric-presentation-7X_IrD58.js";
|
|
12
|
+
import { i as be } from "./custom-visual-inputs-DLCD9Y5V.js";
|
|
13
|
+
import { s as Ce } from "./stable-serialize-CfqXeiBP.js";
|
|
14
|
+
function Ie(e) {
|
|
18
15
|
const t = e.qualifiedFieldName || e.name;
|
|
19
16
|
return e.label && e.label !== t ? `${e.label} (field ${t})` : t;
|
|
20
17
|
}
|
|
21
|
-
function
|
|
18
|
+
function ye(e, t = {}) {
|
|
22
19
|
if (!e) return [];
|
|
23
|
-
const r =
|
|
24
|
-
return r.length === 0 ? [] : e.logicalOperator === "AND" && !e.negate ? r : [
|
|
20
|
+
const r = R(e, t);
|
|
21
|
+
return r.length === 0 ? [] : e.logicalOperator === "AND" && !e.negate ? r : [j(e, r)];
|
|
25
22
|
}
|
|
26
|
-
function
|
|
23
|
+
function R(e, t) {
|
|
27
24
|
const r = e.groups.flatMap((a) => {
|
|
28
|
-
const n =
|
|
25
|
+
const n = R(a, t);
|
|
29
26
|
if (n.length === 0) return [];
|
|
30
|
-
const s =
|
|
27
|
+
const s = j(a, n);
|
|
31
28
|
return [n.length > 1 && !a.negate ? { ...s, text: `(${s.text})` } : s];
|
|
32
29
|
});
|
|
33
|
-
return [...e.conditions.map((a) =>
|
|
30
|
+
return [...e.conditions.map((a) => xe(a, t)), ...r];
|
|
34
31
|
}
|
|
35
|
-
function
|
|
32
|
+
function j(e, t) {
|
|
36
33
|
const r = t.map((a) => a.text).join(e.logicalOperator === "OR" ? " or " : " and ");
|
|
37
34
|
return {
|
|
38
35
|
text: e.negate ? `not (${r})` : r,
|
|
39
36
|
omittedValues: t.reduce((a, n) => a + n.omittedValues, 0)
|
|
40
37
|
};
|
|
41
38
|
}
|
|
42
|
-
function
|
|
39
|
+
function xe(e, t) {
|
|
43
40
|
const r = Array.isArray(e.value) ? e.value : [e.value];
|
|
44
|
-
return
|
|
45
|
-
subject:
|
|
41
|
+
return de({
|
|
42
|
+
subject: Ie(e.field),
|
|
46
43
|
operator: e.operator,
|
|
47
44
|
values: r,
|
|
48
|
-
reading:
|
|
49
|
-
relative:
|
|
45
|
+
reading: Se(e),
|
|
46
|
+
relative: ue(e.relativeMeta),
|
|
50
47
|
latestValue: e.latestValue,
|
|
51
48
|
shownAs: e.label
|
|
52
49
|
}, t);
|
|
53
50
|
}
|
|
54
|
-
function
|
|
55
|
-
return e.temporalBucket ? { kind: "bucket", bucket: e.temporalBucket } :
|
|
51
|
+
function Se(e) {
|
|
52
|
+
return e.temporalBucket ? { kind: "bucket", bucket: e.temporalBucket } : me(e.field.dataType) ? le : ce;
|
|
56
53
|
}
|
|
57
|
-
function
|
|
54
|
+
function B(e) {
|
|
58
55
|
if (e.kind === "target") return `a target of ${e.targetValue}`;
|
|
59
56
|
const t = e.kind === "previous_period" ? e.offsetPeriods : e.offsetYears, r = e.kind === "previous_period" ? t && t > 1 ? `the period ${t} periods earlier` : "the previous period" : t && t > 1 ? `the same period ${t} years earlier` : "the same period a year earlier", a = [
|
|
60
57
|
e.alignment === "weekday" ? "aligned by weekday" : void 0,
|
|
@@ -62,18 +59,18 @@ function N(e) {
|
|
|
62
59
|
].filter(Boolean);
|
|
63
60
|
return a.length ? `${r}, ${a.join(", ")}` : r;
|
|
64
61
|
}
|
|
65
|
-
function
|
|
62
|
+
function ve(e) {
|
|
66
63
|
return (e == null ? void 0 : e.kind) === "field_date" ? `the ${JSON.stringify(e.label)} filter` : "the dashboard date";
|
|
67
64
|
}
|
|
68
|
-
function
|
|
69
|
-
const r = t.source === "explicit" ? "set on the measure" : `from the dashboard date comparison on ${
|
|
70
|
-
return `${e} is compared with ${
|
|
65
|
+
function Ve(e, t) {
|
|
66
|
+
const r = t.source === "explicit" ? "set on the measure" : `from the dashboard date comparison on ${ve(t.owner)}`;
|
|
67
|
+
return `${e} is compared with ${B(t.spec)} (${r})`;
|
|
71
68
|
}
|
|
72
69
|
function $(e) {
|
|
73
|
-
const t =
|
|
74
|
-
return `${
|
|
70
|
+
const t = Ce(e) ?? "undefined";
|
|
71
|
+
return `${w(t, 2654435769).toString(16)}${w(t, 2246822507).toString(16)}`;
|
|
75
72
|
}
|
|
76
|
-
function
|
|
73
|
+
function w(e, t) {
|
|
77
74
|
let r = 3735928559 ^ t, a = 1103547991 ^ t;
|
|
78
75
|
for (let n = 0; n < e.length; n++) {
|
|
79
76
|
const s = e.charCodeAt(n);
|
|
@@ -82,27 +79,27 @@ function D(e, t) {
|
|
|
82
79
|
return r = Math.imul(r ^ r >>> 16, 2246822507) ^ Math.imul(a ^ a >>> 13, 3266489909), a = Math.imul(a ^ a >>> 16, 2246822507) ^ Math.imul(r ^ r >>> 13, 3266489909), 4294967296 * (2097151 & a) + (r >>> 0);
|
|
83
80
|
}
|
|
84
81
|
const c = P;
|
|
85
|
-
function
|
|
82
|
+
function $e(e, t, r) {
|
|
86
83
|
var q;
|
|
87
|
-
const a = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n =
|
|
84
|
+
const a = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n = _e(e, t);
|
|
88
85
|
if (n) {
|
|
89
|
-
const y = t !== "pending" && (t == null ? void 0 : t.status) === "blocked" ?
|
|
86
|
+
const y = t !== "pending" && (t == null ? void 0 : t.status) === "blocked" ? qe(t) : void 0, V = y ? g(y, c.textChars) : void 0;
|
|
90
87
|
return {
|
|
91
88
|
// A card that runs but is not described still changes when it runs differently.
|
|
92
|
-
fingerprint: $(a ? F(a, r.calendar) : { reason: n, message:
|
|
93
|
-
description: { status: "not_described", reason: n, ...
|
|
89
|
+
fingerprint: $(a ? F(a, r.calendar) : { reason: n, message: V }),
|
|
90
|
+
description: { status: "not_described", reason: n, ...V ? { message: V } : {} }
|
|
94
91
|
};
|
|
95
92
|
}
|
|
96
|
-
const s = a,
|
|
93
|
+
const s = a, d = s.queryContext, u = De(s), o = Ae(s, r), f = Me(s), i = we(s), l = d.drillSteps.map((y) => g(
|
|
97
94
|
`${JSON.stringify(y.label)} (then by ${y.toField.label || y.toField.name})`,
|
|
98
95
|
c.textChars
|
|
99
|
-
)),
|
|
96
|
+
)), m = (q = s.card.sql) == null ? void 0 : q.trim(), h = m ? Ee(s) : [], b = {
|
|
100
97
|
fields: I(u.length, c.cardFields),
|
|
101
98
|
filters: I(o.length, c.cardFilters),
|
|
102
|
-
controls: I(
|
|
99
|
+
controls: I(f.length, c.cardControls),
|
|
103
100
|
drillSteps: I(l.length, c.drillSteps),
|
|
104
101
|
sqlParameters: I(h.length, c.sqlParameters),
|
|
105
|
-
comparisons: I(
|
|
102
|
+
comparisons: I(i.length, c.cardFields)
|
|
106
103
|
}, p = Object.fromEntries(Object.entries(b).filter(([, y]) => y > 0));
|
|
107
104
|
return {
|
|
108
105
|
fingerprint: $(F(s, r.calendar)),
|
|
@@ -110,88 +107,88 @@ function ke(e, t, r) {
|
|
|
110
107
|
status: "described",
|
|
111
108
|
fields: u.slice(0, c.cardFields),
|
|
112
109
|
filters: o.slice(0, c.cardFilters),
|
|
113
|
-
controls:
|
|
110
|
+
controls: f.slice(0, c.cardControls),
|
|
114
111
|
drillPath: l.slice(0, c.drillSteps),
|
|
115
|
-
...
|
|
112
|
+
...m ? {
|
|
116
113
|
sql: {
|
|
117
|
-
text: g(
|
|
114
|
+
text: g(m, c.sqlChars),
|
|
118
115
|
parameters: h.slice(0, c.sqlParameters)
|
|
119
116
|
}
|
|
120
117
|
} : {},
|
|
121
|
-
...
|
|
118
|
+
...i.length ? { comparisons: i.slice(0, c.cardFields) } : {},
|
|
122
119
|
...Object.keys(p).length ? { omitted: p } : {}
|
|
123
120
|
}
|
|
124
121
|
};
|
|
125
122
|
}
|
|
126
|
-
function
|
|
123
|
+
function _e(e, t) {
|
|
127
124
|
if (e.type === "matrixTable") return "matrix";
|
|
128
|
-
if (e.type === "custom" ||
|
|
129
|
-
if (
|
|
125
|
+
if (e.type === "custom" || be(e)) return "custom_visual";
|
|
126
|
+
if (pe(e.python ?? "").trim()) return "python";
|
|
130
127
|
if (t === "pending") return "snapshot_pending";
|
|
131
128
|
if ((t == null ? void 0 : t.status) !== "ready") return "snapshot_blocked";
|
|
132
129
|
}
|
|
133
|
-
function
|
|
130
|
+
function qe(e) {
|
|
134
131
|
if (e.message) return e.message;
|
|
135
132
|
const t = e.mappingDispositions.flatMap((r) => r.status === "block" ? [`${r.inputId} (${r.reason})`] : []);
|
|
136
133
|
return t.length ? `dashboard inputs that cannot apply to this card: ${t.join(", ")}` : void 0;
|
|
137
134
|
}
|
|
138
135
|
function F(e, t) {
|
|
139
|
-
return
|
|
136
|
+
return Q(e.card, e.queryContext, t).queryInputIdentity;
|
|
140
137
|
}
|
|
141
|
-
const
|
|
138
|
+
const ke = [
|
|
142
139
|
["row", "rows"],
|
|
143
140
|
["column", "columns"],
|
|
144
141
|
["measure", "metrics"],
|
|
145
142
|
["detail", "details"]
|
|
146
143
|
];
|
|
147
|
-
function
|
|
148
|
-
const { fields: t } =
|
|
144
|
+
function De(e) {
|
|
145
|
+
const { fields: t } = he({
|
|
149
146
|
type: e.card.type,
|
|
150
147
|
config: e.queryContext.finalConfig
|
|
151
148
|
});
|
|
152
|
-
return
|
|
153
|
-
const s = n.aggregate,
|
|
149
|
+
return ke.flatMap(([r, a]) => t[a].map((n) => {
|
|
150
|
+
const s = n.aggregate, d = n.granularity;
|
|
154
151
|
return {
|
|
155
152
|
role: r,
|
|
156
153
|
label: g(n.label || n.name, c.labelChars),
|
|
157
154
|
name: g(n.name, c.labelChars),
|
|
158
155
|
...s ? { aggregate: s } : {},
|
|
159
|
-
...
|
|
156
|
+
...d ? { granularity: d } : {}
|
|
160
157
|
};
|
|
161
158
|
}));
|
|
162
159
|
}
|
|
163
|
-
function
|
|
160
|
+
function we(e) {
|
|
164
161
|
const t = e.queryContext;
|
|
165
162
|
return (t.finalConfig.metricColumns ?? []).flatMap((r) => {
|
|
166
|
-
const a =
|
|
163
|
+
const a = fe({
|
|
167
164
|
metricComparison: r.comparison,
|
|
168
165
|
globalDateComparison: t.globalDateComparison
|
|
169
166
|
});
|
|
170
|
-
return a ? [g(
|
|
167
|
+
return a ? [g(Ve(Fe(r.label || r.name), a), c.textChars)] : [];
|
|
171
168
|
});
|
|
172
169
|
}
|
|
173
|
-
function
|
|
170
|
+
function Fe(e) {
|
|
174
171
|
return JSON.stringify(e);
|
|
175
172
|
}
|
|
176
|
-
function
|
|
177
|
-
const r = e.queryContext, a = { maxListedValues: c.inputValues, timeZone: t.tz }, n = e.card.inlineFilters ?? [], s = new Set(n.map((
|
|
178
|
-
[...r.queryFilterDefinitions, ...n].map((
|
|
179
|
-
), u = r.cardFilterValues.map((
|
|
180
|
-
const l =
|
|
173
|
+
function Ae(e, { calendar: t }) {
|
|
174
|
+
const r = e.queryContext, a = { maxListedValues: c.inputValues, timeZone: t.tz }, n = e.card.inlineFilters ?? [], s = new Set(n.map((i) => i.id)), d = new Map(
|
|
175
|
+
[...r.queryFilterDefinitions, ...n].map((i) => [i.id, i.title])
|
|
176
|
+
), u = r.cardFilterValues.map((i) => {
|
|
177
|
+
const l = d.get(i.filterId) || i.name, m = i.dateOwner === "global_date" ? `${l} (the dashboard date, on this card's field ${i.name})` : `${l} (field ${i.name})`, h = O(i, m, a);
|
|
181
178
|
return {
|
|
182
|
-
origin: s.has(
|
|
179
|
+
origin: s.has(i.filterId) ? "card_input" : "dashboard_input",
|
|
183
180
|
text: g(h.text, c.textChars),
|
|
184
181
|
...h.omittedValues ? { omittedValues: h.omittedValues } : {}
|
|
185
182
|
};
|
|
186
|
-
}), o = r.resolvedFilterParts,
|
|
187
|
-
origin:
|
|
188
|
-
text: g(
|
|
189
|
-
...
|
|
183
|
+
}), o = r.resolvedFilterParts, f = [["card", o.authored], ["drill", o.drill], ["selection", o.selections]].flatMap(([i, l]) => ye(l, a).map((m) => ({
|
|
184
|
+
origin: i,
|
|
185
|
+
text: g(m.text, c.textChars),
|
|
186
|
+
...m.omittedValues ? { omittedValues: m.omittedValues } : {}
|
|
190
187
|
})));
|
|
191
|
-
return [...u, ...
|
|
188
|
+
return [...u, ...f];
|
|
192
189
|
}
|
|
193
|
-
function
|
|
194
|
-
const t = e.queryContext, r =
|
|
190
|
+
function Te(e) {
|
|
191
|
+
const t = e.queryContext, r = M({
|
|
195
192
|
sql: e.card.sql,
|
|
196
193
|
controlBindings: t.controlBindings
|
|
197
194
|
});
|
|
@@ -204,28 +201,28 @@ function Oe(e) {
|
|
|
204
201
|
sqlParameterIds: r.filter((s) => s.controlId === n).map((s) => s.paramId)
|
|
205
202
|
}));
|
|
206
203
|
}
|
|
207
|
-
function
|
|
204
|
+
function Me(e) {
|
|
208
205
|
const t = e.queryContext, r = new Map(
|
|
209
206
|
[...t.controlDefinitions, ...t.cardControlDefinitions].map((a) => [a.id, a])
|
|
210
207
|
);
|
|
211
|
-
return
|
|
208
|
+
return Te(e).map(({ id: a, bindings: n, sqlParameterIds: s }) => {
|
|
212
209
|
var o;
|
|
213
|
-
const
|
|
214
|
-
...n.filter((
|
|
215
|
-
...s.map((
|
|
210
|
+
const d = t.controlValues[a], u = /* @__PURE__ */ new Set([
|
|
211
|
+
...n.filter((f) => f.target !== "sql_param").map((f) => Le(f, d)),
|
|
212
|
+
...s.map((f) => `SQL parameter ${f}`)
|
|
216
213
|
]);
|
|
217
214
|
return {
|
|
218
215
|
label: g(((o = r.get(a)) == null ? void 0 : o.label) || a, c.labelChars),
|
|
219
216
|
valueText: g(
|
|
220
|
-
`${_(
|
|
217
|
+
`${_(d, { maxListedValues: c.inputValues }).text}${u.size ? `; ${[...u].join("; ")}` : ""}`,
|
|
221
218
|
c.textChars
|
|
222
219
|
)
|
|
223
220
|
};
|
|
224
221
|
});
|
|
225
222
|
}
|
|
226
|
-
function
|
|
223
|
+
function Ee(e) {
|
|
227
224
|
const t = e.queryContext;
|
|
228
|
-
return
|
|
225
|
+
return M({ sql: e.card.sql, controlBindings: t.controlBindings }).map((r) => ({
|
|
229
226
|
name: g(r.paramId, c.labelChars),
|
|
230
227
|
valueText: g(
|
|
231
228
|
_(t.controlValues[r.controlId], { maxListedValues: c.inputValues }).text,
|
|
@@ -233,7 +230,7 @@ function Pe(e) {
|
|
|
233
230
|
)
|
|
234
231
|
}));
|
|
235
232
|
}
|
|
236
|
-
function
|
|
233
|
+
function Le(e, t) {
|
|
237
234
|
const r = typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : void 0;
|
|
238
235
|
switch (e.target) {
|
|
239
236
|
case "sql_param":
|
|
@@ -253,19 +250,19 @@ function Re(e, t) {
|
|
|
253
250
|
}
|
|
254
251
|
}
|
|
255
252
|
}
|
|
256
|
-
class
|
|
253
|
+
class S extends Error {
|
|
257
254
|
constructor(r, a) {
|
|
258
255
|
super(a);
|
|
259
256
|
k(this, "code");
|
|
260
257
|
this.name = "AssistantContextSourceError", this.code = r;
|
|
261
258
|
}
|
|
262
259
|
}
|
|
263
|
-
const C = P,
|
|
264
|
-
function
|
|
260
|
+
const C = P, Pe = "Untitled";
|
|
261
|
+
function Oe(e) {
|
|
265
262
|
var b;
|
|
266
263
|
if (e.surface === "none")
|
|
267
264
|
return A({
|
|
268
|
-
version:
|
|
265
|
+
version: D,
|
|
269
266
|
surface: "none",
|
|
270
267
|
otherSheets: [],
|
|
271
268
|
activeInputs: [],
|
|
@@ -274,20 +271,20 @@ function Be(e) {
|
|
|
274
271
|
});
|
|
275
272
|
const { dashboard: t, sheetId: r, calendar: a } = e, n = t.sheets ?? [], s = n.find((p) => p.id === r);
|
|
276
273
|
if (r !== null && !s)
|
|
277
|
-
throw new
|
|
278
|
-
const
|
|
279
|
-
if (e.selectedCard && !
|
|
280
|
-
throw new
|
|
274
|
+
throw new S("sheet_not_found", `sheet ${r} is not on dashboard ${t.id}`);
|
|
275
|
+
const d = n.filter((p) => p.id !== r), u = s ? v(t).filter((p) => p.sheetId === r) : [], o = u.slice(0, C.summaryCards), f = e.selectedCard ? u.find((p) => p.cardId === e.selectedCard.cardId) : void 0, i = ((b = e.selectedCard) == null ? void 0 : b.card) ?? (f == null ? void 0 : f.card);
|
|
276
|
+
if (e.selectedCard && !i)
|
|
277
|
+
throw new S(
|
|
281
278
|
"card_not_on_sheet",
|
|
282
279
|
`card ${e.selectedCard.cardId} is not on sheet ${r}`
|
|
283
280
|
);
|
|
284
|
-
const l = s ?
|
|
285
|
-
otherSheets: I(
|
|
281
|
+
const l = s ? Be(e, s, u) : [], m = {
|
|
282
|
+
otherSheets: I(d.length, C.otherSheets),
|
|
286
283
|
activeInputs: I(l.length, C.activeInputs),
|
|
287
284
|
cards: I(u.length, C.summaryCards)
|
|
288
|
-
}, h = Object.fromEntries(Object.entries(
|
|
285
|
+
}, h = Object.fromEntries(Object.entries(m).filter(([, p]) => p > 0));
|
|
289
286
|
return A({
|
|
290
|
-
version:
|
|
287
|
+
version: D,
|
|
291
288
|
surface: e.editing ? "editor" : "dashboard",
|
|
292
289
|
dashboard: {
|
|
293
290
|
id: t.id,
|
|
@@ -295,28 +292,28 @@ function Be(e) {
|
|
|
295
292
|
unsavedEdits: e.unsavedEdits
|
|
296
293
|
},
|
|
297
294
|
...s ? { sheet: { id: s.id, title: x(s.title) } } : {},
|
|
298
|
-
otherSheets:
|
|
295
|
+
otherSheets: d.slice(0, C.otherSheets).map((p) => ({ id: p.id, title: x(p.title) })),
|
|
299
296
|
activeInputs: l.slice(0, C.activeInputs),
|
|
300
|
-
cards: o.map((p) =>
|
|
301
|
-
...
|
|
297
|
+
cards: o.map((p) => N(p.card)),
|
|
298
|
+
...i && e.selectedCard ? { selectedCard: Re(i, e.selectedCard.snapshot, a) } : {},
|
|
302
299
|
...e.editing ? { editing: e.editing } : {},
|
|
303
300
|
...Object.keys(h).length ? { omitted: h } : {},
|
|
304
301
|
timeZone: a.tz
|
|
305
302
|
});
|
|
306
303
|
}
|
|
307
|
-
function
|
|
308
|
-
return { ...
|
|
304
|
+
function Re(e, t, r) {
|
|
305
|
+
return { ...N(e), ...$e(e, t, { calendar: r }) };
|
|
309
306
|
}
|
|
310
307
|
function A(e) {
|
|
311
|
-
const t =
|
|
312
|
-
if (t > C.contextBytes) throw new
|
|
308
|
+
const t = oe(e);
|
|
309
|
+
if (t > C.contextBytes) throw new ie(t);
|
|
313
310
|
return e;
|
|
314
311
|
}
|
|
315
312
|
function x(e) {
|
|
316
|
-
return g((e == null ? void 0 : e.trim()) ||
|
|
313
|
+
return g((e == null ? void 0 : e.trim()) || Pe, C.labelChars);
|
|
317
314
|
}
|
|
318
|
-
function
|
|
319
|
-
const t =
|
|
315
|
+
function N(e) {
|
|
316
|
+
const t = je(e);
|
|
320
317
|
return {
|
|
321
318
|
id: e.id,
|
|
322
319
|
title: x(e.title),
|
|
@@ -324,9 +321,9 @@ function z(e) {
|
|
|
324
321
|
...t ? { source: t } : {}
|
|
325
322
|
};
|
|
326
323
|
}
|
|
327
|
-
function
|
|
324
|
+
function je(e) {
|
|
328
325
|
var r;
|
|
329
|
-
const t =
|
|
326
|
+
const t = ge(e);
|
|
330
327
|
if (t.kind === "config")
|
|
331
328
|
return t.executableSources.length === 1 ? t.executableSources[0] : void 0;
|
|
332
329
|
if (t.kind === "sql") {
|
|
@@ -334,37 +331,37 @@ function ze(e) {
|
|
|
334
331
|
return a ? { kind: "sql", connectionId: a } : void 0;
|
|
335
332
|
}
|
|
336
333
|
}
|
|
337
|
-
function
|
|
338
|
-
const { dashboard: a } = e, n = t.kind === "document" ? "document" : "dashboard", s = n === "document" ? void 0 : e.transientContexts, { shouldApplyDashboardFilters:
|
|
334
|
+
function Be(e, t, r) {
|
|
335
|
+
const { dashboard: a } = e, n = t.kind === "document" ? "document" : "dashboard", s = n === "document" ? void 0 : e.transientContexts, { shouldApplyDashboardFilters: d } = te(s), u = (l, m) => U({
|
|
339
336
|
dashboard: a,
|
|
340
337
|
sheetId: t.id,
|
|
341
338
|
card: l,
|
|
342
|
-
sectionId:
|
|
339
|
+
sectionId: m,
|
|
343
340
|
runtimeValues: e.runtimeValues,
|
|
344
341
|
transientContexts: s,
|
|
345
342
|
calendar: e.calendar
|
|
346
|
-
}), o = /* @__PURE__ */ new Map(),
|
|
347
|
-
l.inputs.forEach((
|
|
348
|
-
if (
|
|
349
|
-
const b = l.resolvedInputs[h], p = o.get(
|
|
350
|
-
!p.resolved && b &&
|
|
343
|
+
}), o = /* @__PURE__ */ new Map(), f = (l) => {
|
|
344
|
+
l.inputs.forEach((m, h) => {
|
|
345
|
+
if (T(m)) return;
|
|
346
|
+
const b = l.resolvedInputs[h], p = o.get(m.id) ?? { input: m };
|
|
347
|
+
!p.resolved && b && Ne(b) && (p.resolved = b), o.set(m.id, p);
|
|
351
348
|
});
|
|
352
349
|
};
|
|
353
|
-
|
|
354
|
-
let
|
|
355
|
-
var
|
|
356
|
-
return !
|
|
350
|
+
f(u(null));
|
|
351
|
+
let i = H(a).filter((l) => {
|
|
352
|
+
var m;
|
|
353
|
+
return !T(l) && !((m = o.get(l.id)) != null && m.resolved);
|
|
357
354
|
});
|
|
358
355
|
for (const l of r) {
|
|
359
|
-
if (
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
356
|
+
if (i.length === 0) break;
|
|
357
|
+
const m = l.kind === "documentSectionCard" ? l.sectionId : void 0, h = { sheetId: t.id, sheetKind: n, cardId: l.cardId, sectionId: m };
|
|
358
|
+
if (i.some((b) => K(b, h))) {
|
|
362
359
|
try {
|
|
363
|
-
|
|
360
|
+
f(u(l.card, m));
|
|
364
361
|
} catch {
|
|
365
362
|
continue;
|
|
366
363
|
}
|
|
367
|
-
|
|
364
|
+
i = i.filter((b) => {
|
|
368
365
|
var p;
|
|
369
366
|
return !((p = o.get(b.id)) != null && p.resolved);
|
|
370
367
|
});
|
|
@@ -372,40 +369,40 @@ function Je(e, t, r) {
|
|
|
372
369
|
}
|
|
373
370
|
return [...o.values()].flatMap((l) => {
|
|
374
371
|
if (!l.resolved) return [];
|
|
375
|
-
const
|
|
372
|
+
const m = l.input.kind === "filter" && !d && !W(l.input), h = ze(l, e.calendar.tz, m);
|
|
376
373
|
return h ? [h] : [];
|
|
377
374
|
});
|
|
378
375
|
}
|
|
379
|
-
function
|
|
376
|
+
function T(e) {
|
|
380
377
|
var r;
|
|
381
378
|
const t = (r = e.compatibility) == null ? void 0 : r.source;
|
|
382
379
|
return t === "cardInlineFilter" || t === "cardControl";
|
|
383
380
|
}
|
|
384
|
-
function
|
|
381
|
+
function Ne(e) {
|
|
385
382
|
if (e.kind === "filter") return !!e.filterValue;
|
|
386
383
|
const t = e.controlValue;
|
|
387
384
|
return t == null ? !1 : typeof t == "string" ? t.trim().length > 0 : Array.isArray(t) ? t.length > 0 : !0;
|
|
388
385
|
}
|
|
389
|
-
function
|
|
390
|
-
const { input: a, resolved: n } = e, s = x(a.label),
|
|
386
|
+
function ze(e, t, r) {
|
|
387
|
+
const { input: a, resolved: n } = e, s = x(a.label), d = {
|
|
391
388
|
inputId: a.id,
|
|
392
389
|
label: s,
|
|
393
|
-
...a.kind === "filter" &&
|
|
390
|
+
...a.kind === "filter" && X(a.filter) ? { globalDate: !0 } : {}
|
|
394
391
|
};
|
|
395
392
|
if (a.runtimeScope === "perCard" || a.runtimeScope === "perDocumentSection")
|
|
396
|
-
return { ...
|
|
393
|
+
return { ...d, value: { kind: "varies" } };
|
|
397
394
|
const u = { maxListedValues: C.inputValues, timeZone: t };
|
|
398
395
|
let o;
|
|
399
396
|
if ((n == null ? void 0 : n.kind) === "filter" && n.filterValue)
|
|
400
|
-
o =
|
|
397
|
+
o = O(n.filterValue, s, u);
|
|
401
398
|
else if ((n == null ? void 0 : n.kind) === "control") {
|
|
402
|
-
const
|
|
403
|
-
o = { text: `${s} is set to ${
|
|
399
|
+
const i = _(n.controlValue, u);
|
|
400
|
+
o = { text: `${s} is set to ${i.text}`, omittedValues: i.omittedValues };
|
|
404
401
|
}
|
|
405
402
|
if (!o) return;
|
|
406
|
-
const
|
|
407
|
-
return (
|
|
408
|
-
...
|
|
403
|
+
const f = (n == null ? void 0 : n.kind) === "filter" ? n.comparisonSelection : void 0;
|
|
404
|
+
return (f == null ? void 0 : f.mode) === "period" && (o = { ...o, text: `${o.text}; compared with ${B(f.spec)}` }), {
|
|
405
|
+
...d,
|
|
409
406
|
value: {
|
|
410
407
|
kind: "set",
|
|
411
408
|
text: g(o.text, C.textChars),
|
|
@@ -419,42 +416,38 @@ function Ge(e, t, r) {
|
|
|
419
416
|
}
|
|
420
417
|
};
|
|
421
418
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
419
|
+
function st(e) {
|
|
420
|
+
return Je(e).context;
|
|
424
421
|
}
|
|
425
|
-
function
|
|
426
|
-
const { place: t, calendar: r } = e, a =
|
|
427
|
-
...
|
|
428
|
-
a,
|
|
429
|
-
{ filterValues: n.filterValues, controlOverrides: n.controlOverrides, dashboardInputValues: {} },
|
|
430
|
-
r
|
|
431
|
-
),
|
|
422
|
+
function Je(e) {
|
|
423
|
+
const { place: t, calendar: r } = e, a = E(e.dashboard), n = ae({ dashboard: a, host: {}, calendar: r, materializeInputs: !1 }), s = {
|
|
424
|
+
...L({ dashboard: a, capture: {}, calendar: r }).runtimeValues,
|
|
432
425
|
cardViewState: t.cardViewState ?? {}
|
|
433
|
-
},
|
|
426
|
+
}, d = t.cardId ? Ge(a, t.cardId) : void 0, u = d ? z({
|
|
434
427
|
dashboard: a,
|
|
435
|
-
location:
|
|
428
|
+
location: d,
|
|
436
429
|
runtimeValues: s,
|
|
437
430
|
semanticExecutionPayload: e.semanticExecutionPayload,
|
|
438
431
|
calendar: r,
|
|
439
432
|
withRequest: !0
|
|
440
|
-
}) : void 0, o =
|
|
433
|
+
}) : void 0, o = Oe({
|
|
441
434
|
surface: "dashboard",
|
|
442
435
|
dashboard: a,
|
|
443
436
|
// A sheet that does not hold the card is refused by the projection.
|
|
444
|
-
sheetId: t.sheetId ?? (
|
|
437
|
+
sheetId: t.sheetId ?? (d == null ? void 0 : d.sheetId) ?? n.selectedSheetId,
|
|
445
438
|
unsavedEdits: !1,
|
|
446
439
|
runtimeValues: s,
|
|
447
440
|
transientContexts: void 0,
|
|
448
|
-
...
|
|
441
|
+
...d && u !== void 0 ? { selectedCard: { cardId: d.cardId, snapshot: u } } : {},
|
|
449
442
|
calendar: r
|
|
450
443
|
});
|
|
451
444
|
return {
|
|
452
445
|
context: o,
|
|
453
|
-
...o.selectedCard && u !== void 0 ? { cardReplay:
|
|
446
|
+
...o.selectedCard && u !== void 0 ? { cardReplay: Ze({ dashboard: a, cardId: o.selectedCard.id, snapshot: u }) } : {}
|
|
454
447
|
};
|
|
455
448
|
}
|
|
456
|
-
function
|
|
457
|
-
const t = e.dashboard ?
|
|
449
|
+
function Ze(e) {
|
|
450
|
+
const t = e.dashboard ? v(e.dashboard).find((a) => a.cardId === e.cardId) : void 0, r = J({
|
|
458
451
|
card: e.card ?? (t == null ? void 0 : t.card),
|
|
459
452
|
snapshot: e.snapshot,
|
|
460
453
|
documentSection: (t == null ? void 0 : t.kind) === "documentSectionCard"
|
|
@@ -467,14 +460,14 @@ function Ue(e) {
|
|
|
467
460
|
}
|
|
468
461
|
};
|
|
469
462
|
}
|
|
470
|
-
function
|
|
471
|
-
const r =
|
|
463
|
+
function Ge(e, t) {
|
|
464
|
+
const r = v(e).find((a) => a.cardId === t);
|
|
472
465
|
if (!r)
|
|
473
|
-
throw new
|
|
466
|
+
throw new S("card_not_found", `card ${t} is not on dashboard ${e.id}`);
|
|
474
467
|
return r;
|
|
475
468
|
}
|
|
476
|
-
function
|
|
477
|
-
const { dashboard: t, location: r, runtimeValues: a } = e, n = r.kind === "documentSectionCard" ?
|
|
469
|
+
function z(e) {
|
|
470
|
+
const { dashboard: t, location: r, runtimeValues: a } = e, n = r.kind === "documentSectionCard" ? Qe(t, r) : void 0;
|
|
478
471
|
return ne({
|
|
479
472
|
dashboard: t,
|
|
480
473
|
cardId: r.cardId,
|
|
@@ -483,7 +476,7 @@ function J(e) {
|
|
|
483
476
|
transientContexts: e.transientContexts,
|
|
484
477
|
cardViewStates: a.cardViewState,
|
|
485
478
|
viewerTableSettings: void 0,
|
|
486
|
-
|
|
479
|
+
adHocFilterValues: a.adHocFilterValues,
|
|
487
480
|
inlineFilterValuesMap: a.inlineFilterValuesMap,
|
|
488
481
|
dashboardControlValues: a.controlValues,
|
|
489
482
|
cardControlValuesMap: a.cardControlValuesMap,
|
|
@@ -494,7 +487,7 @@ function J(e) {
|
|
|
494
487
|
...e.withRequest ? { withRequest: !0 } : {}
|
|
495
488
|
});
|
|
496
489
|
}
|
|
497
|
-
function
|
|
490
|
+
function J(e) {
|
|
498
491
|
var r;
|
|
499
492
|
const { snapshot: t } = e;
|
|
500
493
|
if (e.documentSection) return { status: "unavailable", reason: "document_section" };
|
|
@@ -509,68 +502,47 @@ function Z(e) {
|
|
|
509
502
|
if (t.matrix) return { status: "unavailable", reason: "matrix" };
|
|
510
503
|
if (!t.request) return { status: "unavailable", reason: "no_query" };
|
|
511
504
|
try {
|
|
512
|
-
const { connectionId: a, requestPayloadBase: n } =
|
|
505
|
+
const { connectionId: a, requestPayloadBase: n } = Y(t.card, t.request);
|
|
513
506
|
return { status: "ready", request: { cardId: t.card.id, connectionId: a, payload: n } };
|
|
514
507
|
} catch {
|
|
515
508
|
return { status: "unavailable", reason: "no_query" };
|
|
516
509
|
}
|
|
517
510
|
}
|
|
518
|
-
function
|
|
519
|
-
const a = E(
|
|
520
|
-
|
|
521
|
-
host: { filterValues: t.filterValues, controlValues: t.controlValues },
|
|
522
|
-
calendar: r,
|
|
523
|
-
materializeInputs: !1
|
|
524
|
-
}), n = t.dashboardInputExecutionSnapshot, s = {
|
|
525
|
-
...O(
|
|
526
|
-
e,
|
|
527
|
-
{
|
|
528
|
-
filterValues: a.filterValues,
|
|
529
|
-
controlOverrides: a.controlOverrides,
|
|
530
|
-
dashboardInputValues: n ? re({
|
|
531
|
-
dashboard: e,
|
|
532
|
-
dashboardInputValues: n.dashboardInputValues,
|
|
533
|
-
sheetId: n.sheetId,
|
|
534
|
-
cardId: n.cardId
|
|
535
|
-
}) : {}
|
|
536
|
-
},
|
|
537
|
-
r
|
|
538
|
-
),
|
|
539
|
-
cardViewState: n ? te(n.cardViewState) : {}
|
|
540
|
-
}, i = n ? ae(n.transientContexts) : void 0;
|
|
541
|
-
return { runtimeValues: s, ...i != null && i.length ? { transientContexts: i } : {} };
|
|
542
|
-
}
|
|
543
|
-
function mt(e) {
|
|
544
|
-
const { calendar: t } = e, r = e.host ?? {}, a = T(
|
|
545
|
-
r.controlContract ? ee(ce(e.dashboard), {
|
|
511
|
+
function ot(e) {
|
|
512
|
+
const { calendar: t } = e, r = e.host ?? {}, a = E(
|
|
513
|
+
r.controlContract ? re(ee(e.dashboard), {
|
|
546
514
|
controlContractOverrides: r.controlContract,
|
|
547
515
|
cardId: e.cardId
|
|
548
516
|
}) : e.dashboard
|
|
549
|
-
), n =
|
|
517
|
+
), n = v(a).find((f) => f.cardId === e.cardId);
|
|
550
518
|
if (!n) return { status: "refused", reason: "card_not_found" };
|
|
551
519
|
if (n.kind === "documentSectionCard") return { status: "refused", reason: "document_section" };
|
|
552
|
-
const { runtimeValues: s, transientContexts:
|
|
520
|
+
const { runtimeValues: s, transientContexts: d } = L({
|
|
521
|
+
dashboard: a,
|
|
522
|
+
capture: r,
|
|
523
|
+
calendar: t
|
|
524
|
+
}), u = z({
|
|
553
525
|
dashboard: a,
|
|
554
526
|
location: n,
|
|
555
527
|
runtimeValues: s,
|
|
556
528
|
semanticExecutionPayload: e.semanticExecutionPayload,
|
|
557
529
|
calendar: t,
|
|
558
|
-
transientContexts:
|
|
530
|
+
transientContexts: d,
|
|
559
531
|
withRequest: !0
|
|
560
532
|
});
|
|
561
533
|
if (!u) return { status: "refused", reason: "card_not_found" };
|
|
562
|
-
const o =
|
|
534
|
+
const o = J({ card: n.card, snapshot: u, documentSection: !1 });
|
|
563
535
|
return o.status === "ready" ? o : o.reason === "pending" ? { status: "refused", reason: "blocked" } : {
|
|
564
536
|
status: "refused",
|
|
565
537
|
reason: o.reason,
|
|
566
538
|
...o.message ? { message: o.message } : {}
|
|
567
539
|
};
|
|
568
540
|
}
|
|
569
|
-
function
|
|
541
|
+
function Qe(e, t) {
|
|
570
542
|
var a, n, s;
|
|
571
|
-
const r = (a = e.sheets) == null ? void 0 : a.find((
|
|
543
|
+
const r = (a = e.sheets) == null ? void 0 : a.find((d) => d.id === t.sheetId);
|
|
572
544
|
if ((s = (n = r == null ? void 0 : r.document) == null ? void 0 : n.inputs) != null && s.length && se(e, t.sheetId).length === 0)
|
|
573
|
-
throw new
|
|
545
|
+
throw new S(
|
|
574
546
|
"document_inputs_not_built",
|
|
575
547
|
`card ${t.cardId} runs with the document's own inputs on sheet ${t.sheetId}, which only the page builds`
|
|
576
548
|
);
|
|
@@ -583,11 +555,11 @@ function Xe(e, t) {
|
|
|
583
555
|
};
|
|
584
556
|
}
|
|
585
557
|
export {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
558
|
+
S as A,
|
|
559
|
+
Ze as a,
|
|
560
|
+
ot as b,
|
|
561
|
+
J as c,
|
|
562
|
+
st as d,
|
|
563
|
+
Je as e,
|
|
564
|
+
Oe as p
|
|
593
565
|
};
|