@atlaskit/dynamic-table 14.14.0 → 14.16.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 +12 -0
- package/dist/cjs/components/body.js +1 -1
- package/dist/cjs/components/error-boundary.js +1 -1
- package/dist/cjs/components/loading-container-advanced.js +1 -1
- package/dist/cjs/components/loading-container.js +1 -1
- package/dist/cjs/components/managed-pagination.js +1 -1
- package/dist/cjs/components/rankable/body.js +2 -2
- package/dist/cjs/components/rankable/table-cell.js +4 -3
- package/dist/cjs/components/rankable/table-head-cell.js +1 -1
- package/dist/cjs/components/rankable/table-row.js +4 -3
- package/dist/cjs/components/stateful.js +1 -1
- package/dist/cjs/components/stateless.js +4 -4
- package/dist/cjs/components/table-head.js +1 -1
- package/dist/cjs/components/table-row.js +4 -3
- package/dist/cjs/hoc/with-dimensions.js +1 -1
- package/dist/cjs/hoc/with-sorted-page-rows.js +1 -1
- package/dist/cjs/theme.js +2 -2
- package/dist/es2019/components/rankable/body.js +1 -1
- package/dist/es2019/components/rankable/table-cell.js +2 -1
- package/dist/es2019/components/rankable/table-row.js +2 -1
- package/dist/es2019/components/stateless.js +1 -1
- package/dist/es2019/components/table-row.js +3 -2
- package/dist/esm/components/body.js +1 -1
- package/dist/esm/components/error-boundary.js +1 -1
- package/dist/esm/components/loading-container-advanced.js +1 -1
- package/dist/esm/components/loading-container.js +1 -1
- package/dist/esm/components/managed-pagination.js +1 -1
- package/dist/esm/components/rankable/body.js +2 -2
- package/dist/esm/components/rankable/table-cell.js +4 -3
- package/dist/esm/components/rankable/table-head-cell.js +1 -1
- package/dist/esm/components/rankable/table-row.js +4 -3
- package/dist/esm/components/stateful.js +1 -1
- package/dist/esm/components/stateless.js +2 -2
- package/dist/esm/components/table-head.js +1 -1
- package/dist/esm/components/table-row.js +4 -3
- package/dist/esm/hoc/with-dimensions.js +1 -1
- package/dist/esm/hoc/with-sorted-page-rows.js +1 -1
- package/dist/types/components/loading-container-advanced.d.ts +1 -0
- package/dist/types/types.d.ts +43 -45
- package/dist/types-ts4.5/components/loading-container-advanced.d.ts +1 -0
- package/dist/types-ts4.5/types.d.ts +43 -45
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/dynamic-table
|
|
2
2
|
|
|
3
|
+
## 14.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#81825](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81825) [`6d27545ac997`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6d27545ac997) - Dynamic table now also respects test IDs when passed in at the row level.
|
|
8
|
+
|
|
9
|
+
## 14.15.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#81321](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81321) [`2579643f7ac8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2579643f7ac8) - Dynamic table now respects test IDs when passed in at the cell level. Note that there are no prefixes applied to this test ID. It is assumed that if you are providing a test ID at the cell level, you are wanting to target a single cell in an isolated context. If you're looking to gain insight to a particular cell in the context of its surrounding elements, it might be preferrable to supply a test ID to the root of the table and use the generated test IDs for querying instead.
|
|
14
|
+
|
|
3
15
|
## 14.14.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _withSortedPageRows = _interopRequireDefault(require("../hoc/with-sorted-page-rows"));
|
|
16
16
|
var _tableRow = _interopRequireDefault(require("./table-row"));
|
|
17
17
|
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); }; }
|
|
18
|
-
function _isNativeReflectConstruct() {
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
19
|
var Body = /*#__PURE__*/function (_React$Component) {
|
|
20
20
|
(0, _inherits2.default)(Body, _React$Component);
|
|
21
21
|
var _super = _createSuper(Body);
|
|
@@ -12,7 +12,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
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); }; }
|
|
15
|
-
function _isNativeReflectConstruct() {
|
|
15
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
16
|
var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
17
17
|
(0, _inherits2.default)(ErrorBoundary, _React$Component);
|
|
18
18
|
var _super = _createSuper(ErrorBoundary);
|
|
@@ -18,7 +18,7 @@ var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
|
18
18
|
var _constants = require("../internal/constants");
|
|
19
19
|
var _loadingContainerAdvanced = require("../styled/loading-container-advanced");
|
|
20
20
|
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); }; }
|
|
21
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
22
22
|
var LoadingContainerAdvanced = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
23
23
|
(0, _inherits2.default)(LoadingContainerAdvanced, _React$Component);
|
|
24
24
|
var _super = _createSuper(LoadingContainerAdvanced);
|
|
@@ -16,7 +16,7 @@ var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
|
16
16
|
var _constants = require("../internal/constants");
|
|
17
17
|
var _loadingContainer = require("../styled/loading-container");
|
|
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
|
-
function _isNativeReflectConstruct() {
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
20
|
var LoadingContainer = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
21
21
|
(0, _inherits2.default)(LoadingContainer, _React$Component);
|
|
22
22
|
var _super = _createSuper(LoadingContainer);
|
|
@@ -16,7 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _pagination = _interopRequireDefault(require("@atlaskit/pagination"));
|
|
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
|
-
function _isNativeReflectConstruct() {
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
20
|
var ManagedPagination = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
21
21
|
(0, _inherits2.default)(ManagedPagination, _React$Component);
|
|
22
22
|
var _super = _createSuper(ManagedPagination);
|
|
@@ -18,7 +18,7 @@ var _reactBeautifulDnd = require("react-beautiful-dnd");
|
|
|
18
18
|
var _withSortedPageRows = _interopRequireDefault(require("../../hoc/with-sorted-page-rows"));
|
|
19
19
|
var _tableRow = _interopRequireDefault(require("./table-row"));
|
|
20
20
|
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); }; }
|
|
21
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // Allowing existing usage of non Pragmatic drag and drop solution
|
|
22
22
|
// eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
|
|
23
23
|
// computes destination of ranking
|
|
24
24
|
// - if drag was cancelled returns undefined
|
|
@@ -114,7 +114,7 @@ var RankableBody = exports.RankableBody = /*#__PURE__*/function (_React$Componen
|
|
|
114
114
|
row: row,
|
|
115
115
|
isRankingDisabled: isRankingDisabled,
|
|
116
116
|
isHighlighted: !!highlightedRowIndex && (typeof highlightedRowIndex === 'number' ? highlightedRowIndex === rowIndex : highlightedRowIndex.indexOf(rowIndex) > -1),
|
|
117
|
-
testId: "".concat(testId, "--rankable--table--row")
|
|
117
|
+
testId: testId && "".concat(testId, "--rankable--table--row")
|
|
118
118
|
});
|
|
119
119
|
}), provided.placeholder);
|
|
120
120
|
}));
|
|
@@ -16,9 +16,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
16
16
|
var _withDimensions = _interopRequireDefault(require("../../hoc/with-dimensions"));
|
|
17
17
|
var _helpers = require("../../internal/helpers");
|
|
18
18
|
var _tableCell = require("../../styled/rankable/table-cell");
|
|
19
|
-
var _excluded = ["content"];
|
|
19
|
+
var _excluded = ["content", "testId"];
|
|
20
20
|
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); }; }
|
|
21
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
22
|
var RankableTableCell = exports.RankableTableCell = /*#__PURE__*/function (_React$Component) {
|
|
23
23
|
(0, _inherits2.default)(RankableTableCell, _React$Component);
|
|
24
24
|
var _super = _createSuper(RankableTableCell);
|
|
@@ -38,6 +38,7 @@ var RankableTableCell = exports.RankableTableCell = /*#__PURE__*/function (_Reac
|
|
|
38
38
|
innerRef = _this$props.innerRef,
|
|
39
39
|
testId = _this$props.testId;
|
|
40
40
|
var content = cell.content,
|
|
41
|
+
cellTestId = cell.testId,
|
|
41
42
|
restCellProps = (0, _objectWithoutProperties2.default)(cell, _excluded);
|
|
42
43
|
var _ref = head || {},
|
|
43
44
|
shouldTruncate = _ref.shouldTruncate,
|
|
@@ -53,7 +54,7 @@ var RankableTableCell = exports.RankableTableCell = /*#__PURE__*/function (_Reac
|
|
|
53
54
|
return e.stopPropagation();
|
|
54
55
|
},
|
|
55
56
|
innerRef: innerRef,
|
|
56
|
-
"data-testid": testId && "".concat(testId, "--rankable--table--body--cell")
|
|
57
|
+
"data-testid": cellTestId || testId && "".concat(testId, "--rankable--table--body--cell")
|
|
57
58
|
}), content);
|
|
58
59
|
}
|
|
59
60
|
}]);
|
|
@@ -18,7 +18,7 @@ var _helpers = require("../../internal/helpers");
|
|
|
18
18
|
var _tableHeadCell = _interopRequireDefault(require("../table-head-cell"));
|
|
19
19
|
var _excluded = ["isRanking", "refHeight", "refWidth"];
|
|
20
20
|
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); }; }
|
|
21
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
22
|
var RankableTableHeadCell = /*#__PURE__*/function (_React$Component) {
|
|
23
23
|
(0, _inherits2.default)(RankableTableHeadCell, _React$Component);
|
|
24
24
|
var _super = _createSuper(RankableTableHeadCell);
|
|
@@ -20,11 +20,11 @@ var _withDimensions = _interopRequireDefault(require("../../hoc/with-dimensions"
|
|
|
20
20
|
var _helpers = require("../../internal/helpers");
|
|
21
21
|
var _tableRow = require("../../styled/rankable/table-row");
|
|
22
22
|
var _tableCell = _interopRequireDefault(require("./table-cell"));
|
|
23
|
-
var _excluded = ["cells", "key", "isHighlighted"];
|
|
23
|
+
var _excluded = ["cells", "testId", "key", "isHighlighted"];
|
|
24
24
|
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; }
|
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
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); }; }
|
|
27
|
-
function _isNativeReflectConstruct() {
|
|
27
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // Allowing existing usage of non Pragmatic drag and drop solution
|
|
28
28
|
// eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
|
|
29
29
|
var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$Component) {
|
|
30
30
|
(0, _inherits2.default)(RankableTableRow, _React$Component);
|
|
@@ -61,6 +61,7 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
|
|
|
61
61
|
isHighlighted = _this$props.isHighlighted,
|
|
62
62
|
testId = _this$props.testId;
|
|
63
63
|
var cells = row.cells,
|
|
64
|
+
rowTestId = row.testId,
|
|
64
65
|
key = row.key,
|
|
65
66
|
isRowHighlighted = row.isHighlighted,
|
|
66
67
|
restRowProps = (0, _objectWithoutProperties2.default)(row, _excluded);
|
|
@@ -83,7 +84,7 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
|
|
|
83
84
|
isHighlighted: isHighlighted || isRowHighlighted,
|
|
84
85
|
isRanking: isRanking,
|
|
85
86
|
isRankingItem: snapshot.isDragging,
|
|
86
|
-
testId: testId && "".concat(testId, "--rankable--table--body--row")
|
|
87
|
+
testId: rowTestId || testId && "".concat(testId, "--rankable--table--body--row")
|
|
87
88
|
}), cells.map(function (cell, cellIndex) {
|
|
88
89
|
var headCell = (head || {
|
|
89
90
|
cells: []
|
|
@@ -17,7 +17,7 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
17
17
|
var _helpers = require("../internal/helpers");
|
|
18
18
|
var _stateless = _interopRequireDefault(require("./stateless"));
|
|
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
|
-
function _isNativeReflectConstruct() {
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
21
|
/**
|
|
22
22
|
* __Dynamic Table__
|
|
23
23
|
*
|
|
@@ -30,12 +30,12 @@ var _loadingContainerAdvanced = _interopRequireDefault(require("./loading-contai
|
|
|
30
30
|
var _managedPagination = _interopRequireDefault(require("./managed-pagination"));
|
|
31
31
|
var _tableHead = _interopRequireDefault(require("./table-head"));
|
|
32
32
|
var _excluded = ["isRankable", "isRanking", "onRankStart", "onRankEnd", "isRankingDisabled"];
|
|
33
|
-
function _getRequireWildcardCache(
|
|
34
|
-
function _interopRequireWildcard(
|
|
33
|
+
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); }
|
|
34
|
+
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; }
|
|
35
35
|
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); }; }
|
|
36
|
-
function _isNativeReflectConstruct() {
|
|
36
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
37
37
|
var packageName = "@atlaskit/dynamic-table";
|
|
38
|
-
var packageVersion = "14.
|
|
38
|
+
var packageVersion = "14.16.0";
|
|
39
39
|
function toggleSortOrder(currentSortOrder) {
|
|
40
40
|
switch (currentSortOrder) {
|
|
41
41
|
case _constants.DESC:
|
|
@@ -20,7 +20,7 @@ var _tableHeadCell2 = _interopRequireDefault(require("./table-head-cell"));
|
|
|
20
20
|
var _excluded = ["cells"],
|
|
21
21
|
_excluded2 = ["colSpan", "content", "isSortable", "key", "shouldTruncate", "testId", "width"];
|
|
22
22
|
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); }; }
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
23
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
24
|
var TableHead = /*#__PURE__*/function (_React$Component) {
|
|
25
25
|
(0, _inherits2.default)(TableHead, _React$Component);
|
|
26
26
|
var _super = _createSuper(TableHead);
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _tableCell = require("../styled/table-cell");
|
|
12
12
|
var _tableRow = require("../styled/table-row");
|
|
13
13
|
var _excluded = ["cells"],
|
|
14
|
-
_excluded2 = ["content"];
|
|
14
|
+
_excluded2 = ["content", "testId"];
|
|
15
15
|
var Row = function Row(_ref) {
|
|
16
16
|
var row = _ref.row,
|
|
17
17
|
head = _ref.head,
|
|
@@ -25,9 +25,10 @@ var Row = function Row(_ref) {
|
|
|
25
25
|
}, isHighlighted ? {
|
|
26
26
|
'data-ts--dynamic-table--table-row--highlighted': true
|
|
27
27
|
} : null, {
|
|
28
|
-
testId: testId && "".concat(testId, "--row-").concat(restRowProps.key)
|
|
28
|
+
testId: row.testId || testId && "".concat(testId, "--row-").concat(restRowProps.key)
|
|
29
29
|
}), cells.map(function (cell, cellIndex) {
|
|
30
30
|
var content = cell.content,
|
|
31
|
+
cellTestId = cell.testId,
|
|
31
32
|
restCellProps = (0, _objectWithoutProperties2.default)(cell, _excluded2);
|
|
32
33
|
var _ref2 = (head || {
|
|
33
34
|
cells: []
|
|
@@ -35,7 +36,7 @@ var Row = function Row(_ref) {
|
|
|
35
36
|
shouldTruncate = _ref2.shouldTruncate,
|
|
36
37
|
width = _ref2.width;
|
|
37
38
|
return /*#__PURE__*/_react.default.createElement(_tableCell.TableBodyCell, (0, _extends2.default)({
|
|
38
|
-
"data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex)
|
|
39
|
+
"data-testid": cellTestId || testId && "".concat(testId, "--cell-").concat(cellIndex)
|
|
39
40
|
}, restCellProps, {
|
|
40
41
|
isFixedSize: isFixedSize,
|
|
41
42
|
key: cellIndex // eslint-disable-line react/no-array-index-key
|
|
@@ -15,7 +15,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
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); }; }
|
|
18
|
-
function _isNativeReflectConstruct() {
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
19
|
// Compute height and width of wrapped component before ranking
|
|
20
20
|
function withDimensions(WrappedComponent) {
|
|
21
21
|
return /*#__PURE__*/function (_React$Component) {
|
|
@@ -22,7 +22,7 @@ var _excluded = ["rows", "head", "sortKey", "sortOrder", "rowsPerPage", "page",
|
|
|
22
22
|
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; }
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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
|
-
function _isNativeReflectConstruct() {
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
26
|
var getSortingCellValue = function getSortingCellValue(cells, head, sortKey) {
|
|
27
27
|
for (var i = 0; i < cells.length; i++) {
|
|
28
28
|
var _head$cells$i;
|
package/dist/cjs/theme.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.tableBorder = exports.row = exports.head = exports.arrow = exports.MSThemeColors = void 0;
|
|
8
8
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
9
|
-
function _getRequireWildcardCache(
|
|
10
|
-
function _interopRequireWildcard(
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
11
|
var MSThemeColors = exports.MSThemeColors = {
|
|
12
12
|
Background: 'Canvas',
|
|
13
13
|
Text: 'CanvasText',
|
|
@@ -105,7 +105,7 @@ export class RankableBody extends React.Component {
|
|
|
105
105
|
row: row,
|
|
106
106
|
isRankingDisabled: isRankingDisabled,
|
|
107
107
|
isHighlighted: !!highlightedRowIndex && (typeof highlightedRowIndex === 'number' ? highlightedRowIndex === rowIndex : highlightedRowIndex.indexOf(rowIndex) > -1),
|
|
108
|
-
testId: `${testId}--rankable--table--row`
|
|
108
|
+
testId: testId && `${testId}--rankable--table--row`
|
|
109
109
|
})), provided.placeholder)));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -16,6 +16,7 @@ export class RankableTableCell extends React.Component {
|
|
|
16
16
|
} = this.props;
|
|
17
17
|
const {
|
|
18
18
|
content,
|
|
19
|
+
testId: cellTestId,
|
|
19
20
|
...restCellProps
|
|
20
21
|
} = cell;
|
|
21
22
|
const {
|
|
@@ -31,7 +32,7 @@ export class RankableTableCell extends React.Component {
|
|
|
31
32
|
style: inlineStyles,
|
|
32
33
|
onKeyDown: e => e.stopPropagation(),
|
|
33
34
|
innerRef: innerRef,
|
|
34
|
-
"data-testid": testId && `${testId}--rankable--table--body--cell`
|
|
35
|
+
"data-testid": cellTestId || testId && `${testId}--rankable--table--body--cell`
|
|
35
36
|
}), content);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -33,6 +33,7 @@ export class RankableTableRow extends React.Component {
|
|
|
33
33
|
} = this.props;
|
|
34
34
|
const {
|
|
35
35
|
cells,
|
|
36
|
+
testId: rowTestId,
|
|
36
37
|
key,
|
|
37
38
|
isHighlighted: isRowHighlighted,
|
|
38
39
|
// TODO: Remove `rest` props and use only what is explicitly in the API.
|
|
@@ -60,7 +61,7 @@ export class RankableTableRow extends React.Component {
|
|
|
60
61
|
isHighlighted: isHighlighted || isRowHighlighted,
|
|
61
62
|
isRanking: isRanking,
|
|
62
63
|
isRankingItem: snapshot.isDragging,
|
|
63
|
-
testId: testId && `${testId}--rankable--table--body--row`
|
|
64
|
+
testId: rowTestId || testId && `${testId}--rankable--table--body--row`
|
|
64
65
|
}), cells.map((cell, cellIndex) => {
|
|
65
66
|
const headCell = (head || {
|
|
66
67
|
cells: []
|
|
@@ -14,7 +14,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
|
|
|
14
14
|
import ManagedPagination from './managed-pagination';
|
|
15
15
|
import TableHead from './table-head';
|
|
16
16
|
const packageName = "@atlaskit/dynamic-table";
|
|
17
|
-
const packageVersion = "14.
|
|
17
|
+
const packageVersion = "14.16.0";
|
|
18
18
|
function toggleSortOrder(currentSortOrder) {
|
|
19
19
|
switch (currentSortOrder) {
|
|
20
20
|
case DESC:
|
|
@@ -18,10 +18,11 @@ const Row = ({
|
|
|
18
18
|
}, isHighlighted ? {
|
|
19
19
|
'data-ts--dynamic-table--table-row--highlighted': true
|
|
20
20
|
} : null, {
|
|
21
|
-
testId: testId && `${testId}--row-${restRowProps.key}`
|
|
21
|
+
testId: row.testId || testId && `${testId}--row-${restRowProps.key}`
|
|
22
22
|
}), cells.map((cell, cellIndex) => {
|
|
23
23
|
const {
|
|
24
24
|
content,
|
|
25
|
+
testId: cellTestId,
|
|
25
26
|
...restCellProps
|
|
26
27
|
} = cell;
|
|
27
28
|
const {
|
|
@@ -31,7 +32,7 @@ const Row = ({
|
|
|
31
32
|
cells: []
|
|
32
33
|
}).cells[cellIndex] || {};
|
|
33
34
|
return /*#__PURE__*/React.createElement(TableBodyCell, _extends({
|
|
34
|
-
"data-testid": testId && `${testId}--cell-${cellIndex}`
|
|
35
|
+
"data-testid": cellTestId || testId && `${testId}--cell-${cellIndex}`
|
|
35
36
|
}, restCellProps, {
|
|
36
37
|
isFixedSize: isFixedSize,
|
|
37
38
|
key: cellIndex // eslint-disable-line react/no-array-index-key
|
|
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
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); }; }
|
|
8
|
-
function _isNativeReflectConstruct() {
|
|
8
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import withSortedPageRows from '../hoc/with-sorted-page-rows';
|
|
11
11
|
import TableRow from './table-row';
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
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); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
10
10
|
_inherits(ErrorBoundary, _React$Component);
|
|
@@ -7,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
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); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -5,7 +5,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
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); }; }
|
|
8
|
-
function _isNativeReflectConstruct() {
|
|
8
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
11
|
import { LARGE, LOADING_CONTENTS_OPACITY } from '../internal/constants';
|
|
@@ -7,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
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); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import Pagination from '@atlaskit/pagination';
|
|
13
13
|
var ManagedPagination = /*#__PURE__*/function (_React$Component) {
|
|
@@ -7,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
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); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
|
|
13
13
|
// Allowing existing usage of non Pragmatic drag and drop solution
|
|
@@ -109,7 +109,7 @@ export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
|
109
109
|
row: row,
|
|
110
110
|
isRankingDisabled: isRankingDisabled,
|
|
111
111
|
isHighlighted: !!highlightedRowIndex && (typeof highlightedRowIndex === 'number' ? highlightedRowIndex === rowIndex : highlightedRowIndex.indexOf(rowIndex) > -1),
|
|
112
|
-
testId: "".concat(testId, "--rankable--table--row")
|
|
112
|
+
testId: testId && "".concat(testId, "--rankable--table--row")
|
|
113
113
|
});
|
|
114
114
|
}), provided.placeholder);
|
|
115
115
|
}));
|
|
@@ -5,9 +5,9 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
var _excluded = ["content"];
|
|
8
|
+
var _excluded = ["content", "testId"];
|
|
9
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); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import withDimensions from '../../hoc/with-dimensions';
|
|
13
13
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
@@ -31,6 +31,7 @@ export var RankableTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
31
31
|
innerRef = _this$props.innerRef,
|
|
32
32
|
testId = _this$props.testId;
|
|
33
33
|
var content = cell.content,
|
|
34
|
+
cellTestId = cell.testId,
|
|
34
35
|
restCellProps = _objectWithoutProperties(cell, _excluded);
|
|
35
36
|
var _ref = head || {},
|
|
36
37
|
shouldTruncate = _ref.shouldTruncate,
|
|
@@ -46,7 +47,7 @@ export var RankableTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
46
47
|
return e.stopPropagation();
|
|
47
48
|
},
|
|
48
49
|
innerRef: innerRef,
|
|
49
|
-
"data-testid": testId && "".concat(testId, "--rankable--table--body--cell")
|
|
50
|
+
"data-testid": cellTestId || testId && "".concat(testId, "--rankable--table--body--cell")
|
|
50
51
|
}), content);
|
|
51
52
|
}
|
|
52
53
|
}]);
|
|
@@ -7,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
var _excluded = ["isRanking", "refHeight", "refWidth"];
|
|
9
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); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import withDimensions from '../../hoc/with-dimensions';
|
|
13
13
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
@@ -7,11 +7,11 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["cells", "key", "isHighlighted"];
|
|
10
|
+
var _excluded = ["cells", "testId", "key", "isHighlighted"];
|
|
11
11
|
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; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
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); }; }
|
|
14
|
-
function _isNativeReflectConstruct() {
|
|
14
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
import React from 'react';
|
|
16
16
|
|
|
17
17
|
// Allowing existing usage of non Pragmatic drag and drop solution
|
|
@@ -56,6 +56,7 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
56
56
|
isHighlighted = _this$props.isHighlighted,
|
|
57
57
|
testId = _this$props.testId;
|
|
58
58
|
var cells = row.cells,
|
|
59
|
+
rowTestId = row.testId,
|
|
59
60
|
key = row.key,
|
|
60
61
|
isRowHighlighted = row.isHighlighted,
|
|
61
62
|
restRowProps = _objectWithoutProperties(row, _excluded);
|
|
@@ -78,7 +79,7 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
78
79
|
isHighlighted: isHighlighted || isRowHighlighted,
|
|
79
80
|
isRanking: isRanking,
|
|
80
81
|
isRankingItem: snapshot.isDragging,
|
|
81
|
-
testId: testId && "".concat(testId, "--rankable--table--body--row")
|
|
82
|
+
testId: rowTestId || testId && "".concat(testId, "--rankable--table--body--row")
|
|
82
83
|
}), cells.map(function (cell, cellIndex) {
|
|
83
84
|
var headCell = (head || {
|
|
84
85
|
cells: []
|
|
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
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
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
12
12
|
import { reorderRows } from '../internal/helpers';
|
|
@@ -10,7 +10,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
11
|
var _excluded = ["isRankable", "isRanking", "onRankStart", "onRankEnd", "isRankingDisabled"];
|
|
12
12
|
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); }; }
|
|
13
|
-
function _isNativeReflectConstruct() {
|
|
13
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
import React, { forwardRef, lazy, Suspense, useEffect, useState } from 'react';
|
|
15
15
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
16
16
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -25,7 +25,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
|
|
|
25
25
|
import ManagedPagination from './managed-pagination';
|
|
26
26
|
import TableHead from './table-head';
|
|
27
27
|
var packageName = "@atlaskit/dynamic-table";
|
|
28
|
-
var packageVersion = "14.
|
|
28
|
+
var packageVersion = "14.16.0";
|
|
29
29
|
function toggleSortOrder(currentSortOrder) {
|
|
30
30
|
switch (currentSortOrder) {
|
|
31
31
|
case DESC:
|
|
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
var _excluded = ["cells"],
|
|
9
9
|
_excluded2 = ["colSpan", "content", "isSortable", "key", "shouldTruncate", "testId", "width"];
|
|
10
10
|
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); }; }
|
|
11
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { validateSortKey } from '../internal/helpers';
|
|
14
14
|
import { Head } from '../styled/table-head';
|