@atlaskit/table-tree 9.5.0 → 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 +6 -0
- package/dist/cjs/components/internal/with-column-width.js +23 -49
- package/dist/cjs/components/row.js +1 -1
- package/dist/cjs/components/table-tree.js +21 -19
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/internal/with-column-width.js +27 -29
- package/dist/es2019/components/row.js +1 -1
- package/dist/es2019/components/table-tree.js +18 -17
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/internal/with-column-width.js +24 -51
- package/dist/esm/components/row.js +1 -1
- package/dist/esm/components/table-tree.js +19 -18
- 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/with-column-width.d.ts +2 -60
- 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/with-column-width.d.ts +2 -60
- package/dist/types-ts4.5/components/table-tree.d.ts +15 -15
- package/package.json +6 -7
- package/report.api.md +9 -268
- package/tmp/api-report-tmp.d.ts +109 -0
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
|
+
```
|