linkmore-design 1.1.26 → 1.1.27-alpha.0

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.
Files changed (105) hide show
  1. package/dist/LmEditTable/DndContainer.d.ts +6 -3
  2. package/dist/LmEditTable/EditTable.d.ts +10 -5
  3. package/dist/LmEditTable/components/DraggableContainer.d.ts +10 -0
  4. package/dist/LmEditTable/components/QuickOpetate.d.ts +12 -0
  5. package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  6. package/dist/LmEditTable/components/index.d.ts +16 -0
  7. package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
  8. package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  9. package/dist/LmEditTable/sortableItem.d.ts +3 -2
  10. package/dist/LmEditTable/util.d.ts +7 -0
  11. package/dist/LmEditTable/virtual/VirtualRow.d.ts +7 -0
  12. package/dist/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
  13. package/dist/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  14. package/dist/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  15. package/dist/LmEditTable/virtual/context.d.ts +13 -0
  16. package/dist/LmEditTable/virtual/index.d.ts +4 -0
  17. package/dist/index.d.ts +1 -2
  18. package/dist/index.umd.js +1140 -529
  19. package/dist/index.umd.min.js +8 -8
  20. package/dist/variables.css +65 -0
  21. package/es/InputNumber/index.js +7 -9
  22. package/es/LmEditTable/DndContainer.d.ts +6 -3
  23. package/es/LmEditTable/DndContainer.js +70 -10
  24. package/es/LmEditTable/DragHandle.js +1 -1
  25. package/es/LmEditTable/EditTable.d.ts +10 -5
  26. package/es/LmEditTable/EditTable.js +352 -360
  27. package/es/LmEditTable/components/DraggableContainer.d.ts +10 -0
  28. package/es/LmEditTable/components/DraggableContainer.js +39 -0
  29. package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
  30. package/es/LmEditTable/components/QuickOpetate.js +82 -0
  31. package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  32. package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
  33. package/es/LmEditTable/components/index.d.ts +16 -0
  34. package/es/LmEditTable/components/index.js +7 -0
  35. package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
  36. package/es/LmEditTable/hooks/useForkRef.js +22 -0
  37. package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  38. package/es/LmEditTable/rowSort/DndContainerRow.js +81 -0
  39. package/es/LmEditTable/sortableItem.d.ts +3 -2
  40. package/es/LmEditTable/sortableItem.js +16 -4
  41. package/es/LmEditTable/sortableItemCol.js +40 -10
  42. package/es/LmEditTable/style/index.css +65 -0
  43. package/es/LmEditTable/style/variables.css +65 -0
  44. package/es/LmEditTable/util.d.ts +7 -0
  45. package/es/LmEditTable/util.js +92 -7
  46. package/es/LmEditTable/virtual/VirtualRow.d.ts +7 -0
  47. package/es/LmEditTable/virtual/VirtualRow.js +62 -0
  48. package/es/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
  49. package/es/LmEditTable/virtual/VirtualRowBack.js +100 -0
  50. package/es/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  51. package/es/LmEditTable/virtual/VirtualTable.js +54 -0
  52. package/es/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  53. package/es/LmEditTable/virtual/VirtualWrapper.js +60 -0
  54. package/es/LmEditTable/virtual/context.d.ts +13 -0
  55. package/es/LmEditTable/virtual/context.js +54 -0
  56. package/es/LmEditTable/virtual/index.d.ts +4 -0
  57. package/es/LmEditTable/virtual/index.js +4 -0
  58. package/es/LmFilter/filterFns/index.js +7 -2
  59. package/es/LmTable/virTual/VirtualRow.js +12 -14
  60. package/es/hooks/useEvent/index.js +1 -1
  61. package/es/index.d.ts +1 -2
  62. package/es/styles/variables.css +65 -0
  63. package/lib/InputNumber/index.js +9 -9
  64. package/lib/LmEditTable/DndContainer.d.ts +6 -3
  65. package/lib/LmEditTable/DndContainer.js +74 -9
  66. package/lib/LmEditTable/DragHandle.js +1 -1
  67. package/lib/LmEditTable/EditTable.d.ts +10 -5
  68. package/lib/LmEditTable/EditTable.js +349 -357
  69. package/lib/LmEditTable/components/DraggableContainer.d.ts +10 -0
  70. package/lib/LmEditTable/components/DraggableContainer.js +52 -0
  71. package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
  72. package/lib/LmEditTable/components/QuickOpetate.js +96 -0
  73. package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  74. package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
  75. package/lib/LmEditTable/components/index.d.ts +16 -0
  76. package/lib/LmEditTable/components/index.js +37 -0
  77. package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
  78. package/lib/LmEditTable/hooks/useForkRef.js +29 -0
  79. package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  80. package/lib/LmEditTable/rowSort/DndContainerRow.js +99 -0
  81. package/lib/LmEditTable/sortableItem.d.ts +3 -2
  82. package/lib/LmEditTable/sortableItem.js +19 -5
  83. package/lib/LmEditTable/sortableItemCol.js +37 -8
  84. package/lib/LmEditTable/style/index.css +65 -0
  85. package/lib/LmEditTable/style/variables.css +65 -0
  86. package/lib/LmEditTable/util.d.ts +7 -0
  87. package/lib/LmEditTable/util.js +97 -6
  88. package/lib/LmEditTable/virtual/VirtualRow.d.ts +7 -0
  89. package/lib/LmEditTable/virtual/VirtualRow.js +78 -0
  90. package/lib/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
  91. package/lib/LmEditTable/virtual/VirtualRowBack.js +113 -0
  92. package/lib/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  93. package/lib/LmEditTable/virtual/VirtualTable.js +71 -0
  94. package/lib/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  95. package/lib/LmEditTable/virtual/VirtualWrapper.js +73 -0
  96. package/lib/LmEditTable/virtual/context.d.ts +13 -0
  97. package/lib/LmEditTable/virtual/context.js +64 -0
  98. package/lib/LmEditTable/virtual/index.d.ts +4 -0
  99. package/lib/LmEditTable/virtual/index.js +31 -0
  100. package/lib/LmFilter/filterFns/index.js +7 -2
  101. package/lib/LmTable/virTual/VirtualRow.js +12 -14
  102. package/lib/hooks/useEvent/index.js +1 -1
  103. package/lib/index.d.ts +1 -2
  104. package/lib/styles/variables.css +65 -0
  105. package/package.json +7 -9
package/dist/index.umd.js CHANGED
@@ -92885,7 +92885,12 @@
92885
92885
  fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
92886
92886
  type: item.type,
92887
92887
  value: Array.isArray(itemValue) ? itemValue : [itemValue],
92888
- operator: (item === null || item === void 0 ? void 0 : item.operator) || obj[cur].mode === 'and' ? 'equal' : 'contains'
92888
+
92889
+ /**
92890
+ * and 等同于逻辑关系contains: 选中的值包含所有值
92891
+ * or 等同于逻辑关系in: 选中的值存在于所有值之中
92892
+ */
92893
+ operator: obj[cur].mode === 'and' ? 'contains' : 'in'
92889
92894
  }]);
92890
92895
  }
92891
92896
 
@@ -93055,7 +93060,7 @@
93055
93060
  fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
93056
93061
  type: item.type,
93057
93062
  value: Array.isArray(itemValue) ? itemValue : [itemValue],
93058
- operator: complexFilter[cur].mode === 'and' ? 'equal' : 'contains'
93063
+ operator: complexFilter[cur].mode === 'and' ? 'contains' : 'in'
93059
93064
  };
93060
93065
  }
93061
93066
 
@@ -188742,8 +188747,7 @@
188742
188747
 
188743
188748
  var _excluded$1j = ["children", "className", "disabled", "size"];
188744
188749
  var prefixCls$3 = 'lm_input-number';
188745
-
188746
- var LMInputNumber = function LMInputNumber(props) {
188750
+ var LMInputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {
188747
188751
  var children = props.children,
188748
188752
  className = props.className,
188749
188753
  customDisabled = props.disabled,
@@ -188757,24 +188761,24 @@
188757
188761
  var size = React__default['default'].useContext(SizeContext$1);
188758
188762
  var mergeSize = customizeSize || size;
188759
188763
  return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread(_objectSpread({
188764
+ ref: ref,
188760
188765
  className: classnames(className, prefixCls$3),
188761
188766
  placeholder: "\u8BF7\u8F93\u5165"
188762
188767
  }, rest), {}, {
188763
188768
  size: mergeSize,
188764
188769
  disabled: mergedDisabled
188765
188770
  }));
188766
- };
188767
-
188771
+ });
188768
188772
  var CInputNumber = LMInputNumber;
188769
-
188770
- CInputNumber.Price = function (props) {
188773
+ CInputNumber.Price = /*#__PURE__*/React.forwardRef(function (props, ref) {
188771
188774
  return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread({
188772
188775
  prefix: "\uFFE5",
188776
+ ref: ref,
188773
188777
  formatter: function formatter(value) {
188774
188778
  return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
188775
188779
  }
188776
188780
  }, props));
188777
- };
188781
+ });
188778
188782
 
188779
188783
  var getRenderPropValue = function getRenderPropValue(propValue) {
188780
188784
  if (!propValue) {
@@ -233634,6 +233638,14 @@
233634
233638
  return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
233635
233639
  };
233636
233640
 
233641
+ const restrictToVerticalAxis = ({
233642
+ transform
233643
+ }) => {
233644
+ return { ...transform,
233645
+ x: 0
233646
+ };
233647
+ };
233648
+
233637
233649
  var DndContainer = function DndContainer(_ref) {
233638
233650
  var children = _ref.children,
233639
233651
  move = _ref.move;
@@ -285975,12 +285987,16 @@
285975
285987
  var rowHeight = state.rowHeight,
285976
285988
  totalLen = state.totalLen;
285977
285989
  var virtualItems = instance.columnVirtual.virtualItems;
285978
- var trRef = React.useRef(null); // 列长度
285990
+ var trRef = React.useRef(null); // 非固定列长度
285979
285991
 
285980
285992
  var columnsLen = React.useMemo(function () {
285981
- var _children$length;
285993
+ var _children$filter$leng;
285982
285994
 
285983
- return (_children$length = children === null || children === void 0 ? void 0 : children.length) !== null && _children$length !== void 0 ? _children$length : 0;
285995
+ return (_children$filter$leng = children === null || children === void 0 ? void 0 : children.filter(function (v) {
285996
+ var _v$props, _v$props2;
285997
+
285998
+ return typeof ((_v$props = v.props) === null || _v$props === void 0 ? void 0 : _v$props.fixLeft) !== 'number' && typeof ((_v$props2 = v.props) === null || _v$props2 === void 0 ? void 0 : _v$props2.fixRight) !== 'number';
285999
+ }).length) !== null && _children$filter$leng !== void 0 ? _children$filter$leng : 0; // return children?.length ?? 0
285984
286000
  }, [children]);
285985
286001
  React.useEffect(function () {
285986
286002
  if (state.columnsLen !== columnsLen) {
@@ -286029,26 +286045,20 @@
286029
286045
  fixedRight: [],
286030
286046
  columns: []
286031
286047
  });
286032
- }, [children]); // 截取非固定列
286033
-
286034
- var resetVirtualItems = React.useMemo(function () {
286035
- var fixedLeft = fixedColumns.fixedLeft,
286036
- columns = fixedColumns.columns;
286037
- return virtualItems.slice(fixedLeft.length, fixedLeft.length + columns.length);
286038
- }, [fixedColumns, virtualItems]); // 横线单元格合并
286048
+ }, [children]); // 横线单元格合并
286039
286049
 
286040
286050
  var colSpan = React.useMemo(function () {
286041
- var _resetVirtualItems$;
286051
+ var _virtualItems$;
286042
286052
 
286043
- var startIndex = (resetVirtualItems === null || resetVirtualItems === void 0 ? void 0 : (_resetVirtualItems$ = resetVirtualItems[0]) === null || _resetVirtualItems$ === void 0 ? void 0 : _resetVirtualItems$.index) || 0;
286044
- return startIndex ? startIndex - fixedColumns.fixedLeft.length : startIndex;
286045
- }, [fixedColumns, resetVirtualItems]);
286053
+ return (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.index;
286054
+ }, [virtualItems]);
286055
+ console.log('virtualItems', virtualItems);
286046
286056
  return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
286047
286057
  ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
286048
286058
  }), fixedColumns.fixedLeft, !!colSpan && /*#__PURE__*/React__default['default'].createElement("td", {
286049
286059
  colSpan: colSpan
286050
- }), resetVirtualItems.map(function (virtualCol) {
286051
- return children[virtualCol.index];
286060
+ }), virtualItems.map(function (virtualCol) {
286061
+ return fixedColumns.columns[virtualCol.index];
286052
286062
  }), fixedColumns.fixedRight);
286053
286063
  });
286054
286064
 
@@ -287660,7 +287670,12 @@
287660
287670
 
287661
287671
  return React.useCallback(function () {
287662
287672
  var fn = handlerRef.current;
287663
- return fn.apply(void 0, arguments);
287673
+
287674
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
287675
+ args[_key] = arguments[_key];
287676
+ }
287677
+
287678
+ return fn === null || fn === void 0 ? void 0 : fn.apply(void 0, args);
287664
287679
  }, []);
287665
287680
  }
287666
287681
 
@@ -312649,16 +312664,59 @@
312649
312664
 
312650
312665
  Form$4.Wrapper = Wrapper;
312651
312666
 
312652
- var DndContainer$1 = function DndContainer(_ref) {
312653
- var children = _ref.children,
312654
- move = _ref.move;
312667
+ var DragOver = /*#__PURE__*/React__default['default'].memo(function (_ref) {
312668
+ var instance = _ref.instance;
312669
+ var isDragging = instance.isDragging,
312670
+ activeId = instance.activeId,
312671
+ options = instance.options;
312672
+ var item = activeId && options.find(function (v) {
312673
+ return v.dataIndex === activeId;
312674
+ });
312675
+ return /*#__PURE__*/React__default['default'].createElement(DragOverlay, {
312676
+ adjustScale: false
312677
+ }, isDragging ? /*#__PURE__*/React__default['default'].createElement("div", {
312678
+ className: "lm_editable_col_drag"
312679
+ }, item === null || item === void 0 ? void 0 : item.title) : null);
312680
+ }); // 可拖拽容器
312681
+
312682
+ var DndContainer$1 = function DndContainer(_ref2) {
312683
+ var children = _ref2.children,
312684
+ move = _ref2.move,
312685
+ options = _ref2.options,
312686
+ rowKey = _ref2.rowKey;
312687
+
312688
+ var _React$useState = React__default['default'].useState(false),
312689
+ _React$useState2 = _slicedToArray$1(_React$useState, 2),
312690
+ isDragging = _React$useState2[0],
312691
+ setIsDragging = _React$useState2[1]; // 是否拖拽中
312692
+
312693
+
312694
+ var _React$useState3 = React__default['default'].useState(null),
312695
+ _React$useState4 = _slicedToArray$1(_React$useState3, 2),
312696
+ activeId = _React$useState4[0],
312697
+ setActiveId = _React$useState4[1]; // 是否拖拽中
312698
+
312699
+
312655
312700
  var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
312656
312701
  coordinateGetter: sortableKeyboardCoordinates
312657
- })); // 拖拽结束
312702
+ })); // 开始拖拽
312703
+
312704
+ var handleDragStart = function handleDragStart(_ref3) {
312705
+ var active = _ref3.active;
312706
+ setIsDragging(true);
312707
+
312708
+ if (!active) {
312709
+ return;
312710
+ }
312711
+
312712
+ setActiveId(active.id);
312713
+ }; // 拖拽结束
312714
+
312658
312715
 
312659
312716
  var handleDragEnd = function handleDragEnd(event) {
312660
312717
  var active = event.active,
312661
- over = event.over; // 未移入时触发
312718
+ over = event.over;
312719
+ setActiveId(null); // 未移入时触发
312662
312720
 
312663
312721
  if (!(over === null || over === void 0 ? void 0 : over.id)) {
312664
312722
  return;
@@ -312670,39 +312728,267 @@
312670
312728
  }
312671
312729
  };
312672
312730
 
