react-semaphor 0.1.192 → 0.1.193

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 (27) hide show
  1. package/dist/chunks/{calendar-preferences-dialog-CMM-uye9.js → calendar-preferences-dialog-B8R2MaI1.js} +1 -1
  2. package/dist/chunks/{calendar-preferences-dialog-wu_fGBRY.js → calendar-preferences-dialog-B9bwWqMI.js} +1 -1
  3. package/dist/chunks/{dashboard-controls-CZiglER8.js → dashboard-controls-BB-6s-Ht.js} +5 -5
  4. package/dist/chunks/{dashboard-controls-DZ3RdkPp.js → dashboard-controls-ehLCW0nC.js} +1 -1
  5. package/dist/chunks/{dashboard-json-CBLwtP5m.js → dashboard-json-BlY0uqcf.js} +1 -1
  6. package/dist/chunks/{dashboard-json-DxsH7NvN.js → dashboard-json-CSA80k9J.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-CdR2ywTB.js → edit-dashboard-visual-D5zVmGO7.js} +2 -2
  8. package/dist/chunks/{edit-dashboard-visual-DyvG8L5y.js → edit-dashboard-visual-_s5p9j5B.js} +1 -1
  9. package/dist/chunks/{editor-action-buttons-DRX64gHq.js → editor-action-buttons-B452b6bO.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-BvRPaQoF.js → editor-action-buttons-Vkwsm2kl.js} +2 -2
  11. package/dist/chunks/{index-C5wrl3dy.js → index-C5XVrMzP.js} +408 -411
  12. package/dist/chunks/{index-BmPlQ_Vy.js → index-DEzod5lN.js} +3 -3
  13. package/dist/chunks/{notification-bell-sAl4kF0A.js → notification-bell-BTLjXwXd.js} +1 -1
  14. package/dist/chunks/{notification-bell-C4cn4uYe.js → notification-bell-e236UlND.js} +3 -3
  15. package/dist/chunks/{resource-management-panel-DRpbtjWO.js → resource-management-panel-BuyYkjBW.js} +3 -3
  16. package/dist/chunks/{resource-management-panel-DNffk7G6.js → resource-management-panel-XB3llD7A.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-DEWoTnfO.js → use-role-aware-display-preferences-DmiYlSDa.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-BIAB5o80.js → use-role-aware-display-preferences-MtOAYA2Y.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-BMqAflAg.js → use-visual-utils-B3dd_yYT.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-BfZLkFD4.js → use-visual-utils-CYy0761D.js} +1 -1
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +6 -6
  25. package/dist/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";const f=require("react"),t=require("./index-BmPlQ_Vy.js"),e=require("react/jsx-runtime"),N=require("./editor-action-buttons-DRX64gHq.js"),T=require("./use-visual-utils-BfZLkFD4.js"),I=require("./date-formatter-Sz6QDaM8.js");/**
