react-semaphor 0.1.525 → 0.1.527

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 (196) hide show
  1. package/DATA_APP_SDK.md +5 -1
  2. package/dist/analytics-protocol/index.js +1179 -296
  3. package/dist/brand-studio/index.js +31 -31
  4. package/dist/briefings/index.js +50 -49
  5. package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-DEhjPSr-.js} +77 -76
  6. package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-BlIbwkuD.js} +62 -59
  7. package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
  8. package/dist/chunks/dashboard-JNHR0_cZ.js +14 -0
  9. package/dist/chunks/{dashboard-briefing-launcher-BilVIEyw.js → dashboard-briefing-launcher-D9pFByPh.js} +274 -267
  10. package/dist/chunks/{dashboard-controls-DyLPcvCK.js → dashboard-controls-CJI5ZWMq.js} +740 -692
  11. package/dist/chunks/dashboard-json-DLdrFry-.js +65 -0
  12. package/dist/chunks/{edit-dashboard-visual-DtmKNNdE.js → edit-dashboard-visual-D5LjWle1.js} +6760 -6728
  13. package/dist/chunks/editor-action-buttons-G91NQKxU.js +2070 -0
  14. package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-DeVQLIsP.js} +19 -19
  15. package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
  16. package/dist/chunks/{index-ON7Gpvcv.js → index-BvJOYbNv.js} +760 -750
  17. package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
  18. package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DY45yiUM.js} +7 -6
  19. package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-BypfLZsK.js} +36 -36
  20. package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
  21. package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-BoKU3MzZ.js} +655 -511
  22. package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
  23. package/dist/chunks/matrix-operation-contract-BV02rLhu.js +809 -0
  24. package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
  25. package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
  26. package/dist/chunks/pivot-header-presentation-D5v8uyjj.js +618 -0
  27. package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-BWrPhlGT.js} +259 -204
  29. package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
  30. package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
  31. package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
  32. package/dist/chunks/report-preferences-dialog-D3hxu4sE.js +1231 -0
  33. package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
  34. package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-C7Um5XN-.js} +3 -3
  35. package/dist/chunks/semantic-format-BjBMOSoo.js +192 -0
  36. package/dist/chunks/{index-DYOaHuLS.js → semaphor-ready-indicator-D46I_4g7.js} +145070 -146854
  37. package/dist/chunks/slider-B6LELqx6.js +876 -0
  38. package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
  39. package/dist/chunks/{switch-CWPcwAZ4.js → switch-_7uBAbYx.js} +7950 -8545
  40. package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
  41. package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
  42. package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
  43. package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
  44. package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
  45. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  46. package/dist/dashboard/index.js +1 -1
  47. package/dist/dashboard-authoring/index.js +138 -137
  48. package/dist/data-app-sdk/index.js +30 -29
  49. package/dist/data-app-sdk-adapters/index.js +23 -22
  50. package/dist/data-app-sdk-validation/index.js +27 -26
  51. package/dist/format-utils/index.js +247 -329
  52. package/dist/index.js +435 -246
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +4 -5
  56. package/dist/types/briefings/index.d.ts +3 -0
  57. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  58. package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
  59. package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
  60. package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
  61. package/dist/types/components/editor/editor.d.ts +1 -1
  62. package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
  63. package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
  64. package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
  65. package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
  66. package/dist/types/components/providers/theme-provider.d.ts +1 -1
  67. package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
  68. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  69. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
  70. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  71. package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
  72. package/dist/types/components/surfboard/filter/types.d.ts +8 -29
  73. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
  74. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
  75. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
  76. package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
  77. package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
  78. package/dist/types/components/visual/column-display-utils.d.ts +1 -1
  79. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  80. package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
  81. package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
  82. package/dist/types/components/visual/settings/color-format.d.ts +1 -1
  83. package/dist/types/components/visual/visual-utils.d.ts +1 -1
  84. package/dist/types/index.js +5 -5
  85. package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
  86. package/dist/types/lib/api/exports-api.d.ts +3 -0
  87. package/dist/types/lib/csv-download.d.ts +9 -0
  88. package/dist/types/lib/csv-encoding-options.d.ts +6 -0
  89. package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
  91. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
  92. package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
  93. package/dist/types/lib/export-utils.d.ts +17 -15
  94. package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
  95. package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
  96. package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
  97. package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
  98. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
  99. package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
  100. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  101. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
  102. package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
  103. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
  104. package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
  105. package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
  106. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
  107. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
  108. package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
  109. package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
  110. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  111. package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
  112. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
  113. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
  114. package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
  115. package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
  116. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  117. package/dist/types/lib/stores/table-actions.d.ts +2 -1
  118. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
  119. package/dist/types/lib/types/common-types.d.ts +5 -0
  120. package/dist/types/lib/types/explorer-types.d.ts +14 -0
  121. package/dist/types/lib/types/token-types.d.ts +0 -13
  122. package/dist/types/lib/utils/card-definition.d.ts +1 -1
  123. package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
  124. package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
  125. package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
  126. package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
  127. package/dist/types/lib/utils.d.ts +0 -2
  128. package/dist/types/shared/analytics-protocol/contracts.d.ts +10 -7
  129. package/dist/types/shared/analytics-protocol/index.d.ts +12 -1
  130. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
  131. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  132. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  133. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +51 -5
  134. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
  135. package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
  136. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
  137. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
  138. package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
  139. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
  140. package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
  141. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  142. package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
  143. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
  144. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
  145. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
  146. package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
  147. package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
  148. package/dist/types/shared/temporal/index.d.ts +5 -0
  149. package/dist/types/shared/temporal/relative-date.d.ts +21 -0
  150. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
  151. package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
  152. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
  153. package/package.json +2 -17
  154. package/src/data-app-sdk/README.md +6 -3
  155. package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
  156. package/dist/chunks/dashboard-json-QEoU-mx4.js +0 -75
  157. package/dist/chunks/editor-action-buttons-B9VRW3Bh.js +0 -2019
  158. package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
  159. package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
  160. package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
  161. package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
  162. package/dist/chunks/report-preferences-dialog-BLaFmlE2.js +0 -723
  163. package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
  164. package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
  165. package/dist/data-app-builder/index.js +0 -3666
  166. package/dist/data-app-builder-browser-runtime/index.js +0 -8
  167. package/dist/data-app-codegen/index.js +0 -22
  168. package/dist/data-app-codegen-node/index.js +0 -1807
  169. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
  170. package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
  171. package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
  172. package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
  173. package/dist/types/data-app-builder/constants.d.ts +0 -14
  174. package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
  175. package/dist/types/data-app-builder/index.d.ts +0 -1
  176. package/dist/types/data-app-builder/lib/api.d.ts +0 -36
  177. package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
  178. package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
  179. package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
  180. package/dist/types/data-app-builder/types.d.ts +0 -558
  181. package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
  182. package/dist/types/data-app-builder.d.ts +0 -2
  183. package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
  184. package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
  185. package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
  186. package/dist/types/data-app-codegen/index.d.ts +0 -6
  187. package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
  188. package/dist/types/data-app-codegen/node.d.ts +0 -2
  189. package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
  190. package/dist/types/data-app-codegen/validation.d.ts +0 -8
  191. package/dist/types/data-app-codegen-node.d.ts +0 -2
  192. package/dist/types/data-app-codegen.d.ts +0 -2
  193. package/dist/types/lib/encrypt-utils.d.ts +0 -9
  194. package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
  195. package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
  196. package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
