linkmore-design 1.1.13-alpha.1 → 1.1.14
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 +11 -0
- package/dist/Form/demos/disabled.d.ts +2 -0
- package/dist/LmEditTable/DndContainer.d.ts +3 -4
- package/dist/LmEditTable/EditTable.d.ts +0 -2
- package/dist/LmEditTable/sortableItem.d.ts +2 -3
- package/dist/LmEditTable/util.d.ts +0 -2
- package/dist/LmFilter/LmFilter.d.ts +2 -6
- package/dist/LmTable/expression.d.ts +1 -0
- package/dist/LmTable/hooks/useGroupDataSource.d.ts +7 -0
- package/dist/index.umd.js +364 -517
- package/dist/index.umd.min.js +17 -17
- package/dist/variables.css +3 -29
- package/es/Cascader/index.js +16 -2
- package/es/Form/style/index.css +3 -0
- package/es/Form/style/variables.css +3 -0
- package/es/IconFont/index.js +1 -1
- package/es/Input/index.js +20 -4
- package/es/InputNumber/index.js +9 -2
- package/es/LmEditTable/DndContainer.d.ts +3 -4
- package/es/LmEditTable/DndContainer.js +2 -2
- package/es/LmEditTable/EditTable.d.ts +0 -2
- package/es/LmEditTable/EditTable.js +150 -139
- package/es/LmEditTable/sortableItem.d.ts +2 -3
- package/es/LmEditTable/sortableItem.js +4 -15
- package/es/LmEditTable/style/index.css +0 -29
- package/es/LmEditTable/style/variables.css +0 -29
- package/es/LmEditTable/util.d.ts +0 -2
- package/es/LmEditTable/util.js +1 -47
- package/es/LmFilter/LmFilter.js +6 -6
- package/es/LmFilter/components/DropdownFIlter.js +5 -2
- package/es/LmFilter/index.js +0 -3
- package/es/LmTable/Table.js +10 -7
- package/es/LmTable/expression.d.ts +1 -0
- package/es/LmTable/expression.js +31 -0
- package/es/LmTable/hooks/useGroupDataSource.js +50 -0
- package/es/LmUpload/fns/index.js +8 -3
- package/es/Select/index.js +17 -7
- package/es/hooks/useEvent/index.js +1 -1
- package/es/styles/variables.css +3 -29
- package/lib/Cascader/index.js +16 -2
- package/lib/Form/style/index.css +3 -0
- package/lib/Form/style/variables.css +3 -0
- package/lib/IconFont/index.js +1 -1
- package/lib/Input/index.js +22 -4
- package/lib/InputNumber/index.js +11 -2
- package/lib/LmEditTable/DndContainer.d.ts +3 -4
- package/lib/LmEditTable/DndContainer.js +3 -4
- package/lib/LmEditTable/EditTable.d.ts +0 -2
- package/lib/LmEditTable/EditTable.js +146 -135
- package/lib/LmEditTable/sortableItem.d.ts +2 -3
- package/lib/LmEditTable/sortableItem.js +5 -18
- package/lib/LmEditTable/style/index.css +0 -29
- package/lib/LmEditTable/style/variables.css +0 -29
- package/lib/LmEditTable/util.d.ts +0 -2
- package/lib/LmEditTable/util.js +0 -50
- package/lib/LmFilter/LmFilter.js +6 -6
- package/lib/LmFilter/components/DropdownFIlter.js +5 -2
- package/lib/LmFilter/index.js +0 -3
- package/lib/LmTable/Table.js +10 -7
- package/lib/LmTable/expression.d.ts +1 -0
- package/lib/LmTable/expression.js +41 -0
- package/lib/LmTable/hooks/useGroupDataSource.js +50 -0
- package/lib/LmUpload/fns/index.js +8 -3
- package/lib/Select/index.js +19 -7
- package/lib/hooks/useEvent/index.js +1 -1
- package/lib/styles/variables.css +3 -29
- package/package.json +1 -1
- package/dist/LmEditTable/components/DraggableContainer.d.ts +0 -7
- package/dist/LmEditTable/components/index.d.ts +0 -11
- package/dist/LmEditTable/virtual/VirtualRow.d.ts +0 -6
- package/dist/LmEditTable/virtual/VirtualRowBack.d.ts +0 -6
- package/dist/LmEditTable/virtual/VirtualTable.d.ts +0 -3
- package/dist/LmEditTable/virtual/VirtualWrapper.d.ts +0 -3
- package/dist/LmEditTable/virtual/context.d.ts +0 -13
- package/dist/LmEditTable/virtual/index.d.ts +0 -4
- package/es/LmEditTable/components/DraggableContainer.d.ts +0 -7
- package/es/LmEditTable/components/DraggableContainer.js +0 -32
- package/es/LmEditTable/components/index.d.ts +0 -11
- package/es/LmEditTable/components/index.js +0 -5
- package/es/LmEditTable/virtual/VirtualRow.d.ts +0 -6
- package/es/LmEditTable/virtual/VirtualRow.js +0 -60
- package/es/LmEditTable/virtual/VirtualRowBack.d.ts +0 -6
- package/es/LmEditTable/virtual/VirtualRowBack.js +0 -102
- package/es/LmEditTable/virtual/VirtualTable.d.ts +0 -3
- package/es/LmEditTable/virtual/VirtualTable.js +0 -54
- package/es/LmEditTable/virtual/VirtualWrapper.d.ts +0 -3
- package/es/LmEditTable/virtual/VirtualWrapper.js +0 -60
- package/es/LmEditTable/virtual/context.d.ts +0 -13
- package/es/LmEditTable/virtual/context.js +0 -54
- package/es/LmEditTable/virtual/index.d.ts +0 -4
- package/es/LmEditTable/virtual/index.js +0 -4
- package/lib/LmEditTable/components/DraggableContainer.d.ts +0 -7
- package/lib/LmEditTable/components/DraggableContainer.js +0 -45
- package/lib/LmEditTable/components/index.d.ts +0 -11
- package/lib/LmEditTable/components/index.js +0 -21
- package/lib/LmEditTable/virtual/VirtualRow.d.ts +0 -6
- package/lib/LmEditTable/virtual/VirtualRow.js +0 -73
- package/lib/LmEditTable/virtual/VirtualRowBack.d.ts +0 -6
- package/lib/LmEditTable/virtual/VirtualRowBack.js +0 -115
- package/lib/LmEditTable/virtual/VirtualTable.d.ts +0 -3
- package/lib/LmEditTable/virtual/VirtualTable.js +0 -71
- package/lib/LmEditTable/virtual/VirtualWrapper.d.ts +0 -3
- package/lib/LmEditTable/virtual/VirtualWrapper.js +0 -73
- package/lib/LmEditTable/virtual/context.d.ts +0 -13
- package/lib/LmEditTable/virtual/context.js +0 -64
- package/lib/LmEditTable/virtual/index.d.ts +0 -4
- package/lib/LmEditTable/virtual/index.js +0 -31
package/dist/index.umd.js
CHANGED
|
@@ -34780,7 +34780,7 @@
|
|
|
34780
34780
|
Cascader$1.SHOW_PARENT = SHOW_PARENT$1;
|
|
34781
34781
|
Cascader$1.SHOW_CHILD = SHOW_CHILD$1;
|
|
34782
34782
|
|
|
34783
|
-
var _excluded$y = ["children", "className", "dropdownClassName", "placeholder"];
|
|
34783
|
+
var _excluded$y = ["children", "className", "dropdownClassName", "placeholder", "defaultLabel"];
|
|
34784
34784
|
var prefixCls = 'lm_cascader';
|
|
34785
34785
|
var prefixDropdownCls = 'lm_cascader_dropdown';
|
|
34786
34786
|
|
|
@@ -34790,12 +34790,26 @@
|
|
|
34790
34790
|
dropdownClassName = props.dropdownClassName,
|
|
34791
34791
|
_props$placeholder = props.placeholder,
|
|
34792
34792
|
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
|
|
34793
|
+
defaultLabel = props.defaultLabel,
|
|
34793
34794
|
others = _objectWithoutProperties$1(props, _excluded$y);
|
|
34794
34795
|
|
|
34796
|
+
var displayRender = function displayRender(label, selectedOptions) {
|
|
34797
|
+
var hasOptions = selectedOptions.some(function (v) {
|
|
34798
|
+
return !!v;
|
|
34799
|
+
});
|
|
34800
|
+
|
|
34801
|
+
if (!hasOptions && defaultLabel) {
|
|
34802
|
+
return defaultLabel;
|
|
34803
|
+
}
|
|
34804
|
+
|
|
34805
|
+
return label.join('/');
|
|
34806
|
+
};
|
|
34807
|
+
|
|
34795
34808
|
return /*#__PURE__*/React__default['default'].createElement(Cascader$1, _objectSpread({
|
|
34796
34809
|
placeholder: placeholder,
|
|
34797
34810
|
className: classnames(prefixCls, className),
|
|
34798
|
-
dropdownClassName: classnames(prefixDropdownCls, dropdownClassName)
|
|
34811
|
+
dropdownClassName: classnames(prefixDropdownCls, dropdownClassName),
|
|
34812
|
+
displayRender: displayRender
|
|
34799
34813
|
}, others));
|
|
34800
34814
|
};
|
|
34801
34815
|
|
|
@@ -68580,7 +68594,7 @@
|
|
|
68580
68594
|
});
|
|
68581
68595
|
|
|
68582
68596
|
var IconFont = create({
|
|
68583
|
-
scriptUrl: '//at.alicdn.com/t/c/
|
|
68597
|
+
scriptUrl: '//at.alicdn.com/t/c/font_2966019_totaqlvhjak.js' // 在 iconfont.cn 上生成
|
|
68584
68598
|
// scriptUrl: require('./font/iconfont.js'),
|
|
68585
68599
|
|
|
68586
68600
|
});
|
|
@@ -90760,7 +90774,8 @@
|
|
|
90760
90774
|
setVisible = _useState2[1];
|
|
90761
90775
|
|
|
90762
90776
|
var filterValue = instance.filterValue,
|
|
90763
|
-
size = instance.size;
|
|
90777
|
+
size = instance.size;
|
|
90778
|
+
var popupClassName = item.popupClassName; // 触发查询时关闭下拉框
|
|
90764
90779
|
|
|
90765
90780
|
var setFilterValue = function setFilterValue(obj) {
|
|
90766
90781
|
instance.setFilterValue(obj);
|
|
@@ -90795,7 +90810,7 @@
|
|
|
90795
90810
|
instance: resetInstance,
|
|
90796
90811
|
item: item
|
|
90797
90812
|
}),
|
|
90798
|
-
overlayClassName: "filter_dropdown_container_".concat(item.type),
|
|
90813
|
+
overlayClassName: classnames("filter_dropdown_container_".concat(item.type), _defineProperty$1({}, popupClassName, popupClassName)),
|
|
90799
90814
|
onVisibleChange: function onVisibleChange(v) {
|
|
90800
90815
|
return setVisible(v);
|
|
90801
90816
|
} // 未开启则需手动控制下拉展示组件的初始化
|
|
@@ -93444,8 +93459,7 @@
|
|
|
93444
93459
|
};
|
|
93445
93460
|
|
|
93446
93461
|
var _excluded$1a = ["searchConfig", "localization"];
|
|
93447
|
-
|
|
93448
|
-
var LmFilter$1 = function LmFilter(_ref, ref) {
|
|
93462
|
+
var LmFilter$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
93449
93463
|
var _ref$searchConfig = _ref.searchConfig,
|
|
93450
93464
|
searchConfig = _ref$searchConfig === void 0 ? {} : _ref$searchConfig,
|
|
93451
93465
|
_ref$localization = _ref.localization,
|
|
@@ -93487,11 +93501,8 @@
|
|
|
93487
93501
|
return /*#__PURE__*/React__default['default'].createElement(LmFilterRoot$1, _extends$2({
|
|
93488
93502
|
ref: ref || defaultRef
|
|
93489
93503
|
}, defaultProps, resetProps));
|
|
93490
|
-
};
|
|
93491
|
-
|
|
93492
|
-
var LmFilter$2 = /*#__PURE__*/React.forwardRef(LmFilter$1);
|
|
93493
|
-
|
|
93494
|
-
LmFilter$2.FilterControl = FilterControl$1;
|
|
93504
|
+
});
|
|
93505
|
+
LmFilter$1.FilterControl = FilterControl$1;
|
|
93495
93506
|
|
|
93496
93507
|
// 状态管理操作
|
|
93497
93508
|
var reducer$1 = function reducer(state, action) {
|
|
@@ -181377,16 +181388,21 @@
|
|
|
181377
181388
|
fileAreaSize = props.fileAreaSize,
|
|
181378
181389
|
enabledOss = props.enabledOss,
|
|
181379
181390
|
enableCrop = props.enableCrop,
|
|
181380
|
-
ossConfig = props.ossConfig;
|
|
181391
|
+
ossConfig = props.ossConfig;
|
|
181392
|
+
/* 获取两个对象是否存在指定值相等
|
|
181393
|
+
* 取用户定义的列字段,如果读取不到则取'fileName'对比
|
|
181394
|
+
*/
|
|
181381
181395
|
|
|
181382
181396
|
var getHasEqual = React.useCallback(function (obj1, obj2) {
|
|
181383
181397
|
var extend = [uid, 'fileName'];
|
|
181384
181398
|
var flag = false;
|
|
181385
181399
|
extend.forEach(function (v) {
|
|
181386
|
-
if (!flag
|
|
181400
|
+
if (!flag && obj1[v] && obj2[v]) {
|
|
181401
|
+
flag = obj1[v] === obj2[v];
|
|
181402
|
+
}
|
|
181387
181403
|
});
|
|
181388
181404
|
return flag;
|
|
181389
|
-
}, []); // 从对象中读取存在的指定属性
|
|
181405
|
+
}, [uid]); // 从对象中读取存在的指定属性
|
|
181390
181406
|
|
|
181391
181407
|
var getFileHasValue = React.useCallback(function (obj) {
|
|
181392
181408
|
var extend = [uid, 'fileName'];
|
|
@@ -188451,19 +188467,33 @@
|
|
|
188451
188467
|
}))));
|
|
188452
188468
|
};
|
|
188453
188469
|
|
|
188454
|
-
var _excluded$1i = ["
|
|
188470
|
+
var _excluded$1i = ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore"],
|
|
188455
188471
|
_excluded2$i = ["allowClear"],
|
|
188456
188472
|
_excluded3$5 = ["allowClear"];
|
|
188457
188473
|
var LmInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
188458
|
-
var
|
|
188474
|
+
var customizePrefixCls = props.prefixCls,
|
|
188475
|
+
_props$bordered = props.bordered,
|
|
188476
|
+
customStatus = props.status,
|
|
188477
|
+
customSize = props.size,
|
|
188478
|
+
customDisabled = props.disabled,
|
|
188479
|
+
onBlur = props.onBlur,
|
|
188480
|
+
onFocus = props.onFocus,
|
|
188481
|
+
suffix = props.suffix,
|
|
188482
|
+
_props$allowClear = props.allowClear,
|
|
188459
188483
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
188460
|
-
|
|
188461
|
-
|
|
188484
|
+
addonAfter = props.addonAfter,
|
|
188485
|
+
addonBefore = props.addonBefore,
|
|
188486
|
+
rest = _objectWithoutProperties$1(props, _excluded$1i); // ===================== Size =====================
|
|
188487
|
+
|
|
188462
188488
|
|
|
188463
|
-
var size =
|
|
188489
|
+
var size = customSize || React__default['default'].useContext(SizeContext$1) || 'middle'; // ===================== Disabled =====================
|
|
188490
|
+
|
|
188491
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
188492
|
+
var mergedDisabled = customDisabled || disabled;
|
|
188464
188493
|
return /*#__PURE__*/React__default['default'].createElement(Input$3, _objectSpread(_objectSpread({
|
|
188465
188494
|
ref: ref,
|
|
188466
188495
|
className: "lm_input",
|
|
188496
|
+
disabled: mergedDisabled || undefined,
|
|
188467
188497
|
size: size
|
|
188468
188498
|
}, rest), {}, {
|
|
188469
188499
|
allowClear: allowClear
|
|
@@ -188506,18 +188536,23 @@
|
|
|
188506
188536
|
}));
|
|
188507
188537
|
};
|
|
188508
188538
|
|
|
188509
|
-
var _excluded$1j = ["children", "className"];
|
|
188539
|
+
var _excluded$1j = ["children", "className", "disabled"];
|
|
188510
188540
|
var prefixCls$3 = 'lm_input-number';
|
|
188511
188541
|
|
|
188512
188542
|
var LMInputNumber = function LMInputNumber(props) {
|
|
188513
188543
|
var children = props.children,
|
|
188514
188544
|
className = props.className,
|
|
188515
|
-
|
|
188545
|
+
customDisabled = props.disabled,
|
|
188546
|
+
rest = _objectWithoutProperties$1(props, _excluded$1j); // ===================== Disabled =====================
|
|
188516
188547
|
|
|
188548
|
+
|
|
188549
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
188550
|
+
var mergedDisabled = customDisabled || disabled;
|
|
188517
188551
|
return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread({
|
|
188518
188552
|
className: classnames(className, prefixCls$3),
|
|
188553
|
+
disabled: mergedDisabled,
|
|
188519
188554
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
188520
|
-
},
|
|
188555
|
+
}, rest));
|
|
188521
188556
|
};
|
|
188522
188557
|
|
|
188523
188558
|
var CInputNumber = LMInputNumber;
|
|
@@ -285562,6 +285597,71 @@
|
|
|
285562
285597
|
}), fixedColumns.fixedRight);
|
|
285563
285598
|
});
|
|
285564
285599
|
|
|
285600
|
+
// 分组求和计算
|
|
285601
|
+
function calcExpression(item, needCalcKeys) {
|
|
285602
|
+
var _item$children;
|
|
285603
|
+
|
|
285604
|
+
if (item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) {
|
|
285605
|
+
needCalcKeys.forEach(function (dkey) {
|
|
285606
|
+
var sum = 0;
|
|
285607
|
+
|
|
285608
|
+
var _dkey = _slicedToArray$1(dkey, 2),
|
|
285609
|
+
key = _dkey[0],
|
|
285610
|
+
expression = _dkey[1];
|
|
285611
|
+
|
|
285612
|
+
item.children.forEach(function (subItem) {
|
|
285613
|
+
if (key in subItem) {
|
|
285614
|
+
sum += Number(subItem[key]);
|
|
285615
|
+
}
|
|
285616
|
+
});
|
|
285617
|
+
|
|
285618
|
+
if (!sum) {
|
|
285619
|
+
return;
|
|
285620
|
+
}
|
|
285621
|
+
|
|
285622
|
+
if (expression === 'sum') {
|
|
285623
|
+
item[key] = sum;
|
|
285624
|
+
} else if (expression === 'average') {
|
|
285625
|
+
item[key] = sum / item.children.length;
|
|
285626
|
+
}
|
|
285627
|
+
});
|
|
285628
|
+
}
|
|
285629
|
+
}
|
|
285630
|
+
|
|
285631
|
+
/** 行分组 */
|
|
285632
|
+
|
|
285633
|
+
function useGroupDataSource(_ref) {
|
|
285634
|
+
var groupRowKeys = _ref.groupRowKeys,
|
|
285635
|
+
customizeDataSource = _ref.customizeDataSource,
|
|
285636
|
+
columnsRef = _ref.columnsRef;
|
|
285637
|
+
var groupDataSource = React.useMemo(function () {
|
|
285638
|
+
if (!(groupRowKeys === null || groupRowKeys === void 0 ? void 0 : groupRowKeys.length)) {
|
|
285639
|
+
return customizeDataSource;
|
|
285640
|
+
}
|
|
285641
|
+
|
|
285642
|
+
var source = transformWithRowGroup(customizeDataSource, groupRowKeys); // 获取需要计算的key,生成数组
|
|
285643
|
+
|
|
285644
|
+
var needCalcKeys = columnsRef.current.filter(function (col) {
|
|
285645
|
+
return col.expression;
|
|
285646
|
+
}).map(function (col) {
|
|
285647
|
+
return [col.dataIndex, col.expression];
|
|
285648
|
+
});
|
|
285649
|
+
|
|
285650
|
+
var deepChildren = function deepChildren(arr) {
|
|
285651
|
+
arr === null || arr === void 0 ? void 0 : arr.forEach(function (item) {
|
|
285652
|
+
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
285653
|
+
deepChildren(item === null || item === void 0 ? void 0 : item.children);
|
|
285654
|
+
calcExpression(item, needCalcKeys);
|
|
285655
|
+
}
|
|
285656
|
+
});
|
|
285657
|
+
};
|
|
285658
|
+
|
|
285659
|
+
deepChildren(source);
|
|
285660
|
+
return source;
|
|
285661
|
+
}, [customizeDataSource, groupRowKeys]);
|
|
285662
|
+
return [groupDataSource];
|
|
285663
|
+
}
|
|
285664
|
+
|
|
285565
285665
|
var _excluded$29 = ["columns", "dataSource", "autoSize", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "sortOpen", "colSortOpen", "resizeable", "customCheck", "components", "rowSelection", "columnsState", "onChange", "filterChange", "tableRowType", "size", "openSheet", "editSheet", "dataChange", "groupRowKeys", "groupColKeys", "emptyProps"],
|
|
285566
285666
|
_excluded2$w = ["className", "style"],
|
|
285567
285667
|
_excluded3$7 = ["onResize", "width", "onResizeStop"];
|
|
@@ -285698,15 +285798,16 @@
|
|
|
285698
285798
|
}, [customizeColumns]);
|
|
285699
285799
|
/** 行分组 */
|
|
285700
285800
|
|
|
285701
|
-
var
|
|
285702
|
-
|
|
285703
|
-
|
|
285704
|
-
|
|
285705
|
-
|
|
285706
|
-
|
|
285707
|
-
|
|
285801
|
+
var _useGroupDataSource = useGroupDataSource({
|
|
285802
|
+
groupRowKeys: groupRowKeys,
|
|
285803
|
+
customizeDataSource: customizeDataSource,
|
|
285804
|
+
columnsRef: columnsRef
|
|
285805
|
+
}),
|
|
285806
|
+
_useGroupDataSource2 = _slicedToArray$1(_useGroupDataSource, 1),
|
|
285807
|
+
groupDataSource = _useGroupDataSource2[0];
|
|
285708
285808
|
/** 列分组 */
|
|
285709
285809
|
|
|
285810
|
+
|
|
285710
285811
|
var _useMemo = React.useMemo(function () {
|
|
285711
285812
|
if (!(groupColKeys === null || groupColKeys === void 0 ? void 0 : groupColKeys.length)) {
|
|
285712
285813
|
return {
|
|
@@ -287098,12 +287199,7 @@
|
|
|
287098
287199
|
|
|
287099
287200
|
return React.useCallback(function () {
|
|
287100
287201
|
var fn = handlerRef.current;
|
|
287101
|
-
|
|
287102
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
287103
|
-
args[_key] = arguments[_key];
|
|
287104
|
-
}
|
|
287105
|
-
|
|
287106
|
-
return fn === null || fn === void 0 ? void 0 : fn.apply(void 0, args);
|
|
287202
|
+
return fn.apply(void 0, arguments);
|
|
287107
287203
|
}, []);
|
|
287108
287204
|
}
|
|
287109
287205
|
|
|
@@ -288104,19 +288200,24 @@
|
|
|
288104
288200
|
|
|
288105
288201
|
LMRadio.Button = Radio$1.Button;
|
|
288106
288202
|
|
|
288107
|
-
var _excluded$2h = ["children", "className", "size", "dropdownClassName", "options", "value", "defaultLabel"];
|
|
288203
|
+
var _excluded$2h = ["children", "className", "size", "disabled", "dropdownClassName", "options", "value", "defaultLabel"];
|
|
288108
288204
|
var prefixCls$7 = 'lm_select';
|
|
288109
288205
|
var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
288110
288206
|
var children = props.children,
|
|
288111
288207
|
className = props.className,
|
|
288112
288208
|
customizeSize = props.size,
|
|
288209
|
+
customDisabled = props.disabled,
|
|
288113
288210
|
dropdownClassName = props.dropdownClassName,
|
|
288114
288211
|
options = props.options,
|
|
288115
288212
|
value = props.value,
|
|
288116
288213
|
defaultLabel = props.defaultLabel,
|
|
288117
|
-
|
|
288214
|
+
rest = _objectWithoutProperties$1(props, _excluded$2h); // ===================== Size =====================
|
|
288118
288215
|
|
|
288119
|
-
|
|
288216
|
+
|
|
288217
|
+
var size = customizeSize || React__default['default'].useContext(SizeContext$1) || 'middle'; // ===================== Disabled =====================
|
|
288218
|
+
|
|
288219
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
288220
|
+
var mergedDisabled = customDisabled || disabled; // 当前值是否存于选项中
|
|
288120
288221
|
|
|
288121
288222
|
var hasOption = React.useMemo(function () {
|
|
288122
288223
|
var flag = false;
|
|
@@ -288135,24 +288236,27 @@
|
|
|
288135
288236
|
|
|
288136
288237
|
if (options) {
|
|
288137
288238
|
flag = !!options.some(function (v) {
|
|
288138
|
-
|
|
288239
|
+
var _props$fieldNames$val, _props$fieldNames;
|
|
288240
|
+
|
|
288241
|
+
return v[(_props$fieldNames$val = (_props$fieldNames = props.fieldNames) === null || _props$fieldNames === void 0 ? void 0 : _props$fieldNames.value) !== null && _props$fieldNames$val !== void 0 ? _props$fieldNames$val : 'value'] === value;
|
|
288139
288242
|
});
|
|
288140
288243
|
}
|
|
288141
288244
|
|
|
288142
288245
|
return flag;
|
|
288143
|
-
}, [children, value, options]); // 重组value: 传入value但找不到options项时,展示默认label
|
|
288246
|
+
}, [children, value, options, props.fieldNames]); // 重组value: 传入value但找不到options项时,展示默认label
|
|
288144
288247
|
|
|
288145
288248
|
var resetValue = React.useMemo(function () {
|
|
288146
288249
|
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
288147
288250
|
return value;
|
|
288148
|
-
}, [value, hasOption]);
|
|
288251
|
+
}, [value, defaultLabel, hasOption]);
|
|
288149
288252
|
return /*#__PURE__*/React__default['default'].createElement(Select$2, _objectSpread(_objectSpread({
|
|
288150
288253
|
className: classnames(className, prefixCls$7),
|
|
288151
288254
|
size: size,
|
|
288152
288255
|
ref: ref,
|
|
288153
288256
|
value: resetValue,
|
|
288154
|
-
options: options
|
|
288155
|
-
|
|
288257
|
+
options: options,
|
|
288258
|
+
disabled: mergedDisabled || undefined
|
|
288259
|
+
}, rest), {}, {
|
|
288156
288260
|
dropdownClassName: classnames('lm_select_dropdown', dropdownClassName)
|
|
288157
288261
|
}), children);
|
|
288158
288262
|
});
|
|
@@ -311958,220 +312062,31 @@
|
|
|
311958
312062
|
}, children);
|
|
311959
312063
|
};
|
|
311960
312064
|
|
|
311961
|
-
var DndContainer$2 = /*#__PURE__*/React.memo(DndContainer$1);
|
|
311962
|
-
|
|
311963
312065
|
var SortableBox$1 = function SortableBox(_ref) {
|
|
311964
312066
|
var items = _ref.items,
|
|
311965
312067
|
children = _ref.children;
|
|
311966
312068
|
return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
|
|
311967
312069
|
items: items,
|
|
311968
|
-
strategy:
|
|
312070
|
+
strategy: verticalListSortingStrategy
|
|
311969
312071
|
}, children);
|
|
311970
312072
|
};
|
|
311971
312073
|
|
|
311972
|
-
var
|
|
311973
|
-
|
|
311974
|
-
|
|
311975
|
-
|
|
311976
|
-
|
|
311977
|
-
|
|
311978
|
-
|
|
311979
|
-
return React.useContext(TableContext$2);
|
|
311980
|
-
};
|
|
311981
|
-
|
|
311982
|
-
var initialState$3 = {
|
|
311983
|
-
// 行高度
|
|
311984
|
-
rowHeight: 0,
|
|
311985
|
-
columnsLen: 0,
|
|
311986
|
-
// 总行数
|
|
311987
|
-
totalLen: 0
|
|
311988
|
-
};
|
|
311989
|
-
|
|
311990
|
-
var reducer$5 = function reducer(state, action) {
|
|
311991
|
-
var totalLen = action.totalLen,
|
|
311992
|
-
columnsLen = action.columnsLen,
|
|
311993
|
-
rowHeight = action.rowHeight;
|
|
311994
|
-
|
|
311995
|
-
switch (action.type) {
|
|
311996
|
-
// 数据数量
|
|
311997
|
-
case 'changeTotalLen':
|
|
311998
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
311999
|
-
totalLen: totalLen
|
|
312000
|
-
});
|
|
312001
|
-
// 列数量
|
|
312002
|
-
|
|
312003
|
-
case 'changeColumnsLen':
|
|
312004
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
312005
|
-
columnsLen: columnsLen
|
|
312006
|
-
});
|
|
312007
|
-
// 初始化行高度
|
|
312008
|
-
|
|
312009
|
-
case 'initHeight':
|
|
312010
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
312011
|
-
rowHeight: rowHeight
|
|
312012
|
-
});
|
|
312013
|
-
|
|
312014
|
-
default:
|
|
312015
|
-
throw new Error();
|
|
312016
|
-
}
|
|
312017
|
-
};
|
|
312018
|
-
|
|
312019
|
-
var useRealive$1 = function useRealive() {
|
|
312020
|
-
return React.useReducer(reducer$5, initialState$3);
|
|
312074
|
+
var SortableBox$2 = function SortableBox(_ref) {
|
|
312075
|
+
var items = _ref.items,
|
|
312076
|
+
children = _ref.children;
|
|
312077
|
+
return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
|
|
312078
|
+
items: items,
|
|
312079
|
+
strategy: horizontalListSortingStrategy
|
|
312080
|
+
}, children);
|
|
312021
312081
|
};
|
|
312022
312082
|
|
|
312023
|
-
var
|
|
312024
|
-
var _bodyRef$current, _bodyRef$current2, _tableProps$children$3, _tableProps$children$4;
|
|
312025
|
-
|
|
312026
|
-
var bodyRef = React.useRef(null);
|
|
312027
|
-
|
|
312028
|
-
var _useRealive = useRealive$1(),
|
|
312029
|
-
_useRealive2 = _slicedToArray$1(_useRealive, 2),
|
|
312030
|
-
state = _useRealive2[0],
|
|
312031
|
-
dispatch = _useRealive2[1]; // { totalSize, virtualItems }
|
|
312032
|
-
|
|
312033
|
-
|
|
312034
|
-
var rowVirtual = useVirtual({
|
|
312035
|
-
size: state.totalLen,
|
|
312036
|
-
// 绑定父节点
|
|
312037
|
-
parentRef: {
|
|
312038
|
-
current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current = bodyRef.current) === null || _bodyRef$current === void 0 ? void 0 : _bodyRef$current.parentNode
|
|
312039
|
-
},
|
|
312040
|
-
estimateSize: React__default['default'].useCallback(function () {
|
|
312041
|
-
return state.rowHeight;
|
|
312042
|
-
}, [state.rowHeight]),
|
|
312043
|
-
overscan: 5
|
|
312044
|
-
});
|
|
312045
|
-
var columnVirtual = useVirtual({
|
|
312046
|
-
horizontal: true,
|
|
312047
|
-
size: state.columnsLen,
|
|
312048
|
-
parentRef: {
|
|
312049
|
-
current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current2 = bodyRef.current) === null || _bodyRef$current2 === void 0 ? void 0 : _bodyRef$current2.parentNode
|
|
312050
|
-
},
|
|
312051
|
-
estimateSize: React__default['default'].useCallback(function (i) {
|
|
312052
|
-
var _tableProps$children$, _tableProps$children$2;
|
|
312053
|
-
|
|
312054
|
-
return tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$children$ = tableProps.children[0]) === null || _tableProps$children$ === void 0 ? void 0 : (_tableProps$children$2 = _tableProps$children$.props) === null || _tableProps$children$2 === void 0 ? void 0 : _tableProps$children$2.colWidths[i];
|
|
312055
|
-
}, [(_tableProps$children$3 = tableProps.children[0]) === null || _tableProps$children$3 === void 0 ? void 0 : (_tableProps$children$4 = _tableProps$children$3.props) === null || _tableProps$children$4 === void 0 ? void 0 : _tableProps$children$4.colWidths]),
|
|
312056
|
-
overscan: 5
|
|
312057
|
-
});
|
|
312058
|
-
var instance = {
|
|
312059
|
-
rowVirtual: rowVirtual,
|
|
312060
|
-
columnVirtual: columnVirtual
|
|
312061
|
-
};
|
|
312062
|
-
return /*#__PURE__*/React__default['default'].createElement(TableContext$2.Provider, {
|
|
312063
|
-
value: {
|
|
312064
|
-
state: state,
|
|
312065
|
-
dispatch: dispatch,
|
|
312066
|
-
instance: instance
|
|
312067
|
-
}
|
|
312068
|
-
}, /*#__PURE__*/React__default['default'].createElement("table", _objectSpread({
|
|
312069
|
-
ref: bodyRef
|
|
312070
|
-
}, tableProps)));
|
|
312071
|
-
});
|
|
312072
|
-
|
|
312073
|
-
var _excluded$2Q = ["children"];
|
|
312074
|
-
var VirtualWrapper$1 = /*#__PURE__*/React__default['default'].memo(function (wrapperProps) {
|
|
312075
|
-
var _virtualItems$, _virtualItems;
|
|
312076
|
-
|
|
312077
|
-
var children = wrapperProps.children,
|
|
312078
|
-
resetProps = _objectWithoutProperties$1(wrapperProps, _excluded$2Q);
|
|
312079
|
-
|
|
312080
|
-
var _useStore = useStore$1(),
|
|
312081
|
-
state = _useStore.state,
|
|
312082
|
-
dispatch = _useStore.dispatch,
|
|
312083
|
-
instance = _useStore.instance;
|
|
312084
|
-
|
|
312085
|
-
var _instance$rowVirtual = instance.rowVirtual,
|
|
312086
|
-
virtualItems = _instance$rowVirtual.virtualItems,
|
|
312087
|
-
totalSize = _instance$rowVirtual.totalSize;
|
|
312088
|
-
var contents = React.useMemo(function () {
|
|
312089
|
-
return children[1];
|
|
312090
|
-
}, [children]);
|
|
312091
|
-
var contentsLen = React.useMemo(function () {
|
|
312092
|
-
var _contents$length;
|
|
312093
|
-
|
|
312094
|
-
return (_contents$length = contents === null || contents === void 0 ? void 0 : contents.length) !== null && _contents$length !== void 0 ? _contents$length : 0;
|
|
312095
|
-
}, [contents]);
|
|
312096
|
-
React.useEffect(function () {
|
|
312097
|
-
if (state.totalLen !== contentsLen) {
|
|
312098
|
-
dispatch({
|
|
312099
|
-
type: 'changeTotalLen',
|
|
312100
|
-
totalLen: contentsLen !== null && contentsLen !== void 0 ? contentsLen : 0
|
|
312101
|
-
});
|
|
312102
|
-
}
|
|
312103
|
-
}, [contentsLen, dispatch, state.totalLen]);
|
|
312104
|
-
var paddingTop = virtualItems.length > 0 ? (virtualItems === null || virtualItems === void 0 ? void 0 : (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.start) || 0 : 0;
|
|
312105
|
-
var paddingBottom = virtualItems.length > 0 ? totalSize - ((virtualItems === null || virtualItems === void 0 ? void 0 : (_virtualItems = virtualItems[virtualItems.length - 1]) === null || _virtualItems === void 0 ? void 0 : _virtualItems.end) || 0) : 0;
|
|
312106
|
-
return /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, resetProps), paddingTop > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
312107
|
-
style: {
|
|
312108
|
-
height: "".concat(paddingTop, "px")
|
|
312109
|
-
}
|
|
312110
|
-
})), children[0], virtualItems.map(function (virtualRow) {
|
|
312111
|
-
return contents[virtualRow.index];
|
|
312112
|
-
}), paddingBottom > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
312113
|
-
style: {
|
|
312114
|
-
height: "".concat(paddingBottom, "px")
|
|
312115
|
-
}
|
|
312116
|
-
})));
|
|
312117
|
-
});
|
|
312118
|
-
|
|
312119
|
-
var _excluded$2R = ["children"];
|
|
312120
|
-
var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
|
|
312121
|
-
var children = _ref.children,
|
|
312122
|
-
resetProps = _objectWithoutProperties$1(_ref, _excluded$2R);
|
|
312123
|
-
|
|
312124
|
-
var _useStore = useStore$1(),
|
|
312125
|
-
state = _useStore.state,
|
|
312126
|
-
dispatch = _useStore.dispatch;
|
|
312127
|
-
|
|
312128
|
-
var rowHeight = state.rowHeight,
|
|
312129
|
-
totalLen = state.totalLen;
|
|
312130
|
-
var trRef = React.useRef(null); // 列长度
|
|
312131
|
-
|
|
312132
|
-
var columnsLen = React.useMemo(function () {
|
|
312133
|
-
var _children$length;
|
|
312134
|
-
|
|
312135
|
-
return (_children$length = children === null || children === void 0 ? void 0 : children.length) !== null && _children$length !== void 0 ? _children$length : 0;
|
|
312136
|
-
}, [children]);
|
|
312137
|
-
React.useEffect(function () {
|
|
312138
|
-
if (state.columnsLen !== columnsLen) {
|
|
312139
|
-
dispatch({
|
|
312140
|
-
type: 'changeColumnsLen',
|
|
312141
|
-
columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
|
|
312142
|
-
});
|
|
312143
|
-
}
|
|
312144
|
-
}, [columnsLen, dispatch, state.columnsLen]);
|
|
312145
|
-
React.useEffect(function () {
|
|
312146
|
-
var initHeight = function initHeight(tempRef) {
|
|
312147
|
-
var _tempRef$current;
|
|
312148
|
-
|
|
312149
|
-
if ((tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current = tempRef.current) === null || _tempRef$current === void 0 ? void 0 : _tempRef$current.offsetHeight) && !rowHeight && totalLen) {
|
|
312150
|
-
var _tempRef$current$offs, _tempRef$current2;
|
|
312151
|
-
|
|
312152
|
-
var tempRowHeight = (_tempRef$current$offs = tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current2 = tempRef.current) === null || _tempRef$current2 === void 0 ? void 0 : _tempRef$current2.offsetHeight) !== null && _tempRef$current$offs !== void 0 ? _tempRef$current$offs : 0;
|
|
312153
|
-
dispatch({
|
|
312154
|
-
type: 'initHeight',
|
|
312155
|
-
rowHeight: tempRowHeight
|
|
312156
|
-
});
|
|
312157
|
-
}
|
|
312158
|
-
};
|
|
312159
|
-
|
|
312160
|
-
initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
|
|
312161
|
-
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
312162
|
-
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
|
|
312163
|
-
ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
|
|
312164
|
-
}), children);
|
|
312165
|
-
});
|
|
312166
|
-
|
|
312167
|
-
var _excluded$2S = ["data-row-key", "children", "className", "virtual"];
|
|
312083
|
+
var _excluded$2Q = ["data-row-key", "children", "className"];
|
|
312168
312084
|
|
|
312169
312085
|
var SortableItem$1 = function SortableItem(props) {
|
|
312170
312086
|
var key = props['data-row-key'],
|
|
312171
312087
|
children = props.children,
|
|
312172
312088
|
className = props.className,
|
|
312173
|
-
|
|
312174
|
-
resetField = _objectWithoutProperties$1(props, _excluded$2S);
|
|
312089
|
+
resetField = _objectWithoutProperties$1(props, _excluded$2Q);
|
|
312175
312090
|
|
|
312176
312091
|
var _useSortable = useSortable({
|
|
312177
312092
|
id: key
|
|
@@ -312185,36 +312100,25 @@
|
|
|
312185
312100
|
transform: CSS.Transform.toString(transform),
|
|
312186
312101
|
transition: transition
|
|
312187
312102
|
};
|
|
312188
|
-
|
|
312189
|
-
if (!virtual) {
|
|
312190
|
-
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
|
|
312191
|
-
ref: setNodeRef,
|
|
312192
|
-
key: key,
|
|
312193
|
-
style: style
|
|
312194
|
-
}, attributes), children);
|
|
312195
|
-
}
|
|
312196
|
-
|
|
312197
|
-
return /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread(_objectSpread({}, resetField), {}, {
|
|
312103
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
|
|
312198
312104
|
ref: setNodeRef,
|
|
312199
312105
|
key: key,
|
|
312200
312106
|
style: style
|
|
312201
312107
|
}, attributes), children);
|
|
312202
312108
|
};
|
|
312203
312109
|
|
|
312204
|
-
var
|
|
312205
|
-
|
|
312206
|
-
var _excluded$2T = ["children"];
|
|
312110
|
+
var _excluded$2R = ["children"];
|
|
312207
312111
|
var Item$5 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
312208
312112
|
var _children$props;
|
|
312209
312113
|
|
|
312210
312114
|
var children = _ref.children,
|
|
312211
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
312115
|
+
props = _objectWithoutProperties$1(_ref, _excluded$2R);
|
|
312212
312116
|
|
|
312213
312117
|
return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread(_objectSpread({}, props), {}, {
|
|
312214
312118
|
ref: ref
|
|
312215
312119
|
}), (children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.children) || children);
|
|
312216
312120
|
});
|
|
312217
|
-
function SortableItem$
|
|
312121
|
+
function SortableItem$2(props) {
|
|
312218
312122
|
var _useSortable = useSortable({
|
|
312219
312123
|
id: props.id
|
|
312220
312124
|
}),
|
|
@@ -312314,92 +312218,19 @@
|
|
|
312314
312218
|
});
|
|
312315
312219
|
return res;
|
|
312316
312220
|
}
|
|
312317
|
-
function getExpandStatus(children) {
|
|
312318
|
-
var _children$2, _children$2$props, _children$2$props$chi, _children$2$props$chi2, _children$2$props$chi3;
|
|
312319
|
-
|
|
312320
|
-
return isExpandRow(children) ? children === null || children === void 0 ? void 0 : (_children$2 = children[0]) === null || _children$2 === void 0 ? void 0 : (_children$2$props = _children$2.props) === null || _children$2$props === void 0 ? void 0 : (_children$2$props$chi = _children$2$props.children) === null || _children$2$props$chi === void 0 ? void 0 : (_children$2$props$chi2 = _children$2$props$chi[1]) === null || _children$2$props$chi2 === void 0 ? void 0 : (_children$2$props$chi3 = _children$2$props$chi2.props) === null || _children$2$props$chi3 === void 0 ? void 0 : _children$2$props$chi3['aria-label'] : '';
|
|
312321
|
-
}
|
|
312322
|
-
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
312323
|
-
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3;
|
|
312324
|
-
|
|
312325
|
-
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
312326
|
-
|
|
312327
|
-
if (!checkExpandStatus) {
|
|
312328
|
-
return false;
|
|
312329
|
-
}
|
|
312330
|
-
|
|
312331
|
-
var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
|
|
312332
|
-
var nextCol = next === null || next === void 0 ? void 0 : next.col;
|
|
312333
|
-
|
|
312334
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed)) && !lodash.isEqual(prev === null || prev === void 0 ? void 0 : prev.style, next === null || next === void 0 ? void 0 : next.style)) {
|
|
312335
|
-
return false;
|
|
312336
|
-
}
|
|
312337
|
-
|
|
312338
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro = prevCol.componentProps) === null || _prevCol$componentPro === void 0 ? void 0 : _prevCol$componentPro.optionOnly) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro = nextCol.componentProps) === null || _nextCol$componentPro === void 0 ? void 0 : _nextCol$componentPro.optionOnly)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro2 = prevCol.componentProps) === null || _prevCol$componentPro2 === void 0 ? void 0 : _prevCol$componentPro2.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro2 = nextCol.componentProps) === null || _nextCol$componentPro2 === void 0 ? void 0 : _nextCol$componentPro2.options)) {
|
|
312339
|
-
// return isEqual(prevCol?.componentProps?.options, nextCol?.componentProps?.options)
|
|
312340
|
-
return false;
|
|
312341
|
-
}
|
|
312342
|
-
|
|
312343
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.order) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.order, nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) {
|
|
312344
|
-
// return isEqual(prevCol?.order, nextCol?.fixed)
|
|
312345
|
-
return false;
|
|
312346
|
-
}
|
|
312347
|
-
|
|
312348
|
-
if (next.className.indexOf('ant-table-selection-column') > -1) {
|
|
312349
|
-
var _prev$children, _prev$children$, _next$children, _next$children$;
|
|
312350
|
-
|
|
312351
|
-
return lodash.isEqual((_prev$children = prev.children) === null || _prev$children === void 0 ? void 0 : (_prev$children$ = _prev$children[1]) === null || _prev$children$ === void 0 ? void 0 : _prev$children$.props, (_next$children = next.children) === null || _next$children === void 0 ? void 0 : (_next$children$ = _next$children[1]) === null || _next$children$ === void 0 ? void 0 : _next$children$.props);
|
|
312352
|
-
}
|
|
312353
|
-
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
312354
|
-
|
|
312355
|
-
|
|
312356
|
-
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro3 = prevCol.componentProps) === null || _prevCol$componentPro3 === void 0 ? void 0 : _prevCol$componentPro3.quickcopy) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro3 = nextCol.componentProps) === null || _nextCol$componentPro3 === void 0 ? void 0 : _nextCol$componentPro3.quickcopy)) {
|
|
312357
|
-
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
312358
|
-
var p = lodash.pick(prev, pickProps);
|
|
312359
|
-
var n = lodash.pick(next, pickProps);
|
|
312360
|
-
return lodash.isEqual(p, n);
|
|
312361
|
-
}
|
|
312362
|
-
|
|
312363
|
-
return true;
|
|
312364
|
-
}
|
|
312365
|
-
|
|
312366
|
-
var SortableBox$2 = function SortableBox(_ref) {
|
|
312367
|
-
var items = _ref.items,
|
|
312368
|
-
children = _ref.children;
|
|
312369
|
-
return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
|
|
312370
|
-
items: items,
|
|
312371
|
-
strategy: verticalListSortingStrategy
|
|
312372
|
-
}, children);
|
|
312373
|
-
};
|
|
312374
|
-
|
|
312375
|
-
var _excluded$2U = ["keys", "onSortEnd", "virtual"];
|
|
312376
|
-
|
|
312377
|
-
var DraggableContainer = function DraggableContainer(_ref) {
|
|
312378
|
-
var keys = _ref.keys,
|
|
312379
|
-
onSortEnd = _ref.onSortEnd,
|
|
312380
|
-
virtual = _ref.virtual,
|
|
312381
|
-
props = _objectWithoutProperties$1(_ref, _excluded$2U);
|
|
312382
|
-
|
|
312383
|
-
return /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
|
|
312384
|
-
move: onSortEnd
|
|
312385
|
-
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
|
|
312386
|
-
items: keys
|
|
312387
|
-
}, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualWrapper$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
|
|
312388
|
-
};
|
|
312389
312221
|
|
|
312390
|
-
var _excluded$
|
|
312222
|
+
var _excluded$2S = ["index"],
|
|
312391
312223
|
_excluded2$I = ["index"],
|
|
312392
312224
|
_excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
|
|
312393
312225
|
_excluded4$1 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "setValid", "reWriteOriginSource"],
|
|
312394
312226
|
_excluded5 = ["onMouseEnter", "onMouseLeave"],
|
|
312395
|
-
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "
|
|
312227
|
+
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
|
|
312396
312228
|
var UploadBtn$1 = UploadOss.UploadBtn;
|
|
312397
312229
|
var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
|
|
312398
312230
|
|
|
312399
312231
|
var EditableRow$1 = function EditableRow(_ref) {
|
|
312400
312232
|
var index = _ref.index,
|
|
312401
|
-
|
|
312402
|
-
props = _objectWithoutProperties$1(_ref, _excluded$2V);
|
|
312233
|
+
props = _objectWithoutProperties$1(_ref, _excluded$2S);
|
|
312403
312234
|
|
|
312404
312235
|
var _Form$useForm = Form$4.useForm(),
|
|
312405
312236
|
_Form$useForm2 = _slicedToArray$1(_Form$useForm, 1),
|
|
@@ -312410,7 +312241,7 @@
|
|
|
312410
312241
|
component: false
|
|
312411
312242
|
}, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
|
|
312412
312243
|
value: form
|
|
312413
|
-
},
|
|
312244
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
|
|
312414
312245
|
};
|
|
312415
312246
|
|
|
312416
312247
|
var EditableSortRow = function EditableSortRow(_ref2) {
|
|
@@ -312426,7 +312257,7 @@
|
|
|
312426
312257
|
component: false
|
|
312427
312258
|
}, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
|
|
312428
312259
|
value: form
|
|
312429
|
-
}, /*#__PURE__*/React__default['default'].createElement(SortableItem$
|
|
312260
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableItem$1, _objectSpread({}, props))));
|
|
312430
312261
|
};
|
|
312431
312262
|
|
|
312432
312263
|
var UploadSingle$1 = function UploadSingle(props) {
|
|
@@ -312596,7 +312427,7 @@
|
|
|
312596
312427
|
}
|
|
312597
312428
|
}), (options === null || options === void 0 ? void 0 : options.includes('add')) && (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/React__default['default'].createElement(Popover$1, {
|
|
312598
312429
|
placement: "bottom",
|
|
312599
|
-
overlayClassName:
|
|
312430
|
+
overlayClassName: 'lm_table_append_add_popover',
|
|
312600
312431
|
open: open,
|
|
312601
312432
|
title: null,
|
|
312602
312433
|
content: /*#__PURE__*/React__default['default'].createElement("ul", null, /*#__PURE__*/React__default['default'].createElement("li", {
|
|
@@ -312627,7 +312458,14 @@
|
|
|
312627
312458
|
return handleAdd(record, (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? true : false);
|
|
312628
312459
|
}
|
|
312629
312460
|
}));
|
|
312630
|
-
};
|
|
312461
|
+
}; // const isValidValue = (verifyValue) => {
|
|
312462
|
+
// const toStringValue = JSON.stringify(verifyValue);
|
|
312463
|
+
// if (verifyValue === undefined || verifyValue === null || verifyValue === '' || toStringValue === '[]' || toStringValue === '{}') {
|
|
312464
|
+
// return false;
|
|
312465
|
+
// }
|
|
312466
|
+
// return true;
|
|
312467
|
+
// }
|
|
312468
|
+
|
|
312631
312469
|
/*
|
|
312632
312470
|
表格单元格
|
|
312633
312471
|
editEnum: 下拉框时的数据数组(非数组时是配置设置)
|
|
@@ -312679,12 +312517,6 @@
|
|
|
312679
312517
|
|
|
312680
312518
|
var inputRef = React.useRef(null);
|
|
312681
312519
|
var form = React.useContext(EditableContext$1);
|
|
312682
|
-
|
|
312683
|
-
var _useState5 = React.useState(false),
|
|
312684
|
-
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
312685
|
-
hoverStatus = _useState6[0],
|
|
312686
|
-
setHoverStatus = _useState6[1];
|
|
312687
|
-
|
|
312688
312520
|
React.useEffect(function () {
|
|
312689
312521
|
if (editing) {
|
|
312690
312522
|
var _inputRef$current;
|
|
@@ -312695,7 +312527,13 @@
|
|
|
312695
312527
|
|
|
312696
312528
|
var toggleEdit = function toggleEdit() {
|
|
312697
312529
|
setEditing(!editing); // form.setFieldsValue({ [dataIndex]: record[dataIndex] });
|
|
312698
|
-
}; //
|
|
312530
|
+
}; // const checkCellRef = useRef(null)
|
|
312531
|
+
// const focusCapturedRef = useRef(false);
|
|
312532
|
+
// const curValue = useMemo(() => {
|
|
312533
|
+
// return record?.dataIndex
|
|
312534
|
+
// }, [record])
|
|
312535
|
+
// const curValueIsValid = isValidValue(curValue);
|
|
312536
|
+
// 校验保存
|
|
312699
312537
|
|
|
312700
312538
|
|
|
312701
312539
|
var save = /*#__PURE__*/function () {
|
|
@@ -312782,15 +312620,15 @@
|
|
|
312782
312620
|
/** 快捷刷子,把当前的所有列的值,刷成当前的选中的列 */
|
|
312783
312621
|
|
|
312784
312622
|
|
|
312785
|
-
var copyKey = function copyKey(e
|
|
312623
|
+
var copyKey = function copyKey(e) {
|
|
312786
312624
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
312787
312625
|
var dataIndex = col.dataIndex;
|
|
312788
|
-
handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex]
|
|
312626
|
+
handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex]);
|
|
312789
312627
|
};
|
|
312790
312628
|
|
|
312791
312629
|
var Control = function Control(con) {
|
|
312792
312630
|
var resultComponentProps = lodash.isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
312793
|
-
var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue'
|
|
312631
|
+
var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue']);
|
|
312794
312632
|
|
|
312795
312633
|
switch (con) {
|
|
312796
312634
|
case 'input':
|
|
@@ -312811,6 +312649,12 @@
|
|
|
312811
312649
|
noStyle: true
|
|
312812
312650
|
}, /*#__PURE__*/React__default['default'].cloneElement(resultComponentProps.addonAfter, {
|
|
312813
312651
|
onChange: handleFormItemChange
|
|
312652
|
+
})) : null,
|
|
312653
|
+
suffix: resultComponentProps.quickcopy ? /*#__PURE__*/React__default['default'].createElement("span", {
|
|
312654
|
+
className: 'lm_table_quickcopy'
|
|
312655
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
312656
|
+
onClick: copyKey,
|
|
312657
|
+
type: 'lmweb-icon_m_brush'
|
|
312814
312658
|
})) : null
|
|
312815
312659
|
}));
|
|
312816
312660
|
|
|
@@ -312893,7 +312737,7 @@
|
|
|
312893
312737
|
|
|
312894
312738
|
case 'switch':
|
|
312895
312739
|
return /*#__PURE__*/React__default['default'].createElement(Switch$2, _objectSpread(_objectSpread({
|
|
312896
|
-
size:
|
|
312740
|
+
size: 'small'
|
|
312897
312741
|
}, clearAttrComponentProps), {}, {
|
|
312898
312742
|
onChange: handleFormItemChange
|
|
312899
312743
|
}));
|
|
@@ -312982,7 +312826,8 @@
|
|
|
312982
312826
|
}
|
|
312983
312827
|
|
|
312984
312828
|
return childNode;
|
|
312985
|
-
}, [col, isEdit, editing, getLength]); //
|
|
312829
|
+
}, [col, isEdit, editing, getLength]); // const [childNode, setChildNode] = useState(getMemoChildNode);
|
|
312830
|
+
// 出现死循环找我
|
|
312986
312831
|
|
|
312987
312832
|
React.useEffect(function () {
|
|
312988
312833
|
var editable = col.editable,
|
|
@@ -312990,54 +312835,22 @@
|
|
|
312990
312835
|
|
|
312991
312836
|
if (isEdit && editable) {
|
|
312992
312837
|
form.setFieldsValue(_defineProperty$1({}, dataIndex, editable === 'date' ? hooks(record[dataIndex]) : record[dataIndex]));
|
|
312993
|
-
}
|
|
312994
|
-
|
|
312995
|
-
|
|
312996
|
-
|
|
312997
|
-
|
|
312998
|
-
|
|
312999
|
-
|
|
313000
|
-
|
|
313001
|
-
setHoverStatus(false);
|
|
313002
|
-
};
|
|
312838
|
+
} // if (
|
|
312839
|
+
// (isEdit && editable && record[dataIndex]) ||
|
|
312840
|
+
// (isHoverEdit && editable && record[dataIndex])
|
|
312841
|
+
// ) {
|
|
312842
|
+
// form.setFieldsValue({
|
|
312843
|
+
// [dataIndex]: editable === 'date' ? moment(record[dataIndex]) : record[dataIndex],
|
|
312844
|
+
// })
|
|
312845
|
+
// }
|
|
313003
312846
|
|
|
312847
|
+
}, [record]);
|
|
313004
312848
|
return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread(_objectSpread({}, lodash.omit(clearProps, ['dataIndex'])), {}, {
|
|
313005
312849
|
className: classnames(clearProps === null || clearProps === void 0 ? void 0 : clearProps.className, 'lm_custom_cell_td'),
|
|
313006
|
-
onMouseEnter: componentProps.quickcopy ? handleTdHover : undefined,
|
|
313007
|
-
onMouseLeave: componentProps.quickcopy ? handleTdMouseOut : undefined,
|
|
313008
312850
|
key: "r".concat(rowIndex, "_c").concat(colIndex)
|
|
313009
|
-
}),
|
|
313010
|
-
className: 'quick_copy_warp quick_copy_up',
|
|
313011
|
-
onClick: function onClick(e) {
|
|
313012
|
-
return copyKey(e, 'up');
|
|
313013
|
-
}
|
|
313014
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
313015
|
-
type: 'lmweb-icon_up'
|
|
313016
|
-
})), getMemoChildNode, hoverStatus && props.rowIndex < props.getLength - 1 && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
313017
|
-
className: 'quick_copy_warp quick_copy_down',
|
|
313018
|
-
onClick: function onClick(e) {
|
|
313019
|
-
return copyKey(e, 'down');
|
|
313020
|
-
}
|
|
313021
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
313022
|
-
type: 'lmweb-icon_down'
|
|
313023
|
-
})));
|
|
312851
|
+
}), getMemoChildNode);
|
|
313024
312852
|
};
|
|
313025
|
-
/** true 不刷新, false 刷新 */
|
|
313026
|
-
|
|
313027
|
-
|
|
313028
|
-
var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
|
|
313029
|
-
var pickProps = ['record', 'colIndex'];
|
|
313030
|
-
var p = lodash.pick(prev, pickProps);
|
|
313031
|
-
var n = lodash.pick(next, pickProps); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313032
312853
|
|
|
313033
|
-
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
313034
|
-
|
|
313035
|
-
if (!checkMemoShouldUploadSpecialFun(prev, next)) {
|
|
313036
|
-
return false;
|
|
313037
|
-
}
|
|
313038
|
-
|
|
313039
|
-
return lodash.isEqual(p, n);
|
|
313040
|
-
});
|
|
313041
312854
|
var EditTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
313042
312855
|
var defaultData = props.value,
|
|
313043
312856
|
columns = props.columns,
|
|
@@ -313054,7 +312867,6 @@
|
|
|
313054
312867
|
_props$quickOpetateCl = props.quickOpetateClearAll,
|
|
313055
312868
|
quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
|
|
313056
312869
|
rowSelection = props.rowSelection,
|
|
313057
|
-
virtual = props.virtual,
|
|
313058
312870
|
sortOpen = props.sortOpen,
|
|
313059
312871
|
colSortOpen = props.colSortOpen,
|
|
313060
312872
|
filterChange = props.filterChange,
|
|
@@ -313062,6 +312874,7 @@
|
|
|
313062
312874
|
size = _props$size === void 0 ? 'small' : _props$size,
|
|
313063
312875
|
recordCreatorProps = props.recordCreatorProps,
|
|
313064
312876
|
_props$shouldUpdate = props.shouldUpdate,
|
|
312877
|
+
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
313065
312878
|
resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
|
|
313066
312879
|
|
|
313067
312880
|
|
|
@@ -313074,15 +312887,20 @@
|
|
|
313074
312887
|
setDataSource = _useControllableValue2[1]; // const [count, setCount] = useState(0);
|
|
313075
312888
|
|
|
313076
312889
|
|
|
313077
|
-
var
|
|
312890
|
+
var _useState5 = React.useState({}),
|
|
312891
|
+
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
312892
|
+
_valid = _useState6[0],
|
|
312893
|
+
setValid = _useState6[1];
|
|
312894
|
+
|
|
312895
|
+
var _useState7 = React.useState([]),
|
|
313078
312896
|
_useState8 = _slicedToArray$1(_useState7, 2),
|
|
313079
|
-
|
|
313080
|
-
|
|
312897
|
+
localRowSelectList = _useState8[0],
|
|
312898
|
+
setLocalRowSelectList = _useState8[1];
|
|
313081
312899
|
|
|
313082
312900
|
var _useState9 = React.useState([]),
|
|
313083
312901
|
_useState10 = _slicedToArray$1(_useState9, 2),
|
|
313084
|
-
|
|
313085
|
-
|
|
312902
|
+
sortEditTable = _useState10[0],
|
|
312903
|
+
setCallBackFalg = _useState10[1];
|
|
313086
312904
|
/** 当前展开的列 */
|
|
313087
312905
|
|
|
313088
312906
|
|
|
@@ -313091,10 +312909,21 @@
|
|
|
313091
312909
|
expandedRowKeys = _useState12[0],
|
|
313092
312910
|
setExpandedRowKeys = _useState12[1];
|
|
313093
312911
|
|
|
313094
|
-
var dataSourceRef = React.useRef(
|
|
313095
|
-
var
|
|
313096
|
-
|
|
313097
|
-
|
|
312912
|
+
var dataSourceRef = React.useRef([]);
|
|
312913
|
+
var sortDataSorceRef = React.useRef([]);
|
|
312914
|
+
var deepDataSourceRef = React.useRef([]);
|
|
312915
|
+
|
|
312916
|
+
var onSortEnd = function onSortEnd(active, over) {
|
|
312917
|
+
var cloneArr = _toConsumableArray$1(dataSourceRef.current);
|
|
312918
|
+
|
|
312919
|
+
var oldIndex = cloneArr.findIndex(function (v) {
|
|
312920
|
+
return v[_rowKey] === active;
|
|
312921
|
+
});
|
|
312922
|
+
var newIndex = cloneArr.findIndex(function (v) {
|
|
312923
|
+
return v[_rowKey] === over;
|
|
312924
|
+
});
|
|
312925
|
+
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
312926
|
+
};
|
|
313098
312927
|
|
|
313099
312928
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
313100
312929
|
var _arrayMove;
|
|
@@ -313132,8 +312961,28 @@
|
|
|
313132
312961
|
});
|
|
313133
312962
|
setDataSource(res); // onChange?.(res)
|
|
313134
312963
|
};
|
|
313135
|
-
/** 本地缓存一个选择数据 */
|
|
313136
312964
|
|
|
312965
|
+
React.useEffect(function () {
|
|
312966
|
+
dataSourceRef.current = dataSource;
|
|
312967
|
+
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
312968
|
+
|
|
312969
|
+
if (sortOpen) {
|
|
312970
|
+
var _sortDataSorceRef$cur;
|
|
312971
|
+
|
|
312972
|
+
var dataSourceKeys = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
312973
|
+
return item[_rowKey];
|
|
312974
|
+
}).join(',');
|
|
312975
|
+
var setCallBackFalgKeys = ((_sortDataSorceRef$cur = sortDataSorceRef.current) === null || _sortDataSorceRef$cur === void 0 ? void 0 : _sortDataSorceRef$cur.map(function (item) {
|
|
312976
|
+
return item[_rowKey];
|
|
312977
|
+
}).join(',')) || '';
|
|
312978
|
+
|
|
312979
|
+
if (dataSourceKeys !== setCallBackFalgKeys) {
|
|
312980
|
+
setCallBackFalg(dataSource);
|
|
312981
|
+
sortDataSorceRef.current = dataSource;
|
|
312982
|
+
}
|
|
312983
|
+
}
|
|
312984
|
+
}, [dataSource]);
|
|
312985
|
+
/** 本地缓存一个选择数据 */
|
|
313137
312986
|
|
|
313138
312987
|
React.useEffect(function () {
|
|
313139
312988
|
if (rowSelection) {
|
|
@@ -313345,12 +313194,10 @@
|
|
|
313345
313194
|
setDataSource(res);
|
|
313346
313195
|
};
|
|
313347
313196
|
|
|
313348
|
-
var handleCopy = function handleCopy(key, value
|
|
313197
|
+
var handleCopy = function handleCopy(key, value) {
|
|
313349
313198
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
313350
|
-
draft === null || draft === void 0 ? void 0 : draft.forEach(function (item
|
|
313351
|
-
|
|
313352
|
-
item[key] = value;
|
|
313353
|
-
}
|
|
313199
|
+
draft === null || draft === void 0 ? void 0 : draft.forEach(function (item) {
|
|
313200
|
+
return item[key] = value;
|
|
313354
313201
|
});
|
|
313355
313202
|
});
|
|
313356
313203
|
setDataSource(res);
|
|
@@ -313417,7 +313264,6 @@
|
|
|
313417
313264
|
width: 48,
|
|
313418
313265
|
maxWidth: 48,
|
|
313419
313266
|
className: 'drag-visible',
|
|
313420
|
-
fixed: 'left',
|
|
313421
313267
|
render: function render(_, record) {
|
|
313422
313268
|
return /*#__PURE__*/React__default['default'].createElement(Dragger$1, {
|
|
313423
313269
|
id: record[_rowKey] || record.id
|
|
@@ -313466,6 +313312,19 @@
|
|
|
313466
313312
|
}
|
|
313467
313313
|
|
|
313468
313314
|
var newCol = _objectSpread(_objectSpread({}, col), {}, {
|
|
313315
|
+
shouldCellUpdate: function shouldCellUpdate(record, prevRecord) {
|
|
313316
|
+
var _col$componentProps2;
|
|
313317
|
+
|
|
313318
|
+
var dataIndex = col.dataIndex,
|
|
313319
|
+
editable = col.editable,
|
|
313320
|
+
relevanceCols = col.relevanceCols;
|
|
313321
|
+
|
|
313322
|
+
if ((col === null || col === void 0 ? void 0 : col.fixed) || hasDisableOptions && hasDisableOptions.includes(dataIndex) || ((_col$componentProps2 = col.componentProps) === null || _col$componentProps2 === void 0 ? void 0 : _col$componentProps2.options) || editable === 'render' || !!relevanceCols || !!shouldUpdate || !!record.children) {
|
|
313323
|
+
return true;
|
|
313324
|
+
}
|
|
313325
|
+
|
|
313326
|
+
return record[dataIndex] !== prevRecord[dataIndex];
|
|
313327
|
+
},
|
|
313469
313328
|
onCell: function onCell(record, rowIndex) {
|
|
313470
313329
|
return {
|
|
313471
313330
|
getLength: dataSource.length,
|
|
@@ -313507,24 +313366,24 @@
|
|
|
313507
313366
|
return mapColumns(col, index);
|
|
313508
313367
|
});
|
|
313509
313368
|
return res;
|
|
313510
|
-
}, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, _toConsumableArray$1(memoOptions)]);
|
|
313369
|
+
}, [columns, isAdd, sortOpen, useQuickOpetate, sortEditTable, dataSource, _toConsumableArray$1(memoOptions)]);
|
|
313370
|
+
var DraggableContainer = React.useCallback(function (_ref9) {
|
|
313371
|
+
var _dataSourceRef$curren2;
|
|
313511
313372
|
|
|
313512
|
-
|
|
313513
|
-
var cloneArr = _toConsumableArray$1(dataSourceRef.current);
|
|
313514
|
-
|
|
313515
|
-
var oldIndex = cloneArr.findIndex(function (v) {
|
|
313516
|
-
return v[_rowKey] === active;
|
|
313517
|
-
});
|
|
313518
|
-
var newIndex = cloneArr.findIndex(function (v) {
|
|
313519
|
-
return v[_rowKey] === over;
|
|
313520
|
-
});
|
|
313521
|
-
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
313522
|
-
};
|
|
313373
|
+
var props = _extends$2({}, _ref9);
|
|
313523
313374
|
|
|
313524
|
-
|
|
313375
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
|
|
313376
|
+
move: onSortEnd
|
|
313377
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
|
|
313378
|
+
items: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
|
|
313379
|
+
return item[_rowKey];
|
|
313380
|
+
})
|
|
313381
|
+
}, /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
|
|
313382
|
+
}, [sortEditTable]);
|
|
313383
|
+
var colDraggableContainer = React.useCallback(function (_ref10) {
|
|
313525
313384
|
var _React$Children;
|
|
313526
313385
|
|
|
313527
|
-
var props = _extends$2({},
|
|
313386
|
+
var props = _extends$2({}, _ref10);
|
|
313528
313387
|
|
|
313529
313388
|
return /*#__PURE__*/React__default['default'].createElement("tr", null, (_React$Children = React__default['default'].Children) === null || _React$Children === void 0 ? void 0 : _React$Children.map(props.children, function (child) {
|
|
313530
313389
|
var _child$props, _child$props$column;
|
|
@@ -313533,11 +313392,39 @@
|
|
|
313533
313392
|
return child;
|
|
313534
313393
|
}
|
|
313535
313394
|
|
|
313536
|
-
return /*#__PURE__*/React__default['default'].createElement(SortableItem$
|
|
313395
|
+
return /*#__PURE__*/React__default['default'].createElement(SortableItem$2, {
|
|
313537
313396
|
id: child.key
|
|
313538
313397
|
}, child);
|
|
313539
313398
|
}));
|
|
313540
313399
|
}, [columns]);
|
|
313400
|
+
var config = React.useMemo(function () {
|
|
313401
|
+
var component = {
|
|
313402
|
+
body: Object.assign({
|
|
313403
|
+
row: sortOpen ? EditableSortRow : EditableRow$1,
|
|
313404
|
+
cell: EditableCell$1
|
|
313405
|
+
}, sortOpen ? {
|
|
313406
|
+
wrapper: DraggableContainer
|
|
313407
|
+
} : {})
|
|
313408
|
+
};
|
|
313409
|
+
|
|
313410
|
+
if (colSortOpen) {
|
|
313411
|
+
component['header'] = {
|
|
313412
|
+
row: colDraggableContainer
|
|
313413
|
+
};
|
|
313414
|
+
}
|
|
313415
|
+
|
|
313416
|
+
return _objectSpread({
|
|
313417
|
+
pagination: false,
|
|
313418
|
+
tableLayout: 'fixed',
|
|
313419
|
+
scroll: {
|
|
313420
|
+
x: '100%'
|
|
313421
|
+
},
|
|
313422
|
+
rowKey: function rowKey(record) {
|
|
313423
|
+
return record[_rowKey] || record.index || Math.random();
|
|
313424
|
+
},
|
|
313425
|
+
components: component
|
|
313426
|
+
}, resetProps);
|
|
313427
|
+
}, [resultColumns, dataSource, sortOpen, colSortOpen, size]);
|
|
313541
313428
|
React.useImperativeHandle(ref, function () {
|
|
313542
313429
|
return {
|
|
313543
313430
|
setRow: handleSave,
|
|
@@ -313549,57 +313436,17 @@
|
|
|
313549
313436
|
var isShowAddAction = React.useMemo(function () {
|
|
313550
313437
|
return isEdit && isAdd || isHoverEdit && isAdd;
|
|
313551
313438
|
}, [isEdit, isAdd, isHoverEdit]);
|
|
313552
|
-
var config = React.useRef(_objectSpread({
|
|
313553
|
-
pagination: false,
|
|
313554
|
-
tableLayout: 'fixed',
|
|
313555
|
-
scroll: {
|
|
313556
|
-
x: '100%'
|
|
313557
|
-
},
|
|
313558
|
-
rowKey: function rowKey(record) {
|
|
313559
|
-
return record[_rowKey] || record.index || Math.random();
|
|
313560
|
-
},
|
|
313561
|
-
components: {
|
|
313562
|
-
table: virtual ? VirtualTable$1 : null,
|
|
313563
|
-
body: Object.assign({
|
|
313564
|
-
row: function row(rowProps) {
|
|
313565
|
-
return sortOpen ? EditableSortRow(_objectSpread(_objectSpread({}, rowProps), {}, {
|
|
313566
|
-
virtual: virtual
|
|
313567
|
-
})) : EditableRow$1(_objectSpread(_objectSpread({}, rowProps), {}, {
|
|
313568
|
-
virtual: virtual
|
|
313569
|
-
}));
|
|
313570
|
-
},
|
|
313571
|
-
cell: MemoEditableCell
|
|
313572
|
-
}, sortOpen ? {
|
|
313573
|
-
wrapper: function wrapper(wrapperProps) {
|
|
313574
|
-
var _dataSourceRef$curren2;
|
|
313575
|
-
|
|
313576
|
-
return DraggableContainer(_objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
313577
|
-
virtual: virtual,
|
|
313578
|
-
keys: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
|
|
313579
|
-
return item[_rowKey];
|
|
313580
|
-
}),
|
|
313581
|
-
onSortEnd: onSortEnd
|
|
313582
|
-
}));
|
|
313583
|
-
}
|
|
313584
|
-
} : virtual ? {
|
|
313585
|
-
wrapper: VirtualWrapper$1
|
|
313586
|
-
} : {}),
|
|
313587
|
-
header: {
|
|
313588
|
-
row: colSortOpen ? colDraggableContainer : null
|
|
313589
|
-
}
|
|
313590
|
-
}
|
|
313591
|
-
}, resetProps));
|
|
313592
313439
|
|
|
313593
313440
|
if (colSortOpen) {
|
|
313594
313441
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
313595
313442
|
className: "lm_editTable_warpper"
|
|
313596
|
-
}, /*#__PURE__*/React__default['default'].createElement(DndContainer$
|
|
313443
|
+
}, /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
|
|
313597
313444
|
move: onColSortEnd
|
|
313598
|
-
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$
|
|
313445
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
|
|
313599
313446
|
items: columns.reduce(function (acc, item) {
|
|
313600
313447
|
return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
|
|
313601
313448
|
}, [])
|
|
313602
|
-
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config
|
|
313449
|
+
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
|
|
313603
313450
|
size: size || 'small',
|
|
313604
313451
|
columns: resultColumns,
|
|
313605
313452
|
rowClassName: "editable-row",
|
|
@@ -313633,7 +313480,7 @@
|
|
|
313633
313480
|
|
|
313634
313481
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
313635
313482
|
className: "lm_editTable_warpper"
|
|
313636
|
-
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config
|
|
313483
|
+
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
|
|
313637
313484
|
size: size || 'small',
|
|
313638
313485
|
columns: resultColumns,
|
|
313639
313486
|
rowClassName: "editable-row",
|
|
@@ -314341,7 +314188,7 @@
|
|
|
314341
314188
|
}
|
|
314342
314189
|
}
|
|
314343
314190
|
|
|
314344
|
-
var _excluded$
|
|
314191
|
+
var _excluded$2T = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
|
|
314345
314192
|
function generateRangePicker$1(generateConfig) {
|
|
314346
314193
|
var RangePicker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
314347
314194
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -314354,7 +314201,7 @@
|
|
|
314354
314201
|
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
314355
314202
|
placeholder = props.placeholder,
|
|
314356
314203
|
customStatus = props.status,
|
|
314357
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
314204
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2T);
|
|
314358
314205
|
|
|
314359
314206
|
var innerRef = React.useRef(null);
|
|
314360
314207
|
|
|
@@ -314454,7 +314301,7 @@
|
|
|
314454
314301
|
return RangePicker$1;
|
|
314455
314302
|
}
|
|
314456
314303
|
|
|
314457
|
-
var _excluded$
|
|
314304
|
+
var _excluded$2U = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
|
|
314458
314305
|
function generatePicker$2(generateConfig) {
|
|
314459
314306
|
function getPicker(picker, displayName) {
|
|
314460
314307
|
var Picker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -314468,7 +314315,7 @@
|
|
|
314468
314315
|
placeholder = props.placeholder,
|
|
314469
314316
|
customDisabled = props.disabled,
|
|
314470
314317
|
customStatus = props.status,
|
|
314471
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
314318
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2U);
|
|
314472
314319
|
|
|
314473
314320
|
warning$6(picker !== 'quarter', displayName, "DatePicker.".concat(displayName, " is legacy usage. Please use DatePicker[picker='").concat(picker, "'] directly."));
|
|
314474
314321
|
|
|
@@ -314690,13 +314537,13 @@
|
|
|
314690
314537
|
return propValue;
|
|
314691
314538
|
};
|
|
314692
314539
|
|
|
314693
|
-
var _excluded$
|
|
314540
|
+
var _excluded$2V = ["prefixCls", "title", "content", "_overlay"];
|
|
314694
314541
|
var Popover$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
314695
314542
|
var customizePrefixCls = _ref.prefixCls,
|
|
314696
314543
|
title = _ref.title,
|
|
314697
314544
|
content = _ref.content,
|
|
314698
314545
|
_overlay = _ref._overlay,
|
|
314699
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
314546
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$2V);
|
|
314700
314547
|
|
|
314701
314548
|
var _React$useContext = React.useContext(ConfigContext),
|
|
314702
314549
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
@@ -315545,7 +315392,7 @@
|
|
|
315545
315392
|
|
|
315546
315393
|
var KeyCode$1 = /*@__PURE__*/getDefaultExportFromCjs(KeyCode_1);
|
|
315547
315394
|
|
|
315548
|
-
var _excluded$
|
|
315395
|
+
var _excluded$2W = ["style", "noStyle", "disabled"];
|
|
315549
315396
|
var inlineStyle$1 = {
|
|
315550
315397
|
border: 0,
|
|
315551
315398
|
background: 'transparent',
|
|
@@ -315574,7 +315421,7 @@
|
|
|
315574
315421
|
var style = props.style,
|
|
315575
315422
|
noStyle = props.noStyle,
|
|
315576
315423
|
disabled = props.disabled,
|
|
315577
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
315424
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2W);
|
|
315578
315425
|
|
|
315579
315426
|
var mergedStyle = {};
|
|
315580
315427
|
|
|
@@ -315785,7 +315632,7 @@
|
|
|
315785
315632
|
}, conditions);
|
|
315786
315633
|
});
|
|
315787
315634
|
|
|
315788
|
-
var _excluded$
|
|
315635
|
+
var _excluded$2X = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
|
|
315789
315636
|
|
|
315790
315637
|
var Typography$2 = function Typography(_ref, ref) {
|
|
315791
315638
|
var customizePrefixCls = _ref.prefixCls,
|
|
@@ -315795,7 +315642,7 @@
|
|
|
315795
315642
|
ariaLabel = _ref['aria-label'],
|
|
315796
315643
|
setContentRef = _ref.setContentRef,
|
|
315797
315644
|
children = _ref.children,
|
|
315798
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
315645
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$2X);
|
|
315799
315646
|
|
|
315800
315647
|
var _React$useContext = React.useContext(ConfigContext),
|
|
315801
315648
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -316038,7 +315885,7 @@
|
|
|
316038
315885
|
EllipsisTooltip$1.displayName = 'EllipsisTooltip';
|
|
316039
315886
|
}
|
|
316040
315887
|
|
|
316041
|
-
var _excluded$
|
|
315888
|
+
var _excluded$2Y = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
|
|
316042
315889
|
|
|
316043
315890
|
function wrapperDecorations$1(_ref, content) {
|
|
316044
315891
|
var mark = _ref.mark,
|
|
@@ -316090,7 +315937,7 @@
|
|
|
316090
315937
|
copyable = props.copyable,
|
|
316091
315938
|
component = props.component,
|
|
316092
315939
|
title = props.title,
|
|
316093
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
315940
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2Y);
|
|
316094
315941
|
|
|
316095
315942
|
var _React$useContext = React.useContext(ConfigContext),
|
|
316096
315943
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -316508,12 +316355,12 @@
|
|
|
316508
316355
|
});
|
|
316509
316356
|
});
|
|
316510
316357
|
|
|
316511
|
-
var _excluded$
|
|
316358
|
+
var _excluded$2Z = ["ellipsis", "rel"];
|
|
316512
316359
|
|
|
316513
316360
|
var Link$2 = function Link(_ref, ref) {
|
|
316514
316361
|
var ellipsis = _ref.ellipsis,
|
|
316515
316362
|
rel = _ref.rel,
|
|
316516
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
316363
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$2Z);
|
|
316517
316364
|
|
|
316518
316365
|
warning$6(_typeof$1(ellipsis) !== 'object', 'Typography.Link', '`ellipsis` only supports boolean value.');
|
|
316519
316366
|
var baseRef = React.useRef(null);
|
|
@@ -316547,11 +316394,11 @@
|
|
|
316547
316394
|
|
|
316548
316395
|
var Paragraph$7 = /*#__PURE__*/React.forwardRef(Paragraph$6);
|
|
316549
316396
|
|
|
316550
|
-
var _excluded$
|
|
316397
|
+
var _excluded$2_ = ["ellipsis"];
|
|
316551
316398
|
|
|
316552
316399
|
var Text$2 = function Text(_ref, ref) {
|
|
316553
316400
|
var ellipsis = _ref.ellipsis,
|
|
316554
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
316401
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$2_);
|
|
316555
316402
|
|
|
316556
316403
|
var mergedEllipsis = React.useMemo(function () {
|
|
316557
316404
|
if (ellipsis && _typeof$1(ellipsis) === 'object') {
|
|
@@ -316571,13 +316418,13 @@
|
|
|
316571
316418
|
|
|
316572
316419
|
var Text$3 = /*#__PURE__*/React.forwardRef(Text$2);
|
|
316573
316420
|
|
|
316574
|
-
var _excluded$
|
|
316421
|
+
var _excluded$2$ = ["level"];
|
|
316575
316422
|
var TITLE_ELE_LIST$1 = tupleNum$1(1, 2, 3, 4, 5);
|
|
316576
316423
|
|
|
316577
316424
|
var Title$3 = function Title(props, ref) {
|
|
316578
316425
|
var _props$level = props.level,
|
|
316579
316426
|
level = _props$level === void 0 ? 1 : _props$level,
|
|
316580
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
316427
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2$);
|
|
316581
316428
|
|
|
316582
316429
|
var component;
|
|
316583
316430
|
|
|
@@ -316682,13 +316529,13 @@
|
|
|
316682
316529
|
RefAutoComplete$1.Option = Option;
|
|
316683
316530
|
RefAutoComplete$1.AntdAutoComplete = RefAutoComplete;
|
|
316684
316531
|
|
|
316685
|
-
var _excluded$
|
|
316532
|
+
var _excluded$30 = ["children", "treeData", "value", "defaultLabel"];
|
|
316686
316533
|
var CLMTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
316687
316534
|
var children = props.children,
|
|
316688
316535
|
treeData = props.treeData,
|
|
316689
316536
|
value = props.value,
|
|
316690
316537
|
defaultLabel = props.defaultLabel,
|
|
316691
|
-
resetProps = _objectWithoutProperties$1(props, _excluded$
|
|
316538
|
+
resetProps = _objectWithoutProperties$1(props, _excluded$30);
|
|
316692
316539
|
|
|
316693
316540
|
var deepChildren = React.useCallback(function (arr) {
|
|
316694
316541
|
var flag = false;
|
|
@@ -316813,7 +316660,7 @@
|
|
|
316813
316660
|
return ErrorBoundary;
|
|
316814
316661
|
}(React.Component);
|
|
316815
316662
|
|
|
316816
|
-
var _excluded$
|
|
316663
|
+
var _excluded$31 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
|
|
316817
316664
|
var iconMapFilled$1 = {
|
|
316818
316665
|
success: CheckCircleFilled$2,
|
|
316819
316666
|
info: InfoCircleFilled$2,
|
|
@@ -316886,7 +316733,7 @@
|
|
|
316886
316733
|
closeIcon = _ref$closeIcon === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined$2, null) : _ref$closeIcon,
|
|
316887
316734
|
action = _ref.action,
|
|
316888
316735
|
duration = _ref.duration,
|
|
316889
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
316736
|
+
props = _objectWithoutProperties$1(_ref, _excluded$31);
|
|
316890
316737
|
|
|
316891
316738
|
var _React$useState = React.useState(false),
|
|
316892
316739
|
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
@@ -317316,7 +317163,7 @@
|
|
|
317316
317163
|
};
|
|
317317
317164
|
};
|
|
317318
317165
|
|
|
317319
|
-
var _excluded$
|
|
317166
|
+
var _excluded$32 = ["className", "onUrge", "onDeleteComment"];
|
|
317320
317167
|
var prefixCls$c = 'lm_approval';
|
|
317321
317168
|
var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
|
|
317322
317169
|
var cacheColorMap = new Map();
|
|
@@ -317724,7 +317571,7 @@
|
|
|
317724
317571
|
onUrge = _props$onUrge === void 0 ? function () {} : _props$onUrge,
|
|
317725
317572
|
_props$onDeleteCommen2 = props.onDeleteComment,
|
|
317726
317573
|
onDeleteComment = _props$onDeleteCommen2 === void 0 ? function () {} : _props$onDeleteCommen2,
|
|
317727
|
-
others = _objectWithoutProperties$1(props, _excluded$
|
|
317574
|
+
others = _objectWithoutProperties$1(props, _excluded$32);
|
|
317728
317575
|
|
|
317729
317576
|
var _useState = React.useState(false),
|
|
317730
317577
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
@@ -319515,7 +319362,7 @@
|
|
|
319515
319362
|
return nodes;
|
|
319516
319363
|
}
|
|
319517
319364
|
|
|
319518
|
-
var _excluded$
|
|
319365
|
+
var _excluded$33 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
|
|
319519
319366
|
_excluded2$J = ["prefixCls", "className"];
|
|
319520
319367
|
var ConfigContext$6 = ConfigProvider$1.ConfigContext;
|
|
319521
319368
|
|
|
@@ -319540,7 +319387,7 @@
|
|
|
319540
319387
|
var defaultExpandAll = _ref2.defaultExpandAll,
|
|
319541
319388
|
defaultExpandParent = _ref2.defaultExpandParent,
|
|
319542
319389
|
defaultExpandedKeys = _ref2.defaultExpandedKeys,
|
|
319543
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
319390
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$33);
|
|
319544
319391
|
|
|
319545
319392
|
// Shift click usage
|
|
319546
319393
|
var lastSelectedKey = React.useRef();
|
|
@@ -320038,11 +319885,11 @@
|
|
|
320038
319885
|
blockNode: false
|
|
320039
319886
|
};
|
|
320040
319887
|
|
|
320041
|
-
var _excluded$
|
|
319888
|
+
var _excluded$34 = ["className"];
|
|
320042
319889
|
var prefixCls$d = 'lm_tree';
|
|
320043
319890
|
var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
320044
319891
|
var className = props.className,
|
|
320045
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
319892
|
+
rest = _objectWithoutProperties$1(props, _excluded$34);
|
|
320046
319893
|
|
|
320047
319894
|
return /*#__PURE__*/React__default['default'].createElement(Tree$2, _objectSpread(_objectSpread({
|
|
320048
319895
|
ref: ref
|
|
@@ -321101,7 +320948,7 @@
|
|
|
321101
320948
|
}, unitNodes);
|
|
321102
320949
|
}
|
|
321103
320950
|
|
|
321104
|
-
var _excluded$
|
|
320951
|
+
var _excluded$35 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
|
|
321105
320952
|
|
|
321106
320953
|
var ScrollNumber$1 = function ScrollNumber(_ref) {
|
|
321107
320954
|
var customizePrefixCls = _ref.prefixCls,
|
|
@@ -321114,7 +320961,7 @@
|
|
|
321114
320961
|
_ref$component = _ref.component,
|
|
321115
320962
|
component = _ref$component === void 0 ? 'sup' : _ref$component,
|
|
321116
320963
|
children = _ref.children,
|
|
321117
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
320964
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$35);
|
|
321118
320965
|
|
|
321119
320966
|
var _React$useContext = React.useContext(ConfigContext$1),
|
|
321120
320967
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
@@ -321164,7 +321011,7 @@
|
|
|
321164
321011
|
return /*#__PURE__*/React.createElement(component, newProps, numberNodes);
|
|
321165
321012
|
};
|
|
321166
321013
|
|
|
321167
|
-
var _excluded$
|
|
321014
|
+
var _excluded$36 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
|
|
321168
321015
|
|
|
321169
321016
|
var Badge$1 = function Badge(_ref) {
|
|
321170
321017
|
var _classNames, _classNames2;
|
|
@@ -321189,7 +321036,7 @@
|
|
|
321189
321036
|
className = _ref.className,
|
|
321190
321037
|
_ref$showZero = _ref.showZero,
|
|
321191
321038
|
showZero = _ref$showZero === void 0 ? false : _ref$showZero,
|
|
321192
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
321039
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$36);
|
|
321193
321040
|
|
|
321194
321041
|
var _React$useContext = React.useContext(ConfigContext$1),
|
|
321195
321042
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -321324,7 +321171,7 @@
|
|
|
321324
321171
|
|
|
321325
321172
|
Badge$1.Ribbon = Ribbon$1;
|
|
321326
321173
|
|
|
321327
|
-
var _excluded$
|
|
321174
|
+
var _excluded$37 = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
|
|
321328
321175
|
|
|
321329
321176
|
var Divider$5 = function Divider(props) {
|
|
321330
321177
|
var _classNames;
|
|
@@ -321343,7 +321190,7 @@
|
|
|
321343
321190
|
children = props.children,
|
|
321344
321191
|
dashed = props.dashed,
|
|
321345
321192
|
plain = props.plain,
|
|
321346
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
321193
|
+
restProps = _objectWithoutProperties$1(props, _excluded$37);
|
|
321347
321194
|
|
|
321348
321195
|
var prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
321349
321196
|
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
|
|
@@ -321721,7 +321568,7 @@
|
|
|
321721
321568
|
}
|
|
321722
321569
|
}; // 状态管理操作
|
|
321723
321570
|
|
|
321724
|
-
var reducer$
|
|
321571
|
+
var reducer$5 = function reducer(state, action) {
|
|
321725
321572
|
var resize = action.resize,
|
|
321726
321573
|
transform = action.transform,
|
|
321727
321574
|
current = action.current;
|
|
@@ -321749,7 +321596,7 @@
|
|
|
321749
321596
|
}
|
|
321750
321597
|
}; // 仅在初始化时触发一次
|
|
321751
321598
|
|
|
321752
|
-
var initialState$
|
|
321599
|
+
var initialState$3 = function initialState(props) {
|
|
321753
321600
|
var initialIndex = props.initialIndex;
|
|
321754
321601
|
return _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
321755
321602
|
currentIndex: initialIndex
|
|
@@ -322100,10 +321947,10 @@
|
|
|
322100
321947
|
var Root = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
322101
321948
|
var bodyRef = React.useRef(null);
|
|
322102
321949
|
var initialState = React.useMemo(function () {
|
|
322103
|
-
return initialState$
|
|
321950
|
+
return initialState$3(props);
|
|
322104
321951
|
}, []);
|
|
322105
321952
|
|
|
322106
|
-
var _useReducer = React.useReducer(reducer$
|
|
321953
|
+
var _useReducer = React.useReducer(reducer$5, initialState),
|
|
322107
321954
|
_useReducer2 = _slicedToArray$1(_useReducer, 2),
|
|
322108
321955
|
state = _useReducer2[0],
|
|
322109
321956
|
dispatch = _useReducer2[1]; // 获取核心Methods
|
|
@@ -322169,7 +322016,7 @@
|
|
|
322169
322016
|
|
|
322170
322017
|
}; // 状态管理操作
|
|
322171
322018
|
|
|
322172
|
-
var reducer$
|
|
322019
|
+
var reducer$6 = function reducer(state, action) {
|
|
322173
322020
|
var result = action.result,
|
|
322174
322021
|
init = action.init;
|
|
322175
322022
|
|
|
@@ -322185,7 +322032,7 @@
|
|
|
322185
322032
|
}
|
|
322186
322033
|
}; // 仅在初始化时触发一次
|
|
322187
322034
|
|
|
322188
|
-
var initialState$
|
|
322035
|
+
var initialState$4 = function initialState() {
|
|
322189
322036
|
return _objectSpread({}, defaultState$1);
|
|
322190
322037
|
};
|
|
322191
322038
|
|
|
@@ -323859,14 +323706,14 @@
|
|
|
323859
323706
|
|
|
323860
323707
|
var Body$1 = /*#__PURE__*/React__default['default'].memo(Index$b);
|
|
323861
323708
|
|
|
323862
|
-
var _excluded$
|
|
323709
|
+
var _excluded$38 = ["value", "onChange", "leftIcon", "rightIcon"];
|
|
323863
323710
|
|
|
323864
323711
|
var ResetSlider = function ResetSlider(_ref) {
|
|
323865
323712
|
var value = _ref.value,
|
|
323866
323713
|
_onChange = _ref.onChange,
|
|
323867
323714
|
leftIcon = _ref.leftIcon,
|
|
323868
323715
|
rightIcon = _ref.rightIcon,
|
|
323869
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
323716
|
+
props = _objectWithoutProperties$1(_ref, _excluded$38);
|
|
323870
323717
|
|
|
323871
323718
|
// 减
|
|
323872
323719
|
var decrement = function decrement() {
|
|
@@ -324020,10 +323867,10 @@
|
|
|
324020
323867
|
|
|
324021
323868
|
var LmBox = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
324022
323869
|
var initialState = React.useMemo(function () {
|
|
324023
|
-
return initialState$
|
|
323870
|
+
return initialState$4();
|
|
324024
323871
|
}, []);
|
|
324025
323872
|
|
|
324026
|
-
var _useReducer = React.useReducer(reducer$
|
|
323873
|
+
var _useReducer = React.useReducer(reducer$6, initialState),
|
|
324027
323874
|
_useReducer2 = _slicedToArray$1(_useReducer, 2),
|
|
324028
323875
|
state = _useReducer2[0],
|
|
324029
323876
|
dispatch = _useReducer2[1]; // 获取核心Methods
|
|
@@ -324086,7 +323933,7 @@
|
|
|
324086
323933
|
|
|
324087
323934
|
}; // 状态管理操作
|
|
324088
323935
|
|
|
324089
|
-
var reducer$
|
|
323936
|
+
var reducer$7 = function reducer(state, action) {
|
|
324090
323937
|
var transform = action.transform,
|
|
324091
323938
|
current = action.current,
|
|
324092
323939
|
visible = action.visible;
|
|
@@ -324119,7 +323966,7 @@
|
|
|
324119
323966
|
}
|
|
324120
323967
|
}; // 仅在初始化时触发一次
|
|
324121
323968
|
|
|
324122
|
-
var initialState$
|
|
323969
|
+
var initialState$5 = function initialState(props) {
|
|
324123
323970
|
var initialIndex = props.initialIndex;
|
|
324124
323971
|
return _objectSpread(_objectSpread({}, defaultState$2), {}, {
|
|
324125
323972
|
currentIndex: initialIndex
|
|
@@ -324511,10 +324358,10 @@
|
|
|
324511
324358
|
var LmImageViewerRoot = function LmImageViewerRoot(props, ref) {
|
|
324512
324359
|
var previewRef = React.useRef(null);
|
|
324513
324360
|
var initialState = React.useMemo(function () {
|
|
324514
|
-
return initialState$
|
|
324361
|
+
return initialState$5(props);
|
|
324515
324362
|
}, []);
|
|
324516
324363
|
|
|
324517
|
-
var _useReducer = React.useReducer(reducer$
|
|
324364
|
+
var _useReducer = React.useReducer(reducer$7, initialState),
|
|
324518
324365
|
_useReducer2 = _slicedToArray$1(_useReducer, 2),
|
|
324519
324366
|
state = _useReducer2[0],
|
|
324520
324367
|
dispatch = _useReducer2[1]; // 获取核心Methods
|
|
@@ -324612,7 +324459,7 @@
|
|
|
324612
324459
|
exports.LeftTable = LeftSide;
|
|
324613
324460
|
exports.List = List$2;
|
|
324614
324461
|
exports.LmEditTable = LmEditTable;
|
|
324615
|
-
exports.LmFilter = LmFilter$
|
|
324462
|
+
exports.LmFilter = LmFilter$1;
|
|
324616
324463
|
exports.LmImgList = LmImgList;
|
|
324617
324464
|
exports.LmSelect = LMSelect;
|
|
324618
324465
|
exports.LmTable = Table$2;
|