312731
+ var instance = {
312732
+ isDragging: isDragging,
312733
+ activeId: activeId,
312734
+ options: options,
312735
+ rowKey: rowKey,
312736
+ children: children,
312737
+ move: move,
312738
+ items: options === null || options === void 0 ? void 0 : options.map(function (v) {
312739
+ return v[rowKey];
312740
+ })
312741
+ };
312673
312742
  return /*#__PURE__*/React__default['default'].createElement(DndContext, {
312674
312743
  sensors: sensors,
312675
312744
  collisionDetection: closestCenter,
312745
+ onDragStart: handleDragStart,
312676
312746
  onDragEnd: handleDragEnd,
312747
+ onDragCancel: function onDragCancel() {
312748
+ return setActiveId(null);
312749
+ },
312677
312750
  modifiers: [restrictToParentElement]
312678
- }, children);
312751
+ }, children, /*#__PURE__*/React__default['default'].createElement(DragOver, {
312752
+ instance: instance
312753
+ }));
312679
312754
  };
312680
312755
 
312756
+ var DndContainer$2 = /*#__PURE__*/React.memo(DndContainer$1);
312757
+
312681
312758
  var SortableBox$1 = function SortableBox(_ref) {
312682
312759
  var items = _ref.items,
312683
312760
  children = _ref.children;
312684
312761
  return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
312685
312762
  items: items,
312686
- strategy: verticalListSortingStrategy
312763
+ strategy: horizontalListSortingStrategy
312687
312764
  }, children);
312688
312765
  };
312689
312766
 
312690
- var SortableBox$2 = function SortableBox(_ref) {
312691
- var items = _ref.items,
312692
- children = _ref.children;
312693
- return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
312694
- items: items,
312695
- strategy: horizontalListSortingStrategy
312696
- }, children);
312767
+ var TableContext$2 = /*#__PURE__*/React.createContext({
312768
+ state: null,
312769
+ dispatch: null,
312770
+ instance: {}
312771
+ });
312772
+
312773
+ var useStore$1 = function useStore() {
312774
+ return React.useContext(TableContext$2);
312775
+ };
312776
+
312777
+ var initialState$3 = {
312778
+ // 行高度
312779
+ rowHeight: 0,
312780
+ columnsLen: 0,
312781
+ // 总行数
312782
+ totalLen: 0
312783
+ };
312784
+
312785
+ var reducer$5 = function reducer(state, action) {
312786
+ var totalLen = action.totalLen,
312787
+ columnsLen = action.columnsLen,
312788
+ rowHeight = action.rowHeight;
312789
+
312790
+ switch (action.type) {
312791
+ // 数据数量
312792
+ case 'changeTotalLen':
312793
+ return _objectSpread(_objectSpread({}, state), {}, {
312794
+ totalLen: totalLen
312795
+ });
312796
+ // 列数量
312797
+
312798
+ case 'changeColumnsLen':
312799
+ return _objectSpread(_objectSpread({}, state), {}, {
312800
+ columnsLen: columnsLen
312801
+ });
312802
+ // 初始化行高度
312803
+
312804
+ case 'initHeight':
312805
+ return _objectSpread(_objectSpread({}, state), {}, {
312806
+ rowHeight: rowHeight
312807
+ });
312808
+
312809
+ default:
312810
+ throw new Error();
312811
+ }
312697
312812
  };
312698
312813
 
312699
- var _excluded$2P = ["data-row-key", "children", "className"];
312814
+ var useRealive$1 = function useRealive() {
312815
+ return React.useReducer(reducer$5, initialState$3);
312816
+ };
312817
+
312818
+ var VirtualTable$1 = /*#__PURE__*/React__default['default'].memo(function (tableProps) {
312819
+ var _bodyRef$current, _bodyRef$current2, _tableProps$children$3, _tableProps$children$4;
312820
+
312821
+ var bodyRef = React.useRef(null);
312822
+
312823
+ var _useRealive = useRealive$1(),
312824
+ _useRealive2 = _slicedToArray$1(_useRealive, 2),
312825
+ state = _useRealive2[0],
312826
+ dispatch = _useRealive2[1]; // { totalSize, virtualItems }
312827
+
312828
+
312829
+ var rowVirtual = useVirtual({
312830
+ size: state.totalLen,
312831
+ // 绑定父节点
312832
+ parentRef: {
312833
+ current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current = bodyRef.current) === null || _bodyRef$current === void 0 ? void 0 : _bodyRef$current.parentNode
312834
+ },
312835
+ estimateSize: React__default['default'].useCallback(function () {
312836
+ return state.rowHeight;
312837
+ }, [state.rowHeight]),
312838
+ overscan: 5
312839
+ });
312840
+ var columnVirtual = useVirtual({
312841
+ horizontal: true,
312842
+ size: state.columnsLen,
312843
+ parentRef: {
312844
+ current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current2 = bodyRef.current) === null || _bodyRef$current2 === void 0 ? void 0 : _bodyRef$current2.parentNode
312845
+ },
312846
+ estimateSize: React__default['default'].useCallback(function (i) {
312847
+ var _tableProps$children$, _tableProps$children$2;
312848
+
312849
+ 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];
312850
+ }, [(_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]),
312851
+ overscan: 5
312852
+ });
312853
+ var instance = {
312854
+ rowVirtual: rowVirtual,
312855
+ columnVirtual: columnVirtual
312856
+ };
312857
+ return /*#__PURE__*/React__default['default'].createElement(TableContext$2.Provider, {
312858
+ value: {
312859
+ state: state,
312860
+ dispatch: dispatch,
312861
+ instance: instance
312862
+ }
312863
+ }, /*#__PURE__*/React__default['default'].createElement("table", _objectSpread({
312864
+ ref: bodyRef
312865
+ }, tableProps)));
312866
+ });
312867
+
312868
+ var _excluded$2P = ["children"];
312869
+ var VirtualWrapper$1 = /*#__PURE__*/React__default['default'].memo(function (wrapperProps) {
312870
+ var _virtualItems$, _virtualItems;
312871
+
312872
+ var children = wrapperProps.children,
312873
+ resetProps = _objectWithoutProperties$1(wrapperProps, _excluded$2P);
312874
+
312875
+ var _useStore = useStore$1(),
312876
+ state = _useStore.state,
312877
+ dispatch = _useStore.dispatch,
312878
+ instance = _useStore.instance;
312879
+
312880
+ var _instance$rowVirtual = instance.rowVirtual,
312881
+ virtualItems = _instance$rowVirtual.virtualItems,
312882
+ totalSize = _instance$rowVirtual.totalSize;
312883
+ var contents = React.useMemo(function () {
312884
+ return children[1];
312885
+ }, [children]);
312886
+ var contentsLen = React.useMemo(function () {
312887
+ var _contents$length;
312888
+
312889
+ return (_contents$length = contents === null || contents === void 0 ? void 0 : contents.length) !== null && _contents$length !== void 0 ? _contents$length : 0;
312890
+ }, [contents]);
312891
+ React.useEffect(function () {
312892
+ if (state.totalLen !== contentsLen) {
312893
+ dispatch({
312894
+ type: 'changeTotalLen',
312895
+ totalLen: contentsLen !== null && contentsLen !== void 0 ? contentsLen : 0
312896
+ });
312897
+ }
312898
+ }, [contentsLen, dispatch, state.totalLen]);
312899
+ 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;
312900
+ 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;
312901
+ return /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, resetProps), paddingTop > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
312902
+ style: {
312903
+ height: "".concat(paddingTop, "px")
312904
+ }
312905
+ })), children[0], virtualItems.map(function (virtualRow) {
312906
+ return contents[virtualRow.index];
312907
+ }), paddingBottom > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
312908
+ style: {
312909
+ height: "".concat(paddingBottom, "px")
312910
+ }
312911
+ })));
312912
+ });
312913
+
312914
+ function setRef(ref, value) {
312915
+ if (typeof ref === 'function') {
312916
+ ref(value);
312917
+ } else if (ref) {
312918
+ ref.current = value;
312919
+ }
312920
+ }
312921
+
312922
+ function useForkRef(refA, refB) {
312923
+ return React.useMemo(function () {
312924
+ if (refA == null && refB == null) {
312925
+ return null;
312926
+ }
312927
+
312928
+ return function (refValue) {
312929
+ setRef(refA, refValue);
312930
+ setRef(refB, refValue);
312931
+ };
312932
+ }, [refA, refB]);
312933
+ }
312934
+
312935
+ var _excluded$2Q = ["children", "pref"];
312936
+ var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
312937
+ var children = _ref.children,
312938
+ pref = _ref.pref,
312939
+ resetProps = _objectWithoutProperties$1(_ref, _excluded$2Q);
312940
+
312941
+ var _useStore = useStore$1(),
312942
+ state = _useStore.state,
312943
+ dispatch = _useStore.dispatch;
312944
+
312945
+ var rowHeight = state.rowHeight,
312946
+ totalLen = state.totalLen;
312947
+ var trRef = React.useRef(null); // 列长度
312948
+
312949
+ var columnsLen = React.useMemo(function () {
312950
+ var _children$length;
312951
+
312952
+ return (_children$length = children === null || children === void 0 ? void 0 : children.length) !== null && _children$length !== void 0 ? _children$length : 0;
312953
+ }, [children]);
312954
+ React.useEffect(function () {
312955
+ if (state.columnsLen !== columnsLen) {
312956
+ dispatch({
312957
+ type: 'changeColumnsLen',
312958
+ columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
312959
+ });
312960
+ }
312961
+ }, [columnsLen, dispatch, state.columnsLen]);
312962
+ React.useEffect(function () {
312963
+ var initHeight = function initHeight(tempRef) {
312964
+ var _tempRef$current;
312965
+
312966
+ if ((tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current = tempRef.current) === null || _tempRef$current === void 0 ? void 0 : _tempRef$current.offsetHeight) && !rowHeight && totalLen) {
312967
+ var _tempRef$current$offs, _tempRef$current2;
312968
+
312969
+ 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;
312970
+ dispatch({
312971
+ type: 'initHeight',
312972
+ rowHeight: tempRowHeight
312973
+ });
312974
+ }
312975
+ };
312976
+
312977
+ initHeight(trRef);
312978
+ }, [trRef, dispatch, rowHeight, totalLen, ref]);
312979
+ return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
312980
+ ref: useForkRef(pref, trRef)
312981
+ }), children);
312982
+ });
312983
+
312984
+ var _excluded$2R = ["data-row-key", "children", "className", "virtual"];
312700
312985
 
312701
312986
  var SortableItem$1 = function SortableItem(props) {
312702
312987
  var key = props['data-row-key'],
312703
312988
  children = props.children,
312704
312989
  className = props.className,
312705
- resetField = _objectWithoutProperties$1(props, _excluded$2P);
312990
+ virtual = props.virtual,
312991
+ resetField = _objectWithoutProperties$1(props, _excluded$2R);
312706
312992
 
312707
312993
  var _useSortable = useSortable({
312708
312994
  id: key
@@ -312716,27 +313002,66 @@
312716
313002
  transform: CSS.Transform.toString(transform),
312717
313003
  transition: transition
312718
313004
  };
312719
- return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
313005
+
313006
+ if (!virtual) {
313007
+ return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
313008
+ ref: setNodeRef,
313009
+ key: key,
313010
+ style: style
313011
+ }, attributes), children);
313012
+ }
313013
+
313014
+ return /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread(_objectSpread({}, resetField), {}, {
312720
313015
  ref: setNodeRef,
313016
+ pref: setNodeRef,
312721
313017
  key: key,
312722
313018
  style: style
312723
313019
  }, attributes), children);
312724
313020
  };
312725
313021
 
312726
- var _excluded$2Q = ["children"];
312727
- var Item$5 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
312728
- var _children$props;
313022
+ var SortableItem$2 = /*#__PURE__*/React.memo(SortableItem$1);
313023
+
313024
+ var _excluded$2S = ["children"];
313025
+ // children: React.ReactNode
313026
+ // }
313027
+ // interface ItemInstance {}
313028
+ // @ts-ignore
312729
313029
 
313030
+ var Item$5 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
312730
313031
  var children = _ref.children,
312731
- props = _objectWithoutProperties$1(_ref, _excluded$2Q);
313032
+ props = _objectWithoutProperties$1(_ref, _excluded$2S);
313033
+
313034
+ // const rProps = omit({ ...props, ...children.props }, [
313035
+ // 'isSticky',
313036
+ // 'colStart',
313037
+ // 'colEnd',
313038
+ // 'prefixCls',
313039
+ // 'fixLeft',
313040
+ // 'fixRight',
313041
+ // 'lastFixLeft',
313042
+ // 'firstFixRight',
313043
+ // 'lastFixRight',
313044
+ // 'firstFixLeft',
313045
+ // 'isSticky',
313046
+ // 'additionalProps',
313047
+ // 'rowType',
313048
+ // ])
313049
+ return (
313050
+ /*#__PURE__*/
313051
+ // <th {...rProps} ref={ref as any} />
313052
+ React__default['default'].createElement("th", _objectSpread(_objectSpread(_objectSpread({}, props), children.props), {}, {
313053
+ ref: ref
313054
+ })) // <th {...props} ref={ref as any}>
313055
+ // {(children as any)?.props?.children || children}
313056
+ // </th>
312732
313057
 
312733
- return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread(_objectSpread({}, props), {}, {
312734
- ref: ref
312735
- }), (children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.children) || children);
313058
+ );
312736
313059
  });
312737
- function SortableItem$2(props) {
313060
+ function SortableItem$3(props) {
313061
+ var id = props.id;
313062
+
312738
313063
  var _useSortable = useSortable({
312739
- id: props.id
313064
+ id: id
312740
313065
  }),
312741
313066
  attributes = _useSortable.attributes,
312742
313067
  listeners = _useSortable.listeners,
@@ -312746,7 +313071,9 @@
312746
313071
 
312747
313072
  var style = {
312748
313073
  position: 'relative',
312749
- transform: CSS.Translate.toString(transform),
313074
+ transform: CSS.Translate.toString(transform ? _objectSpread(_objectSpread({}, transform), {}, {
313075
+ y: 0
313076
+ }) : transform),
312750
313077
  transition: transition,
312751
313078
  touchAction: 'none',
312752
313079
  height: '40px',
@@ -312776,7 +313103,7 @@
312776
313103
  touchAction: 'none',
312777
313104
  cursor: 'move'
312778
313105
  },
312779
- className: 'icon_drag' + (isDragging ? 'bing' : '')
313106
+ className: "icon_drag".concat(isDragging ? 'bing' : '')
312780
313107
  }));
312781
313108
  };
312782
313109
 
