react-semaphor 0.1.308 → 0.1.310

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 (48) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +4 -4
  3. package/dist/chunks/{braces-BHDm9arh.js → braces-B_1DhXjs.js} +1 -1
  4. package/dist/chunks/{braces-DEq8EJtw.js → braces-BataYVhi.js} +1 -1
  5. package/dist/chunks/{chevrons-up-down-DDEY9beZ.js → chevrons-up-down-2PuJgXa0.js} +1 -1
  6. package/dist/chunks/{chevrons-up-down-Cbtggnqv.js → chevrons-up-down-CfMX77Ug.js} +1 -1
  7. package/dist/chunks/common-types-4bjoIgvm.js +75 -0
  8. package/dist/chunks/common-types-C73-Ud1-.js +1 -0
  9. package/dist/chunks/{dashboard-controls-DviftQE7.js → dashboard-controls-CZH2CHE6.js} +1 -1
  10. package/dist/chunks/{dashboard-controls-DTxSUWvy.js → dashboard-controls-DKNSTyu3.js} +83 -83
  11. package/dist/chunks/{dashboard-filter-controls-button-DHKfgPah.js → dashboard-filter-controls-button-C5FGXiyJ.js} +4 -4
  12. package/dist/chunks/{dashboard-filter-controls-button-D0nrJ7wl.js → dashboard-filter-controls-button-CRYFNfgr.js} +1 -1
  13. package/dist/chunks/{dashboard-json-DZmsUV5n.js → dashboard-json-A9m16zgO.js} +2 -2
  14. package/dist/chunks/{dashboard-json-DYzZ0G6T.js → dashboard-json-CUYxXIbj.js} +1 -1
  15. package/dist/chunks/{dashboard-summary-settings-dialog-QbUTp92u.js → dashboard-summary-settings-dialog-BFldiulJ.js} +3 -3
  16. package/dist/chunks/{dashboard-summary-settings-dialog-Cc3yKCu4.js → dashboard-summary-settings-dialog-Dl80Vf3Y.js} +1 -1
  17. package/dist/chunks/{edit-dashboard-visual-BS3LKMJe.js → edit-dashboard-visual-Bt6wP1pc.js} +32 -32
  18. package/dist/chunks/{edit-dashboard-visual-CmgculGv.js → edit-dashboard-visual-C013lDvS.js} +1251 -1261
  19. package/dist/chunks/{index-C0zD3JgK.js → index-C_mYCH5V.js} +209 -209
  20. package/dist/chunks/{index-BxYIELMe.js → index-scc12bkM.js} +7498 -7493
  21. package/dist/chunks/{palette-CteErylX.js → palette-CuxyTPBF.js} +1 -1
  22. package/dist/chunks/{palette-CNKSAIrt.js → palette-DIqG9FgB.js} +1 -1
  23. package/dist/chunks/{resource-management-panel-B4QM3fZ_.js → resource-management-panel-CkS-1IEw.js} +1 -1
  24. package/dist/chunks/{resource-management-panel-8cHoj8SV.js → resource-management-panel-xJtqTzS8.js} +3 -3
  25. package/dist/chunks/{save-B1-nDZwS.js → save-CP9_rxYk.js} +1 -1
  26. package/dist/chunks/{save-BVVnWGeb.js → save-CPHrveZg.js} +1 -1
  27. package/dist/chunks/{switch-BG4RWnrq.js → switch-BFPV36rd.js} +31 -31
  28. package/dist/chunks/{switch-BZn7R_Cp.js → switch-DXHYEa_J.js} +1586 -1637
  29. package/dist/chunks/{use-create-flow-overlay-state-CeWstFjy.js → use-create-flow-overlay-state-C77yBFiq.js} +4 -4
  30. package/dist/chunks/{use-create-flow-overlay-state-Bmb471Fp.js → use-create-flow-overlay-state-nhcTzyJQ.js} +1 -1
  31. package/dist/chunks/{use-visual-utils-CmfDomt0.js → use-visual-utils-BqljNzWn.js} +2 -2
  32. package/dist/chunks/{use-visual-utils-DflfgX9g.js → use-visual-utils-Cm2IkP1c.js} +1 -1
  33. package/dist/dashboard/index.cjs +1 -1
  34. package/dist/dashboard/index.js +2 -2
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +107 -104
  37. package/dist/surfboard/index.cjs +1 -1
  38. package/dist/surfboard/index.js +3 -3
  39. package/dist/types/dashboard.d.ts +17 -5
  40. package/dist/types/index.cjs +1 -1
  41. package/dist/types/index.js +16 -7
  42. package/dist/types/main.d.ts +39 -5
  43. package/dist/types/shared.d.ts +17 -5
  44. package/dist/types/surfboard.d.ts +17 -5
  45. package/dist/types/types.d.ts +310 -57
  46. package/package.json +6 -1
  47. package/dist/chunks/common-types-C6cAQgyh.js +0 -9
  48. package/dist/chunks/common-types-nBuCd3u2.js +0 -1
@@ -1,9 +1,9 @@
1
- import { c as De, n as L, u as le, z as ft, A as ht, D as bt, a as ne, F as gt, ae as yt, B as E, e as xt, l as Ne, X as Pe, m as Ye, f as Ge, af as vt, ag as Ct, ah as re, ai as Ae, aj as ze, ak as fe, al as he, am as kt, an as Oe, ao as Nt, ap as St, aq as se, ar as Dt, as as Be, G as Me, at as Xe, au as He, av as Je, L as Y, I as We, g as be, h as ge, i as ye, j as xe, k as ve, aw as Ze, ax as wt, ay as Vt, az as Qe, aA as It, aB as je, aC as Tt, aD as Ce } from "./switch-BZn7R_Cp.js";
1
+ import { c as De, n as L, u as le, z as ft, A as ht, D as bt, a as ne, F as gt, a8 as yt, B as E, e as xt, l as Ne, X as Pe, m as Ye, f as Ge, a9 as vt, aa as Ct, ab as re, ac as Ae, ad as ze, ae as fe, af as he, ag as kt, ah as Oe, ai as Nt, aj as St, ak as se, al as Dt, am as Be, G as Me, an as Xe, ao as He, ap as Je, L as Y, I as We, g as be, h as ge, i as ye, j as xe, k as ve, aq as Ze, ar as wt, as as Vt, at as Qe, au as It, av as je, aw as Tt, ax as Ce } from "./switch-DXHYEa_J.js";
2
2
  import { jsx as t, jsxs as d, Fragment as K } from "react/jsx-runtime";
3
- import { a$ as et, b0 as Et, b1 as qt, b2 as Ft, b3 as _t, b4 as Lt, V as At, P as zt, q as ie, b5 as tt, s as at, b6 as rt, b7 as Ot, o as Q, b8 as Bt, b9 as Mt, ba as Re, bb as Qt, bc as jt, bd as st, be as lt, bf as Rt, bg as Ut, bh as $t, bi as Kt, bj as Pt, bk as Yt, bl as Gt, bm as Xt } from "./index-BxYIELMe.js";
3
+ import { a$ as et, b0 as Et, b1 as qt, b2 as Ft, b3 as _t, b4 as Lt, V as At, P as zt, q as ie, b5 as tt, s as at, b6 as rt, b7 as Ot, o as Q, b8 as Bt, b9 as Mt, ba as Re, bb as Qt, bc as jt, bd as st, be as lt, bf as Rt, bg as Ut, bh as $t, bi as Kt, bj as Pt, bk as Yt, bl as Gt, bm as Xt } from "./index-scc12bkM.js";
4
4
  import { useMemo as z, useState as j, useRef as ke, useCallback as B, useEffect as Se, Fragment as Ht } from "react";
