simple-table-core 3.0.7 → 3.0.10
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/core/api/TableAPIImpl.d.ts +2 -0
- package/dist/cjs/stories/SimpleTable.stories.d.ts +0 -1
- package/dist/cjs/stories/tests/05-RowGroupingTests.stories.d.ts +70 -0
- package/dist/cjs/stories/tests/37-TableRefMethodsTests.stories.d.ts +38 -1
- package/dist/index.es.js +1 -1
- package/dist/src/core/api/TableAPIImpl.d.ts +2 -0
- package/dist/stories/SimpleTable.stories.d.ts +0 -1
- package/dist/stories/tests/05-RowGroupingTests.stories.d.ts +70 -0
- package/dist/stories/tests/37-TableRefMethodsTests.stories.d.ts +38 -1
- package/package.json +2 -4
- package/dist/cjs/stories/examples/spreadsheet/SpreadsheetExample.d.ts +0 -4
- package/dist/stories/examples/spreadsheet/SpreadsheetExample.d.ts +0 -4
|
@@ -22,6 +22,8 @@ export interface TableAPIContext {
|
|
|
22
22
|
expandedRows: Map<string, number>;
|
|
23
23
|
collapsedRows: Map<string, number>;
|
|
24
24
|
expandedDepths: Set<number>;
|
|
25
|
+
clearExpandedRows: () => void;
|
|
26
|
+
clearCollapsedRows: () => void;
|
|
25
27
|
rowStateMap: Map<string | number, RowState>;
|
|
26
28
|
headerRegistry: Map<string, any>;
|
|
27
29
|
cellRegistry?: Map<string, {
|
|
@@ -58,6 +58,5 @@ export declare const RowSelection: StoryObj;
|
|
|
58
58
|
export declare const SalesExample: StoryObj;
|
|
59
59
|
export declare const SelectableCells: StoryObj;
|
|
60
60
|
export declare const ServerSidePagination: StoryObj;
|
|
61
|
-
export declare const Spreadsheet: StoryObj;
|
|
62
61
|
export declare const Theming: StoryObj;
|
|
63
62
|
export declare const Tooltip: StoryObj;
|
|
@@ -50,6 +50,76 @@ export declare const ProgrammaticDepthControl: {
|
|
|
50
50
|
canvasElement: any;
|
|
51
51
|
}) => Promise<void>;
|
|
52
52
|
};
|
|
53
|
+
/** Marketing-style: collapse all then expand only depth 0 (divisions-only pattern). */
|
|
54
|
+
export declare const ApiCollapseAllThenExpandDepth0: {
|
|
55
|
+
tags: string[];
|
|
56
|
+
render: () => HTMLDivElement & {
|
|
57
|
+
_table?: SimpleTableVanilla | undefined;
|
|
58
|
+
};
|
|
59
|
+
play: ({ canvasElement }: {
|
|
60
|
+
canvasElement: any;
|
|
61
|
+
}) => Promise<void>;
|
|
62
|
+
};
|
|
63
|
+
/** Imperative setExpandedDepths must match DOM and getExpandedDepths for two-level grouping. */
|
|
64
|
+
export declare const ApiSetExpandedDepthsTwoLevels: {
|
|
65
|
+
tags: string[];
|
|
66
|
+
render: () => HTMLDivElement & {
|
|
67
|
+
_table?: SimpleTableVanilla | undefined;
|
|
68
|
+
};
|
|
69
|
+
play: ({ canvasElement }: {
|
|
70
|
+
canvasElement: any;
|
|
71
|
+
}) => Promise<void>;
|
|
72
|
+
};
|
|
73
|
+
/** After setExpandedDepths, toggleDepth(0) must not read stale manager state. */
|
|
74
|
+
export declare const ApiToggleDepthAfterSetExpandedDepths: {
|
|
75
|
+
tags: string[];
|
|
76
|
+
render: () => HTMLDivElement & {
|
|
77
|
+
_table?: SimpleTableVanilla | undefined;
|
|
78
|
+
};
|
|
79
|
+
play: ({ canvasElement }: {
|
|
80
|
+
canvasElement: any;
|
|
81
|
+
}) => Promise<void>;
|
|
82
|
+
};
|
|
83
|
+
/** expandAll must override a previous manual collapse. */
|
|
84
|
+
export declare const ApiExpandAllAfterManualCollapse: {
|
|
85
|
+
tags: string[];
|
|
86
|
+
render: () => HTMLDivElement & {
|
|
87
|
+
_table?: SimpleTableVanilla | undefined;
|
|
88
|
+
};
|
|
89
|
+
play: ({ canvasElement }: {
|
|
90
|
+
canvasElement: any;
|
|
91
|
+
}) => Promise<void>;
|
|
92
|
+
};
|
|
93
|
+
/** collapseAll must override a previous manual expand. */
|
|
94
|
+
export declare const ApiCollapseAllAfterManualExpand: {
|
|
95
|
+
tags: string[];
|
|
96
|
+
render: () => HTMLDivElement & {
|
|
97
|
+
_table?: SimpleTableVanilla | undefined;
|
|
98
|
+
};
|
|
99
|
+
play: ({ canvasElement }: {
|
|
100
|
+
canvasElement: any;
|
|
101
|
+
}) => Promise<void>;
|
|
102
|
+
};
|
|
103
|
+
/** setExpandedDepths must re-expand a manually collapsed row. */
|
|
104
|
+
export declare const ApiSetExpandedDepthsAfterManualToggle: {
|
|
105
|
+
tags: string[];
|
|
106
|
+
render: () => HTMLDivElement & {
|
|
107
|
+
_table?: SimpleTableVanilla | undefined;
|
|
108
|
+
};
|
|
109
|
+
play: ({ canvasElement }: {
|
|
110
|
+
canvasElement: any;
|
|
111
|
+
}) => Promise<void>;
|
|
112
|
+
};
|
|
113
|
+
/** Marketing "Only Divisions" (collapseAll + expandDepth(0)) after manual expand must not leak departments. */
|
|
114
|
+
export declare const ApiOnlyDivisionsAfterManualExpand: {
|
|
115
|
+
tags: string[];
|
|
116
|
+
render: () => HTMLDivElement & {
|
|
117
|
+
_table?: SimpleTableVanilla | undefined;
|
|
118
|
+
};
|
|
119
|
+
play: ({ canvasElement }: {
|
|
120
|
+
canvasElement: any;
|
|
121
|
+
}) => Promise<void>;
|
|
122
|
+
};
|
|
53
123
|
export declare const OnRowGroupExpandCallback: {
|
|
54
124
|
render: () => HTMLDivElement;
|
|
55
125
|
play: ({ canvasElement }: {
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Tests for TableAPI (getAPI()) methods: getVisibleRows, getAllRows, getHeaders,
|
|
4
4
|
* getSortState/applySortState, getFilterState/applyFilter/clearFilter,
|
|
5
5
|
* getCurrentPage/setPage, setQuickFilter, toggleColumnEditor/applyColumnVisibility,
|
|
6
|
-
* expandAll/collapseAll/getExpandedDepths
|
|
6
|
+
* expandAll/collapseAll/getExpandedDepths, getTotalPages, resetColumns, selection API,
|
|
7
|
+
* two-level getGroupingProperty/Depth (see tagged exports).
|
|
7
8
|
*/
|
|
8
9
|
import type { Meta } from "@storybook/html";
|
|
9
10
|
import { SimpleTableVanilla } from "../../src/index";
|
|
@@ -113,3 +114,39 @@ export declare const GetGroupingPropertyAndDepth: {
|
|
|
113
114
|
canvasElement: HTMLElement;
|
|
114
115
|
}) => Promise<void>;
|
|
115
116
|
};
|
|
117
|
+
export declare const GetTotalPagesViaAPI: {
|
|
118
|
+
tags: string[];
|
|
119
|
+
render: () => HTMLDivElement & {
|
|
120
|
+
_table?: SimpleTableVanilla | undefined;
|
|
121
|
+
};
|
|
122
|
+
play: ({ canvasElement }: {
|
|
123
|
+
canvasElement: HTMLElement;
|
|
124
|
+
}) => Promise<void>;
|
|
125
|
+
};
|
|
126
|
+
export declare const ResetColumnsViaAPI: {
|
|
127
|
+
tags: string[];
|
|
128
|
+
render: () => HTMLDivElement & {
|
|
129
|
+
_table?: SimpleTableVanilla | undefined;
|
|
130
|
+
};
|
|
131
|
+
play: ({ canvasElement }: {
|
|
132
|
+
canvasElement: HTMLElement;
|
|
133
|
+
}) => Promise<void>;
|
|
134
|
+
};
|
|
135
|
+
export declare const SelectionViaTableAPI: {
|
|
136
|
+
tags: string[];
|
|
137
|
+
render: () => HTMLDivElement & {
|
|
138
|
+
_table?: SimpleTableVanilla | undefined;
|
|
139
|
+
};
|
|
140
|
+
play: ({ canvasElement }: {
|
|
141
|
+
canvasElement: HTMLElement;
|
|
142
|
+
}) => Promise<void>;
|
|
143
|
+
};
|
|
144
|
+
export declare const GetGroupingPropertyTwoLevels: {
|
|
145
|
+
tags: string[];
|
|
146
|
+
render: () => HTMLDivElement & {
|
|
147
|
+
_table?: SimpleTableVanilla | undefined;
|
|
148
|
+
};
|
|
149
|
+
play: ({ canvasElement }: {
|
|
150
|
+
canvasElement: HTMLElement;
|
|
151
|
+
}) => Promise<void>;
|
|
152
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-table-core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -90,9 +90,7 @@
|
|
|
90
90
|
"data-table",
|
|
91
91
|
"data table",
|
|
92
92
|
"grid",
|
|
93
|
-
"table"
|
|
94
|
-
"spreadsheet",
|
|
95
|
-
"spreadsheet-table"
|
|
93
|
+
"table"
|
|
96
94
|
],
|
|
97
95
|
"scripts": {
|
|
98
96
|
"build": "rollup -c",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type UniversalVanillaArgs } from "../../vanillaStoryConfig";
|
|
2
|
-
import "./spreadsheet-demo.css";
|
|
3
|
-
export declare const spreadsheetExampleDefaults: Partial<UniversalVanillaArgs>;
|
|
4
|
-
export declare function renderSpreadsheetExample(args?: Partial<UniversalVanillaArgs>): HTMLElement;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type UniversalVanillaArgs } from "../../vanillaStoryConfig";
|
|
2
|
-
import "./spreadsheet-demo.css";
|
|
3
|
-
export declare const spreadsheetExampleDefaults: Partial<UniversalVanillaArgs>;
|
|
4
|
-
export declare function renderSpreadsheetExample(args?: Partial<UniversalVanillaArgs>): HTMLElement;
|