linkmore-design 1.1.13-alpha.10 → 1.1.13-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LmEditTable/components/DraggableContainer.d.ts +4 -1
- package/dist/LmEditTable/components/index.d.ts +4 -1
- package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
- package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
- package/dist/LmEditTable/util.d.ts +5 -0
- package/dist/LmEditTable/virtual/VirtualRow.d.ts +1 -0
- package/dist/index.umd.js +172 -33
- package/dist/index.umd.min.js +7 -7
- package/dist/variables.css +7 -0
- package/es/LmEditTable/DragHandle.js +1 -1
- package/es/LmEditTable/EditTable.js +22 -8
- package/es/LmEditTable/components/DraggableContainer.d.ts +4 -1
- package/es/LmEditTable/components/DraggableContainer.js +10 -3
- package/es/LmEditTable/components/index.d.ts +4 -1
- package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
- package/es/LmEditTable/hooks/useForkRef.js +22 -0
- package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
- package/es/LmEditTable/rowSort/DndContainerRow.js +81 -0
- package/es/LmEditTable/sortableItem.js +1 -0
- package/es/LmEditTable/style/index.css +7 -0
- package/es/LmEditTable/style/variables.css +7 -0
- package/es/LmEditTable/util.d.ts +5 -0
- package/es/LmEditTable/util.js +13 -0
- package/es/LmEditTable/virtual/VirtualRow.d.ts +1 -0
- package/es/LmEditTable/virtual/VirtualRow.js +5 -3
- package/es/LmEditTable/virtual/VirtualRowBack.js +12 -14
- package/es/LmFilter/filterFns/index.js +1 -1
- package/es/LmTable/virTual/VirtualRow.js +12 -14
- package/es/styles/variables.css +7 -0
- package/lib/LmEditTable/DragHandle.js +1 -1
- package/lib/LmEditTable/EditTable.js +21 -7
- package/lib/LmEditTable/components/DraggableContainer.d.ts +4 -1
- package/lib/LmEditTable/components/DraggableContainer.js +12 -5
- package/lib/LmEditTable/components/index.d.ts +4 -1
- package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
- package/lib/LmEditTable/hooks/useForkRef.js +29 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.js +99 -0
- package/lib/LmEditTable/sortableItem.js +1 -0
- package/lib/LmEditTable/style/index.css +7 -0
- package/lib/LmEditTable/style/variables.css +7 -0
- package/lib/LmEditTable/util.d.ts +5 -0
- package/lib/LmEditTable/util.js +15 -0
- package/lib/LmEditTable/virtual/VirtualRow.d.ts +1 -0
- package/lib/LmEditTable/virtual/VirtualRow.js +8 -3
- package/lib/LmEditTable/virtual/VirtualRowBack.js +12 -14
- package/lib/LmFilter/filterFns/index.js +1 -1
- package/lib/LmTable/virTual/VirtualRow.js +12 -14
- package/lib/styles/variables.css +7 -0
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
declare const DraggableContainer: ({ keys, onSortEnd, virtual, ...props }: {
|
|
1
|
+
declare const DraggableContainer: ({ keys, onSortEnd, virtual, rowKey, options, tableWidth, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
keys: any;
|
|
4
4
|
onSortEnd: any;
|
|
5
5
|
virtual: any;
|
|
6
|
+
rowKey: any;
|
|
7
|
+
options: any;
|
|
8
|
+
tableWidth: any;
|
|
6
9
|
}) => JSX.Element;
|
|
7
10
|
export default DraggableContainer;
|
|
@@ -3,11 +3,14 @@ import BottomOpetateComponent from './bottomOpetateComponent';
|
|
|
3
3
|
import QuickOpetate from './QuickOpetate';
|
|
4
4
|
export { DraggableContainer, BottomOpetateComponent, QuickOpetate };
|
|
5
5
|
declare const _default: {
|
|
6
|
-
DraggableContainer: ({ keys, onSortEnd, virtual, ...props }: {
|
|
6
|
+
DraggableContainer: ({ keys, onSortEnd, virtual, rowKey, options, tableWidth, ...props }: {
|
|
7
7
|
[x: string]: any;
|
|
8
8
|
keys: any;
|
|
9
9
|
onSortEnd: any;
|
|
10
10
|
virtual: any;
|
|
11
|
+
rowKey: any;
|
|
12
|
+
options: any;
|
|
13
|
+
tableWidth: any;
|
|
11
14
|
}) => JSX.Element;
|
|
12
15
|
};
|
|
13
16
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: React.MemoExoticComponent<({ children, options, move, rowKey, items, tableWidth }: {
|
|
3
|
+
children: any;
|
|
4
|
+
options: any;
|
|
5
|
+
move: any;
|
|
6
|
+
rowKey: any;
|
|
7
|
+
items: any;
|
|
8
|
+
tableWidth: any;
|
|
9
|
+
}) => JSX.Element>;
|
|
10
|
+
export default _default;
|
|
@@ -4,6 +4,11 @@ export declare function isExpandRow(children: any): boolean;
|
|
|
4
4
|
export declare function checkRowKeyByDataSource(dataSource: any, rowKey: any): any;
|
|
5
5
|
export declare function getExpandStatus(children: any): any;
|
|
6
6
|
export declare function checkMemoShouldUploadSpecialFun(prev: any, next: any): any;
|
|
7
|
+
export declare function checkExpandIconColumnIndex({ rowSelection, sortOpen, indexCol }: {
|
|
8
|
+
rowSelection: any;
|
|
9
|
+
sortOpen: any;
|
|
10
|
+
indexCol: any;
|
|
11
|
+
}): number;
|
|
7
12
|
declare const _default: {
|
|
8
13
|
isObjEmpty: typeof isObjEmpty;
|
|
9
14
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -92885,7 +92885,7 @@
|
|
|
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: obj[cur].mode === 'and' ? 'equal' : 'contains'
|
|
92888
|
+
operator: (item === null || item === void 0 ? void 0 : item.operator) || obj[cur].mode === 'and' ? 'equal' : 'contains'
|
|
92889
92889
|
}]);
|
|
92890
92890
|
}
|
|
92891
92891
|
|
|
@@ -233633,6 +233633,14 @@
|
|
|
233633
233633
|
return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
|
|
233634
233634
|
};
|
|
233635
233635
|
|
|
233636
|
+
const restrictToVerticalAxis = ({
|
|
233637
|
+
transform
|
|
233638
|
+
}) => {
|
|
233639
|
+
return { ...transform,
|
|
233640
|
+
x: 0
|
|
233641
|
+
};
|
|
233642
|
+
};
|
|
233643
|
+
|
|
233636
233644
|
var DndContainer = function DndContainer(_ref) {
|
|
233637
233645
|
var children = _ref.children,
|
|
233638
233646
|
move = _ref.move;
|
|
@@ -285974,12 +285982,16 @@
|
|
|
285974
285982
|
var rowHeight = state.rowHeight,
|
|
285975
285983
|
totalLen = state.totalLen;
|
|
285976
285984
|
var virtualItems = instance.columnVirtual.virtualItems;
|
|
285977
|
-
var trRef = React.useRef(null); //
|
|
285985
|
+
var trRef = React.useRef(null); // 非固定列长度
|
|
285978
285986
|
|
|
285979
285987
|
var columnsLen = React.useMemo(function () {
|
|
285980
|
-
var _children$
|
|
285988
|
+
var _children$filter$leng;
|
|
285981
285989
|
|
|
285982
|
-
return (_children$
|
|
285990
|
+
return (_children$filter$leng = children === null || children === void 0 ? void 0 : children.filter(function (v) {
|
|
285991
|
+
var _v$props, _v$props2;
|
|
285992
|
+
|
|
285993
|
+
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';
|
|
285994
|
+
}).length) !== null && _children$filter$leng !== void 0 ? _children$filter$leng : 0; // return children?.length ?? 0
|
|
285983
285995
|
}, [children]);
|
|
285984
285996
|
React.useEffect(function () {
|
|
285985
285997
|
if (state.columnsLen !== columnsLen) {
|
|
@@ -286028,26 +286040,20 @@
|
|
|
286028
286040
|
fixedRight: [],
|
|
286029
286041
|
columns: []
|
|
286030
286042
|
});
|
|
286031
|
-
}, [children]); //
|
|
286032
|
-
|
|
286033
|
-
var resetVirtualItems = React.useMemo(function () {
|
|
286034
|
-
var fixedLeft = fixedColumns.fixedLeft,
|
|
286035
|
-
columns = fixedColumns.columns;
|
|
286036
|
-
return virtualItems.slice(fixedLeft.length, fixedLeft.length + columns.length);
|
|
286037
|
-
}, [fixedColumns, virtualItems]); // 横线单元格合并
|
|
286043
|
+
}, [children]); // 横线单元格合并
|
|
286038
286044
|
|
|
286039
286045
|
var colSpan = React.useMemo(function () {
|
|
286040
|
-
var
|
|
286046
|
+
var _virtualItems$;
|
|
286041
286047
|
|
|
286042
|
-
|
|
286043
|
-
|
|
286044
|
-
|
|
286048
|
+
return (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.index;
|
|
286049
|
+
}, [virtualItems]);
|
|
286050
|
+
console.log('virtualItems', virtualItems);
|
|
286045
286051
|
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
|
|
286046
286052
|
ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
|
|
286047
286053
|
}), fixedColumns.fixedLeft, !!colSpan && /*#__PURE__*/React__default['default'].createElement("td", {
|
|
286048
286054
|
colSpan: colSpan
|
|
286049
|
-
}),
|
|
286050
|
-
return
|
|
286055
|
+
}), virtualItems.map(function (virtualCol) {
|
|
286056
|
+
return fixedColumns.columns[virtualCol.index];
|
|
286051
286057
|
}), fixedColumns.fixedRight);
|
|
286052
286058
|
});
|
|
286053
286059
|
|
|
@@ -312840,9 +312846,31 @@
|
|
|
312840
312846
|
})));
|
|
312841
312847
|
});
|
|
312842
312848
|
|
|
312843
|
-
|
|
312849
|
+
function setRef(ref, value) {
|
|
312850
|
+
if (typeof ref === 'function') {
|
|
312851
|
+
ref(value);
|
|
312852
|
+
} else if (ref) {
|
|
312853
|
+
ref.current = value;
|
|
312854
|
+
}
|
|
312855
|
+
}
|
|
312856
|
+
|
|
312857
|
+
function useForkRef(refA, refB) {
|
|
312858
|
+
return React.useMemo(function () {
|
|
312859
|
+
if (refA == null && refB == null) {
|
|
312860
|
+
return null;
|
|
312861
|
+
}
|
|
312862
|
+
|
|
312863
|
+
return function (refValue) {
|
|
312864
|
+
setRef(refA, refValue);
|
|
312865
|
+
setRef(refB, refValue);
|
|
312866
|
+
};
|
|
312867
|
+
}, [refA, refB]);
|
|
312868
|
+
}
|
|
312869
|
+
|
|
312870
|
+
var _excluded$2Q = ["children", "pref"];
|
|
312844
312871
|
var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
|
|
312845
312872
|
var children = _ref.children,
|
|
312873
|
+
pref = _ref.pref,
|
|
312846
312874
|
resetProps = _objectWithoutProperties$1(_ref, _excluded$2Q);
|
|
312847
312875
|
|
|
312848
312876
|
var _useStore = useStore$1(),
|
|
@@ -312881,10 +312909,10 @@
|
|
|
312881
312909
|
}
|
|
312882
312910
|
};
|
|
312883
312911
|
|
|
312884
|
-
initHeight(
|
|
312912
|
+
initHeight(trRef);
|
|
312885
312913
|
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
312886
312914
|
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
|
|
312887
|
-
ref:
|
|
312915
|
+
ref: useForkRef(pref, trRef)
|
|
312888
312916
|
}), children);
|
|
312889
312917
|
});
|
|
312890
312918
|
|
|
@@ -312920,6 +312948,7 @@
|
|
|
312920
312948
|
|
|
312921
312949
|
return /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread(_objectSpread({}, resetField), {}, {
|
|
312922
312950
|
ref: setNodeRef,
|
|
312951
|
+
pref: setNodeRef,
|
|
312923
312952
|
key: key,
|
|
312924
312953
|
style: style
|
|
312925
312954
|
}, attributes), children);
|
|
@@ -313009,7 +313038,7 @@
|
|
|
313009
313038
|
touchAction: 'none',
|
|
313010
313039
|
cursor: 'move'
|
|
313011
313040
|
},
|
|
313012
|
-
className:
|
|
313041
|
+
className: "icon_drag".concat(isDragging ? 'bing' : '')
|
|
313013
313042
|
}));
|
|
313014
313043
|
};
|
|
313015
313044
|
|
|
@@ -313090,6 +313119,10 @@
|
|
|
313090
313119
|
return false;
|
|
313091
313120
|
}
|
|
313092
313121
|
|
|
313122
|
+
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') {
|
|
313123
|
+
return false;
|
|
313124
|
+
}
|
|
313125
|
+
|
|
313093
313126
|
if (prev.isEdit !== next.isEdit) {
|
|
313094
313127
|
return false;
|
|
313095
313128
|
} // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
|
|
@@ -313141,6 +313174,91 @@
|
|
|
313141
313174
|
|
|
313142
313175
|
return true;
|
|
313143
313176
|
}
|
|
313177
|
+
function checkExpandIconColumnIndex(_ref) {
|
|
313178
|
+
var rowSelection = _ref.rowSelection,
|
|
313179
|
+
sortOpen = _ref.sortOpen,
|
|
313180
|
+
indexCol = _ref.indexCol;
|
|
313181
|
+
var arr = [rowSelection, sortOpen, indexCol].filter(function (item) {
|
|
313182
|
+
return !!item;
|
|
313183
|
+
});
|
|
313184
|
+
return arr.length;
|
|
313185
|
+
}
|
|
313186
|
+
|
|
313187
|
+
var DndContainer$3 = function DndContainer(_ref) {
|
|
313188
|
+
var children = _ref.children,
|
|
313189
|
+
options = _ref.options,
|
|
313190
|
+
move = _ref.move,
|
|
313191
|
+
rowKey = _ref.rowKey,
|
|
313192
|
+
items = _ref.items,
|
|
313193
|
+
tableWidth = _ref.tableWidth;
|
|
313194
|
+
|
|
313195
|
+
var _React$useState = React__default['default'].useState(false),
|
|
313196
|
+
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
313197
|
+
isDragging = _React$useState2[0],
|
|
313198
|
+
setIsDragging = _React$useState2[1]; // 是否拖拽中
|
|
313199
|
+
|
|
313200
|
+
|
|
313201
|
+
var _React$useState3 = React__default['default'].useState(null),
|
|
313202
|
+
_React$useState4 = _slicedToArray$1(_React$useState3, 2),
|
|
313203
|
+
activeId = _React$useState4[0],
|
|
313204
|
+
setActiveId = _React$useState4[1]; // 是否拖拽中
|
|
313205
|
+
|
|
313206
|
+
|
|
313207
|
+
var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
313208
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
313209
|
+
})); // 开始拖拽
|
|
313210
|
+
|
|
313211
|
+
var handleDragStart = function handleDragStart(_ref2) {
|
|
313212
|
+
var active = _ref2.active;
|
|
313213
|
+
setIsDragging(true);
|
|
313214
|
+
|
|
313215
|
+
if (!active) {
|
|
313216
|
+
return;
|
|
313217
|
+
}
|
|
313218
|
+
|
|
313219
|
+
setActiveId(active.id);
|
|
313220
|
+
}; // 拖拽结束
|
|
313221
|
+
|
|
313222
|
+
|
|
313223
|
+
var handleDragEnd = function handleDragEnd(event) {
|
|
313224
|
+
var active = event.active,
|
|
313225
|
+
over = event.over;
|
|
313226
|
+
setActiveId(null); // 未移入时触发
|
|
313227
|
+
|
|
313228
|
+
if (!(over === null || over === void 0 ? void 0 : over.id)) {
|
|
313229
|
+
return;
|
|
313230
|
+
} // 移入时触发更新数据
|
|
313231
|
+
|
|
313232
|
+
|
|
313233
|
+
if (active.id !== over.id) {
|
|
313234
|
+
move(active.id, over.id);
|
|
313235
|
+
}
|
|
313236
|
+
};
|
|
313237
|
+
|
|
313238
|
+
var instance = {
|
|
313239
|
+
isDragging: isDragging,
|
|
313240
|
+
activeId: activeId,
|
|
313241
|
+
options: options,
|
|
313242
|
+
rowKey: rowKey,
|
|
313243
|
+
children: children,
|
|
313244
|
+
move: move,
|
|
313245
|
+
items: items,
|
|
313246
|
+
tableWidth: tableWidth
|
|
313247
|
+
};
|
|
313248
|
+
console.log('instance', instance);
|
|
313249
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContext, {
|
|
313250
|
+
sensors: sensors,
|
|
313251
|
+
onDragStart: handleDragStart,
|
|
313252
|
+
onDragCancel: function onDragCancel() {
|
|
313253
|
+
return setActiveId(null);
|
|
313254
|
+
},
|
|
313255
|
+
collisionDetection: closestCenter,
|
|
313256
|
+
onDragEnd: handleDragEnd,
|
|
313257
|
+
modifiers: [restrictToParentElement, restrictToVerticalAxis]
|
|
313258
|
+
}, children);
|
|
313259
|
+
};
|
|
313260
|
+
|
|
313261
|
+
var DndContainer$4 = /*#__PURE__*/React.memo(DndContainer$3);
|
|
313144
313262
|
|
|
313145
313263
|
var SortableBox$2 = function SortableBox(_ref) {
|
|
313146
313264
|
var items = _ref.items,
|
|
@@ -313151,16 +313269,23 @@
|
|
|
313151
313269
|
}, children);
|
|
313152
313270
|
};
|
|
313153
313271
|
|
|
313154
|
-
var _excluded$2T = ["keys", "onSortEnd", "virtual"];
|
|
313272
|
+
var _excluded$2T = ["keys", "onSortEnd", "virtual", "rowKey", "options", "tableWidth"];
|
|
313155
313273
|
|
|
313156
313274
|
var DraggableContainer = function DraggableContainer(_ref) {
|
|
313157
313275
|
var keys = _ref.keys,
|
|
313158
313276
|
onSortEnd = _ref.onSortEnd,
|
|
313159
313277
|
virtual = _ref.virtual,
|
|
313278
|
+
rowKey = _ref.rowKey,
|
|
313279
|
+
options = _ref.options,
|
|
313280
|
+
tableWidth = _ref.tableWidth,
|
|
313160
313281
|
props = _objectWithoutProperties$1(_ref, _excluded$2T);
|
|
313161
313282
|
|
|
313162
|
-
return /*#__PURE__*/React__default['default'].createElement(DndContainer$
|
|
313163
|
-
move: onSortEnd
|
|
313283
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContainer$4, {
|
|
313284
|
+
move: onSortEnd,
|
|
313285
|
+
items: keys,
|
|
313286
|
+
rowKey: rowKey,
|
|
313287
|
+
options: options,
|
|
313288
|
+
tableWidth: tableWidth
|
|
313164
313289
|
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
|
|
313165
313290
|
items: keys
|
|
313166
313291
|
}, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualWrapper$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
|
|
@@ -313322,7 +313447,7 @@
|
|
|
313322
313447
|
_excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
|
|
313323
313448
|
_excluded4$2 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps"],
|
|
313324
313449
|
_excluded5 = ["onMouseEnter", "onMouseLeave"],
|
|
313325
|
-
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
|
|
313450
|
+
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading"];
|
|
313326
313451
|
var UploadBtn$1 = UploadOss.UploadBtn;
|
|
313327
313452
|
var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
|
|
313328
313453
|
|
|
@@ -313933,6 +314058,8 @@
|
|
|
313933
314058
|
recordCreatorProps = props.recordCreatorProps,
|
|
313934
314059
|
_props$shouldUpdate = props.shouldUpdate,
|
|
313935
314060
|
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
314061
|
+
_props$loading = props.loading,
|
|
314062
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
313936
314063
|
resetProps = _objectWithoutProperties$1(props, _excluded6);
|
|
313937
314064
|
|
|
313938
314065
|
var _useControllableValue = useControllableValue({
|
|
@@ -313970,6 +314097,7 @@
|
|
|
313970
314097
|
var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
|
|
313971
314098
|
dataSourceRef.current = dataSource;
|
|
313972
314099
|
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
314100
|
+
var tableWarpRef = React.useRef(null);
|
|
313973
314101
|
|
|
313974
314102
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
313975
314103
|
var _arrayMove;
|
|
@@ -314118,7 +314246,7 @@
|
|
|
314118
314246
|
return newData;
|
|
314119
314247
|
};
|
|
314120
314248
|
|
|
314121
|
-
var res = filter(
|
|
314249
|
+
var res = filter(dataSourceRef.current, key);
|
|
314122
314250
|
setDataSource(res);
|
|
314123
314251
|
} else {
|
|
314124
314252
|
var _dataSourceRef$curren;
|
|
@@ -314550,14 +314678,17 @@
|
|
|
314550
314678
|
cell: MemoEditableCell
|
|
314551
314679
|
}, sortOpen ? {
|
|
314552
314680
|
wrapper: function wrapper(wrapperProps) {
|
|
314553
|
-
var _dataSourceRef$curren2;
|
|
314681
|
+
var _dataSourceRef$curren2, _tableWarpRef$current, _tableWarpRef$current2;
|
|
314554
314682
|
|
|
314555
314683
|
return DraggableContainer(_objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
314556
314684
|
virtual: virtual,
|
|
314557
314685
|
keys: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
|
|
314558
314686
|
return item[_rowKey];
|
|
314559
314687
|
}),
|
|
314560
|
-
|
|
314688
|
+
options: dataSourceRef.current,
|
|
314689
|
+
rowKey: _rowKey,
|
|
314690
|
+
onSortEnd: onSortEnd,
|
|
314691
|
+
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
|
|
314561
314692
|
}));
|
|
314562
314693
|
}
|
|
314563
314694
|
} : virtual ? {
|
|
@@ -314578,7 +314709,8 @@
|
|
|
314578
314709
|
var _localRowSelectList$s;
|
|
314579
314710
|
|
|
314580
314711
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
314581
|
-
className: "lm_editTable_warpper"
|
|
314712
|
+
className: "lm_editTable_warpper",
|
|
314713
|
+
ref: tableWarpRef
|
|
314582
314714
|
}, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
|
|
314583
314715
|
move: onColSortEnd
|
|
314584
314716
|
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
|
|
@@ -314586,6 +314718,7 @@
|
|
|
314586
314718
|
return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
|
|
314587
314719
|
}, [])
|
|
314588
314720
|
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
|
|
314721
|
+
loading: loading,
|
|
314589
314722
|
size: size || 'small',
|
|
314590
314723
|
columns: resultColumns,
|
|
314591
314724
|
rowClassName: "editable-row",
|
|
@@ -314614,19 +314747,25 @@
|
|
|
314614
314747
|
|
|
314615
314748
|
|
|
314616
314749
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
314617
|
-
className: "lm_editTable_warpper"
|
|
314750
|
+
className: "lm_editTable_warpper",
|
|
314751
|
+
ref: tableWarpRef
|
|
314618
314752
|
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
|
|
314619
314753
|
size: size || 'small',
|
|
314620
314754
|
columns: resultColumns,
|
|
314621
314755
|
rowClassName: "editable-row",
|
|
314622
314756
|
bordered: true,
|
|
314757
|
+
loading: loading,
|
|
314623
314758
|
pagination: false,
|
|
314624
314759
|
// components={tableComponents}
|
|
314625
314760
|
expandable: (resetProps === null || resetProps === void 0 ? void 0 : resetProps.expandable) || {
|
|
314626
314761
|
expandedRowKeys: expandedRowKeys,
|
|
314627
314762
|
fixed: true,
|
|
314628
314763
|
// indentSize: 0,
|
|
314629
|
-
expandIconColumnIndex:
|
|
314764
|
+
expandIconColumnIndex: checkExpandIconColumnIndex({
|
|
314765
|
+
rowSelection: rowSelection,
|
|
314766
|
+
sortOpen: sortOpen,
|
|
314767
|
+
indexCol: indexCol
|
|
314768
|
+
}) || 0,
|
|
314630
314769
|
onExpandedRowsChange: function onExpandedRowsChange(expandedRows) {
|
|
314631
314770
|
return setExpandedRowKeys(expandedRows);
|
|
314632
314771
|
}
|
|
@@ -325594,7 +325733,7 @@
|
|
|
325594
325733
|
*/
|
|
325595
325734
|
// 可拖拽容器
|
|
325596
325735
|
|
|
325597
|
-
var DndContainer$
|
|
325736
|
+
var DndContainer$5 = function DndContainer(_ref2) {
|
|
325598
325737
|
var options = _ref2.options,
|
|
325599
325738
|
rowKey = _ref2.rowKey,
|
|
325600
325739
|
children = _ref2.children,
|
|
@@ -325691,7 +325830,7 @@
|
|
|
325691
325830
|
React.useImperativeHandle(ref, function () {
|
|
325692
325831
|
return {};
|
|
325693
325832
|
});
|
|
325694
|
-
return /*#__PURE__*/React__default['default'].createElement(DndContainer$
|
|
325833
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContainer$5, _objectSpread({}, props));
|
|
325695
325834
|
};
|
|
325696
325835
|
|
|
325697
325836
|
var Root$2 = /*#__PURE__*/React.forwardRef(Root$1);
|