react-semaphor 0.1.267 → 0.1.268
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/chunks/{dashboard-controls-d8j31cnQ.js → dashboard-controls-D9FGH-ux.js} +108 -108
- package/dist/chunks/{dashboard-controls-BRv37g5w.js → dashboard-controls-DVZnpRK5.js} +1 -1
- package/dist/chunks/dashboard-filter-controls-button-CcrX4Kjv.js +11 -0
- package/dist/chunks/{dashboard-filter-controls-button-BOs9T2hG.js → dashboard-filter-controls-button-DdI-qlYl.js} +209 -199
- package/dist/chunks/{dashboard-json-DjNS3G-C.js → dashboard-json-1s8UpQRT.js} +1 -1
- package/dist/chunks/{dashboard-json-CnEYIbNI.js → dashboard-json-B9t11hsc.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DOVwh8Cc.js → dashboard-summary-settings-dialog-BXJnm_OC.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CrBOuggE.js → dashboard-summary-settings-dialog-BruCXCaN.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-D4UMcS6R.js → edit-dashboard-visual-C4HfjuuW.js} +7447 -6972
- package/dist/chunks/edit-dashboard-visual-DrdskRgR.js +193 -0
- package/dist/chunks/{index-D5jdzvu3.js → index-BrLm4rYX.js} +35935 -34785
- package/dist/chunks/{index-C2i6CRUk.js → index-DTw8TJ-8.js} +523 -326
- package/dist/chunks/{resource-management-panel-3XD0FrTD.js → resource-management-panel-C7hHyHwo.js} +16 -16
- package/dist/chunks/{resource-management-panel-ZK4SWoad.js → resource-management-panel-CLZBF-Dw.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-Bb83NOgW.js → use-create-flow-overlay-state-BrRL7vBF.js} +589 -591
- package/dist/chunks/use-create-flow-overlay-state-C6B_dReH.js +21 -0
- package/dist/chunks/{use-visual-utils-Bj7eAUMG.js → use-visual-utils-1cXtOxvS.js} +111 -123
- package/dist/chunks/use-visual-utils-CLCzIgCj.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +38 -0
- package/dist/types/main.d.ts +40 -0
- package/dist/types/shared.d.ts +38 -0
- package/dist/types/surfboard.d.ts +38 -0
- package/dist/types/types.d.ts +38 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-DKRyKRsP.js +0 -11
- package/dist/chunks/edit-dashboard-visual-D6RokBEF.js +0 -188
- package/dist/chunks/use-create-flow-overlay-state-Cmt64wFE.js +0 -21
- package/dist/chunks/use-visual-utils-Bdwejpa1.js +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
4
|
-
import { V as
|
|
5
|
-
import {
|
|
6
|
-
import { k as
|
|
1
|
+
import ge, { useState as T, useRef as z, useCallback as V, useEffect as F, useContext as be } from "react";
|
|
2
|
+
import { bM as Z, b as $, aC as U, bJ as j, bF as ee, bG as _, aD as te, bE as we, e as ae, f as se, g as re, h as oe, i as ne, L as G, d1 as Ce, d7 as xe, v as ye, B as I, w as H, U as R, J as Ne, u as B, K as De, N as X, d8 as Ae, d9 as K, x as P, b_ as ie, af as Se, c as L, cA as le, cB as de, a6 as ce, cD as ue, cE as M, s as Ee, cI as Ie, cr as Le, M as Te, da as Fe, db as ke, dc as Ue, cQ as Me, cR as Ve, cS as Pe, dd as Be, cT as Oe, cU as ze, cV as Re, cW as $e, cX as je, as as _e, bL as He, X as Xe, de as Ge, df as Ke, cw as We, bH as W, a8 as qe, aF as Je, P as me, k as he, dg as Qe, l as pe, dh as Ye, di as Ze, dj as et, dk as tt, dl as at, dm as fe, dn as q, dp as st } from "./index-BrLm4rYX.js";
|
|
3
|
+
import { jsx as t, jsxs as s, Fragment as O } from "react/jsx-runtime";
|
|
4
|
+
import { V as rt, E as ot, a as nt, b as it, L as lt, c as dt, d as ct, C as ut, u as mt, e as ht } from "./use-create-flow-overlay-state-BrRL7vBF.js";
|
|
5
|
+
import { u as ve } from "./use-visual-utils-1cXtOxvS.js";
|
|
6
|
+
import { k as J } from "./date-formatter-vkCj9Ct-.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the ISC license.
|
|
11
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const Q = Z("FileDown", [
|
|
14
14
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
15
15
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
16
16
|
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
@@ -22,19 +22,19 @@ const J = Z("FileDown", [
|
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const pt = Z("FilterX", [
|
|
26
26
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
27
27
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
28
28
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
29
|
-
]),
|
|
30
|
-
function
|
|
29
|
+
]), ft = 1e4, vt = 15e3, gt = 3e4, bt = 3e4, wt = 12e4, Y = 2 * 60 * 60 * 1e3;
|
|
30
|
+
function Ct(e) {
|
|
31
31
|
const a = Date.now() - e.getTime();
|
|
32
|
-
return a <
|
|
32
|
+
return a < bt ? ft : a < wt ? vt : gt;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const { authToken: e, tokenProps: a } = $(), p = U((h) => h.activeExports), [c, d] =
|
|
34
|
+
function Ut() {
|
|
35
|
+
const { authToken: e, tokenProps: a } = $(), p = U((h) => h.activeExports), [c, d] = T(
|
|
36
36
|
typeof document < "u" ? !document.hidden : !0
|
|
37
|
-
), u =
|
|
37
|
+
), u = z(null), n = z(!1), l = z(void 0), m = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken, v = V(() => {
|
|
38
38
|
const h = U.getState().activeExports;
|
|
39
39
|
return Array.from(h.values()).filter(
|
|
40
40
|
(w) => j(w.status)
|
|
@@ -59,12 +59,12 @@ function kt() {
|
|
|
59
59
|
n.current = !1;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const w = Date.now(),
|
|
62
|
+
const w = Date.now(), N = h.filter(
|
|
63
63
|
(r) => w - r.startedAt.getTime() > Y
|
|
64
64
|
);
|
|
65
|
-
if (
|
|
65
|
+
if (N.length > 0) {
|
|
66
66
|
const { updateExport: r } = U.getState().actions;
|
|
67
|
-
for (const i of
|
|
67
|
+
for (const i of N)
|
|
68
68
|
r(i.id, {
|
|
69
69
|
status: "failed",
|
|
70
70
|
error: "Export timed out. Please try again or contact support.",
|
|
@@ -110,15 +110,15 @@ function kt() {
|
|
|
110
110
|
), null;
|
|
111
111
|
}
|
|
112
112
|
})
|
|
113
|
-
), { updateExport:
|
|
113
|
+
), { updateExport: S } = U.getState().actions;
|
|
114
114
|
for (const r of x)
|
|
115
|
-
r.status === "fulfilled" && r.value &&
|
|
115
|
+
r.status === "fulfilled" && r.value && S(r.value.id, r.value);
|
|
116
116
|
const C = v();
|
|
117
117
|
if (C.length > 0 && !document.hidden) {
|
|
118
118
|
const r = C.reduce(
|
|
119
119
|
(g, E) => E.startedAt < g ? E.startedAt : g,
|
|
120
120
|
C[0].startedAt
|
|
121
|
-
), i =
|
|
121
|
+
), i = Ct(r);
|
|
122
122
|
u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
123
123
|
var g;
|
|
124
124
|
(g = l.current) == null || g.call(l);
|
|
@@ -145,13 +145,13 @@ function kt() {
|
|
|
145
145
|
inProgressCount: v().length
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const { authToken: e, tokenProps: a } = $(), p = U((l) => l.activeExports), { addExport: c } = te(), d =
|
|
148
|
+
function Mt() {
|
|
149
|
+
const { authToken: e, tokenProps: a } = $(), p = U((l) => l.activeExports), { addExport: c } = te(), d = z(!1), u = a == null ? void 0 : a.apiServiceUrl, n = e == null ? void 0 : e.accessToken;
|
|
150
150
|
F(() => {
|
|
151
151
|
if (d.current || !u || !n) return;
|
|
152
152
|
(async () => {
|
|
153
153
|
try {
|
|
154
|
-
const { exports: m } = await
|
|
154
|
+
const { exports: m } = await we(u, n, {
|
|
155
155
|
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
156
156
|
limit: 20
|
|
157
157
|
// Limit to recent exports
|
|
@@ -173,7 +173,7 @@ function Ut() {
|
|
|
173
173
|
id: o.id,
|
|
174
174
|
status: o.status,
|
|
175
175
|
progress: v,
|
|
176
|
-
title:
|
|
176
|
+
title: xt(o),
|
|
177
177
|
totalRows: o.totalRows,
|
|
178
178
|
totalChunks: o.totalChunks,
|
|
179
179
|
completedChunks: o.completedChunks,
|
|
@@ -194,12 +194,12 @@ function Ut() {
|
|
|
194
194
|
})();
|
|
195
195
|
}, [u, n, c, p]);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function xt(e) {
|
|
198
198
|
return e.title ? e.title : j(
|
|
199
199
|
e.status
|
|
200
200
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function yt({
|
|
203
203
|
open: e,
|
|
204
204
|
onOpenChange: a,
|
|
205
205
|
isLibraryVisual: p,
|
|
@@ -208,10 +208,10 @@ function xt({
|
|
|
208
208
|
destinationMode: u = "both",
|
|
209
209
|
onConfirm: n
|
|
210
210
|
}) {
|
|
211
|
-
const [l, m] =
|
|
211
|
+
const [l, m] = T(
|
|
212
212
|
p && c ? `Copy of ${c}` : c || ""
|
|
213
|
-
), [o, v] =
|
|
214
|
-
|
|
213
|
+
), [o, v] = T("");
|
|
214
|
+
ge.useEffect(() => {
|
|
215
215
|
e && (m(
|
|
216
216
|
p && c ? `Copy of ${c}` : c || ""
|
|
217
217
|
), v(""));
|
|
@@ -247,7 +247,7 @@ function xt({
|
|
|
247
247
|
/* @__PURE__ */ s(oe, { className: "flex items-center gap-2", children: [
|
|
248
248
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
249
249
|
h.badgeType !== "local" && /* @__PURE__ */ t(
|
|
250
|
-
|
|
250
|
+
rt,
|
|
251
251
|
{
|
|
252
252
|
type: h.badgeType,
|
|
253
253
|
showLabel: !0,
|
|
@@ -261,11 +261,11 @@ function xt({
|
|
|
261
261
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
262
262
|
/* @__PURE__ */ t(G, { htmlFor: "name", children: "Name" }),
|
|
263
263
|
/* @__PURE__ */ t(
|
|
264
|
-
|
|
264
|
+
Ce,
|
|
265
265
|
{
|
|
266
266
|
id: "name",
|
|
267
267
|
value: l,
|
|
268
|
-
onChange: (
|
|
268
|
+
onChange: (N) => m(N.target.value),
|
|
269
269
|
placeholder: "Enter visual name",
|
|
270
270
|
disabled: d
|
|
271
271
|
}
|
|
@@ -274,11 +274,11 @@ function xt({
|
|
|
274
274
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
275
275
|
/* @__PURE__ */ t(G, { htmlFor: "description", children: "Description (optional)" }),
|
|
276
276
|
/* @__PURE__ */ t(
|
|
277
|
-
|
|
277
|
+
xe,
|
|
278
278
|
{
|
|
279
279
|
id: "description",
|
|
280
280
|
value: o,
|
|
281
|
-
onChange: (
|
|
281
|
+
onChange: (N) => v(N.target.value),
|
|
282
282
|
placeholder: "Enter visual description",
|
|
283
283
|
rows: 3,
|
|
284
284
|
disabled: d
|
|
@@ -286,9 +286,9 @@ function xt({
|
|
|
286
286
|
)
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
|
-
/* @__PURE__ */ s(
|
|
289
|
+
/* @__PURE__ */ s(ye, { children: [
|
|
290
290
|
/* @__PURE__ */ t(
|
|
291
|
-
|
|
291
|
+
I,
|
|
292
292
|
{
|
|
293
293
|
variant: "outline",
|
|
294
294
|
onClick: () => a(!1),
|
|
@@ -296,20 +296,20 @@ function xt({
|
|
|
296
296
|
children: "Cancel"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
/* @__PURE__ */ s(
|
|
299
|
+
/* @__PURE__ */ s(I, { onClick: w, disabled: !b || d, children: [
|
|
300
300
|
d && /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
301
301
|
h.actionLabel
|
|
302
302
|
] })
|
|
303
303
|
] })
|
|
304
304
|
] }) });
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
const [e, a] =
|
|
306
|
+
function Nt() {
|
|
307
|
+
const [e, a] = T(!1), [p, c] = T(!1), [d, u] = T(null), n = R((i) => i.frame), l = R((i) => i.card), m = Ne(), o = B((i) => i.selectedSheetId), v = B(
|
|
308
308
|
(i) => i.actions.setIsDashboardPanelOpen
|
|
309
|
-
), { getUpdatedFrame: b } =
|
|
309
|
+
), { getUpdatedFrame: b } = ve(), { selectVisual: h } = De(), { addFrame: w, setSelectedFrameId: N, setIsVisualEditing: f } = X(), x = !!(n != null && n.visualId), S = (() => {
|
|
310
310
|
var i, g;
|
|
311
311
|
return ((i = n == null ? void 0 : n.cards) == null ? void 0 : i.length) === 1 && ((g = n.cards[0]) != null && g.title) ? n.cards[0].title : m != null && m.title ? m.title : (l == null ? void 0 : l.title) || "Untitled Visual";
|
|
312
|
-
})(), C =
|
|
312
|
+
})(), C = Ae((i) => {
|
|
313
313
|
if (i != null && i.id) {
|
|
314
314
|
if (h(i), p && d && o) {
|
|
315
315
|
const g = {
|
|
@@ -318,7 +318,7 @@ function yt() {
|
|
|
318
318
|
visualId: i.id
|
|
319
319
|
// Link to the newly created library visual
|
|
320
320
|
};
|
|
321
|
-
w(o, g, "end"),
|
|
321
|
+
w(o, g, "end"), N(g.id), c(!1), u(null), f(!1);
|
|
322
322
|
}
|
|
323
323
|
v(!0), a(!1);
|
|
324
324
|
}
|
|
@@ -328,109 +328,119 @@ function yt() {
|
|
|
328
328
|
setSaveAsDialogOpen: a,
|
|
329
329
|
handleSaveAs: async (i) => {
|
|
330
330
|
if (!o) {
|
|
331
|
-
|
|
331
|
+
P.error("No sheet selected");
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const g = b(), E = ie(g);
|
|
335
|
+
if (E) {
|
|
336
|
+
P.error(E);
|
|
332
337
|
return;
|
|
333
338
|
}
|
|
334
|
-
const
|
|
339
|
+
const A = g.cards.length === 1 ? {
|
|
335
340
|
...g,
|
|
336
|
-
cards: g.cards.map((
|
|
337
|
-
...
|
|
341
|
+
cards: g.cards.map((y) => ({
|
|
342
|
+
...y,
|
|
338
343
|
title: i.name
|
|
339
344
|
// Use visual name as card title
|
|
340
345
|
}))
|
|
341
346
|
} : g;
|
|
342
347
|
if (i.saveToLibrary) {
|
|
343
|
-
c(i.saveToCurrentDashboard), u(
|
|
344
|
-
const
|
|
348
|
+
c(i.saveToCurrentDashboard), u(A);
|
|
349
|
+
const y = {
|
|
345
350
|
title: i.name,
|
|
346
351
|
description: i.description,
|
|
347
|
-
frameObject:
|
|
352
|
+
frameObject: A,
|
|
348
353
|
// Card title synced for single-card frames
|
|
349
354
|
isPrivate: !1
|
|
350
355
|
};
|
|
351
|
-
C.mutate(
|
|
356
|
+
C.mutate(y);
|
|
352
357
|
} else if (i.saveToCurrentDashboard) {
|
|
353
|
-
const
|
|
354
|
-
...
|
|
358
|
+
const y = {
|
|
359
|
+
...A,
|
|
355
360
|
// Card title already synced
|
|
356
361
|
id: K(),
|
|
357
362
|
visualId: void 0
|
|
358
363
|
// Explicitly no visualId for local visuals
|
|
359
364
|
};
|
|
360
|
-
w(o,
|
|
365
|
+
w(o, y, "end"), N(y.id), P.success("Visual saved to dashboard"), a(!1), f(!1);
|
|
361
366
|
}
|
|
362
367
|
},
|
|
363
368
|
isLibraryVisual: x,
|
|
364
|
-
currentVisualName:
|
|
369
|
+
currentVisualName: S,
|
|
365
370
|
isSaving: C.isPending
|
|
366
371
|
};
|
|
367
372
|
}
|
|
368
|
-
function
|
|
373
|
+
function Vt({
|
|
369
374
|
className: e
|
|
370
375
|
}) {
|
|
371
|
-
const a =
|
|
372
|
-
saveAsDialogOpen:
|
|
376
|
+
const a = R((D) => D.frame), p = Se((D) => D.selectedVisual), c = B((D) => D.selectedFrameId), d = B((D) => D.selectedSheetId), { setIsVisualEditing: u, updateFrame: n } = X(), [l, m] = T(!1), [o, v] = T("both"), b = !!(a != null && a.visualId || p != null && p.id), h = !!(a != null && a.visualId && c), w = b && !h, {
|
|
377
|
+
saveAsDialogOpen: N,
|
|
373
378
|
setSaveAsDialogOpen: f,
|
|
374
379
|
handleSaveAs: x,
|
|
375
|
-
isLibraryVisual:
|
|
380
|
+
isLibraryVisual: S,
|
|
376
381
|
currentVisualName: C,
|
|
377
382
|
isSaving: r
|
|
378
|
-
} =
|
|
383
|
+
} = Nt(), { getUpdatedFrame: i } = ve(), g = () => {
|
|
379
384
|
if (!d) {
|
|
380
|
-
|
|
385
|
+
P.error("No sheet selected");
|
|
381
386
|
return;
|
|
382
387
|
}
|
|
383
388
|
if (l) return;
|
|
384
389
|
m(!0);
|
|
385
|
-
const
|
|
386
|
-
|
|
390
|
+
const D = i(), A = ie(D);
|
|
391
|
+
if (A) {
|
|
392
|
+
m(!1), P.error(A);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
const y = {
|
|
396
|
+
...D,
|
|
387
397
|
visualId: void 0
|
|
388
398
|
};
|
|
389
|
-
n(d,
|
|
390
|
-
m(!1),
|
|
399
|
+
n(d, y), setTimeout(() => {
|
|
400
|
+
m(!1), P.success("Changes applied. Visual is now local to this dashboard"), u(!1);
|
|
391
401
|
}, 300);
|
|
392
|
-
}, E = (
|
|
393
|
-
v(
|
|
402
|
+
}, E = (D) => {
|
|
403
|
+
v(D), f(!0);
|
|
394
404
|
};
|
|
395
|
-
return /* @__PURE__ */ s(
|
|
405
|
+
return /* @__PURE__ */ s(O, { children: [
|
|
396
406
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-md border border-input", children: [
|
|
397
407
|
!b && /* @__PURE__ */ t(
|
|
398
|
-
|
|
408
|
+
ot,
|
|
399
409
|
{
|
|
400
|
-
className:
|
|
410
|
+
className: L(e, "rounded-none border-0"),
|
|
401
411
|
variant: "default"
|
|
402
412
|
}
|
|
403
413
|
),
|
|
404
414
|
b && w && /* @__PURE__ */ t(
|
|
405
|
-
|
|
415
|
+
nt,
|
|
406
416
|
{
|
|
407
|
-
className:
|
|
417
|
+
className: L(e, "rounded-none border-0"),
|
|
408
418
|
variant: "default"
|
|
409
419
|
}
|
|
410
420
|
),
|
|
411
421
|
b && h && /* @__PURE__ */ t(
|
|
412
|
-
|
|
422
|
+
it,
|
|
413
423
|
{
|
|
414
|
-
className:
|
|
424
|
+
className: L(e, "rounded-none border-0")
|
|
415
425
|
}
|
|
416
426
|
),
|
|
417
|
-
/* @__PURE__ */ s(
|
|
418
|
-
/* @__PURE__ */ t(
|
|
419
|
-
|
|
427
|
+
/* @__PURE__ */ s(le, { modal: !1, children: [
|
|
428
|
+
/* @__PURE__ */ t(de, { className: "h-8", asChild: !0, children: /* @__PURE__ */ t(
|
|
429
|
+
I,
|
|
420
430
|
{
|
|
421
431
|
variant: "default",
|
|
422
432
|
size: "sm",
|
|
423
|
-
className:
|
|
433
|
+
className: L(
|
|
424
434
|
e,
|
|
425
435
|
"w-8 rounded-none border-0 border-l border-primary-foreground/30 px-2"
|
|
426
436
|
),
|
|
427
437
|
"aria-label": "Open visual save options",
|
|
428
438
|
disabled: r || l,
|
|
429
|
-
children: /* @__PURE__ */ t(
|
|
439
|
+
children: /* @__PURE__ */ t(ce, { className: "h-4 w-4" })
|
|
430
440
|
}
|
|
431
441
|
) }),
|
|
432
|
-
/* @__PURE__ */ s(
|
|
433
|
-
h && /* @__PURE__ */ s(
|
|
442
|
+
/* @__PURE__ */ s(ue, { align: "end", children: [
|
|
443
|
+
h && /* @__PURE__ */ s(O, { children: [
|
|
434
444
|
/* @__PURE__ */ s(
|
|
435
445
|
M,
|
|
436
446
|
{
|
|
@@ -442,7 +452,7 @@ function Mt({
|
|
|
442
452
|
]
|
|
443
453
|
}
|
|
444
454
|
),
|
|
445
|
-
/* @__PURE__ */ t(
|
|
455
|
+
/* @__PURE__ */ t(Ie, {})
|
|
446
456
|
] }),
|
|
447
457
|
/* @__PURE__ */ s(
|
|
448
458
|
M,
|
|
@@ -450,7 +460,7 @@ function Mt({
|
|
|
450
460
|
onClick: () => E("local"),
|
|
451
461
|
disabled: r,
|
|
452
462
|
children: [
|
|
453
|
-
/* @__PURE__ */ t(
|
|
463
|
+
/* @__PURE__ */ t(Le, { className: "mr-2 h-4 w-4" }),
|
|
454
464
|
"Add to Dashboard (Local)"
|
|
455
465
|
]
|
|
456
466
|
}
|
|
@@ -461,7 +471,7 @@ function Mt({
|
|
|
461
471
|
onClick: () => E("library"),
|
|
462
472
|
disabled: r,
|
|
463
473
|
children: [
|
|
464
|
-
/* @__PURE__ */ t(
|
|
474
|
+
/* @__PURE__ */ t(lt, { className: "mr-2 h-4 w-4" }),
|
|
465
475
|
"Save as Library Visual"
|
|
466
476
|
]
|
|
467
477
|
}
|
|
@@ -472,7 +482,7 @@ function Mt({
|
|
|
472
482
|
onClick: () => E("both"),
|
|
473
483
|
disabled: r,
|
|
474
484
|
children: [
|
|
475
|
-
/* @__PURE__ */ t(
|
|
485
|
+
/* @__PURE__ */ t(dt, { className: "mr-2 h-4 w-4" }),
|
|
476
486
|
"Save Copy as Linked Visual"
|
|
477
487
|
]
|
|
478
488
|
}
|
|
@@ -480,15 +490,15 @@ function Mt({
|
|
|
480
490
|
] })
|
|
481
491
|
] })
|
|
482
492
|
] }),
|
|
483
|
-
/* @__PURE__ */ t(
|
|
493
|
+
/* @__PURE__ */ t(ct, { className: e }),
|
|
484
494
|
/* @__PURE__ */ t(
|
|
485
|
-
|
|
495
|
+
yt,
|
|
486
496
|
{
|
|
487
|
-
open:
|
|
488
|
-
onOpenChange: (
|
|
489
|
-
r || f(
|
|
497
|
+
open: N,
|
|
498
|
+
onOpenChange: (D) => {
|
|
499
|
+
r || f(D);
|
|
490
500
|
},
|
|
491
|
-
isLibraryVisual:
|
|
501
|
+
isLibraryVisual: S,
|
|
492
502
|
currentVisualName: C,
|
|
493
503
|
isSaving: r,
|
|
494
504
|
destinationMode: o,
|
|
@@ -497,28 +507,28 @@ function Mt({
|
|
|
497
507
|
)
|
|
498
508
|
] });
|
|
499
509
|
}
|
|
500
|
-
function
|
|
510
|
+
function Pt({
|
|
501
511
|
className: e,
|
|
502
512
|
//labelClassName,
|
|
503
513
|
switchClassName: a
|
|
504
514
|
}) {
|
|
505
|
-
const p =
|
|
506
|
-
return !c || !n ? null : /* @__PURE__ */ s("div", { className:
|
|
515
|
+
const p = R((l) => l.isDevMode), c = B((l) => l.isVisualEditing), { setIsDevMode: d } = Te(), { config: u } = be(Fe).tokenProps, n = (u == null ? void 0 : u.showAdvancedMode) !== !1;
|
|
516
|
+
return !c || !n ? null : /* @__PURE__ */ s("div", { className: L("flex items-center space-x-2", e), children: [
|
|
507
517
|
/* @__PURE__ */ t(
|
|
508
|
-
|
|
518
|
+
ke,
|
|
509
519
|
{
|
|
510
|
-
className:
|
|
520
|
+
className: L("", a),
|
|
511
521
|
checked: p,
|
|
512
522
|
onCheckedChange: () => d(!p),
|
|
513
523
|
id: "advanced-mode",
|
|
514
|
-
icon: /* @__PURE__ */ t(
|
|
524
|
+
icon: /* @__PURE__ */ t(Ue, { className: "h-4 w-4" }),
|
|
515
525
|
tooltip: "Advanced Mode"
|
|
516
526
|
}
|
|
517
527
|
),
|
|
518
528
|
/* @__PURE__ */ t("label", { htmlFor: "advanced-mode", className: "sr-only", children: "Advanced Mode" })
|
|
519
529
|
] });
|
|
520
530
|
}
|
|
521
|
-
function
|
|
531
|
+
function Bt({
|
|
522
532
|
open: e,
|
|
523
533
|
onOpenChange: a,
|
|
524
534
|
onSave: p,
|
|
@@ -530,19 +540,19 @@ function Pt({
|
|
|
530
540
|
discardLabel: m = "Discard",
|
|
531
541
|
saveLabel: o = "Save & Close"
|
|
532
542
|
}) {
|
|
533
|
-
return /* @__PURE__ */ t(
|
|
543
|
+
return /* @__PURE__ */ t(Me, { open: e, onOpenChange: (b) => {
|
|
534
544
|
!b && d || a(b);
|
|
535
|
-
}, children: /* @__PURE__ */ s(
|
|
536
|
-
/* @__PURE__ */ s(
|
|
545
|
+
}, children: /* @__PURE__ */ s(Ve, { className: "max-w-[520px] border-border/70 p-6", children: [
|
|
546
|
+
/* @__PURE__ */ s(Pe, { className: "space-y-3", children: [
|
|
537
547
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
538
|
-
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-amber-50 ring-1 ring-amber-200/70", children: /* @__PURE__ */ t(
|
|
539
|
-
/* @__PURE__ */ t(
|
|
548
|
+
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-amber-50 ring-1 ring-amber-200/70", children: /* @__PURE__ */ t(Be, { className: "h-[18px] w-[18px] text-amber-600" }) }),
|
|
549
|
+
/* @__PURE__ */ t(Oe, { className: "text-lg font-semibold tracking-tight", children: u })
|
|
540
550
|
] }),
|
|
541
|
-
/* @__PURE__ */ t(
|
|
551
|
+
/* @__PURE__ */ t(ze, { className: "text-sm leading-6 text-muted-foreground", children: n })
|
|
542
552
|
] }),
|
|
543
|
-
/* @__PURE__ */ s(
|
|
553
|
+
/* @__PURE__ */ s(Re, { className: "mt-2 flex-col gap-1.5 sm:flex-row sm:justify-end", children: [
|
|
544
554
|
/* @__PURE__ */ t(
|
|
545
|
-
|
|
555
|
+
$e,
|
|
546
556
|
{
|
|
547
557
|
disabled: d,
|
|
548
558
|
className: "order-1 m-0 h-auto min-h-9 whitespace-normal border-border/60 px-4 py-2 text-center leading-5 sm:order-1",
|
|
@@ -559,12 +569,12 @@ function Pt({
|
|
|
559
569
|
}
|
|
560
570
|
),
|
|
561
571
|
/* @__PURE__ */ t(
|
|
562
|
-
|
|
572
|
+
je,
|
|
563
573
|
{
|
|
564
574
|
onClick: p,
|
|
565
575
|
disabled: d,
|
|
566
576
|
className: "order-3 m-0 h-auto min-h-9 whitespace-normal px-4 py-2 text-center leading-5 sm:order-3",
|
|
567
|
-
children: d ? /* @__PURE__ */ s(
|
|
577
|
+
children: d ? /* @__PURE__ */ s(O, { children: [
|
|
568
578
|
/* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
569
579
|
"Saving..."
|
|
570
580
|
] }) : o
|
|
@@ -573,12 +583,12 @@ function Pt({
|
|
|
573
583
|
] })
|
|
574
584
|
] }) });
|
|
575
585
|
}
|
|
576
|
-
function
|
|
586
|
+
function Ot(e, a, p, c) {
|
|
577
587
|
F(() => {
|
|
578
|
-
e && !p && a && c(
|
|
588
|
+
e && !p && a && c(_e(a));
|
|
579
589
|
}, [e, p, a, c]);
|
|
580
590
|
}
|
|
581
|
-
function
|
|
591
|
+
function Dt({
|
|
582
592
|
export: e,
|
|
583
593
|
onRemove: a
|
|
584
594
|
}) {
|
|
@@ -589,9 +599,9 @@ function Nt({
|
|
|
589
599
|
}, d = () => {
|
|
590
600
|
switch (e.status) {
|
|
591
601
|
case "completed":
|
|
592
|
-
return /* @__PURE__ */ t(
|
|
602
|
+
return /* @__PURE__ */ t(We, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
593
603
|
case "failed":
|
|
594
|
-
return /* @__PURE__ */ t(
|
|
604
|
+
return /* @__PURE__ */ t(ut, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
595
605
|
default:
|
|
596
606
|
return /* @__PURE__ */ t(H, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
597
607
|
}
|
|
@@ -620,9 +630,9 @@ function Nt({
|
|
|
620
630
|
e.totalRows.toLocaleString(),
|
|
621
631
|
" rows"
|
|
622
632
|
] }),
|
|
623
|
-
e.fileSize && /* @__PURE__ */ s(
|
|
633
|
+
e.fileSize && /* @__PURE__ */ s(O, { children: [
|
|
624
634
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
625
|
-
/* @__PURE__ */ t("span", { children:
|
|
635
|
+
/* @__PURE__ */ t("span", { children: He(e.fileSize) })
|
|
626
636
|
] })
|
|
627
637
|
] }),
|
|
628
638
|
u && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: n }),
|
|
@@ -630,47 +640,47 @@ function Nt({
|
|
|
630
640
|
] })
|
|
631
641
|
] }),
|
|
632
642
|
/* @__PURE__ */ t(
|
|
633
|
-
|
|
643
|
+
I,
|
|
634
644
|
{
|
|
635
645
|
variant: "ghost",
|
|
636
646
|
size: "icon",
|
|
637
647
|
className: "h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
638
648
|
onClick: c,
|
|
639
649
|
"aria-label": "Remove notification",
|
|
640
|
-
children: /* @__PURE__ */ t(
|
|
650
|
+
children: /* @__PURE__ */ t(Xe, { className: "h-4 w-4" })
|
|
641
651
|
}
|
|
642
652
|
)
|
|
643
653
|
] }),
|
|
644
654
|
/* @__PURE__ */ s("div", { className: "ml-8", children: [
|
|
645
655
|
e.status === "completed" && /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
646
|
-
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children:
|
|
656
|
+
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: J(e.startedAt, { addSuffix: !0 }) }),
|
|
647
657
|
e.downloadUrl && /* @__PURE__ */ s(
|
|
648
|
-
|
|
658
|
+
I,
|
|
649
659
|
{
|
|
650
660
|
size: "sm",
|
|
651
661
|
variant: "outline",
|
|
652
662
|
className: "h-8 bg-transparent",
|
|
653
663
|
onClick: p,
|
|
654
664
|
children: [
|
|
655
|
-
/* @__PURE__ */ t(
|
|
665
|
+
/* @__PURE__ */ t(Ge, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
656
666
|
"Download"
|
|
657
667
|
]
|
|
658
668
|
}
|
|
659
669
|
)
|
|
660
670
|
] }),
|
|
661
671
|
u && /* @__PURE__ */ s("div", { children: [
|
|
662
|
-
/* @__PURE__ */ t(
|
|
672
|
+
/* @__PURE__ */ t(Ke, { value: e.progress, className: "h-1.5" }),
|
|
663
673
|
/* @__PURE__ */ s("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
664
674
|
e.progress,
|
|
665
675
|
"% complete"
|
|
666
676
|
] })
|
|
667
677
|
] }),
|
|
668
|
-
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children:
|
|
678
|
+
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: J(e.startedAt, { addSuffix: !0 }) })
|
|
669
679
|
] })
|
|
670
680
|
] });
|
|
671
681
|
}
|
|
672
|
-
function
|
|
673
|
-
const { authToken: e, tokenProps: a } = $(), p = U((f) => f.activeExports), { clearCompleted: c, removeExport: d, updateExport: u } = te(), [n, l] =
|
|
682
|
+
function At() {
|
|
683
|
+
const { authToken: e, tokenProps: a } = $(), p = U((f) => f.activeExports), { clearCompleted: c, removeExport: d, updateExport: u } = te(), [n, l] = T(!1), [m, o] = T(!1), v = Array.from(p.values()).sort(
|
|
674
684
|
(f, x) => x.startedAt.getTime() - f.startedAt.getTime()
|
|
675
685
|
), b = v.some(
|
|
676
686
|
(f) => f.status === "completed" || f.status === "failed"
|
|
@@ -679,9 +689,9 @@ function Dt() {
|
|
|
679
689
|
if (!(!f || !x)) {
|
|
680
690
|
l(!0);
|
|
681
691
|
try {
|
|
682
|
-
const
|
|
692
|
+
const S = Array.from(p.values());
|
|
683
693
|
await Promise.all(
|
|
684
|
-
|
|
694
|
+
S.map(async (C) => {
|
|
685
695
|
try {
|
|
686
696
|
const r = await ee(f, x, C.id);
|
|
687
697
|
let i;
|
|
@@ -727,10 +737,10 @@ function Dt() {
|
|
|
727
737
|
}
|
|
728
738
|
o(!0);
|
|
729
739
|
try {
|
|
730
|
-
const
|
|
740
|
+
const S = v.filter(
|
|
731
741
|
(r) => r.status === "completed" || r.status === "failed"
|
|
732
742
|
), C = await Promise.allSettled(
|
|
733
|
-
|
|
743
|
+
S.map(async (r) => (await W(f, x, r.id), r.id))
|
|
734
744
|
);
|
|
735
745
|
for (const r of C)
|
|
736
746
|
r.status === "fulfilled" ? d(r.value) : console.error("Failed to delete export:", r.reason);
|
|
@@ -743,12 +753,12 @@ function Dt() {
|
|
|
743
753
|
e == null ? void 0 : e.accessToken,
|
|
744
754
|
c,
|
|
745
755
|
d
|
|
746
|
-
]),
|
|
756
|
+
]), N = V(
|
|
747
757
|
async (f) => {
|
|
748
|
-
const x = a == null ? void 0 : a.apiServiceUrl,
|
|
749
|
-
if (x &&
|
|
758
|
+
const x = a == null ? void 0 : a.apiServiceUrl, S = e == null ? void 0 : e.accessToken;
|
|
759
|
+
if (x && S)
|
|
750
760
|
try {
|
|
751
|
-
await
|
|
761
|
+
await W(x, S, f), d(f);
|
|
752
762
|
return;
|
|
753
763
|
} catch (C) {
|
|
754
764
|
console.error(`Failed to cancel export ${f}:`, C);
|
|
@@ -758,18 +768,18 @@ function Dt() {
|
|
|
758
768
|
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, d]
|
|
759
769
|
);
|
|
760
770
|
return v.length === 0 ? /* @__PURE__ */ s("div", { className: "p-6 text-center", children: [
|
|
761
|
-
/* @__PURE__ */ t(
|
|
771
|
+
/* @__PURE__ */ t(Q, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
|
|
762
772
|
/* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: "No active exports" }),
|
|
763
773
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-muted-foreground", children: "Large exports will appear here" })
|
|
764
774
|
] }) : /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
765
775
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
|
|
766
776
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
767
|
-
/* @__PURE__ */ t(
|
|
777
|
+
/* @__PURE__ */ t(Q, { className: "h-5 w-5 text-muted-foreground" }),
|
|
768
778
|
/* @__PURE__ */ t("h4", { className: "font-semibold", children: "Exports" })
|
|
769
779
|
] }),
|
|
770
780
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
771
781
|
/* @__PURE__ */ t(
|
|
772
|
-
|
|
782
|
+
I,
|
|
773
783
|
{
|
|
774
784
|
variant: "ghost",
|
|
775
785
|
size: "sm",
|
|
@@ -786,7 +796,7 @@ function Dt() {
|
|
|
786
796
|
}
|
|
787
797
|
),
|
|
788
798
|
b && /* @__PURE__ */ t(
|
|
789
|
-
|
|
799
|
+
I,
|
|
790
800
|
{
|
|
791
801
|
variant: "ghost",
|
|
792
802
|
size: "sm",
|
|
@@ -799,31 +809,31 @@ function Dt() {
|
|
|
799
809
|
] })
|
|
800
810
|
] }),
|
|
801
811
|
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: v.map((f) => /* @__PURE__ */ t(
|
|
802
|
-
|
|
812
|
+
Dt,
|
|
803
813
|
{
|
|
804
814
|
export: f,
|
|
805
|
-
onRemove:
|
|
815
|
+
onRemove: N
|
|
806
816
|
},
|
|
807
817
|
f.id
|
|
808
818
|
)) }) })
|
|
809
819
|
] });
|
|
810
820
|
}
|
|
811
|
-
function
|
|
821
|
+
function zt({
|
|
812
822
|
variant: e
|
|
813
823
|
}) {
|
|
814
|
-
const a = U((m) => m.activeExports), p =
|
|
824
|
+
const a = U((m) => m.activeExports), p = Je(), c = a.size > 0, d = Array.from(a.values()).some(
|
|
815
825
|
(m) => m.status === "completed" || m.status === "failed"
|
|
816
826
|
), n = p > 0 ? p > 9 ? "9+" : String(p) : null;
|
|
817
|
-
return /* @__PURE__ */ s(
|
|
818
|
-
/* @__PURE__ */ t(
|
|
819
|
-
|
|
827
|
+
return /* @__PURE__ */ s(me, { children: [
|
|
828
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
|
|
829
|
+
I,
|
|
820
830
|
{
|
|
821
831
|
variant: e ?? "ghost",
|
|
822
832
|
size: "icon",
|
|
823
833
|
className: "relative h-8 w-8",
|
|
824
834
|
"aria-label": "Export notifications",
|
|
825
835
|
children: [
|
|
826
|
-
/* @__PURE__ */ t(
|
|
836
|
+
/* @__PURE__ */ t(Qe, { className: "h-4 w-4" }),
|
|
827
837
|
c && /* @__PURE__ */ t(
|
|
828
838
|
"span",
|
|
829
839
|
{
|
|
@@ -834,10 +844,10 @@ function Ot({
|
|
|
834
844
|
]
|
|
835
845
|
}
|
|
836
846
|
) }),
|
|
837
|
-
/* @__PURE__ */ t(
|
|
847
|
+
/* @__PURE__ */ t(pe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(At, {}) })
|
|
838
848
|
] });
|
|
839
849
|
}
|
|
840
|
-
function
|
|
850
|
+
function St(e) {
|
|
841
851
|
if (e)
|
|
842
852
|
return {
|
|
843
853
|
renamed: e.type === "rename" ? { oldId: e.oldId, newId: e.newId } : void 0,
|
|
@@ -846,7 +856,7 @@ function At(e) {
|
|
|
846
856
|
affectedBindingControlIds: e.type === "add" || e.type === "update" ? e.affectedBindingControlIds : void 0
|
|
847
857
|
};
|
|
848
858
|
}
|
|
849
|
-
function
|
|
859
|
+
function Rt({
|
|
850
860
|
open: e,
|
|
851
861
|
onOpenChange: a,
|
|
852
862
|
trigger: p,
|
|
@@ -860,20 +870,20 @@ function zt({
|
|
|
860
870
|
preventPassiveDismissDuringCreate: o,
|
|
861
871
|
resolvedOpen: v,
|
|
862
872
|
setIsCreateFlowActive: b
|
|
863
|
-
} =
|
|
873
|
+
} = mt({
|
|
864
874
|
open: e,
|
|
865
875
|
onOpenChange: a,
|
|
866
876
|
initialCreateFlowActive: d === "create"
|
|
867
|
-
}), h =
|
|
877
|
+
}), h = B((A) => A.dashboard), { setDashboardControlsModel: w } = X(), { participants: N } = Ye(Ze(h)), f = Array.from(
|
|
868
878
|
new Map(
|
|
869
|
-
|
|
870
|
-
(
|
|
879
|
+
N.flatMap(
|
|
880
|
+
(A) => A.fieldChoices.map((y) => {
|
|
871
881
|
var k;
|
|
872
882
|
return [
|
|
873
|
-
|
|
883
|
+
y.value,
|
|
874
884
|
{
|
|
875
|
-
option:
|
|
876
|
-
target: (k =
|
|
885
|
+
option: y,
|
|
886
|
+
target: (k = A.fieldTargetMap) == null ? void 0 : k[y.value]
|
|
877
887
|
}
|
|
878
888
|
];
|
|
879
889
|
})
|
|
@@ -881,27 +891,27 @@ function zt({
|
|
|
881
891
|
).values()
|
|
882
892
|
), x = Array.from(
|
|
883
893
|
new Map(
|
|
884
|
-
|
|
885
|
-
(
|
|
894
|
+
N.flatMap(
|
|
895
|
+
(A) => A.metricChoices.map((y) => {
|
|
886
896
|
var k;
|
|
887
897
|
return [
|
|
888
|
-
|
|
898
|
+
y.value,
|
|
889
899
|
{
|
|
890
|
-
option:
|
|
891
|
-
target: (k =
|
|
900
|
+
option: y,
|
|
901
|
+
target: (k = A.metricTargetMap) == null ? void 0 : k[y.value]
|
|
892
902
|
}
|
|
893
903
|
];
|
|
894
904
|
})
|
|
895
905
|
)
|
|
896
906
|
).values()
|
|
897
|
-
),
|
|
907
|
+
), S = et({
|
|
898
908
|
...h || {},
|
|
899
909
|
controls: []
|
|
900
|
-
}), C =
|
|
910
|
+
}), C = tt(h), r = (A, y, k) => {
|
|
901
911
|
w(
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
912
|
+
A,
|
|
913
|
+
y,
|
|
914
|
+
St(k)
|
|
905
915
|
);
|
|
906
916
|
}, i = V(() => {
|
|
907
917
|
if (u) {
|
|
@@ -910,16 +920,16 @@ function zt({
|
|
|
910
920
|
}
|
|
911
921
|
b(!1);
|
|
912
922
|
}, [u, n, b]), g = /* @__PURE__ */ t(
|
|
913
|
-
|
|
923
|
+
ht,
|
|
914
924
|
{
|
|
915
925
|
scope: "dashboard",
|
|
916
926
|
controls: h.controls || [],
|
|
917
|
-
reservedControlIds:
|
|
927
|
+
reservedControlIds: S,
|
|
918
928
|
defaultValues: h.defaultControlValues || {},
|
|
919
|
-
usageByControlId:
|
|
929
|
+
usageByControlId: at(h),
|
|
920
930
|
availableFieldChoices: f,
|
|
921
931
|
availableMetricChoices: x,
|
|
922
|
-
structuralParticipants:
|
|
932
|
+
structuralParticipants: N,
|
|
923
933
|
structuralParticipantIdsByControlId: C,
|
|
924
934
|
initialCreateFlow: d === "create",
|
|
925
935
|
onCreateFlowActiveChange: b,
|
|
@@ -927,26 +937,26 @@ function zt({
|
|
|
927
937
|
onChange: r,
|
|
928
938
|
emptyMessage: "No dashboard controls yet."
|
|
929
939
|
}
|
|
930
|
-
), E = m ? "Add dashboard control" : "Dashboard Controls",
|
|
940
|
+
), E = m ? "Add dashboard control" : "Dashboard Controls", D = /* @__PURE__ */ s(O, { children: [
|
|
931
941
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
932
942
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
933
943
|
/* @__PURE__ */ t("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." })
|
|
934
944
|
] }),
|
|
935
945
|
g
|
|
936
946
|
] });
|
|
937
|
-
return c ? /* @__PURE__ */ s(
|
|
938
|
-
/* @__PURE__ */ t(
|
|
939
|
-
/* @__PURE__ */ t(
|
|
947
|
+
return c ? /* @__PURE__ */ s(me, { open: v, onOpenChange: l, children: [
|
|
948
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: p || /* @__PURE__ */ s(I, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
949
|
+
/* @__PURE__ */ t(fe, { className: "mr-2 h-4 w-4" }),
|
|
940
950
|
"Controls"
|
|
941
951
|
] }) }),
|
|
942
952
|
/* @__PURE__ */ t(
|
|
943
|
-
|
|
953
|
+
pe,
|
|
944
954
|
{
|
|
945
955
|
className: "w-[620px] max-w-[95vw] space-y-4",
|
|
946
956
|
align: "end",
|
|
947
957
|
onEscapeKeyDown: o,
|
|
948
958
|
onPointerDownOutside: o,
|
|
949
|
-
children:
|
|
959
|
+
children: D
|
|
950
960
|
}
|
|
951
961
|
)
|
|
952
962
|
] }) : /* @__PURE__ */ t(ae, { open: v, onOpenChange: l, children: /* @__PURE__ */ s(
|
|
@@ -972,7 +982,7 @@ function zt({
|
|
|
972
982
|
}
|
|
973
983
|
) });
|
|
974
984
|
}
|
|
975
|
-
function
|
|
985
|
+
function $t({
|
|
976
986
|
showFilters: e,
|
|
977
987
|
onToggleFilters: a,
|
|
978
988
|
onAddFilter: p,
|
|
@@ -988,16 +998,16 @@ function Rt({
|
|
|
988
998
|
return /* @__PURE__ */ s(
|
|
989
999
|
"div",
|
|
990
1000
|
{
|
|
991
|
-
className:
|
|
1001
|
+
className: L(
|
|
992
1002
|
"relative inline-flex items-stretch overflow-visible rounded-md border border-input bg-background shadow-none",
|
|
993
1003
|
n
|
|
994
1004
|
),
|
|
995
1005
|
children: [
|
|
996
1006
|
/* @__PURE__ */ s(
|
|
997
|
-
|
|
1007
|
+
I,
|
|
998
1008
|
{
|
|
999
1009
|
variant: "ghost",
|
|
1000
|
-
className:
|
|
1010
|
+
className: L(
|
|
1001
1011
|
v ? "h-8" : "h-7",
|
|
1002
1012
|
"rounded-none border-0 bg-transparent pl-3 pr-2 shadow-none hover:bg-accent/50",
|
|
1003
1013
|
l
|
|
@@ -1005,16 +1015,16 @@ function Rt({
|
|
|
1005
1015
|
onClick: a,
|
|
1006
1016
|
size: "sm",
|
|
1007
1017
|
children: [
|
|
1008
|
-
e ? /* @__PURE__ */ t(
|
|
1018
|
+
e ? /* @__PURE__ */ t(pt, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ t(q, { className: "mr-2 h-4 w-4" }),
|
|
1009
1019
|
"Filter"
|
|
1010
1020
|
]
|
|
1011
1021
|
}
|
|
1012
1022
|
),
|
|
1013
|
-
/* @__PURE__ */ s(
|
|
1014
|
-
/* @__PURE__ */ t(
|
|
1015
|
-
|
|
1023
|
+
/* @__PURE__ */ s(le, { children: [
|
|
1024
|
+
/* @__PURE__ */ t(de, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1025
|
+
I,
|
|
1016
1026
|
{
|
|
1017
|
-
className:
|
|
1027
|
+
className: L(
|
|
1018
1028
|
v ? "h-8 w-8" : "h-7 w-8",
|
|
1019
1029
|
"rounded-none border-0 bg-transparent px-1 shadow-none hover:bg-accent/50",
|
|
1020
1030
|
m
|
|
@@ -1022,25 +1032,25 @@ function Rt({
|
|
|
1022
1032
|
variant: "ghost",
|
|
1023
1033
|
size: "sm",
|
|
1024
1034
|
"aria-label": "Filter and control actions",
|
|
1025
|
-
children: /* @__PURE__ */ t(
|
|
1035
|
+
children: /* @__PURE__ */ t(ce, { className: "h-4 w-4" })
|
|
1026
1036
|
}
|
|
1027
1037
|
) }),
|
|
1028
1038
|
/* @__PURE__ */ s(
|
|
1029
|
-
|
|
1039
|
+
ue,
|
|
1030
1040
|
{
|
|
1031
1041
|
align: "start",
|
|
1032
|
-
className:
|
|
1042
|
+
className: L("rounded-xl border border-border/60 p-1 shadow-sm", o),
|
|
1033
1043
|
children: [
|
|
1034
1044
|
/* @__PURE__ */ s(M, { onSelect: p, children: [
|
|
1035
|
-
/* @__PURE__ */ t(
|
|
1045
|
+
/* @__PURE__ */ t(q, { className: "mr-2 h-4 w-4" }),
|
|
1036
1046
|
"Add filter"
|
|
1037
1047
|
] }),
|
|
1038
1048
|
/* @__PURE__ */ s(M, { onSelect: c, children: [
|
|
1039
|
-
/* @__PURE__ */ t(
|
|
1049
|
+
/* @__PURE__ */ t(fe, { className: "mr-2 h-4 w-4" }),
|
|
1040
1050
|
"Add control"
|
|
1041
1051
|
] }),
|
|
1042
1052
|
/* @__PURE__ */ s(M, { onSelect: d, children: [
|
|
1043
|
-
/* @__PURE__ */ t(
|
|
1053
|
+
/* @__PURE__ */ t(st, { className: "mr-2 h-4 w-4" }),
|
|
1044
1054
|
"Manage controls"
|
|
1045
1055
|
] })
|
|
1046
1056
|
]
|
|
@@ -1052,15 +1062,15 @@ function Rt({
|
|
|
1052
1062
|
);
|
|
1053
1063
|
}
|
|
1054
1064
|
export {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1065
|
+
Pt as A,
|
|
1066
|
+
Rt as D,
|
|
1067
|
+
At as E,
|
|
1068
|
+
zt as N,
|
|
1069
|
+
Bt as U,
|
|
1070
|
+
Vt as V,
|
|
1071
|
+
Dt as a,
|
|
1072
|
+
Mt as b,
|
|
1073
|
+
$t as c,
|
|
1074
|
+
Ot as d,
|
|
1075
|
+
Ut as u
|
|
1066
1076
|
};
|