react-semaphor 0.1.501 → 0.1.503

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 (33) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/chunks/dashboard-briefing-launcher-CHMQi0pU.cjs +21 -0
  4. package/dist/chunks/{dashboard-briefing-launcher-DfC-k5P3.js → dashboard-briefing-launcher-COqlnnQ2.js} +1201 -1160
  5. package/dist/chunks/{dashboard-controls-CUQUph1I.js → dashboard-controls-Bp6XzVvx.js} +665 -654
  6. package/dist/chunks/{dashboard-controls-DQt2D99m.cjs → dashboard-controls-D8z05ZfX.cjs} +10 -10
  7. package/dist/chunks/{dashboard-json-H9GxGLRA.cjs → dashboard-json-DcvkxkL3.cjs} +1 -1
  8. package/dist/chunks/{dashboard-json-BHZYDA2F.js → dashboard-json-Dw7kHCe5.js} +2 -2
  9. package/dist/chunks/{edit-dashboard-visual-hYQMdpjN.js → edit-dashboard-visual-D5vvLzkS.js} +3 -3
  10. package/dist/chunks/{edit-dashboard-visual-B8p6XTig.cjs → edit-dashboard-visual-olfXEK5D.cjs} +1 -1
  11. package/dist/chunks/{editor-action-buttons-DiRpbCIR.cjs → editor-action-buttons-BsWibSiV.cjs} +1 -1
  12. package/dist/chunks/{editor-action-buttons-DjVEnfLQ.js → editor-action-buttons-DYiJr5u3.js} +2 -2
  13. package/dist/chunks/index-C3rUIii0.cjs +1417 -0
  14. package/dist/chunks/{index-D-UGbMFA.js → index-ZKSLtc9_.js} +30214 -29909
  15. package/dist/chunks/{report-preferences-dialog-B4pIkowU.js → report-preferences-dialog-BXaILrOK.js} +2 -2
  16. package/dist/chunks/{report-preferences-dialog-DwBFTNNN.cjs → report-preferences-dialog-BZvi_3DV.cjs} +1 -1
  17. package/dist/chunks/{switch-B4wVqV4L.js → switch-DWM8d-UR.js} +6 -0
  18. package/dist/chunks/{switch-DVjKkt22.cjs → switch-Dej7zCoP.cjs} +1 -1
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/data-app-builder/index.cjs +1 -1
  22. package/dist/data-app-builder/index.js +2 -2
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +97 -96
  25. package/dist/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/dashboard.d.ts +11 -0
  28. package/dist/types/main.d.ts +21 -1
  29. package/dist/types/surfboard.d.ts +11 -0
  30. package/dist/types/types.d.ts +11 -0
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-briefing-launcher-D6z_n26J.cjs +0 -21
  33. package/dist/chunks/index-se8e2QhO.cjs +0 -1417
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../chunks/index-se8e2QhO.cjs"),e=require("../chunks/common-types-nBuCd3u2.cjs");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-C3rUIii0.cjs"),e=require("../chunks/common-types-nBuCd3u2.cjs");exports.Dashboard=o.Dashboard;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as o } from "../chunks/index-D-UGbMFA.js";
1
+ import { D as o } from "../chunks/index-ZKSLtc9_.js";
2
2
  import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-se8e2QhO.cjs"),w=require("../chunks/switch-DVjKkt22.cjs"),Ze=require("../data-app-builder-browser-runtime/index.cjs"),te=require("../chunks/x-B6ghREd2.cjs"),Cn=require("../chunks/save-3dYRmehL.cjs"),Rn=require("../chunks/mouse-pointer-2-DX4A_XZw.cjs"),tt=require("../chunks/search-BqqhaMx9.cjs");function Tr(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const Bn=Tr(p),Dn=Tr(An);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-C3rUIii0.cjs"),w=require("../chunks/switch-Dej7zCoP.cjs"),Ze=require("../data-app-builder-browser-runtime/index.cjs"),te=require("../chunks/x-B6ghREd2.cjs"),Cn=require("../chunks/save-3dYRmehL.cjs"),Rn=require("../chunks/mouse-pointer-2-DX4A_XZw.cjs"),tt=require("../chunks/search-BqqhaMx9.cjs");function Tr(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const Bn=Tr(p),Dn=Tr(An);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -2,8 +2,8 @@ import { jsx as r, jsxs as c, Fragment as re } from "react/jsx-runtime";
2
2
  import * as Zn from "react";
3
3
  import { useContext as qn, useState as x, useRef as oe, useMemo as je, useEffect as W, useCallback as Ot } from "react";
4
4
  import * as Xn from "react-dom/client";
5
- import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, R as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-D-UGbMFA.js";
6
- import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-B4wVqV4L.js";
5
+ import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, R as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-ZKSLtc9_.js";
6
+ import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-DWM8d-UR.js";
7
7
  import { loadSemaphorBrowserRuntime as ot } from "../data-app-builder-browser-runtime/index.js";
8
8
  import { c as Ve, X as He } from "../chunks/x-CXDkqdur.js";
9
9
  import { S as fa } from "../chunks/save-DgMfP0j8.js";
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-se8e2QhO.cjs"),T=require("./chunks/common-types-nBuCd3u2.cjs"),R=require("./chunks/report-preferences-dialog-DwBFTNNN.cjs"),i=require("react/jsx-runtime"),r=require("./chunks/switch-DVjKkt22.cjs"),D=require("react"),N=require("./chunks/field-dependencies-R7MrlW6D.cjs"),l=require("./chunks/validators-D2F_uxxP.cjs"),u=require("./chunks/dashboard-briefing-launcher-D6z_n26J.cjs"),w=require("./chunks/use-debounced-dirty-check-XHSwAefL.cjs");require("./chunks/matrix-operation-contract-thtFuUYf.cjs");require("./chunks/matrix-continuation-6nhDy-lF.cjs");require("./value-format-preferences/index.cjs");const L=require("./chunks/report-runtime-context-CqFbgZq9.cjs"),B=require("./chunks/pivot-result-identity-DJyF4I2K.cjs");require("./chunks/field-aggregations-mlkON_QA.cjs");const A=require("./chunks/calculated-field-identity-CtYhhZoG.cjs");require("zod");require("./chunks/constants-DNgpRMaX.cjs");require("react-dom");require("./chunks/index-Bh3SlWJS.cjs");require("./chunks/appearance-context-tNjvTJj3.cjs");require("./chunks/color-CyB5o13F.cjs");require("./chunks/index-C8XCKzB6.cjs");const S=require("./chunks/normalize-dashboard-for-dirty-check-BYtBA708.cjs"),M=require("./chunks/x-B6ghREd2.cjs");require("./chunks/appearance-runtime-provider-Ca8rxO86.cjs");function j(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(a,o,d.get?d:{enumerable:!0,get:()=>t[o]})}}return a.default=t,Object.freeze(a)}const m=j(D);function I(t){const{displayPreferences:a,cardId:o,...d}=t,n={...d,id:t.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:t.cardId}),i.jsx(e.UXProvider,{appearance:t.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:a,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(q,{cardId:o})})})})]})})}function q({cardId:t}){const a=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:d}=D.useMemo(()=>{const n=a==null?void 0:a.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),h=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===t),E=n==null?void 0:n.find(s=>{var C;return(C=s==null?void 0:s.cards)==null?void 0:C.find(g=>(g==null?void 0:g.id)===t)});return{card:h,frame:E}},[a,t]);return!o||!d?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${t}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:d})})})}function U(t,a,o,d){D.useEffect(()=>{t&&!o&&a&&d(A.cloneDeep(a))},[t,o,a,d])}function k({name:t,items:a,value:o,onChange:d,isLoading:n,isError:c,refetch:h,className:E,icon:s,showNone:C=!1}){const g=m.useRef(null),[y,b]=m.useState(!1),[F,v]=m.useState("100%"),x=C?[...a||[],{id:"none",name:"None"}]:a;m.useLayoutEffect(()=>{g.current&&v(g.current.offsetWidth)},[]);function _(){var f;return n?"Loading...":c?"Error":o?(f=a==null?void 0:a.find(p=>p.id===o))==null?void 0:f.name:`Select ${t}`}function P(f,p){d(p),b(!1)}return i.jsxs(r.Popover,{open:y,onOpenChange:b,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":y,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:_()})]}),i.jsx(M.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:F},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:h,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",t==null?void 0:t.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>P(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function O(t,a){D.useEffect(()=>(t&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{t&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[t,a])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixCardView=e.MatrixCardView;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.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;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.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CONTROL_CARD_DEFAULT_VALUE=T.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=T.EMPTY_SELECTION;exports.ReportPreferencesDialog=R.ReportPreferencesDialog;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.DEFAULT_SEMANTIC_DOMAIN_ACCESS=N.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.CALCULATED_FIELD_ENTITY_MARKER=l.CALCULATED_FIELD_ENTITY_MARKER;exports.DATE_FORMAT_VALUES=l.DATE_FORMAT_VALUES;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=l.LEGACY_CALCULATED_FIELD_ENTITY_MARKER;exports.PivotMarkerEnum=l.PivotMarkerEnum;exports.getCalculatedFieldComputeStage=l.getCalculatedFieldComputeStage;exports.getFieldRuntimeColumnName=l.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=l.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=l.hasCalculatedFormulaInputs;exports.hasSyntheticCalculatedFieldOwner=l.hasSyntheticCalculatedFieldOwner;exports.inspectCalculatedField=l.inspectCalculatedField;exports.isCalculatedDimension=l.isCalculatedDimension;exports.isCalculatedMetric=l.isCalculatedMetric;exports.isDerivedField=l.isDerivedField;exports.normalizeCalculatedFieldRepresentation=l.normalizeCalculatedFieldRepresentation;exports.shouldDropInheritedCalculationAggregate=l.shouldDropInheritedCalculationAggregate;exports.AdvancedModeToggle=u.AdvancedModeToggle;exports.DashboardBriefingLauncher=u.DashboardBriefingLauncher;exports.DashboardControlsSettings=u.DashboardControlsSettings;exports.DashboardFilterControlsButton=u.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=u.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=u.DocumentControlsSettings;exports.ExportNotificationItem=u.ExportNotificationItem;exports.ExportNotificationList=u.ExportNotificationList;exports.NotificationBell=u.NotificationBell;exports.UnsavedChangesAlert=u.UnsavedChangesAlert;exports.VisualEditingControls=u.VisualEditingControls;exports.VisualsLibraryDialog=u.VisualsLibraryDialog;exports.WatchDashboardButton=u.WatchDashboardButton;exports.useExportPolling=u.useExportPolling;exports.useExportRecovery=u.useExportRecovery;exports.useDebouncedDirtyCheck=w.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=L.DEFAULT_CALENDAR_CONTEXT;exports.resolveQueryColumnKeyMapEntry=B.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=B.resolveUniqueQueryColumnKeyMapEntry;exports.cloneDeep=A.cloneDeep;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=k;exports.Visual=I;exports.useExposePrintState=O;exports.usePristineSnapshotInitializer=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-C3rUIii0.cjs"),T=require("./chunks/common-types-nBuCd3u2.cjs"),R=require("./chunks/report-preferences-dialog-BZvi_3DV.cjs"),i=require("react/jsx-runtime"),r=require("./chunks/switch-Dej7zCoP.cjs"),h=require("react"),N=require("./chunks/field-dependencies-R7MrlW6D.cjs"),u=require("./chunks/validators-D2F_uxxP.cjs"),l=require("./chunks/dashboard-briefing-launcher-CHMQi0pU.cjs"),w=require("./chunks/use-debounced-dirty-check-XHSwAefL.cjs");require("./chunks/matrix-operation-contract-thtFuUYf.cjs");require("./chunks/matrix-continuation-6nhDy-lF.cjs");require("./value-format-preferences/index.cjs");const L=require("./chunks/report-runtime-context-CqFbgZq9.cjs"),B=require("./chunks/pivot-result-identity-DJyF4I2K.cjs");require("./chunks/field-aggregations-mlkON_QA.cjs");const A=require("./chunks/calculated-field-identity-CtYhhZoG.cjs");require("zod");require("./chunks/constants-DNgpRMaX.cjs");require("react-dom");require("./chunks/index-Bh3SlWJS.cjs");require("./chunks/appearance-context-tNjvTJj3.cjs");require("./chunks/color-CyB5o13F.cjs");require("./chunks/index-C8XCKzB6.cjs");const S=require("./chunks/normalize-dashboard-for-dirty-check-BYtBA708.cjs"),M=require("./chunks/x-B6ghREd2.cjs");require("./chunks/appearance-runtime-provider-Ca8rxO86.cjs");function j(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,d.get?d:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const m=j(h);function I(a){const{displayPreferences:t,cardId:o,...d}=a,n={...d,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(q,{cardId:o})})})})]})})}function q({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:d}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var C;return(C=s==null?void 0:s.cards)==null?void 0:C.find(f=>(f==null?void 0:f.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!d?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:d})})})}function U(a,t,o,d){h.useEffect(()=>{a&&!o&&t&&d(A.cloneDeep(t))},[a,o,t,d])}function k({name:a,items:t,value:o,onChange:d,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:C=!1}){const f=m.useRef(null),[y,b]=m.useState(!1),[F,v]=m.useState("100%"),x=C?[...t||[],{id:"none",name:"None"}]:t;m.useLayoutEffect(()=>{f.current&&v(f.current.offsetWidth)},[]);function _(){var g;return n?"Loading...":c?"Error":o?(g=t==null?void 0:t.find(p=>p.id===o))==null?void 0:g.name:`Select ${a}`}function P(g,p){d(p),b(!1)}return i.jsxs(r.Popover,{open:y,onOpenChange:b,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:f,variant:"outline",role:"combobox","aria-expanded":y,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:_()})]}),i.jsx(M.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:F},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(g=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:g.name,onSelect:p=>P(p,g.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===g.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:g.name,children:g.name})]})},g.id))})]})]})})]})}function O(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixCardView=e.MatrixCardView;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.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;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.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CONTROL_CARD_DEFAULT_VALUE=T.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=T.EMPTY_SELECTION;exports.ReportPreferencesDialog=R.ReportPreferencesDialog;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.DEFAULT_SEMANTIC_DOMAIN_ACCESS=N.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.CALCULATED_FIELD_ENTITY_MARKER=u.CALCULATED_FIELD_ENTITY_MARKER;exports.DATE_FORMAT_VALUES=u.DATE_FORMAT_VALUES;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=u.LEGACY_CALCULATED_FIELD_ENTITY_MARKER;exports.PivotMarkerEnum=u.PivotMarkerEnum;exports.getCalculatedFieldComputeStage=u.getCalculatedFieldComputeStage;exports.getFieldRuntimeColumnName=u.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=u.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=u.hasCalculatedFormulaInputs;exports.hasSyntheticCalculatedFieldOwner=u.hasSyntheticCalculatedFieldOwner;exports.inspectCalculatedField=u.inspectCalculatedField;exports.isCalculatedDimension=u.isCalculatedDimension;exports.isCalculatedMetric=u.isCalculatedMetric;exports.isDerivedField=u.isDerivedField;exports.normalizeCalculatedFieldRepresentation=u.normalizeCalculatedFieldRepresentation;exports.shouldDropInheritedCalculationAggregate=u.shouldDropInheritedCalculationAggregate;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useDashboardUnsavedChangesCheck=l.useDashboardUnsavedChangesCheck;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=w.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=L.DEFAULT_CALENDAR_CONTEXT;exports.resolveQueryColumnKeyMapEntry=B.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=B.resolveUniqueQueryColumnKeyMapEntry;exports.cloneDeep=A.cloneDeep;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=k;exports.Visual=I;exports.useExposePrintState=O;exports.usePristineSnapshotInitializer=U;
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
- import { E as y, F as S, S as N, c as _, U as F, d as P, C as w, e as x, f as R, g as L, h as M, I, R as U, i as k, j as O, k as V, l as q } from "./chunks/index-D-UGbMFA.js";
2
- import { ak as ba, al as Ta, am as va, an as Aa, V as Ba, G as Sa, D as Na, A as _a, z as Fa, w as Pa, b as wa, au as Ra, M as La, n as Ma, q as Ia, q as Ua, r as ka, B as Oa, a as Va, af as qa, ah as za, ai as Wa, ag as ja, a6 as Qa, a9 as Ha, at as Ka, Z as Ga, ae as Ya, ap as Xa, a1 as $a, aa as Ja, y as Za, x as ae, ax as ee, Y as re, ab as se, ac as oe, a5 as ie, a8 as te, as as ne, ar as le, aq as de, aw as ue, av as ce, a7 as pe, X as fe, W as me, $ as ge, ad as he, a3 as Ce, a0 as De, a2 as Ee, a4 as xe, _ as ye, P as be, L as Te, ao as ve, v as Ae, J as Be, t as Se, m as Ne, H as _e, K as Fe, o as Pe, T as we, O as Re, N as Le, Q as Me, u as Ie, s as Ue, p as ke, aj as Oe } from "./chunks/index-D-UGbMFA.js";
1
+ import { E as y, F as S, S as N, c as _, U as F, d as P, C as w, e as x, f as R, g as L, h as M, I, R as U, i as k, j as O, k as V, l as q } from "./chunks/index-ZKSLtc9_.js";
2
+ import { ak as ba, al as Ta, am as va, an as Aa, V as Ba, G as Sa, D as Na, A as _a, z as Fa, w as Pa, b as wa, au as Ra, M as La, n as Ma, q as Ia, q as Ua, r as ka, B as Oa, a as Va, af as qa, ah as za, ai as Wa, ag as ja, a6 as Qa, a9 as Ha, at as Ka, Z as Ga, ae as Ya, ap as Xa, a1 as $a, aa as Ja, y as Za, x as ae, ax as ee, Y as se, ab as re, ac as oe, a5 as ie, a8 as te, as as ne, ar as le, aq as de, aw as ue, av as ce, a7 as pe, X as fe, W as me, $ as he, ad as ge, a3 as Ce, a0 as De, a2 as Ee, a4 as xe, _ as ye, P as be, L as Te, ao as ve, v as Ae, J as Be, t as Se, m as Ne, H as _e, K as Fe, o as Pe, T as we, O as Re, N as Le, Q as Me, u as Ie, s as Ue, p as ke, aj as Oe } from "./chunks/index-ZKSLtc9_.js";
3
3
  import { C as qe, E as ze } from "./chunks/common-types-C6cAQgyh.js";
4
- import { R as je } from "./chunks/report-preferences-dialog-B4pIkowU.js";
4
+ import { R as je } from "./chunks/report-preferences-dialog-BXaILrOK.js";
5
5
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
6
- import { u as z, P as W, a as j, B as Q, c as C, b as H, d as K } from "./chunks/switch-B4wVqV4L.js";
7
- import { A as He, n as Ke, e as Ge, f as Ye, g as Xe, p as $e, o as Je, s as Ze, t as ar, m as er, i as rr, l as sr, q as or, k as ir, j as tr, h as nr, v as lr, r as dr, w as ur, y as cr, x as pr, z as fr, E as mr, D as gr } from "./chunks/switch-B4wVqV4L.js";
6
+ import { u as z, P as W, a as j, B as Q, c as C, b as H, d as K } from "./chunks/switch-DWM8d-UR.js";
7
+ import { A as He, n as Ke, e as Ge, f as Ye, g as Xe, p as $e, o as Je, s as Ze, t as as, m as es, i as ss, l as rs, q as os, k as is, j as ts, h as ns, v as ls, r as ds, w as us, y as cs, x as ps, z as fs, E as ms, D as hs } from "./chunks/switch-DWM8d-UR.js";
8
8
  import * as f from "react";
9
9
  import { useMemo as G, useEffect as b } from "react";
10
- import { D as Cr } from "./chunks/field-dependencies-ZE2klbHO.js";
11
- import { C as Er, D as xr, L as yr, P as br, d as Tr, g as vr, e as Ar, h as Br, f as Sr, c as Nr, a as _r, i as Fr, b as Pr, n as wr, s as Rr } from "./chunks/validators-CHlnnHuS.js";
12
- import { A as Mr, g as Ir, D as Ur, e as kr, f as Or, d as Vr, b as qr, E as zr, N as Wr, U as jr, a as Qr, V as Hr, W as Kr, u as Gr, c as Yr } from "./chunks/dashboard-briefing-launcher-DfC-k5P3.js";
13
- import { u as $r } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
10
+ import { D as Cs } from "./chunks/field-dependencies-ZE2klbHO.js";
11
+ import { C as Es, D as xs, L as ys, P as bs, d as Ts, g as vs, e as As, h as Bs, f as Ss, c as Ns, a as _s, i as Fs, b as Ps, n as ws, s as Rs } from "./chunks/validators-CHlnnHuS.js";
12
+ import { A as Ms, h as Is, D as Us, f as ks, g as Os, e as Vs, b as qs, E as zs, N as Ws, U as js, a as Qs, V as Hs, W as Ks, u as Gs, c as Ys, d as Xs } from "./chunks/dashboard-briefing-launcher-COqlnnQ2.js";
13
+ import { u as Js } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
14
14
  import "./chunks/matrix-operation-contract-CPgckXxm.js";
15
15
  import "./chunks/matrix-continuation-C4sRcjZU.js";
16
16
  import "./value-format-preferences/index.js";
17
- import { D as Zr } from "./chunks/report-runtime-context-Dln1qvGS.js";
18
- import { r as es, a as rs } from "./chunks/pivot-result-identity-Be1zm0AV.js";
17
+ import { D as ar } from "./chunks/report-runtime-context-Dln1qvGS.js";
18
+ import { r as sr, a as rr } from "./chunks/pivot-result-identity-Be1zm0AV.js";
19
19
  import "./chunks/field-aggregations-tLaXZ2VJ.js";
20
20
  import { c as Y } from "./chunks/calculated-field-identity-BC2NViZZ.js";
21
21
  import "zod";
@@ -25,33 +25,33 @@ import "./chunks/index-BVIet238.js";
25
25
  import "./chunks/appearance-context-XviHOhWJ.js";
26
26
  import "./chunks/color-CJvdlFM_.js";
27
27
  import "./chunks/index-C9KXfCkC.js";
28
- import { n as os, s as is } from "./chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
28
+ import { n as ir, s as tr } from "./chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
29
29
  import { C as X } from "./chunks/x-CXDkqdur.js";
30
30
  import "./chunks/appearance-runtime-provider-D0xVQWnH.js";
31
- function ha(e) {
32
- const { displayPreferences: r, cardId: i, ...l } = e, s = {
31
+ function ga(e) {
32
+ const { displayPreferences: s, cardId: i, ...l } = e, r = {
33
33
  ...l,
34
34
  id: e.dashboardId
35
35
  // override the id to the dashboard id so that the dashboard is not loaded
36
36
  };
37
- return /* @__PURE__ */ a(y, { FallbackComponent: S, children: /* @__PURE__ */ d(N, { dashboardProps: s, children: [
37
+ return /* @__PURE__ */ a(y, { FallbackComponent: S, children: /* @__PURE__ */ d(N, { dashboardProps: r, children: [
38
38
  /* @__PURE__ */ a(_, { componentType: "visual", componentId: e.cardId }),
39
- /* @__PURE__ */ a(F, { appearance: e.appearance, children: /* @__PURE__ */ a(P, { displayPreferences: r, children: /* @__PURE__ */ a(w, { type: "visual", cardId: i, ...s, children: /* @__PURE__ */ a($, { cardId: i }) }) }) })
39
+ /* @__PURE__ */ a(F, { appearance: e.appearance, children: /* @__PURE__ */ a(P, { displayPreferences: s, children: /* @__PURE__ */ a(w, { type: "visual", cardId: i, ...r, children: /* @__PURE__ */ a($, { cardId: i }) }) }) })
40
40
  ] }) });
41
41
  }
42
42
  function $({ cardId: e }) {
43
- const r = z((s) => {
43
+ const s = z((r) => {
44
44
  var t;
45
- return (t = s.dashboard) == null ? void 0 : t.sheets;
45
+ return (t = r.dashboard) == null ? void 0 : t.sheets;
46
46
  }), { card: i, frame: l } = G(() => {
47
- const s = r == null ? void 0 : r.flatMap((o) => o.frames), t = s == null ? void 0 : s.flatMap((o) => o == null ? void 0 : o.cards), m = t == null ? void 0 : t.find((o) => (o == null ? void 0 : o.id) === e), g = s == null ? void 0 : s.find(
47
+ const r = s == null ? void 0 : s.flatMap((o) => o.frames), t = r == null ? void 0 : r.flatMap((o) => o == null ? void 0 : o.cards), m = t == null ? void 0 : t.find((o) => (o == null ? void 0 : o.id) === e), h = r == null ? void 0 : r.find(
48
48
  (o) => {
49
49
  var p;
50
50
  return (p = o == null ? void 0 : o.cards) == null ? void 0 : p.find((u) => (u == null ? void 0 : u.id) === e);
51
51
  }
52
52
  );
53
- return { card: m, frame: g };
54
- }, [r, e]);
53
+ return { card: m, frame: h };
54
+ }, [s, e]);
55
55
  return !i || !l ? /* @__PURE__ */ a(
56
56
  x,
57
57
  {
@@ -64,12 +64,12 @@ function $({ cardId: e }) {
64
64
  y,
65
65
  {
66
66
  FallbackComponent: ({
67
- error: s,
67
+ error: r,
68
68
  resetErrorBoundary: t
69
69
  }) => /* @__PURE__ */ a(
70
70
  x,
71
71
  {
72
- error: s,
72
+ error: r,
73
73
  resetErrorBoundary: t,
74
74
  customerFacingMessage: "Error creating visual. Please try again."
75
75
  }
@@ -78,30 +78,30 @@ function $({ cardId: e }) {
78
78
  }
79
79
  ) });
80
80
  }
81
- function Ca(e, r, i, l) {
81
+ function Ca(e, s, i, l) {
82
82
  b(() => {
83
- e && !i && r && l(Y(r));
84
- }, [e, i, r, l]);
83
+ e && !i && s && l(Y(s));
84
+ }, [e, i, s, l]);
85
85
  }
86
86
  function Da({
87
87
  name: e,
88
- items: r,
88
+ items: s,
89
89
  value: i,
90
90
  onChange: l,
91
- isLoading: s,
91
+ isLoading: r,
92
92
  isError: t,
93
93
  refetch: m,
94
- className: g,
94
+ className: h,
95
95
  icon: o,
96
96
  showNone: p = !1
97
97
  }) {
98
- const u = f.useRef(null), [D, E] = f.useState(!1), [T, v] = f.useState("100%"), h = p ? [...r || [], { id: "none", name: "None" }] : r;
98
+ const u = f.useRef(null), [D, E] = f.useState(!1), [T, v] = f.useState("100%"), g = p ? [...s || [], { id: "none", name: "None" }] : s;
99
99
  f.useLayoutEffect(() => {
100
100
  u.current && v(u.current.offsetWidth);
101
101
  }, []);
102
102
  function A() {
103
103
  var n;
104
- return s ? "Loading..." : t ? "Error" : i ? (n = r == null ? void 0 : r.find((c) => c.id === i)) == null ? void 0 : n.name : `Select ${e}`;
104
+ return r ? "Loading..." : t ? "Error" : i ? (n = s == null ? void 0 : s.find((c) => c.id === i)) == null ? void 0 : n.name : `Select ${e}`;
105
105
  }
106
106
  function B(n, c) {
107
107
  l(c), E(!1);
@@ -114,7 +114,7 @@ function Da({
114
114
  variant: "outline",
115
115
  role: "combobox",
116
116
  "aria-expanded": D,
117
- className: C("flex h-9 w-full justify-between", g),
117
+ className: C("flex h-9 w-full justify-between", h),
118
118
  children: [
119
119
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
120
120
  o && /* @__PURE__ */ a("div", { className: "mr-2", children: o }),
@@ -137,7 +137,7 @@ function Da({
137
137
  {
138
138
  className: C(
139
139
  "size-3.5 opacity-50",
140
- s && "animate-spin"
140
+ r && "animate-spin"
141
141
  )
142
142
  }
143
143
  ) })
@@ -148,7 +148,7 @@ function Da({
148
148
  e == null ? void 0 : e.toLowerCase(),
149
149
  " found."
150
150
  ] }),
151
- /* @__PURE__ */ a(V, { children: h == null ? void 0 : h.map((n) => /* @__PURE__ */ a(
151
+ /* @__PURE__ */ a(V, { children: g == null ? void 0 : g.map((n) => /* @__PURE__ */ a(
152
152
  q,
153
153
  {
154
154
  className: "overflow-x-auto",
@@ -175,45 +175,45 @@ function Da({
175
175
  )
176
176
  ] });
177
177
  }
178
- function Ea(e, r) {
179
- b(() => (e && r && (window.__SEMAPHOR_PRINT_STATE__ = {
180
- ...r
178
+ function Ea(e, s) {
179
+ b(() => (e && s && (window.__SEMAPHOR_PRINT_STATE__ = {
180
+ ...s
181
181
  }), () => {
182
182
  e && window.__SEMAPHOR_PRINT_STATE__ && delete window.__SEMAPHOR_PRINT_STATE__;
183
- }), [e, r]);
183
+ }), [e, s]);
184
184
  }
185
185
  export {
186
- Mr as AdvancedModeToggle,
186
+ Ms as AdvancedModeToggle,
187
187
  ba as BriefingAuthor,
188
188
  Ta as BriefingAuthorDialog,
189
189
  va as BriefingUiCapabilitiesBoundary,
190
190
  Aa as BriefingUiCapabilitiesProvider,
191
191
  Ba as BriefingsApiError,
192
- Er as CALCULATED_FIELD_ENTITY_MARKER,
192
+ Es as CALCULATED_FIELD_ENTITY_MARKER,
193
193
  qe as CONTROL_CARD_DEFAULT_VALUE,
194
194
  Sa as CardSummary,
195
195
  Da as Combobox,
196
- xr as DATE_FORMAT_VALUES,
197
- Zr as DEFAULT_CALENDAR_CONTEXT,
198
- Cr as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
196
+ xs as DATE_FORMAT_VALUES,
197
+ ar as DEFAULT_CALENDAR_CONTEXT,
198
+ Cs as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
199
199
  Na as Dashboard,
200
- Ir as DashboardBriefingLauncher,
201
- Ur as DashboardControlsSettings,
200
+ Is as DashboardBriefingLauncher,
201
+ Us as DashboardControlsSettings,
202
202
  _a as DashboardCreateDialogBase,
203
203
  Fa as DashboardExportDialog,
204
- kr as DashboardFilterControlsButton,
205
- Or as DashboardFilterControlsLauncher,
204
+ ks as DashboardFilterControlsButton,
205
+ Os as DashboardFilterControlsLauncher,
206
206
  Pa as DashboardWC,
207
207
  wa as DisplayFormatPreferencesFields,
208
- Vr as DocumentControlsSettings,
208
+ Vs as DocumentControlsSettings,
209
209
  ze as EMPTY_SELECTION,
210
210
  Ra as ExportError,
211
- qr as ExportNotificationItem,
212
- zr as ExportNotificationList,
213
- yr as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
211
+ qs as ExportNotificationItem,
212
+ zs as ExportNotificationList,
213
+ ys as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
214
214
  La as MatrixCardView,
215
- Wr as NotificationBell,
216
- br as PivotMarkerEnum,
215
+ Ws as NotificationBell,
216
+ bs as PivotMarkerEnum,
217
217
  je as ReportPreferencesDialog,
218
218
  Ma as ResourceType,
219
219
  N as SemaphorContextProvider,
@@ -222,11 +222,11 @@ export {
222
222
  ka as ShareDialog,
223
223
  Oa as SummaryCard,
224
224
  Va as Surfboard,
225
- jr as UnsavedChangesAlert,
226
- ha as Visual,
227
- Qr as VisualEditingControls,
228
- Hr as VisualsLibraryDialog,
229
- Kr as WatchDashboardButton,
225
+ js as UnsavedChangesAlert,
226
+ ga as Visual,
227
+ Qs as VisualEditingControls,
228
+ Hs as VisualsLibraryDialog,
229
+ Ks as WatchDashboardButton,
230
230
  qa as applyBriefingFormPatch,
231
231
  za as briefingFormDraftToCreateRequest,
232
232
  Wa as briefingFormDraftToUpdateRequest,
@@ -248,76 +248,77 @@ export {
248
248
  Ye as emitDashboardUnload,
249
249
  Xe as fmt,
250
250
  ee as formatFileSize,
251
- re as getBriefing,
252
- se as getBriefingArtifact,
251
+ se as getBriefing,
252
+ re as getBriefingArtifact,
253
253
  oe as getBriefingEvidence,
254
254
  ie as getBriefingPreviewRun,
255
255
  te as getBriefingRun,
256
- Tr as getCalculatedFieldComputeStage,
256
+ Ts as getCalculatedFieldComputeStage,
257
257
  $e as getColumnDataType,
258
258
  ne as getDownloadUrl,
259
259
  le as getExportStatus,
260
260
  de as getExports,
261
- vr as getFieldRuntimeColumnName,
261
+ vs as getFieldRuntimeColumnName,
262
262
  Je as getFilterValueType,
263
263
  Ze as getFormattedTableNameForQuery,
264
- ar as getQualifiedTableName,
265
- er as getSql,
266
- Ar as hasCalculatedFieldMarker,
267
- Br as hasCalculatedFormulaInputs,
268
- Sr as hasSyntheticCalculatedFieldOwner,
269
- Nr as inspectCalculatedField,
270
- rr as invalidateToken,
271
- sr as isBooleanDataType,
272
- _r as isCalculatedDimension,
273
- Fr as isCalculatedMetric,
274
- or as isColumnInSqlGen,
275
- ir as isDateDataType,
276
- Pr as isDerivedField,
264
+ as as getQualifiedTableName,
265
+ es as getSql,
266
+ As as hasCalculatedFieldMarker,
267
+ Bs as hasCalculatedFormulaInputs,
268
+ Ss as hasSyntheticCalculatedFieldOwner,
269
+ Ns as inspectCalculatedField,
270
+ ss as invalidateToken,
271
+ rs as isBooleanDataType,
272
+ _s as isCalculatedDimension,
273
+ Fs as isCalculatedMetric,
274
+ os as isColumnInSqlGen,
275
+ is as isDateDataType,
276
+ Ps as isDerivedField,
277
277
  ue as isExportComplete,
278
278
  ce as isExportInProgress,
279
- tr as isNumberDataType,
280
- nr as isTextDataType,
279
+ ts as isNumberDataType,
280
+ ns as isTextDataType,
281
281
  pe as listBriefingRuns,
282
282
  fe as listBriefingTenantSummaries,
283
283
  me as listBriefings,
284
- wr as normalizeCalculatedFieldRepresentation,
285
- os as normalizeDashboardForDirtyCheck,
286
- ge as pauseBriefing,
287
- he as polishBriefingText,
284
+ ws as normalizeCalculatedFieldRepresentation,
285
+ ir as normalizeDashboardForDirtyCheck,
286
+ he as pauseBriefing,
287
+ ge as polishBriefingText,
288
288
  Ce as previewBriefingPlan,
289
- lr as resolveDataType,
290
- dr as resolveDatamodelName,
291
- es as resolveQueryColumnKeyMapEntry,
292
- rs as resolveUniqueQueryColumnKeyMapEntry,
289
+ ls as resolveDataType,
290
+ ds as resolveDatamodelName,
291
+ sr as resolveQueryColumnKeyMapEntry,
292
+ rr as resolveUniqueQueryColumnKeyMapEntry,
293
293
  De as resumeBriefing,
294
294
  Ee as runBriefingNow,
295
295
  xe as runBriefingPreview,
296
- is as serializeDashboardForDirtyCheck,
297
- Rr as shouldDropInheritedCalculationAggregate,
296
+ tr as serializeDashboardForDirtyCheck,
297
+ Rs as shouldDropInheritedCalculationAggregate,
298
298
  ye as updateBriefing,
299
299
  be as useActiveExports,
300
300
  Te as useAddNewFrame,
301
301
  ve as useBriefingUiCapabilities,
302
302
  Ae as useCard,
303
303
  Be as useCardSummary,
304
- ur as useCurrentActiveCard,
305
- cr as useCurrentCardConfig,
306
- pr as useCurrentSheetActiveCards,
307
- fr as useDashboardActions,
304
+ us as useCurrentActiveCard,
305
+ cs as useCurrentCardConfig,
306
+ ps as useCurrentSheetActiveCards,
307
+ fs as useDashboardActions,
308
308
  Se as useDashboardById,
309
309
  Ne as useDashboardQuery,
310
310
  z as useDashboardStore,
311
311
  _e as useDashboardSummary,
312
+ Gs as useDashboardUnsavedChangesCheck,
312
313
  Fe as useDataColumns,
313
314
  Pe as useDateFilterHook,
314
- $r as useDebouncedDirtyCheck,
315
- mr as useEditorActions,
315
+ Js as useDebouncedDirtyCheck,
316
+ ms as useEditorActions,
316
317
  we as useEditorAside,
317
- gr as useEditorStore,
318
+ hs as useEditorStore,
318
319
  Re as useExportActions,
319
- Gr as useExportPolling,
320
- Yr as useExportRecovery,
320
+ Ys as useExportPolling,
321
+ Xs as useExportRecovery,
321
322
  Le as useExportStore,
322
323
  Ea as useExposePrintState,
323
324
  Me as useInProgressExportsCount,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-se8e2QhO.cjs"),r=require("../chunks/common-types-nBuCd3u2.cjs"),o=require("../chunks/report-preferences-dialog-DwBFTNNN.cjs");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-C3rUIii0.cjs"),r=require("../chunks/common-types-nBuCd3u2.cjs"),o=require("../chunks/report-preferences-dialog-BZvi_3DV.cjs");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { b as a, a as o } from "../chunks/index-D-UGbMFA.js";
1
+ import { b as a, a as o } from "../chunks/index-ZKSLtc9_.js";
2
2
  import { C as f, E } from "../chunks/common-types-C6cAQgyh.js";
3
- import { R as t } from "../chunks/report-preferences-dialog-B4pIkowU.js";
3
+ import { R as t } from "../chunks/report-preferences-dialog-BXaILrOK.js";
4
4
  export {
5
5
  f as CONTROL_CARD_DEFAULT_VALUE,
6
6
  a as DisplayFormatPreferencesFields,
@@ -4302,6 +4302,15 @@ export declare type DashboardInputVariableRef = {
4302
4302
  key: 'generatedAt' | 'pageNumber' | 'pageCount';
4303
4303
  };
4304
4304
 
4305
+ /** Supported lifecycle transitions emitted by an editable dashboard session. */
4306
+ export declare type DashboardLifecycleEvent = {
4307
+ type: 'dashboard:dirty-state';
4308
+ dashboardId: string;
4309
+ payload: {
4310
+ dirty: boolean;
4311
+ };
4312
+ };
4313
+
4305
4314
  /**
4306
4315
  * Unified dashboard preferences for both card display and UI modes
4307
4316
  */
@@ -4395,6 +4404,8 @@ export declare type DashboardProps = {
4395
4404
  customCards?: CustomCard[];
4396
4405
  onChartElementClicked?: (card: TCard, fieldValues: any) => void;
4397
4406
  onEvent?: (event: TEvent) => void;
4407
+ /** Receives dashboard editing lifecycle transitions from the shared runtime. */
4408
+ onDashboardLifecycleEvent?: (event: DashboardLifecycleEvent) => void;
4398
4409
  onSave?: (dashboard: TDashboard) => void;
4399
4410
  onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
4400
4411
  LoadingComponent?: (props: LoadingProps) => React.ReactNode;
@@ -189,6 +189,7 @@ declare type Actions_2 = {
189
189
  setOnUpdateCard: (onUpdateCard: (card: TCard, sheetId: string) => void) => void;
190
190
  setOnRemoveCard: (onRemoveCard: (card: TCard, sheetId: string) => void) => void;
191
191
  setOnEvent: (onEvent: (event: TEvent) => void) => void;
192
+ setOnDashboardLifecycleEvent: (onDashboardLifecycleEvent: ((event: DashboardLifecycleEvent) => void) | undefined) => void;
192
193
  getDashboard: () => TDashboard | undefined;
193
194
  getSelectedSheet: () => TSheet | undefined;
194
195
  getCard: (cardId: string) => TCard | undefined;
@@ -9074,6 +9075,15 @@ export declare type DashboardInputVariableRef = {
9074
9075
  key: 'generatedAt' | 'pageNumber' | 'pageCount';
9075
9076
  };
9076
9077
 
9078
+ /** Supported lifecycle transitions emitted by an editable dashboard session. */
9079
+ export declare type DashboardLifecycleEvent = {
9080
+ type: 'dashboard:dirty-state';
9081
+ dashboardId: string;
9082
+ payload: {
9083
+ dirty: boolean;
9084
+ };
9085
+ };
9086
+
9077
9087
  declare type DashboardPlan = {
9078
9088
  version: 1;
9079
9089
  id: string;
@@ -9241,6 +9251,8 @@ export declare type DashboardProps = {
9241
9251
  customCards?: CustomCard[];
9242
9252
  onChartElementClicked?: (card: TCard, fieldValues: any) => void;
9243
9253
  onEvent?: (event: TEvent) => void;
9254
+ /** Receives dashboard editing lifecycle transitions from the shared runtime. */
9255
+ onDashboardLifecycleEvent?: (event: DashboardLifecycleEvent) => void;
9244
9256
  onSave?: (dashboard: TDashboard) => void;
9245
9257
  onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
9246
9258
  LoadingComponent?: (props: LoadingProps) => React.ReactNode;
@@ -9298,6 +9310,8 @@ export declare type DashboardStore = {
9298
9310
  * current frame.
9299
9311
  */
9300
9312
  visualEditPendingDashboardCalculatedFields?: Field[];
9313
+ /** Live edit-session check for host navigation; owned by dashboard controls. */
9314
+ checkUnsavedDashboardChanges: (() => boolean) | null;
9301
9315
  isDashboardEditing: boolean;
9302
9316
  isVisualEditing: boolean;
9303
9317
  showContext: boolean;
@@ -9332,6 +9346,7 @@ export declare type DashboardStore = {
9332
9346
  sourceDashboardTitle?: string;
9333
9347
  } | null;
9334
9348
  onEvent?: (event: TEvent) => void;
9349
+ onDashboardLifecycleEvent?: (event: DashboardLifecycleEvent) => void;
9335
9350
  onSaveFunction?: (dashboard: TDashboard, description?: string) => void;
9336
9351
  onAddFrame?: (card: TFrame, sheetId: string) => void;
9337
9352
  onAcceptChanges?: (frame: TFrame, dashboard: TDashboard) => void;
@@ -26136,6 +26151,9 @@ export declare function useDashboardSummary(): {
26136
26151
  enabled: boolean;
26137
26152
  };
26138
26153
 
26154
+ /** Share the editor's baseline with host navigation, without a second dirty flag. */
26155
+ export declare function useDashboardUnsavedChangesCheck(pristineDashboard: TDashboard | null, isInspectionMode: boolean, lifecycleEnabled?: boolean): () => boolean;
26156
+
26139
26157
  export declare function useDataColumns(token?: AuthToken): {
26140
26158
  columns: TDataColumn[];
26141
26159
  isColumnsLoading: boolean;
@@ -26314,7 +26332,9 @@ export declare function useResourceManagement(resourceType: ResourceType, onDele
26314
26332
  updateResource: UseMutateFunction<any, Error, {
26315
26333
  resourceId: string;
26316
26334
  data: UpdateResourceRequest | UpdateDashboardTemplateRequest;
26317
- }, void>;
26335
+ }, {
26336
+ previousTitle: string | undefined;
26337
+ }>;
26318
26338
  deleteResource: UseMutateFunction<any, Error, string, void>;
26319
26339
  deleteResourceAsync: UseMutateAsyncFunction<any, Error, string, void>;
26320
26340
  duplicateResource: UseMutateFunction<any, Error, string, void>;
@@ -4300,6 +4300,15 @@ export declare type DashboardInputVariableRef = {
4300
4300
  key: 'generatedAt' | 'pageNumber' | 'pageCount';
4301
4301
  };
4302
4302
 
4303
+ /** Supported lifecycle transitions emitted by an editable dashboard session. */
4304
+ export declare type DashboardLifecycleEvent = {
4305
+ type: 'dashboard:dirty-state';
4306
+ dashboardId: string;
4307
+ payload: {
4308
+ dirty: boolean;
4309
+ };
4310
+ };
4311
+
4303
4312
  declare type DashboardPlusProps = {
4304
4313
  showControls?: boolean;
4305
4314
  showFooter?: boolean;
@@ -4398,6 +4407,8 @@ export declare type DashboardProps = {
4398
4407
  customCards?: CustomCard[];
4399
4408
  onChartElementClicked?: (card: TCard, fieldValues: any) => void;
4400
4409
  onEvent?: (event: TEvent) => void;
4410
+ /** Receives dashboard editing lifecycle transitions from the shared runtime. */
4411
+ onDashboardLifecycleEvent?: (event: DashboardLifecycleEvent) => void;
4401
4412
  onSave?: (dashboard: TDashboard) => void;
4402
4413
  onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
4403
4414
  LoadingComponent?: (props: LoadingProps) => React.ReactNode;
@@ -4851,6 +4851,15 @@ export declare type DashboardInputVariableRef = {
4851
4851
  key: 'generatedAt' | 'pageNumber' | 'pageCount';
4852
4852
  };
4853
4853
 
4854
+ /** Supported lifecycle transitions emitted by an editable dashboard session. */
4855
+ export declare type DashboardLifecycleEvent = {
4856
+ type: 'dashboard:dirty-state';
4857
+ dashboardId: string;
4858
+ payload: {
4859
+ dirty: boolean;
4860
+ };
4861
+ };
4862
+
4854
4863
  /**
4855
4864
  * Unified dashboard preferences for both card display and UI modes
4856
4865
  */
@@ -4944,6 +4953,8 @@ export declare type DashboardProps = {
4944
4953
  customCards?: CustomCard[];
4945
4954
  onChartElementClicked?: (card: TCard, fieldValues: any) => void;
4946
4955
  onEvent?: (event: TEvent) => void;
4956
+ /** Receives dashboard editing lifecycle transitions from the shared runtime. */
4957
+ onDashboardLifecycleEvent?: (event: DashboardLifecycleEvent) => void;
4947
4958
  onSave?: (dashboard: TDashboard) => void;
4948
4959
  onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
4949
4960
  LoadingComponent?: (props: LoadingProps) => React.ReactNode;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.501",
8
+ "version": "0.1.503",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",