1
+ "use strict";const f=require("react"),t=require("./index-DEzod5lN.js"),e=require("react/jsx-runtime"),N=require("./editor-action-buttons-B452b6bO.js"),T=require("./use-visual-utils-CYy0761D.js"),I=require("./date-formatter-Sz6QDaM8.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,8 +1,8 @@
1
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-C5wrl3dy.js";
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-C5XVrMzP.js";
3
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-BvRPaQoF.js";
5
- import { a as ne } from "./use-visual-utils-BMqAflAg.js";
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-Vkwsm2kl.js";
5
+ import { a as ne } from "./use-visual-utils-B3dd_yYT.js";
6
6
  import { c as K } from "./date-formatter-Y8Za1ib3.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as n, Fragment as ge } from "react/jsx-runtime";
2
- import { aT as Ze, u as me, aI as Qe, aZ as re, b1 as Xe, b2 as $e, c as X, b3 as ke, b4 as et, b5 as tt, B as _, b6 as st, b7 as nt, b8 as K, b9 as pe, H as oe, ba as at, bb as it, bc as rt, bd as ve, be as De, bf as ot, bg as lt, W as dt, bh as ye, e as le, bi as Se, bj as Ee, bk as ct, a2 as Ve, _ as Le, bl as Ae, bm as Te, bn as Oe, bo as Re, bp as Pe, bq as Ue, br as Ie, bs as je, bt as Me, bu as ut, bv as ht, bw as Fe, bx as ze, by as Be, bz as mt, bA as He, bB as pt, Y as ae, l as ft, bC as _e, bD as gt, bE as Dt, m as xt, n as bt, o as Nt, p as wt, q as vt, L as Ce, bF as fe, G as Ct, bG as yt, bH as St, bI as Et, bJ as Vt } from "./index-C5wrl3dy.js";
2
+ import { aT as Ze, u as me, aI as Qe, aZ as re, b1 as Xe, b2 as $e, c as X, b3 as ke, b4 as et, b5 as tt, B as _, b6 as st, b7 as nt, b8 as K, b9 as pe, H as oe, ba as at, bb as it, bc as rt, bd as ve, be as De, bf as ot, bg as lt, W as dt, bh as ye, e as le, bi as Se, bj as Ee, bk as ct, a2 as Ve, _ as Le, bl as Ae, bm as Te, bn as Oe, bo as Re, bp as Pe, bq as Ue, br as Ie, bs as je, bt as Me, bu as ut, bv as ht, bw as Fe, bx as ze, by as Be, bz as mt, bA as He, bB as pt, Y as ae, l as ft, bC as _e, bD as gt, bE as Dt, m as xt, n as bt, o as Nt, p as wt, q as vt, L as Ce, bF as fe, G as Ct, bG as yt, bH as St, bI as Et, bJ as Vt } from "./index-C5XVrMzP.js";
3
3
  import Lt, { useRef as At, useEffect as ie, useState as x } from "react";
4
- import { a as Ge } from "./use-visual-utils-BMqAflAg.js";
5
- import { u as Tt } from "./use-role-aware-display-preferences-BIAB5o80.js";
4
+ import { a as Ge } from "./use-visual-utils-B3dd_yYT.js";
5
+ import { u as Tt } from "./use-role-aware-display-preferences-MtOAYA2Y.js";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
8
8
  *
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-BmPlQ_Vy.js"),c=require("react"),de=require("./use-visual-utils-BfZLkFD4.js"),pe=require("./use-role-aware-display-preferences-DEWoTnfO.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-DEzod5lN.js"),c=require("react"),de=require("./use-visual-utils-CYy0761D.js"),pe=require("./use-role-aware-display-preferences-DmiYlSDa.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 a=require("./index-BmPlQ_Vy.js"),n=require("react");function f(){const{displayPreferences:c,shouldShowElement:o}=a.useDisplayPreferences(),{currentUser:e,userContext:s}=a.useCurrentUserInfo(),i=n.useMemo(()=>a.getRoleBasedDisplayOverrides(e),[e]),t=n.useMemo(()=>r=>i&&i[r]!==void 0&&i[r]===!1?!1:o(r),[i,o,c]),p=n.useMemo(()=>{var r,d,l,u,h;return{canEdit:((r=s==null?void 0:s.permissions)==null?void 0:r.canEdit)??a.canUserEdit(e),canUseFilters:((d=s==null?void 0:s.permissions)==null?void 0:d.canEdit)??a.canUserUseFilters(e),canManageDashboards:((l=s==null?void 0:s.permissions)==null?void 0:l.canCreateDashboard)??a.canUserManageDashboards(e),canCreateDashboards:((u=s==null?void 0:s.permissions)==null?void 0:u.canCreateDashboard)??a.canUserCreateDashboards(e),canAccessVisuals:((h=s==null?void 0:s.permissions)==null?void 0:h.canEdit)??a.canUserAccessVisuals(e)}},[e,s]);return{displayPreferences:c,shouldShowElement:t,permissions:p,currentUser:e}}exports.useRoleAwareDisplayPreferences=f;
1
+ "use strict";const a=require("./index-DEzod5lN.js"),n=require("react");function f(){const{displayPreferences:c,shouldShowElement:o}=a.useDisplayPreferences(),{currentUser:e,userContext:s}=a.useCurrentUserInfo(),i=n.useMemo(()=>a.getRoleBasedDisplayOverrides(e),[e]),t=n.useMemo(()=>r=>i&&i[r]!==void 0&&i[r]===!1?!1:o(r),[i,o,c]),p=n.useMemo(()=>{var r,d,l,u,h;return{canEdit:((r=s==null?void 0:s.permissions)==null?void 0:r.canEdit)??a.canUserEdit(e),canUseFilters:((d=s==null?void 0:s.permissions)==null?void 0:d.canEdit)??a.canUserUseFilters(e),canManageDashboards:((l=s==null?void 0:s.permissions)==null?void 0:l.canCreateDashboard)??a.canUserManageDashboards(e),canCreateDashboards:((u=s==null?void 0:s.permissions)==null?void 0:u.canCreateDashboard)??a.canUserCreateDashboards(e),canAccessVisuals:((h=s==null?void 0:s.permissions)==null?void 0:h.canEdit)??a.canUserAccessVisuals(e)}},[e,s]);return{displayPreferences:c,shouldShowElement:t,permissions:p,currentUser:e}}exports.useRoleAwareDisplayPreferences=f;
@@ -1,4 +1,4 @@
1
- import { b as m, e as t, g as D, f as U, h as b, i as u, j as E, k as g } from "./index-C5wrl3dy.js";
1
+ import { b as m, e as t, g as D, f as U, h as b, i as u, j as E, k as g } from "./index-C5XVrMzP.js";
2
2
  import { useMemo as i } from "react";
3
3
  function S() {
4
4
  const { displayPreferences: n, shouldShowElement: c } = m(), { currentUser: a, userContext: s } = t(), r = i(
@@ -1,4 +1,4 @@
1
- import { aY as z, l as Y, aU as J, aV as K, aZ as Z, aJ as _, aG as X, u as v, a_ as q, a$ as ee, I as V, b0 as te, aI as f } from "./index-C5wrl3dy.js";
1
+ import { aY as z, l as Y, aU as J, aV as K, aZ as Z, aJ as _, aG as X, u as v, a_ as q, a$ as ee, I as V, b0 as te, aI as f } from "./index-C5XVrMzP.js";
2
2
  import { useState as j, useEffect as re, useCallback as D } from "react";
3
3
  function se(e) {
4
4
  const o = e.toUpperCase().indexOf("WHERE"), t = e.toUpperCase().indexOf("GROUP BY"), r = e.toUpperCase().indexOf("LIMIT"), n = e.toUpperCase().indexOf("ORDER BY");
@@ -1 +1 @@
1
- "use strict";const s=require("./index-BmPlQ_Vy.js"),g=require("react");function H(e){const a=e.toUpperCase().indexOf("WHERE"),t=e.toUpperCase().indexOf("GROUP BY"),r=e.toUpperCase().indexOf("LIMIT"),c=e.toUpperCase().indexOf("ORDER BY");let d=e.length;if(c!==-1&&(d=c),r!==-1&&r<d&&(d=r),a!==-1){const i=e.substring(0,a),o=e.substring(a);return`${i} {{ filters | where }} AND ${o.substring(6)}`}else if(t!==-1){const i=e.substring(0,t),o=e.substring(t);return`${i} {{ filters | where }} ${o}`}else{const i=e.substring(0,d),o=e.substring(d);return console.log("beforeClause",i),console.log("afterClause",o),o?`${i} {{ filters | where }} ${o}`:`${i.replace(/;$/,"")} {{ filters | where }}`}}function L(e){const[a,t]=g.useState(null),[r,c]=g.useState(null),d=s.useEnsureReactGlobals();return g.useEffect(()=>{if(!e||e.trim()===""){t(null),c(null);return}if(!d)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 h=await import(l);if(typeof h.useChartStore!="function")throw new Error("useChartStore is not a function");t(()=>h.useChartStore),c(null)}catch(o){const l=o instanceof Error?o.message:"Unknown error";console.error("Failed to load remote chart store:",l),c(l),t(null)}})()},[e,d]),a}function Q(e,a){if(e.length===0)return"";if(a){const t=e.find(r=>r.id===a);if(t){const r=t.tabTitle;if(r=="All__Header")return e[0].id;if(r&&r.endsWith("__Header")){const d=r.split("__")[0],i=e.find(o=>o.tabTitle===d);return i?i.id:e[0].id}return a}}return e[0].id}const z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:a,...t}=e;return t};async function k(e,a,t,r){if(!a||!t)throw new Error("Missing auth token or visual ID");const c=["resource-by-id","visual",t],d=r.getQueryData(c);if(d)return console.log("Using cached visual data for:",t),{data:d,fromCache:!0};console.log("Fetching visual data from network for:",t);const i=s.ue.loading("Loading visual...",{position:"top-center"});try{const o=await fetch(`${e}/management/v1/visuals/${t}`,{headers:{Authorization:`Bearer ${a}`}});if(!o.ok)throw new Error("Failed to load visual");const l=await o.json();return r.setQueryData(c,l),s.ue.dismiss(i),{data:l,fromCache:!1}}catch(o){throw s.ue.dismiss(i),o}}function P(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function G(e,a){var d,i;const t=(e==null?void 0:e.frameObject)??((d=e==null?void 0:e.visual)==null?void 0:d.frameObject);if(!t)return!1;const r=P(t);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const c=(i=r.cards)==null?void 0:i.find(o=>o.id===r.activeCardId);return c?(s.setupEditorWithCard({...a,frame:r,card:c,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function Y(){var C;const{setCardSql:e}=s.useEditorActions(),a=s.useEditorStore(n=>n.frame),t=s.useEditorStore(n=>n.card),r=s.useEditorStore(n=>n.isDevMode),c=L(((C=t.customCardPreferences)==null?void 0:C.url)||""),d=s.useEditorStore(n=>n.selectedSchemaName),i=s.useEditorStore(n=>n.selectedDatamodelId),o=s.useEditorStore(n=>n.selectedDatabaseName),l=s.useEditorStore(n=>n.selectedTableName),h=s.useEditorStore(n=>n.selectedConnectionId),m=s.useEditorStore(n=>n.isShowingVisual),p=t.sql;return{getUpdatedFrame:g.useCallback(()=>{var I;let n=p;p&&!p.includes("{{")&&(n=H(p),e(n));const w=(I=c==null?void 0:c.getState())==null?void 0:I.settings,v={...t,dataSource:t.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:i,lastSelectedDatabase:o,lastSelectedTable:l,connectionId:h,sql:r?n:void 0,python:r?t.python:void 0,config:r?void 0:z(t.config),customCfg:m?t.customCfg:null,preferences:t.preferences,...w&&{customCardPreferences:{...t.customCardPreferences,settings:w}}},E=a.cards.map(S=>S.id===t.id?v:S);return{...a,cards:E,activeCardId:Q(E,a.activeCardId)}},[t,a,r,m,d,i,o,l,h,e,c,p])}}function J(){const{authToken:e,tokenProps:a}=s.useSemaphorContext(),t=s.useQueryClient(),r=s.useSelectedVisual(),{selectVisual:c}=s.useManagementActions(),{setFrame:d,setCard:i,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:n,setSelectedTableName:w,setSelectedDatamodelId:v,setFilterValues:E,setApplyFilters:I}=s.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:V,setSelectedFrameId:$,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=s.useDashboardActions(),y=s.useDashboardStore(u=>u.selectedSheetId),O=s.useDashboardStore(u=>u.selectedFrameId),x=s.useDashboardStore(u=>u.dashboard),B=s.useDashboardStore(u=>u.filterValues),F=s.useVisualById((r==null?void 0:r.id)||"",{enabled:!!(r!=null&&r.id)&&!!(e!=null&&e.accessToken)}),j=g.useCallback(async u=>{try{c(u),A();const{data:b,fromCache:f}=await k(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t);if(!G(b,{setFrame:d,setCard:i,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:n,setSelectedTableName:w,setSelectedDatamodelId:v,setFilterValues:E,setApplyFilters:I,setIsDashboardEditing:S,setIsVisualEditing:V,dashboard:x,selectedSheetId:y,selectedFrameId:O,filterValues:B}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:f}}catch(b){return console.error("Error editing visual:",b),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,t,c,d,i,S,V,o,l,h,m,p,D,C,n,w,v,E,I,A,x,y,O,B]),_=g.useCallback(async u=>{var b;try{if(c(u),!y)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:f,fromCache:T}=await k(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t),W=(f==null?void 0:f.frameObject)??((b=f==null?void 0:f.visual)==null?void 0:b.frameObject);if(!W)return{success:!1,error:"Visual has no frame data"};const U=P(W);if(!(U!=null&&U.cards)||U.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const M={...s.cloneFrameWithNewIds(U),visualId:u.id};return N(y,M,"end"),S(!0),$(M.id),R(!1),{success:!0,fromCache:T}}catch(f){return console.error("Error adding visual:",f),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,t,c,y,N,S,$,R]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:j,handleAddLibraryVisual:_,getUpdatedFrame:Y().getUpdatedFrame,refetch:F.refetch}}exports.useRemoteChartStore=L;exports.useVisualUtils=J;
1
+ "use strict";const s=require("./index-DEzod5lN.js"),g=require("react");function H(e){const a=e.toUpperCase().indexOf("WHERE"),t=e.toUpperCase().indexOf("GROUP BY"),r=e.toUpperCase().indexOf("LIMIT"),c=e.toUpperCase().indexOf("ORDER BY");let d=e.length;if(c!==-1&&(d=c),r!==-1&&r<d&&(d=r),a!==-1){const i=e.substring(0,a),o=e.substring(a);return`${i} {{ filters | where }} AND ${o.substring(6)}`}else if(t!==-1){const i=e.substring(0,t),o=e.substring(t);return`${i} {{ filters | where }} ${o}`}else{const i=e.substring(0,d),o=e.substring(d);return console.log("beforeClause",i),console.log("afterClause",o),o?`${i} {{ filters | where }} ${o}`:`${i.replace(/;$/,"")} {{ filters | where }}`}}function L(e){const[a,t]=g.useState(null),[r,c]=g.useState(null),d=s.useEnsureReactGlobals();return g.useEffect(()=>{if(!e||e.trim()===""){t(null),c(null);return}if(!d)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 h=await import(l);if(typeof h.useChartStore!="function")throw new Error("useChartStore is not a function");t(()=>h.useChartStore),c(null)}catch(o){const l=o instanceof Error?o.message:"Unknown error";console.error("Failed to load remote chart store:",l),c(l),t(null)}})()},[e,d]),a}function Q(e,a){if(e.length===0)return"";if(a){const t=e.find(r=>r.id===a);if(t){const r=t.tabTitle;if(r=="All__Header")return e[0].id;if(r&&r.endsWith("__Header")){const d=r.split("__")[0],i=e.find(o=>o.tabTitle===d);return i?i.id:e[0].id}return a}}return e[0].id}const z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:a,...t}=e;return t};async function k(e,a,t,r){if(!a||!t)throw new Error("Missing auth token or visual ID");const c=["resource-by-id","visual",t],d=r.getQueryData(c);if(d)return console.log("Using cached visual data for:",t),{data:d,fromCache:!0};console.log("Fetching visual data from network for:",t);const i=s.ue.loading("Loading visual...",{position:"top-center"});try{const o=await fetch(`${e}/management/v1/visuals/${t}`,{headers:{Authorization:`Bearer ${a}`}});if(!o.ok)throw new Error("Failed to load visual");const l=await o.json();return r.setQueryData(c,l),s.ue.dismiss(i),{data:l,fromCache:!1}}catch(o){throw s.ue.dismiss(i),o}}function P(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function G(e,a){var d,i;const t=(e==null?void 0:e.frameObject)??((d=e==null?void 0:e.visual)==null?void 0:d.frameObject);if(!t)return!1;const r=P(t);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const c=(i=r.cards)==null?void 0:i.find(o=>o.id===r.activeCardId);return c?(s.setupEditorWithCard({...a,frame:r,card:c,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function Y(){var C;const{setCardSql:e}=s.useEditorActions(),a=s.useEditorStore(n=>n.frame),t=s.useEditorStore(n=>n.card),r=s.useEditorStore(n=>n.isDevMode),c=L(((C=t.customCardPreferences)==null?void 0:C.url)||""),d=s.useEditorStore(n=>n.selectedSchemaName),i=s.useEditorStore(n=>n.selectedDatamodelId),o=s.useEditorStore(n=>n.selectedDatabaseName),l=s.useEditorStore(n=>n.selectedTableName),h=s.useEditorStore(n=>n.selectedConnectionId),m=s.useEditorStore(n=>n.isShowingVisual),p=t.sql;return{getUpdatedFrame:g.useCallback(()=>{var I;let n=p;p&&!p.includes("{{")&&(n=H(p),e(n));const w=(I=c==null?void 0:c.getState())==null?void 0:I.settings,v={...t,dataSource:t.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:i,lastSelectedDatabase:o,lastSelectedTable:l,connectionId:h,sql:r?n:void 0,python:r?t.python:void 0,config:r?void 0:z(t.config),customCfg:m?t.customCfg:null,preferences:t.preferences,...w&&{customCardPreferences:{...t.customCardPreferences,settings:w}}},E=a.cards.map(S=>S.id===t.id?v:S);return{...a,cards:E,activeCardId:Q(E,a.activeCardId)}},[t,a,r,m,d,i,o,l,h,e,c,p])}}function J(){const{authToken:e,tokenProps:a}=s.useSemaphorContext(),t=s.useQueryClient(),r=s.useSelectedVisual(),{selectVisual:c}=s.useManagementActions(),{setFrame:d,setCard:i,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:n,setSelectedTableName:w,setSelectedDatamodelId:v,setFilterValues:E,setApplyFilters:I}=s.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:V,setSelectedFrameId:$,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=s.useDashboardActions(),y=s.useDashboardStore(u=>u.selectedSheetId),O=s.useDashboardStore(u=>u.selectedFrameId),x=s.useDashboardStore(u=>u.dashboard),B=s.useDashboardStore(u=>u.filterValues),F=s.useVisualById((r==null?void 0:r.id)||"",{enabled:!!(r!=null&&r.id)&&!!(e!=null&&e.accessToken)}),j=g.useCallback(async u=>{try{c(u),A();const{data:b,fromCache:f}=await k(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t);if(!G(b,{setFrame:d,setCard:i,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:n,setSelectedTableName:w,setSelectedDatamodelId:v,setFilterValues:E,setApplyFilters:I,setIsDashboardEditing:S,setIsVisualEditing:V,dashboard:x,selectedSheetId:y,selectedFrameId:O,filterValues:B}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:f}}catch(b){return console.error("Error editing visual:",b),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,t,c,d,i,S,V,o,l,h,m,p,D,C,n,w,v,E,I,A,x,y,O,B]),_=g.useCallback(async u=>{var b;try{if(c(u),!y)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:f,fromCache:T}=await k(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t),W=(f==null?void 0:f.frameObject)??((b=f==null?void 0:f.visual)==null?void 0:b.frameObject);if(!W)return{success:!1,error:"Visual has no frame data"};const U=P(W);if(!(U!=null&&U.cards)||U.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const M={...s.cloneFrameWithNewIds(U),visualId:u.id};return N(y,M,"end"),S(!0),$(M.id),R(!1),{success:!0,fromCache:T}}catch(f){return console.error("Error adding visual:",f),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,t,c,y,N,S,$,R]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:j,handleAddLibraryVisual:_,getUpdatedFrame:Y().getUpdatedFrame,refetch:F.refetch}}exports.useRemoteChartStore=L;exports.useVisualUtils=J;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BmPlQ_Vy.js"),o=require("../chunks/common-types-CfJLrTJd.js");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=o.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DEzod5lN.js"),o=require("../chunks/common-types-CfJLrTJd.js");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=o.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index-C5wrl3dy.js";
1
+ import { D as a } from "../chunks/index-C5XVrMzP.js";
2
2
  import { E as s } from "../chunks/common-types-DhqlRVrq.js";
3
3
  export {
4
4
  a as Dashboard,
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-BmPlQ_Vy.js"),P=require("./chunks/common-types-CfJLrTJd.js"),v=require("./chunks/calendar-preferences-dialog-CMM-uye9.js"),o=require("react/jsx-runtime"),f=require("react"),A=require("./chunks/resource-management-panel-DNffk7G6.js"),N=require("./types/index.cjs");require("react-dom");const i=require("./chunks/notification-bell-sAl4kF0A.js");function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const x=j(f);function _(r){const{displayPreferences:t,...s}=r,l={...s,id:r.dashboardId};return o.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:o.jsxs(e.SemaphorContextProvider,{dashboardProps:l,children:[o.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),o.jsx(e.UXProvider,{children:o.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:o.jsx(e.Container,{type:"visual",...l,children:o.jsx(M,{cardId:r.cardId})})})})]})})}function M({cardId:r}){const t=e.useDashboardStore(n=>{var u;return(u=n.dashboard)==null?void 0:u.sheets}),{card:s,frame:l}=f.useMemo(()=>{const n=t==null?void 0:t.flatMap(a=>a.frames),u=n==null?void 0:n.flatMap(a=>a==null?void 0:a.cards),m=u==null?void 0:u.find(a=>(a==null?void 0:a.id)===r),E=n==null?void 0:n.find(a=>{var h;return(h=a==null?void 0:a.cards)==null?void 0:h.find(c=>(c==null?void 0:c.id)===r)});return{card:m,frame:E}},[t,r]);return!s||!l?o.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):o.jsx("main",{className:"flex h-full grow flex-col",children:o.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:u})=>o.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:o.jsx(e.DashboardCard,{card:s,frame:l})})})}function w({name:r,items:t,value:s,onChange:l,isLoading:n,isError:u,refetch:m,className:E,icon:a,showNone:h=!1}){const c=x.useRef(null),[D,g]=x.useState(!1),[T,b]=x.useState("100%"),C=h?[...t||[],{id:"none",name:"None"}]:t;x.useLayoutEffect(()=>{c.current&&b(c.current.offsetWidth)},[]);function S(){var d;return n?"Loading...":u?"Error":s?(d=t==null?void 0:t.find(p=>p.id===s))==null?void 0:d.name:`Select ${r}`}function y(d,p){l(p),g(!1)}return o.jsxs(e.Popover,{open:D,onOpenChange:g,children:[o.jsx(e.PopoverTrigger,{asChild:!0,children:o.jsxs(e.Button,{ref:c,variant:"outline",role:"combobox","aria-expanded":D,className:e.cn("flex h-9 w-full justify-between",E),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("div",{className:"mr-2",children:a}),o.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:S()})]}),o.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),o.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:T},children:o.jsxs(e.Command,{children:[o.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[o.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),o.jsx(e.IconButton,{className:"h-7",onClick:m,children:o.jsx(i.RefreshCw,{className:e.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),o.jsxs(e.CommandList,{children:[o.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),o.jsx(e.CommandGroup,{children:C==null?void 0:C.map(d=>o.jsx(e.CommandItem,{className:"overflow-x-auto",value:d.name,onSelect:p=>y(p,d.id),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(e.Check,{className:e.cn("size-4",s===d.id?"opacity-100":"opacity-0")}),o.jsx("div",{title:d.name,children:d.name})]})},d.id))})]})]})})]})}function I(r,t){f.useEffect(()=>(r&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,t])}exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.ExportError=e.ExportError;exports.PivotMarkerEnum=e.PivotMarkerEnum;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;exports.getColumnDataType=e.getColumnDataType;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isCalculatedDimension=e.isCalculatedDimension;exports.isCalculatedField=e.isCalculatedField;exports.isCalculatedMetric=e.isCalculatedMetric;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useActiveExports=e.useActiveExports;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=P.EMPTY_SELECTION;exports.CalendarPreferencesDialog=v.CalendarPreferencesDialog;exports.ResourceManagementPanel=A.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=N.DEFAULT_CALENDAR_CONTEXT;exports.AdvancedModeToggle=i.AdvancedModeToggle;exports.ExportNotificationItem=i.ExportNotificationItem;exports.ExportNotificationList=i.ExportNotificationList;exports.NotificationBell=i.NotificationBell;exports.ScheduleDashboard=i.ScheduleDashboard;exports.UnsavedChangesAlert=i.UnsavedChangesAlert;exports.VisualEditingControls=i.VisualEditingControls;exports.useExportPolling=i.useExportPolling;exports.useExportRecovery=i.useExportRecovery;exports.usePristineSnapshotInitializer=i.usePristineSnapshotInitializer;exports.Combobox=w;exports.Visual=_;exports.useExposePrintState=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DEzod5lN.js"),P=require("./chunks/common-types-CfJLrTJd.js"),v=require("./chunks/calendar-preferences-dialog-B8R2MaI1.js"),o=require("react/jsx-runtime"),f=require("react"),A=require("./chunks/resource-management-panel-XB3llD7A.js"),N=require("./types/index.cjs");require("react-dom");const i=require("./chunks/notification-bell-BTLjXwXd.js");function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const x=j(f);function _(r){const{displayPreferences:t,...s}=r,l={...s,id:r.dashboardId};return o.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:o.jsxs(e.SemaphorContextProvider,{dashboardProps:l,children:[o.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),o.jsx(e.UXProvider,{children:o.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:o.jsx(e.Container,{type:"visual",...l,children:o.jsx(M,{cardId:r.cardId})})})})]})})}function M({cardId:r}){const t=e.useDashboardStore(n=>{var u;return(u=n.dashboard)==null?void 0:u.sheets}),{card:s,frame:l}=f.useMemo(()=>{const n=t==null?void 0:t.flatMap(a=>a.frames),u=n==null?void 0:n.flatMap(a=>a==null?void 0:a.cards),m=u==null?void 0:u.find(a=>(a==null?void 0:a.id)===r),E=n==null?void 0:n.find(a=>{var h;return(h=a==null?void 0:a.cards)==null?void 0:h.find(c=>(c==null?void 0:c.id)===r)});return{card:m,frame:E}},[t,r]);return!s||!l?o.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):o.jsx("main",{className:"flex h-full grow flex-col",children:o.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:u})=>o.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:o.jsx(e.DashboardCard,{card:s,frame:l})})})}function w({name:r,items:t,value:s,onChange:l,isLoading:n,isError:u,refetch:m,className:E,icon:a,showNone:h=!1}){const c=x.useRef(null),[D,g]=x.useState(!1),[T,b]=x.useState("100%"),C=h?[...t||[],{id:"none",name:"None"}]:t;x.useLayoutEffect(()=>{c.current&&b(c.current.offsetWidth)},[]);function S(){var d;return n?"Loading...":u?"Error":s?(d=t==null?void 0:t.find(p=>p.id===s))==null?void 0:d.name:`Select ${r}`}function y(d,p){l(p),g(!1)}return o.jsxs(e.Popover,{open:D,onOpenChange:g,children:[o.jsx(e.PopoverTrigger,{asChild:!0,children:o.jsxs(e.Button,{ref:c,variant:"outline",role:"combobox","aria-expanded":D,className:e.cn("flex h-9 w-full justify-between",E),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("div",{className:"mr-2",children:a}),o.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:S()})]}),o.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),o.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:T},children:o.jsxs(e.Command,{children:[o.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[o.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),o.jsx(e.IconButton,{className:"h-7",onClick:m,children:o.jsx(i.RefreshCw,{className:e.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),o.jsxs(e.CommandList,{children:[o.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),o.jsx(e.CommandGroup,{children:C==null?void 0:C.map(d=>o.jsx(e.CommandItem,{className:"overflow-x-auto",value:d.name,onSelect:p=>y(p,d.id),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(e.Check,{className:e.cn("size-4",s===d.id?"opacity-100":"opacity-0")}),o.jsx("div",{title:d.name,children:d.name})]})},d.id))})]})]})})]})}function I(r,t){f.useEffect(()=>(r&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,t])}exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.ExportError=e.ExportError;exports.PivotMarkerEnum=e.PivotMarkerEnum;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;exports.getColumnDataType=e.getColumnDataType;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isCalculatedDimension=e.isCalculatedDimension;exports.isCalculatedField=e.isCalculatedField;exports.isCalculatedMetric=e.isCalculatedMetric;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useActiveExports=e.useActiveExports;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=P.EMPTY_SELECTION;exports.CalendarPreferencesDialog=v.CalendarPreferencesDialog;exports.ResourceManagementPanel=A.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=N.DEFAULT_CALENDAR_CONTEXT;exports.AdvancedModeToggle=i.AdvancedModeToggle;exports.ExportNotificationItem=i.ExportNotificationItem;exports.ExportNotificationList=i.ExportNotificationList;exports.NotificationBell=i.NotificationBell;exports.ScheduleDashboard=i.ScheduleDashboard;exports.UnsavedChangesAlert=i.UnsavedChangesAlert;exports.VisualEditingControls=i.VisualEditingControls;exports.useExportPolling=i.useExportPolling;exports.useExportRecovery=i.useExportRecovery;exports.usePristineSnapshotInitializer=i.usePristineSnapshotInitializer;exports.Combobox=w;exports.Visual=_;exports.useExposePrintState=I;
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { J as T, K as S, S as P, M as _, U as A, N as w, O as M, u as I, Q as D, T as R, P as F, s as L, B as k, c as E, V as O, t as B, v as U, w as V, W as z, x as H, y as Q, z as W, A as j, E as q } from "./chunks/index-C5wrl3dy.js";
2
- import { ai as ia, aj as la, D as da, ac as ca, a6 as ua, aP as pa, an as ma, _ as ha, a1 as fa, a1 as Ca, a2 as Ea, a as xa, aO as ga, a9 as Da, aH as Ta, aK as ba, au as va, ab as ya, a7 as Na, a8 as Sa, ao as Pa, aS as _a, aw as Aa, aN as wa, aM as Ma, aL as Ia, av as Ra, az as Fa, aA as La, at as ka, aa as Oa, as as Ba, al as Ua, am as Va, ak as za, ax as Ha, ar as Qa, aR as Wa, aQ as ja, aq as qa, ap as Ga, aB as Ka, ay as Ya, ag as $a, a5 as Ja, aD as Xa, aF as Za, aE as ae, aG as ee, a4 as se, Z as oe, ad as re, $ as te, aJ as ne, aC as ie, aI as le, af as de, ae as ce, ah as ue, Y as pe, a3 as me, a0 as he } from "./chunks/index-C5wrl3dy.js";
1
+ import { J as T, K as S, S as P, M as _, U as A, N as w, O as M, u as I, Q as D, T as R, P as F, s as L, B as k, c as E, V as O, t as B, v as U, w as V, W as z, x as H, y as Q, z as W, A as j, E as q } from "./chunks/index-C5XVrMzP.js";
2
+ import { ai as ia, aj as la, D as da, ac as ca, a6 as ua, aP as pa, an as ma, _ as ha, a1 as fa, a1 as Ca, a2 as Ea, a as xa, aO as ga, a9 as Da, aH as Ta, aK as ba, au as va, ab as ya, a7 as Na, a8 as Sa, ao as Pa, aS as _a, aw as Aa, aN as wa, aM as Ma, aL as Ia, av as Ra, az as Fa, aA as La, at as ka, aa as Oa, as as Ba, al as Ua, am as Va, ak as za, ax as Ha, ar as Qa, aR as Wa, aQ as ja, aq as qa, ap as Ga, aB as Ka, ay as Ya, ag as $a, a5 as Ja, aD as Xa, aF as Za, aE as ae, aG as ee, a4 as se, Z as oe, ad as re, $ as te, aJ as ne, aC as ie, aI as le, af as de, ae as ce, ah as ue, Y as pe, a3 as me, a0 as he } from "./chunks/index-C5XVrMzP.js";
3
3
  import { E as Ce } from "./chunks/common-types-DhqlRVrq.js";
