@atlaskit/table-tree 9.4.2 → 9.6.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 +13 -0
- package/dist/cjs/components/internal/chevron.js +8 -3
- package/dist/cjs/components/internal/with-column-width.js +23 -49
- package/dist/cjs/components/row.js +19 -3
- package/dist/cjs/components/table-tree.js +25 -21
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/internal/chevron.js +6 -3
- package/dist/es2019/components/internal/with-column-width.js +27 -29
- package/dist/es2019/components/row.js +19 -3
- package/dist/es2019/components/table-tree.js +35 -30
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/internal/chevron.js +8 -3
- package/dist/esm/components/internal/with-column-width.js +24 -51
- package/dist/esm/components/row.js +19 -3
- package/dist/esm/components/table-tree.js +23 -20
- package/dist/esm/version.json +1 -1
- package/dist/types/components/cell.d.ts +6 -59
- package/dist/types/components/header.d.ts +1 -58
- package/dist/types/components/internal/chevron.d.ts +2 -0
- package/dist/types/components/internal/with-column-width.d.ts +2 -60
- package/dist/types/components/row.d.ts +1 -0
- package/dist/types/components/table-tree.d.ts +15 -15
- package/dist/types-ts4.5/components/cell.d.ts +6 -59
- package/dist/types-ts4.5/components/header.d.ts +1 -58
- package/dist/types-ts4.5/components/internal/chevron.d.ts +2 -0
- package/dist/types-ts4.5/components/internal/with-column-width.d.ts +2 -60
- package/dist/types-ts4.5/components/row.d.ts +1 -0
- package/dist/types-ts4.5/components/table-tree.d.ts +15 -15
- package/extract-react-types/table-tree-row.tsx +9 -0
- package/extract-react-types/table-tree.tsx +7 -0
- package/package.json +7 -8
- package/report.api.md +9 -268
- package/tmp/api-report-tmp.d.ts +109 -0
|
@@ -1,64 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
export interface CellWithColumnWidthProps {
|
|
4
|
-
width?:
|
|
3
|
+
width?: string | number;
|
|
5
4
|
columnIndex?: number;
|
|
6
5
|
}
|
|
7
|
-
export default function withColumnWidth<T extends object>(Cell: React.ComponentType<T>):
|
|
8
|
-
new (props: Readonly<T & CellWithColumnWidthProps>): {
|
|
9
|
-
UNSAFE_componentWillMount(): void;
|
|
10
|
-
setColumnWidth(width?: number | string): void;
|
|
11
|
-
UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
context: any;
|
|
14
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<T & CellWithColumnWidthProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
15
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
16
|
-
readonly props: Readonly<T & CellWithColumnWidthProps> & Readonly<{
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
}>;
|
|
19
|
-
state: Readonly<{}>;
|
|
20
|
-
refs: {
|
|
21
|
-
[key: string]: React.ReactInstance;
|
|
22
|
-
};
|
|
23
|
-
componentDidMount?(): void;
|
|
24
|
-
shouldComponentUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
25
|
-
componentWillUnmount?(): void;
|
|
26
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
27
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<T & CellWithColumnWidthProps>, prevState: Readonly<{}>): any;
|
|
28
|
-
componentDidUpdate?(prevProps: Readonly<T & CellWithColumnWidthProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
29
|
-
componentWillMount?(): void;
|
|
30
|
-
componentWillReceiveProps?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextContext: any): void;
|
|
31
|
-
componentWillUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
32
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
|
-
};
|
|
34
|
-
new (props: T & CellWithColumnWidthProps, context?: any): {
|
|
35
|
-
UNSAFE_componentWillMount(): void;
|
|
36
|
-
setColumnWidth(width?: number | string): void;
|
|
37
|
-
UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
|
|
38
|
-
render(): JSX.Element;
|
|
39
|
-
context: any;
|
|
40
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<T & CellWithColumnWidthProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
41
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
42
|
-
readonly props: Readonly<T & CellWithColumnWidthProps> & Readonly<{
|
|
43
|
-
children?: React.ReactNode;
|
|
44
|
-
}>;
|
|
45
|
-
state: Readonly<{}>;
|
|
46
|
-
refs: {
|
|
47
|
-
[key: string]: React.ReactInstance;
|
|
48
|
-
};
|
|
49
|
-
componentDidMount?(): void;
|
|
50
|
-
shouldComponentUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
51
|
-
componentWillUnmount?(): void;
|
|
52
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
53
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<T & CellWithColumnWidthProps>, prevState: Readonly<{}>): any;
|
|
54
|
-
componentDidUpdate?(prevProps: Readonly<T & CellWithColumnWidthProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
55
|
-
componentWillMount?(): void;
|
|
56
|
-
componentWillReceiveProps?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextContext: any): void;
|
|
57
|
-
componentWillUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
58
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
59
|
-
};
|
|
60
|
-
contextTypes: {
|
|
61
|
-
tableTree: PropTypes.Validator<object>;
|
|
62
|
-
};
|
|
63
|
-
contextType?: React.Context<any> | undefined;
|
|
64
|
-
};
|
|
6
|
+
export default function withColumnWidth<T extends object>(Cell: React.ComponentType<T>): (props: T & CellWithColumnWidthProps) => JSX.Element;
|
|
@@ -14,6 +14,7 @@ declare class Row extends Component<any, any> {
|
|
|
14
14
|
onClickHandler: (e: React.MouseEvent) => void;
|
|
15
15
|
onExpandToggle: () => void;
|
|
16
16
|
isExpanded(): any;
|
|
17
|
+
getExtendedLabel: (cellContent: any, cellIndex: number, mainColumnForExpandCollapseLabel: string | number) => any;
|
|
17
18
|
renderCell(cell: any, cellIndex: number): React.FunctionComponentElement<{
|
|
18
19
|
key: number;
|
|
19
20
|
columnIndex: number;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
type ColumnWidth = string | number;
|
|
3
3
|
interface State {
|
|
4
|
-
columnWidths:
|
|
4
|
+
columnWidths: ColumnWidth[];
|
|
5
5
|
}
|
|
6
|
+
type TableTreeContext = {
|
|
7
|
+
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
8
|
+
getColumnWidth: (columnIndex: number) => ColumnWidth | null;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Context provider which maintains the column widths and access methods for use in descendent table cells
|
|
13
|
+
* Enables composed table-tree implementations to e.g. set width on header cells only
|
|
14
|
+
*/
|
|
15
|
+
export declare const TableTreeContext: React.Context<TableTreeContext>;
|
|
6
16
|
export default class TableTree extends Component<any, State> {
|
|
7
|
-
static childContextTypes: {
|
|
8
|
-
tableTree: PropTypes.Validator<object>;
|
|
9
|
-
};
|
|
10
17
|
state: State;
|
|
11
18
|
componentDidMount(): void;
|
|
12
|
-
setColumnWidth: (columnIndex: number, width:
|
|
13
|
-
getColumnWidth: (columnIndex: any) =>
|
|
14
|
-
getChildContext(): {
|
|
15
|
-
tableTree: {
|
|
16
|
-
columnWidths: number[];
|
|
17
|
-
setColumnWidth: (columnIndex: number, width: number) => void;
|
|
18
|
-
getColumnWidth: (columnIndex: any) => number | null;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
19
|
+
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
20
|
+
getColumnWidth: (columnIndex: any) => ColumnWidth | null;
|
|
21
21
|
render(): JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -79,6 +79,15 @@ type RowProps = {
|
|
|
79
79
|
* Normally set by parent Item component and does not need to be configured.
|
|
80
80
|
*/
|
|
81
81
|
depth?: number;
|
|
82
|
+
// eslint-disable-next-line jsdoc/require-asterisk-prefix, jsdoc/check-alignment
|
|
83
|
+
/**
|
|
84
|
+
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".
|
|
85
|
+
|
|
86
|
+
Should be a string when we pass data via `items` property in `<TableTree />`, value should be one of the property `columns` names in `<TableTree />`.
|
|
87
|
+
|
|
88
|
+
Should be a number when we pass data via `<Rows />` component as children in `<TableTree />`.
|
|
89
|
+
*/
|
|
90
|
+
mainColumnForExpandCollapseLabel?: string | number;
|
|
82
91
|
};
|
|
83
92
|
|
|
84
93
|
const TableRow = function (props: RowProps) {
|
|
@@ -54,6 +54,13 @@ type TableTreeProps = {
|
|
|
54
54
|
*/
|
|
55
55
|
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
56
56
|
items?: Item[] | null;
|
|
57
|
+
/**
|
|
58
|
+
* The value used to extend the expand or collapse button label in cases where `Row` has child rows.
|
|
59
|
+
*
|
|
60
|
+
* Should be a string when we pass data via `items` property, value should be one of the `columns` names.
|
|
61
|
+
* Should be a number when we pass data via `<Rows />` component as children in `<TableTree />`.
|
|
62
|
+
*/
|
|
63
|
+
mainColumnForExpandCollapseLabel?: string | number;
|
|
57
64
|
};
|
|
58
65
|
|
|
59
66
|
export default function (props: TableTreeProps) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.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/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://atlassian.design/components/table-tree/",
|
|
26
26
|
"atlassian": {
|
|
27
27
|
"team": "Design System Team",
|
|
28
|
-
"releaseModel": "
|
|
28
|
+
"releaseModel": "continuous",
|
|
29
29
|
"website": {
|
|
30
30
|
"name": "Table tree",
|
|
31
31
|
"category": "Components"
|
|
@@ -36,15 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
39
|
-
"@atlaskit/button": "^16.
|
|
39
|
+
"@atlaskit/button": "^16.8.0",
|
|
40
40
|
"@atlaskit/icon": "^21.12.0",
|
|
41
41
|
"@atlaskit/spinner": "^15.5.0",
|
|
42
42
|
"@atlaskit/theme": "^12.5.0",
|
|
43
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
+
"@atlaskit/tokens": "^1.10.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1",
|
|
46
|
-
"lodash": "^4.17.21"
|
|
47
|
-
"prop-types": "^15.5.10"
|
|
46
|
+
"lodash": "^4.17.21"
|
|
48
47
|
},
|
|
49
48
|
"peerDependencies": {
|
|
50
49
|
"react": "^16.8.0"
|
|
@@ -52,9 +51,9 @@
|
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@atlaskit/docs": "*",
|
|
54
53
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
55
|
-
"@atlaskit/empty-state": "^7.
|
|
54
|
+
"@atlaskit/empty-state": "^7.6.0",
|
|
56
55
|
"@atlaskit/section-message": "^6.4.0",
|
|
57
|
-
"@atlaskit/select": "^16.
|
|
56
|
+
"@atlaskit/select": "^16.5.0",
|
|
58
57
|
"@atlaskit/ssr": "*",
|
|
59
58
|
"@atlaskit/visual-regression": "*",
|
|
60
59
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
package/report.api.md
CHANGED
|
@@ -18,145 +18,18 @@
|
|
|
18
18
|
/// <reference types="react" />
|
|
19
19
|
|
|
20
20
|
import { Component } from 'react';
|
|
21
|
-
import { Context } from 'react';
|
|
22
|
-
import { ErrorInfo } from 'react';
|
|
23
21
|
import { jsx } from '@emotion/react';
|
|
24
|
-
import PropTypes from 'prop-types';
|
|
25
22
|
import { default as React_2 } from 'react';
|
|
26
|
-
import { ReactInstance } from 'react';
|
|
27
23
|
import { ReactNode } from 'react';
|
|
28
|
-
import { Validator } from 'prop-types';
|
|
29
24
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
30
25
|
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
31
26
|
|
|
32
27
|
// @public (undocumented)
|
|
33
|
-
export const Cell:
|
|
34
|
-
new (props: Readonly<CellProps & CellWithColumnWidthProps>): {
|
|
35
|
-
UNSAFE_componentWillMount(): void;
|
|
36
|
-
setColumnWidth(width?: number | string | undefined): void;
|
|
37
|
-
UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
|
|
38
|
-
render(): JSX.Element;
|
|
39
|
-
context: any;
|
|
40
|
-
setState<K extends never>(
|
|
41
|
-
state:
|
|
42
|
-
| ((
|
|
43
|
-
prevState: Readonly<{}>,
|
|
44
|
-
props: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
45
|
-
) => Pick<{}, K> | null | {})
|
|
46
|
-
| Pick<{}, K>
|
|
47
|
-
| null
|
|
48
|
-
| {},
|
|
49
|
-
callback?: (() => void) | undefined,
|
|
50
|
-
): void;
|
|
51
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
52
|
-
readonly props: Readonly<CellProps & CellWithColumnWidthProps> &
|
|
53
|
-
Readonly<{
|
|
54
|
-
children?: React_2.ReactNode;
|
|
55
|
-
}>;
|
|
56
|
-
state: Readonly<{}>;
|
|
57
|
-
refs: {
|
|
58
|
-
[key: string]: React_2.ReactInstance;
|
|
59
|
-
};
|
|
60
|
-
componentDidMount?(): void;
|
|
61
|
-
shouldComponentUpdate?(
|
|
62
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
63
|
-
nextState: Readonly<{}>,
|
|
64
|
-
nextContext: any,
|
|
65
|
-
): boolean;
|
|
66
|
-
componentWillUnmount?(): void;
|
|
67
|
-
componentDidCatch?(error: Error, errorInfo: React_2.ErrorInfo): void;
|
|
68
|
-
getSnapshotBeforeUpdate?(
|
|
69
|
-
prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
70
|
-
prevState: Readonly<{}>,
|
|
71
|
-
): any;
|
|
72
|
-
componentDidUpdate?(
|
|
73
|
-
prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
74
|
-
prevState: Readonly<{}>,
|
|
75
|
-
snapshot?: any,
|
|
76
|
-
): void;
|
|
77
|
-
componentWillMount?(): void;
|
|
78
|
-
componentWillReceiveProps?(
|
|
79
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
80
|
-
nextContext: any,
|
|
81
|
-
): void;
|
|
82
|
-
componentWillUpdate?(
|
|
83
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
84
|
-
nextState: Readonly<{}>,
|
|
85
|
-
nextContext: any,
|
|
86
|
-
): void;
|
|
87
|
-
UNSAFE_componentWillUpdate?(
|
|
88
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
89
|
-
nextState: Readonly<{}>,
|
|
90
|
-
nextContext: any,
|
|
91
|
-
): void;
|
|
92
|
-
};
|
|
93
|
-
new (props: CellProps & CellWithColumnWidthProps, context?: any): {
|
|
94
|
-
UNSAFE_componentWillMount(): void;
|
|
95
|
-
setColumnWidth(width?: number | string | undefined): void;
|
|
96
|
-
UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
|
|
97
|
-
render(): JSX.Element;
|
|
98
|
-
context: any;
|
|
99
|
-
setState<K extends never>(
|
|
100
|
-
state:
|
|
101
|
-
| ((
|
|
102
|
-
prevState: Readonly<{}>,
|
|
103
|
-
props: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
104
|
-
) => Pick<{}, K> | null | {})
|
|
105
|
-
| Pick<{}, K>
|
|
106
|
-
| null
|
|
107
|
-
| {},
|
|
108
|
-
callback?: (() => void) | undefined,
|
|
109
|
-
): void;
|
|
110
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
111
|
-
readonly props: Readonly<CellProps & CellWithColumnWidthProps> &
|
|
112
|
-
Readonly<{
|
|
113
|
-
children?: React_2.ReactNode;
|
|
114
|
-
}>;
|
|
115
|
-
state: Readonly<{}>;
|
|
116
|
-
refs: {
|
|
117
|
-
[key: string]: React_2.ReactInstance;
|
|
118
|
-
};
|
|
119
|
-
componentDidMount?(): void;
|
|
120
|
-
shouldComponentUpdate?(
|
|
121
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
122
|
-
nextState: Readonly<{}>,
|
|
123
|
-
nextContext: any,
|
|
124
|
-
): boolean;
|
|
125
|
-
componentWillUnmount?(): void;
|
|
126
|
-
componentDidCatch?(error: Error, errorInfo: React_2.ErrorInfo): void;
|
|
127
|
-
getSnapshotBeforeUpdate?(
|
|
128
|
-
prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
129
|
-
prevState: Readonly<{}>,
|
|
130
|
-
): any;
|
|
131
|
-
componentDidUpdate?(
|
|
132
|
-
prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
133
|
-
prevState: Readonly<{}>,
|
|
134
|
-
snapshot?: any,
|
|
135
|
-
): void;
|
|
136
|
-
componentWillMount?(): void;
|
|
137
|
-
componentWillReceiveProps?(
|
|
138
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
139
|
-
nextContext: any,
|
|
140
|
-
): void;
|
|
141
|
-
componentWillUpdate?(
|
|
142
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
143
|
-
nextState: Readonly<{}>,
|
|
144
|
-
nextContext: any,
|
|
145
|
-
): void;
|
|
146
|
-
UNSAFE_componentWillUpdate?(
|
|
147
|
-
nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
|
|
148
|
-
nextState: Readonly<{}>,
|
|
149
|
-
nextContext: any,
|
|
150
|
-
): void;
|
|
151
|
-
};
|
|
152
|
-
contextTypes: {
|
|
153
|
-
tableTree: Validator<object>;
|
|
154
|
-
};
|
|
155
|
-
contextType?: React_2.Context<any> | undefined;
|
|
156
|
-
};
|
|
28
|
+
export const Cell: (props: CellProps & CellWithColumnWidthProps) => JSX.Element;
|
|
157
29
|
|
|
158
30
|
// @public (undocumented)
|
|
159
31
|
export interface CellProps {
|
|
32
|
+
children?: ReactNode;
|
|
160
33
|
className?: string;
|
|
161
34
|
indentLevel?: number;
|
|
162
35
|
singleLine?: boolean;
|
|
@@ -172,130 +45,10 @@ export interface CellWithColumnWidthProps {
|
|
|
172
45
|
}
|
|
173
46
|
|
|
174
47
|
// @public (undocumented)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
|
|
180
|
-
render(): JSX.Element;
|
|
181
|
-
context: any;
|
|
182
|
-
setState<K extends never>(
|
|
183
|
-
state:
|
|
184
|
-
| ((
|
|
185
|
-
prevState: Readonly<{}>,
|
|
186
|
-
props: Readonly<any>,
|
|
187
|
-
) => Pick<{}, K> | null | {})
|
|
188
|
-
| Pick<{}, K>
|
|
189
|
-
| null
|
|
190
|
-
| {},
|
|
191
|
-
callback?: (() => void) | undefined,
|
|
192
|
-
): void;
|
|
193
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
194
|
-
readonly props: Readonly<any> &
|
|
195
|
-
Readonly<{
|
|
196
|
-
children?: ReactNode;
|
|
197
|
-
}>;
|
|
198
|
-
state: Readonly<{}>;
|
|
199
|
-
refs: {
|
|
200
|
-
[key: string]: ReactInstance;
|
|
201
|
-
};
|
|
202
|
-
componentDidMount?(): void;
|
|
203
|
-
shouldComponentUpdate?(
|
|
204
|
-
nextProps: Readonly<any>,
|
|
205
|
-
nextState: Readonly<{}>,
|
|
206
|
-
nextContext: any,
|
|
207
|
-
): boolean;
|
|
208
|
-
componentWillUnmount?(): void;
|
|
209
|
-
componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
|
|
210
|
-
getSnapshotBeforeUpdate?(
|
|
211
|
-
prevProps: Readonly<any>,
|
|
212
|
-
prevState: Readonly<{}>,
|
|
213
|
-
): any;
|
|
214
|
-
componentDidUpdate?(
|
|
215
|
-
prevProps: Readonly<any>,
|
|
216
|
-
prevState: Readonly<{}>,
|
|
217
|
-
snapshot?: any,
|
|
218
|
-
): void;
|
|
219
|
-
componentWillMount?(): void;
|
|
220
|
-
componentWillReceiveProps?(
|
|
221
|
-
nextProps: Readonly<any>,
|
|
222
|
-
nextContext: any,
|
|
223
|
-
): void;
|
|
224
|
-
componentWillUpdate?(
|
|
225
|
-
nextProps: Readonly<any>,
|
|
226
|
-
nextState: Readonly<{}>,
|
|
227
|
-
nextContext: any,
|
|
228
|
-
): void;
|
|
229
|
-
UNSAFE_componentWillUpdate?(
|
|
230
|
-
nextProps: Readonly<any>,
|
|
231
|
-
nextState: Readonly<{}>,
|
|
232
|
-
nextContext: any,
|
|
233
|
-
): void;
|
|
234
|
-
};
|
|
235
|
-
new (props: any, context?: any): {
|
|
236
|
-
UNSAFE_componentWillMount(): void;
|
|
237
|
-
setColumnWidth(width?: number | string | undefined): void;
|
|
238
|
-
UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
|
|
239
|
-
render(): JSX.Element;
|
|
240
|
-
context: any;
|
|
241
|
-
setState<K extends never>(
|
|
242
|
-
state:
|
|
243
|
-
| ((
|
|
244
|
-
prevState: Readonly<{}>,
|
|
245
|
-
props: Readonly<any>,
|
|
246
|
-
) => Pick<{}, K> | null | {})
|
|
247
|
-
| Pick<{}, K>
|
|
248
|
-
| null
|
|
249
|
-
| {},
|
|
250
|
-
callback?: (() => void) | undefined,
|
|
251
|
-
): void;
|
|
252
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
253
|
-
readonly props: Readonly<any> &
|
|
254
|
-
Readonly<{
|
|
255
|
-
children?: ReactNode;
|
|
256
|
-
}>;
|
|
257
|
-
state: Readonly<{}>;
|
|
258
|
-
refs: {
|
|
259
|
-
[key: string]: ReactInstance;
|
|
260
|
-
};
|
|
261
|
-
componentDidMount?(): void;
|
|
262
|
-
shouldComponentUpdate?(
|
|
263
|
-
nextProps: Readonly<any>,
|
|
264
|
-
nextState: Readonly<{}>,
|
|
265
|
-
nextContext: any,
|
|
266
|
-
): boolean;
|
|
267
|
-
componentWillUnmount?(): void;
|
|
268
|
-
componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
|
|
269
|
-
getSnapshotBeforeUpdate?(
|
|
270
|
-
prevProps: Readonly<any>,
|
|
271
|
-
prevState: Readonly<{}>,
|
|
272
|
-
): any;
|
|
273
|
-
componentDidUpdate?(
|
|
274
|
-
prevProps: Readonly<any>,
|
|
275
|
-
prevState: Readonly<{}>,
|
|
276
|
-
snapshot?: any,
|
|
277
|
-
): void;
|
|
278
|
-
componentWillMount?(): void;
|
|
279
|
-
componentWillReceiveProps?(
|
|
280
|
-
nextProps: Readonly<any>,
|
|
281
|
-
nextContext: any,
|
|
282
|
-
): void;
|
|
283
|
-
componentWillUpdate?(
|
|
284
|
-
nextProps: Readonly<any>,
|
|
285
|
-
nextState: Readonly<{}>,
|
|
286
|
-
nextContext: any,
|
|
287
|
-
): void;
|
|
288
|
-
UNSAFE_componentWillUpdate?(
|
|
289
|
-
nextProps: Readonly<any>,
|
|
290
|
-
nextState: Readonly<{}>,
|
|
291
|
-
nextContext: any,
|
|
292
|
-
): void;
|
|
293
|
-
};
|
|
294
|
-
contextTypes: {
|
|
295
|
-
tableTree: Validator<object>;
|
|
296
|
-
};
|
|
297
|
-
contextType?: Context<any> | undefined;
|
|
298
|
-
};
|
|
48
|
+
type ColumnWidth = number | string;
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
export const Header: (props: any) => JSX.Element;
|
|
299
52
|
|
|
300
53
|
// @public (undocumented)
|
|
301
54
|
class Headers_2 extends Component<any> {
|
|
@@ -332,31 +85,19 @@ export interface RowsProps<T> {
|
|
|
332
85
|
// @public (undocumented)
|
|
333
86
|
interface State {
|
|
334
87
|
// (undocumented)
|
|
335
|
-
columnWidths:
|
|
88
|
+
columnWidths: ColumnWidth[];
|
|
336
89
|
}
|
|
337
90
|
|
|
338
91
|
// @public (undocumented)
|
|
339
92
|
class TableTree extends Component<any, State> {
|
|
340
|
-
// (undocumented)
|
|
341
|
-
static childContextTypes: {
|
|
342
|
-
tableTree: PropTypes.Validator<object>;
|
|
343
|
-
};
|
|
344
93
|
// (undocumented)
|
|
345
94
|
componentDidMount(): void;
|
|
346
95
|
// (undocumented)
|
|
347
|
-
|
|
348
|
-
tableTree: {
|
|
349
|
-
columnWidths: number[];
|
|
350
|
-
setColumnWidth: (columnIndex: number, width: number) => void;
|
|
351
|
-
getColumnWidth: (columnIndex: any) => null | number;
|
|
352
|
-
};
|
|
353
|
-
};
|
|
354
|
-
// (undocumented)
|
|
355
|
-
getColumnWidth: (columnIndex: any) => null | number;
|
|
96
|
+
getColumnWidth: (columnIndex: any) => ColumnWidth | null;
|
|
356
97
|
// (undocumented)
|
|
357
98
|
render(): JSX.Element;
|
|
358
99
|
// (undocumented)
|
|
359
|
-
setColumnWidth: (columnIndex: number, width:
|
|
100
|
+
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
360
101
|
// (undocumented)
|
|
361
102
|
state: State;
|
|
362
103
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/table-tree"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { Component } from 'react';
|
|
10
|
+
import { jsx } from '@emotion/react';
|
|
11
|
+
import { default as React_2 } from 'react';
|
|
12
|
+
import { ReactNode } from 'react';
|
|
13
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
14
|
+
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
15
|
+
|
|
16
|
+
// @public (undocumented)
|
|
17
|
+
export const Cell: (props: CellProps & CellWithColumnWidthProps) => JSX.Element;
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export interface CellProps {
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
indentLevel?: number;
|
|
24
|
+
singleLine?: boolean;
|
|
25
|
+
width?: number | string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// @public (undocumented)
|
|
29
|
+
export interface CellWithColumnWidthProps {
|
|
30
|
+
// (undocumented)
|
|
31
|
+
columnIndex?: number;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
width?: number | string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
type ColumnWidth = number | string;
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
export const Header: (props: any) => JSX.Element;
|
|
41
|
+
|
|
42
|
+
// @public (undocumented)
|
|
43
|
+
class Headers_2 extends Component<any> {
|
|
44
|
+
// (undocumented)
|
|
45
|
+
render(): jsx.JSX.Element;
|
|
46
|
+
}
|
|
47
|
+
export { Headers_2 as Headers }
|
|
48
|
+
|
|
49
|
+
// @public (undocumented)
|
|
50
|
+
export const Row: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<any, keyof WithAnalyticsEventsProps>, number | string | symbol> & React_2.RefAttributes<any> & WithContextProps, number | string | symbol> & React_2.RefAttributes<any>>;
|
|
51
|
+
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
export class Rows<T> extends Component<RowsProps<T>> {
|
|
54
|
+
// (undocumented)
|
|
55
|
+
render(): JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @public (undocumented)
|
|
59
|
+
export interface RowsProps<T> {
|
|
60
|
+
// (undocumented)
|
|
61
|
+
items?: WithChildren<T>[];
|
|
62
|
+
// (undocumented)
|
|
63
|
+
render: (args: WithChildren<T>) => React_2.ReactNode;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
interface State {
|
|
68
|
+
// (undocumented)
|
|
69
|
+
columnWidths: ColumnWidth[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
class TableTree extends Component<any, State> {
|
|
74
|
+
// (undocumented)
|
|
75
|
+
componentDidMount(): void;
|
|
76
|
+
// (undocumented)
|
|
77
|
+
getColumnWidth: (columnIndex: any) => ColumnWidth | null;
|
|
78
|
+
// (undocumented)
|
|
79
|
+
render(): JSX.Element;
|
|
80
|
+
// (undocumented)
|
|
81
|
+
setColumnWidth: (columnIndex: number, width: ColumnWidth) => void;
|
|
82
|
+
// (undocumented)
|
|
83
|
+
state: State;
|
|
84
|
+
}
|
|
85
|
+
export default TableTree;
|
|
86
|
+
|
|
87
|
+
// @public
|
|
88
|
+
export class TableTreeDataHelper<T extends any = any> {
|
|
89
|
+
constructor({ key }?: {
|
|
90
|
+
key?: keyof T | undefined;
|
|
91
|
+
});
|
|
92
|
+
// (undocumented)
|
|
93
|
+
appendItems(items: T[], allItems?: T[], parentItem?: T | null): T[];
|
|
94
|
+
// (undocumented)
|
|
95
|
+
key: keyof T;
|
|
96
|
+
// (undocumented)
|
|
97
|
+
keysCache: any;
|
|
98
|
+
// (undocumented)
|
|
99
|
+
updateItems(items: T[], allItems?: T[], parentItem?: T | null): T[];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// @public (undocumented)
|
|
103
|
+
type WithChildren<T> = T & {
|
|
104
|
+
children?: T[] | null;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// (No @packageDocumentation comment for this package)
|
|
108
|
+
|
|
109
|
+
```
|