@@ -312788,19 +313115,20 @@
312788
313115
  function deepDataSourcePreKeys(dataSource, rowKey) {
312789
313116
  var deepDataSource = [];
312790
313117
 
312791
- var eachChildren = function eachChildren(children, preKeys) {
312792
- children === null || children === void 0 ? void 0 : children.forEach(function (item) {
313118
+ var eachChildren = function eachChildren(children, preKeys, deepIds) {
313119
+ children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
312793
313120
  deepDataSource.push(_objectSpread(_objectSpread({}, item), {}, {
312794
- preKeys: [].concat(_toConsumableArray$1(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])
313121
+ preKeys: [].concat(_toConsumableArray$1(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]),
313122
+ _deepIds: [].concat(_toConsumableArray$1(deepIds), [index + 1])
312795
313123
  }));
312796
313124
 
312797
313125
  if (item === null || item === void 0 ? void 0 : item.children) {
312798
- eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat(_toConsumableArray$1(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
313126
+ eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat(_toConsumableArray$1(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]), [].concat(_toConsumableArray$1(deepIds), [index + 1])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
312799
313127
  }
312800
313128
  });
312801
313129
  };
312802
313130
 
312803
- eachChildren(dataSource, []);
313131
+ eachChildren(dataSource, [], []);
312804
313132
  return lodash.keyBy(deepDataSource, rowKey);
312805
313133
  }
312806
313134
  function isExpandRow(children) {
@@ -312832,21 +313160,366 @@
312832
313160
 
312833
313161
  return _objectSpread(_objectSpread({}, v), {}, _defineProperty$1({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
312834
313162
  });
312835
- return res;
313163
+ return res || [];
313164
+ }
313165
+ function getExpandStatus(children) {
313166
+ var _children$2, _children$2$props, _children$2$props$chi, _children$2$props$chi2, _children$2$props$chi3;
313167
+
313168
+ 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'] : '';
313169
+ }
313170
+ function checkMemoShouldUploadSpecialFun(prev, next) {
313171
+ var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3, _prevCol$componentPro4, _nextCol$componentPro4, _prevCol$componentPro5, _nextCol$componentPro5, _prevCol$componentPro6, _nextCol$componentPro6;
313172
+
313173
+ var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
313174
+
313175
+ if (!checkExpandStatus) {
313176
+ return false;
313177
+ }
313178
+
313179
+ var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
313180
+ var nextCol = next === null || next === void 0 ? void 0 : next.col;
313181
+ /** TODO: 使用了自定义render, 是否要判断rowIndex? 这样排序之后,渲染的性能就会变差 */
313182
+
313183
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'children']), lodash.pick(next, ['colIndex', 'record', 'children']))) {
313184
+ return false;
313185
+ }
313186
+
313187
+ if (!(next === null || next === void 0 ? void 0 : next.quickOpetateClearAll) && ((next === null || next === void 0 ? void 0 : next.getLength) < 2 || (prev === null || prev === void 0 ? void 0 : prev.getLength) === 1) && (next === null || next === void 0 ? void 0 : next.dataIndex) === 'lm_edit_opetate') {
313188
+ return false;
313189
+ }
313190
+
313191
+ if (prev.isEdit !== next.isEdit) {
313192
+ return false;
313193
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
313194
+
313195
+
313196
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro = prevCol.componentProps) === null || _prevCol$componentPro === void 0 ? void 0 : _prevCol$componentPro.render) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro = nextCol.componentProps) === null || _nextCol$componentPro === void 0 ? void 0 : _nextCol$componentPro.render)) && (!lodash.isEqual(lodash.omit(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), lodash.omit(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render'])) || !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'rowIndex']), lodash.pick(next, ['colIndex', 'record', 'rowIndex'])))) {
313197
+ return false;
313198
+ }
313199
+
313200
+ 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)) {
313201
+ return false;
313202
+ }
313203
+
313204
+ if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro2 = prevCol.componentProps) === null || _prevCol$componentPro2 === void 0 ? void 0 : _prevCol$componentPro2.optionOnly) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro2 = nextCol.componentProps) === null || _nextCol$componentPro2 === void 0 ? void 0 : _nextCol$componentPro2.optionOnly)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro3 = prevCol.componentProps) === null || _prevCol$componentPro3 === void 0 ? void 0 : _prevCol$componentPro3.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro3 = nextCol.componentProps) === null || _nextCol$componentPro3 === void 0 ? void 0 : _nextCol$componentPro3.options)) {
313205
+ return false;
313206
+ }
313207
+
313208
+ if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro4 = prevCol.componentProps) === null || _prevCol$componentPro4 === void 0 ? void 0 : _prevCol$componentPro4.options) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro4 = nextCol.componentProps) === null || _nextCol$componentPro4 === void 0 ? void 0 : _nextCol$componentPro4.options)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro5 = prevCol.componentProps) === null || _prevCol$componentPro5 === void 0 ? void 0 : _prevCol$componentPro5.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro5 = nextCol.componentProps) === null || _nextCol$componentPro5 === void 0 ? void 0 : _nextCol$componentPro5.options)) {
313209
+ return false;
313210
+ }
313211
+
313212
+ if ((lodash.isFunction(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || lodash.isFunction(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !lodash.isEqual(prevCol.newOptions, nextCol.newOptions) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
313213
+ return false;
313214
+ }
313215
+
313216
+ 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)) {
313217
+ // return isEqual(prevCol?.order, nextCol?.fixed)
313218
+ return false;
313219
+ }
313220
+
313221
+ if (next.className.indexOf('drag-visible') > -1) {
313222
+ return lodash.isEqual(prev.style, next.style);
313223
+ }
313224
+
313225
+ if (next.className.indexOf('ant-table-selection-column') > -1) {
313226
+ var _prev$children, _prev$children$, _next$children, _next$children$;
313227
+
313228
+ 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);
313229
+ }
313230
+ /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
313231
+
313232
+
313233
+ if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro6 = prevCol.componentProps) === null || _prevCol$componentPro6 === void 0 ? void 0 : _prevCol$componentPro6.quickcopy) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro6 = nextCol.componentProps) === null || _nextCol$componentPro6 === void 0 ? void 0 : _nextCol$componentPro6.quickcopy)) {
313234
+ var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
313235
+ var p = lodash.pick(prev, pickProps);
313236
+ var n = lodash.pick(next, pickProps);
313237
+ return lodash.isEqual(p, n);
313238
+ }
313239
+
313240
+ return true;
313241
+ }
313242
+ function checkExpandIconColumnIndex(_ref) {
313243
+ var rowSelection = _ref.rowSelection,
313244
+ sortOpen = _ref.sortOpen,
313245
+ indexCol = _ref.indexCol;
313246
+ var arr = [rowSelection, sortOpen, indexCol].filter(function (item) {
313247
+ return !!item;
313248
+ });
313249
+ return arr.length;
313250
+ }
313251
+
313252
+ var DndContainer$3 = function DndContainer(_ref) {
313253
+ var children = _ref.children,
313254
+ options = _ref.options,
313255
+ move = _ref.move,
313256
+ rowKey = _ref.rowKey,
313257
+ items = _ref.items,
313258
+ tableWidth = _ref.tableWidth;
313259
+
313260
+ var _React$useState = React__default['default'].useState(false),
313261
+ _React$useState2 = _slicedToArray$1(_React$useState, 2),
313262
+ isDragging = _React$useState2[0],
313263
+ setIsDragging = _React$useState2[1]; // 是否拖拽中
313264
+
313265
+
313266
+ var _React$useState3 = React__default['default'].useState(null),
313267
+ _React$useState4 = _slicedToArray$1(_React$useState3, 2),
313268
+ activeId = _React$useState4[0],
313269
+ setActiveId = _React$useState4[1]; // 是否拖拽中
313270
+
313271
+
313272
+ var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
313273
+ coordinateGetter: sortableKeyboardCoordinates
313274
+ })); // 开始拖拽
313275
+
313276
+ var handleDragStart = function handleDragStart(_ref2) {
313277
+ var active = _ref2.active;
313278
+ setIsDragging(true);
313279
+
313280
+ if (!active) {
313281
+ return;
313282
+ }
313283
+
313284
+ setActiveId(active.id);
313285
+ }; // 拖拽结束
313286
+
313287
+
313288
+ var handleDragEnd = function handleDragEnd(event) {
313289
+ var active = event.active,
313290
+ over = event.over;
313291
+ setActiveId(null); // 未移入时触发
313292
+
313293
+ if (!(over === null || over === void 0 ? void 0 : over.id)) {
313294
+ return;
313295
+ } // 移入时触发更新数据
313296
+
313297
+
313298
+ if (active.id !== over.id) {
313299
+ move(active.id, over.id);
313300
+ }
313301
+ };
313302
+
313303
+ var instance = {
313304
+ isDragging: isDragging,
313305
+ activeId: activeId,
313306
+ options: options,
313307
+ rowKey: rowKey,
313308
+ children: children,
313309
+ move: move,
313310
+ items: items,
313311
+ tableWidth: tableWidth
313312
+ };
313313
+ console.log('instance', instance);
313314
+ return /*#__PURE__*/React__default['default'].createElement(DndContext, {
313315
+ sensors: sensors,
313316
+ onDragStart: handleDragStart,
313317
+ onDragCancel: function onDragCancel() {
313318
+ return setActiveId(null);
313319
+ },
313320
+ collisionDetection: closestCenter,
313321
+ onDragEnd: handleDragEnd,
313322
+ modifiers: [restrictToParentElement, restrictToVerticalAxis]
313323
+ }, children);
313324
+ };
313325
+
313326
+ var DndContainer$4 = /*#__PURE__*/React.memo(DndContainer$3);
313327
+
313328
+ var SortableBox$2 = function SortableBox(_ref) {
313329
+ var items = _ref.items,
313330
+ children = _ref.children;
313331
+ return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
313332
+ items: items,
313333
+ strategy: verticalListSortingStrategy
313334
+ }, children);
313335
+ };
313336
+
313337
+ var _excluded$2T = ["keys", "onSortEnd", "virtual", "rowKey", "options", "tableWidth"];
313338
+
313339
+ var DraggableContainer = function DraggableContainer(_ref) {
313340
+ var keys = _ref.keys,
313341
+ onSortEnd = _ref.onSortEnd,
313342
+ virtual = _ref.virtual,
313343
+ rowKey = _ref.rowKey,
313344
+ options = _ref.options,
313345
+ tableWidth = _ref.tableWidth,
313346
+ props = _objectWithoutProperties$1(_ref, _excluded$2T);
313347
+
313348
+ return /*#__PURE__*/React__default['default'].createElement(DndContainer$4, {
313349
+ move: onSortEnd,
313350
+ items: keys,
313351
+ rowKey: rowKey,
313352
+ options: options,
313353
+ tableWidth: tableWidth
313354
+ }, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
313355
+ items: keys
313356
+ }, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualWrapper$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
313357
+ };
313358
+
313359
+ var BottomOpetateComponent = function BottomOpetateComponent(props) {
313360
+ var isShowAddAction = props.isShowAddAction,
313361
+ recordCreatorProps = props.recordCreatorProps,
313362
+ handleAdd = props.handleAdd,
313363
+ _props$disabled = props.disabled,
313364
+ disabled = _props$disabled === void 0 ? false : _props$disabled;
313365
+ return isShowAddAction ? /*#__PURE__*/React__default['default'].createElement(LMButton, {
313366
+ className: "lm_editTable_add_bar",
313367
+ type: "dashed",
313368
+ disabled: disabled,
313369
+ onClick: (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.customAddClick) || handleAdd,
313370
+ style: _objectSpread({
313371
+ marginTop: 8
313372
+ }, (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.style) || {})
313373
+ }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
313374
+ type: "lmweb-plus"
313375
+ }), (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.creatorButtonText) || '新增') : null;
313376
+ };
313377
+
313378
+ var getRenderPropValue$1 = function getRenderPropValue(propValue) {
313379
+ if (!propValue) {
313380
+ return null;
313381
+ }
313382
+
313383
+ var isRenderFunction = typeof propValue === 'function';
313384
+
313385
+ if (isRenderFunction) {
313386
+ return propValue();
313387
+ }
313388
+
313389
+ return propValue;
313390
+ };
313391
+
313392
+ var _excluded$2U = ["prefixCls", "title", "content", "_overlay"];
313393
+ var Popover$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
313394
+ var customizePrefixCls = _ref.prefixCls,
313395
+ title = _ref.title,
313396
+ content = _ref.content,
313397
+ _overlay = _ref._overlay,
313398
+ otherProps = _objectWithoutProperties$1(_ref, _excluded$2U);
313399
+
313400
+ var _React$useContext = React.useContext(ConfigContext),
313401
+ getPrefixCls = _React$useContext.getPrefixCls;
313402
+
313403
+ var getOverlay = function getOverlay(prefixCls) {
313404
+ if (!title && !content) return undefined;
313405
+ return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement("div", {
313406
+ className: "".concat(prefixCls, "-title")
313407
+ }, getRenderPropValue$1(title)), /*#__PURE__*/React.createElement("div", {
313408
+ className: "".concat(prefixCls, "-inner-content")
313409
+ }, getRenderPropValue$1(content)));
313410
+ };
313411
+
313412
+ var prefixCls = getPrefixCls('popover', customizePrefixCls);
313413
+ var rootPrefixCls = getPrefixCls();
313414
+ return /*#__PURE__*/React.createElement(Tooltip$4, _objectSpread(_objectSpread({}, otherProps), {}, {
313415
+ prefixCls: prefixCls,
313416
+ ref: ref,
313417
+ overlay: _overlay || getOverlay(prefixCls),
313418
+ transitionName: getTransitionName$9(rootPrefixCls, 'zoom-big', otherProps.transitionName)
313419
+ }));
313420
+ });
313421
+
313422
+ {
313423
+ Popover$1.displayName = 'Popover';
312836
313424
  }
312837
313425
 
312838
- var _excluded$2R = ["index"],
313426
+ Popover$1.defaultProps = {
313427
+ placement: 'top',
313428
+ trigger: 'hover',
313429
+ mouseEnterDelay: 0.1,
313430
+ mouseLeaveDelay: 0.1,
313431
+ overlayStyle: {}
313432
+ };
313433
+ Popover$1.AntdPopover = Popover;
313434
+
313435
+ var QuickOpetate = function QuickOpetate(_ref) {
313436
+ var record = _ref.record,
313437
+ rowKey = _ref.rowKey,
313438
+ handleAdd = _ref.handleAdd,
313439
+ handleDelete = _ref.handleDelete,
313440
+ _ref$options = _ref.options,
313441
+ options = _ref$options === void 0 ? ['add', 'delete'] : _ref$options,
313442
+ getLength = _ref.getLength,
313443
+ quickOpetateClearAll = _ref.quickOpetateClearAll;
313444
+ var disabled = React__default['default'].useContext(DisabledContext$1) || false;
313445
+
313446
+ var appendChildren = function appendChildren() {
313447
+ handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
313448
+ };
313449
+
313450
+ var appendAdd = function appendAdd() {
313451
+ handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
313452
+ };
313453
+
313454
+ return /*#__PURE__*/React__default['default'].createElement("div", {
313455
+ style: {
313456
+ display: 'flex',
313457
+ alignItems: 'center',
313458
+ justifyContent: 'flex-start',
313459
+ marginLeft: '-4px'
313460
+ }
313461
+ }, options.includes('delete') && /*#__PURE__*/React__default['default'].createElement(LMButton, {
313462
+ type: "link",
313463
+ size: "small",
313464
+ disabled: !quickOpetateClearAll && getLength < 2 || disabled,
313465
+ icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
313466
+ type: "lmweb-minus-circle",
313467
+ style: {
313468
+ fontSize: 16
313469
+ }
313470
+ }),
313471
+ onClick: function onClick() {
313472
+ return handleDelete(record[rowKey]);
313473
+ }
313474
+ }), (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, {
313475
+ placement: "bottom",
313476
+ overlayClassName: "lm_table_append_add_popover",
313477
+ open: open,
313478
+ title: null,
313479
+ content: /*#__PURE__*/React__default['default'].createElement("ul", null, /*#__PURE__*/React__default['default'].createElement("li", {
313480
+ onClick: appendAdd
313481
+ }, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/React__default['default'].createElement("li", {
313482
+ onClick: appendChildren
313483
+ }, "\u6DFB\u52A0\u5B50\u7EA7")),
313484
+ trigger: "hover"
313485
+ }, /*#__PURE__*/React__default['default'].createElement(LMButton, {
313486
+ type: "link",
313487
+ size: "small",
313488
+ icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
313489
+ type: "lmweb-plus-circle-fill",
313490
+ style: {
313491
+ fontSize: 16
313492
+ }
313493
+ })
313494
+ })) : (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(LMButton, {
313495
+ type: "link",
313496
+ size: "small",
313497
+ disabled: disabled,
313498
+ icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
313499
+ type: "lmweb-plus-circle-fill",
313500
+ style: {
313501
+ fontSize: 16
313502
+ }
313503
+ }),
313504
+ onClick: function onClick() {
313505
+ return handleAdd(record, !!(options === null || options === void 0 ? void 0 : options.includes('addInChildren')));
313506
+ }
313507
+ }) : null);
313508
+ };
313509
+
313510
+ var _excluded$2V = ["index", "virtual"],
312839
313511
  _excluded2$I = ["index"],
312840
313512
  _excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
312841
- _excluded4$2 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "setValid", "reWriteOriginSource"],
313513
+ _excluded4$2 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps"],
312842
313514
  _excluded5 = ["onMouseEnter", "onMouseLeave"],
312843
- _excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
313515
+ _excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading"];
312844
313516
  var UploadBtn$1 = UploadOss.UploadBtn;
312845
313517
  var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
312846
313518
 
312847
313519
  var EditableRow$1 = function EditableRow(_ref) {
312848
313520
  var index = _ref.index,
312849
- props = _objectWithoutProperties$1(_ref, _excluded$2R);
313521
+ virtual = _ref.virtual,
313522
+ props = _objectWithoutProperties$1(_ref, _excluded$2V);
312850
313523
 
312851
313524
  var _Form$useForm = Form$4.useForm(),
312852
313525
  _Form$useForm2 = _slicedToArray$1(_Form$useForm, 1),
@@ -312857,7 +313530,7 @@
312857
313530
  component: false
312858
313531
  }, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
