@atlaskit/table-tree 12.3.1 → 13.0.0
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 +26 -0
- package/cell/package.json +1 -8
- package/dist/cjs/components/row.js +2 -2
- package/dist/es2019/components/row.js +2 -2
- package/dist/esm/components/row.js +2 -2
- package/header/package.json +1 -8
- package/headers/package.json +1 -8
- package/package.json +16 -23
- package/row/package.json +1 -8
- package/rows/package.json +1 -8
- package/table-tree/package.json +1 -8
- package/table-tree-data-helper/package.json +1 -8
- package/table-tree.docs.tsx +110 -103
- package/with-column-width/package.json +1 -8
- package/dist/types-ts4.5/components/cell.d.ts +0 -25
- package/dist/types-ts4.5/components/header.d.ts +0 -27
- package/dist/types-ts4.5/components/headers.d.ts +0 -18
- package/dist/types-ts4.5/components/internal/chevron-container.d.ts +0 -15
- package/dist/types-ts4.5/components/internal/chevron.d.ts +0 -21
- package/dist/types-ts4.5/components/internal/common-cell.d.ts +0 -15
- package/dist/types-ts4.5/components/internal/context.d.ts +0 -10
- package/dist/types-ts4.5/components/internal/item.d.ts +0 -25
- package/dist/types-ts4.5/components/internal/items.d.ts +0 -14
- package/dist/types-ts4.5/components/internal/loader-item-container.d.ts +0 -16
- package/dist/types-ts4.5/components/internal/loader-item.d.ts +0 -12
- package/dist/types-ts4.5/components/internal/overflow-container.d.ts +0 -14
- package/dist/types-ts4.5/components/internal/tree-row-container.d.ts +0 -11
- package/dist/types-ts4.5/components/internal/with-column-width.d.ts +0 -6
- package/dist/types-ts4.5/components/row.d.ts +0 -84
- package/dist/types-ts4.5/components/rows.d.ts +0 -32
- package/dist/types-ts4.5/components/table-tree.d.ts +0 -66
- package/dist/types-ts4.5/entry-points/cell.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/header.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/headers.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/row.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/rows.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/table-tree-data-helper.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/table-tree.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/with-column-width.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -13
- package/dist/types-ts4.5/utils/table-tree-data-helper.d.ts +0 -25
- package/dist/types-ts4.5/utils/to-item-id.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 13.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 12.3.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/cell/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/cell.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/cell.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/cell.d.ts"
|
|
17
10
|
}
|
|
@@ -61,7 +61,7 @@ function Row(_ref) {
|
|
|
61
61
|
actionSubject: 'tableTree',
|
|
62
62
|
componentName: 'row',
|
|
63
63
|
packageName: "@atlaskit/table-tree",
|
|
64
|
-
packageVersion: "12.3.
|
|
64
|
+
packageVersion: "12.3.1"
|
|
65
65
|
});
|
|
66
66
|
var onCollapse = (0, _analyticsNext.usePlatformLeafEventHandler)({
|
|
67
67
|
fn: function fn(value) {
|
|
@@ -71,7 +71,7 @@ function Row(_ref) {
|
|
|
71
71
|
actionSubject: 'tableTree',
|
|
72
72
|
componentName: 'row',
|
|
73
73
|
packageName: "@atlaskit/table-tree",
|
|
74
|
-
packageVersion: "12.3.
|
|
74
|
+
packageVersion: "12.3.1"
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -47,7 +47,7 @@ function Row({
|
|
|
47
47
|
actionSubject: 'tableTree',
|
|
48
48
|
componentName: 'row',
|
|
49
49
|
packageName: "@atlaskit/table-tree",
|
|
50
|
-
packageVersion: "12.3.
|
|
50
|
+
packageVersion: "12.3.1"
|
|
51
51
|
});
|
|
52
52
|
const onCollapse = usePlatformLeafEventHandler({
|
|
53
53
|
fn: value => providedOnCollapse && providedOnCollapse(value),
|
|
@@ -55,7 +55,7 @@ function Row({
|
|
|
55
55
|
actionSubject: 'tableTree',
|
|
56
56
|
componentName: 'row',
|
|
57
57
|
packageName: "@atlaskit/table-tree",
|
|
58
|
-
packageVersion: "12.3.
|
|
58
|
+
packageVersion: "12.3.1"
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -52,7 +52,7 @@ function Row(_ref) {
|
|
|
52
52
|
actionSubject: 'tableTree',
|
|
53
53
|
componentName: 'row',
|
|
54
54
|
packageName: "@atlaskit/table-tree",
|
|
55
|
-
packageVersion: "12.3.
|
|
55
|
+
packageVersion: "12.3.1"
|
|
56
56
|
});
|
|
57
57
|
var onCollapse = usePlatformLeafEventHandler({
|
|
58
58
|
fn: function fn(value) {
|
|
@@ -62,7 +62,7 @@ function Row(_ref) {
|
|
|
62
62
|
actionSubject: 'tableTree',
|
|
63
63
|
componentName: 'row',
|
|
64
64
|
packageName: "@atlaskit/table-tree",
|
|
65
|
-
packageVersion: "12.3.
|
|
65
|
+
packageVersion: "12.3.1"
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
/**
|
package/header/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/header.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/header.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/header.d.ts"
|
|
17
10
|
}
|
package/headers/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/headers.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/headers.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/headers.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "A table tree is an expandable table for showing nested hierarchies of information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/analytics-next": "^
|
|
35
|
-
"@atlaskit/button": "^
|
|
36
|
-
"@atlaskit/ds-lib": "^
|
|
37
|
-
"@atlaskit/icon": "^
|
|
38
|
-
"@atlaskit/spinner": "^
|
|
39
|
-
"@atlaskit/tokens": "^
|
|
34
|
+
"@atlaskit/analytics-next": "^12.0.0",
|
|
35
|
+
"@atlaskit/button": "^24.0.0",
|
|
36
|
+
"@atlaskit/ds-lib": "^8.0.0",
|
|
37
|
+
"@atlaskit/icon": "^36.0.0",
|
|
38
|
+
"@atlaskit/spinner": "^20.0.0",
|
|
39
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0",
|
|
41
41
|
"@compiled/react": "^0.20.0",
|
|
42
42
|
"lodash": "^4.17.21"
|
|
@@ -48,19 +48,20 @@
|
|
|
48
48
|
"@af/accessibility-testing": "workspace:^",
|
|
49
49
|
"@af/integration-testing": "workspace:^",
|
|
50
50
|
"@af/visual-regression": "workspace:^",
|
|
51
|
-
"@atlaskit/docs": "^
|
|
52
|
-
"@atlaskit/empty-state": "^
|
|
53
|
-
"@atlaskit/form": "^
|
|
54
|
-
"@atlaskit/link": "^
|
|
55
|
-
"@atlaskit/primitives": "^
|
|
56
|
-
"@atlaskit/section-message": "^
|
|
57
|
-
"@atlaskit/select": "^
|
|
58
|
-
"@atlaskit/visually-hidden": "^
|
|
51
|
+
"@atlaskit/docs": "^12.0.0",
|
|
52
|
+
"@atlaskit/empty-state": "^11.0.0",
|
|
53
|
+
"@atlaskit/form": "^16.0.0",
|
|
54
|
+
"@atlaskit/link": "^4.0.0",
|
|
55
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
56
|
+
"@atlaskit/section-message": "^9.0.0",
|
|
57
|
+
"@atlaskit/select": "^22.0.0",
|
|
58
|
+
"@atlaskit/visually-hidden": "^4.0.0",
|
|
59
59
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
60
60
|
"@atlassian/ssr-tests": "workspace:^",
|
|
61
61
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
62
62
|
"@testing-library/react": "^16.3.0",
|
|
63
63
|
"@testing-library/user-event": "^14.4.3",
|
|
64
|
+
"react": "^18.2.0",
|
|
64
65
|
"react-dom": "^18.2.0"
|
|
65
66
|
},
|
|
66
67
|
"keywords": [
|
|
@@ -88,14 +89,6 @@
|
|
|
88
89
|
"deprecation": "no-deprecated-imports"
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
|
-
"typesVersions": {
|
|
92
|
-
">=4.5 <4.9": {
|
|
93
|
-
"*": [
|
|
94
|
-
"dist/types-ts4.5/*",
|
|
95
|
-
"dist/types-ts4.5/index.d.ts"
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
92
|
"homepage": "https://atlassian.design/components/table-tree/",
|
|
100
93
|
"platform-feature-flags": {
|
|
101
94
|
"dst-a11y-remove-lodash-from-table-tree": {
|
package/row/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/row.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/row.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/row.d.ts"
|
|
17
10
|
}
|
package/rows/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/rows.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/rows.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/rows.d.ts"
|
|
17
10
|
}
|
package/table-tree/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/table-tree.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/table-tree.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/table-tree.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/table-tree-data-helper.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/table-tree-data-helper.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/table-tree-data-helper.d.ts"
|
|
17
10
|
}
|
package/table-tree.docs.tsx
CHANGED
|
@@ -1,119 +1,126 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
4
4
|
|
|
5
|
-
const documentation:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
examples: [
|
|
19
|
-
{
|
|
20
|
-
name: 'Controlled Expanded State',
|
|
21
|
-
description: 'Controlled expanded state example',
|
|
22
|
-
source: path.resolve(__dirname, './examples/controlled-expanded-state.tsx'),
|
|
5
|
+
const documentation: StructuredContentSource = {
|
|
6
|
+
components: [
|
|
7
|
+
{
|
|
8
|
+
name: 'Table tree',
|
|
9
|
+
description:
|
|
10
|
+
'A table tree is an expandable table for showing nested hierarchies of information.',
|
|
11
|
+
status: 'general-availability',
|
|
12
|
+
import: {
|
|
13
|
+
name: 'TableTree',
|
|
14
|
+
package: '@atlaskit/table-tree',
|
|
15
|
+
type: 'default',
|
|
16
|
+
packagePath: path.resolve(__dirname),
|
|
17
|
+
packageJson: require('./package.json'),
|
|
23
18
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
examples: [
|
|
20
|
+
{
|
|
21
|
+
name: 'Controlled Expanded State',
|
|
22
|
+
description: 'Controlled expanded state example',
|
|
23
|
+
source: path.resolve(__dirname, './examples/controlled-expanded-state.tsx'),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
keywords: ['table-tree', 'table', 'tree', 'expandable', 'nested', 'hierarchy', 'rows'],
|
|
27
|
+
categories: ['text and data display', 'data'],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
34
30
|
name: 'Headers',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
description:
|
|
32
|
+
'Container for table column headers. Use with Header components to define columns.',
|
|
33
|
+
status: 'general-availability',
|
|
34
|
+
import: {
|
|
35
|
+
name: 'Headers',
|
|
36
|
+
package: '@atlaskit/table-tree',
|
|
37
|
+
type: 'named',
|
|
38
|
+
packagePath: path.resolve(__dirname),
|
|
39
|
+
packageJson: require('./package.json'),
|
|
40
|
+
},
|
|
41
|
+
usageGuidelines: [
|
|
42
|
+
'Clearly label column headers with simple language',
|
|
43
|
+
'Provide an accessible name for the table',
|
|
44
|
+
],
|
|
45
|
+
examples: [],
|
|
46
|
+
keywords: ['table-tree', 'headers', 'table', 'columns'],
|
|
47
|
+
categories: ['text and data display', 'data'],
|
|
39
48
|
},
|
|
40
|
-
|
|
41
|
-
'Clearly label column headers with simple language',
|
|
42
|
-
'Provide an accessible name for the table',
|
|
43
|
-
],
|
|
44
|
-
keywords: ['table-tree', 'headers', 'table', 'columns'],
|
|
45
|
-
categories: ['text and data display', 'data'],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'Header',
|
|
49
|
-
description:
|
|
50
|
-
'A single column header in a table tree. Use within Headers to define each column.',
|
|
51
|
-
status: 'general-availability',
|
|
52
|
-
import: {
|
|
49
|
+
{
|
|
53
50
|
name: 'Header',
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
description:
|
|
52
|
+
'A single column header in a table tree. Use within Headers to define each column.',
|
|
53
|
+
status: 'general-availability',
|
|
54
|
+
import: {
|
|
55
|
+
name: 'Header',
|
|
56
|
+
package: '@atlaskit/table-tree',
|
|
57
|
+
type: 'named',
|
|
58
|
+
packagePath: path.resolve(__dirname),
|
|
59
|
+
packageJson: require('./package.json'),
|
|
60
|
+
},
|
|
61
|
+
usageGuidelines: ['Use for structured tabular data only—never for layout'],
|
|
62
|
+
examples: [],
|
|
63
|
+
keywords: ['table-tree', 'header', 'table', 'column'],
|
|
64
|
+
categories: ['text and data display', 'data'],
|
|
58
65
|
},
|
|
59
|
-
|
|
60
|
-
keywords: ['table-tree', 'header', 'table', 'column'],
|
|
61
|
-
categories: ['text and data display', 'data'],
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'Rows',
|
|
65
|
-
description: 'Container for table tree rows. Renders expandable rows with nested data.',
|
|
66
|
-
status: 'general-availability',
|
|
67
|
-
import: {
|
|
66
|
+
{
|
|
68
67
|
name: 'Rows',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
description: 'Container for table tree rows. Renders expandable rows with nested data.',
|
|
69
|
+
status: 'general-availability',
|
|
70
|
+
import: {
|
|
71
|
+
name: 'Rows',
|
|
72
|
+
package: '@atlaskit/table-tree',
|
|
73
|
+
type: 'named',
|
|
74
|
+
packagePath: path.resolve(__dirname),
|
|
75
|
+
packageJson: require('./package.json'),
|
|
76
|
+
},
|
|
77
|
+
usageGuidelines: [
|
|
78
|
+
'Place important information at top-level so users rarely need to expand',
|
|
79
|
+
'Limit indentation for scannability',
|
|
80
|
+
'Avoid truncation—prefer wrapping when content exceeds cell width',
|
|
81
|
+
],
|
|
82
|
+
examples: [],
|
|
83
|
+
keywords: ['table-tree', 'rows', 'table', 'data'],
|
|
84
|
+
categories: ['text and data display', 'data'],
|
|
73
85
|
},
|
|
74
|
-
|
|
75
|
-
'Place important information at top-level so users rarely need to expand',
|
|
76
|
-
'Limit indentation for scannability',
|
|
77
|
-
'Avoid truncation—prefer wrapping when content exceeds cell width',
|
|
78
|
-
],
|
|
79
|
-
keywords: ['table-tree', 'rows', 'table', 'data'],
|
|
80
|
-
categories: ['text and data display', 'data'],
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: 'Row',
|
|
84
|
-
description: 'A single row in a table tree. Use within Rows render prop for each data item.',
|
|
85
|
-
status: 'general-availability',
|
|
86
|
-
import: {
|
|
86
|
+
{
|
|
87
87
|
name: 'Row',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
description: 'A single row in a table tree. Use within Rows render prop for each data item.',
|
|
89
|
+
status: 'general-availability',
|
|
90
|
+
import: {
|
|
91
|
+
name: 'Row',
|
|
92
|
+
package: '@atlaskit/table-tree',
|
|
93
|
+
type: 'named',
|
|
94
|
+
packagePath: path.resolve(__dirname),
|
|
95
|
+
packageJson: require('./package.json'),
|
|
96
|
+
},
|
|
97
|
+
usageGuidelines: [
|
|
98
|
+
'Allow expand-on-click only when the row has no interactive elements (buttons, dropdowns)',
|
|
99
|
+
],
|
|
100
|
+
examples: [],
|
|
101
|
+
keywords: ['table-tree', 'row', 'table', 'expandable'],
|
|
102
|
+
categories: ['text and data display', 'data'],
|
|
92
103
|
},
|
|
93
|
-
|
|
94
|
-
'Allow expand-on-click only when the row has no interactive elements (buttons, dropdowns)',
|
|
95
|
-
],
|
|
96
|
-
keywords: ['table-tree', 'row', 'table', 'expandable'],
|
|
97
|
-
categories: ['text and data display', 'data'],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: 'Cell',
|
|
101
|
-
description: 'A single cell in a table tree row. Use within Row to display column data.',
|
|
102
|
-
status: 'general-availability',
|
|
103
|
-
import: {
|
|
104
|
+
{
|
|
104
105
|
name: 'Cell',
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
description: 'A single cell in a table tree row. Use within Row to display column data.',
|
|
107
|
+
status: 'general-availability',
|
|
108
|
+
import: {
|
|
109
|
+
name: 'Cell',
|
|
110
|
+
package: '@atlaskit/table-tree',
|
|
111
|
+
type: 'named',
|
|
112
|
+
packagePath: path.resolve(__dirname),
|
|
113
|
+
packageJson: require('./package.json'),
|
|
114
|
+
},
|
|
115
|
+
usageGuidelines: [
|
|
116
|
+
'Avoid heavy indentation—affects scannability and screen magnification users',
|
|
117
|
+
'Prefer wrapping over truncation for accessibility',
|
|
118
|
+
],
|
|
119
|
+
examples: [],
|
|
120
|
+
keywords: ['table-tree', 'cell', 'table', 'data'],
|
|
121
|
+
categories: ['text and data display', 'data'],
|
|
109
122
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
'Prefer wrapping over truncation for accessibility',
|
|
113
|
-
],
|
|
114
|
-
keywords: ['table-tree', 'cell', 'table', 'data'],
|
|
115
|
-
categories: ['text and data display', 'data'],
|
|
116
|
-
},
|
|
117
|
-
];
|
|
123
|
+
],
|
|
124
|
+
};
|
|
118
125
|
|
|
119
126
|
export default documentation;
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/with-column-width.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/with-column-width.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/with-column-width.d.ts"
|
|
17
10
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
2
|
-
export interface CellProps {
|
|
3
|
-
/**
|
|
4
|
-
* Sets whether the cell contents should wrap or display on a single line and be truncated. For accessibility reasons, wrapping the content is strongly recommended.
|
|
5
|
-
*/
|
|
6
|
-
singleLine?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Sets the indent level for the cell. Each indent level adds `25px` to the left padding.
|
|
9
|
-
*/
|
|
10
|
-
indentLevel?: number;
|
|
11
|
-
/**
|
|
12
|
-
* The width of the header item. Takes a string, or a number representing the width in pixels.
|
|
13
|
-
*/
|
|
14
|
-
width?: number | string;
|
|
15
|
-
/**
|
|
16
|
-
* Class name to apply to the cell.
|
|
17
|
-
*/
|
|
18
|
-
className?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Children content, used when composing a table tree from internal components
|
|
21
|
-
*/
|
|
22
|
-
children?: ReactNode;
|
|
23
|
-
}
|
|
24
|
-
declare const Cell: (props: CellProps & import('..').CellWithColumnWidthProps) => React.JSX.Element;
|
|
25
|
-
export default Cell;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* This is hard-coded here because our actual <Header /> has no typings
|
|
7
|
-
* for its props.
|
|
8
|
-
*
|
|
9
|
-
* Adding types for real *might* break things so will need a little care.
|
|
10
|
-
*
|
|
11
|
-
* Defining it here for now lets us provide *something* without much headache.
|
|
12
|
-
*/
|
|
13
|
-
export type HeaderProps = {
|
|
14
|
-
/**
|
|
15
|
-
* Width of the header item. Takes a string, or a number representing the width in pixels.
|
|
16
|
-
*/
|
|
17
|
-
width?: string | number;
|
|
18
|
-
/**
|
|
19
|
-
* The contents of the header.
|
|
20
|
-
*/
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
id?: string;
|
|
24
|
-
role?: string;
|
|
25
|
-
};
|
|
26
|
-
declare const Header: (props: HeaderProps & import('..').CellWithColumnWidthProps) => React.JSX.Element;
|
|
27
|
-
export default Header;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
6
|
-
interface HeadersProps {
|
|
7
|
-
children: ReactElement | ReactElement[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* __Headers__
|
|
11
|
-
*
|
|
12
|
-
* Headers component for advanced composition of data, allowing custom data structures.
|
|
13
|
-
*
|
|
14
|
-
* - [Examples](https://atlassian.design/components/table-tree/examples#advanced)
|
|
15
|
-
* - [Code](https://atlassian.design/components/table-tree/code#headers-props)
|
|
16
|
-
*/
|
|
17
|
-
declare const Headers: ({ children }: HeadersProps) => JSX.Element;
|
|
18
|
-
export default Headers;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { FC, HTMLAttributes, ReactNode } from 'react';
|
|
6
|
-
type ChevronContainerProps = HTMLAttributes<HTMLSpanElement> & {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* __Chevron container__
|
|
11
|
-
*
|
|
12
|
-
* A wrapper container around the expand table tree button.
|
|
13
|
-
*/
|
|
14
|
-
export declare const ChevronContainer: FC<ChevronContainerProps>;
|
|
15
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ChevronProps {
|
|
3
|
-
/**
|
|
4
|
-
* @default 'Expand'
|
|
5
|
-
*/
|
|
6
|
-
expandLabel?: string;
|
|
7
|
-
/**
|
|
8
|
-
* @default 'Collapse'
|
|
9
|
-
*/
|
|
10
|
-
collapseLabel?: string;
|
|
11
|
-
isExpanded?: boolean;
|
|
12
|
-
ariaControls?: string;
|
|
13
|
-
onExpandToggle?: (e: React.MouseEvent) => void;
|
|
14
|
-
rowId: string;
|
|
15
|
-
extendedLabel?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Internal chevron component.
|
|
19
|
-
*/
|
|
20
|
-
declare const Chevron: ({ isExpanded, ariaControls, collapseLabel, expandLabel, rowId, extendedLabel, onExpandToggle, }: ChevronProps) => React.JSX.Element;
|
|
21
|
-
export default Chevron;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { FC, HTMLAttributes, ReactNode } from 'react';
|
|
6
|
-
interface CommonCellProps {
|
|
7
|
-
indent?: string;
|
|
8
|
-
width?: string | number;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* __Common cell__
|
|
13
|
-
*/
|
|
14
|
-
declare const CommonCell: FC<HTMLAttributes<HTMLDivElement> & CommonCellProps>;
|
|
15
|
-
export default CommonCell;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type ColumnWidth = string | number;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
5
|
-
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
6
|
-
*/
|
|
7
|
-
export declare const TableTreeContext: import('react').Context<{
|
|
8
|
-
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
9
|
-
getColumnWidth: (columnIndex: number) => ColumnWidth | null;
|
|
10
|
-
}>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { type ReactElement } from 'react';
|
|
2
|
-
import { type RowProps } from '../row';
|
|
3
|
-
import { type RowsProps } from '../rows';
|
|
4
|
-
type ItemProps<Item> = {
|
|
5
|
-
/**
|
|
6
|
-
* @default 0
|
|
7
|
-
*/
|
|
8
|
-
depth?: number;
|
|
9
|
-
data: Item & {
|
|
10
|
-
children?: Item[];
|
|
11
|
-
};
|
|
12
|
-
render: (arg: Item & {
|
|
13
|
-
children?: Item[];
|
|
14
|
-
}) => ReactElement<RowProps<Item> | RowsProps<Item>> | null;
|
|
15
|
-
loadingLabel?: string;
|
|
16
|
-
key?: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* __Item__
|
|
20
|
-
* Internal item component.
|
|
21
|
-
*/
|
|
22
|
-
declare function Item<Item extends {
|
|
23
|
-
id: string;
|
|
24
|
-
}>({ depth, data, render, loadingLabel, }: ItemProps<Item>): React.ReactElement<RowProps<Item> | RowsProps<Item>, string | React.JSXElementConstructor<any>> | null;
|
|
25
|
-
export default Item;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React, { type ReactElement } from 'react';
|
|
2
|
-
import { type RowProps } from '../row';
|
|
3
|
-
interface ItemsProps<Item> {
|
|
4
|
-
depth?: number;
|
|
5
|
-
items?: Item[] | null;
|
|
6
|
-
loadingLabel?: string;
|
|
7
|
-
render: (arg: Item & {
|
|
8
|
-
children?: Item[];
|
|
9
|
-
}) => ReactElement<RowProps<Item>> | null;
|
|
10
|
-
}
|
|
11
|
-
declare function Items<Item extends {
|
|
12
|
-
id: string;
|
|
13
|
-
}>({ depth, items, loadingLabel, render, }: ItemsProps<Item>): React.JSX.Element;
|
|
14
|
-
export default Items;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { FC, ReactNode } from 'react';
|
|
6
|
-
type LoaderItemContainerProps = {
|
|
7
|
-
isRoot?: boolean;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* __Loader item container__
|
|
12
|
-
*
|
|
13
|
-
* A loader item container.
|
|
14
|
-
*/
|
|
15
|
-
export declare const LoaderItemContainer: FC<LoaderItemContainerProps>;
|
|
16
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface LoaderItemProps {
|
|
3
|
-
/**
|
|
4
|
-
* @default 1
|
|
5
|
-
*/
|
|
6
|
-
depth?: number;
|
|
7
|
-
onComplete: (...args: any[]) => void;
|
|
8
|
-
isCompleting?: boolean;
|
|
9
|
-
loadingLabel?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const LoaderItem: ({ depth, loadingLabel, isCompleting, onComplete, }: LoaderItemProps) => React.JSX.Element | null;
|
|
12
|
-
export default LoaderItem;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { FC, HTMLAttributes, ReactNode } from 'react';
|
|
6
|
-
interface OverflowContainerProps {
|
|
7
|
-
isSingleLine?: boolean;
|
|
8
|
-
chilren?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* __Overflow container__
|
|
12
|
-
*/
|
|
13
|
-
declare const OverflowContainer: FC<OverflowContainerProps & HTMLAttributes<HTMLSpanElement>>;
|
|
14
|
-
export default OverflowContainer;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface CellWithColumnWidthProps {
|
|
3
|
-
width?: string | number;
|
|
4
|
-
columnIndex?: number;
|
|
5
|
-
}
|
|
6
|
-
export default function withColumnWidth<T extends object>(Cell: React.ComponentType<T>): (props: T & CellWithColumnWidthProps) => React.JSX.Element;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React, { type ReactNode } from 'react';
|
|
6
|
-
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
-
export interface RowProps<Item> {
|
|
8
|
-
/**
|
|
9
|
-
* Whether the row has children.
|
|
10
|
-
*/
|
|
11
|
-
hasChildren?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Children contained in the row. Should be one or more cell components.
|
|
14
|
-
*/
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* ID for the row item.
|
|
18
|
-
*/
|
|
19
|
-
itemId?: string;
|
|
20
|
-
/**
|
|
21
|
-
The data used to render the row and descendants. Pass down from `children` render prop.
|
|
22
|
-
|
|
23
|
-
In addition to these props, any other data can be added to the object, and it will
|
|
24
|
-
be provided as props when rendering each cell.
|
|
25
|
-
*/
|
|
26
|
-
items?: Item[] | null;
|
|
27
|
-
/**
|
|
28
|
-
* Controls the expanded state of the row.
|
|
29
|
-
*/
|
|
30
|
-
isExpanded?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the default expanded state of the row.
|
|
33
|
-
*/
|
|
34
|
-
isDefaultExpanded?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* This is the accessible name for the expand chevron button, used to tell assistive technology what the button is for.
|
|
37
|
-
*/
|
|
38
|
-
expandLabel?: string;
|
|
39
|
-
/**
|
|
40
|
-
* This is the accessible name for the collapse chevron button, used to tell assistive technology what the button is for.
|
|
41
|
-
*/
|
|
42
|
-
collapseLabel?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Callback called when the row collapses.
|
|
45
|
-
*/
|
|
46
|
-
onCollapse?: (data: Item, analytics?: UIAnalyticsEvent) => void | Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Callback called when the row expands.
|
|
49
|
-
*/
|
|
50
|
-
onExpand?: (data: Item, analytics?: UIAnalyticsEvent) => void | Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Children to render under the row.
|
|
53
|
-
* This is normally set by the parent item component, and doesn't need to be configured.
|
|
54
|
-
*/
|
|
55
|
-
renderChildren?: () => React.ReactNode;
|
|
56
|
-
/**
|
|
57
|
-
Use this to set whether a row with children should expand when clicked anywhere within the row. If `false` or unset, a row with children will only expand when the chevron is clicked.
|
|
58
|
-
|
|
59
|
-
If your cells contain interactive elements, always set this to `false` to avoid unexpected expanding or collapsing.
|
|
60
|
-
*/
|
|
61
|
-
shouldExpandOnClick?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Data to render. Passed down by `item` and passed into `onExpand` and `onCollapse` callbacks.
|
|
64
|
-
* This is normally set by the parent `item` component, and doesn't need to be configured.
|
|
65
|
-
*/
|
|
66
|
-
data?: Item;
|
|
67
|
-
/**
|
|
68
|
-
* The depth used for rendering an indent.
|
|
69
|
-
* This is normally set by parent `item` component, and doesn't need to be configured.
|
|
70
|
-
*/
|
|
71
|
-
depth?: number;
|
|
72
|
-
/**
|
|
73
|
-
Adds detail to the expand and collapse row button's aria label by appending the value from the given column. If you don't set this prop, the aria label will read out "Expand `itemId` row".
|
|
74
|
-
|
|
75
|
-
Should be a string when we pass data via `items` property in the table tree. The value should be one of the property `columns` names in the table tree.
|
|
76
|
-
|
|
77
|
-
Should be a number when we pass data via the `Rows` component as children in the table tree.
|
|
78
|
-
*/
|
|
79
|
-
mainColumnForExpandCollapseLabel?: string | number;
|
|
80
|
-
}
|
|
81
|
-
declare function Row<Item extends {
|
|
82
|
-
id: string;
|
|
83
|
-
}>({ shouldExpandOnClick, hasChildren, depth, renderChildren, isDefaultExpanded, data, onExpand: providedOnExpand, onCollapse: providedOnCollapse, mainColumnForExpandCollapseLabel, expandLabel, collapseLabel, itemId, children, isExpanded: isProvidedExpanded, }: RowProps<Item>): JSX.Element;
|
|
84
|
-
export default Row;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, { type ReactElement } from 'react';
|
|
2
|
-
import { type RowProps } from './row';
|
|
3
|
-
type Content = {
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
export interface RowsProps<Item> {
|
|
8
|
-
/**
|
|
9
|
-
* The data used to render the set of rows. Will be passed down via the `children` render prop.
|
|
10
|
-
*
|
|
11
|
-
* In addition to these props, any other data can be added to the object, and it will
|
|
12
|
-
* be provided as props when rendering each cell.
|
|
13
|
-
*/
|
|
14
|
-
items?: Item[];
|
|
15
|
-
/**
|
|
16
|
-
* Render function for child rows. Render props will contain an item from the
|
|
17
|
-
* `items` prop above.
|
|
18
|
-
*/
|
|
19
|
-
render: (args: Item & {
|
|
20
|
-
children?: Item[];
|
|
21
|
-
content?: Content;
|
|
22
|
-
}) => ReactElement<RowProps<Item>> | null;
|
|
23
|
-
/**
|
|
24
|
-
* This is an accessible name for the loading state's spinner.
|
|
25
|
-
* The default text is "Loading".
|
|
26
|
-
*/
|
|
27
|
-
loadingLabel?: string;
|
|
28
|
-
}
|
|
29
|
-
declare function Rows<T extends {
|
|
30
|
-
id: string;
|
|
31
|
-
}>({ items, render, loadingLabel, }: RowsProps<T>): React.JSX.Element;
|
|
32
|
-
export default Rows;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React, { type ElementType, type ReactNode } from 'react';
|
|
2
|
-
import { type ColumnWidth } from './internal/context';
|
|
3
|
-
/**
|
|
4
|
-
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
5
|
-
* for its props.
|
|
6
|
-
*
|
|
7
|
-
* Adding types for real *might* break things so will need a little care.
|
|
8
|
-
*
|
|
9
|
-
* Defining it here for now lets us provide *something* without much headache.
|
|
10
|
-
*/
|
|
11
|
-
export interface TableTreeProps<Item> {
|
|
12
|
-
/**
|
|
13
|
-
* The contents of the table.
|
|
14
|
-
* Use this when composing `Cell`, `Header`, `Headers`, `Row`, and `Rows` components.
|
|
15
|
-
* For basic usage, it's simpler to specify table contents with the `items` prop instead.
|
|
16
|
-
*/
|
|
17
|
-
children?: ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Each column component is used to render the cells in that column.
|
|
20
|
-
* A cell's `content` value, specified in the data passed to `items`, is provided as props.
|
|
21
|
-
*/
|
|
22
|
-
columns?: ElementType[];
|
|
23
|
-
/**
|
|
24
|
-
* The widths of the columns in the table.
|
|
25
|
-
*/
|
|
26
|
-
columnWidths?: ColumnWidth[];
|
|
27
|
-
/**
|
|
28
|
-
* The header text of the columns of the table.
|
|
29
|
-
*/
|
|
30
|
-
headers?: string[];
|
|
31
|
-
/**
|
|
32
|
-
Use this to set whether a row with children should expand when clicked anywhere within the row. If `false` or unset, a row with children will only expand when the chevron is clicked.
|
|
33
|
-
|
|
34
|
-
If your cells contain interactive elements, always set this to `false` to avoid unexpected expanding or collapsing.
|
|
35
|
-
|
|
36
|
-
If you aren't using the `items` prop, `shouldExpandOnClick` should be used on the row component instead.
|
|
37
|
-
*/
|
|
38
|
-
shouldExpandOnClick?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
The data used to render the table. If you're creating a basic table, use this prop instead of composing cell, header, headers, row, and rows components.
|
|
41
|
-
|
|
42
|
-
In addition to the `items` props, any other data can be added, and it will
|
|
43
|
-
be provided as props when rendering each cell.
|
|
44
|
-
*/
|
|
45
|
-
items?: Item[] | null;
|
|
46
|
-
/**
|
|
47
|
-
* The value used to extend the expand or collapse button label in cases where `row` has child rows.
|
|
48
|
-
* It should be a string when we pass data via the `items` property, the value should be one of the `columns` names.
|
|
49
|
-
* It should be a number when we pass data via the `rows` component as children in the table tree.
|
|
50
|
-
*/
|
|
51
|
-
mainColumnForExpandCollapseLabel?: string | number;
|
|
52
|
-
/**
|
|
53
|
-
* This is an `aria-label` attribute. Use the label to describe the table for assistive technologies.
|
|
54
|
-
* Usage of either this, or the `labelId` attribute is strongly recommended.
|
|
55
|
-
*/
|
|
56
|
-
label?: string;
|
|
57
|
-
/**
|
|
58
|
-
* This is an `aria-labelledby` attribute. Pass an ID for the element which should define an accessible name for the table.
|
|
59
|
-
* Usage of either this, or the `label` attribute is strongly recommended.
|
|
60
|
-
*/
|
|
61
|
-
referencedLabel?: string;
|
|
62
|
-
}
|
|
63
|
-
declare function TableTree<Item extends {
|
|
64
|
-
id: string;
|
|
65
|
-
}>({ children, columns, columnWidths: defaultColumnWidths, headers, shouldExpandOnClick, items, mainColumnForExpandCollapseLabel, label, referencedLabel, }: TableTreeProps<Item>): React.JSX.Element;
|
|
66
|
-
export default TableTree;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Headers } from '../components/headers';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TableTreeDataHelper } from '../utils/table-tree-data-helper';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { CellWithColumnWidthProps } from '../components/internal/with-column-width';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { default } from './components/table-tree';
|
|
2
|
-
export { default as Headers } from './components/headers';
|
|
3
|
-
export { default as Header } from './components/header';
|
|
4
|
-
export { default as Cell } from './components/cell';
|
|
5
|
-
export { default as Rows } from './components/rows';
|
|
6
|
-
export { default as Row } from './components/row';
|
|
7
|
-
export { default as TableTreeDataHelper } from './utils/table-tree-data-helper';
|
|
8
|
-
export type { TableTreeProps } from './components/table-tree';
|
|
9
|
-
export type { HeaderProps } from './components/header';
|
|
10
|
-
export type { RowsProps } from './components/rows';
|
|
11
|
-
export type { RowProps } from './components/row';
|
|
12
|
-
export type { CellWithColumnWidthProps } from './components/internal/with-column-width';
|
|
13
|
-
export type { CellProps } from './components/cell';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This helper class will create a cache of all the id's in the items object and
|
|
3
|
-
* path to the object.
|
|
4
|
-
* Example:
|
|
5
|
-
* [{
|
|
6
|
-
* // item 1,
|
|
7
|
-
* id: 1,
|
|
8
|
-
* children:[{
|
|
9
|
-
* // item 1.1,
|
|
10
|
-
* id: '2'
|
|
11
|
-
* }]
|
|
12
|
-
* }]
|
|
13
|
-
*
|
|
14
|
-
* Cache will look something like:
|
|
15
|
-
* {1: 0, 2: '0.children[0]'}
|
|
16
|
-
*/
|
|
17
|
-
export default class TableTreeDataHelper<T extends any = any> {
|
|
18
|
-
key: keyof T;
|
|
19
|
-
keysCache: any;
|
|
20
|
-
constructor({ key, }?: {
|
|
21
|
-
key?: keyof T | undefined;
|
|
22
|
-
});
|
|
23
|
-
updateItems(items: T[], allItems?: T[], parentItem?: T | null): T[];
|
|
24
|
-
appendItems(items: T[], allItems?: T[], parentItem?: T | null): T[];
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function toItemId(id: string): string;
|