react-semaphor 0.1.603 → 0.1.605
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.
- package/dist/activity/index.js +1 -73
- package/dist/analytics-protocol/index.js +1 -1491
- package/dist/appearance/index.js +1 -12
- package/dist/appearance-runtime/index.js +1 -5
- package/dist/assistant-context/index.js +1 -11
- package/dist/assistant-protocol/index.js +1 -152
- package/dist/brand-studio/index.js +3 -1598
- package/dist/briefings/index.js +1 -70
- package/dist/chunks/add-to-dashboard-CEmZUf9o.js +12 -0
- package/dist/chunks/analytics-base-schemas-DMFrDqn_.js +1 -0
- package/dist/chunks/appearance-provider-CfoAVQuG.js +608 -0
- package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +1 -0
- package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
- package/dist/chunks/assistant-chat-DgUaCE9k.js +51 -0
- package/dist/chunks/attachment-filter-line-C_zHMhGh.js +1 -0
- package/dist/chunks/attribution-BEFSsbNn.js +1 -0
- package/dist/chunks/availability-3AIOf6Z-.js +1 -0
- package/dist/chunks/bookmark-impact-BAtemeyK.js +1 -0
- package/dist/chunks/bookmark-state-DScd31KT.js +1 -0
- package/dist/chunks/brand-C9APUFaP.js +1 -0
- package/dist/chunks/card-filter-builder-ClWrXB7P.js +11 -0
- package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
- package/dist/chunks/comparison-window-caption-tguyN24S.js +1 -0
- package/dist/chunks/context-CntvtZwC.js +2 -0
- package/dist/chunks/conversation-JMK2kyTK.js +1 -0
- package/dist/chunks/dashboard-ChIcbVTx.js +1 -0
- package/dist/chunks/dashboard-briefing-launcher-CwMlhkxV.js +42 -0
- package/dist/chunks/dashboard-controls-UCSAFCGA.js +42 -0
- package/dist/chunks/dashboard-json-B120hYDa.js +1 -0
- package/dist/chunks/dashboard-temporal-snapshot-BFJKbp_6.js +1 -0
- package/dist/chunks/edit-dashboard-visual-DvHp03h_.js +73 -0
- package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
- package/dist/chunks/filter-line-WwUV5JzN.js +1 -0
- package/dist/chunks/filter-reach-preview-C5M5_hf_.js +1 -0
- package/dist/chunks/filter-value-text-DqTHe_vu.js +1 -0
- package/dist/chunks/index-DViPGDFj.js +1 -0
- package/dist/chunks/index-bkP6SnYu.js +1 -0
- package/dist/chunks/kpi-trend-rule-B87LNzcz.js +1 -0
- package/dist/chunks/layout-grid-CFzqJ7GC.js +6 -0
- package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +1 -0
- package/dist/chunks/matrix-member-presentation-vVAv-aqg.js +1 -0
- package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +1 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
- package/dist/chunks/numeric-range-options-C8tr-Bls.js +1 -0
- package/dist/chunks/palette-NvEIuXHN.js +6 -0
- package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +1 -0
- package/dist/chunks/pivot-result-identity-B0eWVMXg.js +1 -0
- package/dist/chunks/raw-temporal-value-BHQ-ldpW.js +1 -0
- package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
- package/dist/chunks/report-preferences-dialog-Bseb2Rlg.js +1 -0
- package/dist/chunks/report-runtime-context-Cd1b5pku.js +1 -0
- package/dist/chunks/resolve-dashboard-input-context-BDY7KwRe.js +8 -0
- package/dist/chunks/resolver-CjsW8Rz0.js +1 -0
- package/dist/chunks/saved-dashboard-context-C3lWc4Dx.js +1 -0
- package/dist/chunks/schema-O1Y3WTGF.js +4 -0
- package/dist/chunks/selection-filter-compiler-kYsRugss.js +1 -0
- package/dist/chunks/semaphor-ready-indicator-BQarSo6S.js +612 -0
- package/dist/chunks/set-6mOnfQeH.js +1 -0
- package/dist/chunks/slider-BPnHdMGq.js +4 -0
- package/dist/chunks/stored-dashboard-DfrxDLhR.js +1 -0
- package/dist/chunks/table-export-sheet-xaczzWZF.js +2 -0
- package/dist/chunks/token-types-1vzMWjI-.js +1 -0
- package/dist/chunks/validators-Dg2kyF4_.js +1 -0
- package/dist/chunks/variable-draft-B4_xqr4Y.js +1 -0
- package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
- package/dist/dashboard/index.js +1 -7
- package/dist/dashboard-authoring/index.js +1 -4614
- package/dist/format-utils/index.js +1 -425
- package/dist/index.js +1 -554
- package/dist/layouts/index.js +1 -7
- package/dist/live-channel/index.js +1 -124
- package/dist/pdf-export-policy/index.js +1 -92
- package/dist/pdf-table-layout/index.js +1 -993
- package/dist/report-runtime-context/index.js +1 -9
- package/dist/shared/index.js +1 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -9
- package/dist/types/brand-studio/brand-studio-draft.d.ts +45 -13
- package/dist/types/brand-studio/brand-studio-editor.d.ts +13 -2
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +17 -6
- package/dist/types/components/visual/data-table/types/data-table.d.ts +52 -42
- package/dist/types/index.js +1 -88
- package/dist/types/lib/appearance/aliases.d.ts +3 -0
- package/dist/types/lib/appearance/index.d.ts +1 -0
- package/dist/types/lib/appearance/table-density.d.ts +18 -0
- package/dist/types/lib/appearance/types.d.ts +39 -1
- package/dist/types/lib/dashboard-viewer/column-header-actions.d.ts +100 -0
- package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +0 -27
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +26 -2
- package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +2 -0
- package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
- package/dist/types/lib/hooks/use-add-new-frame.d.ts +7 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +8 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +14 -2
- package/dist/types/lib/stores/explorer-actions.d.ts +7 -10
- package/dist/types/lib/types/common-types.d.ts +1 -2
- package/dist/types/lib/types/semantic-types.d.ts +6 -10
- package/dist/types/lib/utils/card-config-utils.d.ts +13 -0
- package/dist/types/lib/utils/field-placement.d.ts +17 -0
- package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
- package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +21 -1
- package/dist/types/shared/analytics-protocol/field-provenance.d.ts +7 -4
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +180 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
- package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +2 -8
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-display-values.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/card-settings/table-viewer-switches.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +132 -3
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +10 -1
- package/dist/types/shared/dashboard-authoring/field-aggregations.d.ts +9 -2
- package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +116 -0
- package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +7 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +6 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
- package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +36 -0
- package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +140 -0
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +15 -0
- package/dist/types/shared/dashboard-viewer/table-settings.d.ts +8 -2
- package/dist/types/shared/format-utils/types/format-types.d.ts +1 -1
- package/dist/usage-events/index.js +1 -285
- package/dist/value-format-preferences/index.js +1 -635
- package/package.json +5 -2
- package/dist/chunks/add-to-dashboard-CFF-wFU-.js +0 -291
- package/dist/chunks/analytics-base-schemas-DsUh5Q3C.js +0 -680
- package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
- package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
- package/dist/chunks/assistant-chat-B6hNQI1t.js +0 -6115
- package/dist/chunks/attribution-BvoKvhcj.js +0 -32
- package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
- package/dist/chunks/bookmark-impact-Ba2PLcGp.js +0 -76
- package/dist/chunks/bookmark-state-n7AaNzR_.js +0 -1667
- package/dist/chunks/brand-BoUV0iHF.js +0 -54
- package/dist/chunks/card-filter-builder-Y22HizVx.js +0 -4069
- package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
- package/dist/chunks/comparison-window-caption-Ck2TIbnR.js +0 -741
- package/dist/chunks/context-UCQ7sere.js +0 -369
- package/dist/chunks/conversation-sQiWYUOb.js +0 -16
- package/dist/chunks/dashboard-BghI99oY.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-DtBAnGiH.js +0 -4875
- package/dist/chunks/dashboard-controls-CtFXlyjV.js +0 -2290
- package/dist/chunks/dashboard-json-DfGBUtCd.js +0 -66
- package/dist/chunks/dates-BnrXF4bb.js +0 -185
- package/dist/chunks/edit-9df1zOWe.js +0 -226
- package/dist/chunks/edit-dashboard-visual-oxt3x1wb.js +0 -18397
- package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
- package/dist/chunks/filter-line-Cy5YYqRL.js +0 -703
- package/dist/chunks/filter-reach-copy-CE_ZX147.js +0 -5111
- package/dist/chunks/filter-value-text-fWvSDwkl.js +0 -153
- package/dist/chunks/index-BVKzKl5d.js +0 -90
- package/dist/chunks/index-CV_Kzou0.js +0 -595
- package/dist/chunks/index-D5rxbtS4.js +0 -2795
- package/dist/chunks/layout-grid-9LndRoLa.js +0 -16
- package/dist/chunks/matrix-analytical-definition-CCp48UCw.js +0 -1233
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +0 -391
- package/dist/chunks/matrix-operation-contract-DPBj69D8.js +0 -1413
- package/dist/chunks/metric-comparison-B0FR-Q8I.js +0 -600
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
- package/dist/chunks/paintbrush-58FQYY-y.js +0 -27
- package/dist/chunks/palette-Be62Tkoa.js +0 -23
- package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
- package/dist/chunks/pivot-result-contract-expectations-BYqAmG9n.js +0 -5092
- package/dist/chunks/pivot-result-identity-CAP4--iq.js +0 -77
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +0 -3778
- package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
- package/dist/chunks/report-preferences-dialog-uJp9GBTM.js +0 -1651
- package/dist/chunks/report-runtime-context-c77_KF9v.js +0 -388
- package/dist/chunks/resolve-dashboard-input-context-Rtl1ffmE.js +0 -25324
- package/dist/chunks/resolver-DG_tfEpt.js +0 -156
- package/dist/chunks/save-C5A0JnEV.js +0 -21
- package/dist/chunks/saved-dashboard-context-tcyTU8jm.js +0 -618
- package/dist/chunks/schema-C9NPiIru.js +0 -2568
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +0 -150
- package/dist/chunks/semaphor-ready-indicator-FBvunj6S.js +0 -145603
- package/dist/chunks/shelf-drop-preview-context-QKStrcK9.js +0 -2466
- package/dist/chunks/stored-dashboard-CHozcAY9.js +0 -4075
- package/dist/chunks/style-sheet-parts-CDCG-8Ej.js +0 -8681
- package/dist/chunks/table-export-sheet-ZFIvs6Sj.js +0 -949
- package/dist/chunks/token-types-XbM6QByy.js +0 -8
- package/dist/chunks/upload-H15d7uHK.js +0 -15
- package/dist/chunks/validators-Baf3VIf5.js +0 -3686
- package/dist/chunks/variable-draft-C2y8Jp6Z.js +0 -242
- package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** A Status value's colour, by name: resolved through the theme's colours, never stored as a colour (table style TS-D17). */
|
|
2
|
+
export type StatusTone = 'green' | 'red' | 'amber' | 'blue' | 'grey';
|
|
3
|
+
export declare const STATUS_TONES: readonly StatusTone[];
|
|
4
|
+
/** Monospace lines shown before Show more (TS-D16). */
|
|
5
|
+
export type MonospaceLines = 2 | 3 | 5 | 'all';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TCard } from '../../../lib/types/common-types.js';
|
|
2
|
+
import { PersistedColumnSettings } from '../../../components/visual/data-table/types/data-table.js';
|
|
3
|
+
import { MonospaceLines, StatusTone } from './column-display-values.js';
|
|
4
|
+
import { ColumnSettingsRole } from './views.js';
|
|
5
|
+
export type { MonospaceLines, StatusTone } from './column-display-values.js';
|
|
6
|
+
export type ColumnDisplayInput = {
|
|
7
|
+
as: 'text';
|
|
8
|
+
} | {
|
|
9
|
+
as: 'monospace';
|
|
10
|
+
lines?: MonospaceLines;
|
|
11
|
+
}
|
|
12
|
+
/** `shape`: a pill or a dot (stored as `badge.style`). */
|
|
13
|
+
| {
|
|
14
|
+
as: 'status';
|
|
15
|
+
shape?: 'pill' | 'dot';
|
|
16
|
+
colors?: Record<string, StatusTone>;
|
|
17
|
+
} | {
|
|
18
|
+
as: 'link';
|
|
19
|
+
/** A URL template: `{value}` is the cell, `{Column}` another column's value. */
|
|
20
|
+
address: string;
|
|
21
|
+
label?: 'value' | {
|
|
22
|
+
text: string;
|
|
23
|
+
} | {
|
|
24
|
+
column: string;
|
|
25
|
+
};
|
|
26
|
+
icon?: boolean;
|
|
27
|
+
newTab?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare const MONOSPACE_LINES: readonly MonospaceLines[];
|
|
30
|
+
export declare const DEFAULT_MONOSPACE_LINES: MonospaceLines;
|
|
31
|
+
/** The column's Display as from its stored settings; undefined when it shows automatically or as a number, date or progress. */
|
|
32
|
+
export declare function readColumnDisplay(entry: PersistedColumnSettings | undefined): ColumnDisplayInput | undefined;
|
|
33
|
+
/** The stored entry with a Display as written, or removed (`null`: back to automatic). Other settings are kept. */
|
|
34
|
+
export declare function writeColumnDisplayEntry(entry: PersistedColumnSettings | undefined, display: ColumnDisplayInput | null): PersistedColumnSettings;
|
|
35
|
+
/** The card with a column's Display as written, by the column's result key. */
|
|
36
|
+
export declare function writeColumnDisplay<T extends Pick<TCard, 'preferences'>>(card: T, resultKey: string, display: ColumnDisplayInput | null): T;
|
|
37
|
+
/** A Link address's `{placeholders}`, other than `{value}`. */
|
|
38
|
+
export declare function linkAddressColumns(address: string): string[];
|
|
39
|
+
/** How a Display as reads back (SPEC §2.7): "as monospace, up to 3 lines". */
|
|
40
|
+
export declare function columnDisplayWords(display: ColumnDisplayInput | null): string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether a column takes Display as (Text, Monospace, Status, Link): text columns do; a
|
|
43
|
+
* measure keeps its number format and its total (review P4-R3). The one rule the editor's
|
|
44
|
+
* column panel and an agent's change both apply (authoring parity).
|
|
45
|
+
*/
|
|
46
|
+
export declare function columnTakesDisplay(role: ColumnSettingsRole): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether a table card's column, by its result key, takes Display as: its role as the
|
|
49
|
+
* card's named columns give it, the same naming an agent's change reads. A column the
|
|
50
|
+
* naming doesn't list (a SQL column before its result arrives) takes it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function cardColumnTakesDisplay(card: TCard, resultKey: string): boolean;
|
|
@@ -11,6 +11,7 @@ export { confirmClassFor, type ConfirmClass } from './confirm-class.js';
|
|
|
11
11
|
export { writeColumnFormat, withFormatOverride } from './column-format-write.js';
|
|
12
12
|
export { writeColumnPolarity } from './column-polarity-write.js';
|
|
13
13
|
export { writeComparisonDisplay, writeComparisonPresentation, writeInheritComparison, writeSeeRecords, writeTableColumnFilters, writeTableSearch } from './card-display-write.js';
|
|
14
|
+
export { readTableViewerSwitch, tableViewerSwitches, writeTableViewerSwitch, type TableViewerSwitch } from './table-viewer-switches.js';
|
|
14
15
|
export type { ResolvedCardSettings, ResolvedColumnSettings, ResolvedComparisonDisplay } from './resolved.js';
|
|
15
16
|
export { SETTINGS_BY_KIND, cardSettingsKind, type CardSettingsKind, type SettingName } from './card-kinds.js';
|
|
16
17
|
export type { AxisInput, CardSettingsInput, ColumnSettingsInput, ComparisonDisplayInput, DashboardUpdateChange, FormatInput, FormatPatch, HighlightAddChange, HighlightColor, HighlightCondition, HighlightRemoveChange, HighlightStyleInput, LegendPosition, Polarity, } from './inputs.js';
|
|
@@ -2,6 +2,7 @@ import { KpiTrendGrain } from '../kpi-trend-rule.js';
|
|
|
2
2
|
import { MetricComparisonPolarity } from '../../analytics-protocol/metric-comparison.js';
|
|
3
3
|
import { TableColumnTotal } from '../measure-calculations/table-column-total.js';
|
|
4
4
|
import { SemaphorDateValueFormat, SemaphorDurationValueFormat, SemaphorNumericValueFormat, SemaphorValueFormat, TemporalBucketFormat } from '../../analytics-protocol/contracts.js';
|
|
5
|
+
import { ColumnDisplayInput } from './column-display.js';
|
|
5
6
|
/**
|
|
6
7
|
* CA-D18: a whole stored format (it has `type`), or a patch without `type`,
|
|
7
8
|
* merged onto the column's effective format (CF-D20).
|
|
@@ -17,12 +18,20 @@ export type ColumnSettingsInput = {
|
|
|
17
18
|
label?: string | null;
|
|
18
19
|
/** Hidden for everyone (CA-D16); it still computes, sorts and filters. */
|
|
19
20
|
hidden?: boolean;
|
|
21
|
+
/** Held at the left edge of the table (table sheets TS-D9); pinned columns draw in the table's column order. */
|
|
22
|
+
pinned?: boolean;
|
|
20
23
|
/** Table column width in pixels; null returns it to automatic. */
|
|
21
24
|
width?: number | null;
|
|
22
25
|
/** Null removes the card's override, so the column follows the model. */
|
|
23
26
|
format?: FormatInput | null;
|
|
24
27
|
/** The card's own polarity; null removes it. Refused where the model sets a different one (RC-D3). */
|
|
25
28
|
polarity?: Polarity | null;
|
|
29
|
+
/**
|
|
30
|
+
* How a table column shows its values (Display as, table style TS-D20): plain
|
|
31
|
+
* text, monospace, a status with a colour per value, or a link. Null returns the
|
|
32
|
+
* column to its automatic display.
|
|
33
|
+
*/
|
|
34
|
+
display?: ColumnDisplayInput | null;
|
|
26
35
|
/** Read-only facts from the outline, accepted back unchanged (CA-INV-1). */
|
|
27
36
|
field?: string;
|
|
28
37
|
role?: string;
|
|
@@ -5,14 +5,18 @@ import { AxisConfigKey, CardVariant } from './card-display-write.js';
|
|
|
5
5
|
import { ComparisonDisplayInput, LegendPosition, Polarity } from './inputs.js';
|
|
6
6
|
import { TableMeasureTotal } from '../measure-calculations/table-column-total.js';
|
|
7
7
|
import { TableColumnId } from '../../dashboard-viewer/table-settings.js';
|
|
8
|
+
import { ColumnDisplayInput } from './column-display.js';
|
|
8
9
|
export type ResolvedColumnSettings = {
|
|
9
10
|
column: CardColumnRef;
|
|
10
11
|
hidden?: boolean;
|
|
11
12
|
width?: number | null;
|
|
13
|
+
pinned?: boolean;
|
|
12
14
|
/** Whole and validated; null removes the override. */
|
|
13
15
|
format?: SemaphorValueFormat | null;
|
|
14
16
|
/** The card's own polarity; null removes it (RC-D3). */
|
|
15
17
|
polarity?: Polarity | null;
|
|
18
|
+
/** Display as, checked; null returns the column to automatic (table style TS-D20). */
|
|
19
|
+
display?: ColumnDisplayInput | null;
|
|
16
20
|
};
|
|
17
21
|
/** Only the comparison display fields that change; precision null removes the stored precision (RC-D4). */
|
|
18
22
|
export type ResolvedComparisonDisplay = {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TCard, TCardPreferences } from '../../../lib/types/common-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* What viewers may change on a table (PLAN B1, table column filters TCF-D6):
|
|
4
|
+
* customize its columns, filter them from their headers, search it. One owner
|
|
5
|
+
* of which switch a card takes and of each write, for the table settings in
|
|
6
|
+
* the card editor and a Table sheet's settings menu (table sheets TS-D11).
|
|
7
|
+
* Absent means on; only `false` is stored.
|
|
8
|
+
*/
|
|
9
|
+
export type TableViewerSwitch = 'columns' | 'columnFilters' | 'search';
|
|
10
|
+
type SwitchCard = Pick<TCard, 'type' | 'preferences' | 'sql' | 'python' | 'config'>;
|
|
11
|
+
/** The switches this card takes, in menu order: columns on tables and detail tables; filters and search where the card's kind takes them. */
|
|
12
|
+
export declare function tableViewerSwitches(card: SwitchCard): TableViewerSwitch[];
|
|
13
|
+
export declare function readTableViewerSwitch(preferences: TCardPreferences | undefined, which: TableViewerSwitch): boolean;
|
|
14
|
+
export declare function writeTableViewerSwitch(preferences: TCardPreferences | undefined, which: TableViewerSwitch, on: boolean): TCardPreferences;
|
|
15
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SemaphorValueFormat } from '../../analytics-protocol/contracts.js';
|
|
2
2
|
import { CardSettingsInput, HighlightStyleInput, Polarity } from './inputs.js';
|
|
3
|
+
import { ColumnDisplayInput } from './column-display.js';
|
|
3
4
|
export type ColumnSettingsRole = 'measure' | 'dimension' | 'detail' | 'result' | 'value';
|
|
4
5
|
export type ColumnSettingsView = {
|
|
5
6
|
/** The column's field; absent for SQL result columns. Read-only. */
|
|
@@ -8,10 +9,14 @@ export type ColumnSettingsView = {
|
|
|
8
9
|
label: string;
|
|
9
10
|
hidden?: true;
|
|
10
11
|
width?: number;
|
|
12
|
+
/** Held at the left edge of the table for everyone, until a viewer pins their own (table sheets TS-D9). */
|
|
13
|
+
pinned?: true;
|
|
11
14
|
/** The card's override only; absent when the column follows the model. */
|
|
12
15
|
format?: SemaphorValueFormat;
|
|
13
16
|
/** Shown when the card or the model sets it; absent means higher is better (RC-D3). */
|
|
14
17
|
polarity?: Polarity;
|
|
18
|
+
/** How the column shows its values, when the card sets Text, Monospace, Status or Link (table style TS-D20). */
|
|
19
|
+
display?: ColumnDisplayInput;
|
|
15
20
|
/** What the column takes from the model (CA-D5); 'polarity' when the model sets it. Read-only. */
|
|
16
21
|
inherits?: Array<'label' | 'format' | 'polarity'>;
|
|
17
22
|
};
|
|
@@ -42,6 +42,12 @@ export type CardQueryPart = {
|
|
|
42
42
|
statedLabels?: ColumnKey[];
|
|
43
43
|
/** What a change to a stored card states (DE-D61); absent, the part states everything. */
|
|
44
44
|
change?: QueryChange;
|
|
45
|
+
/**
|
|
46
|
+
* The folder each related dataset sits in, by dataset, as the editor's field
|
|
47
|
+
* list names it ("Organization"): an added column from there is named after
|
|
48
|
+
* it (`relatedColumnLabel`), as the editor's placement names it.
|
|
49
|
+
*/
|
|
50
|
+
relatedFolderLabels?: Readonly<Record<string, string>>;
|
|
45
51
|
};
|
|
46
52
|
/** The parts of a card's query a `card.update` can state. */
|
|
47
53
|
export declare const QUERY_ASPECTS: readonly ["measures", "groupings", "columns", "filters", "order", "limit"];
|
|
@@ -3549,10 +3549,83 @@ declare const filterValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBool
|
|
|
3549
3549
|
export declare const columnSettingsInputSchema: z.ZodObject<{
|
|
3550
3550
|
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3551
3551
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
3552
|
+
/** Held at the left edge of the table (table sheets TS-D9). */
|
|
3553
|
+
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
3552
3554
|
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3553
3555
|
format: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
3554
3556
|
/** Which way is good, where the model is silent (reports by conversation RC-D3); null: the default. */
|
|
3555
3557
|
polarity: z.ZodOptional<z.ZodNullable<z.ZodEnum<["higher_is_better", "lower_is_better", "neutral"]>>>;
|
|
3558
|
+
/**
|
|
3559
|
+
* Display as (table style TS-D20): how a table column shows its values. The
|
|
3560
|
+
* card settings owner checks it against the column (Status and Link for text
|
|
3561
|
+
* columns, a Link's address and the columns it names); null: automatic.
|
|
3562
|
+
*/
|
|
3563
|
+
display: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"as", [z.ZodObject<{
|
|
3564
|
+
as: z.ZodLiteral<"text">;
|
|
3565
|
+
}, "strict", z.ZodTypeAny, {
|
|
3566
|
+
as: "text";
|
|
3567
|
+
}, {
|
|
3568
|
+
as: "text";
|
|
3569
|
+
}>, z.ZodObject<{
|
|
3570
|
+
as: z.ZodLiteral<"monospace">;
|
|
3571
|
+
lines: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<5>, z.ZodLiteral<"all">]>>;
|
|
3572
|
+
}, "strict", z.ZodTypeAny, {
|
|
3573
|
+
as: "monospace";
|
|
3574
|
+
lines?: "all" | 2 | 5 | 3 | undefined;
|
|
3575
|
+
}, {
|
|
3576
|
+
as: "monospace";
|
|
3577
|
+
lines?: "all" | 2 | 5 | 3 | undefined;
|
|
3578
|
+
}>, z.ZodObject<{
|
|
3579
|
+
as: z.ZodLiteral<"status">;
|
|
3580
|
+
shape: z.ZodOptional<z.ZodEnum<["pill", "dot"]>>;
|
|
3581
|
+
colors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["green", "red", "amber", "blue", "grey"]>>>;
|
|
3582
|
+
}, "strict", z.ZodTypeAny, {
|
|
3583
|
+
as: "status";
|
|
3584
|
+
shape?: "pill" | "dot" | undefined;
|
|
3585
|
+
colors?: Record<string, "green" | "red" | "amber" | "blue" | "grey"> | undefined;
|
|
3586
|
+
}, {
|
|
3587
|
+
as: "status";
|
|
3588
|
+
shape?: "pill" | "dot" | undefined;
|
|
3589
|
+
colors?: Record<string, "green" | "red" | "amber" | "blue" | "grey"> | undefined;
|
|
3590
|
+
}>, z.ZodObject<{
|
|
3591
|
+
as: z.ZodLiteral<"link">;
|
|
3592
|
+
address: z.ZodString;
|
|
3593
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"value">, z.ZodObject<{
|
|
3594
|
+
text: z.ZodString;
|
|
3595
|
+
}, "strict", z.ZodTypeAny, {
|
|
3596
|
+
text: string;
|
|
3597
|
+
}, {
|
|
3598
|
+
text: string;
|
|
3599
|
+
}>, z.ZodObject<{
|
|
3600
|
+
column: z.ZodString;
|
|
3601
|
+
}, "strict", z.ZodTypeAny, {
|
|
3602
|
+
column: string;
|
|
3603
|
+
}, {
|
|
3604
|
+
column: string;
|
|
3605
|
+
}>]>>;
|
|
3606
|
+
icon: z.ZodOptional<z.ZodBoolean>;
|
|
3607
|
+
newTab: z.ZodOptional<z.ZodBoolean>;
|
|
3608
|
+
}, "strict", z.ZodTypeAny, {
|
|
3609
|
+
as: "link";
|
|
3610
|
+
address: string;
|
|
3611
|
+
label?: "value" | {
|
|
3612
|
+
text: string;
|
|
3613
|
+
} | {
|
|
3614
|
+
column: string;
|
|
3615
|
+
} | undefined;
|
|
3616
|
+
icon?: boolean | undefined;
|
|
3617
|
+
newTab?: boolean | undefined;
|
|
3618
|
+
}, {
|
|
3619
|
+
as: "link";
|
|
3620
|
+
address: string;
|
|
3621
|
+
label?: "value" | {
|
|
3622
|
+
text: string;
|
|
3623
|
+
} | {
|
|
3624
|
+
column: string;
|
|
3625
|
+
} | undefined;
|
|
3626
|
+
icon?: boolean | undefined;
|
|
3627
|
+
newTab?: boolean | undefined;
|
|
3628
|
+
}>]>>>;
|
|
3556
3629
|
field: z.ZodOptional<z.ZodString>;
|
|
3557
3630
|
role: z.ZodOptional<z.ZodString>;
|
|
3558
3631
|
inherits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -3561,18 +3634,60 @@ export declare const columnSettingsInputSchema: z.ZodObject<{
|
|
|
3561
3634
|
role?: string | undefined;
|
|
3562
3635
|
field?: string | undefined;
|
|
3563
3636
|
format?: Record<string, unknown> | null | undefined;
|
|
3637
|
+
pinned?: boolean | undefined;
|
|
3564
3638
|
polarity?: "higher_is_better" | "lower_is_better" | "neutral" | null | undefined;
|
|
3565
3639
|
width?: number | null | undefined;
|
|
3566
3640
|
hidden?: boolean | undefined;
|
|
3641
|
+
display?: {
|
|
3642
|
+
as: "text";
|
|
3643
|
+
} | {
|
|
3644
|
+
as: "monospace";
|
|
3645
|
+
lines?: "all" | 2 | 5 | 3 | undefined;
|
|
3646
|
+
} | {
|
|
3647
|
+
as: "status";
|
|
3648
|
+
shape?: "pill" | "dot" | undefined;
|
|
3649
|
+
colors?: Record<string, "green" | "red" | "amber" | "blue" | "grey"> | undefined;
|
|
3650
|
+
} | {
|
|
3651
|
+
as: "link";
|
|
3652
|
+
address: string;
|
|
3653
|
+
label?: "value" | {
|
|
3654
|
+
text: string;
|
|
3655
|
+
} | {
|
|
3656
|
+
column: string;
|
|
3657
|
+
} | undefined;
|
|
3658
|
+
icon?: boolean | undefined;
|
|
3659
|
+
newTab?: boolean | undefined;
|
|
3660
|
+
} | null | undefined;
|
|
3567
3661
|
inherits?: string[] | undefined;
|
|
3568
3662
|
}, {
|
|
3569
3663
|
label?: string | null | undefined;
|
|
3570
3664
|
role?: string | undefined;
|
|
3571
3665
|
field?: string | undefined;
|
|
3572
3666
|
format?: Record<string, unknown> | null | undefined;
|
|
3667
|
+
pinned?: boolean | undefined;
|
|
3573
3668
|
polarity?: "higher_is_better" | "lower_is_better" | "neutral" | null | undefined;
|
|
3574
3669
|
width?: number | null | undefined;
|
|
3575
3670
|
hidden?: boolean | undefined;
|
|
3671
|
+
display?: {
|
|
3672
|
+
as: "text";
|
|
3673
|
+
} | {
|
|
3674
|
+
as: "monospace";
|
|
3675
|
+
lines?: "all" | 2 | 5 | 3 | undefined;
|
|
3676
|
+
} | {
|
|
3677
|
+
as: "status";
|
|
3678
|
+
shape?: "pill" | "dot" | undefined;
|
|
3679
|
+
colors?: Record<string, "green" | "red" | "amber" | "blue" | "grey"> | undefined;
|
|
3680
|
+
} | {
|
|
3681
|
+
as: "link";
|
|
3682
|
+
address: string;
|
|
3683
|
+
label?: "value" | {
|
|
3684
|
+
text: string;
|
|
3685
|
+
} | {
|
|
3686
|
+
column: string;
|
|
3687
|
+
} | undefined;
|
|
3688
|
+
icon?: boolean | undefined;
|
|
3689
|
+
newTab?: boolean | undefined;
|
|
3690
|
+
} | null | undefined;
|
|
3576
3691
|
inherits?: string[] | undefined;
|
|
3577
3692
|
}>;
|
|
3578
3693
|
/**
|
|
@@ -4072,17 +4187,24 @@ export declare const layoutArrangeSchema: z.ZodObject<{
|
|
|
4072
4187
|
* added at the end, and a sheet's title. A sheet a proposal adds is named in
|
|
4073
4188
|
* later changes by its handle, wherever a sheet id goes (S-3).
|
|
4074
4189
|
*/
|
|
4075
|
-
export declare
|
|
4190
|
+
export declare function sheetChangeSchemas(tableCard: z.ZodTypeAny): readonly [z.ZodObject<{
|
|
4076
4191
|
op: z.ZodLiteral<"sheet.add">;
|
|
4077
4192
|
handle: z.ZodOptional<z.ZodString>;
|
|
4078
4193
|
title: z.ZodString;
|
|
4194
|
+
/** A Table sheet (table sheets TS-D14): one table that fills the tab, added with it. */
|
|
4195
|
+
kind: z.ZodOptional<z.ZodLiteral<"table">>;
|
|
4196
|
+
card: z.ZodOptional<z.ZodTypeAny>;
|
|
4079
4197
|
}, "strict", z.ZodTypeAny, {
|
|
4080
4198
|
title: string;
|
|
4081
4199
|
op: "sheet.add";
|
|
4200
|
+
card?: any;
|
|
4201
|
+
kind?: "table" | undefined;
|
|
4082
4202
|
handle?: string | undefined;
|
|
4083
4203
|
}, {
|
|
4084
4204
|
title: string;
|
|
4085
4205
|
op: "sheet.add";
|
|
4206
|
+
card?: any;
|
|
4207
|
+
kind?: "table" | undefined;
|
|
4086
4208
|
handle?: string | undefined;
|
|
4087
4209
|
}>, z.ZodObject<{
|
|
4088
4210
|
op: z.ZodLiteral<"sheet.update">;
|
|
@@ -4341,7 +4463,7 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
|
|
|
4341
4463
|
position?: "top" | "end" | {
|
|
4342
4464
|
after: string;
|
|
4343
4465
|
} | undefined;
|
|
4344
|
-
width?: "
|
|
4466
|
+
width?: "full" | "quarter" | "half" | "third" | undefined;
|
|
4345
4467
|
query?: any;
|
|
4346
4468
|
handle?: string | undefined;
|
|
4347
4469
|
sheetId?: string | undefined;
|
|
@@ -4371,7 +4493,7 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
|
|
|
4371
4493
|
position?: "top" | "end" | {
|
|
4372
4494
|
after: string;
|
|
4373
4495
|
} | undefined;
|
|
4374
|
-
width?: "
|
|
4496
|
+
width?: "full" | "quarter" | "half" | "third" | undefined;
|
|
4375
4497
|
query?: any;
|
|
4376
4498
|
handle?: string | undefined;
|
|
4377
4499
|
sheetId?: string | undefined;
|
|
@@ -5187,13 +5309,20 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
|
|
|
5187
5309
|
op: z.ZodLiteral<"sheet.add">;
|
|
5188
5310
|
handle: z.ZodOptional<z.ZodString>;
|
|
5189
5311
|
title: z.ZodString;
|
|
5312
|
+
/** A Table sheet (table sheets TS-D14): one table that fills the tab, added with it. */
|
|
5313
|
+
kind: z.ZodOptional<z.ZodLiteral<"table">>;
|
|
5314
|
+
card: z.ZodOptional<z.ZodTypeAny>;
|
|
5190
5315
|
}, "strict", z.ZodTypeAny, {
|
|
5191
5316
|
title: string;
|
|
5192
5317
|
op: "sheet.add";
|
|
5318
|
+
card?: any;
|
|
5319
|
+
kind?: "table" | undefined;
|
|
5193
5320
|
handle?: string | undefined;
|
|
5194
5321
|
}, {
|
|
5195
5322
|
title: string;
|
|
5196
5323
|
op: "sheet.add";
|
|
5324
|
+
card?: any;
|
|
5325
|
+
kind?: "table" | undefined;
|
|
5197
5326
|
handle?: string | undefined;
|
|
5198
5327
|
}>, z.ZodObject<{
|
|
5199
5328
|
op: z.ZodLiteral<"sheet.update">;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ProposedChange } from './dashboard-change.js';
|
|
2
2
|
import { StyleRefusal } from '../dashboard-style/index.js';
|
|
3
|
-
export type ChangeProblemCode = 'invalid_change' | 'invalid_change_target' | 'copy_required' | 'not_permitted' | 'dashboard_not_found' | 'card_not_found' | 'filter_not_found' | 'sheet_not_found' | 'sheet_required' | 'sheet_not_a_grid'
|
|
3
|
+
export type ChangeProblemCode = 'invalid_change' | 'invalid_change_target' | 'copy_required' | 'not_permitted' | 'dashboard_not_found' | 'card_not_found' | 'filter_not_found' | 'sheet_not_found' | 'sheet_required' | 'sheet_not_a_grid'
|
|
4
|
+
/** A Table sheet holds one table (table sheets SH-1): no card is added to it, and its own card is not removed or made a chart. */
|
|
5
|
+
| 'sheet_holds_one_table' | 'table_sheet_no_card' | 'table_sheet_card_type' | 'table_sheet_extra_card' | 'table_sheet_layout' | 'field_not_found'
|
|
4
6
|
/**
|
|
5
7
|
* The card's datasets aren't joined by the domain's relationships, so the
|
|
6
8
|
* card can't run (assistant joins and panel AJ-D4). Details name the base
|
|
@@ -1446,8 +1446,8 @@ export declare const conditionalRuleSchema: z.ZodObject<{
|
|
|
1446
1446
|
italic?: boolean | undefined;
|
|
1447
1447
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
1448
1448
|
backgroundColor?: string | undefined;
|
|
1449
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
1450
1449
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
1450
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
1451
1451
|
textColor?: string | undefined;
|
|
1452
1452
|
}, {
|
|
1453
1453
|
dataBar?: {
|
|
@@ -1457,8 +1457,8 @@ export declare const conditionalRuleSchema: z.ZodObject<{
|
|
|
1457
1457
|
italic?: boolean | undefined;
|
|
1458
1458
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
1459
1459
|
backgroundColor?: string | undefined;
|
|
1460
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
1461
1460
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
1461
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
1462
1462
|
textColor?: string | undefined;
|
|
1463
1463
|
}>>;
|
|
1464
1464
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1726,8 +1726,8 @@ export declare const conditionalRuleSchema: z.ZodObject<{
|
|
|
1726
1726
|
italic?: boolean | undefined;
|
|
1727
1727
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
1728
1728
|
backgroundColor?: string | undefined;
|
|
1729
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
1730
1729
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
1730
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
1731
1731
|
textColor?: string | undefined;
|
|
1732
1732
|
} | undefined;
|
|
1733
1733
|
enabled?: boolean | undefined;
|
|
@@ -1996,8 +1996,8 @@ export declare const conditionalRuleSchema: z.ZodObject<{
|
|
|
1996
1996
|
italic?: boolean | undefined;
|
|
1997
1997
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
1998
1998
|
backgroundColor?: string | undefined;
|
|
1999
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
2000
1999
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
2000
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
2001
2001
|
textColor?: string | undefined;
|
|
2002
2002
|
} | undefined;
|
|
2003
2003
|
enabled?: boolean | undefined;
|
|
@@ -3380,8 +3380,8 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
|
|
|
3380
3380
|
italic?: boolean | undefined;
|
|
3381
3381
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
3382
3382
|
backgroundColor?: string | undefined;
|
|
3383
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3384
3383
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
3384
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3385
3385
|
textColor?: string | undefined;
|
|
3386
3386
|
}, {
|
|
3387
3387
|
dataBar?: {
|
|
@@ -3391,8 +3391,8 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
|
|
|
3391
3391
|
italic?: boolean | undefined;
|
|
3392
3392
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
3393
3393
|
backgroundColor?: string | undefined;
|
|
3394
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3395
3394
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
3395
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3396
3396
|
textColor?: string | undefined;
|
|
3397
3397
|
}>>;
|
|
3398
3398
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -3660,8 +3660,8 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
|
|
|
3660
3660
|
italic?: boolean | undefined;
|
|
3661
3661
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
3662
3662
|
backgroundColor?: string | undefined;
|
|
3663
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3664
3663
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
3664
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3665
3665
|
textColor?: string | undefined;
|
|
3666
3666
|
} | undefined;
|
|
3667
3667
|
enabled?: boolean | undefined;
|
|
@@ -3930,8 +3930,8 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
|
|
|
3930
3930
|
italic?: boolean | undefined;
|
|
3931
3931
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
3932
3932
|
backgroundColor?: string | undefined;
|
|
3933
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3934
3933
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
3934
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
3935
3935
|
textColor?: string | undefined;
|
|
3936
3936
|
} | undefined;
|
|
3937
3937
|
enabled?: boolean | undefined;
|
|
@@ -4203,8 +4203,8 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
|
|
|
4203
4203
|
italic?: boolean | undefined;
|
|
4204
4204
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
4205
4205
|
backgroundColor?: string | undefined;
|
|
4206
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
4207
4206
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
4207
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
4208
4208
|
textColor?: string | undefined;
|
|
4209
4209
|
} | undefined;
|
|
4210
4210
|
enabled?: boolean | undefined;
|
|
@@ -4476,8 +4476,8 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
|
|
|
4476
4476
|
italic?: boolean | undefined;
|
|
4477
4477
|
fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
|
|
4478
4478
|
backgroundColor?: string | undefined;
|
|
4479
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
4480
4479
|
icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
|
|
4480
|
+
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
4481
4481
|
textColor?: string | undefined;
|
|
4482
4482
|
} | undefined;
|
|
4483
4483
|
enabled?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TCard, TCardPreferences } from '../../../lib/types/common-types.js';
|
|
2
|
-
import { ConditionalRule } from './types.js';
|
|
2
|
+
import { CardColumnRef, ConditionalRule } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* A card's stored rules. A rule that doesn't parse is left out rather than
|
|
5
5
|
* failing the card: the save check refuses one (CR-D9), and a renderer shows
|
|
@@ -10,3 +10,12 @@ export declare function readCardConditionalRules(card: {
|
|
|
10
10
|
} | undefined): readonly ConditionalRule[];
|
|
11
11
|
/** The card with these rules as its store; no rules removes the store. */
|
|
12
12
|
export declare function withCardConditionalRules<T extends Pick<TCard, 'preferences'>>(card: T, rules: readonly ConditionalRule[]): T;
|
|
13
|
+
/** The rules about one column, in store order: a column's Highlight cells edits only these. */
|
|
14
|
+
export declare function columnConditionalRules(rules: readonly ConditionalRule[], column: CardColumnRef): readonly ConditionalRule[];
|
|
15
|
+
/**
|
|
16
|
+
* The store with one column's rules replaced by `edited`, in `edited`'s order
|
|
17
|
+
* (a move in the rule list holds): the column's rules fill the places its
|
|
18
|
+
* rules held, a removal frees one, and any more go last; every other rule
|
|
19
|
+
* stays where it was.
|
|
20
|
+
*/
|
|
21
|
+
export declare function withColumnConditionalRules(rules: readonly ConditionalRule[], column: CardColumnRef, edited: readonly ConditionalRule[]): ConditionalRule[];
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Explorer datatype eligibility; consumers may further restrict supported
|
|
3
|
+
* operations. A count of rows (field `*`) only counts: SUM of `*` is no query
|
|
4
|
+
* (review, 2026-11-15).
|
|
5
|
+
*/
|
|
6
|
+
export declare function getFieldAggregationOptions(dataType: string | undefined, fieldName?: string): readonly [{
|
|
3
7
|
readonly value: "COUNT";
|
|
4
8
|
readonly label: "Count";
|
|
5
9
|
}, {
|
|
@@ -26,4 +30,7 @@ export declare function getFieldAggregationOptions(dataType: string | undefined)
|
|
|
26
30
|
}, {
|
|
27
31
|
readonly value: "MEDIAN";
|
|
28
32
|
readonly label: "Median";
|
|
33
|
+
}] | readonly [{
|
|
34
|
+
readonly value: "COUNT";
|
|
35
|
+
readonly label: "Count";
|
|
29
36
|
}];
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field folders: one dataset's fields in a folder, nested at the key that
|
|
3
|
+
* reaches it (one base per card OB-D5, OB-D20). The one module for every
|
|
4
|
+
* surface that offers fields by dataset: See records' More columns and the
|
|
5
|
+
* card editor's field list. Pure and server-safe: the folder type, where a
|
|
6
|
+
* folder hangs, and the tree walk. Each surface draws its own leaf rows.
|
|
7
|
+
*
|
|
8
|
+
* Lifted from See records related columns (SC-D10, ledger P2-14), whose
|
|
9
|
+
* server assembled where folders hang and whose picker walked the tree.
|
|
10
|
+
*/
|
|
11
|
+
/** A folder's field: the column name a reference uses and the words shown. */
|
|
12
|
+
export type FieldFolderColumn = {
|
|
13
|
+
field: string;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
/** One folder: a dataset and the fields offered from it. */
|
|
17
|
+
export type FieldFolder<C extends FieldFolderColumn = FieldFolderColumn> = {
|
|
18
|
+
/** The dataset, as a column reference names it. */
|
|
19
|
+
dataset: string;
|
|
20
|
+
label: string;
|
|
21
|
+
/** The datasets' labels from the base dataset to this one; empty for the base's own folder. */
|
|
22
|
+
path: readonly string[];
|
|
23
|
+
columns: readonly C[];
|
|
24
|
+
/**
|
|
25
|
+
* The folder this one opens from: the dataset one step nearer the base
|
|
26
|
+
* and, when that step joins on one field the parent offers, that field,
|
|
27
|
+
* so the folder stands where the field would. Absent on the base's folder.
|
|
28
|
+
*/
|
|
29
|
+
parent?: {
|
|
30
|
+
dataset: string;
|
|
31
|
+
field?: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/** Where a folder could hang, before the folders exist: the nearer dataset and the field names that may stand for its key. */
|
|
35
|
+
export type FolderParentHint = {
|
|
36
|
+
dataset: string;
|
|
37
|
+
fields: readonly string[];
|
|
38
|
+
};
|
|
39
|
+
type JoinKeySide = {
|
|
40
|
+
name?: string;
|
|
41
|
+
expression?: unknown;
|
|
42
|
+
};
|
|
43
|
+
type JoinLike = {
|
|
44
|
+
joinKeyGroups?: readonly {
|
|
45
|
+
operator?: string;
|
|
46
|
+
keys: readonly {
|
|
47
|
+
operator?: string;
|
|
48
|
+
source: JoinKeySide;
|
|
49
|
+
target: JoinKeySide;
|
|
50
|
+
}[];
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
53
|
+
/** Equality pairs for a single conjunctive predicate. Unknown shapes prove no key. */
|
|
54
|
+
export declare function joinEqualityPairs(join: JoinLike): Array<[string, string]> | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Where a joined dataset's folder hangs: under the dataset the join comes
|
|
57
|
+
* from, at its key when the join is exactly one `=` pair (OB-D5).
|
|
58
|
+
*/
|
|
59
|
+
export declare function folderParentHintFromJoin(join: JoinLike, fromDataset: string): FolderParentHint;
|
|
60
|
+
/**
|
|
61
|
+
* Where a dataset reached through a relationship hangs: under the dataset its
|
|
62
|
+
* last step comes from, at the step's field when it joins on one. `aliases`
|
|
63
|
+
* are other names the same field goes by (its source column).
|
|
64
|
+
*/
|
|
65
|
+
export declare function folderParentHintFromStep(nearDataset: string, nearFields: readonly string[], aliases?: readonly string[]): FolderParentHint;
|
|
66
|
+
/**
|
|
67
|
+
* Each folder but the base's gets its parent from its hint: the hinted
|
|
68
|
+
* folder, with the first hinted field that folder offers. A folder whose
|
|
69
|
+
* hinted parent has no folder hangs from the base's folder.
|
|
70
|
+
*/
|
|
71
|
+
export declare function withFolderParents<F extends FieldFolder<FieldFolderColumn>>(folders: readonly F[], hints: ReadonlyMap<string, FolderParentHint>): F[];
|
|
72
|
+
export type FieldFolderNode<F extends FieldFolder<FieldFolderColumn>> = {
|
|
73
|
+
kind: 'folder';
|
|
74
|
+
folder: F;
|
|
75
|
+
depth: number;
|
|
76
|
+
open: boolean;
|
|
77
|
+
/** The parent's field this folder stands in place of, when it hangs at one. */
|
|
78
|
+
key?: F['columns'][number];
|
|
79
|
+
/** Drawn only when open. */
|
|
80
|
+
children: FieldFolderNode<F>[];
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'column';
|
|
83
|
+
folder: F;
|
|
84
|
+
column: F['columns'][number];
|
|
85
|
+
depth: number;
|
|
86
|
+
};
|
|
87
|
+
export type FieldFolderTreeOptions<F extends FieldFolder<FieldFolderColumn> = FieldFolder<FieldFolderColumn>> = {
|
|
88
|
+
/** Lowercased, trimmed; a non-empty query opens every folder it matches in. */
|
|
89
|
+
query?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The surface's own match, for a surface that searches by more than the
|
|
92
|
+
* label (the card editor). With `filtering`, folders open and show only
|
|
93
|
+
* what it matches, as a query does.
|
|
94
|
+
*/
|
|
95
|
+
match?: (folder: F, column: F['columns'][number]) => boolean;
|
|
96
|
+
filtering?: boolean;
|
|
97
|
+
/** Datasets whose folders are open when there is no query. */
|
|
98
|
+
expanded: readonly string[];
|
|
99
|
+
/**
|
|
100
|
+
* The field lists' order (Rohit, 2026-11-15): a folder's own fields A–Z, its
|
|
101
|
+
* keys among them, then its related datasets' folders A–Z. Every field shows
|
|
102
|
+
* once, in its own dataset's folder (`keyInside` doesn't apply: the key is
|
|
103
|
+
* already among its dataset's fields). Off: each folder stands where its key
|
|
104
|
+
* is, as See records' More columns shows them.
|
|
105
|
+
*/
|
|
106
|
+
fieldsThenFolders?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* The parent's key field a folder stands at is listed first inside the
|
|
109
|
+
* folder (the card editor: it is a field of the parent the author may
|
|
110
|
+
* place). Off: the folder replaces it (See records: the folder's own key
|
|
111
|
+
* says the same).
|
|
112
|
+
*/
|
|
113
|
+
keyInside?: boolean;
|
|
114
|
+
};
|
|
115
|
+
export declare function fieldFolderTree<F extends FieldFolder<FieldFolderColumn>>(folders: readonly F[], options: FieldFolderTreeOptions<F>): FieldFolderNode<F>[];
|
|
116
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './field-folders.js';
|