react-semaphor 0.1.540 → 0.1.542

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 (118) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +50 -45
  5. package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
  6. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-oHF5lTjA.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
  12. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-CIn22Qgp.js} +69 -70
  13. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  14. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-ZUYsIExq.js} +4 -4
  15. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-s5WJBcK8.js} +1 -1
  16. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-C6MJVyoI.js} +2357 -4948
  17. package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-DLdereA7.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/index-CV5rHq5D.js +2673 -0
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-DjPqgFly.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-BWSpRsPj.js} +38555 -40449
  37. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +399 -380
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -238
  53. package/dist/index.js +174 -175
  54. package/dist/pdf-export-policy/index.js +20 -10
  55. package/dist/report-runtime-context/index.js +1 -1
  56. package/dist/surfboard/index.js +2 -2
  57. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  58. package/dist/types/briefings/attachments.d.ts +17 -1
  59. package/dist/types/briefings/index.d.ts +6 -3
  60. package/dist/types/index.js +48 -48
  61. package/dist/types/lib/api/exports-api.d.ts +11 -65
  62. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  63. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  64. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  65. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  66. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  67. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  68. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  69. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  70. package/dist/types/lib/types/common-types.d.ts +7 -0
  71. package/dist/types/lib/types/explorer-types.d.ts +8 -2
  72. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  73. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  74. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  75. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  76. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  77. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  78. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  79. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  80. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  81. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  82. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  83. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  84. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  85. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  86. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  87. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  88. package/dist/types/shared/format-utils/index.d.ts +3 -0
  89. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  90. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  91. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  92. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  93. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  94. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  95. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  96. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  97. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  98. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  99. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  100. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  101. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  102. package/package.json +2 -1
  103. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +0 -979
  104. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  105. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  106. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  107. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  108. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  109. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  110. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  111. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  112. package/dist/chunks/index-CqMiAkay.js +0 -3164
  113. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  114. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  115. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  116. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  117. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  118. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,9 +1,9 @@