4
- import { C as xe } from "./chunks/calendar-preferences-dialog-wu_fGBRY.js";
4
+ import { C as xe } from "./chunks/calendar-preferences-dialog-B9bwWqMI.js";
5
5
  import { jsx as a, jsxs as i } from "react/jsx-runtime";
6
6
  import * as m from "react";
7
7
  import { useMemo as G, useEffect as K } from "react";
8
- import { ResourceManagementPanel as De } from "./chunks/resource-management-panel-DRpbtjWO.js";
8
+ import { ResourceManagementPanel as De } from "./chunks/resource-management-panel-BuyYkjBW.js";
9
9
  import { DEFAULT_CALENDAR_CONTEXT as be } from "./types/index.js";
10
10
  import "react-dom";
11
- import { R as Y } from "./chunks/notification-bell-C4cn4uYe.js";
12
- import { A as ye, a as Ne, E as Se, N as Pe, S as _e, U as Ae, V as we, u as Me, b as Ie, c as Re } from "./chunks/notification-bell-C4cn4uYe.js";
11
+ import { R as Y } from "./chunks/notification-bell-e236UlND.js";
12
+ import { A as ye, a as Ne, E as Se, N as Pe, S as _e, U as Ae, V as we, u as Me, b as Ie, c as Re } from "./chunks/notification-bell-e236UlND.js";
13
13
  function sa(e) {
14
14
  const { displayPreferences: s, ...l } = e, d = {
15
15
  ...l,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BmPlQ_Vy.js"),r=require("../chunks/common-types-CfJLrTJd.js"),a=require("../chunks/calendar-preferences-dialog-CMM-uye9.js");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DEzod5lN.js"),r=require("../chunks/common-types-CfJLrTJd.js"),a=require("../chunks/calendar-preferences-dialog-B8R2MaI1.js");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { a as e } from "../chunks/index-C5wrl3dy.js";
1
+ import { a as e } from "../chunks/index-C5XVrMzP.js";
2
2
  import { E as f } from "../chunks/common-types-DhqlRVrq.js";
3
- import { C as E } from "../chunks/calendar-preferences-dialog-wu_fGBRY.js";
3
+ import { C as E } from "../chunks/calendar-preferences-dialog-B9bwWqMI.js";
4
4
  export {
5
5
  E as CalendarPreferencesDialog,
6
6
  f 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.192",
8
+ "version": "0.1.193",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",