react-semaphor 0.1.217 → 0.1.219

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 (38) hide show
  1. package/dist/chunks/{dashboard-controls-p-PLTBKo.js → dashboard-controls-DfbaI6XZ.js} +1 -1
  2. package/dist/chunks/{dashboard-controls-DLjwyISu.js → dashboard-controls-fhZIf1Z0.js} +5 -5
  3. package/dist/chunks/{dashboard-json-DC8Hr2u7.js → dashboard-json-Bt-kpD9y.js} +1 -1
  4. package/dist/chunks/{dashboard-json-Dy8OL7sx.js → dashboard-json-DooCuhHo.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-CQISZPzc.js → dashboard-summary-settings-dialog-B3eWK66q.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-Dlzv-d9Z.js → dashboard-summary-settings-dialog-CWmq1rnL.js} +1 -1
  7. package/dist/chunks/edit-dashboard-visual-Blkn0D44.js +164 -0
  8. package/dist/chunks/{edit-dashboard-visual-DkZya-OV.js → edit-dashboard-visual-C7sag6Jo.js} +6031 -5828
  9. package/dist/chunks/{editor-action-buttons-4-UuoSZc.js → editor-action-buttons-yJEX8W7R.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-BQtxnqBZ.js → editor-action-buttons-z7gf6nE6.js} +2 -2
  11. package/dist/chunks/{index-Cr-d0ray.js → index-BMkn4K4E.js} +15342 -15143
  12. package/dist/chunks/{index-CRJ97-41.js → index-C_RTjAMW.js} +223 -223
  13. package/dist/chunks/{notification-bell-_OADjyy7.js → notification-bell-DHK6s4Om.js} +3 -3
  14. package/dist/chunks/{notification-bell-CyZx_uZ1.js → notification-bell-DSShVmWj.js} +1 -1
  15. package/dist/chunks/{resource-management-panel-rmEMdbbS.js → resource-management-panel-LBCXiHZk.js} +3 -3
  16. package/dist/chunks/{resource-management-panel-Bq9zRYsk.js → resource-management-panel-QdAeim78.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-1U-ed07h.js → use-role-aware-display-preferences-CqF1BR5w.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-DOA8kcfK.js → use-role-aware-display-preferences-Db1iLmPN.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-DX-4Hwoe.js → use-visual-utils-AXuCdndV.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-DxigSU7y.js → use-visual-utils-CKt4UblS.js} +1 -1
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +3 -3
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +37 -37
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +3 -3
  28. package/dist/types/dashboard.d.ts +3 -3
  29. package/dist/types/index.cjs +1 -1
  30. package/dist/types/index.js +10 -4
  31. package/dist/types/main.d.ts +34 -7
  32. package/dist/types/shared.d.ts +3 -3
  33. package/dist/types/surfboard.d.ts +3 -3
  34. package/dist/types/types.d.ts +34 -7
  35. package/package.json +1 -1
  36. package/dist/chunks/common-types-CfJLrTJd.js +0 -1
  37. package/dist/chunks/common-types-DhqlRVrq.js +0 -8
  38. package/dist/chunks/edit-dashboard-visual-DAiqFH7i.js +0 -164
@@ -1,8 +1,8 @@
1
1
  import J, { useState as D, useRef as M, useCallback as k, useEffect as L, useContext as ee } from "react";
2
- import { bS as te, l as z, aE as T, bP as B, bL as K, bM as $, aF as Q, bK as ae, m as se, n as re, o as oe, p as ne, q as ie, L as _, cB as le, cH as ce, G as de, B as I, H, a1 as P, V as ue, u as F, W as me, Z as Y, cI as he, cJ as j, I as R, ah as pe, c as U, c8 as fe, c9 as ge, ab as ve, cb as be, cc as V, E as xe, cg as we, c7 as ye, Y as Ce, cK as Ne, cL as Ae, cM as De, cp as Ee, cq as Se, cr as Le, cN as Ie, cs as Te, ct as Ue, cu as ke, cv as Fe, cw as Ve, au as Me, bR as Pe, X as Re, cO as Oe, cP as ze, cQ as Be, bN as q, ad as $e, aH as He, P as _e, s as je, cR as qe, t as Ge } from "./index-Cr-d0ray.js";
2
+ import { bS as te, l as z, aE as T, bP as B, bL as K, bM as $, aF as Q, bK as ae, m as se, n as re, o as oe, p as ne, q as ie, L as _, cB as le, cH as ce, G as de, B as I, H, a1 as P, V as ue, u as F, W as me, Z as Y, cI as he, cJ as j, I as R, ah as pe, c as U, c8 as fe, c9 as ge, ab as ve, cb as be, cc as V, E as xe, cg as we, c7 as ye, Y as Ce, cK as Ne, cL as Ae, cM as De, cp as Ee, cq as Se, cr as Le, cN as Ie, cs as Te, ct as Ue, cu as ke, cv as Fe, cw as Ve, au as Me, bR as Pe, X as Re, cO as Oe, cP as ze, cQ as Be, bN as q, ad as $e, aH as He, P as _e, s as je, cR as qe, t as Ge } from "./index-BMkn4K4E.js";
3
3
  import { jsx as t, jsxs as o, Fragment as O } from "react/jsx-runtime";
4
- import { V as Xe, E as We, a as Ke, b as Qe, L as Ye, c as Ze, d as Je, C as et } from "./editor-action-buttons-BQtxnqBZ.js";
5
- import { a as Z } from "./use-visual-utils-DxigSU7y.js";
4
+ import { V as Xe, E as We, a as Ke, b as Qe, L as Ye, c as Ze, d as Je, C as et } from "./editor-action-buttons-z7gf6nE6.js";
5
+ import { a as Z } from "./use-visual-utils-CKt4UblS.js";
6
6
  import { c as G } from "./date-formatter-Y8Za1ib3.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -1,4 +1,4 @@
