@atlaskit/table-tree 9.1.7 → 9.1.10

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/components/header.js +3 -3
  3. package/dist/cjs/components/headers.js +3 -3
  4. package/dist/cjs/components/internal/common-cell.js +3 -3
  5. package/dist/cjs/components/internal/item.js +3 -3
  6. package/dist/cjs/components/internal/overflow-container.js +3 -3
  7. package/dist/cjs/components/internal/styled.js +10 -10
  8. package/dist/cjs/components/row.js +1 -1
  9. package/dist/cjs/version.json +1 -1
  10. package/dist/es2019/components/header.js +1 -1
  11. package/dist/es2019/components/headers.js +1 -1
  12. package/dist/es2019/components/internal/common-cell.js +1 -1
  13. package/dist/es2019/components/internal/item.js +1 -1
  14. package/dist/es2019/components/internal/overflow-container.js +1 -1
  15. package/dist/es2019/components/internal/styled.js +1 -1
  16. package/dist/es2019/components/row.js +1 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/esm/components/header.js +1 -1
  19. package/dist/esm/components/headers.js +1 -1
  20. package/dist/esm/components/internal/common-cell.js +1 -1
  21. package/dist/esm/components/internal/item.js +1 -1
  22. package/dist/esm/components/internal/overflow-container.js +1 -1
  23. package/dist/esm/components/internal/styled.js +1 -1
  24. package/dist/esm/components/row.js +1 -1
  25. package/dist/esm/version.json +1 -1
  26. package/dist/types/components/cell.d.ts +13 -1
  27. package/dist/types/components/header.d.ts +1 -1
  28. package/dist/types/components/headers.d.ts +2 -1
  29. package/dist/types/components/internal/item.d.ts +2 -1
  30. package/dist/types/components/internal/with-column-width.d.ts +1 -1
  31. package/dist/types/components/row.d.ts +1 -1
  32. package/dist/types/components/table-tree.d.ts +1 -1
  33. package/extract-react-types/table-tree-cell.tsx +7 -0
  34. package/extract-react-types/table-tree-header.tsx +20 -0
  35. package/extract-react-types/table-tree-row.tsx +85 -0
  36. package/extract-react-types/table-tree-rows.tsx +34 -0
  37. package/extract-react-types/table-tree.tsx +6 -5
  38. package/package.json +10 -8
  39. package/report.api.md +369 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/table-tree
2
2
 
3
+ ## 9.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`70c2c0e00ea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/70c2c0e00ea) - Updates `@emotion/core` v10 to `@emotion/react` v11. No expected behaviour change.
8
+
9
+ ## 9.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [`efa50ac72ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efa50ac72ba) - Adjusts jsdoc strings to improve prop documentation
14
+
15
+ ## 9.1.8
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 9.1.7
4
22
 
5
23
  ### Patch Changes
@@ -21,7 +21,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
21
21
 
22
22
  var _react = require("react");
23
23
 
24
- var _core = require("@emotion/core");
24
+ var _react2 = require("@emotion/react");
25
25
 
26
26
  var _colors = require("@atlaskit/theme/colors");
27
27
 
@@ -33,7 +33,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
33
33
 
34
34
  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; } }
35
35
 
