react-semaphor 0.1.559 → 0.1.561

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/analytics-protocol/index.js +389 -378
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/analytics-base-schemas-CB3oFAXk.js +658 -0
  7. package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-DiVHY3Hw.js} +209 -211
  8. package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
  9. package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
  10. package/dist/chunks/{braces-Rdxa3H-s.js → braces-u8VorWJc.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-DDsIWJYT.js} +201 -201
  12. package/dist/chunks/{context-DVy4HOU0.js → context-TUjw9eqr.js} +1 -1
  13. package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-DfolidZ9.js} +1 -1
  14. package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-BRdZBPqr.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CgvTLndW.js} +1163 -1178
  16. package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-B4vfSzTF.js} +877 -941
  17. package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-Y3MF59g7.js} +5 -5
  18. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
  19. package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-DwjZcxj-.js} +9080 -9354
  20. package/dist/chunks/filter-reach-copy-bijwf_-b.js +3596 -0
  21. package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-DFnhwuEW.js} +3 -3
  22. package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
  23. package/dist/chunks/{index-B1Xr7W24.js → index-ClwbY3BL.js} +648 -674
  24. package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-CtvCBfOm.js} +1 -1
  25. package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-BklYgciR.js} +1 -1
  26. package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
  27. package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-CUorIB7Q.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-BSiGEXVC.js} +221 -214
  30. package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-95aC0uEO.js} +6 -6
  31. package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-B5wQhg5G.js} +1 -1
  32. package/dist/chunks/{palette-DMJtp3Vn.js → palette-DTnMhipt.js} +1 -1
  33. package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
  34. package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-olvXJoB9.js} +1 -1
  35. package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-C2YUIwKG.js} +55 -55
  36. package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-DoIUr3MP.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
  38. package/dist/chunks/{save-DSb1jTtG.js → save-DH4RyrnG.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-8jqfI7hI.js} +59 -59
  40. package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-CV7K4FI6.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-E2XWyibu.js} +40105 -41658
  42. package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-C29EUzDp.js} +570 -570
  43. package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
  44. package/dist/chunks/{switch-Dq8XPFpT.js → switch-balDSHc7.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-CK8tvh4d.js} +1 -1
  46. package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
  47. package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-DhYH5YKb.js} +1 -1
  48. package/dist/chunks/{upload-Dr_WAxHQ.js → upload-Ufj8vjyn.js} +1 -1
  49. package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
  50. package/dist/chunks/{validators-C87JPd-_.js → validators-BtaCFIEB.js} +1206 -1579
  51. package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2713 -1459
  54. package/dist/data-app-sdk/index.js +20 -20
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +10 -10
  57. package/dist/format-utils/index.js +262 -256
  58. package/dist/index.js +214 -215
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  63. package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
  65. package/dist/types/index.js +50 -51
  66. package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
  67. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  68. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
  69. package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
  70. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
  71. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
  72. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
  73. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  74. package/dist/types/lib/stores/editor-store.d.ts +48 -10
  75. package/dist/types/lib/stores/table-actions.d.ts +9 -5
  76. package/dist/types/lib/table-formatting/index.d.ts +0 -2
  77. package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
  78. package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
  79. package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
  80. package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
  81. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
  82. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
  83. package/dist/types/lib/types/common-types.d.ts +40 -47
  84. package/dist/types/lib/types/explorer-types.d.ts +11 -43
  85. package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
  86. package/dist/types/lib/utils/card-definition.d.ts +9 -187
  87. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +169 -513
  88. package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
  89. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
  90. package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
  91. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
  92. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
  93. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
  94. package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
  95. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
  96. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  97. package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
  98. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
  99. package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
  100. package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
  101. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
  102. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
  103. package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
  104. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  105. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
  106. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  107. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  108. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  109. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  110. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  111. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  112. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  113. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
  114. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
  115. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  116. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  117. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  118. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
  119. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
  120. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  121. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  122. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +555 -38
  123. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
  124. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
  125. package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
  126. package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
  127. package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
  128. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +7 -0
  129. package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
  130. package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
  131. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
  132. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
  133. package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
  134. package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
  135. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
  136. package/dist/types/shared/dashboard-authoring/index.d.ts +8 -0
  137. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  138. package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
  139. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
  140. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
  141. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
  142. package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
  143. package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
  144. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  145. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +13 -2
  146. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
  147. package/dist/types/shared/format-utils/index.d.ts +2 -0
  148. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
  149. package/dist/types/shared/format-utils/raw-temporal.d.ts +31 -1
  150. package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
  151. package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
  152. package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
  153. package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
  154. package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
  155. package/package.json +2 -2
  156. package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
  157. package/dist/chunks/bookmark-state-ssqrs5oP.js +0 -111
  158. package/dist/chunks/document-dashboard-inputs-ChVkcBuu.js +0 -3010
  159. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
  160. package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
  161. package/dist/chunks/global-date-filter-utils-DBzEOX9M.js +0 -12222
  162. package/dist/chunks/pivot-result-contract-expectations-DOYhqeZb.js +0 -1926
  163. package/dist/chunks/raw-temporal-presentation-BmT7z6NH.js +0 -584
  164. package/dist/chunks/resolve-dashboard-input-context-B_C_VAJH.js +0 -5520
  165. package/dist/chunks/table-settings-DXj_zXwS.js +0 -637
  166. package/dist/chunks/temporal-input-presentation-AhLSkGPf.js +0 -2939
  167. package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
  168. package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
