@atlaskit/table-tree 9.1.6 → 9.1.9
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 +18 -0
- package/dist/cjs/components/row.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/row.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/row.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/cell.d.ts +13 -1
- package/dist/types/components/header.d.ts +1 -1
- package/dist/types/components/internal/with-column-width.d.ts +1 -1
- package/dist/types/components/row.d.ts +1 -1
- package/dist/types/components/table-tree.d.ts +1 -1
- package/extract-react-types/table-tree-cell.tsx +7 -0
- package/extract-react-types/table-tree-header.tsx +20 -0
- package/extract-react-types/table-tree-row.tsx +85 -0
- package/extract-react-types/table-tree-rows.tsx +34 -0
- package/extract-react-types/table-tree.tsx +6 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 9.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`efa50ac72ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efa50ac72ba) - Adjusts jsdoc strings to improve prop documentation
|
|
8
|
+
|
|
9
|
+
## 9.1.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 9.1.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 9.1.6
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -44,7 +44,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
44
44
|
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; } }
|
|
45
45
|
|
|
46
46
|
var packageName = "@atlaskit/table-tree";
|
|
47
|
-
var packageVersion = "9.1.
|
|
47
|
+
var packageVersion = "9.1.9";
|
|
48
48
|
|
|
49
49
|
var Row = /*#__PURE__*/function (_Component) {
|
|
50
50
|
(0, _inherits2.default)(Row, _Component);
|
package/dist/cjs/version.json
CHANGED
|
@@ -8,7 +8,7 @@ import toItemId from '../utils/to-item-id';
|
|
|
8
8
|
import Chevron from './internal/chevron';
|
|
9
9
|
import { TreeRowContainer } from './internal/styled';
|
|
10
10
|
const packageName = "@atlaskit/table-tree";
|
|
11
|
-
const packageVersion = "9.1.
|
|
11
|
+
const packageVersion = "9.1.9";
|
|
12
12
|
|
|
13
13
|
class Row extends Component {
|
|
14
14
|
constructor(...args) {
|
package/dist/es2019/version.json
CHANGED
|
@@ -18,7 +18,7 @@ import toItemId from '../utils/to-item-id';
|
|
|
18
18
|
import Chevron from './internal/chevron';
|
|
19
19
|
import { TreeRowContainer } from './internal/styled';
|
|
20
20
|
var packageName = "@atlaskit/table-tree";
|
|
21
|
-
var packageVersion = "9.1.
|
|
21
|
+
var packageVersion = "9.1.9";
|
|
22
22
|
|
|
23
23
|
var Row = /*#__PURE__*/function (_Component) {
|
|
24
24
|
_inherits(Row, _Component);
|
package/dist/esm/version.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface CellProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the cell contents should wrap or display on a single line and be concatenated.
|
|
5
|
+
*/
|
|
3
6
|
singleLine?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Indent level for the cell. Each indent level adds 25px to the left padding.
|
|
9
|
+
*/
|
|
4
10
|
indentLevel?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Width of the header item. Takes a string or a number representing the width in pixels.
|
|
13
|
+
*/
|
|
5
14
|
width?: number | string;
|
|
15
|
+
/**
|
|
16
|
+
* Class name to apply to cell.
|
|
17
|
+
*/
|
|
6
18
|
className?: string;
|
|
7
19
|
}
|
|
8
20
|
declare const _default: {
|
|
@@ -59,7 +71,7 @@ declare const _default: {
|
|
|
59
71
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<CellProps & import("./internal/with-column-width").CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
60
72
|
};
|
|
61
73
|
contextTypes: {
|
|
62
|
-
tableTree: import("prop-types").Validator<
|
|
74
|
+
tableTree: import("prop-types").Validator<object>;
|
|
63
75
|
};
|
|
64
76
|
contextType?: React.Context<any> | undefined;
|
|
65
77
|
};
|
|
@@ -53,7 +53,7 @@ declare const _default: {
|
|
|
53
53
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<{}>, nextContext: any): void;
|
|
54
54
|
};
|
|
55
55
|
contextTypes: {
|
|
56
|
-
tableTree: import("prop-types").Validator<
|
|
56
|
+
tableTree: import("prop-types").Validator<object>;
|
|
57
57
|
};
|
|
58
58
|
contextType?: import("react").Context<any> | undefined;
|
|
59
59
|
};
|
|
@@ -58,7 +58,7 @@ export default function withColumnWidth<T extends object>(Cell: React.ComponentT
|
|
|
58
58
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<T & CellWithColumnWidthProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
59
59
|
};
|
|
60
60
|
contextTypes: {
|
|
61
|
-
tableTree: PropTypes.Validator<
|
|
61
|
+
tableTree: PropTypes.Validator<object>;
|
|
62
62
|
};
|
|
63
63
|
contextType?: React.Context<any> | undefined;
|
|
64
64
|
};
|
|
@@ -15,5 +15,5 @@ declare class Row extends Component<any, any> {
|
|
|
15
15
|
render(): JSX.Element;
|
|
16
16
|
}
|
|
17
17
|
export { Row as RowWithoutAnalytics };
|
|
18
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<
|
|
18
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<any, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, string | number | symbol> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, string | number | symbol> & React.RefAttributes<any>>;
|
|
19
19
|
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is hard-coded here because our actual <Header /> has no typings
|
|
3
|
+
* for its props.
|
|
4
|
+
*
|
|
5
|
+
* Adding types for real *might* break things so will need a little care.
|
|
6
|
+
*
|
|
7
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
8
|
+
*/
|
|
9
|
+
type HeaderProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Width of the header item. Takes a string, or a number representing the width in pixels.
|
|
12
|
+
*/
|
|
13
|
+
width?: string | number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const TableHeader = function (props: HeaderProps) {
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default TableHeader;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Item } from './table-tree';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This is hard-coded here because our actual <TableTree /> 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
|
+
type RowProps = {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the row has children
|
|
16
|
+
*/
|
|
17
|
+
hasChildren?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Children contained in the row. Should be one or more Cell components.
|
|
20
|
+
*/
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* ID for the row item
|
|
24
|
+
*/
|
|
25
|
+
itemId?: string;
|
|
26
|
+
// eslint-disable-next-line jsdoc/require-asterisk-prefix, jsdoc/check-alignment
|
|
27
|
+
/**
|
|
28
|
+
The data used to render the row and descendants. Pass down from `children` render prop.
|
|
29
|
+
|
|
30
|
+
In addition to these props, any other data can be added to the object, and it will
|
|
31
|
+
be provided as props when rendering each cell.
|
|
32
|
+
*/
|
|
33
|
+
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
34
|
+
items?: Item[] | null;
|
|
35
|
+
/**
|
|
36
|
+
* Controls the expanded state of the row.
|
|
37
|
+
*/
|
|
38
|
+
isExpanded?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the default expanded state of the row.
|
|
41
|
+
*/
|
|
42
|
+
isDefaultExpanded?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* `aria-label` attached to the expand chevron button
|
|
45
|
+
*/
|
|
46
|
+
expandLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* `aria-label` attached to the collapse chevron button
|
|
49
|
+
*/
|
|
50
|
+
collapseLabel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Callback called when row collapses.
|
|
53
|
+
*/
|
|
54
|
+
onCollapse?: (data: Item) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Callback called when row expands.
|
|
57
|
+
*/
|
|
58
|
+
onExpand?: (data: Item) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Children to render under row.
|
|
61
|
+
* Normally set by parent Item component and does not need to be configured.
|
|
62
|
+
*/
|
|
63
|
+
renderChildren?: () => React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Data to render. Passed down by Item and passed into onExpand and onCollapse callbacks.
|
|
66
|
+
* Normally set by parent Item component and does not need to be configured.
|
|
67
|
+
*/
|
|
68
|
+
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
69
|
+
data?: Item;
|
|
70
|
+
/**
|
|
71
|
+
* Depth used for rendering indent.
|
|
72
|
+
* Normally set by parent Item component and does not need to be configured.
|
|
73
|
+
*/
|
|
74
|
+
depth?: number;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const TableRow = function (props: RowProps) {
|
|
78
|
+
return null;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
TableRow.defaultProps = {
|
|
82
|
+
isDefaultExpanded: false,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default TableRow;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Item } from './table-tree';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is hard-coded here because our actual <Rows /> 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
|
+
type RowsProps = {
|
|
12
|
+
// eslint-disable-next-line jsdoc/require-asterisk-prefix, jsdoc/check-alignment
|
|
13
|
+
/**
|
|
14
|
+
The data used to render the set of rows. Will be passed down via the `children` render prop.
|
|
15
|
+
|
|
16
|
+
In addition to these props, any other data can be added to the object, and it will
|
|
17
|
+
be provided as props when rendering each cell.
|
|
18
|
+
*/
|
|
19
|
+
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
20
|
+
items?: Item[] | null;
|
|
21
|
+
/**
|
|
22
|
+
* Render function for child rows. Render props will contain an item from the
|
|
23
|
+
* `items` prop above.
|
|
24
|
+
*/
|
|
25
|
+
render?: (item: Item) => React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const TableRows = function (props: RowsProps) {
|
|
29
|
+
return null;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
TableRows.defaultProps = {};
|
|
33
|
+
|
|
34
|
+
export default TableRows;
|
|
@@ -2,9 +2,8 @@ import { ElementType, ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
class Content extends Object {}
|
|
4
4
|
|
|
5
|
-
type Item = {
|
|
5
|
+
export type Item = {
|
|
6
6
|
id: string;
|
|
7
|
-
content: Content;
|
|
8
7
|
hasChildren: boolean;
|
|
9
8
|
children?: Item[];
|
|
10
9
|
};
|
|
@@ -37,10 +36,12 @@ type TableTreeProps = {
|
|
|
37
36
|
* The header text of the respective columns of the table.
|
|
38
37
|
*/
|
|
39
38
|
headers?: string[];
|
|
39
|
+
// eslint-disable-next-line jsdoc/require-asterisk-prefix, jsdoc/check-alignment
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
The data used to render the table.
|
|
42
|
+
|
|
43
|
+
In addition to these props, any other data can be added, and it will
|
|
44
|
+
be provided as props when rendering each cell.
|
|
44
45
|
*/
|
|
45
46
|
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
46
47
|
items?: Item[] | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.9",
|
|
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/"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
30
|
-
"@atlaskit/button": "^16.
|
|
30
|
+
"@atlaskit/button": "^16.3.0",
|
|
31
31
|
"@atlaskit/icon": "^21.10.0",
|
|
32
32
|
"@atlaskit/spinner": "^15.0.0",
|
|
33
33
|
"@atlaskit/theme": "^12.1.0",
|
|
34
|
-
"@atlaskit/tokens": "^0.
|
|
34
|
+
"@atlaskit/tokens": "^0.10.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|
|
36
36
|
"@emotion/core": "^10.0.9",
|
|
37
37
|
"lodash": "^4.17.21",
|