react-semaphor 0.1.182 → 0.1.184

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.
Files changed (42) hide show
  1. package/dist/chunks/calendar-preferences-dialog-D9oF_URo.js +1 -0
  2. package/dist/chunks/calendar-preferences-dialog-DeXKY9JD.js +457 -0
  3. package/dist/chunks/common-types-CfJLrTJd.js +1 -0
  4. package/dist/chunks/common-types-DhqlRVrq.js +8 -0
  5. package/dist/chunks/{dashboard-controls-pGlGtKRR.js → dashboard-controls-CB8282ob.js} +8 -8
  6. package/dist/chunks/{dashboard-controls-BnBXzFOj.js → dashboard-controls-lRs5t5cg.js} +499 -484
  7. package/dist/chunks/{dashboard-json-UVBr47Qj.js → dashboard-json-BmzqRV5Q.js} +1 -1
  8. package/dist/chunks/{dashboard-json-CiIyCwJi.js → dashboard-json-Brn4hMd-.js} +1 -1
  9. package/dist/chunks/date-formatter-Sz6QDaM8.js +1 -0
  10. package/dist/chunks/{index-B4EhQdS9.js → date-formatter-Y8Za1ib3.js} +500 -544
  11. package/dist/chunks/{edit-dashboard-visual-DoP_x_tT.js → edit-dashboard-visual--FJBg3i3.js} +914 -914
  12. package/dist/chunks/{edit-dashboard-visual-CXvyi_qa.js → edit-dashboard-visual-DNq8ni5W.js} +8 -8
  13. package/dist/chunks/{editor-action-buttons-5UEhKl88.js → editor-action-buttons-COCkxvCM.js} +27 -27
  14. package/dist/chunks/{editor-action-buttons-Bftd6Bfx.js → editor-action-buttons-RPpMm3Zr.js} +1 -1
  15. package/dist/chunks/{index-ahdw_esL.js → index-CyYJ0bVW.js} +24904 -24743
  16. package/dist/chunks/{index-D59dkH2b.js → index-Dz2kwOQh.js} +229 -229
  17. package/dist/chunks/{notification-bell-CKI2j8jH.js → notification-bell-B86bWytX.js} +109 -109
  18. package/dist/chunks/{notification-bell-DtWcBdzp.js → notification-bell-Bdk-qQIx.js} +2 -2
  19. package/dist/chunks/{resource-management-panel-qkl060k8.js → resource-management-panel-BZKSwkRq.js} +160 -160
  20. package/dist/chunks/{resource-management-panel-BLiCtZZE.js → resource-management-panel-CvKBoIFQ.js} +1 -1
  21. package/dist/chunks/{use-role-aware-display-preferences-CLf3yEts.js → use-role-aware-display-preferences-D-jgaajh.js} +1 -1
  22. package/dist/chunks/{use-role-aware-display-preferences-JstD5WLE.js → use-role-aware-display-preferences-Kxc427Zx.js} +1 -1
  23. package/dist/chunks/{use-visual-utils-TGjvLx_R.js → use-visual-utils-Du4NIgMk.js} +1 -1
  24. package/dist/chunks/{use-visual-utils-BbN7rxtD.js → use-visual-utils-DwQQN6wI.js} +33 -33
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +3 -3
  27. package/dist/format-utils/index.cjs +5 -5
  28. package/dist/format-utils/index.js +200 -250
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.js +75 -71
  31. package/dist/style.css +1 -1
  32. package/dist/surfboard/index.cjs +1 -1
  33. package/dist/surfboard/index.js +6 -4
  34. package/dist/types/dashboard.d.ts +6 -2
  35. package/dist/types/format-utils.d.ts +43 -20
  36. package/dist/types/index.cjs +1 -1
  37. package/dist/types/index.js +8 -5
  38. package/dist/types/main.d.ts +99 -9
  39. package/dist/types/surfboard.d.ts +13 -2
  40. package/dist/types/types.d.ts +319 -2
  41. package/package.json +1 -1
  42. package/dist/chunks/index-8Crk3ROJ.js +0 -1
