@mailstep/design-system 0.7.61-beta.0 → 0.7.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.61-beta.0",
3
+ "version": "0.7.61",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -15,12 +15,17 @@ var DataRow = function (_a) {
15
15
  }
16
16
  }, [onRowAction, allowRowSelectOnAction, onUxChange]);
17
17
  var handleRowClick = React.useCallback(function (e) {
18
- var _a;
18
+ var _a, _b;
19
19
  // test whether I should trigger event or not (because of possible button/link/input/etc in cell)
20
20
  var classes = Object.values(e.target.classList);
21
21
  // find children of parent that has propagation attribute
22
22
  var parent = e.target.closest('.cell');
23
- var canPropagation = ((_a = parent === null || parent === void 0 ? void 0 : parent.querySelectorAll('[data-propagation="true"]')) === null || _a === void 0 ? void 0 : _a.length) > 0;
23
+ var canPropagation = ((_a = e.target.dataset) === null || _a === void 0 ? void 0 : _a.propagation) === 'true';
24
+ var child = e.target;
25
+ while (child && child !== parent && !canPropagation) {
26
+ child = child.parentElement;
27
+ canPropagation = ((_b = child === null || child === void 0 ? void 0 : child.dataset) === null || _b === void 0 ? void 0 : _b.propagation) === 'true';
28
+ }
24
29
  if (!classes.includes('dataRow') && !classes.includes('cell') && !canPropagation)
25
30
  return;
26
31
  if (onUxChange && allowRowSelect)
@@ -1,7 +1,7 @@
1
1
  export var onRowEditClick = function (id, props) { return console.log('onRowEditClick', id, props); };
2
2
  export var onRowReadClick = function (id, props) { return console.log('onRowReadClick', id, props); };
3
3
  export var onRowAction = function (id, field, value) { return console.log('onRowAction', id, field, value); };
4
- export var onRowClick = function (id, field, value) { return console.log('onRowClick', id, field, value); };
4
+ export var onRowClick = function (id, field, value) { return console.log('onRowClick', id, field); };
5
5
  export var onBatchAction = function (action, affectedRows) {
6
6
  console.log('onBatchAction called', action, affectedRows);
7
7
  };
@@ -85,7 +85,7 @@ export var columnDefinitions = [
85
85
  },
86
86
  {
87
87
  name: 'complexColumn',
88
- title: 'Custom Cell Component Column1',
88
+ title: 'Complex Column',
89
89
  flexBasis: 350,
90
90
  cellComponent: ComplexCell
91
91
  },