312859
313532
  value: form
312860
- }, /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
313533
+ }, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
312861
313534
  };
312862
313535
 
312863
313536
  var EditableSortRow = function EditableSortRow(_ref2) {
@@ -312870,10 +313543,11 @@
312870
313543
 
312871
313544
  return /*#__PURE__*/React__default['default'].createElement(Form$4, {
312872
313545
  form: form,
313546
+ disabled: props.disabled || false,
312873
313547
  component: false
312874
313548
  }, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
312875
313549
  value: form
312876
- }, /*#__PURE__*/React__default['default'].createElement(SortableItem$1, _objectSpread({}, props))));
313550
+ }, /*#__PURE__*/React__default['default'].createElement(SortableItem$2, _objectSpread({}, props))));
312877
313551
  };
312878
313552
 
312879
313553
  var UploadSingle$1 = function UploadSingle(props) {
@@ -313000,88 +313674,7 @@
313000
313674
  return handleInput(e, 'next');
313001
313675
  }
313002
313676
  }, editEnum))));
313003
- }; // 操作列
313004
-
313005
-
313006
- var Opetate$1 = function Opetate(_ref4) {
313007
- var record = _ref4.record,
313008
- rowKey = _ref4.rowKey,
313009
- handleAdd = _ref4.handleAdd,
313010
- handleDelete = _ref4.handleDelete,
313011
- _ref4$options = _ref4.options,
313012
- options = _ref4$options === void 0 ? ['add', 'delete'] : _ref4$options,
313013
- getLength = _ref4.getLength,
313014
- quickOpetateClearAll = _ref4.quickOpetateClearAll;
313015
-
313016
- var appendChildren = function appendChildren() {
313017
- handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
313018
- };
313019
-
313020
- var appendAdd = function appendAdd() {
313021
- handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
313022
- };
313023
-
313024
- return /*#__PURE__*/React__default['default'].createElement("div", {
313025
- style: {
313026
- display: 'flex',
313027
- alignItems: 'center',
313028
- justifyContent: 'flex-start',
313029
- marginLeft: '-4px'
313030
- }
313031
- }, options.includes('delete') && /*#__PURE__*/React__default['default'].createElement(LMButton, {
313032
- type: "link",
313033
- size: "small",
313034
- disabled: !quickOpetateClearAll && getLength < 2,
313035
- icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
313036
- type: "lmweb-minus-circle",
313037
- style: {
313038
- fontSize: 16
313039
- }
313040
- }),
313041
- onClick: function onClick() {
313042
- return handleDelete(record[rowKey]);
313043
- }
313044
- }), (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, {
313045
- placement: "bottom",
313046
- overlayClassName: 'lm_table_append_add_popover',
313047
- open: open,
313048
- title: null,
313049
- content: /*#__PURE__*/React__default['default'].createElement("ul", null, /*#__PURE__*/React__default['default'].createElement("li", {
313050
- onClick: appendAdd
313051
- }, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/React__default['default'].createElement("li", {
313052
- onClick: appendChildren
313053
- }, "\u6DFB\u52A0\u5B50\u7EA7")),
313054
- trigger: "hover"
313055
- }, /*#__PURE__*/React__default['default'].createElement(LMButton, {
313056
- type: "link",
313057
- size: "small",
313058
- icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
313059
- type: "lmweb-plus-circle-fill",
313060
- style: {
313061
- fontSize: 16
313062
- }
313063
- })
313064
- })) : (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(LMButton, {
313065
- type: "link",
313066
- size: "small",
313067
- icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
313068
- type: "lmweb-plus-circle-fill",
313069
- style: {
313070
- fontSize: 16
313071
- }
313072
- }),
313073
- onClick: function onClick() {
313074
- return handleAdd(record, (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? true : false);
313075
- }
313076
- }) : null);
313077
- }; // const isValidValue = (verifyValue) => {
313078
- // const toStringValue = JSON.stringify(verifyValue);
313079
- // if (verifyValue === undefined || verifyValue === null || verifyValue === '' || toStringValue === '[]' || toStringValue === '{}') {
313080
- // return false;
313081
- // }
313082
- // return true;
313083
- // }
313084
-
313677
+ };
313085
313678
  /*
313086
313679
  表格单元格
313087
313680
  editEnum: 下拉框时的数据数组(非数组时是配置设置)
@@ -313111,8 +313704,6 @@
313111
313704
  handleDelete = props.handleDelete,
313112
313705
  handleCopy = props.handleCopy,
313113
313706
  itemProps = props.itemProps,
313114
- setValid = props.setValid,
313115
- reWriteOriginSource = props.reWriteOriginSource,
313116
313707
  restProps = _objectWithoutProperties$1(props, _excluded4$2);
313117
313708
  /** 去除移入移出功能,保留最纯粹的功能,优化性能 */
313118
313709
 
@@ -313133,6 +313724,12 @@
313133
313724
 
313134
313725
  var inputRef = React.useRef(null);
313135
313726
  var form = React.useContext(EditableContext$1);
313727
+
313728
+ var _useState5 = React.useState(false),
313729
+ _useState6 = _slicedToArray$1(_useState5, 2),
313730
+ hoverStatus = _useState6[0],
313731
+ setHoverStatus = _useState6[1];
313732
+
313136
313733
  React.useEffect(function () {
313137
313734
  if (editing) {
313138
313735
  var _inputRef$current;
@@ -313143,17 +313740,11 @@
313143
313740
 
313144
313741
  var toggleEdit = function toggleEdit() {
313145
313742
  setEditing(!editing); // form.setFieldsValue({ [dataIndex]: record[dataIndex] });
313146
- }; // const checkCellRef = useRef(null)
313147
- // const focusCapturedRef = useRef(false);
313148
- // const curValue = useMemo(() => {
313149
- // return record?.dataIndex
313150
- // }, [record])
313151
- // const curValueIsValid = isValidValue(curValue);
313152
- // 校验保存
313743
+ }; // 校验保存
313153
313744
 
313154
313745
 
313155
313746
  var save = /*#__PURE__*/function () {
313156
- var _ref5 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(row) {
313747
+ var _ref4 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(row) {
313157
313748
  var values, resultComponentProps;
313158
313749
  return _regeneratorRuntime$1().wrap(function _callee$(_context) {
313159
313750
  while (1) {
@@ -313201,13 +313792,7 @@
313201
313792
  case 13:
313202
313793
  if (col === null || col === void 0 ? void 0 : col.hoverEdit) {
313203
313794
  toggleEdit();
313204
- } // // 清空异常校验
313205
- // setValid((old) => {
313206
- // const obj = { ...old }
313207
- // delete obj[record[rowKey]]
313208
- // return obj
313209
- // })
313210
-
313795
+ }
313211
313796
 
313212
313797
  _context.next = 18;
313213
313798
  break;
@@ -313225,7 +313810,7 @@
313225
313810
  }));
313226
313811
 
313227
313812
  return function save(_x) {
313228
- return _ref5.apply(this, arguments);
313813
+ return _ref4.apply(this, arguments);
313229
313814
  };
313230
313815
  }(); // 触发保存
313231
313816
 
@@ -313236,16 +313821,15 @@
313236
313821
  /** 快捷刷子,把当前的所有列的值,刷成当前的选中的列 */
313237
313822
 
313238
313823
 
313239
- var copyKey = function copyKey(e) {
313824
+ var copyKey = function copyKey(e, type) {
313240
313825
  e === null || e === void 0 ? void 0 : e.stopPropagation();
313241
313826
  var dataIndex = col.dataIndex;
313242
- handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex]);
313827
+ handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex], type, props.rowIndex);
313243
313828
  };
313244
313829
 
313245
313830
  var Control = function Control(con) {
313246
313831
  var _col$newOptions;
313247
313832
 
313248
- // const resultComponentProps = isFunction(componentProps) ? componentProps?.(record, col) : componentProps
313249
313833
  var resultComponentProps = lodash.isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
313250
313834
 
313251
313835
  if (lodash.isFunction(componentProps) && (col === null || col === void 0 ? void 0 : (_col$newOptions = col.newOptions) === null || _col$newOptions === void 0 ? void 0 : _col$newOptions.length)) {
@@ -313254,7 +313838,7 @@
313254
313838
  });
313255
313839
  }
313256
313840
 
313257
- var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue']);
313841
+ var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
313258
313842
 
313259
313843
  switch (con) {
313260
313844
  case 'input':
@@ -313275,19 +313859,12 @@
313275
313859
  noStyle: true
313276
313860
  }, /*#__PURE__*/React__default['default'].cloneElement(resultComponentProps.addonAfter, {
313277
313861
  onChange: handleFormItemChange
313278
- })) : null,
313279
- suffix: resultComponentProps.quickcopy ? /*#__PURE__*/React__default['default'].createElement("span", {
313280
- className: 'lm_table_quickcopy'
313281
- }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
313282
- onClick: copyKey,
313283
- type: 'lmweb-icon_m_brush'
313284
313862
  })) : null
313285
313863
  }));
313286
313864
 
313287
313865
  case 'inputRange':
313288
313866
  return /*#__PURE__*/React__default['default'].createElement(InputRange$1, _objectSpread(_objectSpread({
313289
- onChange: handleFormItemChange,
313290
- ref: inputRef
313867
+ onChange: handleFormItemChange
313291
313868
  }, resultComponentProps), {}, {
313292
313869
  record: record,
313293
313870
  rowIndex: rowIndex,
@@ -313363,7 +313940,7 @@
313363
313940
 
313364
313941
  case 'switch':
313365
313942
  return /*#__PURE__*/React__default['default'].createElement(Switch$2, _objectSpread(_objectSpread({
313366
- size: 'small'
313943
+ size: "small"
313367
313944
  }, clearAttrComponentProps), {}, {
313368
313945
  onChange: handleFormItemChange
313369
313946
  }));
@@ -313377,10 +313954,9 @@
313377
313954
 
313378
313955
  case 'operate':
313379
313956
  case 'lm_edit_opetate':
313380
- return /*#__PURE__*/React__default['default'].createElement(Opetate$1, _objectSpread({
313957
+ return /*#__PURE__*/React__default['default'].createElement(QuickOpetate, _objectSpread({
313381
313958
  record: record,
313382
313959
  rowKey: rowKey,
313383
- ref: inputRef,
313384
313960
  handleAdd: handleTableRowAdd,
313385
313961
  handleDelete: handleTableRowDelete,
313386
313962
  getLength: getLength,
@@ -313394,7 +313970,7 @@
313394
313970
  var fromData = form.getFieldsValue();
313395
313971
  return render === null || render === void 0 ? void 0 : render(_objectSpread(_objectSpread({}, !isObjEmpty(fromData) ? _objectSpread(_objectSpread({}, record), {}, _defineProperty$1({}, dataIndex, fromData[dataIndex])) : record), {}, {
313396
313972
  onChange: save
313397
- }));
313973
+ }), rowIndex);
313398
313974
  }
313399
313975
 
313400
313976
  default:
@@ -313429,7 +314005,8 @@
313429
314005
  valuePropName: editable === 'switch' ? 'checked' : 'value',
313430
314006
  style: {
313431
314007
  margin: 0
313432
- }
314008
+ },
314009
+ noStyle: formProps ? false : true
313433
314010
  }, formProps), {}, {
313434
314011
  name: dataIndex
313435
314012
  }), Control(editable)));
@@ -313441,6 +314018,7 @@
313441
314018
  margin: 0
313442
314019
  }
313443
314020
  }, formProps), {}, {
314021
+ noStyle: formProps ? false : true,
313444
314022
  name: [dataIndex, 'value']
313445
314023
  }), Control(editable)));
313446
314024
  }
@@ -313453,31 +314031,68 @@
313453
314031
  }
313454
314032
 
313455
314033
  return childNode;
313456
- }, [col, isEdit, editing, getLength]); // const [childNode, setChildNode] = useState(getMemoChildNode);
313457
- // 出现死循环找我
314034
+ }, [col, isEdit, editing, getLength, record]); // 出现死循环找我
313458
314035
 
313459
314036
  React.useEffect(function () {
313460
314037
  var editable = col.editable,
313461
314038
  dataIndex = col.dataIndex;
313462
314039
 
313463
314040
  if (isEdit && editable) {
313464
- form.setFieldsValue(_defineProperty$1({}, dataIndex, editable === 'date' ? hooks(record[dataIndex]) : record[dataIndex]));
313465
- } // if (
313466
- // (isEdit && editable && record[dataIndex]) ||
313467
- // (isHoverEdit && editable && record[dataIndex])
313468
- // ) {
313469
- // form.setFieldsValue({
313470
- // [dataIndex]: editable === 'date' ? moment(record[dataIndex]) : record[dataIndex],
313471
- // })
313472
- // }
313473
-
314041
+ form.setFieldsValue(_defineProperty$1({}, dataIndex, editable === 'date' && record[dataIndex] ? hooks(record[dataIndex]) : record[dataIndex]));
314042
+ }
313474
314043
  }, [record]);
314044
+
314045
+ var handleTdHover = function handleTdHover() {
314046
+ setHoverStatus(true);
314047
+ };
314048
+
314049
+ var handleTdMouseOut = function handleTdMouseOut() {
314050
+ setHoverStatus(false);
314051
+ };
314052
+
313475
314053
  return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread(_objectSpread({}, lodash.omit(clearProps, ['dataIndex'])), {}, {
313476
314054
  className: classnames(clearProps === null || clearProps === void 0 ? void 0 : clearProps.className, 'lm_custom_cell_td'),
314055
+ onMouseEnter: componentProps.quickcopy ? handleTdHover : undefined,
314056
+ onMouseLeave: componentProps.quickcopy ? handleTdMouseOut : undefined,
313477
314057
  key: "r".concat(rowIndex, "_c").concat(colIndex)
313478
- }), getMemoChildNode);
314058
+ }), hoverStatus && props.rowIndex > 0 && /*#__PURE__*/React__default['default'].createElement("span", {
314059
+ className: 'quick_copy_warp quick_copy_up',
314060
+ onClick: function onClick(e) {
314061
+ return copyKey(e, 'up');
314062
+ }
314063
+ }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
314064
+ type: 'lmweb-icon_up'
314065
+ })), getMemoChildNode, hoverStatus && props.rowIndex < props.getLength - 1 && /*#__PURE__*/React__default['default'].createElement("span", {
314066
+ className: 'quick_copy_warp quick_copy_down',
314067
+ onClick: function onClick(e) {
314068
+ return copyKey(e, 'down');
314069
+ }
314070
+ }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
314071
+ type: 'lmweb-icon_down'
314072
+ })));
313479
314073
  };
314074
+ /** true 不刷新, false 刷新 */
314075
+
314076
+
314077
+ var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
314078
+ var pickProps = ['record', 'colIndex'];
314079
+ var p = lodash.pick(prev, pickProps);
314080
+ var n = lodash.pick(next, pickProps);
314081
+
314082
+ if (next === null || next === void 0 ? void 0 : next.shouldUpdate) {
314083
+ return false;
314084
+ } // console.log(!checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n), '22', prev.record, next.record)
314085
+ // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
313480
314086
 