5
- import { u as we } from "./use-visual-utils-CmfDomt0.js";
6
- import { S as nt } from "./save-B1-nDZwS.js";
5
+ import { u as we } from "./use-visual-utils-BqljNzWn.js";
6
+ import { S as nt } from "./save-CP9_rxYk.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
9
9
  *
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("./switch-BG4RWnrq.js"),e=require("react/jsx-runtime"),p=require("./index-C0zD3JgK.js"),C=require("react"),re=require("./use-visual-utils-DflfgX9g.js"),he=require("./save-BVVnWGeb.js");/**
1
+ "use strict";const s=require("./switch-BFPV36rd.js"),e=require("react/jsx-runtime"),p=require("./index-C_mYCH5V.js"),C=require("react"),re=require("./use-visual-utils-Cm2IkP1c.js"),he=require("./save-CPHrveZg.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,5 +1,5 @@
1
- import { p as X, u as Y, q as Z, r as ee, s as te, t as re, v as se, w as ae, o as V, x as oe } from "./index-BxYIELMe.js";
2
- import { l as ne, m as ie, u as b, n as z, o as ce } from "./switch-BZn7R_Cp.js";
1
+ import { p as X, u as Y, q as Z, r as ee, s as te, t as re, v as se, w as ae, o as V, x as oe } from "./index-scc12bkM.js";
2
+ import { l as ne, m as ie, u as b, n as z, o as ce } from "./switch-DXHYEa_J.js";
3
3
  import { useState as H, useEffect as de, useCallback as A } from "react";
4
4
  function le(e) {
5
5
  const [a, s] = H(null), [r, t] = H(null), o = X();
@@ -1 +1 @@
1
- "use strict";const u=require("./index-C0zD3JgK.js"),f=require("./switch-BG4RWnrq.js"),S=require("react");function K(e){const[a,s]=S.useState(null),[r,t]=S.useState(null),o=u.useEnsureReactGlobals();return S.useEffect(()=>{if(!e||e.trim()===""){s(null),t(null);return}if(!o)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 i=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(i,{method:"HEAD"})).ok)throw new Error(`Module not found at ${i}`)}catch{}const m=await import(i);if(typeof m.useChartStore!="function")throw new Error("useChartStore is not a function");s(()=>m.useChartStore),t(null)}catch(n){const i=n instanceof Error?n.message:"Unknown error";console.error("Failed to load remote chart store:",i),t(i),s(null)}})()},[e,o]),a}function X(e,a){if(e.length===0)return"";const s=e.find(r=>{var t,o;return((t=r.customCardPreferences)==null?void 0:t.visualType)==="multiple"||!!((o=r.customCardPreferences)!=null&&o.dataInputCardIds)});if(s)return s.id;if(a){const r=e.find(t=>t.id===a);if(r){const t=r.tabTitle;if(t=="All__Header")return e[0].id;if(t&&t.endsWith("__Header")){const l=t.split("__")[0],n=e.find(i=>i.tabTitle===l);return n?n.id:e[0].id}return a}}return e[0].id}const A=new Set;function Y(e){return A.add(e),()=>{A.delete(e)}}function z(){A.forEach(e=>{e()})}const Z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:a,...s}=e;return s};async function B(e,a,s,r){if(!a||!s)throw new Error("Missing auth token or visual ID");const t=["resource-by-id","visual",s],o=r.getQueryData(t);if(o)return console.log("Using cached visual data for:",s),{data:o,fromCache:!0};console.log("Fetching visual data from network for:",s);const l=u.ue.loading("Loading visual...",{position:"top-center"});try{const n=await fetch(`${e}/management/v1/visuals/${s}`,{headers:{Authorization:`Bearer ${a}`}});if(!n.ok)throw new Error("Failed to load visual");const i=await n.json();return r.setQueryData(t,i),u.ue.dismiss(l),{data:i,fromCache:!1}}catch(n){throw u.ue.dismiss(l),n}}function H(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function ee(e,a){var o,l;const s=(e==null?void 0:e.frameObject)??((o=e==null?void 0:e.visual)==null?void 0:o.frameObject);if(!s)return!1;const r=H(s);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const t=(l=r.cards)==null?void 0:l.find(n=>n.id===r.activeCardId);return t?(u.setupEditorWithCard({...a,frame:r,card:t,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function te(){const e=f.useEditorStore(r=>{var t;return((t=r.card.customCardPreferences)==null?void 0:t.url)||""}),a=K(e);return{getUpdatedFrame:S.useCallback(()=>{var b;z();const{frame:r,card:t,isDevMode:o,isShowingVisual:l,selectedSchemaName:n,selectedDatamodelId:i,selectedDatabaseName:m,selectedTableName:p,selectedConnectionId:y}=f.useEditorStore.getState(),I=t.sql,U=(b=a==null?void 0:a.getState())==null?void 0:b.settings,V=f.buildSavedEditorCard(t,{isDevMode:o,cardSql:I,isShowingVisual:l,selectedSchemaName:n,selectedDatamodelId:i,selectedDatabaseName:m,selectedTableName:p,selectedConnectionId:y,remoteChartSettings:U,stripConfig:Z}),g=r.cards.map(E=>E.id===t.id?V:E);return{...r,cards:g,activeCardId:X(g,r.activeCardId)}},[a])}}function re(){const{authToken:e,tokenProps:a}=u.useSemaphorContext(),s=u.useQueryClient(),r=u.useAddFrameWithFreshSemanticExecutionPayload(),t=u.useSelectedVisual(),{selectVisual:o}=u.useManagementActions(),{setFrame:l,setCard:n,setIsDevMode:i,initializeModeDrafts:m,setActiveTabCardId:p,updateDataSource:y,setQueryResultColumns:I,setSelectedConnectionId:U,setSelectedDatabaseName:V,setSelectedSchemaName:g,setSelectedTableName:b,setSelectedDatamodelId:E,setFilterValues:P,setInlineFilterValuesMap:M,setApplyFilters:k,clearEditorContext:L}=f.useEditorActions(),{setIsDashboardEditing:v,setIsVisualEditing:T,setSelectedFrameId:j,clearSelectedFrameId:N,setIsDashboardPanelOpen:R}=f.useDashboardActions(),w=f.useDashboardStore(c=>c.selectedSheetId),W=f.useDashboardStore(c=>c.selectedFrameId),$=f.useDashboardStore(c=>c.dashboard),_=f.useDashboardStore(c=>c.filterValues),x=f.useDashboardStore(c=>c.inlineFilterValuesMap),F=u.useVisualById((t==null?void 0:t.id)||"",{enabled:!!(t!=null&&t.id)&&!!(e!=null&&e.accessToken)}),Q=S.useCallback(async c=>{try{o(c),N(),L();const{data:h,fromCache:D}=await B(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",c.id,s);if(!ee(h,{setFrame:l,setCard:n,setIsDevMode:i,initializeModeDrafts:m,setActiveTabCardId:p,updateDataSource:y,setQueryResultColumns:I,setSelectedConnectionId:U,setSelectedDatabaseName:V,setSelectedSchemaName:g,setSelectedTableName:b,setSelectedDatamodelId:E,setFilterValues:P,setInlineFilterValuesMap:M,setApplyFilters:k,setIsDashboardEditing:v,setIsVisualEditing:T,dashboard:$,selectedSheetId:w,selectedFrameId:W,filterValues:_,inlineFilterValuesMap:x}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:D}}catch(h){return console.error("Error editing visual:",h),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,s,o,l,n,v,T,i,m,p,y,I,U,V,g,b,E,P,M,k,L,N,$,w,W,_,x]),G=S.useCallback(async c=>{var D;const h=d=>(u.ue.error(d),{success:!1,error:d});try{if(o(c),!w)return h("No sheet selected. Please select a sheet first.");const{data:d,fromCache:J}=await B(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",c.id,s),O=(d==null?void 0:d.frameObject)??((D=d==null?void 0:d.visual)==null?void 0:D.frameObject);if(!O)return h("Visual has no frame data");const C=H(O);if(!(C!=null&&C.cards)||C.cards.length===0)return h("Visual frame is malformed");const q={...u.cloneLinkedFrameWithSourceMapping(C),visualId:c.id};return await r(w,q,"end"),v(!0),j(q.id),R(!1),{success:!0,fromCache:J}}catch(d){return console.error("Error adding visual:",d),h(d instanceof Error?d.message:"Failed to add visual to dashboard")}},[e==null?void 0:e.accessToken,a.apiServiceUrl,s,o,w,v,j,R,r]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:Q,handleAddLibraryVisual:G,getUpdatedFrame:te().getUpdatedFrame,refetch:F.refetch}}exports.flushPendingEditorDrafts=z;exports.registerPendingEditorDraftFlusher=Y;exports.useVisualUtils=re;
1
+ "use strict";const u=require("./index-C_mYCH5V.js"),f=require("./switch-BFPV36rd.js"),S=require("react");function K(e){const[a,s]=S.useState(null),[r,t]=S.useState(null),o=u.useEnsureReactGlobals();return S.useEffect(()=>{if(!e||e.trim()===""){s(null),t(null);return}if(!o)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 i=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(i,{method:"HEAD"})).ok)throw new Error(`Module not found at ${i}`)}catch{}const m=await import(i);if(typeof m.useChartStore!="function")throw new Error("useChartStore is not a function");s(()=>m.useChartStore),t(null)}catch(n){const i=n instanceof Error?n.message:"Unknown error";console.error("Failed to load remote chart store:",i),t(i),s(null)}})()},[e,o]),a}function X(e,a){if(e.length===0)return"";const s=e.find(r=>{var t,o;return((t=r.customCardPreferences)==null?void 0:t.visualType)==="multiple"||!!((o=r.customCardPreferences)!=null&&o.dataInputCardIds)});if(s)return s.id;if(a){const r=e.find(t=>t.id===a);if(r){const t=r.tabTitle;if(t=="All__Header")return e[0].id;if(t&&t.endsWith("__Header")){const l=t.split("__")[0],n=e.find(i=>i.tabTitle===l);return n?n.id:e[0].id}return a}}return e[0].id}const A=new Set;function Y(e){return A.add(e),()=>{A.delete(e)}}function z(){A.forEach(e=>{e()})}const Z=e=>{if(!e||!("detailTableBackup"in e))return e;const{detailTableBackup:a,...s}=e;return s};async function B(e,a,s,r){if(!a||!s)throw new Error("Missing auth token or visual ID");const t=["resource-by-id","visual",s],o=r.getQueryData(t);if(o)return console.log("Using cached visual data for:",s),{data:o,fromCache:!0};console.log("Fetching visual data from network for:",s);const l=u.ue.loading("Loading visual...",{position:"top-center"});try{const n=await fetch(`${e}/management/v1/visuals/${s}`,{headers:{Authorization:`Bearer ${a}`}});if(!n.ok)throw new Error("Failed to load visual");const i=await n.json();return r.setQueryData(t,i),u.ue.dismiss(l),{data:i,fromCache:!1}}catch(n){throw u.ue.dismiss(l),n}}function H(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function ee(e,a){var o,l;const s=(e==null?void 0:e.frameObject)??((o=e==null?void 0:e.visual)==null?void 0:o.frameObject);if(!s)return!1;const r=H(s);if(!(r!=null&&r.cards)||r.cards.length===0)return!1;const t=(l=r.cards)==null?void 0:l.find(n=>n.id===r.activeCardId);return t?(u.setupEditorWithCard({...a,frame:r,card:t,visualId:(e==null?void 0:e.id)||r.visualId}),!0):!1}function te(){const e=f.useEditorStore(r=>{var t;return((t=r.card.customCardPreferences)==null?void 0:t.url)||""}),a=K(e);return{getUpdatedFrame:S.useCallback(()=>{var b;z();const{frame:r,card:t,isDevMode:o,isShowingVisual:l,selectedSchemaName:n,selectedDatamodelId:i,selectedDatabaseName:m,selectedTableName:p,selectedConnectionId:y}=f.useEditorStore.getState(),I=t.sql,U=(b=a==null?void 0:a.getState())==null?void 0:b.settings,V=f.buildSavedEditorCard(t,{isDevMode:o,cardSql:I,isShowingVisual:l,selectedSchemaName:n,selectedDatamodelId:i,selectedDatabaseName:m,selectedTableName:p,selectedConnectionId:y,remoteChartSettings:U,stripConfig:Z}),g=r.cards.map(E=>E.id===t.id?V:E);return{...r,cards:g,activeCardId:X(g,r.activeCardId)}},[a])}}function re(){const{authToken:e,tokenProps:a}=u.useSemaphorContext(),s=u.useQueryClient(),r=u.useAddFrameWithFreshSemanticExecutionPayload(),t=u.useSelectedVisual(),{selectVisual:o}=u.useManagementActions(),{setFrame:l,setCard:n,setIsDevMode:i,initializeModeDrafts:m,setActiveTabCardId:p,updateDataSource:y,setQueryResultColumns:I,setSelectedConnectionId:U,setSelectedDatabaseName:V,setSelectedSchemaName:g,setSelectedTableName:b,setSelectedDatamodelId:E,setFilterValues:P,setInlineFilterValuesMap:M,setApplyFilters:k,clearEditorContext:L}=f.useEditorActions(),{setIsDashboardEditing:v,setIsVisualEditing:T,setSelectedFrameId:j,clearSelectedFrameId:N,setIsDashboardPanelOpen:R}=f.useDashboardActions(),w=f.useDashboardStore(c=>c.selectedSheetId),W=f.useDashboardStore(c=>c.selectedFrameId),$=f.useDashboardStore(c=>c.dashboard),_=f.useDashboardStore(c=>c.filterValues),x=f.useDashboardStore(c=>c.inlineFilterValuesMap),F=u.useVisualById((t==null?void 0:t.id)||"",{enabled:!!(t!=null&&t.id)&&!!(e!=null&&e.accessToken)}),Q=S.useCallback(async c=>{try{o(c),N(),L();const{data:h,fromCache:D}=await B(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",c.id,s);if(!ee(h,{setFrame:l,setCard:n,setIsDevMode:i,initializeModeDrafts:m,setActiveTabCardId:p,updateDataSource:y,setQueryResultColumns:I,setSelectedConnectionId:U,setSelectedDatabaseName:V,setSelectedSchemaName:g,setSelectedTableName:b,setSelectedDatamodelId:E,setFilterValues:P,setInlineFilterValuesMap:M,setApplyFilters:k,setIsDashboardEditing:v,setIsVisualEditing:T,dashboard:$,selectedSheetId:w,selectedFrameId:W,filterValues:_,inlineFilterValuesMap:x}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:D}}catch(h){return console.error("Error editing visual:",h),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,s,o,l,n,v,T,i,m,p,y,I,U,V,g,b,E,P,M,k,L,N,$,w,W,_,x]),G=S.useCallback(async c=>{var D;const h=d=>(u.ue.error(d),{success:!1,error:d});try{if(o(c),!w)return h("No sheet selected. Please select a sheet first.");const{data:d,fromCache:J}=await B(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",c.id,s),O=(d==null?void 0:d.frameObject)??((D=d==null?void 0:d.visual)==null?void 0:D.frameObject);if(!O)return h("Visual has no frame data");const C=H(O);if(!(C!=null&&C.cards)||C.cards.length===0)return h("Visual frame is malformed");const q={...u.cloneLinkedFrameWithSourceMapping(C),visualId:c.id};return await r(w,q,"end"),v(!0),j(q.id),R(!1),{success:!0,fromCache:J}}catch(d){return console.error("Error adding visual:",d),h(d instanceof Error?d.message:"Failed to add visual to dashboard")}},[e==null?void 0:e.accessToken,a.apiServiceUrl,s,o,w,v,j,R,r]);return{visual:F.data,isLoading:F.isLoading,isError:F.isError,error:F.error,handleEditLibraryVisual:Q,handleAddLibraryVisual:G,getUpdatedFrame:te().getUpdatedFrame,refetch:F.refetch}}exports.flushPendingEditorDrafts=z;exports.registerPendingEditorDraftFlusher=Y;exports.useVisualUtils=re;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../chunks/index-C0zD3JgK.js"),e=require("../chunks/common-types-nBuCd3u2.js");exports.Dashboard=o.Dashboard;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../chunks/index-C_mYCH5V.js"),e=require("../chunks/common-types-C73-Ud1-.js");exports.Dashboard=o.Dashboard;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;
@@ -1,5 +1,5 @@
1
- import { D as o } from "../chunks/index-BxYIELMe.js";
2
- import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
1
+ import { D as o } from "../chunks/index-scc12bkM.js";
2
+ import { C as s, E as C } from "../chunks/common-types-4bjoIgvm.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
5
5
  o as Dashboard,
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-C0zD3JgK.js"),M=require("./chunks/common-types-nBuCd3u2.js"),L=require("./chunks/dashboard-summary-settings-dialog-Cc3yKCu4.js"),t=require("react/jsx-runtime"),r=require("./chunks/switch-BG4RWnrq.js"),m=require("react"),z=require("./chunks/resource-management-panel-B4QM3fZ_.js"),B=require("./types/index.cjs"),q=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");require("./chunks/index-DRlMUglg.js");const y=require("./chunks/dashboard-filter-controls-button-D0nrJ7wl.js"),O=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js");function Q(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const o in s)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(a,o,l.get?l:{enumerable:!0,get:()=>s[o]})}}return a.default=s,Object.freeze(a)}const P=Q(m);function V(s){const{displayPreferences:a,cardId:o,...l}=s,i={...l,id:s.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:i,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:s.cardId}),t.jsx(e.UXProvider,{appearance:s.appearance,children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:t.jsx(e.Container,{type:"visual",cardId:o,...i,children:t.jsx(W,{cardId:o})})})})]})})}function W({cardId:s}){const a=r.useDashboardStore(i=>{var u;return(u=i.dashboard)==null?void 0:u.sheets}),{card:o,frame:l}=m.useMemo(()=>{const i=a==null?void 0:a.flatMap(d=>d.frames),u=i==null?void 0:i.flatMap(d=>d==null?void 0:d.cards),h=u==null?void 0:u.find(d=>(d==null?void 0:d.id)===s),n=i==null?void 0:i.find(d=>{var x;return(x=d==null?void 0:d.cards)==null?void 0:x.find(A=>(A==null?void 0:A.id)===s)});return{card:h,frame:n}},[a,s]);return!o||!l?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${s}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:i,resetErrorBoundary:u})=>t.jsx(e.FallbackVisual,{error:i,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:o,frame:l})})})}function H(s,a,o,l){m.useEffect(()=>{s&&!o&&a&&l(e.cloneDeep(a))},[s,o,a,l])}function $({name:s,items:a,value:o,onChange:l,isLoading:i,isError:u,refetch:h,className:n,icon:d,showNone:x=!1}){const A=P.useRef(null),[b,C]=P.useState(!1),[j,N]=P.useState("100%"),D=x?[...a||[],{id:"none",name:"None"}]:a;P.useLayoutEffect(()=>{A.current&&N(A.current.offsetWidth)},[]);function w(){var p;return i?"Loading...":u?"Error":o?(p=a==null?void 0:a.find(S=>S.id===o))==null?void 0:p.name:`Select ${s}`}function R(p,S){l(S),C(!1)}return t.jsxs(r.Popover,{open:b,onOpenChange:C,children:[t.jsx(r.PopoverTrigger,{asChild:!0,children:t.jsxs(r.Button,{ref:A,variant:"outline",role:"combobox","aria-expanded":b,className:r.cn("flex h-9 w-full justify-between",n),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[d&&t.jsx("div",{className:"mr-2",children:d}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:w()})]}),t.jsx(r.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:j},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:h,children:t.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",i&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",s==null?void 0:s.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:D==null?void 0:D.map(p=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:p.name,onSelect:S=>R(S,p.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(r.Check,{className:r.cn("size-4",o===p.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:p.name,children:p.name})]})},p.id))})]})]})})]})}function G({triggerButtonClassName:s,variant:a="ghost"}){const[o,l]=m.useState(!1),i=r.useDashboardStore(h=>{var n;return(n=h.dashboard)==null?void 0:n.id}),u=r.useDashboardStore(h=>{var n;return(n=h.dashboard)==null?void 0:n.title});return i?t.jsxs(t.Fragment,{children:[t.jsx(e.IconButton,{tooltip:"Schedule Dashboard",className:r.cn("h-7 p-2",s),buttonProps:{variant:a},onClick:()=>l(!0),children:t.jsx(e.Clock,{className:"size-4"})}),t.jsx(e.EmailScheduleDialog,{open:o,onOpenChange:l,dashboardId:i,dashboardName:u})]}):null}function K(s){const{authToken:a,tokenProps:o}=e.useSemaphorContext();return e.useMutation({mutationFn:async l=>e.backtestAlert(o.apiServiceUrl,a.accessToken,s,l)})}function Y(s,a){m.useEffect(()=>(s&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{s&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[s,a])}function _(s){if(!s)return"--";const a=new Date(s);return Number.isNaN(a.getTime())?"--":a.toLocaleString()}function X(s){var a;return((a=s.alertState)==null?void 0:a.currentState)==="FIRING"?"Signal surfaced":s.status==="ACTIVE"?"Watching":s.status==="PAUSED"?"Paused":s.status}function J({alertId:s,onBack:a}){var p,S,I,F;const{authToken:o,tokenProps:l}=e.useSemaphorContext(),{data:i,isLoading:u,refetch:h}=e.useAlertDetail(s),n=(i==null?void 0:i.alert)??null,[d,x]=m.useState([]),[A,b]=m.useState([]),[C,j]=m.useState(null),N=m.useCallback(async()=>{var f;const c=l==null?void 0:l.apiServiceUrl,g=o==null?void 0:o.accessToken;if(!c||!g||!s)return null;try{const E=await fetch(`${c}/v1/alerts/${s}/runs?limit=20`,{headers:{Authorization:`Bearer ${g}`}});if(E.ok){const T=await E.json(),v=Array.isArray(T.runs)?T.runs:[],k=C&&v.some(U=>U.id===C)?C:((f=v[0])==null?void 0:f.id)??null;return b(v),j(k),k}b([]),j(null)}catch{return b([]),j(null),null}return null},[s,o,C,l]),D=m.useCallback(async c=>{const g=l==null?void 0:l.apiServiceUrl,f=o==null?void 0:o.accessToken,E=c??C;if(!g||!f||!s||!E){x([]);return}try{const T=await fetch(`${g}/v1/alerts/${s}/runs/${E}/deliveries`,{headers:{Authorization:`Bearer ${f}`}});if(T.ok){const v=await T.json();x(Array.isArray(v.attempts)?v.attempts:[])}else x([])}catch{x([])}},[s,o,C,l]),w=m.useCallback(async()=>{await h();const c=await N();await D(c)},[D,N,h]);m.useEffect(()=>{N().catch(()=>{})},[N]),m.useEffect(()=>{D().catch(()=>{})},[D]);const R=m.useMemo(()=>{const c={};for(const g of d)c[g.channel]||(c[g.channel]=[]),c[g.channel].push(g);return c},[d]);return u?t.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading signal detail..."}):n?t.jsxs("div",{className:"space-y-4 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[a&&t.jsx(r.Button,{variant:"outline",size:"sm",onClick:a,children:"Back"}),t.jsx("h2",{className:"text-lg font-semibold",children:n.name}),t.jsx(e.Badge,{variant:n.status==="ACTIVE"?"default":"secondary",children:X(n)}),((p=n.alertState)==null?void 0:p.currentState)&&t.jsx(e.Badge,{variant:n.alertState.currentState==="FIRING"?"destructive":"outline",children:n.alertState.currentState==="FIRING"?"Signal surfaced":"Stable"})]}),t.jsx(r.Button,{variant:"outline",size:"sm",onClick:()=>void w(),children:"Refresh"})]}),n.description&&t.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),t.jsxs("div",{className:"rounded-md border bg-muted/30 p-4 text-sm",children:[t.jsx("p",{className:"font-medium",children:"What changed"}),t.jsx("p",{className:"mt-1 text-muted-foreground",children:"Review the latest signal activity, then investigate the underlying dashboard context if you need more detail."})]}),t.jsxs("div",{className:"rounded-md border bg-background p-4 space-y-2",children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Signal Watch"}),t.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Watching for:"})," ",e.formatSignalCondition(n.jobConfig.operator,n.jobConfig.threshold)]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Severity:"})," ",n.jobConfig.severity]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Last Evaluated:"})," ",_((S=n.alertState)==null?void 0:S.lastEvaluatedAt)]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Last Surfaced:"})," ",_((I=n.alertState)==null?void 0:I.lastTriggeredAt)]})]})]}),((F=n.deliveryConfig)==null?void 0:F.channels)&&n.deliveryConfig.channels.length>0&&t.jsxs("div",{className:"rounded-md border bg-background p-4 space-y-2",children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Where It Surfaces"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.deliveryConfig.channels.map(c=>t.jsx(e.Badge,{variant:"outline",children:c},c))})]}),A.length>0&&t.jsxs("div",{className:"rounded-md border bg-background p-4 space-y-3",children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Recent Delivery Activity"}),A.length>1&&t.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(c=>t.jsx(r.Button,{variant:c.id===C?"default":"outline",size:"sm",onClick:()=>j(c.id),children:_(c.scheduledFor)},c.id))}),Object.keys(R).length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:"No delivery attempts were recorded for this run."}):Object.entries(R).map(([c,g])=>t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(e.Badge,{variant:"secondary",className:"text-xs",children:c})}),t.jsx("div",{className:"overflow-hidden rounded border",children:t.jsxs("table",{className:"w-full text-xs",children:[t.jsx("thead",{className:"bg-muted/40",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Recipient"}),t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Status"}),t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Time"}),t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Error"})]})}),t.jsx("tbody",{children:g.map(f=>t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-2 py-1",children:f.recipient}),t.jsx("td",{className:"px-2 py-1",children:t.jsx(e.Badge,{variant:f.status==="SENT"?"default":"destructive",className:"text-[10px]",children:f.status})}),t.jsx("td",{className:"px-2 py-1",children:_(f.createdAt)}),t.jsx("td",{className:"px-2 py-1 text-muted-foreground",children:f.error||"--"})]},f.id))})]})})]},c))]})]}):t.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Signal not found."})}function Z(){var u,h;const{quotasQuery:s,usageQuery:a}=e.useAlertQuotas(),o=((u=s.data)==null?void 0:u.quotas)||[],l=((h=a.data)==null?void 0:h.usage)||[],i=new Map(l.map(n=>[n.tenantId||"org",n]));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(r.Button,{variant:"outline",size:"sm",onClick:()=>{s.refetch(),a.refetch()},children:"Refresh"})]}),s.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:o.map(n=>{const d=n.tenantId||"org",x=i.get(d);return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-2",children:d}),t.jsx("td",{className:"px-3 py-2",children:(x==null?void 0:x.activeAlerts)??0}),t.jsx("td",{className:"px-3 py-2",children:n.policy.maxActiveAlerts}),t.jsxs("td",{className:"px-3 py-2",children:[n.policy.minCadenceMinutes," min"]}),t.jsx("td",{className:"px-3 py-2",children:n.policy.maxContextSources})]},d)})})]})})]})}exports.AlertManagementPage=e.AlertManagementPage;exports.AlertWizardDialog=e.AlertWizardDialog;exports.AlertsApiError=e.AlertsApiError;exports.CardAlertIndicator=e.CardAlertIndicator;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.EmailScheduleDialog=e.EmailScheduleDialog;exports.ExportError=e.ExportError;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.createExport=e.createExport;exports.deleteAlert=e.deleteAlert;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;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.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listAlertQuotas=e.listAlertQuotas;exports.listAlerts=e.listAlerts;exports.previewAlertDeliverable=e.previewAlertDeliverable;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.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.useAlertWizard=e.useAlertWizard;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.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;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.CONTROL_CARD_DEFAULT_VALUE=M.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=M.EMPTY_SELECTION;exports.CalendarPreferencesDialog=L.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=L.DashboardSummarySettingsDialog;exports.CALCULATED_FIELD_ENTITY_MARKER=r.CALCULATED_FIELD_ENTITY_MARKER;exports.DATE_FORMAT_VALUES=r.DATE_FORMAT_VALUES;exports.PivotMarkerEnum=r.PivotMarkerEnum;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isCalculatedDimension=r.isCalculatedDimension;exports.isCalculatedField=r.isCalculatedField;exports.isCalculatedMetric=r.isCalculatedMetric;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.ResourceManagementPanel=z.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=B.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=B.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.useDebouncedDirtyCheck=q.useDebouncedDirtyCheck;exports.AdvancedModeToggle=y.AdvancedModeToggle;exports.DashboardControlsSettings=y.DashboardControlsSettings;exports.DashboardFilterControlsButton=y.DashboardFilterControlsButton;exports.ExportNotificationItem=y.ExportNotificationItem;exports.ExportNotificationList=y.ExportNotificationList;exports.NotificationBell=y.NotificationBell;exports.UnsavedChangesAlert=y.UnsavedChangesAlert;exports.VisualEditingControls=y.VisualEditingControls;exports.useExportPolling=y.useExportPolling;exports.useExportRecovery=y.useExportRecovery;exports.normalizeDashboardForDirtyCheck=O.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=O.serializeDashboardForDirtyCheck;exports.AlertDetailPageEmbedded=J;exports.Combobox=$;exports.ScheduleDashboard=G;exports.TenantQuotaPage=Z;exports.Visual=V;exports.useAlertBacktest=K;exports.useExposePrintState=Y;exports.usePristineSnapshotInitializer=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-C_mYCH5V.js"),C=require("./chunks/common-types-C73-Ud1-.js"),L=require("./chunks/dashboard-summary-settings-dialog-Dl80Vf3Y.js"),t=require("react/jsx-runtime"),r=require("./chunks/switch-BFPV36rd.js"),m=require("react"),z=require("./chunks/resource-management-panel-CkS-1IEw.js"),B=require("./types/index.cjs"),q=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");require("./chunks/index-DRlMUglg.js");const D=require("./chunks/dashboard-filter-controls-button-CRYFNfgr.js"),O=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js");function Q(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const o in s)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(a,o,l.get?l:{enumerable:!0,get:()=>s[o]})}}return a.default=s,Object.freeze(a)}const P=Q(m);function V(s){const{displayPreferences:a,cardId:o,...l}=s,i={...l,id:s.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:i,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:s.cardId}),t.jsx(e.UXProvider,{appearance:s.appearance,children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:t.jsx(e.Container,{type:"visual",cardId:o,...i,children:t.jsx(W,{cardId:o})})})})]})})}function W({cardId:s}){const a=r.useDashboardStore(i=>{var u;return(u=i.dashboard)==null?void 0:u.sheets}),{card:o,frame:l}=m.useMemo(()=>{const i=a==null?void 0:a.flatMap(d=>d.frames),u=i==null?void 0:i.flatMap(d=>d==null?void 0:d.cards),h=u==null?void 0:u.find(d=>(d==null?void 0:d.id)===s),n=i==null?void 0:i.find(d=>{var x;return(x=d==null?void 0:d.cards)==null?void 0:x.find(A=>(A==null?void 0:A.id)===s)});return{card:h,frame:n}},[a,s]);return!o||!l?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${s}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:i,resetErrorBoundary:u})=>t.jsx(e.FallbackVisual,{error:i,resetErrorBoundary:u,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:o,frame:l})})})}function H(s,a,o,l){m.useEffect(()=>{s&&!o&&a&&l(e.cloneDeep(a))},[s,o,a,l])}function $({name:s,items:a,value:o,onChange:l,isLoading:i,isError:u,refetch:h,className:n,icon:d,showNone:x=!1}){const A=P.useRef(null),[j,y]=P.useState(!1),[N,v]=P.useState("100%"),S=x?[...a||[],{id:"none",name:"None"}]:a;P.useLayoutEffect(()=>{A.current&&v(A.current.offsetWidth)},[]);function _(){var p;return i?"Loading...":u?"Error":o?(p=a==null?void 0:a.find(b=>b.id===o))==null?void 0:p.name:`Select ${s}`}function F(p,b){l(b),y(!1)}return t.jsxs(r.Popover,{open:j,onOpenChange:y,children:[t.jsx(r.PopoverTrigger,{asChild:!0,children:t.jsxs(r.Button,{ref:A,variant:"outline",role:"combobox","aria-expanded":j,className:r.cn("flex h-9 w-full justify-between",n),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[d&&t.jsx("div",{className:"mr-2",children:d}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:_()})]}),t.jsx(r.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:N},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:h,children:t.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",i&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",s==null?void 0:s.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:S==null?void 0:S.map(p=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:p.name,onSelect:b=>F(b,p.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(r.Check,{className:r.cn("size-4",o===p.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:p.name,children:p.name})]})},p.id))})]})]})})]})}function G({triggerButtonClassName:s,variant:a="ghost"}){const[o,l]=m.useState(!1),i=r.useDashboardStore(h=>{var n;return(n=h.dashboard)==null?void 0:n.id}),u=r.useDashboardStore(h=>{var n;return(n=h.dashboard)==null?void 0:n.title});return i?t.jsxs(t.Fragment,{children:[t.jsx(e.IconButton,{tooltip:"Schedule Dashboard",className:r.cn("h-7 p-2",s),buttonProps:{variant:a},onClick:()=>l(!0),children:t.jsx(e.Clock,{className:"size-4"})}),t.jsx(e.EmailScheduleDialog,{open:o,onOpenChange:l,dashboardId:i,dashboardName:u})]}):null}function K(s){const{authToken:a,tokenProps:o}=e.useSemaphorContext();return e.useMutation({mutationFn:async l=>e.backtestAlert(o.apiServiceUrl,a.accessToken,s,l)})}function Y(s,a){m.useEffect(()=>(s&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{s&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[s,a])}function I(s){if(!s)return"--";const a=new Date(s);return Number.isNaN(a.getTime())?"--":a.toLocaleString()}function X(s){var a;return((a=s.alertState)==null?void 0:a.currentState)==="FIRING"?"Signal surfaced":s.status==="ACTIVE"?"Watching":s.status==="PAUSED"?"Paused":s.status}function J({alertId:s,onBack:a}){var p,b,w,k;const{authToken:o,tokenProps:l}=e.useSemaphorContext(),{data:i,isLoading:u,refetch:h}=e.useAlertDetail(s),n=(i==null?void 0:i.alert)??null,[d,x]=m.useState([]),[A,j]=m.useState([]),[y,N]=m.useState(null),v=m.useCallback(async()=>{var f;const c=l==null?void 0:l.apiServiceUrl,g=o==null?void 0:o.accessToken;if(!c||!g||!s)return null;try{const T=await fetch(`${c}/v1/alerts/${s}/runs?limit=20`,{headers:{Authorization:`Bearer ${g}`}});if(T.ok){const R=await T.json(),E=Array.isArray(R.runs)?R.runs:[],M=y&&E.some(U=>U.id===y)?y:((f=E[0])==null?void 0:f.id)??null;return j(E),N(M),M}j([]),N(null)}catch{return j([]),N(null),null}return null},[s,o,y,l]),S=m.useCallback(async c=>{const g=l==null?void 0:l.apiServiceUrl,f=o==null?void 0:o.accessToken,T=c??y;if(!g||!f||!s||!T){x([]);return}try{const R=await fetch(`${g}/v1/alerts/${s}/runs/${T}/deliveries`,{headers:{Authorization:`Bearer ${f}`}});if(R.ok){const E=await R.json();x(Array.isArray(E.attempts)?E.attempts:[])}else x([])}catch{x([])}},[s,o,y,l]),_=m.useCallback(async()=>{await h();const c=await v();await S(c)},[S,v,h]);m.useEffect(()=>{v().catch(()=>{})},[v]),m.useEffect(()=>{S().catch(()=>{})},[S]);const F=m.useMemo(()=>{const c={};for(const g of d)c[g.channel]||(c[g.channel]=[]),c[g.channel].push(g);return c},[d]);return u?t.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading signal detail..."}):n?t.jsxs("div",{className:"space-y-4 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[a&&t.jsx(r.Button,{variant:"outline",size:"sm",onClick:a,children:"Back"}),t.jsx("h2",{className:"text-lg font-semibold",children:n.name}),t.jsx(e.Badge,{variant:n.status==="ACTIVE"?"default":"secondary",children:X(n)}),((p=n.alertState)==null?void 0:p.currentState)&&t.jsx(e.Badge,{variant:n.alertState.currentState==="FIRING"?"destructive":"outline",children:n.alertState.currentState==="FIRING"?"Signal surfaced":"Stable"})]}),t.jsx(r.Button,{variant:"outline",size:"sm",onClick:()=>void _(),children:"Refresh"})]}),n.description&&t.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),t.jsxs("div",{className:"rounded-md border bg-muted/30 p-4 text-sm",children:[t.jsx("p",{className:"font-medium",children:"What changed"}),t.jsx("p",{className:"mt-1 text-muted-foreground",children:"Review the latest signal activity, then investigate the underlying dashboard context if you need more detail."})]}),t.jsxs("div",{className:"rounded-md border bg-background p-4 space-y-2",children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Signal Watch"}),t.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Watching for:"})," ",e.formatSignalCondition(n.jobConfig.operator,n.jobConfig.threshold)]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Severity:"})," ",n.jobConfig.severity]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Last Evaluated:"})," ",I((b=n.alertState)==null?void 0:b.lastEvaluatedAt)]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-muted-foreground",children:"Last Surfaced:"})," ",I((w=n.alertState)==null?void 0:w.lastTriggeredAt)]})]})]}),((k=n.deliveryConfig)==null?void 0:k.channels)&&n.deliveryConfig.channels.length>0&&t.jsxs("div",{className:"rounded-md border bg-background p-4 space-y-2",children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Where It Surfaces"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:n.deliveryConfig.channels.map(c=>t.jsx(e.Badge,{variant:"outline",children:c},c))})]}),A.length>0&&t.jsxs("div",{className:"rounded-md border bg-background p-4 space-y-3",children:[t.jsx("h3",{className:"text-sm font-semibold",children:"Recent Delivery Activity"}),A.length>1&&t.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(c=>t.jsx(r.Button,{variant:c.id===y?"default":"outline",size:"sm",onClick:()=>N(c.id),children:I(c.scheduledFor)},c.id))}),Object.keys(F).length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:"No delivery attempts were recorded for this run."}):Object.entries(F).map(([c,g])=>t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(e.Badge,{variant:"secondary",className:"text-xs",children:c})}),t.jsx("div",{className:"overflow-hidden rounded border",children:t.jsxs("table",{className:"w-full text-xs",children:[t.jsx("thead",{className:"bg-muted/40",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Recipient"}),t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Status"}),t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Time"}),t.jsx("th",{className:"px-2 py-1 text-left font-medium",children:"Error"})]})}),t.jsx("tbody",{children:g.map(f=>t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-2 py-1",children:f.recipient}),t.jsx("td",{className:"px-2 py-1",children:t.jsx(e.Badge,{variant:f.status==="SENT"?"default":"destructive",className:"text-[10px]",children:f.status})}),t.jsx("td",{className:"px-2 py-1",children:I(f.createdAt)}),t.jsx("td",{className:"px-2 py-1 text-muted-foreground",children:f.error||"--"})]},f.id))})]})})]},c))]})]}):t.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Signal not found."})}function Z(){var u,h;const{quotasQuery:s,usageQuery:a}=e.useAlertQuotas(),o=((u=s.data)==null?void 0:u.quotas)||[],l=((h=a.data)==null?void 0:h.usage)||[],i=new Map(l.map(n=>[n.tenantId||"org",n]));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(r.Button,{variant:"outline",size:"sm",onClick:()=>{s.refetch(),a.refetch()},children:"Refresh"})]}),s.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:o.map(n=>{const d=n.tenantId||"org",x=i.get(d);return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-2",children:d}),t.jsx("td",{className:"px-3 py-2",children:(x==null?void 0:x.activeAlerts)??0}),t.jsx("td",{className:"px-3 py-2",children:n.policy.maxActiveAlerts}),t.jsxs("td",{className:"px-3 py-2",children:[n.policy.minCadenceMinutes," min"]}),t.jsx("td",{className:"px-3 py-2",children:n.policy.maxContextSources})]},d)})})]})})]})}exports.AlertManagementPage=e.AlertManagementPage;exports.AlertWizardDialog=e.AlertWizardDialog;exports.AlertsApiError=e.AlertsApiError;exports.CardAlertIndicator=e.CardAlertIndicator;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.EmailScheduleDialog=e.EmailScheduleDialog;exports.ExportError=e.ExportError;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.createExport=e.createExport;exports.deleteAlert=e.deleteAlert;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;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.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listAlertQuotas=e.listAlertQuotas;exports.listAlerts=e.listAlerts;exports.previewAlertDeliverable=e.previewAlertDeliverable;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.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.useAlertWizard=e.useAlertWizard;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.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;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.CALCULATED_FIELD_ENTITY_MARKER=C.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=C.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=C.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=C.EMPTY_SELECTION;exports.PivotMarkerEnum=C.PivotMarkerEnum;exports.getFieldRuntimeColumnName=C.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=C.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=C.hasCalculatedFormulaInputs;exports.isCalculatedDimension=C.isCalculatedDimension;exports.isCalculatedField=C.isCalculatedField;exports.isCalculatedMetric=C.isCalculatedMetric;exports.CalendarPreferencesDialog=L.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=L.DashboardSummarySettingsDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.ResourceManagementPanel=z.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=B.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=B.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.useDebouncedDirtyCheck=q.useDebouncedDirtyCheck;exports.AdvancedModeToggle=D.AdvancedModeToggle;exports.DashboardControlsSettings=D.DashboardControlsSettings;exports.DashboardFilterControlsButton=D.DashboardFilterControlsButton;exports.ExportNotificationItem=D.ExportNotificationItem;exports.ExportNotificationList=D.ExportNotificationList;exports.NotificationBell=D.NotificationBell;exports.UnsavedChangesAlert=D.UnsavedChangesAlert;exports.VisualEditingControls=D.VisualEditingControls;exports.useExportPolling=D.useExportPolling;exports.useExportRecovery=D.useExportRecovery;exports.normalizeDashboardForDirtyCheck=O.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=O.serializeDashboardForDirtyCheck;exports.AlertDetailPageEmbedded=J;exports.Combobox=$;exports.ScheduleDashboard=G;exports.TenantQuotaPage=Z;exports.Visual=V;exports.useAlertBacktest=K;exports.useExposePrintState=Y;exports.usePristineSnapshotInitializer=H;
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { E as j, F as H, S as G, y as q, U as K, z as Y, A as X, B, G as J, H as Z, C as ee, h as ae, I as Q, J as te, i as se, j as re, k as ne, l as ie, K as oe, L as le, u as W, M as de, N as ce, O as ue, P as E, Q as me, T as he } from "./chunks/index-BxYIELMe.js";
2
- import { av as Oe, ax as ze, aR as Be, aw as je, a8 as Qe, D as We, a6 as Ve, a3 as $e, aX as He, X as Ge, _ as qe, _ as Ke, $ as Ye, a7 as Xe, a as Je, aW as Ze, aC as ea, aS as aa, aE as ta, a5 as sa, a4 as ra, a_ as na, aB as ia, aL as oa, aI as la, aP as da, aJ as ca, aK as ua, aH as ma, aG as ha, aV as pa, aU as fa, aT as ga, aZ as xa, aY as Na, aO as ya, aA as va, aN as Aa, aF as Ca, aD as ba, aM as Sa, aQ as Da, af as Ea, ac as Ta, ao as wa, am as Ra, au as _a, at as Ia, al as Pa, ak as ka, aj as Ma, an as Fa, ay as La, ah as Ua, ai as Oa, ap as za, ar as Ba, a2 as ja, aq as Qa, aa as Wa, a1 as Va, W as $a, a9 as Ha, ab as Ga, Y as qa, az as Ka, ae as Ya, ad as Xa, ag as Ja, V as Za, a0 as et, as as at, Z as tt } from "./chunks/index-BxYIELMe.js";
3
- import { C as rt, E as nt } from "./chunks/common-types-C6cAQgyh.js";
4
- import { C as ot, D as lt } from "./chunks/dashboard-summary-settings-dialog-QbUTp92u.js";
1
+ import { E as j, F as H, S as G, y as q, U as K, z as Y, A as X, B, G as J, H as Z, C as ee, h as ae, I as Q, J as te, i as se, j as re, k as ne, l as ie, K as oe, L as le, u as W, M as de, N as ce, O as ue, P as E, Q as me, T as he } from "./chunks/index-scc12bkM.js";
2
+ import { av as Oe, ax as ze, aR as Be, aw as je, a8 as Qe, D as We, a6 as Ve, a3 as $e, aX as He, X as Ge, _ as qe, _ as Ke, $ as Ye, a7 as Xe, a as Je, aW as Ze, aC as ea, aS as aa, aE as ta, a5 as sa, a4 as ra, a_ as na, aB as ia, aL as oa, aI as la, aP as da, aJ as ca, aK as ua, aH as ma, aG as ha, aV as pa, aU as fa, aT as ga, aZ as xa, aY as Na, aO as ya, aA as va, aN as Ca, aF as Aa, aD as ba, aM as Sa, aQ as Da, af as Ea, ac as Ta, ao as wa, am as Ra, au as Ia, at as _a, al as Pa, ak as ka, aj as Fa, an as Ma, ay as La, ah as Ua, ai as Oa, ap as za, ar as Ba, a2 as ja, aq as Qa, aa as Wa, a1 as Va, W as $a, a9 as Ha, ab as Ga, Y as qa, az as Ka, ae as Ya, ad as Xa, ag as Ja, V as Za, a0 as et, as as at, Z as tt } from "./chunks/index-scc12bkM.js";
3
+ import { a as rt, C as nt, D as it, E as ot, P as lt, g as dt, d as ct, h as ut, b as mt, c as ht, i as pt } from "./chunks/common-types-4bjoIgvm.js";
4
+ import { C as gt, D as xt } from "./chunks/dashboard-summary-settings-dialog-BFldiulJ.js";
5
5
  import { jsx as e, jsxs as r, Fragment as pe } from "react/jsx-runtime";
6
- import { u as L, P as fe, b as ge, B as T, a as I, G as xe, d as Ne, e as ye } from "./chunks/switch-BZn7R_Cp.js";
7
- import { M as ct, N as ut, W as mt, ad as ht, a2 as pt, H as ft, J as gt, Y as xt, a4 as Nt, a3 as yt, a7 as vt, a8 as At, a1 as Ct, K as bt, a0 as St, Q as Dt, V as Et, O as Tt, a5 as wt, $ as Rt, _ as _t, Z as It, a9 as Pt, a6 as kt, aa as Mt, ac as Ft, ab as Lt, m as Ut, l as Ot, n as zt } from "./chunks/switch-BZn7R_Cp.js";
6
+ import { u as L, P as fe, b as ge, B as T, a as _, G as xe, d as Ne, e as ye } from "./chunks/switch-DXHYEa_J.js";
7
+ import { a7 as yt, Y as vt, H as Ct, J as At, M as bt, _ as St, Z as Dt, a1 as Et, a2 as Tt, W as wt, K as Rt, V as It, $ as _t, Q as Pt, O as kt, N as Ft, a3 as Mt, a0 as Lt, a4 as Ut, a6 as Ot, a5 as zt, m as Bt, l as jt, n as Qt } from "./chunks/switch-DXHYEa_J.js";
8
8
  import * as R from "react";
9
- import { useMemo as V, useEffect as k, useState as P, useCallback as F } from "react";
10
- import { ResourceManagementPanel as jt } from "./chunks/resource-management-panel-8cHoj8SV.js";
11
- import { DEFAULT_CALENDAR_CONTEXT as Wt, DEFAULT_SEMANTIC_DOMAIN_ACCESS as Vt } from "./types/index.js";
12
- import { u as Ht } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
9
+ import { useMemo as V, useEffect as k, useState as P, useCallback as M } from "react";
10
+ import { ResourceManagementPanel as Vt } from "./chunks/resource-management-panel-xJtqTzS8.js";
11
+ import { DEFAULT_CALENDAR_CONTEXT as Ht, DEFAULT_SEMANTIC_DOMAIN_ACCESS as Gt } from "./types/index.js";
12
+ import { u as Kt } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
13
13
  import "react-dom";
14
14
  import "./chunks/index-CJdxSyQq.js";
15
- import { A as qt, D as Kt, c as Yt, a as Xt, E as Jt, N as Zt, U as es, V as as, u as ts, b as ss } from "./chunks/dashboard-filter-controls-button-DHKfgPah.js";
16
- import { n as ns, s as is } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
15
+ import { A as Xt, D as Jt, c as Zt, a as es, E as as, N as ts, U as ss, V as rs, u as ns, b as is } from "./chunks/dashboard-filter-controls-button-C5FGXiyJ.js";
16
+ import { n as ls, s as ds } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
17
17
  function we(a) {
18
18
  const { displayPreferences: t, cardId: n, ...i } = a, o = {
19
19
  ...i,
@@ -69,7 +69,7 @@ function Re(a, t, n, i) {
69
69
  a && !n && t && i(Z(t));
70
70
  }, [a, n, t, i]);
71
71
  }
72
- function _e({
72
+ function Ie({
73
73
  name: a,
74
74
  items: t,
75
75
  value: n,
@@ -81,11 +81,11 @@ function _e({
81
81
  icon: l,
82
82
  showNone: m = !1
83
83
  }) {
84
- const g = R.useRef(null), [v, x] = R.useState(!1), [A, C] = R.useState("100%"), N = m ? [...t || [], { id: "none", name: "None" }] : t;
84
+ const g = R.useRef(null), [v, x] = R.useState(!1), [C, A] = R.useState("100%"), N = m ? [...t || [], { id: "none", name: "None" }] : t;
85
85
  R.useLayoutEffect(() => {
86
- g.current && C(g.current.offsetWidth);
86
+ g.current && A(g.current.offsetWidth);
87
87
  }, []);
88
- function M() {
88
+ function F() {
89
89
  var h;
90
90
  return o ? "Loading..." : c ? "Error" : n ? (h = t == null ? void 0 : t.find((y) => y.id === n)) == null ? void 0 : h.name : `Select ${a}`;
91
91
  }
@@ -100,11 +100,11 @@ function _e({
100
100
  variant: "outline",
101
101
  role: "combobox",
102
102
  "aria-expanded": v,
103
- className: I("flex h-9 w-full justify-between", s),
103
+ className: _("flex h-9 w-full justify-between", s),
104
104
  children: [
105
105
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
106
106
  l && /* @__PURE__ */ e("div", { className: "mr-2", children: l }),
