react-semaphor 0.1.120 → 0.1.121

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 (23) hide show
  1. package/dist/chunks/{dashboard-controls-B5XFI-ju.js → dashboard-controls-CyhTMpZ2.js} +3 -3
  2. package/dist/chunks/{dashboard-controls-DPZpVj3x.js → dashboard-controls-CzcAbxpr.js} +1 -1
  3. package/dist/chunks/{dashboard-json-B-mczKaU.js → dashboard-json-BQPFtG3z.js} +1 -1
  4. package/dist/chunks/{dashboard-json-CrCyQFFX.js → dashboard-json-BcB9WzEx.js} +1 -1
  5. package/dist/chunks/{edit-dashboard-visual-C4Y8Nrrb.js → edit-dashboard-visual-CLdMn0FN.js} +3 -3
  6. package/dist/chunks/{edit-dashboard-visual-DcHh-xOS.js → edit-dashboard-visual-D6KBQgRc.js} +1 -1
  7. package/dist/chunks/{editor-action-buttons-DPz-ne1B.js → editor-action-buttons-CEzZTeqn.js} +2 -2
  8. package/dist/chunks/{editor-action-buttons-Dz6D47bO.js → editor-action-buttons-D8lG5LwM.js} +1 -1
  9. package/dist/chunks/{index-D1TkQNmD.js → index-CJrseB0V.js} +2 -2
  10. package/dist/chunks/{index-BPICAMRJ.js → index-Cyic0UlN.js} +5 -5
  11. package/dist/chunks/{resource-management-panel-CNgGS6ct.js → resource-management-panel-BNDpfKQl.js} +1 -1
  12. package/dist/chunks/{resource-management-panel-CCv1oyai.js → resource-management-panel-DDLB-UWe.js} +2 -2
  13. package/dist/chunks/{schedule-dashboard-D7lKgd4M.js → schedule-dashboard-BEV7hj7t.js} +3 -3
  14. package/dist/chunks/{schedule-dashboard-BuBTC1B2.js → schedule-dashboard-CqFcuP5E.js} +1 -1
  15. package/dist/chunks/{use-visual-utils-BTHTcuQs.js → use-visual-utils-BzfETcB4.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-BAxIkIVN.js → use-visual-utils-GI2MN0MK.js} +1 -1
  17. package/dist/dashboard/index.cjs +1 -1
  18. package/dist/dashboard/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/surfboard/index.cjs +1 -1
  22. package/dist/surfboard/index.js +1 -1
  23. package/package.json +1 -1
