react-semaphor 0.1.324 → 0.1.325
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 -0
- package/dist/analytics-protocol/index.js +240 -0
- package/dist/chunks/{calendar-preferences-dialog-CLXaVo3h.js → calendar-preferences-dialog-BxeROxyq.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-B9Hz3pTH.js → calendar-preferences-dialog-DHhT6Sja.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CUEn7cr6.js → dashboard-briefing-launcher-BzIxRlzW.js} +3 -3
- package/dist/chunks/{dashboard-briefing-launcher-COLpvReF.js → dashboard-briefing-launcher-DZiFMK8I.js} +1 -1
- package/dist/chunks/{dashboard-controls-DH8gdpOc.js → dashboard-controls-BX693lE0.js} +1 -1
- package/dist/chunks/{dashboard-controls-CLShFyUq.js → dashboard-controls-DVwsWny9.js} +3 -3
- package/dist/chunks/{dashboard-json-Db0DpTMw.js → dashboard-json-D15C_I9e.js} +1 -1
- package/dist/chunks/{dashboard-json-eGBWfSN1.js → dashboard-json-DxNEFM-p.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-Cc3xpTNQ.js → edit-dashboard-visual-90_qEgRc.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DmMKWtln.js → edit-dashboard-visual-wQyJEcVH.js} +3 -3
- package/dist/chunks/{index-PTx7430W.js → index-CffvIaZO.js} +33125 -32694
- package/dist/chunks/{index-CMS4bp9G.js → index-YTk9Hab2.js} +203 -203
- package/dist/chunks/{resource-management-panel-C1mbF-2a.js → resource-management-panel-CLoO2DL3.js} +2 -2
- package/dist/chunks/{resource-management-panel-DR7Ku6sa.js → resource-management-panel-DlnrD0y-.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CmxTpqeg.js → use-create-flow-overlay-state-DocFanjO.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-B65gg2oB.js → use-create-flow-overlay-state-DsPoCfMu.js} +2 -2
- package/dist/chunks/{use-visual-utils-Diuguy3D.js → use-visual-utils-BdO22fQZ.js} +1 -1
- package/dist/chunks/{use-visual-utils-51Nsy8cj.js → use-visual-utils-DSbXQQD1.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +825 -310
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +172 -0
- package/dist/types/dashboard-authoring.d.ts +161 -0
- package/dist/types/main.d.ts +1 -0
- package/package.json +6 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-CMS4bp9G.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-CLXaVo3h.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-BXICAlvS.js"),C=require("react"),N=require("./chunks/resource-management-panel-DR7Ku6sa.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-COLpvReF.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.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-YTk9Hab2.js"),d=require("./chunks/common-types-C73-Ud1-.js"),P=require("./chunks/calendar-preferences-dialog-BxeROxyq.js"),t=require("react/jsx-runtime"),a=require("./chunks/switch-BXICAlvS.js"),C=require("react"),N=require("./chunks/resource-management-panel-DlnrD0y-.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-DZiFMK8I.js"),S=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.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, 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-
|
|
2
|
-
import { V as ua, D as ca, Q as fa, P as ma, M as pa, a8 as ha, z as ga, G as Ca, G as Da, H as Ea, T as xa, a as Ta, a7 as ba, a3 as ya, O as va, N as Aa, ab as Ba, a6 as Na, a5 as Sa, a4 as Pa, aa as _a, a9 as wa, a0 as Fa, Z as Ra, L as Ia, X as Ma, K as La, y as ka, W as Ua, Y as Oa, A as za, a2 as Va, $ as qa, _ as Ha, a1 as Wa, x as ja, J as Ga, B as Qa } from "./chunks/index-
|
|
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-CffvIaZO.js";
|
|
2
|
+
import { V as ua, D as ca, Q as fa, P as ma, M as pa, a8 as ha, z as ga, G as Ca, G as Da, H as Ea, T as xa, a as Ta, a7 as ba, a3 as ya, O as va, N as Aa, ab as Ba, a6 as Na, a5 as Sa, a4 as Pa, aa as _a, a9 as wa, a0 as Fa, Z as Ra, L as Ia, X as Ma, K as La, y as ka, W as Ua, Y as Oa, A as za, a2 as Va, $ as qa, _ as Ha, a1 as Wa, x as ja, J as Ga, B as Qa } from "./chunks/index-CffvIaZO.js";
|
|
3
3
|
import { a as Xa, C as Ya, D as $a, E as Ja, P as Za, g as ae, d as ee, h as se, b as re, c as oe, i as te } from "./chunks/common-types-4bjoIgvm.js";
|
|
4
|
-
import { C as ie } from "./chunks/calendar-preferences-dialog-
|
|
4
|
+
import { C as ie } from "./chunks/calendar-preferences-dialog-DHhT6Sja.js";
|
|
5
5
|
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
6
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-Deo2Ltmj.js";
|
|
7
7
|
import { F as de, q as ue, h as ce, i as fe, k as me, s as pe, r as he, w as ge, x as Ce, p as De, j as Ee, o as xe, t as Te, n as be, m as ye, l as ve, y as Ae, v as Be, z as Ne, D as Se, A as Pe, E as _e, H as we, G as Fe } from "./chunks/switch-Deo2Ltmj.js";
|
|
8
8
|
import * as m from "react";
|
|
9
9
|
import { useMemo as Y, useEffect as b } from "react";
|
|
10
|
-
import { ResourceManagementPanel as Ie } from "./chunks/resource-management-panel-
|
|
10
|
+
import { ResourceManagementPanel as Ie } from "./chunks/resource-management-panel-CLoO2DL3.js";
|
|
11
11
|
import { DEFAULT_CALENDAR_CONTEXT as Le, DEFAULT_SEMANTIC_DOMAIN_ACCESS as ke } from "./types/index.js";
|
|
12
12
|
import { u as Oe } 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 Ve, J as qe, B as He, K as We, D as je, d as Ge, e as Qe, c as Ke, a as Xe, E as Ye, N as $e, U as Je, V as Ze, W as as, C as es, G as ss, H as rs, F as os, t as ts, h as ns, z as is, j as ls, v as ds, g as us, w as cs, x as fs, o as ms, s as ps, q as hs, f as gs, l as Cs, p as Ds, y as Es, m as xs, r as Ts, k as bs, n as ys, i as vs, u as As, b as Bs, I as Ns } from "./chunks/dashboard-briefing-launcher-
|
|
15
|
+
import { A as Ve, J as qe, B as He, K as We, D as je, d as Ge, e as Qe, c as Ke, a as Xe, E as Ye, N as $e, U as Je, V as Ze, W as as, C as es, G as ss, H as rs, F as os, t as ts, h as ns, z as is, j as ls, v as ds, g as us, w as cs, x as fs, o as ms, s as ps, q as hs, f as gs, l as Cs, p as Ds, y as Es, m as xs, r as Ts, k as bs, n as ys, i as vs, u as As, b as Bs, I as Ns } from "./chunks/dashboard-briefing-launcher-BzIxRlzW.js";
|
|
16
16
|
import { n as Ps, s as _s } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
17
17
|
function oa(e) {
|
|
18
18
|
const { displayPreferences: s, cardId: t, ...l } = e, r = {
|
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-YTk9Hab2.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-BxeROxyq.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-CffvIaZO.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-DHhT6Sja.js";
|
|
4
4
|
export {
|
|
5
5
|
C as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
s as CalendarPreferencesDialog,
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
export declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
|
|
2
|
+
|
|
3
|
+
export declare type SemaphorDashboardIntent = {
|
|
4
|
+
version: SemaphorProtocolVersion;
|
|
5
|
+
kind: 'dashboard';
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
inputs?: SemaphorInputSpec[];
|
|
9
|
+
sections: SemaphorDashboardSectionIntent[];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type SemaphorDashboardSectionIntent = {
|
|
13
|
+
id?: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
views: SemaphorDashboardViewIntent[];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export declare type SemaphorDashboardViewIntent = {
|
|
20
|
+
id?: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
presentation: SemaphorViewPresentation;
|
|
24
|
+
analytics?: SemaphorAnalyticsIntent;
|
|
25
|
+
text?: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'snowflake' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
|
|
29
|
+
|
|
30
|
+
export declare type SemaphorExperienceIntent = SemaphorDashboardIntent;
|
|
31
|
+
|
|
32
|
+
export declare type SemaphorFieldRef = {
|
|
33
|
+
name: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
role?: 'dimension' | 'measure' | 'date' | 'id' | 'unknown';
|
|
36
|
+
dataType?: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'unknown';
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export declare type SemaphorInputBinding = {
|
|
40
|
+
inputId: string;
|
|
41
|
+
field?: SemaphorFieldRef;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'between' | '>' | '>=' | '<' | '<=';
|
|
45
|
+
|
|
46
|
+
export declare type SemaphorInputOptionsIntent = {
|
|
47
|
+
kind: 'inputOptions';
|
|
48
|
+
source: SemaphorSourceRef;
|
|
49
|
+
field: SemaphorFieldRef;
|
|
50
|
+
search?: string;
|
|
51
|
+
limit?: number;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export declare type SemaphorInputScope = {
|
|
55
|
+
level: 'dashboard';
|
|
56
|
+
excludeViewIds?: string[];
|
|
57
|
+
} | {
|
|
58
|
+
level: 'section';
|
|
59
|
+
sectionId: string;
|
|
60
|
+
excludeViewIds?: string[];
|
|
61
|
+
} | {
|
|
62
|
+
level: 'view';
|
|
63
|
+
viewIds: string[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export declare type SemaphorInputSpec = {
|
|
67
|
+
id: string;
|
|
68
|
+
kind: 'filter' | 'control';
|
|
69
|
+
label: string;
|
|
70
|
+
field: SemaphorFieldRef;
|
|
71
|
+
operator?: SemaphorInputOperator;
|
|
72
|
+
multi?: boolean;
|
|
73
|
+
defaultValue?: unknown;
|
|
74
|
+
source?: SemaphorSourceRef;
|
|
75
|
+
scope?: SemaphorInputScope;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export declare type SemaphorMetricIntent = {
|
|
79
|
+
kind: 'metric';
|
|
80
|
+
source: SemaphorSourceRef;
|
|
81
|
+
metric: string;
|
|
82
|
+
label?: string;
|
|
83
|
+
dateField?: SemaphorFieldRef;
|
|
84
|
+
comparison?: {
|
|
85
|
+
kind: 'previous_period' | 'previous_year' | 'target';
|
|
86
|
+
targetValue?: number;
|
|
87
|
+
};
|
|
88
|
+
inputs?: SemaphorInputBinding[];
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export declare type SemaphorProtocolIssue = {
|
|
92
|
+
code: string;
|
|
93
|
+
message: string;
|
|
94
|
+
path?: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export declare type SemaphorProtocolVersion = 1;
|
|
98
|
+
|
|
99
|
+
export declare type SemaphorRecordsIntent = {
|
|
100
|
+
kind: 'records';
|
|
101
|
+
source: SemaphorSourceRef;
|
|
102
|
+
fields: SemaphorFieldRef[];
|
|
103
|
+
measures?: string[];
|
|
104
|
+
dateField?: SemaphorFieldRef;
|
|
105
|
+
timeGrain?: SemaphorTimeGrain;
|
|
106
|
+
limit?: number;
|
|
107
|
+
orderBy?: {
|
|
108
|
+
field: string;
|
|
109
|
+
direction: 'asc' | 'desc';
|
|
110
|
+
};
|
|
111
|
+
inputs?: SemaphorInputBinding[];
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export declare type SemaphorSourceRef = {
|
|
115
|
+
kind: 'semantic';
|
|
116
|
+
domainId: string;
|
|
117
|
+
datasetName: string;
|
|
118
|
+
datasetId?: string;
|
|
119
|
+
label?: string;
|
|
120
|
+
connectionId?: string;
|
|
121
|
+
} | {
|
|
122
|
+
kind: 'physical';
|
|
123
|
+
connectionId: string;
|
|
124
|
+
tableName: string;
|
|
125
|
+
databaseName?: string;
|
|
126
|
+
schemaName?: string;
|
|
127
|
+
label?: string;
|
|
128
|
+
dialect?: SemaphorDialect;
|
|
129
|
+
} | {
|
|
130
|
+
kind: 'sql';
|
|
131
|
+
connectionId: string;
|
|
132
|
+
sql: string;
|
|
133
|
+
dialect?: SemaphorDialect;
|
|
134
|
+
label?: string;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export declare type SemaphorSqlIntent = {
|
|
138
|
+
kind: 'sql';
|
|
139
|
+
source: Extract<SemaphorSourceRef, {
|
|
140
|
+
kind: 'sql';
|
|
141
|
+
}>;
|
|
142
|
+
fields?: SemaphorFieldRef[];
|
|
143
|
+
inputs?: SemaphorInputBinding[];
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
147
|
+
|
|
148
|
+
export declare type SemaphorValidationResult = {
|
|
149
|
+
ok: boolean;
|
|
150
|
+
errors: SemaphorProtocolIssue[];
|
|
151
|
+
warnings: SemaphorProtocolIssue[];
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export declare type SemaphorViewPresentation = {
|
|
155
|
+
kind: 'kpi';
|
|
156
|
+
format?: 'number' | 'currency' | 'percent' | 'duration';
|
|
157
|
+
} | {
|
|
158
|
+
kind: 'lineChart' | 'barChart' | 'areaChart';
|
|
159
|
+
x?: string;
|
|
160
|
+
y?: string[];
|
|
161
|
+
} | {
|
|
162
|
+
kind: 'table';
|
|
163
|
+
columns?: string[];
|
|
164
|
+
} | {
|
|
165
|
+
kind: 'text';
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export declare function validateSemaphorAnalyticsIntent(intent: SemaphorAnalyticsIntent): SemaphorValidationResult;
|
|
169
|
+
|
|
170
|
+
export declare function validateSemaphorDashboardIntent(intent: SemaphorDashboardIntent): SemaphorValidationResult;
|
|
171
|
+
|
|
172
|
+
export { }
|
|
@@ -739,10 +739,18 @@ export declare type DashboardPlanFilterInput = {
|
|
|
739
739
|
id: string;
|
|
740
740
|
label: string;
|
|
741
741
|
variableName: string;
|
|
742
|
+
scope?: DashboardInputScope;
|
|
742
743
|
filter: TFilter;
|
|
743
744
|
defaultValue?: unknown;
|
|
744
745
|
};
|
|
745
746
|
|
|
747
|
+
export declare type DashboardPlanFromProtocolResult = {
|
|
748
|
+
plan: DashboardPlan;
|
|
749
|
+
warnings: DashboardPlanWarning[];
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
export declare function dashboardPlanFromSemaphorDashboardIntent(intent: SemaphorDashboardIntent): DashboardPlanFromProtocolResult;
|
|
753
|
+
|
|
746
754
|
export declare type DashboardPlanSheet = {
|
|
747
755
|
id: string;
|
|
748
756
|
title: string;
|
|
@@ -1751,6 +1759,159 @@ declare type SelectedEntities = SelectedEntity[];
|
|
|
1751
1759
|
|
|
1752
1760
|
declare type SelectedEntity = DatabaseEntityReference | DataModelEntityReference | DatasetEntityReference | FileEntityReference;
|
|
1753
1761
|
|
|
1762
|
+
declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
|
|
1763
|
+
|
|
1764
|
+
declare type SemaphorDashboardIntent = {
|
|
1765
|
+
version: SemaphorProtocolVersion;
|
|
1766
|
+
kind: 'dashboard';
|
|
1767
|
+
title: string;
|
|
1768
|
+
description?: string;
|
|
1769
|
+
inputs?: SemaphorInputSpec[];
|
|
1770
|
+
sections: SemaphorDashboardSectionIntent[];
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1773
|
+
declare type SemaphorDashboardSectionIntent = {
|
|
1774
|
+
id?: string;
|
|
1775
|
+
title: string;
|
|
1776
|
+
description?: string;
|
|
1777
|
+
views: SemaphorDashboardViewIntent[];
|
|
1778
|
+
};
|
|
1779
|
+
|
|
1780
|
+
declare type SemaphorDashboardViewIntent = {
|
|
1781
|
+
id?: string;
|
|
1782
|
+
title: string;
|
|
1783
|
+
description?: string;
|
|
1784
|
+
presentation: SemaphorViewPresentation;
|
|
1785
|
+
analytics?: SemaphorAnalyticsIntent;
|
|
1786
|
+
text?: string;
|
|
1787
|
+
};
|
|
1788
|
+
|
|
1789
|
+
declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'snowflake' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
|
|
1790
|
+
|
|
1791
|
+
declare type SemaphorFieldRef = {
|
|
1792
|
+
name: string;
|
|
1793
|
+
label?: string;
|
|
1794
|
+
role?: 'dimension' | 'measure' | 'date' | 'id' | 'unknown';
|
|
1795
|
+
dataType?: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'unknown';
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1798
|
+
declare type SemaphorInputBinding = {
|
|
1799
|
+
inputId: string;
|
|
1800
|
+
field?: SemaphorFieldRef;
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'between' | '>' | '>=' | '<' | '<=';
|
|
1804
|
+
|
|
1805
|
+
declare type SemaphorInputOptionsIntent = {
|
|
1806
|
+
kind: 'inputOptions';
|
|
1807
|
+
source: SemaphorSourceRef;
|
|
1808
|
+
field: SemaphorFieldRef;
|
|
1809
|
+
search?: string;
|
|
1810
|
+
limit?: number;
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1813
|
+
declare type SemaphorInputScope = {
|
|
1814
|
+
level: 'dashboard';
|
|
1815
|
+
excludeViewIds?: string[];
|
|
1816
|
+
} | {
|
|
1817
|
+
level: 'section';
|
|
1818
|
+
sectionId: string;
|
|
1819
|
+
excludeViewIds?: string[];
|
|
1820
|
+
} | {
|
|
1821
|
+
level: 'view';
|
|
1822
|
+
viewIds: string[];
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1825
|
+
declare type SemaphorInputSpec = {
|
|
1826
|
+
id: string;
|
|
1827
|
+
kind: 'filter' | 'control';
|
|
1828
|
+
label: string;
|
|
1829
|
+
field: SemaphorFieldRef;
|
|
1830
|
+
operator?: SemaphorInputOperator;
|
|
1831
|
+
multi?: boolean;
|
|
1832
|
+
defaultValue?: unknown;
|
|
1833
|
+
source?: SemaphorSourceRef;
|
|
1834
|
+
scope?: SemaphorInputScope;
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
declare type SemaphorMetricIntent = {
|
|
1838
|
+
kind: 'metric';
|
|
1839
|
+
source: SemaphorSourceRef;
|
|
1840
|
+
metric: string;
|
|
1841
|
+
label?: string;
|
|
1842
|
+
dateField?: SemaphorFieldRef;
|
|
1843
|
+
comparison?: {
|
|
1844
|
+
kind: 'previous_period' | 'previous_year' | 'target';
|
|
1845
|
+
targetValue?: number;
|
|
1846
|
+
};
|
|
1847
|
+
inputs?: SemaphorInputBinding[];
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1850
|
+
declare type SemaphorProtocolVersion = 1;
|
|
1851
|
+
|
|
1852
|
+
declare type SemaphorRecordsIntent = {
|
|
1853
|
+
kind: 'records';
|
|
1854
|
+
source: SemaphorSourceRef;
|
|
1855
|
+
fields: SemaphorFieldRef[];
|
|
1856
|
+
measures?: string[];
|
|
1857
|
+
dateField?: SemaphorFieldRef;
|
|
1858
|
+
timeGrain?: SemaphorTimeGrain;
|
|
1859
|
+
limit?: number;
|
|
1860
|
+
orderBy?: {
|
|
1861
|
+
field: string;
|
|
1862
|
+
direction: 'asc' | 'desc';
|
|
1863
|
+
};
|
|
1864
|
+
inputs?: SemaphorInputBinding[];
|
|
1865
|
+
};
|
|
1866
|
+
|
|
1867
|
+
declare type SemaphorSourceRef = {
|
|
1868
|
+
kind: 'semantic';
|
|
1869
|
+
domainId: string;
|
|
1870
|
+
datasetName: string;
|
|
1871
|
+
datasetId?: string;
|
|
1872
|
+
label?: string;
|
|
1873
|
+
connectionId?: string;
|
|
1874
|
+
} | {
|
|
1875
|
+
kind: 'physical';
|
|
1876
|
+
connectionId: string;
|
|
1877
|
+
tableName: string;
|
|
1878
|
+
databaseName?: string;
|
|
1879
|
+
schemaName?: string;
|
|
1880
|
+
label?: string;
|
|
1881
|
+
dialect?: SemaphorDialect;
|
|
1882
|
+
} | {
|
|
1883
|
+
kind: 'sql';
|
|
1884
|
+
connectionId: string;
|
|
1885
|
+
sql: string;
|
|
1886
|
+
dialect?: SemaphorDialect;
|
|
1887
|
+
label?: string;
|
|
1888
|
+
};
|
|
1889
|
+
|
|
1890
|
+
declare type SemaphorSqlIntent = {
|
|
1891
|
+
kind: 'sql';
|
|
1892
|
+
source: Extract<SemaphorSourceRef, {
|
|
1893
|
+
kind: 'sql';
|
|
1894
|
+
}>;
|
|
1895
|
+
fields?: SemaphorFieldRef[];
|
|
1896
|
+
inputs?: SemaphorInputBinding[];
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1900
|
+
|
|
1901
|
+
declare type SemaphorViewPresentation = {
|
|
1902
|
+
kind: 'kpi';
|
|
1903
|
+
format?: 'number' | 'currency' | 'percent' | 'duration';
|
|
1904
|
+
} | {
|
|
1905
|
+
kind: 'lineChart' | 'barChart' | 'areaChart';
|
|
1906
|
+
x?: string;
|
|
1907
|
+
y?: string[];
|
|
1908
|
+
} | {
|
|
1909
|
+
kind: 'table';
|
|
1910
|
+
columns?: string[];
|
|
1911
|
+
} | {
|
|
1912
|
+
kind: 'text';
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1754
1915
|
declare interface SortByField extends Field {
|
|
1755
1916
|
role: 'sortby';
|
|
1756
1917
|
direction: 'asc' | 'desc';
|
package/dist/types/main.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.325",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -57,6 +57,11 @@
|
|
|
57
57
|
"import": "./dist/dashboard-authoring/index.js",
|
|
58
58
|
"require": "./dist/dashboard-authoring/index.cjs"
|
|
59
59
|
},
|
|
60
|
+
"./analytics-protocol": {
|
|
61
|
+
"types": "./dist/types/analytics-protocol.d.ts",
|
|
62
|
+
"import": "./dist/analytics-protocol/index.js",
|
|
63
|
+
"require": "./dist/analytics-protocol/index.cjs"
|
|
64
|
+
},
|
|
60
65
|
"./appearance": {
|
|
61
66
|
"types": "./dist/types/appearance.d.ts",
|
|
62
67
|
"import": "./dist/appearance/index.js",
|