@@ -133,186 +133,8 @@ export declare function buildMatrixPrintTable(input: {
133
133
  };
134
134
  levelLabels: Readonly<Record<string, string>>;
135
135
  measureLabels: Readonly<Record<string, string>>;
136
- levelFormats: Readonly<Record<string, import('../analytics-protocol/index.js').TemporalBucketFormat | {
137
- type: "date" | "datetime";
138
- pattern?: string | undefined;
139
- locale?: string | undefined;
140
- prefix?: string | undefined;
141
- suffix?: string | undefined;
142
- relative?: boolean | undefined;
143
- timezone?: string | undefined;
144
- sourceTimezone?: string | undefined;
145
- } | {
146
- type: "duration";
147
- prefix?: string | undefined;
148
- suffix?: string | undefined;
149
- negativeStyle?: "minus" | "parentheses" | undefined;
150
- inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
151
- outputStyle?: "compact" | "digital" | "long" | undefined;
152
- largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
153
- smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
154
- maxUnits?: number | undefined;
155
- } | {
156
- type: "string";
157
- prefix?: string | undefined;
158
- suffix?: string | undefined;
159
- } | {
160
- type: "number" | "currency" | "percent" | "percentage" | "scientific";
161
- currency?: string | undefined;
162
- minimumFractionDigits?: number | undefined;
163
- maximumFractionDigits?: number | undefined;
164
- useGrouping?: boolean | undefined;
165
- prefix?: string | undefined;
166
- suffix?: string | undefined;
167
- negativeStyle?: "minus" | "parentheses" | undefined;
168
- compact?: boolean | undefined;
169
- scale?: number | undefined;
170
- percentValueMode?: "fraction" | "whole" | undefined;
171
- }>>;
172
- measureFormats: Readonly<Record<string, import('../analytics-protocol/index.js').TemporalBucketFormat | {
173
- type: "date" | "datetime";
174
- pattern?: string | undefined;
175
- locale?: string | undefined;
176
- prefix?: string | undefined;
177
- suffix?: string | undefined;
178
- relative?: boolean | undefined;
179
- timezone?: string | undefined;
180
- sourceTimezone?: string | undefined;
181
- } | {
182
- type: "duration";
183
- prefix?: string | undefined;
184
- suffix?: string | undefined;
185
- negativeStyle?: "minus" | "parentheses" | undefined;
186
- inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
187
- outputStyle?: "compact" | "digital" | "long" | undefined;
188
- largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
189
- smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
190
- maxUnits?: number | undefined;
191
- } | {
192
- type: "string";
193
- prefix?: string | undefined;
194
- suffix?: string | undefined;
195
- } | {
196
- type: "number" | "currency" | "percent" | "percentage" | "scientific";
197
- currency?: string | undefined;
198
- minimumFractionDigits?: number | undefined;
199
- maximumFractionDigits?: number | undefined;
200
- useGrouping?: boolean | undefined;
201
- prefix?: string | undefined;
202
- suffix?: string | undefined;
203
- negativeStyle?: "minus" | "parentheses" | undefined;
204
- compact?: boolean | undefined;
205
- scale?: number | undefined;
206
- percentValueMode?: "fraction" | "whole" | undefined;
207
- }>>;
208
- conditionalFormatting?: {
209
- version: 1;
210
- rules: {
211
- id: string;
212
- target: {
213
- level: "row" | "cell";
214
- matrix?: {
215
- axis: "columns" | "rows";
216
- levelId?: string | undefined;
217
- oppositePath?: {
218
- member: {
219
- value: string | number | boolean | {
220
- value: string;
221
- type: "integer" | "decimal";
222
- kind: "exact_number";
223
- } | null;
224
- kind: "value";
225
- } | {
226
- kind: "others";
227
- rankingId: string;
228
- };
229
- levelId: string;
230
- }[] | undefined;
231
- } | undefined;
232
- columnIds?: string[] | undefined;
233
- conditionColumnId?: string | undefined;
234
- applyToColumnIds?: string[] | undefined;
235
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
236
- rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
237
- depth?: number | undefined;
238
- includeTotals?: boolean | undefined;
239
- includeSubtotals?: boolean | undefined;
240
- };
241
- condition: {
242
- value: string | number | boolean | {
243
- value: string;
244
- type: "integer" | "decimal";
245
- kind: "exact_number";
246
- } | null;
247
- kind: "comparison";
248
- operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
249
- columnId: string;
250
- } | {
251
- kind: "between";
252
- columnId: string;
253
- min: string | number | boolean | {
254
- value: string;
255
- type: "integer" | "decimal";
256
- kind: "exact_number";
257
- } | null;
258
- max: string | number | boolean | {
259
- value: string;
260
- type: "integer" | "decimal";
261
- kind: "exact_number";
262
- } | null;
263
- inclusive?: boolean | undefined;
264
- } | {
265
- kind: "blank";
266
- columnId: string;
267
- isBlank: boolean;
268
- } | {
269
- value: string;
270
- kind: "contains";
271
- columnId: string;
272
- exact?: boolean | undefined;
273
- caseSensitive?: boolean | undefined;
274
- } | {
275
- kind: "topBottom";
276
- count: number;
277
- columnId: string;
278
- direction: "top" | "bottom";
279
- } | {
280
- kind: "colorScale";
281
- columnId: string;
282
- range: "auto" | "manual";
283
- colors: {
284
- min: string;
285
- max: string;
286
- mid?: string | undefined;
287
- };
288
- min?: number | undefined;
289
- max?: number | undefined;
290
- mid?: number | undefined;
291
- } | {
292
- kind: "dataBar";
293
- columnId: string;
294
- range: "auto" | "manual";
295
- color: string;
296
- min?: number | undefined;
297
- max?: number | undefined;
298
- showValue?: boolean | undefined;
299
- };
300
- name?: string | undefined;
301
- enabled?: boolean | undefined;
302
- style?: {
303
- dataBar?: {
304
- color: string;
305
- showValue: boolean;
306
- } | undefined;
307
- backgroundColor?: string | undefined;
308
- textColor?: string | undefined;
309
- fontWeight?: "normal" | "medium" | "semibold" | "bold" | undefined;
310
- italic?: boolean | undefined;
311
- textDecoration?: "none" | "underline" | "line-through" | undefined;
312
- icon?: "arrowUp" | "arrowDown" | "warning" | "check" | "x" | undefined;
313
- } | undefined;
314
- }[];
315
- } | undefined;
136
+ levelFormats: Readonly<Record<string, import('../analytics-protocol/index.js').SemaphorValueFormat>>;
137
+ measureFormats: Readonly<Record<string, import('../analytics-protocol/index.js').SemaphorValueFormat>>;
316
138
  };