@@ -39621,7 +39621,7 @@ function Fa(e) {
39621
39621
  isLoading: c,
39622
39622
  isError: u
39623
39623
  } = Nn({
39624
- queryKey: ["connections"],
39624
+ queryKey: [t.project_id, "connections"],
39625
39625
  queryFn: () => Gn(
39626
39626
  `${t.apiServiceUrl}/v1/connections`,
39627
39627
  (n == null ? void 0 : n.accessToken) || ""
@@ -113238,10 +113238,10 @@ function WQe() {
113238
113238
  }
113239
113239
  );
113240
113240
  }
113241
- const qQe = Yw(() => import("./dashboard-controls-B5XFI-ju.js")), YQe = Yw(
113242
- () => import("./edit-dashboard-visual-C4Y8Nrrb.js")
113243
- ), GQe = Yw(() => import("./dashboard-json-CrCyQFFX.js")), KQe = Yw(
113244
- () => import("./resource-management-panel-CCv1oyai.js").then(
113241
+ const qQe = Yw(() => import("./dashboard-controls-CyhTMpZ2.js")), YQe = Yw(
113242
+ () => import("./edit-dashboard-visual-CLdMn0FN.js")
113243
+ ), GQe = Yw(() => import("./dashboard-json-BcB9WzEx.js")), KQe = Yw(
113244
+ () => import("./resource-management-panel-DDLB-UWe.js").then(
113245
113245
  (e) => ({ default: e.ResourceManagementPanel })
113246
113246
  )
113247
113247
  );
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-D1TkQNmD.js"),m=require("react"),re=require("./use-visual-utils-BTHTcuQs.js"),ue=require("./use-click-outside-B9T3lmcw.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-CJrseB0V.js"),m=require("react"),re=require("./use-visual-utils-BzfETcB4.js"),ue=require("./use-click-outside-B9T3lmcw.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as a, Fragment as me } from "react/jsx-runtime";
2
- import { b as We, u as de, f as Ye, ak as ne, aM as qe, aN as Je, c as ee, aO as Qe, aC as Xe, aD as Ze, B as K, aE as $e, aF as ke, aG as J, aP as ce, L as ie, aQ as et, aR as tt, aS as st, aT as Ne, aU as pe, aV as at, aW as nt, I as it, aX as Ce, aY as re, aZ as be, a_ as ye, a$ as rt, J as ve, R as Se, b0 as Ve, b1 as Ee, b2 as Le, b3 as Te, b4 as Ae, b5 as Oe, b6 as Pe, b7 as Re, b8 as Ue, b9 as ot, ba as lt, bb as Ie, bc as je, bd as Me, be as dt, bf as Fe, bg as ct, aA as ae, aj as ut, bh as ht, bi as ze, bj as mt, bk as pt, ao as ft, ap as gt, aq as Dt, ar as xt, as as Nt, at as we, au as ue, ax as wt, bl as Ct, bm as bt, bn as yt, bo as vt } from "./index-BPICAMRJ.js";
2
+ import { b as We, u as de, f as Ye, ak as ne, aM as qe, aN as Je, c as ee, aO as Qe, aC as Xe, aD as Ze, B as K, aE as $e, aF as ke, aG as J, aP as ce, L as ie, aQ as et, aR as tt, aS as st, aT as Ne, aU as pe, aV as at, aW as nt, I as it, aX as Ce, aY as re, aZ as be, a_ as ye, a$ as rt, J as ve, R as Se, b0 as Ve, b1 as Ee, b2 as Le, b3 as Te, b4 as Ae, b5 as Oe, b6 as Pe, b7 as Re, b8 as Ue, b9 as ot, ba as lt, bb as Ie, bc as je, bd as Me, be as dt, bf as Fe, bg as ct, aA as ae, aj as ut, bh as ht, bi as ze, bj as mt, bk as pt, ao as ft, ap as gt, aq as Dt, ar as xt, as as Nt, at as we, au as ue, ax as wt, bl as Ct, bm as bt, bn as yt, bo as vt } from "./index-Cyic0UlN.js";
3
3
  import St, { useState as g, useEffect as he } from "react";
4
- import { a as Be } from "./use-visual-utils-BAxIkIVN.js";
4
+ import { a as Be } from "./use-visual-utils-GI2MN0MK.js";
5
5
  import { u as Vt } from "./use-click-outside-CMeO_QFI.js";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as r, Fragment as E } from "react/jsx-runtime";
2
- import { b as W, ao as _, ap as $, aq as G, ar as J, as as K, at as M, au as R, av as X, aw as T, ax as Q, B as k, L as Y, f as N, i as Z, u as g, ak as ee, g as q, ay as ae, az as B, l as w, aA as se, aB as te, c as y, aC as O, aD as P, aE as L, aF as z, aG as j, e as ne, aH as de, aI as le, aJ as re, I as ie, aK as oe, aL as ce } from "./index-BPICAMRJ.js";
3
- import { E as he, V as ue, a as me, b as ve, S as U, c as pe } from "./editor-action-buttons-DPz-ne1B.js";
2
+ import { b as W, ao as _, ap as $, aq as G, ar as J, as as K, at as M, au as R, av as X, aw as T, ax as Q, B as k, L as Y, f as N, i as Z, u as g, ak as ee, g as q, ay as ae, az as B, l as w, aA as se, aB as te, c as y, aC as O, aD as P, aE as L, aF as z, aG as j, e as ne, aH as de, aI as le, aJ as re, I as ie, aK as oe, aL as ce } from "./index-Cyic0UlN.js";
3
+ import { E as he, V as ue, a as me, b as ve, S as U, c as pe } from "./editor-action-buttons-CEzZTeqn.js";
4
4
  import fe, { useState as C, useContext as be } from "react";
5
- import { a as H } from "./use-visual-utils-BAxIkIVN.js";
5
+ import { a as H } from "./use-visual-utils-GI2MN0MK.js";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
8
8
  *
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("react/jsx-runtime"),e=require("./index-D1TkQNmD.js"),f=require("./editor-action-buttons-Dz6D47bO.js"),p=require("react"),y=require("./use-visual-utils-BTHTcuQs.js");/**
1
+ "use strict";const s=require("react/jsx-runtime"),e=require("./index-CJrseB0V.js"),f=require("./editor-action-buttons-D8lG5LwM.js"),p=require("react"),y=require("./use-visual-utils-BzfETcB4.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- "use strict";const o=require("./index-D1TkQNmD.js"),b=require("react");function _(e){const a=e.toUpperCase().indexOf("WHERE"),r=e.toUpperCase().indexOf("GROUP BY"),t=e.toUpperCase().indexOf("LIMIT"),d=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(d!==-1&&(c=d),t!==-1&&t<c&&(c=t),a!==-1){const n=e.substring(0,a),s=e.substring(a);return`${n} {{ filters | where }} AND ${s.substring(6)}`}else if(r!==-1){const n=e.substring(0,r),s=e.substring(r);return`${n} {{ filters | where }} ${s}`}else{const n=e.substring(0,c),s=e.substring(c);return console.log("beforeClause",n),console.log("afterClause",s),s?`${n} {{ filters | where }} ${s}`:`${n.replace(/;$/,"")} {{ filters | where }}`}}function B(e){const[a,r]=b.useState(null),[t,d]=b.useState(null),c=o.useEnsureReactGlobals();return b.useEffect(()=>{if(!e||e.trim()===""){r(null),d(null);return}if(!c)return;(async()=>{try{if(!e.startsWith("http://")&&!e.startsWith("https://"))throw new Error(`Invalid URL format: ${e}`);try{new URL(e)}catch{throw new Error(`Invalid URL: ${e}`)}const l=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(l,{method:"HEAD"})).ok)throw new Error(`Module not found at ${l}`)}catch{}const m=await import(l);if(typeof m.useChartStore!="function")throw new Error("useChartStore is not a function");r(()=>m.useChartStore),d(null)}catch(s){const l=s instanceof Error?s.message:"Unknown error";console.error("Failed to load remote chart store:",l),d(l),r(null)}})()},[e,c]),a}function H(e,a){if(e.length===0)return"";if(a){const r=e.find(t=>t.id===a);if(r){const t=r.tabTitle;if(t=="All__Header")return e[0].id;if(t&&t.endsWith("__Header")){const c=t.split("__")[0],n=e.find(s=>s.tabTitle===c);return n?n.id:e[0].id}return a}}return e[0].id}async function j(e,a,r,t){if(!a||!r)throw new Error("Missing auth token or visual ID");const d=["resource-by-id","visual",r],c=t.getQueryData(d);if(c)return console.log("Using cached visual data for:",r),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",r);const n=o.ue.loading("Loading visual...",{position:"top-center"});try{const s=await fetch(`${e}/management/v1/visuals/${r}`,{headers:{Authorization:`Bearer ${a}`}});if(!s.ok)throw new Error("Failed to load visual");const l=await s.json();return t.setQueryData(d,l),o.ue.dismiss(n),{data:l,fromCache:!1}}catch(s){throw o.ue.dismiss(n),s}}function T(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function Q(e,a){var c,n;const r=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!r)return!1;const t=T(r);if(!(t!=null&&t.cards)||t.cards.length===0)return!1;const d=(n=t.cards)==null?void 0:n.find(s=>s.id===t.activeCardId);return d?(o.setupEditorWithCard({...a,frame:t,card:d,visualId:(e==null?void 0:e.id)||t.visualId}),!0):!1}function G(){var g;const{setCardSql:e}=o.useEditorActions(),a=o.useEditorStore(i=>i.frame),r=o.useEditorStore(i=>i.card),t=B(((g=r.customCardPreferences)==null?void 0:g.url)||""),d=o.useEditorStore(i=>i.selectedSchemaName),c=o.useEditorStore(i=>i.selectedDatamodelId),n=o.useEditorStore(i=>i.selectedDatabaseName),s=o.useEditorStore(i=>i.selectedTableName),l=o.useEditorStore(i=>i.selectedConnectionId),m=o.useEditorStore(i=>i.isShowingVisual),f=r.sql;return{getUpdatedFrame:b.useCallback(()=>{var E;let i=f;f&&!f.includes("{{")&&(i=_(f),e(i));const C=(E=t==null?void 0:t.getState())==null?void 0:E.settings,U={...r,dataSource:r.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:c,lastSelectedDatabase:n,lastSelectedTable:s,connectionId:l,sql:i,customCfg:m?r.customCfg:null,preferences:r.preferences,...C&&{customCardPreferences:{...r.customCardPreferences,settings:C}}},w=a.cards.map(S=>S.id===r.id?U:S);return{...a,cards:w,activeCardId:H(w,a.activeCardId)}},[r,a,m,d,c,n,s,l,e,t,f])}}function z(){const{authToken:e,tokenProps:a}=o.useSemaphorContext(),r=o.useQueryClient(),t=o.useSelectedVisual(),{selectVisual:d}=o.useManagementActions(),{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E}=o.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:$,setSelectedFrameId:v,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=o.useDashboardActions(),I=o.useDashboardStore(u=>u.selectedSheetId),D=o.useDashboardStore(u=>u.selectedFrameId),O=o.useDashboardStore(u=>u.dashboard),x=o.useDashboardStore(u=>u.filterValues),y=o.useVisualById((t==null?void 0:t.id)||"",{enabled:!!(t!=null&&t.id)&&!!(e!=null&&e.accessToken)}),M=b.useCallback(async u=>{try{d(u),A();const{data:p,fromCache:h}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r);if(!Q(p,{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E,setIsDashboardEditing:S,setIsVisualEditing:$,dashboard:O,selectedSheetId:I,selectedFrameId:D,filterValues:x}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:h}}catch(p){return console.error("Error editing visual:",p),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,c,n,S,$,s,l,m,f,V,g,i,C,U,w,E,A,O,I,D,x]),k=b.useCallback(async u=>{var p;try{if(d(u),!I)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:h,fromCache:W}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r),L=(h==null?void 0:h.frameObject)??((p=h==null?void 0:h.visual)==null?void 0:p.frameObject);if(!L)return{success:!1,error:"Visual has no frame data"};const F=T(L);if(!(F!=null&&F.cards)||F.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const P={...o.cloneFrameWithNewIds(F),visualId:u.id};return N(I,P,"end"),S(!0),v(P.id),R(!1),{success:!0,fromCache:W}}catch(h){return console.error("Error adding visual:",h),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,I,N,S,v,R]);return{visual:y.data,isLoading:y.isLoading,isError:y.isError,error:y.error,handleEditLibraryVisual:M,handleAddLibraryVisual:k,getUpdatedFrame:G().getUpdatedFrame,refetch:y.refetch}}exports.useRemoteChartStore=B;exports.useVisualUtils=z;
1
+ "use strict";const o=require("./index-CJrseB0V.js"),b=require("react");function _(e){const a=e.toUpperCase().indexOf("WHERE"),r=e.toUpperCase().indexOf("GROUP BY"),t=e.toUpperCase().indexOf("LIMIT"),d=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(d!==-1&&(c=d),t!==-1&&t<c&&(c=t),a!==-1){const n=e.substring(0,a),s=e.substring(a);return`${n} {{ filters | where }} AND ${s.substring(6)}`}else if(r!==-1){const n=e.substring(0,r),s=e.substring(r);return`${n} {{ filters | where }} ${s}`}else{const n=e.substring(0,c),s=e.substring(c);return console.log("beforeClause",n),console.log("afterClause",s),s?`${n} {{ filters | where }} ${s}`:`${n.replace(/;$/,"")} {{ filters | where }}`}}function B(e){const[a,r]=b.useState(null),[t,d]=b.useState(null),c=o.useEnsureReactGlobals();return b.useEffect(()=>{if(!e||e.trim()===""){r(null),d(null);return}if(!c)return;(async()=>{try{if(!e.startsWith("http://")&&!e.startsWith("https://"))throw new Error(`Invalid URL format: ${e}`);try{new URL(e)}catch{throw new Error(`Invalid URL: ${e}`)}const l=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(l,{method:"HEAD"})).ok)throw new Error(`Module not found at ${l}`)}catch{}const m=await import(l);if(typeof m.useChartStore!="function")throw new Error("useChartStore is not a function");r(()=>m.useChartStore),d(null)}catch(s){const l=s instanceof Error?s.message:"Unknown error";console.error("Failed to load remote chart store:",l),d(l),r(null)}})()},[e,c]),a}function H(e,a){if(e.length===0)return"";if(a){const r=e.find(t=>t.id===a);if(r){const t=r.tabTitle;if(t=="All__Header")return e[0].id;if(t&&t.endsWith("__Header")){const c=t.split("__")[0],n=e.find(s=>s.tabTitle===c);return n?n.id:e[0].id}return a}}return e[0].id}async function j(e,a,r,t){if(!a||!r)throw new Error("Missing auth token or visual ID");const d=["resource-by-id","visual",r],c=t.getQueryData(d);if(c)return console.log("Using cached visual data for:",r),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",r);const n=o.ue.loading("Loading visual...",{position:"top-center"});try{const s=await fetch(`${e}/management/v1/visuals/${r}`,{headers:{Authorization:`Bearer ${a}`}});if(!s.ok)throw new Error("Failed to load visual");const l=await s.json();return t.setQueryData(d,l),o.ue.dismiss(n),{data:l,fromCache:!1}}catch(s){throw o.ue.dismiss(n),s}}function T(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function Q(e,a){var c,n;const r=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!r)return!1;const t=T(r);if(!(t!=null&&t.cards)||t.cards.length===0)return!1;const d=(n=t.cards)==null?void 0:n.find(s=>s.id===t.activeCardId);return d?(o.setupEditorWithCard({...a,frame:t,card:d,visualId:(e==null?void 0:e.id)||t.visualId}),!0):!1}function G(){var g;const{setCardSql:e}=o.useEditorActions(),a=o.useEditorStore(i=>i.frame),r=o.useEditorStore(i=>i.card),t=B(((g=r.customCardPreferences)==null?void 0:g.url)||""),d=o.useEditorStore(i=>i.selectedSchemaName),c=o.useEditorStore(i=>i.selectedDatamodelId),n=o.useEditorStore(i=>i.selectedDatabaseName),s=o.useEditorStore(i=>i.selectedTableName),l=o.useEditorStore(i=>i.selectedConnectionId),m=o.useEditorStore(i=>i.isShowingVisual),f=r.sql;return{getUpdatedFrame:b.useCallback(()=>{var E;let i=f;f&&!f.includes("{{")&&(i=_(f),e(i));const C=(E=t==null?void 0:t.getState())==null?void 0:E.settings,U={...r,dataSource:r.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:c,lastSelectedDatabase:n,lastSelectedTable:s,connectionId:l,sql:i,customCfg:m?r.customCfg:null,preferences:r.preferences,...C&&{customCardPreferences:{...r.customCardPreferences,settings:C}}},w=a.cards.map(S=>S.id===r.id?U:S);return{...a,cards:w,activeCardId:H(w,a.activeCardId)}},[r,a,m,d,c,n,s,l,e,t,f])}}function z(){const{authToken:e,tokenProps:a}=o.useSemaphorContext(),r=o.useQueryClient(),t=o.useSelectedVisual(),{selectVisual:d}=o.useManagementActions(),{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E}=o.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:$,setSelectedFrameId:v,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=o.useDashboardActions(),I=o.useDashboardStore(u=>u.selectedSheetId),D=o.useDashboardStore(u=>u.selectedFrameId),O=o.useDashboardStore(u=>u.dashboard),x=o.useDashboardStore(u=>u.filterValues),y=o.useVisualById((t==null?void 0:t.id)||"",{enabled:!!(t!=null&&t.id)&&!!(e!=null&&e.accessToken)}),M=b.useCallback(async u=>{try{d(u),A();const{data:p,fromCache:h}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r);if(!Q(p,{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E,setIsDashboardEditing:S,setIsVisualEditing:$,dashboard:O,selectedSheetId:I,selectedFrameId:D,filterValues:x}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:h}}catch(p){return console.error("Error editing visual:",p),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,c,n,S,$,s,l,m,f,V,g,i,C,U,w,E,A,O,I,D,x]),k=b.useCallback(async u=>{var p;try{if(d(u),!I)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:h,fromCache:W}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r),L=(h==null?void 0:h.frameObject)??((p=h==null?void 0:h.visual)==null?void 0:p.frameObject);if(!L)return{success:!1,error:"Visual has no frame data"};const F=T(L);if(!(F!=null&&F.cards)||F.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const P={...o.cloneFrameWithNewIds(F),visualId:u.id};return N(I,P,"end"),S(!0),v(P.id),R(!1),{success:!0,fromCache:W}}catch(h){return console.error("Error adding visual:",h),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,I,N,S,v,R]);return{visual:y.data,isLoading:y.isLoading,isError:y.isError,error:y.error,handleEditLibraryVisual:M,handleAddLibraryVisual:k,getUpdatedFrame:G().getUpdatedFrame,refetch:y.refetch}}exports.useRemoteChartStore=B;exports.useVisualUtils=z;
@@ -1,4 +1,4 @@
1
- import { ai as G, aj as z, h as Y, i as J, ak as K, e as _, g as X, u as U, al as Z, am as q, l as v, an as ee, f as h } from "./index-BPICAMRJ.js";
1
+ import { ai as G, aj as z, h as Y, i as J, ak as K, e as _, g as X, u as U, al as Z, am as q, l as v, an as ee, f as h } from "./index-Cyic0UlN.js";
2
2
  import { useState as T, useEffect as te, useCallback as V } from "react";
3
3
  function re(e) {
4
4
  const o = e.toUpperCase().indexOf("WHERE"), r = e.toUpperCase().indexOf("GROUP BY"), t = e.toUpperCase().indexOf("LIMIT"), i = e.toUpperCase().indexOf("ORDER BY");
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-D1TkQNmD.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-CJrseB0V.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index-BPICAMRJ.js";
1
+ import { D as a } from "../chunks/index-Cyic0UlN.js";
2
2
  import { EMPTY_SELECTION as e } from "../types/index.js";
3
3
  export {
4
4
  a as Dashboard,
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-D1TkQNmD.js"),j=require("./types/index.cjs"),a=require("react/jsx-runtime"),g=require("react"),E=require("./chunks/resource-management-panel-CNgGS6ct.js"),h=require("./chunks/schedule-dashboard-BuBTC1B2.js");require("react-dom");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=N(g);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-CJrseB0V.js"),j=require("./types/index.cjs"),a=require("react/jsx-runtime"),g=require("react"),E=require("./chunks/resource-management-panel-BNDpfKQl.js"),h=require("./chunks/schedule-dashboard-CqFcuP5E.js");require("react-dom");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=N(g);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { b as S, E as D, F as w, S as P, U as M, m as k, n as A, u as F, o as b, p as L, P as R, q as I, B as V, c as v, r as _, s as W, t as B, v as q, I as H, w as O, x as j, y as z, z as G, C as Q } from "./chunks/index-BPICAMRJ.js";
2
- import { T as oa, V as ta, D as na, M as ia, _ as la, R as da, H as ca, H as ua, J as ha, a as pa, ah as fa, a5 as ma, O as Ca, $ as va, a7 as ga, a6 as ya, aa as ba, ab as Da, a4 as xa, N as Ea, a3 as Na, Y as Ta, Z as Sa, W as wa, a8 as Pa, a2 as Ma, a1 as ka, a0 as Aa, ac as Fa, a9 as La, K as Ra, ae as Ia, ag as Va, af as _a, g as Wa, Q as Ba, A as qa, e as Ha, ad as Oa, f as ja, G as za } from "./chunks/index-BPICAMRJ.js";
1
+ import { b as S, E as D, F as w, S as P, U as M, m as k, n as A, u as F, o as b, p as L, P as R, q as I, B as V, c as v, r as _, s as W, t as B, v as q, I as H, w as O, x as j, y as z, z as G, C as Q } from "./chunks/index-Cyic0UlN.js";
2
+ import { T as oa, V as ta, D as na, M as ia, _ as la, R as da, H as ca, H as ua, J as ha, a as pa, ah as fa, a5 as ma, O as Ca, $ as va, a7 as ga, a6 as ya, aa as ba, ab as Da, a4 as xa, N as Ea, a3 as Na, Y as Ta, Z as Sa, W as wa, a8 as Pa, a2 as Ma, a1 as ka, a0 as Aa, ac as Fa, a9 as La, K as Ra, ae as Ia, ag as Va, af as _a, g as Wa, Q as Ba, A as qa, e as Ha, ad as Oa, f as ja, G as za } from "./chunks/index-Cyic0UlN.js";
3
3
  import { EMPTY_SELECTION as Qa } from "./types/index.js";
4
4
  import { jsx as a, jsxs as l } from "react/jsx-runtime";
5
5
  import * as p from "react";
6
6
  import { useMemo as U } from "react";
7
- import { ResourceManagementPanel as Ka } from "./chunks/resource-management-panel-CCv1oyai.js";
8
- import { A as $a, S as Ja, V as Xa, c as Za, g as ae } from "./chunks/schedule-dashboard-D7lKgd4M.js";
7
+ import { ResourceManagementPanel as Ka } from "./chunks/resource-management-panel-DDLB-UWe.js";
8
+ import { A as $a, S as Ja, V as Xa, c as Za, g as ae } from "./chunks/schedule-dashboard-BEV7hj7t.js";
9
9
  import "react-dom";
10
10
  /**
11
11
  * @license lucide-react v0.453.0 - ISC
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-D1TkQNmD.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-CJrseB0V.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { a } from "../chunks/index-BPICAMRJ.js";
1
+ import { a } from "../chunks/index-Cyic0UlN.js";
2
2
  import { EMPTY_SELECTION as E } from "../types/index.js";
3
3
  export {
4
4
  E as EMPTY_SELECTION,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.120",
8
+ "version": "0.1.121",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",