react-semaphor 0.1.541 → 0.1.542
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 +75 -75
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.js +51 -49
- package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
- package/dist/chunks/{assistant-chat-D1fDZD6O.js → assistant-chat-oHF5lTjA.js} +12 -12
- package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
- package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
- package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
- package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
- package/dist/chunks/{dashboard-briefing-launcher-DwjFpewq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
- package/dist/chunks/{dashboard-controls-C_BI28ME.js → dashboard-controls-CIn22Qgp.js} +69 -70
- package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
- package/dist/chunks/{dashboard-json-DDY15Trn.js → dashboard-json-ZUYsIExq.js} +4 -4
- package/dist/chunks/{dashboard-B6IrON_Q.js → dashboard-s5WJBcK8.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-DP_Op5mu.js → document-dashboard-inputs-C6MJVyoI.js} +2382 -4975
- package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
- package/dist/chunks/{edit-dashboard-visual-CH2dzWW-.js → edit-dashboard-visual-DLdereA7.js} +728 -728
- package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
- package/dist/chunks/{index-DaQlghLY.js → index-CV5rHq5D.js} +824 -1351
- package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
- package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
- package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
- package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
- package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
- package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
- package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
- package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
- package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
- package/dist/chunks/{report-preferences-dialog-DpNkFfQO.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
- package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CJ2WpoMF.js → saved-dashboard-context-DjPqgFly.js} +233 -206
- package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-KT598QJq.js → semaphor-ready-indicator-BWSpRsPj.js} +37489 -39476
- package/dist/chunks/{shelf-drop-preview-context-BxV3Fl8h.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
- package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
- package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
- package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
- package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
- package/dist/chunks/table-settings-CLZocegs.js +501 -0
- package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
- package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DdD12SMY.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
- package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +462 -457
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +9 -9
- package/dist/format-utils/index.js +346 -241
- package/dist/index.js +174 -175
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +17 -1
- package/dist/types/briefings/index.d.ts +5 -3
- package/dist/types/index.js +48 -48
- package/dist/types/lib/api/exports-api.d.ts +11 -65
- package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
- package/dist/types/lib/types/explorer-types.d.ts +6 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
- package/dist/types/shared/assistant-context/index.d.ts +1 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
- package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
- package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
- package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
- package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
- package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
- package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
- package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
- package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
- package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
- package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
- package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
- package/package.json +2 -1
- package/dist/chunks/aggregate-table-row-presentation-B_vQjYR3.js +0 -996
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
- package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
- package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
- package/dist/chunks/common-types-CUf03Htv.js +0 -288
- package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
- package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
- package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
- package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
- package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
- package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
package/dist/chunks/{saved-dashboard-context-CJ2WpoMF.js → saved-dashboard-context-DjPqgFly.js}
RENAMED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
var G = Object.defineProperty;
|
|
2
2
|
var Q = (e, t, r) => t in e ? G(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var k = (e, t, r) => Q(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { a as
|
|
10
|
-
import {
|
|
11
|
-
import { e as
|
|
12
|
-
import {
|
|
13
|
-
import { b as ge } from "./
|
|
14
|
-
|
|
4
|
+
import { r as U, a as K, l as W, d as X, f as Y, i as H, b as T, c as ee, e as E, g as O, p as te, h as re, j as ae, k as ne, m as se } from "./document-dashboard-inputs-C6MJVyoI.js";
|
|
5
|
+
import { y as oe, al as ie } from "./validators-DMHTpf7a.js";
|
|
6
|
+
import "./matrix-operation-contract-8OIO4gob.js";
|
|
7
|
+
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
8
|
+
import "zod";
|
|
9
|
+
import { c as de, e as L, b as le, a as ce } from "./document-sheet-utils-BsZUnHRl.js";
|
|
10
|
+
import { v as S } from "./table-settings-CLZocegs.js";
|
|
11
|
+
import { f as g, A as P, c as ue, d as fe, e as w } from "./context-ClREvqCZ.js";
|
|
12
|
+
import { a as me, T as pe, P as he, o as I, d as R, b as _ } from "./filter-value-text-CYsVYPuD.js";
|
|
13
|
+
import { b as ge } from "./metric-comparison-DEwi9uc2.js";
|
|
14
|
+
import { n as be, g as Ce, b as Ie } from "./numeric-presentation-BSAqPpHt.js";
|
|
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) {
|
|
15
18
|
const t = e.qualifiedFieldName || e.name;
|
|
16
19
|
return e.label && e.label !== t ? `${e.label} (field ${t})` : t;
|
|
17
20
|
}
|
|
18
|
-
function
|
|
21
|
+
function Se(e, t = {}) {
|
|
19
22
|
if (!e) return [];
|
|
20
|
-
const r =
|
|
23
|
+
const r = j(e, t);
|
|
21
24
|
return r.length === 0 ? [] : e.logicalOperator === "AND" && !e.negate ? r : [B(e, r)];
|
|
22
25
|
}
|
|
23
|
-
function
|
|
26
|
+
function j(e, t) {
|
|
24
27
|
const r = e.groups.flatMap((a) => {
|
|
25
|
-
const n =
|
|
28
|
+
const n = j(a, t);
|
|
26
29
|
if (n.length === 0) return [];
|
|
27
30
|
const s = B(a, n);
|
|
28
31
|
return [n.length > 1 && !a.negate ? { ...s, text: `(${s.text})` } : s];
|
|
29
32
|
});
|
|
30
|
-
return [...e.conditions.map((a) =>
|
|
33
|
+
return [...e.conditions.map((a) => ve(a, t)), ...r];
|
|
31
34
|
}
|
|
32
35
|
function B(e, t) {
|
|
33
36
|
const r = t.map((a) => a.text).join(e.logicalOperator === "OR" ? " or " : " and ");
|
|
@@ -36,20 +39,20 @@ function B(e, t) {
|
|
|
36
39
|
omittedValues: t.reduce((a, n) => a + n.omittedValues, 0)
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
|
-
function
|
|
42
|
+
function ve(e, t) {
|
|
40
43
|
const r = Array.isArray(e.value) ? e.value : [e.value];
|
|
41
|
-
return
|
|
42
|
-
subject:
|
|
44
|
+
return me({
|
|
45
|
+
subject: Ve(e.field),
|
|
43
46
|
operator: e.operator,
|
|
44
47
|
values: r,
|
|
45
|
-
reading:
|
|
46
|
-
relative:
|
|
48
|
+
reading: $e(e),
|
|
49
|
+
relative: oe(e.relativeMeta),
|
|
47
50
|
latestValue: e.latestValue,
|
|
48
51
|
shownAs: e.label
|
|
49
52
|
}, t);
|
|
50
53
|
}
|
|
51
|
-
function
|
|
52
|
-
return e.temporalBucket ? { kind: "bucket", bucket: e.temporalBucket } :
|
|
54
|
+
function $e(e) {
|
|
55
|
+
return e.temporalBucket ? { kind: "bucket", bucket: e.temporalBucket } : ie(e.field.dataType) ? pe : he;
|
|
53
56
|
}
|
|
54
57
|
function N(e) {
|
|
55
58
|
if (e.kind === "target") return `a target of ${e.targetValue}`;
|
|
@@ -59,15 +62,15 @@ function N(e) {
|
|
|
59
62
|
].filter(Boolean);
|
|
60
63
|
return a.length ? `${r}, ${a.join(", ")}` : r;
|
|
61
64
|
}
|
|
62
|
-
function
|
|
65
|
+
function _e(e) {
|
|
63
66
|
return (e == null ? void 0 : e.kind) === "field_date" ? `the ${JSON.stringify(e.label)} filter` : "the dashboard date";
|
|
64
67
|
}
|
|
65
|
-
function
|
|
66
|
-
const r = t.source === "explicit" ? "set on the measure" : `from the dashboard date comparison on ${
|
|
68
|
+
function qe(e, t) {
|
|
69
|
+
const r = t.source === "explicit" ? "set on the measure" : `from the dashboard date comparison on ${_e(t.owner)}`;
|
|
67
70
|
return `${e} is compared with ${N(t.spec)} (${r})`;
|
|
68
71
|
}
|
|
69
72
|
function $(e) {
|
|
70
|
-
const t =
|
|
73
|
+
const t = xe(e) ?? "undefined";
|
|
71
74
|
return `${D(t, 2654435769).toString(16)}${D(t, 2246822507).toString(16)}`;
|
|
72
75
|
}
|
|
73
76
|
function D(e, t) {
|
|
@@ -78,117 +81,117 @@ function D(e, t) {
|
|
|
78
81
|
}
|
|
79
82
|
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);
|
|
80
83
|
}
|
|
81
|
-
const
|
|
82
|
-
function
|
|
84
|
+
const c = P;
|
|
85
|
+
function ke(e, t, r) {
|
|
83
86
|
var q;
|
|
84
|
-
const a = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n =
|
|
87
|
+
const a = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n = we(e, t);
|
|
85
88
|
if (n) {
|
|
86
|
-
const y = t !== "pending" && (t == null ? void 0 : t.status) === "blocked" ?
|
|
89
|
+
const y = t !== "pending" && (t == null ? void 0 : t.status) === "blocked" ? De(t) : void 0, v = y ? g(y, c.textChars) : void 0;
|
|
87
90
|
return {
|
|
88
91
|
// A card that runs but is not described still changes when it runs differently.
|
|
89
|
-
fingerprint: $(a ? F(a, r.calendar) : { reason: n, message:
|
|
90
|
-
description: { status: "not_described", reason: n, ...
|
|
92
|
+
fingerprint: $(a ? F(a, r.calendar) : { reason: n, message: v }),
|
|
93
|
+
description: { status: "not_described", reason: n, ...v ? { message: v } : {} }
|
|
91
94
|
};
|
|
92
95
|
}
|
|
93
|
-
const s = a,
|
|
96
|
+
const s = a, i = s.queryContext, u = Ae(s), o = Ee(s, r), m = Le(s), d = Me(s), l = i.drillSteps.map((y) => g(
|
|
94
97
|
`${JSON.stringify(y.label)} (then by ${y.toField.label || y.toField.name})`,
|
|
95
|
-
|
|
96
|
-
)), f = (q = s.card.sql) == null ? void 0 : q.trim(),
|
|
97
|
-
fields: I(
|
|
98
|
-
filters: I(
|
|
99
|
-
controls: I(
|
|
100
|
-
drillSteps: I(
|
|
101
|
-
sqlParameters: I(
|
|
102
|
-
comparisons: I(
|
|
103
|
-
},
|
|
98
|
+
c.textChars
|
|
99
|
+
)), f = (q = s.card.sql) == null ? void 0 : q.trim(), h = f ? Pe(s) : [], b = {
|
|
100
|
+
fields: I(u.length, c.cardFields),
|
|
101
|
+
filters: I(o.length, c.cardFilters),
|
|
102
|
+
controls: I(m.length, c.cardControls),
|
|
103
|
+
drillSteps: I(l.length, c.drillSteps),
|
|
104
|
+
sqlParameters: I(h.length, c.sqlParameters),
|
|
105
|
+
comparisons: I(d.length, c.cardFields)
|
|
106
|
+
}, p = Object.fromEntries(Object.entries(b).filter(([, y]) => y > 0));
|
|
104
107
|
return {
|
|
105
108
|
fingerprint: $(F(s, r.calendar)),
|
|
106
109
|
description: {
|
|
107
110
|
status: "described",
|
|
108
|
-
fields:
|
|
109
|
-
filters:
|
|
110
|
-
controls:
|
|
111
|
-
drillPath:
|
|
111
|
+
fields: u.slice(0, c.cardFields),
|
|
112
|
+
filters: o.slice(0, c.cardFilters),
|
|
113
|
+
controls: m.slice(0, c.cardControls),
|
|
114
|
+
drillPath: l.slice(0, c.drillSteps),
|
|
112
115
|
...f ? {
|
|
113
116
|
sql: {
|
|
114
|
-
text: g(f,
|
|
115
|
-
parameters:
|
|
117
|
+
text: g(f, c.sqlChars),
|
|
118
|
+
parameters: h.slice(0, c.sqlParameters)
|
|
116
119
|
}
|
|
117
120
|
} : {},
|
|
118
|
-
...
|
|
119
|
-
...Object.keys(
|
|
121
|
+
...d.length ? { comparisons: d.slice(0, c.cardFields) } : {},
|
|
122
|
+
...Object.keys(p).length ? { omitted: p } : {}
|
|
120
123
|
}
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
|
-
function
|
|
126
|
+
function we(e, t) {
|
|
124
127
|
if (e.type === "matrixTable") return "matrix";
|
|
125
|
-
if (e.type === "custom" ||
|
|
126
|
-
if (
|
|
128
|
+
if (e.type === "custom" || ye(e)) return "custom_visual";
|
|
129
|
+
if (be(e.python ?? "").trim()) return "python";
|
|
127
130
|
if (t === "pending") return "snapshot_pending";
|
|
128
131
|
if ((t == null ? void 0 : t.status) !== "ready") return "snapshot_blocked";
|
|
129
132
|
}
|
|
130
|
-
function
|
|
133
|
+
function De(e) {
|
|
131
134
|
if (e.message) return e.message;
|
|
132
135
|
const t = e.mappingDispositions.flatMap((r) => r.status === "block" ? [`${r.inputId} (${r.reason})`] : []);
|
|
133
136
|
return t.length ? `dashboard inputs that cannot apply to this card: ${t.join(", ")}` : void 0;
|
|
134
137
|
}
|
|
135
138
|
function F(e, t) {
|
|
136
|
-
return
|
|
139
|
+
return de(e.card, e.queryContext, t).queryInputIdentity;
|
|
137
140
|
}
|
|
138
|
-
const
|
|
141
|
+
const Fe = [
|
|
139
142
|
["row", "rows"],
|
|
140
143
|
["column", "columns"],
|
|
141
144
|
["measure", "metrics"],
|
|
142
145
|
["detail", "details"]
|
|
143
146
|
];
|
|
144
|
-
function
|
|
145
|
-
const { fields: t } =
|
|
147
|
+
function Ae(e) {
|
|
148
|
+
const { fields: t } = Ce({
|
|
146
149
|
type: e.card.type,
|
|
147
150
|
config: e.queryContext.finalConfig
|
|
148
151
|
});
|
|
149
|
-
return
|
|
150
|
-
const s = n.aggregate,
|
|
152
|
+
return Fe.flatMap(([r, a]) => t[a].map((n) => {
|
|
153
|
+
const s = n.aggregate, i = n.granularity;
|
|
151
154
|
return {
|
|
152
155
|
role: r,
|
|
153
|
-
label: g(n.label || n.name,
|
|
154
|
-
name: g(n.name,
|
|
156
|
+
label: g(n.label || n.name, c.labelChars),
|
|
157
|
+
name: g(n.name, c.labelChars),
|
|
155
158
|
...s ? { aggregate: s } : {},
|
|
156
|
-
...
|
|
159
|
+
...i ? { granularity: i } : {}
|
|
157
160
|
};
|
|
158
161
|
}));
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function Me(e) {
|
|
161
164
|
const t = e.queryContext;
|
|
162
165
|
return (t.finalConfig.metricColumns ?? []).flatMap((r) => {
|
|
163
|
-
const a =
|
|
166
|
+
const a = ge({
|
|
164
167
|
metricComparison: r.comparison,
|
|
165
168
|
globalDateComparison: t.globalDateComparison
|
|
166
169
|
});
|
|
167
|
-
return a ? [g(
|
|
170
|
+
return a ? [g(qe(Te(r.label || r.name), a), c.textChars)] : [];
|
|
168
171
|
});
|
|
169
172
|
}
|
|
170
|
-
function
|
|
173
|
+
function Te(e) {
|
|
171
174
|
return JSON.stringify(e);
|
|
172
175
|
}
|
|
173
|
-
function
|
|
174
|
-
const r = e.queryContext, a = { maxListedValues:
|
|
175
|
-
[...r.queryFilterDefinitions, ...n].map((
|
|
176
|
-
),
|
|
177
|
-
const
|
|
176
|
+
function Ee(e, { calendar: t }) {
|
|
177
|
+
const r = e.queryContext, a = { maxListedValues: c.inputValues, timeZone: t.tz }, n = e.card.inlineFilters ?? [], s = new Set(n.map((d) => d.id)), i = new Map(
|
|
178
|
+
[...r.queryFilterDefinitions, ...n].map((d) => [d.id, d.title])
|
|
179
|
+
), u = r.cardFilterValues.map((d) => {
|
|
180
|
+
const l = i.get(d.filterId) || d.name, f = d.dateOwner === "global_date" ? `${l} (the dashboard date, on this card's field ${d.name})` : `${l} (field ${d.name})`, h = R(d, f, a);
|
|
178
181
|
return {
|
|
179
|
-
origin: s.has(
|
|
180
|
-
text: g(
|
|
181
|
-
...
|
|
182
|
+
origin: s.has(d.filterId) ? "card_input" : "dashboard_input",
|
|
183
|
+
text: g(h.text, c.textChars),
|
|
184
|
+
...h.omittedValues ? { omittedValues: h.omittedValues } : {}
|
|
182
185
|
};
|
|
183
|
-
}),
|
|
184
|
-
origin:
|
|
185
|
-
text: g(f.text,
|
|
186
|
+
}), o = r.resolvedFilterParts, m = [["card", o.authored], ["drill", o.drill], ["selection", o.selections]].flatMap(([d, l]) => Se(l, a).map((f) => ({
|
|
187
|
+
origin: d,
|
|
188
|
+
text: g(f.text, c.textChars),
|
|
186
189
|
...f.omittedValues ? { omittedValues: f.omittedValues } : {}
|
|
187
190
|
})));
|
|
188
|
-
return [...
|
|
191
|
+
return [...u, ...m];
|
|
189
192
|
}
|
|
190
|
-
function
|
|
191
|
-
const t = e.queryContext, r =
|
|
193
|
+
function Oe(e) {
|
|
194
|
+
const t = e.queryContext, r = L({
|
|
192
195
|
sql: e.card.sql,
|
|
193
196
|
controlBindings: t.controlBindings
|
|
194
197
|
});
|
|
@@ -201,36 +204,36 @@ function Fe(e) {
|
|
|
201
204
|
sqlParameterIds: r.filter((s) => s.controlId === n).map((s) => s.paramId)
|
|
202
205
|
}));
|
|
203
206
|
}
|
|
204
|
-
function
|
|
207
|
+
function Le(e) {
|
|
205
208
|
const t = e.queryContext, r = new Map(
|
|
206
209
|
[...t.controlDefinitions, ...t.cardControlDefinitions].map((a) => [a.id, a])
|
|
207
210
|
);
|
|
208
|
-
return
|
|
209
|
-
var
|
|
210
|
-
const
|
|
211
|
-
...n.filter((
|
|
212
|
-
...s.map((
|
|
211
|
+
return Oe(e).map(({ id: a, bindings: n, sqlParameterIds: s }) => {
|
|
212
|
+
var o;
|
|
213
|
+
const i = t.controlValues[a], u = /* @__PURE__ */ new Set([
|
|
214
|
+
...n.filter((m) => m.target !== "sql_param").map((m) => Re(m, i)),
|
|
215
|
+
...s.map((m) => `SQL parameter ${m}`)
|
|
213
216
|
]);
|
|
214
217
|
return {
|
|
215
|
-
label: g(((
|
|
218
|
+
label: g(((o = r.get(a)) == null ? void 0 : o.label) || a, c.labelChars),
|
|
216
219
|
valueText: g(
|
|
217
|
-
`${_(
|
|
218
|
-
|
|
220
|
+
`${_(i, { maxListedValues: c.inputValues }).text}${u.size ? `; ${[...u].join("; ")}` : ""}`,
|
|
221
|
+
c.textChars
|
|
219
222
|
)
|
|
220
223
|
};
|
|
221
224
|
});
|
|
222
225
|
}
|
|
223
|
-
function
|
|
226
|
+
function Pe(e) {
|
|
224
227
|
const t = e.queryContext;
|
|
225
|
-
return
|
|
226
|
-
name: g(r.paramId,
|
|
228
|
+
return L({ sql: e.card.sql, controlBindings: t.controlBindings }).map((r) => ({
|
|
229
|
+
name: g(r.paramId, c.labelChars),
|
|
227
230
|
valueText: g(
|
|
228
|
-
_(t.controlValues[r.controlId], { maxListedValues:
|
|
229
|
-
|
|
231
|
+
_(t.controlValues[r.controlId], { maxListedValues: c.inputValues }).text,
|
|
232
|
+
c.textChars
|
|
230
233
|
)
|
|
231
234
|
}));
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function Re(e, t) {
|
|
234
237
|
const r = typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : void 0;
|
|
235
238
|
switch (e.target) {
|
|
236
239
|
case "sql_param":
|
|
@@ -250,15 +253,15 @@ function Te(e, t) {
|
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
255
|
}
|
|
253
|
-
class
|
|
256
|
+
class V extends Error {
|
|
254
257
|
constructor(r, a) {
|
|
255
258
|
super(a);
|
|
256
259
|
k(this, "code");
|
|
257
260
|
this.name = "AssistantContextSourceError", this.code = r;
|
|
258
261
|
}
|
|
259
262
|
}
|
|
260
|
-
const C =
|
|
261
|
-
function
|
|
263
|
+
const C = P, je = "Untitled";
|
|
264
|
+
function Be(e) {
|
|
262
265
|
var b;
|
|
263
266
|
if (e.surface === "none")
|
|
264
267
|
return A({
|
|
@@ -269,20 +272,20 @@ function Oe(e) {
|
|
|
269
272
|
cards: [],
|
|
270
273
|
timeZone: e.timeZone
|
|
271
274
|
});
|
|
272
|
-
const { dashboard: t, sheetId: r, calendar: a } = e, n = t.sheets ?? [], s = n.find((
|
|
275
|
+
const { dashboard: t, sheetId: r, calendar: a } = e, n = t.sheets ?? [], s = n.find((p) => p.id === r);
|
|
273
276
|
if (r !== null && !s)
|
|
274
|
-
throw new
|
|
275
|
-
const
|
|
276
|
-
if (e.selectedCard && !
|
|
277
|
-
throw new
|
|
277
|
+
throw new V("sheet_not_found", `sheet ${r} is not on dashboard ${t.id}`);
|
|
278
|
+
const i = n.filter((p) => p.id !== r), u = s ? S(t).filter((p) => p.sheetId === r) : [], o = u.slice(0, C.summaryCards), m = e.selectedCard ? u.find((p) => p.cardId === e.selectedCard.cardId) : void 0, d = ((b = e.selectedCard) == null ? void 0 : b.card) ?? (m == null ? void 0 : m.card);
|
|
279
|
+
if (e.selectedCard && !d)
|
|
280
|
+
throw new V(
|
|
278
281
|
"card_not_on_sheet",
|
|
279
282
|
`card ${e.selectedCard.cardId} is not on sheet ${r}`
|
|
280
283
|
);
|
|
281
|
-
const
|
|
282
|
-
otherSheets: I(
|
|
283
|
-
activeInputs: I(
|
|
284
|
-
cards: I(
|
|
285
|
-
},
|
|
284
|
+
const l = s ? Je(e, s, u) : [], f = {
|
|
285
|
+
otherSheets: I(i.length, C.otherSheets),
|
|
286
|
+
activeInputs: I(l.length, C.activeInputs),
|
|
287
|
+
cards: I(u.length, C.summaryCards)
|
|
288
|
+
}, h = Object.fromEntries(Object.entries(f).filter(([, p]) => p > 0));
|
|
286
289
|
return A({
|
|
287
290
|
version: w,
|
|
288
291
|
surface: e.editing ? "editor" : "dashboard",
|
|
@@ -292,28 +295,28 @@ function Oe(e) {
|
|
|
292
295
|
unsavedEdits: e.unsavedEdits
|
|
293
296
|
},
|
|
294
297
|
...s ? { sheet: { id: s.id, title: x(s.title) } } : {},
|
|
295
|
-
otherSheets:
|
|
296
|
-
activeInputs:
|
|
297
|
-
cards:
|
|
298
|
-
...
|
|
298
|
+
otherSheets: i.slice(0, C.otherSheets).map((p) => ({ id: p.id, title: x(p.title) })),
|
|
299
|
+
activeInputs: l.slice(0, C.activeInputs),
|
|
300
|
+
cards: o.map((p) => z(p.card)),
|
|
301
|
+
...d && e.selectedCard ? { selectedCard: Ne(d, e.selectedCard.snapshot, a) } : {},
|
|
299
302
|
...e.editing ? { editing: e.editing } : {},
|
|
300
|
-
...Object.keys(
|
|
303
|
+
...Object.keys(h).length ? { omitted: h } : {},
|
|
301
304
|
timeZone: a.tz
|
|
302
305
|
});
|
|
303
306
|
}
|
|
304
|
-
function
|
|
305
|
-
return { ...z(e), ...
|
|
307
|
+
function Ne(e, t, r) {
|
|
308
|
+
return { ...z(e), ...ke(e, t, { calendar: r }) };
|
|
306
309
|
}
|
|
307
310
|
function A(e) {
|
|
308
|
-
const t =
|
|
309
|
-
if (t > C.contextBytes) throw new
|
|
311
|
+
const t = ue(e);
|
|
312
|
+
if (t > C.contextBytes) throw new fe(t);
|
|
310
313
|
return e;
|
|
311
314
|
}
|
|
312
315
|
function x(e) {
|
|
313
|
-
return g((e == null ? void 0 : e.trim()) ||
|
|
316
|
+
return g((e == null ? void 0 : e.trim()) || je, C.labelChars);
|
|
314
317
|
}
|
|
315
318
|
function z(e) {
|
|
316
|
-
const t =
|
|
319
|
+
const t = ze(e);
|
|
317
320
|
return {
|
|
318
321
|
id: e.id,
|
|
319
322
|
title: x(e.title),
|
|
@@ -321,9 +324,9 @@ function z(e) {
|
|
|
321
324
|
...t ? { source: t } : {}
|
|
322
325
|
};
|
|
323
326
|
}
|
|
324
|
-
function
|
|
327
|
+
function ze(e) {
|
|
325
328
|
var r;
|
|
326
|
-
const t =
|
|
329
|
+
const t = Ie(e);
|
|
327
330
|
if (t.kind === "config")
|
|
328
331
|
return t.executableSources.length === 1 ? t.executableSources[0] : void 0;
|
|
329
332
|
if (t.kind === "sql") {
|
|
@@ -331,46 +334,46 @@ function Pe(e) {
|
|
|
331
334
|
return a ? { kind: "sql", connectionId: a } : void 0;
|
|
332
335
|
}
|
|
333
336
|
}
|
|
334
|
-
function
|
|
335
|
-
const { dashboard: a } = e, n = t.kind === "document" ? "document" : "dashboard", s = n === "document" ? void 0 : e.transientContexts, { shouldApplyDashboardFilters:
|
|
337
|
+
function Je(e, t, r) {
|
|
338
|
+
const { dashboard: a } = e, n = t.kind === "document" ? "document" : "dashboard", s = n === "document" ? void 0 : e.transientContexts, { shouldApplyDashboardFilters: i } = U(s), u = (l, f) => K({
|
|
336
339
|
dashboard: a,
|
|
337
340
|
sheetId: t.id,
|
|
338
|
-
card:
|
|
341
|
+
card: l,
|
|
339
342
|
sectionId: f,
|
|
340
343
|
runtimeValues: e.runtimeValues,
|
|
341
344
|
transientContexts: s,
|
|
342
345
|
calendar: e.calendar
|
|
343
|
-
}),
|
|
344
|
-
|
|
346
|
+
}), o = /* @__PURE__ */ new Map(), m = (l) => {
|
|
347
|
+
l.inputs.forEach((f, h) => {
|
|
345
348
|
if (M(f)) return;
|
|
346
|
-
const b =
|
|
347
|
-
!
|
|
349
|
+
const b = l.resolvedInputs[h], p = o.get(f.id) ?? { input: f };
|
|
350
|
+
!p.resolved && b && Ze(b) && (p.resolved = b), o.set(f.id, p);
|
|
348
351
|
});
|
|
349
352
|
};
|
|
350
|
-
|
|
351
|
-
let
|
|
353
|
+
m(u(null));
|
|
354
|
+
let d = W(a).filter((l) => {
|
|
352
355
|
var f;
|
|
353
|
-
return !M(
|
|
356
|
+
return !M(l) && !((f = o.get(l.id)) != null && f.resolved);
|
|
354
357
|
});
|
|
355
|
-
for (const
|
|
356
|
-
if (
|
|
357
|
-
const f =
|
|
358
|
-
if (
|
|
358
|
+
for (const l of r) {
|
|
359
|
+
if (d.length === 0) break;
|
|
360
|
+
const f = l.kind === "documentSectionCard" ? l.sectionId : void 0, h = { sheetId: t.id, sheetKind: n, cardId: l.cardId, sectionId: f };
|
|
361
|
+
if (d.some((b) => X(b, h))) {
|
|
359
362
|
try {
|
|
360
|
-
|
|
363
|
+
m(u(l.card, f));
|
|
361
364
|
} catch {
|
|
362
365
|
continue;
|
|
363
366
|
}
|
|
364
|
-
|
|
365
|
-
var
|
|
366
|
-
return !((
|
|
367
|
+
d = d.filter((b) => {
|
|
368
|
+
var p;
|
|
369
|
+
return !((p = o.get(b.id)) != null && p.resolved);
|
|
367
370
|
});
|
|
368
371
|
}
|
|
369
372
|
}
|
|
370
|
-
return [...
|
|
371
|
-
if (!
|
|
372
|
-
const f =
|
|
373
|
-
return
|
|
373
|
+
return [...o.values()].flatMap((l) => {
|
|
374
|
+
if (!l.resolved) return [];
|
|
375
|
+
const f = l.input.kind === "filter" && !i && !Y(l.input), h = Ge(l, e.calendar.tz, f);
|
|
376
|
+
return h ? [h] : [];
|
|
374
377
|
});
|
|
375
378
|
}
|
|
376
379
|
function M(e) {
|
|
@@ -378,35 +381,35 @@ function M(e) {
|
|
|
378
381
|
const t = (r = e.compatibility) == null ? void 0 : r.source;
|
|
379
382
|
return t === "cardInlineFilter" || t === "cardControl";
|
|
380
383
|
}
|
|
381
|
-
function
|
|
384
|
+
function Ze(e) {
|
|
382
385
|
if (e.kind === "filter") return !!e.filterValue;
|
|
383
386
|
const t = e.controlValue;
|
|
384
387
|
return t == null ? !1 : typeof t == "string" ? t.trim().length > 0 : Array.isArray(t) ? t.length > 0 : !0;
|
|
385
388
|
}
|
|
386
|
-
function
|
|
387
|
-
const { input: a, resolved: n } = e, s = x(a.label),
|
|
389
|
+
function Ge(e, t, r) {
|
|
390
|
+
const { input: a, resolved: n } = e, s = x(a.label), i = {
|
|
388
391
|
inputId: a.id,
|
|
389
392
|
label: s,
|
|
390
|
-
...a.kind === "filter" &&
|
|
393
|
+
...a.kind === "filter" && H(a.filter) ? { globalDate: !0 } : {}
|
|
391
394
|
};
|
|
392
395
|
if (a.runtimeScope === "perCard" || a.runtimeScope === "perDocumentSection")
|
|
393
|
-
return { ...
|
|
394
|
-
const
|
|
395
|
-
let
|
|
396
|
+
return { ...i, value: { kind: "varies" } };
|
|
397
|
+
const u = { maxListedValues: C.inputValues, timeZone: t };
|
|
398
|
+
let o;
|
|
396
399
|
if ((n == null ? void 0 : n.kind) === "filter" && n.filterValue)
|
|
397
|
-
|
|
400
|
+
o = R(n.filterValue, s, u);
|
|
398
401
|
else if ((n == null ? void 0 : n.kind) === "control") {
|
|
399
|
-
const
|
|
400
|
-
|
|
402
|
+
const d = _(n.controlValue, u);
|
|
403
|
+
o = { text: `${s} is set to ${d.text}`, omittedValues: d.omittedValues };
|
|
401
404
|
}
|
|
402
|
-
if (!
|
|
403
|
-
const
|
|
404
|
-
return (
|
|
405
|
-
...
|
|
405
|
+
if (!o) return;
|
|
406
|
+
const m = (n == null ? void 0 : n.kind) === "filter" ? n.comparisonSelection : void 0;
|
|
407
|
+
return (m == null ? void 0 : m.mode) === "period" && (o = { ...o, text: `${o.text}; compared with ${N(m.spec)}` }), {
|
|
408
|
+
...i,
|
|
406
409
|
value: {
|
|
407
410
|
kind: "set",
|
|
408
|
-
text: g(
|
|
409
|
-
...
|
|
411
|
+
text: g(o.text, C.textChars),
|
|
412
|
+
...o.omittedValues ? { omittedValues: o.omittedValues } : {},
|
|
410
413
|
...r ? { notApplied: "opened_from_another_dashboard" } : {},
|
|
411
414
|
// The resolved value itself, with any date comparison on it and whether
|
|
412
415
|
// the view applies it, so any change counts, shown or not.
|
|
@@ -416,10 +419,10 @@ function Be(e, t, r) {
|
|
|
416
419
|
}
|
|
417
420
|
};
|
|
418
421
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
422
|
+
function ft(e) {
|
|
423
|
+
return Qe(e).context;
|
|
421
424
|
}
|
|
422
|
-
function
|
|
425
|
+
function Qe(e) {
|
|
423
426
|
const { place: t, calendar: r } = e, a = T(e.dashboard), n = E({ dashboard: a, host: {}, calendar: r, materializeInputs: !1 }), s = {
|
|
424
427
|
...O(
|
|
425
428
|
a,
|
|
@@ -427,31 +430,31 @@ function Ne(e) {
|
|
|
427
430
|
r
|
|
428
431
|
),
|
|
429
432
|
cardViewState: t.cardViewState ?? {}
|
|
430
|
-
},
|
|
433
|
+
}, i = t.cardId ? Ke(a, t.cardId) : void 0, u = i ? J({
|
|
431
434
|
dashboard: a,
|
|
432
|
-
location:
|
|
435
|
+
location: i,
|
|
433
436
|
runtimeValues: s,
|
|
434
437
|
semanticExecutionPayload: e.semanticExecutionPayload,
|
|
435
438
|
calendar: r,
|
|
436
439
|
withRequest: !0
|
|
437
|
-
}) : void 0,
|
|
440
|
+
}) : void 0, o = Be({
|
|
438
441
|
surface: "dashboard",
|
|
439
442
|
dashboard: a,
|
|
440
443
|
// A sheet that does not hold the card is refused by the projection.
|
|
441
|
-
sheetId: t.sheetId ?? (
|
|
444
|
+
sheetId: t.sheetId ?? (i == null ? void 0 : i.sheetId) ?? n.selectedSheetId,
|
|
442
445
|
unsavedEdits: !1,
|
|
443
446
|
runtimeValues: s,
|
|
444
447
|
transientContexts: void 0,
|
|
445
|
-
...
|
|
448
|
+
...i && u !== void 0 ? { selectedCard: { cardId: i.cardId, snapshot: u } } : {},
|
|
446
449
|
calendar: r
|
|
447
450
|
});
|
|
448
451
|
return {
|
|
449
|
-
context:
|
|
450
|
-
...
|
|
452
|
+
context: o,
|
|
453
|
+
...o.selectedCard && u !== void 0 ? { cardReplay: Ue({ dashboard: a, cardId: o.selectedCard.id, snapshot: u }) } : {}
|
|
451
454
|
};
|
|
452
455
|
}
|
|
453
|
-
function
|
|
454
|
-
const t = e.dashboard ?
|
|
456
|
+
function Ue(e) {
|
|
457
|
+
const t = e.dashboard ? S(e.dashboard).find((a) => a.cardId === e.cardId) : void 0, r = Z({
|
|
455
458
|
card: e.card ?? (t == null ? void 0 : t.card),
|
|
456
459
|
snapshot: e.snapshot,
|
|
457
460
|
documentSection: (t == null ? void 0 : t.kind) === "documentSectionCard"
|
|
@@ -464,15 +467,15 @@ function ze(e) {
|
|
|
464
467
|
}
|
|
465
468
|
};
|
|
466
469
|
}
|
|
467
|
-
function
|
|
468
|
-
const r =
|
|
470
|
+
function Ke(e, t) {
|
|
471
|
+
const r = S(e).find((a) => a.cardId === t);
|
|
469
472
|
if (!r)
|
|
470
|
-
throw new
|
|
473
|
+
throw new V("card_not_found", `card ${t} is not on dashboard ${e.id}`);
|
|
471
474
|
return r;
|
|
472
475
|
}
|
|
473
476
|
function J(e) {
|
|
474
|
-
const { dashboard: t, location: r, runtimeValues: a } = e, n = r.kind === "documentSectionCard" ?
|
|
475
|
-
return
|
|
477
|
+
const { dashboard: t, location: r, runtimeValues: a } = e, n = r.kind === "documentSectionCard" ? Xe(t, r) : void 0;
|
|
478
|
+
return ne({
|
|
476
479
|
dashboard: t,
|
|
477
480
|
cardId: r.cardId,
|
|
478
481
|
cardOverride: r.card,
|
|
@@ -506,44 +509,68 @@ function Z(e) {
|
|
|
506
509
|
if (t.matrix) return { status: "unavailable", reason: "matrix" };
|
|
507
510
|
if (!t.request) return { status: "unavailable", reason: "no_query" };
|
|
508
511
|
try {
|
|
509
|
-
const { connectionId: a, requestPayloadBase: n } =
|
|
512
|
+
const { connectionId: a, requestPayloadBase: n } = le(t.card, t.request);
|
|
510
513
|
return { status: "ready", request: { cardId: t.card.id, connectionId: a, payload: n } };
|
|
511
514
|
} catch {
|
|
512
515
|
return { status: "unavailable", reason: "no_query" };
|
|
513
516
|
}
|
|
514
517
|
}
|
|
515
|
-
function
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
518
|
+
function We(e, t, r) {
|
|
519
|
+
const a = E({
|
|
520
|
+
dashboard: e,
|
|
521
|
+
host: { filterValues: t.filterValues, controlValues: t.controlValues },
|
|
522
|
+
calendar: r,
|
|
523
|
+
materializeInputs: !1
|
|
524
|
+
}), n = t.dashboardInputExecutionSnapshot, s = {
|
|
520
525
|
...O(
|
|
521
|
-
|
|
522
|
-
{
|
|
523
|
-
|
|
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
|
|
524
538
|
),
|
|
525
|
-
cardViewState: {}
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
|
|
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), {
|
|
546
|
+
controlContractOverrides: r.controlContract,
|
|
547
|
+
cardId: e.cardId
|
|
548
|
+
}) : e.dashboard
|
|
549
|
+
), n = S(a).find((m) => m.cardId === e.cardId);
|
|
550
|
+
if (!n) return { status: "refused", reason: "card_not_found" };
|
|
551
|
+
if (n.kind === "documentSectionCard") return { status: "refused", reason: "document_section" };
|
|
552
|
+
const { runtimeValues: s, transientContexts: i } = We(a, r, t), u = J({
|
|
553
|
+
dashboard: a,
|
|
554
|
+
location: n,
|
|
529
555
|
runtimeValues: s,
|
|
530
556
|
semanticExecutionPayload: e.semanticExecutionPayload,
|
|
531
557
|
calendar: t,
|
|
558
|
+
transientContexts: i,
|
|
532
559
|
withRequest: !0
|
|
533
560
|
});
|
|
534
|
-
if (!
|
|
535
|
-
const
|
|
536
|
-
return
|
|
561
|
+
if (!u) return { status: "refused", reason: "card_not_found" };
|
|
562
|
+
const o = Z({ card: n.card, snapshot: u, documentSection: !1 });
|
|
563
|
+
return o.status === "ready" ? o : o.reason === "pending" ? { status: "refused", reason: "blocked" } : {
|
|
537
564
|
status: "refused",
|
|
538
|
-
reason:
|
|
539
|
-
...
|
|
565
|
+
reason: o.reason,
|
|
566
|
+
...o.message ? { message: o.message } : {}
|
|
540
567
|
};
|
|
541
568
|
}
|
|
542
|
-
function
|
|
569
|
+
function Xe(e, t) {
|
|
543
570
|
var a, n, s;
|
|
544
|
-
const r = (a = e.sheets) == null ? void 0 : a.find((
|
|
545
|
-
if ((s = (n = r == null ? void 0 : r.document) == null ? void 0 : n.inputs) != null && s.length &&
|
|
546
|
-
throw new
|
|
571
|
+
const r = (a = e.sheets) == null ? void 0 : a.find((i) => i.id === t.sheetId);
|
|
572
|
+
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 V(
|
|
547
574
|
"document_inputs_not_built",
|
|
548
575
|
`card ${t.cardId} runs with the document's own inputs on sheet ${t.sheetId}, which only the page builds`
|
|
549
576
|
);
|
|
@@ -556,11 +583,11 @@ function Ze(e, t) {
|
|
|
556
583
|
};
|
|
557
584
|
}
|
|
558
585
|
export {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
586
|
+
V as A,
|
|
587
|
+
Ue as a,
|
|
588
|
+
mt as b,
|
|
562
589
|
Z as c,
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
590
|
+
ft as d,
|
|
591
|
+
Qe as e,
|
|
592
|
+
Be as p
|
|
566
593
|
};
|