36
- var headerStyles = (0, _core.css)({
36
+ var headerStyles = (0, _react2.css)({
37
37
  color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
38
38
  fontSize: 12,
39
39
  fontWeight: 'bold',
@@ -55,7 +55,7 @@ var Header = /*#__PURE__*/function (_Component) {
55
55
  key: "render",
56
56
  value: function render() {
57
57
  var props = this.props;
58
- return (0, _core.jsx)(_commonCell.default, (0, _extends2.default)({
58
+ return (0, _react2.jsx)(_commonCell.default, (0, _extends2.default)({
59
59
  css: headerStyles,
60
60
  role: "columnheader",
61
61
  style: {
@@ -19,13 +19,13 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
19
19
 
20
20
  var _react = require("react");
21
21
 
22
- var _core = require("@emotion/core");
22
+ var _react2 = require("@emotion/react");
23
23
 
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
25
 
26
26
  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; } }
27
27
 
28
- var containerStyles = (0, _core.css)({
28
+ var containerStyles = (0, _react2.css)({
29
29
  display: 'flex',
30
30
  borderBottom: "solid 2px ".concat("var(--ds-border, #dfe1e6)")
31
31
  });
@@ -43,7 +43,7 @@ var Headers = /*#__PURE__*/function (_Component) {
43
43
  (0, _createClass2.default)(Headers, [{
44
44
  key: "render",
45
45
  value: function render() {
46
- return (0, _core.jsx)("div", {
46
+ return (0, _react2.jsx)("div", {
47
47
  css: containerStyles,
48
48
  role: "row"
49
49
  }, _react.Children.map(this.props.children, function (header, index) {
@@ -11,12 +11,12 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
 
12
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react = require("@emotion/react");
15
15
 
16
16
  var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _excluded = ["indent", "width"];
19
- var commonStyles = (0, _core.css)({
19
+ var commonStyles = (0, _react.css)({
20
20
  display: 'flex',
21
21
  boxSizing: 'border-box',
22
22
  minHeight: 40,
@@ -34,7 +34,7 @@ var CommonCell = function CommonCell(_ref) {
34
34
  var indent = _ref.indent,
35
35
  width = _ref.width,
36
36
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
37
- return (0, _core.jsx)("div", (0, _extends2.default)({}, props, {
37
+ return (0, _react.jsx)("div", (0, _extends2.default)({}, props, {
38
38
  style: {
39
39
  '--indent': indent,
40
40
  width: width
@@ -21,7 +21,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
21
21
 
22
22
  var _react = require("react");
23
23
 
24
- var _core = require("@emotion/core");
24
+ var _react2 = require("@emotion/react");
25
25
 
26
26
  var _toItemId = _interopRequireDefault(require("../../utils/to-item-id"));
27
27
 
@@ -62,9 +62,9 @@ var Item = /*#__PURE__*/function (_Component) {
62
62
  depth: depth,
63
63
  data: data,
64
64
  renderChildren: function renderChildren() {
65
- return (0, _core.jsx)("div", {
65
+ return (0, _react2.jsx)("div", {
66
66
  id: (0, _toItemId.default)(itemId)
67
- }, (0, _core.jsx)(_items.default, {
67
+ }, (0, _react2.jsx)(_items.default, {
68
68
  parentData: data,
69
69
  depth: depth,
70
70
  items: items,
@@ -11,10 +11,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
 
12
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react = require("@emotion/react");
15
15
 
16
16
  var _excluded = ["isSingleLine"];
17
- var overflowContainerStyles = (0, _core.css)({
17
+ var overflowContainerStyles = (0, _react.css)({
18
18
  overflow: 'hidden',
19
19
  textOverflow: 'ellipsis',
20
20
  whiteSpace: 'nowrap'
@@ -27,7 +27,7 @@ var OverflowContainer = function OverflowContainer(_ref) {
27
27
  var isSingleLine = _ref.isSingleLine,
28
28
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
29
29
  return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
30
- (0, _core.jsx)("span", (0, _extends2.default)({
30
+ (0, _react.jsx)("span", (0, _extends2.default)({
31
31
  css: isSingleLine && overflowContainerStyles
32
32
  }, props))
33
33
  );
@@ -11,14 +11,14 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react = require("@emotion/react");
15
15
 
16
16
  var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _excluded = ["isRoot"];
19
19
  var iconColor = "var(--ds-text, ".concat(_colors.N800, ")");
20
20
  exports.iconColor = iconColor;
21
- var treeRowContainerStyles = (0, _core.css)({
21
+ var treeRowContainerStyles = (0, _react.css)({
22
22
  display: 'flex',
23
23
  borderBottom: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
24
24
  });
@@ -28,14 +28,14 @@ var treeRowContainerStyles = (0, _core.css)({
28
28
 
29
29
  var TreeRowContainer = function TreeRowContainer(props) {
30
30
  return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
31
- (0, _core.jsx)("div", (0, _extends2.default)({
31
+ (0, _react.jsx)("div", (0, _extends2.default)({
32
32
  css: treeRowContainerStyles
33
33
  }, props))
34
34
  );
35
35
  };
36
36
 
37
37
  exports.TreeRowContainer = TreeRowContainer;
38
- var commonChevronContainerStyles = (0, _core.css)({
38
+ var commonChevronContainerStyles = (0, _react.css)({
39
39
  display: 'flex',
40
40
  marginLeft: -25,
41
41
  position: 'absolute',
@@ -48,13 +48,13 @@ var commonChevronContainerStyles = (0, _core.css)({
48
48
 
49
49
  var ChevronContainer = function ChevronContainer(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
50
50
  ) {
51
- return (0, _core.jsx)("span", (0, _extends2.default)({}, props, {
51
+ return (0, _react.jsx)("span", (0, _extends2.default)({}, props, {
52
52
  css: commonChevronContainerStyles
53
53
  }));
54
54
  };
55
55
 
56
56
  exports.ChevronContainer = ChevronContainer;
57
- var chevronIconContainerStyles = (0, _core.css)({
57
+ var chevronIconContainerStyles = (0, _react.css)({
58
58
  position: 'relative',
59
59
  top: 1
60
60
  });
@@ -66,17 +66,17 @@ var chevronIconContainerStyles = (0, _core.css)({
66
66
 
67
67
  var ChevronIconContainer = function ChevronIconContainer(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
68
68
  ) {
69
- return (0, _core.jsx)("span", (0, _extends2.default)({}, props, {
69
+ return (0, _react.jsx)("span", (0, _extends2.default)({}, props, {
70
70
  css: chevronIconContainerStyles
71
71
  }));
72
72
  };
73
73
 
74
74
  exports.ChevronIconContainer = ChevronIconContainer;
75
- var loadingItemContainerStyles = (0, _core.css)({
75
+ var loadingItemContainerStyles = (0, _react.css)({
76
76
  width: '100%',
77
77
  paddingTop: 5
78
78
  });
79
- var paddingLeftStyles = (0, _core.css)({
79
+ var paddingLeftStyles = (0, _react.css)({
80
80
  paddingLeft: '50%'
81
81
  });
82
82
  /**
@@ -88,7 +88,7 @@ var paddingLeftStyles = (0, _core.css)({
88
88
  var LoaderItemContainer = function LoaderItemContainer(_ref) {
89
89
  var isRoot = _ref.isRoot,
90
90
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
91
- return (0, _core.jsx)("span", (0, _extends2.default)({
91
+ return (0, _react.jsx)("span", (0, _extends2.default)({
92
92
  css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles] // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
93
93
 
94
94
  }, props));
@@ -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.7";
47
+ var packageVersion = "9.1.10";
48
48
 
49
49
  var Row = /*#__PURE__*/function (_Component) {
50
50
  (0, _inherits2.default)(Row, _Component);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.1.7",
3
+ "version": "9.1.10",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { Component } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { N300 } from '@atlaskit/theme/colors';
7
7
  import ColumnCell from './internal/common-cell';
8
8
  import withColumnWidth from './internal/with-column-width';
@@ -2,7 +2,7 @@
2
2
 
3
3
  /* eslint-disable @repo/internal/react/no-clone-element */
4
4
  import { Children, cloneElement, Component } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  const containerStyles = css({
7
7
  display: 'flex',
8
8
  borderBottom: `solid 2px ${"var(--ds-border, #dfe1e6)"}`
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import { N800 } from '@atlaskit/theme/colors';
6
6
  const commonStyles = css({
7
7
  display: 'flex',
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
 
5
5
  /* eslint-disable @repo/internal/react/no-clone-element */
6
6
  import { cloneElement, Component } from 'react';
7
- import { jsx } from '@emotion/core';
7
+ import { jsx } from '@emotion/react';
8
8
  import toItemId from '../../utils/to-item-id';
9
9
  import Items from './items';
10
10
  export default class Item extends Component {
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  const overflowContainerStyles = css({
6
6
  overflow: 'hidden',
7
7
  textOverflow: 'ellipsis',
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import { N30, N800 } from '@atlaskit/theme/colors';
6
6
  export const iconColor = `var(--ds-text, ${N800})`;
7
7
  const treeRowContainerStyles = css({
@@ -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.7";
11
+ const packageVersion = "9.1.10";
12
12
 
13
13
  class Row extends Component {
14
14
  constructor(...args) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.1.7",
3
+ "version": "9.1.10",
4
4
  "sideEffects": false
5
5
  }
@@ -11,7 +11,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
11
11
 
12
12
  /** @jsx jsx */
13
13
  import { Component } from 'react';
14
- import { css, jsx } from '@emotion/core';
14
+ import { css, jsx } from '@emotion/react';
15
15
  import { N300 } from '@atlaskit/theme/colors';
16
16
  import ColumnCell from './internal/common-cell';
17
17
  import withColumnWidth from './internal/with-column-width';
@@ -12,7 +12,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
 
13
13
  /* eslint-disable @repo/internal/react/no-clone-element */
14
14
  import { Children, cloneElement, Component } from 'react';
15
- import { css, jsx } from '@emotion/core';
15
+ import { css, jsx } from '@emotion/react';
16
16
  var containerStyles = css({
17
17
  display: 'flex',
18
18
  borderBottom: "solid 2px ".concat("var(--ds-border, #dfe1e6)")
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["indent", "width"];
4
4
 
5
5
  /** @jsx jsx */
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { N800 } from '@atlaskit/theme/colors';
8
8
  var commonStyles = css({
9
9
  display: 'flex',
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
 
14
14
  /* eslint-disable @repo/internal/react/no-clone-element */
15
15
  import { cloneElement, Component } from 'react';
16
- import { jsx } from '@emotion/core';
16
+ import { jsx } from '@emotion/react';
17
17
  import toItemId from '../../utils/to-item-id';
18
18
  import Items from './items';
19
19
 
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["isSingleLine"];
4
4
 
5
5
  /** @jsx jsx */
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  var overflowContainerStyles = css({
8
8
  overflow: 'hidden',
9
9
  textOverflow: 'ellipsis',
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  var _excluded = ["isRoot"];
4
4
 
5
5
  /** @jsx jsx */
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { N30, N800 } from '@atlaskit/theme/colors';
8
8
  export var iconColor = "var(--ds-text, ".concat(N800, ")");
9
9
  var treeRowContainerStyles = css({
@@ -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.7";
21
+ var packageVersion = "9.1.10";
22
22
 
23
23
  var Row = /*#__PURE__*/function (_Component) {
24
24
  _inherits(Row, _Component);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.1.7",
3
+ "version": "9.1.10",
4
4
  "sideEffects": false
5
5
  }
@@ -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<any>;
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<any>;
56
+ tableTree: import("prop-types").Validator<object>;
57
57
  };
58
58
  contextType?: import("react").Context<any> | undefined;
59
59
  };
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  export default class Headers extends Component<any> {
4
- render(): JSX.Element;
5
+ render(): jsx.JSX.Element;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  export default class Item extends Component<any> {
4
5
  static defaultProps: {
5
6
  depth: number;
@@ -7,6 +8,6 @@ export default class Item extends Component<any> {
7
8
  render(): import("react").FunctionComponentElement<{
8
9
  depth: any;
9
10
  data: any;
10
- renderChildren: () => JSX.Element;
11
+ renderChildren: () => jsx.JSX.Element;
11
12
  }> | null;
12
13
  }
@@ -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<any>;
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<Pick<any, string | number | symbol>, string | number | symbol> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, string | number | symbol> & React.RefAttributes<any>>;
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;
@@ -5,7 +5,7 @@ interface State {
5
5
  }
6
6
  export default class TableTree extends Component<any, State> {
7
7
  static childContextTypes: {
8
- tableTree: PropTypes.Validator<any>;
8
+ tableTree: PropTypes.Validator<object>;
9
9
  };
10
10
  state: State;
11
11
  componentDidMount(): void;
@@ -0,0 +1,7 @@
1
+ import { CellProps } from '../src/components/cell';
2
+
3
+ const TableRows = function (props: CellProps) {
4
+ return null;
5
+ };
6
+
7
+ export default TableRows;
@@ -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
- * The data used to render the table.
42
- * The type of `content` can be whatever you would like, and its value will be
43
- * provided as props when rendering each cell.
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,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.1.7",
3
+ "version": "9.1.10",
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/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -19,7 +19,8 @@
19
19
  "team": "Design System Team",
20
20
  "releaseModel": "scheduled",
21
21
  "website": {
22
- "name": "Table tree"
22
+ "name": "Table tree",
23
+ "category": "Components"
23
24
  }
24
25
  },
25
26
  "af:exports": {
@@ -27,13 +28,13 @@
27
28
  },
28
29
  "dependencies": {
29
30
  "@atlaskit/analytics-next": "^8.2.0",
30
- "@atlaskit/button": "^16.2.0",
31
+ "@atlaskit/button": "^16.3.0",
31
32
  "@atlaskit/icon": "^21.10.0",
32
33
  "@atlaskit/spinner": "^15.0.0",
33
34
  "@atlaskit/theme": "^12.1.0",
34
- "@atlaskit/tokens": "^0.9.0",
35
+ "@atlaskit/tokens": "^0.10.0",
35
36
  "@babel/runtime": "^7.0.0",
36
- "@emotion/core": "^10.0.9",
37
+ "@emotion/react": "^11.7.1",
37
38
  "lodash": "^4.17.21",
38
39
  "prop-types": "^15.5.10"
39
40
  },
@@ -44,11 +45,11 @@
44
45
  "@atlaskit/docs": "*",
45
46
  "@atlaskit/empty-state": "^7.3.0",
46
47
  "@atlaskit/section-message": "^6.0.0",
47
- "@atlaskit/select": "^15.0.0",
48
+ "@atlaskit/select": "^15.6.0",
48
49
  "@atlaskit/ssr": "*",
49
50
  "@atlaskit/visual-regression": "*",
50
51
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
51
- "@emotion/styled": "^10.0.7",
52
+ "@emotion/styled": "^11.0.0",
52
53
  "enzyme": "^3.10.0",
53
54
  "exenv": "^1.2.2",
54
55
  "react-dom": "^16.8.0",
@@ -68,6 +69,7 @@
68
69
  "circular-dependencies": "file-and-folder-level"
69
70
  },
70
71
  "@repo/internal": {
72
+ "dom-events": "use-bind-event-listener",
71
73
  "design-system": "v1",
72
74
  "styling": [
73
75
  "static",
package/report.api.md ADDED
@@ -0,0 +1,369 @@
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
+ /// <reference types="react" />
7
+
8
+ import { Component } from 'react';
9
+ import { Context } from 'react';
10
+ import { ErrorInfo } from 'react';
11
+ import PropTypes from 'prop-types';
12
+ import { default as React_2 } from 'react';
13
+ import { ReactInstance } from 'react';
14
+ import { ReactNode } from 'react';
15
+ import { Validator } from 'prop-types';
16
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
17
+ import { WithContextProps } from '@atlaskit/analytics-next';
18
+
19
+ export declare const Cell: {
20
+ new (props: Readonly<CellProps & CellWithColumnWidthProps>): {
21
+ UNSAFE_componentWillMount(): void;
22
+ setColumnWidth(width?: string | number | undefined): void;
23
+ UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
24
+ render(): JSX.Element;
25
+ context: any;
26
+ setState<K extends never>(
27
+ state:
28
+ | {}
29
+ | ((
30
+ prevState: Readonly<{}>,
31
+ props: Readonly<CellProps & CellWithColumnWidthProps>,
32
+ ) => {} | Pick<{}, K> | null)
33
+ | Pick<{}, K>
34
+ | null,
35
+ callback?: (() => void) | undefined,
36
+ ): void;
37
+ forceUpdate(callBack?: (() => void) | undefined): void;
38
+ readonly props: Readonly<CellProps & CellWithColumnWidthProps> &
39
+ Readonly<{
40
+ children?: React_2.ReactNode;
41
+ }>;
42
+ state: Readonly<{}>;
43
+ refs: {
44
+ [key: string]: React_2.ReactInstance;
45
+ };
46
+ componentDidMount?(): void;
47
+ shouldComponentUpdate?(
48
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
49
+ nextState: Readonly<{}>,
50
+ nextContext: any,
51
+ ): boolean;
52
+ componentWillUnmount?(): void;
53
+ componentDidCatch?(error: Error, errorInfo: React_2.ErrorInfo): void;
54
+ getSnapshotBeforeUpdate?(
55
+ prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
56
+ prevState: Readonly<{}>,
57
+ ): any;
58
+ componentDidUpdate?(
59
+ prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
60
+ prevState: Readonly<{}>,
61
+ snapshot?: any,
62
+ ): void;
63
+ componentWillMount?(): void;
64
+ componentWillReceiveProps?(
65
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
66
+ nextContext: any,
67
+ ): void;
68
+ componentWillUpdate?(
69
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
70
+ nextState: Readonly<{}>,
71
+ nextContext: any,
72
+ ): void;
73
+ UNSAFE_componentWillUpdate?(
74
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
75
+ nextState: Readonly<{}>,
76
+ nextContext: any,
77
+ ): void;
78
+ };
79
+ new (props: CellProps & CellWithColumnWidthProps, context?: any): {
80
+ UNSAFE_componentWillMount(): void;
81
+ setColumnWidth(width?: string | number | undefined): void;
82
+ UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
83
+ render(): JSX.Element;
84
+ context: any;
85
+ setState<K extends never>(
86
+ state:
87
+ | {}
88
+ | ((
89
+ prevState: Readonly<{}>,
90
+ props: Readonly<CellProps & CellWithColumnWidthProps>,
91
+ ) => {} | Pick<{}, K> | null)
92
+ | Pick<{}, K>
93
+ | null,
94
+ callback?: (() => void) | undefined,
95
+ ): void;
96
+ forceUpdate(callBack?: (() => void) | undefined): void;
97
+ readonly props: Readonly<CellProps & CellWithColumnWidthProps> &
98
+ Readonly<{
99
+ children?: React_2.ReactNode;
100
+ }>;
101
+ state: Readonly<{}>;
102
+ refs: {
103
+ [key: string]: React_2.ReactInstance;
104
+ };
105
+ componentDidMount?(): void;
106
+ shouldComponentUpdate?(
107
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
108
+ nextState: Readonly<{}>,
109
+ nextContext: any,
110
+ ): boolean;
111
+ componentWillUnmount?(): void;
112
+ componentDidCatch?(error: Error, errorInfo: React_2.ErrorInfo): void;
113
+ getSnapshotBeforeUpdate?(
114
+ prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
115
+ prevState: Readonly<{}>,
116
+ ): any;
117
+ componentDidUpdate?(
118
+ prevProps: Readonly<CellProps & CellWithColumnWidthProps>,
119
+ prevState: Readonly<{}>,
120
+ snapshot?: any,
121
+ ): void;
122
+ componentWillMount?(): void;
123
+ componentWillReceiveProps?(
124
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
125
+ nextContext: any,
126
+ ): void;
127
+ componentWillUpdate?(
128
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
129
+ nextState: Readonly<{}>,
130
+ nextContext: any,
131
+ ): void;
132
+ UNSAFE_componentWillUpdate?(
133
+ nextProps: Readonly<CellProps & CellWithColumnWidthProps>,
134
+ nextState: Readonly<{}>,
135
+ nextContext: any,
136
+ ): void;
137
+ };
138
+ contextTypes: {
139
+ tableTree: Validator<object>;
140
+ };
141
+ contextType?: React_2.Context<any> | undefined;
142
+ };
143
+
144
+ export declare interface CellProps {
145
+ /**
146
+ * Whether the cell contents should wrap or display on a single line and be concatenated.
147
+ */
148
+ singleLine?: boolean;
149
+ /**
150
+ * Indent level for the cell. Each indent level adds 25px to the left padding.
151
+ */
152
+ indentLevel?: number;
153
+ /**
154
+ * Width of the header item. Takes a string or a number representing the width in pixels.
155
+ */
156
+ width?: number | string;
157
+ /**
158
+ * Class name to apply to cell.
159
+ */
160
+ className?: string;
161
+ }
162
+
163
+ export declare interface CellWithColumnWidthProps {
164
+ width?: number | string;
165
+ columnIndex?: number;
166
+ }
167
+
168
+ export declare const Header: {
169
+ new (props: Readonly<any>): {
170
+ UNSAFE_componentWillMount(): void;
171
+ setColumnWidth(width?: string | number | undefined): void;
172
+ UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
173
+ render(): JSX.Element;
174
+ context: any;
175
+ setState<K extends never>(
176
+ state:
177
+ | {}
178
+ | ((
179
+ prevState: Readonly<{}>,
180
+ props: Readonly<any>,
181
+ ) => {} | Pick<{}, K> | null)
182
+ | Pick<{}, K>
183
+ | null,
184
+ callback?: (() => void) | undefined,
185
+ ): void;
186
+ forceUpdate(callBack?: (() => void) | undefined): void;
187
+ readonly props: Readonly<any> &
188
+ Readonly<{
189
+ children?: ReactNode;
190
+ }>;
191
+ state: Readonly<{}>;
192
+ refs: {
193
+ [key: string]: ReactInstance;
194
+ };
195
+ componentDidMount?(): void;
196
+ shouldComponentUpdate?(
197
+ nextProps: Readonly<any>,
198
+ nextState: Readonly<{}>,
199
+ nextContext: any,
200
+ ): boolean;
201
+ componentWillUnmount?(): void;
202
+ componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
203
+ getSnapshotBeforeUpdate?(
204
+ prevProps: Readonly<any>,
205
+ prevState: Readonly<{}>,
206
+ ): any;
207
+ componentDidUpdate?(
208
+ prevProps: Readonly<any>,
209
+ prevState: Readonly<{}>,
210
+ snapshot?: any,
211
+ ): void;
212
+ componentWillMount?(): void;
213
+ componentWillReceiveProps?(
214
+ nextProps: Readonly<any>,
215
+ nextContext: any,
216
+ ): void;
217
+ componentWillUpdate?(
218
+ nextProps: Readonly<any>,
219
+ nextState: Readonly<{}>,
220
+ nextContext: any,
221
+ ): void;
222
+ UNSAFE_componentWillUpdate?(
223
+ nextProps: Readonly<any>,
224
+ nextState: Readonly<{}>,
225
+ nextContext: any,
226
+ ): void;
227
+ };
228
+ new (props: any, context?: any): {
229
+ UNSAFE_componentWillMount(): void;
230
+ setColumnWidth(width?: string | number | undefined): void;
231
+ UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
232
+ render(): JSX.Element;
233
+ context: any;
234
+ setState<K extends never>(
235
+ state:
236
+ | {}
237
+ | ((
238
+ prevState: Readonly<{}>,
239
+ props: Readonly<any>,
240
+ ) => {} | Pick<{}, K> | null)
241
+ | Pick<{}, K>
242
+ | null,
243
+ callback?: (() => void) | undefined,
244
+ ): void;
245
+ forceUpdate(callBack?: (() => void) | undefined): void;
246
+ readonly props: Readonly<any> &
247
+ Readonly<{
248
+ children?: ReactNode;
249
+ }>;
250
+ state: Readonly<{}>;
251
+ refs: {
252
+ [key: string]: ReactInstance;
253
+ };
254
+ componentDidMount?(): void;
255
+ shouldComponentUpdate?(
256
+ nextProps: Readonly<any>,
257
+ nextState: Readonly<{}>,
258
+ nextContext: any,
259
+ ): boolean;
260
+ componentWillUnmount?(): void;
261
+ componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
262
+ getSnapshotBeforeUpdate?(
263
+ prevProps: Readonly<any>,
264
+ prevState: Readonly<{}>,
265
+ ): any;
266
+ componentDidUpdate?(
267
+ prevProps: Readonly<any>,
268
+ prevState: Readonly<{}>,
269
+ snapshot?: any,
270
+ ): void;
271
+ componentWillMount?(): void;
272
+ componentWillReceiveProps?(
273
+ nextProps: Readonly<any>,
274
+ nextContext: any,
275
+ ): void;
276
+ componentWillUpdate?(
277
+ nextProps: Readonly<any>,
278
+ nextState: Readonly<{}>,
279
+ nextContext: any,
280
+ ): void;
281
+ UNSAFE_componentWillUpdate?(
282
+ nextProps: Readonly<any>,
283
+ nextState: Readonly<{}>,
284
+ nextContext: any,
285
+ ): void;
286
+ };
287
+ contextTypes: {
288
+ tableTree: Validator<object>;
289
+ };
290
+ contextType?: Context<any> | undefined;
291
+ };
292
+
293
+ declare class Headers_2 extends Component<any> {
294
+ render(): JSX.Element;
295
+ }
296
+ export { Headers_2 as Headers };
297
+
298
+ export declare const Row: React_2.ForwardRefExoticComponent<
299
+ Pick<
300
+ Pick<Omit<any, keyof WithAnalyticsEventsProps>, string | number | symbol> &
301
+ React_2.RefAttributes<any> &
302
+ WithContextProps,
303
+ string | number | symbol
304
+ > &
305
+ React_2.RefAttributes<any>
306
+ >;
307
+
308
+ export declare class Rows<T> extends Component<RowsProps<T>> {
309
+ render(): JSX.Element;
310
+ }
311
+
312
+ export declare interface RowsProps<T> {
313
+ items?: WithChildren<T>[];
314
+ render: (args: WithChildren<T>) => React_2.ReactNode;
315
+ }
316
+
317
+ declare interface State {
318
+ columnWidths: number[];
319
+ }
320
+
321
+ declare class TableTree extends Component<any, State> {
322
+ static childContextTypes: {
323
+ tableTree: PropTypes.Validator<object>;
324
+ };
325
+ state: State;
326
+ componentDidMount(): void;
327
+ setColumnWidth: (columnIndex: number, width: number) => void;
328
+ getColumnWidth: (columnIndex: any) => number | null;
329
+ getChildContext(): {
330
+ tableTree: {
331
+ columnWidths: number[];
332
+ setColumnWidth: (columnIndex: number, width: number) => void;
333
+ getColumnWidth: (columnIndex: any) => number | null;
334
+ };
335
+ };
336
+ render(): JSX.Element;
337
+ }
338
+ export default TableTree;
339
+
340
+ /**
341
+ * This helper class will create a cache of all the id's in the items object and
342
+ * path to the object.
343
+ * Example:
344
+ * [{
345
+ * // item 1,
346
+ * id: 1,
347
+ * children:[{
348
+ * // item 1.1,
349
+ * id: '2'
350
+ * }]
351
+ * }]
352
+ *
353
+ * Cache will look something like:
354
+ * {1: 0, 2: '0.children[0]'}
355
+ */
356
+ export declare class TableTreeDataHelper<T extends any = any> {
357
+ key: keyof T;
358
+ keysCache: any;
359
+ constructor({ key }?: { key?: keyof T | undefined });
360
+ updateItems(items: T[], allItems?: T[], parentItem?: T | null): T[];
361
+ appendItems(items: T[], allItems?: T[], parentItem?: T | null): T[];
362
+ }
363
+
364
+ declare type WithChildren<T> = T & {
365
+ children?: T[] | null;
366
+ };
367
+
368
+ export {};
369
+ ```