@@ -1,9 +1,9 @@
1
- import oe, { useState as A, useRef as V, useCallback as M, useEffect as D, useContext as ie } from "react";
2
- import { aF as O, aN as B, a0 as I, aC as $, ay as ae, az as _, a1 as se, ax as le, bu as ce, bv as de, bw as ue, bx as me, by as he, bz as R, bA as pe, bG as fe, bH as j, bB as ge, B as S, aG as H, au as P, aI as ve, u as E, aO as be, as as re, bI as xe, bJ as G, aL as U, A as we, bK as Ce, c as T, aV as X, aW as q, aX as W, aY as Q, aZ as Y, av as Ne, bL as ye, bM as Ae, bN as Se, bb as Ee, bc as De, bd as Ie, bO as ke, be as Ue, bf as Te, bg as Fe, bh as Me, bi as Pe, W as Le, I as Ve, bP as ze, bQ as Re, aE as Oe, X as Be, bR as $e, bS as _e, bT as He, aA as Z, a3 as je, P as Ge, p as Xe, bU as qe, r as We } from "./index-ahdw_esL.js";
3
- import { jsx as t, jsxs as r, Fragment as L } from "react/jsx-runtime";
4
- import { E as Qe, V as Ye, a as Ze, b as Je, S as J, c as Ke, C as et } from "./editor-action-buttons-5UEhKl88.js";
5
- import { a as ne } from "./use-visual-utils-BbN7rxtD.js";
6
- import { a as K } from "./index-B4EhQdS9.js";
1
+ import oe, { useState as A, useRef as V, useCallback as F, useEffect as D, useContext as ie } from "react";
2
+ import { aT as O, l as B, ae as I, aQ as $, aM as se, aN as _, af as ae, aL as le, m as ce, n as de, o as ue, p as me, q as he, L as z, bF as pe, bK as fe, bL as j, G as ge, B as S, H, aI as L, aV as ve, u as E, aZ as be, aG as re, bM as xe, bN as q, I as T, Y as we, bO as Ce, c as U, b4 as G, b5 as X, b6 as W, b7 as Q, b8 as Y, aJ as Ne, bP as ye, bQ as Ae, bR as Se, bm as Ee, bn as De, bo as Ie, bS as ke, bp as Te, bq as Ue, br as Me, bs as Fe, bt as Le, a9 as Pe, W as Ve, bT as Re, bU as ze, aS as Oe, X as Be, bV as $e, bW as _e, bX as He, aO as Z, ah as je, P as qe, s as Ge, bY as Xe, t as We } from "./index-CyYJ0bVW.js";
3
+ import { jsx as t, jsxs as r, Fragment as P } from "react/jsx-runtime";
4
+ import { E as Qe, V as Ye, a as Ze, b as Je, S as J, c as Ke, C as et } from "./editor-action-buttons-COCkxvCM.js";
5
+ import { a as ne } from "./use-visual-utils-DwQQN6wI.js";
6
+ import { c as K } from "./date-formatter-Y8Za1ib3.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
9
9
  *
