react-semaphor 0.1.179 → 0.1.180

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 (30) hide show
  1. package/dist/chunks/{dashboard-controls-CeT5saB7.js → dashboard-controls-Baw7eUyM.js} +3 -3
  2. package/dist/chunks/{dashboard-controls-O2Vl2SaH.js → dashboard-controls-CS3pAVZi.js} +339 -337
  3. package/dist/chunks/{dashboard-json--jGkpREU.js → dashboard-json-ClalWYi4.js} +1 -1
  4. package/dist/chunks/{dashboard-json-d1qZ8OYo.js → dashboard-json-Cz4bNnCC.js} +1 -1
  5. package/dist/chunks/{edit-dashboard-visual-ViDNkE8Q.js → edit-dashboard-visual-BMElXt-n.js} +30 -35
  6. package/dist/chunks/{edit-dashboard-visual-BsP87bZV.js → edit-dashboard-visual-DFJ5FJ7y.js} +11 -22
  7. package/dist/chunks/editor-action-buttons-DVWnnC_r.js +11 -0
  8. package/dist/chunks/{editor-action-buttons-F4_UU-Mk.js → editor-action-buttons-MtNYw1Bb.js} +57 -45
  9. package/dist/chunks/{index-v6ayK5K2.js → index-CAeKp6K8.js} +22589 -22037
  10. package/dist/chunks/{index-CFWw2cJ5.js → index-CfPKTeUk.js} +232 -227
  11. package/dist/chunks/notification-bell-2dZI5OV0.js +21 -0
  12. package/dist/chunks/notification-bell-YZ8VqdwA.js +870 -0
  13. package/dist/chunks/{resource-management-panel-Cn1aOr6L.js → resource-management-panel-Buhi-kvP.js} +1 -1
  14. package/dist/chunks/{resource-management-panel-CApVr9Vd.js → resource-management-panel-pxL28GXq.js} +133 -133
  15. package/dist/chunks/{use-role-aware-display-preferences-C-N0-Iik.js → use-role-aware-display-preferences-B_i2f9tn.js} +1 -1
  16. package/dist/chunks/{use-role-aware-display-preferences-Bxp6i8c7.js → use-role-aware-display-preferences-JljRcjrP.js} +1 -1
  17. package/dist/chunks/{use-visual-utils-D9lMGeVv.js → use-visual-utils-D3HjbsKO.js} +38 -38
  18. package/dist/chunks/{use-visual-utils-D19qzwzI.js → use-visual-utils-DPEHcmFT.js} +1 -1
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +1 -6
  22. package/dist/index.js +133 -126
  23. package/dist/style.css +1 -1
  24. package/dist/surfboard/index.cjs +1 -1
  25. package/dist/surfboard/index.js +1 -1
  26. package/dist/types/main.d.ts +262 -0
  27. package/package.json +1 -1
  28. package/dist/chunks/editor-action-buttons-DseT424l.js +0 -6
  29. package/dist/chunks/schedule-dashboard-B4KUKLfW.js +0 -416
  30. package/dist/chunks/schedule-dashboard-vvFw8B1E.js +0 -6
@@ -1,16 +1,16 @@
1
1
  import { jsxs as a, jsx as e, Fragment as ce } from "react/jsx-runtime";
