@myunisoft/design-system 0.9.0 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,53 @@
1
- # Changelog
2
-
3
- ## v0.9.0 (03/12/2021)
4
-
5
- #### Enhancements:
6
-
7
- - [MYUN-17510](https://myunisoft.atlassian.net/browse/MYUN-17510) Handle custom sortable
8
-
9
-
10
- ---
11
-
12
- ## v0.8.4 (02/12/2021)
13
-
14
- #### Bug Fixes:
15
-
16
- - [MYUN-16553](https://myunisoft.atlassian.net/browse/MYUN-16553) Editable AmountCell are not clickable when empty
1
+ # Changelog
2
+
3
+ ## v0.9.4 (16/12/2021)
4
+
5
+ #### Enhancements
6
+
7
+ - [MYUN-17509](https://myunisoft.atlassian.net/browse/MYUN-17509) Add disabled, className and style property to `select` typeCell
8
+
9
+ #### Bug Fixes
10
+
11
+ - [MYUN-17850](https://myunisoft.atlassian.net/browse/MYUN-17850) Fix export of empty wallet cell
12
+
13
+ ---
14
+
15
+ ## v0.9.3 (13/12/2021)
16
+
17
+ #### Bug Fixes
18
+
19
+ - [MYUN-17516](https://myunisoft.atlassian.net/browse/MYUN-17516) Fix export of switch badge cell
20
+
21
+ ---
22
+
23
+ ## v0.9.2 (08/12/2021)
24
+
25
+ #### Bug Fixes
26
+
27
+ - [MYUN-17516](https://myunisoft.atlassian.net/browse/MYUN-17516) Fix export of empty badge cell
28
+ - [MYUN-17665](https://myunisoft.atlassian.net/browse/MYUN-17665) Activate save button on edit
29
+
30
+ ---
31
+
32
+ ## v0.9.1 (06/12/2021)
33
+
34
+ #### Bug Fixes:
35
+
36
+ - [MYUN-17505](https://myunisoft.atlassian.net/browse/MYUN-17505) Add `rowIndex` property to RenderComponent callback
37
+ - [MYUN-17584](https://myunisoft.atlassian.net/browse/MYUN-17584) Fix `typeCell` in columnsSettings and doc
38
+
39
+ ---
40
+
41
+ ## v0.9.0 (03/12/2021)
42
+
43
+ #### Enhancements:
44
+
45
+ - [MYUN-17510](https://myunisoft.atlassian.net/browse/MYUN-17510) Handle custom sortable
46
+
47
+ ---
48
+
49
+ ## v0.8.4 (02/12/2021)
50
+
51
+ #### Bug Fixes:
52
+
53
+ - [MYUN-16553](https://myunisoft.atlassian.net/browse/MYUN-16553) Editable AmountCell are not clickable when empty
package/dist/index.js CHANGED
@@ -2521,7 +2521,8 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
2521
2521
  return renderComponent($7ac33646021a7e72$var$_objectSpread($7ac33646021a7e72$var$_objectSpread({
2522
2522
  }, commonProps), {
2523
2523
  }, {
2524
- data: data
2524
+ data: data,
2525
+ rowIndex: rowIndex
2525
2526
  }));
2526
2527
  case $fjngL.TYPE_CELL.STRING:
2527
2528
  default:
@@ -3562,6 +3563,9 @@ var $7bb2215df9eff6f3$var$EditSelectCell = /*#__PURE__*/ $7bb2215df9eff6f3$var$_
3562
3563
  disabled: true
3563
3564
  }, $7bb2215df9eff6f3$var$_I18n["default"].t('common.select')), _options.map(function(element, i) {
3564
3565
  return(/*#__PURE__*/ $7bb2215df9eff6f3$var$_react["default"].createElement($7bb2215df9eff6f3$var$_MenuItem["default"], {
3566
+ style: element.style,
3567
+ className: element.className,
3568
+ disabled: element.disabled,
3565
3569
  key: i,
3566
3570
  value: element.value
3567
3571
  }, (element === null || element === void 0 ? void 0 : element.name) || (element === null || element === void 0 ? void 0 : element.label)));
@@ -5787,10 +5791,14 @@ var $8614a7f4dd6dc787$var$formatDataToCSV = function formatDataToCSV(row, _ref)
5787
5791
  case $fjngL.TYPE_CELL.BADGE_STATUS:
5788
5792
  case $fjngL.TYPE_CELL.SWITCH_BADGE_STATUS:
5789
5793
  var _find2;
5790
- var status = value.status;
5791
- if (status === $gNAlh.BADGE_STATUS.IN_PROGRESS.value && value !== null && value !== void 0 && value.value) return (value === null || value === void 0 ? void 0 : value.value) > $9CaLt.MAX_COUNT_NOTIFY ? '+99' : value === null || value === void 0 ? void 0 : value.value;
5794
+ if (!value) return '';
5795
+ var data = typeCell === $fjngL.TYPE_CELL.SWITCH_BADGE_STATUS && column.switchKey ? $8614a7f4dd6dc787$var$_find3["default"](value, {
5796
+ key: column.switchKey
5797
+ }) : value;
5798
+ if (!data) return '';
5799
+ if ((data === null || data === void 0 ? void 0 : data.status) === $gNAlh.BADGE_STATUS.IN_PROGRESS.value && data !== null && data !== void 0 && data.value) return (data === null || data === void 0 ? void 0 : data.value) > $9CaLt.MAX_COUNT_NOTIFY ? '+99' : data === null || data === void 0 ? void 0 : data.value;
5792
5800
  return (_find2 = $8614a7f4dd6dc787$var$_find3["default"]($gNAlh.BADGE_STATUS, function(badge) {
5793
- return badge.value === (value === null || value === void 0 ? void 0 : value.status);
5801
+ return badge.value === (data === null || data === void 0 ? void 0 : data.status);
5794
5802
  })) === null || _find2 === void 0 ? void 0 : _find2.label;
5795
5803
  case $fjngL.TYPE_CELL.CHECKBOX:
5796
5804
  return value ? 'X' : '';
@@ -5809,7 +5817,9 @@ var $8614a7f4dd6dc787$var$formatDataToCSV = function formatDataToCSV(row, _ref)
5809
5817
  case $fjngL.TYPE_CELL.STRING:
5810
5818
  return value;
5811
5819
  case $fjngL.TYPE_CELL.WALLET:
5820
+ if (!value) return '';
5812
5821
  var _value$array = value.array, array = _value$array === void 0 ? [] : _value$array;
5822
+ if (!array) return '';
5813
5823
  return array.map(function(_ref4) {
5814
5824
  var id = _ref4.id;
5815
5825
  return id;
@@ -7327,7 +7337,7 @@ var $21ca0ef7fb6000f8$var$edit = function edit(ctx, _ref3) {
7327
7337
  tab[index] = $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
7328
7338
  }, tab[index]), {
7329
7339
  }, (_objectSpread4 = {
7330
- }, $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, key, data), $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, "rowType", $NOfOf.ROW_TYPE.EDIT), _objectSpread4));
7340
+ }, $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, key, data), $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, "rowType", $NOfOf.ROW_TYPE.EDIT), $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, "_touched", true), _objectSpread4));
7331
7341
  }
7332
7342
  var addIndex = addTab.findIndex(function(e) {
7333
7343
  return e[selectableRowKey] === keyId;
@@ -7469,6 +7479,7 @@ var $21ca0ef7fb6000f8$var$_default = $ByO3L$robot3.createMachine({
7469
7479
  addRows: []
7470
7480
  });
7471
7481
  })), $ByO3L$robot3.transition('delete', 'ADD', $ByO3L$robot3.reduce($21ca0ef7fb6000f8$var$removeRow)), $ByO3L$robot3.transition('input', 'ADD', $ByO3L$robot3.reduce(function(ctx, ev) {
7482
+ var _objectSpread6;
7472
7483
  var addRows = ctx.addRows;
7473
7484
  var tab = $21ca0ef7fb6000f8$var$_toConsumableArray2["default"](addRows);
7474
7485
  var index = tab.findIndex(function(e) {
@@ -7476,8 +7487,8 @@ var $21ca0ef7fb6000f8$var$_default = $ByO3L$robot3.createMachine({
7476
7487
  });
7477
7488
  tab[index] = $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
7478
7489
  }, tab[index]), {
7479
- }, $21ca0ef7fb6000f8$var$_defineProperty2["default"]({
7480
- }, ev.key, ev.data));
7490
+ }, (_objectSpread6 = {
7491
+ }, $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread6, ev.key, ev.data), $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread6, "_touched", true), _objectSpread6));
7481
7492
  return $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
