@lavalogic/scoria 0.37.44 → 0.37.45
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/README.md +58 -58
- package/dist/Components/AccordionGroup.svelte +46 -46
- package/dist/Components/AccordionGroupButton.svelte +76 -76
- package/dist/Components/Action.svelte +136 -136
- package/dist/Components/ActionProps.d.ts +2 -6
- package/dist/Components/AlertModal.svelte +195 -183
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte +702 -702
- package/dist/Components/Base/BaseModal.svelte +125 -125
- package/dist/Components/Base/ContextWrapper.svelte +72 -72
- package/dist/Components/Base/Pagination.svelte +198 -198
- package/dist/Components/Base/Snippets.svelte +36 -36
- package/dist/Components/BigRadioSet.svelte +38 -38
- package/dist/Components/Bubble.svelte +101 -101
- package/dist/Components/Button.svelte +209 -209
- package/dist/Components/ButtonProps.d.ts +2 -6
- package/dist/Components/Checkbox.svelte +86 -86
- package/dist/Components/CollapsibleCard.svelte +78 -78
- package/dist/Components/Contexts/ContextMenu.svelte +164 -164
- package/dist/Components/Contexts/ContextMenuDivider.svelte +15 -15
- package/dist/Components/Contexts/ContextMenuOption.svelte +60 -60
- package/dist/Components/Contexts/Toast.svelte +83 -83
- package/dist/Components/Contexts/ToastContainer.svelte +65 -65
- package/dist/Components/Contexts/Tooltip.svelte +37 -37
- package/dist/Components/DataMatrixIcon.svelte +112 -112
- package/dist/Components/DataMatrixIconProps.d.ts +3 -13
- package/dist/Components/DateInput.svelte +148 -148
- package/dist/Components/DatePicker.svelte +300 -300
- package/dist/Components/DesktopModal.svelte +90 -90
- package/dist/Components/Dial.svelte +204 -204
- package/dist/Components/DialProps.d.ts +1 -18
- package/dist/Components/DimensionInput.svelte +170 -170
- package/dist/Components/DragMenu/DragMenuHolder.svelte +119 -119
- package/dist/Components/DragMenu/DraggableCard.svelte +77 -77
- package/dist/Components/FileCard.svelte +24 -24
- package/dist/Components/FileUpload.svelte +236 -236
- package/dist/Components/GridInput.svelte +196 -200
- package/dist/Components/GridInputSet.svelte +29 -29
- package/dist/Components/HorizontalTabGroup.svelte +82 -82
- package/dist/Components/HorizontalTabGroupButton.svelte +44 -44
- package/dist/Components/Icon.svelte +128 -128
- package/dist/Components/IconProps.d.ts +2 -7
- package/dist/Components/Icons.js +357 -357
- package/dist/Components/LoadingAnimation.svelte +29 -29
- package/dist/Components/LoadingModal.svelte +45 -45
- package/dist/Components/LoadingOverlay.svelte +25 -25
- package/dist/Components/LoadingOverlayProps.d.ts +3 -7
- package/dist/Components/Modal.svelte +258 -258
- package/dist/Components/ModalProps.d.ts +0 -3
- package/dist/Components/MultiSelect.svelte +220 -220
- package/dist/Components/MultiSelectCommonProps.d.ts +6 -17
- package/dist/Components/Nav/Nav.svelte +99 -99
- package/dist/Components/Nav/NavProps.d.ts +4 -11
- package/dist/Components/Nav/NavServiceMenuList.svelte +43 -43
- package/dist/Components/Nav/NavTab.svelte +62 -62
- package/dist/Components/Nav/ServiceMenuItem.svelte +100 -100
- package/dist/Components/Nav/ServicesNav.svelte +80 -80
- package/dist/Components/NumberInput.svelte +157 -157
- package/dist/Components/PageHeading.svelte +25 -25
- package/dist/Components/PasswordInput.svelte +88 -88
- package/dist/Components/Portal.svelte +36 -36
- package/dist/Components/ProgressBubble.svelte +107 -108
- package/dist/Components/ProgressBubbleProps.d.ts +3 -3
- package/dist/Components/QuerySelect.svelte +366 -366
- package/dist/Components/QuerySelectProps.d.ts +4 -14
- package/dist/Components/SingleSelect.svelte +250 -250
- package/dist/Components/SingleSelectCommonProps.d.ts +3 -19
- package/dist/Components/StepButton.svelte +70 -70
- package/dist/Components/StepForm.svelte +140 -140
- package/dist/Components/Switch.svelte +69 -69
- package/dist/Components/Table/ARCHITECTURE.md +298 -0
- package/dist/Components/Table/Body/QuickSearchCell.svelte +679 -694
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +51 -51
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +59 -59
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +456 -478
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +79 -79
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +185 -188
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +124 -124
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +120 -120
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +230 -230
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +105 -105
- package/dist/Components/Table/Body/Rows/Columns/SelectColumn.d.ts +12 -9
- package/dist/Components/Table/Body/Rows/Columns/SelectTableCell.d.ts +5 -5
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +87 -87
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +126 -126
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +159 -159
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +246 -246
- package/dist/Components/Table/Body/Rows/Columns/TableDatePickerProps.d.ts +4 -4
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +216 -216
- package/dist/Components/Table/Body/Rows/Columns/TableQueryCell.d.ts +6 -5
- package/dist/Components/Table/Body/Rows/Columns/TableQueryColumn.d.ts +7 -6
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +252 -257
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +179 -179
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +221 -229
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte.d.ts +11 -11
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +197 -197
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +190 -190
- package/dist/Components/Table/Body/Rows/TableRow.svelte +290 -290
- package/dist/Components/Table/Body/TableBody.svelte +155 -155
- package/dist/Components/Table/ColumnDefinitions/ExampleItemColumnDefRepository.svelte.js +2 -3
- package/dist/Components/Table/ColumnFactory.svelte.d.ts +9 -11
- package/dist/Components/Table/ColumnFactory.svelte.js +101 -118
- package/dist/Components/Table/ColumnKindRegistry.d.ts +112 -0
- package/dist/Components/Table/ColumnKindRegistry.js +63 -0
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +41 -41
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +30 -30
- package/dist/Components/Table/Headers/TableHead.svelte +415 -413
- package/dist/Components/Table/Misc/ColumnPanel.svelte +94 -94
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +112 -112
- package/dist/Components/Table/Misc/FilterInput.svelte +620 -644
- package/dist/Components/Table/Misc/FilterInput.svelte.d.ts +12 -12
- package/dist/Components/Table/Misc/FilterInputProps.d.ts +2 -2
- package/dist/Components/Table/Misc/FilterPanel.svelte +257 -257
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +30 -30
- package/dist/Components/Table/Misc/SidePanel.svelte +35 -35
- package/dist/Components/Table/Misc/TableFooter.svelte +311 -311
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte +125 -125
- package/dist/Components/Table/Misc/TableSidebar.svelte +157 -157
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +100 -100
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +107 -107
- package/dist/Components/Table/NestedTable.svelte +130 -133
- package/dist/Components/Table/SubApis.svelte.d.ts +1 -5
- package/dist/Components/Table/SubApis.svelte.js +33 -32
- package/dist/Components/Table/Table.svelte +692 -745
- package/dist/Components/Table/TableHelpers.svelte.d.ts +6 -19
- package/dist/Components/Table/TableHelpers.svelte.js +6 -14
- package/dist/Components/Table/Types/Columns/Column.d.ts +2 -2
- package/dist/Components/Table/Types/Columns/DateColumn.d.ts +3 -3
- package/dist/Components/Table/Types/Columns/DateTableCell.d.ts +7 -7
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.d.ts +7 -8
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.js +4 -5
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.d.ts +11 -14
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.js +3 -4
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.d.ts +7 -11
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.js +3 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.d.ts +13 -18
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.js +4 -5
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.d.ts +5 -5
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.js +2 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.d.ts +15 -12
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.js +4 -5
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.d.ts +8 -12
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.js +3 -3
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.d.ts +6 -6
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.js +3 -3
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.d.ts +49 -16
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.js +27 -5
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.d.ts +7 -7
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js +4 -4
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.d.ts +5 -5
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.js +2 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.d.ts +5 -5
- package/dist/Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.js +2 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.d.ts +5 -5
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.js +2 -2
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.d.ts +5 -5
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.js +2 -2
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.d.ts +11 -19
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.js +4 -8
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.d.ts +6 -7
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.js +3 -4
- package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.d.ts +9 -9
- package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.js +4 -4
- package/dist/Components/Table/Types/Columns/ExpandTableCell.d.ts +5 -5
- package/dist/Components/Table/Types/Columns/ProgressBarTableCell.d.ts +6 -6
- package/dist/Components/Table/Types/Columns/TableCell.d.ts +7 -6
- package/dist/Components/Table/Types/Context/ClipboardState.svelte.d.ts +98 -0
- package/dist/Components/Table/Types/Context/ClipboardState.svelte.js +290 -0
- package/dist/Components/Table/Types/Context/ColumnLayoutState.svelte.d.ts +17 -45
- package/dist/Components/Table/Types/Context/ColumnLayoutState.svelte.js +17 -45
- package/dist/Components/Table/Types/Context/FilteringState.svelte.d.ts +9 -20
- package/dist/Components/Table/Types/Context/FilteringState.svelte.js +9 -20
- package/dist/Components/Table/Types/Context/FocusState.svelte.d.ts +23 -42
- package/dist/Components/Table/Types/Context/FocusState.svelte.js +32 -59
- package/dist/Components/Table/Types/Context/ITable.d.ts +5 -8
- package/dist/Components/Table/Types/Context/PreferencesState.svelte.d.ts +29 -56
- package/dist/Components/Table/Types/Context/PreferencesState.svelte.js +28 -55
- package/dist/Components/Table/Types/Context/QueryValuesState.svelte.d.ts +50 -0
- package/dist/Components/Table/Types/Context/QueryValuesState.svelte.js +62 -0
- package/dist/Components/Table/Types/Context/SelectionState.svelte.d.ts +17 -28
- package/dist/Components/Table/Types/Context/SelectionState.svelte.js +17 -28
- package/dist/Components/Table/Types/Context/SortingState.svelte.d.ts +15 -29
- package/dist/Components/Table/Types/Context/SortingState.svelte.js +17 -31
- package/dist/Components/Table/Types/Context/TableContext.svelte.d.ts +212 -325
- package/dist/Components/Table/Types/Context/TableContext.svelte.js +292 -706
- package/dist/Components/Table/Types/Context/VirtualisationState.svelte.d.ts +62 -79
- package/dist/Components/Table/Types/Context/VirtualisationState.svelte.js +54 -73
- package/dist/Components/Table/Types/DataRepository/BuiltInRemoteRepository.svelte.d.ts +16 -27
- package/dist/Components/Table/Types/DataRepository/BuiltInRemoteRepository.svelte.js +16 -27
- package/dist/Components/Table/Types/DataRepository/IDataRepository.d.ts +12 -15
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.d.ts +15 -30
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.js +16 -28
- package/dist/Components/Table/Types/Header.d.ts +4 -4
- package/dist/Components/Table/Types/HeaderGroup.d.ts +5 -5
- package/dist/Components/Table/Types/Public/index.d.ts +2 -4
- package/dist/Components/Table/Types/Public/index.js +2 -4
- package/dist/Components/Table/clipboardEscape.d.ts +32 -0
- package/dist/Components/Table/clipboardEscape.js +45 -0
- package/dist/Components/Table/createTable.svelte.d.ts +8 -18
- package/dist/Components/Table/createTable.svelte.js +19 -47
- package/dist/Components/Test/TestContextConsumer.svelte +13 -13
- package/dist/Components/TextArea.svelte +130 -130
- package/dist/Components/TextInput.svelte +176 -176
- package/dist/Components/ThreeStateRadio.svelte +131 -131
- package/dist/Components/Touch/BoolCard.svelte +45 -45
- package/dist/Components/Touch/DateModal.svelte +209 -209
- package/dist/Components/Touch/EditCard.svelte +59 -59
- package/dist/Components/Touch/InfoCard.svelte +31 -31
- package/dist/Components/Touch/InfoTextCard.svelte +28 -28
- package/dist/Components/Touch/ModalExplanation.svelte +17 -17
- package/dist/Components/Touch/NumberKeyboard.svelte +225 -225
- package/dist/Components/Touch/NumberModal.svelte +79 -79
- package/dist/Components/Touch/PlusMinusCard.svelte +46 -46
- package/dist/Components/Touch/SelectModal.svelte +123 -123
- package/dist/Components/Touch/SummaryCard.svelte +93 -93
- package/dist/Components/Touch/TextAreaModal.svelte +95 -95
- package/dist/Components/Touch/TextModal.svelte +106 -106
- package/dist/Components/Touch/TouchCard.svelte +33 -33
- package/dist/Components/Touch/TouchModal.svelte +274 -274
- package/dist/Components/Touch/UtilityButton.svelte +109 -109
- package/dist/Components/VerticalTabGroup.svelte +79 -79
- package/dist/Components/VerticalTabGroupButton.svelte +58 -58
- package/dist/Contexts/ToastContext.svelte.js +3 -4
- package/dist/Helpers/Datamatrix.d.ts +19 -19
- package/dist/Helpers/Datamatrix.js +291 -291
- package/dist/Helpers/Helpers.svelte.d.ts +2 -4
- package/dist/Helpers/Helpers.svelte.js +2 -4
- package/dist/Helpers/dropdownPortal.d.ts +26 -41
- package/dist/Helpers/dropdownPortal.js +62 -116
- package/dist/Types/Examples/ExampleModal.svelte +35 -35
- package/dist/index.d.ts +0 -1
- package/dist/scss/_basics.scss +12 -12
- package/dist/scss/_colours.scss +134 -134
- package/dist/scss/_mixins.scss +3348 -3360
- package/dist/scss/_motion.scss +57 -57
- package/dist/scss/_sizing.scss +85 -85
- package/dist/scss/_transitions.scss +8 -8
- package/package.json +2 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ClipboardState } from './ClipboardState.svelte.js';
|
|
1
2
|
import { PreferencesState } from './PreferencesState.svelte.js';
|
|
3
|
+
import { QueryValuesState } from './QueryValuesState.svelte.js';
|
|
2
4
|
import { SelectionState } from './SelectionState.svelte.js';
|
|
3
5
|
import { SvelteMap } from 'svelte/reactivity';
|
|
4
6
|
import type { Updater } from 'svelte/store';
|
|
@@ -75,10 +77,8 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
75
77
|
get paginationRepo(): IDataRepository<T> | undefined;
|
|
76
78
|
set paginationRepo(v: IDataRepository<T> | undefined);
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* owns the `allowQuickFiltering` gate so the setter logic stays
|
|
81
|
-
* identical to the pre-extraction implementation.
|
|
80
|
+
* Delegates to `_filtering.showQuickFiltering`. The sub-context owns
|
|
81
|
+
* the `allowQuickFiltering` gate inside the setter.
|
|
82
82
|
*/
|
|
83
83
|
get showQuickFiltering(): boolean;
|
|
84
84
|
set showQuickFiltering(v: boolean);
|
|
@@ -86,26 +86,19 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
86
86
|
get dataRepo(): IDataRepository<T>;
|
|
87
87
|
private set dataRepo(value);
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* `_filtering.setRemoteFilters` during column-def setup to write the
|
|
92
|
-
* caller-supplied value.
|
|
89
|
+
* Delegates to `_filtering.remoteFilters`. The write path is
|
|
90
|
+
* `_filtering.setRemoteFilters`, called during column-def setup.
|
|
93
91
|
*/
|
|
94
92
|
get remoteFilters(): CustomRemoteFilters<unknown> | undefined;
|
|
95
93
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* preserves the idempotency short-circuit (re-assigning the same
|
|
99
|
-
* value is a no-op).
|
|
94
|
+
* Delegates to `_filtering.showSelectedOnly`. Re-assigning the same
|
|
95
|
+
* value is a no-op (idempotency short-circuit in the sub-context).
|
|
100
96
|
*/
|
|
101
97
|
get showSelectedOnly(): boolean;
|
|
102
98
|
set showSelectedOnly(v: boolean);
|
|
103
99
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* `paginationRepo` via the thunk so the source of truth stays
|
|
107
|
-
* with the data repository; consumers that bind these getters
|
|
108
|
-
* (notably `setupDefaultColumnDefs`) need no migration.
|
|
100
|
+
* Per-type `FilterFn` getters. Delegate to `_filtering`, which reads
|
|
101
|
+
* the source-of-truth from `paginationRepo` via thunk.
|
|
109
102
|
*/
|
|
110
103
|
get dateFilter(): FilterFn<T, DateFilterValueType> | undefined;
|
|
111
104
|
get numberFilter(): FilterFn<T, NumberFilterValueType> | undefined;
|
|
@@ -118,73 +111,43 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
118
111
|
private _dragTarget;
|
|
119
112
|
get dragTarget(): ColumnDef<T> | null;
|
|
120
113
|
set dragTarget(v: ColumnDef<T> | null);
|
|
121
|
-
/**
|
|
122
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
123
|
-
* actual `$state` slot lives on `_columnLayout`; this getter / setter
|
|
124
|
-
* pair forwards reads and writes so existing consumers need no
|
|
125
|
-
* migration. See `_columnLayout` below for the sub-context.
|
|
126
|
-
*/
|
|
114
|
+
/** Delegates to `_columnLayout.columnDefs`. */
|
|
127
115
|
get columnDefs(): Array<ColumnDef<T>>;
|
|
128
116
|
set columnDefs(v: Array<ColumnDef<T>>);
|
|
129
117
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* write path goes through `saveColumnPreset` (which also persists
|
|
134
|
-
* the list to localStorage); internal call sites that need to
|
|
118
|
+
* Delegates to `_preferences._columnPresets`. The setter is private
|
|
119
|
+
* because the public write path is `saveColumnPreset` (which also
|
|
120
|
+
* persists to localStorage); internal call sites that need to
|
|
135
121
|
* mutate the list directly call `_preferences.setPresets(...)`.
|
|
136
122
|
*/
|
|
137
123
|
get columnPresets(): ReadonlyArray<ColumnDefSet<T>>;
|
|
138
|
-
/**
|
|
139
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
140
|
-
* actual `$state` slot lives on `_preferences._selectedPreset`
|
|
141
|
-
* (Phase 6.4). Reads / writes through to the sub-context.
|
|
142
|
-
*/
|
|
124
|
+
/** Delegates to `_preferences._selectedPreset`. */
|
|
143
125
|
get selectedPreset(): ColumnDefSet<T> | undefined;
|
|
144
126
|
set selectedPreset(v: ColumnDefSet<T> | undefined);
|
|
145
127
|
/**
|
|
146
|
-
*
|
|
147
|
-
* `$
|
|
148
|
-
* Populated by the parent's focus-derived `$effect` through
|
|
128
|
+
* Delegates to `_focus._focusedRowIndices`. Populated by the
|
|
129
|
+
* focus-derived `$effect` in the constructor through
|
|
149
130
|
* `_focus.setFocusedDerived(rows, cols)`.
|
|
150
131
|
*/
|
|
151
132
|
get focusedRowIndices(): ReadonlySet<number>;
|
|
152
|
-
/**
|
|
153
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
154
|
-
* actual `$state` slot lives on `_selection._highlightedItems`
|
|
155
|
-
* (Phase 6.5).
|
|
156
|
-
*/
|
|
133
|
+
/** Delegates to `_selection._highlightedItems`. */
|
|
157
134
|
get highlightedItems(): SvelteMap<RowIdType, T>;
|
|
158
|
-
/**
|
|
159
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
160
|
-
* `$state` slot lives on `_focus._focusedColumnIds` (Phase 6.6).
|
|
161
|
-
*/
|
|
135
|
+
/** Delegates to `_focus._focusedColumnIds`. */
|
|
162
136
|
get focusedColumnIds(): ReadonlySet<string>;
|
|
163
|
-
/**
|
|
164
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
165
|
-
* `$state` slot lives on `_focus._isMousingDown` (Phase 6.6).
|
|
166
|
-
*/
|
|
137
|
+
/** Delegates to `_focus._isMousingDown`. */
|
|
167
138
|
get isMousingDown(): boolean;
|
|
168
139
|
set isMousingDown(v: boolean);
|
|
169
140
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* `endFocus` / `setFocusEnd` / `startFocus` (all delegated below).
|
|
141
|
+
* Delegates to `_focus._focusStart`. This surface is read-only; the
|
|
142
|
+
* write path is `moveFocus` / `unfocus` / `tabForward` /
|
|
143
|
+
* `tabBackward` / `endFocus` / `setFocusEnd` / `startFocus` (all
|
|
144
|
+
* delegated below).
|
|
175
145
|
*/
|
|
176
146
|
get focusStart(): CellCoordinates | null;
|
|
177
|
-
/**
|
|
178
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
179
|
-
* `$state` slot lives on `_focus._focusStartIsBeingEdited`
|
|
180
|
-
* (Phase 6.6).
|
|
181
|
-
*/
|
|
147
|
+
/** Delegates to `_focus._focusStartIsBeingEdited`. */
|
|
182
148
|
get focusStartIsBeingEdited(): boolean;
|
|
183
149
|
set focusStartIsBeingEdited(v: boolean);
|
|
184
|
-
/**
|
|
185
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
186
|
-
* `$state` slot lives on `_focus._focusEnd` (Phase 6.6).
|
|
187
|
-
*/
|
|
150
|
+
/** Delegates to `_focus._focusEnd`. */
|
|
188
151
|
get focusEnd(): CellCoordinates | null;
|
|
189
152
|
set focusEnd(v: CellCoordinates | null);
|
|
190
153
|
private _singleClickEditing;
|
|
@@ -199,23 +162,30 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
199
162
|
private _alternateRowColours;
|
|
200
163
|
get alternateRowColours(): boolean;
|
|
201
164
|
set alternateRowColours(v: boolean);
|
|
202
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Clipboard sub-context owning the two user-tunable preference flags
|
|
167
|
+
* (`copyWithHeaders`, `commaSeparatedCopy`) plus the
|
|
168
|
+
* `copyDataToClipboard` / `copyHighlightedRowsToClipboard` writers and
|
|
169
|
+
* their cell-serialisation internals. Dependency thunks below close
|
|
170
|
+
* over the parent reads it needs (column defs, sorted data, focus
|
|
171
|
+
* coordinates, etc.); the parent never sees the clipboard internals.
|
|
172
|
+
*/
|
|
173
|
+
readonly _clipboard: ClipboardState<T, RowIdType>;
|
|
174
|
+
/** Delegates to `_clipboard.copyWithHeaders`. */
|
|
203
175
|
get copyWithHeaders(): boolean;
|
|
204
176
|
set copyWithHeaders(v: boolean);
|
|
205
|
-
|
|
177
|
+
/** Delegates to `_clipboard.commaSeparatedCopy`. */
|
|
206
178
|
get commaSeparatedCopy(): boolean;
|
|
207
179
|
set commaSeparatedCopy(v: boolean);
|
|
208
180
|
/**
|
|
209
|
-
*
|
|
210
|
-
* through to `_columnLayout.columnSizing`. Per-key mutations (e.g.
|
|
181
|
+
* Delegates to `_columnLayout.columnSizing`. Per-key mutations (e.g.
|
|
211
182
|
* `this.columnSizing[id] = w` in `autoResize`) work because the
|
|
212
183
|
* underlying `$state` slot is a Svelte proxy.
|
|
213
184
|
*/
|
|
214
185
|
get columnSizing(): ColumnSizingState;
|
|
215
186
|
set columnSizing(v: ColumnSizingState);
|
|
216
187
|
/**
|
|
217
|
-
*
|
|
218
|
-
* through to `_columnLayout.columnPinning`. The `setColumnPinning`
|
|
188
|
+
* Delegates to `_columnLayout.columnPinning`. The `setColumnPinning`
|
|
219
189
|
* updater below honours the `allowColumnReordering` master gate; the
|
|
220
190
|
* direct setter does not, by design (used for preset switches and
|
|
221
191
|
* the init flow where the gate has already been checked).
|
|
@@ -223,8 +193,7 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
223
193
|
get columnPinning(): ColumnPinningState;
|
|
224
194
|
set columnPinning(v: ColumnPinningState);
|
|
225
195
|
/**
|
|
226
|
-
*
|
|
227
|
-
* through to `_columnLayout.columnVisibility`. Tri-state semantics
|
|
196
|
+
* Delegates to `_columnLayout.columnVisibility`. Tri-state semantics
|
|
228
197
|
* (`true` / `false` / `undefined`) are preserved.
|
|
229
198
|
*/
|
|
230
199
|
get columnVisibility(): VisibilityState;
|
|
@@ -234,13 +203,12 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
234
203
|
* `col.display({ modal })` modal is currently open, or `null` when no
|
|
235
204
|
* modal is open.
|
|
236
205
|
*
|
|
237
|
-
* Keyed on the **row object reference
|
|
238
|
-
* open-modal state is stable across pagination, sort, and filter
|
|
239
|
-
* changes
|
|
240
|
-
* openModalCell.row`. Visible-index
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
* change.
|
|
206
|
+
* Keyed on the **row object reference** (NOT on visible index) so
|
|
207
|
+
* the open-modal state is stable across pagination, sort, and filter
|
|
208
|
+
* changes; the cell renderer matches via
|
|
209
|
+
* `cell.row.original === openModalCell.row`. Visible-index keying
|
|
210
|
+
* would silently re-target the modal to whichever row happened to
|
|
211
|
+
* occupy the same index after a page change.
|
|
244
212
|
*/
|
|
245
213
|
private _openModalCell;
|
|
246
214
|
get openModalCell(): {
|
|
@@ -255,30 +223,23 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
255
223
|
get shownActionsPopup(): symbol | undefined;
|
|
256
224
|
set shownActionsPopup(v: symbol | undefined);
|
|
257
225
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* `_selection.allSelectedInCurrentPage` (Phase 6.5).
|
|
226
|
+
* Delegates to `_selection.allSelectedInCurrentPage` (the `$derived`
|
|
227
|
+
* chain and the async-result cache live there).
|
|
261
228
|
*/
|
|
262
229
|
get allSelectedInCurrentPage(): boolean;
|
|
263
230
|
/**
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* directly.
|
|
231
|
+
* Delegates to `_selection.allHighlighted`. The value is published
|
|
232
|
+
* by the `_allHighlightedEffect` below (which lives on this class
|
|
233
|
+
* because it reads `paginationRepo.pageStartIndex` /
|
|
234
|
+
* `pageEndIndexExclusive` directly).
|
|
269
235
|
*/
|
|
270
236
|
get allHighlighted(): boolean;
|
|
271
|
-
/**
|
|
272
|
-
* Delegating getter preserved for backwards compatibility. The
|
|
273
|
-
* `$derived` lives on `_selection.hasHighlightedItems` (Phase 6.5).
|
|
274
|
-
*/
|
|
237
|
+
/** Delegates to `_selection.hasHighlightedItems`. */
|
|
275
238
|
get hasHighlightedItems(): boolean;
|
|
276
239
|
/**
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* `toggleSelected` / `setSelected` / `resetSelectedItems` /
|
|
281
|
-
* `setSelectionMap` below.
|
|
240
|
+
* Delegates to `_selection.selectedItems`. Read-only at this surface;
|
|
241
|
+
* the public writers are `toggleSelected` / `setSelected` /
|
|
242
|
+
* `resetSelectedItems` / `setSelectionMap` below.
|
|
282
243
|
*/
|
|
283
244
|
get selectedItems(): SvelteMap<RowIdType, T>;
|
|
284
245
|
get invalidValues(): SvelteMap<RowIdType, T>;
|
|
@@ -287,22 +248,18 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
287
248
|
get hasInvalidSelectedItems(): boolean;
|
|
288
249
|
private set hasInvalidSelectedItems(value);
|
|
289
250
|
/**
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* (
|
|
293
|
-
*
|
|
294
|
-
* `private` field) so the dependent sub-contexts (`SortingState`)
|
|
295
|
-
* and helpers (`generateTableOptions`) can read it through the
|
|
296
|
-
* legacy surface without piercing the sub-context boundary.
|
|
251
|
+
* Delegates to `_columnLayout.columnDefsById`. `public get` (rather
|
|
252
|
+
* than a private field) so dependent sub-contexts (`SortingState`)
|
|
253
|
+
* and helpers (`generateTableOptions`) can read it without piercing
|
|
254
|
+
* the sub-context boundary.
|
|
297
255
|
*/
|
|
298
256
|
get columnDefsById(): ReadonlyMap<string, ColumnDef<T>>;
|
|
299
257
|
/**
|
|
300
|
-
*
|
|
301
|
-
* `
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
* helper, and the `setNewPinningState` helper.
|
|
258
|
+
* Column-layout sub-context: `columnDefs`, `columnSizing`,
|
|
259
|
+
* `columnPinning`, `columnVisibility`, the `columnDefsById`
|
|
260
|
+
* reverse-lookup map, the `visualColumns` cached array (and paired
|
|
261
|
+
* `visualColumnIndexById` O(1) lookup), the gated `setColumnPinning`
|
|
262
|
+
* updater, `updateDefsBasedOnPinning`, and `setNewPinningState`.
|
|
306
263
|
*
|
|
307
264
|
* Dependencies are passed as thunks so the sub-context never holds
|
|
308
265
|
* a reference to the parent. The `allowColumnReordering` thunk
|
|
@@ -311,101 +268,99 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
311
268
|
*/
|
|
312
269
|
readonly _columnLayout: ColumnLayoutState<T>;
|
|
313
270
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* `
|
|
318
|
-
*
|
|
271
|
+
* Filtering sub-context: per-row filter result
|
|
272
|
+
* (`filteredIndices`), the `filteredData` derived chain, user-facing
|
|
273
|
+
* toggles (`showQuickFiltering`, `showSelectedOnly`), the per-type
|
|
274
|
+
* `FilterFn` relays, the remote-filter slot, and the `updateFilters`
|
|
275
|
+
* `OnChangeFn` slot.
|
|
319
276
|
*
|
|
320
|
-
* Dependencies are
|
|
321
|
-
*
|
|
322
|
-
* `
|
|
323
|
-
* `this.createRow` (parent concern) - the effect publishes its
|
|
277
|
+
* Dependencies are thunks so the sub-context never holds a parent
|
|
278
|
+
* reference. The population effect for `_filteredIndices` lives on
|
|
279
|
+
* `TableContext` because it calls `this.createRow`; it publishes its
|
|
324
280
|
* result via `this._filtering.setFilteredIndices`.
|
|
325
281
|
*/
|
|
326
282
|
readonly _filtering: FilteringState<T>;
|
|
327
283
|
/**
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
* `this.createRow` and must stay where `createRow` lives).
|
|
284
|
+
* Delegates to `_filtering.filteredIndices`. Populated by the per-row
|
|
285
|
+
* filter `$effect` in this class (which calls `this.createRow` and
|
|
286
|
+
* must stay where `createRow` lives).
|
|
332
287
|
*/
|
|
333
288
|
get filteredIndices(): ReadonlyArray<number>;
|
|
334
289
|
/**
|
|
335
|
-
*
|
|
336
|
-
* through to `_filtering.filteredData`, which owns the local /
|
|
290
|
+
* Delegates to `_filtering.filteredData`, which owns the local /
|
|
337
291
|
* remote / show-selected-only branching.
|
|
338
292
|
*/
|
|
339
293
|
get filteredData(): Array<T>;
|
|
340
294
|
/**
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
* `
|
|
345
|
-
|
|
346
|
-
|
|
295
|
+
* Typeahead-echo cache for QuerySelect-backed filter inputs. Keyed by
|
|
296
|
+
* `ColumnDef` so reads and writes cannot diverge on the key (a recurring
|
|
297
|
+
* regression from the legacy `Map<string, unknown>` shape). See
|
|
298
|
+
* `QueryValuesState` for the rationale.
|
|
299
|
+
*/
|
|
300
|
+
readonly _queryValues: QueryValuesState<T>;
|
|
301
|
+
/** Public alias for `_queryValues`, used by filter input components. */
|
|
302
|
+
get queryValues(): QueryValuesState<T>;
|
|
303
|
+
/**
|
|
304
|
+
* Sort sub-context: owns the sort-related derived chain and the
|
|
305
|
+
* per-`ColumnDef` comparator dispatch. Dependency thunks close over
|
|
306
|
+
* `this.columnDefsById` / `this.filteredData` / `this.dataRepo` /
|
|
307
|
+
* `this.paginationRepo` / `this.debug`, so the sub-context never
|
|
308
|
+
* holds a parent reference and reactivity stays in `$derived`.
|
|
347
309
|
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
* pre-decomposition surface for backwards compatibility.
|
|
310
|
+
* Public field so consumers can read sorting state directly; the
|
|
311
|
+
* `sortedData` getter below preserves the legacy surface.
|
|
351
312
|
*/
|
|
352
313
|
readonly _sorting: SortingState<T>;
|
|
353
314
|
/**
|
|
354
|
-
*
|
|
355
|
-
* concern previously held directly on `TableContext`:
|
|
315
|
+
* Persistence / preferences sub-context:
|
|
356
316
|
*
|
|
357
|
-
* -
|
|
317
|
+
* - saved column-presets list and currently-selected preset
|
|
358
318
|
* (`columnPresets`, `selectedPreset`);
|
|
359
|
-
* -
|
|
319
|
+
* - `userIdSegment` `$derived` (namespaces every
|
|
360
320
|
* `scoria-table:<user>:<tableName>:<suffix>` storage key);
|
|
361
|
-
* -
|
|
362
|
-
*
|
|
363
|
-
* -
|
|
364
|
-
*
|
|
365
|
-
* -
|
|
366
|
-
*
|
|
367
|
-
* -
|
|
368
|
-
*
|
|
321
|
+
* - `saveColumnPreset` / `setSelectedPreset` writers (apply layout
|
|
322
|
+
* AND persist);
|
|
323
|
+
* - `loadPresets` / `loadSelectedPresetName` / `loadSavedSettings`
|
|
324
|
+
* boot-time hydration helpers;
|
|
325
|
+
* - `persistSettings` writer used by the in-app settings toggles
|
|
326
|
+
* (`setIsCompact`, `setAlternateRowColours`, etc.);
|
|
327
|
+
* - schema-validation typeguards (exported alongside the sub-context
|
|
328
|
+
* for unit testing).
|
|
369
329
|
*
|
|
370
330
|
* The settings fields themselves (`isCompact`, `singleClickEditing`,
|
|
371
331
|
* `alternateRowColours`, etc.) stay on `TableContext` because each
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* `
|
|
332
|
+
* drives reactive UI; only the localStorage round-trip lives here.
|
|
333
|
+
* Delegating getters / setters / methods on `TableContext` cover the
|
|
334
|
+
* full surface (`columnPresets`, `selectedPreset`, `saveColumnPreset`,
|
|
335
|
+
* `setSelectedPreset`, `setIsCompact`, etc.).
|
|
376
336
|
*/
|
|
377
337
|
readonly _preferences: PreferencesState<T>;
|
|
378
338
|
/**
|
|
379
|
-
*
|
|
380
|
-
* key-cache concern previously held directly on `TableContext`:
|
|
339
|
+
* Selection + highlighting + key-cache sub-context:
|
|
381
340
|
*
|
|
382
341
|
* - `selectedItems` / `invalidValues` / `highlightedItems`
|
|
383
342
|
* (`SvelteMap` slots, keyed by `selectionExtractor(item)`);
|
|
384
|
-
* -
|
|
385
|
-
*
|
|
386
|
-
* -
|
|
343
|
+
* - `WeakMap<T, RowIdType>` key-cache memoising the extractor result
|
|
344
|
+
* per row reference;
|
|
345
|
+
* - pending-flush buffer and its debounced microtask
|
|
387
346
|
* (`_pendingSelectionChanges` -> `tick().then(flush)`);
|
|
388
|
-
* -
|
|
389
|
-
*
|
|
347
|
+
* - `allSelectedInCurrentPage` `$derived` (with the async-result
|
|
348
|
+
* cache for promise-returning `selectionExtractor` /
|
|
390
349
|
* `RowSelectionDef.isSelectable`);
|
|
391
|
-
* -
|
|
350
|
+
* - `selectAllInCurrentPage` / `updateSelectedItems` /
|
|
392
351
|
* `onHighlightAll` flows;
|
|
393
|
-
* -
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* class.
|
|
352
|
+
* - `handleItemMutation` split that powers the parent's `onEditCell`:
|
|
353
|
+
* the sub-context owns the key-cache delete + selection rebind; the
|
|
354
|
+
* user-supplied callback stays on this class.
|
|
397
355
|
*
|
|
398
|
-
* Dependencies are
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
* through `_selection.setAllHighlighted(...)` and
|
|
403
|
-
* `_selection.updateSelectedItems()`.
|
|
356
|
+
* Dependencies are thunks so the sub-context never holds a parent
|
|
357
|
+
* reference. The two `$effect`s that read `paginationRepo` directly
|
|
358
|
+
* stay on `TableContext` and publish via `_selection.setAllHighlighted`
|
|
359
|
+
* and `_selection.updateSelectedItems`.
|
|
404
360
|
*/
|
|
405
361
|
readonly _selection: SelectionState<T, RowIdType>;
|
|
406
362
|
/**
|
|
407
|
-
*
|
|
408
|
-
* concern previously held directly on `TableContext`:
|
|
363
|
+
* Focus + keyboard-navigation sub-context:
|
|
409
364
|
*
|
|
410
365
|
* - `focusStart` / `focusEnd` / `focusStartIsBeingEdited` /
|
|
411
366
|
* `isMousingDown` (the `$state` slots that define the focused
|
|
@@ -435,25 +390,23 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
435
390
|
* because it reads `paginationRowModel` + `_visualColumns` directly;
|
|
436
391
|
* it calls `_focus.setFocusedDerived(rows, cols)` to publish.
|
|
437
392
|
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
* `FocusState` for the deferral rationale.
|
|
393
|
+
* Per-cell `TableFocusDetails` reuse cache is deferred; see the
|
|
394
|
+
* class-level JSDoc on `FocusState` for the rationale.
|
|
441
395
|
*/
|
|
442
396
|
readonly _focus: FocusState<T>;
|
|
443
397
|
/**
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* `TableBody.svelte` renders.
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
* the next paint.
|
|
398
|
+
* Row-virtualisation sub-context. Owns the visible-row window plus
|
|
399
|
+
* the top / bottom spacer-height derived chain that
|
|
400
|
+
* `TableBody.svelte` renders. Below the 100-row threshold every row
|
|
401
|
+
* is rendered directly; above it, overscan rows above and below the
|
|
402
|
+
* viewport stay rendered so a fast wheel flick does not surface a
|
|
403
|
+
* blank band.
|
|
451
404
|
*
|
|
452
|
-
* Dependencies are thunks
|
|
453
|
-
* `paginationRowModel.rows`
|
|
454
|
-
* observed height from the
|
|
455
|
-
*
|
|
456
|
-
*
|
|
405
|
+
* Dependencies are thunks: `getRows` reads
|
|
406
|
+
* `paginationRowModel.rows`, `getRowHeight` returns the max-side
|
|
407
|
+
* observed height from the row-height pool (currently a no-op
|
|
408
|
+
* pending re-introduction), and `getEstimatedRowHeight` returns the
|
|
409
|
+
* per-table-density estimate.
|
|
457
410
|
*/
|
|
458
411
|
/**
|
|
459
412
|
* Rendered widths of header cells, keyed by columnId. TableHead
|
|
@@ -471,12 +424,8 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
471
424
|
readonly _columnRenderedWidths: SvelteMap<string, number>;
|
|
472
425
|
readonly _virtualisation: VirtualisationState<T>;
|
|
473
426
|
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* optimisation and the `AbortController` short-circuit. Consumers
|
|
477
|
-
* inside `src/lib` already point at `tableContext.sortedData`; the
|
|
478
|
-
* delegation will be removed once Phase 6 v-next migrates every
|
|
479
|
-
* reader to `tableContext._sorting.sortedData` directly.
|
|
427
|
+
* Delegates to `_sorting.sortedData`, which owns the comparator-hoist
|
|
428
|
+
* optimisation and the `AbortController` short-circuit.
|
|
480
429
|
*/
|
|
481
430
|
get sortedData(): Array<T>;
|
|
482
431
|
private _sortedRowModel;
|
|
@@ -489,20 +438,17 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
489
438
|
private _paginationRowModel;
|
|
490
439
|
get paginationRowModel(): RowModel<T>;
|
|
491
440
|
/**
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
* `originalRowIndices` / `sortedRowModel` / `onHighlightAll` see
|
|
497
|
-
* no behavioural change.
|
|
441
|
+
* Forwards to `_selection.cachedKey(item)` (the key-extraction cache
|
|
442
|
+
* lives there). Used by `getHighlightedRowData` /
|
|
443
|
+
* `getFocusElementData` / `originalRowIndices` / `sortedRowModel` /
|
|
444
|
+
* `onHighlightAll`.
|
|
498
445
|
*/
|
|
499
446
|
private _cachedKey;
|
|
500
|
-
/**
|
|
501
|
-
* implementation lives on `_selection.selectionContains` (Phase 6.5). */
|
|
447
|
+
/** Delegates to `_selection.selectionContains`. */
|
|
502
448
|
readonly selectionContains: (item: T) => boolean | Promise<boolean>;
|
|
503
|
-
/**
|
|
449
|
+
/** Delegates to `_selection.addInvalidValue`. */
|
|
504
450
|
readonly addInvalidValue: (item: T) => void | Promise<void>;
|
|
505
|
-
/**
|
|
451
|
+
/** Delegates to `_selection.removeInvalidValue`. */
|
|
506
452
|
readonly removeInvalidValue: (item: T) => void | Promise<void>;
|
|
507
453
|
/**
|
|
508
454
|
* Stores or clears the cell whose per-cell modal is currently open.
|
|
@@ -516,23 +462,23 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
516
462
|
row: T;
|
|
517
463
|
columnId: string;
|
|
518
464
|
} | null) => void;
|
|
519
|
-
/**
|
|
465
|
+
/** Delegates to `_focus`. */
|
|
520
466
|
readonly toggleHighlightedRow: (item: T) => void | Promise<void>;
|
|
521
|
-
/**
|
|
467
|
+
/** Delegates to `_focus`. */
|
|
522
468
|
readonly resetHighlightedRows: () => void;
|
|
523
|
-
/**
|
|
469
|
+
/** Delegates to `_focus`. */
|
|
524
470
|
readonly toggleSelected: (item: T) => void | Promise<void>;
|
|
525
|
-
/**
|
|
471
|
+
/** Delegates to `_focus`. */
|
|
526
472
|
readonly setSelected: (item: T, selected: boolean) => void | Promise<void>;
|
|
527
|
-
/**
|
|
473
|
+
/** Delegates to `_focus`. */
|
|
528
474
|
setSelectionMap: (set: SvelteMap<RowIdType, T>) => void;
|
|
529
|
-
/**
|
|
475
|
+
/** Delegates to `_focus`. */
|
|
530
476
|
readonly updateSelectedItems: () => Promise<void>;
|
|
531
|
-
/**
|
|
477
|
+
/** Delegates to `_focus`. */
|
|
532
478
|
readonly resetSelectedItems: () => void;
|
|
533
|
-
/**
|
|
479
|
+
/** Delegates to `_focus`. */
|
|
534
480
|
readonly selectAllInCurrentPage: () => Promise<void>;
|
|
535
|
-
/**
|
|
481
|
+
/** Delegates to `_focus`. */
|
|
536
482
|
readonly onHighlightAll: () => void | Promise<void>;
|
|
537
483
|
/**
|
|
538
484
|
* Invoked by every editable cell on commit. Split between this
|
|
@@ -544,11 +490,10 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
544
490
|
*/
|
|
545
491
|
readonly onEditCell: (item: T, coords: CellCoordinates, value: unknown) => Promise<void>;
|
|
546
492
|
/**
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* arrow-key / Home / End / Ctrl+A / Ctrl+C path asynchronously.
|
|
493
|
+
* Delegates to `_focus.handleTdKeydown`. Bound to the root
|
|
494
|
+
* `<table>` container's `onkeydown` listener; routes Ctrl+F /
|
|
495
|
+
* Escape / Tab synchronously and dispatches the arrow-key / Home /
|
|
496
|
+
* End / Ctrl+A / Ctrl+C path asynchronously.
|
|
552
497
|
*/
|
|
553
498
|
readonly handleTdKeydown: (e: KeyboardEvent) => void;
|
|
554
499
|
/** Toggles quick-filtering visibility and refocuses the matching cell. */
|
|
@@ -559,12 +504,7 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
559
504
|
* enforces the `allowColumnReordering` master gate.
|
|
560
505
|
*/
|
|
561
506
|
readonly setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
|
|
562
|
-
/**
|
|
563
|
-
* Delegating accessor preserved for backwards compatibility. The
|
|
564
|
-
* actual `$state` slot lives on `_filtering`; this getter / setter
|
|
565
|
-
* pair forwards reads and writes so existing consumers (notably
|
|
566
|
-
* `generateTableOptions`) need no migration.
|
|
567
|
-
*/
|
|
507
|
+
/** Delegates to `_filtering.updateFilters`. */
|
|
568
508
|
get updateFilters(): OnChangeFn<ColumnFiltersState> | undefined;
|
|
569
509
|
set updateFilters(v: OnChangeFn<ColumnFiltersState> | undefined);
|
|
570
510
|
updateVisibility: OnChangeFn<VisibilityState>;
|
|
@@ -588,56 +528,53 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
588
528
|
* reordering is disabled or indices are out of range / unchanged.
|
|
589
529
|
*/
|
|
590
530
|
moveColumnTo: (currentIndex: number, newIndex: number) => void;
|
|
591
|
-
/**
|
|
531
|
+
/** Delegates to `_clipboard.copyHighlightedRowsToClipboard`. */
|
|
592
532
|
copyHighlightedRowsToClipboard: () => Promise<void>;
|
|
593
|
-
/**
|
|
533
|
+
/** Delegates to `_clipboard.copyDataToClipboard`. */
|
|
594
534
|
copyDataToClipboard: () => Promise<void>;
|
|
595
|
-
|
|
596
|
-
/** Delegating accessor preserved for backwards compatibility. The
|
|
597
|
-
* implementation lives on `_focus.startFocus` (Phase 6.6). */
|
|
535
|
+
/** Delegates to `_focus.startFocus`. */
|
|
598
536
|
readonly startFocus: (coords: CellCoordinates) => void;
|
|
599
|
-
/**
|
|
600
|
-
* implementation lives on `_focus.moveFocus` (Phase 6.6). */
|
|
537
|
+
/** Delegates to `_focus.moveFocus`. */
|
|
601
538
|
readonly moveFocus: (coords: CellCoordinates, startEditing?: boolean) => void;
|
|
602
|
-
/**
|
|
539
|
+
/** Delegates to `_focus`. */
|
|
603
540
|
readonly unfocus: () => void;
|
|
604
|
-
/**
|
|
541
|
+
/** Delegates to `_focus`. */
|
|
605
542
|
readonly focusToTop: () => void;
|
|
606
|
-
/**
|
|
543
|
+
/** Delegates to `_focus`. */
|
|
607
544
|
readonly focusToBottom: () => void;
|
|
608
|
-
/**
|
|
545
|
+
/** Delegates to `_focus`. */
|
|
609
546
|
readonly moveToBottom: () => void;
|
|
610
|
-
/**
|
|
547
|
+
/** Delegates to `_focus`. */
|
|
611
548
|
readonly moveToTop: () => void;
|
|
612
|
-
/**
|
|
549
|
+
/** Delegates to `_focus`. */
|
|
613
550
|
readonly moveFocusUp: () => void;
|
|
614
|
-
/**
|
|
551
|
+
/** Delegates to `_focus`. */
|
|
615
552
|
readonly setFocusUp: () => void;
|
|
616
|
-
/**
|
|
553
|
+
/** Delegates to `_focus`. */
|
|
617
554
|
readonly tabForward: () => void;
|
|
618
|
-
/**
|
|
555
|
+
/** Delegates to `_focus`. */
|
|
619
556
|
readonly tabBackward: () => void;
|
|
620
|
-
/**
|
|
557
|
+
/** Delegates to `_focus`. */
|
|
621
558
|
readonly focusToStart: () => void;
|
|
622
|
-
/**
|
|
559
|
+
/** Delegates to `_focus`. */
|
|
623
560
|
readonly moveToStart: () => void;
|
|
624
|
-
/**
|
|
561
|
+
/** Delegates to `_focus`. */
|
|
625
562
|
readonly focusToEnd: () => void;
|
|
626
|
-
/**
|
|
563
|
+
/** Delegates to `_focus`. */
|
|
627
564
|
readonly moveToEnd: () => void;
|
|
628
|
-
/**
|
|
565
|
+
/** Delegates to `_focus`. */
|
|
629
566
|
readonly moveFocusDown: () => void;
|
|
630
|
-
/**
|
|
567
|
+
/** Delegates to `_focus`. */
|
|
631
568
|
readonly setFocusDown: () => void;
|
|
632
|
-
/**
|
|
569
|
+
/** Delegates to `_focus`. */
|
|
633
570
|
readonly moveFocusLeft: () => void;
|
|
634
|
-
/**
|
|
571
|
+
/** Delegates to `_focus`. */
|
|
635
572
|
readonly setFocusLeft: () => void;
|
|
636
|
-
/**
|
|
573
|
+
/** Delegates to `_focus`. */
|
|
637
574
|
readonly moveFocusRight: () => void;
|
|
638
|
-
/**
|
|
575
|
+
/** Delegates to `_focus`. */
|
|
639
576
|
readonly setFocusRight: () => void;
|
|
640
|
-
/**
|
|
577
|
+
/** Delegates to `_focus`. */
|
|
641
578
|
readonly endFocus: (coords: CellCoordinates) => void;
|
|
642
579
|
/** Toggles compact row sizing and persists to localStorage. */
|
|
643
580
|
readonly setIsCompact: (value: boolean) => void;
|
|
@@ -652,49 +589,41 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
652
589
|
/** Toggles CSV vs TSV copy-to-clipboard separator and persists. */
|
|
653
590
|
readonly setCommaSeparatedCopy: (value: boolean) => void;
|
|
654
591
|
/**
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* `_preferences.setSelectedPreset` (Phase 6.4).
|
|
592
|
+
* Applies the preset to the live column layout, forwards the
|
|
593
|
+
* preset's `sortingState` to the data-repository updater, and
|
|
594
|
+
* persists the selected name. Delegates to
|
|
595
|
+
* `_preferences.setSelectedPreset`.
|
|
660
596
|
*
|
|
661
|
-
* The
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* `
|
|
665
|
-
* warning is reinstated below so the surface is byte-identical.
|
|
597
|
+
* The "no sorting state found" debug warning is emitted here (not
|
|
598
|
+
* inside the sub-context) so the public surface stays byte-identical
|
|
599
|
+
* - `_preferences.applySortingState` already no-ops when
|
|
600
|
+
* `paginationRepo.updateSorting` is absent.
|
|
666
601
|
*/
|
|
667
602
|
readonly setSelectedPreset: (preset: ColumnDefSet<T>) => void;
|
|
668
603
|
/**
|
|
669
|
-
*
|
|
670
|
-
* replaces a saved preset for the current column layout and
|
|
604
|
+
* Adds or replaces a saved preset for the current column layout and
|
|
671
605
|
* persists the full preset list to localStorage. Delegates to
|
|
672
|
-
* `_preferences.saveColumnPreset
|
|
606
|
+
* `_preferences.saveColumnPreset`.
|
|
673
607
|
*/
|
|
674
608
|
readonly saveColumnPreset: (name: string) => void;
|
|
675
609
|
/**
|
|
676
|
-
* This listener should be added
|
|
610
|
+
* Delegates to `_focus.setFocusEnd`. This listener should be added
|
|
611
|
+
* and removed based on `isMousingDown`.
|
|
677
612
|
*/
|
|
678
|
-
/** Delegating accessor preserved for backwards compatibility. The
|
|
679
|
-
* implementation lives on `_focus.setFocusEnd` (Phase 6.6). */
|
|
680
613
|
readonly setFocusEnd: (coords: CellCoordinates) => void;
|
|
681
614
|
private createRow;
|
|
682
|
-
private columnDefReturnsTextValue;
|
|
683
615
|
/**
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
* persistence side of the boundary moved.
|
|
616
|
+
* Build the user-controlled settings blob from the current `$state`
|
|
617
|
+
* slots and delegate the `localStorage.setItem` call to
|
|
618
|
+
* `_preferences.persistSettings`. The settings fields themselves
|
|
619
|
+
* live on `TableContext` because each drives reactive UI; only the
|
|
620
|
+
* persistence boundary lives in the sub-context.
|
|
690
621
|
*/
|
|
691
622
|
private _updateLocalStorageSettings;
|
|
692
623
|
/**
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
* preserved on `TableContext` to keep the existing read sites in
|
|
697
|
-
* `tabForward` / `focusToStart` / `moveFocusLeft` / etc. untouched.
|
|
624
|
+
* Delegates to `_columnLayout.visualColumns`. The underscore prefix
|
|
625
|
+
* is preserved so the existing read sites in `tabForward` /
|
|
626
|
+
* `focusToStart` / `moveFocusLeft` / etc. stay untouched.
|
|
698
627
|
*/
|
|
699
628
|
get _visualColumns(): Array<ColumnDef<T>>;
|
|
700
629
|
/** Returns the visual index of the column with the given id, or
|
|
@@ -702,71 +631,29 @@ export declare class TableContext<T extends object, RowIdType extends Primitive>
|
|
|
702
631
|
* which provides the O(1) lookup. */
|
|
703
632
|
columnVisualIndex(id: string): VisualColumnIndex;
|
|
704
633
|
/**
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
* (Phase 6.6); the visual-index lookup itself is owned by
|
|
708
|
-
* `_columnLayout.columnVisualIndex` (Phase 6.3).
|
|
634
|
+
* Delegates to `_focus.focusStartVisualColumn`; the visual-index
|
|
635
|
+
* lookup is owned by `_columnLayout.columnVisualIndex`.
|
|
709
636
|
*/
|
|
710
637
|
get focusStartVisualColumn(): VisualColumnIndex;
|
|
711
|
-
/**
|
|
712
|
-
* Delegating getter preserved for backwards compatibility. The
|
|
713
|
-
* implementation lives on `_focus.focusEndVisualColumn`
|
|
714
|
-
* (Phase 6.6).
|
|
715
|
-
*/
|
|
638
|
+
/** Delegates to `_focus.focusEndVisualColumn`. */
|
|
716
639
|
get focusEndVisualColumn(): VisualColumnIndex;
|
|
717
|
-
private getHighlightedRowData;
|
|
718
|
-
private getFocusElementData;
|
|
719
640
|
private updateDefsBasedOnPinning;
|
|
720
641
|
private assertNoDuplicateIds;
|
|
721
642
|
private setupDefaultColumnDefs;
|
|
722
643
|
/**
|
|
723
|
-
*
|
|
724
|
-
* `_preferences.loadSavedSettings`
|
|
725
|
-
*
|
|
726
|
-
* pre-extraction behaviour:
|
|
644
|
+
* Read the persisted per-table user-settings blob through
|
|
645
|
+
* `_preferences.loadSavedSettings` and apply each field to the live
|
|
646
|
+
* `$state` slot. Field defaults:
|
|
727
647
|
*
|
|
728
648
|
* - missing slot: `singleClickEditing` defaults to `true`; every
|
|
729
649
|
* other field keeps its constructor default.
|
|
730
|
-
* - present slot:
|
|
650
|
+
* - present slot: a field is applied only if it would deviate from
|
|
731
651
|
* the constructor default (the "only alter when the user
|
|
732
|
-
* explicitly disabled"
|
|
652
|
+
* explicitly disabled it" semantic).
|
|
733
653
|
*/
|
|
734
654
|
private _getUserDefaults;
|
|
735
655
|
private _setNewPinningState;
|
|
736
656
|
readonly getToggleSortingHandler: (def: ColumnDef<T>) => () => void;
|
|
737
657
|
private reassignDefsToPresets;
|
|
738
658
|
}
|
|
739
|
-
export declare function isSearchable<T extends object, FilterValueType,
|
|
740
|
-
/**
|
|
741
|
-
* Neutralises CSV / TSV formula-injection prefixes recognised by Excel,
|
|
742
|
-
* LibreOffice Calc, Google Sheets, and Apple Numbers.
|
|
743
|
-
*
|
|
744
|
-
* When a clipboard payload reaches a spreadsheet, any cell whose first
|
|
745
|
-
* character is one of `=`, `+`, `-`, `@`, `\t`, `\r` is treated as a
|
|
746
|
-
* formula and evaluated in the user's context. Untrusted row data
|
|
747
|
-
* containing `=cmd|'/c calc'!A1` (or DDE / web-query equivalents) is the
|
|
748
|
-
* canonical attack vector. Prefixing such a value with a single quote
|
|
749
|
-
* (`'`) makes the spreadsheet interpret the cell as a literal string
|
|
750
|
-
* instead.
|
|
751
|
-
*
|
|
752
|
-
* Trade-off: the leading apostrophe is invisible in the rendered cell of
|
|
753
|
-
* every major spreadsheet, but the underlying cell value differs from the
|
|
754
|
-
* source when read back by another formula referencing the cell. This is
|
|
755
|
-
* the accepted industry mitigation (OWASP CSV Injection cheat sheet).
|
|
756
|
-
*
|
|
757
|
-
* Private helper - keep this colocated with `encapsulate` so every
|
|
758
|
-
* clipboard-bound string flows through both functions before being
|
|
759
|
-
* written to the OS clipboard.
|
|
760
|
-
*/
|
|
761
|
-
declare function escapeForSpreadsheet(value: string): string;
|
|
762
|
-
declare function encapsulate(value: string): string;
|
|
763
|
-
/**
|
|
764
|
-
* Internal exports for tests. Not part of the public API; do not import
|
|
765
|
-
* from consumer code. Allows the clipboard formula-escape regression test
|
|
766
|
-
* to call the module-private helpers directly.
|
|
767
|
-
*/
|
|
768
|
-
export declare const _internal: {
|
|
769
|
-
escapeForSpreadsheet: typeof escapeForSpreadsheet;
|
|
770
|
-
encapsulate: typeof encapsulate;
|
|
771
|
-
};
|
|
772
|
-
export {};
|
|
659
|
+
export declare function isSearchable<T extends object, FilterValueType, CD extends ColumnDef<T, FilterValueType>>(def: CD): def is CD & HasCustomFilterFunction;
|