@myunisoft/design-system 0.8.3 → 0.8.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/dist/index.js +27 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -251,11 +251,14 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
251
251
|
var _useNavigation = $66459c55c70cea69$var$_useNavigation2["default"]({
|
|
252
252
|
hasCheckBox: hasCheckBox,
|
|
253
253
|
onFocusChange: onFocusChange,
|
|
254
|
-
columns:
|
|
254
|
+
columns: _columns.filter(function(_ref2) {
|
|
255
|
+
var display = _ref2.display;
|
|
256
|
+
return display !== false;
|
|
257
|
+
})
|
|
255
258
|
}), handleCellBlur = _useNavigation.handleCellBlur, handleCellFocus = _useNavigation.handleCellFocus, currentCell = _useNavigation.currentCell, setCurrentCell = _useNavigation.setCurrentCell;
|
|
256
259
|
var columns = $66459c55c70cea69$var$_react.useMemo(function() {
|
|
257
|
-
var filteredColumns = _columns.filter(function(
|
|
258
|
-
var display =
|
|
260
|
+
var filteredColumns = _columns.filter(function(_ref3) {
|
|
261
|
+
var display = _ref3.display;
|
|
259
262
|
return display !== false;
|
|
260
263
|
});
|
|
261
264
|
if (hasCheckBox) return [
|
|
@@ -463,17 +466,17 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
463
466
|
handleValidateEdit: handleValidateEdit,
|
|
464
467
|
handleValidateAdd: handleValidateAdd,
|
|
465
468
|
onChangeColumnsSetting: dispatchColumnsSetting
|
|
466
|
-
}), /*#__PURE__*/ $66459c55c70cea69$var$_react["default"].createElement($ByO3L$reactvirtualized.ScrollSync, null, function(
|
|
467
|
-
var onScroll =
|
|
469
|
+
}), /*#__PURE__*/ $66459c55c70cea69$var$_react["default"].createElement($ByO3L$reactvirtualized.ScrollSync, null, function(_ref4) {
|
|
470
|
+
var onScroll = _ref4.onScroll, scrollLeft = _ref4.scrollLeft;
|
|
468
471
|
return(/*#__PURE__*/ $66459c55c70cea69$var$_react["default"].createElement($ByO3L$reactvirtualized.AutoSizer, {
|
|
469
472
|
onResize: handleResize,
|
|
470
473
|
style: size
|
|
471
|
-
}, function(
|
|
472
|
-
var height =
|
|
474
|
+
}, function(_ref5) {
|
|
475
|
+
var height = _ref5.height, width = _ref5.width;
|
|
473
476
|
if (dynamicHeight && displayableRows.length * rowHeight <= calculateHeightGridBody(height)) height = displayableRows.length * rowHeight + verticalPadding;
|
|
474
477
|
else height = calculateHeightGridBody(height);
|
|
475
|
-
var _getColumnWidth = function _getColumnWidth1(
|
|
476
|
-
var index =
|
|
478
|
+
var _getColumnWidth = function _getColumnWidth1(_ref6) {
|
|
479
|
+
var index = _ref6.index;
|
|
477
480
|
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
481
|
if (size1 !== -1 && width > totalColumnsWidth) {
|
|
479
482
|
var averageColumn = (width - totalColumnsWidth) / totalColumnsSize;
|
|
@@ -514,8 +517,8 @@ var $66459c55c70cea69$var$VirtualTable = /*#__PURE__*/ $66459c55c70cea69$var$_re
|
|
|
514
517
|
onScroll: onScroll,
|
|
515
518
|
rowHeight: cache.rowHeight,
|
|
516
519
|
fixedColumnCount: fixedColumns + +hasCheckBox,
|
|
517
|
-
onScrollbarPresenceChange: function onScrollbarPresenceChange(
|
|
518
|
-
var horizontal =
|
|
520
|
+
onScrollbarPresenceChange: function onScrollbarPresenceChange(_ref7) {
|
|
521
|
+
var horizontal = _ref7.horizontal, size1 = _ref7.size, vertical = _ref7.vertical;
|
|
519
522
|
setVerticalPadding(horizontal ? size1 : 0);
|
|
520
523
|
setHorizontalPadding(vertical ? size1 : 0);
|
|
521
524
|
},
|
|
@@ -1793,7 +1796,7 @@ var $bd57180c0aaf6443$var$BodyCell = function BodyCell(_ref) {
|
|
|
1793
1796
|
data: displayableRow,
|
|
1794
1797
|
dataKey: keyColumn1,
|
|
1795
1798
|
columnIndex: columnIndex1,
|
|
1796
|
-
|
|
1799
|
+
typeCell: currentTypeCell(displayableRow),
|
|
1797
1800
|
spaceBetween: spaceBetween,
|
|
1798
1801
|
onBlur: function onBlur() {
|
|
1799
1802
|
return onCellBlur(rowIndex1, columnIndex1);
|
|
@@ -2320,7 +2323,7 @@ var $NOfOf = parcelRequire("NOfOf");
|
|
|
2320
2323
|
|
|
2321
2324
|
var $hUH45 = parcelRequire("hUH45");
|
|
2322
2325
|
var $7ac33646021a7e72$var$_excluded = [
|
|
2323
|
-
"
|
|
2326
|
+
"typeCell",
|
|
2324
2327
|
"subtype",
|
|
2325
2328
|
"data",
|
|
2326
2329
|
"dataKey",
|
|
@@ -2389,7 +2392,7 @@ function $7ac33646021a7e72$var$_objectSpread(target) {
|
|
|
2389
2392
|
return target;
|
|
2390
2393
|
}
|
|
2391
2394
|
var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
2392
|
-
var
|
|
2395
|
+
var typeCell = _ref.typeCell, subtype = _ref.subtype, _ref$data = _ref.data, data = _ref$data === void 0 ? {
|
|
2393
2396
|
} : _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
2397
|
} : _ref$onKeyDown, _ref$onBlur = _ref.onBlur, onBlur = _ref$onBlur === void 0 ? function() {
|
|
2395
2398
|
} : _ref$onBlur, _ref$onFocus = _ref.onFocus, onFocus = _ref$onFocus === void 0 ? function() {
|
|
@@ -2463,7 +2466,7 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2463
2466
|
vtContext: vtContext
|
|
2464
2467
|
}, rest);
|
|
2465
2468
|
function switchCell() {
|
|
2466
|
-
switch(
|
|
2469
|
+
switch(typeCell){
|
|
2467
2470
|
case $fjngL.TYPE_CELL.ATTACHMENT:
|
|
2468
2471
|
return(/*#__PURE__*/ $7ac33646021a7e72$var$_react["default"].createElement($7ac33646021a7e72$var$_AttachmentCell["default"], $7ac33646021a7e72$var$_extends2["default"]({
|
|
2469
2472
|
subtype: subtype
|
|
@@ -2526,7 +2529,7 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2526
2529
|
}
|
|
2527
2530
|
if ([
|
|
2528
2531
|
$fjngL.TYPE_CELL.CHECKBOX
|
|
2529
|
-
].includes(
|
|
2532
|
+
].includes(typeCell)) return switchCell();
|
|
2530
2533
|
return(/*#__PURE__*/ $7ac33646021a7e72$var$_react["default"].createElement("div", {
|
|
2531
2534
|
style: {
|
|
2532
2535
|
margin: "0 ".concat(spaceBetween / 2, "px"),
|
|
@@ -2537,13 +2540,13 @@ var $7ac33646021a7e72$var$CellRender = function CellRender(_ref) {
|
|
|
2537
2540
|
}, switchCell()));
|
|
2538
2541
|
};
|
|
2539
2542
|
$7ac33646021a7e72$var$CellRender.propTypes = {
|
|
2540
|
-
|
|
2543
|
+
typeCell: $7ac33646021a7e72$var$_propTypes["default"].string,
|
|
2541
2544
|
data: $7ac33646021a7e72$var$_propTypes["default"].object.isRequired,
|
|
2542
2545
|
dataKey: $7ac33646021a7e72$var$_propTypes["default"].string.isRequired,
|
|
2543
2546
|
columnIndex: $7ac33646021a7e72$var$_propTypes["default"].number
|
|
2544
2547
|
};
|
|
2545
2548
|
$7ac33646021a7e72$var$CellRender.defaultProps = {
|
|
2546
|
-
|
|
2549
|
+
typeCell: $fjngL.TYPE_CELL.STRING
|
|
2547
2550
|
};
|
|
2548
2551
|
var $7ac33646021a7e72$var$_default = $7ac33646021a7e72$var$CellRender;
|
|
2549
2552
|
module.exports["default"] = $7ac33646021a7e72$var$_default;
|
|
@@ -2758,7 +2761,8 @@ module.exports["default"] = void 0;
|
|
|
2758
2761
|
var $84c4513cb6863285$var$useStyles = $ByO3L$materialuicore.makeStyles(function() {
|
|
2759
2762
|
return {
|
|
2760
2763
|
amountCell: {
|
|
2761
|
-
paddingRight: 10
|
|
2764
|
+
paddingRight: 10,
|
|
2765
|
+
height: '100%'
|
|
2762
2766
|
},
|
|
2763
2767
|
disabled: {
|
|
2764
2768
|
opacity: 0.5
|
|
@@ -2955,6 +2959,9 @@ var $48de11c1b8ebd932$var$_excluded = [
|
|
|
2955
2959
|
"data",
|
|
2956
2960
|
"dataKey",
|
|
2957
2961
|
"column",
|
|
2962
|
+
"columnIndex",
|
|
2963
|
+
"vtContext",
|
|
2964
|
+
"typeCell",
|
|
2958
2965
|
"onChange",
|
|
2959
2966
|
"keyId"
|
|
2960
2967
|
];
|
|
@@ -2986,7 +2993,7 @@ function $48de11c1b8ebd932$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
|
2986
2993
|
return newObj;
|
|
2987
2994
|
}
|
|
2988
2995
|
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);
|
|
2996
|
+
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
2997
|
var styles = $48de11c1b8ebd932$var$_styles["default"]();
|
|
2991
2998
|
var _column$isDisabled = column.isDisabled, isDisabled = _column$isDisabled === void 0 ? function() {
|
|
2992
2999
|
return false;
|