@myunisoft/design-system 0.8.3 → 0.9.2
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 +33 -0
- package/dist/index.js +122 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.9.2 (08/12/2021)
|
|
4
|
+
|
|
5
|
+
#### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- [MYUN-17516](https://myunisoft.atlassian.net/browse/MYUN-17516) Fix export of empty badge cell
|
|
8
|
+
- [MYUN-17665](https://myunisoft.atlassian.net/browse/MYUN-17665) Activate save button on edit
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## v0.9.1 (06/12/2021)
|
|
13
|
+
|
|
14
|
+
#### Bug Fixes:
|
|
15
|
+
|
|
16
|
+
- [MYUN-17505](https://myunisoft.atlassian.net/browse/MYUN-17505) Add `rowIndex` property to RenderComponent callback
|
|
17
|
+
- [MYUN-17584](https://myunisoft.atlassian.net/browse/MYUN-17584) Fix `typeCell` in columnsSettings and doc
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## v0.9.0 (03/12/2021)
|
|
22
|
+
|
|
23
|
+
#### Enhancements:
|
|
24
|
+
|
|
25
|
+
- [MYUN-17510](https://myunisoft.atlassian.net/browse/MYUN-17510) Handle custom sortable
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## v0.8.4 (02/12/2021)
|
|
30
|
+
|
|
31
|
+
#### Bug Fixes:
|
|
32
|
+
|
|
33
|
+
- [MYUN-16553](https://myunisoft.atlassian.net/browse/MYUN-16553) Editable AmountCell are not clickable when empty
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var $ByO3L$babelruntimehelpersinteropRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
-
var $ByO3L$lodashorderBy = require("lodash/orderBy");
|
|
3
2
|
var $ByO3L$lodashmin = require("lodash/min");
|
|
4
3
|
var $ByO3L$proptypes = require("prop-types");
|
|
5
4
|
var $ByO3L$react = require("react");
|
|
@@ -48,6 +47,7 @@ var $ByO3L$materialuicoreIconButton = require("@material-ui/core/IconButton");
|
|
|
48
47
|
var $ByO3L$lodashdeburr = require("lodash/deburr");
|
|
49
48
|
var $ByO3L$materialuicoreMenu = require("@material-ui/core/Menu");
|
|
50
49
|
var $ByO3L$materialuiicons = require("@material-ui/icons");
|
|
50
|
+
var $ByO3L$lodashorderBy = require("lodash/orderBy");
|
|
51
51
|
var $ByO3L$lodashomit = require("lodash/omit");
|
|
52
52
|
|
|
53
53
|
var $parcel$global =
|
|
@@ -121,8 +121,6 @@ var $66459c55c70cea69$var$_defineProperty2 = $ByO3L$babelruntimehelpersinteropRe
|
|
|
121
121
|
|
|
122
122
|
var $66459c55c70cea69$var$_slicedToArray2 = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$babelruntimehelpersslicedToArray);
|
|
123
123
|
|
|
124
|
-
var $66459c55c70cea69$var$_orderBy2 = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$lodashorderBy);
|
|
125
|
-
|
|
126
124
|
var $66459c55c70cea69$var$_min2 = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$lodashmin);
|
|
127
125
|
|
|
128
126
|
var $66459c55c70cea69$var$_propTypes = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$proptypes);
|
|
@@ -160,6 +158,8 @@ var $66459c55c70cea69$var$_useNavigation2 = $ByO3L$babelruntimehelpersinteropReq
|
|
|
160
158
|
var $lhF5z = parcelRequire("lhF5z");
|
|
161
159
|
|
|
162
160
|
var $66459c55c70cea69$var$_useColumns2 = $ByO3L$babelruntimehelpersinteropRequireDefault((parcelRequire("eA5U9")));
|
|
161
|
+
|
|
162
|
+
var $gczPv = parcelRequire("gczPv");
|
|
163
163
|
function $66459c55c70cea69$var$_getRequireWildcardCache(nodeInterop) {
|
|
164
164
|
if (typeof WeakMap !== "function") return null;
|
|
165
165
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -241,7 +241,8 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
241
241
|
var _useColumns = $66459c55c70cea69$var$_useColumns2["default"](columnsRaw, tableKeyName, config), _columns = _useColumns.state, dispatchColumnsSetting = _useColumns.dispatch;
|
|
242
242
|
var CHECKBOX_COLUMN = 'checkboxColumn';
|
|
243
243
|
var data = $66459c55c70cea69$var$_react.useMemo(function() {
|
|
244
|
-
|
|
244
|
+
if (order) return $gczPv.applySorting(rowData, _columns, order, orderDirection);
|
|
245
|
+
return rowData;
|
|
245
246
|
}, [
|
|
246
247
|
rowData,
|
|
247
248
|
order,
|
|
@@ -251,11 +252,14 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
251
252
|
var _useNavigation = $66459c55c70cea69$var$_useNavigation2["default"]({
|
|
252
253
|
hasCheckBox: hasCheckBox,
|
|
253
254
|
onFocusChange: onFocusChange,
|
|
254
|
-
columns:
|
|
255
|
+
columns: _columns.filter(function(_ref2) {
|
|
256
|
+
var display = _ref2.display;
|
|
257
|
+
return display !== false;
|
|
258
|
+
})
|
|
255
259
|
}), handleCellBlur = _useNavigation.handleCellBlur, handleCellFocus = _useNavigation.handleCellFocus, currentCell = _useNavigation.currentCell, setCurrentCell = _useNavigation.setCurrentCell;
|
|
256
260
|
var columns = $66459c55c70cea69$var$_react.useMemo(function() {
|
|
257
|
-
var filteredColumns = _columns.filter(function(
|
|
258
|
-
var display =
|
|
261
|
+
var filteredColumns = _columns.filter(function(_ref3) {
|
|
262
|
+
var display = _ref3.display;
|
|
259
263
|
return display !== false;
|
|
260
264
|
});
|
|
261
265
|
if (hasCheckBox) return [
|
|
@@ -463,17 +467,17 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
463
467
|
handleValidateEdit: handleValidateEdit,
|
|
464
468
|
handleValidateAdd: handleValidateAdd,
|
|
465
469
|
onChangeColumnsSetting: dispatchColumnsSetting
|
|
466
|
-
}), /*#__PURE__*/ $66459c55c70cea69$var$_react["default"].createElement($ByO3L$reactvirtualized.ScrollSync, null, function(
|
|
467
|
-
var onScroll =
|
|
470
|
+
}), /*#__PURE__*/ $66459c55c70cea69$var$_react["default"].createElement($ByO3L$reactvirtualized.ScrollSync, null, function(_ref4) {
|
|
471
|
+
var onScroll = _ref4.onScroll, scrollLeft = _ref4.scrollLeft;
|
|
468
472
|
return(/*#__PURE__*/ $66459c55c70cea69$var$_react["default"].createElement($ByO3L$reactvirtualized.AutoSizer, {
|
|
469
473
|
onResize: handleResize,
|
|
470
474
|
style: size
|
|
471
|
-
}, function(
|
|
472
|
-
var height =
|
|
475
|
+
}, function(_ref5) {
|
|
476
|
+
var height = _ref5.height, width = _ref5.width;
|
|
473
477
|
if (dynamicHeight && displayableRows.length * rowHeight <= calculateHeightGridBody(height)) height = displayableRows.length * rowHeight + verticalPadding;
|
|
474
478
|
else height = calculateHeightGridBody(height);
|
|
475
|
-
var _getColumnWidth = function _getColumnWidth1(
|
|
476
|
-
var index =
|
|
479
|
+
var _getColumnWidth = function _getColumnWidth1(_ref6) {
|
|
480
|
+
var index = _ref6.index;
|
|
477
481
|
var _columns$index = columns[index], _columns$index$width = _columns$index.width, widthColumn = _columns$index$width === void 0 ? -1 : _columns$index$width, _columns$index$size = _columns$index.size, size1 = _columns$index$size === void 0 ? -1 : _columns$index$size;
|
|
478
482
|
if (size1 !== -1 && width > totalColumnsWidth) {
|
|
479
483
|
var averageColumn = (width - totalColumnsWidth) / totalColumnsSize;
|
|
@@ -514,8 +518,8 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
514
518
|
onScroll: onScroll,
|
|
515
519
|
rowHeight: cache.rowHeight,
|
|
516
520
|
fixedColumnCount: fixedColumns + +hasCheckBox,
|
|
517
|
-
onScrollbarPresenceChange: function onScrollbarPresenceChange(
|
|
518
|
-
var horizontal =
|
|
521
|
+
onScrollbarPresenceChange: function onScrollbarPresenceChange(_ref7) {
|
|
522
|
+
var horizontal = _ref7.horizontal, size1 = _ref7.size, vertical = _ref7.vertical;
|
|
519
523
|
setVerticalPadding(horizontal ? size1 : 0);
|
|
520
524
|
setHorizontalPadding(vertical ? size1 : 0);
|
|
521
525
|
},
|
|
@@ -1793,7 +1797,7 @@ var $bd57180c0aaf6443$var$BodyCell = function BodyCell(_ref) {
|
|
|
1793
1797
|
data: displayableRow,
|
|
1794
1798
|
dataKey: keyColumn1,
|
|
1795
1799
|
columnIndex: columnIndex1,
|
|
1796
|
-
|
|
1800
|
+
typeCell: currentTypeCell(displayableRow),
|
|
1797
1801
|
spaceBetween: spaceBetween,
|
|
1798
1802
|
onBlur: function onBlur() {
|
|
1799
1803
|
return onCellBlur(rowIndex1, columnIndex1);
|
|
@@ -2320,7 +2324,7 @@ var $NOfOf = parcelRequire("NOfOf");
|
|
|
2320
2324
|
|
|
2321
2325
|
var $hUH45 = parcelRequire("hUH45");
|
|
2322
2326
|
var $7ac33646021a7e72$var$_excluded = [
|
|
2323
|
-
"
|
|
2327
|
+
"typeCell",
|
|
2324
2328
|
"subtype",
|
|
2325
2329
|
"data",
|
|
2326
2330
|
"dataKey",
|
|
@@ -2389,7 +2393,7 @@ function $7ac33646021a7e72$var$_objectSpread(target) {
|
|
|
2389
2393
|
return target;
|
|
2390
2394
|
}
|
|
2391
2395
|
var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
2392
|
-
var
|
|
2396
|
+
var typeCell = _ref.typeCell, subtype = _ref.subtype, _ref$data = _ref.data, data = _ref$data === void 0 ? {
|
|
2393
2397
|
} : _ref$data, dataKey = _ref.dataKey, columnIndex = _ref.columnIndex, spaceBetween = _ref.spaceBetween, rowIndex = _ref.rowIndex, _ref$onKeyDown = _ref.onKeyDown, onKeyDown = _ref$onKeyDown === void 0 ? function() {
|
|
2394
2398
|
} : _ref$onKeyDown, _ref$onBlur = _ref.onBlur, onBlur = _ref$onBlur === void 0 ? function() {
|
|
2395
2399
|
} : _ref$onBlur, _ref$onFocus = _ref.onFocus, onFocus = _ref$onFocus === void 0 ? function() {
|
|
@@ -2463,7 +2467,7 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2463
2467
|
vtContext: vtContext
|
|
2464
2468
|
}, rest);
|
|
2465
2469
|
function switchCell() {
|
|
2466
|
-
switch(
|
|
2470
|
+
switch(typeCell){
|
|
2467
2471
|
case $fjngL.TYPE_CELL.ATTACHMENT:
|
|
2468
2472
|
return(/*#__PURE__*/ $7ac33646021a7e72$var$_react["default"].createElement($7ac33646021a7e72$var$_AttachmentCell["default"], $7ac33646021a7e72$var$_extends2["default"]({
|
|
2469
2473
|
subtype: subtype
|
|
@@ -2517,7 +2521,8 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2517
2521
|
return renderComponent($7ac33646021a7e72$var$_objectSpread($7ac33646021a7e72$var$_objectSpread({
|
|
2518
2522
|
}, commonProps), {
|
|
2519
2523
|
}, {
|
|
2520
|
-
data: data
|
|
2524
|
+
data: data,
|
|
2525
|
+
rowIndex: rowIndex
|
|
2521
2526
|
}));
|
|
2522
2527
|
case $fjngL.TYPE_CELL.STRING:
|
|
2523
2528
|
default:
|
|
@@ -2526,7 +2531,7 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2526
2531
|
}
|
|
2527
2532
|
if ([
|
|
2528
2533
|
$fjngL.TYPE_CELL.CHECKBOX
|
|
2529
|
-
].includes(
|
|
2534
|
+
].includes(typeCell)) return switchCell();
|
|
2530
2535
|
return(/*#__PURE__*/ $7ac33646021a7e72$var$_react["default"].createElement("div", {
|
|
2531
2536
|
style: {
|
|
2532
2537
|
margin: "0 ".concat(spaceBetween / 2, "px"),
|
|
@@ -2537,13 +2542,13 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2537
2542
|
}, switchCell()));
|
|
2538
2543
|
};
|
|
2539
2544
|
$7ac33646021a7e72$var$CellRender.propTypes = {
|
|
2540
|
-
|
|
2545
|
+
typeCell: $7ac33646021a7e72$var$_propTypes["default"].string,
|
|
2541
2546
|
data: $7ac33646021a7e72$var$_propTypes["default"].object.isRequired,
|
|
2542
2547
|
dataKey: $7ac33646021a7e72$var$_propTypes["default"].string.isRequired,
|
|
2543
2548
|
columnIndex: $7ac33646021a7e72$var$_propTypes["default"].number
|
|
2544
2549
|
};
|
|
2545
2550
|
$7ac33646021a7e72$var$CellRender.defaultProps = {
|
|
2546
|
-
|
|
2551
|
+
typeCell: $fjngL.TYPE_CELL.STRING
|
|
2547
2552
|
};
|
|
2548
2553
|
var $7ac33646021a7e72$var$_default = $7ac33646021a7e72$var$CellRender;
|
|
2549
2554
|
module.exports["default"] = $7ac33646021a7e72$var$_default;
|
|
@@ -2758,7 +2763,8 @@ module.exports["default"] = void 0;
|
|
|
2758
2763
|
var $84c4513cb6863285$var$useStyles = $ByO3L$materialuicore.makeStyles(function() {
|
|
2759
2764
|
return {
|
|
2760
2765
|
amountCell: {
|
|
2761
|
-
paddingRight: 10
|
|
2766
|
+
paddingRight: 10,
|
|
2767
|
+
height: '100%'
|
|
2762
2768
|
},
|
|
2763
2769
|
disabled: {
|
|
2764
2770
|
opacity: 0.5
|
|
@@ -2955,6 +2961,9 @@ var $48de11c1b8ebd932$var$_excluded = [
|
|
|
2955
2961
|
"data",
|
|
2956
2962
|
"dataKey",
|
|
2957
2963
|
"column",
|
|
2964
|
+
"columnIndex",
|
|
2965
|
+
"vtContext",
|
|
2966
|
+
"typeCell",
|
|
2958
2967
|
"onChange",
|
|
2959
2968
|
"keyId"
|
|
2960
2969
|
];
|
|
@@ -2986,7 +2995,7 @@ function $48de11c1b8ebd932$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
|
2986
2995
|
return newObj;
|
|
2987
2996
|
}
|
|
2988
2997
|
var $48de11c1b8ebd932$var$EditStringCell = /*#__PURE__*/ $48de11c1b8ebd932$var$_react["default"].memo(function EditStringCell(_ref) {
|
|
2989
|
-
var data = _ref.data, dataKey = _ref.dataKey, column = _ref.column, onChange = _ref.onChange, keyId = _ref.keyId, rest = $48de11c1b8ebd932$var$_objectWithoutProperties2["default"](_ref, $48de11c1b8ebd932$var$_excluded);
|
|
2998
|
+
var data = _ref.data, dataKey = _ref.dataKey, column = _ref.column, columnIndex = _ref.columnIndex, vtContext = _ref.vtContext, typeCell = _ref.typeCell, onChange = _ref.onChange, keyId = _ref.keyId, rest = $48de11c1b8ebd932$var$_objectWithoutProperties2["default"](_ref, $48de11c1b8ebd932$var$_excluded);
|
|
2990
2999
|
var styles = $48de11c1b8ebd932$var$_styles["default"]();
|
|
2991
3000
|
var _column$isDisabled = column.isDisabled, isDisabled = _column$isDisabled === void 0 ? function() {
|
|
2992
3001
|
return false;
|
|
@@ -5779,6 +5788,7 @@ var $8614a7f4dd6dc787$var$formatDataToCSV = function formatDataToCSV(row, _ref)
|
|
|
5779
5788
|
case $fjngL.TYPE_CELL.BADGE_STATUS:
|
|
5780
5789
|
case $fjngL.TYPE_CELL.SWITCH_BADGE_STATUS:
|
|
5781
5790
|
var _find2;
|
|
5791
|
+
if (!value) return '';
|
|
5782
5792
|
var status = value.status;
|
|
5783
5793
|
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;
|
|
5784
5794
|
return (_find2 = $8614a7f4dd6dc787$var$_find3["default"]($gNAlh.BADGE_STATUS, function(badge) {
|
|
@@ -5801,6 +5811,7 @@ var $8614a7f4dd6dc787$var$formatDataToCSV = function formatDataToCSV(row, _ref)
|
|
|
5801
5811
|
case $fjngL.TYPE_CELL.STRING:
|
|
5802
5812
|
return value;
|
|
5803
5813
|
case $fjngL.TYPE_CELL.WALLET:
|
|
5814
|
+
if (!value) return '';
|
|
5804
5815
|
var _value$array = value.array, array = _value$array === void 0 ? [] : _value$array;
|
|
5805
5816
|
return array.map(function(_ref4) {
|
|
5806
5817
|
var id = _ref4.id;
|
|
@@ -7319,7 +7330,7 @@ var $21ca0ef7fb6000f8$var$edit = function edit(ctx, _ref3) {
|
|
|
7319
7330
|
tab[index] = $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
|
|
7320
7331
|
}, tab[index]), {
|
|
7321
7332
|
}, (_objectSpread4 = {
|
|
7322
|
-
}, $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, key, data), $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread4, "rowType", $NOfOf.ROW_TYPE.EDIT), _objectSpread4));
|
|
7333
|
+
}, $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));
|
|
7323
7334
|
}
|
|
7324
7335
|
var addIndex = addTab.findIndex(function(e) {
|
|
7325
7336
|
return e[selectableRowKey] === keyId;
|
|
@@ -7461,6 +7472,7 @@ var $21ca0ef7fb6000f8$var$_default = $ByO3L$robot3.createMachine({
|
|
|
7461
7472
|
addRows: []
|
|
7462
7473
|
});
|
|
7463
7474
|
})), $ByO3L$robot3.transition('delete', 'ADD', $ByO3L$robot3.reduce($21ca0ef7fb6000f8$var$removeRow)), $ByO3L$robot3.transition('input', 'ADD', $ByO3L$robot3.reduce(function(ctx, ev) {
|
|
7475
|
+
var _objectSpread6;
|
|
7464
7476
|
var addRows = ctx.addRows;
|
|
7465
7477
|
var tab = $21ca0ef7fb6000f8$var$_toConsumableArray2["default"](addRows);
|
|
7466
7478
|
var index = tab.findIndex(function(e) {
|
|
@@ -7468,8 +7480,8 @@ var $21ca0ef7fb6000f8$var$_default = $ByO3L$robot3.createMachine({
|
|
|
7468
7480
|
});
|
|
7469
7481
|
tab[index] = $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
|
|
7470
7482
|
}, tab[index]), {
|
|
7471
|
-
},
|
|
7472
|
-
}, ev.key, ev.data));
|
|
7483
|
+
}, (_objectSpread6 = {
|
|
7484
|
+
}, $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread6, ev.key, ev.data), $21ca0ef7fb6000f8$var$_defineProperty2["default"](_objectSpread6, "_touched", true), _objectSpread6));
|
|
7473
7485
|
return $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
|
|
7474
7486
|
}, ctx), {
|
|
7475
7487
|
}, {
|
|
@@ -7482,7 +7494,10 @@ var $21ca0ef7fb6000f8$var$_default = $ByO3L$robot3.createMachine({
|
|
|
7482
7494
|
return e[ev.selectableRowKey] === ev.keyId;
|
|
7483
7495
|
});
|
|
7484
7496
|
tab[index] = $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
|
|
7485
|
-
}, tab[index]),
|
|
7497
|
+
}, tab[index]), {
|
|
7498
|
+
}, {
|
|
7499
|
+
_touched: true
|
|
7500
|
+
}, ev.data);
|
|
7486
7501
|
return $21ca0ef7fb6000f8$var$_objectSpread($21ca0ef7fb6000f8$var$_objectSpread({
|
|
7487
7502
|
}, ctx), {
|
|
7488
7503
|
}, {
|
|
@@ -10811,7 +10826,7 @@ var $a137c8e9e6a13ab0$var$DataGrid = function DataGrid(_ref) {
|
|
|
10811
10826
|
send: function send() {
|
|
10812
10827
|
}
|
|
10813
10828
|
},
|
|
10814
|
-
|
|
10829
|
+
typeCell: column.typeCell,
|
|
10815
10830
|
column: $a137c8e9e6a13ab0$var$_objectSpread($a137c8e9e6a13ab0$var$_objectSpread({
|
|
10816
10831
|
}, column), {
|
|
10817
10832
|
}, {
|
|
@@ -11937,6 +11952,83 @@ module.exports["default"] = $a9d902000ecbacf8$var$_default;
|
|
|
11937
11952
|
|
|
11938
11953
|
});
|
|
11939
11954
|
|
|
11955
|
+
parcelRequire.register("gczPv", function(module, exports) {
|
|
11956
|
+
"use strict";
|
|
11957
|
+
|
|
11958
|
+
Object.defineProperty(module.exports, "__esModule", {
|
|
11959
|
+
value: true
|
|
11960
|
+
});
|
|
11961
|
+
module.exports.applySorting = void 0;
|
|
11962
|
+
|
|
11963
|
+
var $bcb98f601ab8dcd2$var$_toConsumableArray2 = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$babelruntimehelperstoConsumableArray);
|
|
11964
|
+
|
|
11965
|
+
var $bcb98f601ab8dcd2$var$_defineProperty2 = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$babelruntimehelpersdefineProperty);
|
|
11966
|
+
|
|
11967
|
+
var $bcb98f601ab8dcd2$var$_orderBy2 = $ByO3L$babelruntimehelpersinteropRequireDefault($ByO3L$lodashorderBy);
|
|
11968
|
+
|
|
11969
|
+
var $fjngL = parcelRequire("fjngL");
|
|
11970
|
+
|
|
11971
|
+
var $NOfOf = parcelRequire("NOfOf");
|
|
11972
|
+
function $bcb98f601ab8dcd2$var$ownKeys(object, enumerableOnly) {
|
|
11973
|
+
var keys = Object.keys(object);
|
|
11974
|
+
if (Object.getOwnPropertySymbols) {
|
|
11975
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
11976
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
11977
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11978
|
+
});
|
|
11979
|
+
keys.push.apply(keys, symbols);
|
|
11980
|
+
}
|
|
11981
|
+
return keys;
|
|
11982
|
+
}
|
|
11983
|
+
function $bcb98f601ab8dcd2$var$_objectSpread(target) {
|
|
11984
|
+
for(var i = 1; i < arguments.length; i++){
|
|
11985
|
+
var source = arguments[i] != null ? arguments[i] : {
|
|
11986
|
+
};
|
|
11987
|
+
if (i % 2) $bcb98f601ab8dcd2$var$ownKeys(Object(source), true).forEach(function(key) {
|
|
11988
|
+
$bcb98f601ab8dcd2$var$_defineProperty2["default"](target, key, source[key]);
|
|
11989
|
+
});
|
|
11990
|
+
else if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
11991
|
+
else $bcb98f601ab8dcd2$var$ownKeys(Object(source)).forEach(function(key) {
|
|
11992
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
11993
|
+
});
|
|
11994
|
+
}
|
|
11995
|
+
return target;
|
|
11996
|
+
}
|
|
11997
|
+
var $bcb98f601ab8dcd2$var$sortAlg = function sortAlg(list) {
|
|
11998
|
+
return function(a, b) {
|
|
11999
|
+
if (!a) return 1;
|
|
12000
|
+
else if (!b) return -1;
|
|
12001
|
+
return +list[a] - +list[b];
|
|
12002
|
+
};
|
|
12003
|
+
};
|
|
12004
|
+
var $bcb98f601ab8dcd2$var$buildComparator = function buildComparator(column) {
|
|
12005
|
+
if (column !== null && column !== void 0 && column.sortComparator) return column.sortComparator;
|
|
12006
|
+
if (column.typeCell === $fjngL.TYPE_CELL.SELECT) {
|
|
12007
|
+
if (!column.options) return;
|
|
12008
|
+
var list = column.options.reduce(function(prev, curr) {
|
|
12009
|
+
return $bcb98f601ab8dcd2$var$_objectSpread($bcb98f601ab8dcd2$var$_objectSpread({
|
|
12010
|
+
}, prev), {
|
|
12011
|
+
}, $bcb98f601ab8dcd2$var$_defineProperty2["default"]({
|
|
12012
|
+
}, curr.value, curr.sortOrder));
|
|
12013
|
+
}, {
|
|
12014
|
+
});
|
|
12015
|
+
return $bcb98f601ab8dcd2$var$sortAlg(list);
|
|
12016
|
+
}
|
|
12017
|
+
};
|
|
12018
|
+
var $bcb98f601ab8dcd2$var$applySorting = function applySorting(data, columns, order, orderDirection) {
|
|
12019
|
+
var column = columns.find(function(c) {
|
|
12020
|
+
return c.key === order;
|
|
12021
|
+
});
|
|
12022
|
+
var comparator = $bcb98f601ab8dcd2$var$buildComparator(column, order);
|
|
12023
|
+
if (comparator) return $bcb98f601ab8dcd2$var$_toConsumableArray2["default"](data).sort(function(a, b) {
|
|
12024
|
+
return orderDirection === $NOfOf.SORTABLE_DIRECTIONS.ASC ? comparator(a[order], b[order]) : comparator(b[order], a[order]);
|
|
12025
|
+
});
|
|
12026
|
+
return $bcb98f601ab8dcd2$var$_orderBy2["default"](data, order, orderDirection);
|
|
12027
|
+
};
|
|
12028
|
+
module.exports.applySorting = $bcb98f601ab8dcd2$var$applySorting;
|
|
12029
|
+
|
|
12030
|
+
});
|
|
12031
|
+
|
|
11940
12032
|
|
|
11941
12033
|
|
|
11942
12034
|
var $c79bbf7dbb0f3531$var$_VirtualTable = $ByO3L$babelruntimehelpersinteropRequireDefault((parcelRequire("8Mof3")));
|