react-semaphor 0.1.267 → 0.1.269

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 (35) hide show
  1. package/dist/chunks/{dashboard-controls-BRv37g5w.js → dashboard-controls-DZbu0Qmg.js} +1 -1
  2. package/dist/chunks/{dashboard-controls-d8j31cnQ.js → dashboard-controls-KZ0jtgY5.js} +108 -108
  3. package/dist/chunks/{dashboard-filter-controls-button-BOs9T2hG.js → dashboard-filter-controls-button-COiuEk99.js} +209 -199
  4. package/dist/chunks/dashboard-filter-controls-button-oAas5cZQ.js +11 -0
  5. package/dist/chunks/{dashboard-json-DjNS3G-C.js → dashboard-json-Bx9GdUw1.js} +1 -1
  6. package/dist/chunks/{dashboard-json-CnEYIbNI.js → dashboard-json-DUItaes0.js} +1 -1
  7. package/dist/chunks/{dashboard-summary-settings-dialog-CrBOuggE.js → dashboard-summary-settings-dialog-B3LysUNE.js} +1 -1
  8. package/dist/chunks/{dashboard-summary-settings-dialog-DOVwh8Cc.js → dashboard-summary-settings-dialog-DpQ0TcuD.js} +1 -1
  9. package/dist/chunks/{edit-dashboard-visual-D4UMcS6R.js → edit-dashboard-visual-BHITqHZD.js} +7808 -7327
  10. package/dist/chunks/edit-dashboard-visual-BKm-cHkR.js +193 -0
  11. package/dist/chunks/{index-C2i6CRUk.js → index-D9ofksI5.js} +523 -326
  12. package/dist/chunks/{index-D5jdzvu3.js → index-DP6lD0f3.js} +35936 -34785
  13. package/dist/chunks/{resource-management-panel-3XD0FrTD.js → resource-management-panel-BqZmY8eT.js} +16 -16
  14. package/dist/chunks/{resource-management-panel-ZK4SWoad.js → resource-management-panel-ngkCnMCx.js} +1 -1
  15. package/dist/chunks/{use-create-flow-overlay-state-Bb83NOgW.js → use-create-flow-overlay-state-BthYK7_T.js} +589 -591
  16. package/dist/chunks/use-create-flow-overlay-state-D0Rv8oRN.js +21 -0
  17. package/dist/chunks/use-visual-utils-CIn8Ieax.js +1 -0
  18. package/dist/chunks/{use-visual-utils-Bj7eAUMG.js → use-visual-utils-CJdoP-Px.js} +111 -123
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +5 -5
  23. package/dist/style.css +1 -1
  24. package/dist/surfboard/index.cjs +1 -1
  25. package/dist/surfboard/index.js +2 -2
  26. package/dist/types/dashboard.d.ts +38 -0
  27. package/dist/types/main.d.ts +40 -0
  28. package/dist/types/shared.d.ts +38 -0
  29. package/dist/types/surfboard.d.ts +38 -0
  30. package/dist/types/types.d.ts +38 -0
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-filter-controls-button-DKRyKRsP.js +0 -11
  33. package/dist/chunks/edit-dashboard-visual-D6RokBEF.js +0 -188
  34. package/dist/chunks/use-create-flow-overlay-state-Cmt64wFE.js +0 -21
  35. package/dist/chunks/use-visual-utils-Bdwejpa1.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/index-C2i6CRUk.js"),e=require("../types/index.cjs"),r=require("../chunks/dashboard-summary-settings-dialog-CrBOuggE.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-D9ofksI5.js"),e=require("../types/index.cjs"),r=require("../chunks/dashboard-summary-settings-dialog-B3LysUNE.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-D5jdzvu3.js";
1
+ import { a as o } from "../chunks/index-DP6lD0f3.js";
2
2
  import { CONTROL_CARD_DEFAULT_VALUE as s, EMPTY_SELECTION as D } from "../types/index.js";
