@fluentui/react-table 9.0.0-alpha.1 → 9.0.0-alpha.2
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/CHANGELOG.json +135 -4
- package/CHANGELOG.md +31 -5
- package/dist/index.d.ts +312 -21
- package/lib/TableCellActions.js +2 -0
- package/lib/TableCellActions.js.map +1 -0
- package/lib/TableCellLayout.js +2 -0
- package/lib/TableCellLayout.js.map +1 -0
- package/lib/TableCellPrimaryLayout.js +2 -0
- package/lib/TableCellPrimaryLayout.js.map +1 -0
- package/lib/TableSelectionCell.js +2 -0
- package/lib/TableSelectionCell.js.map +1 -0
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js +7 -5
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.js +7 -2
- package/lib/components/Table/useTableStyles.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +3 -1
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.js +12 -2
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js +2 -4
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +5 -5
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.js +6 -20
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +15 -0
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/TableCellActions.types.js +2 -0
- package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib/components/TableCellActions/index.js +6 -0
- package/lib/components/TableCellActions/index.js.map +1 -0
- package/lib/components/TableCellActions/renderTableCellActions.js +16 -0
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActions.js +24 -0
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +39 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.js +15 -0
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.types.js +2 -0
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib/components/TableCellLayout/index.js +6 -0
- package/lib/components/TableCellLayout/index.js.map +1 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js +19 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js +36 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +74 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib/components/TableHeader/useTableHeader.js +4 -2
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.js +12 -2
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +4 -2
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -9
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +4 -2
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.js +9 -7
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +15 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js +2 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib/components/TableSelectionCell/index.js +6 -0
- package/lib/components/TableSelectionCell/index.js.map +1 -0
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js +17 -0
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +42 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +55 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib/contexts/tableContext.js +7 -3
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/selectionManager.js +89 -0
- package/lib/hooks/selectionManager.js.map +1 -0
- package/lib/hooks/types.js +2 -0
- package/lib/hooks/types.js.map +1 -0
- package/lib/hooks/useSelection.js +47 -0
- package/lib/hooks/useSelection.js.map +1 -0
- package/lib/hooks/useSort.js +72 -0
- package/lib/hooks/useSort.js.map +1 -0
- package/lib/hooks/useTable.js +87 -0
- package/lib/hooks/useTable.js.map +1 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib/navigationModes/cell.js +250 -0
- package/lib/navigationModes/cell.js.map +1 -0
- package/lib/navigationModes/composite.js +208 -0
- package/lib/navigationModes/composite.js.map +1 -0
- package/lib/navigationModes/index.js +3 -0
- package/lib/navigationModes/index.js.map +1 -0
- package/lib/navigationModes/useNavigationMode.js +42 -0
- package/lib/navigationModes/useNavigationMode.js.map +1 -0
- package/lib-commonjs/TableCellActions.js +10 -0
- package/lib-commonjs/TableCellActions.js.map +1 -0
- package/lib-commonjs/TableCellLayout.js +10 -0
- package/lib-commonjs/TableCellLayout.js.map +1 -0
- package/lib-commonjs/TableCellPrimaryLayout.js +10 -0
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -0
- package/lib-commonjs/TableSelectionCell.js +10 -0
- package/lib-commonjs/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/Table/useTableContextValues.js +8 -5
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.js +8 -2
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +3 -1
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +10 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js +2 -4
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +4 -4
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +6 -20
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +26 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +6 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/index.js +18 -0
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +27 -0
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +35 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +51 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +26 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +6 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/index.js +18 -0
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +30 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +46 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +85 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js +4 -2
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +11 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +4 -2
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -9
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +4 -2
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +10 -7
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +26 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +6 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/index.js +18 -0
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +28 -0
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +56 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +65 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +7 -3
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/hooks/index.js +12 -0
- package/lib-commonjs/hooks/index.js.map +1 -0
- package/lib-commonjs/hooks/selectionManager.js +98 -0
- package/lib-commonjs/hooks/selectionManager.js.map +1 -0
- package/lib-commonjs/hooks/types.js +6 -0
- package/lib-commonjs/hooks/types.js.map +1 -0
- package/lib-commonjs/hooks/useSelection.js +59 -0
- package/lib-commonjs/hooks/useSelection.js.map +1 -0
- package/lib-commonjs/hooks/useSort.js +82 -0
- package/lib-commonjs/hooks/useSort.js.map +1 -0
- package/lib-commonjs/hooks/useTable.js +99 -0
- package/lib-commonjs/hooks/useTable.js.map +1 -0
- package/lib-commonjs/index.js +110 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/navigationModes/cell.js +259 -0
- package/lib-commonjs/navigationModes/cell.js.map +1 -0
- package/lib-commonjs/navigationModes/composite.js +217 -0
- package/lib-commonjs/navigationModes/composite.js.map +1 -0
- package/lib-commonjs/navigationModes/index.js +16 -0
- package/lib-commonjs/navigationModes/index.js.map +1 -0
- package/lib-commonjs/navigationModes/useNavigationMode.js +55 -0
- package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -0
- package/package.json +9 -9
- package/dist/tsdoc-metadata.json +0 -11
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,138 @@
|
|
|
2
2
|
"name": "@fluentui/react-table",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 15 Sep 2022 09:44:47 GMT",
|
|
6
|
+
"tag": "@fluentui/react-table_v9.0.0-alpha.2",
|
|
7
|
+
"version": "9.0.0-alpha.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "lingfangao@hotmail.com",
|
|
12
|
+
"package": "@fluentui/react-table",
|
|
13
|
+
"commit": "851d0fd82f7d802d048be89dc363271f7cf1720a",
|
|
14
|
+
"comment": "implement `useTable` state hook"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "lingfangao@hotmail.com",
|
|
18
|
+
"package": "@fluentui/react-table",
|
|
19
|
+
"commit": "e79be7955cfeef07aa3377bf123b88800e4af1cc",
|
|
20
|
+
"comment": "feat: Remove TableCellPrimaryLayout, adds `appearance` prop to TableCellLayout for primary layout"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "lingfangao@hotmail.com",
|
|
24
|
+
"package": "@fluentui/react-table",
|
|
25
|
+
"commit": "b51ebaec4a0681dc71e8f67a28a9d28b051bcba8",
|
|
26
|
+
"comment": "BREAKING: TableCell layouts are handled by layout components"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "lingfangao@hotmail.com",
|
|
30
|
+
"package": "@fluentui/react-table",
|
|
31
|
+
"commit": "059b48cc66cbeb9c545b60ef842407895cd4e505",
|
|
32
|
+
"comment": "feat: Implement table cell layout components"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "lingfangao@hotmail.com",
|
|
36
|
+
"package": "@fluentui/react-table",
|
|
37
|
+
"commit": "8f420a1c55f283156b758bda1e7ef0591ec57a78",
|
|
38
|
+
"comment": "feat: Remove inferred row state and add `rowEnhancer` option"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "lingfangao@hotmail.com",
|
|
42
|
+
"package": "@fluentui/react-table",
|
|
43
|
+
"commit": "cf7b0b6c6941c1b798a57ead0bc67b98e4e0ddbb",
|
|
44
|
+
"comment": "feat: Implement unstable navigation modes"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "olfedias@microsoft.com",
|
|
48
|
+
"package": "@fluentui/react-table",
|
|
49
|
+
"commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
|
|
50
|
+
"comment": "chore: Update Griffel to latest version"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "lingfangao@hotmail.com",
|
|
54
|
+
"package": "@fluentui/react-table",
|
|
55
|
+
"commit": "02a6a76a3350adfb4fd95cdfc178864801c8e2bf",
|
|
56
|
+
"comment": "refactor(useTable): selection manager to avoid calling multiple hooks"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "lingfangao@hotmail.com",
|
|
60
|
+
"package": "@fluentui/react-table",
|
|
61
|
+
"commit": "b9b2c4cf2b69e8d5e4b0a8a01fcc8458b1c8efc6",
|
|
62
|
+
"comment": "feat: Implement `TableSelectionCell`"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "lingfangao@hotmail.com",
|
|
66
|
+
"package": "@fluentui/react-table",
|
|
67
|
+
"commit": "f5398157ebbea5c748d8d7336f18b378a8bdec16",
|
|
68
|
+
"comment": "refactor: Stop using context selector for Table primitives"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"author": "lingfangao@hotmail.com",
|
|
72
|
+
"package": "@fluentui/react-table",
|
|
73
|
+
"commit": "573289549f9712357c5561057fc24e97f62a6c63",
|
|
74
|
+
"comment": "feat: autocontrolled `useTable` hook"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"author": "lingfangao@hotmail.com",
|
|
78
|
+
"package": "@fluentui/react-table",
|
|
79
|
+
"commit": "9253171aac6e08d6830361d125d657f21ddfc90a",
|
|
80
|
+
"comment": "feat: Implement `TableCellActions` and `TablePrimaryCell`"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"author": "beachball",
|
|
84
|
+
"package": "@fluentui/react-table",
|
|
85
|
+
"comment": "Bump @fluentui/react-aria to v9.2.0",
|
|
86
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"author": "beachball",
|
|
90
|
+
"package": "@fluentui/react-table",
|
|
91
|
+
"comment": "Bump @fluentui/react-checkbox to v9.0.5",
|
|
92
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"author": "beachball",
|
|
96
|
+
"package": "@fluentui/react-table",
|
|
97
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.1",
|
|
98
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"author": "beachball",
|
|
102
|
+
"package": "@fluentui/react-table",
|
|
103
|
+
"comment": "Bump @fluentui/react-theme to v9.1.0",
|
|
104
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"author": "beachball",
|
|
108
|
+
"package": "@fluentui/react-table",
|
|
109
|
+
"comment": "Bump @fluentui/react-utilities to v9.1.0",
|
|
110
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"author": "beachball",
|
|
114
|
+
"package": "@fluentui/react-table",
|
|
115
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
|
|
116
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"none": [
|
|
120
|
+
{
|
|
121
|
+
"author": "martinhochel@microsoft.com",
|
|
122
|
+
"package": "@fluentui/react-table",
|
|
123
|
+
"commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
|
|
124
|
+
"comment": "chore: update package scaffold"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"author": "lingfangao@hotmail.com",
|
|
128
|
+
"package": "@fluentui/react-table",
|
|
129
|
+
"commit": "9e604a18ef914090301b4d0cd0b602f646f5719c",
|
|
130
|
+
"comment": "chore: Add preview warning for Table component"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"date": "Wed, 03 Aug 2022 16:04:03 GMT",
|
|
6
137
|
"tag": "@fluentui/react-table_v9.0.0-alpha.1",
|
|
7
138
|
"version": "9.0.0-alpha.1",
|
|
8
139
|
"comments": {
|
|
@@ -23,19 +154,19 @@
|
|
|
23
154
|
"author": "beachball",
|
|
24
155
|
"package": "@fluentui/react-table",
|
|
25
156
|
"comment": "Bump @fluentui/react-aria to v9.1.0",
|
|
26
|
-
"commit": "
|
|
157
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
27
158
|
},
|
|
28
159
|
{
|
|
29
160
|
"author": "beachball",
|
|
30
161
|
"package": "@fluentui/react-table",
|
|
31
162
|
"comment": "Bump @fluentui/react-tabster to v9.1.0",
|
|
32
|
-
"commit": "
|
|
163
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
33
164
|
},
|
|
34
165
|
{
|
|
35
166
|
"author": "beachball",
|
|
36
167
|
"package": "@fluentui/react-table",
|
|
37
168
|
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
|
|
38
|
-
"commit": "
|
|
169
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
39
170
|
}
|
|
40
171
|
]
|
|
41
172
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,47 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-table
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 15 Sep 2022 09:44:47 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.2)
|
|
8
|
+
|
|
9
|
+
Thu, 15 Sep 2022 09:44:47 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.1..@fluentui/react-table_v9.0.0-alpha.2)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- implement `useTable` state hook ([PR #24329](https://github.com/microsoft/fluentui/pull/24329) by lingfangao@hotmail.com)
|
|
15
|
+
- feat: Remove TableCellPrimaryLayout, adds `appearance` prop to TableCellLayout for primary layout ([PR #24789](https://github.com/microsoft/fluentui/pull/24789) by lingfangao@hotmail.com)
|
|
16
|
+
- BREAKING: TableCell layouts are handled by layout components ([PR #24762](https://github.com/microsoft/fluentui/pull/24762) by lingfangao@hotmail.com)
|
|
17
|
+
- feat: Implement table cell layout components ([PR #24773](https://github.com/microsoft/fluentui/pull/24773) by lingfangao@hotmail.com)
|
|
18
|
+
- feat: Remove inferred row state and add `rowEnhancer` option ([PR #24346](https://github.com/microsoft/fluentui/pull/24346) by lingfangao@hotmail.com)
|
|
19
|
+
- feat: Implement unstable navigation modes ([PR #24383](https://github.com/microsoft/fluentui/pull/24383) by lingfangao@hotmail.com)
|
|
20
|
+
- chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
|
|
21
|
+
- refactor(useTable): selection manager to avoid calling multiple hooks ([PR #24377](https://github.com/microsoft/fluentui/pull/24377) by lingfangao@hotmail.com)
|
|
22
|
+
- feat: Implement `TableSelectionCell` ([PR #24252](https://github.com/microsoft/fluentui/pull/24252) by lingfangao@hotmail.com)
|
|
23
|
+
- refactor: Stop using context selector for Table primitives ([PR #24806](https://github.com/microsoft/fluentui/pull/24806) by lingfangao@hotmail.com)
|
|
24
|
+
- feat: autocontrolled `useTable` hook ([PR #24688](https://github.com/microsoft/fluentui/pull/24688) by lingfangao@hotmail.com)
|
|
25
|
+
- feat: Implement `TableCellActions` and `TablePrimaryCell` ([PR #24232](https://github.com/microsoft/fluentui/pull/24232) by lingfangao@hotmail.com)
|
|
26
|
+
- Bump @fluentui/react-aria to v9.2.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
27
|
+
- Bump @fluentui/react-checkbox to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
28
|
+
- Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
29
|
+
- Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
30
|
+
- Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
31
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
32
|
+
|
|
7
33
|
## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.1)
|
|
8
34
|
|
|
9
|
-
Wed, 03 Aug 2022 16:
|
|
35
|
+
Wed, 03 Aug 2022 16:04:03 GMT
|
|
10
36
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.0..@fluentui/react-table_v9.0.0-alpha.1)
|
|
11
37
|
|
|
12
38
|
### Changes
|
|
13
39
|
|
|
14
40
|
- feat: Make sorting more primitive ([PR #24198](https://github.com/microsoft/fluentui/pull/24198) by lingfangao@hotmail.com)
|
|
15
41
|
- feat: Release package in `alpha` ([PR #24182](https://github.com/microsoft/fluentui/pull/24182) by lingfangao@hotmail.com)
|
|
16
|
-
- Bump @fluentui/react-aria to v9.1.0 ([PR #
|
|
17
|
-
- Bump @fluentui/react-tabster to v9.1.0 ([PR #
|
|
18
|
-
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #
|
|
42
|
+
- Bump @fluentui/react-aria to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
43
|
+
- Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
44
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
19
45
|
|
|
20
46
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.0)
|
|
21
47
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
3
|
import { ARIAButtonSlotProps } from '@fluentui/react-aria';
|
|
4
|
+
import type { Checkbox } from '@fluentui/react-checkbox';
|
|
5
|
+
import type { CheckboxProps } from '@fluentui/react-checkbox';
|
|
4
6
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
5
7
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
6
|
-
import { ContextSelector } from '@fluentui/react-context-selector';
|
|
7
|
-
import { FC } from 'react';
|
|
8
8
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
9
|
-
import { Provider } from 'react';
|
|
10
|
-
import { ProviderProps } from 'react';
|
|
11
9
|
import * as React_2 from 'react';
|
|
12
10
|
import type { Slot } from '@fluentui/react-utilities';
|
|
13
11
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
14
12
|
|
|
13
|
+
export declare interface ColumnDefinition<TItem> {
|
|
14
|
+
columnId: ColumnId;
|
|
15
|
+
compare?: (a: TItem, b: TItem) => number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare type ColumnId = string | number;
|
|
19
|
+
|
|
20
|
+
declare type OnSelectionChangeCallback = (selectedItems: Set<RowId>) => void;
|
|
21
|
+
|
|
22
|
+
declare type OnSortChangeCallback = (state: {
|
|
23
|
+
sortColumn: ColumnId | undefined;
|
|
24
|
+
sortDirection: SortDirection;
|
|
25
|
+
}) => void;
|
|
26
|
+
|
|
15
27
|
/**
|
|
16
28
|
* Render the final JSX of Table
|
|
17
29
|
*/
|
|
@@ -27,6 +39,16 @@ export declare const renderTableBody_unstable: (state: TableBodyState) => JSX.El
|
|
|
27
39
|
*/
|
|
28
40
|
export declare const renderTableCell_unstable: (state: TableCellState) => JSX.Element;
|
|
29
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Render the final JSX of TableCellActions
|
|
44
|
+
*/
|
|
45
|
+
export declare const renderTableCellActions_unstable: (state: TableCellActionsState) => JSX.Element;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Render the final JSX of TableCellLayout
|
|
49
|
+
*/
|
|
50
|
+
export declare const renderTableCellLayout_unstable: (state: TableCellLayoutState) => JSX.Element;
|
|
51
|
+
|
|
30
52
|
/**
|
|
31
53
|
* Render the final JSX of TableHeader
|
|
32
54
|
*/
|
|
@@ -42,12 +64,37 @@ export declare const renderTableHeaderCell_unstable: (state: TableHeaderCellStat
|
|
|
42
64
|
*/
|
|
43
65
|
export declare const renderTableRow_unstable: (state: TableRowState) => JSX.Element;
|
|
44
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Render the final JSX of TableSelectionCell
|
|
69
|
+
*/
|
|
70
|
+
export declare const renderTableSelectionCell_unstable: (state: TableSelectionCellState) => JSX.Element;
|
|
71
|
+
|
|
72
|
+
declare type RowEnhancer<TItem, TRowState extends RowState<TItem> = RowState<TItem>> = (row: RowState<TItem>, state: {
|
|
73
|
+
selection: TableSelectionState;
|
|
74
|
+
sort: TableSortState;
|
|
75
|
+
}) => TRowState;
|
|
76
|
+
|
|
77
|
+
export declare type RowId = string | number;
|
|
78
|
+
|
|
79
|
+
export declare interface RowState<TItem> {
|
|
80
|
+
/**
|
|
81
|
+
* User provided data
|
|
82
|
+
*/
|
|
83
|
+
item: TItem;
|
|
84
|
+
/**
|
|
85
|
+
* The row id, defaults to index position in the collection
|
|
86
|
+
*/
|
|
87
|
+
rowId: RowId;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare type SelectionMode_2 = 'single' | 'multiselect';
|
|
91
|
+
|
|
45
92
|
export declare type SortDirection = 'ascending' | 'descending';
|
|
46
93
|
|
|
47
|
-
declare
|
|
48
|
-
sortColumn:
|
|
49
|
-
sortDirection:
|
|
50
|
-
}
|
|
94
|
+
declare interface SortState {
|
|
95
|
+
sortColumn: ColumnId | undefined;
|
|
96
|
+
sortDirection: SortDirection;
|
|
97
|
+
}
|
|
51
98
|
|
|
52
99
|
/**
|
|
53
100
|
* Table component - TODO: add more docs
|
|
@@ -82,10 +129,70 @@ export declare type TableBodyState = ComponentState<TableBodySlots>;
|
|
|
82
129
|
*/
|
|
83
130
|
export declare const TableCell: ForwardRefComponent<TableCellProps>;
|
|
84
131
|
|
|
132
|
+
/**
|
|
133
|
+
* TableCellActions component - TODO: add more docs
|
|
134
|
+
*/
|
|
135
|
+
export declare const TableCellActions: ForwardRefComponent<TableCellActionsProps>;
|
|
136
|
+
|
|
137
|
+
export declare const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* TableCellActions Props
|
|
141
|
+
*/
|
|
142
|
+
export declare type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {};
|
|
143
|
+
|
|
144
|
+
export declare type TableCellActionsSlots = {
|
|
145
|
+
root: Slot<'div'>;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* State used in rendering TableCellActions
|
|
150
|
+
*/
|
|
151
|
+
export declare type TableCellActionsState = ComponentState<TableCellActionsSlots>;
|
|
152
|
+
|
|
85
153
|
export declare const tableCellClassName = "fui-TableCell";
|
|
86
154
|
|
|
87
155
|
export declare const tableCellClassNames: SlotClassNames<TableCellSlots>;
|
|
88
156
|
|
|
157
|
+
/**
|
|
158
|
+
* TableCellLayout component - TODO: add more docs
|
|
159
|
+
*/
|
|
160
|
+
export declare const TableCellLayout: ForwardRefComponent<TableCellLayoutProps>;
|
|
161
|
+
|
|
162
|
+
export declare const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots>;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* TableCellLayout Props
|
|
166
|
+
*/
|
|
167
|
+
export declare type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {
|
|
168
|
+
appearance?: 'primary';
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export declare type TableCellLayoutSlots = {
|
|
172
|
+
root: Slot<'div'>;
|
|
173
|
+
/**
|
|
174
|
+
* Slot for an icon or other visual element
|
|
175
|
+
*/
|
|
176
|
+
media: Slot<'span'>;
|
|
177
|
+
/**
|
|
178
|
+
* Main text for the table cell. Children of the root slot are automatically rendered here
|
|
179
|
+
*/
|
|
180
|
+
main: Slot<'span'>;
|
|
181
|
+
/**
|
|
182
|
+
* Secondary text that describes or complements the main text
|
|
183
|
+
*/
|
|
184
|
+
description: Slot<'span'>;
|
|
185
|
+
/**
|
|
186
|
+
* A layout wrapper for the main and description slots
|
|
187
|
+
*/
|
|
188
|
+
wrapper: Slot<'div'>;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* State used in rendering TableCellLayout
|
|
193
|
+
*/
|
|
194
|
+
export declare type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'>;
|
|
195
|
+
|
|
89
196
|
/**
|
|
90
197
|
* TableCell Props
|
|
91
198
|
*/
|
|
@@ -93,7 +200,6 @@ export declare type TableCellProps = ComponentProps<TableCellSlots> & {};
|
|
|
93
200
|
|
|
94
201
|
export declare type TableCellSlots = {
|
|
95
202
|
root: Slot<'td', 'div'>;
|
|
96
|
-
media?: Slot<'span'>;
|
|
97
203
|
};
|
|
98
204
|
|
|
99
205
|
/**
|
|
@@ -105,7 +211,7 @@ export declare const tableClassName = "fui-Table";
|
|
|
105
211
|
|
|
106
212
|
export declare const tableClassNames: SlotClassNames<TableSlots>;
|
|
107
213
|
|
|
108
|
-
export declare const TableContextProvider: Provider<TableContextValue | undefined
|
|
214
|
+
export declare const TableContextProvider: React_2.Provider<TableContextValue | undefined>;
|
|
109
215
|
|
|
110
216
|
export declare type TableContextValue = {
|
|
111
217
|
size: 'small' | 'smaller' | 'medium';
|
|
@@ -175,16 +281,7 @@ export declare type TableHeaderState = ComponentState<TableHeaderSlots>;
|
|
|
175
281
|
/**
|
|
176
282
|
* Table Props
|
|
177
283
|
*/
|
|
178
|
-
export declare type TableProps = ComponentProps<TableSlots> &
|
|
179
|
-
/**
|
|
180
|
-
* Called when the sorted column changes
|
|
181
|
-
*/
|
|
182
|
-
onSortColumnChange?: (e: React_2.MouseEvent<HTMLElement> | React_2.KeyboardEvent<HTMLElement>, data: {
|
|
183
|
-
sortState: SortState;
|
|
184
|
-
}) => void;
|
|
185
|
-
sortState?: SortState;
|
|
186
|
-
defaultSortState?: SortState;
|
|
187
|
-
};
|
|
284
|
+
export declare type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;
|
|
188
285
|
|
|
189
286
|
/**
|
|
190
287
|
* TableRow component - TODO: add more docs
|
|
@@ -211,15 +308,129 @@ export declare type TableRowState = ComponentState<TableRowSlots> & {
|
|
|
211
308
|
size: TableState['size'];
|
|
212
309
|
};
|
|
213
310
|
|
|
311
|
+
/**
|
|
312
|
+
* TableSelectionCell component - TODO: add more docs
|
|
313
|
+
*/
|
|
314
|
+
export declare const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps>;
|
|
315
|
+
|
|
316
|
+
export declare const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* TableSelectionCell Props
|
|
320
|
+
*/
|
|
321
|
+
export declare type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {
|
|
322
|
+
/**
|
|
323
|
+
* A table can have two kinds of selection modes
|
|
324
|
+
*/
|
|
325
|
+
type?: 'checkbox' | 'radio';
|
|
326
|
+
checked?: CheckboxProps['checked'];
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export declare type TableSelectionCellSlots = {
|
|
330
|
+
/**
|
|
331
|
+
* Selection indicator if selection type is checkbox
|
|
332
|
+
*/
|
|
333
|
+
checkboxIndicator: Slot<typeof Checkbox>;
|
|
334
|
+
/**
|
|
335
|
+
* Selection indicator if selection type is radio
|
|
336
|
+
*/
|
|
337
|
+
radioIndicator: Slot<'span'>;
|
|
338
|
+
} & Pick<TableCellSlots, 'root'>;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* State used in rendering TableSelectionCell
|
|
342
|
+
*/
|
|
343
|
+
export declare type TableSelectionCellState = ComponentState<TableSelectionCellSlots> & Pick<Required<TableSelectionCellProps>, 'type' | 'checked'>;
|
|
344
|
+
|
|
345
|
+
export declare interface TableSelectionState {
|
|
346
|
+
/**
|
|
347
|
+
* Clears all selected rows
|
|
348
|
+
*/
|
|
349
|
+
clearRows: () => void;
|
|
350
|
+
/**
|
|
351
|
+
* Selects single row
|
|
352
|
+
*/
|
|
353
|
+
selectRow: (rowId: RowId) => void;
|
|
354
|
+
/**
|
|
355
|
+
* De-selects single row
|
|
356
|
+
*/
|
|
357
|
+
deselectRow: (rowId: RowId) => void;
|
|
358
|
+
/**
|
|
359
|
+
* Toggle selection of all rows
|
|
360
|
+
*/
|
|
361
|
+
toggleAllRows: () => void;
|
|
362
|
+
/**
|
|
363
|
+
* Toggle selection of single row
|
|
364
|
+
*/
|
|
365
|
+
toggleRow: (rowId: RowId) => void;
|
|
366
|
+
/**
|
|
367
|
+
* Collection of row ids corresponding to selected rows
|
|
368
|
+
*/
|
|
369
|
+
selectedRows: RowId[];
|
|
370
|
+
/**
|
|
371
|
+
* Whether all rows are selected
|
|
372
|
+
*/
|
|
373
|
+
allRowsSelected: boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Whether some rows are selected
|
|
376
|
+
*/
|
|
377
|
+
someRowsSelected: boolean;
|
|
378
|
+
/**
|
|
379
|
+
* Checks if a given rowId is selected
|
|
380
|
+
*/
|
|
381
|
+
isRowSelected: (rowId: RowId) => boolean;
|
|
382
|
+
}
|
|
383
|
+
|
|
214
384
|
export declare type TableSlots = {
|
|
215
385
|
root: Slot<'table', 'div'>;
|
|
216
386
|
};
|
|
217
387
|
|
|
388
|
+
export declare interface TableSortState {
|
|
389
|
+
/**
|
|
390
|
+
* Current sort direction
|
|
391
|
+
*/
|
|
392
|
+
sortDirection: SortDirection;
|
|
393
|
+
/**
|
|
394
|
+
* Column id of the currently sorted column
|
|
395
|
+
*/
|
|
396
|
+
sortColumn: ColumnId | undefined;
|
|
397
|
+
/**
|
|
398
|
+
* Set the sort direction for the specified column
|
|
399
|
+
*/
|
|
400
|
+
setColumnSort: (columnId: ColumnId, sortDirection: SortDirection) => void;
|
|
401
|
+
/**
|
|
402
|
+
* Toggles the sort direction for specified column
|
|
403
|
+
*/
|
|
404
|
+
toggleColumnSort: (columnId: ColumnId) => void;
|
|
405
|
+
/**
|
|
406
|
+
* Returns the sort direction if a column is sorted,
|
|
407
|
+
* returns undefined if the column is not sorted
|
|
408
|
+
*/
|
|
409
|
+
getSortDirection: (columnId: ColumnId) => SortDirection | undefined;
|
|
410
|
+
}
|
|
411
|
+
|
|
218
412
|
/**
|
|
219
413
|
* State used in rendering Table
|
|
220
414
|
*/
|
|
221
415
|
export declare type TableState = ComponentState<TableSlots> & Pick<Required<TableProps>, 'size' | 'noNativeElements'> & TableContextValue;
|
|
222
416
|
|
|
417
|
+
declare interface TableState_2<TItem, TRowState extends RowState<TItem> = RowState<TItem>> {
|
|
418
|
+
/**
|
|
419
|
+
* The row data for rendering
|
|
420
|
+
*/
|
|
421
|
+
rows: TRowState[];
|
|
422
|
+
/**
|
|
423
|
+
* State and actions to manage row selection
|
|
424
|
+
*/
|
|
425
|
+
selection: TableSelectionState;
|
|
426
|
+
/**
|
|
427
|
+
* State and actions to manage row sorting
|
|
428
|
+
*/
|
|
429
|
+
sort: TableSortState;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export declare function useTable<TItem, TRowState extends RowState<TItem> = RowState<TItem>>(options: UseTableOptions<TItem, TRowState>): TableState_2<TItem, TRowState>;
|
|
433
|
+
|
|
223
434
|
/**
|
|
224
435
|
* Create the state required to render Table.
|
|
225
436
|
*
|
|
@@ -258,12 +469,44 @@ export declare const useTableBodyStyles_unstable: (state: TableBodyState) => Tab
|
|
|
258
469
|
*/
|
|
259
470
|
export declare const useTableCell_unstable: (props: TableCellProps, ref: React_2.Ref<HTMLElement>) => TableCellState;
|
|
260
471
|
|
|
472
|
+
/**
|
|
473
|
+
* Create the state required to render TableCellActions.
|
|
474
|
+
*
|
|
475
|
+
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
|
|
476
|
+
* before being passed to renderTableCellActions_unstable.
|
|
477
|
+
*
|
|
478
|
+
* @param props - props from this instance of TableCellActions
|
|
479
|
+
* @param ref - reference to root HTMLElement of TableCellActions
|
|
480
|
+
*/
|
|
481
|
+
export declare const useTableCellActions_unstable: (props: TableCellActionsProps, ref: React_2.Ref<HTMLElement>) => TableCellActionsState;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Apply styling to the TableCellActions slots based on the state
|
|
485
|
+
*/
|
|
486
|
+
export declare const useTableCellActionsStyles_unstable: (state: TableCellActionsState) => TableCellActionsState;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Create the state required to render TableCellLayout.
|
|
490
|
+
*
|
|
491
|
+
* The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
|
|
492
|
+
* before being passed to renderTableCellLayout_unstable.
|
|
493
|
+
*
|
|
494
|
+
* @param props - props from this instance of TableCellLayout
|
|
495
|
+
* @param ref - reference to root HTMLElement of TableCellLayout
|
|
496
|
+
*/
|
|
497
|
+
export declare const useTableCellLayout_unstable: (props: TableCellLayoutProps, ref: React_2.Ref<HTMLElement>) => TableCellLayoutState;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Apply styling to the TableCellLayout slots based on the state
|
|
501
|
+
*/
|
|
502
|
+
export declare const useTableCellLayoutStyles_unstable: (state: TableCellLayoutState) => TableCellLayoutState;
|
|
503
|
+
|
|
261
504
|
/**
|
|
262
505
|
* Apply styling to the TableCell slots based on the state
|
|
263
506
|
*/
|
|
264
507
|
export declare const useTableCellStyles_unstable: (state: TableCellState) => TableCellState;
|
|
265
508
|
|
|
266
|
-
export declare const useTableContext:
|
|
509
|
+
export declare const useTableContext: () => TableContextValue;
|
|
267
510
|
|
|
268
511
|
/**
|
|
269
512
|
* Create the state required to render TableHeader.
|
|
@@ -297,6 +540,38 @@ export declare const useTableHeaderCellStyles_unstable: (state: TableHeaderCellS
|
|
|
297
540
|
*/
|
|
298
541
|
export declare const useTableHeaderStyles_unstable: (state: TableHeaderState) => TableHeaderState;
|
|
299
542
|
|
|
543
|
+
export declare interface UseTableOptions<TItem, TRowState extends RowState<TItem> = RowState<TItem>> {
|
|
544
|
+
columns: ColumnDefinition<TItem>[];
|
|
545
|
+
items: TItem[];
|
|
546
|
+
selectionMode?: SelectionMode_2;
|
|
547
|
+
/**
|
|
548
|
+
* Used in uncontrolled mode to set initial selected rows on mount
|
|
549
|
+
*/
|
|
550
|
+
defaultSelectedRows?: Set<RowId>;
|
|
551
|
+
/**
|
|
552
|
+
* Used to control row selection
|
|
553
|
+
*/
|
|
554
|
+
selectedRows?: Set<RowId>;
|
|
555
|
+
/**
|
|
556
|
+
* Called when selection changes
|
|
557
|
+
*/
|
|
558
|
+
onSelectionChange?: OnSelectionChangeCallback;
|
|
559
|
+
/**
|
|
560
|
+
* Used to control sorting
|
|
561
|
+
*/
|
|
562
|
+
sortState?: SortState;
|
|
563
|
+
/**
|
|
564
|
+
* Used in uncontrolled mode to set initial sort column and direction on mount
|
|
565
|
+
*/
|
|
566
|
+
defaultSortState?: SortState;
|
|
567
|
+
/**
|
|
568
|
+
* Called when sort changes
|
|
569
|
+
*/
|
|
570
|
+
onSortChange?: OnSortChangeCallback;
|
|
571
|
+
getRowId?: (item: TItem) => RowId;
|
|
572
|
+
rowEnhancer?: RowEnhancer<TItem, TRowState>;
|
|
573
|
+
}
|
|
574
|
+
|
|
300
575
|
/**
|
|
301
576
|
* Create the state required to render TableRow.
|
|
302
577
|
*
|
|
@@ -313,6 +588,22 @@ export declare const useTableRow_unstable: (props: TableRowProps, ref: React_2.R
|
|
|
313
588
|
*/
|
|
314
589
|
export declare const useTableRowStyles_unstable: (state: TableRowState) => TableRowState;
|
|
315
590
|
|
|
591
|
+
/**
|
|
592
|
+
* Create the state required to render TableSelectionCell.
|
|
593
|
+
*
|
|
594
|
+
* The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,
|
|
595
|
+
* before being passed to renderTableSelectionCell_unstable.
|
|
596
|
+
*
|
|
597
|
+
* @param props - props from this instance of TableSelectionCell
|
|
598
|
+
* @param ref - reference to root HTMLElement of TableSelectionCell
|
|
599
|
+
*/
|
|
600
|
+
export declare const useTableSelectionCell_unstable: (props: TableSelectionCellProps, ref: React_2.Ref<HTMLElement>) => TableSelectionCellState;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Apply styling to the TableSelectionCell slots based on the state
|
|
604
|
+
*/
|
|
605
|
+
export declare const useTableSelectionCellStyles_unstable: (state: TableSelectionCellState) => TableSelectionCellState;
|
|
606
|
+
|
|
316
607
|
/**
|
|
317
608
|
* Apply styling to the Table slots based on the state
|
|
318
609
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellActions.js","sourceRoot":"../src/","sources":["TableCellActions.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC","sourcesContent":["export * from './components/TableCellActions/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellLayout.js","sourceRoot":"../src/","sources":["TableCellLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellPrimaryLayout.js","sourceRoot":"../src/","sources":["TableCellPrimaryLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSelectionCell.js","sourceRoot":"../src/","sources":["TableSelectionCell.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC","sourcesContent":["export * from './components/TableSelectionCell/index';\n"]}
|