@atlaskit/table-tree 9.1.2 → 9.1.5

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/table-tree
2
2
 
3
+ ## 9.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ae03dc85756`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae03dc85756) - Moved homepage to atlassian.design.
8
+
9
+ ## 9.1.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 9.1.3
16
+
17
+ ### Patch Changes
18
+
19
+ - [`58884c2f6c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58884c2f6c1) - Internal code change turning on a new linting rule.
20
+
3
21
  ## 9.1.2
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -10,4 +10,4 @@ yarn add @atlaskit/table-tree
10
10
 
11
11
  ## Usage
12
12
 
13
- Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/core/table-tree).
13
+ Detailed docs and examples can be found in the [Atlassian Design System documentation](https://atlassian.design/components/table-tree/).
@@ -26,9 +26,11 @@ var overflowContainerStyles = (0, _core.css)({
26
26
  var OverflowContainer = function OverflowContainer(_ref) {
27
27
  var isSingleLine = _ref.isSingleLine,
28
28
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
29
- return (0, _core.jsx)("span", (0, _extends2.default)({
30
- css: isSingleLine && overflowContainerStyles
31
- }, props));
29
+ return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
30
+ (0, _core.jsx)("span", (0, _extends2.default)({
31
+ css: isSingleLine && overflowContainerStyles
32
+ }, props))
33
+ );
32
34
  };
33
35
 
34
36
  var _default = OverflowContainer;
@@ -27,9 +27,11 @@ var treeRowContainerStyles = (0, _core.css)({
27
27
  */
28
28
 
29
29
  var TreeRowContainer = function TreeRowContainer(props) {
30
- return (0, _core.jsx)("div", (0, _extends2.default)({
31
- css: treeRowContainerStyles
32
- }, props));
30
+ return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
31
+ (0, _core.jsx)("div", (0, _extends2.default)({
32
+ css: treeRowContainerStyles
33
+ }, props))
34
+ );
33
35
  };
34
36
 
35
37
  exports.TreeRowContainer = TreeRowContainer;
@@ -44,7 +46,8 @@ var commonChevronContainerStyles = (0, _core.css)({
44
46
  * __Chevron container__
45
47
  */
46
48
 
47
- var ChevronContainer = function ChevronContainer(props) {
49
+ var ChevronContainer = function ChevronContainer(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
50
+ ) {
48
51
  return (0, _core.jsx)("span", (0, _extends2.default)({}, props, {
49
52
  css: commonChevronContainerStyles
50
53
  }));
@@ -61,7 +64,8 @@ var chevronIconContainerStyles = (0, _core.css)({
61
64
  * A chevron icon container.
62
65
  */
63
66
 
64
- var ChevronIconContainer = function ChevronIconContainer(props) {
67
+ var ChevronIconContainer = function ChevronIconContainer(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
68
+ ) {
65
69
  return (0, _core.jsx)("span", (0, _extends2.default)({}, props, {
66
70
  css: chevronIconContainerStyles
67
71
  }));
@@ -85,7 +89,8 @@ var LoaderItemContainer = function LoaderItemContainer(_ref) {
85
89
  var isRoot = _ref.isRoot,
86
90
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
87
91
  return (0, _core.jsx)("span", (0, _extends2.default)({
88
- css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles]
92
+ css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles] // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
93
+
89
94
  }, props));
90
95
  };
91
96
 
@@ -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.2";
47
+ var packageVersion = "9.1.5";
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.2",
3
+ "version": "9.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -1,8 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
-
5
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
6
4
  import { Component } from 'react';
7
5
  import { css, jsx } from '@emotion/core';
8
6
  import { N300 } from '@atlaskit/theme/colors';
@@ -1,7 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
4
-
5
3
  /* eslint-disable react/prop-types */
6
4
  import React, { Component } from 'react';
7
5
  import Spinner from '@atlaskit/spinner';
@@ -14,7 +14,8 @@ const overflowContainerStyles = css({
14
14
  const OverflowContainer = ({
15
15
  isSingleLine,
16
16
  ...props
17
- }) => jsx("span", _extends({
17
+ }) => // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
18
+ jsx("span", _extends({
18
19
  css: isSingleLine && overflowContainerStyles
19
20
  }, props));
20
21
 
@@ -12,7 +12,8 @@ const treeRowContainerStyles = css({
12
12
  * __Tree row container__
13
13
  */
14
14
 
15
- export const TreeRowContainer = props => jsx("div", _extends({
15
+ export const TreeRowContainer = props => // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
16
+ jsx("div", _extends({
16
17
  css: treeRowContainerStyles
17
18
  }, props));
18
19
  const commonChevronContainerStyles = css({
@@ -26,7 +27,8 @@ const commonChevronContainerStyles = css({
26
27
  * __Chevron container__
27
28
  */
28
29
 
29
- export const ChevronContainer = props => jsx("span", _extends({}, props, {
30
+ export const ChevronContainer = (props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
31
+ ) => jsx("span", _extends({}, props, {
30
32
  css: commonChevronContainerStyles
31
33
  }));
32
34
  const chevronIconContainerStyles = css({
@@ -39,7 +41,8 @@ const chevronIconContainerStyles = css({
39
41
  * A chevron icon container.
40
42
  */
41
43
 
42
- export const ChevronIconContainer = props => jsx("span", _extends({}, props, {
44
+ export const ChevronIconContainer = (props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
45
+ ) => jsx("span", _extends({}, props, {
43
46
  css: chevronIconContainerStyles
44
47
  }));
45
48
  const loadingItemContainerStyles = css({
@@ -59,5 +62,6 @@ export const LoaderItemContainer = ({
59
62
  isRoot,
60
63
  ...props
61
64
  }) => jsx("span", _extends({
62
- css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles]
65
+ css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles] // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
66
+
63
67
  }, props));
@@ -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.2";
11
+ const packageVersion = "9.1.5";
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.2",
3
+ "version": "9.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -10,8 +10,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
10
  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; } }
11
11
 
12
12
  /** @jsx jsx */
13
-
14
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
15
13
  import { Component } from 'react';
16
14
  import { css, jsx } from '@emotion/core';
17
15
  import { N300 } from '@atlaskit/theme/colors';
@@ -10,8 +10,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
10
 
11
11
  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; } }
12
12
 
13
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
14
-
15
13
  /* eslint-disable react/prop-types */
16
14
  import React, { Component } from 'react';
17
15
  import Spinner from '@atlaskit/spinner';
@@ -17,9 +17,11 @@ var OverflowContainer = function OverflowContainer(_ref) {
17
17
  var isSingleLine = _ref.isSingleLine,
18
18
  props = _objectWithoutProperties(_ref, _excluded);
19
19
 
20
- return jsx("span", _extends({
21
- css: isSingleLine && overflowContainerStyles
22
- }, props));
20
+ return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
21
+ jsx("span", _extends({
22
+ css: isSingleLine && overflowContainerStyles
23
+ }, props))
24
+ );
23
25
  };
24
26
 
25
27
  export default OverflowContainer;
@@ -15,9 +15,11 @@ var treeRowContainerStyles = css({
15
15
  */
16
16
 
17
17
  export var TreeRowContainer = function TreeRowContainer(props) {
18
- return jsx("div", _extends({
19
- css: treeRowContainerStyles
20
- }, props));
18
+ return (// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
19
+ jsx("div", _extends({
20
+ css: treeRowContainerStyles
21
+ }, props))
22
+ );
21
23
  };
22
24
  var commonChevronContainerStyles = css({
23
25
  display: 'flex',
@@ -30,7 +32,8 @@ var commonChevronContainerStyles = css({
30
32
  * __Chevron container__
31
33
  */
32
34
 
33
- export var ChevronContainer = function ChevronContainer(props) {
35
+ export var ChevronContainer = function ChevronContainer(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
36
+ ) {
34
37
  return jsx("span", _extends({}, props, {
35
38
  css: commonChevronContainerStyles
36
39
  }));
@@ -45,7 +48,8 @@ var chevronIconContainerStyles = css({
45
48
  * A chevron icon container.
46
49
  */
47
50
 
48
- export var ChevronIconContainer = function ChevronIconContainer(props) {
51
+ export var ChevronIconContainer = function ChevronIconContainer(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
52
+ ) {
49
53
  return jsx("span", _extends({}, props, {
50
54
  css: chevronIconContainerStyles
51
55
  }));
@@ -68,6 +72,7 @@ export var LoaderItemContainer = function LoaderItemContainer(_ref) {
68
72
  props = _objectWithoutProperties(_ref, _excluded);
69
73
 
70
74
  return jsx("span", _extends({
71
- css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles]
75
+ css: [commonChevronContainerStyles, loadingItemContainerStyles, isRoot && paddingLeftStyles] // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
76
+
72
77
  }, props));
73
78
  };
@@ -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.2";
21
+ var packageVersion = "9.1.5";
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.2",
3
+ "version": "9.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,51 @@
1
+ import { ElementType, ReactNode } from 'react';
2
+
3
+ class Content extends Object {}
4
+
5
+ type Item = {
6
+ id: string;
7
+ content: Content;
8
+ hasChildren: boolean;
9
+ children?: Item[];
10
+ };
11
+
12
+ /**
13
+ * This is hard-coded here because our actual <TableTree /> has no typings
14
+ * for its props.
15
+ *
16
+ * Adding types for real *might* break things so will need a little care.
17
+ *
18
+ * Defining it here for now lets us provide *something* without much headache.
19
+ */
20
+ type TableTreeProps = {
21
+ /**
22
+ * The contents of the table,
23
+ * used when composing `Cell`, `Header`, `Headers`, `Row`, and `Rows` components.
24
+ * For basic usage, you can instead specify table contents with the `items` prop.
25
+ */
26
+ children?: ReactNode;
27
+ /**
28
+ * Each column component is used to render the cells in that column.
29
+ * A cell's `content` value, specified in the data passed to `items`, is provided as props.
30
+ */
31
+ columns?: ElementType<Content>[];
32
+ /**
33
+ * The widths of the respective columns in the table.
34
+ */
35
+ columnWidths?: (string | number)[];
36
+ /**
37
+ * The header text of the respective columns of the table.
38
+ */
39
+ headers?: string[];
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.
44
+ */
45
+ // eslint-disable-next-line @repo/internal/react/consistent-props-definitions
46
+ items?: Item[] | null;
47
+ };
48
+
49
+ export default function (props: TableTreeProps) {
50
+ return null;
51
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.1.2",
4
- "description": "A React Component for displaying expandable tables with tree-like hierarchies",
3
+ "version": "9.1.5",
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
  },
@@ -14,11 +14,12 @@
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
16
  "atlaskit:src": "src/index.tsx",
17
+ "homepage": "https://atlassian.design/components/table-tree/",
17
18
  "atlassian": {
18
19
  "team": "Design System Team",
19
20
  "releaseModel": "scheduled",
20
21
  "website": {
21
- "name": "Table Tree"
22
+ "name": "Table tree"
22
23
  }
23
24
  },
24
25
  "af:exports": {
@@ -26,11 +27,11 @@
26
27
  },
27
28
  "dependencies": {
28
29
  "@atlaskit/analytics-next": "^8.2.0",
29
- "@atlaskit/button": "^16.0.0",
30
+ "@atlaskit/button": "^16.2.0",
30
31
  "@atlaskit/icon": "^21.10.0",
31
32
  "@atlaskit/spinner": "^15.0.0",
32
33
  "@atlaskit/theme": "^12.1.0",
33
- "@atlaskit/tokens": "^0.6.0",
34
+ "@atlaskit/tokens": "^0.7.0",
34
35
  "@babel/runtime": "^7.0.0",
35
36
  "@emotion/core": "^10.0.9",
36
37
  "lodash": "^4.17.21",