107
- /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: M() })
107
+ /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: F() })
108
108
  ] }),
109
109
  /* @__PURE__ */ e(xe, { className: "size-4 opacity-50" })
110
110
  ]
@@ -114,14 +114,14 @@ function _e({
114
114
  Ne,
115
115
  {
116
116
  className: "w-full p-0",
117
- style: { minWidth: A },
117
+ style: { minWidth: C },
118
118
  children: /* @__PURE__ */ r(ee, { children: [
119
119
  /* @__PURE__ */ r("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
120
120
  /* @__PURE__ */ e(ae, { className: "h-9", placeholder: "Search..." }),
121
121
  /* @__PURE__ */ e(Q, { className: "h-7", onClick: u, children: /* @__PURE__ */ e(
122
122
  te,
123
123
  {
124
- className: I(
124
+ className: _(
125
125
  "size-3.5 opacity-50",
126
126
  o && "animate-spin"
127
127
  )
@@ -144,7 +144,7 @@ function _e({
144
144
  /* @__PURE__ */ e(
145
145
  ye,
146
146
  {
147
- className: I(
147
+ className: _(
148
148
  "size-4",
149
149
  n === h.id ? "opacity-100" : "opacity-0"
150
150
  )
@@ -161,7 +161,7 @@ function _e({
161
161
  )
162
162
  ] });
163
163
  }
164
- function Ie({
164
+ function _e({
165
165
  triggerButtonClassName: a,
166
166
  variant: t = "ghost"
167
167
  }) {
@@ -177,7 +177,7 @@ function Ie({
177
177
  Q,
178
178
  {
179
179
  tooltip: "Schedule Dashboard",
180
- className: I("h-7 p-2", a),
180
+ className: _("h-7 p-2", a),
181
181
  buttonProps: { variant: t },
182
182
  onClick: () => i(!0),
183
183
  children: /* @__PURE__ */ e(oe, { className: "size-4" })
@@ -212,18 +212,18 @@ function ke(a, t) {
212
212
  a && window.__SEMAPHOR_PRINT_STATE__ && delete window.__SEMAPHOR_PRINT_STATE__;
213
213
  }), [a, t]);
214
214
  }
215
- function _(a) {
215
+ function I(a) {
216
216
  if (!a) return "--";
217
217
  const t = new Date(a);
218
218
  return Number.isNaN(t.getTime()) ? "--" : t.toLocaleString();
219
219
  }
220
- function Ae(a) {
220
+ function Ce(a) {
221
221
  var t;
222
222
  return ((t = a.alertState) == null ? void 0 : t.currentState) === "FIRING" ? "Signal surfaced" : a.status === "ACTIVE" ? "Watching" : a.status === "PAUSED" ? "Paused" : a.status;
223
223
  }
224
- function Me({ alertId: a, onBack: t }) {
224
+ function Fe({ alertId: a, onBack: t }) {
225
225
  var h, y, U, O;
226
- const { authToken: n, tokenProps: i } = W(), { data: o, isLoading: c, refetch: u } = ue(a), s = (o == null ? void 0 : o.alert) ?? null, [l, m] = P([]), [g, v] = P([]), [x, A] = P(null), C = F(async () => {
226
+ const { authToken: n, tokenProps: i } = W(), { data: o, isLoading: c, refetch: u } = ue(a), s = (o == null ? void 0 : o.alert) ?? null, [l, m] = P([]), [g, v] = P([]), [x, C] = P(null), A = M(async () => {
227
227
  var f;
228
228
  const d = i == null ? void 0 : i.apiServiceUrl, p = n == null ? void 0 : n.accessToken;
229
229
  if (!d || !p || !a) return null;
@@ -233,14 +233,14 @@ function Me({ alertId: a, onBack: t }) {
233
233
  });
234
234
  if (S.ok) {
235
235
  const D = await S.json(), b = Array.isArray(D.runs) ? D.runs : [], z = x && b.some(($) => $.id === x) ? x : ((f = b[0]) == null ? void 0 : f.id) ?? null;
236
- return v(b), A(z), z;
236
+ return v(b), C(z), z;
237
237
  }
238
- v([]), A(null);
238
+ v([]), C(null);
239
239
  } catch {
240
- return v([]), A(null), null;
240
+ return v([]), C(null), null;
241
241
  }
242
242
  return null;
243
- }, [a, n, x, i]), N = F(async (d) => {
243
+ }, [a, n, x, i]), N = M(async (d) => {
244
244
  const p = i == null ? void 0 : i.apiServiceUrl, f = n == null ? void 0 : n.accessToken, S = d ?? x;
245
245
  if (!p || !f || !a || !S) {
246
246
  m([]);
@@ -261,15 +261,15 @@ function Me({ alertId: a, onBack: t }) {
261
261
  } catch {
262
262
  m([]);
263
263
  }
264
- }, [a, n, x, i]), M = F(async () => {
264
+ }, [a, n, x, i]), F = M(async () => {
265
265
  await u();
266
- const d = await C();
266
+ const d = await A();
267
267
  await N(d);
268
- }, [N, C, u]);
268
+ }, [N, A, u]);
269
269
  k(() => {
270
- C().catch(() => {
270
+ A().catch(() => {
271
271
  });
272
- }, [C]), k(() => {
272
+ }, [A]), k(() => {
273
273
  N().catch(() => {
274
274
  });
275
275
  }, [N]);
@@ -284,10 +284,10 @@ function Me({ alertId: a, onBack: t }) {
284
284
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
285
285
  t && /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: t, children: "Back" }),
286
286
  /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: s.name }),
287
- /* @__PURE__ */ e(E, { variant: s.status === "ACTIVE" ? "default" : "secondary", children: Ae(s) }),
287
+ /* @__PURE__ */ e(E, { variant: s.status === "ACTIVE" ? "default" : "secondary", children: Ce(s) }),
288
288
  ((h = s.alertState) == null ? void 0 : h.currentState) && /* @__PURE__ */ e(E, { variant: s.alertState.currentState === "FIRING" ? "destructive" : "outline", children: s.alertState.currentState === "FIRING" ? "Signal surfaced" : "Stable" })
289
289
  ] }),
290
- /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void M(), children: "Refresh" })
290
+ /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void F(), children: "Refresh" })
291
291
  ] }),
292
292
  s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: s.description }),
293
293
  /* @__PURE__ */ r("div", { className: "rounded-md border bg-muted/30 p-4 text-sm", children: [
@@ -310,12 +310,12 @@ function Me({ alertId: a, onBack: t }) {
310
310
  /* @__PURE__ */ r("div", { children: [
311
311
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Evaluated:" }),
312
312
  " ",
313
- _((y = s.alertState) == null ? void 0 : y.lastEvaluatedAt)
313
+ I((y = s.alertState) == null ? void 0 : y.lastEvaluatedAt)
314
314
  ] }),
315
315
  /* @__PURE__ */ r("div", { children: [
316
316
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Surfaced:" }),
317
317
  " ",
318
- _((U = s.alertState) == null ? void 0 : U.lastTriggeredAt)
318
+ I((U = s.alertState) == null ? void 0 : U.lastTriggeredAt)
319
319
  ] })
320
320
  ] })
321
321
  ] }),
@@ -330,8 +330,8 @@ function Me({ alertId: a, onBack: t }) {
330
330
  {
331
331
  variant: d.id === x ? "default" : "outline",
332
332
  size: "sm",
333
- onClick: () => A(d.id),
334
- children: _(d.scheduledFor)
333
+ onClick: () => C(d.id),
334
+ children: I(d.scheduledFor)
335
335
  },
336
336
  d.id
337
337
  )) }),
@@ -354,7 +354,7 @@ function Me({ alertId: a, onBack: t }) {
354
354
  children: f.status
355
355
  }
356
356
  ) }),
