@atlaskit/table-tree 11.2.2 → 12.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 +22 -0
- package/dist/cjs/components/cell.js +1 -2
- package/dist/cjs/components/header.compiled.css +3 -0
- package/dist/cjs/components/header.js +14 -16
- package/dist/cjs/components/headers.compiled.css +2 -0
- package/dist/cjs/components/headers.js +21 -25
- package/dist/cjs/components/internal/common-cell.compiled.css +10 -0
- package/dist/cjs/components/internal/common-cell.js +18 -25
- package/dist/cjs/components/internal/item.js +6 -10
- package/dist/cjs/components/internal/loader-item.js +1 -1
- package/dist/cjs/components/internal/overflow-container.compiled.css +4 -0
- package/dist/cjs/components/internal/overflow-container.js +11 -15
- package/dist/cjs/components/internal/styled.compiled.css +8 -0
- package/dist/cjs/components/internal/styled.js +32 -43
- package/dist/cjs/components/row.compiled.css +1 -0
- package/dist/cjs/components/row.js +10 -17
- package/dist/es2019/components/cell.js +1 -2
- package/dist/es2019/components/header.compiled.css +3 -0
- package/dist/es2019/components/header.js +8 -15
- package/dist/es2019/components/headers.compiled.css +2 -0
- package/dist/es2019/components/headers.js +9 -17
- package/dist/es2019/components/internal/common-cell.compiled.css +10 -0
- package/dist/es2019/components/internal/common-cell.js +7 -23
- package/dist/es2019/components/internal/item.js +3 -10
- package/dist/es2019/components/internal/loader-item.js +2 -2
- package/dist/es2019/components/internal/overflow-container.compiled.css +4 -0
- package/dist/es2019/components/internal/overflow-container.js +8 -16
- package/dist/es2019/components/internal/styled.compiled.css +8 -0
- package/dist/es2019/components/internal/styled.js +19 -43
- package/dist/es2019/components/row.compiled.css +1 -0
- package/dist/es2019/components/row.js +10 -16
- package/dist/esm/components/cell.js +1 -2
- package/dist/esm/components/header.compiled.css +3 -0
- package/dist/esm/components/header.js +11 -15
- package/dist/esm/components/headers.compiled.css +2 -0
- package/dist/esm/components/headers.js +18 -24
- package/dist/esm/components/internal/common-cell.compiled.css +10 -0
- package/dist/esm/components/internal/common-cell.js +15 -26
- package/dist/esm/components/internal/item.js +3 -10
- package/dist/esm/components/internal/loader-item.js +2 -2
- package/dist/esm/components/internal/overflow-container.compiled.css +4 -0
- package/dist/esm/components/internal/overflow-container.js +8 -16
- package/dist/esm/components/internal/styled.compiled.css +8 -0
- package/dist/esm/components/internal/styled.js +28 -43
- package/dist/esm/components/row.compiled.css +1 -0
- package/dist/esm/components/row.js +10 -16
- package/dist/types/components/headers.d.ts +1 -2
- package/dist/types/components/internal/common-cell.d.ts +1 -1
- package/dist/types/components/internal/item.d.ts +2 -6
- package/dist/types/components/internal/overflow-container.d.ts +1 -1
- package/dist/types/components/internal/styled.d.ts +1 -2
- package/dist/types/components/row.d.ts +1 -2
- package/dist/types-ts4.5/components/headers.d.ts +1 -2
- package/dist/types-ts4.5/components/internal/common-cell.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/item.d.ts +2 -6
- package/dist/types-ts4.5/components/internal/overflow-container.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/styled.d.ts +1 -2
- package/dist/types-ts4.5/components/row.d.ts +1 -2
- package/package.json +3 -3
|
@@ -1,60 +1,43 @@
|
|
|
1
|
+
/* styled.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
4
|
var _excluded = ["isRoot"];
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
+
import "./styled.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
11
8
|
import { N30 } from '@atlaskit/theme/colors';
|
|
12
|
-
|
|
13
|
-
var treeRowContainerStyles = css({
|
|
14
|
-
display: 'flex',
|
|
15
|
-
borderBlockEnd: "1px solid ".concat("var(--ds-border, ".concat(N30, ")"))
|
|
16
|
-
});
|
|
9
|
+
var treeRowContainerStyles = null;
|
|
17
10
|
|
|
18
11
|
/**
|
|
19
12
|
* __Tree row container__
|
|
20
13
|
*/
|
|
21
14
|
export var TreeRowContainer = function TreeRowContainer(props) {
|
|
22
|
-
return
|
|
23
|
-
role: "row"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
16
|
+
role: "row"
|
|
17
|
+
}, props, {
|
|
18
|
+
className: ax(["_179rskuj _1e0c1txw"]),
|
|
19
|
+
style: {
|
|
20
|
+
"--_1prvtx9": ix("1px solid ".concat("var(--ds-border, ".concat(N30, ")")))
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
27
23
|
};
|
|
28
|
-
var commonCellElementStyles =
|
|
29
|
-
|
|
30
|
-
position: 'absolute',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
// indentBase is re-used elsewhere and is primarily used as positive value; we need to negate it here
|
|
33
|
-
marginInlineStart: "calc(".concat(indentBase, " * -1)")
|
|
34
|
-
});
|
|
35
|
-
var commonChevronContainerStyles = css({
|
|
36
|
-
// Aligns position:absolute chevron button with the adjacent text. Any future visual breaking changes
|
|
37
|
-
// should consider setting this to `-2px` for better alignment, or refactor completely
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
39
|
-
marginBlockStart: -3
|
|
40
|
-
});
|
|
24
|
+
var commonCellElementStyles = null;
|
|
25
|
+
var commonChevronContainerStyles = null;
|
|
41
26
|
/**
|
|
42
27
|
* __Chevron container__
|
|
43
28
|
*
|
|
44
29
|
* A wrapper container around the expand table tree button.
|
|
45
30
|
*/
|
|
46
31
|
export var ChevronContainer = function ChevronContainer(props) {
|
|
47
|
-
return
|
|
48
|
-
|
|
32
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
33
|
+
className: ax(["_1e0c1txw _kqswstnw _4cvr1h6o _ahbq1dum", "_1pfhj39m"]),
|
|
34
|
+
style: {
|
|
35
|
+
"--_1izje1g": ix("calc(".concat("var(--ds-space-300, 25px)", " * -1)"))
|
|
36
|
+
}
|
|
49
37
|
}));
|
|
50
38
|
};
|
|
51
|
-
var loadingItemContainerStyles =
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
var paddingLeftStyles = css({
|
|
55
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
56
|
-
paddingInlineStart: '50%'
|
|
57
|
-
});
|
|
39
|
+
var loadingItemContainerStyles = null;
|
|
40
|
+
var paddingLeftStyles = null;
|
|
58
41
|
/**
|
|
59
42
|
* __Loader item container__
|
|
60
43
|
*
|
|
@@ -63,8 +46,10 @@ var paddingLeftStyles = css({
|
|
|
63
46
|
export var LoaderItemContainer = function LoaderItemContainer(_ref) {
|
|
64
47
|
var isRoot = _ref.isRoot,
|
|
65
48
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
50
|
+
className: ax(["_1e0c1txw _kqswstnw _4cvr1h6o _ahbq1dum", "_1bsb1osq", isRoot && "_bozg1ssb"]),
|
|
51
|
+
style: {
|
|
52
|
+
"--_1izje1g": ix("calc(".concat("var(--ds-space-300, 25px)", " * -1)"))
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
70
55
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._80omtlke{cursor:pointer}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
/* row.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
3
|
+
import "./row.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
6
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
11
7
|
import toItemId from '../utils/to-item-id';
|
|
12
8
|
import Chevron from './internal/chevron';
|
|
13
9
|
import { TreeRowContainer } from './internal/styled';
|
|
14
|
-
var treeRowClickableStyles =
|
|
15
|
-
cursor: 'pointer'
|
|
16
|
-
});
|
|
10
|
+
var treeRowClickableStyles = null;
|
|
17
11
|
var getExtendedLabel = function getExtendedLabel(cellContent, cellIndex, mainColumnForExpandCollapseLabel) {
|
|
18
12
|
/**
|
|
19
13
|
* First condition - when we pass data via `items` property in `<TableTree />`
|
|
@@ -58,7 +52,7 @@ function Row(_ref) {
|
|
|
58
52
|
actionSubject: 'tableTree',
|
|
59
53
|
componentName: 'row',
|
|
60
54
|
packageName: "@atlaskit/table-tree",
|
|
61
|
-
packageVersion: "
|
|
55
|
+
packageVersion: "12.0.0"
|
|
62
56
|
});
|
|
63
57
|
var onCollapse = usePlatformLeafEventHandler({
|
|
64
58
|
fn: function fn(value) {
|
|
@@ -68,7 +62,7 @@ function Row(_ref) {
|
|
|
68
62
|
actionSubject: 'tableTree',
|
|
69
63
|
componentName: 'row',
|
|
70
64
|
packageName: "@atlaskit/table-tree",
|
|
71
|
-
packageVersion: "
|
|
65
|
+
packageVersion: "12.0.0"
|
|
72
66
|
});
|
|
73
67
|
|
|
74
68
|
/**
|
|
@@ -107,7 +101,7 @@ function Row(_ref) {
|
|
|
107
101
|
var cellContent = cell.props.children || [];
|
|
108
102
|
var extendedLabel = getExtendedLabel(cellContent, cellIndex, mainColumnForExpandCollapseLabel);
|
|
109
103
|
if (isFirstCell && hasChildren) {
|
|
110
|
-
cellContent = [
|
|
104
|
+
cellContent = [/*#__PURE__*/React.createElement(Chevron, {
|
|
111
105
|
key: "chevron",
|
|
112
106
|
expandLabel: expandLabel,
|
|
113
107
|
collapseLabel: collapseLabel,
|
|
@@ -125,11 +119,11 @@ function Row(_ref) {
|
|
|
125
119
|
indentLevel: indentLevel
|
|
126
120
|
}, cellContent);
|
|
127
121
|
};
|
|
128
|
-
return
|
|
129
|
-
css: hasChildren && shouldExpandOnClick ? treeRowClickableStyles : undefined,
|
|
122
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TreeRowContainer, {
|
|
130
123
|
onClick: hasChildren && shouldExpandOnClick ? onClickHandler : undefined,
|
|
131
124
|
"aria-expanded": hasChildren ? isExpandedState : undefined,
|
|
132
|
-
"aria-level": depth ? depth : undefined
|
|
125
|
+
"aria-level": depth ? depth : undefined,
|
|
126
|
+
className: ax([hasChildren && shouldExpandOnClick && "_80omtlke"])
|
|
133
127
|
}, React.Children.map(children, function (cell, index) {
|
|
134
128
|
return renderCell(cell, index);
|
|
135
129
|
})), hasChildren && (isProvidedExpanded !== undefined ? isProvidedExpanded : isExpandedState) && renderChildren && renderChildren());
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type ReactElement } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
interface HeadersProps {
|
|
8
7
|
children: ReactElement | ReactElement[];
|
|
9
8
|
}
|
|
@@ -15,5 +14,5 @@ interface HeadersProps {
|
|
|
15
14
|
* - [Examples](https://atlassian.design/components/table-tree/examples#advanced)
|
|
16
15
|
* - [Code](https://atlassian.design/components/table-tree/code#headers-props)
|
|
17
16
|
*/
|
|
18
|
-
declare const Headers: ({ children }: HeadersProps) =>
|
|
17
|
+
declare const Headers: ({ children }: HeadersProps) => JSX.Element;
|
|
19
18
|
export default Headers;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
6
2
|
import { type RowProps } from '../row';
|
|
7
3
|
import { type RowsProps } from '../rows';
|
|
8
4
|
type ItemProps<Item> = {
|
|
@@ -25,5 +21,5 @@ type ItemProps<Item> = {
|
|
|
25
21
|
*/
|
|
26
22
|
declare function Item<Item extends {
|
|
27
23
|
id: string;
|
|
28
|
-
}>({ depth, data, render, loadingLabel, }: ItemProps<Item>): ReactElement<RowProps<Item> | RowsProps<Item>, string |
|
|
24
|
+
}>({ depth, data, render, loadingLabel, }: ItemProps<Item>): React.ReactElement<RowProps<Item> | RowsProps<Item>, string | React.JSXElementConstructor<any>> | null;
|
|
29
25
|
export default Item;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React, { type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
7
|
export interface RowProps<Item> {
|
|
9
8
|
/**
|
|
@@ -81,5 +80,5 @@ export interface RowProps<Item> {
|
|
|
81
80
|
}
|
|
82
81
|
declare function Row<Item extends {
|
|
83
82
|
id: string;
|
|
84
|
-
}>({ shouldExpandOnClick, hasChildren, depth, renderChildren, isDefaultExpanded, data, onExpand: providedOnExpand, onCollapse: providedOnCollapse, mainColumnForExpandCollapseLabel, expandLabel, collapseLabel, itemId, children, isExpanded: isProvidedExpanded, }: RowProps<Item>):
|
|
83
|
+
}>({ shouldExpandOnClick, hasChildren, depth, renderChildren, isDefaultExpanded, data, onExpand: providedOnExpand, onCollapse: providedOnCollapse, mainColumnForExpandCollapseLabel, expandLabel, collapseLabel, itemId, children, isExpanded: isProvidedExpanded, }: RowProps<Item>): JSX.Element;
|
|
85
84
|
export default Row;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type ReactElement } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
interface HeadersProps {
|
|
8
7
|
children: ReactElement | ReactElement[];
|
|
9
8
|
}
|
|
@@ -15,5 +14,5 @@ interface HeadersProps {
|
|
|
15
14
|
* - [Examples](https://atlassian.design/components/table-tree/examples#advanced)
|
|
16
15
|
* - [Code](https://atlassian.design/components/table-tree/code#headers-props)
|
|
17
16
|
*/
|
|
18
|
-
declare const Headers: ({ children }: HeadersProps) =>
|
|
17
|
+
declare const Headers: ({ children }: HeadersProps) => JSX.Element;
|
|
19
18
|
export default Headers;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement } from 'react';
|
|
1
|
+
import React, { type ReactElement } from 'react';
|
|
6
2
|
import { type RowProps } from '../row';
|
|
7
3
|
import { type RowsProps } from '../rows';
|
|
8
4
|
type ItemProps<Item> = {
|
|
@@ -25,5 +21,5 @@ type ItemProps<Item> = {
|
|
|
25
21
|
*/
|
|
26
22
|
declare function Item<Item extends {
|
|
27
23
|
id: string;
|
|
28
|
-
}>({ depth, data, render, loadingLabel, }: ItemProps<Item>): ReactElement<RowProps<Item> | RowsProps<Item>, string |
|
|
24
|
+
}>({ depth, data, render, loadingLabel, }: ItemProps<Item>): React.ReactElement<RowProps<Item> | RowsProps<Item>, string | React.JSXElementConstructor<any>> | null;
|
|
29
25
|
export default Item;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React, { type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
7
|
export interface RowProps<Item> {
|
|
9
8
|
/**
|
|
@@ -81,5 +80,5 @@ export interface RowProps<Item> {
|
|
|
81
80
|
}
|
|
82
81
|
declare function Row<Item extends {
|
|
83
82
|
id: string;
|
|
84
|
-
}>({ shouldExpandOnClick, hasChildren, depth, renderChildren, isDefaultExpanded, data, onExpand: providedOnExpand, onCollapse: providedOnCollapse, mainColumnForExpandCollapseLabel, expandLabel, collapseLabel, itemId, children, isExpanded: isProvidedExpanded, }: RowProps<Item>):
|
|
83
|
+
}>({ shouldExpandOnClick, hasChildren, depth, renderChildren, isDefaultExpanded, data, onExpand: providedOnExpand, onCollapse: providedOnCollapse, mainColumnForExpandCollapseLabel, expandLabel, collapseLabel, itemId, children, isExpanded: isProvidedExpanded, }: RowProps<Item>): JSX.Element;
|
|
85
84
|
export default Row;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/table-tree",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.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/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
33
33
|
"@atlaskit/spinner": "^18.0.0",
|
|
34
34
|
"@atlaskit/theme": "^18.0.0",
|
|
35
|
-
"@atlaskit/tokens": "^4.
|
|
35
|
+
"@atlaskit/tokens": "^4.6.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@emotion/react": "^11.7.1",
|
|
38
38
|
"lodash": "^4.17.21"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/empty-state": "^9.0.0",
|
|
49
49
|
"@atlaskit/form": "^12.0.0",
|
|
50
50
|
"@atlaskit/link": "^3.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^14.
|
|
51
|
+
"@atlaskit/primitives": "^14.3.0",
|
|
52
52
|
"@atlaskit/section-message": "^8.2.0",
|
|
53
53
|
"@atlaskit/select": "^20.0.0",
|
|
54
54
|
"@atlaskit/ssr": "^0.4.0",
|