@atlaskit/table-tree 9.3.2 → 9.4.1

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,21 @@
1
1
  # @atlaskit/table-tree
2
2
 
3
+ ## 9.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
9
+ ## 9.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 9.3.2
4
20
 
5
21
  ### Patch Changes
@@ -28,7 +28,7 @@ var treeRowClickableStyles = (0, _react2.css)({
28
28
  cursor: 'pointer'
29
29
  });
30
30
  var packageName = "@atlaskit/table-tree";
31
- var packageVersion = "9.3.2";
31
+ var packageVersion = "9.4.1";
32
32
  var Row = /*#__PURE__*/function (_Component) {
33
33
  (0, _inherits2.default)(Row, _Component);
34
34
  var _super = _createSuper(Row);
@@ -42,6 +42,10 @@ var Row = /*#__PURE__*/function (_Component) {
42
42
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
43
43
  isExpanded: _this.props.isDefaultExpanded || false
44
44
  });
45
+ /**
46
+ * This ensures a user won't trigger a click event and expand the accordion
47
+ * when making a text selection.
48
+ */
45
49
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickHandler", function (e) {
46
50
  var _window$getSelection;
47
51
  var selection = ((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.toString()) || '';
@@ -86,11 +90,6 @@ var Row = /*#__PURE__*/function (_Component) {
86
90
  }
87
91
  }
88
92
  }
