react-semaphor 0.1.338 → 0.1.340

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 (59) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +58 -57
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +3 -3
  5. package/dist/chunks/{braces-Q86XHDaD.js → braces-Ccvdip75.js} +1 -1
  6. package/dist/chunks/{braces-BLa_lORs.js → braces-DDHkbW1c.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-Cocogo9H.js → calendar-preferences-dialog-2IbYrrP1.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-Bm7ji3k9.js → calendar-preferences-dialog-8-KE5sVX.js} +1 -1
  9. package/dist/chunks/catalog-field-grounding-DoEBOXQd.js +100 -0
  10. package/dist/chunks/catalog-field-grounding-Du6mKDcF.js +1 -0
  11. package/dist/chunks/{chevrons-up-down-BBTZ5pAY.js → chevrons-up-down-B9fTSds9.js} +1 -1
  12. package/dist/chunks/{chevrons-up-down-CYuWasy_.js → chevrons-up-down-pV0i9ptS.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-BtqtLx1-.js → dashboard-briefing-launcher-CcqDPVke.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-DF4CoaRn.js → dashboard-briefing-launcher-DtxDRAiu.js} +4 -4
  15. package/dist/chunks/{dashboard-controls-B5U-VUxs.js → dashboard-controls-Bi98DhYD.js} +6 -6
  16. package/dist/chunks/{dashboard-controls-0VMAeMoa.js → dashboard-controls-By7aKmDj.js} +1 -1
  17. package/dist/chunks/{dashboard-json-CqbLOfnr.js → dashboard-json-BOyLuhS6.js} +1 -1
  18. package/dist/chunks/{dashboard-json-Hmc0Ri5z.js → dashboard-json-CGxIsTEP.js} +2 -2
  19. package/dist/chunks/{edit-dashboard-visual-D4VVu-QQ.js → edit-dashboard-visual-Ba8LenNc.js} +6 -6
  20. package/dist/chunks/{edit-dashboard-visual-C0EDM0QB.js → edit-dashboard-visual-BuXlHmJH.js} +1 -1
  21. package/dist/chunks/{index-DE0vIuYG.js → index-DT9osgRT.js} +2 -2
  22. package/dist/chunks/{index-DzyUhzV3.js → index-DVPvpd8u.js} +5 -5
  23. package/dist/chunks/{palette-DalASD28.js → palette-BMXS-AcI.js} +1 -1
  24. package/dist/chunks/{palette-B9AbDw0n.js → palette-DKecBucs.js} +1 -1
  25. package/dist/chunks/{resource-management-panel-C4YydU9I.js → resource-management-panel-98Hy6SYB.js} +3 -3
  26. package/dist/chunks/{resource-management-panel-P9iNqBM1.js → resource-management-panel-ByR-FD3h.js} +1 -1
  27. package/dist/chunks/{switch-BAYfpAEb.js → switch-CP7SmEIZ.js} +1 -1
  28. package/dist/chunks/{switch-CyRoZr5T.js → switch-DYRgERrC.js} +1 -1
  29. package/dist/chunks/{use-create-flow-overlay-state-P1LMwQ89.js → use-create-flow-overlay-state-D5uvjbwY.js} +3 -3
  30. package/dist/chunks/{use-create-flow-overlay-state-CbhjxI3W.js → use-create-flow-overlay-state-uNxArZdj.js} +1 -1
  31. package/dist/chunks/{use-visual-utils-lB-3Zk0b.js → use-visual-utils-BLh9mKic.js} +2 -2
  32. package/dist/chunks/{use-visual-utils-CV6_-y4p.js → use-visual-utils-CpaqIHoc.js} +1 -1
  33. package/dist/chunks/{validators-BOqiGymD.js → validators-CPEQojnV.js} +325 -250
  34. package/dist/chunks/validators-CfP-49k9.js +1 -0
  35. package/dist/dashboard/index.cjs +1 -1
  36. package/dist/dashboard/index.js +1 -1
  37. package/dist/dashboard-authoring/index.cjs +3 -3
  38. package/dist/dashboard-authoring/index.js +424 -561
  39. package/dist/data-app-builder/index.cjs +1 -1
  40. package/dist/data-app-builder/index.js +1 -1
  41. package/dist/data-app-sdk/index.cjs +1 -1
  42. package/dist/data-app-sdk/index.js +313 -308
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +7 -7
  45. package/dist/surfboard/index.cjs +1 -1
  46. package/dist/surfboard/index.js +2 -2
  47. package/dist/types/analytics-protocol.d.ts +75 -49
  48. package/dist/types/dashboard-authoring.d.ts +26 -52
  49. package/dist/types/dashboard.d.ts +1 -2
  50. package/dist/types/data-app-builder.d.ts +23 -13
  51. package/dist/types/data-app-sdk.d.ts +33 -46
  52. package/dist/types/main.d.ts +29 -50
  53. package/dist/types/shared.d.ts +1 -2
  54. package/dist/types/surfboard.d.ts +1 -2
  55. package/dist/types/types.d.ts +1 -2
  56. package/package.json +1 -1
  57. package/dist/chunks/catalog-field-grounding-DmT7aGUA.js +0 -191
  58. package/dist/chunks/catalog-field-grounding-VgVzDd25.js +0 -1
  59. package/dist/chunks/validators-BtFXY3S_.js +0 -2
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DE0vIuYG.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-Bm7ji3k9.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-CyRoZr5T.js"),C=require("react"),N=require("./chunks/resource-management-panel-P9iNqBM1.js"),y=require("./types/index.cjs"),_=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");require("./chunks/index-DRlMUglg.js");const r=require("./chunks/dashboard-briefing-launcher-BtqtLx1-.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js");require("./chunks/index-BxM99sFL.js");function R(o){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(i,n,u.get?u:{enumerable:!0,get:()=>o[n]})}}return i.default=o,Object.freeze(i)}const h=R(C);function j(o){const{displayPreferences:i,cardId:n,...u}=o,s={...u,id:o.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:s,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:o.cardId}),t.jsx(e.UXProvider,{appearance:o.appearance,children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:t.jsx(e.Container,{type:"visual",cardId:n,...s,children:t.jsx(w,{cardId:n})})})})]})})}function w({cardId:o}){const i=a.useDashboardStore(s=>{var c;return(c=s.dashboard)==null?void 0:c.sheets}),{card:n,frame:u}=C.useMemo(()=>{const s=i==null?void 0:i.flatMap(l=>l.frames),c=s==null?void 0:s.flatMap(l=>l==null?void 0:l.cards),D=c==null?void 0:c.find(l=>(l==null?void 0:l.id)===o),E=s==null?void 0:s.find(l=>{var p;return(p=l==null?void 0:l.cards)==null?void 0:p.find(g=>(g==null?void 0:g.id)===o)});return{card:D,frame:E}},[i,o]);return!n||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${o}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:s,resetErrorBoundary:c})=>t.jsx(e.FallbackVisual,{error:s,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:u})})})}function M(o,i,n,u){C.useEffect(()=>{o&&!n&&i&&u(e.cloneDeep(i))},[o,n,i,u])}function L({name:o,items:i,value:n,onChange:u,isLoading:s,isError:c,refetch:D,className:E,icon:l,showNone:p=!1}){const g=h.useRef(null),[b,T]=h.useState(!1),[B,A]=h.useState("100%"),x=p?[...i||[],{id:"none",name:"None"}]:i;h.useLayoutEffect(()=>{g.current&&A(g.current.offsetWidth)},[]);function F(){var f;return s?"Loading...":c?"Error":n?(f=i==null?void 0:i.find(m=>m.id===n))==null?void 0:f.name:`Select ${o}`}function v(f,m){u(m),T(!1)}return t.jsxs(a.Popover,{open:b,onOpenChange:T,children:[t.jsx(a.PopoverTrigger,{asChild:!0,children:t.jsxs(a.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":b,className:a.cn("flex h-9 w-full justify-between",E),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[l&&t.jsx("div",{className:"mr-2",children:l}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),t.jsx(a.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(a.PopoverContent,{className:"w-full p-0",style:{minWidth:B},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:D,children:t.jsx(e.RefreshCw,{className:a.cn("size-3.5 opacity-50",s&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",o==null?void 0:o.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:m=>v(m,f.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(a.Check,{className:a.cn("size-4",n===f.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function I(o,i){C.useEffect(()=>(o&&i&&(window.__SEMAPHOR_PRINT_STATE__={...i}),()=>{o&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[o,i])}exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.ExportError=e.ExportError;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createExport=e.createExport;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;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.CALCULATED_FIELD_ENTITY_MARKER=d.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=d.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=d.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=d.EMPTY_SELECTION;exports.PivotMarkerEnum=d.PivotMarkerEnum;exports.getFieldRuntimeColumnName=d.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=d.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=d.hasCalculatedFormulaInputs;exports.isCalculatedDimension=d.isCalculatedDimension;exports.isCalculatedField=d.isCalculatedField;exports.isCalculatedMetric=d.isCalculatedMetric;exports.CalendarPreferencesDialog=P.CalendarPreferencesDialog;exports.createEmptyKpiConfig=a.createEmptyKpiConfig;exports.createSqlGenConfig=a.createSqlGenConfig;exports.emitDashboardLoad=a.emitDashboardLoad;exports.emitDashboardUnload=a.emitDashboardUnload;exports.fmt=a.fmt;exports.getColumnDataType=a.getColumnDataType;exports.getFilterValueType=a.getFilterValueType;exports.getFormattedTableNameForQuery=a.getFormattedTableNameForQuery;exports.getQualifiedTableName=a.getQualifiedTableName;exports.getSql=a.getSql;exports.invalidateToken=a.invalidateToken;exports.isBooleanDataType=a.isBooleanDataType;exports.isColumnInSqlGen=a.isColumnInSqlGen;exports.isDateDataType=a.isDateDataType;exports.isNumberDataType=a.isNumberDataType;exports.isTextDataType=a.isTextDataType;exports.resolveDataType=a.resolveDataType;exports.resolveDatamodelName=a.resolveDatamodelName;exports.useCurrentActiveCard=a.useCurrentActiveCard;exports.useCurrentCardConfig=a.useCurrentCardConfig;exports.useCurrentSheetActiveCards=a.useCurrentSheetActiveCards;exports.useDashboardActions=a.useDashboardActions;exports.useDashboardStore=a.useDashboardStore;exports.useEditorActions=a.useEditorActions;exports.useEditorStore=a.useEditorStore;exports.ResourceManagementPanel=N.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=y.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=y.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.useDebouncedDirtyCheck=_.useDebouncedDirtyCheck;exports.AdvancedModeToggle=r.AdvancedModeToggle;exports.BriefingAuthor=r.BriefingAuthor;exports.BriefingsApiError=r.BriefingsApiError;exports.DashboardBriefingLauncher=r.DashboardBriefingLauncher;exports.DashboardControlsSettings=r.DashboardControlsSettings;exports.DashboardFilterControlsButton=r.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=r.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=r.DocumentControlsSettings;exports.ExportNotificationItem=r.ExportNotificationItem;exports.ExportNotificationList=r.ExportNotificationList;exports.NotificationBell=r.NotificationBell;exports.UnsavedChangesAlert=r.UnsavedChangesAlert;exports.VisualEditingControls=r.VisualEditingControls;exports.WatchDashboardButton=r.WatchDashboardButton;exports.applyBriefingFormPatch=r.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=r.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=r.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=r.briefingToFormDraft;exports.cancelBriefingRun=r.cancelBriefingRun;exports.createBriefing=r.createBriefing;exports.createBriefingFormDraft=r.createBriefingFormDraft;exports.deleteBriefing=r.deleteBriefing;exports.deleteBriefingRun=r.deleteBriefingRun;exports.getBriefing=r.getBriefing;exports.getBriefingArtifact=r.getBriefingArtifact;exports.getBriefingEvidence=r.getBriefingEvidence;exports.getBriefingPreviewRun=r.getBriefingPreviewRun;exports.getBriefingRun=r.getBriefingRun;exports.listBriefingRuns=r.listBriefingRuns;exports.listBriefingTenantSummaries=r.listBriefingTenantSummaries;exports.listBriefings=r.listBriefings;exports.pauseBriefing=r.pauseBriefing;exports.polishBriefingText=r.polishBriefingText;exports.previewBriefingPlan=r.previewBriefingPlan;exports.resumeBriefing=r.resumeBriefing;exports.runBriefingNow=r.runBriefingNow;exports.runBriefingPreview=r.runBriefingPreview;exports.updateBriefing=r.updateBriefing;exports.useExportPolling=r.useExportPolling;exports.useExportRecovery=r.useExportRecovery;exports.validateBriefingFormDraft=r.validateBriefingFormDraft;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=L;exports.Visual=j;exports.useExposePrintState=I;exports.usePristineSnapshotInitializer=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DT9osgRT.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-8-KE5sVX.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-DYRgERrC.js"),C=require("react"),N=require("./chunks/resource-management-panel-ByR-FD3h.js"),y=require("./types/index.cjs"),_=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("react-dom");require("./chunks/index-DRlMUglg.js");const r=require("./chunks/dashboard-briefing-launcher-CcqDPVke.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js");require("./chunks/index-BxM99sFL.js");function R(o){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(i,n,u.get?u:{enumerable:!0,get:()=>o[n]})}}return i.default=o,Object.freeze(i)}const h=R(C);function j(o){const{displayPreferences:i,cardId:n,...u}=o,s={...u,id:o.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsxs(e.SemaphorContextProvider,{dashboardProps:s,children:[t.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:o.cardId}),t.jsx(e.UXProvider,{appearance:o.appearance,children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:t.jsx(e.Container,{type:"visual",cardId:n,...s,children:t.jsx(w,{cardId:n})})})})]})})}function w({cardId:o}){const i=a.useDashboardStore(s=>{var c;return(c=s.dashboard)==null?void 0:c.sheets}),{card:n,frame:u}=C.useMemo(()=>{const s=i==null?void 0:i.flatMap(l=>l.frames),c=s==null?void 0:s.flatMap(l=>l==null?void 0:l.cards),D=c==null?void 0:c.find(l=>(l==null?void 0:l.id)===o),E=s==null?void 0:s.find(l=>{var p;return(p=l==null?void 0:l.cards)==null?void 0:p.find(g=>(g==null?void 0:g.id)===o)});return{card:D,frame:E}},[i,o]);return!n||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${o}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:s,resetErrorBoundary:c})=>t.jsx(e.FallbackVisual,{error:s,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:n,frame:u})})})}function M(o,i,n,u){C.useEffect(()=>{o&&!n&&i&&u(e.cloneDeep(i))},[o,n,i,u])}function L({name:o,items:i,value:n,onChange:u,isLoading:s,isError:c,refetch:D,className:E,icon:l,showNone:p=!1}){const g=h.useRef(null),[b,T]=h.useState(!1),[B,A]=h.useState("100%"),x=p?[...i||[],{id:"none",name:"None"}]:i;h.useLayoutEffect(()=>{g.current&&A(g.current.offsetWidth)},[]);function F(){var f;return s?"Loading...":c?"Error":n?(f=i==null?void 0:i.find(m=>m.id===n))==null?void 0:f.name:`Select ${o}`}function v(f,m){u(m),T(!1)}return t.jsxs(a.Popover,{open:b,onOpenChange:T,children:[t.jsx(a.PopoverTrigger,{asChild:!0,children:t.jsxs(a.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":b,className:a.cn("flex h-9 w-full justify-between",E),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[l&&t.jsx("div",{className:"mr-2",children:l}),t.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),t.jsx(a.ChevronDown,{className:"size-4 opacity-50"})]})}),t.jsx(a.PopoverContent,{className:"w-full p-0",style:{minWidth:B},children:t.jsxs(e.Command,{children:[t.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[t.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),t.jsx(e.IconButton,{className:"h-7",onClick:D,children:t.jsx(e.RefreshCw,{className:a.cn("size-3.5 opacity-50",s&&"animate-spin")})})]}),t.jsxs(e.CommandList,{children:[t.jsxs(e.CommandEmpty,{children:["No ",o==null?void 0:o.toLowerCase()," found."]}),t.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>t.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:m=>v(m,f.id),children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(a.Check,{className:a.cn("size-4",n===f.id?"opacity-100":"opacity-0")}),t.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function I(o,i){C.useEffect(()=>(o&&i&&(window.__SEMAPHOR_PRINT_STATE__={...i}),()=>{o&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[o,i])}exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.ExportError=e.ExportError;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createExport=e.createExport;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;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.CALCULATED_FIELD_ENTITY_MARKER=d.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=d.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=d.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=d.EMPTY_SELECTION;exports.PivotMarkerEnum=d.PivotMarkerEnum;exports.getFieldRuntimeColumnName=d.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=d.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=d.hasCalculatedFormulaInputs;exports.isCalculatedDimension=d.isCalculatedDimension;exports.isCalculatedField=d.isCalculatedField;exports.isCalculatedMetric=d.isCalculatedMetric;exports.CalendarPreferencesDialog=P.CalendarPreferencesDialog;exports.createEmptyKpiConfig=a.createEmptyKpiConfig;exports.createSqlGenConfig=a.createSqlGenConfig;exports.emitDashboardLoad=a.emitDashboardLoad;exports.emitDashboardUnload=a.emitDashboardUnload;exports.fmt=a.fmt;exports.getColumnDataType=a.getColumnDataType;exports.getFilterValueType=a.getFilterValueType;exports.getFormattedTableNameForQuery=a.getFormattedTableNameForQuery;exports.getQualifiedTableName=a.getQualifiedTableName;exports.getSql=a.getSql;exports.invalidateToken=a.invalidateToken;exports.isBooleanDataType=a.isBooleanDataType;exports.isColumnInSqlGen=a.isColumnInSqlGen;exports.isDateDataType=a.isDateDataType;exports.isNumberDataType=a.isNumberDataType;exports.isTextDataType=a.isTextDataType;exports.resolveDataType=a.resolveDataType;exports.resolveDatamodelName=a.resolveDatamodelName;exports.useCurrentActiveCard=a.useCurrentActiveCard;exports.useCurrentCardConfig=a.useCurrentCardConfig;exports.useCurrentSheetActiveCards=a.useCurrentSheetActiveCards;exports.useDashboardActions=a.useDashboardActions;exports.useDashboardStore=a.useDashboardStore;exports.useEditorActions=a.useEditorActions;exports.useEditorStore=a.useEditorStore;exports.ResourceManagementPanel=N.ResourceManagementPanel;exports.DEFAULT_CALENDAR_CONTEXT=y.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=y.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.useDebouncedDirtyCheck=_.useDebouncedDirtyCheck;exports.AdvancedModeToggle=r.AdvancedModeToggle;exports.BriefingAuthor=r.BriefingAuthor;exports.BriefingsApiError=r.BriefingsApiError;exports.DashboardBriefingLauncher=r.DashboardBriefingLauncher;exports.DashboardControlsSettings=r.DashboardControlsSettings;exports.DashboardFilterControlsButton=r.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=r.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=r.DocumentControlsSettings;exports.ExportNotificationItem=r.ExportNotificationItem;exports.ExportNotificationList=r.ExportNotificationList;exports.NotificationBell=r.NotificationBell;exports.UnsavedChangesAlert=r.UnsavedChangesAlert;exports.VisualEditingControls=r.VisualEditingControls;exports.WatchDashboardButton=r.WatchDashboardButton;exports.applyBriefingFormPatch=r.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=r.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=r.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=r.briefingToFormDraft;exports.cancelBriefingRun=r.cancelBriefingRun;exports.createBriefing=r.createBriefing;exports.createBriefingFormDraft=r.createBriefingFormDraft;exports.deleteBriefing=r.deleteBriefing;exports.deleteBriefingRun=r.deleteBriefingRun;exports.getBriefing=r.getBriefing;exports.getBriefingArtifact=r.getBriefingArtifact;exports.getBriefingEvidence=r.getBriefingEvidence;exports.getBriefingPreviewRun=r.getBriefingPreviewRun;exports.getBriefingRun=r.getBriefingRun;exports.listBriefingRuns=r.listBriefingRuns;exports.listBriefingTenantSummaries=r.listBriefingTenantSummaries;exports.listBriefings=r.listBriefings;exports.pauseBriefing=r.pauseBriefing;exports.polishBriefingText=r.polishBriefingText;exports.previewBriefingPlan=r.previewBriefingPlan;exports.resumeBriefing=r.resumeBriefing;exports.runBriefingNow=r.runBriefingNow;exports.runBriefingPreview=r.runBriefingPreview;exports.updateBriefing=r.updateBriefing;exports.useExportPolling=r.useExportPolling;exports.useExportRecovery=r.useExportRecovery;exports.validateBriefingFormDraft=r.validateBriefingFormDraft;exports.normalizeDashboardForDirtyCheck=S.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=S.serializeDashboardForDirtyCheck;exports.Combobox=L;exports.Visual=j;exports.useExposePrintState=I;exports.usePristineSnapshotInitializer=M;
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { E as T, F as N, S, q as P, U as _, r as w, s as F, t as x, v as R, w as I, C as M, i as L, I as k, x as U, j as O, k as z, l as V, m as H } from "./chunks/index-DzyUhzV3.js";
2
- import { W as ca, D as fa, T as ma, Q as pa, N as ha, a9 as ga, A as Ca, H as Da, H as Ea, J as xa, V as Ta, a as ba, a8 as ya, a4 as va, P as Aa, O as Ba, ac as Na, a7 as Sa, a6 as Pa, a5 as _a, ab as wa, aa as Fa, a1 as Ra, _ as Ia, M as Ma, Y as La, L as ka, z as Ua, X as Oa, Z as za, B as Va, a3 as Ha, a0 as qa, $ as Wa, a2 as ja, y as Ga, K as Qa, G as Ka } from "./chunks/index-DzyUhzV3.js";
1
+ import { E as T, F as N, S, q as P, U as _, r as w, s as F, t as x, v as R, w as I, C as M, i as L, I as k, x as U, j as O, k as z, l as V, m as H } from "./chunks/index-DVPvpd8u.js";
2
+ import { W as ca, D as fa, T as ma, Q as pa, N as ha, a9 as ga, A as Ca, H as Da, H as Ea, J as xa, V as Ta, a as ba, a8 as ya, a4 as va, P as Aa, O as Ba, ac as Na, a7 as Sa, a6 as Pa, a5 as _a, ab as wa, aa as Fa, a1 as Ra, _ as Ia, M as Ma, Y as La, L as ka, z as Ua, X as Oa, Z as za, B as Va, a3 as Ha, a0 as qa, $ as Wa, a2 as ja, y as Ga, K as Qa, G as Ka } from "./chunks/index-DVPvpd8u.js";
3
3
  import { a as Ya, C as $a, D as Ja, E as Za, P as ae, g as ee, d as se, h as re, b as oe, c as te, i as ne } from "./chunks/common-types-4bjoIgvm.js";
4
- import { C as le } from "./chunks/calendar-preferences-dialog-Cocogo9H.js";
4
+ import { C as le } from "./chunks/calendar-preferences-dialog-2IbYrrP1.js";
5
5
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
6
- import { u as q, P as W, b as j, B as G, a as C, g as Q, d as K, e as X } from "./chunks/switch-BAYfpAEb.js";
7
- import { F as ue, q as ce, h as fe, i as me, k as pe, s as he, r as ge, w as Ce, x as De, p as Ee, j as xe, o as Te, t as be, n as ye, m as ve, l as Ae, y as Be, v as Ne, z as Se, D as Pe, A as _e, E as we, H as Fe, G as Re } from "./chunks/switch-BAYfpAEb.js";
6
+ import { u as q, P as W, b as j, B as G, a as C, g as Q, d as K, e as X } from "./chunks/switch-CP7SmEIZ.js";
7
+ import { F as ue, q as ce, h as fe, i as me, k as pe, s as he, r as ge, w as Ce, x as De, p as Ee, j as xe, o as Te, t as be, n as ye, m as ve, l as Ae, y as Be, v as Ne, z as Se, D as Pe, A as _e, E as we, H as Fe, G as Re } from "./chunks/switch-CP7SmEIZ.js";
8
8
  import * as m from "react";
9
9
  import { useMemo as Y, useEffect as b } from "react";
10
- import { ResourceManagementPanel as Me } from "./chunks/resource-management-panel-C4YydU9I.js";
10
+ import { ResourceManagementPanel as Me } from "./chunks/resource-management-panel-98Hy6SYB.js";
11
11
  import { DEFAULT_CALENDAR_CONTEXT as ke, DEFAULT_SEMANTIC_DOMAIN_ACCESS as Ue } from "./types/index.js";
12
12
  import { u as ze } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
13
13
  import "react-dom";
14
14
  import "./chunks/index-CJdxSyQq.js";
15
- import { A as He, J as qe, B as We, K as je, D as Ge, d as Qe, e as Ke, c as Xe, a as Ye, E as $e, N as Je, U as Ze, V as as, W as es, C as ss, G as rs, H as os, F as ts, t as ns, h as is, z as ls, j as ds, v as us, g as cs, w as fs, x as ms, o as ps, s as hs, q as gs, f as Cs, l as Ds, p as Es, y as xs, m as Ts, r as bs, k as ys, n as vs, i as As, u as Bs, b as Ns, I as Ss } from "./chunks/dashboard-briefing-launcher-DF4CoaRn.js";
15
+ import { A as He, J as qe, B as We, K as je, D as Ge, d as Qe, e as Ke, c as Xe, a as Ye, E as $e, N as Je, U as Ze, V as as, W as es, C as ss, G as rs, H as os, F as ts, t as ns, h as is, z as ls, j as ds, v as us, g as cs, w as fs, x as ms, o as ps, s as hs, q as gs, f as Cs, l as Ds, p as Es, y as xs, m as Ts, r as bs, k as ys, n as vs, i as As, u as Bs, b as Ns, I as Ss } from "./chunks/dashboard-briefing-launcher-DtxDRAiu.js";
16
16
  import { n as _s, s as ws } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
17
17
  import "./chunks/index-CuHybtft.js";
18
18
  function ta(e) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-DE0vIuYG.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-Bm7ji3k9.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-DT9osgRT.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-8-KE5sVX.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { a as e } from "../chunks/index-DzyUhzV3.js";
1
+ import { a as e } from "../chunks/index-DVPvpd8u.js";
2
2
  import { C, E } from "../chunks/common-types-4bjoIgvm.js";
3
- import { C as s } from "../chunks/calendar-preferences-dialog-Cocogo9H.js";
3
+ import { C as s } from "../chunks/calendar-preferences-dialog-2IbYrrP1.js";
4
4
  export {
5
5
  C as CONTROL_CARD_DEFAULT_VALUE,
6
6
  s as CalendarPreferencesDialog,
@@ -62,8 +62,6 @@ export declare function getSemaphorConnectionCapabilities(connectionType: string
62
62
  connectionId?: string;
63
63
  }): SemaphorConnectionCapabilities;
64
64
 
65
- export declare function inferAnalyticsMetricFormat(field: AnalyticsCatalogField): AnalyticsMetricFormat | undefined;
66
-
67
65
  export declare function isAnalyticsCatalogDateField(field: AnalyticsCatalogField): boolean;
68
66
 
69
67
  export declare function isAnalyticsCatalogDimensionField(field: AnalyticsCatalogField): boolean;
@@ -84,6 +82,10 @@ export declare function normalizeAnalyticsCatalogName(value: unknown): string;
84
82
 
85
83
  export declare function normalizeSemaphorDialect(input: string | undefined): SemaphorDialect;
86
84
 
85
+ export declare function preferSemaphorFieldRefMetadata(current: SemaphorFieldRef, next: SemaphorFieldRef): SemaphorFieldRef;
86
+
87
+ export declare function preferSemaphorSourceMetadata(current: SemaphorSourceRef, next: SemaphorSourceRef): SemaphorSourceRef;
88
+
87
89
  export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
88
90
  revenueKpi: {
89
91
  version: 1;
@@ -97,8 +99,14 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
97
99
  readonly connectionId: "conn_sales";
98
100
  readonly label: "Orders";
99
101
  };
100
- metrics: string[];
101
- primaryMetric: string;
102
+ metrics: {
103
+ name: string;
104
+ role: "measure";
105
+ }[];
106
+ primaryMetric: {
107
+ name: string;
108
+ role: "measure";
109
+ };
102
110
  comparison: {
103
111
  kind: "previous_period";
104
112
  };
@@ -116,13 +124,17 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
116
124
  readonly connectionId: "conn_sales";
117
125
  readonly label: "Orders";
118
126
  };
119
- fields: {
127
+ fields: ({
120
128
  name: string;
121
129
  role: "date";
122
130
  dataType: "date";
123
131
  label: string;
124
- }[];
125
- measures: string[];
132
+ } | {
133
+ name: string;
134
+ role: "measure";
135
+ dataType: "number";
136
+ label?: undefined;
137
+ })[];
126
138
  dateField: {
127
139
  name: string;
128
140
  role: "date";
@@ -152,9 +164,11 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
152
164
  role: "measure";
153
165
  dataType: "number";
154
166
  })[];
155
- measures: string[];
156
167
  orderBy: {
157
- field: string;
168
+ field: {
169
+ name: string;
170
+ role: "measure";
171
+ };
158
172
  direction: "desc";
159
173
  };
160
174
  limit: number;
@@ -190,8 +204,14 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
190
204
  readonly connectionId: "conn_sales";
191
205
  readonly label: "Orders";
192
206
  };
193
- metrics: string[];
194
- primaryMetric: string;
207
+ metrics: {
208
+ name: string;
209
+ role: "measure";
210
+ }[];
211
+ primaryMetric: {
212
+ name: string;
213
+ role: "measure";
214
+ };
195
215
  dateField: {
196
216
  name: string;
197
217
  role: "date";
@@ -215,8 +235,14 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
215
235
  readonly connectionId: "conn_sales";
216
236
  readonly label: "Orders";
217
237
  };
218
- metrics: string[];
219
- primaryMetric: string;
238
+ metrics: {
239
+ name: string;
240
+ role: "measure";
241
+ }[];
242
+ primaryMetric: {
243
+ name: string;
244
+ role: "measure";
245
+ };
220
246
  dateField: {
221
247
  name: string;
222
248
  role: "date";
@@ -239,7 +265,7 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
239
265
  dataType: "string";
240
266
  };
241
267
  operator: "=";
242
- value: string;
268
+ values: string[];
243
269
  }[];
244
270
  limit: number;
245
271
  };
@@ -249,11 +275,8 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
249
275
  id: string;
250
276
  label: string;
251
277
  source: {
252
- kind: "physical";
278
+ kind: "sql";
253
279
  connectionId: string;
254
- databaseName: string;
255
- schemaName: string;
256
- tableName: string;
257
280
  dialect: "postgres";
258
281
  };
259
282
  sql: string;
@@ -271,17 +294,6 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
271
294
  };
272
295
  };
273
296
 
274
- export declare type SemaphorAgentFilterInput = {
275
- id?: string;
276
- field: string | SemaphorFieldRef;
277
- operator?: SemaphorAgentFilterInputOperator;
278
- operation?: SemaphorAgentFilterInputOperator | string;
279
- value?: unknown;
280
- values?: unknown[];
281
- };
282
-
283
- export declare type SemaphorAgentFilterInputOperator = SemaphorAnalyticsFilterOperator | 'equals' | 'eq' | 'not_equals' | 'neq' | 'like' | 'not_like' | 'not in' | 'not contains' | 'not between' | 'is_null' | 'is_not_null' | 'is null' | 'is not null';
284
-
285
297
  export declare type SemaphorAnalyticsExecutionResult = {
286
298
  intentId?: string;
287
299
  queryId?: string;
@@ -308,12 +320,11 @@ export declare type SemaphorAnalyticsExecutionStatus = 'answered' | 'partial' |
308
320
 
309
321
  export declare type SemaphorAnalyticsFieldRole = 'metric' | 'dateField' | 'dimension' | 'input' | 'source' | 'sql';
310
322
 
311
- export declare type SemaphorAnalyticsFilter = {
323
+ export declare type SemaphorAnalyticsFilter = SemaphorAnalyticsValueFilter | SemaphorAnalyticsNullFilter;
324
+
325
+ export declare type SemaphorAnalyticsFilterBase = {
312
326
  id?: string;
313
327
  field: SemaphorFieldRef;
314
- operator?: SemaphorAnalyticsFilterOperator;
315
- value?: unknown;
316
- values?: unknown[];
317
328
  };
318
329
 
319
330
  export declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
@@ -322,6 +333,13 @@ export declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRec
322
333
 
323
334
  export declare type SemaphorAnalyticsIntentFixtureName = keyof typeof SEMAPHOR_ANALYTICS_INTENT_FIXTURES;
324
335
 
336
+ export declare type SemaphorAnalyticsNullFilter = SemaphorAnalyticsFilterBase & {
337
+ operator: SemaphorAnalyticsNullFilterOperator;
338
+ values?: never;
339
+ };
340
+
341
+ export declare type SemaphorAnalyticsNullFilterOperator = 'is_null' | 'is_not_null';
342
+
325
343
  export declare type SemaphorAnalyticsObligation = {
326
344
  id: string;
327
345
  type: SemaphorAnalyticsObligationType;
@@ -334,8 +352,7 @@ export declare type SemaphorAnalyticsObligation = {
334
352
  displayFieldCandidates?: string[];
335
353
  requiredFieldCandidates?: string[];
336
354
  limit?: number;
337
- timeWindowDays?: number;
338
- timeWindowMonths?: number;
355
+ timeWindow?: SemaphorTimeWindow;
339
356
  comparison?: 'same_period_last_year' | 'previous_period';
340
357
  required?: boolean;
341
358
  };
@@ -397,6 +414,13 @@ export declare type SemaphorAnalyticsValidationResult = {
397
414
  repairHints: SemaphorAnalyticsRepairHint[];
398
415
  };
399
416
 
417
+ export declare type SemaphorAnalyticsValueFilter = SemaphorAnalyticsFilterBase & {
418
+ operator?: SemaphorAnalyticsValueFilterOperator;
419
+ values: unknown[];
420
+ };
421
+
422
+ export declare type SemaphorAnalyticsValueFilterOperator = Exclude<SemaphorAnalyticsFilterOperator, 'is_null' | 'is_not_null'>;
423
+
400
424
  export declare type SemaphorCompiledQuery = {
401
425
  kind: 'config';
402
426
  queryId: string;
@@ -405,21 +429,21 @@ export declare type SemaphorCompiledQuery = {
405
429
  connectionId: string;
406
430
  cardConfig: unknown;
407
431
  cardDataSource: unknown;
408
- activeFilters?: unknown[];
432
+ activeFilters?: SemaphorAnalyticsFilter[];
409
433
  rowLimit: number;
410
434
  analyticsIntent?: SemaphorAnalyticsIntent;
411
435
  } | {
412
436
  kind: 'sql';
413
437
  queryId: string;
414
438
  source: Extract<SemaphorSourceRef, {
415
- kind: 'physical' | 'sql';
439
+ kind: 'sql';
416
440
  }>;
417
441
  connectionId: string;
418
442
  dialect: SemaphorDialect;
419
443
  sql: string;
420
444
  parameters?: Record<string, unknown>;
421
445
  pythonCode?: string;
422
- activeFilters?: unknown[];
446
+ activeFilters?: SemaphorAnalyticsFilter[];
423
447
  rowLimit: number;
424
448
  analyticsIntent?: SemaphorAnalyticsIntent;
425
449
  };
@@ -459,7 +483,7 @@ export declare type SemaphorDashboardViewIntent = {
459
483
  text?: string;
460
484
  };
461
485
 
462
- export declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
486
+ export declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
463
487
 
464
488
  export declare type SemaphorExperienceIntent = SemaphorDashboardIntent;
465
489
 
@@ -471,6 +495,8 @@ export declare type SemaphorFieldRef = {
471
495
  source?: SemaphorSourceRef;
472
496
  };
473
497
 
498
+ export declare function semaphorFieldRefsMatch(left: SemaphorFieldRef, right: SemaphorFieldRef): boolean;
499
+
474
500
  export declare type SemaphorInputBinding = {
475
501
  inputId: string;
476
502
  field?: SemaphorFieldRef;
@@ -518,7 +544,6 @@ export declare type SemaphorInputSpec = {
518
544
  operator?: SemaphorInputOperator;
519
545
  multi?: boolean;
520
546
  defaultValue?: unknown;
521
- source?: SemaphorSourceRef;
522
547
  scope?: SemaphorInputScope;
523
548
  };
524
549
 
@@ -534,9 +559,8 @@ export declare type SemaphorMetricIntent = {
534
559
  version?: SemaphorProtocolVersion;
535
560
  id?: string;
536
561
  source: SemaphorSourceRef;
537
- metrics: string[];
538
- primaryMetric?: string;
539
- metricRefs?: SemaphorFieldRef[];
562
+ metrics: SemaphorFieldRef[];
563
+ primaryMetric?: SemaphorFieldRef;
540
564
  label?: string;
541
565
  dateField?: SemaphorFieldRef;
542
566
  timeGrain?: SemaphorTimeGrain;
@@ -601,12 +625,11 @@ export declare type SemaphorRecordsIntent = {
601
625
  id?: string;
602
626
  label?: string;
603
627
  fields: SemaphorFieldRef[];
604
- measures?: string[];
605
628
  dateField?: SemaphorFieldRef;
606
629
  timeGrain?: SemaphorTimeGrain;
607
630
  limit?: number;
608
631
  orderBy?: {
609
- field: string;
632
+ field: SemaphorFieldRef;
610
633
  direction: 'asc' | 'desc';
611
634
  };
612
635
  inputs?: SemaphorInputBinding[];
@@ -623,7 +646,7 @@ export declare type SemaphorRecordsResult = SemaphorAnalyticsResultBase & {
623
646
  };
624
647
 
625
648
  export declare type SemaphorRecoveryToolCall = {
626
- name: 'semaphor_get_dataset_schema' | 'semaphor_query_spec' | 'semaphor_query_sql' | string;
649
+ name: 'semaphor_get_dataset_schema' | 'semaphor_analyze' | 'semaphor_query_sql_advanced' | string;
627
650
  arguments: Record<string, unknown>;
628
651
  purpose: string;
629
652
  obligationId?: string;
@@ -662,6 +685,8 @@ export declare function semaphorSourceHasRequiredCoordinates(input: {
662
685
  source: SemaphorSourceCoordinateInput;
663
686
  }): boolean;
664
687
 
688
+ export declare function semaphorSourceIdentityKey(source: SemaphorSourceRef | undefined): string;
689
+
665
690
  export declare type SemaphorSourceLevel = 'database' | 'schema' | 'table';
666
691
 
667
692
  export declare type SemaphorSourceRef = {
@@ -683,20 +708,21 @@ export declare type SemaphorSourceRef = {
683
708
  } | {
684
709
  kind: 'sql';
685
710
  connectionId: string;
686
- sql: string;
687
711
  dialect?: SemaphorDialect;
688
712
  label?: string;
689
713
  };
690
714
 
715
+ export declare function semaphorSourcesReferToSameDataset(left: SemaphorSourceRef | undefined, right: SemaphorSourceRef | undefined): boolean;
716
+
691
717
  export declare type SemaphorSqlIntent = {
692
718
  kind: 'sql';
693
719
  version?: SemaphorProtocolVersion;
694
720
  id?: string;
695
721
  label?: string;
696
722
  source: Extract<SemaphorSourceRef, {
697
- kind: 'sql' | 'physical';
723
+ kind: 'sql';
698
724
  }>;
699
- sql?: string;
725
+ sql: string;
700
726
  parameters?: Record<string, unknown>;
701
727
  pythonCode?: string;
702
728
  limit?: number;
@@ -505,22 +505,6 @@ export declare type DashboardAuthoringBreakpoint = (typeof DASHBOARD_AUTHORING_B
505
505
 
506
506
  export declare function dashboardAuthoringDatasetMatchesSource(dataset: unknown, source: SemaphorSourceRef | undefined): boolean;
507
507
 
508
- export declare type DashboardAuthoringDatasetRef = {
509
- kind: 'semantic';
510
- domainId: string;
511
- datasetName: string;
512
- datasetId?: string;
513
- label?: string;
514
- connectionId?: string;
515
- } | {
516
- kind: 'physical';
517
- connectionId: string;
518
- databaseName?: string;
519
- schemaName?: string;
520
- tableName: string;
521
- label?: string;
522
- };
523
-
524
508
  export declare type DashboardAuthoringDatasetScopeIssue = 'invalid_dataset_count' | 'invalid_multi_dataset_scope';
525
509
 
526
510
  export declare type DashboardAuthoringDatasetScopeResult = {
@@ -551,24 +535,6 @@ export declare type DashboardAuthoringValidationResult = {
551
535
  warnings: DashboardPlanWarning[];
552
536
  };
553
537
 
554
- export declare type DashboardCardQueryFieldRef = {
555
- name: string;
556
- source?: DashboardAuthoringDatasetRef;
557
- };
558
-
559
- export declare type DashboardCardQueryIntent = {
560
- metrics?: string[];
561
- primaryMetric?: string;
562
- metricRefs?: DashboardCardQueryFieldRef[];
563
- dateField?: string;
564
- dateFieldRef?: DashboardCardQueryFieldRef;
565
- timeGrain?: 'day' | 'week' | 'month' | 'quarter' | 'year';
566
- dimensions?: string[];
567
- dimensionRefs?: DashboardCardQueryFieldRef[];
568
- filters?: SemaphorAnalyticsFilter[];
569
- limit?: number;
570
- };
571
-
572
538
  export declare type DashboardCardSizeIntent = 'kpi' | 'chart' | 'table' | 'text';
573
539
 
574
540
  export declare type DashboardChangeCompileResult = {
@@ -610,7 +576,7 @@ export declare type DashboardChangePlan = {
610
576
  dashboardId: string;
611
577
  title?: string;
612
578
  description?: string;
613
- datasets: DashboardAuthoringDatasetRef[];
579
+ datasets: SemaphorSourceRef[];
614
580
  operations: DashboardChangeOperation[];
615
581
  warnings?: DashboardPlanWarning[];
616
582
  unresolvedRequests?: string[];
@@ -738,7 +704,7 @@ export declare type DashboardPlan = {
738
704
  id: string;
739
705
  title: string;
740
706
  description?: string;
741
- datasets: DashboardAuthoringDatasetRef[];
707
+ datasets: SemaphorSourceRef[];
742
708
  sheets: DashboardPlanSheet[];
743
709
  filterInputs?: DashboardPlanFilterInput[];
744
710
  calculatedFields?: DashboardPlanCalculatedField[];
@@ -766,7 +732,6 @@ export declare type DashboardPlanCard = {
766
732
  role: DashboardCardSizeIntent;
767
733
  priority: number;
768
734
  section?: string;
769
- query?: DashboardCardQueryIntent;
770
735
  analyticsIntent?: SemaphorAnalyticsIntent;
771
736
  text?: string;
772
737
  };
@@ -1441,7 +1406,7 @@ declare type FilterSemanticContext = {
1441
1406
 
1442
1407
  declare type FilterValue = string | number | boolean | Date | null | [number, number] | [string, string] | string[] | number[];
1443
1408
 
1444
- export declare function findDashboardAuthoringDatasetForSource(datasets: readonly DashboardAuthoringDatasetRef[], source: SemaphorSourceRef | undefined): DashboardAuthoringDatasetRef | undefined;
1409
+ export declare function findDashboardAuthoringDatasetForSource(datasets: readonly SemaphorSourceRef[], source: SemaphorSourceRef | undefined): SemaphorSourceRef | undefined;
1445
1410
 
1446
1411
  /**
1447
1412
  * Absolute fixed month/year default used by Month Picker defaults.
@@ -1836,18 +1801,31 @@ declare type SelectedEntities = SelectedEntity[];
1836
1801
 
1837
1802
  declare type SelectedEntity = DatabaseEntityReference | DataModelEntityReference | DatasetEntityReference | FileEntityReference;
1838
1803
 
1839
- declare type SemaphorAnalyticsFilter = {
1804
+ declare type SemaphorAnalyticsFilter = SemaphorAnalyticsValueFilter | SemaphorAnalyticsNullFilter;
1805
+
1806
+ declare type SemaphorAnalyticsFilterBase = {
1840
1807
  id?: string;
1841
1808
  field: SemaphorFieldRef;
1842
- operator?: SemaphorAnalyticsFilterOperator;
1843
- value?: unknown;
1844
- values?: unknown[];
1845
1809
  };
1846
1810
 
1847
1811
  declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
1848
1812
 
1849
1813
  declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
1850
1814
 
1815
+ declare type SemaphorAnalyticsNullFilter = SemaphorAnalyticsFilterBase & {
1816
+ operator: SemaphorAnalyticsNullFilterOperator;
1817
+ values?: never;
1818
+ };
1819
+
1820
+ declare type SemaphorAnalyticsNullFilterOperator = 'is_null' | 'is_not_null';
1821
+
1822
+ declare type SemaphorAnalyticsValueFilter = SemaphorAnalyticsFilterBase & {
1823
+ operator?: SemaphorAnalyticsValueFilterOperator;
1824
+ values: unknown[];
1825
+ };
1826
+
1827
+ declare type SemaphorAnalyticsValueFilterOperator = Exclude<SemaphorAnalyticsFilterOperator, 'is_null' | 'is_not_null'>;
1828
+
1851
1829
  declare type SemaphorDashboardIntent = {
1852
1830
  version: SemaphorProtocolVersion;
1853
1831
  kind: 'dashboard';
@@ -1873,7 +1851,7 @@ declare type SemaphorDashboardViewIntent = {
1873
1851
  text?: string;
1874
1852
  };
1875
1853
 
1876
- declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1854
+ declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1877
1855
 
1878
1856
  declare type SemaphorFieldRef = {
1879
1857
  name: string;
@@ -1921,7 +1899,6 @@ declare type SemaphorInputSpec = {
1921
1899
  operator?: SemaphorInputOperator;
1922
1900
  multi?: boolean;
1923
1901
  defaultValue?: unknown;
1924
- source?: SemaphorSourceRef;
1925
1902
  scope?: SemaphorInputScope;
1926
1903
  };
1927
1904
 
@@ -1937,9 +1914,8 @@ declare type SemaphorMetricIntent = {
1937
1914
  version?: SemaphorProtocolVersion;
1938
1915
  id?: string;
1939
1916
  source: SemaphorSourceRef;
1940
- metrics: string[];
1941
- primaryMetric?: string;
1942
- metricRefs?: SemaphorFieldRef[];
1917
+ metrics: SemaphorFieldRef[];
1918
+ primaryMetric?: SemaphorFieldRef;
1943
1919
  label?: string;
1944
1920
  dateField?: SemaphorFieldRef;
1945
1921
  timeGrain?: SemaphorTimeGrain;
@@ -1964,12 +1940,11 @@ declare type SemaphorRecordsIntent = {
1964
1940
  id?: string;
1965
1941
  label?: string;
1966
1942
  fields: SemaphorFieldRef[];
1967
- measures?: string[];
1968
1943
  dateField?: SemaphorFieldRef;
1969
1944
  timeGrain?: SemaphorTimeGrain;
1970
1945
  limit?: number;
1971
1946
  orderBy?: {
1972
- field: string;
1947
+ field: SemaphorFieldRef;
1973
1948
  direction: 'asc' | 'desc';
1974
1949
  };
1975
1950
  inputs?: SemaphorInputBinding[];
@@ -1994,7 +1969,6 @@ declare type SemaphorSourceRef = {
1994
1969
  } | {
1995
1970
  kind: 'sql';
1996
1971
  connectionId: string;
1997
- sql: string;
1998
1972
  dialect?: SemaphorDialect;
1999
1973
  label?: string;
2000
1974
  };
@@ -2005,9 +1979,9 @@ declare type SemaphorSqlIntent = {
2005
1979
  id?: string;
2006
1980
  label?: string;
2007
1981
  source: Extract<SemaphorSourceRef, {
2008
- kind: 'sql' | 'physical';
1982
+ kind: 'sql';
2009
1983
  }>;
2010
- sql?: string;
1984
+ sql: string;
2011
1985
  parameters?: Record<string, unknown>;
2012
1986
  pythonCode?: string;
2013
1987
  limit?: number;
@@ -1905,7 +1905,7 @@ declare type SemanticExecutionPayload = {
1905
1905
  }>;
1906
1906
  };
1907
1907
 
1908
- declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1908
+ declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1909
1909
 
1910
1910
  declare type SemaphorSourceRef = {
1911
1911
  kind: 'semantic';
@@ -1926,7 +1926,6 @@ declare type SemaphorSourceRef = {
1926
1926
  } | {
1927
1927
  kind: 'sql';
1928
1928
  connectionId: string;
1929
- sql: string;
1930
1929
  dialect?: SemaphorDialect;
1931
1930
  label?: string;
1932
1931
  };