1
- import { C as s, E as r, c as l, g as o, f as i, b as n, e as d, d as m, a as u, h as c, r as E } from "../chunks/common-types-CUf03Htv.js";
2
- import { C as p, D as T, L as D, P as A, e as I, g as _, j as F, h as S, k as b, d as L, b as f, i as N, c as R, n as g, f as h } from "../chunks/validators-Ej1DdCXa.js";
3
- import { D as M } from "../chunks/token-types-bxUxXDX2.js";
4
- import { B as O, j as V, V as k, a as w, h as U, g as B, i as K, f as z, e as v, m as P, n as Y, p as G, b as Q, c as j, d as q, r as W, t as J } from "../chunks/bookmark-state-k7y5SNGf.js";
5
- import { r as H, a as Z } from "../chunks/pivot-result-identity-D6hhcRXi.js";
6
- import { D as ee } from "../chunks/report-runtime-context-B984Nq1E.js";
1
+ import { C as s, E as r, V as l, i as o, c as i, g as n, f as d, b as m, e as u, d as E, a as c, u as p, s as C, h as T, j as D, q as A, o as I, m as _, n as F, p as S, k as b, l as L, r as f, t as N } from "../chunks/table-settings-CLZocegs.js";
2
+ import { C as y, D as M, L as g, P as h, e as x, g as O, j as V, h as k, k as w, d as U, b as B, i as K, c as z, n as v, f as P } from "../chunks/validators-DMHTpf7a.js";
3
+ import { D as q } from "../chunks/token-types-DBbZVQsm.js";
4
+ import { B as Q, a as j, p as W, r as J } from "../chunks/bookmark-state-CXw7lZ50.js";
5
+ import { r as H, a as Z } from "../chunks/pivot-result-identity-DJhXXcns.js";
6
+ import { D as ee } from "../chunks/report-runtime-context-Dq8XyODK.js";
7
7
  const e = [
8
8
  "concatenate",
9
9
  "conditional-category",
@@ -37,52 +37,52 @@ const e = [
37
37
  "is-blank"
38
38
  ];
39
39
  export {
40
- O as BOOKMARK_STATE_VERSION,
41
- V as BOOKMARK_VISIBILITIES,
42
- p as CALCULATED_FIELD_ENTITY_MARKER,
40
+ Q as BOOKMARK_STATE_VERSION,
41
+ j as BOOKMARK_VISIBILITIES,
42
+ y as CALCULATED_FIELD_ENTITY_MARKER,
43
43
  e as CALCULATED_FIELD_TEMPLATE_IDS,
44
44
  s as CONTROL_CARD_DEFAULT_VALUE,
45
- T as DATE_FORMAT_VALUES,
45
+ M as DATE_FORMAT_VALUES,
46
46
  ee as DEFAULT_CALENDAR_CONTEXT,
47
- M as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
47
+ q as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
48
48
  r as EMPTY_SELECTION,
49
- D as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
50
- A as PivotMarkerEnum,
51
- k as VIEWER_LIMITS,
52
- w as VIEWER_TABLE_SETTINGS_VERSION,
53
- l as collectDatasetNamesFromExplorerField,
54
- o as collectDatasetNamesFromFilterGroup,
55
- i as collectExecutionDatasetNamesFromExplorerField,
56
- n as collectPreferredDatasetNamesFromExplorerField,
57
- d as collectQualifiedDatasetNamesFromExplorerField,
58
- m as datasetRefFromSource,
59
- u as dependencyDisplayIdentity,
60
- I as getCalculatedFieldComputeStage,
61
- U as getCustomizableTableCardIds,
62
- _ as getFieldRuntimeColumnName,
63
- B as getSortableTableCardIds,
64
- F as hasCalculatedFieldMarker,
65
- S as hasCalculatedFormulaInputs,
66
- b as hasSyntheticCalculatedFieldOwner,
67
- c as humanizeDatasetName,
68
- L as inspectCalculatedField,
69
- f as isCalculatedDimension,
70
- N as isCalculatedMetric,
71
- R as isDerivedField,
72
- K as isEmptyViewerTableSettings,
73
- z as isTableCardCustomizable,
74
- v as isTableCardSortable,
75
- P as measureJsonBytes,
76
- g as normalizeCalculatedFieldRepresentation,
77
- Y as normalizeViewerTableSettings,
78
- G as parseBookmarkState,
79
- Q as parseTableColumnId,
80
- j as parseViewerTableSettings,
81
- q as parseViewerTableSettingsMap,
82
- W as readBookmarkState,
83
- E as resolveFieldDatasetDependencies,
49
+ g as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
50
+ h as PivotMarkerEnum,
51
+ l as VIEWER_LIMITS,
52
+ o as VIEWER_TABLE_SETTINGS_VERSION,
53
+ i as collectDatasetNamesFromExplorerField,
54
+ n as collectDatasetNamesFromFilterGroup,
55
+ d as collectExecutionDatasetNamesFromExplorerField,
56
+ m as collectPreferredDatasetNamesFromExplorerField,
57
+ u as collectQualifiedDatasetNamesFromExplorerField,
58
+ E as datasetRefFromSource,
59
+ c as dependencyDisplayIdentity,
60
+ x as getCalculatedFieldComputeStage,
61
+ p as getCustomizableTableCardIds,
62
+ O as getFieldRuntimeColumnName,
63
+ C as getSortableTableCardIds,
64
+ V as hasCalculatedFieldMarker,
65
+ k as hasCalculatedFormulaInputs,
66
+ w as hasSyntheticCalculatedFieldOwner,
67
+ T as humanizeDatasetName,
68
+ U as inspectCalculatedField,
69
+ B as isCalculatedDimension,
70
+ K as isCalculatedMetric,
71
+ z as isDerivedField,
72
+ D as isEmptyViewerTableSettings,
73
+ A as isTableCardCustomizable,
74
+ I as isTableCardSortable,
75
+ _ as measureJsonBytes,
76
+ v as normalizeCalculatedFieldRepresentation,
77
+ F as normalizeViewerTableSettings,
78
+ W as parseBookmarkState,
79
+ S as parseTableColumnId,
80
+ b as parseViewerTableSettings,
81
+ L as parseViewerTableSettingsMap,
82
+ J as readBookmarkState,
83
+ f as resolveFieldDatasetDependencies,
84
84
  H as resolveQueryColumnKeyMapEntry,
85
85
  Z as resolveUniqueQueryColumnKeyMapEntry,
86
- h as shouldDropInheritedCalculationAggregate,
87
- J as toTableColumnId
86
+ P as shouldDropInheritedCalculationAggregate,
87
+ N as toTableColumnId
88
88
  };
@@ -1,62 +1,8 @@
1
- import { TFilterValue } from '../../components/surfboard/filter/types.js';
2
- import { CsvEncoding } from '../../shared/format-utils/exporters/csv-utils.js';
3
- import { CardConfig, DataSource, TableTotalsRequest } from '../types/explorer-types.js';
4
- import { ControlBinding, ControlDefinition } from '../types/common-types.js';
5
- import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
6
- import { ComparisonPresentationSpec, GlobalDateComparisonContext } from '../../shared/analytics-protocol/index.js';
7
- import { TemporalResultOwner } from '../../shared/dashboard-authoring/index.js';
8
- import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
9
- import { MatrixCsvExportRequest } from '../matrix-table/matrix-delivery.js';
1
+ import { ExportFileFormat } from '../../shared/format-utils/index.js';
2
+ import { MatrixFileExportRequest } from '../matrix-table/matrix-delivery.js';
3
+ import { CreateExportRequest } from '../../shared/dashboard-authoring/card-export-request.js';
10
4
  export type ExportStatus = 'pending' | 'processing' | 'chunking' | 'compacting' | 'completed' | 'failed' | 'cancelled';
11
- export type ExportFormat = 'csv';
12
5
  export type CardType = 'table' | 'aggregateTable' | 'pivotTable' | 'detailTable';
13
- /** Formatting configuration passed to the export job */
14
- export interface ExportFormattingConfig {
15
- useFormattedValues: boolean;
16
- timezone: string;
17
- browserTimezone?: string;
18
- isSqlCard?: boolean;
19
- delimiter: ',' | ';' | '\t';
20
- /** Resolved by the dialog: the person's choice, else the dashboard's setting. */
21
- csvEncoding: CsvEncoding;
22
- includeHeaders: boolean;
23
- columnSettings?: Record<string, unknown>;
24
- visibleColumns?: string[];
25
- columnLabels?: Record<string, string>;
26
- tableTotalsLabelColumnKey?: string;
27
- presentationExecutionSnapshot?: PresentationExecutionSnapshot;
28
- comparisonPresentation?: ComparisonPresentationSpec;
29
- }
30
- export type AuthoritativeExportFormattingConfig = ExportFormattingConfig & {
31
- comparisonPresentation: ComparisonPresentationSpec;
32
- presentationExecutionSnapshot: PresentationExecutionSnapshot;
33
- };
34
- /** Request to create a new export job */
35
- export interface CreateExportRequest {
36
- type: 'visual' | 'card';
37
- dashboardId: string;
38
- visualId?: string;
39
- cardId: string;
40
- title?: string;
41
- connection_id: string;
42
- cardType: string;
43
- sql: string;
44
- python: string;
45
- resultOwner: TemporalResultOwner;
46
- cardConfig: CardConfig;
47
- cardDataSource: DataSource;
48
- active_filters: TFilterValue[];
49
- controlValues?: Record<string, unknown>;
50
- controlDefinitions?: ControlDefinition[];
51
- cardControlDefinitions?: ControlDefinition[];
52
- controlBindings?: ControlBinding[];
53
- resolvedPrimaryDateField?: ResolvedPrimaryDateField;
54
- globalDateComparison?: GlobalDateComparisonContext;
55
- tableTotalsRequest?: TableTotalsRequest;
56
- totalRows: number;
57
- format: ExportFormat;
58
- formatOptions: AuthoritativeExportFormattingConfig;
59
- }
60
6
  /** Response from creating an export job */
61
7
  export interface CreateExportResponse {
62
8
  exportId: string;
@@ -68,7 +14,7 @@ export interface CreateExportResponse {
68
14
  originalRows?: number;
69
15
  maxRows?: number;
70
16
  }
71
- export type CardExportRequest = CreateExportRequest | MatrixCsvExportRequest;
17
+ export type CardExportRequest = CreateExportRequest | MatrixFileExportRequest;
72
18
  /** Export job status response */
73
19
  export interface ExportJobStatus {
74
20
  id: string;
@@ -125,6 +71,7 @@ export type MatrixDirectExportResult = {
125
71
  kind: 'file';
126
72
  file: Blob;
127
73
  fileName: string;
74
+ format: ExportFileFormat;
128
75
  } | {
129
76
  kind: 'background';
130
77
  exportId: string;
@@ -132,14 +79,13 @@ export type MatrixDirectExportResult = {
132
79
  deadlineAt: string | null;
133
80
  };
134
81
  /**
135
- * A Matrix CSV a user downloads: built in the request when it fits the direct
136
- * limits, otherwise moved to a background export by the server. The file is
137
- * read as bytes, so its BOM survives. Errors carry the server's catalog
138
- * reason in `details.message`.
82
+ * A Matrix CSV or Excel file a user downloads: built in the request when it
83
+ * fits the direct limits, otherwise moved to a background export by the
84
+ * server. The file is read as bytes, so a CSV's BOM survives; its format is
85
+ * the response's content type. Errors carry the server's catalog reason in
86
+ * `details.message` (an Excel limit answers 422 `excel_limit`).
139
87
  */
140
- export declare function createMatrixDirectExport(apiServiceUrl: string, token: string, params: MatrixCsvExportRequest & {
141
- format: 'csv';
142
- }): Promise<MatrixDirectExportResult>;
88
+ export declare function createMatrixDirectExport(apiServiceUrl: string, token: string, params: MatrixFileExportRequest): Promise<MatrixDirectExportResult>;
143
89
  /**
144
90
  * Get list of user's exports
145
91
  */
@@ -0,0 +1,17 @@
1
+ import { ControlBinding, ControlDefinition, TDashboard } from '../types/common-types.js';
2
+ /** A saved control contract a host replays: a card attachment's controls and bindings. */
3
+ export type ControlContractOverrides = {
4
+ controlDefinitions?: ControlDefinition[];
5
+ cardControlDefinitions?: ControlDefinition[];
6
+ controlBindings?: ControlBinding[];
7
+ };
8
+ /**
9
+ * Puts a saved control contract on the dashboard (and on one card) before it
10
+ * hydrates. Mutates and returns `dashboard`: callers pass a copy. The
11
+ * dashboard's hydration (`useDashboard`) and a saved card's request on the
12
+ * server (`buildSavedCardRequest`) both apply it here.
13
+ */
14
+ export declare function applyControlContractOverrides(dashboard: TDashboard, params: {
15
+ cardId?: string;
16
+ controlContractOverrides?: ControlContractOverrides | undefined;
17
+ }): TDashboard;
@@ -34,6 +34,8 @@ export declare function readExportViewerTable(state: {
34
34
  export declare function resolveExportTableView(input: {
35
35
  readonly card: TCard;
36
36
  readonly records: readonly Record<string, unknown>[];
37
+ /** The result's output keys when it has no row to read them from; else the rows' keys. */
38
+ readonly keys?: readonly string[];
37
39
  readonly columnKeyMap?: QueryColumnKeyMap;
38
40
  readonly resultColumns?: readonly SemaphorResultColumn[];
39
41
  readonly comparisonMetadata?: ComparisonMetadataMap;
@@ -15,6 +15,7 @@ export declare function useCard(cardId: string): {
15
15
  queryInputIdentity: string | undefined;
16
16
  effectivePaginationConfig: import('../types/index.js').PaginationConfig | undefined;
17
17
  queryRequestPayload: Record<string, unknown> | undefined;
18
+ sourceRowProbe: import('../../shared/dashboard-authoring/index.js').CardQuerySourceRowProbe | undefined;
18
19
  pagination: import('../types/index.js').PaginationMetadata | undefined;
19
20
  comparisonMetadata: import('../../shared/analytics-protocol/index.js').MetricComparisonMetadataMap | undefined;
20
21
  resolvedPrimaryDateField: import('../types/semantic-runtime-types.js').ResolvedPrimaryDateField | undefined;
@@ -35,6 +36,7 @@ export declare function useDashboardCard(card: TCard): {
35
36
  queryInputIdentity: string | undefined;
36
37
  effectivePaginationConfig: import('../types/index.js').PaginationConfig | undefined;
37
38
  queryRequestPayload: Record<string, unknown> | undefined;
39
+ sourceRowProbe: import('../../shared/dashboard-authoring/index.js').CardQuerySourceRowProbe | undefined;
38
40
  pagination: import('../types/index.js').PaginationMetadata | undefined;
39
41
  comparisonMetadata: import('../../shared/analytics-protocol/index.js').MetricComparisonMetadataMap | undefined;
40
42
  resolvedPrimaryDateField: import('../types/semantic-runtime-types.js').ResolvedPrimaryDateField | undefined;
@@ -1,6 +1,7 @@
1
- import { AuthToken, ControlBinding, ControlDefinition, CustomCard, DashboardLifecycleEvent, DashboardInputExecutionSnapshot, TDashboard, TEvent, TStyle } from '../types/common-types.js';
1
+ import { AuthToken, CustomCard, DashboardLifecycleEvent, DashboardInputExecutionSnapshot, TDashboard, TEvent, TStyle } from '../types/common-types.js';
2
2
  import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
3
3
  import { TFilterValue } from '../../components/surfboard/filter/types.js';
4
+ import { ControlContractOverrides } from '../dashboard-inputs/control-contract-overrides.js';
4
5
  import { ViewerTableSettings } from '../../shared/dashboard-viewer/index.js';
5
6
  type UseDashboardProps = {
6
7
  id?: string;
@@ -11,11 +12,7 @@ type UseDashboardProps = {
11
12
  values: string[] | number[];
12
13
  }[] | TFilterValue[];
13
14
  defaultControlValues?: Record<string, unknown>;
14
- controlContractOverrides?: {
15
- controlDefinitions?: ControlDefinition[];
16
- cardControlDefinitions?: ControlDefinition[];
17
- controlBindings?: ControlBinding[];
18
- };
15
+ controlContractOverrides?: ControlContractOverrides;
19
16
  dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
20
17
  /** Untrusted per-sheet input capture of a Full dashboard PDF; see resolvePrintInputs. */
21
18
  printInputCapture?: unknown;
@@ -8,8 +8,14 @@ export declare const MATRIX_EXPORT_CONTENT: readonly [{
8
8
  readonly label: "Matrix layout: All detail levels";
9
9
  }, {
10
10
  readonly value: "flat";
11
- readonly label: "Flat aggregate CSV";
11
+ readonly label: "Flat aggregate table";
12
12
  }];
13
+ /**
14
+ * What a Matrix download or attachment may be: PDF, CSV and Excel for the
15
+ * layout, CSV and Excel for Flat content, which is a data file only
16
+ * (XL-D16). Downloads off leaves PDF of the layout. One policy for the export
17
+ * dialog and Briefing attachments.
18
+ */
13
19
  export declare function matrixDeliveryOptions(allowDownload?: boolean, content?: MatrixExportContent): {
14
20
  contents: ({
15
21
  readonly value: "current";
@@ -19,7 +25,7 @@ export declare function matrixDeliveryOptions(allowDownload?: boolean, content?:
19
25
  readonly label: "Matrix layout: All detail levels";
20
26
  } | {
21
27
  readonly value: "flat";
22
- readonly label: "Flat aggregate CSV";
28
+ readonly label: "Flat aggregate table";
23
29
  })[];
24
30
  formats: import('../types/index.js').BriefingAttachmentFormat[];
25
31
  };
@@ -1,10 +1,11 @@
1
1
  import { MatrixConfig, MatrixViewState } from '../../shared/analytics-protocol/index.js';
2
2
  import { CsvEncoding } from '../../shared/format-utils/exporters/csv-utils.js';
3
+ import { ExportFileFormat } from '../../shared/format-utils/exporters/export-file-format.js';
3
4
  import { MatrixExportContent } from '../../shared/dashboard-authoring/matrix-delivery.js';
4
5
  import { ReportRuntimeContext } from '../../shared/report-runtime-context/index.js';
5
6
  import { CompiledCardQueryContext } from '../query-context/build-card-query-context.js';
6
7
  import { DataSource } from '../types/explorer-types.js';
7
- import { BriefingAttachment } from '../../briefings.js';
8
+ import { BriefingAttachment, BriefingAttachmentFormat } from '../../briefings.js';
8
9
  export { captureMatrixExport, type MatrixExportContent } from '../../shared/dashboard-authoring/matrix-delivery.js';
9
10
  /** Schedule authoring shares the query snapshot but explicitly excludes session state. */
10
11
  export declare function buildMatrixBriefingAttachment(input: {
@@ -13,7 +14,7 @@ export declare function buildMatrixBriefingAttachment(input: {
13
14
  cardId: string;
14
15
  title: string;
15
16
  content: MatrixExportContent;
16
- format: 'csv' | 'pdf';
17
+ format: BriefingAttachmentFormat;
17
18
  }): BriefingAttachment;
18
19
  export { MATRIX_EXPORT_CONTENT } from './matrix-delivery-policy.js';
19
20
  /** Supplied by the mounted Matrix host, never inferred from resident cells. */
@@ -33,7 +34,7 @@ export declare function buildMatrixDeliveryPayload(input: {
33
34
  title: string;
34
35
  reportContext: ReportRuntimeContext;
35
36
  content: MatrixExportContent;
36
- format: 'csv' | 'pdf';
37
+ format: 'csv' | 'xlsx' | 'pdf';
37
38
  delimiter: ',' | ';' | '\t';
38
39
  /** CSV only; absent lets the app resolve the dashboard's setting. */
39
40
  csvEncoding?: CsvEncoding;
@@ -662,7 +663,7 @@ export declare function buildMatrixDeliveryPayload(input: {
662
663
  }[];
663
664
  } | undefined;
664
665
  };
665
- format: "csv";
666
+ format: "csv" | "xlsx";
666
667
  spec: {
667
668
  source: {
668
669
  kind: "semantic";
@@ -754,6 +755,7 @@ export declare function buildMatrixDeliveryPayload(input: {
754
755
  acquisition?: "continuation" | undefined;
755
756
  };
756
757
  };
757
- export type MatrixCsvExportRequest = ReturnType<typeof buildMatrixDeliveryPayload> & {
758
- format: 'csv';
758
+ /** A Matrix data file request (CSV or Excel) for the direct path or a job. */
759
+ export type MatrixFileExportRequest = ReturnType<typeof buildMatrixDeliveryPayload> & {
760
+ format: ExportFileFormat;
759
761
  };
@@ -0,0 +1,50 @@
1
+ import { TCard, TDashboard } from '../types/common-types.js';
2
+ import { PaginationConfig } from '../types/explorer-types.js';
3
+ import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
4
+ import { TableConfig } from '../types/query-types.js';
5
+ import { CardQueryContext, CompiledCardQueryContext } from './build-card-query-context.js';
6
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
7
+ import { DashboardCardQueryRequestPayloadBase } from '../../shared/dashboard-authoring/card-query-request.js';
8
+ import { CompiledDashboardCardFilters, CompileDashboardCardFiltersParams } from './compile-dashboard-card-filters.js';
9
+ export type { DashboardCardQueryRequestPayloadBase } from '../../shared/dashboard-authoring/card-query-request.js';
10
+ export type DashboardCardQueryContract = {
11
+ status: 'ready';
12
+ queryKey: string[];
13
+ queryInputIdentity: string;
14
+ paginationConfig?: PaginationConfig;
15
+ requestPayloadBase: DashboardCardQueryRequestPayloadBase;
16
+ tableConfig: TableConfig;
17
+ compiledFilters: CompiledDashboardCardFilters;
18
+ };
19
+ export type DashboardCardQueryContractResult = DashboardCardQueryContract | {
20
+ status: 'blocked';
21
+ cardId: string;
22
+ mappingDispositions: CompiledDashboardCardFilters['mappingDispositions'];
23
+ tableConfig: TableConfig;
24
+ };
25
+ /** Test/invariant helper for fixtures that cannot contain mapped inputs. */
26
+ export declare function requireReadyDashboardCardQueryContract(result: DashboardCardQueryContractResult): DashboardCardQueryContract;
27
+ export type DashboardCardQueryExecutionOptions = {
28
+ resolvedPrimaryDateField?: ResolvedPrimaryDateField;
29
+ calendarContext: CalendarContext;
30
+ allowGlobalDateMinutePrecision?: boolean;
31
+ /**
32
+ * The cache settings of the dashboard the card belongs to (ledger P1-01).
33
+ * Required so that every caller decides; never read from the store.
34
+ */
35
+ globalCacheConfig: TDashboard['globalCacheConfig'];
36
+ resolvePaginationConfig?: (queryInputIdentity: string) => PaginationConfig | undefined;
37
+ };
38
+ /** One final compilation for interactive requests and immutable input captures. */
39
+ export declare function compileDashboardCardQueryContext(card: TCard, context: CardQueryContext, execution: Omit<CompileDashboardCardFiltersParams, 'card' | 'cardConfig' | 'input'>): {
40
+ status: "blocked";
41
+ cardId: string;
42
+ mappingDispositions: import('./dashboard-filter-mapping-resolution.js').DashboardFilterMappingDisposition[];
43
+ } | {
44
+ status: "ready";
45
+ queryContext: CompiledCardQueryContext;
46
+ compiledFilters: CompiledDashboardCardFilters & {
47
+ status: "ready";
48
+ };
49
+ };
50
+ export declare function buildDashboardCardQueryContract(card: TCard, context: CardQueryContext, execution: DashboardCardQueryExecutionOptions): DashboardCardQueryContractResult;
@@ -39,10 +39,14 @@ export declare function resolveCardRequestExtras(input: {
39
39
  card: TCard;
40
40
  /** The config the card runs with (drilled, sorted): its totals are taken from it. */
41
41
  finalConfig: CardConfig | undefined;
42
- /** A printed table runs whole. Default: on screen. */
42
+ /**
43
+ * A printed table runs whole. Default: on screen. `deliveryStrict` (a
44
+ * scheduled report's render) also asks for source-row evidence (RA-D15).
45
+ */
43
46
  display?: {
44
47
  isTablePrintMode: boolean;
45
48
  isPrintDisplayMode: boolean;
49
+ deliveryStrict?: boolean;
46
50
  };
47
51
  /** Present for a card in a Document section, with the section's table policy. */
48
52
  documentSection?: {
@@ -131,6 +131,13 @@ export type VisualDisplayPreferences = {
131
131
  * - 'table-print': Table-specific print mode (title only, no pagination/toolbar)
132
132
  */
133
133
  mode?: VisualDisplayMode;
134
+ /**
135
+ * 'strict' only on a render made for delivery (a scheduled report). A table
136
+ * print query then asks for source-row evidence, and a card that can't be
137
+ * delivered complete marks the page instead of printing. Absent: behave
138
+ * exactly as today (report attachment delivery RA-D11).
139
+ */
140
+ delivery?: 'strict';
134
141
  /**
135
142
  * Override specific UI elements visibility
136
143
  * These overrides take precedence over the mode presets
@@ -1,7 +1,7 @@
1
1
  import { TimeDrillStep } from './interaction-types.js';
2
2
  import { SemaphorDerivedFieldDefinition, MatrixConfig, SemaphorSourceRef, SemaphorResultColumn, SemaphorPivotValue, SemaphorTimeGrain, SemanticGroupedTemporalInput, TemporalBucketMetadata, TemporalBucketFormat, MetricComparisonConfig, MetricComparisonPolarity } from '../../shared/analytics-protocol/index.js';
3
3
  import { CanonicalPivotResultContract, CanonicalPivotResultState, FlatTableExportTotalsBehavior, FlatTableExportTotalsRequest, QueryColumnKeyMap as SharedQueryColumnKeyMap } from '../../shared/format-utils/index.js';
4
- import { TemporalResultOwner } from '../../shared/dashboard-authoring/index.js';
4
+ import { CardQuerySourceRowEvidence, TemporalResultOwner } from '../../shared/dashboard-authoring/index.js';
5
5
  import { RelativeDateFilter } from '../../shared/analytics-protocol/relative-date-filter.js';
6
6
  /**
7
7
  * Special entity name marker for calculated fields.
@@ -700,6 +700,12 @@ export interface PaginationMetadata {
700
700
  totalCount: number;
701
701
  hasNextPage: boolean;
702
702
  hasPrevPage: boolean;
703
+ /**
704
+ * `verified` only when the count query returned its row; `unavailable` when
705
+ * it failed (the count shown is then today's fallback, never a fact). A
706
+ * server export sizes itself only from a verified count (Excel exports XL-D21).
707
+ */
708
+ totalCountStatus?: 'verified' | 'unavailable';
703
709
  }
704
710
  export { resolveQueryColumnKeyMapEntry, resolveUniqueQueryColumnKeyMapEntry, type QueryColumnKeyMapByRole, type QueryColumnKeyMapEntry, type QueryColumnKeyRole, } from '../../shared/format-utils/pivot-result-identity.js';
705
711
  export type QueryColumnKeyMap = SharedQueryColumnKeyMap;
@@ -708,7 +714,7 @@ export type TableTotalsRequest = FlatTableExportTotalsRequest;
708
714
  /**
709
715
  * Response structure for query execution (standard queries and comparison queries)
710
716
  */
711
- export interface QueryExecutionResponse {
717
+ export interface QueryExecutionResponse extends CardQuerySourceRowEvidence {
712
718
  records: any[];
713
719
  /** Execution owner captured with these exact result rows. */
714
720
  resultOwner?: TemporalResultOwner;
@@ -6861,7 +6861,7 @@ declare const exportRequestShape: z.ZodUnion<[z.ZodObject<{
6861
6861
  presentation: MatrixPresentationSchema;
6862
6862
  } & {
6863
6863
  mode: z.ZodLiteral<"flat">;
6864
- format: z.ZodLiteral<"csv">;
6864
+ format: z.ZodEnum<["csv", "xlsx"]>;
6865
6865
  }, "strict", z.ZodTypeAny, {
6866
6866
  mode: "flat";
6867
6867
  presentation: {
@@ -7086,7 +7086,7 @@ declare const exportRequestShape: z.ZodUnion<[z.ZodObject<{
7086
7086
  }[];
7087
7087
  } | undefined;
7088
7088
  };
7089
- format: "csv";
7089
+ format: "csv" | "xlsx";
7090
7090
  spec: {
7091
7091
  source: {
7092
7092
  kind: "semantic";
@@ -7379,7 +7379,7 @@ declare const exportRequestShape: z.ZodUnion<[z.ZodObject<{
7379
7379
  }[];
7380
7380
  } | undefined;
7381
7381
  };
7382
- format: "csv";
7382
+ format: "csv" | "xlsx";
7383
7383
  spec: {
7384
7384
  source: {
7385
7385
  kind: "semantic";
@@ -6,4 +6,4 @@
6
6
  * case's context from a saved dashboard with `projectSavedDashboardContext`.
7
7
  */
8
8
  export { AssistantContextSourceError, projectAssistantContext, type AssistantContextSource, type AssistantContextSourceIssue, } from './project-context.js';
9
- export { assistantCardReplayFields, buildSavedCardRequest, cardReplayOf, projectSavedDashboardContext, projectSavedDashboardTurn, type AssistantCardReplayFields, type SavedCardRequestRefusal, type SavedDashboardPlace, } from './saved-dashboard-context.js';
9
+ export { assistantCardReplayFields, buildSavedCardRequest, cardReplayOf, projectSavedDashboardContext, projectSavedDashboardTurn, type AssistantCardReplayFields, type SavedCardHost, type SavedCardRequestRefusal, type SavedDashboardPlace, } from './saved-dashboard-context.js';
@@ -1,5 +1,7 @@
1
- import { TCard, TDashboard } from '../../lib/types/common-types.js';
1
+ import { DashboardInputExecutionSnapshot, TCard, TDashboard } from '../../lib/types/common-types.js';
2
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
2
3
  import { CardViewStateMap } from '../../lib/dashboard-view-state/index.js';
4
+ import { ControlContractOverrides } from '../../lib/dashboard-inputs/control-contract-overrides.js';
3
5
  import { SemanticExecutionPayload } from '../../lib/types/semantic-runtime-types.js';
4
6
  import { CalendarContext } from '../report-runtime-context/index.js';
5
7
  import { ViewerStoreInputValues } from '../../lib/dashboard-viewer/compatibility-input-storage.js';
@@ -108,11 +110,25 @@ export declare function cardReplayOf(input: {
108
110
  message?: string;
109
111
  };
110
112
  /**
111
- * A saved card's request as a fresh viewer opens it (saved defaults, no
112
- * bookmark, no drill), for an external client's `fromCard` replay
113
- * (analytics agent Plan 1, Phase 3b, D3b-2). The same owners as the context:
114
- * the viewer baseline, the store's input values, the card's snapshot with its
115
- * request, and the server-request owner CSV export shares. Pure; the caller
113
+ * What a host opens a saved dashboard with, as a scheduled card attachment's
114
+ * print view gets it: default filter and control values, a saved control
115
+ * contract, and a saved input snapshot. Every field is optional; none at all
116
+ * is a fresh viewer (saved defaults).
117
+ */
118
+ export type SavedCardHost = {
119
+ filterValues?: readonly TFilterValue[];
120
+ controlValues?: Readonly<Record<string, unknown>>;
121
+ controlContract?: ControlContractOverrides;
122
+ dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
123
+ };
124
+ /**
125
+ * A saved card's request as a host opens it: by default a fresh viewer
126
+ * (saved defaults, no bookmark, no drill), for an external client's
127
+ * `fromCard` replay (analytics agent Plan 1, Phase 3b, D3b-2); with `host`,
128
+ * a scheduled card attachment's saved values, the values its print view
129
+ * opens with (Excel exports Phase 6). The same owners as the context: the
130
+ * viewer baseline, the store's input values, the card's snapshot with its
131
+ * request, and the server-request owner exports share. Pure; the caller
116
132
  * loads the dashboard, its semantic payload and calendar, and checks access.
117
133
  */
118
134
  export declare function buildSavedCardRequest(input: {
@@ -120,6 +136,7 @@ export declare function buildSavedCardRequest(input: {
120
136
  cardId: string;
121
137
  semanticExecutionPayload: SemanticExecutionPayload | undefined;
122
138
  calendar: CalendarContext;
139
+ host?: SavedCardHost;
123
140
  }): {
124
141
  status: 'ready';
125
142
  request: AssistantCardRequest;