3
- import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-DOVwh8Cc.js";
3
+ import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-DpQ0TcuD.js";
4
4
  export {
5
5
  s as CONTROL_CARD_DEFAULT_VALUE,
6
6
  m as CalendarPreferencesDialog,
@@ -1508,6 +1508,8 @@ export declare type TCard = {
1508
1508
  customCfg?: any;
1509
1509
  preferences?: TCardPreferences;
1510
1510
  customCardPreferences?: TCustomCardPreferences;
1511
+ visualizationMode?: TVisualizationMode;
1512
+ dynamicCardPreferences?: TDynamicCardPreferences;
1511
1513
  lastSelectedDatabase?: string;
1512
1514
  lastSelectedDatamodelId?: string;
1513
1515
  lastSelectedSchema?: string;
@@ -1830,6 +1832,40 @@ export declare type TDbCapabilities = {
1830
1832
  supportsFilterClause?: boolean;
1831
1833
  };
1832
1834
 
1835
+ export declare type TDynamicCardPreferences = {
1836
+ renderer: 'dynamic-visual';
1837
+ artifactId?: string;
1838
+ parentArtifactId?: string;
1839
+ title?: string;
1840
+ rendererCode?: string;
1841
+ question?: string;
1842
+ provenance?: 'card-config' | 'sql' | 'sql+python';
1843
+ visualIntent?: TDynamicVisualIntent;
1844
+ assistantNote?: string;
1845
+ builtinDisplayOptions?: {
1846
+ showChrome?: boolean;
1847
+ allowScroll?: boolean;
1848
+ };
1849
+ fallback: TDynamicVisualFallback;
1850
+ error?: {
1851
+ stage: string;
1852
+ message: string;
1853
+ details?: string[];
1854
+ };
1855
+ };
1856
+
1857
+ export declare type TDynamicVisualFallback = {
1858
+ mode: 'chart' | 'table';
1859
+ chartType?: TChartType;
1860
+ reason: string;
1861
+ };
1862
+
1863
+ export declare type TDynamicVisualIntent = {
1864
+ primaryChartType?: TChartType | 'custom';
1865
+ layout: 'chart-only' | 'composite';
1866
+ includesKpis: boolean;
1867
+ };
1868
+
1833
1869
  export declare type TEvent = {
1834
1870
  type: 'success' | 'error' | 'info' | 'warning';
1835
1871
  message: any;
@@ -2058,6 +2094,8 @@ export declare type TTooltipFormatConfig = {
2058
2094
  formatOptions?: TFormatOptions;
2059
2095
  };
2060
2096
 
2097
+ export declare type TVisualizationMode = 'builtin' | 'dynamic';
2098
+
2061
2099
  export declare interface UpdateUserPreferenceRequest {
2062
2100
  defaultDashboardId: string | null;
2063
2101
  }
@@ -234,6 +234,8 @@ declare type Actions_3 = TableActions & ExplorerActions & DrillActions & {
234
234
  setRunSql: (runSql: boolean) => void;
235
235
  setCardPreferences: (preferences: TCardPreferences) => void;
236
236
  setCustomCardPreferences: (customPreferences: TCustomCardPreferences) => void;
237
+ setVisualizationMode: (mode: TVisualizationMode) => void;
238
+ setDynamicCardPreferences: (dynamicPreferences: TDynamicCardPreferences | undefined) => void;
237
239
  setFilterOnClickField: (field: string) => void;
238
240
  setFilterOnClickColumnIndex: (index: number) => void;
239
241
  setIsSqlRunning: (isSqlRunning: boolean) => void;
@@ -3636,6 +3638,8 @@ export declare type TCard = {
3636
3638
  customCfg?: any;
3637
3639
  preferences?: TCardPreferences;
3638
3640
  customCardPreferences?: TCustomCardPreferences;
3641
+ visualizationMode?: TVisualizationMode;
3642
+ dynamicCardPreferences?: TDynamicCardPreferences;
3639
3643
  lastSelectedDatabase?: string;
3640
3644
  lastSelectedDatamodelId?: string;
3641
3645
  lastSelectedSchema?: string;
@@ -3960,6 +3964,40 @@ export declare type TDbCapabilities = {
3960
3964
  supportsFilterClause?: boolean;
3961
3965
  };
3962
3966
 
3967
+ export declare type TDynamicCardPreferences = {
3968
+ renderer: 'dynamic-visual';
3969
+ artifactId?: string;
3970
+ parentArtifactId?: string;
3971
+ title?: string;
3972
+ rendererCode?: string;
3973
+ question?: string;
3974
+ provenance?: 'card-config' | 'sql' | 'sql+python';
3975
+ visualIntent?: TDynamicVisualIntent;
3976
+ assistantNote?: string;
3977
+ builtinDisplayOptions?: {
3978
+ showChrome?: boolean;
3979
+ allowScroll?: boolean;
3980
+ };
3981
+ fallback: TDynamicVisualFallback;
3982
+ error?: {
3983
+ stage: string;
3984
+ message: string;
3985
+ details?: string[];
3986
+ };
3987
+ };
3988
+
3989
+ export declare type TDynamicVisualFallback = {
3990
+ mode: 'chart' | 'table';
3991
+ chartType?: TChartType;
3992
+ reason: string;
3993
+ };
3994
+
3995
+ export declare type TDynamicVisualIntent = {
3996
+ primaryChartType?: TChartType | 'custom';
3997
+ layout: 'chart-only' | 'composite';
3998
+ includesKpis: boolean;
3999
+ };
4000
+
3963
4001
  export declare function TenantQuotaPage(): JSX.Element;
3964
4002
 
3965
4003
  export declare type TEvent = {
@@ -4432,6 +4470,8 @@ export declare type TTooltipFormatConfig = {
4432
4470
  formatOptions?: TFormatOptions;
4433
4471
  };
4434
4472
 
4473
+ export declare type TVisualizationMode = 'builtin' | 'dynamic';
4474
+
4435
4475
  /**
4436
4476
  * UI and behavior configuration for the embedded dashboard.
4437
4477
  */
@@ -1350,6 +1350,8 @@ declare type TCard = {
1350
1350
  customCfg?: any;
1351
1351
  preferences?: TCardPreferences;
1352
1352
  customCardPreferences?: TCustomCardPreferences;
1353
+ visualizationMode?: TVisualizationMode;
1354
+ dynamicCardPreferences?: TDynamicCardPreferences;
1353
1355
  lastSelectedDatabase?: string;
1354
1356
  lastSelectedDatamodelId?: string;
1355
1357
  lastSelectedSchema?: string;
@@ -1643,6 +1645,40 @@ declare type TDatasetOptions = {
1643
1645
  };
1644
1646
  };
1645
1647
 
1648
+ declare type TDynamicCardPreferences = {
1649
+ renderer: 'dynamic-visual';
1650
+ artifactId?: string;
1651
+ parentArtifactId?: string;
1652
+ title?: string;
1653
+ rendererCode?: string;
1654
+ question?: string;
1655
+ provenance?: 'card-config' | 'sql' | 'sql+python';
1656
+ visualIntent?: TDynamicVisualIntent;
1657
+ assistantNote?: string;
1658
+ builtinDisplayOptions?: {
1659
+ showChrome?: boolean;
1660
+ allowScroll?: boolean;
1661
+ };
1662
+ fallback: TDynamicVisualFallback;
1663
+ error?: {
1664
+ stage: string;
1665
+ message: string;
1666
+ details?: string[];
1667
+ };
1668
+ };
1669
+
1670
+ declare type TDynamicVisualFallback = {
1671
+ mode: 'chart' | 'table';
1672
+ chartType?: TChartType;
1673
+ reason: string;
1674
+ };
1675
+
1676
+ declare type TDynamicVisualIntent = {
1677
+ primaryChartType?: TChartType | 'custom';
1678
+ layout: 'chart-only' | 'composite';
1679
+ includesKpis: boolean;
1680
+ };
1681
+
1646
1682
  declare type TFilter = {
1647
1683
  type?: 'single' | 'multiple';
1648
1684
  uiType?: 'radio' | 'dropdown' | 'tabs';
@@ -1855,6 +1891,8 @@ declare type TTooltipFormatConfig = {
1855
1891
  formatOptions?: TFormatOptions;
1856
1892
  };
1857
1893
 
1894
+ declare type TVisualizationMode = 'builtin' | 'dynamic';
1895
+
1858
1896
  /**
1859
1897
  * URL Parameter for drill-to-URL interpolation
1860
1898
  * Represents a placeholder in the URL template (e.g., {{product_id}})
@@ -1530,6 +1530,8 @@ export declare type TCard = {
1530
1530
  customCfg?: any;
1531
1531
  preferences?: TCardPreferences;
1532
1532
  customCardPreferences?: TCustomCardPreferences;
1533
+ visualizationMode?: TVisualizationMode;
1534
+ dynamicCardPreferences?: TDynamicCardPreferences;
1533
1535
  lastSelectedDatabase?: string;
1534
1536
  lastSelectedDatamodelId?: string;
1535
1537
  lastSelectedSchema?: string;
@@ -1852,6 +1854,40 @@ export declare type TDbCapabilities = {
1852
1854
  supportsFilterClause?: boolean;
1853
1855
  };
1854
1856
 
1857
+ export declare type TDynamicCardPreferences = {
1858
+ renderer: 'dynamic-visual';
1859
+ artifactId?: string;
1860
+ parentArtifactId?: string;
1861
+ title?: string;
1862
+ rendererCode?: string;
1863
+ question?: string;
1864
+ provenance?: 'card-config' | 'sql' | 'sql+python';
1865
+ visualIntent?: TDynamicVisualIntent;
1866
+ assistantNote?: string;
1867
+ builtinDisplayOptions?: {
1868
+ showChrome?: boolean;
1869
+ allowScroll?: boolean;
1870
+ };
1871
+ fallback: TDynamicVisualFallback;
1872
+ error?: {
1873
+ stage: string;
1874
+ message: string;
1875
+ details?: string[];
1876
+ };
1877
+ };
1878
+
1879
+ export declare type TDynamicVisualFallback = {
1880
+ mode: 'chart' | 'table';
1881
+ chartType?: TChartType;
1882
+ reason: string;
1883
+ };
1884
+
1885
+ export declare type TDynamicVisualIntent = {
1886
+ primaryChartType?: TChartType | 'custom';
1887
+ layout: 'chart-only' | 'composite';
1888
+ includesKpis: boolean;
1889
+ };
1890
+
1855
1891
  export declare type TEvent = {
1856
1892
  type: 'success' | 'error' | 'info' | 'warning';
1857
1893
  message: any;
@@ -2080,6 +2116,8 @@ export declare type TTooltipFormatConfig = {
2080
2116
  formatOptions?: TFormatOptions;
2081
2117
  };
2082
2118
 
2119
+ export declare type TVisualizationMode = 'builtin' | 'dynamic';
2120
+
2083
2121
  export declare interface UpdateUserPreferenceRequest {
2084
2122
  defaultDashboardId: string | null;
2085
2123
  }
@@ -1858,6 +1858,8 @@ export declare type TCard = {
1858
1858
  customCfg?: any;
1859
1859
  preferences?: TCardPreferences;
1860
1860
  customCardPreferences?: TCustomCardPreferences;
1861
+ visualizationMode?: TVisualizationMode;
1862
+ dynamicCardPreferences?: TDynamicCardPreferences;
1861
1863
  lastSelectedDatabase?: string;
1862
1864
  lastSelectedDatamodelId?: string;
1863
1865
  lastSelectedSchema?: string;
@@ -2180,6 +2182,40 @@ export declare type TDbCapabilities = {
2180
2182
  supportsFilterClause?: boolean;
2181
2183
  };
2182
2184
 
2185
+ export declare type TDynamicCardPreferences = {
2186
+ renderer: 'dynamic-visual';
2187
+ artifactId?: string;
2188
+ parentArtifactId?: string;
2189
+ title?: string;
2190
+ rendererCode?: string;
2191
+ question?: string;
2192
+ provenance?: 'card-config' | 'sql' | 'sql+python';
2193
+ visualIntent?: TDynamicVisualIntent;
2194
+ assistantNote?: string;
2195
+ builtinDisplayOptions?: {
2196
+ showChrome?: boolean;
2197
+ allowScroll?: boolean;
2198
+ };
2199
+ fallback: TDynamicVisualFallback;
2200
+ error?: {
2201
+ stage: string;
2202
+ message: string;
2203
+ details?: string[];
2204
+ };
2205
+ };
2206
+
2207
+ export declare type TDynamicVisualFallback = {
2208
+ mode: 'chart' | 'table';
2209
+ chartType?: TChartType;
2210
+ reason: string;
2211
+ };
2212
+
2213
+ export declare type TDynamicVisualIntent = {
2214
+ primaryChartType?: TChartType | 'custom';
2215
+ layout: 'chart-only' | 'composite';
2216
+ includesKpis: boolean;
2217
+ };
2218
+
2183
2219
  export declare type TEvent = {
2184
2220
  type: 'success' | 'error' | 'info' | 'warning';
2185
2221
  message: any;
@@ -2637,6 +2673,8 @@ export declare type TTooltipFormatConfig = {
2637
2673
  formatOptions?: TFormatOptions;
2638
2674
  };
2639
2675
 
2676
+ export declare type TVisualizationMode = 'builtin' | 'dynamic';
2677
+
2640
2678
  /**
2641
2679
  * UI and behavior configuration for the embedded dashboard.
2642
2680
  */
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.267",
8
+ "version": "0.1.269",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -1,11 +0,0 @@
1
- "use strict";const g=require("react"),t=require("./index-C2i6CRUk.js"),e=require("react/jsx-runtime"),A=require("./use-create-flow-overlay-state-Cmt64wFE.js"),M=require("./use-visual-utils-Bdwejpa1.js"),T=require("./date-formatter-CqXdM6JO.js");/**
2
- * @license lucide-react v0.453.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const L=t.createLucideIcon("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
7
- * @license lucide-react v0.453.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const P=t.createLucideIcon("FilterX",[["path",{d:"M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055",key:"1fi1da"}],["path",{d:"m22 3-5 5",key:"12jva0"}],["path",{d:"m17 3 5 5",key:"k36vhe"}]]),V=1e4,O=15e3,z=3e4,R=3e4,$=12e4,k=2*60*60*1e3;function H(s){const r=Date.now()-s.getTime();return r<R?V:r<$?O:z}function q(){const{authToken:s,tokenProps:r}=t.useSemaphorContext(),p=t.useExportStore(h=>h.activeExports),[c,d]=g.useState(typeof document<"u"?!document.hidden:!0),u=g.useRef(null),n=g.useRef(!1),l=g.useRef(void 0),m=r==null?void 0:r.apiServiceUrl,o=s==null?void 0:s.accessToken,f=g.useCallback(()=>{const h=t.useExportStore.getState().activeExports;return Array.from(h.values()).filter(C=>t.isExportInProgress(C.status))},[]);g.useEffect(()=>{if(typeof document>"u")return;const h=()=>{d(!document.hidden)};return document.addEventListener("visibilitychange",h),()=>{document.removeEventListener("visibilitychange",h)}},[]);const b=g.useCallback(async()=>{if(!m||!o){n.current=!1;return}const h=f();if(h.length===0){n.current=!1;return}const C=Date.now(),N=h.filter(a=>C-a.startedAt.getTime()>k);if(N.length>0){const{updateExport:a}=t.useExportStore.getState().actions;for(const i of N)a(i.id,{status:"failed",error:"Export timed out. Please try again or contact support.",lastUpdatedAt:new Date})}const x=h.filter(a=>C-a.startedAt.getTime()<=k);if(x.length===0){n.current=!1;return}const j=await Promise.allSettled(x.map(async a=>{try{const i=await t.getExportStatus(m,o,a.id);let v;if(i.status==="completed")try{v=await t.getDownloadUrl(m,o,a.id)}catch(E){console.error(`[useExportPolling] Failed to get download URL for ${a.id}:`,E)}return{id:a.id,status:i.status,progress:i.progress,completedChunks:i.completedChunks,completedAt:i.completedAt?new Date(i.completedAt):void 0,lastUpdatedAt:new Date,fileSize:i.fileSize,error:i.error,downloadUrl:v}}catch(i){return console.error(`[useExportPolling] Failed to poll export ${a.id}:`,i),null}})),{updateExport:S}=t.useExportStore.getState().actions;for(const a of j)a.status==="fulfilled"&&a.value&&S(a.value.id,a.value);const w=f();if(w.length>0&&!document.hidden){const a=w.reduce((v,E)=>E.startedAt<v?E.startedAt:v,w[0].startedAt),i=H(a);u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{var v;(v=l.current)==null||v.call(l)},i)}else n.current=!1},[m,o,f]);return g.useEffect(()=>{l.current=b},[b]),g.useEffect(()=>{var C;f().length>0&&c&&!n.current&&(n.current=!0,(C=l.current)==null||C.call(l))},[p,c,f]),g.useEffect(()=>{var C;const h=f();c&&h.length>0&&!n.current&&(n.current=!0,(C=l.current)==null||C.call(l))},[c,f]),g.useEffect(()=>{!c&&u.current&&(clearTimeout(u.current),u.current=null,n.current=!1)},[c]),g.useEffect(()=>()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]),{isPolling:n.current,isTabVisible:c,inProgressCount:f().length}}function _(){const{authToken:s,tokenProps:r}=t.useSemaphorContext(),p=t.useExportStore(l=>l.activeExports),{addExport:c}=t.useExportActions(),d=g.useRef(!1),u=r==null?void 0:r.apiServiceUrl,n=s==null?void 0:s.accessToken;g.useEffect(()=>{if(d.current||!u||!n)return;(async()=>{try{const{exports:m}=await t.getExports(u,n,{status:["pending","processing","chunking","compacting","completed","failed"],limit:20});for(const o of m){if(p.has(o.id))continue;const f=o.totalChunks?Math.round(o.completedChunks/o.totalChunks*100):0;let b;if(o.status==="completed")try{b=await t.getDownloadUrl(u,n,o.id)}catch(C){console.error(`[useExportRecovery] Failed to get download URL for ${o.id}:`,C)}const h={id:o.id,status:o.status,progress:f,title:X(o),totalRows:o.totalRows,totalChunks:o.totalChunks,completedChunks:o.completedChunks,startedAt:new Date(o.createdAt),lastUpdatedAt:new Date,completedAt:o.completedAt?new Date(o.completedAt):void 0,fileSize:o.fileSize,error:o.error,expiresAt:new Date(o.expiresAt),downloadUrl:b};c(h)}d.current=!0}catch(m){console.error("[useExportRecovery] Failed to recover exports:",m),d.current=!0}})()},[u,n,c,p])}function X(s){return s.title?s.title:t.isExportInProgress(s.status)?"Export in progress...":s.status==="completed"?"Export completed":s.status==="failed"?"Export failed":"Export"}function G({open:s,onOpenChange:r,isLibraryVisual:p,currentVisualName:c,isSaving:d=!1,destinationMode:u="both",onConfirm:n}){const[l,m]=g.useState(p&&c?`Copy of ${c}`:c||""),[o,f]=g.useState("");g.useEffect(()=>{s&&(m(p&&c?`Copy of ${c}`:c||""),f(""))},[s,p,c]);const b=!!l.trim(),h=u==="local"?{saveToLibrary:!1,saveToCurrentDashboard:!0,badgeType:"local",description:"Creates a local copy on the current dashboard.",actionLabel:"Add to Dashboard (Local)"}:u==="library"?{saveToLibrary:!0,saveToCurrentDashboard:!1,badgeType:"library",description:"Creates a reusable visual in Visual Library.",actionLabel:"Save as Library Visual"}:{saveToLibrary:!0,saveToCurrentDashboard:!0,badgeType:"linked",description:"Creates a new library visual and adds a linked copy to this dashboard.",actionLabel:"Save Copy as Linked Visual"},C=()=>{!b||d||n({name:l.trim(),description:o.trim()||void 0,saveToLibrary:h.saveToLibrary,saveToCurrentDashboard:h.saveToCurrentDashboard})};return e.jsx(t.Dialog,{open:s,onOpenChange:r,children:e.jsxs(t.DialogContent,{className:"sm:max-w-[500px]",children:[e.jsxs(t.DialogHeader,{children:[e.jsxs(t.DialogTitle,{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Save Visual As"}),h.badgeType!=="local"&&e.jsx(A.VisualBadge,{type:h.badgeType,showLabel:!0,className:"px-2 py-0.5"})]}),e.jsx(t.DialogDescription,{children:h.description})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(t.Label,{htmlFor:"name",children:"Name"}),e.jsx(t.Input$1,{id:"name",value:l,onChange:N=>m(N.target.value),placeholder:"Enter visual name",disabled:d})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(t.Label,{htmlFor:"description",children:"Description (optional)"}),e.jsx(t.Textarea,{id:"description",value:o,onChange:N=>f(N.target.value),placeholder:"Enter visual description",rows:3,disabled:d})]})]}),e.jsxs(t.DialogFooter,{children:[e.jsx(t.Button,{variant:"outline",onClick:()=>r(!1),disabled:d,children:"Cancel"}),e.jsxs(t.Button,{onClick:C,disabled:!b||d,children:[d&&e.jsx(t.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),h.actionLabel]})]})]})})}function K(){const[s,r]=g.useState(!1),[p,c]=g.useState(!1),[d,u]=g.useState(null),n=t.useEditorStore(i=>i.frame),l=t.useEditorStore(i=>i.card),m=t.useSelectedVisual(),o=t.useDashboardStore(i=>i.selectedSheetId),f=t.useDashboardStore(i=>i.actions.setIsDashboardPanelOpen),{getUpdatedFrame:b}=M.useVisualUtils(),{selectVisual:h}=t.useManagementActions(),{addFrame:C,setSelectedFrameId:N,setIsVisualEditing:x}=t.useDashboardActions(),j=!!(n!=null&&n.visualId),S=(()=>{var i,v;return((i=n==null?void 0:n.cards)==null?void 0:i.length)===1&&((v=n.cards[0])!=null&&v.title)?n.cards[0].title:m!=null&&m.title?m.title:(l==null?void 0:l.title)||"Untitled Visual"})(),w=t.useCreateVisualWithFrame(i=>{if(i!=null&&i.id){if(h(i),p&&d&&o){const v={...d,id:t.v4(),visualId:i.id};C(o,v,"end"),N(v.id),c(!1),u(null),x(!1)}f(!0),r(!1)}});return{saveAsDialogOpen:s,setSaveAsDialogOpen:r,handleSaveAs:async i=>{if(!o){t.ue.error("No sheet selected");return}const v=b(),y=v.cards.length===1?{...v,cards:v.cards.map(D=>({...D,title:i.name}))}:v;if(i.saveToLibrary){c(i.saveToCurrentDashboard),u(y);const D={title:i.name,description:i.description,frameObject:y,isPrivate:!1};w.mutate(D)}else if(i.saveToCurrentDashboard){const D={...y,id:t.v4(),visualId:void 0};C(o,D,"end"),N(D.id),t.ue.success("Visual saved to dashboard"),r(!1),x(!1)}},isLibraryVisual:j,currentVisualName:S,isSaving:w.isPending}}function W({className:s}){const r=t.useEditorStore(y=>y.frame),p=t.useManagementStore(y=>y.selectedVisual),c=t.useDashboardStore(y=>y.selectedFrameId),d=t.useDashboardStore(y=>y.selectedSheetId),{setIsVisualEditing:u,updateFrame:n}=t.useDashboardActions(),[l,m]=g.useState(!1),[o,f]=g.useState("both"),b=!!(r!=null&&r.visualId||p!=null&&p.id),h=!!(r!=null&&r.visualId&&c),C=b&&!h,{saveAsDialogOpen:N,setSaveAsDialogOpen:x,handleSaveAs:j,isLibraryVisual:S,currentVisualName:w,isSaving:a}=K(),{getUpdatedFrame:i}=M.useVisualUtils(),v=()=>{if(!d){t.ue.error("No sheet selected");return}if(l)return;m(!0);const D={...i(),visualId:void 0};n(d,D),setTimeout(()=>{m(!1),t.ue.success("Changes applied. Visual is now local to this dashboard"),u(!1)},300)},E=y=>{f(y),x(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"inline-flex items-center overflow-hidden rounded-md border border-input",children:[!b&&e.jsx(A.EditorAcceptButton,{className:t.cn(s,"rounded-none border-0"),variant:"default"}),b&&C&&e.jsx(A.VisualSaveButton,{className:t.cn(s,"rounded-none border-0"),variant:"default"}),b&&h&&e.jsx(A.VisualSaveAndApplyButton,{className:t.cn(s,"rounded-none border-0")}),e.jsxs(t.DropdownMenu,{modal:!1,children:[e.jsx(t.DropdownMenuTrigger,{className:"h-8",asChild:!0,children:e.jsx(t.Button,{variant:"default",size:"sm",className:t.cn(s,"w-8 rounded-none border-0 border-l border-primary-foreground/30 px-2"),"aria-label":"Open visual save options",disabled:a||l,children:e.jsx(t.ChevronDown,{className:"h-4 w-4"})})}),e.jsxs(t.DropdownMenuContent,{align:"end",children:[h&&e.jsxs(e.Fragment,{children:[e.jsxs(t.DropdownMenuItem,{onClick:v,disabled:l,children:[e.jsx(t.Check,{className:"mr-2 h-4 w-4"}),l?"Applying...":"Apply Locally"]}),e.jsx(t.DropdownMenuSeparator,{})]}),e.jsxs(t.DropdownMenuItem,{onClick:()=>E("local"),disabled:a,children:[e.jsx(t.Plus,{className:"mr-2 h-4 w-4"}),"Add to Dashboard (Local)"]}),e.jsxs(t.DropdownMenuItem,{onClick:()=>E("library"),disabled:a,children:[e.jsx(A.Library,{className:"mr-2 h-4 w-4"}),"Save as Library Visual"]}),e.jsxs(t.DropdownMenuItem,{onClick:()=>E("both"),disabled:a,children:[e.jsx(A.Link2,{className:"mr-2 h-4 w-4"}),"Save Copy as Linked Visual"]})]})]})]}),e.jsx(A.EditorCancelButton,{className:s}),e.jsx(G,{open:N,onOpenChange:y=>{a||x(y)},isLibraryVisual:S,currentVisualName:w,isSaving:a,destinationMode:o,onConfirm:j})]})}function Q({className:s,switchClassName:r}){const p=t.useEditorStore(l=>l.isDevMode),c=t.useDashboardStore(l=>l.isVisualEditing),{setIsDevMode:d}=t.useEditorActions(),{config:u}=g.useContext(t.SemaphorContext).tokenProps,n=(u==null?void 0:u.showAdvancedMode)!==!1;return!c||!n?null:e.jsxs("div",{className:t.cn("flex items-center space-x-2",s),children:[e.jsx(t.DevModeSwitch,{className:t.cn("",r),checked:p,onCheckedChange:()=>d(!p),id:"advanced-mode",icon:e.jsx(t.CodeXml,{className:"h-4 w-4"}),tooltip:"Advanced Mode"}),e.jsx("label",{htmlFor:"advanced-mode",className:"sr-only",children:"Advanced Mode"})]})}function Y({open:s,onOpenChange:r,onSave:p,onDiscard:c,isSaving:d,title:u="Unsaved Changes",description:n="You have unsaved changes to this dashboard. What would you like to do?",cancelLabel:l="Cancel",discardLabel:m="Discard",saveLabel:o="Save & Close"}){const f=b=>{!b&&d||r(b)};return e.jsx(t.AlertDialog,{open:s,onOpenChange:f,children:e.jsxs(t.AlertDialogContent,{className:"max-w-[520px] border-border/70 p-6",children:[e.jsxs(t.AlertDialogHeader,{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-amber-50 ring-1 ring-amber-200/70",children:e.jsx(t.TriangleAlert,{className:"h-[18px] w-[18px] text-amber-600"})}),e.jsx(t.AlertDialogTitle,{className:"text-lg font-semibold tracking-tight",children:u})]}),e.jsx(t.AlertDialogDescription,{className:"text-sm leading-6 text-muted-foreground",children:n})]}),e.jsxs(t.AlertDialogFooter,{className:"mt-2 flex-col gap-1.5 sm:flex-row sm:justify-end",children:[e.jsx(t.AlertDialogCancel,{disabled:d,className:"order-1 m-0 h-auto min-h-9 whitespace-normal border-border/60 px-4 py-2 text-center leading-5 sm:order-1",children:l}),e.jsx("button",{onClick:c,disabled:d,className:"order-2 h-auto min-h-9 whitespace-normal rounded-md border border-destructive/30 bg-destructive/10 px-4 py-2 text-center text-sm font-medium leading-5 text-destructive transition-colors hover:bg-destructive/20 disabled:pointer-events-none disabled:opacity-50 sm:order-2",children:m}),e.jsx(t.AlertDialogAction,{onClick:p,disabled:d,className:"order-3 m-0 h-auto min-h-9 whitespace-normal px-4 py-2 text-center leading-5 sm:order-3",children:d?e.jsxs(e.Fragment,{children:[e.jsx(t.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):o})]})]})})}function Z(s,r,p,c){g.useEffect(()=>{s&&!p&&r&&c(t.cloneDeep(r))},[s,p,r,c])}function U({export:s,onRemove:r}){const p=()=>{s.downloadUrl&&window.open(s.downloadUrl,"_blank")},c=l=>{l.stopPropagation(),r==null||r(s.id)},d=()=>{switch(s.status){case"completed":return e.jsx(t.CircleCheck,{className:"mt-0.5 h-5 w-5 shrink-0 text-green-600"});case"failed":return e.jsx(A.CircleX,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"});default:return e.jsx(t.LoaderCircle,{className:"text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin"})}},u=t.isExportInProgress(s.status),n=(()=>{switch(s.status){case"pending":return"Queued...";case"processing":return"Processing...";case"chunking":return"Processing...";case"compacting":return"Finalizing...";default:return"Processing..."}})();return e.jsxs("div",{className:"group p-4 transition-colors hover:bg-muted/50",children:[e.jsxs("div",{className:"mb-2 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[d(),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"mb-1 truncate text-sm font-medium",children:s.title}),s.status==="completed"&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[s.totalRows.toLocaleString()," rows"]}),s.fileSize&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"•"}),e.jsx("span",{children:t.formatFileSize(s.fileSize)})]})]}),u&&e.jsx("div",{className:"text-xs text-muted-foreground",children:n}),s.status==="failed"&&e.jsx("div",{className:"line-clamp-2 text-xs text-destructive",children:s.error||"Export failed"})]})]}),e.jsx(t.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",onClick:c,"aria-label":"Remove notification",children:e.jsx(t.X,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"ml-8",children:[s.status==="completed"&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:T.formatDistanceToNow(s.startedAt,{addSuffix:!0})}),s.downloadUrl&&e.jsxs(t.Button,{size:"sm",variant:"outline",className:"h-8 bg-transparent",onClick:p,children:[e.jsx(t.Download,{className:"mr-1.5 h-3.5 w-3.5"}),"Download"]})]}),u&&e.jsxs("div",{children:[e.jsx(t.Progress,{value:s.progress,className:"h-1.5"}),e.jsxs("span",{className:"mt-1 block text-xs text-muted-foreground",children:[s.progress,"% complete"]})]}),s.status==="failed"&&e.jsx("span",{className:"text-xs text-muted-foreground",children:T.formatDistanceToNow(s.startedAt,{addSuffix:!0})})]})]})}function B(){const{authToken:s,tokenProps:r}=t.useSemaphorContext(),p=t.useExportStore(x=>x.activeExports),{clearCompleted:c,removeExport:d,updateExport:u}=t.useExportActions(),[n,l]=g.useState(!1),[m,o]=g.useState(!1),f=Array.from(p.values()).sort((x,j)=>j.startedAt.getTime()-x.startedAt.getTime()),b=f.some(x=>x.status==="completed"||x.status==="failed"),h=g.useCallback(async()=>{const x=r==null?void 0:r.apiServiceUrl,j=s==null?void 0:s.accessToken;if(!(!x||!j)){l(!0);try{const S=Array.from(p.values());await Promise.all(S.map(async w=>{try{const a=await t.getExportStatus(x,j,w.id);let i;if(a.status==="completed")try{i=await t.getDownloadUrl(x,j,w.id)}catch(v){console.error(`Failed to get download URL for ${w.id}:`,v)}u(w.id,{status:a.status,progress:a.progress,completedChunks:a.completedChunks,completedAt:a.completedAt?new Date(a.completedAt):void 0,lastUpdatedAt:new Date,fileSize:a.fileSize,error:a.error,downloadUrl:i})}catch(a){console.error(`Failed to refresh export ${w.id}:`,a)}}))}finally{l(!1)}}},[p,s==null?void 0:s.accessToken,r==null?void 0:r.apiServiceUrl,u]),C=g.useCallback(async()=>{const x=r==null?void 0:r.apiServiceUrl,j=s==null?void 0:s.accessToken;if(!x||!j){c();return}o(!0);try{const S=f.filter(a=>a.status==="completed"||a.status==="failed"),w=await Promise.allSettled(S.map(async a=>(await t.cancelExport(x,j,a.id),a.id)));for(const a of w)a.status==="fulfilled"?d(a.value):console.error("Failed to delete export:",a.reason)}finally{o(!1)}},[f,r==null?void 0:r.apiServiceUrl,s==null?void 0:s.accessToken,c,d]),N=g.useCallback(async x=>{const j=r==null?void 0:r.apiServiceUrl,S=s==null?void 0:s.accessToken;if(j&&S)try{await t.cancelExport(j,S,x),d(x);return}catch(w){console.error(`Failed to cancel export ${x}:`,w)}d(x)},[r==null?void 0:r.apiServiceUrl,s==null?void 0:s.accessToken,d]);return f.length===0?e.jsxs("div",{className:"p-6 text-center",children:[e.jsx(L,{className:"mx-auto mb-2 h-8 w-8 text-muted-foreground"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"No active exports"}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Large exports will appear here"})]}):e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"h-5 w-5 text-muted-foreground"}),e.jsx("h4",{className:"font-semibold",children:"Exports"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:h,disabled:n,title:"Refresh status",children:e.jsx(t.RefreshCw,{className:`h-4 w-4 ${n?"animate-spin":""}`})}),b&&e.jsx(t.Button,{variant:"ghost",size:"sm",className:"h-7 px-2 text-sm",onClick:C,disabled:m,children:m?"Clearing...":"Clear all"})]})]}),e.jsx("div",{className:"max-h-[350px] overflow-y-auto",children:e.jsx("div",{className:"divide-y",children:f.map(x=>e.jsx(U,{export:x,onRemove:N},x.id))})})]})}function J({variant:s}){const r=t.useExportStore(m=>m.activeExports),p=t.useInProgressExportsCount(),c=r.size>0,d=Array.from(r.values()).some(m=>m.status==="completed"||m.status==="failed"),n=p>0?p>9?"9+":String(p):null,l=c;return e.jsxs(t.Popover,{children:[e.jsx(t.PopoverTrigger,{asChild:!0,children:e.jsxs(t.Button,{variant:s??"ghost",size:"icon",className:"relative h-8 w-8","aria-label":"Export notifications",children:[e.jsx(t.Bell,{className:"h-4 w-4"}),l&&e.jsx("span",{className:`absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${n?"-right-0.5 -top-0.5 h-4 min-w-4 px-0.5 text-[10px] font-semibold":"right-0.5 top-0.5 h-2 w-2"}`,children:n})]})}),e.jsx(t.PopoverContent,{className:"w-80 p-0",align:"end",sideOffset:8,children:e.jsx(B,{})})]})}function ee(s){if(s)return{renamed:s.type==="rename"?{oldId:s.oldId,newId:s.newId}:void 0,removedControlId:s.type==="remove"?s.controlId:void 0,cardBindingsById:s.type==="add"||s.type==="update"?s.cardBindingsById:void 0,affectedBindingControlIds:s.type==="add"||s.type==="update"?s.affectedBindingControlIds:void 0}}function te({open:s,onOpenChange:r,trigger:p,showTrigger:c=!0,initialMode:d="manage"}){const u=d==="create",{forceClose:n,handleOpenChange:l,isCreateFlowActive:m,preventPassiveDismissDuringCreate:o,resolvedOpen:f,setIsCreateFlowActive:b}=A.useCreateFlowOverlayState({open:s,onOpenChange:r,initialCreateFlowActive:d==="create"}),h=t.useDashboardStore(D=>D.dashboard),{setDashboardControlsModel:C}=t.useDashboardActions(),{participants:N}=t.useDashboardStructuralParticipants(t.getDashboardCards(h)),x=Array.from(new Map(N.flatMap(D=>D.fieldChoices.map(I=>{var F;return[I.value,{option:I,target:(F=D.fieldTargetMap)==null?void 0:F[I.value]}]}))).values()),j=Array.from(new Map(N.flatMap(D=>D.metricChoices.map(I=>{var F;return[I.value,{option:I,target:(F=D.metricTargetMap)==null?void 0:F[I.value]}]}))).values()),S=t.collectDashboardControlIds({...h||{},controls:[]}),w=t.buildDashboardStructuralParticipantIdsByControlId(h),a=(D,I,F)=>{C(D,I,ee(F))},i=g.useCallback(()=>{if(u){n();return}b(!1)},[u,n,b]),v=e.jsx(A.ControlDefinitionListEditor,{scope:"dashboard",controls:h.controls||[],reservedControlIds:S,defaultValues:h.defaultControlValues||{},usageByControlId:t.buildDashboardControlUsageById(h),availableFieldChoices:x,availableMetricChoices:j,structuralParticipants:N,structuralParticipantIdsByControlId:w,initialCreateFlow:d==="create",onCreateFlowActiveChange:b,onCreateFlowComplete:i,onChange:a,emptyMessage:"No dashboard controls yet."}),E=m?"Add dashboard control":"Dashboard Controls",y=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Dashboard Controls"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control."})]}),v]});return c?e.jsxs(t.Popover,{open:f,onOpenChange:l,children:[e.jsx(t.PopoverTrigger,{asChild:!0,children:p||e.jsxs(t.Button,{variant:"outline",className:"h-7 px-2",size:"sm",children:[e.jsx(t.SlidersHorizontal,{className:"mr-2 h-4 w-4"}),"Controls"]})}),e.jsx(t.PopoverContent,{className:"w-[620px] max-w-[95vw] space-y-4",align:"end",onEscapeKeyDown:o,onPointerDownOutside:o,children:y})]}):e.jsx(t.Dialog,{open:f,onOpenChange:l,children:e.jsxs(t.DialogContent,{className:"flex max-h-[88vh] max-w-[980px] flex-col overflow-hidden",showCloseButton:!m,onEscapeKeyDown:o,onPointerDownOutside:o,children:[e.jsxs(t.DialogHeader,{className:m?"space-y-0":void 0,children:[e.jsx(t.DialogTitle,{children:E}),e.jsx(t.DialogDescription,{className:m?"sr-only":void 0,children:m?"Configure and add a shared dashboard control.":"Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control."})]}),e.jsx("div",{className:"min-h-0 overflow-y-auto pr-1",children:v})]})})}function se({showFilters:s,onToggleFilters:r,onAddFilter:p,onAddControl:c,onManageControls:d,size:u="default",className:n,primaryButtonClassName:l,secondaryButtonClassName:m,dropdownContentClassName:o}){const f=u==="toolbar";return e.jsxs("div",{className:t.cn("relative inline-flex items-stretch overflow-visible rounded-md border border-input bg-background shadow-none",n),children:[e.jsxs(t.Button,{variant:"ghost",className:t.cn(f?"h-8":"h-7","rounded-none border-0 bg-transparent pl-3 pr-2 shadow-none hover:bg-accent/50",l),onClick:r,size:"sm",children:[s?e.jsx(P,{className:"mr-2 h-4 w-4"}):e.jsx(t.Filter,{className:"mr-2 h-4 w-4"}),"Filter"]}),e.jsxs(t.DropdownMenu,{children:[e.jsx(t.DropdownMenuTrigger,{asChild:!0,children:e.jsx(t.Button,{className:t.cn(f?"h-8 w-8":"h-7 w-8","rounded-none border-0 bg-transparent px-1 shadow-none hover:bg-accent/50",m),variant:"ghost",size:"sm","aria-label":"Filter and control actions",children:e.jsx(t.ChevronDown,{className:"h-4 w-4"})})}),e.jsxs(t.DropdownMenuContent,{align:"start",className:t.cn("rounded-xl border border-border/60 p-1 shadow-sm",o),children:[e.jsxs(t.DropdownMenuItem,{onSelect:p,children:[e.jsx(t.Filter,{className:"mr-2 h-4 w-4"}),"Add filter"]}),e.jsxs(t.DropdownMenuItem,{onSelect:c,children:[e.jsx(t.SlidersHorizontal,{className:"mr-2 h-4 w-4"}),"Add control"]}),e.jsxs(t.DropdownMenuItem,{onSelect:d,children:[e.jsx(t.Pencil,{className:"mr-2 h-4 w-4"}),"Manage controls"]})]})]})]})}exports.AdvancedModeToggle=Q;exports.DashboardControlsSettings=te;exports.DashboardFilterControlsButton=se;exports.ExportNotificationItem=U;exports.ExportNotificationList=B;exports.NotificationBell=J;exports.UnsavedChangesAlert=Y;exports.VisualEditingControls=W;exports.useExportPolling=q;exports.useExportRecovery=_;exports.usePristineSnapshotInitializer=Z;