react-semaphor 0.1.558 → 0.1.560

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 (139) hide show
  1. package/dist/analytics-protocol/index.js +368 -358
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/analytics-base-schemas-CHLxsPfX.js +630 -0
  7. package/dist/chunks/{assistant-chat-BCWoP6Rf.js → assistant-chat-Bu2fFm_I.js} +206 -207
  8. package/dist/chunks/{bookmark-state-PjQpxbG7.js → bookmark-state-BFY9oNmr.js} +3 -3
  9. package/dist/chunks/{braces-D5Ucy7q1.js → braces-Da41xfUd.js} +1 -1
  10. package/dist/chunks/{comparison-window-caption-Dc7BaCMz.js → comparison-window-caption-4FNkMrzE.js} +213 -213
  11. package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
  12. package/dist/chunks/{custom-visual-inputs-B-DLRGrV.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
  13. package/dist/chunks/{dashboard-wK6Bai4V.js → dashboard-_MeBuy67.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-Coqghdn6.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
  15. package/dist/chunks/{dashboard-controls-BYWSM2RM.js → dashboard-controls-Bi7fyG-4.js} +98 -98
  16. package/dist/chunks/{dashboard-json-pPTB5gj0.js → dashboard-json-B1mU_OMa.js} +5 -5
  17. package/dist/chunks/{document-dashboard-inputs-PY_7Xm55.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
  18. package/dist/chunks/{edit-dashboard-visual-BODxuUeq.js → edit-dashboard-visual-0CJN31Y3.js} +8274 -8514
  19. package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
  20. package/dist/chunks/{filter-value-text-CUBpotVN.js → filter-value-text-CRC-K_l_.js} +3 -3
  21. package/dist/chunks/{global-date-filter-utils-BsFqnnbA.js → global-date-filter-utils-D8365uPH.js} +4088 -3416
  22. package/dist/chunks/{index-DP_wQl0v.js → index-DtHidOPV.js} +579 -604
  23. package/dist/chunks/{layout-grid-CkoXmv0L.js → layout-grid-BvsH4RY2.js} +1 -1
  24. package/dist/chunks/{list-filter-B4i25kuc.js → list-filter-Dg0otx5E.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-4GTUDheD.js → matrix-analytical-definition-CM18W8w6.js} +41 -41
  26. package/dist/chunks/{matrix-card-fS_4O7zA.js → matrix-card-HPskLaPy.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-Dj7HaAHC.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-CpgLZ7E5.js → matrix-operation-contract-WPv4R-H_.js} +130 -130
  29. package/dist/chunks/{metric-comparison-C8LY7GG5.js → metric-comparison-ljMKYZKa.js} +2 -2
  30. package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
  31. package/dist/chunks/{palette-stlpjVk4.js → palette-Bsh376zO.js} +1 -1
  32. package/dist/chunks/{pivot-result-contract-expectations-DMk-mKhG.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
  33. package/dist/chunks/{pivot-result-identity-CrQ54Xbj.js → pivot-result-identity-vS9TSh4f.js} +1 -1
  34. package/dist/chunks/{raw-temporal-presentation-BI2z2LlB.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
  35. package/dist/chunks/{report-preferences-dialog-Dc-YyVwf.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
  36. package/dist/chunks/{report-runtime-context-CohdtiMg.js → report-runtime-context-BZQh9ywy.js} +2 -2
  37. package/dist/chunks/{resolve-dashboard-input-context-BZYI1hB0.js → resolve-dashboard-input-context-CAMiWvyR.js} +2021 -2239
  38. package/dist/chunks/{save-C1dgxgAu.js → save-B5EAsgQF.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-CIBoMq46.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
  40. package/dist/chunks/{selection-reducer-_d6aKJnj.js → selection-reducer-D0YnaAD9.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-ERTLU7B4.js → semaphor-ready-indicator-XLBLOJ2V.js} +38446 -39176
  42. package/dist/chunks/{shelf-drop-preview-context-fEnx6iL_.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
  43. package/dist/chunks/source-entity-resolution-dUG5VWRm.js +607 -0
  44. package/dist/chunks/{switch-BqUan2mN.js → switch-ByxH4M7t.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-CTCTA_bd.js → table-export-sheet-C_GdeTYU.js} +1 -1
  46. package/dist/chunks/{table-settings-DF1gdVQR.js → table-settings-Imz0FgWi.js} +8 -8
  47. package/dist/chunks/{temporal-input-presentation-DoSniQj1.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
  48. package/dist/chunks/{token-types-DFyLflLY.js → token-types-CQtXUVMy.js} +1 -1
  49. package/dist/chunks/{upload-DcoyjkRV.js → upload-wbR-NVzq.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-xhb9YFg-.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
  51. package/dist/chunks/validators-CXTneCA4.js +3453 -0
  52. package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +2207 -1496
  55. package/dist/data-app-sdk/index.js +20 -20
  56. package/dist/data-app-sdk-adapters/index.js +3 -3
  57. package/dist/data-app-sdk-validation/index.js +6 -6
  58. package/dist/format-utils/index.js +181 -176
  59. package/dist/index.js +22 -22
  60. package/dist/report-runtime-context/index.js +2 -2
  61. package/dist/style.css +1 -1
  62. package/dist/surfboard/index.js +2 -2
  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 +6 -6
  66. package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
  67. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
  68. package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
  69. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
  70. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
  71. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
  72. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  73. package/dist/types/lib/stores/editor-store.d.ts +39 -9
  74. package/dist/types/lib/stores/table-actions.d.ts +9 -3
  75. package/dist/types/lib/table-formatting/index.d.ts +0 -2
  76. package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
  77. package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
  78. package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
  79. package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
  80. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
  81. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
  82. package/dist/types/lib/types/common-types.d.ts +40 -47
  83. package/dist/types/lib/types/explorer-types.d.ts +13 -44
  84. package/dist/types/lib/utils/card-config-utils.d.ts +9 -1
  85. package/dist/types/lib/utils/card-definition.d.ts +9 -187
  86. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
  87. package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
  88. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
  89. package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
  90. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
  91. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
  92. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
  93. package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
  94. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
  95. package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
  96. package/dist/types/shared/analytics-protocol/source-capabilities.d.ts +21 -0
  97. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
  98. package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
  99. package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
  100. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
  101. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
  102. package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
  103. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
  104. package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
  105. package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
  106. package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
  107. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
  108. package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
  109. package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
  110. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
  111. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
  112. package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
  113. package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
  114. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
  115. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +2 -0
  116. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  117. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +4 -2
  118. package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
  119. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
  120. package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
  121. package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
  122. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
  123. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
  124. package/dist/types/shared/format-utils/index.d.ts +2 -0
  125. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
  126. package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
  127. package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
  128. package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
  129. package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
  130. package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
  131. package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
  132. package/package.json +1 -1
  133. package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
  134. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
  135. package/dist/chunks/filter-reach-copy-BvJH9JO-.js +0 -3411
  136. package/dist/chunks/source-entity-resolution-DXW1HpKf.js +0 -816
  137. package/dist/chunks/validators-hmfNNQz8.js +0 -3595
  138. package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
  139. package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
@@ -1,5 +1,5 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-Dc-YyVwf.js";
2
- import { C as f, E as D } from "../chunks/table-settings-DF1gdVQR.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-BV8L0SeS.js";
2
+ import { C as f, E as D } from "../chunks/table-settings-Imz0FgWi.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
5
5
  a as DisplayFormatPreferencesFields,
@@ -7,7 +7,7 @@ export declare function isDateDataType(dataType: string): boolean;
7
7
  export declare function isBooleanDataType(dataType: string): boolean;
8
8
  export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string, databaseName: string, capabilities: TDbCapabilities, qualifiedEntityName?: string): string | undefined;
9
9
  export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGen, calc?: AggregateCalc): SqlGen;
10
- export declare function getFilterValueType(filter: TFilter): "date" | "string" | "number" | "boolean";
10
+ export declare function getFilterValueType(filter: TFilter): "number" | "string" | "boolean" | "date";
11
11
  export declare function getColumnDataType(column: TDataColumn): string;
12
12
  export declare function isColumnInSqlGen(column: TDataColumn, sqlGen: SqlGen): boolean | undefined;
13
13
  export declare function resolveDatamodelName(datamodelName: string): string;
@@ -11,12 +11,6 @@ import { ConditionalFormattingRenderContext, TableBaseFormatting, TableBaseStyle
11
11
  import { ColumnTextWrap } from '../../../../lib/table-formatting/table-text-flow.js';
12
12
  import { RawTemporalValueKind, SemaphorResultColumn } from '../../../../shared/analytics-protocol/index.js';
13
13
  export type { ColumnTextWrap } from '../../../../lib/table-formatting/table-text-flow.js';
14
- export interface ColorRange {
15
- min: number;
16
- max: number;
17
- color: string;
18
- applyTo: 'cell' | 'row';
19
- }
20
14
  export interface LinkFormat {
21
15
  urlTemplate: string;
22
16
  labelType: 'value' | 'static' | 'column';
@@ -49,25 +43,18 @@ export interface ColumnSettings {
49
43
  scale?: number;
50
44
  compact?: boolean;
51
45
  negativeStyle?: 'minus' | 'parentheses';
46
+ /** Whether a sign shows (column formats CF-D16). */
47
+ signDisplay?: 'auto' | 'always' | 'exceptZero' | 'never';
52
48
  prefix?: string;
53
49
  suffix?: string;
54
50
  /** Duration options; read only when `style` is `duration`. */
55
51
  duration?: ColumnDurationFormat;
56
- showDataBar: boolean;
57
- dataBarColor: string;
58
- dataBarMinValue?: number;
59
- dataBarMaxValue?: number;
60
- /**
61
- * When true, render the cell bg with a heatmap intensity tint scaled
62
- * across the column's value range. Composes with the existing text
63
- * color/color-range logic (tint is bg only). `showDataBar` takes
64
- * precedence when both are set — per the canonical design, a cell is
65
- * either a data-bar or a heatmap, never both.
66
- */
67
- showHeatmap?: boolean;
68
52
  };
69
53
  dateFormat: {
70
54
  format: string;
55
+ /** A stored preset or a pattern's token dialect, until the panel picks a pattern (column formats ledger P5-25). */
56
+ preset?: 'short' | 'long' | 'numeric' | 'iso';
57
+ dialect?: 'semaphor_tokens' | 'date_fns';
71
58
  useCustomFormat: boolean;
72
59
  customFormat: string;
73
60
  useRelativeTime: boolean;
@@ -75,7 +62,6 @@ export interface ColumnSettings {
75
62
  sourceTimezone?: string;
76
63
  };
77
64
  linkFormat: LinkFormat;
78
- colorRanges: ColorRange[];
79
65
  }
80
66
  /**
81
67
  * Row rhythm for the whole table. Authors pick one per card; undefined
@@ -109,7 +95,6 @@ export type TableStylePreferences = {
109
95
  export type TablePreferences = {
110
96
  columnSettingsMap?: PersistedColumnSettingsMap;
111
97
  baseFormatting?: import('../../../../lib/table-formatting/table-formatting-types.js').TableBaseFormatting;
112
- conditionalFormatting?: import('../../../../lib/table-formatting/table-formatting-types.js').TableConditionalFormatting;
113
98
  selectColumnVisible?: boolean;
114
99
  columnVisibility?: Record<string, boolean>;
115
100
  columnSizing?: ColumnSizingState;
@@ -1,9 +1,9 @@
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 c, a as E, 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-DF1gdVQR.js";
2
- import { C as y, D as g, L as h, e as x, g as M, j as O, h as V, k, d as w, b as U, i as B, c as K, n as z, f as v } from "../chunks/validators-hmfNNQz8.js";
3
- import { D as q } from "../chunks/token-types-DFyLflLY.js";
4
- import { B as P, a as Q, p as j, r as W } from "../chunks/bookmark-state-PjQpxbG7.js";
5
- import { r as X, a as H } from "../chunks/pivot-result-identity-CrQ54Xbj.js";
6
- import { D as $ } from "../chunks/report-runtime-context-CohdtiMg.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 c, a as E, 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-Imz0FgWi.js";
2
+ import { C as y, D as g, L as h, e as x, g as M, j as O, h as V, k, d as w, b as U, i as B, c as K, n as z, f as v } from "../chunks/validators-CXTneCA4.js";
3
+ import { D as q } from "../chunks/token-types-CQtXUVMy.js";
4
+ import { B as P, a as Q, p as j, r as W } from "../chunks/bookmark-state-BFY9oNmr.js";
5
+ import { r as X, a as H } from "../chunks/pivot-result-identity-vS9TSh4f.js";
6
+ import { D as $ } from "../chunks/report-runtime-context-BZQh9ywy.js";
7
7
  const e = [
8
8
  "concatenate",
9
9
  "conditional-category",
@@ -1,34 +1,7 @@
1
- import { NumberAxisFormat, TFormatOptions } from '../types/common-types.js';
2
- import { FormatSpec } from '../types/explorer-types.js';
1
+ import { TFormatOptions } from '../types/common-types.js';
3
2
  import { ColumnSettings } from '../../components/visual/data-table/types/data-table.js';
4
3
  import { AdaptedCanonicalFormatSpec, CanonicalAdapterOptions } from '../../shared/format-utils/semantic-format.js';
4
+ export { fromTFormatOptions, fromColumnNumberFormat } from '../../shared/format-utils/retired-format-adapters.js';
5
5
  export type { CanonicalFormatSpec } from '../../shared/format-utils/types/index.js';
6
- export type LegacyFormatNumber = {
7
- decimalPlaces?: number;
8
- minimumFractionDigits?: number;
9
- maximumFractionDigits?: number;
10
- currency?: string;
11
- locale?: string;
12
- prefix?: string;
13
- suffix?: string;
14
- useGrouping?: boolean;
15
- percentValueMode?: 'fraction' | 'whole';
16
- enabled?: boolean | string;
17
- };
18
- export declare function fromTFormatOptions(format?: TFormatOptions | null, options?: CanonicalAdapterOptions): AdaptedCanonicalFormatSpec | undefined;
19
- export declare function fromPersistedKpiFormatOptions(format?: TFormatOptions): AdaptedCanonicalFormatSpec | undefined;
20
- export declare function fromLegacyFormatNumber(format?: LegacyFormatNumber | null): AdaptedCanonicalFormatSpec | undefined;
21
- export declare function fromNumberAxisFormat(format?: NumberAxisFormat | null): AdaptedCanonicalFormatSpec | undefined;
22
- export declare function fromColumnNumberFormat(format?: Partial<ColumnSettings['numberFormat']> | null, options?: CanonicalAdapterOptions): AdaptedCanonicalFormatSpec | undefined;
23
- export declare function isHistoricalPersistedColumnNumberFormat(format?: Partial<ColumnSettings['numberFormat']> | null): boolean;
24
- /**
25
- * Reads the persisted table-column contract. The old settings editor seeded
26
- * currency, locale, and data-bar leaves together; that bounded legacy shape
27
- * rendered omitted precision with the table formatter's 0-2 fallback. Newly
28
- * sparse formats do not match it and retain currency-minor-unit precision.
29
- */
30
- export declare function fromPersistedColumnNumberFormat(format?: Partial<ColumnSettings['numberFormat']> | null): AdaptedCanonicalFormatSpec | undefined;
31
- export declare function toSemanticFormat(format?: AdaptedCanonicalFormatSpec | null): FormatSpec | undefined;
32
6
  export declare function toTFormatOptions(format?: AdaptedCanonicalFormatSpec | null, options?: CanonicalAdapterOptions): TFormatOptions | undefined;
33
7
  export declare function toColumnNumberFormat(format?: AdaptedCanonicalFormatSpec | null, options?: CanonicalAdapterOptions): ColumnSettings['numberFormat'] | undefined;
34
- export declare function toLegacyFormatNumber(format?: AdaptedCanonicalFormatSpec | null): LegacyFormatNumber | undefined;
@@ -85,8 +85,6 @@ export declare function isDeclaredSqlRawTemporalPresentationCard(input: {
85
85
  card: TCard;
86
86
  effectiveCardConfig?: CardConfig;
87
87
  }): boolean;
88
- export declare function hasMissingDeclaredSqlCustomDateFormat(card: TCard): boolean;
89
- export declare function repairMissingDeclaredSqlCustomDateFormat(card: TCard): TCard;
90
88
  /**
91
89
  * Resolves config-owned detail-table presentation from one atomic physical
92
90
  * result. No card/store lookup or row mutation occurs at this boundary.
@@ -0,0 +1,47 @@
1
+ import { TCard } from '../types/common-types.js';
2
+ import { ColumnSettings, PersistedColumnSettings, PersistedColumnSettingsMap } from '../../components/visual/data-table/types/data-table.js';
3
+ import { TableFieldLookup } from '../table-formatting/table-presentation-fields.js';
4
+ type ColumnSettingsCard = Pick<TCard, 'preferences' | 'sql' | 'python'>;
5
+ /** A SQL or Python card, by the table renderer's rule (`resolveTablePresentationField`). */
6
+ export declare function isQueryTableCard(card: ColumnSettingsCard | undefined): boolean;
7
+ /**
8
+ * The one reader of a table card's saved column settings (column formats
9
+ * CF-D26). Non-format settings (type, link, width, alignment, visibility)
10
+ * come from `tablePrefs.columnSettingsMap`, whose retired format fields are
11
+ * never read. A SQL or Python card's column formats come from
12
+ * `preferences.sqlColumns`, handed over in the settings panel's shape that
13
+ * today's table, chart and export readers take; a config card's formats live
14
+ * on its columns. Phase 5's resolver reads `sqlColumns` itself.
15
+ */
16
+ export declare function readTableColumnSettings(card: ColumnSettingsCard | undefined): PersistedColumnSettingsMap;
17
+ export type ColumnSettingsEdit = {
18
+ columnId: string;
19
+ /** The panel's full settings after the edit, and before it; formats are taken from these. */
20
+ next?: ColumnSettings;
21
+ baseline?: ColumnSettings;
22
+ /** The sparse entry the panel's serializer made; its non-format settings are saved. Absent resets the column. */
23
+ entry?: PersistedColumnSettings;
24
+ /**
25
+ * How the column names its card field, as the table's cells find it
26
+ * (`tableColumnFieldLookup`): one pivot value's column names its measure,
27
+ * so its format edit is the measure's (ledger P5-29). Absent, by its id.
28
+ */
29
+ field?: TableFieldLookup;
30
+ };
31
+ /**
32
+ * Writes a column settings edit to the contract's stores (column formats
33
+ * CF-D7): non-format settings to `tablePrefs.columnSettingsMap`; a changed
34
+ * number or date format to `preferences.sqlColumns` on a SQL or Python card,
35
+ * or as the matching column's own format (an override) on a config card,
36
+ * where "use the metric's format" removes the override. Retired fields are
37
+ * never written.
38
+ */
39
+ export declare function applyColumnSettingsEdit(card: TCard, edit: ColumnSettingsEdit): TCard;
40
+ /**
41
+ * Resets every column's settings, as `applyColumnSettingsEdit` resets one:
42
+ * the settings entries, a SQL or Python card's column formats, and a config
43
+ * table's column format overrides, so each column follows its own model
44
+ * format again (column formats CF-D7, CF-D20).
45
+ */
46
+ export declare function resetAllTableColumnSettings(card: TCard): TCard;
47
+ export {};
@@ -63,188 +63,9 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
63
63
  };
64
64
  levelLabels: Readonly<Record<string, string>>;
65
65
  measureLabels: Readonly<Record<string, string>>;
66
- levelFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').TemporalBucketFormat | {
67
- type: "date" | "datetime";
68
- pattern?: string | undefined;
69
- locale?: string | undefined;
70
- prefix?: string | undefined;
71
- suffix?: string | undefined;
72
- relative?: boolean | undefined;
73
- timezone?: string | undefined;
74
- sourceTimezone?: string | undefined;
75
- } | {
76
- type: "duration";
77
- prefix?: string | undefined;
78
- suffix?: string | undefined;
79
- negativeStyle?: "minus" | "parentheses" | undefined;
80
- inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
81
- outputStyle?: "compact" | "digital" | "long" | undefined;
82
- largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
83
- smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
84
- maxUnits?: number | undefined;
85
- } | {
86
- type: "string";
87
- prefix?: string | undefined;
88
- suffix?: string | undefined;
89
- } | {
90
- type: "number" | "currency" | "percent" | "percentage" | "scientific";
91
- currency?: string | undefined;
92
- minimumFractionDigits?: number | undefined;
93
- maximumFractionDigits?: number | undefined;
94
- useGrouping?: boolean | undefined;
95
- prefix?: string | undefined;
96
- suffix?: string | undefined;
97
- negativeStyle?: "minus" | "parentheses" | undefined;
98
- compact?: boolean | undefined;
99
- scale?: number | undefined;
100
- percentValueMode?: "fraction" | "whole" | undefined;
101
- }>>;
102
- measureFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').TemporalBucketFormat | {
103
- type: "date" | "datetime";
104
- pattern?: string | undefined;
105
- locale?: string | undefined;
106
- prefix?: string | undefined;
107
- suffix?: string | undefined;
108
- relative?: boolean | undefined;
109
- timezone?: string | undefined;
110
- sourceTimezone?: string | undefined;
111
- } | {
112
- type: "duration";
113
- prefix?: string | undefined;
114
- suffix?: string | undefined;
115
- negativeStyle?: "minus" | "parentheses" | undefined;
116
- inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
117
- outputStyle?: "compact" | "digital" | "long" | undefined;
118
- largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
119
- smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
120
- maxUnits?: number | undefined;
121
- } | {
122
- type: "string";
123
- prefix?: string | undefined;
124
- suffix?: string | undefined;
125
- } | {
126
- type: "number" | "currency" | "percent" | "percentage" | "scientific";
127
- currency?: string | undefined;
128
- minimumFractionDigits?: number | undefined;
129
- maximumFractionDigits?: number | undefined;
130
- useGrouping?: boolean | undefined;
131
- prefix?: string | undefined;
132
- suffix?: string | undefined;
133
- negativeStyle?: "minus" | "parentheses" | undefined;
134
- compact?: boolean | undefined;
135
- scale?: number | undefined;
136
- percentValueMode?: "fraction" | "whole" | undefined;
137
- }>>;
138
- conditionalFormatting?: {
139
- version: 1;
140
- rules: {
141
- id: string;
142
- target: {
143
- level: "row" | "cell";
144
- matrix?: {
145
- axis: "columns" | "rows";
146
- levelId?: string | undefined;
147
- oppositePath?: {
148
- member: {
149
- value: string | number | boolean | {
150
- value: string;
151
- type: "integer" | "decimal";
152
- kind: "exact_number";
153
- } | null;
154
- kind: "value";
155
- } | {
156
- kind: "others";
157
- rankingId: string;
158
- };
159
- levelId: string;
160
- }[] | undefined;
161
- } | undefined;
162
- columnIds?: string[] | undefined;
163
- conditionColumnId?: string | undefined;
164
- applyToColumnIds?: string[] | undefined;
165
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
166
- rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
167
- depth?: number | undefined;
168
- includeTotals?: boolean | undefined;
169
- includeSubtotals?: boolean | undefined;
170
- };
171
- condition: {
172
- value: string | number | boolean | {
173
- value: string;
174
- type: "integer" | "decimal";
175
- kind: "exact_number";
176
- } | null;
177
- kind: "comparison";
178
- operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
179
- columnId: string;
180
- } | {
181
- kind: "between";
182
- columnId: string;
183
- min: string | number | boolean | {
184
- value: string;
185
- type: "integer" | "decimal";
186
- kind: "exact_number";
187
- } | null;
188
- max: string | number | boolean | {
189
- value: string;
190
- type: "integer" | "decimal";
191
- kind: "exact_number";
192
- } | null;
193
- inclusive?: boolean | undefined;
194
- } | {
195
- kind: "blank";
196
- columnId: string;
197
- isBlank: boolean;
198
- } | {
199
- value: string;
200
- kind: "contains";
201
- columnId: string;
202
- exact?: boolean | undefined;
203
- caseSensitive?: boolean | undefined;
204
- } | {
205
- kind: "topBottom";
206
- count: number;
207
- columnId: string;
208
- direction: "top" | "bottom";
209
- } | {
210
- kind: "colorScale";
211
- columnId: string;
212
- range: "auto" | "manual";
213
- colors: {
214
- min: string;
215
- max: string;
216
- mid?: string | undefined;
217
- };
218
- min?: number | undefined;
219
- max?: number | undefined;
220
- mid?: number | undefined;
221
- } | {
222
- kind: "dataBar";
223
- columnId: string;
224
- range: "auto" | "manual";
225
- color: string;
226
- min?: number | undefined;
227
- max?: number | undefined;
228
- showValue?: boolean | undefined;
229
- };
230
- name?: string | undefined;
231
- enabled?: boolean | undefined;
232
- style?: {
233
- dataBar?: {
234
- color: string;
235
- showValue: boolean;
236
- } | undefined;
237
- backgroundColor?: string | undefined;
238
- textColor?: string | undefined;
239
- fontWeight?: "normal" | "medium" | "semibold" | "bold" | undefined;
240
- italic?: boolean | undefined;
241
- textDecoration?: "none" | "underline" | "line-through" | undefined;
242
- icon?: "arrowUp" | "arrowDown" | "warning" | "check" | "x" | undefined;
243
- } | undefined;
244
- }[];
245
- } | undefined;
66
+ levelFormats: Readonly<Record<string, SemaphorValueFormat>>;
67
+ measureFormats: Readonly<Record<string, SemaphorValueFormat>>;
246
68
  };
247
- version: 1;
248
69
  spec: {
249
70
  source: {
250
71
  kind: "semantic";
@@ -257,11 +78,11 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
257
78
  kind: "physical";
258
79
  connectionId: string;
259
80
  tableName: string;
81
+ dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
260
82
  label?: string | undefined;
261
83
  connectionType?: string | undefined;
262
84
  databaseName?: string | undefined;
263
85
  schemaName?: string | undefined;
264
- dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
265
86
  };
266
87
  columns: readonly import('../../shared/analytics-protocol/index.js').MatrixLevel[];
267
88
  measures: readonly ({
@@ -303,8 +124,8 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
303
124
  parent: readonly {
304
125
  member: {
305
126
  value: string | number | boolean | {
306
- value: string;
307
127
  type: "integer" | "decimal";
128
+ value: string;
308
129
  kind: "exact_number";
309
130
  } | null;
310
131
  kind: "value";
@@ -328,6 +149,7 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
328
149
  } | undefined;
329
150
  measureFilters?: readonly import('../../shared/analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
330
151
  };
152
+ version: 1;
331
153
  defaultView: {
332
154
  columns: {
333
155
  depth: number;
@@ -335,8 +157,8 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
335
157
  path: readonly {
336
158
  member: {
337
159
  value: string | number | boolean | {
338
- value: string;
339
160
  type: "integer" | "decimal";
161
+ value: string;
340
162
  kind: "exact_number";
341
163
  } | null;
342
164
  kind: "value";
@@ -355,8 +177,8 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
355
177
  path: readonly {
356
178
  member: {
357
179
  value: string | number | boolean | {
358
- value: string;
359
180
  type: "integer" | "decimal";
181
+ value: string;
360
182
  kind: "exact_number";
361
183
  } | null;
362
184
  kind: "value";
@@ -397,7 +219,7 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
397
219
  entityType: import('../types/explorer-types.js').EntityType;
398
220
  expression?: string;
399
221
  calculatedFormula?: import('../types/explorer-types.js').CalculatedFieldFormula;
400
- format?: import('../types/explorer-types.js').FormatSpec;
222
+ format?: SemaphorValueFormat;
401
223
  semanticTemporalPresentation?: import('../types/explorer-types.js').SemanticTemporalPresentation;
402
224
  aggregate?: import('../types/explorer-types.js').AggregateFunction;
403
225
  aggregateOrigin?: "default" | "explicit";
@@ -435,7 +257,7 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
435
257
  entityType: import('../types/explorer-types.js').EntityType;
436
258
  expression?: string;
437
259
  calculatedFormula?: import('../types/explorer-types.js').CalculatedFieldFormula;
438
- format?: import('../types/explorer-types.js').FormatSpec;
260
+ format?: SemaphorValueFormat;
439
261
  semanticTemporalPresentation?: import('../types/explorer-types.js').SemanticTemporalPresentation;
440
262
  aggregate?: import('../types/explorer-types.js').AggregateFunction;
441
263
  aggregateOrigin?: "default" | "explicit";
@@ -474,7 +296,7 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
474
296
  entityType: import('../types/explorer-types.js').EntityType;
475
297
  expression?: string;
476
298
  calculatedFormula?: import('../types/explorer-types.js').CalculatedFieldFormula;
477
- format?: import('../types/explorer-types.js').FormatSpec;
299
+ format?: SemaphorValueFormat;
478
300
  semanticTemporalPresentation?: import('../types/explorer-types.js').SemanticTemporalPresentation;
479
301
  aggregateOrigin?: "default" | "explicit";
480
302
  calculationRepresentation?: "inline-expression" | "manual" | "typed-derived";
@@ -31,4 +31,4 @@ export declare function matrixDeliveryOptions(allowDownload?: boolean, content?:
31
31
  formats: ("csv" | "xlsx" | "pdf" | "png")[];
32
32
  };
33
33
  /** Matrix delivery requires an effective capture, never resident cells. */
34
- export declare function resolveMatrixExportEngine(card: TCard | null | undefined, hasContext: boolean): "unavailable" | "window" | "ordinary";
34
+ export declare function resolveMatrixExportEngine(card: TCard | null | undefined, hasContext: boolean): "window" | "unavailable" | "ordinary";