@dfds-ui/experiences 0.9.16-alpha.b1fbdab3 → 0.9.16-alpha.fee05d04
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/cjs/dynamic-table/Body/TableCell.js +1 -1
- package/cjs/dynamic-table/Body/TableRow.js +1 -2
- package/cjs/dynamic-table/DynamicTable.js +1 -4
- package/cjs/dynamic-table/DynamicTable.types.d.ts +0 -1
- package/dynamic-table/Body/TableCell.js +1 -1
- package/dynamic-table/Body/TableRow.js +1 -2
- package/dynamic-table/DynamicTable.js +1 -4
- package/dynamic-table/DynamicTable.types.d.ts +0 -1
- package/package.json +9 -9
|
@@ -22,7 +22,7 @@ const TableCell = /*#__PURE__*/_react.default.memo(({
|
|
|
22
22
|
align: headerCell === null || headerCell === void 0 ? void 0 : headerCell.textAlign,
|
|
23
23
|
columns: columnCount,
|
|
24
24
|
customColumnWidth: headerCell === null || headerCell === void 0 ? void 0 : headerCell.customColumnWidth,
|
|
25
|
-
"data-cy": headerCell === null || headerCell === void 0 ? void 0 : headerCell.key
|
|
25
|
+
"data-cy": `dynamic-table-cell-${headerCell === null || headerCell === void 0 ? void 0 : headerCell.key}`,
|
|
26
26
|
hasOnSelectFunction: !!onSelectFunction
|
|
27
27
|
}, children));
|
|
28
28
|
|
|
@@ -29,9 +29,8 @@ const TableRow = /*#__PURE__*/_react.default.memo(({
|
|
|
29
29
|
selectedRows
|
|
30
30
|
}) => (0, _react2.jsx)(_TableRow.TableRowStyled, {
|
|
31
31
|
active: isActive,
|
|
32
|
-
className: `dynamicTableRow-${row.id}`,
|
|
33
32
|
hoverColor: !!onClickRow,
|
|
34
|
-
onClick: () => onClickRow && onClickRow(row.id
|
|
33
|
+
onClick: () => onClickRow && onClickRow(row.id ? String(row.id) : '')
|
|
35
34
|
}, selectableRows && row.id && (0, _react2.jsx)(_TableCell2.TableCellCheckboxStyled, null, (0, _react2.jsx)(_forms.Checkbox, {
|
|
36
35
|
checked: selectedRows.includes(row.id),
|
|
37
36
|
name: row.id,
|
|
@@ -39,7 +39,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
39
39
|
|
|
40
40
|
const DynamicTable = ({
|
|
41
41
|
activeRowId,
|
|
42
|
-
className,
|
|
43
42
|
clickRowHandler,
|
|
44
43
|
descending,
|
|
45
44
|
fixedHeight,
|
|
@@ -72,9 +71,7 @@ const DynamicTable = ({
|
|
|
72
71
|
}, [sortDescending, onSortByKey, sortByKeyValue]);
|
|
73
72
|
return (0, _react2.jsx)(_DynamicTable.TableWrapperStyled, {
|
|
74
73
|
fixedHeight: fixedHeight
|
|
75
|
-
}, (0, _react2.jsx)(_DynamicTable.TableStyled, {
|
|
76
|
-
className: className
|
|
77
|
-
}, headerRow && (0, _react2.jsx)(_TableHead.default, {
|
|
74
|
+
}, (0, _react2.jsx)(_DynamicTable.TableStyled, null, headerRow && (0, _react2.jsx)(_TableHead.default, {
|
|
78
75
|
headerRow: headerRow,
|
|
79
76
|
onSelectFunction: onSelectFunction,
|
|
80
77
|
onSortByKey: onSortByKey,
|
|
@@ -10,7 +10,7 @@ var TableCell = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
10
10
|
align: headerCell === null || headerCell === void 0 ? void 0 : headerCell.textAlign,
|
|
11
11
|
columns: columnCount,
|
|
12
12
|
customColumnWidth: headerCell === null || headerCell === void 0 ? void 0 : headerCell.customColumnWidth,
|
|
13
|
-
"data-cy": headerCell === null || headerCell === void 0 ? void 0 : headerCell.key,
|
|
13
|
+
"data-cy": "dynamic-table-cell-".concat(headerCell === null || headerCell === void 0 ? void 0 : headerCell.key),
|
|
14
14
|
hasOnSelectFunction: !!onSelectFunction
|
|
15
15
|
}, children);
|
|
16
16
|
});
|
|
@@ -14,10 +14,9 @@ var TableRow = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
14
14
|
selectedRows = _ref.selectedRows;
|
|
15
15
|
return ___EmotionJSX(TableRowStyled, {
|
|
16
16
|
active: isActive,
|
|
17
|
-
className: "dynamicTableRow-".concat(row.id),
|
|
18
17
|
hoverColor: !!onClickRow,
|
|
19
18
|
onClick: function onClick() {
|
|
20
|
-
return onClickRow && onClickRow(row.id
|
|
19
|
+
return onClickRow && onClickRow(row.id ? String(row.id) : '');
|
|
21
20
|
}
|
|
22
21
|
}, selectableRows && row.id && ___EmotionJSX(TableCellCheckboxStyled, null, ___EmotionJSX(Checkbox, {
|
|
23
22
|
checked: selectedRows.includes(row.id),
|
|
@@ -20,7 +20,6 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
20
20
|
|
|
21
21
|
var DynamicTable = function DynamicTable(_ref) {
|
|
22
22
|
var activeRowId = _ref.activeRowId,
|
|
23
|
-
className = _ref.className,
|
|
24
23
|
clickRowHandler = _ref.clickRowHandler,
|
|
25
24
|
descending = _ref.descending,
|
|
26
25
|
fixedHeight = _ref.fixedHeight,
|
|
@@ -56,9 +55,7 @@ var DynamicTable = function DynamicTable(_ref) {
|
|
|
56
55
|
}, [sortDescending, onSortByKey, sortByKeyValue]);
|
|
57
56
|
return ___EmotionJSX(TableWrapperStyled, {
|
|
58
57
|
fixedHeight: fixedHeight
|
|
59
|
-
}, ___EmotionJSX(TableStyled, {
|
|
60
|
-
className: className
|
|
61
|
-
}, headerRow && ___EmotionJSX(TableHead, {
|
|
58
|
+
}, ___EmotionJSX(TableStyled, null, headerRow && ___EmotionJSX(TableHead, {
|
|
62
59
|
headerRow: headerRow,
|
|
63
60
|
onSelectFunction: onSelectFunction,
|
|
64
61
|
onSortByKey: onSortByKey,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React components for building experiences",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.9.16-alpha.
|
|
6
|
+
"version": "0.9.16-alpha.fee05d04",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./cjs/index.js",
|
|
9
9
|
"module": "./index.js",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"react-dom": ">= 16.8.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@dfds-ui/colors": "0.9.16-alpha.
|
|
20
|
-
"@dfds-ui/grid": "0.9.16-alpha.
|
|
21
|
-
"@dfds-ui/icons": "0.9.16-alpha.
|
|
22
|
-
"@dfds-ui/modal": "0.9.16-alpha.
|
|
23
|
-
"@dfds-ui/react-components": "0.9.16-alpha.
|
|
24
|
-
"@dfds-ui/theme": "0.9.16-alpha.
|
|
25
|
-
"@dfds-ui/typography": "0.9.16-alpha.
|
|
19
|
+
"@dfds-ui/colors": "0.9.16-alpha.fee05d04",
|
|
20
|
+
"@dfds-ui/grid": "0.9.16-alpha.fee05d04",
|
|
21
|
+
"@dfds-ui/icons": "0.9.16-alpha.fee05d04",
|
|
22
|
+
"@dfds-ui/modal": "0.9.16-alpha.fee05d04",
|
|
23
|
+
"@dfds-ui/react-components": "0.9.16-alpha.fee05d04",
|
|
24
|
+
"@dfds-ui/theme": "0.9.16-alpha.fee05d04",
|
|
25
|
+
"@dfds-ui/typography": "0.9.16-alpha.fee05d04"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "fee05d04a0dc5476d08a05ca931f7bf8b46deb25",
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
}
|