1
- "use strict";const f=require("react"),t=require("./index-CRJ97-41.js"),e=require("react/jsx-runtime"),A=require("./editor-action-buttons-4-UuoSZc.js"),U=require("./use-visual-utils-DX-4Hwoe.js"),I=require("./date-formatter-Sz6QDaM8.js");/**
1
+ "use strict";const f=require("react"),t=require("./index-C_RTjAMW.js"),e=require("react/jsx-runtime"),A=require("./editor-action-buttons-yJEX8W7R.js"),U=require("./use-visual-utils-AXuCdndV.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 { jsx as e, jsxs as n, Fragment as ge } from "react/jsx-runtime";
2
- import { bS as _e, u as ie, a1 as Ge, W as le, c5 as qe, c6 as Ke, c as re, B as U, c7 as pe, c8 as We, c9 as Ye, ca as Ze, cb as $e, cc as Z, H as de, cd as Je, ce as Qe, cf as Xe, cg as ve, ch as De, ci as ke, cj as et, ck as ye, e as ce, cl as be, cm as Se, cn as tt, an as Ee, aj as Ve, co as Le, cp as Ae, cq as Oe, cr as Te, cs as Re, ct as Pe, cu as Ue, cv as je, cw as Fe, cx as st, cy as nt, ah as ae, l as at, cz as Ie, cA as it, m as rt, n as ot, o as lt, p as dt, q as ct, L as Ce, cB as fe, G as ut, cC as ht, cD as mt, cE as pt, bZ as ft, b_ as gt, b$ as Dt, c1 as xt, cF as Nt, cG as wt } from "./index-Cr-d0ray.js";
2
+ import { bS as _e, u as ie, a1 as Ge, W as le, c5 as qe, c6 as Ke, c as re, B as U, c7 as pe, c8 as We, c9 as Ye, ca as Ze, cb as $e, cc as Z, H as de, cd as Je, ce as Qe, cf as Xe, cg as ve, ch as De, ci as ke, cj as et, ck as ye, e as ce, cl as be, cm as Se, cn as tt, an as Ee, aj as Ve, co as Le, cp as Ae, cq as Oe, cr as Te, cs as Re, ct as Pe, cu as Ue, cv as je, cw as Fe, cx as st, cy as nt, ah as ae, l as at, cz as Ie, cA as it, m as rt, n as ot, o as lt, p as dt, q as ct, L as Ce, cB as fe, G as ut, cC as ht, cD as mt, cE as pt, bZ as ft, b_ as gt, b$ as Dt, c1 as xt, cF as Nt, cG as wt } from "./index-BMkn4K4E.js";
3
3
  import vt, { useRef as Ct, useEffect as oe, useState as N } from "react";
4
- import { a as Me } from "./use-visual-utils-DxigSU7y.js";
5
- import { u as yt } from "./use-role-aware-display-preferences-DOA8kcfK.js";
4
+ import { a as Me } from "./use-visual-utils-CKt4UblS.js";
5
+ import { u as yt } from "./use-role-aware-display-preferences-Db1iLmPN.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"),s=require("./index-CRJ97-41.js"),c=require("react"),le=require("./use-visual-utils-DX-4Hwoe.js"),he=require("./use-role-aware-display-preferences-1U-ed07h.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-C_RTjAMW.js"),c=require("react"),le=require("./use-visual-utils-AXuCdndV.js"),he=require("./use-role-aware-display-preferences-CqF1BR5w.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-CRJ97-41.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-C_RTjAMW.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-Cr-d0ray.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-BMkn4K4E.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 +1 @@
1
- "use strict";const a=require("./index-CRJ97-41.js"),g=require("react");function H(e){const n=e.toUpperCase().indexOf("WHERE"),t=e.toUpperCase().indexOf("GROUP BY"),r=e.toUpperCase().indexOf("LIMIT"),s=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(s!==-1&&(c=s),r!==-1&&r<c&&(c=r),n!==-1){const d=e.substring(0,n),o=e.substring(n);return`${d} {{ filters | where }} AND ${o.substring(6)}`}else if(t!==-1){const d=e.substring(0,t),o=e.substring(t);return`${d} {{ filters | where }} ${o}`}else{const d=e.substring(0,c),o=e.substring(c);return console.log("beforeClause",d),console.log("afterClause",o),o?`${d} {{ filters | where }} ${o}`:`${d.replace(/;$/,"")} {{ filters | where }}`}}function k(e){const[n,t]=g.useState(null),[r,s]=g.useState(null),c=a.useEnsureReactGlobals();return g.useEffect(()=>{if(!e||e.trim()===""){t(null),s(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 h=await import(l);if(typeof h.useChartStore!="function")throw new Error("useChartStore is not a function");t(()=>h.useChartStore),s(null)}catch(o){const l=o instanceof Error?o.message:"Unknown error";console.error("Failed to load remote chart store:",l),s(l),t(null)}})()},[e,c]),n}function Q(e,n){if(e.length===0)return"";const t=e.find(r=>{var s,c;return((s=r.customCardPreferences)==null?void 0:s.visualType)==="multiple"||!!((c=r.customCardPreferences)!=null&&c.dataInputCardIds)});if(t)return t.id;if(n){const r=e.find(s=>s.id===n);if(r){const s=r.tabTitle;if(s=="All__Header")return e[0].id;if(s&&s.endsWith("__Header")){const d=s.split("__")[0],o=e.find(l=>l.tabTitle===d);return o?o.id:e[0].id}return n}}return e[0].id}const z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:n,...t}=e;return t};async function W(e,n,t,r){if(!n||!t)throw new Error("Missing auth token or visual ID");const s=["resource-by-id","visual",t],c=r.getQueryData(s);if(c)return console.log("Using cached visual data for:",t),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",t);const d=a.ue.loading("Loading visual...",{position:"top-center"});try{const o=await fetch(`${e}/management/v1/visuals/${t}`,{headers:{Authorization:`Bearer ${n}`}});if(!o.ok)throw new Error("Failed to load visual");const l=await o.json();return r.setQueryData(s,l),a.ue.dismiss(d),{data:l,fromCache:!1}}catch(o){throw a.ue.dismiss(d),o}}function L(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,n){var c,d;const t=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!t)return!1;const r=L(t);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const s=(d=r.cards)==null?void 0:d.find(o=>o.id===r.activeCardId);return s?(a.setupEditorWithCard({...n,frame:r,card:s,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function Y(){var C;const{setCardSql:e}=a.useEditorActions(),n=a.useEditorStore(i=>i.frame),t=a.useEditorStore(i=>i.card),r=a.useEditorStore(i=>i.isDevMode),s=k(((C=t.customCardPreferences)==null?void 0:C.url)||""),c=a.useEditorStore(i=>i.selectedSchemaName),d=a.useEditorStore(i=>i.selectedDatamodelId),o=a.useEditorStore(i=>i.selectedDatabaseName),l=a.useEditorStore(i=>i.selectedTableName),h=a.useEditorStore(i=>i.selectedConnectionId),m=a.useEditorStore(i=>i.isShowingVisual),p=t.sql;return{getUpdatedFrame:g.useCallback(()=>{var I;let i=p;p&&!p.includes("{{")&&(i=H(p),e(i));const E=(I=s==null?void 0:s.getState())==null?void 0:I.settings,v={...t,dataSource:t.dataSource||{mode:"directSource"},lastSelectedSchema:c,lastSelectedDatamodelId:d,lastSelectedDatabase:o,lastSelectedTable:l,connectionId:h,sql:r?i:void 0,python:r?t.python:void 0,config:r?void 0:z(t.config),customCfg:m?t.customCfg:null,preferences:t.preferences,...E&&{customCardPreferences:{...t.customCardPreferences,settings:E}}},w=n.cards.map(S=>S.id===t.id?v:S);return{...n,cards:w,activeCardId:Q(w,n.activeCardId)}},[t,n,r,m,c,d,o,l,h,e,s,p])}}function J(){const{authToken:e,tokenProps:n}=a.useSemaphorContext(),t=a.useQueryClient(),r=a.useSelectedVisual(),{selectVisual:s}=a.useManagementActions(),{setFrame:c,setCard:d,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:i,setSelectedTableName:E,setSelectedDatamodelId:v,setFilterValues:w,setApplyFilters:I}=a.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:V,setSelectedFrameId:$,clearSelectedFrameId:A,addFrame:R,setIsDashboardPanelOpen:N}=a.useDashboardActions(),y=a.useDashboardStore(u=>u.selectedSheetId),O=a.useDashboardStore(u=>u.selectedFrameId),T=a.useDashboardStore(u=>u.dashboard),x=a.useDashboardStore(u=>u.filterValues),F=a.useVisualById((r==null?void 0:r.id)||"",{enabled:!!(r!=null&&r.id)&&!!(e!=null&&e.accessToken)}),j=g.useCallback(async u=>{try{s(u),A();const{data:b,fromCache:f}=await W(n.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t);if(!G(b,{setFrame:c,setCard:d,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:i,setSelectedTableName:E,setSelectedDatamodelId:v,setFilterValues:w,setApplyFilters:I,setIsDashboardEditing:S,setIsVisualEditing:V,dashboard:T,selectedSheetId:y,selectedFrameId:O,filterValues:x}))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,n.apiServiceUrl,t,s,c,d,S,V,o,l,h,m,p,D,C,i,E,v,w,I,A,T,y,O,x]),_=g.useCallback(async u=>{var b;try{if(s(u),!y)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:f,fromCache:B}=await W(n.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t),M=(f==null?void 0:f.frameObject)??((b=f==null?void 0:f.visual)==null?void 0:b.frameObject);if(!M)return{success:!1,error:"Visual has no frame data"};const U=L(M);if(!(U!=null&&U.cards)||U.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const P={...a.cloneLinkedFrameWithSourceMapping(U),visualId:u.id};return R(y,P,"end"),S(!0),$(P.id),N(!1),{success:!0,fromCache:B}}catch(f){return console.error("Error adding visual:",f),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,n.apiServiceUrl,t,s,y,R,S,$,N]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:j,handleAddLibraryVisual:_,getUpdatedFrame:Y().getUpdatedFrame,refetch:F.refetch}}exports.useRemoteChartStore=k;exports.useVisualUtils=J;
1
+ "use strict";const a=require("./index-C_RTjAMW.js"),g=require("react");function H(e){const n=e.toUpperCase().indexOf("WHERE"),t=e.toUpperCase().indexOf("GROUP BY"),r=e.toUpperCase().indexOf("LIMIT"),s=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(s!==-1&&(c=s),r!==-1&&r<c&&(c=r),n!==-1){const d=e.substring(0,n),o=e.substring(n);return`${d} {{ filters | where }} AND ${o.substring(6)}`}else if(t!==-1){const d=e.substring(0,t),o=e.substring(t);return`${d} {{ filters | where }} ${o}`}else{const d=e.substring(0,c),o=e.substring(c);return console.log("beforeClause",d),console.log("afterClause",o),o?`${d} {{ filters | where }} ${o}`:`${d.replace(/;$/,"")} {{ filters | where }}`}}function k(e){const[n,t]=g.useState(null),[r,s]=g.useState(null),c=a.useEnsureReactGlobals();return g.useEffect(()=>{if(!e||e.trim()===""){t(null),s(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 h=await import(l);if(typeof h.useChartStore!="function")throw new Error("useChartStore is not a function");t(()=>h.useChartStore),s(null)}catch(o){const l=o instanceof Error?o.message:"Unknown error";console.error("Failed to load remote chart store:",l),s(l),t(null)}})()},[e,c]),n}function Q(e,n){if(e.length===0)return"";const t=e.find(r=>{var s,c;return((s=r.customCardPreferences)==null?void 0:s.visualType)==="multiple"||!!((c=r.customCardPreferences)!=null&&c.dataInputCardIds)});if(t)return t.id;if(n){const r=e.find(s=>s.id===n);if(r){const s=r.tabTitle;if(s=="All__Header")return e[0].id;if(s&&s.endsWith("__Header")){const d=s.split("__")[0],o=e.find(l=>l.tabTitle===d);return o?o.id:e[0].id}return n}}return e[0].id}const z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:n,...t}=e;return t};async function W(e,n,t,r){if(!n||!t)throw new Error("Missing auth token or visual ID");const s=["resource-by-id","visual",t],c=r.getQueryData(s);if(c)return console.log("Using cached visual data for:",t),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",t);const d=a.ue.loading("Loading visual...",{position:"top-center"});try{const o=await fetch(`${e}/management/v1/visuals/${t}`,{headers:{Authorization:`Bearer ${n}`}});if(!o.ok)throw new Error("Failed to load visual");const l=await o.json();return r.setQueryData(s,l),a.ue.dismiss(d),{data:l,fromCache:!1}}catch(o){throw a.ue.dismiss(d),o}}function L(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,n){var c,d;const t=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!t)return!1;const r=L(t);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const s=(d=r.cards)==null?void 0:d.find(o=>o.id===r.activeCardId);return s?(a.setupEditorWithCard({...n,frame:r,card:s,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function Y(){var C;const{setCardSql:e}=a.useEditorActions(),n=a.useEditorStore(i=>i.frame),t=a.useEditorStore(i=>i.card),r=a.useEditorStore(i=>i.isDevMode),s=k(((C=t.customCardPreferences)==null?void 0:C.url)||""),c=a.useEditorStore(i=>i.selectedSchemaName),d=a.useEditorStore(i=>i.selectedDatamodelId),o=a.useEditorStore(i=>i.selectedDatabaseName),l=a.useEditorStore(i=>i.selectedTableName),h=a.useEditorStore(i=>i.selectedConnectionId),m=a.useEditorStore(i=>i.isShowingVisual),p=t.sql;return{getUpdatedFrame:g.useCallback(()=>{var I;let i=p;p&&!p.includes("{{")&&(i=H(p),e(i));const E=(I=s==null?void 0:s.getState())==null?void 0:I.settings,v={...t,dataSource:t.dataSource||{mode:"directSource"},lastSelectedSchema:c,lastSelectedDatamodelId:d,lastSelectedDatabase:o,lastSelectedTable:l,connectionId:h,sql:r?i:void 0,python:r?t.python:void 0,config:r?void 0:z(t.config),customCfg:m?t.customCfg:null,preferences:t.preferences,...E&&{customCardPreferences:{...t.customCardPreferences,settings:E}}},w=n.cards.map(S=>S.id===t.id?v:S);return{...n,cards:w,activeCardId:Q(w,n.activeCardId)}},[t,n,r,m,c,d,o,l,h,e,s,p])}}function J(){const{authToken:e,tokenProps:n}=a.useSemaphorContext(),t=a.useQueryClient(),r=a.useSelectedVisual(),{selectVisual:s}=a.useManagementActions(),{setFrame:c,setCard:d,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:i,setSelectedTableName:E,setSelectedDatamodelId:v,setFilterValues:w,setApplyFilters:I}=a.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:V,setSelectedFrameId:$,clearSelectedFrameId:A,addFrame:R,setIsDashboardPanelOpen:N}=a.useDashboardActions(),y=a.useDashboardStore(u=>u.selectedSheetId),O=a.useDashboardStore(u=>u.selectedFrameId),T=a.useDashboardStore(u=>u.dashboard),x=a.useDashboardStore(u=>u.filterValues),F=a.useVisualById((r==null?void 0:r.id)||"",{enabled:!!(r!=null&&r.id)&&!!(e!=null&&e.accessToken)}),j=g.useCallback(async u=>{try{s(u),A();const{data:b,fromCache:f}=await W(n.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t);if(!G(b,{setFrame:c,setCard:d,setIsDevMode:o,initializeModeDrafts:l,setActiveTabCardId:h,updateDataSource:m,setQueryResultColumns:p,setSelectedConnectionId:D,setSelectedDatabaseName:C,setSelectedSchemaName:i,setSelectedTableName:E,setSelectedDatamodelId:v,setFilterValues:w,setApplyFilters:I,setIsDashboardEditing:S,setIsVisualEditing:V,dashboard:T,selectedSheetId:y,selectedFrameId:O,filterValues:x}))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,n.apiServiceUrl,t,s,c,d,S,V,o,l,h,m,p,D,C,i,E,v,w,I,A,T,y,O,x]),_=g.useCallback(async u=>{var b;try{if(s(u),!y)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:f,fromCache:B}=await W(n.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,t),M=(f==null?void 0:f.frameObject)??((b=f==null?void 0:f.visual)==null?void 0:b.frameObject);if(!M)return{success:!1,error:"Visual has no frame data"};const U=L(M);if(!(U!=null&&U.cards)||U.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const P={...a.cloneLinkedFrameWithSourceMapping(U),visualId:u.id};return R(y,P,"end"),S(!0),$(P.id),N(!1),{success:!0,fromCache:B}}catch(f){return console.error("Error adding visual:",f),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,n.apiServiceUrl,t,s,y,R,S,$,N]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:j,handleAddLibraryVisual:_,getUpdatedFrame:Y().getUpdatedFrame,refetch:F.refetch}}exports.useRemoteChartStore=k;exports.useVisualUtils=J;
@@ -1,4 +1,4 @@
1
- import { T as G, l as Y, U as J, V as K, W as Z, Y as _, Z as X, u as v, _ as q, $ as ee, I as V, a0 as te, a1 as f } from "./index-Cr-d0ray.js";
1
+ import { T as G, l as Y, U as J, V as K, W as Z, Y as _, Z as X, u as v, _ as q, $ as ee, I as V, a0 as te, a1 as f } from "./index-BMkn4K4E.js";
2
2
  import { useState as j, useEffect as re, useCallback as D } from "react";
3
3
  function se(e) {
4
4
  const a = e.toUpperCase().indexOf("WHERE"), t = e.toUpperCase().indexOf("GROUP BY"), r = e.toUpperCase().indexOf("LIMIT"), s = e.toUpperCase().indexOf("ORDER BY");
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-CRJ97-41.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-C_RTjAMW.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,6 +1,6 @@
1
- import { D as a } from "../chunks/index-Cr-d0ray.js";
2
- import { E as s } from "../chunks/common-types-DhqlRVrq.js";
1
+ import { D as a } from "../chunks/index-BMkn4K4E.js";
2
+ import { EMPTY_SELECTION as e } from "../types/index.js";
3
3
  export {
4
4
  a as Dashboard,
5
- s as EMPTY_SELECTION
5
+ e as EMPTY_SELECTION
6
6
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-CRJ97-41.js"),T=require("./chunks/common-types-CfJLrTJd.js"),y=require("./chunks/dashboard-summary-settings-dialog-Dlzv-d9Z.js"),t=require("react/jsx-runtime"),g=require("react"),v=require("./chunks/resource-management-panel-Bq9zRYsk.js"),P=require("./types/index.cjs"),M=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");const m=require("./chunks/notification-bell-CyZx_uZ1.js"),E=require("./chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js");function I(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const A=I(g);function _(r){const{displayPreferences:a,...n}=r,i={...n,id:r.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:i,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:t.jsx(e.Container,{type:"visual",...i,children:t.jsx(F,{cardId:r.cardId})})})})]})})}function F({cardId:r}){const a=e.useDashboardStore(o=>{var u;return(u=o.dashboard)==null?void 0:u.sheets}),{card:n,frame:i}=g.useMemo(()=>{const o=a==null?void 0:a.flatMap(s=>s.frames),u=o==null?void 0:o.flatMap(s=>s==null?void 0:s.cards),d=u==null?void 0:u.find(s=>(s==null?void 0:s.id)===r),l=o==null?void 0:o.find(s=>{var p;return(p=s==null?void 0:s.cards)==null?void 0:p.find(h=>(h==null?void 0:h.id)===r)});return{card:d,frame:l}},[a,r]);return!n||!i?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:u})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:i})})})}function R({name:r,items:a,value:n,onChange:i,isLoading:o,isError:u,refetch:d,className:l,icon:s,showNone:p=!1}){const h=A.useRef(null),[D,f]=A.useState(!1),[S,b]=A.useState("100%"),C=p?[...a||[],{id:"none",name:"None"}]:a;A.useLayoutEffect(()=>{h.current&&b(h.current.offsetWidth)},[]);function N(){var c;return o?"Loading...":u?"Error":n?(c=a==null?void 0:a.find(x=>x.id===n))==null?void 0:c.name:`Select ${r}`}function j(c,x){i(x),f(!1)}return t.jsxs(e.Popover,{open:D,onOpenChange:f,children:[t.jsx(e.PopoverTrigger,{asChild:!0,children:t.jsxs(e.Button,{ref:h,variant:"outline",role:"combobox","aria-expanded":D,className:e.cn("flex h-9 w-full justify-between",l),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[s&&t.jsx("div",{className:"mr-2",children:s}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:N()})]}),t.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:S},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:d,children:t.jsx(e.RefreshCw,{className:e.cn("size-3.5 opacity-50",o&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:C==null?void 0:C.map(c=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:c.name,onSelect:x=>j(x,c.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(e.Check,{className:e.cn("size-4",n===c.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:c.name,children:c.name})]})},c.id))})]})]})})]})}function w({triggerButtonClassName:r,variant:a="ghost"}){const[n,i]=g.useState(!1),o=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.id}),u=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.title});return o?t.jsxs(t.Fragment,{children:[t.jsx(e.IconButton,{tooltip:"Schedule Dashboard",className:e.cn("h-7 p-2",r),buttonProps:{variant:a},onClick:()=>i(!0),children:t.jsx(e.Clock,{className:"size-4"})}),t.jsx(e.EmailScheduleDialog,{open:n,onOpenChange:i,dashboardId:o,dashboardName:u})]}):null}function k(r,a){g.useEffect(()=>(r&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,a])}function L(){var u,d;const{quotasQuery:r,usageQuery:a}=e.useAlertQuotas(),n=((u=r.data)==null?void 0:u.quotas)||[],i=((d=a.data)==null?void 0:d.usage)||[],o=new Map(i.map(l=>[l.tenantId||"org",l]));return t.jsxs("div",{className:"space-y-4 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Alert Quotas"}),t.jsx(e.Button,{variant:"outline",size:"sm",onClick:()=>{r.refetch(),a.refetch()},children:"Refresh"})]}),r.isLoading||a.isLoading?t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading quota usage..."}):null,t.jsx("div",{className:"overflow-hidden rounded-lg border",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-muted/40",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Tenant"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Active Alerts"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Active"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Min Cadence"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Context Sources"})]})}),t.jsx("tbody",{children:n.map(l=>{const s=l.tenantId||"org",p=o.get(s);return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-2",children:s}),t.jsx("td",{className:"px-3 py-2",children:(p==null?void 0:p.activeAlerts)??0}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxActiveAlerts}),t.jsxs("td",{className:"px-3 py-2",children:[l.policy.minCadenceMinutes," min"]}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxContextSources})]},s)})})]})})]})}exports.AlertCreationDialog=e.AlertCreationDialog;exports.AlertManagementPage=e.AlertManagementPage;exports.AlertsApiError=e.AlertsApiError;exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.CardAlertIndicator=e.CardAlertIndicator;exports.CardSummary=e.CardSummary;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.EmailScheduleDialog=e.EmailScheduleDialog;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.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.backtestAlert=e.backtestAlert;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createAlert=e.createAlert;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.deleteAlert=e.deleteAlert;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;exports.getAlert=e.getAlert;exports.getAlertContextSources=e.getAlertContextSources;exports.getAlertHistory=e.getAlertHistory;exports.getAlertQuotaUsage=e.getAlertQuotaUsage;exports.getAlertRunDeliveries=e.getAlertRunDeliveries;exports.getAlertRunSteps=e.getAlertRunSteps;exports.getAlertRuns=e.getAlertRuns;exports.getAlertState=e.getAlertState;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.interpretAlertContext=e.interpretAlertContext;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.listAlertQuotas=e.listAlertQuotas;exports.listAlerts=e.listAlerts;exports.previewAlertDeliverable=e.previewAlertDeliverable;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.triggerAlertNow=e.triggerAlertNow;exports.updateAlert=e.updateAlert;exports.updateAlertContextSources=e.updateAlertContextSources;exports.updateAlertQuota=e.updateAlertQuota;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useAlertActions=e.useAlertActions;exports.useAlertBacktest=e.useAlertBacktest;exports.useAlertContextBuilder=e.useAlertContextBuilder;exports.useAlertDeliveries=e.useAlertDeliveries;exports.useAlertDetail=e.useAlertDetail;exports.useAlertDraft=e.useAlertDraft;exports.useAlertFilters=e.useAlertFilters;exports.useAlertHistory=e.useAlertHistory;exports.useAlertQuotas=e.useAlertQuotas;exports.useAlertRuns=e.useAlertRuns;exports.useAlertState=e.useAlertState;exports.useAlertStore=e.useAlertStore;exports.useAlerts=e.useAlerts;exports.useAlertsBootstrap=e.useAlertsBootstrap;exports.useAlertsById=e.useAlertsById;exports.useAlertsForCard=e.useAlertsForCard;exports.useCard=e.useCard;exports.useCardAlertMap=e.useCardAlertMap;exports.useCardSummary=e.useCardSummary;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.useDashboardSummary=e.useDashboardSummary;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.useSelectedAlertId=e.useSelectedAlertId;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=T.EMPTY_SELECTION;exports.CalendarPreferencesDialog=y.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=y.DashboardSummarySettingsDialog;exports.ResourceManagementPanel=v.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=P.DEFAULT_CALENDAR_CONTEXT;exports.useDebouncedDirtyCheck=M.useDebouncedDirtyCheck;exports.AdvancedModeToggle=m.AdvancedModeToggle;exports.ExportNotificationItem=m.ExportNotificationItem;exports.ExportNotificationList=m.ExportNotificationList;exports.NotificationBell=m.NotificationBell;exports.UnsavedChangesAlert=m.UnsavedChangesAlert;exports.VisualEditingControls=m.VisualEditingControls;exports.useExportPolling=m.useExportPolling;exports.useExportRecovery=m.useExportRecovery;exports.usePristineSnapshotInitializer=m.usePristineSnapshotInitializer;exports.normalizeDashboardForDirtyCheck=E.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=E.serializeDashboardForDirtyCheck;exports.Combobox=R;exports.ScheduleDashboard=w;exports.TenantQuotaPage=L;exports.Visual=_;exports.useExposePrintState=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-C_RTjAMW.js"),D=require("./types/index.cjs"),E=require("./chunks/dashboard-summary-settings-dialog-CWmq1rnL.js"),t=require("react/jsx-runtime"),C=require("react"),v=require("./chunks/resource-management-panel-QdAeim78.js"),P=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");const p=require("./chunks/notification-bell-DSShVmWj.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js");function _(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const A=_(C);function M(r){const{displayPreferences:a,...n}=r,i={...n,id:r.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:i,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:r.cardId}),t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:t.jsx(e.Container,{type:"visual",...i,children:t.jsx(I,{cardId:r.cardId})})})})]})})}function I({cardId:r}){const a=e.useDashboardStore(o=>{var u;return(u=o.dashboard)==null?void 0:u.sheets}),{card:n,frame:i}=C.useMemo(()=>{const o=a==null?void 0:a.flatMap(s=>s.frames),u=o==null?void 0:o.flatMap(s=>s==null?void 0:s.cards),d=u==null?void 0:u.find(s=>(s==null?void 0:s.id)===r),l=o==null?void 0:o.find(s=>{var m;return(m=s==null?void 0:s.cards)==null?void 0:m.find(h=>(h==null?void 0:h.id)===r)});return{card:d,frame:l}},[a,r]);return!n||!i?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${r}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:u})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:i})})})}function F({name:r,items:a,value:n,onChange:i,isLoading:o,isError:u,refetch:d,className:l,icon:s,showNone:m=!1}){const h=A.useRef(null),[f,y]=A.useState(!1),[b,N]=A.useState("100%"),g=m?[...a||[],{id:"none",name:"None"}]:a;A.useLayoutEffect(()=>{h.current&&N(h.current.offsetWidth)},[]);function T(){var c;return o?"Loading...":u?"Error":n?(c=a==null?void 0:a.find(x=>x.id===n))==null?void 0:c.name:`Select ${r}`}function j(c,x){i(x),y(!1)}return t.jsxs(e.Popover,{open:f,onOpenChange:y,children:[t.jsx(e.PopoverTrigger,{asChild:!0,children:t.jsxs(e.Button,{ref:h,variant:"outline",role:"combobox","aria-expanded":f,className:e.cn("flex h-9 w-full justify-between",l),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[s&&t.jsx("div",{className:"mr-2",children:s}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:T()})]}),t.jsx(e.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(e.PopoverContent,{className:"w-full p-0",style:{minWidth:b},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:d,children:t.jsx(e.RefreshCw,{className:e.cn("size-3.5 opacity-50",o&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",r==null?void 0:r.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:g==null?void 0:g.map(c=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:c.name,onSelect:x=>j(x,c.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(e.Check,{className:e.cn("size-4",n===c.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:c.name,children:c.name})]})},c.id))})]})]})})]})}function R({triggerButtonClassName:r,variant:a="ghost"}){const[n,i]=C.useState(!1),o=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.id}),u=e.useDashboardStore(d=>{var l;return(l=d.dashboard)==null?void 0:l.title});return o?t.jsxs(t.Fragment,{children:[t.jsx(e.IconButton,{tooltip:"Schedule Dashboard",className:e.cn("h-7 p-2",r),buttonProps:{variant:a},onClick:()=>i(!0),children:t.jsx(e.Clock,{className:"size-4"})}),t.jsx(e.EmailScheduleDialog,{open:n,onOpenChange:i,dashboardId:o,dashboardName:u})]}):null}function w(r,a){C.useEffect(()=>(r&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{r&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[r,a])}function k(){var u,d;const{quotasQuery:r,usageQuery:a}=e.useAlertQuotas(),n=((u=r.data)==null?void 0:u.quotas)||[],i=((d=a.data)==null?void 0:d.usage)||[],o=new Map(i.map(l=>[l.tenantId||"org",l]));return t.jsxs("div",{className:"space-y-4 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Alert Quotas"}),t.jsx(e.Button,{variant:"outline",size:"sm",onClick:()=>{r.refetch(),a.refetch()},children:"Refresh"})]}),r.isLoading||a.isLoading?t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading quota usage..."}):null,t.jsx("div",{className:"overflow-hidden rounded-lg border",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-muted/40",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Tenant"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Active Alerts"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Active"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Min Cadence"}),t.jsx("th",{className:"px-3 py-2 text-left font-medium",children:"Max Context Sources"})]})}),t.jsx("tbody",{children:n.map(l=>{const s=l.tenantId||"org",m=o.get(s);return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-2",children:s}),t.jsx("td",{className:"px-3 py-2",children:(m==null?void 0:m.activeAlerts)??0}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxActiveAlerts}),t.jsxs("td",{className:"px-3 py-2",children:[l.policy.minCadenceMinutes," min"]}),t.jsx("td",{className:"px-3 py-2",children:l.policy.maxContextSources})]},s)})})]})})]})}exports.AlertCreationDialog=e.AlertCreationDialog;exports.AlertManagementPage=e.AlertManagementPage;exports.AlertsApiError=e.AlertsApiError;exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.CardAlertIndicator=e.CardAlertIndicator;exports.CardSummary=e.CardSummary;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.EmailScheduleDialog=e.EmailScheduleDialog;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.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.backtestAlert=e.backtestAlert;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createAlert=e.createAlert;exports.createEmptyKpiConfig=e.createEmptyKpiConfig;exports.createExport=e.createExport;exports.createSqlGenConfig=e.createSqlGenConfig;exports.deleteAlert=e.deleteAlert;exports.downloadPdf=e.downloadPdf;exports.emitDashboardLoad=e.emitDashboardLoad;exports.emitDashboardUnload=e.emitDashboardUnload;exports.fmt=e.fmt;exports.formatFileSize=e.formatFileSize;exports.getAlert=e.getAlert;exports.getAlertContextSources=e.getAlertContextSources;exports.getAlertHistory=e.getAlertHistory;exports.getAlertQuotaUsage=e.getAlertQuotaUsage;exports.getAlertRunDeliveries=e.getAlertRunDeliveries;exports.getAlertRunSteps=e.getAlertRunSteps;exports.getAlertRuns=e.getAlertRuns;exports.getAlertState=e.getAlertState;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.interpretAlertContext=e.interpretAlertContext;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.listAlertQuotas=e.listAlertQuotas;exports.listAlerts=e.listAlerts;exports.previewAlertDeliverable=e.previewAlertDeliverable;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.triggerAlertNow=e.triggerAlertNow;exports.updateAlert=e.updateAlert;exports.updateAlertContextSources=e.updateAlertContextSources;exports.updateAlertQuota=e.updateAlertQuota;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useAlertActions=e.useAlertActions;exports.useAlertBacktest=e.useAlertBacktest;exports.useAlertContextBuilder=e.useAlertContextBuilder;exports.useAlertDeliveries=e.useAlertDeliveries;exports.useAlertDetail=e.useAlertDetail;exports.useAlertDraft=e.useAlertDraft;exports.useAlertFilters=e.useAlertFilters;exports.useAlertHistory=e.useAlertHistory;exports.useAlertQuotas=e.useAlertQuotas;exports.useAlertRuns=e.useAlertRuns;exports.useAlertState=e.useAlertState;exports.useAlertStore=e.useAlertStore;exports.useAlerts=e.useAlerts;exports.useAlertsBootstrap=e.useAlertsBootstrap;exports.useAlertsById=e.useAlertsById;exports.useAlertsForCard=e.useAlertsForCard;exports.useCard=e.useCard;exports.useCardAlertMap=e.useCardAlertMap;exports.useCardSummary=e.useCardSummary;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.useDashboardSummary=e.useDashboardSummary;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.useSelectedAlertId=e.useSelectedAlertId;exports.useTextFilterHook=e.useTextFilterHook;exports.DEFAULT_CALENDAR_CONTEXT=D.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=D.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.EMPTY_SELECTION=D.EMPTY_SELECTION;exports.CalendarPreferencesDialog=E.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=E.DashboardSummarySettingsDialog;exports.ResourceManagementPanel=v.ResourceManagementPanel;exports.useDebouncedDirtyCheck=P.useDebouncedDirtyCheck;exports.AdvancedModeToggle=p.AdvancedModeToggle;exports.ExportNotificationItem=p.ExportNotificationItem;exports.ExportNotificationList=p.ExportNotificationList;exports.NotificationBell=p.NotificationBell;exports.UnsavedChangesAlert=p.UnsavedChangesAlert;exports.VisualEditingControls=p.VisualEditingControls;exports.useExportPolling=p.useExportPolling;exports.useExportRecovery=p.useExportRecovery;exports.usePristineSnapshotInitializer=p.usePristineSnapshotInitializer;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=F;exports.ScheduleDashboard=R;exports.TenantQuotaPage=k;exports.Visual=M;exports.useExposePrintState=w;
package/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
- import { a2 as D, a3 as w, a4 as _, a5 as I, a6 as M, a7 as R, a8 as F, u as x, a9 as y, aa as k, P as L, s as B, B as E, c as f, ab as Q, t as O, v as z, w as U, ac as N, ad as q, x as H, y as V, z as j, A as W, E as G, ae as K, af as Y, ag as X } from "./chunks/index-Cr-d0ray.js";
2
- import { a_ as pe, aZ as he, bI as be, b0 as fe, a$ as Ae, az as xe, b1 as Ce, D as ge, ax as ye, ar as De, bO as Ee, b5 as Ne, aj as Se, am as ve, am as Te, an as Pe, ay as we, a as _e, bA as Ie, bN as Me, au as Re, br as Fe, bo as ke, bJ as Le, bc as Be, bt as Qe, aw as Oe, as as ze, at as Ue, b6 as qe, bR as He, bq as Ve, bC as je, bx as We, bG as Ge, by as Ke, bz as Ye, bw as Xe, bv as $e, be as Je, bM as Ze, bL as ea, bK as aa, bd as sa, bh as ta, bi as ra, bb as oa, bB as na, av as la, ba as ia, b3 as da, b4 as ca, b2 as ua, bf as ma, b9 as pa, bQ as ha, bP as ba, b8 as fa, b7 as Aa, bF as xa, bp as Ca, bE as ga, bj as ya, bg as Da, bu as Ea, bs as Na, bD as Sa, bH as va, aG as Ta, aD as Pa, aS as wa, aQ as _a, aP as Ia, aO as Ma, aK as Ra, aY as Fa, aX as ka, aN as La, aM as Ba, aL as Qa, aR as Oa, aI as za, aJ as Ua, aT as qa, aV as Ha, aq as Va, aU as ja, aB as Wa, bl as Ga, bn as Ka, bm as Ya, Z as Xa, ap as $a, ai as Ja, aA as Za, aC as es, ak as as, Y as ss, bk as ts, a1 as rs, aF as os, aE as ns, aH as ls, ah as is, ao as ds, aW as cs, al as us } from "./chunks/index-Cr-d0ray.js";
3
- import { E as ps } from "./chunks/common-types-DhqlRVrq.js";
4
- import { C as bs, D as fs } from "./chunks/dashboard-summary-settings-dialog-CQISZPzc.js";
1
+ import { a2 as D, a3 as _, a4 as w, a5 as I, a6 as M, a7 as R, a8 as F, u as C, a9 as y, aa as k, P as L, s as B, B as E, c as f, ab as O, t as Q, v as z, w as U, ac as N, ad as q, x as H, y as V, z as j, A as W, E as G, ae as K, af as Y, ag as X } from "./chunks/index-BMkn4K4E.js";
2
+ import { a_ as pe, aZ as he, bI as be, b0 as fe, a$ as Ae, az as Ce, b1 as xe, D as ge, ax as ye, ar as De, bO as Ee, b5 as Ne, aj as Se, am as ve, am as Te, an as Pe, ay as _e, a as we, bA as Ie, bN as Me, au as Re, br as Fe, bo as ke, bJ as Le, bc as Be, bt as Oe, aw as Qe, as as ze, at as Ue, b6 as qe, bR as He, bq as Ve, bC as je, bx as We, bG as Ge, by as Ke, bz as Ye, bw as Xe, bv as $e, be as Je, bM as Ze, bL as ea, bK as aa, bd as sa, bh as ta, bi as ra, bb as oa, bB as na, av as la, ba as ia, b3 as da, b4 as ca, b2 as ua, bf as ma, b9 as pa, bQ as ha, bP as ba, b8 as fa, b7 as Aa, bF as Ca, bp as xa, bE as ga, bj as ya, bg as Da, bu as Ea, bs as Na, bD as Sa, bH as va, aG as Ta, aD as Pa, aS as _a, aQ as wa, aP as Ia, aO as Ma, aK as Ra, aY as Fa, aX as ka, aN as La, aM as Ba, aL as Oa, aR as Qa, aI as za, aJ as Ua, aT as qa, aV as Ha, aq as Va, aU as ja, aB as Wa, bl as Ga, bn as Ka, bm as Ya, Z as Xa, ap as $a, ai as Ja, aA as Za, aC as es, ak as as, Y as ss, bk as ts, a1 as rs, aF as os, aE as ns, aH as ls, ah as is, ao as ds, aW as cs, al as us } from "./chunks/index-BMkn4K4E.js";
3
+ import { DEFAULT_CALENDAR_CONTEXT as ps, DEFAULT_SEMANTIC_DOMAIN_ACCESS as hs, EMPTY_SELECTION as bs } from "./types/index.js";
4
+ import { C as As, D as Cs } from "./chunks/dashboard-summary-settings-dialog-B3eWK66q.js";
5
5
  import { jsx as e, jsxs as n, Fragment as $ } from "react/jsx-runtime";
6
6
  import * as b from "react";
7
7
  import { useMemo as J, useState as Z, useEffect as ee } from "react";
8
- import { ResourceManagementPanel as xs } from "./chunks/resource-management-panel-rmEMdbbS.js";
9
- import { DEFAULT_CALENDAR_CONTEXT as gs } from "./types/index.js";
8
+ import { ResourceManagementPanel as gs } from "./chunks/resource-management-panel-LBCXiHZk.js";
10
9
  import { u as Ds } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
11
10
  import "react-dom";
12
- import { A as Ns, a as Ss, E as vs, N as Ts, U as Ps, V as ws, u as _s, b as Is, c as Ms } from "./chunks/notification-bell-_OADjyy7.js";
11
+ import { A as Ns, a as Ss, E as vs, N as Ts, U as Ps, V as _s, u as ws, b as Is, c as Ms } from "./chunks/notification-bell-DHK6s4Om.js";
13
12
  import { n as Fs, s as ks } from "./chunks/normalize-dashboard-for-dirty-check-Bn27S0PN.js";
14
13
  function ne(a) {
15
14
  const { displayPreferences: s, ...i } = a, d = {
@@ -17,13 +16,13 @@ function ne(a) {
17
16
  id: a.dashboardId
18
17
  // override the id to the dashboard id so that the dashboard is not loaded
19
18
  };
20
- return /* @__PURE__ */ e(D, { FallbackComponent: w, children: /* @__PURE__ */ n(_, { dashboardProps: d, children: [
19
+ return /* @__PURE__ */ e(D, { FallbackComponent: _, children: /* @__PURE__ */ n(w, { dashboardProps: d, children: [
21
20
  /* @__PURE__ */ e(I, { componentType: "visual", componentId: a.cardId }),
22
21
  /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(R, { displayPreferences: s, children: /* @__PURE__ */ e(F, { type: "visual", ...d, children: /* @__PURE__ */ e(ae, { cardId: a.cardId }) }) }) })
23
22
  ] }) });
24
23
  }
25
24
  function ae({ cardId: a }) {
26
- const s = x((r) => {
25
+ const s = C((r) => {
27
26
  var l;
28
27
  return (l = r.dashboard) == null ? void 0 : l.sheets;
29
28
  }), { card: i, frame: d } = J(() => {
@@ -73,7 +72,7 @@ function le({
73
72
  icon: t,
74
73
  showNone: m = !1
75
74
  }) {
76
- const p = b.useRef(null), [C, g] = b.useState(!1), [S, v] = b.useState("100%"), A = m ? [...s || [], { id: "none", name: "None" }] : s;
75
+ const p = b.useRef(null), [x, g] = b.useState(!1), [S, v] = b.useState("100%"), A = m ? [...s || [], { id: "none", name: "None" }] : s;
77
76
  b.useLayoutEffect(() => {
78
77
  p.current && v(p.current.offsetWidth);
79
78
  }, []);
@@ -84,26 +83,26 @@ function le({
84
83
  function P(u, h) {
85
84
  d(h), g(!1);
86
85
  }
87
- return /* @__PURE__ */ n(L, { open: C, onOpenChange: g, children: [
86
+ return /* @__PURE__ */ n(L, { open: x, onOpenChange: g, children: [
88
87
  /* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ n(
89
88
  E,
90
89
  {
91
90
  ref: p,
92
91
  variant: "outline",
93
92
  role: "combobox",
94
- "aria-expanded": C,
93
+ "aria-expanded": x,
95
94
  className: f("flex h-9 w-full justify-between", o),
96
95
  children: [
97
96
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
98
97
  t && /* @__PURE__ */ e("div", { className: "mr-2", children: t }),
99
98
  /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: T() })
100
99
  ] }),
101
- /* @__PURE__ */ e(Q, { className: "size-4 opacity-50" })
100
+ /* @__PURE__ */ e(O, { className: "size-4 opacity-50" })
102
101
  ]
103
102
  }
104
103
  ) }),
105
104
  /* @__PURE__ */ e(
106
- O,
105
+ Q,
107
106
  {
108
107
  className: "w-full p-0",
109
108
  style: { minWidth: S },
@@ -157,10 +156,10 @@ function ie({
157
156
  triggerButtonClassName: a,
158
157
  variant: s = "ghost"
159
158
  }) {
160
- const [i, d] = Z(!1), r = x((c) => {
159
+ const [i, d] = Z(!1), r = C((c) => {
161
160
  var o;
162
161
  return (o = c.dashboard) == null ? void 0 : o.id;
163
- }), l = x((c) => {
162
+ }), l = C((c) => {
164
163
  var o;
165
164
  return (o = c.dashboard) == null ? void 0 : o.title;
166
165
  });
@@ -242,36 +241,37 @@ export {
242
241
  he as AlertManagementPage,
243
242
  be as AlertsApiError,
244
243
  fe as CALCULATED_FIELD_ENTITY_MARKER,
245
- bs as CalendarPreferencesDialog,
244
+ As as CalendarPreferencesDialog,
246
245
  Ae as CardAlertIndicator,
247
- xe as CardSummary,
246
+ Ce as CardSummary,
248
247
  le as Combobox,
249
- Ce as DATE_FORMAT_VALUES,
250
- gs as DEFAULT_CALENDAR_CONTEXT,
248
+ xe as DATE_FORMAT_VALUES,
249
+ ps as DEFAULT_CALENDAR_CONTEXT,
250
+ hs as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
251
251
  ge as Dashboard,
252
252
  ye as DashboardExportDialog,
253
- fs as DashboardSummarySettingsDialog,
253
+ Cs as DashboardSummarySettingsDialog,
254
254
  De as DashboardWC,
255
- ps as EMPTY_SELECTION,
255
+ bs as EMPTY_SELECTION,
256
256
  Y as EmailScheduleDialog,
257
257
  Ee as ExportError,
258
258
  Ss as ExportNotificationItem,
259
259
  vs as ExportNotificationList,
260
260
  Ts as NotificationBell,
261
261
  Ne as PivotMarkerEnum,
262
- xs as ResourceManagementPanel,
262
+ gs as ResourceManagementPanel,
263
263
  Se as ResourceType,
264
264
  ie as ScheduleDashboard,
265
- _ as SemaphorContextProvider,
265
+ w as SemaphorContextProvider,
266
266
  ve as SemaphorDataProvider,
267
267
  Te as SemaphorQueryClient,
268
268
  Pe as ShareDialog,
269
- we as SummaryCard,
270
- _e as Surfboard,
269
+ _e as SummaryCard,
270
+ we as Surfboard,
271
271
  ce as TenantQuotaPage,
272
272
  Ps as UnsavedChangesAlert,
273
273
  ne as Visual,
274
- ws as VisualEditingControls,
274
+ _s as VisualEditingControls,
275
275
  Ie as backtestAlert,
276
276
  Me as cancelExport,
277
277
  Re as cloneDeep,
@@ -279,8 +279,8 @@ export {
279
279
  ke as createEmptyKpiConfig,
280
280
  Le as createExport,
281
281
  Be as createSqlGenConfig,
282
- Qe as deleteAlert,
283
- Oe as downloadPdf,
282
+ Oe as deleteAlert,
283
+ Qe as downloadPdf,
284
284
  ze as emitDashboardLoad,
285
285
  Ue as emitDashboardUnload,
286
286
  qe as fmt,
@@ -313,8 +313,8 @@ export {
313
313
  ba as isExportInProgress,
314
314
  fa as isNumberDataType,
315
315
  Aa as isTextDataType,
316
- xa as listAlertQuotas,
317
- Ca as listAlerts,
316
+ Ca as listAlertQuotas,
317
+ xa as listAlerts,
318
318
  Fs as normalizeDashboardForDirtyCheck,
319
319
  ga as previewAlertDeliverable,
320
320
  ya as resolveDataType,
@@ -326,8 +326,8 @@ export {
326
326
  va as updateAlertQuota,
327
327
  Ta as useActiveExports,
328
328
  Pa as useAddNewFrame,
329
- wa as useAlertActions,
330
- _a as useAlertBacktest,
329
+ _a as useAlertActions,
330
+ wa as useAlertBacktest,
331
331
  Ia as useAlertContextBuilder,
332
332
  Ma as useAlertDeliveries,
333
333
  Ra as useAlertDetail,
@@ -336,8 +336,8 @@ export {
336
336
  La as useAlertHistory,
337
337
  X as useAlertQuotas,
338
338
  Ba as useAlertRuns,
339
- Qa as useAlertState,
340
- Oa as useAlertStore,
339
+ Oa as useAlertState,
340
+ Qa as useAlertStore,
341
341
  za as useAlerts,
342
342
  Ua as useAlertsBootstrap,
343
343
  qa as useAlertsById,
@@ -351,7 +351,7 @@ export {
351
351
  Xa as useDashboardActions,
352
352
  $a as useDashboardById,
353
353
  Ja as useDashboardQuery,
354
- x as useDashboardStore,
354
+ C as useDashboardStore,
355
355
  Za as useDashboardSummary,
356
356
  es as useDataColumns,
357
357
  as as useDateFilterHook,
@@ -360,7 +360,7 @@ export {
360
360
  ts as useEditorAside,
361
361
  rs as useEditorStore,
362
362
  os as useExportActions,
363
- _s as useExportPolling,
363
+ ws as useExportPolling,
364
364
  Is as useExportRecovery,
365
365
  ns as useExportStore,
366
366
  de as useExposePrintState,