314087
+ /** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
314088
+
314089
+
314090
+ if (!checkMemoShouldUploadSpecialFun(prev, next)) {
314091
+ return false;
314092
+ }
314093
+
314094
+ return lodash.isEqual(p, n);
314095
+ });
313481
314096
  var EditTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
313482
314097
  var _localRowSelectList$s2;
313483
314098
 
@@ -313496,16 +314111,21 @@
313496
314111
  _props$quickOpetateCl = props.quickOpetateClearAll,
313497
314112
  quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
313498
314113
  rowSelection = props.rowSelection,
314114
+ virtual = props.virtual,
313499
314115
  sortOpen = props.sortOpen,
314116
+ disabled = props.disabled,
313500
314117
  colSortOpen = props.colSortOpen,
314118
+ _props$indexCol = props.indexCol,
314119
+ indexCol = _props$indexCol === void 0 ? false : _props$indexCol,
313501
314120
  filterChange = props.filterChange,
313502
314121
  _props$size = props.size,
313503
314122
  size = _props$size === void 0 ? 'small' : _props$size,
313504
314123
  recordCreatorProps = props.recordCreatorProps,
313505
314124
  _props$shouldUpdate = props.shouldUpdate,
313506
314125
  shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
313507
- resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
313508
-
314126
+ _props$loading = props.loading,
314127
+ loading = _props$loading === void 0 ? false : _props$loading,
314128
+ resetProps = _objectWithoutProperties$1(props, _excluded6);
313509
314129
 
313510
314130
  var _useControllableValue = useControllableValue({
313511
314131
  value: checkRowKeyByDataSource(props.value, _rowKey),
@@ -313513,14 +314133,7 @@
313513
314133
  }),
313514
314134
  _useControllableValue2 = _slicedToArray$1(_useControllableValue, 2),
313515
314135
  dataSource = _useControllableValue2[0],
313516
- setDataSource = _useControllableValue2[1]; // const [count, setCount] = useState(0);
313517
-
313518
-
313519
- var _useState5 = React.useState({}),
313520
- _useState6 = _slicedToArray$1(_useState5, 2),
313521
- _valid = _useState6[0],
313522
- setValid = _useState6[1]; // const [localRowSelectList, setLocalRowSelectList] = useState([])
313523
-
314136
+ setDataSource = _useControllableValue2[1];
313524
314137
 
313525
314138
  var transformRowSelect = function transformRowSelect(selectedRowKeys, selectedRows, info) {
313526
314139
  var _rowSelection$onChang;
@@ -313537,43 +314150,28 @@
313537
314150
  _useControllableValue4 = _slicedToArray$1(_useControllableValue3, 2),
313538
314151
  localRowSelectList = _useControllableValue4[0],
313539
314152
  setLocalRowSelectList = _useControllableValue4[1];
314153
+ /** TODO: 当前展开的列 */
314154
+
313540
314155
 
313541
314156
  var _useState7 = React.useState([]),
313542
314157
  _useState8 = _slicedToArray$1(_useState7, 2),
313543
- sortEditTable = _useState8[0],
313544
- setCallBackFalg = _useState8[1];
313545
- /** 当前展开的列 */
314158
+ expandedRowKeys = _useState8[0],
314159
+ setExpandedRowKeys = _useState8[1];
313546
314160
 
313547
-
313548
- var _useState9 = React.useState([]),
313549
- _useState10 = _slicedToArray$1(_useState9, 2),
313550
- expandedRowKeys = _useState10[0],
313551
- setExpandedRowKeys = _useState10[1];
313552
-
313553
- var dataSourceRef = React.useRef([]);
313554
- var sortDataSorceRef = React.useRef([]);
313555
- var deepDataSourceRef = React.useRef([]);
313556
-
313557
- var onSortEnd = function onSortEnd(active, over) {
313558
- var cloneArr = _toConsumableArray$1(dataSourceRef.current);
313559
-
313560
- var oldIndex = cloneArr.findIndex(function (v) {
313561
- return v[_rowKey] === active;
313562
- });
313563
- var newIndex = cloneArr.findIndex(function (v) {
313564
- return v[_rowKey] === over;
313565
- });
313566
- setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
313567
- };
314161
+ var dataSourceRef = React.useRef(dataSource);
314162
+ var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
314163
+ dataSourceRef.current = dataSource;
314164
+ deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
314165
+ var tableWarpRef = React.useRef(null);
313568
314166
 
313569
314167
  var onColSortEnd = function onColSortEnd(active, over) {
313570
314168
  var _arrayMove;
313571
314169
 
313572
314170
  var oldIndex = columns.findIndex(function (item) {
313573
- return item['dataIndex'] === active;
314171
+ return item.dataIndex === active;
313574
314172
  });
313575
314173
  var newIndex = columns.findIndex(function (item) {
313576
- return item['dataIndex'] === over;
314174
+ return item.dataIndex === over;
313577
314175
  });
313578
314176
  filterChange === null || filterChange === void 0 ? void 0 : filterChange((_arrayMove = arrayMove(columns, oldIndex, newIndex)) === null || _arrayMove === void 0 ? void 0 : _arrayMove.map(function (item, index) {
313579
314177
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -313586,55 +314184,21 @@
313586
314184
  var handleDelete = function handleDelete(key) {
313587
314185
  var nValue = dataSource.filter(function (item) {
313588
314186
  return item[_rowKey] !== key;
313589
- }); // onChange?.(nValue)
313590
-
314187
+ });
313591
314188
  setDataSource(nValue);
313592
314189
  };
313593
- /** 点击添加按钮添加 */
314190
+ /** 点击底部添加按钮添加 */
313594
314191
 
313595
314192
 
313596
- var handleAdd = function handleAdd(row) {
314193
+ var handleAdd = lodash.debounce(function (row) {
313597
314194
  var _recordCreatorProps$i;
313598
314195
 
313599
314196
  var addDataInfo = lodash.isFunction(recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) ? recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : (_recordCreatorProps$i = recordCreatorProps.initData) === null || _recordCreatorProps$i === void 0 ? void 0 : _recordCreatorProps$i.call(recordCreatorProps) : recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData;
313600
314197
  var res = fn(dataSourceRef.current, function (draft) {
313601
314198
  draft.push(_objectSpread(_defineProperty$1({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
313602
314199
  });
313603
- setDataSource(res); // onChange?.(res)
313604
- };
313605
-
313606
- React.useEffect(function () {
313607
- dataSourceRef.current = dataSource;
313608
- deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
313609
-
313610
- if (sortOpen) {
313611
- var _sortDataSorceRef$cur;
313612
-
313613
- var dataSourceKeys = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
313614
- return item[_rowKey];
313615
- }).join(',');
313616
- var setCallBackFalgKeys = ((_sortDataSorceRef$cur = sortDataSorceRef.current) === null || _sortDataSorceRef$cur === void 0 ? void 0 : _sortDataSorceRef$cur.map(function (item) {
313617
- return item[_rowKey];
313618
- }).join(',')) || '';
313619
-
313620
- if (dataSourceKeys !== setCallBackFalgKeys) {
313621
- setCallBackFalg(dataSource);
313622
- sortDataSorceRef.current = dataSource;
313623
- }
313624
- }
313625
- }, [dataSource]); // /** 本地缓存一个选择数据 */
313626
- // useEffect(() => {
313627
- // if (rowSelection) {
313628
- // const { selectedRowKeys } = rowSelection
313629
- // if (selectedRowKeys) {
313630
- // setLocalRowSelectList(localRowSelectList || [])
313631
- // }
313632
- // }
313633
- // }, [rowSelection])
313634
- // const editTableRowChange = (selectRows) => {
313635
- // setLocalRowSelectList(selectRows);
313636
- // // (rowSelection?.onChange as any)?.(selectRows)
313637
- // }
314200
+ setDataSource(res);
314201
+ }, 40);
313638
314202
 
313639
314203
  var handleSave = function handleSave(row, options) {
313640
314204
  var _deepDataSourceRef$cu, _deepDataSourceRef$cu2;
@@ -313707,25 +314271,26 @@
313707
314271
  }
313708
314272
  });
313709
314273
  setDataSource(res);
313710
- };
313711
-
313712
- var reWriteOriginSource = function reWriteOriginSource(rowKey, rowValue, dataIndex, nextValue) {
313713
- setDataSource(function (prevDataSource) {
313714
- return prevDataSource === null || prevDataSource === void 0 ? void 0 : prevDataSource.map(function (item) {
313715
- if (lodash.get(item, rowKey) === rowValue) {
313716
- lodash.set(item, dataIndex, nextValue);
313717
- }
314274
+ }; // const reWriteOriginSource = (rowKey: string, rowValue, dataIndex: number, nextValue) => {
314275
+ // setDataSource((prevDataSource) => {
314276
+ // return prevDataSource?.map((item) => {
314277
+ // if (get(item, rowKey) === rowValue) {
314278
+ // set(item, dataIndex, nextValue)
314279
+ // }
314280
+ // return item
314281
+ // })
314282
+ // })
314283
+ // }
314284
+ // @ts-ignore
313718
314285
 
313719
- return item;
313720
- });
313721
- });
313722
- }; // @ts-ignore
314286
+ /** 删除当前行 */
313723
314287
 
313724
314288
 
313725
- var handleTableRowDelete = function handleTableRowDelete(key) {
314289
+ var handleTableRowDelete = lodash.debounce(function (key) {
313726
314290
  var _deepDataSourceRef$cu3, _deepDataSourceRef$cu4;
313727
314291
 
313728
- var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu3 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu3 === void 0 ? void 0 : (_deepDataSourceRef$cu4 = _deepDataSourceRef$cu3[key]) === null || _deepDataSourceRef$cu4 === void 0 ? void 0 : _deepDataSourceRef$cu4.preKeys;
314292
+ var rkey = lodash.isObject(key) ? key[_rowKey] : key;
314293
+ var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu3 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu3 === void 0 ? void 0 : (_deepDataSourceRef$cu4 = _deepDataSourceRef$cu3[rkey]) === null || _deepDataSourceRef$cu4 === void 0 ? void 0 : _deepDataSourceRef$cu4.preKeys;
313729
314294
 
313730
314295
  if (preKeys.length > 1) {
313731
314296
  /** 说明删除的是children中的数据 */
@@ -313746,7 +314311,7 @@
313746
314311
  return newData;
313747
314312
  };
313748
314313
 
313749
- var res = filter(dataSource, key);
314314
+ var res = filter(dataSourceRef.current, key);
313750
314315
  setDataSource(res);
313751
314316
  } else {
313752
314317
  var _dataSourceRef$curren;
@@ -313767,32 +314332,74 @@
313767
314332
 
313768
314333
  setDataSource(_res);
313769
314334
  }
313770
- };
313771
- /** 快捷添加 */
313772
314335
 
314336
+ return null;
314337
+ }, 40);
314338
+ /** 替换当前行 */
313773
314339
 
313774
- var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren) {
314340
+ var handleTableRowReplace = lodash.debounce(function (record, defaultRecord) {
313775
314341
  var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
313776
314342
 
313777
- var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu5 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu5 === void 0 ? void 0 : (_deepDataSourceRef$cu6 = _deepDataSourceRef$cu5[record[_rowKey]]) === null || _deepDataSourceRef$cu6 === void 0 ? void 0 : _deepDataSourceRef$cu6.preKeys;
314343
+ var rkey = lodash.isObject(record) ? record[_rowKey] : record;
314344
+ var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu5 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu5 === void 0 ? void 0 : (_deepDataSourceRef$cu6 = _deepDataSourceRef$cu5[rkey]) === null || _deepDataSourceRef$cu6 === void 0 ? void 0 : _deepDataSourceRef$cu6.preKeys; // const res = cloneDeep(dataSourceRef.current)
314345
+
314346
+ var deep = function deep(children) {
314347
+ return children.map(function (item) {
314348
+ if (item[_rowKey] === rkey) {
314349
+ return defaultRecord;
314350
+ } else if (preKeys.includes(item[_rowKey]) && item.children) {
314351
+ var child = deep(item.children);
314352
+ return _objectSpread(_objectSpread({}, item), {}, {
314353
+ children: child
314354
+ });
314355
+ } else {
314356
+ return item;
314357
+ }
314358
+ });
314359
+ };
314360
+
314361
+ var res = deep(dataSourceRef.current);
314362
+ setDataSource(res);
314363
+ }, 40);
314364
+ /** 快捷添加 */
314365
+
314366
+ var handleTableRowAdd = lodash.debounce(function (record, isAppendInChindren, defaultRecord) {
314367
+ var _deepDataSourceRef$cu7, _deepDataSourceRef$cu8;
314368
+
314369
+ var rkey = lodash.isObject(record) ? record[_rowKey] : record;
314370
+ var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu7 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu7 === void 0 ? void 0 : (_deepDataSourceRef$cu8 = _deepDataSourceRef$cu7[rkey]) === null || _deepDataSourceRef$cu8 === void 0 ? void 0 : _deepDataSourceRef$cu8.preKeys;
313778
314371
  var res = fn(dataSourceRef.current, function (draft) {
313779
- if (preKeys.length > 1) {
314372
+ if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
313780
314373
  var deeps = function deeps(children) {
313781
314374
  children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
313782
314375
  if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
313783
- if (item[_rowKey] === record[_rowKey]) {
314376
+ if (item[_rowKey] === rkey) {
313784
314377
  if (isAppendInChindren) {
313785
314378
  if (item === null || item === void 0 ? void 0 : item.children) {
313786
- var _item$children;
314379
+ if (Array.isArray(defaultRecord)) {
314380
+ var _item$children;
313787
314381
 
313788
- item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.push(_defineProperty$1({}, _rowKey, "".concat(Date.now())));
314382
+ item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.push.apply(_item$children, _toConsumableArray$1(defaultRecord));
314383
+ } else {
314384
+ var _item$children2;
314385
+
314386
+ item === null || item === void 0 ? void 0 : (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.push(defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314387
+ }
313789
314388
  } else {
313790
- item.children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
314389
+ if (Array.isArray(defaultRecord)) {
314390
+ item.children = _toConsumableArray$1(defaultRecord);
314391
+ } else {
314392
+ item.children = [defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now()))];
314393
+ }
313791
314394
  }
313792
314395
 
313793
314396
  !expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [item[_rowKey]]));
313794
314397
  } else {
313795
- children.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314398
+ if (Array.isArray(defaultRecord)) {
314399
+ children.splice.apply(children, [index + 1, 0].concat(_toConsumableArray$1(defaultRecord)));
314400
+ } else {
314401
+ children.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314402
+ }
313796
314403
  }
313797
314404
  } else if (item.children) {
313798
314405
  deeps(item.children);
@@ -313804,7 +314411,7 @@
313804
314411
  deeps(draft);
313805
314412
  } else {
313806
314413
  var index = draft.findIndex(function (item) {
313807
- return record[_rowKey] === item[_rowKey];
314414
+ return rkey === item[_rowKey];
313808
314415
  });
313809
314416
 
313810
314417
  if (index !== -1) {
@@ -313812,27 +314419,40 @@
313812
314419
  var _draft$index$children, _draft$index, _draft$index2;
313813
314420
 
313814
314421
  if ((_draft$index$children = draft[index].children) === null || _draft$index$children === void 0 ? void 0 : _draft$index$children.length) {
313815
- var _draft$index$children2;
314422
+ if (Array.isArray(defaultRecord)) {
314423
+ var _draft$index$children2;
314424
+
314425
+ (_draft$index$children2 = draft[index].children) === null || _draft$index$children2 === void 0 ? void 0 : _draft$index$children2.push.apply(_draft$index$children2, _toConsumableArray$1(defaultRecord));
314426
+ } else {
314427
+ var _draft$index$children3;
313816
314428
 
313817
- (_draft$index$children2 = draft[index].children) === null || _draft$index$children2 === void 0 ? void 0 : _draft$index$children2.push(_defineProperty$1({}, _rowKey, "".concat(Date.now())));
314429
+ (_draft$index$children3 = draft[index].children) === null || _draft$index$children3 === void 0 ? void 0 : _draft$index$children3.push(defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314430
+ }
313818
314431
  } else {
313819
- draft[index].children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
314432
+ draft[index].children = Array.isArray(defaultRecord) ? _toConsumableArray$1(defaultRecord) : [defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now()))];
313820
314433
  }
313821
314434
 
313822
314435
  !expandedRowKeys.includes((_draft$index = draft[index]) === null || _draft$index === void 0 ? void 0 : _draft$index[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [(_draft$index2 = draft[index]) === null || _draft$index2 === void 0 ? void 0 : _draft$index2[_rowKey]]));
313823
314436
  } else {
313824
- draft.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314437
+ if (Array.isArray(defaultRecord)) {
314438
+ draft.splice.apply(draft, [index + 1, 0].concat(_toConsumableArray$1(defaultRecord)));
314439
+ } else {
314440
+ draft.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314441
+ }
313825
314442
  }
313826
314443
  }
313827
314444
  }
313828
314445
  });
313829
314446
  setDataSource(res);
313830
- };
314447
+ }, 50);
314448
+ /** 快捷刷子功能 */
313831
314449
 
