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,6 +1,7 @@
1
1
  import { TablePreferences } from '../components/visual/data-table/types/data-table.js';
2
2
  import { TCard } from './types/common-types.js';
3
3
  import { SemaphorResultColumn } from '../shared/analytics-protocol/index.js';
4
+ import { CsvDelimiter, CsvEncoding } from '../shared/format-utils/index.js';
4
5
  import { CardNumericPresentationContext } from './formatters/numeric-presentation.js';
5
6
  import { ComparisonMetadataMap } from './types/query-types.js';
6
7
  import { CardConfig, QueryColumnKeyMap } from './types/explorer-types.js';
@@ -8,7 +9,8 @@ import { FlatTableTotalsByColumnId } from './table-formatting/table-totals-setti
8
9
  import { RegularTableTemporalPresentation } from './formatters/regular-table-temporal-presentation.js';
9
10
  import { RawTemporalPresentation } from './formatters/raw-temporal-presentation.js';
10
11
  type ExportTableOptions = {
11
- delimiter?: string;
12
+ delimiter?: CsvDelimiter;
13
+ encoding?: CsvEncoding;
12
14
  includeHeaders?: boolean;
13
15
  useFormattedValues?: boolean;
14
16
  comparisonMetadata?: ComparisonMetadataMap;
@@ -23,23 +25,23 @@ type ExportTableOptions = {
23
25
  /** Build a filesystem-safe CSV filename with the export time in UTC. */
24
26
  export declare function buildCsvExportFilename(title: string | null | undefined, generatedAt?: Date): string;
25
27
  /**
26
- * Export table data as CSV with column preferences
28
+ * The CSV file for plain records (charts and other non-table cards, and the
29
+ * editor's raw download). Columns are the union of record keys in first-seen
30
+ * order, so a record missing a key gets an empty cell.
27
31
  */
28
- export declare function exportTableAsCSV(data: any[], fileName: string, tablePreferences?: TablePreferences, card?: TCard, options?: ExportTableOptions): void;
32
+ export declare function buildRecordsCsv({ records, includeHeaders, delimiter, encoding, }: {
33
+ records: readonly Record<string, unknown>[];
34
+ includeHeaders?: boolean;
35
+ delimiter?: CsvDelimiter;
36
+ encoding?: CsvEncoding;
37
+ }): string;
29
38
  /**
30
- * Export table data with aggregations (for aggregated tables)
39
+ * Export table data as CSV with column preferences
31
40
  */
32
- export declare function exportAggregatedTableAsCSV(data: any[], fileName: string, groupByColumns?: string[], metricColumns?: string[], options?: {
33
- delimiter?: string;
34
- includeHeaders?: boolean;
35
- includeSubtotals?: boolean;
36
- includeGrandTotal?: boolean;
37
- }): void;
41
+ export declare function exportTableAsCSV(data: any[], fileName: string, tablePreferences?: TablePreferences, card?: TCard, options?: ExportTableOptions): void;
38
42
  /**
39
- * Export pivot table as CSV
43
+ * The CSV file for a Table or Detail Table, or undefined when there is
44
+ * nothing exportable.
40
45
  */
41
- export declare function exportPivotTableAsCSV(data: any[], fileName: string, rowHeaders?: string[], columnHeaders?: string[], options?: {
42
- delimiter?: string;
43
- includeHeaders?: boolean;
44
- }): void;
46
+ export declare function buildTableCsv(data: any[], tablePreferences?: TablePreferences, card?: TCard, options?: ExportTableOptions): string | undefined;
45
47
  export {};
@@ -1,4 +1,4 @@
1
- import { FilterGroup, FilterCondition, LogicalOperator, Field, FilterValue } from '../../types/explorer-types.js';
1
+ import { FilterGroup, FilterCondition, LogicalOperator, Field } from '../../types/explorer-types.js';
2
2
  interface UseFilterBuilderProps {
3
3
  initialFilters?: FilterGroup | null;
4
4
  availableFields?: Field[];
@@ -12,8 +12,8 @@ export declare function useFilterBuilder({ initialFilters, availableFields: prop
12
12
  addGroup: (parentGroupId: string) => void;
13
13
  removeCondition: (groupId: string, conditionId: string) => void;
14
14
  removeGroup: (parentGroupId: string, groupId: string) => void;
15
- updateCondition: (groupId: string, conditionId: string, field: keyof FilterCondition, value: FilterValue) => void;
16
15
  updateConditionFields: (groupId: string, conditionId: string, updates: Partial<FilterCondition>) => void;
16
+ replaceCondition: (groupId: string, conditionId: string, next: FilterCondition) => void;
17
17
  updateGroupOperator: (groupId: string, operator: LogicalOperator) => void;
18
18
  updateGroupNegate: (groupId: string, negate: boolean) => void;
19
19
  reorderConditions: (groupId: string, oldIndex: number, newIndex: number) => void;
@@ -2,7 +2,7 @@ import { AuthToken } from '../../types/common-types.js';
2
2
  export declare function useSchemas(token?: AuthToken): {
3
3
  isPending: boolean;
4
4
  error: Error | null;
5
- schemas: import('../../../components/index.js').DropdownItem[];
5
+ schemas: import('../../types/dropdown-types.js').DropdownItem[];
6
6
  refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
7
7
  label: string;
8
8
  };
@@ -1,6 +1,6 @@
1
1
  import { AuthToken, ControlBinding, ControlDefinition, CustomCard, DashboardLifecycleEvent, DashboardInputExecutionSnapshot, TDashboard, TEvent, TStyle } from '../types/common-types.js';
2
2
  import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
3
- import { TFilterValue } from '../../components/index.js';
3
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
4
4
  type UseDashboardProps = {
5
5
  id?: string;
6
6
  version?: string;
@@ -39,7 +39,7 @@ export declare function useDashboard({ customStyle, currentTheme, onSave, onEven
39
39
  dashboard: TDashboard;
40
40
  assistantProfileId?: string;
41
41
  semanticExecutionPayload: import('../types/semantic-runtime-types.js').SemanticExecutionPayload;
42
- organizationAppearance?: import('../../components/index.js').AppearanceSpec | null;
42
+ organizationAppearance?: import('../appearance/types.js').AppearanceSpec | null;
43
43
  } | null, Error>>;
44
44
  };
45
45
  export {};
@@ -0,0 +1,7 @@
1
+ import { RelativeDateSummary } from '../utils/relative-date-description.js';
2
+ import { RelativeDateFilter } from '../../shared/analytics-protocol/relative-date-filter.js';
3
+ /**
4
+ * Summarizes relative dates in the dashboard calendar and the viewer's date
5
+ * preferences (plan D8).
6
+ */
7
+ export declare function useRelativeDateSummarizer(): (relative: RelativeDateFilter) => RelativeDateSummary;
@@ -1,6 +1,5 @@
1
1
  import { TCard } from '../types/index.js';
2
- import { CardConfig, Field } from '../../components/index.js';
3
- import { QueryColumnKeyMap } from '../types/explorer-types.js';
2
+ import { QueryColumnKeyMap, CardConfig, Field } from '../types/explorer-types.js';
4
3
  import { ClickedMetricValue, ClickFilterCondition } from '../types/interaction-types.js';
5
4
  import { Chart } from 'chart.js';
6
5
  import { SemaphorResultColumn } from '../../shared/analytics-protocol/index.js';
@@ -4,10 +4,11 @@ import { Field } from '../types/explorer-types.js';
4
4
  import { MatrixCardCatalog } from './matrix-card-adapter.js';
5
5
  /** Staged transport input. Auth and catalog grounding remain server-owned. */
6
6
  type ExecutionInput = Parameters<MatrixExecutionEnvironment['execute']>[0];
7
- export declare function buildMatrixCardQueryPayload(input: Pick<ExecutionInput, 'spec' | 'window' | 'cardId' | 'runtimeSorts'> & {
7
+ export declare function buildMatrixCardQueryPayload(input: Pick<ExecutionInput, 'spec' | 'window' | 'cardId' | 'runtimeSorts' | 'temporalState'> & {
8
8
  queryContext: Pick<ExecutionInput['queryContext'], 'cardFilterValues' | 'controlDefinitions' | 'cardControlDefinitions' | 'controlBindings' | 'controlValues'> & Partial<Pick<ExecutionInput['queryContext'], 'resolvedFilters'>>;
9
9
  reportContext: Pick<ExecutionInput['reportContext'], 'calendar'>;
10
10
  }): {
11
+ temporalState?: import('../../shared/analytics-protocol/index.js').OperationTemporalState | undefined;
11
12
  active_filters: import('../types/index.js').TFilterValue[];
12
13
  calendarContext: import('../types/index.js').CalendarContext;
13
14
  controlDefinitions: import('../types/index.js').ControlDefinition[];
@@ -38,7 +39,7 @@ export declare function buildMatrixCardQueryPayload(input: Pick<ExecutionInput,
38
39
  levelId: string;
39
40
  axis: "columns" | "rows";
40
41
  direction: "asc" | "desc";
41
- nulls: "first" | "last";
42
+ nulls: "last" | "first";
42
43
  }[] | undefined;
43
44
  runtimeFilters?: import('../types/explorer-types.js').FilterGroup | undefined;
44
45
  cardId: string;
@@ -318,7 +318,7 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
318
318
  levelId: string;
319
319
  axis: "columns" | "rows";
320
320
  direction: "asc" | "desc";
321
- nulls: "first" | "last";
321
+ nulls: "last" | "first";
322
322
  }[];
323
323
  rankings: readonly import('../../shared/analytics-protocol/index.js').MatrixRanking[];
324
324
  filters?: import('../types/explorer-types.js').FilterGroup | undefined;
@@ -298,7 +298,7 @@ export declare function initializeMatrixCardDraft(card: Pick<TCard, 'config' | '
298
298
  levelId: string;
299
299
  axis: "columns" | "rows";
300
300
  direction: "asc" | "desc";
301
- nulls: "first" | "last";
301
+ nulls: "last" | "first";
302
302
  }[];
303
303
  rankings: readonly import('../../shared/analytics-protocol/index.js').MatrixRanking[];
304
304
  filters?: import('../types/index.js').FilterGroup | undefined;
@@ -0,0 +1,47 @@
1
+ import { MatrixDatasetRetention } from './matrix-runtime-types.js';
2
+ /** Matrix fetching plan MF-D3 and MF-D4. */
3
+ export declare const MATRIX_HISTORY_LIMITS: Readonly<{
4
+ /** Restorable while the oldest piece is younger than this. */
5
+ freshMs: number;
6
+ entriesPerCard: 3;
7
+ entries: 12;
8
+ bytes: number;
9
+ }>;
10
+ /**
11
+ * Dashboard-scoped store of inactive Matrix datasets (plan INV-2 to INV-8).
12
+ *
13
+ * History holds only datasets no runtime is showing. A newly mounted runtime
14
+ * may also start from a copy of another runtime's live dataset (efficiency
15
+ * plan E-D1); the two then own their copies separately. History never limits
16
+ * or evicts live data: per card it holds at most what is left of the runtime
17
+ * allowance after the usage of the card's mounted runtimes, oldest saved first
18
+ * out. Entries are written only by `save` and never mutated afterwards.
19
+ */
20
+ export declare class MatrixDatasetHistory {
21
+ private readonly now;
22
+ private entries;
23
+ private generations;
24
+ private live;
25
+ /** Copies of live datasets handed out by `peek`, so `adopt` can recognize them. */
26
+ private seeds;
27
+ private scope?;
28
+ constructor(now?: () => number);
29
+ /** A new auth or host scope drops everything saved under the previous one. */
30
+ setScope(scope: string): void;
31
+ /** The retention one runtime uses, bound to its card and query identity. */
32
+ port(binding: {
33
+ scope: string;
34
+ card: string;
35
+ dataset: string;
36
+ }): MatrixDatasetRetention;
37
+ private generation;
38
+ /**
39
+ * A copy of another mounted runtime's dataset for the same card, query
40
+ * identity and sorts, when it is current and fresh (plan E-D1). Reading it
41
+ * changes no runtime; History only remembers the copy it handed out.
42
+ */
43
+ private seed;
44
+ private usable;
45
+ /** Oldest saved first out: expired, then over the card's remainder, then over the dashboard ceilings. */
46
+ private fit;
47
+ }
@@ -1,4 +1,5 @@
1
1
  import { MatrixConfig, MatrixViewState } from '../../shared/analytics-protocol/index.js';
2
+ import { CsvEncoding } from '../../shared/format-utils/exporters/csv-utils.js';
2
3
  import { MatrixExportContent } from '../../shared/dashboard-authoring/matrix-delivery.js';
3
4
  import { ReportRuntimeContext } from '../../shared/report-runtime-context/index.js';
4
5
  import { CompiledCardQueryContext } from '../query-context/build-card-query-context.js';
@@ -34,6 +35,8 @@ export declare function buildMatrixDeliveryPayload(input: {
34
35
  content: MatrixExportContent;
35
36
  format: 'csv' | 'pdf';
36
37
  delimiter: ',' | ';' | '\t';
38
+ /** CSV only; absent lets the app resolve the dashboard's setting. */
39
+ csvEncoding?: CsvEncoding;
37
40
  includeHeaders: boolean;
38
41
  }): {
39
42
  controlValues: Record<string, unknown>;
@@ -64,7 +67,7 @@ export declare function buildMatrixDeliveryPayload(input: {
64
67
  levelId: string;
65
68
  axis: "columns" | "rows";
66
69
  direction: "asc" | "desc";
67
- nulls: "first" | "last";
70
+ nulls: "last" | "first";
68
71
  }[] | undefined;
69
72
  runtimeFilters?: import('../types/explorer-types.js').FilterGroup | undefined;
70
73
  } & {
@@ -381,7 +384,7 @@ export declare function buildMatrixDeliveryPayload(input: {
381
384
  levelId: string;
382
385
  axis: "columns" | "rows";
383
386
  direction: "asc" | "desc";
384
- nulls: "first" | "last";
387
+ nulls: "last" | "first";
385
388
  }[];
386
389
  rankings: readonly import('../../shared/analytics-protocol/index.js').MatrixRanking[];
387
390
  filters?: import('../types/explorer-types.js').FilterGroup | undefined;
@@ -733,7 +736,7 @@ export declare function buildMatrixDeliveryPayload(input: {
733
736
  levelId: string;
734
737
  axis: "columns" | "rows";
735
738
  direction: "asc" | "desc";
736
- nulls: "first" | "last";
739
+ nulls: "last" | "first";
737
740
  }[];
738
741
  rankings: readonly import('../../shared/analytics-protocol/index.js').MatrixRanking[];
739
742
  filters?: import('../types/explorer-types.js').FilterGroup | undefined;
@@ -747,6 +750,7 @@ export declare function buildMatrixDeliveryPayload(input: {
747
750
  includeHeaders: boolean;
748
751
  timezone: string;
749
752
  presentationExecutionSnapshot: import('../../shared/format-utils/index.js').PresentationExecutionSnapshot;
753
+ csvEncoding?: "utf-8-bom" | "utf-8" | undefined;
750
754
  acquisition?: "continuation" | undefined;
751
755
  };
752
756
  };
@@ -2,6 +2,7 @@ import { CompiledCardQueryContext } from '../query-context/build-card-query-cont
2
2
  import { ReportRuntimeContext } from '../../shared/report-runtime-context/index.js';
3
3
  import { MatrixWindowExecutor } from './matrix-runtime-types.js';
4
4
  import { MatrixOperationQueue } from './matrix-operation-queue.js';
5
+ import { MatrixDatasetHistory } from './matrix-dataset-history.js';
5
6
  export type MatrixExecutionEnvironment = {
6
7
  ready: boolean;
7
8
  /** Existing auth/project scope identity, never a token in the query key. */
@@ -15,4 +16,5 @@ export type MatrixExecutionEnvironment = {
15
16
  };
16
17
  export declare const MatrixExecutionContext: import('react').Context<(MatrixExecutionEnvironment & {
17
18
  queue: MatrixOperationQueue;
19
+ history: MatrixDatasetHistory;
18
20
  }) | null>;
@@ -1,3 +1,6 @@
1
1
  import { MatrixExecutionEnvironment } from './matrix-execution-context.js';
2
- /** The dashboard endpoint owns auth and grounding; no data/SQL reconstruction here. */
2
+ /**
3
+ * The dashboard endpoint owns auth and grounding; no data/SQL reconstruction
4
+ * here. Successful windows arrive indexed (efficiency plan E-D8).
5
+ */
3
6
  export declare function createMatrixQueryTransport(endpoint: string, token: string): MatrixExecutionEnvironment['execute'];
@@ -1,4 +1,4 @@
1
- import { MatrixAxis, MatrixAxisPage, MatrixCoordinate, MatrixFailure, MatrixPageRequest, MatrixPath, MatrixPresentation, MatrixSpec, MatrixViewState, MatrixWindow, MatrixWindowOutcome, MatrixWindowRequest, SemaphorScalarValue } from '../../shared/analytics-protocol/index.js';
1
+ import { MatrixAxis, MatrixAxisPage, MatrixCellBlock, MatrixCoordinate, MatrixFailure, MatrixPageRequest, MatrixPath, MatrixPresentation, MatrixSpec, MatrixViewState, MatrixWindow, MatrixIndexedWindowOutcome, MatrixWindowRequest, OperationTemporalState, SemaphorScalarValue } from '../../shared/analytics-protocol/index.js';
2
2
  export type MatrixRuntimeError = {
3
3
  failure: MatrixFailure;
4
4
  retryKey: string | null;
@@ -53,15 +53,110 @@ export type MatrixAxisItem = {
53
53
  error: MatrixRuntimeError;
54
54
  };
55
55
  };
56
+ /**
57
+ * Slots are per runtime; a copied dataset duplicates them. The loaded data a
58
+ * slot points to (request, page, coverage, values) is replaced whole, never
59
+ * modified, so copies may share it (efficiency plan E-INV-6).
60
+ */
56
61
  export type MatrixPageSlot = {
57
62
  key: string;
58
- request: MatrixPageRequest;
63
+ request: Readonly<MatrixPageRequest>;
59
64
  ordinal: number;
60
- data?: MatrixAxisPage;
65
+ data?: Readonly<MatrixAxisPage>;
66
+ status: 'idle' | 'loading' | 'ready' | 'failed';
67
+ error?: MatrixRuntimeError;
68
+ touched: number;
69
+ bytes: number;
70
+ };
71
+ /** A loaded cell tile: one row owner (page or singleton path) by one column owner. */
72
+ export type MatrixTileSlot = {
73
+ key: string;
74
+ rowOwner: string;
75
+ columnOwner: string;
76
+ rows: readonly MatrixPath[];
77
+ columns: readonly MatrixPath[];
61
78
  status: 'idle' | 'loading' | 'ready' | 'failed';
62
79
  error?: MatrixRuntimeError;
80
+ coverage?: Readonly<MatrixCellBlock['coverage']>;
81
+ /**
82
+ * Present values by position in `coverage`, keyed
83
+ * `(row * columns + column) * measures + measure`; absent means no data.
84
+ */
85
+ values: ReadonlyMap<number, Readonly<MatrixCellBlock['cells'][number]['value']>>;
86
+ /** Coverage positions by row key, column key and measure id, for `readCell`. */
87
+ positions?: MatrixTilePositions;
63
88
  touched: number;
64
89
  bytes: number;
90
+ cells: number;
91
+ };
92
+ export type MatrixTilePositions = {
93
+ rows: ReadonlyMap<string, number>;
94
+ columns: ReadonlyMap<string, number>;
95
+ measures: ReadonlyMap<string, number>;
96
+ };
97
+ /** Resident usage in every retention dimension. Bytes are serialized payload, never heap. */
98
+ export type MatrixUsage = {
99
+ pages: number;
100
+ blocks: number;
101
+ cells: number;
102
+ bytes: number;
103
+ };
104
+ /**
105
+ * One card's loaded data for one query identity and sort order. It holds only
106
+ * ready pages and tiles, never failed or loading ones. It is in one runtime or
107
+ * in the dataset History, never both; a seeded runtime holds its own copy.
108
+ */
109
+ export type MatrixDataset = {
110
+ /** The effective sort order it was acquired under. */
111
+ sorts: string;
112
+ /** The card generation it belongs to; a refresh makes it unusable. */
113
+ generation: number;
114
+ /** When its oldest piece was fetched; saving or restoring never resets it. */
115
+ fetchedAt: number;
116
+ queryIdentity: string;
117
+ descriptors: MatrixWindow['descriptors'];
118
+ pages: readonly MatrixPageSlot[];
119
+ tiles: readonly MatrixTileSlot[];
120
+ usage: MatrixUsage;
121
+ /**
122
+ * The operation state its first response reported (analytics kernel K14):
123
+ * every later page and expansion of this dataset runs on it, so a restored
124
+ * or seeded dataset continues on the same instant.
125
+ */
126
+ temporalState?: OperationTemporalState;
127
+ };
128
+ /** What a mounted runtime exposes to History. */
129
+ export type MatrixLiveView = {
130
+ usage: () => MatrixUsage;
131
+ /** A copy of its ready pieces, or nothing while it has none or is in an error state. */
132
+ snapshot: () => MatrixDataset | undefined;
133
+ };
134
+ /** How one runtime keeps and restores its card's datasets for one query identity. */
135
+ export type MatrixDatasetRetention = {
136
+ now(): number;
137
+ /** The card generation a dataset starting now belongs to. */
138
+ generation(): number;
139
+ /**
140
+ * A restorable dataset for these sorts: a saved one, else a copy of another
141
+ * live view's. A pure read, safe during render.
142
+ */
143
+ peek(sorts: string): MatrixDataset | undefined;
144
+ /**
145
+ * Takes ownership of a peeked dataset (a saved one leaves History; a live
146
+ * copy leaves its source untouched); false when it is gone, stale or expired.
147
+ */
148
+ adopt(dataset: MatrixDataset): boolean;
149
+ /** Moves a stopped dataset into History; a stale generation or scope is rejected. */
150
+ save(dataset: MatrixDataset): void;
151
+ /** Clears the card's History and returns the card's new generation. */
152
+ invalidate(): number;
153
+ /**
154
+ * Registers this runtime as a live view: its usage counts against the card's
155
+ * History allowance, and its snapshot may seed another view of the card.
156
+ */
157
+ register(view: MatrixLiveView): () => void;
158
+ /** Live usage grew; History re-fits the card's allowance. */
159
+ usageChanged(): void;
65
160
  };
66
161
  export type MatrixRuntimeSnapshot = {
67
162
  rows: readonly MatrixAxisItem[];
@@ -107,7 +202,13 @@ export type MatrixWindowExecutor = (input: {
107
202
  spec: MatrixSpec;
108
203
  window: MatrixWindowRequest;
109
204
  signal: AbortSignal;
110
- }) => Promise<MatrixWindowOutcome>;
205
+ /** The acquisition's state once its first response reported one. */
206
+ temporalState?: OperationTemporalState;
207
+ }) => Promise<MatrixWindowExecution>;
208
+ /** A window outcome and the operation state the server ran it on. */
209
+ export type MatrixWindowExecution = MatrixIndexedWindowOutcome & {
210
+ temporalState?: OperationTemporalState;
211
+ };
111
212
  export type MatrixRuntimeInput = {
112
213
  spec: MatrixSpec;
113
214
  presentation: MatrixPresentation;
@@ -1,10 +1,11 @@
1
1
  import { QueryClient } from '@tanstack/react-query';
2
2
  import { MatrixAxis, MatrixCoordinate, MatrixPath, MatrixSort, MatrixViewState } from '../../shared/analytics-protocol/index.js';
3
- import { MatrixCellAddress, MatrixCellState, MatrixRuntimeInput, MatrixRuntimeSnapshot, MatrixViewport, MatrixVisibleCoverage, MatrixWindowExecutor } from './matrix-runtime-types.js';
3
+ import { MatrixCellAddress, MatrixCellState, MatrixDatasetRetention, MatrixRuntimeInput, MatrixRuntimeSnapshot, MatrixViewport, MatrixVisibleCoverage, MatrixWindowExecutor } from './matrix-runtime-types.js';
4
4
  /** Owns acquisition, errors, generation fencing and retention for exactly one card. */
5
5
  export declare class MatrixRuntimeController {
6
6
  private query;
7
7
  private execute;
8
+ private retention;
8
9
  private readonly prefix;
9
10
  private listeners;
10
11
  private pages;
@@ -19,6 +20,12 @@ export declare class MatrixRuntimeController {
19
20
  private mounted;
20
21
  private scheduled;
21
22
  private queryIdentity?;
23
+ /**
24
+ * The acquisition's operation state (analytics kernel K14): until its first
25
+ * response reports one, the generation runs one request at a time; after,
26
+ * every page and expansion sends it, so they all run on one instant.
27
+ */
28
+ private temporalState?;
22
29
  private error?;
23
30
  private notice?;
24
31
  private blockingFailures;
@@ -28,12 +35,24 @@ export declare class MatrixRuntimeController {
28
35
  private view;
29
36
  private spec;
30
37
  private snapshot;
31
- constructor(input: MatrixRuntimeInput, query: QueryClient, execute: MatrixWindowExecutor, session?: MatrixViewState);
38
+ /** Card generation of the current dataset; set when the dataset starts. */
39
+ private datasetGeneration;
40
+ /** Fetch time of the current dataset's oldest piece. */
41
+ private datasetFetchedAt?;
42
+ /** Installed at construction, adopted from History when the runtime starts. */
43
+ private restored?;
44
+ private unregister?;
45
+ constructor(input: MatrixRuntimeInput, query: QueryClient, execute: MatrixWindowExecutor, session?: MatrixViewState, retention?: MatrixDatasetRetention);
32
46
  subscribe: (listener: () => void) => () => boolean;
33
47
  getSnapshot: () => MatrixRuntimeSnapshot;
34
48
  start: () => void;
35
49
  stop: () => void;
36
50
  private clear;
51
+ /**
52
+ * "This card, as of now": every refresh, retry of a request-wide failure and
53
+ * server-forced reset invalidates the card's History (plan MF-D5), and the new
54
+ * dataset starts under the bumped generation.
55
+ */
37
56
  refresh: () => void;
38
57
  dismissNotice: () => void;
39
58
  /** Presentation updates never change the acquisition generation. */
@@ -66,6 +85,12 @@ export declare class MatrixRuntimeController {
66
85
  private loadTile;
67
86
  private enqueue;
68
87
  private pump;
88
+ /**
89
+ * Re-derived on every pump, never a flag cleared on success: a bootstrap that
90
+ * fails, is cancelled or is superseded ends its active work, and the next
91
+ * queued request becomes the bootstrap.
92
+ */
93
+ private awaitingTemporalState;
69
94
  private run;
70
95
  private current;
71
96
  private runtimeError;
@@ -74,6 +99,22 @@ export declare class MatrixRuntimeController {
74
99
  private removeTile;
75
100
  private removeResource;
76
101
  private trim;
102
+ /** One measure of resident usage for the runtime budget and History. */
103
+ private usage;
104
+ /** Order-insensitive, like the sort comparison that decides a reset. */
105
+ private sortsKey;
106
+ /** Page ownership for acquired and restored pages alike. */
107
+ private ownPage;
108
+ /**
109
+ * The ready pieces of the current dataset. Failed and loading pieces never
110
+ * leave (plan INV-7), and a view in a request-wide failure saves nothing.
111
+ * Copies are taken, so History entries are never mutated afterwards.
112
+ */
113
+ private exportDataset;
114
+ /** Installs copies, so a dataset peeked by two runtimes is never shared mutably. */
115
+ private install;
116
+ /** Adopts a fresh saved dataset for the current sorts, if History has one. */
117
+ private restore;
77
118
  private deferPlan;
78
119
  private publish;
79
120
  }
@@ -9,6 +9,12 @@ type MatrixInput = MatrixRuntimeInput & {
9
9
  cardId?: string;
10
10
  /** Authored controls input; runtime spec is the resolved display definition. */
11
11
  authoredSpec?: MatrixSpec;
12
+ /**
13
+ * The shared card query identity (`createCompiledCardQueryIdentities`) of the
14
+ * same `queryContext` and calendar this card sends. It is the only source of
15
+ * query-context identity here; never hash query-context fields locally.
16
+ */
17
+ queryInputIdentity: string;
12
18
  queryContext: CompiledCardQueryContext;
13
19
  reportContext: ReportRuntimeContext;
14
20
  /** Milliseconds from the card refresh setting; absent while editing. */
@@ -1,6 +1,7 @@
1
1
  import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.js';
2
2
  import { ControlBinding, ControlDefinition, ResolvedDashboardDateComparisonInput, ResolvedDashboardInputContext, TCard, TDashboard } from '../types/common-types.js';
3
- import { GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
3
+ import { GlobalDateComparisonContext, GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
4
+ import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
4
5
  import { CardConfig } from '../types/explorer-types.js';
5
6
  import { resolveRuntimeCardFilters } from './resolve-runtime-card-filters.js';
6
7
  import { CardViewState } from '../dashboard-view-state/index.js';
@@ -50,6 +51,9 @@ export type CardQueryContext = {
50
51
  export type CompiledCardQueryContext = Omit<CardQueryContext, 'filterCompilationInput'> & {
51
52
  cardFilterValues: TFilterValue[];
52
53
  queryFilterDefinitions: TFilter[];
54
+ /** Compiled outputs the shared card query identity reads; see `createCompiledCardQueryIdentities`. */
55
+ resolvedPrimaryDateField: ResolvedPrimaryDateField | null;
56
+ globalDateComparison: GlobalDateComparisonContext | undefined;
53
57
  globalDateComparisonSelection?: GlobalDateComparisonSelection;
54
58
  dateComparisonInputs?: ResolvedDashboardDateComparisonInput[];
55
59
  };
@@ -51,7 +51,6 @@ export type DashboardCardQueryExecutionOptions = {
51
51
  resolvedPrimaryDateField?: ResolvedPrimaryDateField;
52
52
  calendarContext: CalendarContext;
53
53
  allowGlobalDateMinutePrecision?: boolean;
54
- globalDateComparisonReferenceTime?: string;
55
54
  resolvePaginationConfig?: (queryInputIdentity: string) => PaginationConfig | undefined;
56
55
  };
57
56
  /** One final compilation for interactive requests and immutable input captures. */
@@ -1,9 +1,8 @@
1
1
  import { TCard } from '../types/common-types.js';
2
2
  import { DashboardDateComparisonOwner, GlobalDateComparisonContext, GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
3
3
  import { DashboardDateComparisonResolution } from '../dashboard-inputs/dashboard-date-comparison-plan.js';
4
- export declare function buildGlobalDateComparisonContext(card: Pick<TCard, 'preferences'>, selection: GlobalDateComparisonSelection | undefined, referenceTime?: string, owner?: DashboardDateComparisonOwner): GlobalDateComparisonContext | undefined;
4
+ export declare function buildGlobalDateComparisonContext(card: Pick<TCard, 'preferences'>, selection: GlobalDateComparisonSelection | undefined, owner?: DashboardDateComparisonOwner): GlobalDateComparisonContext | undefined;
5
5
  export declare function buildDashboardDateComparisonContext(params: {
6
6
  card: TCard;
7
7
  resolution: DashboardDateComparisonResolution;
8
- referenceTime?: string;
9
8
  }): GlobalDateComparisonContext | undefined;
@@ -35,7 +35,6 @@ export type CompileDashboardCardFiltersParams = {
35
35
  semanticExecutionPayload?: SemanticExecutionPayload;
36
36
  timezone?: string;
37
37
  allowMinutePrecision?: boolean;
38
- comparisonReferenceTime?: string;
39
38
  };
40
39
  export type CompiledDashboardCardFilters = {
41
40
  cardFilterValues: TFilterValue[];
@@ -68,5 +67,5 @@ export declare function composeCardFilterValues(card: TCard, input: DashboardCar
68
67
  * The single final per-card filter compiler. Every card execution consumer
69
68
  * calls this once and treats its result as immutable query state.
70
69
  */
71
- export declare function compileDashboardCardFilters({ card, cardConfig, input, resolvedPrimaryDateField, resolvedFields, semanticExecutionPayload, timezone, allowMinutePrecision, comparisonReferenceTime, }: CompileDashboardCardFiltersParams): DashboardCardFilterCompilationResult;
70
+ export declare function compileDashboardCardFilters({ card, cardConfig, input, resolvedPrimaryDateField, resolvedFields, semanticExecutionPayload, timezone, allowMinutePrecision, }: CompileDashboardCardFiltersParams): DashboardCardFilterCompilationResult;
72
71
  export {};
@@ -3,6 +3,7 @@ import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
3
3
  import { CardConfig, PaginationConfig } from '../types/explorer-types.js';
4
4
  import { GlobalDateComparisonContext } from '../../shared/analytics-protocol/index.js';
5
5
  import { CalendarContext } from '../../shared/report-runtime-context/index.js';
6
+ import { CompiledCardQueryContext } from './build-card-query-context.js';
6
7
  export declare const isPaginatedCardType: (card: TCard) => boolean;
7
8
  export type CreateDashboardCardQueryKeyOptions = {
8
9
  finalFiltersKey: string;
@@ -36,4 +37,13 @@ export declare function createDashboardCardQueryIdentities(card: TCard, options:
36
37
  queryInputIdentity: string;
37
38
  paginationConfig: PaginationConfig | undefined;
38
39
  };
40
+ /**
41
+ * The one identity for a compiled card context. Regular cards and the Matrix
42
+ * both use it, so a card's identity always covers what its request sends.
43
+ */
44
+ export declare function createCompiledCardQueryIdentities(card: TCard, context: CompiledCardQueryContext, calendarContext: CalendarContext, identityOptions?: Parameters<typeof createDashboardCardQueryIdentities>[2]): {
45
+ queryKey: string[];
46
+ queryInputIdentity: string;
47
+ paginationConfig: PaginationConfig | undefined;
48
+ };
39
49
  export declare function createDashboardCardQueryKey(card: TCard, options: CreateDashboardCardQueryKeyOptions): string[];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The auth scope every card puts in its query identity: a stable hash of the
3
+ * access token, never the token itself. A new token is a new scope.
4
+ */
5
+ export declare function hashTokenForQueryKey(accessToken?: string): string;