react-semaphor 0.1.539 → 0.1.541
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/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +63 -54
- package/dist/brand-studio/index.js +1 -1
- package/dist/briefings/index.js +41 -38
- package/dist/chunks/add-to-dashboard-BuAqfA2Y.js +80 -0
- package/dist/chunks/{aggregate-table-row-presentation-BjK9YfMI.js → aggregate-table-row-presentation-B_vQjYR3.js} +319 -302
- package/dist/chunks/{assistant-chat-DgiSuFT4.js → assistant-chat-D1fDZD6O.js} +2448 -2228
- package/dist/chunks/{context-HD9usB1P.js → context-ClREvqCZ.js} +101 -102
- package/dist/chunks/{dashboard-y5BwcvzT.js → dashboard-B6IrON_Q.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Bl3gCeBR.js → dashboard-briefing-launcher-DwjFpewq.js} +117 -117
- package/dist/chunks/{dashboard-controls-0EX0HiJt.js → dashboard-controls-C_BI28ME.js} +6 -6
- package/dist/chunks/{dashboard-json-6X_2BDiL.js → dashboard-json-DDY15Trn.js} +2 -2
- package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-DP_Op5mu.js} +1168 -1166
- package/dist/chunks/{edit-dashboard-visual-Bzchfgga.js → edit-dashboard-visual-CH2dzWW-.js} +5 -5
- package/dist/chunks/{index-CqMiAkay.js → index-DaQlghLY.js} +547 -511
- package/dist/chunks/report-preferences-dialog-DpNkFfQO.js +1950 -0
- package/dist/chunks/{saved-dashboard-context-Dqve2jlB.js → saved-dashboard-context-CJ2WpoMF.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-ldcwmLoY.js → semaphor-ready-indicator-KT598QJq.js} +33482 -33334
- package/dist/chunks/{shelf-drop-preview-context-BWxunXTq.js → shelf-drop-preview-context-BxV3Fl8h.js} +3 -3
- package/dist/chunks/{switch-CvItuC1Q.js → switch-DWEWiv1J.js} +53 -52
- package/dist/chunks/{use-create-flow-overlay-state-RHgzVfcz.js → use-create-flow-overlay-state-DdD12SMY.js} +3 -3
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +582 -568
- package/dist/format-utils/index.js +117 -114
- package/dist/index.js +11 -11
- package/dist/pdf-export-policy/index.js +20 -10
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
- package/dist/types/briefings/index.d.ts +1 -0
- package/dist/types/components/assistant/assistant-entry-points.d.ts +3 -0
- package/dist/types/components/assistant/assistant-store.d.ts +49 -1
- package/dist/types/components/assistant/use-assistant.d.ts +10 -1
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
- package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
- package/dist/types/lib/types/common-types.d.ts +7 -0
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +88 -66
- package/dist/types/shared/assistant-protocol/conversation.d.ts +3 -0
- package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +2 -0
- package/dist/types/shared/assistant-protocol/request.d.ts +6 -1
- package/dist/types/shared/assistant-protocol/tagged-fields.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
- package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
- package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
- package/package.json +2 -1
- package/dist/chunks/add-to-dashboard-CxtTfISD.js +0 -56
- package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +0 -1808
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
2
|
var q = (e, a, i) => a in e ? T(e, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[a] = i;
|
|
3
|
-
var
|
|
3
|
+
var b = (e, a, i) => q(e, typeof a != "symbol" ? a + "" : a, i);
|
|
4
4
|
import { z as t } from "zod";
|
|
5
5
|
import { s as k } from "./analytics-base-schemas-BFAoRlkU.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
6
|
+
const J = 1;
|
|
7
|
+
function $(e) {
|
|
8
8
|
return `You've used ${e === void 0 ? "today's questions" : `today's ${e} questions`}. They reset tomorrow. To keep going, contact your administrator.`;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return e === "daily_limit_reached" ?
|
|
10
|
+
function U(e, a = {}) {
|
|
11
|
+
return e === "daily_limit_reached" ? $(a.dailyLimit) : y[e];
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const y = {
|
|
14
14
|
assistant_unavailable: "The assistant is not available here.",
|
|
15
15
|
context_invalid: "Something on this page changed. Try again.",
|
|
16
16
|
context_too_large: "There is too much on this page to send with your question. Ask about one card, or clear some filters.",
|
|
17
17
|
conversation_not_found: "This conversation has ended. Start a new one.",
|
|
18
18
|
conversation_full: "This conversation is full. Start a new one.",
|
|
19
19
|
turn_in_progress: "Still answering your last question.",
|
|
20
|
-
daily_limit_reached:
|
|
20
|
+
daily_limit_reached: $(),
|
|
21
21
|
budget_exhausted: "This question needed more steps than one answer allows. Try asking for less at once.",
|
|
22
22
|
not_permitted: "You do not have access to the data this needs.",
|
|
23
23
|
no_data_found: "No data matched this question.",
|
|
@@ -36,6 +36,8 @@ const v = {
|
|
|
36
36
|
inputValues: 50,
|
|
37
37
|
addedSources: 50,
|
|
38
38
|
cardFields: 60,
|
|
39
|
+
/** Fields of the asked-about card tagged in one question (Phase 11). */
|
|
40
|
+
taggedFields: 5,
|
|
39
41
|
cardFilters: 40,
|
|
40
42
|
cardControls: 40,
|
|
41
43
|
drillSteps: 10,
|
|
@@ -53,67 +55,65 @@ const v = {
|
|
|
53
55
|
// rows kept on an artifact (D4-6: several fit in a conversation's 1 MB)
|
|
54
56
|
conversationTtlSeconds: 24 * 60 * 60
|
|
55
57
|
};
|
|
56
|
-
function
|
|
58
|
+
function Y(e) {
|
|
57
59
|
return new TextEncoder().encode(JSON.stringify(e)).length;
|
|
58
60
|
}
|
|
59
|
-
function
|
|
61
|
+
function z(e, a) {
|
|
60
62
|
if (e.length <= a) return e;
|
|
61
63
|
const i = (r) => ` [${r} more characters not shown]`, s = a - i(e.length).length;
|
|
62
64
|
return `${e.slice(0, s)}${i(e.length - s)}`;
|
|
63
65
|
}
|
|
64
|
-
class
|
|
66
|
+
class G extends Error {
|
|
65
67
|
constructor(i) {
|
|
66
|
-
super(
|
|
67
|
-
|
|
68
|
+
super(y.context_too_large);
|
|
69
|
+
b(this, "code", "context_too_large");
|
|
68
70
|
this.bytes = i, this.name = "AssistantContextTooLargeError";
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
const A = 1,
|
|
73
|
+
const A = 1, n = j, p = t.string().min(1).max(n.idChars), h = t.string().max(n.labelChars), u = t.string().max(n.textChars), g = t.number().int().positive(), v = t.string().min(1).max(100), S = t.object({ id: p, title: h }).strict(), N = t.object({
|
|
72
74
|
inputId: p,
|
|
73
75
|
label: h,
|
|
74
76
|
value: t.discriminatedUnion("kind", [
|
|
75
77
|
t.object({
|
|
76
78
|
kind: t.literal("set"),
|
|
77
79
|
text: u,
|
|
78
|
-
omittedValues:
|
|
80
|
+
omittedValues: g.optional(),
|
|
79
81
|
notApplied: t.literal("opened_from_another_dashboard").optional(),
|
|
80
|
-
fingerprint:
|
|
82
|
+
fingerprint: v
|
|
81
83
|
}).strict(),
|
|
82
84
|
t.object({ kind: t.literal("varies") }).strict()
|
|
83
85
|
]),
|
|
84
86
|
globalDate: t.literal(!0).optional()
|
|
85
|
-
}).strict(),
|
|
87
|
+
}).strict(), I = {
|
|
86
88
|
id: p,
|
|
87
89
|
title: h,
|
|
88
90
|
visualType: t.string().max(100),
|
|
89
91
|
source: k.optional()
|
|
90
|
-
}, E = t.object(
|
|
92
|
+
}, E = t.object(I).strict(), _ = (e) => t.object(Object.fromEntries(e.map((a) => [a, g.optional()]))).strict().optional(), F = t.object({
|
|
93
|
+
role: t.enum(["row", "column", "measure", "detail"]),
|
|
94
|
+
label: h,
|
|
95
|
+
name: h,
|
|
96
|
+
aggregate: t.string().max(40).optional(),
|
|
97
|
+
granularity: t.string().max(40).optional()
|
|
98
|
+
}).strict(), L = t.discriminatedUnion("status", [
|
|
91
99
|
t.object({
|
|
92
100
|
status: t.literal("described"),
|
|
93
|
-
fields: t.array(
|
|
94
|
-
t.object({
|
|
95
|
-
role: t.enum(["row", "column", "measure", "detail"]),
|
|
96
|
-
label: h,
|
|
97
|
-
name: h,
|
|
98
|
-
aggregate: t.string().max(40).optional(),
|
|
99
|
-
granularity: t.string().max(40).optional()
|
|
100
|
-
}).strict()
|
|
101
|
-
).max(d.cardFields),
|
|
101
|
+
fields: t.array(F).max(n.cardFields),
|
|
102
102
|
filters: t.array(
|
|
103
103
|
t.object({
|
|
104
104
|
origin: t.enum(["dashboard_input", "card_input", "card", "drill", "selection"]),
|
|
105
105
|
text: u,
|
|
106
|
-
omittedValues:
|
|
106
|
+
omittedValues: g.optional()
|
|
107
107
|
}).strict()
|
|
108
|
-
).max(
|
|
109
|
-
controls: t.array(t.object({ label: h, valueText: u }).strict()).max(
|
|
110
|
-
drillPath: t.array(u).max(
|
|
108
|
+
).max(n.cardFilters),
|
|
109
|
+
controls: t.array(t.object({ label: h, valueText: u }).strict()).max(n.cardControls),
|
|
110
|
+
drillPath: t.array(u).max(n.drillSteps),
|
|
111
111
|
sql: t.object({
|
|
112
|
-
text: t.string().max(
|
|
113
|
-
parameters: t.array(t.object({ name: h, valueText: u }).strict()).max(
|
|
112
|
+
text: t.string().max(n.sqlChars),
|
|
113
|
+
parameters: t.array(t.object({ name: h, valueText: u }).strict()).max(n.sqlParameters)
|
|
114
114
|
}).strict().optional(),
|
|
115
|
-
comparisons: t.array(u).max(
|
|
116
|
-
omitted:
|
|
115
|
+
comparisons: t.array(u).max(n.cardFields).optional(),
|
|
116
|
+
omitted: _(["fields", "filters", "controls", "drillSteps", "sqlParameters", "comparisons"])
|
|
117
117
|
}).strict(),
|
|
118
118
|
t.object({
|
|
119
119
|
status: t.literal("not_described"),
|
|
@@ -121,10 +121,10 @@ const A = 1, d = j, p = t.string().min(1).max(d.idChars), h = t.string().max(d.l
|
|
|
121
121
|
message: u.optional()
|
|
122
122
|
}).strict()
|
|
123
123
|
]), P = t.object({
|
|
124
|
-
...
|
|
125
|
-
fingerprint:
|
|
124
|
+
...I,
|
|
125
|
+
fingerprint: v,
|
|
126
126
|
description: L
|
|
127
|
-
}).strict(),
|
|
127
|
+
}).strict(), H = t.object({
|
|
128
128
|
version: t.literal(A),
|
|
129
129
|
surface: t.enum(["dashboard", "editor", "none"]),
|
|
130
130
|
dashboard: t.object({
|
|
@@ -132,13 +132,13 @@ const A = 1, d = j, p = t.string().min(1).max(d.idChars), h = t.string().max(d.l
|
|
|
132
132
|
title: h,
|
|
133
133
|
unsavedEdits: t.boolean()
|
|
134
134
|
}).strict().optional(),
|
|
135
|
-
sheet:
|
|
136
|
-
otherSheets: t.array(
|
|
137
|
-
activeInputs: t.array(N).max(
|
|
138
|
-
cards: t.array(E).max(
|
|
135
|
+
sheet: S.optional(),
|
|
136
|
+
otherSheets: t.array(S).max(n.otherSheets),
|
|
137
|
+
activeInputs: t.array(N).max(n.activeInputs),
|
|
138
|
+
cards: t.array(E).max(n.summaryCards),
|
|
139
139
|
selectedCard: P.optional(),
|
|
140
140
|
editing: t.object({ mode: t.enum(["visual", "sql"]) }).strict().optional(),
|
|
141
|
-
omitted:
|
|
141
|
+
omitted: _(["otherSheets", "activeInputs", "cards"]),
|
|
142
142
|
timeZone: t.string().min(1).max(100)
|
|
143
143
|
}).strict().superRefine((e, a) => {
|
|
144
144
|
e.surface !== "none" && !e.dashboard && a.addIssue({
|
|
@@ -155,7 +155,7 @@ const A = 1, d = j, p = t.string().min(1).max(d.idChars), h = t.string().max(d.l
|
|
|
155
155
|
message: "required on the editor surface, and only there"
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
|
-
function
|
|
158
|
+
function X(e, a) {
|
|
159
159
|
if (!e) return [];
|
|
160
160
|
const i = [];
|
|
161
161
|
e.surface !== a.surface && i.push({
|
|
@@ -173,11 +173,11 @@ function G(e, a) {
|
|
|
173
173
|
...s ? { fromCardId: s.id } : {},
|
|
174
174
|
...r ? { toCardId: r.id } : {}
|
|
175
175
|
}) : s && r && s.fingerprint !== r.fingerprint && i.push({ kind: "card_changed", cardId: r.id });
|
|
176
|
-
const
|
|
176
|
+
const d = R(
|
|
177
177
|
e.activeInputs ?? [],
|
|
178
178
|
a.activeInputs
|
|
179
179
|
);
|
|
180
|
-
return
|
|
180
|
+
return d.length > 0 && i.push({ kind: "inputs_changed", inputIds: d }), i;
|
|
181
181
|
}
|
|
182
182
|
function R(e, a) {
|
|
183
183
|
const i = (o) => o ? o.value.kind === "set" ? o.value.fingerprint : "varies" : void 0, s = new Map(e.map((o) => [o.inputId, o])), r = new Map(a.map((o) => [o.inputId, o]));
|
|
@@ -185,21 +185,21 @@ function R(e, a) {
|
|
|
185
185
|
(o) => i(s.get(o)) !== i(r.get(o))
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
var r,
|
|
188
|
+
function K(e, a, i) {
|
|
189
|
+
var r, d, o;
|
|
190
190
|
const s = [];
|
|
191
191
|
if (e.surface === "none" || !e.dashboard)
|
|
192
192
|
s.push(
|
|
193
193
|
"The user is not looking at a dashboard. Answer from the sources they added; if none fit, find the data with the discovery tools or ask which data to use."
|
|
194
194
|
);
|
|
195
195
|
else {
|
|
196
|
-
const
|
|
196
|
+
const c = e.surface === "editor" ? "editing a visual on" : "looking at";
|
|
197
197
|
s.push(
|
|
198
|
-
`The user is ${
|
|
198
|
+
`The user is ${c} the dashboard ${l(e.dashboard.title)} (id ${e.dashboard.id})${e.dashboard.unsavedEdits ? ", which has unsaved edits" : ""}.`
|
|
199
199
|
), e.sheet && s.push(
|
|
200
|
-
`Current sheet: ${
|
|
200
|
+
`Current sheet: ${l(e.sheet.title)} (id ${e.sheet.id}).`
|
|
201
201
|
), e.otherSheets.length > 0 && s.push(
|
|
202
|
-
`Other sheets: ${e.otherSheets.map((
|
|
202
|
+
`Other sheets: ${e.otherSheets.map((C) => l(C.title)).join(", ")}${m((r = e.omitted) == null ? void 0 : r.otherSheets, "sheets")}.`
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
205
|
if (e.activeInputs.length > 0) {
|
|
@@ -207,81 +207,78 @@ function H(e, a, i) {
|
|
|
207
207
|
"",
|
|
208
208
|
"Dashboard inputs with a value (which of them a card applies is in that card's description when the user asks about it):"
|
|
209
209
|
);
|
|
210
|
-
for (const
|
|
211
|
-
s.push(`- ${
|
|
212
|
-
(
|
|
210
|
+
for (const c of e.activeInputs)
|
|
211
|
+
s.push(`- ${O(c)}`);
|
|
212
|
+
(d = e.omitted) != null && d.activeInputs && s.push(`- ${e.omitted.activeInputs} more inputs are not listed.`);
|
|
213
213
|
}
|
|
214
214
|
if (e.cards.length > 0) {
|
|
215
215
|
s.push("", "Cards on this sheet:");
|
|
216
|
-
for (const
|
|
217
|
-
s.push(`- ${
|
|
216
|
+
for (const c of e.cards)
|
|
217
|
+
s.push(`- ${f(c)}`);
|
|
218
218
|
(o = e.omitted) != null && o.cards && s.push(`- ${e.omitted.cards} more cards are not listed.`);
|
|
219
219
|
}
|
|
220
|
-
if (e.selectedCard && s.push("", ...
|
|
220
|
+
if (e.selectedCard && s.push("", ...M(e.selectedCard, e.editing)), i.length > 0) {
|
|
221
221
|
s.push("", "Sources the user added:");
|
|
222
|
-
for (const
|
|
223
|
-
s.push(`- ${
|
|
222
|
+
for (const c of i)
|
|
223
|
+
s.push(`- ${w(c)}`);
|
|
224
224
|
}
|
|
225
225
|
if (a.length > 0) {
|
|
226
226
|
s.push("", "Since the last question:");
|
|
227
|
-
for (const
|
|
228
|
-
s.push(`- ${
|
|
227
|
+
for (const c of a)
|
|
228
|
+
s.push(`- ${Q(c, e)}`);
|
|
229
229
|
}
|
|
230
230
|
return s.push("", `The user's time zone is ${e.timeZone}.`), s.join(`
|
|
231
231
|
`);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function x(e) {
|
|
234
|
+
const a = [e.name, e.aggregate, e.granularity ? `by ${e.granularity}` : void 0].filter(Boolean);
|
|
235
|
+
return `${e.role} ${l(e.label)} (${a.join(", ")})`;
|
|
236
|
+
}
|
|
237
|
+
function l(e) {
|
|
234
238
|
return JSON.stringify(e);
|
|
235
239
|
}
|
|
236
240
|
function m(e, a) {
|
|
237
241
|
return e ? `, and ${e} more ${a}` : "";
|
|
238
242
|
}
|
|
239
|
-
function
|
|
240
|
-
return `${
|
|
243
|
+
function f(e) {
|
|
244
|
+
return `${l(e.title)} (card id ${e.id}, ${e.visualType})${e.source ? ` from ${w(e.source)}` : ""}`;
|
|
241
245
|
}
|
|
242
|
-
function
|
|
246
|
+
function O(e) {
|
|
243
247
|
const { value: a } = e;
|
|
244
|
-
return a.kind === "varies" ? `${
|
|
248
|
+
return a.kind === "varies" ? `${l(e.label)}: differs by card; ask about a card to see its value` : a.notApplied ? `${a.text} (not applied in this view: it was opened from another dashboard without this dashboard's own filters)` : `${a.text}${e.globalDate ? ", applied to each card's own date field, on cards that have one" : ""}`;
|
|
245
249
|
}
|
|
246
|
-
const
|
|
250
|
+
const B = {
|
|
247
251
|
matrix: "it is a Matrix card",
|
|
248
252
|
custom_visual: "it is a custom visual",
|
|
249
253
|
python: "it is computed with Python",
|
|
250
254
|
snapshot_blocked: "the dashboard could not compile it",
|
|
251
255
|
snapshot_pending: "it was still loading when the question was sent"
|
|
252
|
-
},
|
|
256
|
+
}, D = {
|
|
253
257
|
dashboard_input: "dashboard input",
|
|
254
258
|
card_input: "the card's own input",
|
|
255
259
|
card: "the card's own filter",
|
|
256
260
|
drill: "drill",
|
|
257
261
|
selection: "selection on another card"
|
|
258
262
|
};
|
|
259
|
-
function
|
|
260
|
-
var
|
|
263
|
+
function M(e, a) {
|
|
264
|
+
var d;
|
|
261
265
|
const i = a ? [
|
|
262
|
-
`The user is editing the visual ${
|
|
263
|
-
] : [`The user is asking about the card ${
|
|
266
|
+
`The user is editing the visual ${f(e)} in ${a.mode === "sql" ? "SQL" : "visual"} mode. What follows is their draft as it is on screen, which may not be saved: fromCard on this card runs the draft, and its rows are the draft's, not the saved card's. You cannot change the visual; to help change it, explain the steps in the editor or write SQL for them to paste.`
|
|
267
|
+
] : [`The user is asking about the card ${f(e)}.`], s = e.description;
|
|
264
268
|
if (s.status === "not_described")
|
|
265
269
|
return i.push(
|
|
266
|
-
`How this card is built is not available to you: ${
|
|
270
|
+
`How this card is built is not available to you: ${B[s.reason]}${s.message ? ` (${s.message})` : ""}. Answer with the tools, and say that you could not read the card's definition.`
|
|
267
271
|
), i;
|
|
268
272
|
const r = s.omitted ?? {};
|
|
269
273
|
if (i.push(a ? "What the draft runs, as the editor compiled it:" : "What the card runs, as the dashboard compiled it:"), s.fields.length > 0) {
|
|
270
|
-
const o = s.fields.map(
|
|
271
|
-
const f = [
|
|
272
|
-
n.name,
|
|
273
|
-
n.aggregate,
|
|
274
|
-
n.granularity ? `by ${n.granularity}` : void 0
|
|
275
|
-
].filter(Boolean);
|
|
276
|
-
return `${n.role} ${c(n.label)} (${f.join(", ")})`;
|
|
277
|
-
});
|
|
274
|
+
const o = s.fields.map(x);
|
|
278
275
|
i.push(`- Fields: ${o.join("; ")}${m(r.fields, "fields not listed")}.`);
|
|
279
276
|
} else
|
|
280
277
|
i.push("- Fields: none.");
|
|
281
278
|
if (s.filters.length > 0) {
|
|
282
279
|
i.push("- Filters, all applied together:");
|
|
283
280
|
for (const o of s.filters)
|
|
284
|
-
i.push(` - ${
|
|
281
|
+
i.push(` - ${D[o.origin]}: ${o.text}`);
|
|
285
282
|
r.filters && i.push(` - ${r.filters} more filters are not listed.`);
|
|
286
283
|
} else
|
|
287
284
|
i.push("- Filters: none.");
|
|
@@ -290,12 +287,12 @@ function B(e, a) {
|
|
|
290
287
|
), s.controls.length > 0) {
|
|
291
288
|
i.push("- Controls:");
|
|
292
289
|
for (const o of s.controls)
|
|
293
|
-
i.push(` - ${
|
|
290
|
+
i.push(` - ${l(o.label)}: ${o.valueText}`);
|
|
294
291
|
r.controls && i.push(` - ${r.controls} more controls are not listed.`);
|
|
295
292
|
}
|
|
296
293
|
if (s.sql && (i.push("- SQL:", "```sql", s.sql.text, "```"), s.sql.parameters.length > 0 && i.push(
|
|
297
294
|
`- SQL parameters: ${s.sql.parameters.map((o) => `${o.name} = ${o.valueText}`).join("; ")}${m(r.sqlParameters, "parameters")}.`
|
|
298
|
-
)), (
|
|
295
|
+
)), (d = s.comparisons) != null && d.length) {
|
|
299
296
|
i.push("- Comparisons (the windows are known only once a query runs):");
|
|
300
297
|
for (const o of s.comparisons) i.push(` - ${o}`);
|
|
301
298
|
r.comparisons && i.push(` - ${r.comparisons} more comparisons are not listed.`);
|
|
@@ -304,46 +301,48 @@ function B(e, a) {
|
|
|
304
301
|
"This lists the card's fields, filters, drill path, controls, SQL and comparisons; it does not include the card's sorting, row limit or calculated-field formulas. A query you build yourself can differ from the card."
|
|
305
302
|
), i;
|
|
306
303
|
}
|
|
307
|
-
function
|
|
304
|
+
function w(e) {
|
|
308
305
|
switch (e.kind) {
|
|
309
306
|
case "semantic":
|
|
310
|
-
return `dataset ${
|
|
307
|
+
return `dataset ${l(e.label ?? e.datasetName)} (domainId ${e.domainId}, datasetName ${e.datasetName})`;
|
|
311
308
|
case "physical":
|
|
312
309
|
return `table ${[e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".")} (connectionId ${e.connectionId})`;
|
|
313
310
|
case "sql":
|
|
314
|
-
return `SQL on ${e.label ?
|
|
311
|
+
return `SQL on ${e.label ? l(e.label) : "a connection"} (connectionId ${e.connectionId})`;
|
|
315
312
|
}
|
|
316
313
|
}
|
|
317
|
-
function
|
|
314
|
+
function Q(e, a) {
|
|
318
315
|
var i;
|
|
319
316
|
switch (e.kind) {
|
|
320
317
|
case "surface_changed":
|
|
321
318
|
return `the user moved from the ${e.from} view to the ${e.to} view.`;
|
|
322
319
|
case "sheet_changed":
|
|
323
|
-
return `the user switched sheets (now ${
|
|
320
|
+
return `the user switched sheets (now ${l(((i = a.sheet) == null ? void 0 : i.title) ?? e.toSheetId)}).`;
|
|
324
321
|
case "selection_changed":
|
|
325
322
|
return e.toCardId ? `the user is now asking about card ${e.toCardId}.` : "the user is no longer asking about a specific card.";
|
|
326
323
|
case "card_changed":
|
|
327
324
|
return `card ${e.cardId} now runs differently (its fields, filters, controls or SQL changed).`;
|
|
328
325
|
case "inputs_changed":
|
|
329
326
|
return `these dashboard inputs changed: ${e.inputIds.map((r) => {
|
|
330
|
-
const
|
|
331
|
-
return
|
|
327
|
+
const d = a.activeInputs.find((o) => o.inputId === r);
|
|
328
|
+
return d ? l(d.label) : `input ${r} (now cleared)`;
|
|
332
329
|
}).join(", ")}.`;
|
|
333
330
|
}
|
|
334
331
|
}
|
|
335
332
|
export {
|
|
336
333
|
j as A,
|
|
337
|
-
|
|
338
|
-
|
|
334
|
+
H as a,
|
|
335
|
+
F as b,
|
|
339
336
|
Y as c,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
337
|
+
G as d,
|
|
338
|
+
A as e,
|
|
339
|
+
z as f,
|
|
340
|
+
X as g,
|
|
341
|
+
x as h,
|
|
342
|
+
w as i,
|
|
343
|
+
J as j,
|
|
344
|
+
$ as k,
|
|
345
|
+
U as l,
|
|
346
|
+
y as m,
|
|
347
|
+
K as r
|
|
349
348
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { E as o, F as d, S as i, B as s, a as c, U as l, D as t, C as h, b as f } from "./semaphor-ready-indicator-
|
|
2
|
+
import { E as o, F as d, S as i, B as s, a as c, U as l, D as t, C as h, b as f } from "./semaphor-ready-indicator-KT598QJq.js";
|
|
3
3
|
function p(e) {
|
|
4
4
|
if (typeof window > "u")
|
|
5
5
|
return null;
|