313832
- var handleCopy = function handleCopy(key, value) {
314450
+ var handleCopy = function handleCopy(key, value, type, rowIndex) {
313833
314451
  var res = fn(dataSourceRef.current, function (draft) {
313834
- draft === null || draft === void 0 ? void 0 : draft.forEach(function (item) {
313835
- return item[key] = value;
314452
+ draft === null || draft === void 0 ? void 0 : draft.forEach(function (item, index) {
314453
+ if (type === 'up' && index < rowIndex || type === 'down' && index > rowIndex) {
314454
+ item[key] = value;
314455
+ }
313836
314456
  });
313837
314457
  });
313838
314458
  setDataSource(res);
@@ -313841,17 +314461,16 @@
313841
314461
 
313842
314462
 
313843
314463
  var hasDisableOptions = React.useMemo(function () {
313844
- // const hasOnlyOptionsDatas = columns.filter(item => item?.['componentProps']?.optionOnly)
313845
314464
  var hasOnlyOptionsDatas = columns.filter(function (item) {
313846
314465
  var _item$componentProps;
313847
314466
 
313848
314467
  var resultComponentProps = lodash.isFunction(item === null || item === void 0 ? void 0 : item.componentProps) ? item === null || item === void 0 ? void 0 : (_item$componentProps = item.componentProps) === null || _item$componentProps === void 0 ? void 0 : _item$componentProps.call(item, {}, item) : item === null || item === void 0 ? void 0 : item.componentProps;
313849
314468
  return resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.optionOnly;
313850
- });
314469
+ }); // const hasOnlyOptionsDatas = columns.filter((item) => item?.componentProps?.optionOnly)
313851
314470
 
313852
314471
  if (hasOnlyOptionsDatas.length) {
313853
314472
  return hasOnlyOptionsDatas === null || hasOnlyOptionsDatas === void 0 ? void 0 : hasOnlyOptionsDatas.map(function (item) {
313854
- return item['dataIndex'];
314473
+ return item.dataIndex;
313855
314474
  });
313856
314475
  }
313857
314476
 
@@ -313863,12 +314482,11 @@
313863
314482
  var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
313864
314483
  var _item$componentProps2;
313865
314484
 
313866
- var resultComponentProps = lodash.isFunction(item.componentProps) ? item === null || item === void 0 ? void 0 : (_item$componentProps2 = item.componentProps) === null || _item$componentProps2 === void 0 ? void 0 : _item$componentProps2.call(item, {}, item) : item === null || item === void 0 ? void 0 : item.componentProps;
313867
-
313868
- var _ref8 = resultComponentProps || {},
313869
- optionOnly = _ref8.optionOnly,
313870
- options = _ref8.options; // const { optionOnly, options } = item['componentProps'] || {}
314485
+ var resultComponentProps = lodash.isFunction(item.componentProps) ? (_item$componentProps2 = item.componentProps) === null || _item$componentProps2 === void 0 ? void 0 : _item$componentProps2.call(item, {}, item) : item.componentProps;
313871
314486
 
314487
+ var _ref11 = resultComponentProps || {},
314488
+ optionOnly = _ref11.optionOnly,
314489
+ options = _ref11.options;
313872
314490
 
313873
314491
  if (optionOnly && options) {
313874
314492
  var dataIndex = item.dataIndex;
@@ -313888,7 +314506,7 @@
313888
314506
  }
313889
314507
 
313890
314508
  return _objectSpread(_objectSpread({}, item), {}, {
313891
- componentProps: _objectSpread(_objectSpread({}, item['componentProps']), {}, {
314509
+ componentProps: _objectSpread(_objectSpread({}, item.componentProps), {}, {
313892
314510
  options: newOptions
313893
314511
  })
313894
314512
  });
@@ -313904,21 +314522,54 @@
313904
314522
  /** 组装之后的最终columns */
313905
314523
 
313906
314524
  var resultColumns = React.useMemo(function () {
313907
- var _localColumns;
314525
+ var _localColumns, _localColumns2, _localColumns3;
313908
314526
 
313909
314527
  var rColumns = hasDisableOptions ? DisableOptions : columns;
313910
314528
  var localColumns = [sortOpen ? {
313911
314529
  title: '排序',
313912
- dataIndex: 'sort',
314530
+ dataIndex: '_sort',
313913
314531
  width: 48,
313914
314532
  maxWidth: 48,
313915
314533
  className: 'drag-visible',
314534
+ fixed: 'left',
313916
314535
  render: function render(_, record) {
313917
314536
  return /*#__PURE__*/React__default['default'].createElement(Dragger$1, {
313918
- id: record[_rowKey] || record.id
314537
+ id: (record === null || record === void 0 ? void 0 : record[_rowKey]) || (record === null || record === void 0 ? void 0 : record.id)
313919
314538
  });
313920
314539
  }
313921
- } : null].concat(_toConsumableArray$1(rColumns), [useQuickOpetate ? {
314540
+ } : null, indexCol ? lodash.isBoolean(indexCol) ? {
314541
+ title: '',
314542
+ dataIndex: '_index',
314543
+ width: 48,
314544
+ maxWidth: 48,
314545
+ ellipsis: true,
314546
+ fixed: 'left',
314547
+ render: function render(_, record, index) {
314548
+ var _deepDataSourceRef$cu9, _deepDataSourceRef$cu10, _deepDataSourceRef$cu11;
314549
+
314550
+ console.log(deepDataSourceRef.current, '--deepDataSourceRef.current', _rowKey);
314551
+ return ((_deepDataSourceRef$cu9 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu9 === void 0 ? void 0 : (_deepDataSourceRef$cu10 = _deepDataSourceRef$cu9[record[_rowKey]]) === null || _deepDataSourceRef$cu10 === void 0 ? void 0 : (_deepDataSourceRef$cu11 = _deepDataSourceRef$cu10['_deepIds']) === null || _deepDataSourceRef$cu11 === void 0 ? void 0 : _deepDataSourceRef$cu11.join('-')) || "".concat(index + 1);
314552
+ }
314553
+ } : _objectSpread(_objectSpread({
314554
+ title: '',
314555
+ dataIndex: '_index',
314556
+ width: 48,
314557
+ ellipsis: true,
314558
+ maxWidth: 48,
314559
+ fixed: 'left'
314560
+ }, indexCol || {}), {}, {
314561
+ render: function render(_, record, index) {
314562
+ var _deepDataSourceRef$cu14, _deepDataSourceRef$cu15, _deepDataSourceRef$cu16;
314563
+
314564
+ if (lodash.isFunction(indexCol === null || indexCol === void 0 ? void 0 : indexCol.render)) {
314565
+ var _indexCol$render, _deepDataSourceRef$cu12, _deepDataSourceRef$cu13;
314566
+
314567
+ return indexCol === null || indexCol === void 0 ? void 0 : (_indexCol$render = indexCol.render) === null || _indexCol$render === void 0 ? void 0 : _indexCol$render.call(indexCol, record, (_deepDataSourceRef$cu12 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu12 === void 0 ? void 0 : (_deepDataSourceRef$cu13 = _deepDataSourceRef$cu12[record[_rowKey]]) === null || _deepDataSourceRef$cu13 === void 0 ? void 0 : _deepDataSourceRef$cu13['_deepIds']);
314568
+ }
314569
+
314570
+ return ((_deepDataSourceRef$cu14 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu14 === void 0 ? void 0 : (_deepDataSourceRef$cu15 = _deepDataSourceRef$cu14[record[_rowKey]]) === null || _deepDataSourceRef$cu15 === void 0 ? void 0 : (_deepDataSourceRef$cu16 = _deepDataSourceRef$cu15['_deepIds']) === null || _deepDataSourceRef$cu16 === void 0 ? void 0 : _deepDataSourceRef$cu16.join('-')) || "".concat(index + 1);
314571
+ }
314572
+ }) : null].concat(_toConsumableArray$1(rColumns), [useQuickOpetate ? {
313922
314573
  title: '操作',
313923
314574
  dataIndex: 'lm_edit_opetate',
313924
314575
  width: 68,
@@ -313929,11 +314580,11 @@
313929
314580
  options: Array.isArray(useQuickOpetate) ? useQuickOpetate : ['add', 'delete']
313930
314581
  }
313931
314582
  } : null]).filter(function (item) {
313932
- return item && item.show !== false;
314583
+ return item && (item === null || item === void 0 ? void 0 : item.show) !== false;
313933
314584
  });
313934
- localColumns = localColumns.map(function (item, index) {
314585
+ localColumns = (_localColumns = localColumns) === null || _localColumns === void 0 ? void 0 : _localColumns.map(function (item, index) {
313935
314586
  return _objectSpread(_objectSpread({}, item), {}, {
313936
- order: [null, undefined].includes(item['order']) ? index : item['order']
314587
+ order: [null, undefined].includes(item.order) ? index : item.order
313937
314588
  });
313938
314589
  }).sort(function (a, b) {
313939
314590
  return a.order - b.order;
@@ -313941,7 +314592,7 @@
313941
314592
  var leftColumns = [];
313942
314593
  var mainColumns = [];
313943
314594
  var rightColumns = [];
313944
- (_localColumns = localColumns) === null || _localColumns === void 0 ? void 0 : _localColumns.forEach(function (item) {
314595
+ (_localColumns2 = localColumns) === null || _localColumns2 === void 0 ? void 0 : _localColumns2.forEach(function (item) {
313945
314596
  if ((item === null || item === void 0 ? void 0 : item.fixed) === 'left') {
313946
314597
  leftColumns.push(item);
313947
314598
  } else if ((item === null || item === void 0 ? void 0 : item.fixed) === 'right') {
@@ -313956,29 +314607,22 @@
313956
314607
  var mapColumns = function mapColumns(col, index) {
313957
314608
  var _col$children;
313958
314609
 
313959
- if (!col.editable && !((_col$children = col.children) === null || _col$children === void 0 ? void 0 : _col$children.length)) {
313960
- return col;
313961
- }
313962
-
313963
- var newCol = _objectSpread(_objectSpread({}, col), {}, {
313964
- shouldCellUpdate: function shouldCellUpdate(record, prevRecord) {
313965
- var _col$componentProps2;
313966
-
313967
- var dataIndex = col.dataIndex,
313968
- editable = col.editable,
313969
- relevanceCols = col.relevanceCols,
313970
- componentProps = col.componentProps;
314610
+ if (!col.editable && !((_col$children = col.children) === null || _col$children === void 0 ? void 0 : _col$children.length) && (col === null || col === void 0 ? void 0 : col.dataIndex) === '_sort') {
314611
+ var fn = col === null || col === void 0 ? void 0 : col.render;
314612
+ return _objectSpread(_objectSpread({}, col), {}, {
314613
+ render: function render(text, record, i) {
314614
+ var _dataSource$i;
313971
314615
 
313972
- if (componentProps && lodash.isFunction(componentProps)) {
313973
- return true;
314616
+ return fn === null || fn === void 0 ? void 0 : fn((_dataSource$i = dataSource[i]) === null || _dataSource$i === void 0 ? void 0 : _dataSource$i[col.dataIndex], dataSource[i], i);
313974
314617
  }
314618
+ });
314619
+ }
313975
314620
 
313976
- 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) {
313977
- return true;
313978
- }
314621
+ if (isEdit && (col === null || col === void 0 ? void 0 : col.render) && (col === null || col === void 0 ? void 0 : col.editable) === 'render') {
314622
+ delete col.render;
314623
+ }
313979
314624
 
313980
- return record[dataIndex] !== prevRecord[dataIndex];
313981
- },
314625
+ var newCol = _objectSpread(_objectSpread({}, col), {}, {
313982
314626
  onCell: function onCell(record, rowIndex) {
313983
314627
  return {
313984
314628
  getLength: dataSource.length,
@@ -313993,7 +314637,7 @@
313993
314637
  editable: col.editable,
313994
314638
  dataIndex: col.dataIndex,
313995
314639
  itemProps: col.itemProps,
313996
- setValid: setValid,
314640
+ shouldUpdate: shouldUpdate,
313997
314641
  isEdit: isEdit,
313998
314642
  isHoverEdit: isHoverEdit,
313999
314643
  handleAdd: handleAdd,
@@ -314001,8 +314645,7 @@
314001
314645
  handleCopy: handleCopy,
314002
314646
  editEnum: typeof col.editEnum === 'function' ? col.editEnum(record) : col.editEnum,
314003
314647
  valueType: typeof col.valueType === 'function' ? col.valueType(record) : col.valueType,
314004
- handleSave: handleSave,
314005
- reWriteOriginSource: reWriteOriginSource
314648
+ handleSave: handleSave
314006
314649
  };
314007
314650
  }
314008
314651
  });
@@ -314016,28 +314659,28 @@
314016
314659
  return newCol;
314017
314660
  };
314018
314661
 
314019
- var res = localColumns.map(function (col, index) {
314662
+ var res = (_localColumns3 = localColumns) === null || _localColumns3 === void 0 ? void 0 : _localColumns3.map(function (col, index) {
314020
314663
  return mapColumns(col, index);
314021
314664
  });
314022
314665
  return res;
314023
- }, [columns, isAdd, sortOpen, useQuickOpetate, sortEditTable, dataSource, _toConsumableArray$1(memoOptions)]);
314024
- var DraggableContainer = React.useCallback(function (_ref9) {
314025
- var _dataSourceRef$curren2;
314666
+ }, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, _toConsumableArray$1(memoOptions)]);
314026
314667
 
314027
- var props = _extends$2({}, _ref9);
314668
+ var onSortEnd = function onSortEnd(active, over) {
314669
+ var cloneArr = _toConsumableArray$1(dataSourceRef.current);
314028
314670
 
314029
- return /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
314030
- move: onSortEnd
314031
- }, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
314032
- items: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
314033
- return item[_rowKey];
314034
- })
314035
- }, /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
314036
- }, [sortEditTable]);
314037
- var colDraggableContainer = React.useCallback(function (_ref10) {
314671
+ var oldIndex = cloneArr.findIndex(function (v) {
314672
+ return v[_rowKey] === active;
314673
+ });
314674
+ var newIndex = cloneArr.findIndex(function (v) {
314675
+ return v[_rowKey] === over;
314676
+ });
314677
+ setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
314678
+ };
314679
+
314680
+ var colDraggableContainer = React.useCallback(function (_ref12) {
314038
314681
  var _React$Children;
314039
314682
 
314040
- var props = _extends$2({}, _ref10);
314683
+ var props = _extends$2({}, _ref12);
314041
314684
 
314042
314685
  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) {
314043
314686
  var _child$props, _child$props$column;
@@ -314046,45 +314689,23 @@
314046
314689
  return child;
314047
314690
  }
314048
314691
 
314049
- return /*#__PURE__*/React__default['default'].createElement(SortableItem$2, {
314692
+ return /*#__PURE__*/React__default['default'].createElement(SortableItem$3, {
314050
314693
  id: child.key
314051
314694
  }, child);
314052
314695
  }));
314053
314696
  }, [columns]);
314054
- var config = React.useMemo(function () {
314055
- var component = {
314056
- body: Object.assign({
314057
- row: sortOpen ? EditableSortRow : EditableRow$1,
314058
- cell: EditableCell$1
314059
- }, sortOpen ? {
314060
- wrapper: DraggableContainer
314061
- } : {})
314062
- };
314063
-
314064
- if (colSortOpen) {
314065
- component['header'] = {
314066
- row: colDraggableContainer
314067
- };
314068
- }
314069
-
314070
- return _objectSpread({
314071
- pagination: false,
314072
- tableLayout: 'fixed',
314073
- scroll: {
314074
- x: '100%'
314075
- },
314076
- rowKey: function rowKey(record) {
314077
- return record[_rowKey] || record.index || Math.random();
314078
- },
314079
- components: component
314080
- }, resetProps);
314081
- }, [resultColumns, dataSource, sortOpen, colSortOpen, size]);
314082
314697
  React.useImperativeHandle(ref, function () {
314083
314698
  return {
314084
314699
  setRow: handleSave,
314085
314700
  getCheckboxRecords: function getCheckboxRecords() {
314086
314701
  return localRowSelectList.selectedRows;
314087
314702
  },
314703
+ deleteRowData: function deleteRowData(data) {
314704
+ return handleTableRowDelete(data);
314705
+ },
314706
+ addRowData: function addRowData(data, defaultValue, addInChild) {
314707
+ return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
314708
+ },
314088
314709
  clearSelect: function clearSelect() {
314089
314710
  setLocalRowSelectList({
314090
314711
  selectedRows: []
@@ -314094,34 +314715,82 @@
314094
314715
  setLocalRowSelectList({
314095
314716
  selectedRows: value
314096
314717
  });
314097
- },
314098
- valid: function valid() {
314099
- return _valid;
314100
314718
  }
314101
314719
  };
314102
314720
  });
314103
314721
  var isShowAddAction = React.useMemo(function () {
314104
314722
  return isEdit && isAdd || isHoverEdit && isAdd;
314105
314723
  }, [isEdit, isAdd, isHoverEdit]);
314724
+ var config = React.useRef(_objectSpread({
314725
+ pagination: false,
314726
+ tableLayout: 'fixed',
314727
+ scroll: {
314728
+ x: '100%'
314729
+ },
314730
+ rowKey: function rowKey(record) {
314731
+ return record[_rowKey] || record.index || Math.random();
314732
+ },
314733
+ components: {
314734
+ table: virtual ? VirtualTable$1 : null,
314735
+ body: Object.assign({
314736
+ row: function row(rowProps) {
314737
+ return sortOpen ? EditableSortRow(_objectSpread(_objectSpread({}, rowProps), {}, {
314738
+ virtual: virtual
314739
+ })) : EditableRow$1(_objectSpread(_objectSpread({}, rowProps), {}, {
314740
+ virtual: virtual
314741
+ }));
314742
+ },
314743
+ cell: MemoEditableCell
314744
+ }, sortOpen ? {
314745
+ wrapper: function wrapper(wrapperProps) {
314746
+ var _dataSourceRef$curren2, _tableWarpRef$current, _tableWarpRef$current2;
314747
+
314748
+ return DraggableContainer(_objectSpread(_objectSpread({}, wrapperProps), {}, {
314749
+ virtual: virtual,
314750
+ keys: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
314751
+ return item[_rowKey];
314752
+ }),
314753
+ options: dataSourceRef.current,
314754
+ rowKey: _rowKey,
314755
+ onSortEnd: onSortEnd,
314756
+ tableWidth: tableWarpRef === null || tableWarpRef === void 0 ? void 0 : (_tableWarpRef$current = tableWarpRef.current) === null || _tableWarpRef$current === void 0 ? void 0 : (_tableWarpRef$current2 = _tableWarpRef$current.getBoundingClientRect()) === null || _tableWarpRef$current2 === void 0 ? void 0 : _tableWarpRef$current2.width
314757
+ }));
314758
+ }
314759
+ } : virtual ? {
314760
+ wrapper: VirtualWrapper$1
314761
+ } : {}),
314762
+ header: {
314763
+ row: colSortOpen ? colDraggableContainer : null
314764
+ }
314765
+ },
314766
+ onRow: function onRow(record, index) {
314767
+ return {
314768
+ disabled: disabled
314769
+ };
314770
+ }
314771
+ }, resetProps));
314106
314772
 
314107
314773
  if (colSortOpen) {
314108
314774
  var _localRowSelectList$s;
314109
314775
 
314110
314776
  return /*#__PURE__*/React__default['default'].createElement("div", {
314111
- className: "lm_editTable_warpper"
314112
- }, /*#__PURE__*/React__default['default'].createElement(DndContainer$1, {
314777
+ className: "lm_editTable_warpper",
314778
+ ref: tableWarpRef
314779
+ }, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
314780
+ rowKey: _rowKey,
314781
+ options: resultColumns,
314113
314782
  move: onColSortEnd
314114
- }, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
314783
+ }, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
314115
314784
  items: columns.reduce(function (acc, item) {
314116
314785
  return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
314117
314786
  }, [])
314118
- }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
314787
+ }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
314788
+ loading: loading,
314119
314789
  size: size || 'small',
314120
314790
  columns: resultColumns,
314121
314791
  rowClassName: "editable-row",
314122
314792
  bordered: true,
314123
314793
  pagination: false,
314124
- // components={tableComponents}
314125
314794
  rowSelection: !rowSelection ? undefined : _objectSpread(_objectSpread({
314126
314795
  fixed: true,
314127
314796
  type: 'checkbox',
@@ -314131,36 +314800,39 @@
314131
314800
  return lodash.isObject(v) ? v[_rowKey] : v;
314132
314801
  }),
314133
314802
  onChange: function onChange(selectedRowKeys, selectedRows, info) {
314134
- // editTableRowChange(selectedRowKeys, selectedRows, info)
314135
314803
  setLocalRowSelectList(selectedRowKeys, selectedRows, info);
314136
314804
  }
314137
314805
  }),
314138
314806
  dataSource: dataSource
314139
- })))), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
314140
- className: "lm_editTable_add_bar",
314141
- type: "dashed",
314142
- onClick: handleAdd,
314143
- style: {
314144
- marginTop: 8
314145
- }
314146
- }, /*#__PURE__*/React__default['default'].createElement(PlusCircleOutlined$2, {
314147
- className: "lmweb-plus"
314148
- }), "\u65B0\u589E"));
314807
+ })))), /*#__PURE__*/React__default['default'].createElement(BottomOpetateComponent, {
314808
+ disabled: disabled,
314809
+ isShowAddAction: isShowAddAction,
314810
+ recordCreatorProps: recordCreatorProps,
314811
+ handleAdd: handleAdd
314812
+ }));
314149
314813
  } // @ts-ignore