@@ -1,8 +0,0 @@
1
- import { SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION, SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION, validateSemaphorDataAppCodegenSummary } from '../shared/analytics-protocol/data-app-codegen-summary.js';
2
- export { SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION, SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION, validateSemaphorDataAppCodegenSummary, };
3
- export declare const CODEGEN_SUMMARY_SCHEMA_VERSION: "semaphor-data-app-codegen-summary/v1";
4
- export declare const CODEGEN_SUMMARY_VALIDATOR_VERSION: "semaphor-data-app-codegen-summary-validator/v2";
5
- export declare const GENERATED_CONTRACT_SCHEMA_VERSION = "semaphor-generated-data-app-contract/v1";
6
- export declare const CONTRACT_MANIFEST_SCHEMA_VERSION = "semaphor-generated-data-app-contract-manifest/v1";
7
- export declare function validateCodegenSummary(value: unknown): string[];
8
- export declare function assertValidCodegenSummary(value: unknown): void;
@@ -1,2 +0,0 @@
1
- export * from './data-app-codegen/node.js'
2
- export {}
@@ -1,2 +0,0 @@
1
- export * from './data-app-codegen/index.js'
2
- export {}
@@ -1,9 +0,0 @@
1
- interface EncryptionResult {
2
- payload: string;
3
- }
4
- export declare function encryptWithJwtSalt(data: string, accessToken: string): Promise<EncryptionResult>;
5
- interface DecryptionResult {
6
- decryptedData: string;
7
- }
8
- export declare function decryptWithJwtSalt(encryptedData: string, accessToken: string): Promise<DecryptionResult>;
9
- export {};
@@ -1,418 +0,0 @@
1
- import { MatrixSpec } from './matrix-definition-contract.js';
2
- import { MatrixWindowRequest } from './matrix-window-contract.js';
3
- import { SemaphorAnalyticsFilter, SemaphorFieldRef, SemaphorInputOptionsIntent, SemaphorMetricIntent, SemaphorPaginationRequest, SemaphorRelationshipHint, SemaphorSourceRef, SemaphorSqlIntent, SemaphorTimeGrain, SemaphorTimeWindow } from './contracts.js';
4
- export declare const SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION: "semaphor-data-app-codegen-summary/v1";
5
- export declare const SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION: "semaphor-data-app-codegen-summary-validator/v2";
6
- export type SemaphorDataAppCodegenSummarySchemaVersion = typeof SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;
7
- export type SemaphorDataAppCodegenSummaryValidatorVersion = typeof SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;
8
- export type SemaphorDataAppCodegenQueryKind = 'metric' | 'records' | 'matrix' | 'analysis' | 'sql_fallback';
9
- export type SemaphorDataAppCodegenSdkBuilder = 'semaphor.metric' | 'semaphor.records' | 'semaphor.matrix' | 'semaphor.analysis' | 'semaphor.sql';
10
- export type SemaphorDataAppCodegenFieldRef = SemaphorFieldRef & {
11
- sourceKey?: string;
12
- };
13
- export type SemaphorDataAppCodegenSourceBearingFieldRef = SemaphorDataAppCodegenFieldRef & ({
14
- sourceKey: string;
15
- } | {
16
- source: SemaphorSourceRef;
17
- });
18
- export type SemaphorDataAppCodegenAnalyticsFilter = SemaphorAnalyticsFilter & {
19
- field: SemaphorDataAppCodegenFieldRef;
20
- };
21
- export type SemaphorDataAppCodegenRecordsServerTotalsRequest = {
22
- mode: 'server';
23
- measures: SemaphorDataAppCodegenSourceBearingFieldRef[];
24
- };
25
- export type SemaphorDataAppCodegenSource = SemaphorSourceRef & {
26
- sourceKey?: string;
27
- datasetRole?: string;
28
- relationshipCount?: number;
29
- datasetShape?: 'event' | 'daily_snapshot' | 'latest_snapshot' | 'entity_state' | 'dimension' | 'bridge' | 'unknown';
30
- dateSemantics?: {
31
- primaryDateField?: SemaphorDataAppCodegenFieldRef;
32
- primaryDateFieldSource?: 'authored' | 'single_candidate' | 'missing' | 'ambiguous' | 'authored_missing';
33
- defaultTimeGrain?: SemaphorMetricIntent['timeGrain'];
34
- defaultTimeWindow?: SemaphorMetricIntent['timeWindow'];
35
- snapshot?: {
36
- kind?: 'not_snapshot' | 'daily_snapshot' | 'latest_snapshot';
37
- selector?: 'not_needed' | 'latest_available';
38
- selectorSupported?: boolean;
39
- dateField?: SemaphorDataAppCodegenFieldRef;
40
- unsupportedReason?: string;
41
- };
42
- };
43
- };
44
- export type SemaphorDataAppRelationshipCandidateField = Pick<SemaphorDataAppCodegenFieldRef, 'name' | 'label' | 'role' | 'dataType'>;
45
- export type SemaphorDataAppRelationshipCandidateSource = {
46
- kind: 'semantic';
47
- domainId: string;
48
- datasetName: string;
49
- datasetId?: string;
50
- label?: string;
51
- sourceKey?: string;
52
- };
53
- export type SemaphorDataAppRelationshipCandidate = {
54
- source: SemaphorDataAppRelationshipCandidateSource;
55
- sourceFields: SemaphorDataAppRelationshipCandidateField[];
56
- target: SemaphorDataAppRelationshipCandidateSource;
57
- targetFields: SemaphorDataAppRelationshipCandidateField[];
58
- };
59
- export type SemaphorDataAppRawIdentifierFilterDiagnostic = {
60
- kind: 'raw_identifier_filter_options';
61
- inputId: string;
62
- inputLabel: string;
63
- optionSource: SemaphorDataAppRelationshipCandidateSource;
64
- optionField: SemaphorDataAppRelationshipCandidateField;
65
- missingEvidence: Array<'display_field' | 'relationship_display_path'>;
66
- };
67
- export type SemaphorDataAppCodegenMetricIntent = {
68
- source: SemaphorDataAppCodegenSource;
69
- id?: string;
70
- label?: string;
71
- measures: SemaphorDataAppCodegenFieldRef[];
72
- primaryMeasure?: SemaphorDataAppCodegenFieldRef;
73
- dateField?: SemaphorDataAppCodegenFieldRef;
74
- timeGrain?: SemaphorTimeGrain;
75
- dimensions?: SemaphorDataAppCodegenFieldRef[];
76
- comparison?: SemaphorMetricIntent['comparison'];
77
- orderBy?: {
78
- field: SemaphorDataAppCodegenFieldRef;
79
- direction: 'asc' | 'desc';
80
- };
81
- filters?: SemaphorDataAppCodegenAnalyticsFilter[];
82
- relationshipHint?: SemaphorRelationshipHint;
83
- limit?: number;
84
- derivedFields?: SemaphorMetricIntent['derivedFields'];
85
- };
86
- export type SemaphorDataAppCodegenAnalysisIntent = SemaphorDataAppCodegenMetricIntent & {
87
- analysis?: SemaphorMetricIntent['analysis'];
88
- timeWindow?: SemaphorTimeWindow;
89
- filters?: SemaphorDataAppCodegenAnalyticsFilter[];
90
- driverMode?: 'absolute_delta' | 'largest_negative' | 'largest_positive' | 'positive_and_negative' | 'all';
91
- includePopulation?: boolean;
92
- calendarContext?: {
93
- tz?: string;
94
- weekStart?: number;
95
- anchor?: 'now' | {
96
- iso: string;
97
- };
98
- };
99
- };
100
- export type SemaphorDataAppCodegenRecordsIntent = {
101
- source: SemaphorDataAppCodegenSource;
102
- id?: string;
103
- label?: string;
104
- fields: SemaphorDataAppCodegenFieldRef[];
105
- dateField?: SemaphorDataAppCodegenFieldRef;
106
- timeGrain?: SemaphorTimeGrain;
107
- timeWindow?: SemaphorTimeWindow;
108
- filters?: SemaphorDataAppCodegenAnalyticsFilter[];
109
- orderBy?: {
110
- field: SemaphorDataAppCodegenFieldRef;
111
- direction: 'asc' | 'desc';
112
- };
113
- relationshipHint?: SemaphorRelationshipHint;
114
- limit?: number;
115
- pagination?: SemaphorPaginationRequest;
116
- totals?: SemaphorDataAppCodegenRecordsServerTotalsRequest;
117
- derivedFields?: SemaphorMetricIntent['derivedFields'];
118
- };
119
- export type SemaphorDataAppCodegenInputOptionsIntent = Omit<SemaphorInputOptionsIntent, 'kind' | 'source' | 'labelField' | 'valueField' | 'searchField' | 'disambiguationFields'> & {
120
- source: SemaphorDataAppCodegenSource;
121
- labelField: SemaphorDataAppCodegenFieldRef;
122
- valueField: SemaphorDataAppCodegenFieldRef;
123
- searchField?: SemaphorDataAppCodegenFieldRef;
124
- disambiguationFields?: SemaphorDataAppCodegenFieldRef[];
125
- };
126
- export type SemaphorDataAppCodegenMatrixIntent = MatrixSpec & {
127
- id?: string;
128
- label?: string;
129
- matrixWindowRequest: MatrixWindowRequest;
130
- };
131
- export type SemaphorDataAppCodegenSqlIntent = Omit<SemaphorSqlIntent, 'kind' | 'fields'> & {
132
- fields?: SemaphorDataAppCodegenFieldRef[];
133
- };
134
- export type SemaphorDataAppCodegenSdkSpec = {
135
- builder: 'semaphor.metric';
136
- spec: SemaphorDataAppCodegenMetricIntent;
137
- } | {
138
- builder: 'semaphor.records';
139
- spec: SemaphorDataAppCodegenRecordsIntent;
140
- } | {
141
- builder: 'semaphor.matrix';
142
- spec: SemaphorDataAppCodegenMatrixIntent;
143
- } | {
144
- builder: 'semaphor.analysis';
145
- spec: SemaphorDataAppCodegenAnalysisIntent;
146
- } | {
147
- builder: 'semaphor.sql';
148
- spec: SemaphorDataAppCodegenSqlIntent;
149
- fallbackReason?: SemaphorDataAppCodegenFallbackReason;
150
- };
151
- export type SemaphorDataAppCodegenInputOptionQuery = {
152
- id?: string;
153
- builder: 'semaphor.inputOptions';
154
- source?: Extract<SemaphorSourceRef, {
155
- kind: 'semantic' | 'physical';
156
- }>;
157
- sourceKey?: string;
158
- valueFieldRef: SemaphorDataAppCodegenFieldRef;
159
- labelFieldRef: SemaphorDataAppCodegenFieldRef;
160
- filterFieldRef?: SemaphorDataAppCodegenFieldRef;
161
- population?: SemaphorInputOptionsIntent['population'];
162
- dependencies?: SemaphorInputOptionsIntent['dependencies'];
163
- limit?: number;
164
- spec?: SemaphorDataAppCodegenInputOptionsIntent;
165
- };
166
- export type SemaphorDataAppCodegenInputBinding = {
167
- appliesToViewIds: string[];
168
- fieldRef: SemaphorDataAppCodegenFieldRef;
169
- relationshipHint?: SemaphorRelationshipHint;
170
- relationshipsUsed?: SemaphorDataAppCodegenRelationshipUse[];
171
- };
172
- export type SemaphorDataAppCodegenInput = {
173
- id: string;
174
- label?: string;
175
- type?: string;
176
- serverSide?: boolean;
177
- fieldRef?: SemaphorDataAppCodegenFieldRef;
178
- optionQuery?: SemaphorDataAppCodegenInputOptionQuery;
179
- bindings?: SemaphorDataAppCodegenInputBinding[];
180
- appliesToViewIds: string[];
181
- relationshipHint?: SemaphorRelationshipHint;
182
- relationshipsUsed?: SemaphorDataAppCodegenRelationshipUse[];
183
- };
184
- export type SemaphorDataAppCodegenSourcePresentation = {
185
- sourceKeys?: string[];
186
- sourceLabels?: string[];
187
- };
188
- export type SemaphorDataAppCodegenVisualSpec = {
189
- visualType: 'kpi' | 'line_chart' | 'bar_chart' | 'stacked_bar_chart' | 'pie_chart' | 'donut_chart' | 'area_chart' | 'table' | 'matrix' | 'narrative' | 'text_block' | 'custom';
190
- title?: string;
191
- subtitle?: string;
192
- encoding?: {
193
- x?: string;
194
- y?: string;
195
- color?: string;
196
- size?: string;
197
- columns?: string[];
198
- value?: string;
199
- };
200
- text?: {
201
- body?: string;
202
- variant?: 'plain' | 'parameterized';
203
- };
204
- sort?: {
205
- field?: string;
206
- direction?: 'asc' | 'desc';
207
- execution?: 'server' | 'client_for_bounded_rows';
208
- };
209
- limit?: number;
210
- interactions?: string[];
211
- states?: string[];
212
- tableBehavior?: SemaphorDataAppCodegenTableBehavior;
213
- };
214
- export type SemaphorDataAppCodegenTableBehavior = {
215
- tableMode: 'bounded' | 'server_paginated' | 'server_windowed';
216
- height: {
217
- maxPx: number;
218
- scroll: 'vertical' | 'both';
219
- stickyHeader: boolean;
220
- };
221
- pagination: {
222
- mode: 'none' | 'server' | 'client_for_bounded_rows';
223
- pageSize?: number;
224
- readsFrom?: 'result.pagination';
225
- };
226
- sorting: {
227
- mode: 'server' | 'client_for_bounded_rows';
228
- defaultField?: string;
229
- defaultDirection?: 'asc' | 'desc';
230
- resetPageOnChange?: boolean;
231
- };
232
- totals: {
233
- mode: 'none';
234
- } | SemaphorDataAppCodegenRecordsServerTotalsRequest | {
235
- mode: 'local';
236
- label: 'Displayed rows' | 'Current page';
237
- };
238
- serverSideRequired: boolean;
239
- };
240
- export type SemaphorDataAppCodegenFallbackReason = {
241
- code?: string;
242
- message?: string;
243
- governedAlternativesTried?: string[];
244
- requiredModelingFix?: string;
245
- acceptedByUser?: boolean;
246
- };
247
- export type SemaphorDataAppCodegenRelationshipUse = {
248
- id?: string;
249
- fromSourceKey?: string;
250
- toSourceKey?: string;
251
- fields?: SemaphorDataAppCodegenFieldRef[];
252
- };
253
- export type SemaphorDataAppCodegenComputation = {
254
- kind: 'server_query';
255
- queryKind: SemaphorDataAppCodegenQueryKind;
256
- queryOwnership?: 'view_owned' | 'shared_query';
257
- sourceKeys?: string[];
258
- fieldNames?: string[];
259
- inputIds?: string[];
260
- tableExecution?: {
261
- mode?: 'bounded' | 'server_paginated' | 'server_windowed';
262
- initialLimit?: number;
263
- sort?: 'server' | 'client_for_bounded_rows';
264
- pagination?: 'offset' | 'cursor' | 'window' | 'not_needed';
265
- };
266
- reason?: string;
267
- } | {
268
- kind: 'derived';
269
- upstreamViewId: string;
270
- derivation: string;
271
- caveat?: string;
272
- } | {
273
- kind: 'presentation_only';
274
- reason?: string;
275
- } | {
276
- kind: 'unsupported';
277
- reason: string;
278
- suggestedModelingFix: string;
279
- };
280
- export type SemaphorDataAppCodegenExecutableView = {
281
- id: string;
282
- title?: string;
283
- purpose?: string;
284
- sourcePresentation?: SemaphorDataAppCodegenSourcePresentation;
285
- visual?: string;
286
- visualSpec?: SemaphorDataAppCodegenVisualSpec;
287
- queryKind: SemaphorDataAppCodegenQueryKind;
288
- sdkBuilder?: SemaphorDataAppCodegenSdkBuilder;
289
- sdkSpec: SemaphorDataAppCodegenSdkSpec;
290
- fields: SemaphorDataAppCodegenFieldRef[];
291
- metricBindingKeys?: string[];
292
- computation?: SemaphorDataAppCodegenComputation;
293
- uxExpectations?: string[];
294
- validation?: SemaphorDataAppCodegenViewValidation;
295
- };
296
- export type SemaphorDataAppCodegenPresentationView = {
297
- id: string;
298
- title?: string;
299
- purpose?: string;
300
- sourcePresentation?: SemaphorDataAppCodegenSourcePresentation;
301
- visual?: 'text_block' | 'narrative' | string;
302
- visualSpec?: SemaphorDataAppCodegenVisualSpec;
303
- queryKind?: never;
304
- sdkBuilder?: never;
305
- sdkSpec?: never;
306
- fields?: SemaphorDataAppCodegenFieldRef[];
307
- computation: Extract<SemaphorDataAppCodegenComputation, {
308
- kind: 'presentation_only' | 'unsupported' | 'derived';
309
- }>;
310
- uxExpectations?: string[];
311
- validation?: SemaphorDataAppCodegenViewValidation;
312
- };
313
- export type SemaphorDataAppCodegenViewValidation = {
314
- status?: 'ready' | 'partial' | 'blocked' | 'unsupported';
315
- evidence?: string[];
316
- warnings?: string[];
317
- };
318
- export type SemaphorDataAppCodegenView = SemaphorDataAppCodegenExecutableView | SemaphorDataAppCodegenPresentationView;
319
- export type SemaphorDataAppUnsupportedInsight = {
320
- title: string;
321
- requestedQuestion: string;
322
- reason: 'missing_measure' | 'missing_dimension' | 'missing_date' | 'missing_relationship' | 'missing_semantic_role' | 'missing_current_app_state' | 'raw_identifier_filter_options' | 'unsupported_change_intent' | 'ambiguous_field_grounding' | 'bounded_intent_unavailable' | 'invalid_bounded_intent_output' | 'latest_snapshot_selector_not_modeled' | 'unsupported_grain' | 'requires_sql_escape_hatch' | 'unsupported_sdk_capability';
323
- suggestedModelingFix: string;
324
- diagnostic?: SemaphorDataAppRawIdentifierFilterDiagnostic;
325
- relationshipCandidate?: SemaphorDataAppRelationshipCandidate;
326
- nextRepairAction?: {
327
- tool: 'semaphor_propose_semantic_model_change';
328
- reason: 'missing_relationship';
329
- };
330
- };
331
- export type SemaphorDataAppFilterContractBinding = {
332
- viewId: string;
333
- fieldRef: SemaphorDataAppCodegenFieldRef;
334
- relationshipHint?: SemaphorRelationshipHint;
335
- relationshipsUsed?: SemaphorDataAppCodegenRelationshipUse[];
336
- };
337
- export type SemaphorDataAppFilterContract = {
338
- inputId: string;
339
- label?: string;
340
- type?: string;
341
- serverSide?: boolean;
342
- fieldRef?: SemaphorDataAppCodegenFieldRef;
343
- optionQuery?: SemaphorDataAppCodegenInputOptionQuery;
344
- bindings: SemaphorDataAppFilterContractBinding[];
345
- appliesToViewIds: string[];
346
- notAppliedToViewIds: string[];
347
- };
348
- export type SemaphorDataAppImplementationChecklist = {
349
- schemaVersion?: string;
350
- requiredDevtools: {
351
- mountRootDevtools: boolean;
352
- providerDebugBridge?: string;
353
- panelPosition?: string;
354
- forbidden?: string[];
355
- };
356
- requiredInputOptions: SemaphorDataAppRequiredInputOption[];
357
- filterScopeByInput: SemaphorDataAppFilterScope[];
358
- bindingsByView: Record<string, SemaphorDataAppChecklistBinding[]>;
359
- validationCommands: string[];
360
- browserSmokeChecks: string[];
361
- };
362
- export type SemaphorDataAppRequiredInputOption = {
363
- inputId?: string;
364
- label?: string;
365
- builder?: 'semaphor.inputOptions';
366
- appliesToViewIds?: string[];
367
- optionSourceKey?: string;
368
- visibleLabelField?: SemaphorDataAppCodegenFieldRef;
369
- optionValueField?: SemaphorDataAppCodegenFieldRef;
370
- runtimeFilterField?: SemaphorDataAppCodegenFieldRef;
371
- population?: SemaphorInputOptionsIntent['population'];
372
- dependencies?: SemaphorInputOptionsIntent['dependencies'];
373
- };
374
- export type SemaphorDataAppFilterScope = {
375
- inputId?: string;
376
- label?: string;
377
- type?: string;
378
- scope?: 'dashboard' | 'section' | 'card';
379
- appliesToViewIds?: string[];
380
- notAppliedToViewIds?: string[];
381
- cardAffordanceRequired?: boolean;
382
- };
383
- export type SemaphorDataAppChecklistBinding = {
384
- inputId?: string;
385
- inputLabel?: string;
386
- fieldRef?: SemaphorDataAppCodegenFieldRef;
387
- optionValueField?: SemaphorDataAppCodegenFieldRef;
388
- optionLabelField?: SemaphorDataAppCodegenFieldRef;
389
- relationshipHint?: SemaphorRelationshipHint;
390
- relationshipsUsed?: SemaphorDataAppCodegenRelationshipUse[];
391
- };
392
- export type SemaphorDataAppCodegenSummary = {
393
- schemaVersion: SemaphorDataAppCodegenSummarySchemaVersion;
394
- title: string;
395
- purpose?: string;
396
- userGoal?: string;
397
- nextStep?: string;
398
- sources: SemaphorDataAppCodegenSource[];
399
- inputs: SemaphorDataAppCodegenInput[];
400
- views: SemaphorDataAppCodegenView[];
401
- filterContracts: SemaphorDataAppFilterContract[];
402
- implementationChecklist: SemaphorDataAppImplementationChecklist;
403
- nextRequiredTool?: {
404
- name: string;
405
- reason?: string;
406
- };
407
- unsupportedInsights?: SemaphorDataAppUnsupportedInsight[];
408
- assumptions?: string[];
409
- validation?: {
410
- status?: 'ready' | 'partial' | 'blocked';
411
- warnings?: string[];
412
- };
413
- };
414
- export declare function isSemaphorDataAppCodegenSummary(value: unknown): value is SemaphorDataAppCodegenSummary;
415
- export declare function validateSemaphorDataAppCodegenSummary(value: unknown): {
416
- ok: boolean;
417
- issues: string[];
418
- };
@@ -1,13 +0,0 @@
1
- import { PivotExportConfig, PivotRowData, ExportFormattingConfig } from '../types/index.js';
2
- /**
3
- * Generate multi-level headers for pivot table
4
- */
5
- export declare function generatePivotHeaders(config: PivotExportConfig): string[][];
6
- /**
7
- * Format a pivot table data row for CSV export
8
- */
9
- export declare function formatPivotDataRow(row: PivotRowData, pivotConfig: PivotExportConfig, formattingConfig: ExportFormattingConfig): string[];
10
- /**
11
- * Format pivot table data for CSV export
12
- */
13
- export declare function formatPivotTableForCSV(data: PivotRowData[], pivotConfig: PivotExportConfig, formattingConfig: ExportFormattingConfig): string[];
@@ -1,10 +0,0 @@
1
- import { ExportFormattingConfig } from '../types/index.js';
2
- /**
3
- * Format table data for CSV export
4
- * Returns array of CSV rows (strings)
5
- */
6
- export declare function formatTableForCSV(data: Record<string, unknown>[], config: ExportFormattingConfig): string[];
7
- /**
8
- * Generate complete CSV content for a table
9
- */
10
- export declare function generateTableCSV(data: Record<string, unknown>[], config: ExportFormattingConfig, lineEnding?: '\n' | '\r\n'): string;