react-semaphor 0.1.367 → 0.1.369
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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/brand-studio/index.cjs +5 -5
- package/dist/brand-studio/index.js +24 -23
- package/dist/chunks/{braces-Cc86y9Ov.js → braces-C3-w6xDL.js} +1 -1
- package/dist/chunks/{braces-CXvY9MwQ.js → braces-C8QqW4wu.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-BOFlzOJg.js → calendar-preferences-dialog-6q51A6XC.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-ZzwfJv2J.js → calendar-preferences-dialog-CUGzkNcE.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CUZL1zaU.js → chevrons-up-down-CnCSGY02.js} +1 -1
- package/dist/chunks/{chevrons-up-down-qQMadOWA.js → chevrons-up-down-DSvLu4Ye.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-9-PCYMjR.js → dashboard-briefing-launcher-BEZnvIla.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D2lBFqAd.js → dashboard-briefing-launcher-ptERmNJr.js} +176 -177
- package/dist/chunks/{dashboard-controls-D4bUHAjX.js → dashboard-controls-CGt6_hMf.js} +11 -11
- package/dist/chunks/{dashboard-controls-BIk094Ah.js → dashboard-controls-CqKC5oEk.js} +77 -77
- package/dist/chunks/{dashboard-json-DImOf512.js → dashboard-json-6SgPm_QW.js} +13 -14
- package/dist/chunks/dashboard-json-CYSbOdmE.js +1 -0
- package/dist/chunks/{edit-dashboard-visual-DTxkV6Fl.js → edit-dashboard-visual-ByQx_M2i.js} +8 -9
- package/dist/chunks/{edit-dashboard-visual-BHKlcqQR.js → edit-dashboard-visual-w6hKbjlw.js} +1 -1
- package/dist/chunks/index-BtqYNH_S.js +1361 -0
- package/dist/chunks/{index-BVEIk-rB.js → index-CPyEi9gS.js} +72498 -76193
- package/dist/chunks/{palette-DPuAc82h.js → palette-D-f4-82S.js} +1 -1
- package/dist/chunks/{palette-C1k347Tb.js → palette-DUGktM-M.js} +1 -1
- package/dist/chunks/{resource-management-panel-BeHceP2D.js → resource-management-panel-Bf8-3eUf.js} +1 -1
- package/dist/chunks/{resource-management-panel-BOfbSf48.js → resource-management-panel-mJ84NxzC.js} +152 -152
- package/dist/chunks/save-D3YYinDz.js +6 -0
- package/dist/chunks/save-kkBEBeLg.js +21 -0
- package/dist/chunks/{switch-xcWLtWs0.js → switch-Dkx2qEOr.js} +758 -776
- package/dist/chunks/{switch-C0S63HAv.js → switch-fIkmwzUt.js} +27 -32
- package/dist/chunks/{use-create-flow-overlay-state-B5FygfQL.js → use-create-flow-overlay-state-BfoXDDrd.js} +190 -189
- package/dist/chunks/use-create-flow-overlay-state-c6rCm36x.js +26 -0
- package/dist/chunks/{use-visual-utils-DxDE8S8M.js → use-visual-utils-C_c-aiqi.js} +1 -1
- package/dist/chunks/{use-visual-utils-CszWnFBW.js → use-visual-utils-NN0e3fBP.js} +13 -13
- package/dist/chunks/validation-Dsf7PydY.js +1 -0
- package/dist/chunks/validation-nOPr0mTk.js +803 -0
- package/dist/chunks/{validators-L0xEXtjf.js → validators-CVuWOHYv.js} +225 -158
- package/dist/chunks/validators-oc8qtP4q.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/data-app-builder/index.cjs +51 -1
- package/dist/data-app-builder/index.js +3666 -2
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +585 -383
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -14
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +21 -1
- package/dist/types/dashboard-assistant.d.ts +21 -1
- package/dist/types/dashboard-authoring.d.ts +11 -1
- package/dist/types/data-app-builder.d.ts +11 -1
- package/dist/types/data-app-sdk-validation.d.ts +107 -23
- package/dist/types/data-app-sdk.d.ts +168 -35
- package/dist/types/main.d.ts +11 -1
- package/package.json +1 -1
- package/dist/chunks/dashboard-json-Bo1kX6W1.js +0 -1
- package/dist/chunks/index-HjDeEytV.js +0 -1411
- package/dist/chunks/use-create-flow-overlay-state-DOXTbTcQ.js +0 -26
- package/dist/chunks/validation-CrUjNWby.js +0 -689
- package/dist/chunks/validation-DGl8wnTt.js +0 -1
- package/dist/chunks/validators-Dq5X4mp0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/validators-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../chunks/validators-oc8qtP4q.js");require("../chunks/source-identity-C-xaeE_I.js");const e=require("../chunks/validation-Dsf7PydY.js");exports.normalizeSemaphorAnalysisQueryOptions=e.normalizeSemaphorAnalysisQueryOptions;exports.validateSemaphorDataAppQuerySpecs=e.validateSemaphorDataAppQuerySpecs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../chunks/validators-
|
|
1
|
+
import "../chunks/validators-CVuWOHYv.js";
|
|
2
2
|
import "../chunks/source-identity-Dj3dryN9.js";
|
|
3
|
-
import {
|
|
3
|
+
import { l as o, v as i } from "../chunks/validation-nOPr0mTk.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
i as
|
|
5
|
+
o as normalizeSemaphorAnalysisQueryOptions,
|
|
6
|
+
i as validateSemaphorDataAppQuerySpecs
|
|
7
7
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-HjDeEytV.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-ZzwfJv2J.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-C0S63HAv.js"),C=require("react"),N=require("./chunks/resource-management-panel-BeHceP2D.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-9-PCYMjR.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-BtqYNH_S.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-CUGzkNcE.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-fIkmwzUt.js"),C=require("react"),N=require("./chunks/resource-management-panel-Bf8-3eUf.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-BEZnvIla.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,
|
|
2
|
-
import {
|
|
1
|
+
import { E as T, F as N, S, p as P, U as _, q as w, r as F, s as x, t as R, v as I, C as M, h as L, I as k, w as U, i as O, j as z, k as V, l as q } from "./chunks/index-CPyEi9gS.js";
|
|
2
|
+
import { V as ca, D as fa, Q as ma, P as pa, M as ha, a8 as ga, z as Ca, G as Da, G as Ea, H as xa, T as Ta, a as ba, a7 as ya, a3 as va, O as Aa, N as Ba, ab as Na, a6 as Sa, a5 as Pa, a4 as _a, aa as wa, a9 as Fa, a0 as Ra, Z as Ia, L as Ma, X as La, K as ka, y as Ua, W as Oa, Y as za, A as Va, a2 as qa, $ as Ha, _ as Wa, a1 as ja, x as Ga, J as Qa, B as Ka } from "./chunks/index-CPyEi9gS.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-
|
|
4
|
+
import { C as le } from "./chunks/calendar-preferences-dialog-6q51A6XC.js";
|
|
5
5
|
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
6
|
-
import { u as
|
|
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-
|
|
6
|
+
import { u as H, P as W, b as j, B as G, a as C, g as Q, d as K, e as X } from "./chunks/switch-Dkx2qEOr.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-Dkx2qEOr.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-
|
|
10
|
+
import { ResourceManagementPanel as Me } from "./chunks/resource-management-panel-mJ84NxzC.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
|
|
15
|
+
import { A as qe, J as He, 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-ptERmNJr.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) {
|
|
@@ -27,7 +27,7 @@ function ta(e) {
|
|
|
27
27
|
] }) });
|
|
28
28
|
}
|
|
29
29
|
function $({ cardId: e }) {
|
|
30
|
-
const s =
|
|
30
|
+
const s = H((r) => {
|
|
31
31
|
var n;
|
|
32
32
|
return (n = r.dashboard) == null ? void 0 : n.sheets;
|
|
33
33
|
}), { card: t, frame: l } = Y(() => {
|
|
@@ -136,7 +136,7 @@ function ia({
|
|
|
136
136
|
" found."
|
|
137
137
|
] }),
|
|
138
138
|
/* @__PURE__ */ a(V, { children: g == null ? void 0 : g.map((i) => /* @__PURE__ */ a(
|
|
139
|
-
|
|
139
|
+
q,
|
|
140
140
|
{
|
|
141
141
|
className: "overflow-x-auto",
|
|
142
142
|
value: i.name,
|
|
@@ -170,8 +170,8 @@ function la(e, s) {
|
|
|
170
170
|
}), [e, s]);
|
|
171
171
|
}
|
|
172
172
|
export {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
qe as AdvancedModeToggle,
|
|
174
|
+
He as BriefingAuthor,
|
|
175
175
|
We as BriefingsApiError,
|
|
176
176
|
Ya as CALCULATED_FIELD_ENTITY_MARKER,
|
|
177
177
|
$a as CONTROL_CARD_DEFAULT_VALUE,
|
|
@@ -279,15 +279,15 @@ export {
|
|
|
279
279
|
we as useDashboardActions,
|
|
280
280
|
ka as useDashboardById,
|
|
281
281
|
Ua as useDashboardQuery,
|
|
282
|
-
|
|
282
|
+
H as useDashboardStore,
|
|
283
283
|
Oa as useDashboardSummary,
|
|
284
284
|
za as useDataColumns,
|
|
285
285
|
Va as useDateFilterHook,
|
|
286
286
|
ze as useDebouncedDirtyCheck,
|
|
287
287
|
Fe as useEditorActions,
|
|
288
|
-
|
|
288
|
+
qa as useEditorAside,
|
|
289
289
|
Re as useEditorStore,
|
|
290
|
-
|
|
290
|
+
Ha as useExportActions,
|
|
291
291
|
Bs as useExportPolling,
|
|
292
292
|
Ns as useExportRecovery,
|
|
293
293
|
Wa as useExportStore,
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-BtqYNH_S.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-CUGzkNcE.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;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e } from "../chunks/index-
|
|
1
|
+
import { a as e } from "../chunks/index-CPyEi9gS.js";
|
|
2
2
|
import { C, E } from "../chunks/common-types-4bjoIgvm.js";
|
|
3
|
-
import { C as s } from "../chunks/calendar-preferences-dialog-
|
|
3
|
+
import { C as s } from "../chunks/calendar-preferences-dialog-6q51A6XC.js";
|
|
4
4
|
export {
|
|
5
5
|
C as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
s as CalendarPreferencesDialog,
|
|
@@ -419,6 +419,7 @@ export declare type SemaphorAnalyticsResultBase = {
|
|
|
419
419
|
rowCount?: number;
|
|
420
420
|
rowLimitExceeded?: boolean;
|
|
421
421
|
limit?: number;
|
|
422
|
+
pagination?: SemaphorPaginationMetadata;
|
|
422
423
|
};
|
|
423
424
|
|
|
424
425
|
export declare type SemaphorAnalyticsValidationCode = 'missing_source' | 'invalid_source_kind' | 'missing_semantic_domain' | 'missing_dataset_name' | 'missing_connection_id' | 'missing_table_name' | 'missing_sql' | 'missing_metric' | 'missing_record_fields' | 'missing_input_options_field' | 'invalid_metric' | 'invalid_metric_list' | 'invalid_date_field' | 'invalid_dimension' | 'invalid_metric_dimensions' | 'conflicting_sql' | 'sql_policy_violation' | 'unsupported_intent_for_adapter' | 'invalid_analytics_kind' | 'invalid_analytics_intent';
|
|
@@ -528,6 +529,9 @@ export declare function semaphorFieldRefsMatch(left: SemaphorFieldRef, right: Se
|
|
|
528
529
|
|
|
529
530
|
export declare type SemaphorInputBinding = {
|
|
530
531
|
inputId: string;
|
|
532
|
+
kind?: 'filter' | 'control';
|
|
533
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
534
|
+
operator?: SemaphorInputOperator;
|
|
531
535
|
field?: SemaphorFieldRef;
|
|
532
536
|
};
|
|
533
537
|
|
|
@@ -647,6 +651,20 @@ export declare type SemaphorOperationIntent = {
|
|
|
647
651
|
context?: Record<string, unknown>;
|
|
648
652
|
};
|
|
649
653
|
|
|
654
|
+
export declare type SemaphorPaginationMetadata = {
|
|
655
|
+
page: number;
|
|
656
|
+
pageSize: number;
|
|
657
|
+
pageCount: number;
|
|
658
|
+
totalCount: number;
|
|
659
|
+
hasNextPage: boolean;
|
|
660
|
+
hasPrevPage: boolean;
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
export declare type SemaphorPaginationRequest = {
|
|
664
|
+
page: number;
|
|
665
|
+
pageSize: number;
|
|
666
|
+
};
|
|
667
|
+
|
|
650
668
|
export declare type SemaphorProtocolIssue = {
|
|
651
669
|
code: string;
|
|
652
670
|
message: string;
|
|
@@ -669,6 +687,7 @@ export declare type SemaphorRecordsIntent = {
|
|
|
669
687
|
timeWindow?: SemaphorTimeWindow;
|
|
670
688
|
filters?: SemaphorAnalyticsFilter[];
|
|
671
689
|
limit?: number;
|
|
690
|
+
pagination?: SemaphorPaginationRequest;
|
|
672
691
|
orderBy?: {
|
|
673
692
|
field: SemaphorFieldRef;
|
|
674
693
|
direction: 'asc' | 'desc';
|
|
@@ -788,9 +807,10 @@ export declare type SemaphorSqlIntent = {
|
|
|
788
807
|
kind: 'sql';
|
|
789
808
|
}>;
|
|
790
809
|
sql: string;
|
|
791
|
-
|
|
810
|
+
defaultParameters?: Record<string, unknown>;
|
|
792
811
|
pythonCode?: string;
|
|
793
812
|
limit?: number;
|
|
813
|
+
pagination?: SemaphorPaginationRequest;
|
|
794
814
|
rationale?: string;
|
|
795
815
|
fields?: SemaphorFieldRef[];
|
|
796
816
|
inputs?: SemaphorInputBinding[];
|
|
@@ -682,6 +682,7 @@ declare type SemaphorAnalyticsResultBase = {
|
|
|
682
682
|
rowCount?: number;
|
|
683
683
|
rowLimitExceeded?: boolean;
|
|
684
684
|
limit?: number;
|
|
685
|
+
pagination?: SemaphorPaginationMetadata;
|
|
685
686
|
};
|
|
686
687
|
|
|
687
688
|
declare type SemaphorAnalyticsValidationCode = 'missing_source' | 'invalid_source_kind' | 'missing_semantic_domain' | 'missing_dataset_name' | 'missing_connection_id' | 'missing_table_name' | 'missing_sql' | 'missing_metric' | 'missing_record_fields' | 'missing_input_options_field' | 'invalid_metric' | 'invalid_metric_list' | 'invalid_date_field' | 'invalid_dimension' | 'invalid_metric_dimensions' | 'conflicting_sql' | 'sql_policy_violation' | 'unsupported_intent_for_adapter' | 'invalid_analytics_kind' | 'invalid_analytics_intent';
|
|
@@ -752,6 +753,9 @@ declare type SemaphorFieldRef = {
|
|
|
752
753
|
|
|
753
754
|
declare type SemaphorInputBinding = {
|
|
754
755
|
inputId: string;
|
|
756
|
+
kind?: 'filter' | 'control';
|
|
757
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
758
|
+
operator?: SemaphorInputOperator;
|
|
755
759
|
field?: SemaphorFieldRef;
|
|
756
760
|
};
|
|
757
761
|
|
|
@@ -823,6 +827,20 @@ declare type SemaphorMetricResult = SemaphorAnalyticsResultBase & {
|
|
|
823
827
|
};
|
|
824
828
|
};
|
|
825
829
|
|
|
830
|
+
declare type SemaphorPaginationMetadata = {
|
|
831
|
+
page: number;
|
|
832
|
+
pageSize: number;
|
|
833
|
+
pageCount: number;
|
|
834
|
+
totalCount: number;
|
|
835
|
+
hasNextPage: boolean;
|
|
836
|
+
hasPrevPage: boolean;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
declare type SemaphorPaginationRequest = {
|
|
840
|
+
page: number;
|
|
841
|
+
pageSize: number;
|
|
842
|
+
};
|
|
843
|
+
|
|
826
844
|
declare type SemaphorProtocolIssue = {
|
|
827
845
|
code: string;
|
|
828
846
|
message: string;
|
|
@@ -845,6 +863,7 @@ declare type SemaphorRecordsIntent = {
|
|
|
845
863
|
timeWindow?: SemaphorTimeWindow;
|
|
846
864
|
filters?: SemaphorAnalyticsFilter[];
|
|
847
865
|
limit?: number;
|
|
866
|
+
pagination?: SemaphorPaginationRequest;
|
|
848
867
|
orderBy?: {
|
|
849
868
|
field: SemaphorFieldRef;
|
|
850
869
|
direction: 'asc' | 'desc';
|
|
@@ -939,9 +958,10 @@ declare type SemaphorSqlIntent = {
|
|
|
939
958
|
kind: 'sql';
|
|
940
959
|
}>;
|
|
941
960
|
sql: string;
|
|
942
|
-
|
|
961
|
+
defaultParameters?: Record<string, unknown>;
|
|
943
962
|
pythonCode?: string;
|
|
944
963
|
limit?: number;
|
|
964
|
+
pagination?: SemaphorPaginationRequest;
|
|
945
965
|
rationale?: string;
|
|
946
966
|
fields?: SemaphorFieldRef[];
|
|
947
967
|
inputs?: SemaphorInputBinding[];
|
|
@@ -1882,6 +1882,9 @@ declare type SemaphorFieldRef = {
|
|
|
1882
1882
|
|
|
1883
1883
|
declare type SemaphorInputBinding = {
|
|
1884
1884
|
inputId: string;
|
|
1885
|
+
kind?: 'filter' | 'control';
|
|
1886
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
1887
|
+
operator?: SemaphorInputOperator;
|
|
1885
1888
|
field?: SemaphorFieldRef;
|
|
1886
1889
|
};
|
|
1887
1890
|
|
|
@@ -1958,6 +1961,11 @@ declare type SemaphorMetricIntent = {
|
|
|
1958
1961
|
limit?: number;
|
|
1959
1962
|
};
|
|
1960
1963
|
|
|
1964
|
+
declare type SemaphorPaginationRequest = {
|
|
1965
|
+
page: number;
|
|
1966
|
+
pageSize: number;
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1961
1969
|
declare type SemaphorProtocolVersion = 1;
|
|
1962
1970
|
|
|
1963
1971
|
declare type SemaphorRecordsIntent = {
|
|
@@ -1972,6 +1980,7 @@ declare type SemaphorRecordsIntent = {
|
|
|
1972
1980
|
timeWindow?: SemaphorTimeWindow;
|
|
1973
1981
|
filters?: SemaphorAnalyticsFilter[];
|
|
1974
1982
|
limit?: number;
|
|
1983
|
+
pagination?: SemaphorPaginationRequest;
|
|
1975
1984
|
orderBy?: {
|
|
1976
1985
|
field: SemaphorFieldRef;
|
|
1977
1986
|
direction: 'asc' | 'desc';
|
|
@@ -2019,9 +2028,10 @@ declare type SemaphorSqlIntent = {
|
|
|
2019
2028
|
kind: 'sql';
|
|
2020
2029
|
}>;
|
|
2021
2030
|
sql: string;
|
|
2022
|
-
|
|
2031
|
+
defaultParameters?: Record<string, unknown>;
|
|
2023
2032
|
pythonCode?: string;
|
|
2024
2033
|
limit?: number;
|
|
2034
|
+
pagination?: SemaphorPaginationRequest;
|
|
2025
2035
|
rationale?: string;
|
|
2026
2036
|
fields?: SemaphorFieldRef[];
|
|
2027
2037
|
inputs?: SemaphorInputBinding[];
|
|
@@ -593,6 +593,9 @@ declare type SemaphorFieldRef = {
|
|
|
593
593
|
|
|
594
594
|
declare type SemaphorInputBinding = {
|
|
595
595
|
inputId: string;
|
|
596
|
+
kind?: 'filter' | 'control';
|
|
597
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
598
|
+
operator?: SemaphorInputOperator;
|
|
596
599
|
field?: SemaphorFieldRef;
|
|
597
600
|
};
|
|
598
601
|
|
|
@@ -642,6 +645,11 @@ declare type SemaphorMetricIntent = {
|
|
|
642
645
|
limit?: number;
|
|
643
646
|
};
|
|
644
647
|
|
|
648
|
+
declare type SemaphorPaginationRequest = {
|
|
649
|
+
page: number;
|
|
650
|
+
pageSize: number;
|
|
651
|
+
};
|
|
652
|
+
|
|
645
653
|
declare type SemaphorProtocolVersion = 1;
|
|
646
654
|
|
|
647
655
|
declare type SemaphorRecordsIntent = {
|
|
@@ -656,6 +664,7 @@ declare type SemaphorRecordsIntent = {
|
|
|
656
664
|
timeWindow?: SemaphorTimeWindow;
|
|
657
665
|
filters?: SemaphorAnalyticsFilter[];
|
|
658
666
|
limit?: number;
|
|
667
|
+
pagination?: SemaphorPaginationRequest;
|
|
659
668
|
orderBy?: {
|
|
660
669
|
field: SemaphorFieldRef;
|
|
661
670
|
direction: 'asc' | 'desc';
|
|
@@ -703,9 +712,10 @@ declare type SemaphorSqlIntent = {
|
|
|
703
712
|
kind: 'sql';
|
|
704
713
|
}>;
|
|
705
714
|
sql: string;
|
|
706
|
-
|
|
715
|
+
defaultParameters?: Record<string, unknown>;
|
|
707
716
|
pythonCode?: string;
|
|
708
717
|
limit?: number;
|
|
718
|
+
pagination?: SemaphorPaginationRequest;
|
|
709
719
|
rationale?: string;
|
|
710
720
|
fields?: SemaphorFieldRef[];
|
|
711
721
|
inputs?: SemaphorInputBinding[];
|
|
@@ -51,6 +51,10 @@ declare type SemaphorAggregateFunction = 'SUM' | 'COUNT' | 'AVG' | 'MIN' | 'MAX'
|
|
|
51
51
|
|
|
52
52
|
declare type SemaphorAnalysisDriverMode = 'absolute_delta' | 'largest_negative' | 'largest_positive' | 'positive_and_negative' | 'all';
|
|
53
53
|
|
|
54
|
+
declare type SemaphorAnalysisQueryDefinition = SemaphorAnalysisQuerySpec & {
|
|
55
|
+
queryKind: 'analysis';
|
|
56
|
+
};
|
|
57
|
+
|
|
54
58
|
export declare type SemaphorAnalysisQueryOptions = {
|
|
55
59
|
chartTitle?: string;
|
|
56
60
|
chartType?: string;
|
|
@@ -158,6 +162,7 @@ declare type SemaphorAnalyticsResultBase = {
|
|
|
158
162
|
rowCount?: number;
|
|
159
163
|
rowLimitExceeded?: boolean;
|
|
160
164
|
limit?: number;
|
|
165
|
+
pagination?: SemaphorPaginationMetadata;
|
|
161
166
|
};
|
|
162
167
|
|
|
163
168
|
declare type SemaphorAnalyticsValidationCode = 'missing_source' | 'invalid_source_kind' | 'missing_semantic_domain' | 'missing_dataset_name' | 'missing_connection_id' | 'missing_table_name' | 'missing_sql' | 'missing_metric' | 'missing_record_fields' | 'missing_input_options_field' | 'invalid_metric' | 'invalid_metric_list' | 'invalid_date_field' | 'invalid_dimension' | 'invalid_metric_dimensions' | 'conflicting_sql' | 'sql_policy_violation' | 'unsupported_intent_for_adapter' | 'invalid_analytics_kind' | 'invalid_analytics_intent';
|
|
@@ -209,6 +214,11 @@ declare type SemaphorCompiledQuery = {
|
|
|
209
214
|
analyticsIntent?: SemaphorAnalyticsIntent;
|
|
210
215
|
};
|
|
211
216
|
|
|
217
|
+
declare type SemaphorControlInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorInputBase<TValue> & {
|
|
218
|
+
kind: 'control';
|
|
219
|
+
role: SemaphorControlRole;
|
|
220
|
+
};
|
|
221
|
+
|
|
212
222
|
declare type SemaphorControlRole = 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
213
223
|
|
|
214
224
|
export declare type SemaphorDataAppFieldCatalog = {
|
|
@@ -217,23 +227,14 @@ export declare type SemaphorDataAppFieldCatalog = {
|
|
|
217
227
|
fields: SemaphorFieldRef[];
|
|
218
228
|
};
|
|
219
229
|
|
|
220
|
-
export declare type
|
|
221
|
-
|
|
222
|
-
spec:
|
|
223
|
-
} | {
|
|
224
|
-
hook: 'useSemaphorMetric';
|
|
225
|
-
spec: SemaphorMetricQuerySpec;
|
|
226
|
-
} | {
|
|
227
|
-
hook: 'useSemaphorRecords';
|
|
228
|
-
spec: SemaphorRecordsQuerySpec;
|
|
229
|
-
} | {
|
|
230
|
-
hook: 'useSemaphorInputOptions';
|
|
231
|
-
spec: SemaphorInputOptionsQuerySpec;
|
|
230
|
+
export declare type SemaphorDataAppQuerySpecEnvelope = {
|
|
231
|
+
queryHook: 'useSemaphorQuery';
|
|
232
|
+
spec: SemaphorQueryDefinition;
|
|
232
233
|
};
|
|
233
234
|
|
|
234
|
-
export declare type
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
export declare type SemaphorDataAppQueryValidation = {
|
|
236
|
+
queryHook: SemaphorDataAppQuerySpecEnvelope['queryHook'];
|
|
237
|
+
queryId?: string;
|
|
237
238
|
intent?: SemaphorAnalyticsIntent;
|
|
238
239
|
diagnostics: SemaphorDataAppValidationDiagnostic[];
|
|
239
240
|
executionResult: SemaphorAnalyticsExecutionResult;
|
|
@@ -241,11 +242,11 @@ export declare type SemaphorDataAppHookValidation = {
|
|
|
241
242
|
|
|
242
243
|
export declare type SemaphorDataAppValidationDiagnostic = {
|
|
243
244
|
severity: 'error' | 'warning';
|
|
244
|
-
code: '
|
|
245
|
+
code: 'invalid_query_spec' | 'invalid_analytics_intent' | 'invalid_source_ref' | 'missing_field' | 'unsupported_input_filter_composition' | string;
|
|
245
246
|
message: string;
|
|
246
247
|
path?: string;
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
queryHook?: SemaphorDataAppQuerySpecEnvelope['queryHook'];
|
|
249
|
+
queryId?: string;
|
|
249
250
|
intentId?: string;
|
|
250
251
|
source?: SemaphorSourceRef;
|
|
251
252
|
field?: SemaphorFieldRef;
|
|
@@ -254,7 +255,7 @@ export declare type SemaphorDataAppValidationDiagnostic = {
|
|
|
254
255
|
export declare type SemaphorDataAppValidationResult = {
|
|
255
256
|
ok: boolean;
|
|
256
257
|
diagnostics: SemaphorDataAppValidationDiagnostic[];
|
|
257
|
-
|
|
258
|
+
queries: SemaphorDataAppQueryValidation[];
|
|
258
259
|
intents: SemaphorAnalyticsIntent[];
|
|
259
260
|
executionResults: SemaphorAnalyticsExecutionResult[];
|
|
260
261
|
};
|
|
@@ -276,8 +277,29 @@ declare type SemaphorFieldRef = {
|
|
|
276
277
|
aggregate?: SemaphorAggregateFunction;
|
|
277
278
|
};
|
|
278
279
|
|
|
280
|
+
declare type SemaphorFilterInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorInputBase<TValue> & {
|
|
281
|
+
kind: 'filter';
|
|
282
|
+
field: SemaphorQueryField;
|
|
283
|
+
operator?: SemaphorInputOperatorInput;
|
|
284
|
+
multi?: boolean;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
declare type SemaphorInputBase<TValue extends SemaphorInputValue> = {
|
|
288
|
+
id: string;
|
|
289
|
+
label?: string;
|
|
290
|
+
value?: TValue;
|
|
291
|
+
defaultValue?: TValue;
|
|
292
|
+
onValueChange?: {
|
|
293
|
+
bivarianceHack(value: TValue | undefined): void;
|
|
294
|
+
}['bivarianceHack'];
|
|
295
|
+
options?: Array<SemaphorInputOption | SemaphorOptionValue>;
|
|
296
|
+
};
|
|
297
|
+
|
|
279
298
|
declare type SemaphorInputBinding = {
|
|
280
299
|
inputId: string;
|
|
300
|
+
kind?: 'filter' | 'control';
|
|
301
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
302
|
+
operator?: SemaphorInputOperator;
|
|
281
303
|
field?: SemaphorFieldRef;
|
|
282
304
|
};
|
|
283
305
|
|
|
@@ -298,6 +320,10 @@ declare type SemaphorInputHandle<TValue extends SemaphorInputValue = SemaphorInp
|
|
|
298
320
|
|
|
299
321
|
declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
|
|
300
322
|
|
|
323
|
+
declare type SemaphorInputOperatorAlias = 'eq' | 'equals' | 'not_equals' | 'neq' | 'not equal' | 'not equals' | 'not in' | 'like' | 'not_contains' | 'not contains' | 'not_like' | 'not like' | 'not_between' | 'not between';
|
|
324
|
+
|
|
325
|
+
declare type SemaphorInputOperatorInput = SemaphorInputOperator | SemaphorInputOperatorAlias;
|
|
326
|
+
|
|
301
327
|
declare type SemaphorInputOption = {
|
|
302
328
|
label: string;
|
|
303
329
|
value: SemaphorOptionValue;
|
|
@@ -315,6 +341,10 @@ declare type SemaphorInputOptionsIntent = {
|
|
|
315
341
|
limit?: number;
|
|
316
342
|
};
|
|
317
343
|
|
|
344
|
+
declare type SemaphorInputOptionsQueryDefinition = SemaphorInputOptionsQuerySpec & {
|
|
345
|
+
queryKind: 'inputOptions';
|
|
346
|
+
};
|
|
347
|
+
|
|
318
348
|
declare type SemaphorInputOptionsQuerySpec = SemaphorQuerySourceSpec & {
|
|
319
349
|
id?: string;
|
|
320
350
|
label?: string;
|
|
@@ -332,7 +362,9 @@ declare type SemaphorInputOptionsResult = SemaphorAnalyticsResultBase & {
|
|
|
332
362
|
}>;
|
|
333
363
|
};
|
|
334
364
|
|
|
335
|
-
declare type SemaphorInputReference = SemaphorInputBinding | SemaphorActiveInput | SemaphorInputHandle;
|
|
365
|
+
declare type SemaphorInputReference = SemaphorInputSpec | SemaphorInputBinding | SemaphorActiveInput | SemaphorInputHandle;
|
|
366
|
+
|
|
367
|
+
declare type SemaphorInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorFilterInputSpec<TValue> | SemaphorControlInputSpec<TValue>;
|
|
336
368
|
|
|
337
369
|
declare type SemaphorInputValue = SemaphorScalar | SemaphorScalar[];
|
|
338
370
|
|
|
@@ -376,6 +408,10 @@ declare type SemaphorMetricIntent = {
|
|
|
376
408
|
limit?: number;
|
|
377
409
|
};
|
|
378
410
|
|
|
411
|
+
declare type SemaphorMetricQueryDefinition = SemaphorMetricQuerySpec & {
|
|
412
|
+
queryKind: 'metric';
|
|
413
|
+
};
|
|
414
|
+
|
|
379
415
|
declare type SemaphorMetricQuerySpec = SemaphorQuerySourceSpec & {
|
|
380
416
|
id?: string;
|
|
381
417
|
label?: string;
|
|
@@ -405,6 +441,20 @@ declare type SemaphorNonEmptyArray<T> = [T, ...T[]];
|
|
|
405
441
|
|
|
406
442
|
declare type SemaphorOptionValue = string | number | boolean;
|
|
407
443
|
|
|
444
|
+
declare type SemaphorPaginationMetadata = {
|
|
445
|
+
page: number;
|
|
446
|
+
pageSize: number;
|
|
447
|
+
pageCount: number;
|
|
448
|
+
totalCount: number;
|
|
449
|
+
hasNextPage: boolean;
|
|
450
|
+
hasPrevPage: boolean;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
declare type SemaphorPaginationRequest = {
|
|
454
|
+
page: number;
|
|
455
|
+
pageSize: number;
|
|
456
|
+
};
|
|
457
|
+
|
|
408
458
|
declare type SemaphorProtocolIssue = {
|
|
409
459
|
code: string;
|
|
410
460
|
message: string;
|
|
@@ -413,6 +463,8 @@ declare type SemaphorProtocolIssue = {
|
|
|
413
463
|
|
|
414
464
|
declare type SemaphorProtocolVersion = 1;
|
|
415
465
|
|
|
466
|
+
declare type SemaphorQueryDefinition = SemaphorMetricQueryDefinition | SemaphorAnalysisQueryDefinition | SemaphorRecordsQueryDefinition | SemaphorInputOptionsQueryDefinition | SemaphorSqlQueryDefinition;
|
|
467
|
+
|
|
416
468
|
declare type SemaphorQueryField = SemaphorFieldRef;
|
|
417
469
|
|
|
418
470
|
declare type SemaphorQueryOrderBy = {
|
|
@@ -436,6 +488,7 @@ declare type SemaphorRecordsBaseQuerySpec = SemaphorQuerySourceSpec & {
|
|
|
436
488
|
orderBy?: SemaphorRecordsOrderBy;
|
|
437
489
|
inputs?: SemaphorInputReference[];
|
|
438
490
|
limit?: number;
|
|
491
|
+
pagination?: SemaphorPaginationRequest;
|
|
439
492
|
};
|
|
440
493
|
|
|
441
494
|
declare type SemaphorRecordsField = SemaphorFieldRef & {
|
|
@@ -454,6 +507,7 @@ declare type SemaphorRecordsIntent = {
|
|
|
454
507
|
timeWindow?: SemaphorTimeWindow;
|
|
455
508
|
filters?: SemaphorAnalyticsFilter[];
|
|
456
509
|
limit?: number;
|
|
510
|
+
pagination?: SemaphorPaginationRequest;
|
|
457
511
|
orderBy?: {
|
|
458
512
|
field: SemaphorFieldRef;
|
|
459
513
|
direction: 'asc' | 'desc';
|
|
@@ -463,6 +517,10 @@ declare type SemaphorRecordsIntent = {
|
|
|
463
517
|
|
|
464
518
|
declare type SemaphorRecordsOrderBy = SemaphorQueryOrderBy;
|
|
465
519
|
|
|
520
|
+
declare type SemaphorRecordsQueryDefinition = SemaphorRecordsQuerySpec & {
|
|
521
|
+
queryKind: 'records';
|
|
522
|
+
};
|
|
523
|
+
|
|
466
524
|
declare type SemaphorRecordsQuerySpec = SemaphorRecordsBaseQuerySpec & SemaphorRecordsSelectorSpec;
|
|
467
525
|
|
|
468
526
|
declare type SemaphorRecordsResult = SemaphorAnalyticsResultBase & {
|
|
@@ -558,14 +616,34 @@ declare type SemaphorSqlIntent = {
|
|
|
558
616
|
kind: 'sql';
|
|
559
617
|
}>;
|
|
560
618
|
sql: string;
|
|
561
|
-
|
|
619
|
+
defaultParameters?: Record<string, unknown>;
|
|
562
620
|
pythonCode?: string;
|
|
563
621
|
limit?: number;
|
|
622
|
+
pagination?: SemaphorPaginationRequest;
|
|
564
623
|
rationale?: string;
|
|
565
624
|
fields?: SemaphorFieldRef[];
|
|
566
625
|
inputs?: SemaphorInputBinding[];
|
|
567
626
|
};
|
|
568
627
|
|
|
628
|
+
declare type SemaphorSqlParameterValue = SemaphorScalar | SemaphorScalar[];
|
|
629
|
+
|
|
630
|
+
declare type SemaphorSqlQueryDefinition = SemaphorSqlQuerySpec & {
|
|
631
|
+
queryKind: 'sql';
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
declare type SemaphorSqlQuerySpec = SemaphorSqlSourceSpec & {
|
|
635
|
+
id?: string;
|
|
636
|
+
label?: string;
|
|
637
|
+
sql: string;
|
|
638
|
+
defaultParameters?: Record<string, SemaphorSqlParameterValue>;
|
|
639
|
+
pythonCode?: string;
|
|
640
|
+
fields?: SemaphorFieldRef[];
|
|
641
|
+
inputs?: SemaphorInputReference[];
|
|
642
|
+
limit?: number;
|
|
643
|
+
pagination?: SemaphorPaginationRequest;
|
|
644
|
+
rationale?: string;
|
|
645
|
+
};
|
|
646
|
+
|
|
569
647
|
declare type SemaphorSqlResult = SemaphorAnalyticsResultBase & {
|
|
570
648
|
kind: 'sql';
|
|
571
649
|
columns: SemaphorRecordsResult['columns'];
|
|
@@ -577,12 +655,18 @@ declare type SemaphorSqlResult = SemaphorAnalyticsResultBase & {
|
|
|
577
655
|
};
|
|
578
656
|
};
|
|
579
657
|
|
|
658
|
+
declare type SemaphorSqlSourceSpec = {
|
|
659
|
+
source: Extract<SemaphorSourceRef, {
|
|
660
|
+
kind: 'sql';
|
|
661
|
+
}>;
|
|
662
|
+
};
|
|
663
|
+
|
|
580
664
|
declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
581
665
|
|
|
582
666
|
declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
|
|
583
667
|
|
|
584
|
-
export declare function
|
|
585
|
-
|
|
668
|
+
export declare function validateSemaphorDataAppQuerySpecs(input: {
|
|
669
|
+
queries: SemaphorDataAppQuerySpecEnvelope[];
|
|
586
670
|
fieldCatalogs?: SemaphorDataAppFieldCatalog[];
|
|
587
671
|
requireFieldCatalog?: boolean;
|
|
588
672
|
validateTimezone?: SemaphorAnalysisTimezoneValidator;
|