314150
314814
 
314151
314815
 
314152
314816
  return /*#__PURE__*/React__default['default'].createElement("div", {
314153
- className: "lm_editTable_warpper"
314154
- }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
314817
+ className: "lm_editTable_warpper",
314818
+ ref: tableWarpRef
314819
+ }, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
314155
314820
  size: size || 'small',
314156
314821
  columns: resultColumns,
314157
314822
  rowClassName: "editable-row",
314158
314823
  bordered: true,
314824
+ loading: loading,
314159
314825
  pagination: false,
314160
314826
  // components={tableComponents}
314161
314827
  expandable: (resetProps === null || resetProps === void 0 ? void 0 : resetProps.expandable) || {
314162
314828
  expandedRowKeys: expandedRowKeys,
314163
314829
  fixed: true,
314830
+ // indentSize: 0,
314831
+ expandIconColumnIndex: checkExpandIconColumnIndex({
314832
+ rowSelection: rowSelection,
314833
+ sortOpen: sortOpen,
314834
+ indexCol: indexCol
314835
+ }) || 0,
314164
314836
  onExpandedRowsChange: function onExpandedRowsChange(expandedRows) {
314165
314837
  return setExpandedRowKeys(expandedRows);
314166
314838
  }
@@ -314178,16 +314850,12 @@
314178
314850
  }
314179
314851
  }),
314180
314852
  dataSource: dataSource
314181
- })), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
314182
- className: "lm_editTable_add_bar",
314183
- type: "dashed",
314184
- onClick: (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.customAddClick) || handleAdd,
314185
- style: _objectSpread({
314186
- marginTop: 8
314187
- }, (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.style) || {})
314188
- }, /*#__PURE__*/React__default['default'].createElement(IconFont, {
314189
- type: "lmweb-plus"
314190
- }), (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.creatorButtonText) || '新增'));
314853
+ })), /*#__PURE__*/React__default['default'].createElement(BottomOpetateComponent, {
314854
+ disabled: disabled,
314855
+ isShowAddAction: isShowAddAction,
314856
+ recordCreatorProps: recordCreatorProps,
314857
+ handleAdd: handleAdd
314858
+ }));
314191
314859
  });
314192
314860
  var LmEditTable = /*#__PURE__*/React.memo(EditTable$1);
314193
314861
 
@@ -314863,7 +315531,7 @@
314863
315531
  }
314864
315532
  }
314865
315533
 
314866
- var _excluded$2S = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
315534
+ var _excluded$2W = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
314867
315535
  function generateRangePicker$1(generateConfig) {
314868
315536
  var RangePicker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
314869
315537
  var customizePrefixCls = props.prefixCls,
@@ -314876,7 +315544,7 @@
314876
315544
  bordered = _props$bordered === void 0 ? true : _props$bordered,
314877
315545
  placeholder = props.placeholder,
314878
315546
  customStatus = props.status,
314879
- restProps = _objectWithoutProperties$1(props, _excluded$2S);
315547
+ restProps = _objectWithoutProperties$1(props, _excluded$2W);
314880
315548
 
314881
315549
  var innerRef = React.useRef(null);
314882
315550
 
@@ -314976,7 +315644,7 @@
314976
315644
  return RangePicker$1;
314977
315645
  }
314978
315646
 
314979
- var _excluded$2T = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
315647
+ var _excluded$2X = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
314980
315648
  function generatePicker$2(generateConfig) {
314981
315649
  function getPicker(picker, displayName) {
314982
315650
  var Picker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -314990,7 +315658,7 @@
314990
315658
  placeholder = props.placeholder,
314991
315659
  customDisabled = props.disabled,
314992
315660
  customStatus = props.status,
314993
- restProps = _objectWithoutProperties$1(props, _excluded$2T);
315661
+ restProps = _objectWithoutProperties$1(props, _excluded$2X);
314994
315662
 
314995
315663
  warning$6(picker !== 'quarter', displayName, "DatePicker.".concat(displayName, " is legacy usage. Please use DatePicker[picker='").concat(picker, "'] directly."));
314996
315664
 
@@ -315198,63 +315866,6 @@
315198
315866
  var DatePicker$1 = generatePicker$3(momentGenerateConfig);
315199
315867
  DatePicker$1.AntdDatePicker = DatePicker;
315200
315868
 
315201
- var getRenderPropValue$1 = function getRenderPropValue(propValue) {
315202
- if (!propValue) {
315203
- return null;
315204
- }
315205
-
315206
- var isRenderFunction = typeof propValue === 'function';
315207
-
315208
- if (isRenderFunction) {
315209
- return propValue();
315210
- }
315211
-
315212
- return propValue;
315213
- };
315214
-
315215
- var _excluded$2U = ["prefixCls", "title", "content", "_overlay"];
315216
- var Popover$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
315217
- var customizePrefixCls = _ref.prefixCls,
315218
- title = _ref.title,
315219
- content = _ref.content,
315220
- _overlay = _ref._overlay,
315221
- otherProps = _objectWithoutProperties$1(_ref, _excluded$2U);
315222
-
315223
- var _React$useContext = React.useContext(ConfigContext),
315224
- getPrefixCls = _React$useContext.getPrefixCls;
315225
-
315226
- var getOverlay = function getOverlay(prefixCls) {
315227
- if (!title && !content) return undefined;
315228
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement("div", {
315229
- className: "".concat(prefixCls, "-title")
315230
- }, getRenderPropValue$1(title)), /*#__PURE__*/React.createElement("div", {
315231
- className: "".concat(prefixCls, "-inner-content")
315232
- }, getRenderPropValue$1(content)));
315233
- };
315234
-
315235
- var prefixCls = getPrefixCls('popover', customizePrefixCls);
315236
- var rootPrefixCls = getPrefixCls();
315237
- return /*#__PURE__*/React.createElement(Tooltip$4, _objectSpread(_objectSpread({}, otherProps), {}, {
315238
- prefixCls: prefixCls,
315239
- ref: ref,
315240
- overlay: _overlay || getOverlay(prefixCls),
315241
- transitionName: getTransitionName$9(rootPrefixCls, 'zoom-big', otherProps.transitionName)
315242
- }));
315243
- });
315244
-
315245
- {
315246
- Popover$1.displayName = 'Popover';
315247
- }
315248
-
315249
- Popover$1.defaultProps = {
315250
- placement: 'top',
315251
- trigger: 'hover',
315252
- mouseEnterDelay: 0.1,
315253
- mouseLeaveDelay: 0.1,
315254
- overlayStyle: {}
315255
- };
315256
- Popover$1.AntdPopover = Popover;
315257
-
315258
315869
  var CheckOutlined_1 = createCommonjsModule(function (module, exports) {
315259
315870
  // This icon file is generated automatically.
315260
315871
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -316067,7 +316678,7 @@
316067
316678
 
316068
316679
  var KeyCode$1 = /*@__PURE__*/getDefaultExportFromCjs(KeyCode_1);
316069
316680
 
316070
- var _excluded$2V = ["style", "noStyle", "disabled"];
316681
+ var _excluded$2Y = ["style", "noStyle", "disabled"];
316071
316682
  var inlineStyle$1 = {
316072
316683
  border: 0,
316073
316684
  background: 'transparent',
@@ -316096,7 +316707,7 @@
316096
316707
  var style = props.style,
316097
316708
  noStyle = props.noStyle,
316098
316709
  disabled = props.disabled,
316099
- restProps = _objectWithoutProperties$1(props, _excluded$2V);
316710
+ restProps = _objectWithoutProperties$1(props, _excluded$2Y);
316100
316711
 
316101
316712
  var mergedStyle = {};
316102
316713
 
@@ -316307,7 +316918,7 @@
316307
316918
  }, conditions);
316308
316919
  });
316309
316920
 
316310
- var _excluded$2W = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
316921
+ var _excluded$2Z = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
316311
316922
 
316312
316923
  var Typography$2 = function Typography(_ref, ref) {
316313
316924
  var customizePrefixCls = _ref.prefixCls,
@@ -316317,7 +316928,7 @@
316317
316928
  ariaLabel = _ref['aria-label'],
316318
316929
  setContentRef = _ref.setContentRef,
316319
316930
  children = _ref.children,
316320
- restProps = _objectWithoutProperties$1(_ref, _excluded$2W);
316931
+ restProps = _objectWithoutProperties$1(_ref, _excluded$2Z);
316321
316932
 
316322
316933
  var _React$useContext = React.useContext(ConfigContext),
316323
316934
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -316560,7 +317171,7 @@
316560
317171
  EllipsisTooltip$1.displayName = 'EllipsisTooltip';
316561
317172
  }
316562
317173
 
316563
- var _excluded$2X = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
317174
+ var _excluded$2_ = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
316564
317175
 
316565
317176
  function wrapperDecorations$1(_ref, content) {
316566
317177
  var mark = _ref.mark,
@@ -316612,7 +317223,7 @@
316612
317223
  copyable = props.copyable,
316613
317224
  component = props.component,
316614
317225
  title = props.title,
316615
- restProps = _objectWithoutProperties$1(props, _excluded$2X);
317226
+ restProps = _objectWithoutProperties$1(props, _excluded$2_);
316616
317227
 
316617
317228
  var _React$useContext = React.useContext(ConfigContext),
316618
317229
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -317030,12 +317641,12 @@
317030
317641
  });
317031
317642
  });
317032
317643
 
317033
- var _excluded$2Y = ["ellipsis", "rel"];
317644
+ var _excluded$2$ = ["ellipsis", "rel"];
317034
317645
 
