react-semaphor 0.1.296 → 0.1.297
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/{braces-DVrX_3Q_.js → braces-BT-cB4J_.js} +1 -1
- package/dist/chunks/{braces-BNXseceK.js → braces-CSunPeAg.js} +1 -1
- package/dist/chunks/{dashboard-controls-CKKZcVA5.js → dashboard-controls-C6254Ugx.js} +5 -5
- package/dist/chunks/{dashboard-controls-DS2xJxHU.js → dashboard-controls-Za3WPtTh.js} +1 -1
- package/dist/chunks/{dashboard-filter-controls-button-xPaIlNHP.js → dashboard-filter-controls-button-DZnR5IgP.js} +178 -210
- package/dist/chunks/dashboard-filter-controls-button-dYWccDmw.js +11 -0
- package/dist/chunks/{dashboard-json-cuj9vYY9.js → dashboard-json-CuI5gkwY.js} +1 -1
- package/dist/chunks/{dashboard-json-ovQyHWw6.js → dashboard-json-DjpkfbSZ.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BUg3Qyhh.js → dashboard-summary-settings-dialog-C6FUhXQy.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DF076HeJ.js → dashboard-summary-settings-dialog-vC2shhM-.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-CoG-tE_T.js +188 -0
- package/dist/chunks/{edit-dashboard-visual-32TAM00c.js → edit-dashboard-visual-TBI9_Pyh.js} +5738 -5867
- package/dist/chunks/{index-Dbrs96G8.js → index--CoasbAE.js} +272 -282
- package/dist/chunks/{index-BDeJH9hO.js → index-D0iNspb-.js} +34113 -33792
- package/dist/chunks/{resource-management-panel-2qcXsKwg.js → resource-management-panel-Cf4FTR33.js} +1 -1
- package/dist/chunks/{resource-management-panel-C4qoxy_g.js → resource-management-panel-HOWOJUap.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-CHeppRNE.js → use-create-flow-overlay-state-B7bE6z5B.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-BMD3YRzU.js → use-create-flow-overlay-state-BqiJrgeK.js} +1 -1
- package/dist/chunks/{use-visual-utils-dOYWf6nM.js → use-visual-utils-DP6ty2_T.js} +1 -1
- package/dist/chunks/{use-visual-utils-BIHLaVwh.js → use-visual-utils-DyvrB6Zh.js} +1 -1
- 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 +10 -0
- package/dist/types/main.d.ts +29 -11
- package/dist/types/shared.d.ts +10 -0
- package/dist/types/surfboard.d.ts +10 -0
- package/dist/types/types.d.ts +10 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-nqfmscB7.js +0 -11
- package/dist/chunks/edit-dashboard-visual-BtiMcO-L.js +0 -183
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Se, { useState as T, useRef as X, useCallback as
|
|
2
|
-
import { c as le, d as K, aF as z, bM as
|
|
3
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
4
|
-
import { V as dt, E as se, a as re, b as ct, c as ut, L as mt, d as ht, C as pt, u as ft, e as vt } from "./use-create-flow-overlay-state-
|
|
5
|
-
import { u as Ee } from "./use-visual-utils-
|
|
1
|
+
import Se, { useState as T, useRef as X, useCallback as $, useEffect as B, useContext as Ae } from "react";
|
|
2
|
+
import { c as le, d as K, aF as z, bM as Q, bI as de, bJ as W, aG as ce, bH as Ie, e as ue, f as me, g as he, h as pe, i as fe, L as Z, I as Fe, dc as Le, w as Te, B as I, x as q, W as j, M as ke, u as O, N as Pe, Q as J, c0 as ve, dd as Ue, de as ee, y as P, c2 as ge, c1 as G, ai as Me, cG as be, cH as xe, a9 as ye, cJ as we, cK as R, t as Ve, cO as Oe, cx as Be, O as ze, df as Re, b as H, dg as Y, dh as $e, cW as _e, cX as He, cY as je, cZ as Xe, c_ as Ge, c$ as Ke, d0 as Qe, bO as We, X as qe, di as Je, dj as Ye, cD as Ze, bK as te, ab as et, aI as tt, P as Ce, k as De, dk as at, m as Ne, dl as st, dm as rt, dn as ot, dp as nt, dq as it, dr as ae, ds as lt } from "./index-D0iNspb-.js";
|
|
3
|
+
import { jsx as t, jsxs as s, Fragment as _ } from "react/jsx-runtime";
|
|
4
|
+
import { V as dt, E as se, a as re, b as ct, c as ut, L as mt, d as ht, C as pt, u as ft, e as vt } from "./use-create-flow-overlay-state-B7bE6z5B.js";
|
|
5
|
+
import { u as Ee } from "./use-visual-utils-DyvrB6Zh.js";
|
|
6
6
|
import { k as oe } from "./date-formatter-vkCj9Ct-.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -27,17 +27,17 @@ const gt = le("FilterX", [
|
|
|
27
27
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
28
28
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
29
29
|
]), bt = 1e4, xt = 15e3, yt = 3e4, wt = 3e4, Ct = 12e4, ie = 2 * 60 * 60 * 1e3;
|
|
30
|
-
function
|
|
30
|
+
function Dt(e) {
|
|
31
31
|
const a = Date.now() - e.getTime();
|
|
32
32
|
return a < wt ? bt : a < Ct ? xt : yt;
|
|
33
33
|
}
|
|
34
34
|
function Vt() {
|
|
35
35
|
const { authToken: e, tokenProps: a } = K(), v = z((h) => h.activeExports), [l, n] = T(
|
|
36
36
|
typeof document < "u" ? !document.hidden : !0
|
|
37
|
-
),
|
|
37
|
+
), d = X(null), c = X(!1), m = X(void 0), i = a == null ? void 0 : a.apiServiceUrl, r = e == null ? void 0 : e.accessToken, p = $(() => {
|
|
38
38
|
const h = z.getState().activeExports;
|
|
39
39
|
return Array.from(h.values()).filter(
|
|
40
|
-
(y) =>
|
|
40
|
+
(y) => Q(y.status)
|
|
41
41
|
);
|
|
42
42
|
}, []);
|
|
43
43
|
B(() => {
|
|
@@ -49,14 +49,14 @@ function Vt() {
|
|
|
49
49
|
document.removeEventListener("visibilitychange", h);
|
|
50
50
|
};
|
|
51
51
|
}, []);
|
|
52
|
-
const b =
|
|
52
|
+
const b = $(async () => {
|
|
53
53
|
if (!i || !r) {
|
|
54
|
-
|
|
54
|
+
c.current = !1;
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
const h = p();
|
|
58
58
|
if (h.length === 0) {
|
|
59
|
-
|
|
59
|
+
c.current = !1;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const y = Date.now(), E = h.filter(
|
|
@@ -75,17 +75,17 @@ function Vt() {
|
|
|
75
75
|
(o) => y - o.startedAt.getTime() <= ie
|
|
76
76
|
);
|
|
77
77
|
if (f.length === 0) {
|
|
78
|
-
|
|
78
|
+
c.current = !1;
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
const w = await Promise.allSettled(
|
|
82
82
|
f.map(async (o) => {
|
|
83
83
|
try {
|
|
84
84
|
const x = await de(i, r, o.id);
|
|
85
|
-
let
|
|
85
|
+
let N;
|
|
86
86
|
if (x.status === "completed")
|
|
87
87
|
try {
|
|
88
|
-
|
|
88
|
+
N = await W(i, r, o.id);
|
|
89
89
|
} catch (F) {
|
|
90
90
|
console.error(
|
|
91
91
|
`[useExportPolling] Failed to get download URL for ${o.id}:`,
|
|
@@ -101,7 +101,7 @@ function Vt() {
|
|
|
101
101
|
lastUpdatedAt: /* @__PURE__ */ new Date(),
|
|
102
102
|
fileSize: x.fileSize,
|
|
103
103
|
error: x.error,
|
|
104
|
-
downloadUrl:
|
|
104
|
+
downloadUrl: N
|
|
105
105
|
};
|
|
106
106
|
} catch (x) {
|
|
107
107
|
return console.error(
|
|
@@ -116,42 +116,42 @@ function Vt() {
|
|
|
116
116
|
const C = p();
|
|
117
117
|
if (C.length > 0 && !document.hidden) {
|
|
118
118
|
const o = C.reduce(
|
|
119
|
-
(
|
|
119
|
+
(N, F) => F.startedAt < N ? F.startedAt : N,
|
|
120
120
|
C[0].startedAt
|
|
121
|
-
), x =
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
(
|
|
121
|
+
), x = Dt(o);
|
|
122
|
+
d.current && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
123
|
+
var N;
|
|
124
|
+
(N = m.current) == null || N.call(m);
|
|
125
125
|
}, x);
|
|
126
126
|
} else
|
|
127
|
-
|
|
127
|
+
c.current = !1;
|
|
128
128
|
}, [i, r, p]);
|
|
129
129
|
return B(() => {
|
|
130
|
-
|
|
130
|
+
m.current = b;
|
|
131
131
|
}, [b]), B(() => {
|
|
132
132
|
var y;
|
|
133
|
-
p().length > 0 && l && !
|
|
133
|
+
p().length > 0 && l && !c.current && (c.current = !0, (y = m.current) == null || y.call(m));
|
|
134
134
|
}, [v, l, p]), B(() => {
|
|
135
135
|
var y;
|
|
136
136
|
const h = p();
|
|
137
|
-
l && h.length > 0 && !
|
|
137
|
+
l && h.length > 0 && !c.current && (c.current = !0, (y = m.current) == null || y.call(m));
|
|
138
138
|
}, [l, p]), B(() => {
|
|
139
|
-
!l &&
|
|
139
|
+
!l && d.current && (clearTimeout(d.current), d.current = null, c.current = !1);
|
|
140
140
|
}, [l]), B(() => () => {
|
|
141
|
-
|
|
141
|
+
d.current && (clearTimeout(d.current), d.current = null);
|
|
142
142
|
}, []), {
|
|
143
|
-
isPolling:
|
|
143
|
+
isPolling: c.current,
|
|
144
144
|
isTabVisible: l,
|
|
145
145
|
inProgressCount: p().length
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
function Ot() {
|
|
149
|
-
const { authToken: e, tokenProps: a } = K(), v = z((
|
|
149
|
+
const { authToken: e, tokenProps: a } = K(), v = z((m) => m.activeExports), { addExport: l } = ce(), n = X(!1), d = a == null ? void 0 : a.apiServiceUrl, c = e == null ? void 0 : e.accessToken;
|
|
150
150
|
B(() => {
|
|
151
|
-
if (n.current || !
|
|
151
|
+
if (n.current || !d || !c) return;
|
|
152
152
|
(async () => {
|
|
153
153
|
try {
|
|
154
|
-
const { exports: i } = await Ie(
|
|
154
|
+
const { exports: i } = await Ie(d, c, {
|
|
155
155
|
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
156
156
|
limit: 20
|
|
157
157
|
// Limit to recent exports
|
|
@@ -162,7 +162,7 @@ function Ot() {
|
|
|
162
162
|
let b;
|
|
163
163
|
if (r.status === "completed")
|
|
164
164
|
try {
|
|
165
|
-
b = await
|
|
165
|
+
b = await W(d, c, r.id);
|
|
166
166
|
} catch (y) {
|
|
167
167
|
console.error(
|
|
168
168
|
`[useExportRecovery] Failed to get download URL for ${r.id}:`,
|
|
@@ -173,7 +173,7 @@ function Ot() {
|
|
|
173
173
|
id: r.id,
|
|
174
174
|
status: r.status,
|
|
175
175
|
progress: p,
|
|
176
|
-
title:
|
|
176
|
+
title: Nt(r),
|
|
177
177
|
totalRows: r.totalRows,
|
|
178
178
|
totalChunks: r.totalChunks,
|
|
179
179
|
completedChunks: r.completedChunks,
|
|
@@ -192,10 +192,10 @@ function Ot() {
|
|
|
192
192
|
console.error("[useExportRecovery] Failed to recover exports:", i), n.current = !0;
|
|
193
193
|
}
|
|
194
194
|
})();
|
|
195
|
-
}, [
|
|
195
|
+
}, [d, c, l, v]);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
return e.title ? e.title :
|
|
197
|
+
function Nt(e) {
|
|
198
|
+
return e.title ? e.title : Q(
|
|
199
199
|
e.status
|
|
200
200
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
201
201
|
}
|
|
@@ -205,10 +205,10 @@ function Et({
|
|
|
205
205
|
isLibraryVisual: v,
|
|
206
206
|
currentVisualName: l,
|
|
207
207
|
isSaving: n = !1,
|
|
208
|
-
destinationMode:
|
|
209
|
-
onConfirm:
|
|
208
|
+
destinationMode: d = "both",
|
|
209
|
+
onConfirm: c
|
|
210
210
|
}) {
|
|
211
|
-
const [
|
|
211
|
+
const [m, i] = T(
|
|
212
212
|
v && l ? `Copy of ${l}` : l || ""
|
|
213
213
|
), [r, p] = T("");
|
|
214
214
|
Se.useEffect(() => {
|
|
@@ -216,13 +216,13 @@ function Et({
|
|
|
216
216
|
v && l ? `Copy of ${l}` : l || ""
|
|
217
217
|
), p(""));
|
|
218
218
|
}, [e, v, l]);
|
|
219
|
-
const b = !!
|
|
219
|
+
const b = !!m.trim(), h = d === "local" ? {
|
|
220
220
|
saveToLibrary: !1,
|
|
221
221
|
saveToCurrentDashboard: !0,
|
|
222
222
|
badgeType: "local",
|
|
223
223
|
description: "Creates a local copy on the current dashboard.",
|
|
224
224
|
actionLabel: "Add to Dashboard (Local)"
|
|
225
|
-
} :
|
|
225
|
+
} : d === "library" ? {
|
|
226
226
|
saveToLibrary: !0,
|
|
227
227
|
saveToCurrentDashboard: !1,
|
|
228
228
|
badgeType: "library",
|
|
@@ -235,8 +235,8 @@ function Et({
|
|
|
235
235
|
description: "Creates a new library visual and adds a linked copy to this dashboard.",
|
|
236
236
|
actionLabel: "Save Copy as Linked Visual"
|
|
237
237
|
}, y = () => {
|
|
238
|
-
!b || n ||
|
|
239
|
-
name:
|
|
238
|
+
!b || n || c({
|
|
239
|
+
name: m.trim(),
|
|
240
240
|
description: r.trim() || void 0,
|
|
241
241
|
saveToLibrary: h.saveToLibrary,
|
|
242
242
|
saveToCurrentDashboard: h.saveToCurrentDashboard
|
|
@@ -264,7 +264,7 @@ function Et({
|
|
|
264
264
|
Fe,
|
|
265
265
|
{
|
|
266
266
|
id: "name",
|
|
267
|
-
value:
|
|
267
|
+
value: m,
|
|
268
268
|
onChange: (E) => i(E.target.value),
|
|
269
269
|
placeholder: "Enter visual name",
|
|
270
270
|
disabled: n
|
|
@@ -288,7 +288,7 @@ function Et({
|
|
|
288
288
|
] }),
|
|
289
289
|
/* @__PURE__ */ s(Te, { children: [
|
|
290
290
|
/* @__PURE__ */ t(
|
|
291
|
-
|
|
291
|
+
I,
|
|
292
292
|
{
|
|
293
293
|
variant: "outline",
|
|
294
294
|
onClick: () => a(!1),
|
|
@@ -296,32 +296,32 @@ function Et({
|
|
|
296
296
|
children: "Cancel"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
/* @__PURE__ */ s(
|
|
300
|
-
n && /* @__PURE__ */ t(
|
|
299
|
+
/* @__PURE__ */ s(I, { onClick: y, disabled: !b || n, children: [
|
|
300
|
+
n && /* @__PURE__ */ t(q, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
301
301
|
h.actionLabel
|
|
302
302
|
] })
|
|
303
303
|
] })
|
|
304
304
|
] }) });
|
|
305
305
|
}
|
|
306
306
|
function St() {
|
|
307
|
-
const [e, a] = T(!1), [v, l] = T(!1), [n,
|
|
308
|
-
(
|
|
309
|
-
), { getUpdatedFrame: E } = Ee(), { selectVisual: f } = Pe(), { addFrame: w, setSelectedFrameId: S, setIsVisualEditing: C } = J(), o = ve(), x = !!(i != null && i.visualId),
|
|
310
|
-
var
|
|
311
|
-
return ((
|
|
312
|
-
})(), F = Ue((
|
|
313
|
-
|
|
307
|
+
const [e, a] = T(!1), [v, l] = T(!1), [n, d] = T(null), [c, m] = T(null), i = j((u) => u.frame), r = j((u) => u.card), p = ke(), b = O((u) => u.selectedSheetId), h = O((u) => u.dashboard), y = O(
|
|
308
|
+
(u) => u.actions.setIsDashboardPanelOpen
|
|
309
|
+
), { getUpdatedFrame: E } = Ee(), { selectVisual: f } = Pe(), { addFrame: w, setSelectedFrameId: S, setIsVisualEditing: C } = J(), o = ve(), x = !!(i != null && i.visualId), N = (() => {
|
|
310
|
+
var u, g;
|
|
311
|
+
return ((u = i == null ? void 0 : i.cards) == null ? void 0 : u.length) === 1 && ((g = i.cards[0]) != null && g.title) ? i.cards[0].title : p != null && p.title ? p.title : (r == null ? void 0 : r.title) || "Untitled Visual";
|
|
312
|
+
})(), F = Ue((u) => {
|
|
313
|
+
u != null && u.id && (f(u), v && n && c && b && (async () => {
|
|
314
314
|
try {
|
|
315
315
|
const g = {
|
|
316
316
|
...n,
|
|
317
317
|
id: ee(),
|
|
318
|
-
visualId:
|
|
318
|
+
visualId: u.id
|
|
319
319
|
// Link to the newly created library visual
|
|
320
320
|
};
|
|
321
321
|
w(b, g, {
|
|
322
322
|
position: "end",
|
|
323
|
-
semanticExecutionPayload:
|
|
324
|
-
}), S(g.id), l(!1),
|
|
323
|
+
semanticExecutionPayload: c
|
|
324
|
+
}), S(g.id), l(!1), d(null), m(null), C(!1);
|
|
325
325
|
} catch (g) {
|
|
326
326
|
console.error(
|
|
327
327
|
"Failed to promote semantic metadata for saved visual:",
|
|
@@ -335,27 +335,27 @@ function St() {
|
|
|
335
335
|
return {
|
|
336
336
|
saveAsDialogOpen: e,
|
|
337
337
|
setSaveAsDialogOpen: a,
|
|
338
|
-
handleSaveAs: async (
|
|
338
|
+
handleSaveAs: async (u) => {
|
|
339
339
|
if (!b) {
|
|
340
340
|
P.error("No sheet selected");
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
|
-
const g = E(),
|
|
344
|
-
if (
|
|
345
|
-
P.error(
|
|
343
|
+
const g = E(), A = ge(g);
|
|
344
|
+
if (A) {
|
|
345
|
+
P.error(A);
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
348
|
const k = g.cards.length === 1 ? {
|
|
349
349
|
...g,
|
|
350
350
|
cards: g.cards.map((L) => ({
|
|
351
351
|
...L,
|
|
352
|
-
title:
|
|
352
|
+
title: u.name
|
|
353
353
|
// Use visual name as card title
|
|
354
354
|
}))
|
|
355
355
|
} : g;
|
|
356
|
-
if (
|
|
356
|
+
if (u.saveToLibrary) {
|
|
357
357
|
let L = null;
|
|
358
|
-
if (
|
|
358
|
+
if (u.saveToCurrentDashboard)
|
|
359
359
|
try {
|
|
360
360
|
L = await o(k, {
|
|
361
361
|
previousFrame: G(h, k.id)
|
|
@@ -369,16 +369,16 @@ function St() {
|
|
|
369
369
|
);
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
|
-
l(
|
|
372
|
+
l(u.saveToCurrentDashboard), d(k), m(L);
|
|
373
373
|
const M = {
|
|
374
|
-
title:
|
|
375
|
-
description:
|
|
374
|
+
title: u.name,
|
|
375
|
+
description: u.description,
|
|
376
376
|
frameObject: k,
|
|
377
377
|
// Card title synced for single-card frames
|
|
378
378
|
isPrivate: !1
|
|
379
379
|
};
|
|
380
380
|
F.mutate(M);
|
|
381
|
-
} else if (
|
|
381
|
+
} else if (u.saveToCurrentDashboard) {
|
|
382
382
|
const L = {
|
|
383
383
|
...k,
|
|
384
384
|
// Card title already synced
|
|
@@ -402,45 +402,45 @@ function St() {
|
|
|
402
402
|
}
|
|
403
403
|
},
|
|
404
404
|
isLibraryVisual: x,
|
|
405
|
-
currentVisualName:
|
|
405
|
+
currentVisualName: N,
|
|
406
406
|
isSaving: F.isPending
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
function Bt(e = {}) {
|
|
410
|
-
const a = j((
|
|
410
|
+
const a = j((D) => D.frame), v = j((D) => D.editorContext), l = Me((D) => D.selectedVisual), n = O((D) => D.selectedFrameId), d = O((D) => D.selectedSheetId), c = O((D) => D.dashboard), { setIsVisualEditing: m, updateFrame: i } = J(), [r, p] = T(!1), [b, h] = T("both"), y = ve(), E = (v == null ? void 0 : v.type) === "documentSection", f = !!(a != null && a.visualId || l != null && l.id), w = !!(a != null && a.visualId && n), S = f && !w, {
|
|
411
411
|
saveAsDialogOpen: C,
|
|
412
412
|
setSaveAsDialogOpen: o,
|
|
413
413
|
handleSaveAs: x,
|
|
414
|
-
isLibraryVisual:
|
|
414
|
+
isLibraryVisual: N,
|
|
415
415
|
currentVisualName: F,
|
|
416
416
|
isSaving: U
|
|
417
|
-
} = St(), { getUpdatedFrame:
|
|
417
|
+
} = St(), { getUpdatedFrame: u } = Ee();
|
|
418
418
|
if (E)
|
|
419
|
-
return /* @__PURE__ */ s(
|
|
419
|
+
return /* @__PURE__ */ s(_, { children: [
|
|
420
420
|
/* @__PURE__ */ t(se, { className: "rounded-[5px]", variant: "default" }),
|
|
421
421
|
/* @__PURE__ */ t(re, {})
|
|
422
422
|
] });
|
|
423
423
|
const g = async () => {
|
|
424
|
-
if (!
|
|
424
|
+
if (!d) {
|
|
425
425
|
P.error("No sheet selected");
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
428
|
if (r) return;
|
|
429
429
|
p(!0);
|
|
430
|
-
const
|
|
430
|
+
const D = u(), k = ge(D);
|
|
431
431
|
if (k) {
|
|
432
432
|
p(!1), P.error(k);
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
const L = {
|
|
436
|
-
...
|
|
436
|
+
...D,
|
|
437
437
|
visualId: void 0
|
|
438
|
-
}, M = G(
|
|
438
|
+
}, M = G(c, L.id);
|
|
439
439
|
try {
|
|
440
440
|
const V = await y(L, {
|
|
441
441
|
previousFrame: M
|
|
442
442
|
});
|
|
443
|
-
i(
|
|
443
|
+
i(d, L, {
|
|
444
444
|
semanticExecutionPayload: V
|
|
445
445
|
});
|
|
446
446
|
} catch (V) {
|
|
@@ -450,12 +450,12 @@ function Bt(e = {}) {
|
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
452
|
setTimeout(() => {
|
|
453
|
-
p(!1), P.success("Changes applied. Visual is now local to this dashboard"),
|
|
453
|
+
p(!1), P.success("Changes applied. Visual is now local to this dashboard"), m(!1);
|
|
454
454
|
}, 300);
|
|
455
|
-
},
|
|
456
|
-
h(
|
|
455
|
+
}, A = (D) => {
|
|
456
|
+
h(D), o(!0);
|
|
457
457
|
};
|
|
458
|
-
return /* @__PURE__ */ s(
|
|
458
|
+
return /* @__PURE__ */ s(_, { children: [
|
|
459
459
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-[5px]", children: [
|
|
460
460
|
!f && /* @__PURE__ */ t(
|
|
461
461
|
se,
|
|
@@ -474,7 +474,7 @@ function Bt(e = {}) {
|
|
|
474
474
|
f && w && /* @__PURE__ */ t(ut, { className: "rounded-none" }),
|
|
475
475
|
/* @__PURE__ */ s(be, { modal: !1, children: [
|
|
476
476
|
/* @__PURE__ */ t(xe, { asChild: !0, children: /* @__PURE__ */ t(
|
|
477
|
-
|
|
477
|
+
I,
|
|
478
478
|
{
|
|
479
479
|
variant: "default",
|
|
480
480
|
size: "xs",
|
|
@@ -490,7 +490,7 @@ function Bt(e = {}) {
|
|
|
490
490
|
align: "end",
|
|
491
491
|
className: "min-w-[220px] rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
492
492
|
children: [
|
|
493
|
-
w && /* @__PURE__ */ s(
|
|
493
|
+
w && /* @__PURE__ */ s(_, { children: [
|
|
494
494
|
/* @__PURE__ */ s(
|
|
495
495
|
R,
|
|
496
496
|
{
|
|
@@ -507,7 +507,7 @@ function Bt(e = {}) {
|
|
|
507
507
|
/* @__PURE__ */ s(
|
|
508
508
|
R,
|
|
509
509
|
{
|
|
510
|
-
onClick: () =>
|
|
510
|
+
onClick: () => A("local"),
|
|
511
511
|
disabled: U,
|
|
512
512
|
children: [
|
|
513
513
|
/* @__PURE__ */ t(Be, { className: "h-3.5 w-3.5" }),
|
|
@@ -518,7 +518,7 @@ function Bt(e = {}) {
|
|
|
518
518
|
/* @__PURE__ */ s(
|
|
519
519
|
R,
|
|
520
520
|
{
|
|
521
|
-
onClick: () =>
|
|
521
|
+
onClick: () => A("library"),
|
|
522
522
|
disabled: U,
|
|
523
523
|
children: [
|
|
524
524
|
/* @__PURE__ */ t(mt, { className: "h-3.5 w-3.5" }),
|
|
@@ -529,7 +529,7 @@ function Bt(e = {}) {
|
|
|
529
529
|
/* @__PURE__ */ s(
|
|
530
530
|
R,
|
|
531
531
|
{
|
|
532
|
-
onClick: () =>
|
|
532
|
+
onClick: () => A("both"),
|
|
533
533
|
disabled: U,
|
|
534
534
|
children: [
|
|
535
535
|
/* @__PURE__ */ t(ht, { className: "h-3.5 w-3.5" }),
|
|
@@ -547,10 +547,10 @@ function Bt(e = {}) {
|
|
|
547
547
|
Et,
|
|
548
548
|
{
|
|
549
549
|
open: C,
|
|
550
|
-
onOpenChange: (
|
|
551
|
-
U || o(
|
|
550
|
+
onOpenChange: (D) => {
|
|
551
|
+
U || o(D);
|
|
552
552
|
},
|
|
553
|
-
isLibraryVisual:
|
|
553
|
+
isLibraryVisual: N,
|
|
554
554
|
currentVisualName: F,
|
|
555
555
|
isSaving: U,
|
|
556
556
|
destinationMode: b,
|
|
@@ -560,56 +560,24 @@ function Bt(e = {}) {
|
|
|
560
560
|
] });
|
|
561
561
|
}
|
|
562
562
|
function zt({ className: e }) {
|
|
563
|
-
const a = j((
|
|
564
|
-
if (!v || !
|
|
563
|
+
const a = j((r) => r.isDevMode), v = O((r) => r.isVisualEditing), { setIsDevMode: l } = ze(), { config: n } = Ae(Re).tokenProps, d = (n == null ? void 0 : n.showAdvancedMode) !== !1;
|
|
564
|
+
if (!v || !d)
|
|
565
565
|
return null;
|
|
566
|
-
const
|
|
566
|
+
const c = a ? Y : $e, m = a ? "Drag & drop" : "SQL", i = a ? "Switch to drag-and-drop mode" : "Switch to SQL mode";
|
|
567
567
|
return /* @__PURE__ */ s(
|
|
568
|
-
"
|
|
568
|
+
"button",
|
|
569
569
|
{
|
|
570
|
-
|
|
571
|
-
"aria-label":
|
|
572
|
-
|
|
573
|
-
|
|
570
|
+
type: "button",
|
|
571
|
+
"aria-label": i,
|
|
572
|
+
title: i,
|
|
573
|
+
onClick: () => l(!a),
|
|
574
|
+
className: H(
|
|
575
|
+
"inline-flex h-7 items-center gap-1.5 rounded-[5px] border border-border bg-background px-2 text-[12px] font-medium text-foreground transition-colors hover:bg-muted/40",
|
|
574
576
|
e
|
|
575
577
|
),
|
|
576
578
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
|
|
579
|
-
{
|
|
580
|
-
type: "button",
|
|
581
|
-
variant: "ghost",
|
|
582
|
-
size: "xs",
|
|
583
|
-
role: "radio",
|
|
584
|
-
"aria-checked": !a,
|
|
585
|
-
className: $(d, !a && u),
|
|
586
|
-
onClick: () => l(!1),
|
|
587
|
-
children: [
|
|
588
|
-
/* @__PURE__ */ t(Y, { className: "h-3.5 w-3.5" }),
|
|
589
|
-
"Drag & drop"
|
|
590
|
-
]
|
|
591
|
-
}
|
|
592
|
-
),
|
|
593
|
-
/* @__PURE__ */ s(
|
|
594
|
-
A,
|
|
595
|
-
{
|
|
596
|
-
type: "button",
|
|
597
|
-
variant: "ghost",
|
|
598
|
-
size: "xs",
|
|
599
|
-
role: "radio",
|
|
600
|
-
"aria-checked": a,
|
|
601
|
-
className: $(
|
|
602
|
-
d,
|
|
603
|
-
"border-l border-border/60",
|
|
604
|
-
a && u
|
|
605
|
-
),
|
|
606
|
-
onClick: () => l(!0),
|
|
607
|
-
children: [
|
|
608
|
-
/* @__PURE__ */ t($e, { className: "h-3.5 w-3.5" }),
|
|
609
|
-
"SQL"
|
|
610
|
-
]
|
|
611
|
-
}
|
|
612
|
-
)
|
|
579
|
+
/* @__PURE__ */ t(c, { className: "h-3 w-3 text-muted-foreground" }),
|
|
580
|
+
m
|
|
613
581
|
]
|
|
614
582
|
}
|
|
615
583
|
);
|
|
@@ -620,9 +588,9 @@ function Rt({
|
|
|
620
588
|
onSave: v,
|
|
621
589
|
onDiscard: l,
|
|
622
590
|
isSaving: n,
|
|
623
|
-
title:
|
|
624
|
-
description:
|
|
625
|
-
cancelLabel:
|
|
591
|
+
title: d = "Unsaved changes",
|
|
592
|
+
description: c = "You have unsaved changes to this dashboard. What would you like to do?",
|
|
593
|
+
cancelLabel: m = "Cancel",
|
|
626
594
|
discardLabel: i = "Discard",
|
|
627
595
|
saveLabel: r = "Save"
|
|
628
596
|
}) {
|
|
@@ -630,12 +598,12 @@ function Rt({
|
|
|
630
598
|
!b && n || a(b);
|
|
631
599
|
}, children: /* @__PURE__ */ s(He, { children: [
|
|
632
600
|
/* @__PURE__ */ s(je, { children: [
|
|
633
|
-
/* @__PURE__ */ t(Xe, { children:
|
|
634
|
-
/* @__PURE__ */ t(Ge, { children:
|
|
601
|
+
/* @__PURE__ */ t(Xe, { children: d }),
|
|
602
|
+
/* @__PURE__ */ t(Ge, { children: c })
|
|
635
603
|
] }),
|
|
636
604
|
/* @__PURE__ */ s(Ke, { children: [
|
|
637
605
|
/* @__PURE__ */ t(
|
|
638
|
-
|
|
606
|
+
I,
|
|
639
607
|
{
|
|
640
608
|
type: "button",
|
|
641
609
|
size: "xs",
|
|
@@ -646,9 +614,9 @@ function Rt({
|
|
|
646
614
|
children: i
|
|
647
615
|
}
|
|
648
616
|
),
|
|
649
|
-
/* @__PURE__ */ t(
|
|
650
|
-
/* @__PURE__ */ t(
|
|
651
|
-
/* @__PURE__ */ t(
|
|
617
|
+
/* @__PURE__ */ t(Qe, { disabled: n, children: m }),
|
|
618
|
+
/* @__PURE__ */ t(I, { type: "button", size: "xs", onClick: v, disabled: n, children: n ? /* @__PURE__ */ s(_, { children: [
|
|
619
|
+
/* @__PURE__ */ t(q, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
652
620
|
"Saving..."
|
|
653
621
|
] }) : r })
|
|
654
622
|
] })
|
|
@@ -660,8 +628,8 @@ function At({
|
|
|
660
628
|
}) {
|
|
661
629
|
const v = () => {
|
|
662
630
|
e.downloadUrl && window.open(e.downloadUrl, "_blank");
|
|
663
|
-
}, l = (
|
|
664
|
-
|
|
631
|
+
}, l = (m) => {
|
|
632
|
+
m.stopPropagation(), a == null || a(e.id);
|
|
665
633
|
}, n = () => {
|
|
666
634
|
switch (e.status) {
|
|
667
635
|
case "completed":
|
|
@@ -669,9 +637,9 @@ function At({
|
|
|
669
637
|
case "failed":
|
|
670
638
|
return /* @__PURE__ */ t(pt, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
671
639
|
default:
|
|
672
|
-
return /* @__PURE__ */ t(
|
|
640
|
+
return /* @__PURE__ */ t(q, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
673
641
|
}
|
|
674
|
-
},
|
|
642
|
+
}, d = Q(e.status), c = (() => {
|
|
675
643
|
switch (e.status) {
|
|
676
644
|
case "pending":
|
|
677
645
|
return "Queued...";
|
|
@@ -696,24 +664,24 @@ function At({
|
|
|
696
664
|
e.totalRows.toLocaleString(),
|
|
697
665
|
" rows"
|
|
698
666
|
] }),
|
|
699
|
-
e.fileSize && /* @__PURE__ */ s(
|
|
667
|
+
e.fileSize && /* @__PURE__ */ s(_, { children: [
|
|
700
668
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
701
|
-
/* @__PURE__ */ t("span", { children:
|
|
669
|
+
/* @__PURE__ */ t("span", { children: We(e.fileSize) })
|
|
702
670
|
] })
|
|
703
671
|
] }),
|
|
704
|
-
|
|
672
|
+
d && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: c }),
|
|
705
673
|
e.status === "failed" && /* @__PURE__ */ t("div", { className: "line-clamp-2 text-xs text-destructive", children: e.error || "Export failed" })
|
|
706
674
|
] })
|
|
707
675
|
] }),
|
|
708
676
|
/* @__PURE__ */ t(
|
|
709
|
-
|
|
677
|
+
I,
|
|
710
678
|
{
|
|
711
679
|
variant: "ghost",
|
|
712
680
|
size: "icon",
|
|
713
681
|
className: "h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
714
682
|
onClick: l,
|
|
715
683
|
"aria-label": "Remove notification",
|
|
716
|
-
children: /* @__PURE__ */ t(
|
|
684
|
+
children: /* @__PURE__ */ t(qe, { className: "h-4 w-4" })
|
|
717
685
|
}
|
|
718
686
|
)
|
|
719
687
|
] }),
|
|
@@ -721,7 +689,7 @@ function At({
|
|
|
721
689
|
e.status === "completed" && /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
722
690
|
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: oe(e.startedAt, { addSuffix: !0 }) }),
|
|
723
691
|
e.downloadUrl && /* @__PURE__ */ s(
|
|
724
|
-
|
|
692
|
+
I,
|
|
725
693
|
{
|
|
726
694
|
size: "sm",
|
|
727
695
|
variant: "outline",
|
|
@@ -734,7 +702,7 @@ function At({
|
|
|
734
702
|
}
|
|
735
703
|
)
|
|
736
704
|
] }),
|
|
737
|
-
|
|
705
|
+
d && /* @__PURE__ */ s("div", { children: [
|
|
738
706
|
/* @__PURE__ */ t(Ye, { value: e.progress, className: "h-1.5" }),
|
|
739
707
|
/* @__PURE__ */ s("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
740
708
|
e.progress,
|
|
@@ -746,14 +714,14 @@ function At({
|
|
|
746
714
|
] });
|
|
747
715
|
}
|
|
748
716
|
function It() {
|
|
749
|
-
const { authToken: e, tokenProps: a } = K(), v = z((f) => f.activeExports), { clearCompleted: l, removeExport: n, updateExport:
|
|
717
|
+
const { authToken: e, tokenProps: a } = K(), v = z((f) => f.activeExports), { clearCompleted: l, removeExport: n, updateExport: d } = ce(), [c, m] = T(!1), [i, r] = T(!1), p = Array.from(v.values()).sort(
|
|
750
718
|
(f, w) => w.startedAt.getTime() - f.startedAt.getTime()
|
|
751
719
|
), b = p.some(
|
|
752
720
|
(f) => f.status === "completed" || f.status === "failed"
|
|
753
|
-
), h =
|
|
721
|
+
), h = $(async () => {
|
|
754
722
|
const f = a == null ? void 0 : a.apiServiceUrl, w = e == null ? void 0 : e.accessToken;
|
|
755
723
|
if (!(!f || !w)) {
|
|
756
|
-
|
|
724
|
+
m(!0);
|
|
757
725
|
try {
|
|
758
726
|
const S = Array.from(v.values());
|
|
759
727
|
await Promise.all(
|
|
@@ -763,15 +731,15 @@ function It() {
|
|
|
763
731
|
let x;
|
|
764
732
|
if (o.status === "completed")
|
|
765
733
|
try {
|
|
766
|
-
x = await
|
|
734
|
+
x = await W(
|
|
767
735
|
f,
|
|
768
736
|
w,
|
|
769
737
|
C.id
|
|
770
738
|
);
|
|
771
|
-
} catch (
|
|
772
|
-
console.error(`Failed to get download URL for ${C.id}:`,
|
|
739
|
+
} catch (N) {
|
|
740
|
+
console.error(`Failed to get download URL for ${C.id}:`, N);
|
|
773
741
|
}
|
|
774
|
-
|
|
742
|
+
d(C.id, {
|
|
775
743
|
status: o.status,
|
|
776
744
|
progress: o.progress,
|
|
777
745
|
completedChunks: o.completedChunks,
|
|
@@ -787,15 +755,15 @@ function It() {
|
|
|
787
755
|
})
|
|
788
756
|
);
|
|
789
757
|
} finally {
|
|
790
|
-
|
|
758
|
+
m(!1);
|
|
791
759
|
}
|
|
792
760
|
}
|
|
793
761
|
}, [
|
|
794
762
|
v,
|
|
795
763
|
e == null ? void 0 : e.accessToken,
|
|
796
764
|
a == null ? void 0 : a.apiServiceUrl,
|
|
797
|
-
|
|
798
|
-
]), y =
|
|
765
|
+
d
|
|
766
|
+
]), y = $(async () => {
|
|
799
767
|
const f = a == null ? void 0 : a.apiServiceUrl, w = e == null ? void 0 : e.accessToken;
|
|
800
768
|
if (!f || !w) {
|
|
801
769
|
l();
|
|
@@ -819,7 +787,7 @@ function It() {
|
|
|
819
787
|
e == null ? void 0 : e.accessToken,
|
|
820
788
|
l,
|
|
821
789
|
n
|
|
822
|
-
]), E =
|
|
790
|
+
]), E = $(
|
|
823
791
|
async (f) => {
|
|
824
792
|
const w = a == null ? void 0 : a.apiServiceUrl, S = e == null ? void 0 : e.accessToken;
|
|
825
793
|
if (w && S)
|
|
@@ -845,24 +813,24 @@ function It() {
|
|
|
845
813
|
] }),
|
|
846
814
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
847
815
|
/* @__PURE__ */ t(
|
|
848
|
-
|
|
816
|
+
I,
|
|
849
817
|
{
|
|
850
818
|
variant: "ghost",
|
|
851
819
|
size: "sm",
|
|
852
820
|
className: "h-7 w-7 p-0",
|
|
853
821
|
onClick: h,
|
|
854
|
-
disabled:
|
|
822
|
+
disabled: c,
|
|
855
823
|
title: "Refresh status",
|
|
856
824
|
children: /* @__PURE__ */ t(
|
|
857
825
|
et,
|
|
858
826
|
{
|
|
859
|
-
className: `h-4 w-4 ${
|
|
827
|
+
className: `h-4 w-4 ${c ? "animate-spin" : ""}`
|
|
860
828
|
}
|
|
861
829
|
)
|
|
862
830
|
}
|
|
863
831
|
),
|
|
864
832
|
b && /* @__PURE__ */ t(
|
|
865
|
-
|
|
833
|
+
I,
|
|
866
834
|
{
|
|
867
835
|
variant: "ghost",
|
|
868
836
|
size: "sm",
|
|
@@ -889,10 +857,10 @@ function $t({
|
|
|
889
857
|
}) {
|
|
890
858
|
const a = z((i) => i.activeExports), v = tt(), l = a.size > 0, n = Array.from(a.values()).some(
|
|
891
859
|
(i) => i.status === "completed" || i.status === "failed"
|
|
892
|
-
),
|
|
860
|
+
), c = v > 0 ? v > 9 ? "9+" : String(v) : null;
|
|
893
861
|
return /* @__PURE__ */ s(Ce, { children: [
|
|
894
|
-
/* @__PURE__ */ t(
|
|
895
|
-
|
|
862
|
+
/* @__PURE__ */ t(De, { asChild: !0, children: /* @__PURE__ */ s(
|
|
863
|
+
I,
|
|
896
864
|
{
|
|
897
865
|
variant: e ?? "ghost",
|
|
898
866
|
size: "xs",
|
|
@@ -903,14 +871,14 @@ function $t({
|
|
|
903
871
|
l && /* @__PURE__ */ t(
|
|
904
872
|
"span",
|
|
905
873
|
{
|
|
906
|
-
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${
|
|
907
|
-
children:
|
|
874
|
+
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${c ? "-right-0.5 -top-0.5 h-3.5 min-w-3.5 px-0.5 text-[9px] font-semibold" : "right-1 top-1 h-1.5 w-1.5"}`,
|
|
875
|
+
children: c
|
|
908
876
|
}
|
|
909
877
|
)
|
|
910
878
|
]
|
|
911
879
|
}
|
|
912
880
|
) }),
|
|
913
|
-
/* @__PURE__ */ t(
|
|
881
|
+
/* @__PURE__ */ t(Ne, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(It, {}) })
|
|
914
882
|
] });
|
|
915
883
|
}
|
|
916
884
|
function Ft(e) {
|
|
@@ -929,9 +897,9 @@ function _t({
|
|
|
929
897
|
showTrigger: l = !0,
|
|
930
898
|
initialMode: n = "manage"
|
|
931
899
|
}) {
|
|
932
|
-
const
|
|
933
|
-
forceClose:
|
|
934
|
-
handleOpenChange:
|
|
900
|
+
const d = n === "create", {
|
|
901
|
+
forceClose: c,
|
|
902
|
+
handleOpenChange: m,
|
|
935
903
|
isCreateFlowActive: i,
|
|
936
904
|
preventPassiveDismissDuringCreate: r,
|
|
937
905
|
resolvedOpen: p,
|
|
@@ -947,16 +915,16 @@ function _t({
|
|
|
947
915
|
// create and make consumers use `forceClose()` from a dedicated
|
|
948
916
|
// button.
|
|
949
917
|
dismissMode: l ? "passive" : "explicit-only"
|
|
950
|
-
}), h = O((
|
|
918
|
+
}), h = O((u) => u.dashboard), { setDashboardControlsModel: y } = J(), { participants: E } = st(rt(h)), f = Array.from(
|
|
951
919
|
new Map(
|
|
952
920
|
E.flatMap(
|
|
953
|
-
(
|
|
954
|
-
var
|
|
921
|
+
(u) => u.fieldChoices.map((g) => {
|
|
922
|
+
var A;
|
|
955
923
|
return [
|
|
956
924
|
g.value,
|
|
957
925
|
{
|
|
958
926
|
option: g,
|
|
959
|
-
target: (
|
|
927
|
+
target: (A = u.fieldTargetMap) == null ? void 0 : A[g.value]
|
|
960
928
|
}
|
|
961
929
|
];
|
|
962
930
|
})
|
|
@@ -965,13 +933,13 @@ function _t({
|
|
|
965
933
|
), w = Array.from(
|
|
966
934
|
new Map(
|
|
967
935
|
E.flatMap(
|
|
968
|
-
(
|
|
969
|
-
var
|
|
936
|
+
(u) => u.metricChoices.map((g) => {
|
|
937
|
+
var A;
|
|
970
938
|
return [
|
|
971
939
|
g.value,
|
|
972
940
|
{
|
|
973
941
|
option: g,
|
|
974
|
-
target: (
|
|
942
|
+
target: (A = u.metricTargetMap) == null ? void 0 : A[g.value]
|
|
975
943
|
}
|
|
976
944
|
];
|
|
977
945
|
})
|
|
@@ -980,19 +948,19 @@ function _t({
|
|
|
980
948
|
), S = ot({
|
|
981
949
|
...h || {},
|
|
982
950
|
controls: []
|
|
983
|
-
}), C = nt(h), o = (
|
|
951
|
+
}), C = nt(h), o = (u, g, A) => {
|
|
984
952
|
y(
|
|
985
|
-
|
|
953
|
+
u,
|
|
986
954
|
g,
|
|
987
|
-
Ft(
|
|
955
|
+
Ft(A)
|
|
988
956
|
);
|
|
989
|
-
}, x =
|
|
990
|
-
if (
|
|
991
|
-
|
|
957
|
+
}, x = $(() => {
|
|
958
|
+
if (d) {
|
|
959
|
+
c();
|
|
992
960
|
return;
|
|
993
961
|
}
|
|
994
962
|
b(!1);
|
|
995
|
-
}, [
|
|
963
|
+
}, [d, c, b]), N = /* @__PURE__ */ t(
|
|
996
964
|
vt,
|
|
997
965
|
{
|
|
998
966
|
scope: "dashboard",
|
|
@@ -1010,20 +978,20 @@ function _t({
|
|
|
1010
978
|
onChange: o,
|
|
1011
979
|
emptyMessage: "No dashboard controls yet."
|
|
1012
980
|
}
|
|
1013
|
-
), F = i ? "Add dashboard control" : "Dashboard Controls", U = /* @__PURE__ */ s(
|
|
981
|
+
), F = i ? "Add dashboard control" : "Dashboard Controls", U = /* @__PURE__ */ s(_, { children: [
|
|
1014
982
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1015
983
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
1016
984
|
/* @__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." })
|
|
1017
985
|
] }),
|
|
1018
|
-
|
|
986
|
+
N
|
|
1019
987
|
] });
|
|
1020
|
-
return l ? /* @__PURE__ */ s(Ce, { open: p, onOpenChange:
|
|
1021
|
-
/* @__PURE__ */ t(
|
|
988
|
+
return l ? /* @__PURE__ */ s(Ce, { open: p, onOpenChange: m, children: [
|
|
989
|
+
/* @__PURE__ */ t(De, { asChild: !0, children: v || /* @__PURE__ */ s(I, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
1022
990
|
/* @__PURE__ */ t(Y, { className: "mr-2 h-4 w-4" }),
|
|
1023
991
|
"Controls"
|
|
1024
992
|
] }) }),
|
|
1025
993
|
/* @__PURE__ */ t(
|
|
1026
|
-
|
|
994
|
+
Ne,
|
|
1027
995
|
{
|
|
1028
996
|
className: "w-[620px] max-w-[95vw] space-y-4",
|
|
1029
997
|
align: "end",
|
|
@@ -1032,7 +1000,7 @@ function _t({
|
|
|
1032
1000
|
children: U
|
|
1033
1001
|
}
|
|
1034
1002
|
)
|
|
1035
|
-
] }) : /* @__PURE__ */ t(ue, { open: p, onOpenChange:
|
|
1003
|
+
] }) : /* @__PURE__ */ t(ue, { open: p, onOpenChange: m, children: /* @__PURE__ */ s(
|
|
1036
1004
|
me,
|
|
1037
1005
|
{
|
|
1038
1006
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
@@ -1055,7 +1023,7 @@ function _t({
|
|
|
1055
1023
|
]
|
|
1056
1024
|
}
|
|
1057
1025
|
),
|
|
1058
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children:
|
|
1026
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: N })
|
|
1059
1027
|
]
|
|
1060
1028
|
}
|
|
1061
1029
|
) });
|
|
@@ -1066,33 +1034,33 @@ function Ht({
|
|
|
1066
1034
|
onAddFilter: v,
|
|
1067
1035
|
onAddControl: l,
|
|
1068
1036
|
onManageControls: n,
|
|
1069
|
-
size:
|
|
1070
|
-
className:
|
|
1071
|
-
primaryButtonClassName:
|
|
1037
|
+
size: d = "default",
|
|
1038
|
+
className: c,
|
|
1039
|
+
primaryButtonClassName: m,
|
|
1072
1040
|
secondaryButtonClassName: i,
|
|
1073
1041
|
dropdownContentClassName: r
|
|
1074
1042
|
}) {
|
|
1075
1043
|
return /* @__PURE__ */ s(
|
|
1076
1044
|
"div",
|
|
1077
1045
|
{
|
|
1078
|
-
className:
|
|
1046
|
+
className: H(
|
|
1079
1047
|
// Height lives on the shell so the outer border is part of the
|
|
1080
1048
|
// h-7 box (matches regular `size="xs"` buttons). Inner buttons
|
|
1081
1049
|
// stretch to fill via `h-full`, avoiding the 2px stack-up that
|
|
1082
1050
|
// makes the combo taller than a sibling `<Button size="xs">`.
|
|
1083
1051
|
"relative inline-flex items-stretch overflow-hidden rounded-[5px] border border-input bg-background",
|
|
1084
|
-
|
|
1085
|
-
|
|
1052
|
+
d === "toolbar" ? "h-8" : "h-7",
|
|
1053
|
+
c
|
|
1086
1054
|
),
|
|
1087
1055
|
children: [
|
|
1088
1056
|
/* @__PURE__ */ s(
|
|
1089
|
-
|
|
1057
|
+
I,
|
|
1090
1058
|
{
|
|
1091
1059
|
variant: "ghost",
|
|
1092
1060
|
size: "xs",
|
|
1093
|
-
className:
|
|
1061
|
+
className: H(
|
|
1094
1062
|
"h-full rounded-none border-0 bg-transparent pl-2.5 pr-2 shadow-none hover:bg-accent/50",
|
|
1095
|
-
|
|
1063
|
+
m
|
|
1096
1064
|
),
|
|
1097
1065
|
onClick: a,
|
|
1098
1066
|
children: [
|
|
@@ -1103,11 +1071,11 @@ function Ht({
|
|
|
1103
1071
|
),
|
|
1104
1072
|
/* @__PURE__ */ s(be, { children: [
|
|
1105
1073
|
/* @__PURE__ */ t(xe, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1106
|
-
|
|
1074
|
+
I,
|
|
1107
1075
|
{
|
|
1108
1076
|
variant: "ghost",
|
|
1109
1077
|
size: "xs",
|
|
1110
|
-
className:
|
|
1078
|
+
className: H(
|
|
1111
1079
|
"h-full w-7 rounded-none border-0 border-l border-border/60 bg-transparent px-0 shadow-none hover:bg-accent/50",
|
|
1112
1080
|
i
|
|
1113
1081
|
),
|
|
@@ -1119,7 +1087,7 @@ function Ht({
|
|
|
1119
1087
|
we,
|
|
1120
1088
|
{
|
|
1121
1089
|
align: "start",
|
|
1122
|
-
className:
|
|
1090
|
+
className: H(
|
|
1123
1091
|
"min-w-[180px] rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
1124
1092
|
r
|
|
1125
1093
|
),
|