2
- import { l as me, cb as wl, t as ut, m as ne, n as M, cc as ca, aK as L, cd as H, ce as Y, cf as W, cg as Q, ch as B, ci as fe, B as K, bc as We, cj as Ta, ck as bs, cl as Ns, cm as vs, cn as ys, co as Aa, G as st, X as Ae, cp as cn, bh as dn, aF as St, aG as kt, aH as Tt, aI as At, aJ as jt, s as Ve, bv as qe, br as Ke, bs as Ie, bt as Me, cq as $n, cr as un, u as ye, aO as ba, cs as $t, bm as ta, c as Z, aN as _e, ct as Cs, ba as ws, cu as Sl, cv as kl, cw as Tl, cx as sa, cy as Al, cz as Ss, cA as El, bE as Dl, cB as Ol, cC as ks, cD as Il, cE as mn, cF as Ml, cG as pt, cH as it, cI as hn, p as Rl, cJ as Ll, cK as an, cL as Et, cM as Le, cN as Dt, L as qt, cO as Fl, cP as Na, cQ as va, cR as ya, cS as Ts, c8 as Kt, aR as Ea, cT as da, cU as pn, cV as ua, bn as fn, cW as ft, R as Pl, cX as Vl, b1 as Bl, cY as at, cZ as mt, c_ as zl, c$ as ht, e as jl, aX as gn, o as As, d0 as xn, d1 as $l, d2 as Es, d3 as Ds, d4 as Gt, c5 as qa, d5 as ql, d6 as Kl, d7 as Os, d8 as Gl, d9 as Ul, da as _l, db as Da, dc as Jl, dd as Hl, de as qn, df as Yl, E as Oa, y as bn, dg as Wl, dh as Nn, bG as Ql, K as Oe, di as Xl, dj as Zl, bV as Ia, bW as Ma, bX as nt, bY as ga, dk as er, bu as tr, dl as Is, dm as ar, dn as nr, bB as Ra, aL as $e, P as Je, A as He, dp as sr, H as Ye, aS as vn, aT as yn, aV as Cn, bI as Ms, bg as Bt, dq as ot, dr as Ot, ds as It, dt as gt, du as Ut, dv as lr, ag as rr, dw as ir, aQ as zt, dx as or, dy as Rs, dz as cr, dA as dr, dB as ur, dC as mr, dD as hr, dE as pr, dF as fr, dG as Ls, dH as wn, bH as ge, dI as _t, dJ as ra, dK as gr, dL as xr, dM as Jt, dN as xe, dO as be, dP as Ne, dQ as br, dR as Nr, dS as ct, dT as pa, dU as Kn, dV as vr, c9 as Fs, au as Ps, dW as yr, dX as Cr, dY as wr, I as Ht, J as Yt, M as Wt, N as Qt, O as Xt, Q as Zt, dZ as Sr, d_ as kr, d$ as Gn, e0 as Tr, C as aa, e1 as Te, e2 as Ar, e3 as Ka, e4 as Un, e5 as ze, e6 as Er, e7 as Dr, e8 as Or, e9 as Ir, ea as ma, eb as Mr, ec as Ga, ed as Vs, ee as Rr, ef as Lr, eg as Fr, eh as Ca, ei as Pr, ej as Vr, ek as wt, bb as Sn, el as kn, em as Bs, en as Br, bz as zs, eo as zr, ep as _n, aA as La, T as jr, eq as $r, er as qr, es as Kr, et as Gr, eu as Ur, aq as Jn, ev as Hn, ew as _r, ex as Jr, ey as js, ez as Hr, eA as $s, eB as Yr, eC as Wr, eD as Qr, eE as Xr, eF as Zr, eG as ei, eH as ti, eI as ai, eJ as ni, eK as si, eL as qs, eM as li, eN as ri, eO as ii, eP as oi, eQ as ci, eR as di, eS as ui, eT as Ks, aU as mi, eU as hi, eV as Yn, eW as Wn, aa as pi, eX as fi, eY as gi, eZ as xi, e_ as bi, e$ as Gs, f0 as Ni, bO as Us, f1 as Ee, aM as vi, ac as wa, f2 as yi, bP as Ci, f3 as wi, f4 as Fa, f5 as _s, f6 as Pa, f7 as Si, bC as ki, f8 as Qn, f9 as Ti, fa as Ai, fb as Ei, fc as xa, fd as Di, fe as Tn, ff as Oi, fg as Ii, fh as Sa, fi as Mi, fj as Ri, fk as Li, fl as ia, fm as dt, fn as nn, fo as sn, fp as oa, fq as Js, fr as ea, fs as Fi, ft as Ua, fu as _a, fv as Pi, fw as Ja, fx as Vi, fy as Xn, fz as Bi, fA as zi, fB as ji, fC as $i, aW as Be, fD as qi, fE as Ki, fF as Gi, fG as Ui, fH as Va, bj as Ba, fI as Zn, fJ as Hs, c1 as Ha, fK as _i, fL as Ji, fM as Hi, F as Yi } from "./index-v6ayK5K2.js";
2
+ import { aF as me, cr as wl, aL as ut, av as ne, au as M, cs as ca, bz as L, ct as H, cu as Y, cv as W, cw as Q, cx as B, cy as fe, B as K, a_ as We, cz as Ta, cA as bs, cB as Ns, cC as vs, cD as ys, cE as Aa, q as st, X as Ae, cF as cn, b3 as dn, bu as St, bv as kt, bw as Tt, bx as At, by as jt, aK as Ve, bp as qe, bl as Ke, bm as Ie, bn as Me, cG as $n, cH as un, u as ye, bB as ba, cI as $t, b8 as ta, c as Z, bH as _e, cJ as Cs, aT as ws, cK as Sl, cL as kl, cM as Tl, cN as sa, cO as Al, cP as Ss, cQ as El, bU as Dl, cR as Ol, cS as ks, cT as Il, cU as mn, cV as Ml, cW as pt, cX as it, cY as hn, aH as Rl, cZ as Ll, c_ as an, c$ as Et, d0 as Le, d1 as Dt, aG as qt, d2 as Fl, d3 as Na, d4 as va, d5 as ya, d6 as Ts, co as Kt, bK as Ea, d7 as da, d8 as pn, d9 as ua, b9 as fn, da as ft, A as Pl, db as Vl, bO as Bl, dc as at, dd as mt, de as zl, df as ht, e as jl, bL as gn, as as As, dg as xn, dh as $l, di as Es, dj as Ds, dk as Gt, cl as qa, dl as ql, dm as Kl, dn as Os, dp as Gl, dq as Ul, dr as _l, ds as Da, dt as Jl, du as Hl, dv as qn, dw as Yl, E as Oa, n as bn, dx as Wl, dy as Nn, bW as Ql, I as Oe, dz as Xl, dA as Zl, c9 as Ia, ca as Ma, cb as nt, cc as ga, dB as er, bo as tr, dC as Is, dD as ar, dE as nr, bD as Ra, bA as $e, P as Je, p as He, dF as sr, r as Ye, aV as vn, aW as yn, aY as Cn, bY as Ms, b2 as Bt, dG as ot, dH as Ot, dI as It, dJ as gt, dK as Ut, dL as lr, aa as rr, dM as ir, bJ as zt, dN as or, dO as Rs, dP as cr, dQ as dr, dR as ur, dS as mr, dT as hr, dU as pr, dV as fr, dW as Ls, dX as wn, bX as ge, dY as _t, dZ as ra, d_ as gr, d$ as xr, e0 as Jt, e1 as xe, e2 as be, e3 as Ne, e4 as br, e5 as Nr, e6 as ct, e7 as pa, e8 as Kn, e9 as vr, cp as Fs, ao as Ps, ea as yr, eb as Cr, ec as wr, s as Ht, t as Yt, v as Wt, w as Qt, x as Xt, y as Zt, ed as Sr, ee as kr, ef as Gn, eg as Tr, z as aa, eh as Te, ei as Ar, ej as Ka, ek as Un, el as ze, em as Er, en as Dr, eo as Or, ep as Ir, eq as ma, er as Mr, es as Ga, et as Vs, eu as Rr, ev as Lr, ew as Fr, ex as Ca, ey as Pr, ez as Vr, eA as wt, aU as Sn, eB as kn, eC as Bs, eD as Br, bt as zs, eE as zr, eF as _n, aN as La, G as jr, eG as $r, eH as qr, eI as Kr, eJ as Gr, eK as Ur, ak as Jn, eL as Hn, eM as _r, eN as Jr, eO as js, eP as Hr, eQ as $s, eR as Yr, eS as Wr, eT as Qr, eU as Xr, eV as Zr, eW as ei, eX as ti, eY as ai, eZ as ni, e_ as si, e$ as qs, f0 as li, f1 as ri, f2 as ii, f3 as oi, f4 as ci, f5 as di, f6 as ui, f7 as Ks, aX as mi, f8 as hi, f9 as Yn, fa as Wn, a4 as pi, fb as fi, fc as gi, fd as xi, fe as bi, ff as Gs, fg as Ni, c2 as Us, fh as Ee, bG as vi, a6 as wa, fi as yi, c3 as Ci, fj as wi, fk as Fa, fl as _s, fm as Pa, fn as Si, bE as ki, fo as Qn, fp as Ti, fq as Ai, fr as Ei, fs as xa, ft as Di, fu as Tn, fv as Oi, fw as Ii, fx as Sa, fy as Mi, fz as Ri, fA as Li, fB as ia, fC as dt, fD as nn, fE as sn, fF as oa, fG as Js, fH as ea, fI as Fi, fJ as Ua, fK as _a, fL as Pi, fM as Ja, fN as Vi, fO as Xn, fP as Bi, fQ as zi, fR as ji, fS as $i, aZ as Be, fT as qi, fU as Ki, fV as Gi, fW as Ui, fX as Va, b5 as Ba, fY as Zn, fZ as Hs, ch as Ha, f_ as _i, f$ as Ji, g0 as Hi, F as Yi } from "./index-CAeKp6K8.js";
3
3
  import * as ln from "react";
