react-semaphor 0.1.602 → 0.1.603

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 (107) hide show
  1. package/dist/analytics-protocol/index.js +415 -375
  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 +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
  8. package/dist/chunks/{assistant-chat-BWF3GYip.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-BF3iRx5a.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-CBSTdW6q.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-B8XHwMY6.js → card-filter-builder-Y22HizVx.js} +104 -104
  12. package/dist/chunks/{comparison-window-caption-W83qB4V5.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
  13. package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
  14. package/dist/chunks/{dashboard-DG5EIYYB.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CBSrhyWZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +103 -103
  16. package/dist/chunks/{dashboard-controls-D6ECO4N1.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-DrJftBSL.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-BDYAJIbb.js → edit-dashboard-visual-oxt3x1wb.js} +7976 -8184
  20. package/dist/chunks/{filter-line-BXT6y303.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-BukhZmzm.js → filter-reach-copy-CE_ZX147.js} +1590 -1729
  22. package/dist/chunks/{filter-value-text-D3-bf3_b.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-BW0yozjs.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-Ds0diMeY.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CgQgVeeI.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
  26. package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
  27. package/dist/chunks/{matrix-operation-contract--DkNCOzd.js → matrix-operation-contract-DPBj69D8.js} +3 -2
  28. package/dist/chunks/{metric-comparison-zMylnIkc.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-CX8pao1j.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-CuA0HlzF.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C8KL7hPx.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-C1AOH1PS.js → pivot-result-identity-CAP4--iq.js} +1 -1
  33. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
  34. package/dist/chunks/{report-preferences-dialog-CbuVNDGi.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-E7USjN7E.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CULCE_hM.js → resolve-dashboard-input-context-Rtl1ffmE.js} +7115 -6963
  37. package/dist/chunks/{save-BKHlDONy.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-C1WlOx5z.js → saved-dashboard-context-tcyTU8jm.js} +193 -207
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-CBIRcDWs.js → semaphor-ready-indicator-FBvunj6S.js} +35550 -35273
  41. package/dist/chunks/{shelf-drop-preview-context-xR69SMA8.js → shelf-drop-preview-context-QKStrcK9.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-BuM8vnWf.js → stored-dashboard-CHozcAY9.js} +621 -616
  43. package/dist/chunks/{style-sheet-parts-Bt9ZNre8.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-DVljtHkG.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-D_xKgyVS.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Dll_M7XQ.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-ClWHpYql.js → validators-Baf3VIf5.js} +3 -3
  48. package/dist/chunks/{variable-draft-CDGGl53R.js → variable-draft-C2y8Jp6Z.js} +3 -3
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2466 -2343
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +20 -20
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  57. package/dist/types/index.js +5 -5
  58. package/dist/types/lib/document/document-edits.d.ts +0 -4
  59. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  60. package/dist/types/lib/types/common-types.d.ts +0 -2
  61. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  62. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  63. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  64. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  65. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  66. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  67. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  68. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  69. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  70. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  71. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  72. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  73. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
  74. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  76. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
  79. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  81. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  82. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  84. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  85. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  86. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  87. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  88. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  89. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  91. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
  92. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
  93. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  94. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  95. package/dist/types/shared/format-utils/index.d.ts +1 -0
  96. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  97. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  98. package/dist/types/shared/temporal/index.d.ts +2 -0
  99. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  100. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  101. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  102. package/dist/usage-events/index.js +1 -1
  103. package/package.json +3 -2
  104. package/dist/chunks/dates-Bz-qM5px.js +0 -164
  105. package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
  106. package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
  107. package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
@@ -1,6 +1,30 @@
1
1
  import { SemaphorFieldRef, SemaphorTimeGrain, SemaphorValidationResult } from './contracts.js';
2
2
  import { TemporalShift } from '../temporal/calendar-periods.js';
3
- export type MetricComparisonSpec = {
3
+ import { ComparisonWindowShape } from './comparison-choices.js';
4
+ /**
5
+ * How far back a comparison steps (compare-with CW-D3): the window's own
6
+ * length (`period`, the previous period) or a fixed calendar unit.
7
+ */
8
+ export type ComparisonUnit = 'period' | 'day' | 'week' | 'month' | 'quarter' | 'year';
9
+ export declare const COMPARISON_UNITS: readonly ["period", "day", "week", "month", "quarter", "year"];
10
+ /** A step back: `offset` units (1 when absent); only a step by years may match weekdays (364 days a year, CW-D4). */
11
+ export type ComparisonShiftSpec = {
12
+ kind: 'shift';
13
+ unit: ComparisonUnit;
14
+ offset?: number;
15
+ matchWeekdays?: true;
16
+ };
17
+ /** What a measure is compared with: a step back, or a fixed number. */
18
+ export type MetricComparisonSpec = ComparisonShiftSpec | {
19
+ kind: 'target';
20
+ targetValue: number;
21
+ };
22
+ /**
23
+ * The period shapes saved before Compare with (CW-D5): still on stored cards,
24
+ * Date filter selections, bookmarks and variables, read through
25
+ * `readMetricComparisonSpec` and never written.
26
+ */
27
+ export type LegacyPeriodComparisonSpec = {
4
28
  kind: 'previous_period';
5
29
  offsetPeriods?: number;
6
30
  alignment?: 'calendar' | 'weekday';
@@ -10,16 +34,29 @@ export type MetricComparisonSpec = {
10
34
  offsetYears?: number;
11
35
  alignment?: 'calendar' | 'weekday';
12
36
  toDate?: boolean;
13
- } | {
14
- kind: 'target';
15
- targetValue: number;
16
37
  };
38
+ /** A comparison as stored: the spec, or a shape saved before Compare with. */
39
+ export type StoredMetricComparisonSpec = MetricComparisonSpec | LegacyPeriodComparisonSpec;
17
40
  export type MetricComparisonConfig = {
18
41
  mode: 'off';
19
42
  } | {
20
43
  mode: 'explicit';
21
- spec: MetricComparisonSpec;
44
+ spec: StoredMetricComparisonSpec;
22
45
  };
46
+ /**
47
+ * The one reader of a stored comparison (CW-D5, CW-INV-4): an old period
48
+ * shape becomes a step back (`previous_period` by the window's own length,
49
+ * `previous_year` by years, matching weekdays when it aligned by weekday); a
50
+ * stored `toDate` says nothing (CW-D2); a weekday alignment on a previous
51
+ * period is dropped (no saved card has one, ledger IN-03). An offset of 1 is
52
+ * left out.
53
+ */
54
+ export declare function readMetricComparisonSpec(spec: StoredMetricComparisonSpec): MetricComparisonSpec;
55
+ /** What a comparison is called in results and metadata (CW-D13): a step by years is the previous year. */
56
+ export type ComparisonFamily = 'previous_period' | 'previous_year' | 'target';
57
+ export declare function comparisonFamily(spec: StoredMetricComparisonSpec): ComparisonFamily;
58
+ /** How many steps back (1 when absent). */
59
+ export declare function comparisonOffset(spec: ComparisonShiftSpec): number;
23
60
  export type MetricComparisonPolarity = 'higher_is_better' | 'lower_is_better' | 'neutral';
24
61
  export declare const DEFAULT_METRIC_COMPARISON_POLARITY: "higher_is_better";
25
62
  export type ComparisonPresentationSpec = {
@@ -55,14 +92,15 @@ export declare const COMPARISON_PRESENTATION_DEFAULTS: {
55
92
  readonly showColor: true;
56
93
  readonly conditionalLabel: false;
57
94
  };
58
- export type ViewerPeriodComparisonSpec = Extract<MetricComparisonSpec, {
59
- kind: 'previous_period' | 'previous_year';
60
- }>;
95
+ /** A comparison a dashboard date can carry: a step back, never a target. */
96
+ export type ViewerPeriodComparisonSpec = ComparisonShiftSpec;
97
+ /** A dashboard date's comparison as stored: a step back, or a period shape saved before Compare with. */
98
+ export type StoredViewerPeriodComparisonSpec = ComparisonShiftSpec | LegacyPeriodComparisonSpec;
61
99
  export type GlobalDateComparisonSelection = {
62
100
  mode: 'off';
63
101
  } | {
64
102
  mode: 'period';
65
- spec: ViewerPeriodComparisonSpec;
103
+ spec: StoredViewerPeriodComparisonSpec;
66
104
  };
67
105
  export type DashboardDateComparisonOwner = {
68
106
  kind: 'global_date';
@@ -84,6 +122,39 @@ export type ResolvedMetricComparisonRequest = {
84
122
  spec: ViewerPeriodComparisonSpec;
85
123
  owner?: DashboardDateComparisonOwner;
86
124
  };
125
+ /**
126
+ * What a measure compares with, as one of three states (compare-with CW-D17):
127
+ * `pinned` to its own step or target (any stored comparison reads as pinned,
128
+ * CW-D20), `off`, or `follow` the Date filter's comparison. A measure with no
129
+ * comparison of its own on a card saved with "Inherit Global Date comparison"
130
+ * off reads as off, what it showed (CW-D21); the card switch is read here and
131
+ * nowhere else.
132
+ */
133
+ export type MeasureComparisonState = {
134
+ state: 'follow';
135
+ } | {
136
+ state: 'pinned';
137
+ spec: MetricComparisonSpec;
138
+ } | {
139
+ state: 'off';
140
+ };
141
+ export declare function readMeasureComparisonState(input: {
142
+ metricComparison?: MetricComparisonConfig;
143
+ inheritGlobalComparison?: false;
144
+ /**
145
+ * The card's comparisons are saved hidden ("Show comparison" off): every
146
+ * measure reads as off and none runs (compare-with CW-D28).
147
+ */
148
+ hidden?: boolean;
149
+ }): MeasureComparisonState;
150
+ /** Whether a card's comparisons are saved hidden ("Show comparison" off), the one reading of it (CW-D28). */
151
+ export declare function comparisonsHidden(presentation: Pick<ComparisonPresentationSpec, 'showComparison'> | undefined): boolean;
152
+ /**
153
+ * The comparison a measure runs with, from its state alone (CW-D17): pinned
154
+ * runs its own, follow runs the Date filter's comparison when there is one,
155
+ * off runs none. What asks decides what reaches it: a text variable gets no
156
+ * Date filter comparison (CW-D22), so it never follows.
157
+ */
87
158
  export declare function resolveMetricComparisonRequest(input: {
88
159
  metricComparison?: MetricComparisonConfig;
89
160
  inheritGlobalComparison?: false;
@@ -96,7 +167,9 @@ export type ResolvedDateWindow = {
96
167
  };
97
168
  export type ComparisonUnavailableReason = 'finite_current_window_required' | 'current_window_not_started'
98
169
  /** The date ranges the run applies to the field have no instant in common. */
99
- | 'current_window_empty' | 'temporal_binding_missing' | 'temporal_binding_ambiguous' | 'temporal_binding_invalid' | 'unsupported_output_shape' | 'unsupported_raw_sql' | 'insufficient_history' | 'invalid_comparison_spec' | 'comparison_execution_failed';
170
+ | 'current_window_empty' | 'temporal_binding_missing' | 'temporal_binding_ambiguous' | 'temporal_binding_invalid' | 'unsupported_output_shape' | 'unsupported_raw_sql' | 'insufficient_history'
171
+ /** A fixed step shorter than the window: the earlier window would overlap it (compare-with CW-D7). */
172
+ | 'overlaps_current_window' | 'invalid_comparison_spec' | 'comparison_execution_failed';
100
173
  export type ComparisonAvailability = {
101
174
  status: 'available';
102
175
  } | {
@@ -110,7 +183,15 @@ export type MetricComparisonOutputBase = {
110
183
  metricAlias: string;
111
184
  currentColumnKey: string;
112
185
  windowGrain?: MetricComparisonWindowGrain;
186
+ /** The current window as the run filtered it: cut at the run instant while it is still running (CW-D1). */
113
187
  currentWindow?: ResolvedDateWindow;
188
+ /**
189
+ * What the current window is, for naming its comparison (CW-D12, CW-D15):
190
+ * the window the user picked (This month), or a range whole and on the
191
+ * report calendar, worked out once where the run plans it. A running month
192
+ * then reads "Previous month", not its elapsed days (ledger P4-11).
193
+ */
194
+ windowShape?: ComparisonWindowShape;
114
195
  comparisonWindow?: ResolvedDateWindow;
115
196
  /**
116
197
  * How far back `comparisonWindow` sits from `currentWindow`: the one step a
@@ -158,7 +239,8 @@ export type MetricComparisonOutput = MetricComparisonOutputBase & ({
158
239
  comparisonSourceBucketColumnKey?: never;
159
240
  });
160
241
  export type MetricComparisonMetadataEntry = {
161
- type: MetricComparisonSpec['kind'];
242
+ /** The comparison's family (CW-D13), not the spec's kind. */
243
+ type: ComparisonFamily;
162
244
  displayName?: string;
163
245
  displayLabel?: string;
164
246
  output: MetricComparisonOutput;
@@ -625,15 +625,15 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
625
625
  title: string;
626
626
  unsavedEdits: boolean;
627
627
  } | undefined;
628
- sheet?: {
629
- id: string;
630
- title: string;
631
- } | undefined;
632
628
  omitted?: {
633
629
  cards?: number | undefined;
634
630
  otherSheets?: number | undefined;
635
631
  activeInputs?: number | undefined;
636
632
  } | undefined;
633
+ sheet?: {
634
+ id: string;
635
+ title: string;
636
+ } | undefined;
637
637
  selectedCard?: {
638
638
  id: string;
639
639
  description: {
@@ -717,15 +717,15 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
717
717
  title: string;
718
718
  unsavedEdits: boolean;
719
719
  } | undefined;
720
- sheet?: {
721
- id: string;
722
- title: string;
723
- } | undefined;
724
720
  omitted?: {
725
721
  cards?: number | undefined;
726
722
  otherSheets?: number | undefined;
727
723
  activeInputs?: number | undefined;
728
724
  } | undefined;
725
+ sheet?: {
726
+ id: string;
727
+ title: string;
728
+ } | undefined;
729
729
  selectedCard?: {
730
730
  id: string;
731
731
  description: {
@@ -809,15 +809,15 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
809
809
  title: string;
810
810
  unsavedEdits: boolean;
811
811
  } | undefined;
812
- sheet?: {
813
- id: string;
814
- title: string;
815
- } | undefined;
816
812
  omitted?: {
817
813
  cards?: number | undefined;
818
814
  otherSheets?: number | undefined;
819
815
  activeInputs?: number | undefined;
820
816
  } | undefined;
817
+ sheet?: {
818
+ id: string;
819
+ title: string;
820
+ } | undefined;
821
821
  selectedCard?: {
822
822
  id: string;
823
823
  description: {
@@ -901,15 +901,15 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
901
901
  title: string;
902
902
  unsavedEdits: boolean;
903
903
  } | undefined;
904
- sheet?: {
905
- id: string;
906
- title: string;
907
- } | undefined;
908
904
  omitted?: {
909
905
  cards?: number | undefined;
910
906
  otherSheets?: number | undefined;
911
907
  activeInputs?: number | undefined;
912
908
  } | undefined;
909
+ sheet?: {
910
+ id: string;
911
+ title: string;
912
+ } | undefined;
913
913
  selectedCard?: {
914
914
  id: string;
915
915
  description: {
@@ -22,7 +22,7 @@ export type CalculatedColumnKind = 'domain_reference' | 'dashboard_copy' | 'no_d
22
22
  /**
23
23
  * What a calculated column is, in this order: a domain reference (the run
24
24
  * path rebuilds it from the domain), a copy of one of the dashboard's fields
25
- * (the run path runs it as stored), or a column without a definition (a
25
+ * (the run path rebuilds it from its field's definition, MC-D21), or a column without a definition (a
26
26
  * frozen copy, a raw SQL copy, a card-field copy, a dashboard copy whose
27
27
  * field is gone).
28
28
  */
@@ -89,6 +89,14 @@ export declare function writeAxisConfig(preferences: TCardPreferences | undefine
89
89
  * labels and position are kept as they are.
90
90
  */
91
91
  export declare function writeComparisonDisplay(preferences: TCardPreferences | undefined, display: ResolvedComparisonDisplay): TCardPreferences;
92
+ /**
93
+ * The card's comparisons no longer saved hidden (compare-with CW-D28): the
94
+ * stored `showComparison` goes, and the presentation with it when nothing
95
+ * else is left. Each measure's own state says what it shows.
96
+ */
97
+ /** Whether a two-metric KPI compares its first metric with the second (compare-with CW-D29): `true` stored, the key removed when off. */
98
+ export declare function writeMetricPairComparison(preferences: TCardPreferences | undefined, on: boolean): TCardPreferences;
99
+ export declare function writeComparisonsUnhidden(preferences: TCardPreferences | undefined): TCardPreferences;
92
100
  /**
93
101
  * An edit of the comparison panel's fields, as the comparison panel and the
94
102
  * table's settings make it: what a word states (show, mode, precision)
@@ -1,6 +1,6 @@
1
1
  import { TCard } from '../../../lib/types/common-types.js';
2
2
  import { CardType } from '../changes/card-types.js';
3
- export type SettingName = 'columns.label' | 'columns.format' | 'columns.hidden' | 'columns.width' | 'orientation' | 'stack' | 'donut' | 'totals' | 'dataLabels' | 'legend' | 'axes' | 'highlights' | 'columns.polarity' | 'comparisonDisplay' | 'inheritComparison' | 'trend' | 'trendGrain' | 'seeRecords' | 'columnOrder' | 'columnFilters' | 'tableSearch';
3
+ export type SettingName = 'columns.label' | 'columns.format' | 'columns.hidden' | 'columns.width' | 'orientation' | 'stack' | 'donut' | 'totals' | 'dataLabels' | 'legend' | 'axes' | 'highlights' | 'columns.polarity' | 'comparisonDisplay' | 'trend' | 'trendGrain' | 'seeRecords' | 'columnOrder' | 'columnFilters' | 'tableSearch';
4
4
  export declare const SETTINGS_BY_KIND: Readonly<Record<CardType, readonly SettingName[]>>;
5
5
  export type CardSettingsKind = {
6
6
  type: CardType;
@@ -36,6 +36,7 @@ export type AxisInput = {
36
36
  export type LegendPosition = 'top' | 'bottom' | 'left' | 'right';
37
37
  /** How a card shows its comparisons (RC-D4): a patch of the card's one comparison display. */
38
38
  export type ComparisonDisplayInput = {
39
+ /** Retired (compare-with CW-D28): refused; a measure set to off shows none. */
39
40
  show?: boolean;
40
41
  mode?: 'difference' | 'percent_change' | 'both' | 'ratio';
41
42
  /** Decimals of a percent change or ratio, an integer 0 to 6; null returns to the surface's default. */
@@ -79,7 +80,7 @@ export type CardSettingsInput = {
79
80
  y?: AxisInput;
80
81
  };
81
82
  comparisonDisplay?: ComparisonDisplayInput;
82
- /** false: measures without a comparison of their own ignore the dashboard's; true removes the stored opt-out (RC-D16). */
83
+ /** Retired (compare-with CW-D18): refused; each measure's comparison says whether it follows the Date filter. */
83
84
  inheritComparison?: boolean;
84
85
  /** A KPI's Trend switch (KPI trend window KT-D16): on draws its trend on the date it counts (KT-D1); off follows the summary and target. */
85
86
  trend?: boolean;
@@ -16,7 +16,6 @@ export type ResolvedColumnSettings = {
16
16
  };
17
17
  /** Only the comparison display fields that change; precision null removes the stored precision (RC-D4). */
18
18
  export type ResolvedComparisonDisplay = {
19
- show?: boolean;
20
19
  mode?: ComparisonDisplayInput['mode'];
21
20
  precision?: number | null;
22
21
  };
@@ -51,8 +50,6 @@ export type ResolvedCardSettings = {
51
50
  remove?: string[];
52
51
  };
53
52
  comparisonDisplay?: ResolvedComparisonDisplay;
54
- /** Whether measures without a comparison of their own follow the dashboard's (RC-D16). */
55
- inheritComparison?: boolean;
56
53
  /** A KPI's Trend switch (KT-D16). */
57
54
  trend?: boolean;
58
55
  /** A KPI trend's grain (KT-D12); null returns it to Automatic. */