react-semaphor 0.1.441 → 0.1.443
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/brand-studio/index.js +1 -1
- package/dist/chunks/{code-editor-CIWiSltV.js → code-editor-BpADiIlq.js} +26 -26
- package/dist/chunks/{dashboard--bQrQeiz.js → dashboard-Bd1Quco-.js} +4987 -4901
- package/dist/chunks/{dashboard-briefing-launcher-dgTjPWHX.js → dashboard-briefing-launcher-BYMLjZxG.js} +6 -11
- package/dist/chunks/{dashboard-briefing-launcher-xulAb1Oz.js → dashboard-briefing-launcher-C60n8LqW.js} +165 -176
- package/dist/chunks/{dashboard-C-eTAAKs.js → dashboard-cB3xmTNn.js} +77 -77
- package/dist/chunks/{dashboard-controls-D8BDZ5_q.js → dashboard-controls-BH_fZYDU.js} +1 -1
- package/dist/chunks/{dashboard-controls-CWu1wt6_.js → dashboard-controls-ti9Rcel2.js} +4 -4
- package/dist/chunks/{dashboard-json-ZgLCrrSW.js → dashboard-json-Bturr634.js} +2 -2
- package/dist/chunks/{dashboard-json-Bpm-ePrD.js → dashboard-json-Dw_55vSZ.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-BUc3NBQ4.js +182 -0
- package/dist/chunks/{edit-dashboard-visual-DEtVA2re.js → edit-dashboard-visual-DglMds57.js} +8260 -7877
- package/dist/chunks/{use-create-flow-overlay-state-B6a3gmF0.js → editor-action-buttons-CRi0fhVW.js} +887 -870
- package/dist/chunks/editor-action-buttons-Cxo7_tNG.js +16 -0
- package/dist/chunks/{report-preferences-dialog-Ju8DjgyW.js → report-preferences-dialog-CCvFqH4Q.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-Bjj_tIgL.js → report-preferences-dialog-TtwdAuNn.js} +2 -2
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +66 -66
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-BCMupXbq.js +0 -182
- package/dist/chunks/use-create-flow-overlay-state-wcIRGLSM.js +0 -11
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
2
|
-
import jt, { useState as E, useEffect as J, useMemo as ee, useContext as
|
|
3
|
-
import { aH as
|
|
4
|
-
import { B, O as
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import jt, { useState as E, useEffect as J, useMemo as ee, useContext as Wt, useRef as he, useCallback as q } from "react";
|
|
3
|
+
import { aH as Se, aI as De, aK as ke, bb as Ct, b_ as Ht, co as Gt, cp as Kt, aZ as fe, cc as wt, bm as Ve, y as qt, w as Xt, cq as Yt, aP as Je, aS as et, aT as tt, aU as rt, aV as at, aW as nt, aX as st, aY as Nt, bl as ot, aG as O, cr as Zt, cs as Qt, ct as Ke, cd as Oe, ce as ze, cu as St, cf as _e, bY as K, b1 as Jt, bD as Re, cv as er, bX as tr, aJ as it, aL as lt, cw as rr, aF as ar, ba as nr, by as Dt, cx as sr, b$ as or, av as ir, aM as lr, b3 as cr, az as $e, at as ue, a6 as ct, a3 as kt, a2 as dt, as as At, a4 as dr, Y as ur, cj as hr, cy as mr, bw as pr, N as ft, R as fr, au as gr, cz as br, cA as xr, cB as vr, cC as yr, cD as Cr, cE as wr, cF as Nr, cG as Sr, cH as Et, cI as Dr, b4 as kr, cJ as Ar, cg as It, cK as Er, cL as Ir, cM as Be, cN as Fr, cO as Lr, cP as Br, o as Tr, aj as Vr, ae as Rr, T as Ur, ad as Pr, aa as Mr, Z as Or, a9 as zr, cQ as _r, cR as $r, cS as jr, cT as Wr, cU as Hr, B as Gr, cV as Kr, cW as qr, a1 as Xr, cX as Yr, cY as Zr, cZ as Qr } from "./dashboard-Bd1Quco-.js";
|
|
4
|
+
import { B, O as Ne, Z as Ze, L as te, M as Ft, d as Lt, c as X, K as Jr, E as ge, u as P, A as be, aH as gt, av as Bt, au as Qe, D as Tt, S as ut, P as Ue, a as Pe, b as Me, aI as ea, aJ as ta, aK as ra, aL as aa, aM as na, aF as sa } from "./code-editor-BpADiIlq.js";
|
|
5
5
|
import { L as ht } from "./layout-grid-D5tYJg1-.js";
|
|
6
|
-
import { c as
|
|
7
|
-
import { u as mt, V as oa, E as qe, a as Xe, b as ia, c as la, L as ca, d as da, e as Rt, C as Ut,
|
|
6
|
+
import { c as Ae, X as je, C as Vt } from "./index-xHCrHprY.js";
|
|
7
|
+
import { u as mt, V as oa, E as qe, a as Xe, b as ia, c as la, L as ca, d as da, e as Rt, C as Ut, F as ua, f as ha } from "./editor-action-buttons-CRi0fhVW.js";
|
|
8
8
|
import "./analyze-result-contract-CfOBEwaC.js";
|
|
9
9
|
import "../value-format-preferences/index.js";
|
|
10
|
-
import { S as
|
|
10
|
+
import { S as ma } from "./search-DHZCro8B.js";
|
|
11
11
|
import { j as bt } from "./csv-utils-BZDvO2Fw.js";
|
|
12
12
|
import "./index-If0wlXGi.js";
|
|
13
13
|
import "./comparison-document-migration-Dj6xZMCb.js";
|
|
14
14
|
import "react-dom";
|
|
15
|
-
import { getBriefingPresentation as se, describeBriefingSchedule as
|
|
15
|
+
import { getBriefingPresentation as se, describeBriefingSchedule as pa, getBriefingCreationIntents as fa } from "../briefings/index.js";
|
|
16
16
|
/**
|
|
17
17
|
* @license lucide-react v0.453.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const ga = Ae("ArrowUpRight", [
|
|
23
23
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
24
24
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
25
25
|
]);
|
|
@@ -29,7 +29,7 @@ const fa = xe("ArrowUpRight", [
|
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
31
|
*/
|
|
32
|
-
const
|
|
32
|
+
const ba = Ae("CalendarRange", [
|
|
33
33
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
34
34
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
35
35
|
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
@@ -45,7 +45,7 @@ const ga = xe("CalendarRange", [
|
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
|
-
const
|
|
48
|
+
const xa = Ae("CircleX", [
|
|
49
49
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
50
50
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
51
51
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -56,7 +56,7 @@ const ba = xe("CircleX", [
|
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/
|
|
59
|
-
const xt =
|
|
59
|
+
const xt = Ae("FileDown", [
|
|
60
60
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
61
61
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
62
62
|
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
@@ -68,18 +68,7 @@ const xt = xe("FileDown", [
|
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
70
|
*/
|
|
71
|
-
const
|
|
72
|
-
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
73
|
-
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
74
|
-
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
75
|
-
]);
|
|
76
|
-
/**
|
|
77
|
-
* @license lucide-react v0.453.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/
|
|
82
|
-
const va = xe("Newspaper", [
|
|
71
|
+
const va = Ae("Newspaper", [
|
|
83
72
|
[
|
|
84
73
|
"path",
|
|
85
74
|
{
|
|
@@ -122,8 +111,8 @@ function Ca({
|
|
|
122
111
|
}, d = (o) => {
|
|
123
112
|
a(o);
|
|
124
113
|
};
|
|
125
|
-
return /* @__PURE__ */ e(
|
|
126
|
-
|
|
114
|
+
return /* @__PURE__ */ e(Se, { open: t, onOpenChange: d, children: /* @__PURE__ */ r(
|
|
115
|
+
De,
|
|
127
116
|
{
|
|
128
117
|
showCloseButton: !1,
|
|
129
118
|
className: "flex max-w-lg grid-cols-none flex-col gap-0 overflow-hidden rounded-[6px] border-border/60 p-0 shadow-lg",
|
|
@@ -132,7 +121,7 @@ function Ca({
|
|
|
132
121
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
133
122
|
/* @__PURE__ */ e(ht, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
134
123
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
135
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(ke, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
|
|
136
125
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Visual" })
|
|
137
126
|
] })
|
|
138
127
|
] }),
|
|
@@ -152,9 +141,9 @@ function Ca({
|
|
|
152
141
|
/* @__PURE__ */ r("div", { className: "space-y-3 px-4 py-3", children: [
|
|
153
142
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: "Create a saved visual that can be reused across dashboards." }),
|
|
154
143
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
155
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(Ne, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
|
|
156
145
|
/* @__PURE__ */ e(
|
|
157
|
-
|
|
146
|
+
Ze,
|
|
158
147
|
{
|
|
159
148
|
id: "visual-title",
|
|
160
149
|
size: "sm",
|
|
@@ -169,9 +158,9 @@ function Ca({
|
|
|
169
158
|
)
|
|
170
159
|
] }),
|
|
171
160
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
172
|
-
/* @__PURE__ */ e(
|
|
161
|
+
/* @__PURE__ */ e(Ne, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
|
|
173
162
|
/* @__PURE__ */ e(
|
|
174
|
-
|
|
163
|
+
Ze,
|
|
175
164
|
{
|
|
176
165
|
id: "visual-description",
|
|
177
166
|
size: "sm",
|
|
@@ -200,7 +189,7 @@ function Ca({
|
|
|
200
189
|
size: "xs",
|
|
201
190
|
onClick: l,
|
|
202
191
|
disabled: !n.trim() || s,
|
|
203
|
-
children: s ? /* @__PURE__ */ r(
|
|
192
|
+
children: s ? /* @__PURE__ */ r(W, { children: [
|
|
204
193
|
/* @__PURE__ */ e(te, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
205
194
|
"Creating..."
|
|
206
195
|
] }) : "Create library visual"
|
|
@@ -232,7 +221,7 @@ function wa(t, a) {
|
|
|
232
221
|
}
|
|
233
222
|
function Na(t) {
|
|
234
223
|
const a = (t || "").toLowerCase();
|
|
235
|
-
return a.includes("table") ? Ft : a.includes("pie") || a.includes("donut") ?
|
|
224
|
+
return a.includes("table") ? Ft : a.includes("pie") || a.includes("donut") ? Zt : a.includes("line") ? Qt : a.includes("bar") ? Jr : ht;
|
|
236
225
|
}
|
|
237
226
|
function Sa({ visual: t }) {
|
|
238
227
|
const a = t.ownership.status === "public" ? "Public" : t.ownership.status === "shared" || t.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
@@ -250,15 +239,15 @@ function Un({
|
|
|
250
239
|
c(/* @__PURE__ */ new Set()), d(null), f(null), p(!1), y(null);
|
|
251
240
|
}, g = () => {
|
|
252
241
|
a(!1), N();
|
|
253
|
-
}, { selectVisual: S } = Ct(), { handleAddLibraryVisual: k, handleEditLibraryVisual: U } = mt(), { isConsoleMode: b } =
|
|
242
|
+
}, { selectVisual: S } = Ct(), { handleAddLibraryVisual: k, handleEditLibraryVisual: U } = mt(), { isConsoleMode: b } = Ht(), {
|
|
254
243
|
resources: x,
|
|
255
244
|
isLoading: T,
|
|
256
245
|
isError: F,
|
|
257
|
-
createResource:
|
|
246
|
+
createResource: H,
|
|
258
247
|
updateResource: A,
|
|
259
248
|
deleteResourceAsync: V,
|
|
260
249
|
duplicateResource: j,
|
|
261
|
-
isCreating:
|
|
250
|
+
isCreating: xe,
|
|
262
251
|
isDeleting: G
|
|
263
252
|
} = Gt(
|
|
264
253
|
void 0,
|
|
@@ -266,27 +255,27 @@ function Un({
|
|
|
266
255
|
m(!1), v && (S(v), U(v), g());
|
|
267
256
|
}
|
|
268
257
|
), {
|
|
269
|
-
startUpdating:
|
|
270
|
-
stopUpdating:
|
|
271
|
-
isUpdating:
|
|
272
|
-
} = Kt(),
|
|
258
|
+
startUpdating: We,
|
|
259
|
+
stopUpdating: ve,
|
|
260
|
+
isUpdating: He
|
|
261
|
+
} = Kt(), Z = x, z = ee(() => {
|
|
273
262
|
const v = i.trim().toLowerCase();
|
|
274
|
-
return v ?
|
|
263
|
+
return v ? Z.filter(
|
|
275
264
|
(L) => {
|
|
276
265
|
var M, ae, oe;
|
|
277
266
|
return ((M = L.title) == null ? void 0 : M.toLowerCase().includes(v)) || ((ae = L.description) == null ? void 0 : ae.toLowerCase().includes(v)) || ((oe = L.kind) == null ? void 0 : oe.toLowerCase().includes(v));
|
|
278
267
|
}
|
|
279
|
-
) :
|
|
280
|
-
}, [i,
|
|
281
|
-
() =>
|
|
268
|
+
) : Z;
|
|
269
|
+
}, [i, Z]), re = ee(
|
|
270
|
+
() => Z.filter(
|
|
282
271
|
(v) => n.has(v.id)
|
|
283
272
|
),
|
|
284
|
-
[n,
|
|
273
|
+
[n, Z]
|
|
285
274
|
), ie = re.filter(
|
|
286
275
|
(v) => v.permissions.canDelete
|
|
287
276
|
), le = re.filter(
|
|
288
277
|
(v) => v.permissions.canShare
|
|
289
|
-
),
|
|
278
|
+
), ye = z.length > 0 && z.every(
|
|
290
279
|
(v) => n.has(v.id)
|
|
291
280
|
), Ee = z.some(
|
|
292
281
|
(v) => n.has(v.id)
|
|
@@ -297,16 +286,16 @@ function Un({
|
|
|
297
286
|
ce((L) => {
|
|
298
287
|
L.has(v) ? L.delete(v) : L.add(v);
|
|
299
288
|
});
|
|
300
|
-
},
|
|
289
|
+
}, Q = () => {
|
|
301
290
|
c((v) => {
|
|
302
291
|
const L = new Set(v);
|
|
303
|
-
return
|
|
292
|
+
return ye ? z.forEach(
|
|
304
293
|
(M) => L.delete(M.id)
|
|
305
294
|
) : z.forEach(
|
|
306
295
|
(M) => L.add(M.id)
|
|
307
296
|
), L;
|
|
308
297
|
});
|
|
309
|
-
},
|
|
298
|
+
}, Ce = async (v) => {
|
|
310
299
|
(await k(v)).success && g();
|
|
311
300
|
}, _ = async () => {
|
|
312
301
|
const v = re;
|
|
@@ -354,7 +343,7 @@ function Un({
|
|
|
354
343
|
return;
|
|
355
344
|
}
|
|
356
345
|
d(v);
|
|
357
|
-
},
|
|
346
|
+
}, we = ({
|
|
358
347
|
title: v,
|
|
359
348
|
description: L
|
|
360
349
|
}) => {
|
|
@@ -365,26 +354,26 @@ function Un({
|
|
|
365
354
|
return;
|
|
366
355
|
}
|
|
367
356
|
const ae = Object.keys(M), oe = ae.length === 1 ? ae[0] : void 0;
|
|
368
|
-
|
|
357
|
+
We(o.id, oe), A(
|
|
369
358
|
{
|
|
370
359
|
resourceId: o.id,
|
|
371
360
|
data: M
|
|
372
361
|
},
|
|
373
362
|
{
|
|
374
363
|
onSuccess: () => {
|
|
375
|
-
|
|
364
|
+
ve(o.id, oe), f(null);
|
|
376
365
|
},
|
|
377
366
|
onError: () => {
|
|
378
|
-
|
|
367
|
+
ve(o.id, oe);
|
|
379
368
|
}
|
|
380
369
|
}
|
|
381
370
|
);
|
|
382
371
|
}, de = (v) => {
|
|
383
372
|
a(v), v || N();
|
|
384
|
-
},
|
|
385
|
-
return /* @__PURE__ */ r(
|
|
386
|
-
/* @__PURE__ */ e(
|
|
387
|
-
|
|
373
|
+
}, Y = C ? 1 : ie.length;
|
|
374
|
+
return /* @__PURE__ */ r(W, { children: [
|
|
375
|
+
/* @__PURE__ */ e(Se, { open: t, onOpenChange: de, children: /* @__PURE__ */ r(
|
|
376
|
+
De,
|
|
388
377
|
{
|
|
389
378
|
showCloseButton: !1,
|
|
390
379
|
className: "flex max-h-[80vh] w-[min(72rem,calc(100vw-2rem))] max-w-none grid-cols-none flex-col gap-0 overflow-hidden rounded-[6px] border-border/60 p-0 shadow-lg",
|
|
@@ -393,7 +382,7 @@ function Un({
|
|
|
393
382
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
394
383
|
/* @__PURE__ */ e(Ft, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
395
384
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
396
|
-
/* @__PURE__ */ e(
|
|
385
|
+
/* @__PURE__ */ e(ke, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
|
|
397
386
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Add to dashboard" })
|
|
398
387
|
] })
|
|
399
388
|
] }),
|
|
@@ -411,7 +400,7 @@ function Un({
|
|
|
411
400
|
] }),
|
|
412
401
|
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-center gap-2 border-b border-border/60 px-3 py-2", children: [
|
|
413
402
|
/* @__PURE__ */ r("div", { className: "relative min-w-[12rem] flex-1 md:max-w-md", children: [
|
|
414
|
-
/* @__PURE__ */ e(
|
|
403
|
+
/* @__PURE__ */ e(ma, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
415
404
|
/* @__PURE__ */ e(
|
|
416
405
|
"input",
|
|
417
406
|
{
|
|
@@ -447,11 +436,11 @@ function Un({
|
|
|
447
436
|
{
|
|
448
437
|
visuals: z,
|
|
449
438
|
selectedIds: n,
|
|
450
|
-
allFilteredSelected:
|
|
439
|
+
allFilteredSelected: ye,
|
|
451
440
|
someFilteredSelected: Ee,
|
|
452
|
-
onSelectAll:
|
|
441
|
+
onSelectAll: Q,
|
|
453
442
|
onToggleSelection: me,
|
|
454
|
-
onAddVisual:
|
|
443
|
+
onAddVisual: Ce,
|
|
455
444
|
onOpenVisual: $,
|
|
456
445
|
onEditDetails: f,
|
|
457
446
|
onShareVisual: d,
|
|
@@ -465,7 +454,7 @@ function Un({
|
|
|
465
454
|
}
|
|
466
455
|
) }),
|
|
467
456
|
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border/60 px-3 py-2", children: [
|
|
468
|
-
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center gap-1.5", children: n.size > 0 && /* @__PURE__ */ r(
|
|
457
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center gap-1.5", children: n.size > 0 && /* @__PURE__ */ r(W, { children: [
|
|
469
458
|
/* @__PURE__ */ r("span", { className: "text-[12px] text-muted-foreground", children: [
|
|
470
459
|
/* @__PURE__ */ e("span", { className: "font-medium tabular-nums text-foreground", children: n.size }),
|
|
471
460
|
" ",
|
|
@@ -541,8 +530,8 @@ function Un({
|
|
|
541
530
|
{
|
|
542
531
|
open: u,
|
|
543
532
|
onOpenChange: m,
|
|
544
|
-
onSubmit:
|
|
545
|
-
isCreating:
|
|
533
|
+
onSubmit: H,
|
|
534
|
+
isCreating: xe
|
|
546
535
|
}
|
|
547
536
|
),
|
|
548
537
|
l && /* @__PURE__ */ e(
|
|
@@ -554,15 +543,15 @@ function Un({
|
|
|
554
543
|
}
|
|
555
544
|
),
|
|
556
545
|
o && /* @__PURE__ */ e(
|
|
557
|
-
|
|
546
|
+
Yt,
|
|
558
547
|
{
|
|
559
548
|
open: !!o,
|
|
560
549
|
resourceLabel: "Visual",
|
|
561
550
|
initialTitle: o.title || "",
|
|
562
551
|
initialDescription: o.description || "",
|
|
563
552
|
onClose: () => f(null),
|
|
564
|
-
onSave:
|
|
565
|
-
isSaving:
|
|
553
|
+
onSave: we,
|
|
554
|
+
isSaving: He(o.id)
|
|
566
555
|
}
|
|
567
556
|
),
|
|
568
557
|
/* @__PURE__ */ e(
|
|
@@ -576,9 +565,9 @@ function Un({
|
|
|
576
565
|
/* @__PURE__ */ r(tt, { children: [
|
|
577
566
|
/* @__PURE__ */ r(rt, { children: [
|
|
578
567
|
"Delete ",
|
|
579
|
-
|
|
568
|
+
Y,
|
|
580
569
|
" visual",
|
|
581
|
-
|
|
570
|
+
Y === 1 ? "" : "s",
|
|
582
571
|
"?"
|
|
583
572
|
] }),
|
|
584
573
|
/* @__PURE__ */ e(at, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
@@ -591,7 +580,7 @@ function Un({
|
|
|
591
580
|
onClick: (v) => {
|
|
592
581
|
v.preventDefault(), Ie();
|
|
593
582
|
},
|
|
594
|
-
disabled: G ||
|
|
583
|
+
disabled: G || Y === 0,
|
|
595
584
|
children: [
|
|
596
585
|
G ? /* @__PURE__ */ e(te, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Ve, { className: "h-3.5 w-3.5" }),
|
|
597
586
|
G ? "Deleting..." : "Delete"
|
|
@@ -815,7 +804,7 @@ function Aa({
|
|
|
815
804
|
/* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" }),
|
|
816
805
|
"Share"
|
|
817
806
|
] }),
|
|
818
|
-
t.permissions.canDelete && /* @__PURE__ */ r(
|
|
807
|
+
t.permissions.canDelete && /* @__PURE__ */ r(W, { children: [
|
|
819
808
|
/* @__PURE__ */ e(Re, {}),
|
|
820
809
|
/* @__PURE__ */ r(
|
|
821
810
|
K,
|
|
@@ -892,9 +881,9 @@ function Ea({
|
|
|
892
881
|
saveToCurrentDashboard: h.saveToCurrentDashboard
|
|
893
882
|
});
|
|
894
883
|
};
|
|
895
|
-
return /* @__PURE__ */ e(
|
|
884
|
+
return /* @__PURE__ */ e(Se, { open: t, onOpenChange: a, children: /* @__PURE__ */ r(De, { className: "sm:max-w-[500px]", children: [
|
|
896
885
|
/* @__PURE__ */ r(it, { children: [
|
|
897
|
-
/* @__PURE__ */ r(
|
|
886
|
+
/* @__PURE__ */ r(ke, { className: "flex items-center gap-2", children: [
|
|
898
887
|
/* @__PURE__ */ e("span", { children: "Save Visual As" }),
|
|
899
888
|
h.badgeType !== "local" && /* @__PURE__ */ e(
|
|
900
889
|
oa,
|
|
@@ -909,9 +898,9 @@ function Ea({
|
|
|
909
898
|
] }),
|
|
910
899
|
/* @__PURE__ */ r("div", { className: "grid gap-4 py-4", children: [
|
|
911
900
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
912
|
-
/* @__PURE__ */ e(
|
|
901
|
+
/* @__PURE__ */ e(Ne, { htmlFor: "name", children: "Name" }),
|
|
913
902
|
/* @__PURE__ */ e(
|
|
914
|
-
|
|
903
|
+
Ze,
|
|
915
904
|
{
|
|
916
905
|
id: "name",
|
|
917
906
|
value: m,
|
|
@@ -922,7 +911,7 @@ function Ea({
|
|
|
922
911
|
)
|
|
923
912
|
] }),
|
|
924
913
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
925
|
-
/* @__PURE__ */ e(
|
|
914
|
+
/* @__PURE__ */ e(Ne, { htmlFor: "description", children: "Description (optional)" }),
|
|
926
915
|
/* @__PURE__ */ e(
|
|
927
916
|
rr,
|
|
928
917
|
{
|
|
@@ -993,7 +982,7 @@ function Ia() {
|
|
|
993
982
|
O.error(T);
|
|
994
983
|
return;
|
|
995
984
|
}
|
|
996
|
-
const
|
|
985
|
+
const H = x.cards.length === 1 ? {
|
|
997
986
|
...x,
|
|
998
987
|
cards: x.cards.map((A) => ({
|
|
999
988
|
...A,
|
|
@@ -1005,8 +994,8 @@ function Ia() {
|
|
|
1005
994
|
let A = null;
|
|
1006
995
|
if (b.saveToCurrentDashboard)
|
|
1007
996
|
try {
|
|
1008
|
-
A = await N(
|
|
1009
|
-
previousFrame:
|
|
997
|
+
A = await N(H, {
|
|
998
|
+
previousFrame: Qe(h, H.id)
|
|
1010
999
|
});
|
|
1011
1000
|
} catch (j) {
|
|
1012
1001
|
console.error(
|
|
@@ -1017,26 +1006,26 @@ function Ia() {
|
|
|
1017
1006
|
);
|
|
1018
1007
|
return;
|
|
1019
1008
|
}
|
|
1020
|
-
s(b.saveToCurrentDashboard), c(
|
|
1009
|
+
s(b.saveToCurrentDashboard), c(H), m(A);
|
|
1021
1010
|
const V = {
|
|
1022
1011
|
title: b.name,
|
|
1023
1012
|
description: b.description,
|
|
1024
|
-
frameObject:
|
|
1013
|
+
frameObject: H,
|
|
1025
1014
|
// Card title synced for single-card frames
|
|
1026
1015
|
isPrivate: !1
|
|
1027
1016
|
};
|
|
1028
1017
|
k.mutate(V);
|
|
1029
1018
|
} else if (b.saveToCurrentDashboard) {
|
|
1030
1019
|
const A = {
|
|
1031
|
-
...
|
|
1020
|
+
...H,
|
|
1032
1021
|
// Card title already synced
|
|
1033
1022
|
id: gt(),
|
|
1034
1023
|
visualId: void 0
|
|
1035
1024
|
// Explicitly no visualId for local visuals
|
|
1036
1025
|
};
|
|
1037
1026
|
try {
|
|
1038
|
-
const V = await N(
|
|
1039
|
-
previousFrame:
|
|
1027
|
+
const V = await N(H, {
|
|
1028
|
+
previousFrame: Qe(h, H.id)
|
|
1040
1029
|
});
|
|
1041
1030
|
y(f, A, {
|
|
1042
1031
|
position: "end",
|
|
@@ -1064,7 +1053,7 @@ function Pn(t = {}) {
|
|
|
1064
1053
|
isSaving: x
|
|
1065
1054
|
} = Ia(), { getUpdatedFrame: T } = mt();
|
|
1066
1055
|
if (a)
|
|
1067
|
-
return /* @__PURE__ */ r(
|
|
1056
|
+
return /* @__PURE__ */ r(W, { children: [
|
|
1068
1057
|
/* @__PURE__ */ e(
|
|
1069
1058
|
qe,
|
|
1070
1059
|
{
|
|
@@ -1075,7 +1064,7 @@ function Pn(t = {}) {
|
|
|
1075
1064
|
/* @__PURE__ */ e(Xe, {})
|
|
1076
1065
|
] });
|
|
1077
1066
|
if (y)
|
|
1078
|
-
return /* @__PURE__ */ r(
|
|
1067
|
+
return /* @__PURE__ */ r(W, { children: [
|
|
1079
1068
|
/* @__PURE__ */ e(qe, { className: "rounded-control", variant: "default" }),
|
|
1080
1069
|
/* @__PURE__ */ e(Xe, {})
|
|
1081
1070
|
] });
|
|
@@ -1094,10 +1083,10 @@ function Pn(t = {}) {
|
|
|
1094
1083
|
const j = {
|
|
1095
1084
|
...A,
|
|
1096
1085
|
visualId: void 0
|
|
1097
|
-
},
|
|
1086
|
+
}, xe = Qe(m, j.id);
|
|
1098
1087
|
try {
|
|
1099
1088
|
const G = await C(j, {
|
|
1100
|
-
previousFrame:
|
|
1089
|
+
previousFrame: xe
|
|
1101
1090
|
});
|
|
1102
1091
|
d(u, j, {
|
|
1103
1092
|
semanticExecutionPayload: G
|
|
@@ -1111,10 +1100,10 @@ function Pn(t = {}) {
|
|
|
1111
1100
|
setTimeout(() => {
|
|
1112
1101
|
f(!1), O.success("Changes applied. Visual is now local to this dashboard"), l(!1);
|
|
1113
1102
|
}, 300);
|
|
1114
|
-
},
|
|
1103
|
+
}, H = (A) => {
|
|
1115
1104
|
p(A), S(!0);
|
|
1116
1105
|
};
|
|
1117
|
-
return /* @__PURE__ */ r(
|
|
1106
|
+
return /* @__PURE__ */ r(W, { children: [
|
|
1118
1107
|
/* @__PURE__ */ r("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
1119
1108
|
!D && /* @__PURE__ */ e(qe, { className: "!rounded-none", variant: "default" }),
|
|
1120
1109
|
D && N && /* @__PURE__ */ e(ia, { className: "!rounded-none", variant: "default" }),
|
|
@@ -1137,7 +1126,7 @@ function Pn(t = {}) {
|
|
|
1137
1126
|
align: "end",
|
|
1138
1127
|
className: "min-w-[220px] rounded-control border border-border/60 p-1 shadow-sm",
|
|
1139
1128
|
children: [
|
|
1140
|
-
I && /* @__PURE__ */ r(
|
|
1129
|
+
I && /* @__PURE__ */ r(W, { children: [
|
|
1141
1130
|
/* @__PURE__ */ r(
|
|
1142
1131
|
K,
|
|
1143
1132
|
{
|
|
@@ -1154,7 +1143,7 @@ function Pn(t = {}) {
|
|
|
1154
1143
|
/* @__PURE__ */ r(
|
|
1155
1144
|
K,
|
|
1156
1145
|
{
|
|
1157
|
-
onClick: () =>
|
|
1146
|
+
onClick: () => H("local"),
|
|
1158
1147
|
disabled: x,
|
|
1159
1148
|
children: [
|
|
1160
1149
|
/* @__PURE__ */ e(fe, { className: "h-3.5 w-3.5" }),
|
|
@@ -1165,7 +1154,7 @@ function Pn(t = {}) {
|
|
|
1165
1154
|
/* @__PURE__ */ r(
|
|
1166
1155
|
K,
|
|
1167
1156
|
{
|
|
1168
|
-
onClick: () =>
|
|
1157
|
+
onClick: () => H("library"),
|
|
1169
1158
|
disabled: x,
|
|
1170
1159
|
children: [
|
|
1171
1160
|
/* @__PURE__ */ e(ca, { className: "h-3.5 w-3.5" }),
|
|
@@ -1176,7 +1165,7 @@ function Pn(t = {}) {
|
|
|
1176
1165
|
/* @__PURE__ */ r(
|
|
1177
1166
|
K,
|
|
1178
1167
|
{
|
|
1179
|
-
onClick: () =>
|
|
1168
|
+
onClick: () => H("both"),
|
|
1180
1169
|
disabled: x,
|
|
1181
1170
|
children: [
|
|
1182
1171
|
/* @__PURE__ */ e(da, { className: "h-3.5 w-3.5" }),
|
|
@@ -1207,7 +1196,7 @@ function Pn(t = {}) {
|
|
|
1207
1196
|
] });
|
|
1208
1197
|
}
|
|
1209
1198
|
function Mn({ className: t }) {
|
|
1210
|
-
const a = ge((d) => d.isDevMode), i = P((d) => d.isVisualEditing), { setIsDevMode: s } = Tt(), { config: n } =
|
|
1199
|
+
const a = ge((d) => d.isDevMode), i = P((d) => d.isVisualEditing), { setIsDevMode: s } = Tt(), { config: n } = Wt(lr).tokenProps, c = (n == null ? void 0 : n.showAdvancedMode) !== !1;
|
|
1211
1200
|
if (!i || !c)
|
|
1212
1201
|
return null;
|
|
1213
1202
|
const u = a ? ut : cr, m = a ? "Drag & drop" : "SQL", l = a ? "Switch to drag-and-drop mode" : "Switch to SQL mode";
|
|
@@ -1262,7 +1251,7 @@ function On({
|
|
|
1262
1251
|
}
|
|
1263
1252
|
),
|
|
1264
1253
|
/* @__PURE__ */ e(st, { disabled: n, children: m }),
|
|
1265
|
-
/* @__PURE__ */ e(B, { type: "button", size: "xs", onClick: i, disabled: n, children: n ? /* @__PURE__ */ r(
|
|
1254
|
+
/* @__PURE__ */ e(B, { type: "button", size: "xs", onClick: i, disabled: n, children: n ? /* @__PURE__ */ r(W, { children: [
|
|
1266
1255
|
/* @__PURE__ */ e(te, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
1267
1256
|
"Saving..."
|
|
1268
1257
|
] }) : d })
|
|
@@ -1455,7 +1444,7 @@ function Pa({
|
|
|
1455
1444
|
case "completed":
|
|
1456
1445
|
return /* @__PURE__ */ e(pr, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
1457
1446
|
case "failed":
|
|
1458
|
-
return /* @__PURE__ */ e(
|
|
1447
|
+
return /* @__PURE__ */ e(xa, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
1459
1448
|
default:
|
|
1460
1449
|
return /* @__PURE__ */ e(te, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
1461
1450
|
}
|
|
@@ -1484,7 +1473,7 @@ function Pa({
|
|
|
1484
1473
|
t.totalRows.toLocaleString(),
|
|
1485
1474
|
" rows"
|
|
1486
1475
|
] }),
|
|
1487
|
-
t.fileSize && /* @__PURE__ */ r(
|
|
1476
|
+
t.fileSize && /* @__PURE__ */ r(W, { children: [
|
|
1488
1477
|
/* @__PURE__ */ e("span", { children: "•" }),
|
|
1489
1478
|
/* @__PURE__ */ e("span", { children: ur(t.fileSize) })
|
|
1490
1479
|
] })
|
|
@@ -1798,7 +1787,7 @@ function za({
|
|
|
1798
1787
|
onChange: g,
|
|
1799
1788
|
emptyMessage: "No dashboard controls yet."
|
|
1800
1789
|
}
|
|
1801
|
-
), U = l ? "Add dashboard control" : "Dashboard Controls", b = /* @__PURE__ */ r(
|
|
1790
|
+
), U = l ? "Add dashboard control" : "Dashboard Controls", b = /* @__PURE__ */ r(W, { children: [
|
|
1802
1791
|
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
1803
1792
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
1804
1793
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control." })
|
|
@@ -1820,8 +1809,8 @@ function za({
|
|
|
1820
1809
|
children: b
|
|
1821
1810
|
}
|
|
1822
1811
|
)
|
|
1823
|
-
] }) : /* @__PURE__ */ e(
|
|
1824
|
-
|
|
1812
|
+
] }) : /* @__PURE__ */ e(Se, { open: o, onOpenChange: m, children: /* @__PURE__ */ r(
|
|
1813
|
+
De,
|
|
1825
1814
|
{
|
|
1826
1815
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
1827
1816
|
onEscapeKeyDown: d,
|
|
@@ -1832,7 +1821,7 @@ function za({
|
|
|
1832
1821
|
{
|
|
1833
1822
|
className: l ? "space-y-0" : void 0,
|
|
1834
1823
|
children: [
|
|
1835
|
-
/* @__PURE__ */ e(
|
|
1824
|
+
/* @__PURE__ */ e(ke, { className: "text-[15px]", children: U }),
|
|
1836
1825
|
/* @__PURE__ */ e(
|
|
1837
1826
|
lt,
|
|
1838
1827
|
{
|
|
@@ -1888,7 +1877,7 @@ function $a({
|
|
|
1888
1877
|
() => D.map((x) => x.control),
|
|
1889
1878
|
[D]
|
|
1890
1879
|
), N = ee(
|
|
1891
|
-
() =>
|
|
1880
|
+
() => Wa(I),
|
|
1892
1881
|
[I]
|
|
1893
1882
|
), g = ee(
|
|
1894
1883
|
() => ja(o),
|
|
@@ -1920,15 +1909,15 @@ function $a({
|
|
|
1920
1909
|
h
|
|
1921
1910
|
]
|
|
1922
1911
|
);
|
|
1923
|
-
return !C || !(p != null && p.document) ? null : /* @__PURE__ */ e(
|
|
1924
|
-
|
|
1912
|
+
return !C || !(p != null && p.document) ? null : /* @__PURE__ */ e(Se, { open: l, onOpenChange: c, children: /* @__PURE__ */ r(
|
|
1913
|
+
De,
|
|
1925
1914
|
{
|
|
1926
1915
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
1927
1916
|
onEscapeKeyDown: m,
|
|
1928
1917
|
onPointerDownOutside: m,
|
|
1929
1918
|
children: [
|
|
1930
1919
|
/* @__PURE__ */ r(it, { className: u ? "space-y-0" : void 0, children: [
|
|
1931
|
-
/* @__PURE__ */ e(
|
|
1920
|
+
/* @__PURE__ */ e(ke, { className: "text-[15px]", children: u ? "Add document control" : "Document Controls" }),
|
|
1932
1921
|
/* @__PURE__ */ e(
|
|
1933
1922
|
lt,
|
|
1934
1923
|
{
|
|
@@ -1964,13 +1953,13 @@ function $a({
|
|
|
1964
1953
|
function ja(t) {
|
|
1965
1954
|
return (t.controls || []).map((a) => a.id);
|
|
1966
1955
|
}
|
|
1967
|
-
function
|
|
1956
|
+
function Wa(t) {
|
|
1968
1957
|
const a = {};
|
|
1969
1958
|
for (const i of t)
|
|
1970
1959
|
i.defaultValue !== void 0 && (a[i.id] = i.defaultValue);
|
|
1971
1960
|
return a;
|
|
1972
1961
|
}
|
|
1973
|
-
function
|
|
1962
|
+
function Ha(t, a) {
|
|
1974
1963
|
return a ? Object.prototype.hasOwnProperty.call(a, t.id) ? {
|
|
1975
1964
|
...t,
|
|
1976
1965
|
defaultValue: a[t.id]
|
|
@@ -1987,7 +1976,7 @@ function Ga({
|
|
|
1987
1976
|
const u = new Map(
|
|
1988
1977
|
s.map((h) => [
|
|
1989
1978
|
h.id,
|
|
1990
|
-
|
|
1979
|
+
Ha(h, n)
|
|
1991
1980
|
])
|
|
1992
1981
|
), m = (c == null ? void 0 : c.type) === "rename" ? { oldId: c.oldId, newId: c.newId } : null, l = /* @__PURE__ */ new Set(), d = [];
|
|
1993
1982
|
for (const h of i) {
|
|
@@ -2064,7 +2053,7 @@ function Ka({
|
|
|
2064
2053
|
u
|
|
2065
2054
|
),
|
|
2066
2055
|
children: [
|
|
2067
|
-
t ? /* @__PURE__ */ e(
|
|
2056
|
+
t ? /* @__PURE__ */ e(ua, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Et, { className: "h-3.5 w-3.5" }),
|
|
2068
2057
|
"Filter"
|
|
2069
2058
|
]
|
|
2070
2059
|
}
|
|
@@ -2116,7 +2105,7 @@ function Ka({
|
|
|
2116
2105
|
);
|
|
2117
2106
|
}
|
|
2118
2107
|
function qa() {
|
|
2119
|
-
|
|
2108
|
+
ha();
|
|
2120
2109
|
const t = P((l) => l.selectedSheetId), a = P((l) => l.selectedFrameId), i = P((l) => l.dashboard), s = P((l) => l.actions.getSelectedFrame), { setSelectedFrameId: n } = be(), { setCard: c } = Tt(), u = ge((l) => l.card.dataSource);
|
|
2121
2110
|
return J(() => {
|
|
2122
2111
|
var d, o;
|
|
@@ -2149,7 +2138,7 @@ function Xa() {
|
|
|
2149
2138
|
title: `Applies to ${c.eligibleCardCount} of ${c.totalCardCount} date-aware cards`,
|
|
2150
2139
|
className: "flex w-full items-start gap-2 rounded-[4px] px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
|
|
2151
2140
|
children: [
|
|
2152
|
-
/* @__PURE__ */ e(
|
|
2141
|
+
/* @__PURE__ */ e(ba, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
2153
2142
|
/* @__PURE__ */ r("span", { className: "flex min-w-0 flex-col", children: [
|
|
2154
2143
|
/* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
|
|
2155
2144
|
/* @__PURE__ */ e("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
|
|
@@ -2166,7 +2155,7 @@ function Xa() {
|
|
|
2166
2155
|
] });
|
|
2167
2156
|
}
|
|
2168
2157
|
const yt = !1;
|
|
2169
|
-
function
|
|
2158
|
+
function Ya({
|
|
2170
2159
|
onAddFilter: t,
|
|
2171
2160
|
onAddControl: a,
|
|
2172
2161
|
onManageControls: i,
|
|
@@ -2180,7 +2169,7 @@ function Qa({
|
|
|
2180
2169
|
return n == null || n.showDownloadButton, /* @__PURE__ */ r("div", { className: "w-[300px]", children: [
|
|
2181
2170
|
/* @__PURE__ */ r("div", { className: "p-1", children: [
|
|
2182
2171
|
/* @__PURE__ */ e(
|
|
2183
|
-
|
|
2172
|
+
Ye,
|
|
2184
2173
|
{
|
|
2185
2174
|
icon: Et,
|
|
2186
2175
|
label: "Add filter",
|
|
@@ -2190,7 +2179,7 @@ function Qa({
|
|
|
2190
2179
|
}
|
|
2191
2180
|
),
|
|
2192
2181
|
/* @__PURE__ */ e(
|
|
2193
|
-
|
|
2182
|
+
Ye,
|
|
2194
2183
|
{
|
|
2195
2184
|
icon: ut,
|
|
2196
2185
|
label: "Add control",
|
|
@@ -2200,7 +2189,7 @@ function Qa({
|
|
|
2200
2189
|
}
|
|
2201
2190
|
),
|
|
2202
2191
|
/* @__PURE__ */ e(
|
|
2203
|
-
|
|
2192
|
+
Ye,
|
|
2204
2193
|
{
|
|
2205
2194
|
icon: It,
|
|
2206
2195
|
label: "Manage controls",
|
|
@@ -2215,7 +2204,7 @@ function Qa({
|
|
|
2215
2204
|
/* @__PURE__ */ e("p", { className: "px-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Display" }),
|
|
2216
2205
|
yt,
|
|
2217
2206
|
/* @__PURE__ */ e(
|
|
2218
|
-
|
|
2207
|
+
Za,
|
|
2219
2208
|
{
|
|
2220
2209
|
id: "filter-display-wrap",
|
|
2221
2210
|
label: "Wrap to multiple lines",
|
|
@@ -2227,7 +2216,7 @@ function Qa({
|
|
|
2227
2216
|
] })
|
|
2228
2217
|
] });
|
|
2229
2218
|
}
|
|
2230
|
-
function
|
|
2219
|
+
function Ye({
|
|
2231
2220
|
icon: t,
|
|
2232
2221
|
label: a,
|
|
2233
2222
|
onClick: i
|
|
@@ -2245,7 +2234,7 @@ function Qe({
|
|
|
2245
2234
|
}
|
|
2246
2235
|
);
|
|
2247
2236
|
}
|
|
2248
|
-
function
|
|
2237
|
+
function Za({
|
|
2249
2238
|
id: t,
|
|
2250
2239
|
label: a,
|
|
2251
2240
|
checked: i,
|
|
@@ -2254,7 +2243,7 @@ function Ya({
|
|
|
2254
2243
|
return /* @__PURE__ */ r("div", { className: "flex items-center gap-2 rounded-[4px] px-1 py-1 transition-colors hover:bg-muted/40", children: [
|
|
2255
2244
|
/* @__PURE__ */ e(ot, { id: t, checked: i, onCheckedChange: s }),
|
|
2256
2245
|
/* @__PURE__ */ e(
|
|
2257
|
-
|
|
2246
|
+
Ne,
|
|
2258
2247
|
{
|
|
2259
2248
|
htmlFor: t,
|
|
2260
2249
|
className: "cursor-pointer text-[12px] font-normal leading-[1.3]",
|
|
@@ -2300,7 +2289,7 @@ function jn({
|
|
|
2300
2289
|
}, [I]), k = q(() => {
|
|
2301
2290
|
I("manage");
|
|
2302
2291
|
}, [I]);
|
|
2303
|
-
return /* @__PURE__ */ r(
|
|
2292
|
+
return /* @__PURE__ */ r(W, { children: [
|
|
2304
2293
|
/* @__PURE__ */ e(
|
|
2305
2294
|
Ka,
|
|
2306
2295
|
{
|
|
@@ -2308,7 +2297,7 @@ function jn({
|
|
|
2308
2297
|
onShowFiltersChange: N,
|
|
2309
2298
|
pickerContent: /* @__PURE__ */ e(Xa, {}),
|
|
2310
2299
|
settingsContent: (b) => /* @__PURE__ */ e(
|
|
2311
|
-
|
|
2300
|
+
Ya,
|
|
2312
2301
|
{
|
|
2313
2302
|
onAddFilter: g,
|
|
2314
2303
|
onAddControl: S,
|
|
@@ -2346,7 +2335,7 @@ function jn({
|
|
|
2346
2335
|
) : null
|
|
2347
2336
|
] });
|
|
2348
2337
|
}
|
|
2349
|
-
function
|
|
2338
|
+
function Qa({
|
|
2350
2339
|
disabled: t,
|
|
2351
2340
|
briefingCount: a,
|
|
2352
2341
|
className: i,
|
|
@@ -2390,7 +2379,7 @@ function tn(t) {
|
|
|
2390
2379
|
return u < 5 ? `${u}w ago` : `${Math.round(c / 30)}mo ago`;
|
|
2391
2380
|
}
|
|
2392
2381
|
function rn(t) {
|
|
2393
|
-
return t.scheduleExpr ?
|
|
2382
|
+
return t.scheduleExpr ? pa(
|
|
2394
2383
|
t.scheduleExpr,
|
|
2395
2384
|
t.timezone || "UTC"
|
|
2396
2385
|
) ?? "Invalid schedule" : "On demand";
|
|
@@ -2501,7 +2490,7 @@ function on({
|
|
|
2501
2490
|
"No ",
|
|
2502
2491
|
x,
|
|
2503
2492
|
" yet"
|
|
2504
|
-
] }) : /* @__PURE__ */ r(
|
|
2493
|
+
] }) : /* @__PURE__ */ r(W, { children: [
|
|
2505
2494
|
/* @__PURE__ */ r("span", { className: "font-medium text-foreground/80", children: [
|
|
2506
2495
|
S,
|
|
2507
2496
|
" ",
|
|
@@ -2599,7 +2588,7 @@ function on({
|
|
|
2599
2588
|
className: X(Ot, "h-6 px-1 text-[11px]"),
|
|
2600
2589
|
children: [
|
|
2601
2590
|
"Manage all reports & briefings",
|
|
2602
|
-
/* @__PURE__ */ e(
|
|
2591
|
+
/* @__PURE__ */ e(ga, { className: "h-3 w-3" })
|
|
2603
2592
|
]
|
|
2604
2593
|
}
|
|
2605
2594
|
) }) : null
|
|
@@ -2865,7 +2854,7 @@ function dn({
|
|
|
2865
2854
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
2866
2855
|
/* @__PURE__ */ e(Ir, { className: "h-3 w-3" }),
|
|
2867
2856
|
/* @__PURE__ */ e("span", { className: "truncate", children: rn(t) }),
|
|
2868
|
-
t.lastRunAt ? /* @__PURE__ */ r(
|
|
2857
|
+
t.lastRunAt ? /* @__PURE__ */ r(W, { children: [
|
|
2869
2858
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
2870
2859
|
/* @__PURE__ */ r("span", { children: [
|
|
2871
2860
|
"Last run ",
|
|
@@ -2923,10 +2912,10 @@ function dn({
|
|
|
2923
2912
|
onClick: (C) => {
|
|
2924
2913
|
C.preventDefault(), c();
|
|
2925
2914
|
},
|
|
2926
|
-
children: m ? /* @__PURE__ */ r(
|
|
2915
|
+
children: m ? /* @__PURE__ */ r(W, { children: [
|
|
2927
2916
|
/* @__PURE__ */ e(Lr, { className: "h-3.5 w-3.5" }),
|
|
2928
2917
|
"Resume"
|
|
2929
|
-
] }) : /* @__PURE__ */ r(
|
|
2918
|
+
] }) : /* @__PURE__ */ r(W, { children: [
|
|
2930
2919
|
/* @__PURE__ */ e(Br, { className: "h-3.5 w-3.5" }),
|
|
2931
2920
|
"Pause"
|
|
2932
2921
|
] })
|
|
@@ -3017,10 +3006,10 @@ function xn({
|
|
|
3017
3006
|
}
|
|
3018
3007
|
}), o = he(!1);
|
|
3019
3008
|
return J(() => {
|
|
3020
|
-
o.current || (o.current = !0,
|
|
3021
|
-
}, [a, n, d]), /* @__PURE__ */ e(
|
|
3009
|
+
o.current || (o.current = !0, Yr(a.status) ? d(a) : Zr(a.status) && n(a));
|
|
3010
|
+
}, [a, n, d]), /* @__PURE__ */ e(Qr, { run: m, onExpand: u });
|
|
3022
3011
|
}
|
|
3023
|
-
function
|
|
3012
|
+
function Wn(t) {
|
|
3024
3013
|
return /* @__PURE__ */ e(Tr, { children: /* @__PURE__ */ e(vn, { ...t }) });
|
|
3025
3014
|
}
|
|
3026
3015
|
function vn({
|
|
@@ -3043,18 +3032,18 @@ function vn({
|
|
|
3043
3032
|
o ? "author" : "list"
|
|
3044
3033
|
), [U, b] = E(
|
|
3045
3034
|
o ?? "analytical_briefing"
|
|
3046
|
-
), [x, T] = E("dashboard"), [F,
|
|
3035
|
+
), [x, T] = E("dashboard"), [F, H] = E(
|
|
3047
3036
|
[]
|
|
3048
|
-
), [A, V] = E(null), j = o && !y && !A ? "list" : S, [
|
|
3037
|
+
), [A, V] = E(null), j = o && !y && !A ? "list" : S, [xe, G] = E(!1), [We, ve] = E(null), [He, Z] = E(null), [z, re] = E(
|
|
3049
3038
|
null
|
|
3050
|
-
), [ie, le] = E(null),
|
|
3039
|
+
), [ie, le] = E(null), ye = he(null), Ee = he(N);
|
|
3051
3040
|
J(() => {
|
|
3052
3041
|
const w = N && !Ee.current;
|
|
3053
3042
|
Ee.current = N, !(!w || !o) && (V(null), T("dashboard"), b(o), k("author"), le(null));
|
|
3054
3043
|
}, [N, o]);
|
|
3055
3044
|
const [ce, me] = E(
|
|
3056
3045
|
null
|
|
3057
|
-
), [
|
|
3046
|
+
), [Q, Ce] = E(null), _ = i ?? (p == null ? void 0 : p.apiServiceUrl), $ = s ?? (h == null ? void 0 : h.accessToken), ne = ee(() => ({ ...bn, ...f }), [f]), pe = mn(a), Ie = ee(() => {
|
|
3058
3047
|
const w = fn(
|
|
3059
3048
|
F,
|
|
3060
3049
|
x,
|
|
@@ -3074,15 +3063,15 @@ function vn({
|
|
|
3074
3063
|
source: { type: "project" },
|
|
3075
3064
|
label: "This project",
|
|
3076
3065
|
detail: "Use any data in this project."
|
|
3077
|
-
}, [t, pe, x]),
|
|
3066
|
+
}, [t, pe, x]), we = !!(_ && $), de = fa({
|
|
3078
3067
|
canCreate: C.canCreate,
|
|
3079
3068
|
analyticalBriefingsEnabled: C.analyticalBriefingsEnabled,
|
|
3080
3069
|
scheduledReportAvailable: x === "dashboard"
|
|
3081
|
-
}),
|
|
3070
|
+
}), Y = q(async () => {
|
|
3082
3071
|
if (!(!_ || !$)) {
|
|
3083
3072
|
G(!0), le(null);
|
|
3084
3073
|
try {
|
|
3085
|
-
|
|
3074
|
+
H(
|
|
3086
3075
|
await gn({
|
|
3087
3076
|
apiClient: ne,
|
|
3088
3077
|
apiServiceUrl: _,
|
|
@@ -3099,15 +3088,15 @@ function vn({
|
|
|
3099
3088
|
}
|
|
3100
3089
|
}, [ne, _, $]);
|
|
3101
3090
|
J(() => {
|
|
3102
|
-
!N || j !== "list" || !
|
|
3103
|
-
}, [
|
|
3091
|
+
!N || j !== "list" || !we || Y();
|
|
3092
|
+
}, [we, j, Y, N]);
|
|
3104
3093
|
const v = () => {
|
|
3105
3094
|
V(null), T("dashboard"), k("list"), g(!0);
|
|
3106
3095
|
}, L = (w) => {
|
|
3107
3096
|
V(null), b(w), k("author");
|
|
3108
3097
|
}, M = async (w) => {
|
|
3109
3098
|
if (!(!_ || !$)) {
|
|
3110
|
-
|
|
3099
|
+
ve(w), le(null);
|
|
3111
3100
|
try {
|
|
3112
3101
|
const R = await ne.getBriefing(
|
|
3113
3102
|
_,
|
|
@@ -3120,31 +3109,31 @@ function vn({
|
|
|
3120
3109
|
R instanceof Error ? R.message : "Could not open briefing."
|
|
3121
3110
|
);
|
|
3122
3111
|
} finally {
|
|
3123
|
-
|
|
3112
|
+
ve(null);
|
|
3124
3113
|
}
|
|
3125
3114
|
}
|
|
3126
3115
|
}, ae = async (w) => {
|
|
3127
3116
|
if (!(!_ || !$)) {
|
|
3128
|
-
|
|
3117
|
+
Z(w.id);
|
|
3129
3118
|
try {
|
|
3130
3119
|
await ne.runBriefingNow(
|
|
3131
3120
|
_,
|
|
3132
3121
|
$,
|
|
3133
3122
|
w.id,
|
|
3134
3123
|
{ requestId: yn() }
|
|
3135
|
-
),
|
|
3124
|
+
), Y();
|
|
3136
3125
|
} catch (R) {
|
|
3137
3126
|
O.error(
|
|
3138
3127
|
R instanceof Error ? R.message : "Could not start the run."
|
|
3139
3128
|
);
|
|
3140
3129
|
} finally {
|
|
3141
|
-
|
|
3130
|
+
Z(null);
|
|
3142
3131
|
}
|
|
3143
3132
|
}
|
|
3144
3133
|
}, oe = async (w) => {
|
|
3145
3134
|
if (!_ || !$) return;
|
|
3146
3135
|
const { noun: R } = se(w), Fe = R === "report" ? "Report" : "Briefing";
|
|
3147
|
-
|
|
3136
|
+
Z(w.id);
|
|
3148
3137
|
try {
|
|
3149
3138
|
const Le = w.status === "PAUSED" ? await ne.resumeBriefing(
|
|
3150
3139
|
_,
|
|
@@ -3157,18 +3146,18 @@ function vn({
|
|
|
3157
3146
|
);
|
|
3158
3147
|
O.success(
|
|
3159
3148
|
Le.briefing.status === "PAUSED" ? `${Fe} paused` : `${Fe} resumed`
|
|
3160
|
-
),
|
|
3149
|
+
), Y();
|
|
3161
3150
|
} catch (Le) {
|
|
3162
3151
|
O.error(
|
|
3163
3152
|
Le instanceof Error ? Le.message : `Could not update the ${R} status.`
|
|
3164
3153
|
);
|
|
3165
3154
|
} finally {
|
|
3166
|
-
|
|
3155
|
+
Z(null);
|
|
3167
3156
|
}
|
|
3168
3157
|
}, _t = async () => {
|
|
3169
3158
|
if (!z || !_ || !$) return;
|
|
3170
3159
|
const w = z;
|
|
3171
|
-
|
|
3160
|
+
Z(w.id);
|
|
3172
3161
|
try {
|
|
3173
3162
|
await ne.deleteBriefing(
|
|
3174
3163
|
_,
|
|
@@ -3176,20 +3165,20 @@ function vn({
|
|
|
3176
3165
|
w.id
|
|
3177
3166
|
);
|
|
3178
3167
|
const { noun: R } = se(w);
|
|
3179
|
-
O.success(`${R === "report" ? "Report" : "Briefing"} deleted`), re(null),
|
|
3168
|
+
O.success(`${R === "report" ? "Report" : "Briefing"} deleted`), re(null), Y();
|
|
3180
3169
|
} catch (R) {
|
|
3181
3170
|
O.error(
|
|
3182
3171
|
R instanceof Error ? R.message : "Could not delete the briefing."
|
|
3183
3172
|
);
|
|
3184
3173
|
} finally {
|
|
3185
|
-
|
|
3174
|
+
Z(null);
|
|
3186
3175
|
}
|
|
3187
3176
|
}, $t = Ie.length;
|
|
3188
3177
|
return C.surfaceVisible ? /* @__PURE__ */ r(_r, { open: N, onOpenChange: g, children: [
|
|
3189
3178
|
d ? null : /* @__PURE__ */ e(
|
|
3190
|
-
|
|
3179
|
+
Qa,
|
|
3191
3180
|
{
|
|
3192
|
-
disabled: n || !
|
|
3181
|
+
disabled: n || !we,
|
|
3193
3182
|
briefingCount: $t,
|
|
3194
3183
|
className: c,
|
|
3195
3184
|
onClick: v
|
|
@@ -3198,18 +3187,18 @@ function vn({
|
|
|
3198
3187
|
/* @__PURE__ */ r(
|
|
3199
3188
|
$r,
|
|
3200
3189
|
{
|
|
3201
|
-
ref:
|
|
3190
|
+
ref: ye,
|
|
3202
3191
|
side: "right",
|
|
3203
3192
|
hideClose: !0,
|
|
3204
3193
|
className: "flex h-full w-full flex-col overflow-hidden p-0 outline-none sm:max-w-[560px]",
|
|
3205
3194
|
onOpenAutoFocus: (w) => {
|
|
3206
3195
|
var R;
|
|
3207
|
-
w.preventDefault(), (R =
|
|
3196
|
+
w.preventDefault(), (R = ye.current) == null || R.focus({ preventScroll: !0 });
|
|
3208
3197
|
},
|
|
3209
3198
|
children: [
|
|
3210
3199
|
/* @__PURE__ */ r(jr, { className: "sr-only", children: [
|
|
3211
|
-
/* @__PURE__ */ e(
|
|
3212
|
-
/* @__PURE__ */ e(
|
|
3200
|
+
/* @__PURE__ */ e(Wr, { children: "Reports & briefings" }),
|
|
3201
|
+
/* @__PURE__ */ e(Hr, { children: "Manage reports and briefings for this dashboard." })
|
|
3213
3202
|
] }),
|
|
3214
3203
|
o ? /* @__PURE__ */ r("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
|
|
3215
3204
|
/* @__PURE__ */ r(
|
|
@@ -3272,7 +3261,7 @@ function vn({
|
|
|
3272
3261
|
dashboardLabel: pe,
|
|
3273
3262
|
sourceView: x,
|
|
3274
3263
|
error: ie,
|
|
3275
|
-
loading:
|
|
3264
|
+
loading: xe,
|
|
3276
3265
|
onSourceViewChange: T,
|
|
3277
3266
|
onClose: () => g(!1),
|
|
3278
3267
|
onEdit: (w) => {
|
|
@@ -3293,8 +3282,8 @@ function vn({
|
|
|
3293
3282
|
oe(w);
|
|
3294
3283
|
},
|
|
3295
3284
|
onDelete: (w) => re(w),
|
|
3296
|
-
selectingId:
|
|
3297
|
-
busyId:
|
|
3285
|
+
selectingId: We,
|
|
3286
|
+
busyId: He,
|
|
3298
3287
|
manageBriefingsHref: u,
|
|
3299
3288
|
contentKind: o === "scheduled_report" ? "reports" : o === "analytical_briefing" ? "briefings" : void 0,
|
|
3300
3289
|
hideHeader: !!o
|
|
@@ -3314,12 +3303,12 @@ function vn({
|
|
|
3314
3303
|
onCancel: () => g(!1),
|
|
3315
3304
|
onDeleted: () => {
|
|
3316
3305
|
const w = A ? se(A).noun : "briefing";
|
|
3317
|
-
O.success(`${w === "report" ? "Report" : "Briefing"} deleted`), V(null), k("list"),
|
|
3306
|
+
O.success(`${w === "report" ? "Report" : "Briefing"} deleted`), V(null), k("list"), Y();
|
|
3318
3307
|
},
|
|
3319
3308
|
onRunStarted: () => {
|
|
3320
3309
|
},
|
|
3321
3310
|
onSaved: (w) => {
|
|
3322
|
-
V(w),
|
|
3311
|
+
V(w), Y();
|
|
3323
3312
|
},
|
|
3324
3313
|
onMinimizeRun: ({ briefing: w, run: R }) => {
|
|
3325
3314
|
me({ briefing: w, run: R }), g(!1);
|
|
@@ -3337,34 +3326,34 @@ function vn({
|
|
|
3337
3326
|
apiServiceUrl: _,
|
|
3338
3327
|
token: $,
|
|
3339
3328
|
onTerminal: (w) => {
|
|
3340
|
-
|
|
3329
|
+
Ce({
|
|
3341
3330
|
briefing: ce.briefing,
|
|
3342
3331
|
run: w
|
|
3343
|
-
}), me(null),
|
|
3332
|
+
}), me(null), Y();
|
|
3344
3333
|
},
|
|
3345
3334
|
onTimeout: () => {
|
|
3346
|
-
me(null),
|
|
3335
|
+
me(null), Y();
|
|
3347
3336
|
},
|
|
3348
3337
|
onExpand: () => {
|
|
3349
3338
|
V(ce.briefing), k("author"), me(null), g(!0);
|
|
3350
3339
|
}
|
|
3351
3340
|
}
|
|
3352
3341
|
) : null,
|
|
3353
|
-
|
|
3342
|
+
Q ? /* @__PURE__ */ e("div", { className: "fixed bottom-4 right-4 z-50 w-[360px]", children: /* @__PURE__ */ e(
|
|
3354
3343
|
Kr,
|
|
3355
3344
|
{
|
|
3356
|
-
title:
|
|
3357
|
-
durationSeconds:
|
|
3345
|
+
title: Q.run.status === "SUCCESS" ? `${Q.briefing.name} is ready` : `${Q.briefing.name} run failed`,
|
|
3346
|
+
durationSeconds: Q.run.startedAt && Q.run.completedAt ? Math.max(
|
|
3358
3347
|
0,
|
|
3359
3348
|
Math.floor(
|
|
3360
|
-
(new Date(
|
|
3349
|
+
(new Date(Q.run.completedAt).getTime() - new Date(Q.run.startedAt).getTime()) / 1e3
|
|
3361
3350
|
)
|
|
3362
3351
|
) : null,
|
|
3363
|
-
status:
|
|
3352
|
+
status: Q.run.status === "SUCCESS" ? "success" : "failed",
|
|
3364
3353
|
onView: () => {
|
|
3365
|
-
V(
|
|
3354
|
+
V(Q.briefing), k("author"), Ce(null), g(!0);
|
|
3366
3355
|
},
|
|
3367
|
-
onDismiss: () =>
|
|
3356
|
+
onDismiss: () => Ce(null)
|
|
3368
3357
|
}
|
|
3369
3358
|
) }) : null,
|
|
3370
3359
|
/* @__PURE__ */ e(
|
|
@@ -3413,12 +3402,12 @@ function yn() {
|
|
|
3413
3402
|
}
|
|
3414
3403
|
export {
|
|
3415
3404
|
Mn as A,
|
|
3416
|
-
|
|
3405
|
+
Wn as D,
|
|
3417
3406
|
Pa as E,
|
|
3418
3407
|
$n as N,
|
|
3419
3408
|
On as U,
|
|
3420
3409
|
Pn as V,
|
|
3421
|
-
|
|
3410
|
+
Qa as W,
|
|
3422
3411
|
za as a,
|
|
3423
3412
|
Ka as b,
|
|
3424
3413
|
jn as c,
|