simple-table-core 3.9.2 → 3.9.6
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/cjs/index.js +1 -1
- package/dist/cjs/src/consts/general-consts.d.ts +9 -0
- package/dist/cjs/src/core/SimpleTableVanilla.d.ts +11 -0
- package/dist/cjs/src/core/api/TableAPIImpl.d.ts +2 -0
- package/dist/cjs/src/core/initialization/TableInitializer.d.ts +1 -0
- package/dist/cjs/src/core/rendering/RenderOrchestrator.d.ts +5 -0
- package/dist/cjs/src/core/rendering/SectionRenderer.d.ts +8 -0
- package/dist/cjs/src/core/rendering/TableRenderer.d.ts +2 -0
- package/dist/cjs/src/hooks/expandedDepths.d.ts +5 -1
- package/dist/cjs/src/hooks/handleOutsideClick.d.ts +1 -1
- package/dist/cjs/src/index.d.ts +2 -1
- package/dist/cjs/src/managers/DimensionManager.d.ts +25 -2
- package/dist/cjs/src/managers/RowSelectionManager.d.ts +38 -2
- package/dist/cjs/src/managers/SelectionManager/types.d.ts +1 -6
- package/dist/cjs/src/managers/TableManager.d.ts +0 -1
- package/dist/cjs/src/types/ColumnEditorConfig.d.ts +8 -1
- package/dist/cjs/src/types/RowSelectionMode.d.ts +8 -0
- package/dist/cjs/src/types/SimpleTableConfig.d.ts +7 -1
- package/dist/cjs/src/types/SimpleTableProps.d.ts +18 -1
- package/dist/cjs/src/types/TableAPI.d.ts +12 -0
- package/dist/cjs/src/utils/bodyCell/types.d.ts +12 -0
- package/dist/cjs/src/utils/headerCell/types.d.ts +3 -1
- package/dist/cjs/src/utils/headerWidthUtils.d.ts +30 -14
- package/dist/cjs/src/utils/horizontalScrollbarRenderer.d.ts +1 -0
- package/dist/cjs/src/utils/rowSelectionUtils.d.ts +24 -1
- package/dist/cjs/src/utils/stickyParentsRenderer.d.ts +1 -0
- package/dist/cjs/stories/docs/Examples.stories.d.ts +17 -0
- package/dist/cjs/stories/{SimpleTable.stories.d.ts → docs/Features.stories.d.ts} +5 -16
- package/dist/cjs/stories/docs/GettingStarted.stories.d.ts +7 -0
- package/dist/cjs/stories/docs/storyArgs.d.ts +147 -0
- package/dist/cjs/stories/examples/AlignmentExample.d.ts +0 -1
- package/dist/cjs/stories/examples/CellHighlighting.d.ts +0 -1
- package/dist/cjs/stories/examples/Pagination.d.ts +0 -1
- package/dist/cjs/stories/examples/RadioStationsExample.d.ts +3 -0
- package/dist/cjs/stories/examples/RowSelectionExample.d.ts +1 -0
- package/dist/cjs/stories/examples/SelectableCells.d.ts +0 -1
- package/dist/cjs/stories/examples/Theming.d.ts +0 -1
- package/dist/cjs/stories/examples/pinned-columns/PinnedColumns.d.ts +0 -1
- package/dist/cjs/stories/tests/07-RowSelectionTests.stories.d.ts +32 -0
- package/dist/cjs/stories/tests/12-CellSelectionTests.stories.d.ts +41 -1
- package/dist/cjs/stories/tests/15-ColumnVisibilityTests.stories.d.ts +8 -0
- package/dist/cjs/stories/tests/18-QuickFilterTests.stories.d.ts +19 -0
- package/dist/cjs/stories/tests/21-ColumnSelectionTests.stories.d.ts +1 -1
- package/dist/cjs/stories/tests/22-LoadingStateTests.stories.d.ts +32 -0
- package/dist/cjs/stories/tests/32-ThemesTests.stories.d.ts +6 -0
- package/dist/cjs/stories/tests/46-AutoSizeColumnsTests.stories.d.ts +11 -0
- package/dist/cjs/stories/utils.d.ts +15 -2
- package/dist/cjs/stories/vanillaStoryConfig.d.ts +0 -7
- package/dist/cjs/styles.css +1 -1
- package/dist/index.es.js +1 -1
- package/dist/src/consts/general-consts.d.ts +9 -0
- package/dist/src/core/SimpleTableVanilla.d.ts +11 -0
- package/dist/src/core/api/TableAPIImpl.d.ts +2 -0
- package/dist/src/core/initialization/TableInitializer.d.ts +1 -0
- package/dist/src/core/rendering/RenderOrchestrator.d.ts +5 -0
- package/dist/src/core/rendering/SectionRenderer.d.ts +8 -0
- package/dist/src/core/rendering/TableRenderer.d.ts +2 -0
- package/dist/src/hooks/expandedDepths.d.ts +5 -1
- package/dist/src/hooks/handleOutsideClick.d.ts +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/managers/DimensionManager.d.ts +25 -2
- package/dist/src/managers/RowSelectionManager.d.ts +38 -2
- package/dist/src/managers/SelectionManager/types.d.ts +1 -6
- package/dist/src/managers/TableManager.d.ts +0 -1
- package/dist/src/types/ColumnEditorConfig.d.ts +8 -1
- package/dist/src/types/RowSelectionMode.d.ts +8 -0
- package/dist/src/types/SimpleTableConfig.d.ts +7 -1
- package/dist/src/types/SimpleTableProps.d.ts +18 -1
- package/dist/src/types/TableAPI.d.ts +12 -0
- package/dist/src/utils/bodyCell/types.d.ts +12 -0
- package/dist/src/utils/headerCell/types.d.ts +3 -1
- package/dist/src/utils/headerWidthUtils.d.ts +30 -14
- package/dist/src/utils/horizontalScrollbarRenderer.d.ts +1 -0
- package/dist/src/utils/rowSelectionUtils.d.ts +24 -1
- package/dist/src/utils/stickyParentsRenderer.d.ts +1 -0
- package/dist/stories/docs/Examples.stories.d.ts +17 -0
- package/dist/stories/{SimpleTable.stories.d.ts → docs/Features.stories.d.ts} +5 -16
- package/dist/stories/docs/GettingStarted.stories.d.ts +7 -0
- package/dist/stories/docs/storyArgs.d.ts +147 -0
- package/dist/stories/examples/AlignmentExample.d.ts +0 -1
- package/dist/stories/examples/CellHighlighting.d.ts +0 -1
- package/dist/stories/examples/Pagination.d.ts +0 -1
- package/dist/stories/examples/RadioStationsExample.d.ts +3 -0
- package/dist/stories/examples/RowSelectionExample.d.ts +1 -0
- package/dist/stories/examples/SelectableCells.d.ts +0 -1
- package/dist/stories/examples/Theming.d.ts +0 -1
- package/dist/stories/examples/pinned-columns/PinnedColumns.d.ts +0 -1
- package/dist/stories/tests/07-RowSelectionTests.stories.d.ts +32 -0
- package/dist/stories/tests/12-CellSelectionTests.stories.d.ts +41 -1
- package/dist/stories/tests/15-ColumnVisibilityTests.stories.d.ts +8 -0
- package/dist/stories/tests/18-QuickFilterTests.stories.d.ts +19 -0
- package/dist/stories/tests/21-ColumnSelectionTests.stories.d.ts +1 -1
- package/dist/stories/tests/22-LoadingStateTests.stories.d.ts +32 -0
- package/dist/stories/tests/32-ThemesTests.stories.d.ts +6 -0
- package/dist/stories/tests/46-AutoSizeColumnsTests.stories.d.ts +11 -0
- package/dist/stories/utils.d.ts +15 -2
- package/dist/stories/vanillaStoryConfig.d.ts +0 -7
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/styles/base.css +42 -4
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Docs & Examples
|
|
3
|
-
* Each story uses SimpleTableVanilla; example logic lives in stories/examples/.
|
|
2
|
+
* Docs & Examples / Features – capability demos, listed alphabetically.
|
|
4
3
|
*/
|
|
5
4
|
import type { Meta, StoryObj } from "@storybook/html";
|
|
6
5
|
declare const meta: Meta;
|
|
7
6
|
export default meta;
|
|
8
7
|
export declare const AdvancedSorting: StoryObj;
|
|
9
|
-
export declare const
|
|
8
|
+
export declare const Aggregate: StoryObj;
|
|
10
9
|
export declare const Alignment: StoryObj;
|
|
11
10
|
export declare const AutoExpandColumns: StoryObj;
|
|
12
|
-
export declare const BasicExample: StoryObj;
|
|
13
11
|
export declare const BasicRowGrouping: StoryObj;
|
|
14
|
-
export declare const BillingExample: StoryObj;
|
|
15
12
|
export declare const CSVExportFormatting: StoryObj;
|
|
16
13
|
export declare const CSVExportSingleRowChildren: StoryObj;
|
|
17
14
|
export declare const CellHighlighting: StoryObj;
|
|
18
15
|
export declare const CellRenderer: StoryObj;
|
|
19
16
|
export declare const Charts: StoryObj;
|
|
20
|
-
export declare const ClayExample: StoryObj;
|
|
21
17
|
export declare const ClipboardFormatting: StoryObj;
|
|
22
18
|
export declare const CollapsibleColumns: StoryObj;
|
|
23
19
|
export declare const ColumnVisibilityAPI: StoryObj;
|
|
@@ -32,21 +28,14 @@ export declare const EditableCells: StoryObj;
|
|
|
32
28
|
export declare const ExpansionControl: StoryObj;
|
|
33
29
|
export declare const ExternalFilter: StoryObj;
|
|
34
30
|
export declare const ExternalSort: StoryObj;
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const FinanceExample: StoryObj;
|
|
31
|
+
export declare const Filter: StoryObj;
|
|
37
32
|
export declare const HeaderInclusion: StoryObj;
|
|
38
33
|
export declare const HiddenColumns: StoryObj;
|
|
39
34
|
export declare const InfiniteScroll: StoryObj;
|
|
40
|
-
export declare const WindowInfiniteScroll: StoryObj;
|
|
41
|
-
export declare const InfrastructureExample: StoryObj;
|
|
42
|
-
export declare const LeadsExample: StoryObj;
|
|
43
35
|
export declare const LiveUpdates: StoryObj;
|
|
44
36
|
export declare const LoadingState: StoryObj;
|
|
45
|
-
export declare const ManufacturingExample: StoryObj;
|
|
46
|
-
export declare const MusicExample: StoryObj;
|
|
47
|
-
export declare const MusicWindowScroll: StoryObj;
|
|
48
|
-
export declare const NestedGrid: StoryObj;
|
|
49
37
|
export declare const NestedAccessor: StoryObj;
|
|
38
|
+
export declare const NestedGrid: StoryObj;
|
|
50
39
|
export declare const Pagination: StoryObj;
|
|
51
40
|
export declare const PaginationAPI: StoryObj;
|
|
52
41
|
export declare const PinnedColumns: StoryObj;
|
|
@@ -57,8 +46,8 @@ export declare const RowButtons: StoryObj;
|
|
|
57
46
|
export declare const RowGrouping: StoryObj;
|
|
58
47
|
export declare const RowHeight: StoryObj;
|
|
59
48
|
export declare const RowSelection: StoryObj;
|
|
60
|
-
export declare const SalesExample: StoryObj;
|
|
61
49
|
export declare const SelectableCells: StoryObj;
|
|
62
50
|
export declare const ServerSidePagination: StoryObj;
|
|
63
51
|
export declare const Theming: StoryObj;
|
|
64
52
|
export declare const Tooltip: StoryObj;
|
|
53
|
+
export declare const WindowInfiniteScroll: StoryObj;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Storybook args helper for Docs & Examples stories.
|
|
3
|
+
*/
|
|
4
|
+
import { type UniversalVanillaArgs } from "../vanillaStoryConfig";
|
|
5
|
+
export declare const storyArgs: (exampleDefaults?: Partial<UniversalVanillaArgs>) => {
|
|
6
|
+
args: {
|
|
7
|
+
autoExpandColumns?: boolean | undefined;
|
|
8
|
+
cellUpdateFlash?: boolean | undefined;
|
|
9
|
+
columnReordering?: boolean | undefined;
|
|
10
|
+
columnResizing?: boolean | undefined;
|
|
11
|
+
customTheme?: import("../../src").CustomThemeProps | undefined;
|
|
12
|
+
editColumns?: boolean | undefined;
|
|
13
|
+
editColumnsInitOpen?: boolean | undefined;
|
|
14
|
+
expandAll?: boolean | undefined;
|
|
15
|
+
externalFilterHandling?: boolean | undefined;
|
|
16
|
+
externalSortHandling?: boolean | undefined;
|
|
17
|
+
height?: string | undefined;
|
|
18
|
+
hideFooter?: boolean | undefined;
|
|
19
|
+
rowsPerPage?: number | undefined;
|
|
20
|
+
selectableCells?: boolean | undefined;
|
|
21
|
+
shouldPaginate?: boolean | undefined;
|
|
22
|
+
theme?: import("../../src/types/Theme").default | undefined;
|
|
23
|
+
useHoverRowBackground?: boolean | undefined;
|
|
24
|
+
useOddColumnBackground?: boolean | undefined;
|
|
25
|
+
useOddEvenRowBackground?: boolean | undefined;
|
|
26
|
+
};
|
|
27
|
+
argTypes: {
|
|
28
|
+
theme: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select";
|
|
31
|
+
};
|
|
32
|
+
options: string[];
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
useOddColumnBackground: {
|
|
36
|
+
control: {
|
|
37
|
+
type: "boolean";
|
|
38
|
+
};
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
useHoverRowBackground: {
|
|
42
|
+
control: {
|
|
43
|
+
type: "boolean";
|
|
44
|
+
};
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
useOddEvenRowBackground: {
|
|
48
|
+
control: {
|
|
49
|
+
type: "boolean";
|
|
50
|
+
};
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
cellUpdateFlash: {
|
|
54
|
+
control: {
|
|
55
|
+
type: "boolean";
|
|
56
|
+
};
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
height: {
|
|
60
|
+
control: {
|
|
61
|
+
type: "text";
|
|
62
|
+
};
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
customTheme: {
|
|
66
|
+
control: {
|
|
67
|
+
type: "object";
|
|
68
|
+
};
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
autoExpandColumns: {
|
|
72
|
+
control: {
|
|
73
|
+
type: "boolean";
|
|
74
|
+
};
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
expandAll: {
|
|
78
|
+
control: {
|
|
79
|
+
type: "boolean";
|
|
80
|
+
};
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
columnReordering: {
|
|
84
|
+
control: {
|
|
85
|
+
type: "boolean";
|
|
86
|
+
};
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
columnResizing: {
|
|
90
|
+
control: {
|
|
91
|
+
type: "boolean";
|
|
92
|
+
};
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
editColumns: {
|
|
96
|
+
control: {
|
|
97
|
+
type: "boolean";
|
|
98
|
+
};
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
editColumnsInitOpen: {
|
|
102
|
+
control: {
|
|
103
|
+
type: "boolean";
|
|
104
|
+
};
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
selectableCells: {
|
|
108
|
+
control: {
|
|
109
|
+
type: "boolean";
|
|
110
|
+
};
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
shouldPaginate: {
|
|
114
|
+
control: {
|
|
115
|
+
type: "boolean";
|
|
116
|
+
};
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
hideFooter: {
|
|
120
|
+
control: {
|
|
121
|
+
type: "boolean";
|
|
122
|
+
};
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
externalSortHandling: {
|
|
126
|
+
control: {
|
|
127
|
+
type: "boolean";
|
|
128
|
+
};
|
|
129
|
+
description: string;
|
|
130
|
+
};
|
|
131
|
+
externalFilterHandling: {
|
|
132
|
+
control: {
|
|
133
|
+
type: "boolean";
|
|
134
|
+
};
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
rowsPerPage: {
|
|
138
|
+
control: {
|
|
139
|
+
type: "number";
|
|
140
|
+
min: number;
|
|
141
|
+
max: number;
|
|
142
|
+
step: number;
|
|
143
|
+
};
|
|
144
|
+
description: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
@@ -2,6 +2,5 @@ import { type UniversalVanillaArgs } from "../vanillaStoryConfig";
|
|
|
2
2
|
export declare const cellHighlightingExampleDefaults: {
|
|
3
3
|
height: string;
|
|
4
4
|
selectableCells: boolean;
|
|
5
|
-
selectableColumns: boolean;
|
|
6
5
|
};
|
|
7
6
|
export declare function renderCellHighlightingExample(args?: Partial<UniversalVanillaArgs>): HTMLElement;
|
|
@@ -5,6 +5,7 @@ export declare const rowSelectionExampleDefaults: {
|
|
|
5
5
|
selectableCells: boolean;
|
|
6
6
|
columnReordering: boolean;
|
|
7
7
|
enableRowSelection: boolean;
|
|
8
|
+
selectRowOnClick: boolean;
|
|
8
9
|
height: string;
|
|
9
10
|
};
|
|
10
11
|
export declare function renderRowSelectionExample(args?: Partial<UniversalVanillaArgs>): HTMLElement;
|
|
@@ -2,7 +2,6 @@ import { type UniversalVanillaArgs } from "../vanillaStoryConfig";
|
|
|
2
2
|
export declare const selectableCellsExampleDefaults: {
|
|
3
3
|
rowGrouping: readonly ["stores"];
|
|
4
4
|
selectableCells: boolean;
|
|
5
|
-
selectableColumns: boolean;
|
|
6
5
|
columnResizing: boolean;
|
|
7
6
|
columnReordering: boolean;
|
|
8
7
|
height: string;
|
|
@@ -67,3 +67,35 @@ export declare const SelectionPersistsThroughFilter: {
|
|
|
67
67
|
canvasElement: HTMLElement;
|
|
68
68
|
}) => Promise<void>;
|
|
69
69
|
};
|
|
70
|
+
export declare const SingleSelectionMode: {
|
|
71
|
+
render: () => HTMLDivElement & {
|
|
72
|
+
_table?: SimpleTableVanilla | undefined;
|
|
73
|
+
};
|
|
74
|
+
play: ({ canvasElement }: {
|
|
75
|
+
canvasElement: HTMLElement;
|
|
76
|
+
}) => Promise<void>;
|
|
77
|
+
};
|
|
78
|
+
export declare const ClickToSelectWithoutCheckboxColumn: {
|
|
79
|
+
render: () => HTMLDivElement & {
|
|
80
|
+
_table?: SimpleTableVanilla | undefined;
|
|
81
|
+
};
|
|
82
|
+
play: ({ canvasElement }: {
|
|
83
|
+
canvasElement: HTMLElement;
|
|
84
|
+
}) => Promise<void>;
|
|
85
|
+
};
|
|
86
|
+
export declare const KeyboardRowSelection: {
|
|
87
|
+
render: () => HTMLDivElement & {
|
|
88
|
+
_table?: SimpleTableVanilla | undefined;
|
|
89
|
+
};
|
|
90
|
+
play: ({ canvasElement }: {
|
|
91
|
+
canvasElement: HTMLElement;
|
|
92
|
+
}) => Promise<void>;
|
|
93
|
+
};
|
|
94
|
+
export declare const TableAPIRowSelection: {
|
|
95
|
+
render: () => HTMLDivElement & {
|
|
96
|
+
_table?: SimpleTableVanilla | undefined;
|
|
97
|
+
};
|
|
98
|
+
play: ({ canvasElement }: {
|
|
99
|
+
canvasElement: HTMLElement;
|
|
100
|
+
}) => Promise<void>;
|
|
101
|
+
};
|
|
@@ -74,7 +74,7 @@ export declare const OutsideClickClearsSelection: {
|
|
|
74
74
|
}) => Promise<void>;
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
|
-
* Edge case: when
|
|
77
|
+
* Edge case: when selectableCells is true, clicking a column header should clear
|
|
78
78
|
* any existing cell selection (and initial focused cell) so that column selection takes over.
|
|
79
79
|
*/
|
|
80
80
|
export declare const ColumnHeaderClickClearsCellSelection: {
|
|
@@ -154,6 +154,46 @@ export declare const ShiftArrowExtendsSelection: {
|
|
|
154
154
|
canvasElement: HTMLElement;
|
|
155
155
|
}) => Promise<void>;
|
|
156
156
|
};
|
|
157
|
+
/**
|
|
158
|
+
* Spreadsheet-style Shift+Arrow: expand a range, then contract it back toward the
|
|
159
|
+
* anchor. Shift+ArrowUp after expanding downward must shrink the selection (not
|
|
160
|
+
* jump/expand the opposite edge).
|
|
161
|
+
*/
|
|
162
|
+
export declare const ShiftArrowContractsSelection: {
|
|
163
|
+
tags: string[];
|
|
164
|
+
render: () => HTMLDivElement & {
|
|
165
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
166
|
+
};
|
|
167
|
+
play: ({ canvasElement }: {
|
|
168
|
+
canvasElement: HTMLElement;
|
|
169
|
+
}) => Promise<void>;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* After a mouse-drag range, Shift+Arrow must continue from the drag endpoint
|
|
173
|
+
* (spreadsheet active cell), contracting/expanding that free end — not restart
|
|
174
|
+
* from the mousedown anchor and collapse the range.
|
|
175
|
+
*/
|
|
176
|
+
export declare const ShiftArrowContractsAfterMouseDrag: {
|
|
177
|
+
tags: string[];
|
|
178
|
+
render: () => HTMLDivElement & {
|
|
179
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
180
|
+
};
|
|
181
|
+
play: ({ canvasElement }: {
|
|
182
|
+
canvasElement: HTMLElement;
|
|
183
|
+
}) => Promise<void>;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Horizontal Shift+Arrow expand then contract toward the column anchor.
|
|
187
|
+
*/
|
|
188
|
+
export declare const ShiftArrowContractsHorizontalSelection: {
|
|
189
|
+
tags: string[];
|
|
190
|
+
render: () => HTMLDivElement & {
|
|
191
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
192
|
+
};
|
|
193
|
+
play: ({ canvasElement }: {
|
|
194
|
+
canvasElement: HTMLElement;
|
|
195
|
+
}) => Promise<void>;
|
|
196
|
+
};
|
|
157
197
|
export declare const CtrlASelectsAllCells: {
|
|
158
198
|
render: () => HTMLDivElement & {
|
|
159
199
|
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
@@ -133,3 +133,11 @@ export declare const ColumnEditorRowRenderer: {
|
|
|
133
133
|
canvasElement: HTMLElement;
|
|
134
134
|
}) => Promise<void>;
|
|
135
135
|
};
|
|
136
|
+
export declare const ColumnEditorConfigShowToggleFalse: {
|
|
137
|
+
render: () => HTMLDivElement & {
|
|
138
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
139
|
+
};
|
|
140
|
+
play: ({ canvasElement }: {
|
|
141
|
+
canvasElement: HTMLElement;
|
|
142
|
+
}) => Promise<void>;
|
|
143
|
+
};
|
|
@@ -76,6 +76,25 @@ export declare const SmartModeQuotedPhrase: {
|
|
|
76
76
|
}) => Promise<void>;
|
|
77
77
|
};
|
|
78
78
|
export declare const SmartModeNegation: {
|
|
79
|
+
parameters: {
|
|
80
|
+
tags: string[];
|
|
81
|
+
};
|
|
82
|
+
render: () => HTMLDivElement & {
|
|
83
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
84
|
+
};
|
|
85
|
+
play: ({ canvasElement }: {
|
|
86
|
+
canvasElement: HTMLElement;
|
|
87
|
+
}) => Promise<void>;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Filtering through a brief empty state (0 matching rows) and back must remount
|
|
91
|
+
* body cells. Regression for empty-state scrollport takeover that left
|
|
92
|
+
* SectionRenderer holding detached body sections.
|
|
93
|
+
*/
|
|
94
|
+
export declare const QuickFilterRecoversAfterEmptyState: {
|
|
95
|
+
parameters: {
|
|
96
|
+
tags: string[];
|
|
97
|
+
};
|
|
79
98
|
render: () => HTMLDivElement & {
|
|
80
99
|
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
81
100
|
};
|
|
@@ -53,3 +53,35 @@ export declare const LoadingToLoadedRemovesStaleCells: {
|
|
|
53
53
|
canvasElement: HTMLElement;
|
|
54
54
|
}) => Promise<void>;
|
|
55
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Repro: `updateBodyCellElement` skips content rebuilds for expandable cells
|
|
58
|
+
* so the expand-icon DOM node survives for CSS transitions. That bypass also
|
|
59
|
+
* skips loading-skeleton swaps, so toggling `isLoading` on already-rendered
|
|
60
|
+
* row-grouped rows leaves the expandable column out of sync with every other
|
|
61
|
+
* column.
|
|
62
|
+
*
|
|
63
|
+
* Entering loading: non-expandable columns show skeletons; expandable columns
|
|
64
|
+
* keep their stale expand icon + value.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ExpandableCellsShowSkeletonWhenEnteringLoading: {
|
|
67
|
+
render: () => HTMLDivElement & {
|
|
68
|
+
_table?: SimpleTableVanilla | undefined;
|
|
69
|
+
};
|
|
70
|
+
play: ({ canvasElement }: {
|
|
71
|
+
canvasElement: HTMLElement;
|
|
72
|
+
}) => Promise<void>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Repro (exit path): expandable cells created while `isLoading` is true render
|
|
76
|
+
* as skeletons. When loading ends, content updates are still skipped for
|
|
77
|
+
* expandable cells, so they stay stuck on the skeleton instead of restoring
|
|
78
|
+
* the expand icon + value.
|
|
79
|
+
*/
|
|
80
|
+
export declare const ExpandableCellsRestoreContentWhenLeavingLoading: {
|
|
81
|
+
render: () => HTMLDivElement & {
|
|
82
|
+
_table?: SimpleTableVanilla | undefined;
|
|
83
|
+
};
|
|
84
|
+
play: ({ canvasElement }: {
|
|
85
|
+
canvasElement: HTMLElement;
|
|
86
|
+
}) => Promise<void>;
|
|
87
|
+
};
|
|
@@ -53,6 +53,12 @@ export declare const UseHoverRowBackground: {
|
|
|
53
53
|
canvasElement: HTMLElement;
|
|
54
54
|
}) => Promise<void>;
|
|
55
55
|
};
|
|
56
|
+
export declare const UseHoverRowBackgroundIsolatedAcrossTables: {
|
|
57
|
+
render: () => HTMLDivElement;
|
|
58
|
+
play: ({ canvasElement }: {
|
|
59
|
+
canvasElement: HTMLElement;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
};
|
|
56
62
|
export declare const UseOddEvenRowBackground: {
|
|
57
63
|
tags: string[];
|
|
58
64
|
render: () => HTMLDivElement & {
|
|
@@ -233,6 +233,17 @@ export declare const AutoSizeRefitsOnDataChange: {
|
|
|
233
233
|
canvasElement: HTMLElement;
|
|
234
234
|
}) => Promise<void>;
|
|
235
235
|
};
|
|
236
|
+
export declare const AutoSizeRefitsAfterLoadingWithMultilineRenderer: {
|
|
237
|
+
parameters: {
|
|
238
|
+
tags: string[];
|
|
239
|
+
};
|
|
240
|
+
render: () => HTMLDivElement & {
|
|
241
|
+
_table?: SimpleTableVanilla | undefined;
|
|
242
|
+
};
|
|
243
|
+
play: ({ canvasElement }: {
|
|
244
|
+
canvasElement: HTMLElement;
|
|
245
|
+
}) => Promise<void>;
|
|
246
|
+
};
|
|
236
247
|
export declare const AutoSizeStableAcrossSort: {
|
|
237
248
|
parameters: {
|
|
238
249
|
tags: string[];
|
package/dist/stories/utils.d.ts
CHANGED
|
@@ -2,9 +2,22 @@
|
|
|
2
2
|
* Shared helpers for vanilla stories (examples and tests).
|
|
3
3
|
*/
|
|
4
4
|
import { SimpleTableVanilla } from "../src/index";
|
|
5
|
-
import type { HeaderObject, Row } from "../src/index";
|
|
5
|
+
import type { HeaderObject, Row, SimpleTableConfig } from "../src/index";
|
|
6
6
|
/** Instance type of the table (class is a value; use InstanceType<typeof C> for the type of instances). */
|
|
7
7
|
type TableInstance = InstanceType<typeof SimpleTableVanilla>;
|
|
8
|
+
/**
|
|
9
|
+
* Config passed through to {@link SimpleTableVanilla}, minus `defaultHeaders` /
|
|
10
|
+
* `rows` which are supplied as the first two arguments of
|
|
11
|
+
* {@link renderVanillaTable}.
|
|
12
|
+
*
|
|
13
|
+
* Keys are constrained to {@link SimpleTableConfig} so typos and misplaced
|
|
14
|
+
* props (e.g. top-level `rowHeight` instead of `customTheme.rowHeight`) fail
|
|
15
|
+
* at compile time. Values stay loose (`unknown`) so story callbacks that are
|
|
16
|
+
* slightly narrower than the public types still typecheck.
|
|
17
|
+
*/
|
|
18
|
+
export type RenderVanillaTableOptions = {
|
|
19
|
+
[K in keyof Omit<SimpleTableConfig, "defaultHeaders" | "rows">]?: unknown;
|
|
20
|
+
};
|
|
8
21
|
export interface RenderVanillaTableResult {
|
|
9
22
|
wrapper: HTMLDivElement & {
|
|
10
23
|
_table?: TableInstance;
|
|
@@ -13,7 +26,7 @@ export interface RenderVanillaTableResult {
|
|
|
13
26
|
tableContainer: HTMLDivElement;
|
|
14
27
|
table: TableInstance;
|
|
15
28
|
}
|
|
16
|
-
export declare function renderVanillaTable(headers: HeaderObject[], data: Row[], options?:
|
|
29
|
+
export declare function renderVanillaTable(headers: HeaderObject[], data: Row[], options?: RenderVanillaTableOptions): RenderVanillaTableResult;
|
|
17
30
|
export declare function addParagraph(wrapper: HTMLElement, text: string, beforeElement?: Element | null): HTMLParagraphElement;
|
|
18
31
|
export interface ControlPanelSection {
|
|
19
32
|
heading: string;
|
|
@@ -18,7 +18,6 @@ export interface UniversalVanillaArgs {
|
|
|
18
18
|
hideFooter?: boolean;
|
|
19
19
|
rowsPerPage?: number;
|
|
20
20
|
selectableCells?: boolean;
|
|
21
|
-
selectableColumns?: boolean;
|
|
22
21
|
shouldPaginate?: boolean;
|
|
23
22
|
theme?: Theme;
|
|
24
23
|
useHoverRowBackground?: boolean;
|
|
@@ -112,12 +111,6 @@ export declare const vanillaArgTypes: {
|
|
|
112
111
|
};
|
|
113
112
|
description: string;
|
|
114
113
|
};
|
|
115
|
-
selectableColumns: {
|
|
116
|
-
control: {
|
|
117
|
-
type: "boolean";
|
|
118
|
-
};
|
|
119
|
-
description: string;
|
|
120
|
-
};
|
|
121
114
|
shouldPaginate: {
|
|
122
115
|
control: {
|
|
123
116
|
type: "boolean";
|