@atlaskit/table-tree 9.10.5 → 9.11.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 +7 -0
- package/dist/cjs/components/header.js +11 -1
- package/dist/cjs/components/headers.js +2 -1
- package/dist/cjs/components/internal/common-cell.js +1 -1
- package/dist/cjs/components/internal/item.js +2 -1
- package/dist/cjs/components/internal/overflow-container.js +1 -1
- package/dist/cjs/components/internal/styled.js +1 -1
- package/dist/cjs/components/row.js +12 -2
- package/dist/cjs/components/table-tree.js +23 -5
- package/dist/es2019/components/header.js +11 -1
- package/dist/es2019/components/headers.js +1 -1
- package/dist/es2019/components/internal/common-cell.js +1 -1
- package/dist/es2019/components/internal/item.js +1 -1
- package/dist/es2019/components/internal/overflow-container.js +1 -1
- package/dist/es2019/components/internal/styled.js +1 -1
- package/dist/es2019/components/row.js +12 -2
- package/dist/es2019/components/table-tree.js +11 -0
- package/dist/esm/components/header.js +10 -1
- package/dist/esm/components/headers.js +1 -1
- package/dist/esm/components/internal/common-cell.js +1 -1
- package/dist/esm/components/internal/item.js +1 -1
- package/dist/esm/components/internal/overflow-container.js +1 -1
- package/dist/esm/components/internal/styled.js +1 -1
- package/dist/esm/components/row.js +11 -2
- package/dist/esm/components/table-tree.js +23 -5
- package/dist/types/components/header.d.ts +14 -0
- package/dist/types/components/headers.d.ts +1 -1
- package/dist/types/components/internal/common-cell.d.ts +1 -1
- package/dist/types/components/internal/item.d.ts +1 -1
- package/dist/types/components/internal/overflow-container.d.ts +1 -1
- package/dist/types/components/internal/styled.d.ts +1 -1
- package/dist/types/components/row.d.ts +85 -2
- package/dist/types/components/rows.d.ts +14 -0
- package/dist/types/components/table-tree.d.ts +64 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types-ts4.5/components/header.d.ts +14 -0
- package/dist/types-ts4.5/components/headers.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/common-cell.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/item.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/overflow-container.d.ts +1 -1
- package/dist/types-ts4.5/components/internal/styled.d.ts +1 -1
- package/dist/types-ts4.5/components/row.d.ts +85 -2
- package/dist/types-ts4.5/components/rows.d.ts +14 -0
- package/dist/types-ts4.5/components/table-tree.d.ts +64 -1
- package/dist/types-ts4.5/index.d.ts +4 -1
- package/package.json +3 -3
- package/extract-react-types/table-tree-cell.tsx +0 -7
- package/extract-react-types/table-tree-header.tsx +0 -20
- package/extract-react-types/table-tree-row.tsx +0 -99
- package/extract-react-types/table-tree-rows.tsx +0 -40
- package/extract-react-types/table-tree.tsx +0 -76
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/table-tree
|
|
2
2
|
|
|
3
|
+
## 9.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`cdd8a85db4ed4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cdd8a85db4ed4) -
|
|
8
|
+
Export proper types for all table tree elements. Remove all remnants of extract react types.
|
|
9
|
+
|
|
3
10
|
## 9.10.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -19,12 +19,22 @@ var _withColumnWidth = _interopRequireDefault(require("./internal/with-column-wi
|
|
|
19
19
|
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); }; }
|
|
20
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
21
21
|
* @jsxRuntime classic
|
|
22
|
-
|
|
22
|
+
* @jsx jsx
|
|
23
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
24
|
var headerStyles = (0, _react2.css)({
|
|
24
25
|
color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
|
|
25
26
|
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
26
27
|
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
27
28
|
});
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This is hard-coded here because our actual <Header /> has no typings
|
|
32
|
+
* for its props.
|
|
33
|
+
*
|
|
34
|
+
* Adding types for real *might* break things so will need a little care.
|
|
35
|
+
*
|
|
36
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
37
|
+
*/
|
|
28
38
|
var HeaderComponent = /*#__PURE__*/function (_Component) {
|
|
29
39
|
(0, _inherits2.default)(HeaderComponent, _Component);
|
|
30
40
|
var _super = _createSuper(HeaderComponent);
|
|
@@ -15,7 +15,8 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
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); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
17
17
|
* @jsxRuntime classic
|
|
18
|
-
|
|
18
|
+
* @jsx jsx
|
|
19
|
+
*/ /* eslint-disable @repo/internal/react/no-clone-element */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
20
|
var containerStyles = (0, _react2.css)({
|
|
20
21
|
display: 'flex',
|
|
21
22
|
borderBlockEnd: "solid 2px ".concat("var(--ds-border, #dfe1e6)")
|
|
@@ -13,8 +13,8 @@ var _styled = require("./styled");
|
|
|
13
13
|
var _excluded = ["indent", "width"];
|
|
14
14
|
/**
|
|
15
15
|
* @jsxRuntime classic
|
|
16
|
+
* @jsx jsx
|
|
16
17
|
*/
|
|
17
|
-
/** @jsx jsx */
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
19
|
var commonStyles = (0, _react.css)({
|
|
20
20
|
display: 'flex',
|
|
@@ -18,7 +18,8 @@ var _items = _interopRequireDefault(require("./items"));
|
|
|
18
18
|
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); }; }
|
|
19
19
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
20
20
|
* @jsxRuntime classic
|
|
21
|
-
|
|
21
|
+
* @jsx jsx
|
|
22
|
+
*/ /* eslint-disable @repo/internal/react/no-clone-element */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
23
|
var Item = exports.default = /*#__PURE__*/function (_Component) {
|
|
23
24
|
(0, _inherits2.default)(Item, _Component);
|
|
24
25
|
var _super = _createSuper(Item);
|
|
@@ -11,8 +11,8 @@ var _react = require("@emotion/react");
|
|
|
11
11
|
var _excluded = ["isSingleLine"];
|
|
12
12
|
/**
|
|
13
13
|
* @jsxRuntime classic
|
|
14
|
+
* @jsx jsx
|
|
14
15
|
*/
|
|
15
|
-
/** @jsx jsx */
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
17
|
var overflowContainerStyles = (0, _react.css)({
|
|
18
18
|
overflow: 'hidden',
|
|
@@ -12,8 +12,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
12
12
|
var _excluded = ["isRoot"];
|
|
13
13
|
/**
|
|
14
14
|
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
15
16
|
*/
|
|
16
|
-
/** @jsx jsx */
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
18
|
var indentBase = exports.indentBase = "var(--ds-space-300, 25px)";
|
|
19
19
|
var treeRowContainerStyles = (0, _react.css)({
|
|
@@ -25,12 +25,22 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
25
25
|
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); }; }
|
|
26
26
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
27
27
|
* @jsxRuntime classic
|
|
28
|
-
|
|
28
|
+
* @jsx jsx
|
|
29
|
+
*/ /* eslint-disable @repo/internal/react/no-clone-element */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
29
30
|
var treeRowClickableStyles = (0, _react2.css)({
|
|
30
31
|
cursor: 'pointer'
|
|
31
32
|
});
|
|
32
33
|
var packageName = "@atlaskit/table-tree";
|
|
33
|
-
var packageVersion = "9.
|
|
34
|
+
var packageVersion = "9.11.0";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
38
|
+
* for its props.
|
|
39
|
+
*
|
|
40
|
+
* Adding types for real *might* break things so will need a little care.
|
|
41
|
+
*
|
|
42
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
43
|
+
*/
|
|
34
44
|
var RowComponent = exports.RowWithoutAnalytics = /*#__PURE__*/function (_Component) {
|
|
35
45
|
(0, _inherits2.default)(RowComponent, _Component);
|
|
36
46
|
var _super = _createSuper(RowComponent);
|
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
9
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
-
var
|
|
16
|
+
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
16
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
18
|
var _cell = _interopRequireDefault(require("./cell"));
|
|
18
19
|
var _header = _interopRequireDefault(require("./header"));
|
|
@@ -24,16 +25,33 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
24
25
|
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 && Object.prototype.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; }
|
|
25
26
|
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); }; }
|
|
26
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable react/prop-types */
|
|
28
|
+
var Content = /*#__PURE__*/function (_Object) {
|
|
29
|
+
(0, _inherits2.default)(Content, _Object);
|
|
30
|
+
var _super = _createSuper(Content);
|
|
31
|
+
function Content() {
|
|
32
|
+
(0, _classCallCheck2.default)(this, Content);
|
|
33
|
+
return _super.apply(this, arguments);
|
|
34
|
+
}
|
|
35
|
+
return (0, _createClass2.default)(Content);
|
|
36
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Object));
|
|
37
|
+
/**
|
|
38
|
+
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
39
|
+
* for its props.
|
|
40
|
+
*
|
|
41
|
+
* Adding types for real *might* break things so will need a little care.
|
|
42
|
+
*
|
|
43
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
44
|
+
*/
|
|
27
45
|
var TableTree = exports.default = /*#__PURE__*/function (_Component) {
|
|
28
46
|
(0, _inherits2.default)(TableTree, _Component);
|
|
29
|
-
var
|
|
47
|
+
var _super2 = _createSuper(TableTree);
|
|
30
48
|
function TableTree() {
|
|
31
49
|
var _this;
|
|
32
50
|
(0, _classCallCheck2.default)(this, TableTree);
|
|
33
51
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
52
|
args[_key] = arguments[_key];
|
|
35
53
|
}
|
|
36
|
-
_this =
|
|
54
|
+
_this = _super2.call.apply(_super2, [this].concat(args));
|
|
37
55
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
38
56
|
columnWidths: []
|
|
39
57
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
import { Component } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -15,6 +15,16 @@ const headerStyles = css({
|
|
|
15
15
|
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
16
16
|
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
17
17
|
});
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This is hard-coded here because our actual <Header /> has no typings
|
|
21
|
+
* for its props.
|
|
22
|
+
*
|
|
23
|
+
* Adding types for real *might* break things so will need a little care.
|
|
24
|
+
*
|
|
25
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
26
|
+
*/
|
|
27
|
+
|
|
18
28
|
class HeaderComponent extends Component {
|
|
19
29
|
render() {
|
|
20
30
|
const {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
8
8
|
import React, { Component, Fragment } from 'react';
|
|
9
9
|
|
|
@@ -17,7 +17,17 @@ const treeRowClickableStyles = css({
|
|
|
17
17
|
cursor: 'pointer'
|
|
18
18
|
});
|
|
19
19
|
const packageName = "@atlaskit/table-tree";
|
|
20
|
-
const packageVersion = "9.
|
|
20
|
+
const packageVersion = "9.11.0";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
24
|
+
* for its props.
|
|
25
|
+
*
|
|
26
|
+
* Adding types for real *might* break things so will need a little care.
|
|
27
|
+
*
|
|
28
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
29
|
+
*/
|
|
30
|
+
|
|
21
31
|
class RowComponent extends Component {
|
|
22
32
|
constructor(...args) {
|
|
23
33
|
super(...args);
|
|
@@ -7,6 +7,17 @@ import Headers from './headers';
|
|
|
7
7
|
import { TableTreeContext } from './internal/context';
|
|
8
8
|
import Row from './row';
|
|
9
9
|
import Rows from './rows';
|
|
10
|
+
class Content extends Object {}
|
|
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
|
+
|
|
10
21
|
export default class TableTree extends Component {
|
|
11
22
|
constructor(...args) {
|
|
12
23
|
super(...args);
|
|
@@ -8,8 +8,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
/**
|
|
10
10
|
* @jsxRuntime classic
|
|
11
|
+
* @jsx jsx
|
|
11
12
|
*/
|
|
12
|
-
/** @jsx jsx */
|
|
13
13
|
import { Component } from 'react';
|
|
14
14
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -22,6 +22,15 @@ var headerStyles = css({
|
|
|
22
22
|
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
23
23
|
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
24
24
|
});
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* This is hard-coded here because our actual <Header /> has no typings
|
|
28
|
+
* for its props.
|
|
29
|
+
*
|
|
30
|
+
* Adding types for real *might* break things so will need a little care.
|
|
31
|
+
*
|
|
32
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
33
|
+
*/
|
|
25
34
|
var HeaderComponent = /*#__PURE__*/function (_Component) {
|
|
26
35
|
_inherits(HeaderComponent, _Component);
|
|
27
36
|
var _super = _createSuper(HeaderComponent);
|
|
@@ -7,8 +7,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
/**
|
|
9
9
|
* @jsxRuntime classic
|
|
10
|
+
* @jsx jsx
|
|
10
11
|
*/
|
|
11
|
-
/** @jsx jsx */
|
|
12
12
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
13
13
|
import { Children, cloneElement, Component } from 'react';
|
|
14
14
|
|
|
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["indent", "width"];
|
|
4
4
|
/**
|
|
5
5
|
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
6
7
|
*/
|
|
7
|
-
/** @jsx jsx */
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
@@ -8,8 +8,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
/**
|
|
10
10
|
* @jsxRuntime classic
|
|
11
|
+
* @jsx jsx
|
|
11
12
|
*/
|
|
12
|
-
/** @jsx jsx */
|
|
13
13
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
14
14
|
import { cloneElement, Component } from 'react';
|
|
15
15
|
|
|
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["isSingleLine"];
|
|
4
4
|
/**
|
|
5
5
|
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
6
7
|
*/
|
|
7
|
-
/** @jsx jsx */
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
@@ -3,8 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
var _excluded = ["isRoot"];
|
|
4
4
|
/**
|
|
5
5
|
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
6
7
|
*/
|
|
7
|
-
/** @jsx jsx */
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
@@ -10,8 +10,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
/**
|
|
12
12
|
* @jsxRuntime classic
|
|
13
|
+
* @jsx jsx
|
|
13
14
|
*/
|
|
14
|
-
/** @jsx jsx */
|
|
15
15
|
/* eslint-disable @repo/internal/react/no-clone-element */
|
|
16
16
|
import React, { Component, Fragment } from 'react';
|
|
17
17
|
|
|
@@ -25,7 +25,16 @@ var treeRowClickableStyles = css({
|
|
|
25
25
|
cursor: 'pointer'
|
|
26
26
|
});
|
|
27
27
|
var packageName = "@atlaskit/table-tree";
|
|
28
|
-
var packageVersion = "9.
|
|
28
|
+
var packageVersion = "9.11.0";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
32
|
+
* for its props.
|
|
33
|
+
*
|
|
34
|
+
* Adding types for real *might* break things so will need a little care.
|
|
35
|
+
*
|
|
36
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
37
|
+
*/
|
|
29
38
|
var RowComponent = /*#__PURE__*/function (_Component) {
|
|
30
39
|
_inherits(RowComponent, _Component);
|
|
31
40
|
var _super = _createSuper(RowComponent);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
1
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import
|
|
8
|
+
import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
|
|
8
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
11
|
/* eslint-disable react/prop-types */
|
|
@@ -15,16 +16,33 @@ import Headers from './headers';
|
|
|
15
16
|
import { TableTreeContext } from './internal/context';
|
|
16
17
|
import Row from './row';
|
|
17
18
|
import Rows from './rows';
|
|
19
|
+
var Content = /*#__PURE__*/function (_Object) {
|
|
20
|
+
_inherits(Content, _Object);
|
|
21
|
+
var _super = _createSuper(Content);
|
|
22
|
+
function Content() {
|
|
23
|
+
_classCallCheck(this, Content);
|
|
24
|
+
return _super.apply(this, arguments);
|
|
25
|
+
}
|
|
26
|
+
return _createClass(Content);
|
|
27
|
+
}( /*#__PURE__*/_wrapNativeSuper(Object));
|
|
28
|
+
/**
|
|
29
|
+
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
30
|
+
* for its props.
|
|
31
|
+
*
|
|
32
|
+
* Adding types for real *might* break things so will need a little care.
|
|
33
|
+
*
|
|
34
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
35
|
+
*/
|
|
18
36
|
var TableTree = /*#__PURE__*/function (_Component) {
|
|
19
37
|
_inherits(TableTree, _Component);
|
|
20
|
-
var
|
|
38
|
+
var _super2 = _createSuper(TableTree);
|
|
21
39
|
function TableTree() {
|
|
22
40
|
var _this;
|
|
23
41
|
_classCallCheck(this, TableTree);
|
|
24
42
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
43
|
args[_key] = arguments[_key];
|
|
26
44
|
}
|
|
27
|
-
_this =
|
|
45
|
+
_this = _super2.call.apply(_super2, [this].concat(args));
|
|
28
46
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
29
47
|
columnWidths: []
|
|
30
48
|
});
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* This is hard-coded here because our actual <Header /> has no typings
|
|
4
|
+
* for its props.
|
|
5
|
+
*
|
|
6
|
+
* Adding types for real *might* break things so will need a little care.
|
|
7
|
+
*
|
|
8
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
9
|
+
*/
|
|
10
|
+
export type HeaderProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Width of the header item. Takes a string, or a number representing the width in pixels.
|
|
13
|
+
*/
|
|
14
|
+
width?: string | number;
|
|
15
|
+
};
|
|
2
16
|
declare const Header: (props: any) => JSX.Element;
|
|
3
17
|
export default Header;
|
|
@@ -1,9 +1,92 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
import React, { Component } from 'react';
|
|
5
|
+
import React, { Component, type ReactNode } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import type Item from './internal/item';
|
|
8
|
+
/**
|
|
9
|
+
* This is hard-coded here because our actual <TableTree /> has no typings
|
|
10
|
+
* for its props.
|
|
11
|
+
*
|
|
12
|
+
* Adding types for real *might* break things so will need a little care.
|
|
13
|
+
*
|
|
14
|
+
* Defining it here for now lets us provide *something* without much headache.
|
|
15
|
+
*/
|
|
16
|
+
export type RowProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Whether the row has children.
|
|
19
|
+
*/
|
|
20
|
+
hasChildren?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Children contained in the row. Should be one or more cell components.
|
|
23
|
+
*/
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* ID for the row item.
|
|
27
|
+
*/
|
|
28
|
+
itemId?: string;
|
|
29
|
+
/**
|
|
30
|
+
The data used to render the row and descendants. Pass down from `children` render prop.
|
|
31
|
+
|
|
32
|
+
In addition to these props, any other data can be added to the object, and it will
|
|
33
|
+
be provided as props when rendering each cell.
|
|
34
|
+
*/
|
|
35
|
+
items?: Item[] | null;
|
|
36
|
+
/**
|
|
37
|
+
* Controls the expanded state of the row.
|
|
38
|
+
*/
|
|
39
|
+
isExpanded?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the default expanded state of the row.
|
|
42
|
+
*/
|
|
43
|
+
isDefaultExpanded?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* This is the accessible name for the expand chevron button, used to tell assistive technology what the button is for.
|
|
46
|
+
*/
|
|
47
|
+
expandLabel?: string;
|
|
48
|
+
/**
|
|
49
|
+
* This is the accessible name for the collapse chevron button, used to tell assistive technology what the button is for.
|
|
50
|
+
*/
|
|
51
|
+
collapseLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Callback called when the row collapses.
|
|
54
|
+
*/
|
|
55
|
+
onCollapse?: (data: Item) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Callback called when the row expands.
|
|
58
|
+
*/
|
|
59
|
+
onExpand?: (data: Item) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Children to render under the row.
|
|
62
|
+
* This is normally set by the parent item component, and doesn't need to be configured.
|
|
63
|
+
*/
|
|
64
|
+
renderChildren?: () => React.ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
Use this to set whether a row with children should expand when clicked anywhere within the row. If `false` or unset, a row with children will only expand when the chevron is clicked.
|
|
67
|
+
|
|
68
|
+
If your cells contain interactive elements, always set this to `false` to avoid unexpected expanding or collapsing.
|
|
69
|
+
*/
|
|
70
|
+
shouldExpandOnClick?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Data to render. Passed down by `item` and passed into `onExpand` and `onCollapse` callbacks.
|
|
73
|
+
* This is normally set by the parent `item` component, and doesn't need to be configured.
|
|
74
|
+
*/
|
|
75
|
+
data?: Item;
|
|
76
|
+
/**
|
|
77
|
+
* The depth used for rendering an indent.
|
|
78
|
+
* This is normally set by parent `item` component, and doesn't need to be configured.
|
|
79
|
+
*/
|
|
80
|
+
depth?: number;
|
|
81
|
+
/**
|
|
82
|
+
Adds detail to the expand and collapse row button's aria label by appending the value from the given column. If you don't set this prop, the aria label will read out "Expand `itemId` row".
|
|
83
|
+
|
|
84
|
+
Should be a string when we pass data via `items` property in the table tree. The value should be one of the property `columns` names in the table tree.
|
|
85
|
+
|
|
86
|
+
Should be a number when we pass data via the `Rows` component as children in the table tree.
|
|
87
|
+
*/
|
|
88
|
+
mainColumnForExpandCollapseLabel?: string | number;
|
|
89
|
+
};
|
|
7
90
|
declare class RowComponent extends Component<any, any> {
|
|
8
91
|
state: {
|
|
9
92
|
isExpanded: any;
|