89
-
90
- /**
91
- * This ensures a user won't trigger a click event and expand the accordion
92
- * when making a text selection.
93
- */
94
93
  }, {
95
94
  key: "isExpanded",
96
95
  value: function isExpanded() {
@@ -26,7 +26,7 @@ function updateRootItems(rootItems) {
26
26
  rootItems.forEach(function (rootItem, index) {
27
27
  var rootItemKey = rootItem[key];
28
28
  if (rootItemKey === undefined) {
29
- throw new Error("[ERROR] Property '".concat(key, "' not found in rootItem[").concat(index, "]"));
29
+ throw new Error("[ERROR] Property '".concat(String(key), "' not found in rootItem[").concat(index, "]"));
30
30
  } else {
31
31
  newKeysCache[rootItem[key]] = index + startIndexWith;
32
32
  }
@@ -43,7 +43,7 @@ function updateChildItems(newitems, allTableItems, itemParent, _ref2) {
43
43
  var newKeysCache = _objectSpread({}, keysCache);
44
44
  var parentCacheKey = itemParent[key];
45
45
  if (parentCacheKey === undefined) {
46
- throw new Error("[Table Tree] Property '".concat(key, "' not found in parent item"));
46
+ throw new Error("[Table Tree] Property '".concat(String(key), "' not found in parent item"));
47
47
  }
48
48
  var parentLocation = newKeysCache[parentCacheKey];
49
49
  var allItemsCopy = (0, _toConsumableArray2.default)(allTableItems);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.3.2",
3
+ "version": "9.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -12,13 +12,17 @@ const treeRowClickableStyles = css({
12
12
  cursor: 'pointer'
13
13
  });
14
14
  const packageName = "@atlaskit/table-tree";
15
- const packageVersion = "9.3.2";
15
+ const packageVersion = "9.4.1";
16
16
  class Row extends Component {
17
17
  constructor(...args) {
18
18
  super(...args);
19
19
  _defineProperty(this, "state", {
20
20
  isExpanded: this.props.isDefaultExpanded || false
21
21
  });
22
+ /**
23
+ * This ensures a user won't trigger a click event and expand the accordion
24
+ * when making a text selection.
25
+ */
22
26
  _defineProperty(this, "onClickHandler", e => {
23
27
  var _window$getSelection;
24
28
  const selection = ((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.toString()) || '';
@@ -61,12 +65,6 @@ class Row extends Component {
61
65
  }
62
66
  }
63
67
  }
64
-
65
- /**
66
- * This ensures a user won't trigger a click event and expand the accordion
67
- * when making a text selection.
68
- */
69
-
70
68
  isExpanded() {
71
69
  const {
72
70
  isExpanded
@@ -14,7 +14,7 @@ function updateRootItems(rootItems, allItems = [], {
14
14
  rootItems.forEach((rootItem, index) => {
15
15
  const rootItemKey = rootItem[key];
16
16
  if (rootItemKey === undefined) {
17
- throw new Error(`[ERROR] Property '${key}' not found in rootItem[${index}]`);
17
+ throw new Error(`[ERROR] Property '${String(key)}' not found in rootItem[${index}]`);
18
18
  } else {
19
19
  newKeysCache[rootItem[key]] = index + startIndexWith;
20
20
  }
@@ -34,7 +34,7 @@ function updateChildItems(newitems, allTableItems, itemParent, {
34
34
  };
35
35
  const parentCacheKey = itemParent[key];
36
36
  if (parentCacheKey === undefined) {
37
- throw new Error(`[Table Tree] Property '${key}' not found in parent item`);
37
+ throw new Error(`[Table Tree] Property '${String(key)}' not found in parent item`);
38
38
  }
39
39
  const parentLocation = newKeysCache[parentCacheKey];
40
40
  const allItemsCopy = [...allTableItems];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.3.2",
3
+ "version": "9.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -20,7 +20,7 @@ var treeRowClickableStyles = css({
20
20
  cursor: 'pointer'
21
21
  });
22
22
  var packageName = "@atlaskit/table-tree";
23
- var packageVersion = "9.3.2";
23
+ var packageVersion = "9.4.1";
24
24
  var Row = /*#__PURE__*/function (_Component) {
25
25
  _inherits(Row, _Component);
26
26
  var _super = _createSuper(Row);
@@ -34,6 +34,10 @@ var Row = /*#__PURE__*/function (_Component) {
34
34
  _defineProperty(_assertThisInitialized(_this), "state", {
35
35
  isExpanded: _this.props.isDefaultExpanded || false
36
36
  });
37
+ /**
38
+ * This ensures a user won't trigger a click event and expand the accordion
39
+ * when making a text selection.
40
+ */
37
41
  _defineProperty(_assertThisInitialized(_this), "onClickHandler", function (e) {
38
42
  var _window$getSelection;
39
43
  var selection = ((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.toString()) || '';
@@ -78,11 +82,6 @@ var Row = /*#__PURE__*/function (_Component) {
78
82
  }
79
83
  }
80
84
  }
81
-
82
- /**
83
- * This ensures a user won't trigger a click event and expand the accordion
84
- * when making a text selection.
85
- */
86
85
  }, {
87
86
  key: "isExpanded",
88
87
  value: function isExpanded() {
@@ -19,7 +19,7 @@ function updateRootItems(rootItems) {
19
19
  rootItems.forEach(function (rootItem, index) {
20
20
  var rootItemKey = rootItem[key];
21
21
  if (rootItemKey === undefined) {
22
- throw new Error("[ERROR] Property '".concat(key, "' not found in rootItem[").concat(index, "]"));
22
+ throw new Error("[ERROR] Property '".concat(String(key), "' not found in rootItem[").concat(index, "]"));
23
23
  } else {
24
24
  newKeysCache[rootItem[key]] = index + startIndexWith;
25
25
  }
@@ -36,7 +36,7 @@ function updateChildItems(newitems, allTableItems, itemParent, _ref2) {
36
36
  var newKeysCache = _objectSpread({}, keysCache);
37
37
  var parentCacheKey = itemParent[key];
38
38
  if (parentCacheKey === undefined) {
39
- throw new Error("[Table Tree] Property '".concat(key, "' not found in parent item"));
39
+ throw new Error("[Table Tree] Property '".concat(String(key), "' not found in parent item"));
40
40
  }
41
41
  var parentLocation = newKeysCache[parentCacheKey];
42
42
  var allItemsCopy = _toConsumableArray(allTableItems);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.3.2",
3
+ "version": "9.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -8,7 +8,7 @@ export declare const indentBase: "var(--ds-space-300)";
8
8
  export declare const TreeRowContainer: FC<HTMLAttributes<HTMLDivElement> & {
9
9
  children: ReactNode;
10
10
  }>;
11
- declare type ChevronContainerProps = HTMLAttributes<HTMLSpanElement> & {
11
+ type ChevronContainerProps = HTMLAttributes<HTMLSpanElement> & {
12
12
  children: ReactNode;
13
13
  };
14
14
  /**
@@ -23,7 +23,7 @@ export declare const ChevronContainer: FC<ChevronContainerProps>;
23
23
  * A chevron icon container.
24
24
  */
25
25
  export declare const ChevronIconContainer: FC<ChevronContainerProps>;
26
- declare type LoaderItemContainerProps = {
26
+ type LoaderItemContainerProps = {
27
27
  isRoot?: boolean;
28
28
  children: ReactNode;
29
29
  };
@@ -7,7 +7,7 @@ export interface CellWithColumnWidthProps {
7
7
  export default function withColumnWidth<T extends object>(Cell: React.ComponentType<T>): {
8
8
  new (props: Readonly<T & CellWithColumnWidthProps>): {
9
9
  UNSAFE_componentWillMount(): void;
10
- setColumnWidth(width?: string | number | undefined): void;
10
+ setColumnWidth(width?: number | string): void;
11
11
  UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
12
12
  render(): JSX.Element;
13
13
  context: any;
@@ -33,7 +33,7 @@ export default function withColumnWidth<T extends object>(Cell: React.ComponentT
33
33
  };
34
34
  new (props: T & CellWithColumnWidthProps, context?: any): {
35
35
  UNSAFE_componentWillMount(): void;
36
- setColumnWidth(width?: string | number | undefined): void;
36
+ setColumnWidth(width?: number | string): void;
37
37
  UNSAFE_componentWillReceiveProps(nextProps: CellWithColumnWidthProps): void;
38
38
  render(): JSX.Element;
39
39
  context: any;
@@ -1,5 +1,5 @@
1
1
  import React, { Component } from 'react';
2
- declare type WithChildren<T> = T & {
2
+ type WithChildren<T> = T & {
3
3
  children?: T[] | null;
4
4
  };
5
5
  export interface RowsProps<T> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "9.3.2",
3
+ "version": "9.4.1",
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/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.tsx",
17
25
  "homepage": "https://atlassian.design/components/table-tree/",
@@ -27,12 +35,12 @@
27
35
  ".": "./src/index.tsx"
28
36
  },
29
37
  "dependencies": {
30
- "@atlaskit/analytics-next": "^9.0.0",
31
- "@atlaskit/button": "^16.6.0",
32
- "@atlaskit/icon": "^21.11.0",
33
- "@atlaskit/spinner": "^15.4.0",
34
- "@atlaskit/theme": "^12.4.0",
35
- "@atlaskit/tokens": "^1.2.0",
38
+ "@atlaskit/analytics-next": "^9.1.0",
39
+ "@atlaskit/button": "^16.7.0",
40
+ "@atlaskit/icon": "^21.12.0",
41
+ "@atlaskit/spinner": "^15.5.0",
42
+ "@atlaskit/theme": "^12.5.0",
43
+ "@atlaskit/tokens": "^1.4.0",
36
44
  "@babel/runtime": "^7.0.0",
37
45
  "@emotion/react": "^11.7.1",
38
46
  "lodash": "^4.17.21",
@@ -43,10 +51,10 @@
43
51
  },
44
52
  "devDependencies": {
45
53
  "@atlaskit/docs": "*",
46
- "@atlaskit/ds-lib": "^2.0.1",
47
- "@atlaskit/empty-state": "^7.4.0",
48
- "@atlaskit/section-message": "^6.3.0",
49
- "@atlaskit/select": "^16.1.0",
54
+ "@atlaskit/ds-lib": "^2.2.0",
55
+ "@atlaskit/empty-state": "^7.5.0",
56
+ "@atlaskit/section-message": "^6.4.0",
57
+ "@atlaskit/select": "^16.2.0",
50
58
  "@atlaskit/ssr": "*",
51
59
  "@atlaskit/visual-regression": "*",
52
60
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",