react-semaphor 0.1.285 → 0.1.286
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-B8f_BKTb.js → dashboard-controls-ItYogy_p.js} +4 -4
- package/dist/chunks/{dashboard-controls-DSwmmI8w.js → dashboard-controls-L0PZjJCt.js} +318 -341
- package/dist/chunks/{dashboard-filter-controls-button-BqmNXVoa.js → dashboard-filter-controls-button-BBM66Kjx.js} +476 -442
- package/dist/chunks/dashboard-filter-controls-button-C0aCuD2T.js +11 -0
- package/dist/chunks/{dashboard-json-qT21EDMm.js → dashboard-json-BQ-vAiN1.js} +1 -1
- package/dist/chunks/{dashboard-json-D0H5w5WI.js → dashboard-json-DVGKEKGc.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BRI5dAfz.js → dashboard-summary-settings-dialog-DlXqW4ur.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-Mq8T35Qv.js → dashboard-summary-settings-dialog-jRhWndnZ.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DLpQykTX.js → edit-dashboard-visual-BFIX635s.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-gSIS7RGI.js → edit-dashboard-visual-DOyPqIRy.js} +4 -4
- package/dist/chunks/{index-Celt_oJr.js → index-5fuOmhsI.js} +170 -170
- package/dist/chunks/{index-r_DA-pny.js → index-BJLFSwZr.js} +10190 -10214
- package/dist/chunks/resource-management-panel-DMIhpLZ1.js +933 -0
- package/dist/chunks/resource-management-panel-DPJ6MzLA.js +6 -0
- package/dist/chunks/{use-create-flow-overlay-state-C1xhazfY.js → use-create-flow-overlay-state-BU00QaON.js} +142 -145
- package/dist/chunks/use-create-flow-overlay-state-CvuLpw1f.js +21 -0
- package/dist/chunks/{use-visual-utils-CWcTBBvd.js → use-visual-utils-DUV4E_sx.js} +1 -1
- package/dist/chunks/{use-visual-utils-CqL5PNOR.js → use-visual-utils-DlwYqcbg.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/main.d.ts +18 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-DXKJ-0iV.js +0 -11
- package/dist/chunks/resource-management-panel-Brj3iNyX.js +0 -6
- package/dist/chunks/resource-management-panel-DXLca9OX.js +0 -920
- package/dist/chunks/use-create-flow-overlay-state-DVyd9L7O.js +0 -21
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import ge, { useState as
|
|
2
|
-
import { bM as
|
|
3
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
4
|
-
import { V as
|
|
5
|
-
import { u as ve } from "./use-visual-utils-
|
|
6
|
-
import { k as
|
|
1
|
+
import ge, { useState as L, useRef as O, useCallback as M, useEffect as F, useContext as be } from "react";
|
|
2
|
+
import { bM as ee, b as _, aC as k, bJ as $, bF as te, bG as j, aD as ae, bE as xe, d as se, e as re, f as oe, g as ne, h as ie, L as K, I as Ce, d8 as we, v as ye, B as S, w as H, U as R, J as Ne, u as z, K as De, N as X, d9 as Ae, da as W, x as P, b_ as le, af as Se, cC as de, cD as ce, a6 as ue, cF as he, cG as U, s as Ee, cK as Ie, ct as Le, M as Fe, db as Te, c as V, dc as G, dd as ke, cS as Ue, cT as Ve, cU as Me, cV as Pe, cW as ze, cX as Be, cY as Oe, as as Re, bL as _e, X as $e, de as je, df as He, cz as Xe, bH as q, a8 as Ge, aF as Ke, P as me, j as pe, dg as We, l as fe, dh as qe, di as Je, dj as Qe, dk as Ye, dl as Ze, dm as J, dn as et } from "./index-BJLFSwZr.js";
|
|
3
|
+
import { jsx as t, jsxs as s, Fragment as B } from "react/jsx-runtime";
|
|
4
|
+
import { V as tt, E as at, a as st, b as rt, L as ot, c as nt, d as it, C as lt, u as dt, e as ct } from "./use-create-flow-overlay-state-BU00QaON.js";
|
|
5
|
+
import { u as ve } from "./use-visual-utils-DlwYqcbg.js";
|
|
6
|
+
import { k as Q } 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 Y =
|
|
13
|
+
const Y = ee("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,48 +22,48 @@ const Y = 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 ut = ee("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
|
+
]), ht = 1e4, mt = 15e3, pt = 3e4, ft = 3e4, vt = 12e4, Z = 2 * 60 * 60 * 1e3;
|
|
30
|
+
function gt(e) {
|
|
31
31
|
const a = Date.now() - e.getTime();
|
|
32
|
-
return a <
|
|
32
|
+
return a < ft ? ht : a < vt ? mt : pt;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const { authToken: e, tokenProps: a } =
|
|
34
|
+
function Ft() {
|
|
35
|
+
const { authToken: e, tokenProps: a } = _(), p = k((m) => m.activeExports), [d, l] = L(
|
|
36
36
|
typeof document < "u" ? !document.hidden : !0
|
|
37
|
-
),
|
|
38
|
-
const m =
|
|
37
|
+
), h = O(null), o = O(!1), c = O(void 0), u = a == null ? void 0 : a.apiServiceUrl, n = e == null ? void 0 : e.accessToken, v = M(() => {
|
|
38
|
+
const m = k.getState().activeExports;
|
|
39
39
|
return Array.from(m.values()).filter(
|
|
40
|
-
(
|
|
40
|
+
(x) => $(x.status)
|
|
41
41
|
);
|
|
42
42
|
}, []);
|
|
43
|
-
|
|
43
|
+
F(() => {
|
|
44
44
|
if (typeof document > "u") return;
|
|
45
45
|
const m = () => {
|
|
46
|
-
|
|
46
|
+
l(!document.hidden);
|
|
47
47
|
};
|
|
48
48
|
return document.addEventListener("visibilitychange", m), () => {
|
|
49
49
|
document.removeEventListener("visibilitychange", m);
|
|
50
50
|
};
|
|
51
51
|
}, []);
|
|
52
|
-
const b =
|
|
53
|
-
if (!
|
|
54
|
-
|
|
52
|
+
const b = M(async () => {
|
|
53
|
+
if (!u || !n) {
|
|
54
|
+
o.current = !1;
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
const m = v();
|
|
58
58
|
if (m.length === 0) {
|
|
59
|
-
|
|
59
|
+
o.current = !1;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
(r) =>
|
|
62
|
+
const x = Date.now(), N = m.filter(
|
|
63
|
+
(r) => x - r.startedAt.getTime() > Z
|
|
64
64
|
);
|
|
65
65
|
if (N.length > 0) {
|
|
66
|
-
const { updateExport: r } =
|
|
66
|
+
const { updateExport: r } = k.getState().actions;
|
|
67
67
|
for (const i of N)
|
|
68
68
|
r(i.id, {
|
|
69
69
|
status: "failed",
|
|
@@ -72,24 +72,24 @@ function Tt() {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
const f = m.filter(
|
|
75
|
-
(r) =>
|
|
75
|
+
(r) => x - r.startedAt.getTime() <= Z
|
|
76
76
|
);
|
|
77
77
|
if (f.length === 0) {
|
|
78
|
-
|
|
78
|
+
o.current = !1;
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const w = await Promise.allSettled(
|
|
82
82
|
f.map(async (r) => {
|
|
83
83
|
try {
|
|
84
|
-
const i = await
|
|
84
|
+
const i = await te(u, n, r.id);
|
|
85
85
|
let g;
|
|
86
86
|
if (i.status === "completed")
|
|
87
87
|
try {
|
|
88
|
-
g = await j(
|
|
89
|
-
} catch (
|
|
88
|
+
g = await j(u, n, r.id);
|
|
89
|
+
} catch (I) {
|
|
90
90
|
console.error(
|
|
91
91
|
`[useExportPolling] Failed to get download URL for ${r.id}:`,
|
|
92
|
-
|
|
92
|
+
I
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
return {
|
|
@@ -110,119 +110,119 @@ function Tt() {
|
|
|
110
110
|
), null;
|
|
111
111
|
}
|
|
112
112
|
})
|
|
113
|
-
), { updateExport:
|
|
114
|
-
for (const r of
|
|
115
|
-
r.status === "fulfilled" && r.value &&
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
const r =
|
|
119
|
-
(g,
|
|
120
|
-
|
|
121
|
-
), i =
|
|
122
|
-
|
|
113
|
+
), { updateExport: E } = k.getState().actions;
|
|
114
|
+
for (const r of w)
|
|
115
|
+
r.status === "fulfilled" && r.value && E(r.value.id, r.value);
|
|
116
|
+
const C = v();
|
|
117
|
+
if (C.length > 0 && !document.hidden) {
|
|
118
|
+
const r = C.reduce(
|
|
119
|
+
(g, I) => I.startedAt < g ? I.startedAt : g,
|
|
120
|
+
C[0].startedAt
|
|
121
|
+
), i = gt(r);
|
|
122
|
+
h.current && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
123
123
|
var g;
|
|
124
|
-
(g =
|
|
124
|
+
(g = c.current) == null || g.call(c);
|
|
125
125
|
}, i);
|
|
126
126
|
} else
|
|
127
|
-
|
|
128
|
-
}, [
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
}, [b]),
|
|
132
|
-
var
|
|
133
|
-
v().length > 0 && d && !
|
|
134
|
-
}, [p, d, v]),
|
|
135
|
-
var
|
|
127
|
+
o.current = !1;
|
|
128
|
+
}, [u, n, v]);
|
|
129
|
+
return F(() => {
|
|
130
|
+
c.current = b;
|
|
131
|
+
}, [b]), F(() => {
|
|
132
|
+
var x;
|
|
133
|
+
v().length > 0 && d && !o.current && (o.current = !0, (x = c.current) == null || x.call(c));
|
|
134
|
+
}, [p, d, v]), F(() => {
|
|
135
|
+
var x;
|
|
136
136
|
const m = v();
|
|
137
|
-
d && m.length > 0 && !
|
|
138
|
-
}, [d, v]),
|
|
139
|
-
!d &&
|
|
140
|
-
}, [d]),
|
|
141
|
-
|
|
137
|
+
d && m.length > 0 && !o.current && (o.current = !0, (x = c.current) == null || x.call(c));
|
|
138
|
+
}, [d, v]), F(() => {
|
|
139
|
+
!d && h.current && (clearTimeout(h.current), h.current = null, o.current = !1);
|
|
140
|
+
}, [d]), F(() => () => {
|
|
141
|
+
h.current && (clearTimeout(h.current), h.current = null);
|
|
142
142
|
}, []), {
|
|
143
|
-
isPolling:
|
|
143
|
+
isPolling: o.current,
|
|
144
144
|
isTabVisible: d,
|
|
145
145
|
inProgressCount: v().length
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const { authToken: e, tokenProps: a } =
|
|
150
|
-
|
|
151
|
-
if (
|
|
148
|
+
function Tt() {
|
|
149
|
+
const { authToken: e, tokenProps: a } = _(), p = k((c) => c.activeExports), { addExport: d } = ae(), l = O(!1), h = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
|
|
150
|
+
F(() => {
|
|
151
|
+
if (l.current || !h || !o) return;
|
|
152
152
|
(async () => {
|
|
153
153
|
try {
|
|
154
|
-
const { exports:
|
|
154
|
+
const { exports: u } = await xe(h, o, {
|
|
155
155
|
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
156
156
|
limit: 20
|
|
157
157
|
// Limit to recent exports
|
|
158
158
|
});
|
|
159
|
-
for (const
|
|
160
|
-
if (p.has(
|
|
161
|
-
const v =
|
|
159
|
+
for (const n of u) {
|
|
160
|
+
if (p.has(n.id)) continue;
|
|
161
|
+
const v = n.totalChunks ? Math.round(n.completedChunks / n.totalChunks * 100) : 0;
|
|
162
162
|
let b;
|
|
163
|
-
if (
|
|
163
|
+
if (n.status === "completed")
|
|
164
164
|
try {
|
|
165
|
-
b = await j(
|
|
166
|
-
} catch (
|
|
165
|
+
b = await j(h, o, n.id);
|
|
166
|
+
} catch (x) {
|
|
167
167
|
console.error(
|
|
168
|
-
`[useExportRecovery] Failed to get download URL for ${
|
|
169
|
-
|
|
168
|
+
`[useExportRecovery] Failed to get download URL for ${n.id}:`,
|
|
169
|
+
x
|
|
170
170
|
);
|
|
171
171
|
}
|
|
172
172
|
const m = {
|
|
173
|
-
id:
|
|
174
|
-
status:
|
|
173
|
+
id: n.id,
|
|
174
|
+
status: n.status,
|
|
175
175
|
progress: v,
|
|
176
|
-
title:
|
|
177
|
-
totalRows:
|
|
178
|
-
totalChunks:
|
|
179
|
-
completedChunks:
|
|
180
|
-
startedAt: new Date(
|
|
176
|
+
title: bt(n),
|
|
177
|
+
totalRows: n.totalRows,
|
|
178
|
+
totalChunks: n.totalChunks,
|
|
179
|
+
completedChunks: n.completedChunks,
|
|
180
|
+
startedAt: new Date(n.createdAt),
|
|
181
181
|
lastUpdatedAt: /* @__PURE__ */ new Date(),
|
|
182
|
-
completedAt:
|
|
183
|
-
fileSize:
|
|
184
|
-
error:
|
|
185
|
-
expiresAt: new Date(
|
|
182
|
+
completedAt: n.completedAt ? new Date(n.completedAt) : void 0,
|
|
183
|
+
fileSize: n.fileSize,
|
|
184
|
+
error: n.error,
|
|
185
|
+
expiresAt: new Date(n.expiresAt),
|
|
186
186
|
downloadUrl: b
|
|
187
187
|
};
|
|
188
188
|
d(m);
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
} catch (
|
|
192
|
-
console.error("[useExportRecovery] Failed to recover exports:",
|
|
190
|
+
l.current = !0;
|
|
191
|
+
} catch (u) {
|
|
192
|
+
console.error("[useExportRecovery] Failed to recover exports:", u), l.current = !0;
|
|
193
193
|
}
|
|
194
194
|
})();
|
|
195
|
-
}, [
|
|
195
|
+
}, [h, o, d, p]);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
return e.title ? e.title :
|
|
197
|
+
function bt(e) {
|
|
198
|
+
return e.title ? e.title : $(
|
|
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 xt({
|
|
203
203
|
open: e,
|
|
204
204
|
onOpenChange: a,
|
|
205
205
|
isLibraryVisual: p,
|
|
206
206
|
currentVisualName: d,
|
|
207
|
-
isSaving:
|
|
208
|
-
destinationMode:
|
|
209
|
-
onConfirm:
|
|
207
|
+
isSaving: l = !1,
|
|
208
|
+
destinationMode: h = "both",
|
|
209
|
+
onConfirm: o
|
|
210
210
|
}) {
|
|
211
|
-
const [
|
|
211
|
+
const [c, u] = L(
|
|
212
212
|
p && d ? `Copy of ${d}` : d || ""
|
|
213
|
-
), [
|
|
213
|
+
), [n, v] = L("");
|
|
214
214
|
ge.useEffect(() => {
|
|
215
|
-
e && (
|
|
215
|
+
e && (u(
|
|
216
216
|
p && d ? `Copy of ${d}` : d || ""
|
|
217
217
|
), v(""));
|
|
218
218
|
}, [e, p, d]);
|
|
219
|
-
const b = !!
|
|
219
|
+
const b = !!c.trim(), m = h === "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
|
+
} : h === "library" ? {
|
|
226
226
|
saveToLibrary: !0,
|
|
227
227
|
saveToCurrentDashboard: !1,
|
|
228
228
|
badgeType: "library",
|
|
@@ -234,20 +234,20 @@ function wt({
|
|
|
234
234
|
badgeType: "linked",
|
|
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
|
-
},
|
|
238
|
-
!b ||
|
|
239
|
-
name:
|
|
240
|
-
description:
|
|
237
|
+
}, x = () => {
|
|
238
|
+
!b || l || o({
|
|
239
|
+
name: c.trim(),
|
|
240
|
+
description: n.trim() || void 0,
|
|
241
241
|
saveToLibrary: m.saveToLibrary,
|
|
242
242
|
saveToCurrentDashboard: m.saveToCurrentDashboard
|
|
243
243
|
});
|
|
244
244
|
};
|
|
245
|
-
return /* @__PURE__ */ t(
|
|
246
|
-
/* @__PURE__ */ s(
|
|
247
|
-
/* @__PURE__ */ s(
|
|
245
|
+
return /* @__PURE__ */ t(se, { open: e, onOpenChange: a, children: /* @__PURE__ */ s(re, { className: "sm:max-w-[500px]", children: [
|
|
246
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
247
|
+
/* @__PURE__ */ s(ne, { className: "flex items-center gap-2", children: [
|
|
248
248
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
249
249
|
m.badgeType !== "local" && /* @__PURE__ */ t(
|
|
250
|
-
|
|
250
|
+
tt,
|
|
251
251
|
{
|
|
252
252
|
type: m.badgeType,
|
|
253
253
|
showLabel: !0,
|
|
@@ -255,70 +255,70 @@ function wt({
|
|
|
255
255
|
}
|
|
256
256
|
)
|
|
257
257
|
] }),
|
|
258
|
-
/* @__PURE__ */ t(
|
|
258
|
+
/* @__PURE__ */ t(ie, { children: m.description })
|
|
259
259
|
] }),
|
|
260
260
|
/* @__PURE__ */ s("div", { className: "grid gap-4 py-4", children: [
|
|
261
261
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
262
|
-
/* @__PURE__ */ t(
|
|
262
|
+
/* @__PURE__ */ t(K, { htmlFor: "name", children: "Name" }),
|
|
263
263
|
/* @__PURE__ */ t(
|
|
264
|
-
|
|
264
|
+
Ce,
|
|
265
265
|
{
|
|
266
266
|
id: "name",
|
|
267
|
-
value:
|
|
268
|
-
onChange: (N) =>
|
|
267
|
+
value: c,
|
|
268
|
+
onChange: (N) => u(N.target.value),
|
|
269
269
|
placeholder: "Enter visual name",
|
|
270
|
-
disabled:
|
|
270
|
+
disabled: l
|
|
271
271
|
}
|
|
272
272
|
)
|
|
273
273
|
] }),
|
|
274
274
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
275
|
-
/* @__PURE__ */ t(
|
|
275
|
+
/* @__PURE__ */ t(K, { htmlFor: "description", children: "Description (optional)" }),
|
|
276
276
|
/* @__PURE__ */ t(
|
|
277
|
-
|
|
277
|
+
we,
|
|
278
278
|
{
|
|
279
279
|
id: "description",
|
|
280
|
-
value:
|
|
280
|
+
value: n,
|
|
281
281
|
onChange: (N) => v(N.target.value),
|
|
282
282
|
placeholder: "Enter visual description",
|
|
283
283
|
rows: 3,
|
|
284
|
-
disabled:
|
|
284
|
+
disabled: l
|
|
285
285
|
}
|
|
286
286
|
)
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
289
|
/* @__PURE__ */ s(ye, { children: [
|
|
290
290
|
/* @__PURE__ */ t(
|
|
291
|
-
|
|
291
|
+
S,
|
|
292
292
|
{
|
|
293
293
|
variant: "outline",
|
|
294
294
|
onClick: () => a(!1),
|
|
295
|
-
disabled:
|
|
295
|
+
disabled: l,
|
|
296
296
|
children: "Cancel"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
/* @__PURE__ */ s(
|
|
300
|
-
|
|
299
|
+
/* @__PURE__ */ s(S, { onClick: x, disabled: !b || l, children: [
|
|
300
|
+
l && /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
301
301
|
m.actionLabel
|
|
302
302
|
] })
|
|
303
303
|
] })
|
|
304
304
|
] }) });
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
const [e, a] =
|
|
306
|
+
function Ct() {
|
|
307
|
+
const [e, a] = L(!1), [p, d] = L(!1), [l, h] = L(null), o = R((i) => i.frame), c = R((i) => i.card), u = Ne(), n = z((i) => i.selectedSheetId), v = z(
|
|
308
308
|
(i) => i.actions.setIsDashboardPanelOpen
|
|
309
|
-
), { getUpdatedFrame: b } = ve(), { selectVisual: m } = De(), { addFrame:
|
|
309
|
+
), { getUpdatedFrame: b } = ve(), { selectVisual: m } = De(), { addFrame: x, setSelectedFrameId: N, setIsVisualEditing: f } = X(), w = !!(o != null && o.visualId), E = (() => {
|
|
310
310
|
var i, g;
|
|
311
|
-
return ((i =
|
|
312
|
-
})(),
|
|
311
|
+
return ((i = o == null ? void 0 : o.cards) == null ? void 0 : i.length) === 1 && ((g = o.cards[0]) != null && g.title) ? o.cards[0].title : u != null && u.title ? u.title : (c == null ? void 0 : c.title) || "Untitled Visual";
|
|
312
|
+
})(), C = Ae((i) => {
|
|
313
313
|
if (i != null && i.id) {
|
|
314
|
-
if (m(i), p &&
|
|
314
|
+
if (m(i), p && l && n) {
|
|
315
315
|
const g = {
|
|
316
|
-
...
|
|
317
|
-
id:
|
|
316
|
+
...l,
|
|
317
|
+
id: W(),
|
|
318
318
|
visualId: i.id
|
|
319
319
|
// Link to the newly created library visual
|
|
320
320
|
};
|
|
321
|
-
|
|
321
|
+
x(n, g, "end"), N(g.id), d(!1), h(null), f(!1);
|
|
322
322
|
}
|
|
323
323
|
v(!0), a(!1);
|
|
324
324
|
}
|
|
@@ -327,13 +327,13 @@ function xt() {
|
|
|
327
327
|
saveAsDialogOpen: e,
|
|
328
328
|
setSaveAsDialogOpen: a,
|
|
329
329
|
handleSaveAs: async (i) => {
|
|
330
|
-
if (!
|
|
330
|
+
if (!n) {
|
|
331
331
|
P.error("No sheet selected");
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
const g = b(),
|
|
335
|
-
if (
|
|
336
|
-
P.error(
|
|
334
|
+
const g = b(), I = le(g);
|
|
335
|
+
if (I) {
|
|
336
|
+
P.error(I);
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
339
|
const A = g.cards.length === 1 ? {
|
|
@@ -345,7 +345,7 @@ function xt() {
|
|
|
345
345
|
}))
|
|
346
346
|
} : g;
|
|
347
347
|
if (i.saveToLibrary) {
|
|
348
|
-
d(i.saveToCurrentDashboard),
|
|
348
|
+
d(i.saveToCurrentDashboard), h(A);
|
|
349
349
|
const y = {
|
|
350
350
|
title: i.name,
|
|
351
351
|
description: i.description,
|
|
@@ -353,244 +353,275 @@ function xt() {
|
|
|
353
353
|
// Card title synced for single-card frames
|
|
354
354
|
isPrivate: !1
|
|
355
355
|
};
|
|
356
|
-
|
|
356
|
+
C.mutate(y);
|
|
357
357
|
} else if (i.saveToCurrentDashboard) {
|
|
358
358
|
const y = {
|
|
359
359
|
...A,
|
|
360
360
|
// Card title already synced
|
|
361
|
-
id:
|
|
361
|
+
id: W(),
|
|
362
362
|
visualId: void 0
|
|
363
363
|
// Explicitly no visualId for local visuals
|
|
364
364
|
};
|
|
365
|
-
|
|
365
|
+
x(n, y, "end"), N(y.id), P.success("Visual saved to dashboard"), a(!1), f(!1);
|
|
366
366
|
}
|
|
367
367
|
},
|
|
368
|
-
isLibraryVisual:
|
|
369
|
-
currentVisualName:
|
|
370
|
-
isSaving:
|
|
368
|
+
isLibraryVisual: w,
|
|
369
|
+
currentVisualName: E,
|
|
370
|
+
isSaving: C.isPending
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
375
|
-
}) {
|
|
376
|
-
const a = R((D) => D.frame), p = Se((D) => D.selectedVisual), d = B((D) => D.selectedFrameId), c = B((D) => D.selectedSheetId), { setIsVisualEditing: u, updateFrame: n } = X(), [l, h] = F(!1), [o, v] = F("both"), b = !!(a != null && a.visualId || p != null && p.id), m = !!(a != null && a.visualId && d), C = b && !m, {
|
|
373
|
+
function kt(e = {}) {
|
|
374
|
+
const a = R((D) => D.frame), p = Se((D) => D.selectedVisual), d = z((D) => D.selectedFrameId), l = z((D) => D.selectedSheetId), { setIsVisualEditing: h, updateFrame: o } = X(), [c, u] = L(!1), [n, v] = L("both"), b = !!(a != null && a.visualId || p != null && p.id), m = !!(a != null && a.visualId && d), x = b && !m, {
|
|
377
375
|
saveAsDialogOpen: N,
|
|
378
376
|
setSaveAsDialogOpen: f,
|
|
379
|
-
handleSaveAs:
|
|
380
|
-
isLibraryVisual:
|
|
381
|
-
currentVisualName:
|
|
377
|
+
handleSaveAs: w,
|
|
378
|
+
isLibraryVisual: E,
|
|
379
|
+
currentVisualName: C,
|
|
382
380
|
isSaving: r
|
|
383
|
-
} =
|
|
384
|
-
if (!
|
|
381
|
+
} = Ct(), { getUpdatedFrame: i } = ve(), g = () => {
|
|
382
|
+
if (!l) {
|
|
385
383
|
P.error("No sheet selected");
|
|
386
384
|
return;
|
|
387
385
|
}
|
|
388
|
-
if (
|
|
389
|
-
|
|
390
|
-
const D = i(), A =
|
|
386
|
+
if (c) return;
|
|
387
|
+
u(!0);
|
|
388
|
+
const D = i(), A = le(D);
|
|
391
389
|
if (A) {
|
|
392
|
-
|
|
390
|
+
u(!1), P.error(A);
|
|
393
391
|
return;
|
|
394
392
|
}
|
|
395
393
|
const y = {
|
|
396
394
|
...D,
|
|
397
395
|
visualId: void 0
|
|
398
396
|
};
|
|
399
|
-
|
|
400
|
-
|
|
397
|
+
o(l, y), setTimeout(() => {
|
|
398
|
+
u(!1), P.success("Changes applied. Visual is now local to this dashboard"), h(!1);
|
|
401
399
|
}, 300);
|
|
402
|
-
},
|
|
400
|
+
}, I = (D) => {
|
|
403
401
|
v(D), f(!0);
|
|
404
402
|
};
|
|
405
|
-
return /* @__PURE__ */ s(
|
|
406
|
-
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-
|
|
403
|
+
return /* @__PURE__ */ s(B, { children: [
|
|
404
|
+
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-[5px]", children: [
|
|
407
405
|
!b && /* @__PURE__ */ t(
|
|
408
|
-
|
|
406
|
+
at,
|
|
409
407
|
{
|
|
410
|
-
className:
|
|
408
|
+
className: "rounded-none",
|
|
411
409
|
variant: "default"
|
|
412
410
|
}
|
|
413
411
|
),
|
|
414
|
-
b &&
|
|
415
|
-
|
|
412
|
+
b && x && /* @__PURE__ */ t(
|
|
413
|
+
st,
|
|
416
414
|
{
|
|
417
|
-
className:
|
|
415
|
+
className: "rounded-none",
|
|
418
416
|
variant: "default"
|
|
419
417
|
}
|
|
420
418
|
),
|
|
421
|
-
b && m && /* @__PURE__ */ t(
|
|
422
|
-
|
|
423
|
-
{
|
|
424
|
-
|
|
425
|
-
}
|
|
426
|
-
),
|
|
427
|
-
/* @__PURE__ */ s(le, { modal: !1, children: [
|
|
428
|
-
/* @__PURE__ */ t(de, { className: "h-8", asChild: !0, children: /* @__PURE__ */ t(
|
|
429
|
-
I,
|
|
419
|
+
b && m && /* @__PURE__ */ t(rt, { className: "rounded-none" }),
|
|
420
|
+
/* @__PURE__ */ s(de, { modal: !1, children: [
|
|
421
|
+
/* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ t(
|
|
422
|
+
S,
|
|
430
423
|
{
|
|
431
424
|
variant: "default",
|
|
432
|
-
size: "
|
|
433
|
-
className:
|
|
434
|
-
e,
|
|
435
|
-
"w-8 rounded-none border-0 border-l border-primary-foreground/30 px-2"
|
|
436
|
-
),
|
|
425
|
+
size: "xs",
|
|
426
|
+
className: "w-7 rounded-none border-l border-primary-foreground/20 px-0",
|
|
437
427
|
"aria-label": "Open visual save options",
|
|
438
|
-
disabled: r ||
|
|
439
|
-
children: /* @__PURE__ */ t(
|
|
428
|
+
disabled: r || c,
|
|
429
|
+
children: /* @__PURE__ */ t(ue, { className: "h-3.5 w-3.5" })
|
|
440
430
|
}
|
|
441
431
|
) }),
|
|
442
|
-
/* @__PURE__ */ s(
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
432
|
+
/* @__PURE__ */ s(
|
|
433
|
+
he,
|
|
434
|
+
{
|
|
435
|
+
align: "end",
|
|
436
|
+
className: "min-w-[220px] rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
437
|
+
children: [
|
|
438
|
+
m && /* @__PURE__ */ s(B, { children: [
|
|
439
|
+
/* @__PURE__ */ s(
|
|
440
|
+
U,
|
|
441
|
+
{
|
|
442
|
+
onClick: g,
|
|
443
|
+
disabled: c,
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ t(Ee, { className: "h-3.5 w-3.5" }),
|
|
446
|
+
c ? "Applying..." : "Apply Locally"
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
),
|
|
450
|
+
/* @__PURE__ */ t(Ie, {})
|
|
451
|
+
] }),
|
|
452
|
+
/* @__PURE__ */ s(
|
|
453
|
+
U,
|
|
454
|
+
{
|
|
455
|
+
onClick: () => I("local"),
|
|
456
|
+
disabled: r,
|
|
457
|
+
children: [
|
|
458
|
+
/* @__PURE__ */ t(Le, { className: "h-3.5 w-3.5" }),
|
|
459
|
+
"Add to Dashboard (Local)"
|
|
460
|
+
]
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ s(
|
|
464
|
+
U,
|
|
465
|
+
{
|
|
466
|
+
onClick: () => I("library"),
|
|
467
|
+
disabled: r,
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ t(ot, { className: "h-3.5 w-3.5" }),
|
|
470
|
+
"Save as Library Visual"
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
),
|
|
474
|
+
/* @__PURE__ */ s(
|
|
475
|
+
U,
|
|
476
|
+
{
|
|
477
|
+
onClick: () => I("both"),
|
|
478
|
+
disabled: r,
|
|
479
|
+
children: [
|
|
480
|
+
/* @__PURE__ */ t(nt, { className: "h-3.5 w-3.5" }),
|
|
481
|
+
"Save Copy as Linked Visual"
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
)
|
|
491
488
|
] })
|
|
492
489
|
] }),
|
|
493
|
-
/* @__PURE__ */ t(
|
|
490
|
+
/* @__PURE__ */ t(it, {}),
|
|
494
491
|
/* @__PURE__ */ t(
|
|
495
|
-
|
|
492
|
+
xt,
|
|
496
493
|
{
|
|
497
494
|
open: N,
|
|
498
495
|
onOpenChange: (D) => {
|
|
499
496
|
r || f(D);
|
|
500
497
|
},
|
|
501
|
-
isLibraryVisual:
|
|
502
|
-
currentVisualName:
|
|
498
|
+
isLibraryVisual: E,
|
|
499
|
+
currentVisualName: C,
|
|
503
500
|
isSaving: r,
|
|
504
|
-
destinationMode:
|
|
505
|
-
onConfirm:
|
|
501
|
+
destinationMode: n,
|
|
502
|
+
onConfirm: w
|
|
506
503
|
}
|
|
507
504
|
)
|
|
508
505
|
] });
|
|
509
506
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
507
|
+
function Ut({ className: e }) {
|
|
508
|
+
const a = R((u) => u.isDevMode), p = z((u) => u.isVisualEditing), { setIsDevMode: d } = Fe(), { config: l } = be(Te).tokenProps, h = (l == null ? void 0 : l.showAdvancedMode) !== !1;
|
|
509
|
+
if (!p || !h)
|
|
510
|
+
return null;
|
|
511
|
+
const o = "h-7 rounded-none border-0 bg-transparent px-2.5 shadow-none text-muted-foreground hover:bg-accent/50 hover:text-foreground", c = "bg-muted text-foreground hover:bg-muted";
|
|
512
|
+
return /* @__PURE__ */ s(
|
|
513
|
+
"div",
|
|
514
|
+
{
|
|
515
|
+
role: "radiogroup",
|
|
516
|
+
"aria-label": "Editor mode",
|
|
517
|
+
className: V(
|
|
518
|
+
"inline-flex items-stretch overflow-hidden rounded-[5px] border border-input bg-background",
|
|
519
|
+
e
|
|
520
|
+
),
|
|
521
|
+
children: [
|
|
522
|
+
/* @__PURE__ */ s(
|
|
523
|
+
S,
|
|
524
|
+
{
|
|
525
|
+
type: "button",
|
|
526
|
+
variant: "ghost",
|
|
527
|
+
size: "xs",
|
|
528
|
+
role: "radio",
|
|
529
|
+
"aria-checked": !a,
|
|
530
|
+
className: V(o, !a && c),
|
|
531
|
+
onClick: () => d(!1),
|
|
532
|
+
children: [
|
|
533
|
+
/* @__PURE__ */ t(G, { className: "h-3.5 w-3.5" }),
|
|
534
|
+
"Drag & drop"
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
),
|
|
538
|
+
/* @__PURE__ */ s(
|
|
539
|
+
S,
|
|
540
|
+
{
|
|
541
|
+
type: "button",
|
|
542
|
+
variant: "ghost",
|
|
543
|
+
size: "xs",
|
|
544
|
+
role: "radio",
|
|
545
|
+
"aria-checked": a,
|
|
546
|
+
className: V(
|
|
547
|
+
o,
|
|
548
|
+
"border-l border-border/60",
|
|
549
|
+
a && c
|
|
550
|
+
),
|
|
551
|
+
onClick: () => d(!0),
|
|
552
|
+
children: [
|
|
553
|
+
/* @__PURE__ */ t(ke, { className: "h-3.5 w-3.5" }),
|
|
554
|
+
"SQL"
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
)
|
|
558
|
+
]
|
|
559
|
+
}
|
|
560
|
+
);
|
|
530
561
|
}
|
|
531
562
|
function Vt({
|
|
532
563
|
open: e,
|
|
533
564
|
onOpenChange: a,
|
|
534
565
|
onSave: p,
|
|
535
566
|
onDiscard: d,
|
|
536
|
-
isSaving:
|
|
537
|
-
title:
|
|
538
|
-
description:
|
|
539
|
-
cancelLabel:
|
|
540
|
-
discardLabel:
|
|
541
|
-
saveLabel:
|
|
567
|
+
isSaving: l,
|
|
568
|
+
title: h = "Unsaved changes",
|
|
569
|
+
description: o = "You have unsaved changes to this dashboard. What would you like to do?",
|
|
570
|
+
cancelLabel: c = "Cancel",
|
|
571
|
+
discardLabel: u = "Discard",
|
|
572
|
+
saveLabel: n = "Save"
|
|
542
573
|
}) {
|
|
543
|
-
return /* @__PURE__ */ t(
|
|
544
|
-
!b &&
|
|
574
|
+
return /* @__PURE__ */ t(Ue, { open: e, onOpenChange: (b) => {
|
|
575
|
+
!b && l || a(b);
|
|
545
576
|
}, children: /* @__PURE__ */ s(Ve, { children: [
|
|
546
|
-
/* @__PURE__ */ s(
|
|
547
|
-
/* @__PURE__ */ t(
|
|
548
|
-
/* @__PURE__ */ t(
|
|
577
|
+
/* @__PURE__ */ s(Me, { children: [
|
|
578
|
+
/* @__PURE__ */ t(Pe, { children: h }),
|
|
579
|
+
/* @__PURE__ */ t(ze, { children: o })
|
|
549
580
|
] }),
|
|
550
|
-
/* @__PURE__ */ s(
|
|
581
|
+
/* @__PURE__ */ s(Be, { children: [
|
|
551
582
|
/* @__PURE__ */ t(
|
|
552
|
-
|
|
583
|
+
S,
|
|
553
584
|
{
|
|
554
585
|
type: "button",
|
|
555
586
|
size: "xs",
|
|
556
587
|
onClick: d,
|
|
557
|
-
disabled:
|
|
588
|
+
disabled: l,
|
|
558
589
|
variant: "ghost",
|
|
559
590
|
className: "mr-auto text-muted-foreground hover:bg-destructive/10 hover:text-destructive focus-visible:bg-destructive/10 focus-visible:text-destructive",
|
|
560
|
-
children:
|
|
591
|
+
children: u
|
|
561
592
|
}
|
|
562
593
|
),
|
|
563
|
-
/* @__PURE__ */ t(
|
|
564
|
-
/* @__PURE__ */ t(
|
|
594
|
+
/* @__PURE__ */ t(Oe, { disabled: l, children: c }),
|
|
595
|
+
/* @__PURE__ */ t(S, { type: "button", size: "xs", onClick: p, disabled: l, children: l ? /* @__PURE__ */ s(B, { children: [
|
|
565
596
|
/* @__PURE__ */ t(H, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
566
597
|
"Saving..."
|
|
567
|
-
] }) :
|
|
598
|
+
] }) : n })
|
|
568
599
|
] })
|
|
569
600
|
] }) });
|
|
570
601
|
}
|
|
571
|
-
function
|
|
572
|
-
|
|
573
|
-
e && !p && a && d(
|
|
602
|
+
function Mt(e, a, p, d) {
|
|
603
|
+
F(() => {
|
|
604
|
+
e && !p && a && d(Re(a));
|
|
574
605
|
}, [e, p, a, d]);
|
|
575
606
|
}
|
|
576
|
-
function
|
|
607
|
+
function wt({
|
|
577
608
|
export: e,
|
|
578
609
|
onRemove: a
|
|
579
610
|
}) {
|
|
580
611
|
const p = () => {
|
|
581
612
|
e.downloadUrl && window.open(e.downloadUrl, "_blank");
|
|
582
|
-
}, d = (
|
|
583
|
-
|
|
584
|
-
},
|
|
613
|
+
}, d = (c) => {
|
|
614
|
+
c.stopPropagation(), a == null || a(e.id);
|
|
615
|
+
}, l = () => {
|
|
585
616
|
switch (e.status) {
|
|
586
617
|
case "completed":
|
|
587
|
-
return /* @__PURE__ */ t(
|
|
618
|
+
return /* @__PURE__ */ t(Xe, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
588
619
|
case "failed":
|
|
589
|
-
return /* @__PURE__ */ t(
|
|
620
|
+
return /* @__PURE__ */ t(lt, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
590
621
|
default:
|
|
591
622
|
return /* @__PURE__ */ t(H, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
592
623
|
}
|
|
593
|
-
},
|
|
624
|
+
}, h = $(e.status), o = (() => {
|
|
594
625
|
switch (e.status) {
|
|
595
626
|
case "pending":
|
|
596
627
|
return "Queued...";
|
|
@@ -607,7 +638,7 @@ function yt({
|
|
|
607
638
|
return /* @__PURE__ */ s("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
|
|
608
639
|
/* @__PURE__ */ s("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
609
640
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
610
|
-
|
|
641
|
+
l(),
|
|
611
642
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
612
643
|
/* @__PURE__ */ t("h4", { className: "mb-1 truncate text-sm font-medium", children: e.title }),
|
|
613
644
|
e.status === "completed" && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
@@ -615,82 +646,82 @@ function yt({
|
|
|
615
646
|
e.totalRows.toLocaleString(),
|
|
616
647
|
" rows"
|
|
617
648
|
] }),
|
|
618
|
-
e.fileSize && /* @__PURE__ */ s(
|
|
649
|
+
e.fileSize && /* @__PURE__ */ s(B, { children: [
|
|
619
650
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
620
651
|
/* @__PURE__ */ t("span", { children: _e(e.fileSize) })
|
|
621
652
|
] })
|
|
622
653
|
] }),
|
|
623
|
-
|
|
654
|
+
h && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: o }),
|
|
624
655
|
e.status === "failed" && /* @__PURE__ */ t("div", { className: "line-clamp-2 text-xs text-destructive", children: e.error || "Export failed" })
|
|
625
656
|
] })
|
|
626
657
|
] }),
|
|
627
658
|
/* @__PURE__ */ t(
|
|
628
|
-
|
|
659
|
+
S,
|
|
629
660
|
{
|
|
630
661
|
variant: "ghost",
|
|
631
662
|
size: "icon",
|
|
632
663
|
className: "h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
633
664
|
onClick: d,
|
|
634
665
|
"aria-label": "Remove notification",
|
|
635
|
-
children: /* @__PURE__ */ t(
|
|
666
|
+
children: /* @__PURE__ */ t($e, { className: "h-4 w-4" })
|
|
636
667
|
}
|
|
637
668
|
)
|
|
638
669
|
] }),
|
|
639
670
|
/* @__PURE__ */ s("div", { className: "ml-8", children: [
|
|
640
671
|
e.status === "completed" && /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
641
|
-
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children:
|
|
672
|
+
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Q(e.startedAt, { addSuffix: !0 }) }),
|
|
642
673
|
e.downloadUrl && /* @__PURE__ */ s(
|
|
643
|
-
|
|
674
|
+
S,
|
|
644
675
|
{
|
|
645
676
|
size: "sm",
|
|
646
677
|
variant: "outline",
|
|
647
678
|
className: "h-8 bg-transparent",
|
|
648
679
|
onClick: p,
|
|
649
680
|
children: [
|
|
650
|
-
/* @__PURE__ */ t(
|
|
681
|
+
/* @__PURE__ */ t(je, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
651
682
|
"Download"
|
|
652
683
|
]
|
|
653
684
|
}
|
|
654
685
|
)
|
|
655
686
|
] }),
|
|
656
|
-
|
|
657
|
-
/* @__PURE__ */ t(
|
|
687
|
+
h && /* @__PURE__ */ s("div", { children: [
|
|
688
|
+
/* @__PURE__ */ t(He, { value: e.progress, className: "h-1.5" }),
|
|
658
689
|
/* @__PURE__ */ s("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
659
690
|
e.progress,
|
|
660
691
|
"% complete"
|
|
661
692
|
] })
|
|
662
693
|
] }),
|
|
663
|
-
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children:
|
|
694
|
+
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Q(e.startedAt, { addSuffix: !0 }) })
|
|
664
695
|
] })
|
|
665
696
|
] });
|
|
666
697
|
}
|
|
667
|
-
function
|
|
668
|
-
const { authToken: e, tokenProps: a } =
|
|
669
|
-
(f,
|
|
698
|
+
function yt() {
|
|
699
|
+
const { authToken: e, tokenProps: a } = _(), p = k((f) => f.activeExports), { clearCompleted: d, removeExport: l, updateExport: h } = ae(), [o, c] = L(!1), [u, n] = L(!1), v = Array.from(p.values()).sort(
|
|
700
|
+
(f, w) => w.startedAt.getTime() - f.startedAt.getTime()
|
|
670
701
|
), b = v.some(
|
|
671
702
|
(f) => f.status === "completed" || f.status === "failed"
|
|
672
|
-
), m =
|
|
673
|
-
const f = a == null ? void 0 : a.apiServiceUrl,
|
|
674
|
-
if (!(!f || !
|
|
675
|
-
|
|
703
|
+
), m = M(async () => {
|
|
704
|
+
const f = a == null ? void 0 : a.apiServiceUrl, w = e == null ? void 0 : e.accessToken;
|
|
705
|
+
if (!(!f || !w)) {
|
|
706
|
+
c(!0);
|
|
676
707
|
try {
|
|
677
|
-
const
|
|
708
|
+
const E = Array.from(p.values());
|
|
678
709
|
await Promise.all(
|
|
679
|
-
|
|
710
|
+
E.map(async (C) => {
|
|
680
711
|
try {
|
|
681
|
-
const r = await
|
|
712
|
+
const r = await te(f, w, C.id);
|
|
682
713
|
let i;
|
|
683
714
|
if (r.status === "completed")
|
|
684
715
|
try {
|
|
685
716
|
i = await j(
|
|
686
717
|
f,
|
|
687
|
-
|
|
688
|
-
|
|
718
|
+
w,
|
|
719
|
+
C.id
|
|
689
720
|
);
|
|
690
721
|
} catch (g) {
|
|
691
|
-
console.error(`Failed to get download URL for ${
|
|
722
|
+
console.error(`Failed to get download URL for ${C.id}:`, g);
|
|
692
723
|
}
|
|
693
|
-
|
|
724
|
+
h(C.id, {
|
|
694
725
|
status: r.status,
|
|
695
726
|
progress: r.progress,
|
|
696
727
|
completedChunks: r.completedChunks,
|
|
@@ -701,56 +732,56 @@ function Nt() {
|
|
|
701
732
|
downloadUrl: i
|
|
702
733
|
});
|
|
703
734
|
} catch (r) {
|
|
704
|
-
console.error(`Failed to refresh export ${
|
|
735
|
+
console.error(`Failed to refresh export ${C.id}:`, r);
|
|
705
736
|
}
|
|
706
737
|
})
|
|
707
738
|
);
|
|
708
739
|
} finally {
|
|
709
|
-
|
|
740
|
+
c(!1);
|
|
710
741
|
}
|
|
711
742
|
}
|
|
712
743
|
}, [
|
|
713
744
|
p,
|
|
714
745
|
e == null ? void 0 : e.accessToken,
|
|
715
746
|
a == null ? void 0 : a.apiServiceUrl,
|
|
716
|
-
|
|
717
|
-
]),
|
|
718
|
-
const f = a == null ? void 0 : a.apiServiceUrl,
|
|
719
|
-
if (!f || !
|
|
747
|
+
h
|
|
748
|
+
]), x = M(async () => {
|
|
749
|
+
const f = a == null ? void 0 : a.apiServiceUrl, w = e == null ? void 0 : e.accessToken;
|
|
750
|
+
if (!f || !w) {
|
|
720
751
|
d();
|
|
721
752
|
return;
|
|
722
753
|
}
|
|
723
|
-
|
|
754
|
+
n(!0);
|
|
724
755
|
try {
|
|
725
|
-
const
|
|
756
|
+
const E = v.filter(
|
|
726
757
|
(r) => r.status === "completed" || r.status === "failed"
|
|
727
|
-
),
|
|
728
|
-
|
|
758
|
+
), C = await Promise.allSettled(
|
|
759
|
+
E.map(async (r) => (await q(f, w, r.id), r.id))
|
|
729
760
|
);
|
|
730
|
-
for (const r of
|
|
731
|
-
r.status === "fulfilled" ?
|
|
761
|
+
for (const r of C)
|
|
762
|
+
r.status === "fulfilled" ? l(r.value) : console.error("Failed to delete export:", r.reason);
|
|
732
763
|
} finally {
|
|
733
|
-
|
|
764
|
+
n(!1);
|
|
734
765
|
}
|
|
735
766
|
}, [
|
|
736
767
|
v,
|
|
737
768
|
a == null ? void 0 : a.apiServiceUrl,
|
|
738
769
|
e == null ? void 0 : e.accessToken,
|
|
739
770
|
d,
|
|
740
|
-
|
|
741
|
-
]), N =
|
|
771
|
+
l
|
|
772
|
+
]), N = M(
|
|
742
773
|
async (f) => {
|
|
743
|
-
const
|
|
744
|
-
if (
|
|
774
|
+
const w = a == null ? void 0 : a.apiServiceUrl, E = e == null ? void 0 : e.accessToken;
|
|
775
|
+
if (w && E)
|
|
745
776
|
try {
|
|
746
|
-
await
|
|
777
|
+
await q(w, E, f), l(f);
|
|
747
778
|
return;
|
|
748
|
-
} catch (
|
|
749
|
-
console.error(`Failed to cancel export ${f}:`,
|
|
779
|
+
} catch (C) {
|
|
780
|
+
console.error(`Failed to cancel export ${f}:`, C);
|
|
750
781
|
}
|
|
751
|
-
|
|
782
|
+
l(f);
|
|
752
783
|
},
|
|
753
|
-
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken,
|
|
784
|
+
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, l]
|
|
754
785
|
);
|
|
755
786
|
return v.length === 0 ? /* @__PURE__ */ s("div", { className: "p-6 text-center", children: [
|
|
756
787
|
/* @__PURE__ */ t(Y, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
|
|
@@ -764,37 +795,37 @@ function Nt() {
|
|
|
764
795
|
] }),
|
|
765
796
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
766
797
|
/* @__PURE__ */ t(
|
|
767
|
-
|
|
798
|
+
S,
|
|
768
799
|
{
|
|
769
800
|
variant: "ghost",
|
|
770
801
|
size: "sm",
|
|
771
802
|
className: "h-7 w-7 p-0",
|
|
772
803
|
onClick: m,
|
|
773
|
-
disabled:
|
|
804
|
+
disabled: o,
|
|
774
805
|
title: "Refresh status",
|
|
775
806
|
children: /* @__PURE__ */ t(
|
|
776
|
-
|
|
807
|
+
Ge,
|
|
777
808
|
{
|
|
778
|
-
className: `h-4 w-4 ${
|
|
809
|
+
className: `h-4 w-4 ${o ? "animate-spin" : ""}`
|
|
779
810
|
}
|
|
780
811
|
)
|
|
781
812
|
}
|
|
782
813
|
),
|
|
783
814
|
b && /* @__PURE__ */ t(
|
|
784
|
-
|
|
815
|
+
S,
|
|
785
816
|
{
|
|
786
817
|
variant: "ghost",
|
|
787
818
|
size: "sm",
|
|
788
819
|
className: "h-7 px-2 text-sm",
|
|
789
|
-
onClick:
|
|
790
|
-
disabled:
|
|
791
|
-
children:
|
|
820
|
+
onClick: x,
|
|
821
|
+
disabled: u,
|
|
822
|
+
children: u ? "Clearing..." : "Clear all"
|
|
792
823
|
}
|
|
793
824
|
)
|
|
794
825
|
] })
|
|
795
826
|
] }),
|
|
796
827
|
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: v.map((f) => /* @__PURE__ */ t(
|
|
797
|
-
|
|
828
|
+
wt,
|
|
798
829
|
{
|
|
799
830
|
export: f,
|
|
800
831
|
onRemove: N
|
|
@@ -803,36 +834,36 @@ function Nt() {
|
|
|
803
834
|
)) }) })
|
|
804
835
|
] });
|
|
805
836
|
}
|
|
806
|
-
function
|
|
837
|
+
function Pt({
|
|
807
838
|
variant: e
|
|
808
839
|
}) {
|
|
809
|
-
const a =
|
|
810
|
-
(
|
|
811
|
-
),
|
|
812
|
-
return /* @__PURE__ */ s(
|
|
813
|
-
/* @__PURE__ */ t(
|
|
814
|
-
|
|
840
|
+
const a = k((u) => u.activeExports), p = Ke(), d = a.size > 0, l = Array.from(a.values()).some(
|
|
841
|
+
(u) => u.status === "completed" || u.status === "failed"
|
|
842
|
+
), o = p > 0 ? p > 9 ? "9+" : String(p) : null;
|
|
843
|
+
return /* @__PURE__ */ s(me, { children: [
|
|
844
|
+
/* @__PURE__ */ t(pe, { asChild: !0, children: /* @__PURE__ */ s(
|
|
845
|
+
S,
|
|
815
846
|
{
|
|
816
847
|
variant: e ?? "ghost",
|
|
817
|
-
size: "
|
|
818
|
-
className: "relative
|
|
848
|
+
size: "xs",
|
|
849
|
+
className: "relative w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
819
850
|
"aria-label": "Export notifications",
|
|
820
851
|
children: [
|
|
821
|
-
/* @__PURE__ */ t(
|
|
852
|
+
/* @__PURE__ */ t(We, { className: "h-3.5 w-3.5" }),
|
|
822
853
|
d && /* @__PURE__ */ t(
|
|
823
854
|
"span",
|
|
824
855
|
{
|
|
825
|
-
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${
|
|
826
|
-
children:
|
|
856
|
+
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${o ? "-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"}`,
|
|
857
|
+
children: o
|
|
827
858
|
}
|
|
828
859
|
)
|
|
829
860
|
]
|
|
830
861
|
}
|
|
831
862
|
) }),
|
|
832
|
-
/* @__PURE__ */ t(
|
|
863
|
+
/* @__PURE__ */ t(fe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(yt, {}) })
|
|
833
864
|
] });
|
|
834
865
|
}
|
|
835
|
-
function
|
|
866
|
+
function Nt(e) {
|
|
836
867
|
if (e)
|
|
837
868
|
return {
|
|
838
869
|
renamed: e.type === "rename" ? { oldId: e.oldId, newId: e.newId } : void 0,
|
|
@@ -841,24 +872,24 @@ function Dt(e) {
|
|
|
841
872
|
affectedBindingControlIds: e.type === "add" || e.type === "update" ? e.affectedBindingControlIds : void 0
|
|
842
873
|
};
|
|
843
874
|
}
|
|
844
|
-
function
|
|
875
|
+
function zt({
|
|
845
876
|
open: e,
|
|
846
877
|
onOpenChange: a,
|
|
847
878
|
trigger: p,
|
|
848
879
|
showTrigger: d = !0,
|
|
849
|
-
initialMode:
|
|
880
|
+
initialMode: l = "manage"
|
|
850
881
|
}) {
|
|
851
|
-
const
|
|
852
|
-
forceClose:
|
|
853
|
-
handleOpenChange:
|
|
854
|
-
isCreateFlowActive:
|
|
855
|
-
preventPassiveDismissDuringCreate:
|
|
882
|
+
const h = l === "create", {
|
|
883
|
+
forceClose: o,
|
|
884
|
+
handleOpenChange: c,
|
|
885
|
+
isCreateFlowActive: u,
|
|
886
|
+
preventPassiveDismissDuringCreate: n,
|
|
856
887
|
resolvedOpen: v,
|
|
857
888
|
setIsCreateFlowActive: b
|
|
858
|
-
} =
|
|
889
|
+
} = dt({
|
|
859
890
|
open: e,
|
|
860
891
|
onOpenChange: a,
|
|
861
|
-
initialCreateFlowActive:
|
|
892
|
+
initialCreateFlowActive: l === "create",
|
|
862
893
|
// Dialog mode renders a built-in X close button — allow explicit
|
|
863
894
|
// closes through `handleOpenChange`. Popover mode has no X; its
|
|
864
895
|
// only close-via-trigger path is a re-click that would silently
|
|
@@ -866,109 +897,109 @@ function Ot({
|
|
|
866
897
|
// create and make consumers use `forceClose()` from a dedicated
|
|
867
898
|
// button.
|
|
868
899
|
dismissMode: d ? "passive" : "explicit-only"
|
|
869
|
-
}), m =
|
|
900
|
+
}), m = z((A) => A.dashboard), { setDashboardControlsModel: x } = X(), { participants: N } = qe(Je(m)), f = Array.from(
|
|
870
901
|
new Map(
|
|
871
902
|
N.flatMap(
|
|
872
903
|
(A) => A.fieldChoices.map((y) => {
|
|
873
|
-
var
|
|
904
|
+
var T;
|
|
874
905
|
return [
|
|
875
906
|
y.value,
|
|
876
907
|
{
|
|
877
908
|
option: y,
|
|
878
|
-
target: (
|
|
909
|
+
target: (T = A.fieldTargetMap) == null ? void 0 : T[y.value]
|
|
879
910
|
}
|
|
880
911
|
];
|
|
881
912
|
})
|
|
882
913
|
)
|
|
883
914
|
).values()
|
|
884
|
-
),
|
|
915
|
+
), w = Array.from(
|
|
885
916
|
new Map(
|
|
886
917
|
N.flatMap(
|
|
887
918
|
(A) => A.metricChoices.map((y) => {
|
|
888
|
-
var
|
|
919
|
+
var T;
|
|
889
920
|
return [
|
|
890
921
|
y.value,
|
|
891
922
|
{
|
|
892
923
|
option: y,
|
|
893
|
-
target: (
|
|
924
|
+
target: (T = A.metricTargetMap) == null ? void 0 : T[y.value]
|
|
894
925
|
}
|
|
895
926
|
];
|
|
896
927
|
})
|
|
897
928
|
)
|
|
898
929
|
).values()
|
|
899
|
-
),
|
|
930
|
+
), E = Qe({
|
|
900
931
|
...m || {},
|
|
901
932
|
controls: []
|
|
902
|
-
}),
|
|
903
|
-
|
|
933
|
+
}), C = Ye(m), r = (A, y, T) => {
|
|
934
|
+
x(
|
|
904
935
|
A,
|
|
905
936
|
y,
|
|
906
|
-
|
|
937
|
+
Nt(T)
|
|
907
938
|
);
|
|
908
|
-
}, i =
|
|
909
|
-
if (
|
|
910
|
-
|
|
939
|
+
}, i = M(() => {
|
|
940
|
+
if (h) {
|
|
941
|
+
o();
|
|
911
942
|
return;
|
|
912
943
|
}
|
|
913
944
|
b(!1);
|
|
914
|
-
}, [
|
|
915
|
-
|
|
945
|
+
}, [h, o, b]), g = /* @__PURE__ */ t(
|
|
946
|
+
ct,
|
|
916
947
|
{
|
|
917
948
|
scope: "dashboard",
|
|
918
949
|
controls: m.controls || [],
|
|
919
|
-
reservedControlIds:
|
|
950
|
+
reservedControlIds: E,
|
|
920
951
|
defaultValues: m.defaultControlValues || {},
|
|
921
|
-
usageByControlId:
|
|
952
|
+
usageByControlId: Ze(m),
|
|
922
953
|
availableFieldChoices: f,
|
|
923
|
-
availableMetricChoices:
|
|
954
|
+
availableMetricChoices: w,
|
|
924
955
|
structuralParticipants: N,
|
|
925
|
-
structuralParticipantIdsByControlId:
|
|
926
|
-
initialCreateFlow:
|
|
956
|
+
structuralParticipantIdsByControlId: C,
|
|
957
|
+
initialCreateFlow: l === "create",
|
|
927
958
|
onCreateFlowActiveChange: b,
|
|
928
959
|
onCreateFlowComplete: i,
|
|
929
960
|
onChange: r,
|
|
930
961
|
emptyMessage: "No dashboard controls yet."
|
|
931
962
|
}
|
|
932
|
-
),
|
|
963
|
+
), I = u ? "Add dashboard control" : "Dashboard Controls", D = /* @__PURE__ */ s(B, { children: [
|
|
933
964
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
934
965
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
935
966
|
/* @__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." })
|
|
936
967
|
] }),
|
|
937
968
|
g
|
|
938
969
|
] });
|
|
939
|
-
return d ? /* @__PURE__ */ s(
|
|
940
|
-
/* @__PURE__ */ t(
|
|
941
|
-
/* @__PURE__ */ t(
|
|
970
|
+
return d ? /* @__PURE__ */ s(me, { open: v, onOpenChange: c, children: [
|
|
971
|
+
/* @__PURE__ */ t(pe, { asChild: !0, children: p || /* @__PURE__ */ s(S, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
972
|
+
/* @__PURE__ */ t(G, { className: "mr-2 h-4 w-4" }),
|
|
942
973
|
"Controls"
|
|
943
974
|
] }) }),
|
|
944
975
|
/* @__PURE__ */ t(
|
|
945
|
-
|
|
976
|
+
fe,
|
|
946
977
|
{
|
|
947
978
|
className: "w-[620px] max-w-[95vw] space-y-4",
|
|
948
979
|
align: "end",
|
|
949
|
-
onEscapeKeyDown:
|
|
950
|
-
onPointerDownOutside:
|
|
980
|
+
onEscapeKeyDown: n,
|
|
981
|
+
onPointerDownOutside: n,
|
|
951
982
|
children: D
|
|
952
983
|
}
|
|
953
984
|
)
|
|
954
|
-
] }) : /* @__PURE__ */ t(
|
|
955
|
-
|
|
985
|
+
] }) : /* @__PURE__ */ t(se, { open: v, onOpenChange: c, children: /* @__PURE__ */ s(
|
|
986
|
+
re,
|
|
956
987
|
{
|
|
957
988
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
958
|
-
onEscapeKeyDown:
|
|
959
|
-
onPointerDownOutside:
|
|
989
|
+
onEscapeKeyDown: n,
|
|
990
|
+
onPointerDownOutside: n,
|
|
960
991
|
children: [
|
|
961
992
|
/* @__PURE__ */ s(
|
|
962
|
-
|
|
993
|
+
oe,
|
|
963
994
|
{
|
|
964
|
-
className:
|
|
995
|
+
className: u ? "space-y-0" : void 0,
|
|
965
996
|
children: [
|
|
966
|
-
/* @__PURE__ */ t(
|
|
997
|
+
/* @__PURE__ */ t(ne, { className: "text-[15px]", children: I }),
|
|
967
998
|
/* @__PURE__ */ t(
|
|
968
|
-
|
|
999
|
+
ie,
|
|
969
1000
|
{
|
|
970
|
-
className:
|
|
971
|
-
children:
|
|
1001
|
+
className: u ? "sr-only" : "text-[13px]",
|
|
1002
|
+
children: u ? "Configure and add a shared dashboard control." : "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control."
|
|
972
1003
|
}
|
|
973
1004
|
)
|
|
974
1005
|
]
|
|
@@ -979,75 +1010,78 @@ function Ot({
|
|
|
979
1010
|
}
|
|
980
1011
|
) });
|
|
981
1012
|
}
|
|
982
|
-
function
|
|
1013
|
+
function Bt({
|
|
983
1014
|
showFilters: e,
|
|
984
1015
|
onToggleFilters: a,
|
|
985
1016
|
onAddFilter: p,
|
|
986
1017
|
onAddControl: d,
|
|
987
|
-
onManageControls:
|
|
988
|
-
size:
|
|
989
|
-
className:
|
|
990
|
-
primaryButtonClassName:
|
|
991
|
-
secondaryButtonClassName:
|
|
992
|
-
dropdownContentClassName:
|
|
1018
|
+
onManageControls: l,
|
|
1019
|
+
size: h = "default",
|
|
1020
|
+
className: o,
|
|
1021
|
+
primaryButtonClassName: c,
|
|
1022
|
+
secondaryButtonClassName: u,
|
|
1023
|
+
dropdownContentClassName: n
|
|
993
1024
|
}) {
|
|
994
|
-
const v =
|
|
1025
|
+
const v = h === "toolbar";
|
|
995
1026
|
return /* @__PURE__ */ s(
|
|
996
1027
|
"div",
|
|
997
1028
|
{
|
|
998
|
-
className:
|
|
999
|
-
"relative inline-flex items-stretch overflow-
|
|
1000
|
-
|
|
1029
|
+
className: V(
|
|
1030
|
+
"relative inline-flex items-stretch overflow-hidden rounded-[5px] border border-input bg-background",
|
|
1031
|
+
o
|
|
1001
1032
|
),
|
|
1002
1033
|
children: [
|
|
1003
1034
|
/* @__PURE__ */ s(
|
|
1004
|
-
|
|
1035
|
+
S,
|
|
1005
1036
|
{
|
|
1006
1037
|
variant: "ghost",
|
|
1007
|
-
|
|
1038
|
+
size: "xs",
|
|
1039
|
+
className: V(
|
|
1008
1040
|
v ? "h-8" : "h-7",
|
|
1009
|
-
"rounded-none border-0 bg-transparent pl-
|
|
1010
|
-
|
|
1041
|
+
"rounded-none border-0 bg-transparent pl-2.5 pr-2 shadow-none hover:bg-accent/50",
|
|
1042
|
+
c
|
|
1011
1043
|
),
|
|
1012
1044
|
onClick: a,
|
|
1013
|
-
size: "sm",
|
|
1014
1045
|
children: [
|
|
1015
|
-
e ? /* @__PURE__ */ t(
|
|
1046
|
+
e ? /* @__PURE__ */ t(ut, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(J, { className: "h-3.5 w-3.5" }),
|
|
1016
1047
|
"Filter"
|
|
1017
1048
|
]
|
|
1018
1049
|
}
|
|
1019
1050
|
),
|
|
1020
|
-
/* @__PURE__ */ s(
|
|
1021
|
-
/* @__PURE__ */ t(
|
|
1022
|
-
|
|
1051
|
+
/* @__PURE__ */ s(de, { children: [
|
|
1052
|
+
/* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1053
|
+
S,
|
|
1023
1054
|
{
|
|
1024
|
-
className: L(
|
|
1025
|
-
v ? "h-8 w-8" : "h-7 w-8",
|
|
1026
|
-
"rounded-none border-0 bg-transparent px-1 shadow-none hover:bg-accent/50",
|
|
1027
|
-
h
|
|
1028
|
-
),
|
|
1029
1055
|
variant: "ghost",
|
|
1030
|
-
size: "
|
|
1056
|
+
size: "xs",
|
|
1057
|
+
className: V(
|
|
1058
|
+
v ? "h-8 w-7" : "h-7 w-7",
|
|
1059
|
+
"rounded-none border-0 border-l border-border/60 bg-transparent px-0 shadow-none hover:bg-accent/50",
|
|
1060
|
+
u
|
|
1061
|
+
),
|
|
1031
1062
|
"aria-label": "Filter and control actions",
|
|
1032
|
-
children: /* @__PURE__ */ t(
|
|
1063
|
+
children: /* @__PURE__ */ t(ue, { className: "h-3.5 w-3.5" })
|
|
1033
1064
|
}
|
|
1034
1065
|
) }),
|
|
1035
1066
|
/* @__PURE__ */ s(
|
|
1036
|
-
|
|
1067
|
+
he,
|
|
1037
1068
|
{
|
|
1038
1069
|
align: "start",
|
|
1039
|
-
className:
|
|
1070
|
+
className: V(
|
|
1071
|
+
"min-w-[180px] rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
1072
|
+
n
|
|
1073
|
+
),
|
|
1040
1074
|
children: [
|
|
1041
|
-
/* @__PURE__ */ s(
|
|
1042
|
-
/* @__PURE__ */ t(
|
|
1075
|
+
/* @__PURE__ */ s(U, { onSelect: p, children: [
|
|
1076
|
+
/* @__PURE__ */ t(J, { className: "h-3.5 w-3.5" }),
|
|
1043
1077
|
"Add filter"
|
|
1044
1078
|
] }),
|
|
1045
|
-
/* @__PURE__ */ s(
|
|
1046
|
-
/* @__PURE__ */ t(
|
|
1079
|
+
/* @__PURE__ */ s(U, { onSelect: d, children: [
|
|
1080
|
+
/* @__PURE__ */ t(G, { className: "h-3.5 w-3.5" }),
|
|
1047
1081
|
"Add control"
|
|
1048
1082
|
] }),
|
|
1049
|
-
/* @__PURE__ */ s(
|
|
1050
|
-
/* @__PURE__ */ t(
|
|
1083
|
+
/* @__PURE__ */ s(U, { onSelect: l, children: [
|
|
1084
|
+
/* @__PURE__ */ t(et, { className: "h-3.5 w-3.5" }),
|
|
1051
1085
|
"Manage controls"
|
|
1052
1086
|
] })
|
|
1053
1087
|
]
|
|
@@ -1059,15 +1093,15 @@ function zt({
|
|
|
1059
1093
|
);
|
|
1060
1094
|
}
|
|
1061
1095
|
export {
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1096
|
+
Ut as A,
|
|
1097
|
+
zt as D,
|
|
1098
|
+
yt as E,
|
|
1099
|
+
Pt as N,
|
|
1066
1100
|
Vt as U,
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1101
|
+
kt as V,
|
|
1102
|
+
wt as a,
|
|
1103
|
+
Tt as b,
|
|
1104
|
+
Bt as c,
|
|
1105
|
+
Mt as d,
|
|
1106
|
+
Ft as u
|
|
1073
1107
|
};
|