@atlaskit/table-tree 12.1.1 → 12.1.3

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
+ ## 12.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#154904](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/154904)
8
+ [`44926dab289a0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44926dab289a0) -
9
+ Fixed default expanded option preventing expanding/collapsing row
10
+
11
+ ## 12.1.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#153593](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153593)
16
+ [`b88120ead0a0e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b88120ead0a0e) -
17
+ Fix `className` prop not working with `Cell`.
18
+
3
19
  ## 12.1.1
4
20
 
5
21
  ### Patch Changes
@@ -14,7 +14,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
16
  var _colors = require("@atlaskit/theme/colors");
17
- var _excluded = ["indent", "width"];
17
+ var _excluded = ["indent", "width", "className"];
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -26,12 +26,15 @@ var commonStyles = null;
26
26
  var CommonCell = function CommonCell(_ref) {
27
27
  var indent = _ref.indent,
28
28
  width = _ref.width,
29
+ className = _ref.className,
29
30
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
30
31
  return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
31
32
  role: "gridcell"
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
34
+ ,
35
+ className: (0, _runtime.ax)(["_1yt41p08 _11c82smr _1e0c1txw _vchhusvi _1tke1ylp _kqswh2mm _4cvr1h6o _syaz1o8f _ct361wug _1nmz1hna", className])
32
36
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
33
37
  }, props, {
34
- className: (0, _runtime.ax)(["_1yt41p08 _11c82smr _1e0c1txw _vchhusvi _1tke1ylp _kqswh2mm _4cvr1h6o _syaz1o8f _ct361wug _1nmz1hna"]),
35
38
  style: _objectSpread(_objectSpread({}, {
36
39
  '--indent': indent,
37
40
  width: width
@@ -50,10 +50,10 @@ function Row(_ref) {
50
50
  isExpandedState = _useState2[0],
51
51
  setIsExpandedState = _useState2[1];
52
52
  (0, _react.useEffect)(function () {
53
- if (isProvidedExpanded === undefined && isDefaultExpanded !== undefined && isExpandedState !== isDefaultExpanded) {
53
+ if (isProvidedExpanded === undefined && isDefaultExpanded !== undefined) {
54
54
  setIsExpandedState(isDefaultExpanded);
55
55
  }
56
- }, [isDefaultExpanded, isProvidedExpanded, isExpandedState]);
56
+ }, [isDefaultExpanded, isProvidedExpanded]);
57
57
  var onExpand = (0, _analyticsNext.usePlatformLeafEventHandler)({
58
58
  fn: function fn(value) {
59
59
  return providedOnExpand && providedOnExpand(value);
@@ -62,7 +62,7 @@ function Row(_ref) {
62
62
  actionSubject: 'tableTree',
63
63
  componentName: 'row',
64
64
  packageName: "@atlaskit/table-tree",
65
- packageVersion: "12.1.1"
65
+ packageVersion: "12.1.3"
66
66
  });
67
67
  var onCollapse = (0, _analyticsNext.usePlatformLeafEventHandler)({
68
68
  fn: function fn(value) {
@@ -72,7 +72,7 @@ function Row(_ref) {
72
72
  actionSubject: 'tableTree',
73
73
  componentName: 'row',
74
74
  packageName: "@atlaskit/table-tree",
75
- packageVersion: "12.1.1"
75
+ packageVersion: "12.1.3"
76
76
  });
77
77
 
78
78
  /**
@@ -11,15 +11,18 @@ const commonStyles = null;
11
11
  const CommonCell = ({
12
12
  indent,
13
13
  width,
14
+ className,
14
15
  ...props
15
16
  }) => /*#__PURE__*/React.createElement("div", _extends({
16
17
  role: "gridcell"
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
19
+ ,
20
+ className: ax(["_1yt413wy _11c82smr _1e0c1txw _vchhusvi _1tke1ylp _kqswh2mm _4cvr1h6o _syaz1fxt _ct361wug _1nmz1hna", className])
17
21
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
18
22
  }, props, {
19
23
  style: {
20
24
  '--indent': indent,
21
25
  width
22
- },
23
- className: ax(["_1yt413wy _11c82smr _1e0c1txw _vchhusvi _1tke1ylp _kqswh2mm _4cvr1h6o _syaz1fxt _ct361wug _1nmz1hna"])
26
+ }
24
27
  }));
25
28
  export default CommonCell;
@@ -37,17 +37,17 @@ function Row({
37
37
  }) {
38
38
  const [isExpandedState, setIsExpandedState] = useState(isDefaultExpanded || false);
39
39
  useEffect(() => {
40
- if (isProvidedExpanded === undefined && isDefaultExpanded !== undefined && isExpandedState !== isDefaultExpanded) {
40
+ if (isProvidedExpanded === undefined && isDefaultExpanded !== undefined) {
41
41
  setIsExpandedState(isDefaultExpanded);
42
42
  }
43
- }, [isDefaultExpanded, isProvidedExpanded, isExpandedState]);
43
+ }, [isDefaultExpanded, isProvidedExpanded]);
44
44
  const onExpand = usePlatformLeafEventHandler({
45
45
  fn: value => providedOnExpand && providedOnExpand(value),
46
46
  action: 'expanded',
47
47
  actionSubject: 'tableTree',
48
48
  componentName: 'row',
49
49
  packageName: "@atlaskit/table-tree",
50
- packageVersion: "12.1.1"
50
+ packageVersion: "12.1.3"
51
51
  });
52
52
  const onCollapse = usePlatformLeafEventHandler({
53
53
  fn: value => providedOnCollapse && providedOnCollapse(value),
@@ -55,7 +55,7 @@ function Row({
55
55
  actionSubject: 'tableTree',
56
56
  componentName: 'row',
57
57
  packageName: "@atlaskit/table-tree",
58
- packageVersion: "12.1.1"
58
+ packageVersion: "12.1.3"
59
59
  });
60
60
 
61
61
  /**
@@ -2,7 +2,7 @@
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["indent", "width"];
5
+ var _excluded = ["indent", "width", "className"];
6
6
  import "./common-cell.compiled.css";
7
7
  import * as React from 'react';
8
8
  import { ax, ix } from "@compiled/react/runtime";
@@ -16,12 +16,15 @@ var commonStyles = null;
16
16
  var CommonCell = function CommonCell(_ref) {
17
17
  var indent = _ref.indent,
18
18
  width = _ref.width,
19
+ className = _ref.className,
19
20
  props = _objectWithoutProperties(_ref, _excluded);
20
21
  return /*#__PURE__*/React.createElement("div", _extends({
21
22
  role: "gridcell"
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
24
+ ,
25
+ className: ax(["_1yt41p08 _11c82smr _1e0c1txw _vchhusvi _1tke1ylp _kqswh2mm _4cvr1h6o _syaz1o8f _ct361wug _1nmz1hna", className])
22
26
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
23
27
  }, props, {
24
- className: ax(["_1yt41p08 _11c82smr _1e0c1txw _vchhusvi _1tke1ylp _kqswh2mm _4cvr1h6o _syaz1o8f _ct361wug _1nmz1hna"]),
25
28
  style: _objectSpread(_objectSpread({}, {
26
29
  '--indent': indent,
27
30
  width: width
@@ -40,10 +40,10 @@ function Row(_ref) {
40
40
  isExpandedState = _useState2[0],
41
41
  setIsExpandedState = _useState2[1];
42
42
  useEffect(function () {
43
- if (isProvidedExpanded === undefined && isDefaultExpanded !== undefined && isExpandedState !== isDefaultExpanded) {
43
+ if (isProvidedExpanded === undefined && isDefaultExpanded !== undefined) {
44
44
  setIsExpandedState(isDefaultExpanded);
45
45
  }
46
- }, [isDefaultExpanded, isProvidedExpanded, isExpandedState]);
46
+ }, [isDefaultExpanded, isProvidedExpanded]);
47
47
  var onExpand = usePlatformLeafEventHandler({
48
48
  fn: function fn(value) {
49
49
  return providedOnExpand && providedOnExpand(value);
@@ -52,7 +52,7 @@ function Row(_ref) {
52
52
  actionSubject: 'tableTree',
53
53
  componentName: 'row',
54
54
  packageName: "@atlaskit/table-tree",
55
- packageVersion: "12.1.1"
55
+ packageVersion: "12.1.3"
56
56
  });
57
57
  var onCollapse = usePlatformLeafEventHandler({
58
58
  fn: function fn(value) {
@@ -62,7 +62,7 @@ function Row(_ref) {
62
62
  actionSubject: 'tableTree',
63
63
  componentName: 'row',
64
64
  packageName: "@atlaskit/table-tree",
65
- packageVersion: "12.1.1"
65
+ packageVersion: "12.1.3"
66
66
  });
67
67
 
68
68
  /**
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { FC, HTMLAttributes, ReactNode } from 'react';
5
+ import type { FC, HTMLAttributes, ReactNode } from 'react';
6
6
  interface CommonCellProps {
7
7
  indent?: string;
8
8
  width?: string | number;
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { FC, HTMLAttributes, ReactNode } from 'react';
5
+ import type { FC, HTMLAttributes, ReactNode } from 'react';
6
6
  /**
7
7
  * __Tree row container__
8
8
  */
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { FC, HTMLAttributes, ReactNode } from 'react';
5
+ import type { FC, HTMLAttributes, ReactNode } from 'react';
6
6
  interface CommonCellProps {
7
7
  indent?: string;
8
8
  width?: string | number;
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { FC, HTMLAttributes, ReactNode } from 'react';
5
+ import type { FC, HTMLAttributes, ReactNode } from 'react';
6
6
  /**
7
7
  * __Tree row container__
8
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/table-tree",
3
- "version": "12.1.1",
3
+ "version": "12.1.3",
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/"
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/theme": "^18.0.0",
34
34
  "@atlaskit/tokens": "^4.8.0",
35
35
  "@babel/runtime": "^7.0.0",
36
- "@emotion/react": "^11.7.1",
36
+ "@compiled/react": "^0.18.3",
37
37
  "lodash": "^4.17.21"
38
38
  },
39
39
  "peerDependencies": {