@@ -33,20 +33,20 @@ const ee = O("FileDown", [
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const at = O("RefreshCw", [
36
+ const st = O("RefreshCw", [
37
37
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
38
38
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
39
39
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
40
40
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
41
- ]), st = 1e4, rt = 15e3, nt = 3e4, ot = 3e4, it = 12e4, te = 2 * 60 * 60 * 1e3;
41
+ ]), at = 1e4, rt = 15e3, nt = 3e4, ot = 3e4, it = 12e4, te = 2 * 60 * 60 * 1e3;
42
42
  function lt(e) {
43
- const a = Date.now() - e.getTime();
44
- return a < ot ? st : a < it ? rt : nt;
43
+ const s = Date.now() - e.getTime();
44
+ return s < ot ? at : s < it ? rt : nt;
45
45
  }
46
46
  function wt() {
47
- const { authToken: e, tokenProps: a } = B(), c = I((g) => g.activeExports), [n, m] = A(
47
+ const { authToken: e, tokenProps: s } = B(), c = I((g) => g.activeExports), [n, m] = A(
48
48
  typeof document < "u" ? !document.hidden : !0
49
- ), l = V(null), o = V(!1), s = V(void 0), h = a == null ? void 0 : a.apiServiceUrl, d = e == null ? void 0 : e.accessToken, v = M(() => {
49
+ ), l = V(null), o = V(!1), a = V(void 0), h = s == null ? void 0 : s.apiServiceUrl, d = e == null ? void 0 : e.accessToken, v = F(() => {
50
50
  const g = I.getState().activeExports;
51
51
  return Array.from(g.values()).filter(
52
52
  (x) => $(x.status)
@@ -61,7 +61,7 @@ function wt() {
61
61
  document.removeEventListener("visibilitychange", g);
62
62
  };
63
63
  }, []);
64
- const C = M(async () => {
64
+ const C = F(async () => {
65
65
  if (!h || !d) {
66
66
  o.current = !1;
67
67
  return;
@@ -93,15 +93,15 @@ function wt() {
93
93
  const b = await Promise.allSettled(
94
94
  f.map(async (p) => {
95
95
  try {
96
- const i = await ae(h, d, p.id);
96
+ const i = await se(h, d, p.id);
97
97
  let w;
98
98
  if (i.status === "completed")
99
99
  try {
100
100
  w = await _(h, d, p.id);
101
- } catch (F) {
101
+ } catch (M) {
102
102
  console.error(
103
103
  `[useExportPolling] Failed to get download URL for ${p.id}:`,
104
- F
104
+ M
105
105
  );
106
106
  }
107
107
  return {
@@ -128,25 +128,25 @@ function wt() {
128
128
  const u = v();
129
129
  if (u.length > 0 && !document.hidden) {
130
130
  const p = u.reduce(
131
- (w, F) => F.startedAt < w ? F.startedAt : w,
131
+ (w, M) => M.startedAt < w ? M.startedAt : w,
132
132
  u[0].startedAt
133
133
  ), i = lt(p);
134
134
  l.current && clearTimeout(l.current), l.current = setTimeout(() => {
135
135
  var w;
136
- (w = s.current) == null || w.call(s);
136
+ (w = a.current) == null || w.call(a);
137
137
  }, i);
138
138
  } else
139
139
  o.current = !1;
140
140
  }, [h, d, v]);
141
141
  return D(() => {
142
- s.current = C;
142
+ a.current = C;
143
143
  }, [C]), D(() => {
144
144
  var x;
145
- v().length > 0 && n && !o.current && (o.current = !0, (x = s.current) == null || x.call(s));
145
+ v().length > 0 && n && !o.current && (o.current = !0, (x = a.current) == null || x.call(a));
146
146
  }, [c, n, v]), D(() => {
147
147
  var x;
148
148
  const g = v();
149
- n && g.length > 0 && !o.current && (o.current = !0, (x = s.current) == null || x.call(s));
149
+ n && g.length > 0 && !o.current && (o.current = !0, (x = a.current) == null || x.call(a));
150
150
  }, [n, v]), D(() => {
151
151
  !n && l.current && (clearTimeout(l.current), l.current = null, o.current = !1);
152
152
  }, [n]), D(() => () => {
@@ -158,7 +158,7 @@ function wt() {
158
158
  };
159
159
  }
160
160
  function Ct() {
161
- const { authToken: e, tokenProps: a } = B(), c = I((s) => s.activeExports), { addExport: n } = se(), m = V(!1), l = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
161
+ const { authToken: e, tokenProps: s } = B(), c = I((a) => a.activeExports), { addExport: n } = ae(), m = V(!1), l = s == null ? void 0 : s.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
162
162
  D(() => {
163
163
  if (m.current || !l || !o) return;
164
164
  (async () => {
@@ -213,17 +213,17 @@ function ct(e) {
213
213
  }
214
214
  function dt({
215
215
  open: e,
216
- onOpenChange: a,
216
+ onOpenChange: s,
217
217
  isLibraryVisual: c,
218
218
  currentVisualName: n,
219
219
  isSaving: m = !1,
220
220
  onConfirm: l
221
221
  }) {
222
- const [o, s] = A(
222
+ const [o, a] = A(
223
223
  c && n ? `Copy of ${n}` : n || ""
224
224
  ), [h, d] = A(""), [v, C] = A(!c), [g, x] = A(!0);
225
225
  oe.useEffect(() => {
226
- e && (s(
226
+ e && (a(
227
227
  c && n ? `Copy of ${n}` : n || ""
228
228
  ), d(""), C(!c), x(!0));
229
229
  }, [e, c, n]);
@@ -235,27 +235,27 @@ function dt({
235
235
  saveToCurrentDashboard: g
236
236
  }));
237
237
  }, f = o.trim() && (v || g);
238
- return /* @__PURE__ */ t(ce, { open: e, onOpenChange: a, children: /* @__PURE__ */ r(de, { className: "sm:max-w-[425px]", children: [
238
+ return /* @__PURE__ */ t(ce, { open: e, onOpenChange: s, children: /* @__PURE__ */ r(de, { className: "sm:max-w-[425px]", children: [
239
239
  /* @__PURE__ */ r(ue, { children: [
240
240
  /* @__PURE__ */ t(me, { children: "Save Visual As" }),
241
241
  /* @__PURE__ */ t(he, { children: c ? "Create a copy of this visual with a new name" : "Save this visual to make it reusable" })
242
242
  ] }),
243
243
  /* @__PURE__ */ r("div", { className: "grid gap-4 py-4", children: [
244
244
  /* @__PURE__ */ r("div", { className: "grid gap-2", children: [
245
- /* @__PURE__ */ t(R, { htmlFor: "name", children: "Name" }),
245
+ /* @__PURE__ */ t(z, { htmlFor: "name", children: "Name" }),
246
246
  /* @__PURE__ */ t(
247
247
  pe,
248
248
  {
249
249
  id: "name",
250
250
  value: o,
251
- onChange: (b) => s(b.target.value),
251
+ onChange: (b) => a(b.target.value),
252
252
  placeholder: "Enter visual name",
253
253
  disabled: m
254
254
  }
255
255
  )
256
256
  ] }),
257
257
  /* @__PURE__ */ r("div", { className: "grid gap-2", children: [
258
- /* @__PURE__ */ t(R, { htmlFor: "description", children: "Description (optional)" }),
258
+ /* @__PURE__ */ t(z, { htmlFor: "description", children: "Description (optional)" }),
259
259
  /* @__PURE__ */ t(
260
260
  fe,
261
261
  {
@@ -269,7 +269,7 @@ function dt({
269
269
  )
270
270
  ] }),
271
271
  /* @__PURE__ */ r("div", { className: "space-y-4", children: [
272
- /* @__PURE__ */ t(R, { children: "Save to:" }),
272
+ /* @__PURE__ */ t(z, { children: "Save to:" }),
273
273
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
274
274
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
275
275
  /* @__PURE__ */ t(
@@ -324,7 +324,7 @@ function dt({
324
324
  S,
325
325
  {
326
326
  variant: "outline",
327
- onClick: () => a(!1),
327
+ onClick: () => s(!1),
328
328
  disabled: m,
329
329
  children: "Cancel"
330
330
  }
@@ -337,34 +337,34 @@ function dt({
337
337
  ] }) });
338
338
  }
339
339
  function ut() {
340
- const [e, a] = A(!1), [c, n] = A(!1), [m, l] = A(null), o = P((i) => i.frame), s = P((i) => i.card), h = ve(), d = E((i) => i.selectedSheetId), v = E(
340
+ const [e, s] = A(!1), [c, n] = A(!1), [m, l] = A(null), o = L((i) => i.frame), a = L((i) => i.card), h = ve(), d = E((i) => i.selectedSheetId), v = E(
341
341
  (i) => i.actions.setIsDashboardPanelOpen
342
342
  ), { getUpdatedFrame: C } = ne(), { selectVisual: g } = be(), { addFrame: x, setSelectedFrameId: y, setIsVisualEditing: f } = re(), b = !!(o != null && o.visualId), N = (() => {
343
343
  var i, w;
344
- return ((i = o == null ? void 0 : o.cards) == null ? void 0 : i.length) === 1 && ((w = o.cards[0]) != null && w.title) ? o.cards[0].title : h != null && h.title ? h.title : (s == null ? void 0 : s.title) || "Untitled Visual";
344
+ return ((i = o == null ? void 0 : o.cards) == null ? void 0 : i.length) === 1 && ((w = o.cards[0]) != null && w.title) ? o.cards[0].title : h != null && h.title ? h.title : (a == null ? void 0 : a.title) || "Untitled Visual";
345
345
  })(), u = xe((i) => {
346
346
  if (i != null && i.id) {
347
347
  if (g(i), c && m && d) {
348
348
  const w = {
349
349
  ...m,
350
- id: G(),
350
+ id: q(),
351
351
  visualId: i.id
352
352
  // Link to the newly created library visual
353
353
  };
354
354
  x(d, w, "end"), y(w.id), n(!1), l(null), f(!1);
355
355
  }
356
- v(!0), a(!1);
356
+ v(!0), s(!1);
357
357
  }
358
358
  });
359
359
  return {
360
360
  saveAsDialogOpen: e,
361
- setSaveAsDialogOpen: a,
361
+ setSaveAsDialogOpen: s,
362
362
  handleSaveAs: async (i) => {
363
363
  if (!d) {
364
- U.error("No sheet selected");
364
+ T.error("No sheet selected");
365
365
  return;
366
366
  }
367
- const w = C(), z = w.cards.length === 1 ? {
367
+ const w = C(), R = w.cards.length === 1 ? {
368
368
  ...w,
369
369
  cards: w.cards.map((k) => ({
370
370
  ...k,
@@ -373,24 +373,24 @@ function ut() {
373
373
  }))
374
374
  } : w;
375
375
  if (i.saveToLibrary) {
376
- n(i.saveToCurrentDashboard), l(z);
376
+ n(i.saveToCurrentDashboard), l(R);
377
377
  const k = {
378
378
  title: i.name,
379
379
  description: i.description,
380
- frameObject: z,
380
+ frameObject: R,
381
381
  // Card title synced for single-card frames
382
382
  isPrivate: !1
383
383
  };
384
384
  u.mutate(k);
385
385
  } else if (i.saveToCurrentDashboard) {
386
386
  const k = {
387
- ...z,
387
+ ...R,
388
388
  // Card title already synced
389
- id: G(),
389
+ id: q(),
390
390
  visualId: void 0
391
391
  // Explicitly no visualId for local visuals
392
392
  };
393
- x(d, k, "end"), y(k.id), U.success("Visual saved to dashboard"), a(!1), f(!1);
393
+ x(d, k, "end"), y(k.id), T.success("Visual saved to dashboard"), s(!1), f(!1);
394
394
  }
395
395
  },
396
396
  isLibraryVisual: b,
@@ -401,7 +401,7 @@ function ut() {
401
401
  function Nt({
402
402
  className: e
403
403
  }) {
404
- const a = P((u) => u.frame), c = P((u) => u.card), n = we((u) => u.selectedVisual), m = E((u) => u.selectedFrameId), l = E((u) => u.selectedSheetId), { setIsVisualEditing: o } = re(), s = !!(a != null && a.visualId || n != null && n.id), h = !!(a != null && a.visualId && m), d = s && !h, {
404
+ const s = L((u) => u.frame), c = L((u) => u.card), n = we((u) => u.selectedVisual), m = E((u) => u.selectedFrameId), l = E((u) => u.selectedSheetId), { setIsVisualEditing: o } = re(), a = !!(s != null && s.visualId || n != null && n.id), h = !!(s != null && s.visualId && m), d = a && !h, {
405
405
  saveAsDialogOpen: v,
406
406
  setSaveAsDialogOpen: C,
407
407
  handleSaveAs: g,
@@ -410,25 +410,25 @@ function Nt({
410
410
  isSaving: f
411
411
  } = ut(), { handleAddLibraryVisual: b } = ne(), N = async () => {
412
412
  if (!l) {
413
- U.error("No dashboard sheet selected");
413
+ T.error("No dashboard sheet selected");
414
414
  return;
415
415
  }
416
416
  if (!n) {
417
- U.error("No visual selected");
417
+ T.error("No visual selected");
418
418
  return;
419
419
  }
420
420
  const u = await b(n);
421
- u.success ? (U.success("Visual added to dashboard"), o(!1)) : U.error(u.error || "Failed to add visual to dashboard");
421
+ u.success ? (T.success("Visual added to dashboard"), o(!1)) : T.error(u.error || "Failed to add visual to dashboard");
422
422
  };
423
- return /* @__PURE__ */ r(L, { children: [
424
- !s && /* @__PURE__ */ t(Qe, { className: e, variant: "default" }),
425
- s && /* @__PURE__ */ r(L, { children: [
423
+ return /* @__PURE__ */ r(P, { children: [
424
+ !a && /* @__PURE__ */ t(Qe, { className: e, variant: "default" }),
425
+ a && /* @__PURE__ */ r(P, { children: [
426
426
  h && /* @__PURE__ */ t(Ye, { className: e }),
427
427
  d && l && c && (c.sql || Ce(c.config)) && /* @__PURE__ */ r(
428
428
  S,
429
429
  {
430
430
  onClick: N,
431
- className: T(e),
431
+ className: U(e),
432
432
  size: "sm",
433
433
  variant: "outline",
434
434
  children: [
@@ -439,13 +439,13 @@ function Nt({
439
439
  ),
440
440
  d && /* @__PURE__ */ t(Ze, { className: e, variant: "default" }),
441
441
  h && /* @__PURE__ */ t(Je, { className: e }),
442
- /* @__PURE__ */ r(X, { modal: !1, children: [
443
- /* @__PURE__ */ t(q, { asChild: !0, children: /* @__PURE__ */ t(
442
+ /* @__PURE__ */ r(G, { modal: !1, children: [
443
+ /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(
444
444
  S,
445
445
  {
446
446
  variant: "outline",
447
447
  size: "sm",
448
- className: T(e, "w-8 p-0"),
448
+ className: U(e, "w-8 p-0"),
449
449
  children: /* @__PURE__ */ t(W, { className: "h-4 w-4" })
450
450
  }
451
451
  ) }),
@@ -463,13 +463,13 @@ function Nt({
463
463
  ) })
464
464
  ] })
465
465
  ] }),
466
- !s && /* @__PURE__ */ r(X, { modal: !1, children: [
467
- /* @__PURE__ */ t(q, { asChild: !0, children: /* @__PURE__ */ t(
466
+ !a && /* @__PURE__ */ r(G, { modal: !1, children: [
467
+ /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(
468
468
  S,
469
469
  {
470
470
  variant: "outline",
471
471
  size: "sm",
472
- className: T(e, "w-8 p-0"),
472
+ className: U(e, "w-8 p-0"),
473
473
  children: /* @__PURE__ */ t(W, { className: "h-4 w-4" })
474
474
  }
475
475
  ) }),
@@ -497,14 +497,14 @@ function Nt({
497
497
  function yt({
498
498
  className: e,
499
499
  //labelClassName,
500
- switchClassName: a
500
+ switchClassName: s
501
501
  }) {
502
- const c = P((s) => s.isDevMode), n = E((s) => s.isVisualEditing), { setIsDevMode: m } = Ne(), { config: l } = ie(ye).tokenProps, o = (l == null ? void 0 : l.showAdvancedMode) !== !1;
503
- return !n || !o ? null : /* @__PURE__ */ r("div", { className: T("flex items-center space-x-2", e), children: [
502
+ const c = L((a) => a.isDevMode), n = E((a) => a.isVisualEditing), { setIsDevMode: m } = Ne(), { config: l } = ie(ye).tokenProps, o = (l == null ? void 0 : l.showAdvancedMode) !== !1;
503
+ return !n || !o ? null : /* @__PURE__ */ r("div", { className: U("flex items-center space-x-2", e), children: [
504
504
  /* @__PURE__ */ t(
505
505
  Ae,
506
506
  {
507
- className: T("", a),
507
+ className: U("", s),
508
508
  checked: c,
509
509
  onCheckedChange: () => m(!c),
510
510
  id: "advanced-mode",
@@ -517,24 +517,24 @@ function yt({
517
517
  }
518
518
  function At({
519
519
  open: e,
520
- onOpenChange: a,
520
+ onOpenChange: s,
521
521
  onSave: c,
522
522
  onDiscard: n,
523
523
  isSaving: m
524
524
  }) {
525
525
  return /* @__PURE__ */ t(Ee, { open: e, onOpenChange: (o) => {
526
- !o && m || a(o);
526
+ !o && m || s(o);
527
527
  }, children: /* @__PURE__ */ r(De, { className: "max-w-md", children: [
528
528
  /* @__PURE__ */ r(Ie, { children: [
529
529
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
530
530
  /* @__PURE__ */ t("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-amber-100", children: /* @__PURE__ */ t(ke, { className: "h-5 w-5 text-amber-600" }) }),
531
- /* @__PURE__ */ t(Ue, { className: "text-xl", children: "Unsaved Changes" })
531
+ /* @__PURE__ */ t(Te, { className: "text-xl", children: "Unsaved Changes" })
532
532
  ] }),
533
- /* @__PURE__ */ t(Te, { className: "pt-2 text-base leading-relaxed", children: "You have unsaved changes to this dashboard. What would you like to do?" })
533
+ /* @__PURE__ */ t(Ue, { className: "pt-2 text-base leading-relaxed", children: "You have unsaved changes to this dashboard. What would you like to do?" })
534
534
  ] }),
535
- /* @__PURE__ */ r(Fe, { className: "flex-col gap-2 sm:flex-row sm:gap-2", children: [
535
+ /* @__PURE__ */ r(Me, { className: "flex-col gap-2 sm:flex-row sm:gap-2", children: [
536
536
  /* @__PURE__ */ t(
537
- Me,
537
+ Fe,
538
538
  {
539
539
  disabled: m,
540
540
  className: "order-1 m-0 border-border/50 sm:order-1",
@@ -551,12 +551,12 @@ function At({
551
551
  }
552
552
  ),
553
553
  /* @__PURE__ */ t(
554
- Pe,
554
+ Le,
555
555
  {
556
556
  onClick: c,
557
557
  disabled: m,
558
558
  className: "order-3 m-0 bg-primary text-primary-foreground hover:bg-primary/90 sm:order-3",
559
- children: m ? /* @__PURE__ */ r(L, { children: [
559
+ children: m ? /* @__PURE__ */ r(P, { children: [
560
560
  /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
561
561
  "Saving..."
562
562
  ] }) : "Save & Close"
@@ -565,38 +565,38 @@ function At({
565
565
  ] })
566
566
  ] }) });
567
567
  }
568
- function St(e, a, c, n) {
568
+ function St(e, s, c, n) {
569
569
  D(() => {
570
- e && !c && a && n(Le(a));
571
- }, [e, c, a, n]);
570
+ e && !c && s && n(Pe(s));
571
+ }, [e, c, s, n]);
572
572
  }
573
573
  function Et({
574
574
  triggerButtonClassName: e
575
575
  }) {
576
- const [a, c] = A(!1), n = E((s) => {
576
+ const [s, c] = A(!1), n = E((a) => {
577
577
  var h;
578
- return (h = s.dashboard) == null ? void 0 : h.id;
579
- }), m = E((s) => {
578
+ return (h = a.dashboard) == null ? void 0 : h.id;
579
+ }), m = E((a) => {
580
580
  var h;
581
- return (h = s.dashboard) == null ? void 0 : h.title;
582
- }), l = E((s) => {
581
+ return (h = a.dashboard) == null ? void 0 : h.title;
582
+ }), l = E((a) => {
583
583
  var h;
584
- return (h = s.dashboard) == null ? void 0 : h.sheets;
585
- }), o = E((s) => s.selectedSheetId);
586
- return l == null || l.find((s) => s.id === o), n ? /* @__PURE__ */ r(L, { children: [
584
+ return (h = a.dashboard) == null ? void 0 : h.sheets;
585
+ }), o = E((a) => a.selectedSheetId);
586
+ return l == null || l.find((a) => a.id === o), n ? /* @__PURE__ */ r(P, { children: [
587
587
  /* @__PURE__ */ t(
588
588
  Ve,
589
589
  {
590
590
  tooltip: "Schedule Dashboard",
591
- className: T("h-7 p-2", e),
591
+ className: U("h-7 p-2", e),
592
592
  onClick: () => c(!0),
593
- children: /* @__PURE__ */ t(ze, { className: "size-4" })
593
+ children: /* @__PURE__ */ t(Re, { className: "size-4" })
594
594
  }
595
595
  ),
596
596
  /* @__PURE__ */ t(
597
- Re,
597
+ ze,
598
598
  {
599
- open: a,
599
+ open: s,
600
600
  onOpenChange: c,
601
601
  dashboardId: n,
602
602
  dashboardName: m
@@ -606,12 +606,12 @@ function Et({
606
606
  }
607
607
  function mt({
608
608
  export: e,
609
- onRemove: a
609
+ onRemove: s
610
610
  }) {
611
611
  const c = () => {
612
612
  e.downloadUrl && window.open(e.downloadUrl, "_blank");
613
- }, n = (s) => {
614
- s.stopPropagation(), a == null || a(e.id);
613
+ }, n = (a) => {
614
+ a.stopPropagation(), s == null || s(e.id);
615
615
  }, m = () => {
616
616
  switch (e.status) {
617
617
  case "completed":
@@ -646,7 +646,7 @@ function mt({
646
646
  e.totalRows.toLocaleString(),
647
647
  " rows"
648
648
  ] }),
649
- e.fileSize && /* @__PURE__ */ r(L, { children: [
649
+ e.fileSize && /* @__PURE__ */ r(P, { children: [
650
650
  /* @__PURE__ */ t("span", { children: "•" }),
651
651
  /* @__PURE__ */ t("span", { children: Oe(e.fileSize) })
652
652
  ] })
@@ -696,20 +696,20 @@ function mt({
696
696
  ] });
697
697
  }
698
698
  function ht() {
699
- const { authToken: e, tokenProps: a } = B(), c = I((f) => f.activeExports), { clearCompleted: n, removeExport: m, updateExport: l } = se(), [o, s] = A(!1), [h, d] = A(!1), v = Array.from(c.values()).sort(
699
+ const { authToken: e, tokenProps: s } = B(), c = I((f) => f.activeExports), { clearCompleted: n, removeExport: m, updateExport: l } = ae(), [o, a] = A(!1), [h, d] = A(!1), v = Array.from(c.values()).sort(
700
700
  (f, b) => b.startedAt.getTime() - f.startedAt.getTime()
701
701
  ), C = v.some(
702
702
  (f) => f.status === "completed" || f.status === "failed"
703
- ), g = M(async () => {
704
- const f = a == null ? void 0 : a.apiServiceUrl, b = e == null ? void 0 : e.accessToken;
703
+ ), g = F(async () => {
704
+ const f = s == null ? void 0 : s.apiServiceUrl, b = e == null ? void 0 : e.accessToken;
705
705
  if (!(!f || !b)) {
706
- s(!0);
706
+ a(!0);
707
707
  try {
708
708
  const N = Array.from(c.values());
709
709
  await Promise.all(
710
710
  N.map(async (u) => {
711
711
  try {
712
- const p = await ae(f, b, u.id);
712
+ const p = await se(f, b, u.id);
713
713
  let i;
714
714
  if (p.status === "completed")
715
715
  try {
@@ -737,16 +737,16 @@ function ht() {
737
737
  })
738
738
  );
739
739
  } finally {
740
- s(!1);
740
+ a(!1);
741
741
  }
742
742
  }
743
743
  }, [
744
744
  c,
745
745
  e == null ? void 0 : e.accessToken,
746
- a == null ? void 0 : a.apiServiceUrl,
746
+ s == null ? void 0 : s.apiServiceUrl,
747
747
  l
748
- ]), x = M(async () => {
749
- const f = a == null ? void 0 : a.apiServiceUrl, b = e == null ? void 0 : e.accessToken;
748
+ ]), x = F(async () => {
749
+ const f = s == null ? void 0 : s.apiServiceUrl, b = e == null ? void 0 : e.accessToken;
750
750
  if (!f || !b) {
751
751
  n();
752
752
  return;
@@ -768,12 +768,12 @@ function ht() {
768
768
  }
769
769
  }, [
770
770
  v,
771
- a == null ? void 0 : a.apiServiceUrl,
771
+ s == null ? void 0 : s.apiServiceUrl,
772
772
  e == null ? void 0 : e.accessToken,
773
773
  n
774
- ]), y = M(
774
+ ]), y = F(
775
775
  async (f) => {
776
- const b = a == null ? void 0 : a.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
776
+ const b = s == null ? void 0 : s.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
777
777
  if (b && N)
778
778
  try {
779
779
  await Z(b, N, f);
@@ -782,7 +782,7 @@ function ht() {
782
782
  }
783
783
  m(f);
784
784
  },
785
- [a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, m]
785
+ [s == null ? void 0 : s.apiServiceUrl, e == null ? void 0 : e.accessToken, m]
786
786
  );
787
787
  return v.length === 0 ? /* @__PURE__ */ r("div", { className: "p-6 text-center", children: [
788
788
  /* @__PURE__ */ t(ee, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
@@ -805,7 +805,7 @@ function ht() {
805
805
  disabled: o,
806
806
  title: "Refresh status",
807
807
  children: /* @__PURE__ */ t(
808
- at,
808
+ st,
809
809
  {
810
810
  className: `h-4 w-4 ${o ? "animate-spin" : ""}`
811
811
  }
@@ -836,11 +836,11 @@ function ht() {
836
836
  ] });
837
837
  }
838
838
  function Dt() {
839
- const e = I((s) => s.activeExports), a = je(), c = e.size > 0, n = Array.from(e.values()).some(
840
- (s) => s.status === "completed" || s.status === "failed"
841
- ), l = a > 0 ? a > 9 ? "9+" : String(a) : null;
842
- return /* @__PURE__ */ r(Ge, { children: [
843
- /* @__PURE__ */ t(Xe, { asChild: !0, children: /* @__PURE__ */ r(
839
+ const e = I((a) => a.activeExports), s = je(), c = e.size > 0, n = Array.from(e.values()).some(
840
+ (a) => a.status === "completed" || a.status === "failed"
841
+ ), l = s > 0 ? s > 9 ? "9+" : String(s) : null;
842
+ return /* @__PURE__ */ r(qe, { children: [
843
+ /* @__PURE__ */ t(Ge, { asChild: !0, children: /* @__PURE__ */ r(
844
844
  S,
845
845
  {
846
846
  variant: "ghost",
@@ -848,7 +848,7 @@ function Dt() {
848
848
  className: "relative h-8 w-8",
849
849
  "aria-label": "Export notifications",
850
850
  children: [
851
- /* @__PURE__ */ t(qe, { className: "h-4 w-4" }),
851
+ /* @__PURE__ */ t(Xe, { className: "h-4 w-4" }),
852
852
  c && /* @__PURE__ */ t(
853
853
  "span",
854
854
  {
@@ -866,7 +866,7 @@ export {
866
866
  yt as A,
867
867
  ht as E,
868
868
  Dt as N,
869
- at as R,
869
+ st as R,
870
870
  Et as S,
871
871
  At as U,
872
872
  Nt as V,