317
139
  mode: "layout";
318
140
  format: "csv" | "xlsx" | "pdf";
@@ -328,11 +150,11 @@ export declare function buildMatrixPrintTable(input: {
328
150
  kind: "physical";
329
151
  connectionId: string;
330
152
  tableName: string;
153
+ dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
331
154
  label?: string | undefined;
332
155
  connectionType?: string | undefined;
333
156
  databaseName?: string | undefined;
334
157
  schemaName?: string | undefined;
335
- dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
336
158
  };
337
159
  columns: readonly import('../analytics-protocol/index.js').MatrixLevel[];
338
160
  measures: readonly ({
@@ -374,8 +196,8 @@ export declare function buildMatrixPrintTable(input: {
374
196
  parent: readonly {
375
197
  member: {
376
198
  value: string | number | boolean | {
377
- value: string;
378
199
  type: "integer" | "decimal";
200
+ value: string;
379
201
  kind: "exact_number";
380
202
  } | null;
381
203
  kind: "value";
@@ -407,8 +229,8 @@ export declare function buildMatrixPrintTable(input: {
407
229
  path: readonly {
408
230
  member: {
409
231
  value: string | number | boolean | {
410
- value: string;
411
232
  type: "integer" | "decimal";
233
+ value: string;
412
234
  kind: "exact_number";
413
235
  } | null;
414
236
  kind: "value";
@@ -427,8 +249,8 @@ export declare function buildMatrixPrintTable(input: {
427
249
  path: readonly {
428
250
  member: {
429
251
  value: string | number | boolean | {
430
- value: string;
431
252
  type: "integer" | "decimal";
253
+ value: string;
432
254
  kind: "exact_number";
433
255
  } | null;
434
256
  kind: "value";
@@ -486,186 +308,8 @@ export declare function buildMatrixPrintTable(input: {
486
308
  };
487
309
  levelLabels: Readonly<Record<string, string>>;
488
310
  measureLabels: Readonly<Record<string, string>>;
489
- levelFormats: Readonly<Record<string, import('../analytics-protocol/index.js').TemporalBucketFormat | {
490
- type: "date" | "datetime";
491
- pattern?: string | undefined;
492
- locale?: string | undefined;
493
- prefix?: string | undefined;
494
- suffix?: string | undefined;
495
- relative?: boolean | undefined;
496
- timezone?: string | undefined;
497
- sourceTimezone?: string | undefined;
498
- } | {
499
- type: "duration";
500
- prefix?: string | undefined;
501
- suffix?: string | undefined;
502
- negativeStyle?: "minus" | "parentheses" | undefined;
503
- inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
504
- outputStyle?: "compact" | "digital" | "long" | undefined;
505
- largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
506
- smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
507
- maxUnits?: number | undefined;
508
- } | {
509
- type: "string";
510
- prefix?: string | undefined;
511
- suffix?: string | undefined;
512
- } | {
513
- type: "number" | "currency" | "percent" | "percentage" | "scientific";
514
- currency?: string | undefined;
515
- minimumFractionDigits?: number | undefined;
516
- maximumFractionDigits?: number | undefined;
517
- useGrouping?: boolean | undefined;
518
- prefix?: string | undefined;
519
- suffix?: string | undefined;
520
- negativeStyle?: "minus" | "parentheses" | undefined;
521
- compact?: boolean | undefined;
522
- scale?: number | undefined;
523
- percentValueMode?: "fraction" | "whole" | undefined;
524
- }>>;
525
- measureFormats: Readonly<Record<string, import('../analytics-protocol/index.js').TemporalBucketFormat | {
526
- type: "date" | "datetime";
527
- pattern?: string | undefined;
528
- locale?: string | undefined;
529
- prefix?: string | undefined;
530
- suffix?: string | undefined;
531
- relative?: boolean | undefined;
532
- timezone?: string | undefined;
533
- sourceTimezone?: string | undefined;
534
- } | {
535
- type: "duration";
536
- prefix?: string | undefined;
537
- suffix?: string | undefined;
538
- negativeStyle?: "minus" | "parentheses" | undefined;
539
- inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
540
- outputStyle?: "compact" | "digital" | "long" | undefined;
541
- largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
542
- smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
543
- maxUnits?: number | undefined;
544
- } | {
545
- type: "string";
546
- prefix?: string | undefined;
547
- suffix?: string | undefined;
548
- } | {
549
- type: "number" | "currency" | "percent" | "percentage" | "scientific";
550
- currency?: string | undefined;
551
- minimumFractionDigits?: number | undefined;
552
- maximumFractionDigits?: number | undefined;
553
- useGrouping?: boolean | undefined;
554
- prefix?: string | undefined;
555
- suffix?: string | undefined;
556
- negativeStyle?: "minus" | "parentheses" | undefined;
557
- compact?: boolean | undefined;
558
- scale?: number | undefined;
559
- percentValueMode?: "fraction" | "whole" | undefined;
560
- }>>;
561
- conditionalFormatting?: {
562
- version: 1;
563
- rules: {
564
- id: string;
565
- target: {
566
- level: "row" | "cell";
567
- matrix?: {
568
- axis: "columns" | "rows";
569
- levelId?: string | undefined;
570
- oppositePath?: {
571
- member: {
572
- value: string | number | boolean | {
573
- value: string;
574
- type: "integer" | "decimal";
575
- kind: "exact_number";
576
- } | null;
577
- kind: "value";
578
- } | {
579
- kind: "others";
580
- rankingId: string;
581
- };
582
- levelId: string;
583
- }[] | undefined;
584
- } | undefined;
585
- columnIds?: string[] | undefined;
586
- conditionColumnId?: string | undefined;
587
- applyToColumnIds?: string[] | undefined;
588
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
589
- rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
590
- depth?: number | undefined;
591
- includeTotals?: boolean | undefined;
592
- includeSubtotals?: boolean | undefined;
593
- };
594
- condition: {
595
- value: string | number | boolean | {
596
- value: string;
597
- type: "integer" | "decimal";
598
- kind: "exact_number";
599
- } | null;
600
- kind: "comparison";
601
- operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
602
- columnId: string;
603
- } | {
604
- kind: "between";
605
- columnId: string;
606
- min: string | number | boolean | {
607
- value: string;
608
- type: "integer" | "decimal";
609
- kind: "exact_number";
610
- } | null;
611
- max: string | number | boolean | {
612
- value: string;
613
- type: "integer" | "decimal";
614
- kind: "exact_number";
615
- } | null;
616
- inclusive?: boolean | undefined;
617
- } | {
618
- kind: "blank";
619
- columnId: string;
620
- isBlank: boolean;
621
- } | {
622
- value: string;
623
- kind: "contains";
624
- columnId: string;
625
- exact?: boolean | undefined;
626
- caseSensitive?: boolean | undefined;
627
- } | {
628
- kind: "topBottom";
629
- count: number;
630
- columnId: string;
631
- direction: "top" | "bottom";
632
- } | {
633
- kind: "colorScale";
634
- columnId: string;
635
- range: "auto" | "manual";
636
- colors: {
637
- min: string;
638
- max: string;
639
- mid?: string | undefined;
640
- };
641
- min?: number | undefined;
642
- max?: number | undefined;
643
- mid?: number | undefined;
644
- } | {
645
- kind: "dataBar";
646
- columnId: string;
647
- range: "auto" | "manual";
648
- color: string;
649
- min?: number | undefined;
650
- max?: number | undefined;
651
- showValue?: boolean | undefined;
652
- };
653
- name?: string | undefined;
654
- enabled?: boolean | undefined;
655
- style?: {
656
- dataBar?: {
657
- color: string;
658
- showValue: boolean;
659
- } | undefined;
660
- backgroundColor?: string | undefined;
661
- textColor?: string | undefined;
662
- fontWeight?: "normal" | "medium" | "semibold" | "bold" | undefined;
663
- italic?: boolean | undefined;
664
- textDecoration?: "none" | "underline" | "line-through" | undefined;
665
- icon?: "arrowUp" | "arrowDown" | "warning" | "check" | "x" | undefined;
666
- } | undefined;
667
- }[];
668
- } | undefined;
311
+ levelFormats: Readonly<Record<string, import('../analytics-protocol/index.js').SemaphorValueFormat>>;
312
+ measureFormats: Readonly<Record<string, import('../analytics-protocol/index.js').SemaphorValueFormat>>;
669
313
  };
670
314
  mode: "flat";
671
315
  format: "csv" | "xlsx";
@@ -681,11 +325,11 @@ export declare function buildMatrixPrintTable(input: {
681
325
  kind: "physical";
682
326
  connectionId: string;
683
327
  tableName: string;
328
+ dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
684
329
  label?: string | undefined;
685
330
  connectionType?: string | undefined;
686
331
  databaseName?: string | undefined;
687
332
  schemaName?: string | undefined;
688
- dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
689
333
  };
690
334
  columns: readonly import('../analytics-protocol/index.js').MatrixLevel[];
691
335
  measures: readonly ({
@@ -727,8 +371,8 @@ export declare function buildMatrixPrintTable(input: {
727
371
  parent: readonly {
728
372
  member: {
729
373
  value: string | number | boolean | {
730
- value: string;
731
374
  type: "integer" | "decimal";
375
+ value: string;
732
376
  kind: "exact_number";
733
377
  } | null;
734
378
  kind: "value";
@@ -1,10 +1,21 @@
1
1
  import { ExportWallClock } from './exporters/export-cells.js';
2
2
  import { CalendarContext } from '../report-runtime-context/report-runtime-context.js';
3
- import { RawTemporalValueKind, RawTemporalValueMetadata } from '../analytics-protocol/contracts.js';
3
+ import { RawDatePreset, RawTemporalValueKind, RawTemporalValueMetadata } from '../analytics-protocol/contracts.js';
4
4
  import { parseRawTemporalValueMetadata, validateRawTemporalResultColumn } from '../analytics-protocol/raw-temporal-contract.js';
5
5
  import { LocaleStyle, ResolvedValueFormatPreferences } from '../value-format-preferences/index.js';
6
6
  import { RawTemporalFormat, RawTemporalPatternDialect } from './types/format-types.js';
7
7
  export type { RawTemporalFormat, RawTemporalPatternDialect };
8
+ /**
9
+ * A stored raw date format's presentation (column formats CF-D4, CF-D16): its
10
+ * preset, its pattern in its dialect (unnamed means Semaphor tokens), else
11
+ * automatic. The one mapping for every raw date reader: detail columns and
12
+ * Matrix levels (ledger P5-44).
13
+ */
14
+ export declare function storedRawDatePresentation(format: {
15
+ pattern?: string;
16
+ dialect?: RawTemporalPatternDialect;
17
+ preset?: RawDatePreset;
18
+ }): RawTemporalFormat['presentation'];
8
19
  export { parseRawTemporalValueMetadata, validateRawTemporalResultColumn, type RawTemporalValueKind, type RawTemporalValueMetadata, };
9
20
  export type ResolvedTemporalStyleSet = {
10
21
  dateStyle: LocaleStyle;
@@ -26,6 +37,9 @@ export type ResolvedRawTemporalFormat = {
26
37
  mode: 'pattern';
27
38
  dialect: RawTemporalPatternDialect;
28
39
  pattern: string;
40
+ } | {
41
+ mode: 'preset';
42
+ preset: RawDatePreset;
29
43
  };
30
44
  };
31
45
  export type RawTemporalFormatResult = {
@@ -102,3 +116,19 @@ export declare function formatRawTemporalValue(input: {
102
116
  metadata: RawTemporalValueMetadata;
103
117
  format: ResolvedRawTemporalFormat;
104
118
  }): RawTemporalFormatResult;
119
+ /**
120
+ * One raw date column's formatter, as every raw-date renderer prepares it
121
+ * (a detail table, a SQL table, a Matrix level): the authored format resolved
122
+ * against the viewer's preferences, then prepared for the column's value
123
+ * kind. Throws when the column can't show the format; card settings call it
124
+ * to decide whether a format is usable (card appearance CA-D24).
125
+ */
126
+ export declare function prepareRawDateColumn(input: {
127
+ authored: RawTemporalFormat | undefined;
128
+ metadata: RawTemporalValueMetadata;
129
+ preferences: ResolvedValueFormatPreferences;
130
+ calendar: Pick<CalendarContext, 'tz'>;
131
+ }): {
132
+ format: ResolvedRawTemporalFormat;
133
+ formatValue: PreparedRawTemporalFormatter;
134
+ };
@@ -0,0 +1,43 @@
1
+ import { TCard } from '../../lib/types/common-types.js';
2
+ import { Field } from '../../lib/types/explorer-types.js';
3
+ import { SemaphorValueFormat } from '../analytics-protocol/contracts.js';
4
+ import { CardColumnRef } from '../dashboard-authoring/conditional-formatting/types.js';
5
+ /** Where a format shows. Only chart surfaces have a `valueFormat` of their own. */
6
+ export type FormatSurface = 'tableCell' | 'tableTotal' | 'kpiValue' | 'kpiDelta' | 'valueAxis' | 'tooltip' | 'dataLabel' | 'pieLabel' | 'export';
7
+ export type ColumnFormatSource = 'surface' | 'override' | 'model' | 'snapshot' | 'automatic';
8
+ export type ResolvedColumnFormat = {
9
+ /** The stored format to present; absent when the source is `automatic`. */
10
+ format?: SemaphorValueFormat;
11
+ source: ColumnFormatSource;
12
+ };
13
+ /** Live model formats by card field id, as the query response carries them (CF-D23). */
14
+ export type ModelFormats = Readonly<Record<string, SemaphorValueFormat>>;
15
+ type FormatCard = Pick<TCard, 'config' | 'preferences'>;
16
+ /** A card column by id, from every list a format can sit on. */
17
+ export declare function findCardColumn(card: FormatCard, fieldId: string): Field | undefined;
18
+ /**
19
+ * The one precedence (CF-D5), over the formats a caller found for a column:
20
+ * the surface's own, the card's override, the live model format, a snapshot;
21
+ * else automatic. `resolveColumnFormat` finds them on a card; the Matrix
22
+ * formatter, which holds a presentation and a catalog rather than a card,
23
+ * passes its own.
24
+ */
25
+ export declare function pickColumnFormat(candidates: {
26
+ surface?: SemaphorValueFormat;
27
+ override?: SemaphorValueFormat;
28
+ model?: SemaphorValueFormat;
29
+ snapshot?: SemaphorValueFormat;
30
+ }): ResolvedColumnFormat;
31
+ export declare function resolveColumnFormat(input: {
32
+ card: FormatCard;
33
+ column: CardColumnRef;
34
+ /** Where it shows; absent when only the column's own format is asked for. */
35
+ surface?: FormatSurface;
36
+ modelFormats?: ModelFormats;
37
+ /** A Matrix measure's or level's catalog format, its model format. */
38
+ catalogFormat?: SemaphorValueFormat;
39
+ }): ResolvedColumnFormat;
40
+ export declare function withLiveModelFormats<T extends NonNullable<TCard['config']>>(config: T | undefined, result: {
41
+ modelFormats?: ModelFormats;
42
+ } | undefined): T | undefined;
43
+ export {};
@@ -0,0 +1,68 @@
1
+ import { TFormatOptions } from '../../lib/types/common-types.js';
2
+ import { CanonicalDurationUnit } from './types/index.js';
3
+ import { AdaptedCanonicalFormatSpec, CanonicalAdapterOptions } from './semantic-format.js';
4
+ /** A stored `preferences.numberAxisFormat`. */
5
+ type RetiredNumberAxisFormat = {
6
+ decimalPlaces?: number;
7
+ minimumFractionDigits?: number;
8
+ maximumFractionDigits?: number;
9
+ suffix?: string;
10
+ currency?: string;
11
+ locale?: string;
12
+ useGrouping?: boolean;
13
+ percentValueMode?: 'fraction' | 'whole';
14
+ };
15
+ /** A stored table column number format (`columnSettingsMap[key].numberFormat`). */
16
+ export type RetiredColumnNumberFormat = {
17
+ style?: 'decimal' | 'currency' | 'percent' | 'scientific' | 'duration';
18
+ currency?: string;
19
+ locale?: string;
20
+ minimumFractionDigits?: number;
21
+ maximumFractionDigits?: number;
22
+ useGrouping?: boolean;
23
+ percentValueMode?: 'fraction' | 'whole';
24
+ scale?: number;
25
+ compact?: boolean;
26
+ negativeStyle?: 'minus' | 'parentheses';
27
+ signDisplay?: 'auto' | 'always' | 'exceptZero' | 'never';
28
+ prefix?: string;
29
+ suffix?: string;
30
+ duration?: {
31
+ inputUnit?: CanonicalDurationUnit;
32
+ outputStyle?: 'compact' | 'digital' | 'long';
33
+ largestUnit?: CanonicalDurationUnit;
34
+ smallestUnit?: CanonicalDurationUnit;
35
+ maxUnits?: number;
36
+ };
37
+ showDataBar?: boolean;
38
+ dataBarColor?: string;
39
+ dataBarMinValue?: number;
40
+ dataBarMaxValue?: number;
41
+ showHeatmap?: boolean;
42
+ };
43
+ export type LegacyFormatNumber = {
44
+ decimalPlaces?: number;
45
+ minimumFractionDigits?: number;
46
+ maximumFractionDigits?: number;
47
+ currency?: string;
48
+ locale?: string;
49
+ prefix?: string;
50
+ suffix?: string;
51
+ useGrouping?: boolean;
52
+ percentValueMode?: 'fraction' | 'whole';
53
+ enabled?: boolean | string;
54
+ };
55
+ export declare function fromTFormatOptions(format?: TFormatOptions | null, options?: CanonicalAdapterOptions): AdaptedCanonicalFormatSpec | undefined;
56
+ export declare function fromPersistedKpiFormatOptions(format?: TFormatOptions): AdaptedCanonicalFormatSpec | undefined;
57
+ export declare function fromLegacyFormatNumber(format?: LegacyFormatNumber | null): AdaptedCanonicalFormatSpec | undefined;
58
+ export declare function fromNumberAxisFormat(format?: RetiredNumberAxisFormat | null): AdaptedCanonicalFormatSpec | undefined;
59
+ export declare function fromColumnNumberFormat(format?: RetiredColumnNumberFormat | null, options?: CanonicalAdapterOptions): AdaptedCanonicalFormatSpec | undefined;
60
+ export declare function isHistoricalPersistedColumnNumberFormat(format?: RetiredColumnNumberFormat | null): boolean;
61
+ /**
62
+ * Reads the persisted table-column contract. The old settings editor seeded
63
+ * currency, locale, and data-bar leaves together; that bounded legacy shape
64
+ * rendered omitted precision with the table formatter's 0-2 fallback. Newly
65
+ * sparse formats do not match it and retain currency-minor-unit precision.
66
+ */
67
+ export declare function fromPersistedColumnNumberFormat(format?: RetiredColumnNumberFormat | null): AdaptedCanonicalFormatSpec | undefined;
68
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { SemaphorValueFormat } from '../analytics-protocol/index.js';
2
- import { CanonicalFormatSpec, CanonicalDurationUnit as DurationUnit, NumericCanonicalFormat, RawTemporalFormat } from './types/index.js';
2
+ import { CanonicalFormatSpec, CanonicalDurationUnit as DurationUnit, DateCanonicalFormat, NumericCanonicalFormat, RawTemporalFormat } from './types/index.js';
3
3
  export type AdaptedCanonicalFormatSpec = Exclude<CanonicalFormatSpec, RawTemporalFormat>;
4
4
  type LegacySemanticFormat = {
5
5
  type?: 'number' | 'currency' | 'percentage' | 'percent' | 'scientific' | 'date' | 'duration' | 'string';
@@ -16,7 +16,10 @@ type LegacySemanticFormat = {
16
16
  compact?: boolean;
17
17
  scale?: number;
18
18
  percentValueMode?: 'fraction' | 'whole';
19
+ signDisplay?: 'auto' | 'always' | 'exceptZero' | 'never';
19
20
  pattern?: string;
21
+ dialect?: DateCanonicalFormat['dialect'];
22
+ preset?: DateCanonicalFormat['preset'];
20
23
  relative?: boolean;
21
24
  timezone?: string;
22
25
  sourceTimezone?: string;
@@ -32,6 +35,7 @@ export type CanonicalAdapterOptions = {
32
35
  numericInput?: 'canonical';
33
36
  };
34
37
  export declare const DEFAULT_LOCALE = "en-US";
38
+ export declare function isHistoricalCodelessCurrencyFormat(format: LegacySemanticFormat): boolean;
35
39
  export declare function normalizeLocaleOrCurrency(value: unknown): string | undefined;
36
40
  export declare function normalizeNumericFormat(type: NumericCanonicalFormat['type'], format: LegacySemanticFormat, options?: CanonicalAdapterOptions): NumericCanonicalFormat;
37
41
  export declare function normalizeDateFormat(format: LegacySemanticFormat): Extract<CanonicalFormatSpec, {
@@ -0,0 +1,16 @@
1
+ import { SemaphorNumericValueFormat, SemaphorValueFormat } from '../analytics-protocol/contracts.js';
2
+ /**
3
+ * A percent with `scale` shows `value × scale × 100 %` (fraction) or
4
+ * `value × scale %` (whole) today. Stored as a number with that multiplier
5
+ * and a `%` suffix, it shows the same; `compact` goes (percent ignores it) and
6
+ * the digits become explicit (percent's default is one). `scale: 1` on a
7
+ * whole percent multiplies by nothing, so it stays a plain percent.
8
+ */
9
+ export declare function percentWithScaleAsNumber(format: SemaphorNumericValueFormat & {
10
+ scale: number;
11
+ }): SemaphorNumericValueFormat;
12
+ /**
13
+ * Converts a runtime or partly stored format to the stored type, or returns
14
+ * undefined for anything that is not a format.
15
+ */
16
+ export declare function toStoredValueFormat(format: unknown): SemaphorValueFormat | undefined;