@atlaskit/dynamic-table 14.8.4 → 14.8.5
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.md +6 -0
- package/dist/cjs/components/stateless.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/stateless.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/stateless.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +4 -12
- package/report.api.md +113 -337
- package/dist/types-ts4.0/components/body.d.ts +0 -112
- package/dist/types-ts4.0/components/loading-container-advanced.d.ts +0 -43
- package/dist/types-ts4.0/components/loading-container.d.ts +0 -18
- package/dist/types-ts4.0/components/managed-pagination.d.ts +0 -15
- package/dist/types-ts4.0/components/rankable/body.d.ts +0 -122
- package/dist/types-ts4.0/components/rankable/table-cell.d.ts +0 -14
- package/dist/types-ts4.0/components/rankable/table-head-cell.d.ts +0 -5
- package/dist/types-ts4.0/components/rankable/table-row.d.ts +0 -18
- package/dist/types-ts4.0/components/stateful.d.ts +0 -60
- package/dist/types-ts4.0/components/stateless.d.ts +0 -58
- package/dist/types-ts4.0/components/table-head-cell.d.ts +0 -17
- package/dist/types-ts4.0/components/table-head.d.ts +0 -19
- package/dist/types-ts4.0/components/table-row.d.ts +0 -11
- package/dist/types-ts4.0/hoc/with-dimensions.d.ts +0 -12
- package/dist/types-ts4.0/hoc/with-sorted-page-rows.d.ts +0 -117
- package/dist/types-ts4.0/index.d.ts +0 -2
- package/dist/types-ts4.0/internal/constants.d.ts +0 -5
- package/dist/types-ts4.0/internal/helpers.d.ts +0 -7
- package/dist/types-ts4.0/styled/constants.d.ts +0 -17
- package/dist/types-ts4.0/styled/dynamic-table.d.ts +0 -15
- package/dist/types-ts4.0/styled/empty-body.d.ts +0 -4
- package/dist/types-ts4.0/styled/loading-container-advanced.d.ts +0 -6
- package/dist/types-ts4.0/styled/loading-container.d.ts +0 -9
- package/dist/types-ts4.0/styled/rankable/row-placeholder.d.ts +0 -3
- package/dist/types-ts4.0/styled/rankable/table-cell.d.ts +0 -8
- package/dist/types-ts4.0/styled/rankable/table-row.d.ts +0 -11
- package/dist/types-ts4.0/styled/table-cell.d.ts +0 -4
- package/dist/types-ts4.0/styled/table-head.d.ts +0 -15
- package/dist/types-ts4.0/styled/table-row.d.ts +0 -9
- package/dist/types-ts4.0/theme.d.ts +0 -22
- package/dist/types-ts4.0/types.d.ts +0 -345
package/CHANGELOG.md
CHANGED
|
@@ -54,7 +54,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
54
54
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
55
55
|
|
|
56
56
|
var packageName = "@atlaskit/dynamic-table";
|
|
57
|
-
var packageVersion = "14.8.
|
|
57
|
+
var packageVersion = "14.8.5";
|
|
58
58
|
|
|
59
59
|
function toggleSortOrder(currentSortOrder) {
|
|
60
60
|
switch (currentSortOrder) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -14,7 +14,7 @@ import ManagedPagination from './managed-pagination';
|
|
|
14
14
|
import RankableTableBody from './rankable/body';
|
|
15
15
|
import TableHead from './table-head';
|
|
16
16
|
const packageName = "@atlaskit/dynamic-table";
|
|
17
|
-
const packageVersion = "14.8.
|
|
17
|
+
const packageVersion = "14.8.5";
|
|
18
18
|
|
|
19
19
|
function toggleSortOrder(currentSortOrder) {
|
|
20
20
|
switch (currentSortOrder) {
|
package/dist/es2019/version.json
CHANGED
|
@@ -25,7 +25,7 @@ import ManagedPagination from './managed-pagination';
|
|
|
25
25
|
import RankableTableBody from './rankable/body';
|
|
26
26
|
import TableHead from './table-head';
|
|
27
27
|
var packageName = "@atlaskit/dynamic-table";
|
|
28
|
-
var packageVersion = "14.8.
|
|
28
|
+
var packageVersion = "14.8.5";
|
|
29
29
|
|
|
30
30
|
function toggleSortOrder(currentSortOrder) {
|
|
31
31
|
switch (currentSortOrder) {
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dynamic-table",
|
|
3
|
-
"version": "14.8.
|
|
3
|
+
"version": "14.8.5",
|
|
4
4
|
"description": "A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -13,14 +13,6 @@
|
|
|
13
13
|
"module": "dist/esm/index.js",
|
|
14
14
|
"module:es2019": "dist/es2019/index.js",
|
|
15
15
|
"types": "dist/types/index.d.ts",
|
|
16
|
-
"typesVersions": {
|
|
17
|
-
">=4.0 <4.5": {
|
|
18
|
-
"*": [
|
|
19
|
-
"dist/types-ts4.0/*",
|
|
20
|
-
"dist/types-ts4.0/index.d.ts"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
16
|
"sideEffects": false,
|
|
25
17
|
"atlaskit:src": "src/index.tsx",
|
|
26
18
|
"atlassian": {
|
|
@@ -37,9 +29,9 @@
|
|
|
37
29
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
38
30
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
39
31
|
"@atlaskit/pagination": "^14.2.0",
|
|
40
|
-
"@atlaskit/spinner": "^15.
|
|
32
|
+
"@atlaskit/spinner": "^15.2.0",
|
|
41
33
|
"@atlaskit/theme": "^12.2.0",
|
|
42
|
-
"@atlaskit/tokens": "^0.
|
|
34
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
43
35
|
"@babel/runtime": "^7.0.0",
|
|
44
36
|
"@emotion/react": "^11.7.1",
|
|
45
37
|
"react-beautiful-dnd": "^12.1.1"
|
|
@@ -50,7 +42,7 @@
|
|
|
50
42
|
},
|
|
51
43
|
"devDependencies": {
|
|
52
44
|
"@atlaskit/avatar": "^21.1.0",
|
|
53
|
-
"@atlaskit/button": "^16.
|
|
45
|
+
"@atlaskit/button": "^16.4.0",
|
|
54
46
|
"@atlaskit/docs": "*",
|
|
55
47
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
56
48
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/dynamic-table"
|
|
1
|
+
## API Report File for "@atlaskit/dynamic-table"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
```ts
|
|
8
12
|
import noop from '@atlaskit/ds-lib/noop';
|
|
9
13
|
import { default as React_2 } from 'react';
|
|
10
14
|
import { Ref } from 'react';
|
|
@@ -12,33 +16,9 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
12
16
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
13
17
|
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* A table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
|
|
19
|
-
*
|
|
20
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/dynamic-table)
|
|
21
|
-
* - [Code](https://bitbucket.org/atlassian/atlassian-frontend/packages/design-system/dynamic-table)
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```jsx
|
|
25
|
-
* import DynamicTable from '@atlaskit/dynamic-table';
|
|
26
|
-
*
|
|
27
|
-
* export default function TableUncontrolled() {
|
|
28
|
-
* return (
|
|
29
|
-
* <DynamicTable
|
|
30
|
-
* head={head}
|
|
31
|
-
* rows={rows}
|
|
32
|
-
* rowsPerPage={10}
|
|
33
|
-
* defaultPage={1}
|
|
34
|
-
* loadingSpinnerSize="large"
|
|
35
|
-
* isLoading={false}
|
|
36
|
-
* />
|
|
37
|
-
* );
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
declare class DynamicTable extends React_2.Component<StatefulProps, State> {
|
|
19
|
+
// @public
|
|
20
|
+
class DynamicTable extends React_2.Component<StatefulProps, State> {
|
|
21
|
+
// (undocumented)
|
|
42
22
|
static defaultProps: {
|
|
43
23
|
defaultPage: number;
|
|
44
24
|
isLoading: boolean;
|
|
@@ -48,28 +28,36 @@ declare class DynamicTable extends React_2.Component<StatefulProps, State> {
|
|
|
48
28
|
onSort: typeof noop;
|
|
49
29
|
rowsPerPage: number;
|
|
50
30
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
UNSAFE_componentWillReceiveProps(newProps: StatefulProps): void;
|
|
31
|
+
// (undocumented)
|
|
32
|
+
onRankEnd: (params: RankEnd) => void;
|
|
33
|
+
// (undocumented)
|
|
34
|
+
onRankEndIfExists: (params: RankEnd) => void;
|
|
35
|
+
// (undocumented)
|
|
58
36
|
onSetPage: (
|
|
59
37
|
page: number,
|
|
60
38
|
analyticsEvent?: UIAnalyticsEvent | undefined,
|
|
61
39
|
) => void;
|
|
40
|
+
// (undocumented)
|
|
62
41
|
onSort: (
|
|
63
42
|
{ key, item, sortOrder }: any,
|
|
64
43
|
analyticsEvent?: UIAnalyticsEvent | undefined,
|
|
65
44
|
) => void;
|
|
66
|
-
|
|
67
|
-
onRankEnd: (params: RankEnd) => void;
|
|
45
|
+
// (undocumented)
|
|
68
46
|
render(): JSX.Element;
|
|
47
|
+
// (undocumented)
|
|
48
|
+
state: {
|
|
49
|
+
page: number | undefined;
|
|
50
|
+
sortKey: string | undefined;
|
|
51
|
+
sortOrder: SortOrderType | undefined;
|
|
52
|
+
rows: RowType[] | undefined;
|
|
53
|
+
};
|
|
54
|
+
// (undocumented)
|
|
55
|
+
UNSAFE_componentWillReceiveProps(newProps: StatefulProps): void;
|
|
69
56
|
}
|
|
70
57
|
export default DynamicTable;
|
|
71
58
|
|
|
72
|
-
|
|
59
|
+
// @public (undocumented)
|
|
60
|
+
export const DynamicTableStateless: React_2.ForwardRefExoticComponent<
|
|
73
61
|
Pick<
|
|
74
62
|
Pick<
|
|
75
63
|
Omit<StatelessProps, keyof WithAnalyticsEventsProps>,
|
|
@@ -89,8 +77,8 @@ export declare const DynamicTableStateless: React_2.ForwardRefExoticComponent<
|
|
|
89
77
|
Partial<
|
|
90
78
|
Pick<
|
|
91
79
|
Omit<StatelessProps, keyof WithAnalyticsEventsProps>,
|
|
92
|
-
| 'isFixedSize'
|
|
93
80
|
| 'page'
|
|
81
|
+
| 'isFixedSize'
|
|
94
82
|
| 'rowsPerPage'
|
|
95
83
|
| 'isLoading'
|
|
96
84
|
| 'isRankingDisabled'
|
|
@@ -130,9 +118,9 @@ export declare const DynamicTableStateless: React_2.ForwardRefExoticComponent<
|
|
|
130
118
|
| 'head'
|
|
131
119
|
| 'label'
|
|
132
120
|
| 'key'
|
|
121
|
+
| 'page'
|
|
133
122
|
| 'isFixedSize'
|
|
134
123
|
| 'rows'
|
|
135
|
-
| 'page'
|
|
136
124
|
| 'rowsPerPage'
|
|
137
125
|
| 'sortKey'
|
|
138
126
|
| 'sortOrder'
|
|
@@ -155,361 +143,149 @@ export declare const DynamicTableStateless: React_2.ForwardRefExoticComponent<
|
|
|
155
143
|
React_2.RefAttributes<any>
|
|
156
144
|
>;
|
|
157
145
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
* Whether the column the cell sits above is sortable.
|
|
161
|
-
*/
|
|
146
|
+
// @public (undocumented)
|
|
147
|
+
interface HeadCellType extends RowCellType {
|
|
162
148
|
isSortable?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
* The width of the cell as a percentage.
|
|
165
|
-
*/
|
|
166
|
-
width?: number;
|
|
167
|
-
/**
|
|
168
|
-
* Whether the text in the cell will truncate or not if constrained.
|
|
169
|
-
*/
|
|
170
149
|
shouldTruncate?: boolean;
|
|
150
|
+
width?: number;
|
|
171
151
|
}
|
|
172
152
|
|
|
173
|
-
|
|
153
|
+
// @public (undocumented)
|
|
154
|
+
interface HeadType {
|
|
155
|
+
// (undocumented)
|
|
174
156
|
cells: Array<HeadCellType>;
|
|
175
157
|
}
|
|
176
158
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
* Accessible label applied to the previous page button in the pagination component.
|
|
180
|
-
*/
|
|
181
|
-
prev: string;
|
|
182
|
-
/**
|
|
183
|
-
* Accessible label applied to the next page button in the pagination component.
|
|
184
|
-
*/
|
|
185
|
-
next: string;
|
|
186
|
-
/**
|
|
187
|
-
* Accessible label applied to the current page button in the pagination component.
|
|
188
|
-
*/
|
|
159
|
+
// @public (undocumented)
|
|
160
|
+
interface I18nShape {
|
|
189
161
|
label: string;
|
|
162
|
+
next: string;
|
|
163
|
+
prev: string;
|
|
190
164
|
}
|
|
191
165
|
|
|
192
|
-
|
|
166
|
+
// @public (undocumented)
|
|
167
|
+
type LoadingSpinnerSizeType = 'small' | 'large';
|
|
193
168
|
|
|
194
|
-
|
|
169
|
+
// @public (undocumented)
|
|
170
|
+
interface RankEnd {
|
|
171
|
+
// (undocumented)
|
|
172
|
+
destination?: RankEndLocation;
|
|
173
|
+
// (undocumented)
|
|
195
174
|
sourceIndex: number;
|
|
175
|
+
// (undocumented)
|
|
196
176
|
sourceKey: string;
|
|
197
|
-
destination?: RankEndLocation;
|
|
198
177
|
}
|
|
199
178
|
|
|
200
|
-
|
|
201
|
-
|
|
179
|
+
// @public (undocumented)
|
|
180
|
+
interface RankEndLocation {
|
|
181
|
+
// (undocumented)
|
|
202
182
|
afterKey?: string;
|
|
183
|
+
// (undocumented)
|
|
203
184
|
beforeKey?: string;
|
|
185
|
+
// (undocumented)
|
|
186
|
+
index: number;
|
|
204
187
|
}
|
|
205
188
|
|
|
206
|
-
|
|
189
|
+
// @public (undocumented)
|
|
190
|
+
interface RankStart {
|
|
191
|
+
// (undocumented)
|
|
207
192
|
index: number;
|
|
193
|
+
// (undocumented)
|
|
208
194
|
key: string;
|
|
209
195
|
}
|
|
210
196
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
* Key to resolve sorting this cell in its column.
|
|
214
|
-
*/
|
|
215
|
-
key?: string | number;
|
|
216
|
-
/**
|
|
217
|
-
* The number of columns a cell should span. Defaults to 1, and maxes out at the total column width of the table.
|
|
218
|
-
*/
|
|
197
|
+
// @public (undocumented)
|
|
198
|
+
interface RowCellType {
|
|
219
199
|
colSpan?: number;
|
|
220
|
-
/**
|
|
221
|
-
* The content of the cell.
|
|
222
|
-
*/
|
|
223
200
|
content?: React_2.ReactNode | string;
|
|
224
|
-
|
|
225
|
-
* Hook for automated testing.
|
|
226
|
-
*/
|
|
201
|
+
key?: string | number;
|
|
227
202
|
testId?: string;
|
|
228
203
|
}
|
|
229
204
|
|
|
230
|
-
|
|
205
|
+
// @public (undocumented)
|
|
206
|
+
interface RowType extends React_2.ComponentPropsWithoutRef<'tr'> {
|
|
207
|
+
// (undocumented)
|
|
231
208
|
cells: Array<RowCellType>;
|
|
209
|
+
isHighlighted?: boolean;
|
|
210
|
+
// (undocumented)
|
|
232
211
|
key?: string;
|
|
233
|
-
/**
|
|
234
|
-
* A mouse handler to support interaction of a row.
|
|
235
|
-
*/
|
|
236
212
|
onClick?: React_2.MouseEventHandler;
|
|
237
|
-
/**
|
|
238
|
-
* A key event handler to support interaction of a row.
|
|
239
|
-
*/
|
|
240
213
|
onKeyPress?: React_2.KeyboardEventHandler;
|
|
241
|
-
|
|
242
|
-
* Highlights the row. Should be used to draw attention to a row; not to indicate selection.
|
|
243
|
-
*/
|
|
244
|
-
isHighlighted?: boolean;
|
|
245
|
-
/**
|
|
246
|
-
* Hook for automated testing.
|
|
247
|
-
*/
|
|
248
|
-
testId?: string;
|
|
214
|
+
// (undocumented)
|
|
249
215
|
ref?: Ref<HTMLTableRowElement>;
|
|
216
|
+
testId?: string;
|
|
250
217
|
}
|
|
251
218
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
*/
|
|
255
|
-
declare type SortOrderType = 'ASC' | 'DESC';
|
|
219
|
+
// @public
|
|
220
|
+
type SortOrderType = 'ASC' | 'DESC';
|
|
256
221
|
|
|
257
|
-
|
|
222
|
+
// @public (undocumented)
|
|
223
|
+
interface State {
|
|
224
|
+
// (undocumented)
|
|
258
225
|
page?: number;
|
|
226
|
+
// (undocumented)
|
|
227
|
+
rows?: RowType[];
|
|
228
|
+
// (undocumented)
|
|
259
229
|
sortKey?: string;
|
|
230
|
+
// (undocumented)
|
|
260
231
|
sortOrder?: SortOrderType;
|
|
261
|
-
rows?: RowType[];
|
|
262
232
|
}
|
|
263
233
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
* Caption for the table styled as a heading.
|
|
267
|
-
*/
|
|
234
|
+
// @public (undocumented)
|
|
235
|
+
interface StatefulProps extends WithAnalyticsEventsProps {
|
|
268
236
|
caption?: React_2.ReactNode;
|
|
269
|
-
/**
|
|
270
|
-
* Cells to be placed in the head of the table.
|
|
271
|
-
* Each element in the head creates a new column.
|
|
272
|
-
*/
|
|
273
|
-
head?: HeadType;
|
|
274
|
-
/**
|
|
275
|
-
* Rows to be placed in the table.
|
|
276
|
-
* Each row contains cells which should map to the ones defined in the head.
|
|
277
|
-
* Rows accept standard HTML <tr> props in addition to those listed below.
|
|
278
|
-
* Ensure each cell has a unique `key` per column - this is used for both React's reconciliation of lists and column sorting.
|
|
279
|
-
*/
|
|
280
|
-
rows?: Array<RowType>;
|
|
281
|
-
/**
|
|
282
|
-
* Shown when the table has no content.
|
|
283
|
-
*/
|
|
284
|
-
emptyView?: React_2.ReactElement<any>;
|
|
285
|
-
/**
|
|
286
|
-
* Configuration of the loading spinner shown when `isLoading` is true.
|
|
287
|
-
* Defaults to `"large"` when a page has more than two rows, else `"small"`.
|
|
288
|
-
*/
|
|
289
|
-
loadingSpinnerSize?: LoadingSpinnerSizeType;
|
|
290
|
-
/**
|
|
291
|
-
* Displays a loading spinner overlaid on top of the current page.
|
|
292
|
-
*/
|
|
293
|
-
isLoading?: boolean;
|
|
294
|
-
/**
|
|
295
|
-
* Displays columns as their initial width regardless of the content that loads in.
|
|
296
|
-
*/
|
|
297
|
-
isFixedSize?: boolean;
|
|
298
|
-
/**
|
|
299
|
-
* Controls how many rows should be displayed per page. If set, also turns on pagination, if there is more than one page to show.
|
|
300
|
-
*/
|
|
301
|
-
rowsPerPage?: number;
|
|
302
|
-
/**
|
|
303
|
-
* Callback fired when the table page has changed,
|
|
304
|
-
* useful when wanting to control dynamic table.
|
|
305
|
-
*/
|
|
306
|
-
onSetPage?: (page: number, UIAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
307
|
-
/**
|
|
308
|
-
* Callback fired when a column heading has been sorted,
|
|
309
|
-
* useful when wanting to control dynamic table.
|
|
310
|
-
*/
|
|
311
|
-
onSort?: (data: any, UIAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
312
|
-
/**
|
|
313
|
-
* Callback fired when the rows displayed on a page have changed.
|
|
314
|
-
*/
|
|
315
|
-
onPageRowsUpdate?: (pageRows: Array<RowType>) => void;
|
|
316
|
-
/**
|
|
317
|
-
* Page the table should show.
|
|
318
|
-
* Useful when wanting to control dynamic table.
|
|
319
|
-
*/
|
|
320
|
-
page?: number;
|
|
321
|
-
/**
|
|
322
|
-
* Default page dynamic table should show when initially rendering.
|
|
323
|
-
*/
|
|
324
237
|
defaultPage?: number;
|
|
325
|
-
/**
|
|
326
|
-
* Column key that the rows should be sorted by.
|
|
327
|
-
* Corresponds to the `key`'s defined in the `head` prop.
|
|
328
|
-
* Useful when wanting to control dynamic table.
|
|
329
|
-
*/
|
|
330
|
-
sortKey?: string;
|
|
331
|
-
/**
|
|
332
|
-
* Default column sort key that the rows should be sorted by.
|
|
333
|
-
* Corresponds to the `key`'s defined in the `head` prop.
|
|
334
|
-
*/
|
|
335
238
|
defaultSortKey?: string;
|
|
336
|
-
/**
|
|
337
|
-
* Column sort order.
|
|
338
|
-
* Useful when wanting to control dynamic table.
|
|
339
|
-
*/
|
|
340
|
-
sortOrder?: SortOrderType;
|
|
341
|
-
/**
|
|
342
|
-
* Default column sort order used when initially rendering.
|
|
343
|
-
* Defaults to `"ASC"`.
|
|
344
|
-
*/
|
|
345
239
|
defaultSortOrder?: SortOrderType;
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
240
|
+
emptyView?: React_2.ReactElement<any>;
|
|
241
|
+
head?: HeadType;
|
|
242
|
+
highlightedRowIndex?: number | number[];
|
|
243
|
+
isFixedSize?: boolean;
|
|
244
|
+
isLoading?: boolean;
|
|
349
245
|
isRankable?: boolean;
|
|
350
|
-
/**
|
|
351
|
-
* Disables being able to drop rows on the table.
|
|
352
|
-
* Drag will still function.
|
|
353
|
-
*/
|
|
354
246
|
isRankingDisabled?: boolean;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
onRankStart?: (rankStart: RankStart) => void;
|
|
359
|
-
/**
|
|
360
|
-
* Callback fired when a drop of a row has completed.
|
|
361
|
-
*/
|
|
247
|
+
label?: string;
|
|
248
|
+
loadingSpinnerSize?: LoadingSpinnerSizeType;
|
|
249
|
+
onPageRowsUpdate?: (pageRows: Array<RowType>) => void;
|
|
362
250
|
onRankEnd?: (rankEnd: RankEnd) => void;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
251
|
+
onRankStart?: (rankStart: RankStart) => void;
|
|
252
|
+
onSetPage?: (page: number, UIAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
253
|
+
onSort?: (data: any, UIAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
254
|
+
page?: number;
|
|
367
255
|
paginationi18n?: I18nShape;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* A `testId` prop is provided for specified elements,
|
|
374
|
-
* which is a unique string that appears as a data attribute
|
|
375
|
-
* `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
376
|
-
* The value of `testId` is used to prefix `testId` props in given elements.
|
|
377
|
-
* - `{testId}--table` - Table.
|
|
378
|
-
* - `{testId}--head` - Table header.
|
|
379
|
-
* - `{testId}--head--{content of the cell}` - Table header cell can be identified by their content.
|
|
380
|
-
* - `{testId}--row--{index - content of the first cell}` - Table row.
|
|
381
|
-
* - `{testId}--body` - Table body.
|
|
382
|
-
* - `{testId}--body--{content of the cell}` - Table body cell can be identified by their content.
|
|
383
|
-
* - `{testId}--loadingSpinner` - The spinner overlaid when loading.
|
|
384
|
-
* - `{testId}--pagination` - The table pagination.
|
|
385
|
-
*/
|
|
256
|
+
rows?: Array<RowType>;
|
|
257
|
+
rowsPerPage?: number;
|
|
258
|
+
sortKey?: string;
|
|
259
|
+
sortOrder?: SortOrderType;
|
|
386
260
|
testId?: string;
|
|
387
|
-
/**
|
|
388
|
-
* Used to provide a better description of the table for users with assistive technologies.
|
|
389
|
-
* Rather than a screen reader speaking "Entering table", passing in an label
|
|
390
|
-
* allows a custom message like "Entering Sample Numerical Data table".
|
|
391
|
-
*/
|
|
392
|
-
label?: string;
|
|
393
261
|
}
|
|
394
262
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
* Caption for the table styled as a heading.
|
|
398
|
-
*/
|
|
263
|
+
// @public (undocumented)
|
|
264
|
+
interface StatelessProps extends WithAnalyticsEventsProps {
|
|
399
265
|
caption?: React_2.ReactNode;
|
|
400
|
-
/**
|
|
401
|
-
* Cells to be placed in the head of the table.
|
|
402
|
-
* Each element in the head creates a new column.
|
|
403
|
-
*/
|
|
404
|
-
head?: HeadType;
|
|
405
|
-
/**
|
|
406
|
-
* Rows to be placed in the table.
|
|
407
|
-
* Each row contains cells which should map to the ones defined in the head.
|
|
408
|
-
*
|
|
409
|
-
* Ensure each cell has a unique `key` per column - this is used for both Reacts reconcilation of lists and column sorting.
|
|
410
|
-
*/
|
|
411
|
-
rows?: Array<RowType>;
|
|
412
|
-
/**
|
|
413
|
-
* Shown when the table has no content.
|
|
414
|
-
*/
|
|
415
266
|
emptyView?: React_2.ReactElement<any>;
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
* Defaults to `"large"` when a page has more than two rows, else `"small"`.
|
|
419
|
-
*/
|
|
420
|
-
loadingSpinnerSize?: LoadingSpinnerSizeType;
|
|
421
|
-
/**
|
|
422
|
-
* Displays a loading spinner overlaid on top of the current page.
|
|
423
|
-
*/
|
|
424
|
-
isLoading?: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* Displays columns as their initial width regardless of the content that loads in.
|
|
427
|
-
*/
|
|
267
|
+
head?: HeadType;
|
|
268
|
+
highlightedRowIndex?: number | number[];
|
|
428
269
|
isFixedSize?: boolean;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Callback fired when the table page has changed,
|
|
439
|
-
* useful when wanting to control the pagination of the table.
|
|
440
|
-
*/
|
|
270
|
+
isLoading?: boolean;
|
|
271
|
+
isRankable?: boolean;
|
|
272
|
+
isRankingDisabled?: boolean;
|
|
273
|
+
label?: string;
|
|
274
|
+
loadingSpinnerSize?: LoadingSpinnerSizeType;
|
|
275
|
+
onPageRowsUpdate?: (pageRows: Array<RowType>) => void;
|
|
276
|
+
onRankEnd?: (rankEnd: RankEnd, uiAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
277
|
+
onRankStart?: (rankStart: RankStart) => void;
|
|
441
278
|
onSetPage?: (page: number, UIAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
442
|
-
/**
|
|
443
|
-
* Callback fired when a column heading has been sorted,
|
|
444
|
-
* useful when wanting to control the sort order of the table.
|
|
445
|
-
*/
|
|
446
279
|
onSort?: (data: any, UIAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
447
|
-
/**
|
|
448
|
-
* Callback fired when the rows displayed on a page have changed.
|
|
449
|
-
*/
|
|
450
|
-
onPageRowsUpdate?: (pageRows: Array<RowType>) => void;
|
|
451
|
-
/**
|
|
452
|
-
* Page the table should show. Set by default to 1, so never undefined.
|
|
453
|
-
*/
|
|
454
280
|
page?: number;
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
*/
|
|
281
|
+
paginationi18n?: I18nShape;
|
|
282
|
+
rows?: Array<RowType>;
|
|
283
|
+
rowsPerPage?: number;
|
|
459
284
|
sortKey?: string;
|
|
460
|
-
/**
|
|
461
|
-
* Column sort order.
|
|
462
|
-
*/
|
|
463
285
|
sortOrder?: SortOrderType;
|
|
464
|
-
/**
|
|
465
|
-
* Enables drag & drop sorting of table rows.
|
|
466
|
-
*/
|
|
467
|
-
isRankable?: boolean;
|
|
468
|
-
/**
|
|
469
|
-
* Disables being able to drop rows on the table.
|
|
470
|
-
* Drag will still function.
|
|
471
|
-
*/
|
|
472
|
-
isRankingDisabled?: boolean;
|
|
473
|
-
/**
|
|
474
|
-
* Callback fired when a drag of a row has started.
|
|
475
|
-
*/
|
|
476
|
-
onRankStart?: (rankStart: RankStart) => void;
|
|
477
|
-
/**
|
|
478
|
-
* Callback fired when a drop of a row has completed.
|
|
479
|
-
*/
|
|
480
|
-
onRankEnd?: (rankEnd: RankEnd, uiAnalyticsEvent?: UIAnalyticsEvent) => void;
|
|
481
|
-
/**
|
|
482
|
-
* Labels for the pagination wrapper, previous and next buttons used in pagination.
|
|
483
|
-
* Defaults to `"pagination"`, `"previous"` and `"next"`.
|
|
484
|
-
*/
|
|
485
|
-
paginationi18n?: I18nShape;
|
|
486
|
-
/**
|
|
487
|
-
* Will highlight a row(s) of the table. Should be used to draw attention to a row; not to indicate selection.
|
|
488
|
-
*/
|
|
489
|
-
highlightedRowIndex?: number | number[];
|
|
490
|
-
/**
|
|
491
|
-
* A `testId` prop is provided for specified elements,
|
|
492
|
-
* which is a unique string that appears as a data attribute
|
|
493
|
-
* `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
494
|
-
*
|
|
495
|
-
* The value of `testId` is used to prefix `testId` props in given elements.
|
|
496
|
-
* - `{testId}--table` - Table.
|
|
497
|
-
* - `{testId}--head` - Table header.
|
|
498
|
-
* - `{testId}--head--{content of the cell}` - Table header cell can be identified by their content.
|
|
499
|
-
* - `{testId}--row--{index - content of the first cell}` - Table row.
|
|
500
|
-
* - `{testId}--body` - Table body.
|
|
501
|
-
* - `{testId}--body--{content of the cell}` - Table body cell can be identified by their content.
|
|
502
|
-
* - `{testId}--loadingSpinner` - The spinner overlaid when loading.
|
|
503
|
-
* - `{testId}--pagination` - The table pagination.
|
|
504
|
-
*/
|
|
505
286
|
testId?: string;
|
|
506
|
-
|
|
507
|
-
* Used to provide a better description of the table for users with assistive technologies.
|
|
508
|
-
* Rather than a screen reader speaking "Entering table", passing in an label
|
|
509
|
-
* allows a custom message like "Entering Sample Numerical Data table".
|
|
510
|
-
*/
|
|
511
|
-
label?: string;
|
|
287
|
+
totalRows?: number;
|
|
512
288
|
}
|
|
513
289
|
|
|
514
|
-
|
|
515
|
-
|
|
290
|
+
// (No @packageDocumentation comment for this package)
|
|
291
|
+
```
|