317035
317646
  var Link$2 = function Link(_ref, ref) {
317036
317647
  var ellipsis = _ref.ellipsis,
317037
317648
  rel = _ref.rel,
317038
- restProps = _objectWithoutProperties$1(_ref, _excluded$2Y);
317649
+ restProps = _objectWithoutProperties$1(_ref, _excluded$2$);
317039
317650
 
317040
317651
  warning$6(_typeof$1(ellipsis) !== 'object', 'Typography.Link', '`ellipsis` only supports boolean value.');
317041
317652
  var baseRef = React.useRef(null);
@@ -317069,11 +317680,11 @@
317069
317680
 
317070
317681
  var Paragraph$7 = /*#__PURE__*/React.forwardRef(Paragraph$6);
317071
317682
 
317072
- var _excluded$2Z = ["ellipsis"];
317683
+ var _excluded$30 = ["ellipsis"];
317073
317684
 
317074
317685
  var Text$2 = function Text(_ref, ref) {
317075
317686
  var ellipsis = _ref.ellipsis,
317076
- restProps = _objectWithoutProperties$1(_ref, _excluded$2Z);
317687
+ restProps = _objectWithoutProperties$1(_ref, _excluded$30);
317077
317688
 
317078
317689
  var mergedEllipsis = React.useMemo(function () {
317079
317690
  if (ellipsis && _typeof$1(ellipsis) === 'object') {
@@ -317093,13 +317704,13 @@
317093
317704
 
317094
317705
  var Text$3 = /*#__PURE__*/React.forwardRef(Text$2);
317095
317706
 
317096
- var _excluded$2_ = ["level"];
317707
+ var _excluded$31 = ["level"];
317097
317708
  var TITLE_ELE_LIST$1 = tupleNum$1(1, 2, 3, 4, 5);
317098
317709
 
317099
317710
  var Title$4 = function Title(props, ref) {
317100
317711
  var _props$level = props.level,
317101
317712
  level = _props$level === void 0 ? 1 : _props$level,
317102
- restProps = _objectWithoutProperties$1(props, _excluded$2_);
317713
+ restProps = _objectWithoutProperties$1(props, _excluded$31);
317103
317714
 
317104
317715
  var component;
317105
317716
 
@@ -317204,7 +317815,7 @@
317204
317815
  RefAutoComplete$1.Option = Option;
317205
317816
  RefAutoComplete$1.AntdAutoComplete = RefAutoComplete;
317206
317817
 
317207
- var _excluded$2$ = ["children", "treeData", "value", "defaultLabel", "disabled", "size"];
317818
+ var _excluded$32 = ["children", "treeData", "value", "defaultLabel", "disabled", "size"];
317208
317819
  var CLMTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
317209
317820
  var children = props.children,
317210
317821
  treeData = props.treeData,
@@ -317212,7 +317823,7 @@
317212
317823
  defaultLabel = props.defaultLabel,
317213
317824
  customDisabled = props.disabled,
317214
317825
  customizeSize = props.size,
317215
- resetProps = _objectWithoutProperties$1(props, _excluded$2$); // ===================== Disabled =====================
317826
+ resetProps = _objectWithoutProperties$1(props, _excluded$32); // ===================== Disabled =====================
317216
317827
 
317217
317828
 
317218
317829
  var disabled = React__default['default'].useContext(DisabledContext$1);
@@ -317347,7 +317958,7 @@
317347
317958
  return ErrorBoundary;
317348
317959
  }(React.Component);
317349
317960
 
317350
- var _excluded$30 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
317961
+ var _excluded$33 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
317351
317962
  var iconMapFilled$1 = {
317352
317963
  success: CheckCircleFilled$2,
317353
317964
  info: InfoCircleFilled$2,
@@ -317420,7 +318031,7 @@
317420
318031
  closeIcon = _ref$closeIcon === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined$2, null) : _ref$closeIcon,
317421
318032
  action = _ref.action,
317422
318033
  duration = _ref.duration,
317423
- props = _objectWithoutProperties$1(_ref, _excluded$30);
318034
+ props = _objectWithoutProperties$1(_ref, _excluded$33);
317424
318035
 
317425
318036
  var _React$useState = React.useState(false),
317426
318037
  _React$useState2 = _slicedToArray$1(_React$useState, 2),
@@ -317850,7 +318461,7 @@
317850
318461
  };
317851
318462
  };
317852
318463
 
317853
- var _excluded$31 = ["className", "onUrge", "onDeleteComment"];
318464
+ var _excluded$34 = ["className", "onUrge", "onDeleteComment"];
317854
318465
  var prefixCls$b = 'lm_approval';
317855
318466
  var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
317856
318467
  var cacheColorMap = new Map();
@@ -318258,7 +318869,7 @@
318258
318869
  onUrge = _props$onUrge === void 0 ? function () {} : _props$onUrge,
318259
318870
  _props$onDeleteCommen2 = props.onDeleteComment,
318260
318871
  onDeleteComment = _props$onDeleteCommen2 === void 0 ? function () {} : _props$onDeleteCommen2,
318261
- others = _objectWithoutProperties$1(props, _excluded$31);
318872
+ others = _objectWithoutProperties$1(props, _excluded$34);
318262
318873
 
318263
318874
  var _useState = React.useState(false),
318264
318875
  _useState2 = _slicedToArray$1(_useState, 2),
@@ -320049,7 +320660,7 @@
320049
320660
  return nodes;
320050
320661
  }
320051
320662
 
320052
- var _excluded$32 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
320663
+ var _excluded$35 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
320053
320664
  _excluded2$J = ["prefixCls", "className"];
320054
320665
  var ConfigContext$7 = ConfigProvider$1.ConfigContext;
320055
320666
 
@@ -320074,7 +320685,7 @@
320074
320685
  var defaultExpandAll = _ref2.defaultExpandAll,
320075
320686
  defaultExpandParent = _ref2.defaultExpandParent,
320076
320687
  defaultExpandedKeys = _ref2.defaultExpandedKeys,
320077
- props = _objectWithoutProperties$1(_ref2, _excluded$32);
320688
+ props = _objectWithoutProperties$1(_ref2, _excluded$35);
320078
320689
 
320079
320690
  // Shift click usage
320080
320691
  var lastSelectedKey = React.useRef();
@@ -320572,11 +321183,11 @@
320572
321183
  blockNode: false
320573
321184
  };
320574
321185
 
320575
- var _excluded$33 = ["className"];
321186
+ var _excluded$36 = ["className"];
320576
321187
  var prefixCls$c = 'lm_tree';
320577
321188
  var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
320578
321189
  var className = props.className,
320579
- rest = _objectWithoutProperties$1(props, _excluded$33);
321190
+ rest = _objectWithoutProperties$1(props, _excluded$36);
320580
321191
 
320581
321192
  return /*#__PURE__*/React__default['default'].createElement(Tree$2, _objectSpread(_objectSpread({
320582
321193
  ref: ref
@@ -321635,7 +322246,7 @@
321635
322246
  }, unitNodes);
321636
322247
  }
321637
322248
 
321638
- var _excluded$34 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
322249
+ var _excluded$37 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
321639
322250
 
321640
322251
  var ScrollNumber$1 = function ScrollNumber(_ref) {
321641
322252
  var customizePrefixCls = _ref.prefixCls,
@@ -321648,7 +322259,7 @@
321648
322259
  _ref$component = _ref.component,
321649
322260
  component = _ref$component === void 0 ? 'sup' : _ref$component,
321650
322261
  children = _ref.children,
321651
- restProps = _objectWithoutProperties$1(_ref, _excluded$34);
322262
+ restProps = _objectWithoutProperties$1(_ref, _excluded$37);
321652
322263
 
321653
322264
  var _React$useContext = React.useContext(ConfigContext$1),
321654
322265
  getPrefixCls = _React$useContext.getPrefixCls;
@@ -321698,7 +322309,7 @@
321698
322309
  return /*#__PURE__*/React.createElement(component, newProps, numberNodes);
321699
322310
  };
321700
322311
 
321701
- var _excluded$35 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
322312
+ var _excluded$38 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
321702
322313
 
321703
322314
  var Badge$1 = function Badge(_ref) {
321704
322315
  var _classNames, _classNames2;
@@ -321723,7 +322334,7 @@
321723
322334
  className = _ref.className,
321724
322335
  _ref$showZero = _ref.showZero,
321725
322336
  showZero = _ref$showZero === void 0 ? false : _ref$showZero,
321726
- restProps = _objectWithoutProperties$1(_ref, _excluded$35);
322337
+ restProps = _objectWithoutProperties$1(_ref, _excluded$38);
321727
322338
 
321728
322339
  var _React$useContext = React.useContext(ConfigContext$1),
321729
322340
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -321858,7 +322469,7 @@
321858
322469
 
321859
322470
  Badge$1.Ribbon = Ribbon$1;
321860
322471
 
321861
- var _excluded$36 = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
322472
+ var _excluded$39 = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
321862
322473
 
321863
322474
  var Divider$5 = function Divider(props) {
321864
322475
  var _classNames;
@@ -321877,7 +322488,7 @@
321877
322488
  children = props.children,
321878
322489
  dashed = props.dashed,
321879
322490
  plain = props.plain,
321880
- restProps = _objectWithoutProperties$1(props, _excluded$36);
322491
+ restProps = _objectWithoutProperties$1(props, _excluded$39);
321881
322492
 
321882
322493
  var prefixCls = getPrefixCls('divider', customizePrefixCls);
321883
322494
  var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
@@ -322263,7 +322874,7 @@
322263
322874
  }
322264
322875
  }; // 状态管理操作
322265
322876
 
322266
- var reducer$5 = function reducer(state, action) {
322877
+ var reducer$6 = function reducer(state, action) {
322267
322878
  var resize = action.resize,
322268
322879
  transform = action.transform,
322269
322880
  current = action.current;
@@ -322291,7 +322902,7 @@
322291
322902
  }
322292
322903
  }; // 仅在初始化时触发一次
322293
322904
 
322294
- var initialState$3 = function initialState(props) {
322905
+ var initialState$4 = function initialState(props) {
322295
322906
  var initialIndex = props.initialIndex;
322296
322907
  return _objectSpread(_objectSpread({}, defaultState), {}, {
322297
322908
  currentIndex: initialIndex
@@ -322642,10 +323253,10 @@
322642
323253
  var Root = /*#__PURE__*/React.forwardRef(function (props, ref) {
322643
323254
  var bodyRef = React.useRef(null);
322644
323255
  var initialState = React.useMemo(function () {
322645
- return initialState$3(props);
323256
+ return initialState$4(props);
322646
323257
  }, []);
322647
323258
 
322648
- var _useReducer = React.useReducer(reducer$5, initialState),
323259
+ var _useReducer = React.useReducer(reducer$6, initialState),
322649
323260
  _useReducer2 = _slicedToArray$1(_useReducer, 2),
322650
323261
  state = _useReducer2[0],
322651
323262
  dispatch = _useReducer2[1]; // 获取核心Methods
@@ -322711,7 +323322,7 @@
322711
323322
 
322712
323323
  }; // 状态管理操作
322713
323324
 
322714
- var reducer$6 = function reducer(state, action) {
323325
+ var reducer$7 = function reducer(state, action) {
322715
323326
  var result = action.result,
322716
323327
  init = action.init;
322717
323328
 
@@ -322727,7 +323338,7 @@
322727
323338
  }
322728
323339
  }; // 仅在初始化时触发一次
322729
323340
 
322730
- var initialState$4 = function initialState() {
323341
+ var initialState$5 = function initialState() {
322731
323342
  return _objectSpread({}, defaultState$1);
322732
323343
  };
322733
323344
 
@@ -324401,14 +325012,14 @@
324401
325012
 
324402
325013
  var Body$1 = /*#__PURE__*/React__default['default'].memo(Index$b);
324403
325014
 
324404
- var _excluded$37 = ["value", "onChange", "leftIcon", "rightIcon"];
325015
+ var _excluded$3a = ["value", "onChange", "leftIcon", "rightIcon"];
324405
325016
 
324406
325017
  var ResetSlider = function ResetSlider(_ref) {
324407
325018
  var value = _ref.value,
324408
325019
  _onChange = _ref.onChange,
324409
325020
  leftIcon = _ref.leftIcon,
324410
325021
  rightIcon = _ref.rightIcon,
324411
- props = _objectWithoutProperties$1(_ref, _excluded$37);
325022
+ props = _objectWithoutProperties$1(_ref, _excluded$3a);
324412
325023
 
324413
325024
  // 减
324414
325025
  var decrement = function decrement() {
@@ -324562,10 +325173,10 @@
324562
325173
 
324563
325174
  var LmBox = /*#__PURE__*/React.forwardRef(function (props, ref) {
324564
325175
  var initialState = React.useMemo(function () {
324565
- return initialState$4();
325176
+ return initialState$5();
324566
325177
  }, []);
324567
325178
 
324568
- var _useReducer = React.useReducer(reducer$6, initialState),
325179
+ var _useReducer = React.useReducer(reducer$7, initialState),
324569
325180
  _useReducer2 = _slicedToArray$1(_useReducer, 2),
324570
325181
  state = _useReducer2[0],
324571
325182
  dispatch = _useReducer2[1]; // 获取核心Methods
@@ -324628,7 +325239,7 @@
324628
325239
 
324629
325240
  }; // 状态管理操作
324630
325241
 
324631
- var reducer$7 = function reducer(state, action) {
325242
+ var reducer$8 = function reducer(state, action) {
324632
325243
  var transform = action.transform,
324633
325244
  current = action.current,
324634
325245
  visible = action.visible;
@@ -324661,7 +325272,7 @@
324661
325272
  }
324662
325273
  }; // 仅在初始化时触发一次
324663
325274
 
324664
- var initialState$5 = function initialState(props) {
325275
+ var initialState$6 = function initialState(props) {
324665
325276
  var initialIndex = props.initialIndex;
324666
325277
  return _objectSpread(_objectSpread({}, defaultState$2), {}, {
324667
325278
  currentIndex: initialIndex
@@ -325051,10 +325662,10 @@
325051
325662
  var LmImageViewerRoot = function LmImageViewerRoot(props, ref) {
325052
325663
  var previewRef = React.useRef(null);
325053
325664
  var initialState = React.useMemo(function () {
325054
- return initialState$5(props);
325665
+ return initialState$6(props);
325055
325666
  }, []);
325056
325667
 
325057
- var _useReducer = React.useReducer(reducer$7, initialState),
325668
+ var _useReducer = React.useReducer(reducer$8, initialState),
325058
325669
  _useReducer2 = _slicedToArray$1(_useReducer, 2),
325059
325670
  state = _useReducer2[0],
325060
325671
  dispatch = _useReducer2[1]; // 获取核心Methods
@@ -325109,7 +325720,7 @@
325109
325720
 
325110
325721
  var LmImageViewer$1 = /*#__PURE__*/React.forwardRef(LmImageViewer);
325111
325722
 
325112
- var SortableItem$3 = function SortableItem(_ref) {
325723
+ var SortableItem$4 = function SortableItem(_ref) {
325113
325724
  var index = _ref.index,
325114
325725
  item = _ref.item,
325115
325726
  instance = _ref.instance;
@@ -325145,7 +325756,7 @@
325145
325756
  })));
325146
325757
  };
325147
325758
 
325148
- var SortableItem$4 = /*#__PURE__*/React__default['default'].memo(SortableItem$3);
325759
+ var SortableItem$5 = /*#__PURE__*/React__default['default'].memo(SortableItem$4);
325149
325760
 
325150
325761
  var SortableBox$3 = function SortableBox(_ref) {
325151
325762
  var instance = _ref.instance;
@@ -325156,7 +325767,7 @@
325156
325767
  items: items,
325157
325768
  strategy: rectSortingStrategy
325158
325769
  }, options === null || options === void 0 ? void 0 : options.map(function (item, idx) {
325159
- return /*#__PURE__*/React__default['default'].createElement(SortableItem$4, {
325770
+ return /*#__PURE__*/React__default['default'].createElement(SortableItem$5, {
325160
325771
  instance: instance,
325161
325772
  index: idx,
325162
325773
  key: item[rowKey] || idx,
@@ -325167,7 +325778,7 @@
325167
325778
 
325168
325779
  var SortableBox$4 = /*#__PURE__*/React__default['default'].memo(SortableBox$3);
325169
325780
 
325170
- var DragOver = /*#__PURE__*/React__default['default'].memo(function (_ref) {
325781
+ var DragOver$1 = /*#__PURE__*/React__default['default'].memo(function (_ref) {
325171
325782
  var instance = _ref.instance;
325172
325783
  var isDragging = instance.isDragging,
325173
325784
  activeId = instance.activeId,
@@ -325189,7 +325800,7 @@
325189
325800
  */
325190
325801
  // 可拖拽容器
325191
325802
 
325192
- var DndContainer$2 = function DndContainer(_ref2) {
325803
+ var DndContainer$5 = function DndContainer(_ref2) {
325193
325804
  var options = _ref2.options,
325194
325805
  rowKey = _ref2.rowKey,
325195
325806
  children = _ref2.children,
@@ -325276,7 +325887,7 @@
325276
325887
  collisionDetection: closestCenter
325277
325888
  }, /*#__PURE__*/React__default['default'].createElement(SortableBox$4, {
325278
325889
  instance: instance
325279
- }), /*#__PURE__*/React__default['default'].createElement(DragOver, {
325890
+ }), /*#__PURE__*/React__default['default'].createElement(DragOver$1, {
325280
325891
  instance: instance
325281
325892
  }));
325282
325893
  };
@@ -325286,7 +325897,7 @@
325286
325897
  React.useImperativeHandle(ref, function () {
325287
325898
  return {};
325288
325899
  });
325289
- return /*#__PURE__*/React__default['default'].createElement(DndContainer$2, _objectSpread({}, props));
325900
+ return /*#__PURE__*/React__default['default'].createElement(DndContainer$5, _objectSpread({}, props));
325290
325901
  };
325291
325902
 
325292
325903
  var Root$2 = /*#__PURE__*/React.forwardRef(Root$1);