react-semaphor 0.1.560 → 0.1.562

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/analytics-protocol/index.js +450 -423
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-BaIQrEzX.js} +221 -188
  7. package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-R_yT8xH4.js} +116 -117
  8. package/dist/chunks/bookmark-impact-D4Kl4amw.js +75 -0
  9. package/dist/chunks/bookmark-state-CWeoGbrx.js +743 -0
  10. package/dist/chunks/{braces-Da41xfUd.js → braces-DzgoQC64.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-D1EUXzaR.js} +550 -425
  12. package/dist/chunks/{context-BgPDzLHZ.js → context-R31TSL5V.js} +1 -1
  13. package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-Bp1y5oun.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-S5FB3aUW.js} +236 -236
  15. package/dist/chunks/dashboard-controls-CfC_6Ztn.js +2277 -0
  16. package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-gYZT7ZQY.js} +5 -5
  17. package/dist/chunks/dates-DFY7Gfss.js +91 -0
  18. package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-u7OI_g8Q.js} +7119 -7198
  19. package/dist/chunks/filter-reach-copy-CvV7W5dd.js +3965 -0
  20. package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-CPwFkrMz.js} +11 -10
  21. package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +16722 -0
  22. package/dist/chunks/{index-DtHidOPV.js → index-CNGkfUp4.js} +269 -264
  23. package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-BM65viQh.js} +1 -1
  24. package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BoeLBfL3.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-hEucouWM.js} +4 -4
  26. package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CCh9JjP1.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-DsLdFdSa.js} +365 -349
  29. package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-Bnso1cm1.js} +6 -6
  30. package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-T1cRkh3m.js} +1 -1
  31. package/dist/chunks/{palette-Bsh376zO.js → palette-p1XSJFgB.js} +1 -1
  32. package/dist/chunks/pivot-result-contract-expectations-B53jqszr.js +56 -0
  33. package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
  34. package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
  35. package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
  36. package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-BITkNSDa.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +8214 -0
  38. package/dist/chunks/{save-B5EAsgQF.js → save-CHV1B1fL.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-DFYBrE6O.js} +93 -94
  40. package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
  41. package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-Bz5aywT4.js} +1 -1
  42. package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-Cfuafnem.js} +38188 -40344
  43. package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
  44. package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-DdDVXFB8.js} +6 -6
  45. package/dist/chunks/{switch-ByxH4M7t.js → switch-BW4yXSYs.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-bSXxGn-v.js} +1 -1
  47. package/dist/chunks/temporal-input-presentation-sk9gqLi6.js +4960 -0
  48. package/dist/chunks/{token-types-CQtXUVMy.js → token-types-BUK06hU2.js} +1 -1
  49. package/dist/chunks/{upload-wbR-NVzq.js → upload-BnmuyPqW.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
  51. package/dist/chunks/{validators-CXTneCA4.js → validators-BIM0FE31.js} +774 -895
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2477 -2685
  54. package/dist/data-app-sdk/index.js +30 -30
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +25 -25
  57. package/dist/format-utils/index.js +274 -267
  58. package/dist/index.js +59 -59
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  63. package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
  64. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  65. package/dist/types/components/index.d.ts +1 -2
  66. package/dist/types/components/surfboard/filter/types.d.ts +3 -1
  67. package/dist/types/index.js +50 -51
  68. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  69. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
  70. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
  71. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
  72. package/dist/types/lib/print/print-inputs.d.ts +2 -1
  73. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
  74. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
  75. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  76. package/dist/types/lib/stores/editor-store.d.ts +9 -1
  77. package/dist/types/lib/stores/table-actions.d.ts +0 -2
  78. package/dist/types/lib/types/common-types.d.ts +6 -0
  79. package/dist/types/lib/types/explorer-types.d.ts +7 -1
  80. package/dist/types/lib/types/interaction-types.d.ts +3 -1
  81. package/dist/types/lib/types/token-types.d.ts +0 -1
  82. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +13 -1
  83. package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
  84. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  85. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
  86. package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
  87. package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
  88. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
  89. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  90. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +76 -0
  91. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  92. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  93. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  94. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  95. package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
  96. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  97. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  98. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  99. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +17 -0
  100. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +117 -0
  101. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  102. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  103. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  104. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +51 -0
  105. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +30 -0
  106. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  107. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  108. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3402 -4313
  109. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +49 -8
  110. package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
  111. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
  112. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +52 -2
  113. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
  114. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
  115. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
  116. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +20 -20
  117. package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
  118. package/dist/types/shared/dashboard-authoring/index.d.ts +11 -6
  119. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  120. package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
  121. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
  122. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
  123. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
  124. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
  125. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
  126. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
  127. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
  128. package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
  129. package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
  130. package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
  131. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
  132. package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
  133. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
  134. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
  135. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +73 -3
  136. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -3
  137. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
  138. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
  139. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
  140. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  141. package/dist/types/shared/format-utils/document-print.d.ts +82 -0
  142. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
  143. package/dist/types/shared/format-utils/index.d.ts +1 -0
  144. package/dist/types/shared/format-utils/raw-temporal.d.ts +18 -7
  145. package/dist/types/shared/temporal/index.d.ts +1 -0
  146. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
  147. package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
  148. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
  149. package/package.json +2 -2
  150. package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
  151. package/dist/chunks/custom-visual-inputs-Dz-enUNR.js +0 -292
  152. package/dist/chunks/dashboard-controls-Bi7fyG-4.js +0 -2339
  153. package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
  154. package/dist/chunks/filter-reach-copy-BF4w4kI2.js +0 -3738
  155. package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
  156. package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
  157. package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
  158. package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
  159. package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
  160. package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
  161. package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
  162. package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
  163. package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
  164. package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
  165. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
  166. package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
  167. package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
  168. package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
@@ -1,38 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { DashboardPlan, DashboardSuggestion } from '../../shared/dashboard-authoring/index.js';
3
- import { DashboardAuthoringSource, DashboardPlanRequest, DashboardSuggestionRequest } from '../../lib/hooks/use-dashboard-authoring.js';
4
- import { DashboardCreateBlankData } from './dashboard-create-template.js';
5
- interface AiDashboardCreateDialogProps {
6
- open: boolean;
7
- onOpenChange: (open: boolean) => void;
8
- onCreateBlank: (data: DashboardCreateBlankData) => void | Promise<void>;
9
- onAiCreateSuccess: (result: any) => void;
10
- isCreatingBlank: boolean;
11
- aiAuthoringEnabled?: boolean;
12
- initialDomainId?: string;
13
- }
14
- type AsyncMutation<TInput, TOutput> = {
15
- isPending?: boolean;
16
- mutateAsync: (input: TInput) => Promise<TOutput>;
17
- };
18
- export interface DashboardCreateDialogBaseProps {
19
- open: boolean;
20
- onOpenChange: (open: boolean) => void;
21
- onCreateBlank: (data: DashboardCreateBlankData) => void | Promise<void>;
22
- onAiCreateSuccess: (result: any) => void;
23
- isCreatingBlank: boolean;
24
- sources: DashboardAuthoringSource[];
25
- sourcesLoading?: boolean;
26
- suggestDashboards: (input: DashboardSuggestionRequest) => Promise<DashboardSuggestion[]>;
27
- planDashboard: AsyncMutation<DashboardPlanRequest, DashboardPlan>;
28
- createDashboardFromPlan: AsyncMutation<DashboardPlan, any>;
29
- settingsSlot?: ReactNode;
30
- blankDescription?: string;
31
- description?: string;
32
- canCreate?: boolean;
33
- aiAuthoringEnabled?: boolean;
34
- initialDomainId?: string;
35
- }
36
- export declare function DashboardCreateDialogBase({ open, onOpenChange, onCreateBlank, onAiCreateSuccess, isCreatingBlank, sources, sourcesLoading, suggestDashboards, planDashboard, createDashboardFromPlan, settingsSlot, blankDescription, description, canCreate, aiAuthoringEnabled, initialDomainId, }: DashboardCreateDialogBaseProps): import("react").JSX.Element;
37
- export declare function AiDashboardCreateDialog({ open, onOpenChange, onCreateBlank, onAiCreateSuccess, isCreatingBlank, aiAuthoringEnabled, initialDomainId, }: AiDashboardCreateDialogProps): import("react").JSX.Element;
38
- export {};
@@ -1,10 +0,0 @@
1
- import { DashboardAuthoringSource } from '../../lib/hooks/use-dashboard-authoring.js';
2
- import { TDashboard } from '../../lib/types/index.js';
3
- import { DataSource } from '../../lib/types/explorer-types.js';
4
- export type DashboardCreateBlankData = {
5
- title: string;
6
- description: string;
7
- dataset?: DashboardAuthoringSource;
8
- };
9
- export declare function buildDataSourceFromAuthoringSource(source: DashboardAuthoringSource | undefined): DataSource | undefined;
10
- export declare function buildDashboardCreateTemplate(data: DashboardCreateBlankData): TDashboard | undefined;
@@ -1,49 +0,0 @@
1
- import { DashboardPlan, DashboardSuggestion } from '../../shared/dashboard-authoring/index.js';
2
- import { SemaphorSourceRef } from '../../shared/analytics-protocol/index.js';
3
- type DashboardAuthoringDatasetRef = Extract<SemaphorSourceRef, {
4
- kind: 'semantic' | 'physical';
5
- }>;
6
- type DashboardCreateSharing = {
7
- visibility: 'private' | 'org_users' | 'tenant_all' | 'tenant_user';
8
- shareRole?: 'VIEWER' | 'EDITOR' | 'CONTRIBUTOR';
9
- tenantContext?: {
10
- tenantId: string;
11
- tenantUserId?: string;
12
- };
13
- };
14
- export type DashboardAuthoringSource = DashboardAuthoringDatasetRef & {
15
- domainName?: string;
16
- domainLabel?: string;
17
- description?: string;
18
- connectionType?: string;
19
- database?: string;
20
- schema?: string;
21
- table?: string;
22
- primaryDateField?: string;
23
- };
24
- export type DashboardSuggestionRequest = {
25
- dataset: SemaphorSourceRef;
26
- instruction?: string;
27
- } | {
28
- domainId: string;
29
- datasetNames?: string[];
30
- instruction?: string;
31
- };
32
- export type DashboardPlanRequest = {
33
- prompt: string;
34
- dataset: SemaphorSourceRef;
35
- } | {
36
- prompt: string;
37
- domainId: string;
38
- datasetNames?: string[];
39
- };
40
- export declare function useDashboardAuthoringSources(open?: boolean): import('@tanstack/react-query').UseQueryResult<DashboardAuthoringSource[], Error>;
41
- export declare function useDashboardAuthoring(): {
42
- planDashboard: import('@tanstack/react-query').UseMutationResult<DashboardPlan, Error, DashboardPlanRequest, unknown>;
43
- suggestDashboards: import('@tanstack/react-query').UseMutationResult<DashboardSuggestion[], Error, DashboardSuggestionRequest, unknown>;
44
- createDashboardFromPlan: import('@tanstack/react-query').UseMutationResult<any, Error, DashboardPlan | {
45
- plan: DashboardPlan;
46
- sharing?: DashboardCreateSharing;
47
- }, unknown>;
48
- };
49
- export {};
@@ -1,6 +0,0 @@
1
- import { DashboardCompileResult, DashboardPlan, GeneratedDashboardCardArtifact } from './contracts.js';
2
- export declare function compileDashboardFromPlan(input: {
3
- dashboardId: string;
4
- plan: DashboardPlan;
5
- cardArtifacts: GeneratedDashboardCardArtifact[];
6
- }): DashboardCompileResult;
@@ -1,106 +0,0 @@
1
- import { DashboardInput, DashboardInputScope, DashboardInputValues, TCard, TDashboard, TFilter } from '../../lib/types/index.js';
2
- import { TChartType } from '../../lib/charts/types.js';
3
- import { Field } from '../../lib/types/explorer-types.js';
4
- import { SemaphorAnalyticsIntent, SemaphorSourceRef } from '../analytics-protocol/index.js';
5
- export declare const DASHBOARD_AUTHORING_MAX_GENERATED_CARDS = 15;
6
- export type DashboardCardSizeIntent = 'kpi' | 'chart' | 'table' | 'text';
7
- export type DashboardPlanCard = {
8
- id: string;
9
- frameId: string;
10
- title: string;
11
- description?: string;
12
- type: Exclude<TChartType, 'custom'>;
13
- role: DashboardCardSizeIntent;
14
- priority: number;
15
- section?: string;
16
- analyticsIntent?: SemaphorAnalyticsIntent;
17
- text?: string;
18
- /** Canonical click-to-filter settings. Legacy interactionConfig payloads are not accepted. */
19
- clickToFilter?: TCard['clickToFilter'];
20
- /** Whether this card accepts selections from other cards. */
21
- respondsToSelections?: TCard['respondsToSelections'];
22
- };
23
- export type DashboardPlanSheet = {
24
- id: string;
25
- title: string;
26
- description?: string;
27
- kind: 'dashboard';
28
- cards: DashboardPlanCard[];
29
- };
30
- export type DashboardPlanFilterInput = {
31
- id: string;
32
- label: string;
33
- variableName: string;
34
- scope?: DashboardInputScope;
35
- filter: TFilter;
36
- defaultValue?: unknown;
37
- };
38
- export type DashboardPlanCalculatedField = {
39
- id: string;
40
- name: string;
41
- scope: 'card' | 'sheet' | 'dashboard' | 'domain';
42
- expression?: string;
43
- field?: Field;
44
- targetCardId?: string;
45
- reuseOnly?: boolean;
46
- };
47
- export type DashboardPlanWarning = {
48
- code: string;
49
- message: string;
50
- cardId?: string;
51
- };
52
- export type DashboardPlan = {
53
- version: 1;
54
- id: string;
55
- title: string;
56
- description?: string;
57
- datasets: SemaphorSourceRef[];
58
- sheets: DashboardPlanSheet[];
59
- filterInputs?: DashboardPlanFilterInput[];
60
- calculatedFields?: DashboardPlanCalculatedField[];
61
- warnings?: DashboardPlanWarning[];
62
- unresolvedRequests?: string[];
63
- deferredSuggestions?: string[];
64
- };
65
- export type DashboardSuggestionPreviewKind = 'kpi' | 'line' | 'bar' | 'donut' | 'table';
66
- export type DashboardSuggestion = {
67
- id: string;
68
- title: string;
69
- description: string;
70
- preview: DashboardSuggestionPreviewKind[];
71
- cardCount: number;
72
- filterCount: number;
73
- prompt: string;
74
- datasets?: Array<{
75
- name: string;
76
- label?: string;
77
- }>;
78
- relationshipHints?: string[];
79
- };
80
- export type GeneratedDashboardCardArtifact = {
81
- planCardId: string;
82
- frameId: string;
83
- card: TCard;
84
- queryValidated?: boolean;
85
- warnings?: DashboardPlanWarning[];
86
- };
87
- export type DashboardAuthoringIdFactory = {
88
- dashboardId?: () => string;
89
- sheetId?: () => string;
90
- frameId: (seed?: string) => string;
91
- cardId: (seed?: string) => string;
92
- };
93
- export type DashboardCompileResult = {
94
- dashboard: TDashboard;
95
- warnings: DashboardPlanWarning[];
96
- skippedOperations: DashboardPlanWarning[];
97
- };
98
- export type DashboardAuthoringValidationResult = {
99
- ok: boolean;
100
- errors: DashboardPlanWarning[];
101
- warnings: DashboardPlanWarning[];
102
- };
103
- export type CompiledDashboardInputDefaults = {
104
- inputs: DashboardInput[];
105
- defaultInputValues?: DashboardInputValues;
106
- };
@@ -1,7 +0,0 @@
1
- import { SemaphorDashboardIntent } from '../analytics-protocol/index.js';
2
- import { DashboardPlan, DashboardPlanWarning } from './contracts.js';
3
- export type DashboardPlanFromProtocolResult = {
4
- plan: DashboardPlan;
5
- warnings: DashboardPlanWarning[];
6
- };
7
- export declare function dashboardPlanFromSemaphorDashboardIntent(intent: SemaphorDashboardIntent): DashboardPlanFromProtocolResult;
@@ -1,34 +0,0 @@
1
- import { SemaphorFieldRef, SemaphorSourceRef } from '../analytics-protocol/index.js';
2
- import { DashboardPlanCard } from './contracts.js';
3
- export type DashboardAuthoringDatasetScopeIssue = 'invalid_dataset_count' | 'invalid_multi_dataset_scope';
4
- export type DashboardAuthoringDatasetScopeResult = {
5
- ok: true;
6
- } | {
7
- ok: false;
8
- issue: DashboardAuthoringDatasetScopeIssue;
9
- };
10
- export type MaterializableDashboardAuthoringSource = Extract<SemaphorSourceRef, {
11
- kind: 'semantic' | 'physical';
12
- }>;
13
- export declare function isSemaphorSourceRef(value: unknown): value is SemaphorSourceRef;
14
- export declare function isMaterializableDashboardAuthoringSource(value: unknown): value is MaterializableDashboardAuthoringSource;
15
- export declare function dashboardAuthoringSourceKey(source: SemaphorSourceRef): string;
16
- export declare function dashboardAuthoringSourcesReferToSameDataset(left: SemaphorSourceRef, right: SemaphorSourceRef): boolean;
17
- export declare function preferDashboardAuthoringSourceMetadata(current: SemaphorSourceRef, next: SemaphorSourceRef): SemaphorSourceRef;
18
- export declare function mergeDashboardAuthoringSources(sources: readonly SemaphorSourceRef[]): SemaphorSourceRef[];
19
- export declare function preferredDashboardAuthoringSource(sources: readonly SemaphorSourceRef[]): SemaphorSourceRef | undefined;
20
- export declare function dashboardAuthoringSourceFromField(field: SemaphorFieldRef | undefined, fallback?: SemaphorSourceRef): MaterializableDashboardAuthoringSource | undefined;
21
- export declare function resolveDashboardAuthoringSource({ explicitSource, field, defaultSource, fallbackSources, }: {
22
- explicitSource?: unknown;
23
- field?: SemaphorFieldRef;
24
- defaultSource?: SemaphorSourceRef;
25
- fallbackSources?: readonly SemaphorSourceRef[];
26
- }): MaterializableDashboardAuthoringSource | undefined;
27
- export declare function dashboardAuthoringFieldsReferToSameTarget(left: SemaphorFieldRef | undefined, right: SemaphorFieldRef | undefined): boolean;
28
- export declare function getDashboardAuthoringCardSource(card: Pick<DashboardPlanCard, 'analyticsIntent'>): SemaphorSourceRef | undefined;
29
- export declare function validateDashboardAuthoringDatasetScope({ datasets, requireAtLeastOne, }: {
30
- datasets: readonly unknown[];
31
- requireAtLeastOne: boolean;
32
- }): DashboardAuthoringDatasetScopeResult;
33
- export declare function dashboardAuthoringDatasetMatchesSource(dataset: unknown, source: SemaphorSourceRef | undefined): boolean;
34
- export declare function findDashboardAuthoringDatasetForSource(datasets: readonly SemaphorSourceRef[], source: SemaphorSourceRef | undefined): SemaphorSourceRef | undefined;
@@ -1,2 +0,0 @@
1
- import { DashboardAuthoringValidationResult, DashboardPlan } from './contracts.js';
2
- export declare function validateDashboardPlan(plan: DashboardPlan): DashboardAuthoringValidationResult;