7482
7493
  }, ctx), {
7483
7494
  }, {
@@ -7490,7 +7501,10 @@ var $21ca0ef7fb6000f8$var$_default = $ByO3L$robot3.createMachine({
7490
7501
  return e[ev.selectableRowKey] === ev.keyId;
7491
7502
  });
7492
7503
  tab[index] = $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
7493
- }, tab[index]), ev.data);
7504
+ }, tab[index]), {
7505
+ }, {
7506
+ _touched: true
7507
+ }, ev.data);
7494
7508
  return $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
7495
7509
  }, ctx), {
7496
7510
  }, {
@@ -7645,7 +7659,10 @@ var $3b934575ab4d7380$var$useStyles = $ByO3L$materialuicore.makeStyles(function(
7645
7659
  display: 'flex'
7646
7660
  },
7647
7661
  pointer: {
7648
- cursor: 'pointer'
7662
+ cursor: 'pointer',
7663
+ '&:hover': {
7664
+ textDecoration: 'underline'
7665
+ }
7649
7666
  },
7650
7667
  selectedRow: {
7651
7668
  backgroundColor: '#ddfafa'
@@ -10819,7 +10836,7 @@ var $a137c8e9e6a13ab0$var$DataGrid = function DataGrid(_ref) {
10819
10836
  send: function send() {
10820
10837
  }
10821
10838
  },
10822
- type: column.typeCell,
10839
+ typeCell: column.typeCell,
10823
10840
  column: $a137c8e9e6a13ab0$var$_objectSpread($a137c8e9e6a13ab0$var$_objectSpread({
10824
10841
  }, column), {
10825
10842
  }, {