4
4
  import rn, { useState as q, useRef as Pe, useEffect as ue, useCallback as Fe, useContext as An, useMemo as Ce } from "react";
5
- import { d as En } from "./editor-action-buttons-F4_UU-Mk.js";
6
- import { createPortal as Wi } from "react-dom";
5
+ import { C as Wi, d as En } from "./editor-action-buttons-MtNYw1Bb.js";
6
+ import { createPortal as Qi } from "react-dom";
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 Qi = me("ArrowDownAZ", [
13
+ const Xi = me("ArrowDownAZ", [
14
14
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
15
15
  ["path", { d: "M7 20V4", key: "1yoxec" }],
16
16
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
@@ -23,7 +23,7 @@ const Qi = me("ArrowDownAZ", [
23
23
  * This source code is licensed under the ISC license.
24
24
  * See the LICENSE file in the root directory of this source tree.
25
25
  */
26
- const Xi = me("ArrowUpAZ", [
26
+ const Zi = me("ArrowUpAZ", [
27
27
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
28
28
  ["path", { d: "M7 4v16", key: "1glfcx" }],
29
29
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
@@ -52,7 +52,7 @@ const Ys = me("Blocks", [
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
54
  */
55
- const Zi = me("BookOpenText", [
55
+ const eo = me("BookOpenText", [
56
56
  ["path", { d: "M12 7v14", key: "1akyts" }],
57
57
  ["path", { d: "M16 12h2", key: "7q9ll5" }],
58
58
  ["path", { d: "M16 8h2", key: "msurwy" }],
@@ -66,17 +66,6 @@ const Zi = me("BookOpenText", [
66
66
  ["path", { d: "M6 12h2", key: "32wvfc" }],
67
67
  ["path", { d: "M6 8h2", key: "30oboj" }]
68
68
  ]);
69
- /**
70
- * @license lucide-react v0.453.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */
75
- const eo = me("CircleX", [
76
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
77
- ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
78
- ["path", { d: "m9 9 6 6", key: "z0biqf" }]
79
- ]);
80
69
  /**
81
70
  * @license lucide-react v0.453.0 - ISC
82
71
  *
@@ -2156,7 +2145,7 @@ function sl({
2156
2145
  size: "sm",
2157
2146
  className: "h-6 w-6 p-0",
2158
2147
  onClick: () => i(!1),
2159
- children: /* @__PURE__ */ e(eo, { className: "h-4 w-4" })
2148
+ children: /* @__PURE__ */ e(Wi, { className: "h-4 w-4" })
2160
2149
  }
2161
2150
  )
2162
2151
  ] }),
@@ -4063,7 +4052,7 @@ function ls({
4063
4052
  children: [
4064
4053
  i && /* @__PURE__ */ a("div", { className: "flex grow items-center", children: [
4065
4054
  /* @__PURE__ */ e(ol, {}),
4066
- d && /* @__PURE__ */ e(Oe, { tooltip: "Visual Docs", onClick: D, children: /* @__PURE__ */ e(Zi, { className: "size-4" }) }),
4055
+ d && /* @__PURE__ */ e(Oe, { tooltip: "Visual Docs", onClick: D, children: /* @__PURE__ */ e(eo, { className: "size-4" }) }),
4067
4056
  !["table", "custom"].includes(n.type) && d && /* @__PURE__ */ e(jo, {})
4068
4057
  ] }),
4069
4058
  !i && /* @__PURE__ */ a("div", { className: "flex grow items-center gap-1", children: [
@@ -10811,7 +10800,7 @@ function ps({
10811
10800
  ]
10812
10801
  }
10813
10802
  );
10814
- return b && n ? Wi(
10803
+ return b && n ? Qi(
10815
10804
  /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute inset-0 z-50 flex bg-background px-6 pb-6 pt-[calc(var(--app-header-height,15px)+1rem)]", children: /* @__PURE__ */ e("div", { className: "flex h-full w-full", children: vt }) }),
10816
10805
  n
10817
10806
  ) : vt;
@@ -15313,11 +15302,11 @@ function cu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
15313
15302
  ] }),
15314
15303
  /* @__PURE__ */ e(Bt, {}),
15315
15304
  /* @__PURE__ */ a(Be, { onClick: O, children: [
15316
- /* @__PURE__ */ e(Xi, { className: "mr-2 h-4 w-4" }),
15305
+ /* @__PURE__ */ e(Zi, { className: "mr-2 h-4 w-4" }),
15317
15306
  "Sort A → Z"
15318
15307
  ] }),
15319
15308
  /* @__PURE__ */ a(Be, { onClick: V, children: [
15320
- /* @__PURE__ */ e(Qi, { className: "mr-2 h-4 w-4" }),
15309
+ /* @__PURE__ */ e(Xi, { className: "mr-2 h-4 w-4" }),
15321
15310
  "Sort Z → A"
15322
15311
  ] }),
15323
15312
  /* @__PURE__ */ e(Bt, {}),
@@ -0,0 +1,11 @@
1
+ "use strict";const e=require("./index-CfPKTeUk.js"),s=require("react/jsx-runtime"),v=require("./use-visual-utils-DPEHcmFT.js"),f=require("react");/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const g=e.createLucideIcon("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const E=e.createLucideIcon("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);function b({className:d,variant:c="outline"}){var m;const{setCardSql:i}=e.useEditorActions();e.useEditorStore(t=>t.frame);const u=e.useEditorStore(t=>t.card);v.useRemoteChartStore(((m=u.customCardPreferences)==null?void 0:m.url)||""),e.useEditorStore(t=>t.selectedSchemaName),e.useEditorStore(t=>t.selectedDatamodelId),e.useEditorStore(t=>t.selectedDatabaseName),e.useEditorStore(t=>t.selectedTableName),e.useEditorStore(t=>t.selectedConnectionId),e.useEditorStore(t=>t.isShowingVisual),u.sql;const a=e.useEditorStore(t=>t.onSave),{getUpdatedFrame:o}=v.useVisualUtils();function l(){const t=o();a==null||a(t)}return s.jsxs(e.Button,{onClick:l,className:e.cn("h-8",d),size:"sm",variant:c,children:[s.jsx(e.Check,{className:"mr-2 size-4 font-bold"}),"Accept"]})}function x({className:d,variant:c="default"}){const i=e.useQueryClient(),[u,a]=f.useState(!1),o=e.useDashboardStore(n=>n.actions.setIsDashboardPanelOpen),{setIsVisualEditing:l}=e.useDashboardActions(),{getUpdatedFrame:m}=v.useVisualUtils(),t=e.useSelectedVisual(),r=e.useEditorStore(n=>n.frame),p=e.useUpdateVisualMutation(),S=()=>{const n=m(),y=(r==null?void 0:r.visualId)||(t==null?void 0:t.id);if(!y){e.ue.error("No visual to save");return}a(!0),p.mutate({visualId:y,data:{frameObject:n}},{onSuccess:()=>{a(!1),o(!0),e.ue.success("Visual updated successfully"),i.invalidateQueries({queryKey:["resource-by-id","visual",y],exact:!0})},onError:()=>{a(!1),e.ue.error("Failed to update visual")}})};return s.jsxs(e.Button,{onClick:S,className:e.cn("h-8",d),size:"sm",variant:c,children:[u&&s.jsxs(s.Fragment,{children:[s.jsx(e.LoaderCircle,{className:"mr-2 size-4 animate-spin font-bold"})," Saving"]}),!u&&s.jsxs(s.Fragment,{children:[s.jsx(E,{className:"mr-2 size-4 font-bold"}),"Save to Library"]})]})}function A({className:d}){const c=e.useQueryClient(),[i,u]=f.useState(!1),a=e.useSelectedVisual(),o=e.useEditorStore(n=>n.frame),l=e.useDashboardStore(n=>n.selectedSheetId),{updateFrame:m,setIsVisualEditing:t}=e.useDashboardActions(),{getUpdatedFrame:r}=v.useVisualUtils(),p=e.useUpdateVisualMutation(),S=async()=>{if(!l){e.ue.error("No sheet selected");return}const n=(o==null?void 0:o.visualId)||(a==null?void 0:a.id);if(!n){e.ue.error("No visual to update");return}u(!0);try{const y=r();await p.mutateAsync({visualId:n,data:{frameObject:y}});const C={...y,visualId:n};m(l,C),c.invalidateQueries({queryKey:["visuals"]}),c.invalidateQueries({queryKey:["visual",n]}),e.ue.success("Saved to library and applied locally"),setTimeout(()=>{t(!1)},300)}catch(y){console.error("Failed to save and apply:",y),e.ue.error("Failed to save and apply changes")}finally{u(!1)}};return s.jsx(e.Button,{onClick:S,className:e.cn("h-8",d),size:"sm",variant:"default",disabled:i,children:i?s.jsxs(s.Fragment,{children:[s.jsx(e.LoaderCircle,{className:"mr-2 size-4 animate-spin font-bold"})," Saving..."]}):s.jsxs(s.Fragment,{children:[s.jsx(E,{className:"mr-2 size-4 font-bold"}),"Save & Apply"]})})}function j({className:d}){const{getUpdatedFrame:c}=v.useVisualUtils();e.useEditorStore(t=>t.frame);const i=e.useDashboardStore(t=>t.selectedSheetId),{updateFrame:u,setIsVisualEditing:a}=e.useDashboardActions(),[o,l]=f.useState(!1),m=()=>{if(!i){e.ue.error("No sheet selected");return}l(!0);const r={...c(),visualId:void 0};u(i,r),setTimeout(()=>{l(!1),e.ue.success("Changes applied. Visual is now local to this dashboard"),a(!1)},300)};return s.jsxs(e.Button,{onClick:m,className:e.cn("h-8",d),size:"sm",variant:"outline",children:[o&&s.jsxs(s.Fragment,{children:[s.jsx(e.LoaderCircle,{className:"mr-2 size-4 animate-spin font-bold"})," Applying"]}),!o&&s.jsxs(s.Fragment,{children:[s.jsx(e.Check,{className:"mr-2 size-4 font-bold"}),"Apply Locally"]})]})}function q({className:d}){const{setTempQueryData:c,setSqlGen:i}=e.useEditorActions(),u=e.useQueryClient(),a=e.useEditorStore(r=>r.tempQueryData),o=e.useEditorStore(r=>r.onClose),l=e.useEditorStore(r=>r.card),{queryKey:m}=e.useDashboardCardQuery(l);function t(){if(a){const{queryKey:r,queryData:p}=a;r&&p&&u.setQueryData(r,p)}i({}),o==null||o()}return s.jsxs(e.Button,{onClick:t,className:e.cn("h-8",d),size:"sm",variant:"outline",children:[s.jsx(e.X,{className:"mr-2 size-4"}),"Close"]})}function D(){const{setTempQueryData:d}=e.useEditorActions(),c=e.useQueryClient();e.useEditorStore(h=>h.isDevMode);const i=e.useEditorStore(h=>h.tempQueryData),u=e.useEditorStore(h=>h.card),{queryKey:a}=e.useDashboardCardQuery(u),{setCardSql:o,setSqlGen:l,setCardPython:m,setCardCustomCfg:t,setCardPreferences:r,updateDataSource:p,clearQueryConfig:S,setCardConfig:n,setCardType:y}=e.useEditorActions();function C(){const h=c.getQueryData(a);i!=null&&i.queryData||d({queryKey:a,queryData:h}),c.setQueryData(a,null),c.removeQueries({queryKey:a,exact:!0}),o(""),l({}),S(),n(void 0),m(""),t(""),r({}),y("bar")}return s.jsxs(e.Button,{onClick:C,className:"h-8",size:"sm",variant:"secondary",children:[s.jsx(e.X,{className:"mr-2 size-3.5"}),"Clear"]})}exports.CircleX=g;exports.EditorAcceptButton=b;exports.EditorCancelButton=q;exports.EditorClearButton=D;exports.Save=E;exports.VisualApplyLocalButton=j;exports.VisualSaveAndApplyButton=A;exports.VisualSaveButton=x;
@@ -1,6 +1,6 @@
1
+ import { aF as Q, av as b, au as t, B as S, c as g, z as k, u as A, as as D, aG as F, aH as I, aI as E, aJ as B, aK as K, X as L, aL as h } from "./index-CAeKp6K8.js";
1
2
  import { jsxs as u, jsx as y, Fragment as C } from "react/jsx-runtime";
2
- import { l as K, m as b, n as t, B as S, c as g, C as Q, u as D, o as F, L as z, p as I, q as k, r as E, s as B, X as L, t as h } from "./index-v6ayK5K2.js";
3
- import { u as M, a as N } from "./use-visual-utils-D9lMGeVv.js";
3
+ import { u as M, a as N } from "./use-visual-utils-D3HjbsKO.js";
4
4
  import { useState as V } from "react";
5
5
  /**
6
6
  * @license lucide-react v0.453.0 - ISC
@@ -8,7 +8,18 @@ import { useState as V } from "react";
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const U = K("Save", [
11
+ const O = Q("CircleX", [
12
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
13
+ ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
14
+ ["path", { d: "m9 9 6 6", key: "z0biqf" }]
15
+ ]);
16
+ /**
17
+ * @license lucide-react v0.453.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */
22
+ const U = Q("Save", [
12
23
  [
13
24
  "path",
14
25
  {
@@ -19,9 +30,9 @@ const U = K("Save", [
19
30
  ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
20
31
  ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
21
32
  ]);
22
- function O({
33
+ function w({
23
34
  className: d,
24
- variant: i = "outline"
35
+ variant: c = "outline"
25
36
  }) {
26
37
  var m;
27
38
  const { setCardSql: o } = b();
@@ -39,31 +50,31 @@ function O({
39
50
  (e) => e.selectedConnectionId
40
51
  ), t((e) => e.isShowingVisual), l.sql;
41
52
  const a = t((e) => e.onSave), { getUpdatedFrame: n } = N();
42
- function c() {
53
+ function i() {
43
54
  const e = n();
44
55
  a == null || a(e);
45
56
  }
46
57
  return /* @__PURE__ */ u(
47
58
  S,
48
59
  {
49
- onClick: c,
60
+ onClick: i,
50
61
  className: g("h-8", d),
51
62
  size: "sm",
52
- variant: i,
63
+ variant: c,
53
64
  children: [
54
- /* @__PURE__ */ y(Q, { className: "mr-2 size-4 font-bold" }),
65
+ /* @__PURE__ */ y(k, { className: "mr-2 size-4 font-bold" }),
55
66
  "Accept"
56
67
  ]
57
68
  }
58
69
  );
59
70
  }
60
- function w({
71
+ function G({
61
72
  className: d,
62
- variant: i = "default"
73
+ variant: c = "default"
63
74
  }) {
64
- const o = I(), [l, a] = V(!1), n = D(
75
+ const o = I(), [l, a] = V(!1), n = A(
65
76
  (r) => r.actions.setIsDashboardPanelOpen
66
- ), { setIsVisualEditing: c } = F(), { getUpdatedFrame: m } = N(), e = k(), s = t((r) => r.frame), f = E();
77
+ ), { setIsVisualEditing: i } = D(), { getUpdatedFrame: m } = N(), e = E(), s = t((r) => r.frame), f = B();
67
78
  return /* @__PURE__ */ u(
68
79
  S,
69
80
  {
@@ -95,10 +106,10 @@ function w({
95
106
  },
96
107
  className: g("h-8", d),
97
108
  size: "sm",
98
- variant: i,
109
+ variant: c,
99
110
  children: [
100
111
  l && /* @__PURE__ */ u(C, { children: [
101
- /* @__PURE__ */ y(z, { className: "mr-2 size-4 animate-spin font-bold" }),
112
+ /* @__PURE__ */ y(F, { className: "mr-2 size-4 animate-spin font-bold" }),
102
113
  " Saving"
103
114
  ] }),
104
115
  !l && /* @__PURE__ */ u(C, { children: [
@@ -109,15 +120,15 @@ function w({
109
120
  }
110
121
  );
111
122
  }
112
- function G({
123
+ function H({
113
124
  className: d
114
125
  }) {
115
- const i = I(), [o, l] = V(!1), a = k(), n = t((r) => r.frame), c = D((r) => r.selectedSheetId), { updateFrame: m, setIsVisualEditing: e } = F(), { getUpdatedFrame: s } = N(), f = E();
126
+ const c = I(), [o, l] = V(!1), a = E(), n = t((r) => r.frame), i = A((r) => r.selectedSheetId), { updateFrame: m, setIsVisualEditing: e } = D(), { getUpdatedFrame: s } = N(), f = B();
116
127
  return /* @__PURE__ */ y(
117
128
  S,
118
129
  {
119
130
  onClick: async () => {
120
- if (!c) {
131
+ if (!i) {
121
132
  h.error("No sheet selected");
122
133
  return;
123
134
  }
@@ -135,12 +146,12 @@ function G({
135
146
  frameObject: p
136
147
  }
137
148
  });
138
- const A = {
149
+ const z = {
139
150
  ...p,
140
151
  visualId: r
141
152
  // Keep the link to library visual
142
153
  };
143
- m(c, A), i.invalidateQueries({ queryKey: ["visuals"] }), i.invalidateQueries({ queryKey: ["visual", r] }), h.success("Saved to library and applied locally"), setTimeout(() => {
154
+ m(i, z), c.invalidateQueries({ queryKey: ["visuals"] }), c.invalidateQueries({ queryKey: ["visual", r] }), h.success("Saved to library and applied locally"), setTimeout(() => {
144
155
  e(!1);
145
156
  }, 300);
146
157
  } catch (p) {
@@ -154,7 +165,7 @@ function G({
154
165
  variant: "default",
155
166
  disabled: o,
156
167
  children: o ? /* @__PURE__ */ u(C, { children: [
157
- /* @__PURE__ */ y(z, { className: "mr-2 size-4 animate-spin font-bold" }),
168
+ /* @__PURE__ */ y(F, { className: "mr-2 size-4 animate-spin font-bold" }),
158
169
  " Saving..."
159
170
  ] }) : /* @__PURE__ */ u(C, { children: [
160
171
  /* @__PURE__ */ y(U, { className: "mr-2 size-4 font-bold" }),
@@ -163,10 +174,10 @@ function G({
163
174
  }
164
175
  );
165
176
  }
166
- function H({ className: d }) {
167
- const { getUpdatedFrame: i } = N();
177
+ function X({ className: d }) {
178
+ const { getUpdatedFrame: c } = N();
168
179
  t((e) => e.frame);
169
- const o = D((e) => e.selectedSheetId), { updateFrame: l, setIsVisualEditing: a } = F(), [n, c] = V(!1);
180
+ const o = A((e) => e.selectedSheetId), { updateFrame: l, setIsVisualEditing: a } = D(), [n, i] = V(!1);
170
181
  return /* @__PURE__ */ u(
171
182
  S,
172
183
  {
@@ -175,14 +186,14 @@ function H({ className: d }) {
175
186
  h.error("No sheet selected");
176
187
  return;
177
188
  }
178
- c(!0);
189
+ i(!0);
179
190
  const s = {
180
- ...i(),
191
+ ...c(),
181
192
  visualId: void 0
182
193
  // Remove the link to library visual
183
194
  };
184
195
  l(o, s), setTimeout(() => {
185
- c(!1), h.success("Changes applied. Visual is now local to this dashboard"), a(!1);
196
+ i(!1), h.success("Changes applied. Visual is now local to this dashboard"), a(!1);
186
197
  }, 300);
187
198
  },
188
199
  className: g("h-8", d),
@@ -190,19 +201,19 @@ function H({ className: d }) {
190
201
  variant: "outline",
191
202
  children: [
192
203
  n && /* @__PURE__ */ u(C, { children: [
193
- /* @__PURE__ */ y(z, { className: "mr-2 size-4 animate-spin font-bold" }),
204
+ /* @__PURE__ */ y(F, { className: "mr-2 size-4 animate-spin font-bold" }),
194
205
  " Applying"
195
206
  ] }),
196
207
  !n && /* @__PURE__ */ u(C, { children: [
197
- /* @__PURE__ */ y(Q, { className: "mr-2 size-4 font-bold" }),
208
+ /* @__PURE__ */ y(k, { className: "mr-2 size-4 font-bold" }),
198
209
  "Apply Locally"
199
210
  ] })
200
211
  ]
201
212
  }
202
213
  );
203
214
  }
204
- function R({ className: d }) {
205
- const { setTempQueryData: i, setSqlGen: o } = b(), l = I(), a = t((s) => s.tempQueryData), n = t((s) => s.onClose), c = t((s) => s.card), { queryKey: m } = B(c);
215
+ function J({ className: d }) {
216
+ const { setTempQueryData: c, setSqlGen: o } = b(), l = I(), a = t((s) => s.tempQueryData), n = t((s) => s.onClose), i = t((s) => s.card), { queryKey: m } = K(i);
206
217
  function e() {
207
218
  if (a) {
208
219
  const { queryKey: s, queryData: f } = a;
@@ -224,12 +235,12 @@ function R({ className: d }) {
224
235
  }
225
236
  );
226
237
  }
227
- function X() {
228
- const { setTempQueryData: d } = b(), i = I();
238
+ function R() {
239
+ const { setTempQueryData: d } = b(), c = I();
229
240
  t((v) => v.isDevMode);
230
- const o = t((v) => v.tempQueryData), l = t((v) => v.card), { queryKey: a } = B(l), {
241
+ const o = t((v) => v.tempQueryData), l = t((v) => v.card), { queryKey: a } = K(l), {
231
242
  setCardSql: n,
232
- setSqlGen: c,
243
+ setSqlGen: i,
233
244
  setCardPython: m,
234
245
  setCardCustomCfg: e,
235
246
  setCardPreferences: s,
@@ -238,17 +249,17 @@ function X() {
238
249
  setCardConfig: r,
239
250
  setCardType: p
240
251
  } = b();
241
- function A() {
242
- const v = i.getQueryData(a);
252
+ function z() {
253
+ const v = c.getQueryData(a);
243
254
  o != null && o.queryData || d({
244
255
  queryKey: a,
245
256
  queryData: v
246
- }), i.setQueryData(a, null), i.removeQueries({ queryKey: a, exact: !0 }), n(""), c({}), q(), r(void 0), m(""), e(""), s({}), p("bar");
257
+ }), c.setQueryData(a, null), c.removeQueries({ queryKey: a, exact: !0 }), n(""), i({}), q(), r(void 0), m(""), e(""), s({}), p("bar");
247
258
  }
248
259
  return /* @__PURE__ */ u(
249
260
  S,
250
261
  {
251
- onClick: A,
262
+ onClick: z,
252
263
  className: "h-8",
253
264
  size: "sm",
254
265
  variant: "secondary",
@@ -260,11 +271,12 @@ function X() {
260
271
  );
261
272
  }
262
273
  export {
263
- O as E,
274
+ O as C,
275
+ w as E,
264
276
  U as S,
265
- H as V,
266
- w as a,
267
- G as b,
268
- R as c,
269
- X as d
277
+ X as V,
278
+ G as a,
279
+ H as b,
280
+ J as c,
281
+ R as d
270
282
  };