357
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: _(f.createdAt) }),
357
+ /* @__PURE__ */ e("td", { className: "px-2 py-1", children: I(f.createdAt) }),
358
358
  /* @__PURE__ */ e("td", { className: "px-2 py-1 text-muted-foreground", children: f.error || "--" })
359
359
  ] }, f.id)) })
360
360
  ] }) })
@@ -362,7 +362,7 @@ function Me({ alertId: a, onBack: t }) {
362
362
  ] })
363
363
  ] }) : /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Signal not found." });
364
364
  }
365
- function Fe() {
365
+ function Me() {
366
366
  var c, u;
367
367
  const { quotasQuery: a, usageQuery: t } = he(), n = ((c = a.data) == null ? void 0 : c.quotas) || [], i = ((u = t.data) == null ? void 0 : u.usage) || [], o = new Map(i.map((s) => [s.tenantId || "org", s]));
368
368
  return /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
@@ -406,59 +406,59 @@ function Fe() {
406
406
  ] });
407
407
  }
408
408
  export {
409
- qt as AdvancedModeToggle,
410
- Me as AlertDetailPageEmbedded,
409
+ Xt as AdvancedModeToggle,
410
+ Fe as AlertDetailPageEmbedded,
411
411
  Oe as AlertManagementPage,
412
412
  ze as AlertWizardDialog,
413
413
  Be as AlertsApiError,
414
- ct as CALCULATED_FIELD_ENTITY_MARKER,
415
- rt as CONTROL_CARD_DEFAULT_VALUE,
416
- ot as CalendarPreferencesDialog,
414
+ rt as CALCULATED_FIELD_ENTITY_MARKER,
415
+ nt as CONTROL_CARD_DEFAULT_VALUE,
416
+ gt as CalendarPreferencesDialog,
417
417
  je as CardAlertIndicator,
418
418
  Qe as CardSummary,
419
- _e as Combobox,
420
- ut as DATE_FORMAT_VALUES,
421
- Wt as DEFAULT_CALENDAR_CONTEXT,
422
- Vt as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
419
+ Ie as Combobox,
420
+ it as DATE_FORMAT_VALUES,
421
+ Ht as DEFAULT_CALENDAR_CONTEXT,
422
+ Gt as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
423
423
  We as Dashboard,
424
- Kt as DashboardControlsSettings,
424
+ Jt as DashboardControlsSettings,
425
425
  Ve as DashboardExportDialog,
426
- Yt as DashboardFilterControlsButton,
427
- lt as DashboardSummarySettingsDialog,
426
+ Zt as DashboardFilterControlsButton,
427
+ xt as DashboardSummarySettingsDialog,
428
428
  $e as DashboardWC,
429
- nt as EMPTY_SELECTION,
429
+ ot as EMPTY_SELECTION,
430
430
  le as EmailScheduleDialog,
431
431
  He as ExportError,
432
- Xt as ExportNotificationItem,
433
- Jt as ExportNotificationList,
434
- Zt as NotificationBell,
435
- mt as PivotMarkerEnum,
436
- jt as ResourceManagementPanel,
432
+ es as ExportNotificationItem,
433
+ as as ExportNotificationList,
434
+ ts as NotificationBell,
435
+ lt as PivotMarkerEnum,
436
+ Vt as ResourceManagementPanel,
437
437
  Ge as ResourceType,
438
- Ie as ScheduleDashboard,
438
+ _e as ScheduleDashboard,
439
439
  G as SemaphorContextProvider,
440
440
  qe as SemaphorDataProvider,
441
441
  Ke as SemaphorQueryClient,
442
442
  Ye as ShareDialog,
443
443
  Xe as SummaryCard,
444
444
  Je as Surfboard,
445
- Fe as TenantQuotaPage,
446
- es as UnsavedChangesAlert,
445
+ Me as TenantQuotaPage,
446
+ ss as UnsavedChangesAlert,
447
447
  we as Visual,
448
- as as VisualEditingControls,
448
+ rs as VisualEditingControls,
449
449
  ce as backtestAlert,
450
450
  Ze as cancelExport,
451
451
  Z as cloneDeep,
452
452
  ea as createAlert,
453
- ht as createEmptyKpiConfig,
453
+ yt as createEmptyKpiConfig,
454
454
  aa as createExport,
455
- pt as createSqlGenConfig,
455
+ vt as createSqlGenConfig,
456
456
  ta as deleteAlert,
457
457
  sa as downloadDocumentPdf,
458
458
  ra as downloadPdf,
459
- ft as emitDashboardLoad,
460
- gt as emitDashboardUnload,
461
- xt as fmt,
459
+ Ct as emitDashboardLoad,
460
+ At as emitDashboardUnload,
461
+ bt as fmt,
462
462
  na as formatFileSize,
463
463
  ia as getAlert,
464
464
  oa as getAlertContextSources,
@@ -468,33 +468,36 @@ export {
468
468
  ua as getAlertRunSteps,
469
469
  ma as getAlertRuns,
470
470
  ha as getAlertState,
471
- Nt as getColumnDataType,
471
+ St as getColumnDataType,
472
472
  pa as getDownloadUrl,
473
473
  fa as getExportStatus,
474
474
  ga as getExports,
475
- yt as getFilterValueType,
476
- vt as getFormattedTableNameForQuery,
477
- At as getQualifiedTableName,
478
- Ct as getSql,
479
- bt as invalidateToken,
480
- St as isBooleanDataType,
481
- Dt as isCalculatedDimension,
482
- Et as isCalculatedField,
483
- Tt as isCalculatedMetric,
484
- wt as isColumnInSqlGen,
485
- Rt as isDateDataType,
475
+ dt as getFieldRuntimeColumnName,
476
+ Dt as getFilterValueType,
477
+ Et as getFormattedTableNameForQuery,
478
+ Tt as getQualifiedTableName,
479
+ wt as getSql,
480
+ ct as hasCalculatedFieldMarker,
481
+ ut as hasCalculatedFormulaInputs,
482
+ Rt as invalidateToken,
483
+ It as isBooleanDataType,
484
+ mt as isCalculatedDimension,
485
+ ht as isCalculatedField,
486
+ pt as isCalculatedMetric,
487
+ _t as isColumnInSqlGen,
488
+ Pt as isDateDataType,
486
489
  xa as isExportComplete,
487
490
  Na as isExportInProgress,
488
- _t as isNumberDataType,
489
- It as isTextDataType,
491
+ kt as isNumberDataType,
492
+ Ft as isTextDataType,
490
493
  ya as listAlertQuotas,
491
494
  va as listAlerts,
492
- ns as normalizeDashboardForDirtyCheck,
493
- Aa as previewAlertDeliverable,
494
- Pt as resolveDataType,
495
- kt as resolveDatamodelName,
496
- is as serializeDashboardForDirtyCheck,
497
- Ca as triggerAlertNow,
495
+ ls as normalizeDashboardForDirtyCheck,
496
+ Ca as previewAlertDeliverable,
497
+ Mt as resolveDataType,
498
+ Lt as resolveDatamodelName,
499
+ ds as serializeDashboardForDirtyCheck,
500
+ Aa as triggerAlertNow,
498
501
  ba as updateAlert,
499
502
  Sa as updateAlertContextSources,
500
503
  Da as updateAlertQuota,
@@ -504,13 +507,13 @@ export {
504
507
  Pe as useAlertBacktest,
505
508
  Ra as useAlertDeliveries,
506
509
  ue as useAlertDetail,
507
- _a as useAlertDraft,
508
- Ia as useAlertFilters,
510
+ Ia as useAlertDraft,
511
+ _a as useAlertFilters,
509
512
  Pa as useAlertHistory,
510
513
  he as useAlertQuotas,
511
514
  ka as useAlertRuns,
512
- Ma as useAlertState,
513
- Fa as useAlertStore,
515
+ Fa as useAlertState,
516
+ Ma as useAlertStore,
514
517
  La as useAlertWizard,
515
518
  Ua as useAlerts,
516
519
  Oa as useAlertsBootstrap,
@@ -519,23 +522,23 @@ export {
519
522
  ja as useCard,
520
523
  Qa as useCardAlertMap,
521
524
  Wa as useCardSummary,
522
- Mt as useCurrentActiveCard,
523
- Ft as useCurrentCardConfig,
524
- Lt as useCurrentSheetActiveCards,
525
- Ut as useDashboardActions,
525
+ Ut as useCurrentActiveCard,
526
+ Ot as useCurrentCardConfig,
527
+ zt as useCurrentSheetActiveCards,
528
+ Bt as useDashboardActions,
526
529
  Va as useDashboardById,
527
530
  $a as useDashboardQuery,
528
531
  L as useDashboardStore,
529
532
  Ha as useDashboardSummary,
530
533
  Ga as useDataColumns,
531
534
  qa as useDateFilterHook,
532
- Ht as useDebouncedDirtyCheck,
533
- Ot as useEditorActions,
535
+ Kt as useDebouncedDirtyCheck,
536
+ jt as useEditorActions,
534
537
  Ka as useEditorAside,
535
- zt as useEditorStore,
538
+ Qt as useEditorStore,
536
539
  Ya as useExportActions,
537
- ts as useExportPolling,
538
- ss as useExportRecovery,
540
+ ns as useExportPolling,
541
+ is as useExportRecovery,
539
542
  Xa as useExportStore,
540
543
  ke as useExposePrintState,
541
544
  Ja as useInProgressExportsCount,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/index-C0zD3JgK.js"),e=require("../chunks/common-types-nBuCd3u2.js"),r=require("../chunks/dashboard-summary-settings-dialog-Cc3yKCu4.js");exports.Surfboard=a.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=r.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=r.DashboardSummarySettingsDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/index-C_mYCH5V.js"),e=require("../chunks/common-types-C73-Ud1-.js"),r=require("../chunks/dashboard-summary-settings-dialog-Dl80Vf3Y.js");exports.Surfboard=a.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=r.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=r.DashboardSummarySettingsDialog;
@@ -1,6 +1,6 @@
1
- import { a as o } from "../chunks/index-BxYIELMe.js";
2
- import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
3
- import { C as E, D as f } from "../chunks/dashboard-summary-settings-dialog-QbUTp92u.js";
1
+ import { a as o } from "../chunks/index-scc12bkM.js";
2
+ import { C as s, E as C } from "../chunks/common-types-4bjoIgvm.js";
3
+ import { C as E, D as f } from "../chunks/dashboard-summary-settings-dialog-BFldiulJ.js";
4
4
  export {
5
5
  s as CONTROL_CARD_DEFAULT_VALUE,
6
6
  E as CalendarPreferencesDialog,