linkmore-design 1.1.11 → 1.1.13-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.
- package/CHANGELOG.md +34 -0
- package/dist/Cascader/demos/formItem.d.ts +2 -0
- package/dist/LmEditTable/DndContainer.d.ts +4 -3
- package/dist/LmEditTable/EditTable.d.ts +2 -0
- package/dist/LmEditTable/components/DraggableContainer.d.ts +7 -0
- package/dist/LmEditTable/components/index.d.ts +11 -0
- package/dist/LmEditTable/sortableItem.d.ts +3 -2
- package/dist/LmEditTable/util.d.ts +2 -0
- package/dist/LmEditTable/virtual/VirtualRow.d.ts +6 -0
- package/dist/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
- package/dist/LmEditTable/virtual/VirtualTable.d.ts +3 -0
- package/dist/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
- package/dist/LmEditTable/virtual/context.d.ts +13 -0
- package/dist/LmEditTable/virtual/index.d.ts +4 -0
- package/dist/Select/demos/formItem.d.ts +2 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/TreeSelect/demos/formItem.d.ts +2 -0
- package/dist/TreeSelect/index.d.ts +8 -3
- package/dist/index.umd.js +629 -226
- package/dist/index.umd.min.js +5 -5
- package/dist/variables.css +47 -0
- package/es/IconFont/index.js +1 -1
- package/es/LmEditTable/DndContainer.d.ts +4 -3
- package/es/LmEditTable/DndContainer.js +2 -2
- package/es/LmEditTable/EditTable.d.ts +2 -0
- package/es/LmEditTable/EditTable.js +200 -158
- package/es/LmEditTable/components/DraggableContainer.d.ts +7 -0
- package/es/LmEditTable/components/DraggableContainer.js +32 -0
- package/es/LmEditTable/components/index.d.ts +11 -0
- package/es/LmEditTable/components/index.js +5 -0
- package/es/LmEditTable/sortableItem.d.ts +3 -2
- package/es/LmEditTable/sortableItem.js +15 -4
- package/es/LmEditTable/style/index.css +47 -0
- package/es/LmEditTable/style/variables.css +47 -0
- package/es/LmEditTable/util.d.ts +2 -0
- package/es/LmEditTable/util.js +37 -1
- package/es/LmEditTable/virtual/VirtualRow.d.ts +6 -0
- package/es/LmEditTable/virtual/VirtualRow.js +60 -0
- package/es/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
- package/es/LmEditTable/virtual/VirtualRowBack.js +102 -0
- package/es/LmEditTable/virtual/VirtualTable.d.ts +3 -0
- package/es/LmEditTable/virtual/VirtualTable.js +54 -0
- package/es/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
- package/es/LmEditTable/virtual/VirtualWrapper.js +60 -0
- package/es/LmEditTable/virtual/context.d.ts +13 -0
- package/es/LmEditTable/virtual/context.js +54 -0
- package/es/LmEditTable/virtual/index.d.ts +4 -0
- package/es/LmEditTable/virtual/index.js +4 -0
- package/es/Select/index.d.ts +1 -0
- package/es/Select/index.js +38 -4
- package/es/TreeSelect/index.d.ts +8 -3
- package/es/TreeSelect/index.js +74 -1
- package/es/hooks/useEvent/index.js +1 -1
- package/es/styles/variables.css +47 -0
- package/lib/IconFont/index.js +1 -1
- package/lib/LmEditTable/DndContainer.d.ts +4 -3
- package/lib/LmEditTable/DndContainer.js +4 -3
- package/lib/LmEditTable/EditTable.d.ts +2 -0
- package/lib/LmEditTable/EditTable.js +195 -153
- package/lib/LmEditTable/components/DraggableContainer.d.ts +7 -0
- package/lib/LmEditTable/components/DraggableContainer.js +45 -0
- package/lib/LmEditTable/components/index.d.ts +11 -0
- package/lib/LmEditTable/components/index.js +21 -0
- package/lib/LmEditTable/sortableItem.d.ts +3 -2
- package/lib/LmEditTable/sortableItem.js +18 -5
- package/lib/LmEditTable/style/index.css +47 -0
- package/lib/LmEditTable/style/variables.css +47 -0
- package/lib/LmEditTable/util.d.ts +2 -0
- package/lib/LmEditTable/util.js +40 -0
- package/lib/LmEditTable/virtual/VirtualRow.d.ts +6 -0
- package/lib/LmEditTable/virtual/VirtualRow.js +73 -0
- package/lib/LmEditTable/virtual/VirtualRowBack.d.ts +6 -0
- package/lib/LmEditTable/virtual/VirtualRowBack.js +115 -0
- package/lib/LmEditTable/virtual/VirtualTable.d.ts +3 -0
- package/lib/LmEditTable/virtual/VirtualTable.js +71 -0
- package/lib/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
- package/lib/LmEditTable/virtual/VirtualWrapper.js +73 -0
- package/lib/LmEditTable/virtual/context.d.ts +13 -0
- package/lib/LmEditTable/virtual/context.js +64 -0
- package/lib/LmEditTable/virtual/index.d.ts +4 -0
- package/lib/LmEditTable/virtual/index.js +31 -0
- package/lib/Select/index.d.ts +1 -0
- package/lib/Select/index.js +37 -3
- package/lib/TreeSelect/index.d.ts +8 -3
- package/lib/TreeSelect/index.js +78 -1
- package/lib/hooks/useEvent/index.js +1 -1
- package/lib/styles/variables.css +47 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -68580,7 +68580,7 @@
|
|
|
68580
68580
|
});
|
|
68581
68581
|
|
|
68582
68582
|
var IconFont = create({
|
|
68583
|
-
scriptUrl: '//at.alicdn.com/t/c/
|
|
68583
|
+
scriptUrl: '//at.alicdn.com/t/c/font_2966019_neaxovtw4w.js' // 在 iconfont.cn 上生成
|
|
68584
68584
|
// scriptUrl: require('./font/iconfont.js'),
|
|
68585
68585
|
|
|
68586
68586
|
});
|
|
@@ -287098,7 +287098,12 @@
|
|
|
287098
287098
|
|
|
287099
287099
|
return React.useCallback(function () {
|
|
287100
287100
|
var fn = handlerRef.current;
|
|
287101
|
-
|
|
287101
|
+
|
|
287102
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
287103
|
+
args[_key] = arguments[_key];
|
|
287104
|
+
}
|
|
287105
|
+
|
|
287106
|
+
return fn === null || fn === void 0 ? void 0 : fn.apply(void 0, args);
|
|
287102
287107
|
}, []);
|
|
287103
287108
|
}
|
|
287104
287109
|
|
|
@@ -288099,20 +288104,54 @@
|
|
|
288099
288104
|
|
|
288100
288105
|
LMRadio.Button = Radio$1.Button;
|
|
288101
288106
|
|
|
288102
|
-
var _excluded$2h = ["children", "className", "size", "dropdownClassName"];
|
|
288107
|
+
var _excluded$2h = ["children", "className", "size", "dropdownClassName", "options", "value", "defaultLabel"];
|
|
288103
288108
|
var prefixCls$7 = 'lm_select';
|
|
288104
288109
|
var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
288105
288110
|
var children = props.children,
|
|
288106
288111
|
className = props.className,
|
|
288107
288112
|
customizeSize = props.size,
|
|
288108
288113
|
dropdownClassName = props.dropdownClassName,
|
|
288114
|
+
options = props.options,
|
|
288115
|
+
value = props.value,
|
|
288116
|
+
defaultLabel = props.defaultLabel,
|
|
288109
288117
|
others = _objectWithoutProperties$1(props, _excluded$2h);
|
|
288110
288118
|
|
|
288111
|
-
var size = customizeSize || React__default['default'].useContext(SizeContext$1) || 'middle';
|
|
288119
|
+
var size = customizeSize || React__default['default'].useContext(SizeContext$1) || 'middle'; // 当前值是否存于选项中
|
|
288120
|
+
|
|
288121
|
+
var hasOption = React.useMemo(function () {
|
|
288122
|
+
var flag = false;
|
|
288123
|
+
|
|
288124
|
+
if (children) {
|
|
288125
|
+
React__default['default'].Children.forEach(children, function (child) {
|
|
288126
|
+
if ( /*#__PURE__*/React__default['default'].isValidElement(child)) {
|
|
288127
|
+
var childValue = child.props.value;
|
|
288128
|
+
|
|
288129
|
+
if (!flag) {
|
|
288130
|
+
flag = childValue === value;
|
|
288131
|
+
}
|
|
288132
|
+
}
|
|
288133
|
+
});
|
|
288134
|
+
}
|
|
288135
|
+
|
|
288136
|
+
if (options) {
|
|
288137
|
+
flag = !!options.some(function (v) {
|
|
288138
|
+
return v.value === value;
|
|
288139
|
+
});
|
|
288140
|
+
}
|
|
288141
|
+
|
|
288142
|
+
return flag;
|
|
288143
|
+
}, [children, value, options]); // 重组value: 传入value但找不到options项时,展示默认label
|
|
288144
|
+
|
|
288145
|
+
var resetValue = React.useMemo(function () {
|
|
288146
|
+
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
288147
|
+
return value;
|
|
288148
|
+
}, [value, hasOption]);
|
|
288112
288149
|
return /*#__PURE__*/React__default['default'].createElement(Select$2, _objectSpread(_objectSpread({
|
|
288113
288150
|
className: classnames(className, prefixCls$7),
|
|
288114
288151
|
size: size,
|
|
288115
|
-
ref: ref
|
|
288152
|
+
ref: ref,
|
|
288153
|
+
value: resetValue,
|
|
288154
|
+
options: options
|
|
288116
288155
|
}, others), {}, {
|
|
288117
288156
|
dropdownClassName: classnames('lm_select_dropdown', dropdownClassName)
|
|
288118
288157
|
}), children);
|
|
@@ -311919,31 +311958,220 @@
|
|
|
311919
311958
|
}, children);
|
|
311920
311959
|
};
|
|
311921
311960
|
|
|
311961
|
+
var DndContainer$2 = /*#__PURE__*/React.memo(DndContainer$1);
|
|
311962
|
+
|
|
311922
311963
|
var SortableBox$1 = function SortableBox(_ref) {
|
|
311923
311964
|
var items = _ref.items,
|
|
311924
311965
|
children = _ref.children;
|
|
311925
311966
|
return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
|
|
311926
311967
|
items: items,
|
|
311927
|
-
strategy:
|
|
311968
|
+
strategy: horizontalListSortingStrategy
|
|
311928
311969
|
}, children);
|
|
311929
311970
|
};
|
|
311930
311971
|
|
|
311931
|
-
var
|
|
311932
|
-
|
|
311933
|
-
|
|
311934
|
-
|
|
311935
|
-
|
|
311936
|
-
|
|
311937
|
-
|
|
311972
|
+
var TableContext$2 = /*#__PURE__*/React.createContext({
|
|
311973
|
+
state: null,
|
|
311974
|
+
dispatch: null,
|
|
311975
|
+
instance: {}
|
|
311976
|
+
});
|
|
311977
|
+
|
|
311978
|
+
var useStore$1 = function useStore() {
|
|
311979
|
+
return React.useContext(TableContext$2);
|
|
311980
|
+
};
|
|
311981
|
+
|
|
311982
|
+
var initialState$3 = {
|
|
311983
|
+
// 行高度
|
|
311984
|
+
rowHeight: 0,
|
|
311985
|
+
columnsLen: 0,
|
|
311986
|
+
// 总行数
|
|
311987
|
+
totalLen: 0
|
|
311988
|
+
};
|
|
311989
|
+
|
|
311990
|
+
var reducer$5 = function reducer(state, action) {
|
|
311991
|
+
var totalLen = action.totalLen,
|
|
311992
|
+
columnsLen = action.columnsLen,
|
|
311993
|
+
rowHeight = action.rowHeight;
|
|
311994
|
+
|
|
311995
|
+
switch (action.type) {
|
|
311996
|
+
// 数据数量
|
|
311997
|
+
case 'changeTotalLen':
|
|
311998
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
311999
|
+
totalLen: totalLen
|
|
312000
|
+
});
|
|
312001
|
+
// 列数量
|
|
312002
|
+
|
|
312003
|
+
case 'changeColumnsLen':
|
|
312004
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
312005
|
+
columnsLen: columnsLen
|
|
312006
|
+
});
|
|
312007
|
+
// 初始化行高度
|
|
312008
|
+
|
|
312009
|
+
case 'initHeight':
|
|
312010
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
312011
|
+
rowHeight: rowHeight
|
|
312012
|
+
});
|
|
312013
|
+
|
|
312014
|
+
default:
|
|
312015
|
+
throw new Error();
|
|
312016
|
+
}
|
|
311938
312017
|
};
|
|
311939
312018
|
|
|
311940
|
-
var
|
|
312019
|
+
var useRealive$1 = function useRealive() {
|
|
312020
|
+
return React.useReducer(reducer$5, initialState$3);
|
|
312021
|
+
};
|
|
312022
|
+
|
|
312023
|
+
var VirtualTable$1 = /*#__PURE__*/React__default['default'].memo(function (tableProps) {
|
|
312024
|
+
var _bodyRef$current, _bodyRef$current2, _tableProps$children$3, _tableProps$children$4;
|
|
312025
|
+
|
|
312026
|
+
var bodyRef = React.useRef(null);
|
|
312027
|
+
|
|
312028
|
+
var _useRealive = useRealive$1(),
|
|
312029
|
+
_useRealive2 = _slicedToArray$1(_useRealive, 2),
|
|
312030
|
+
state = _useRealive2[0],
|
|
312031
|
+
dispatch = _useRealive2[1]; // { totalSize, virtualItems }
|
|
312032
|
+
|
|
312033
|
+
|
|
312034
|
+
var rowVirtual = useVirtual({
|
|
312035
|
+
size: state.totalLen,
|
|
312036
|
+
// 绑定父节点
|
|
312037
|
+
parentRef: {
|
|
312038
|
+
current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current = bodyRef.current) === null || _bodyRef$current === void 0 ? void 0 : _bodyRef$current.parentNode
|
|
312039
|
+
},
|
|
312040
|
+
estimateSize: React__default['default'].useCallback(function () {
|
|
312041
|
+
return state.rowHeight;
|
|
312042
|
+
}, [state.rowHeight]),
|
|
312043
|
+
overscan: 5
|
|
312044
|
+
});
|
|
312045
|
+
var columnVirtual = useVirtual({
|
|
312046
|
+
horizontal: true,
|
|
312047
|
+
size: state.columnsLen,
|
|
312048
|
+
parentRef: {
|
|
312049
|
+
current: bodyRef === null || bodyRef === void 0 ? void 0 : (_bodyRef$current2 = bodyRef.current) === null || _bodyRef$current2 === void 0 ? void 0 : _bodyRef$current2.parentNode
|
|
312050
|
+
},
|
|
312051
|
+
estimateSize: React__default['default'].useCallback(function (i) {
|
|
312052
|
+
var _tableProps$children$, _tableProps$children$2;
|
|
312053
|
+
|
|
312054
|
+
return tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$children$ = tableProps.children[0]) === null || _tableProps$children$ === void 0 ? void 0 : (_tableProps$children$2 = _tableProps$children$.props) === null || _tableProps$children$2 === void 0 ? void 0 : _tableProps$children$2.colWidths[i];
|
|
312055
|
+
}, [(_tableProps$children$3 = tableProps.children[0]) === null || _tableProps$children$3 === void 0 ? void 0 : (_tableProps$children$4 = _tableProps$children$3.props) === null || _tableProps$children$4 === void 0 ? void 0 : _tableProps$children$4.colWidths]),
|
|
312056
|
+
overscan: 5
|
|
312057
|
+
});
|
|
312058
|
+
var instance = {
|
|
312059
|
+
rowVirtual: rowVirtual,
|
|
312060
|
+
columnVirtual: columnVirtual
|
|
312061
|
+
};
|
|
312062
|
+
return /*#__PURE__*/React__default['default'].createElement(TableContext$2.Provider, {
|
|
312063
|
+
value: {
|
|
312064
|
+
state: state,
|
|
312065
|
+
dispatch: dispatch,
|
|
312066
|
+
instance: instance
|
|
312067
|
+
}
|
|
312068
|
+
}, /*#__PURE__*/React__default['default'].createElement("table", _objectSpread({
|
|
312069
|
+
ref: bodyRef
|
|
312070
|
+
}, tableProps)));
|
|
312071
|
+
});
|
|
312072
|
+
|
|
312073
|
+
var _excluded$2Q = ["children"];
|
|
312074
|
+
var VirtualWrapper$1 = /*#__PURE__*/React__default['default'].memo(function (wrapperProps) {
|
|
312075
|
+
var _virtualItems$, _virtualItems;
|
|
312076
|
+
|
|
312077
|
+
var children = wrapperProps.children,
|
|
312078
|
+
resetProps = _objectWithoutProperties$1(wrapperProps, _excluded$2Q);
|
|
312079
|
+
|
|
312080
|
+
var _useStore = useStore$1(),
|
|
312081
|
+
state = _useStore.state,
|
|
312082
|
+
dispatch = _useStore.dispatch,
|
|
312083
|
+
instance = _useStore.instance;
|
|
312084
|
+
|
|
312085
|
+
var _instance$rowVirtual = instance.rowVirtual,
|
|
312086
|
+
virtualItems = _instance$rowVirtual.virtualItems,
|
|
312087
|
+
totalSize = _instance$rowVirtual.totalSize;
|
|
312088
|
+
var contents = React.useMemo(function () {
|
|
312089
|
+
return children[1];
|
|
312090
|
+
}, [children]);
|
|
312091
|
+
var contentsLen = React.useMemo(function () {
|
|
312092
|
+
var _contents$length;
|
|
312093
|
+
|
|
312094
|
+
return (_contents$length = contents === null || contents === void 0 ? void 0 : contents.length) !== null && _contents$length !== void 0 ? _contents$length : 0;
|
|
312095
|
+
}, [contents]);
|
|
312096
|
+
React.useEffect(function () {
|
|
312097
|
+
if (state.totalLen !== contentsLen) {
|
|
312098
|
+
dispatch({
|
|
312099
|
+
type: 'changeTotalLen',
|
|
312100
|
+
totalLen: contentsLen !== null && contentsLen !== void 0 ? contentsLen : 0
|
|
312101
|
+
});
|
|
312102
|
+
}
|
|
312103
|
+
}, [contentsLen, dispatch, state.totalLen]);
|
|
312104
|
+
var paddingTop = virtualItems.length > 0 ? (virtualItems === null || virtualItems === void 0 ? void 0 : (_virtualItems$ = virtualItems[0]) === null || _virtualItems$ === void 0 ? void 0 : _virtualItems$.start) || 0 : 0;
|
|
312105
|
+
var paddingBottom = virtualItems.length > 0 ? totalSize - ((virtualItems === null || virtualItems === void 0 ? void 0 : (_virtualItems = virtualItems[virtualItems.length - 1]) === null || _virtualItems === void 0 ? void 0 : _virtualItems.end) || 0) : 0;
|
|
312106
|
+
return /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, resetProps), paddingTop > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
312107
|
+
style: {
|
|
312108
|
+
height: "".concat(paddingTop, "px")
|
|
312109
|
+
}
|
|
312110
|
+
})), children[0], virtualItems.map(function (virtualRow) {
|
|
312111
|
+
return contents[virtualRow.index];
|
|
312112
|
+
}), paddingBottom > 0 && /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
312113
|
+
style: {
|
|
312114
|
+
height: "".concat(paddingBottom, "px")
|
|
312115
|
+
}
|
|
312116
|
+
})));
|
|
312117
|
+
});
|
|
312118
|
+
|
|
312119
|
+
var _excluded$2R = ["children"];
|
|
312120
|
+
var VirtualRow$1 = /*#__PURE__*/React__default['default'].memo(function (_ref, ref) {
|
|
312121
|
+
var children = _ref.children,
|
|
312122
|
+
resetProps = _objectWithoutProperties$1(_ref, _excluded$2R);
|
|
312123
|
+
|
|
312124
|
+
var _useStore = useStore$1(),
|
|
312125
|
+
state = _useStore.state,
|
|
312126
|
+
dispatch = _useStore.dispatch;
|
|
312127
|
+
|
|
312128
|
+
var rowHeight = state.rowHeight,
|
|
312129
|
+
totalLen = state.totalLen;
|
|
312130
|
+
var trRef = React.useRef(null); // 列长度
|
|
312131
|
+
|
|
312132
|
+
var columnsLen = React.useMemo(function () {
|
|
312133
|
+
var _children$length;
|
|
312134
|
+
|
|
312135
|
+
return (_children$length = children === null || children === void 0 ? void 0 : children.length) !== null && _children$length !== void 0 ? _children$length : 0;
|
|
312136
|
+
}, [children]);
|
|
312137
|
+
React.useEffect(function () {
|
|
312138
|
+
if (state.columnsLen !== columnsLen) {
|
|
312139
|
+
dispatch({
|
|
312140
|
+
type: 'changeColumnsLen',
|
|
312141
|
+
columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
|
|
312142
|
+
});
|
|
312143
|
+
}
|
|
312144
|
+
}, [columnsLen, dispatch, state.columnsLen]);
|
|
312145
|
+
React.useEffect(function () {
|
|
312146
|
+
var initHeight = function initHeight(tempRef) {
|
|
312147
|
+
var _tempRef$current;
|
|
312148
|
+
|
|
312149
|
+
if ((tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current = tempRef.current) === null || _tempRef$current === void 0 ? void 0 : _tempRef$current.offsetHeight) && !rowHeight && totalLen) {
|
|
312150
|
+
var _tempRef$current$offs, _tempRef$current2;
|
|
312151
|
+
|
|
312152
|
+
var tempRowHeight = (_tempRef$current$offs = tempRef === null || tempRef === void 0 ? void 0 : (_tempRef$current2 = tempRef.current) === null || _tempRef$current2 === void 0 ? void 0 : _tempRef$current2.offsetHeight) !== null && _tempRef$current$offs !== void 0 ? _tempRef$current$offs : 0;
|
|
312153
|
+
dispatch({
|
|
312154
|
+
type: 'initHeight',
|
|
312155
|
+
rowHeight: tempRowHeight
|
|
312156
|
+
});
|
|
312157
|
+
}
|
|
312158
|
+
};
|
|
312159
|
+
|
|
312160
|
+
initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
|
|
312161
|
+
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
312162
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetProps), {}, {
|
|
312163
|
+
ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
|
|
312164
|
+
}), children);
|
|
312165
|
+
});
|
|
312166
|
+
|
|
312167
|
+
var _excluded$2S = ["data-row-key", "children", "className", "virtual"];
|
|
311941
312168
|
|
|
311942
312169
|
var SortableItem$1 = function SortableItem(props) {
|
|
311943
312170
|
var key = props['data-row-key'],
|
|
311944
312171
|
children = props.children,
|
|
311945
312172
|
className = props.className,
|
|
311946
|
-
|
|
312173
|
+
virtual = props.virtual,
|
|
312174
|
+
resetField = _objectWithoutProperties$1(props, _excluded$2S);
|
|
311947
312175
|
|
|
311948
312176
|
var _useSortable = useSortable({
|
|
311949
312177
|
id: key
|
|
@@ -311957,25 +312185,36 @@
|
|
|
311957
312185
|
transform: CSS.Transform.toString(transform),
|
|
311958
312186
|
transition: transition
|
|
311959
312187
|
};
|
|
311960
|
-
|
|
312188
|
+
|
|
312189
|
+
if (!virtual) {
|
|
312190
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread(_objectSpread({}, resetField), {}, {
|
|
312191
|
+
ref: setNodeRef,
|
|
312192
|
+
key: key,
|
|
312193
|
+
style: style
|
|
312194
|
+
}, attributes), children);
|
|
312195
|
+
}
|
|
312196
|
+
|
|
312197
|
+
return /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread(_objectSpread({}, resetField), {}, {
|
|
311961
312198
|
ref: setNodeRef,
|
|
311962
312199
|
key: key,
|
|
311963
312200
|
style: style
|
|
311964
312201
|
}, attributes), children);
|
|
311965
312202
|
};
|
|
311966
312203
|
|
|
311967
|
-
var
|
|
312204
|
+
var SortableItem$2 = /*#__PURE__*/React.memo(SortableItem$1);
|
|
312205
|
+
|
|
312206
|
+
var _excluded$2T = ["children"];
|
|
311968
312207
|
var Item$5 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
311969
312208
|
var _children$props;
|
|
311970
312209
|
|
|
311971
312210
|
var children = _ref.children,
|
|
311972
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
312211
|
+
props = _objectWithoutProperties$1(_ref, _excluded$2T);
|
|
311973
312212
|
|
|
311974
312213
|
return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread(_objectSpread({}, props), {}, {
|
|
311975
312214
|
ref: ref
|
|
311976
312215
|
}), (children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.children) || children);
|
|
311977
312216
|
});
|
|
311978
|
-
function SortableItem$
|
|
312217
|
+
function SortableItem$3(props) {
|
|
311979
312218
|
var _useSortable = useSortable({
|
|
311980
312219
|
id: props.id
|
|
311981
312220
|
}),
|
|
@@ -312075,19 +312314,84 @@
|
|
|
312075
312314
|
});
|
|
312076
312315
|
return res;
|
|
312077
312316
|
}
|
|
312317
|
+
function getExpandStatus(children) {
|
|
312318
|
+
var _children$2, _children$2$props, _children$2$props$chi, _children$2$props$chi2, _children$2$props$chi3;
|
|
312319
|
+
|
|
312320
|
+
return isExpandRow(children) ? children === null || children === void 0 ? void 0 : (_children$2 = children[0]) === null || _children$2 === void 0 ? void 0 : (_children$2$props = _children$2.props) === null || _children$2$props === void 0 ? void 0 : (_children$2$props$chi = _children$2$props.children) === null || _children$2$props$chi === void 0 ? void 0 : (_children$2$props$chi2 = _children$2$props$chi[1]) === null || _children$2$props$chi2 === void 0 ? void 0 : (_children$2$props$chi3 = _children$2$props$chi2.props) === null || _children$2$props$chi3 === void 0 ? void 0 : _children$2$props$chi3['aria-label'] : '';
|
|
312321
|
+
}
|
|
312322
|
+
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
312323
|
+
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro3, _nextCol$componentPro3;
|
|
312324
|
+
|
|
312325
|
+
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
312326
|
+
|
|
312327
|
+
if (!checkExpandStatus) {
|
|
312328
|
+
return false;
|
|
312329
|
+
}
|
|
312330
|
+
|
|
312331
|
+
var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
|
|
312332
|
+
var nextCol = next === null || next === void 0 ? void 0 : next.col;
|
|
312333
|
+
|
|
312334
|
+
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro = prevCol.componentProps) === null || _prevCol$componentPro === void 0 ? void 0 : _prevCol$componentPro.optionOnly) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro = nextCol.componentProps) === null || _nextCol$componentPro === void 0 ? void 0 : _nextCol$componentPro.optionOnly)) {
|
|
312335
|
+
var _prevCol$componentPro2, _nextCol$componentPro2;
|
|
312336
|
+
|
|
312337
|
+
return lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro2 = prevCol.componentProps) === null || _prevCol$componentPro2 === void 0 ? void 0 : _prevCol$componentPro2.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro2 = nextCol.componentProps) === null || _nextCol$componentPro2 === void 0 ? void 0 : _nextCol$componentPro2.options);
|
|
312338
|
+
}
|
|
312339
|
+
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
312340
|
+
|
|
312341
|
+
|
|
312342
|
+
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro3 = prevCol.componentProps) === null || _prevCol$componentPro3 === void 0 ? void 0 : _prevCol$componentPro3.quickcopy) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro3 = nextCol.componentProps) === null || _nextCol$componentPro3 === void 0 ? void 0 : _nextCol$componentPro3.quickcopy)) {
|
|
312343
|
+
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
312344
|
+
var p = lodash.pick(prev, pickProps);
|
|
312345
|
+
var n = lodash.pick(next, pickProps);
|
|
312346
|
+
return lodash.isEqual(p, n);
|
|
312347
|
+
}
|
|
312348
|
+
|
|
312349
|
+
if (next.className.indexOf('ant-table-selection-column') > -1) {
|
|
312350
|
+
var _prev$children, _prev$children$, _next$children, _next$children$;
|
|
312351
|
+
|
|
312352
|
+
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);
|
|
312353
|
+
}
|
|
312354
|
+
|
|
312355
|
+
return true;
|
|
312356
|
+
}
|
|
312078
312357
|
|
|
312079
|
-
var
|
|
312358
|
+
var SortableBox$2 = function SortableBox(_ref) {
|
|
312359
|
+
var items = _ref.items,
|
|
312360
|
+
children = _ref.children;
|
|
312361
|
+
return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
|
|
312362
|
+
items: items,
|
|
312363
|
+
strategy: verticalListSortingStrategy
|
|
312364
|
+
}, children);
|
|
312365
|
+
};
|
|
312366
|
+
|
|
312367
|
+
var _excluded$2U = ["keys", "onSortEnd", "virtual"];
|
|
312368
|
+
|
|
312369
|
+
var DraggableContainer = function DraggableContainer(_ref) {
|
|
312370
|
+
var keys = _ref.keys,
|
|
312371
|
+
onSortEnd = _ref.onSortEnd,
|
|
312372
|
+
virtual = _ref.virtual,
|
|
312373
|
+
props = _objectWithoutProperties$1(_ref, _excluded$2U);
|
|
312374
|
+
|
|
312375
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
|
|
312376
|
+
move: onSortEnd
|
|
312377
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$2, {
|
|
312378
|
+
items: keys
|
|
312379
|
+
}, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualWrapper$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tbody", _objectSpread({}, props))));
|
|
312380
|
+
};
|
|
312381
|
+
|
|
312382
|
+
var _excluded$2V = ["index", "virtual"],
|
|
312080
312383
|
_excluded2$I = ["index"],
|
|
312081
312384
|
_excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
|
|
312082
312385
|
_excluded4$1 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "setValid", "reWriteOriginSource"],
|
|
312083
312386
|
_excluded5 = ["onMouseEnter", "onMouseLeave"],
|
|
312084
|
-
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
|
|
312387
|
+
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
|
|
312085
312388
|
var UploadBtn$1 = UploadOss.UploadBtn;
|
|
312086
312389
|
var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
|
|
312087
312390
|
|
|
312088
312391
|
var EditableRow$1 = function EditableRow(_ref) {
|
|
312089
312392
|
var index = _ref.index,
|
|
312090
|
-
|
|
312393
|
+
virtual = _ref.virtual,
|
|
312394
|
+
props = _objectWithoutProperties$1(_ref, _excluded$2V);
|
|
312091
312395
|
|
|
312092
312396
|
var _Form$useForm = Form$4.useForm(),
|
|
312093
312397
|
_Form$useForm2 = _slicedToArray$1(_Form$useForm, 1),
|
|
@@ -312098,7 +312402,7 @@
|
|
|
312098
312402
|
component: false
|
|
312099
312403
|
}, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
|
|
312100
312404
|
value: form
|
|
312101
|
-
}, /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
|
|
312405
|
+
}, virtual ? /*#__PURE__*/React__default['default'].createElement(VirtualRow$1, _objectSpread({}, props)) : /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread({}, props))));
|
|
312102
312406
|
};
|
|
312103
312407
|
|
|
312104
312408
|
var EditableSortRow = function EditableSortRow(_ref2) {
|
|
@@ -312114,7 +312418,7 @@
|
|
|
312114
312418
|
component: false
|
|
312115
312419
|
}, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
|
|
312116
312420
|
value: form
|
|
312117
|
-
}, /*#__PURE__*/React__default['default'].createElement(SortableItem$
|
|
312421
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableItem$2, _objectSpread({}, props))));
|
|
312118
312422
|
};
|
|
312119
312423
|
|
|
312120
312424
|
var UploadSingle$1 = function UploadSingle(props) {
|
|
@@ -312253,6 +312557,15 @@
|
|
|
312253
312557
|
options = _ref4$options === void 0 ? ['add', 'delete'] : _ref4$options,
|
|
312254
312558
|
getLength = _ref4.getLength,
|
|
312255
312559
|
quickOpetateClearAll = _ref4.quickOpetateClearAll;
|
|
312560
|
+
|
|
312561
|
+
var appendChildren = function appendChildren() {
|
|
312562
|
+
handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
|
|
312563
|
+
};
|
|
312564
|
+
|
|
312565
|
+
var appendAdd = function appendAdd() {
|
|
312566
|
+
handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
|
|
312567
|
+
};
|
|
312568
|
+
|
|
312256
312569
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
312257
312570
|
style: {
|
|
312258
312571
|
display: 'flex',
|
|
@@ -312273,7 +312586,27 @@
|
|
|
312273
312586
|
onClick: function onClick() {
|
|
312274
312587
|
return handleDelete(record[rowKey]);
|
|
312275
312588
|
}
|
|
312276
|
-
}), options.includes('add') && /*#__PURE__*/React__default['default'].createElement(
|
|
312589
|
+
}), (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, {
|
|
312590
|
+
placement: "bottom",
|
|
312591
|
+
overlayClassName: "lm_table_append_add_popover",
|
|
312592
|
+
open: open,
|
|
312593
|
+
title: null,
|
|
312594
|
+
content: /*#__PURE__*/React__default['default'].createElement("ul", null, /*#__PURE__*/React__default['default'].createElement("li", {
|
|
312595
|
+
onClick: appendAdd
|
|
312596
|
+
}, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/React__default['default'].createElement("li", {
|
|
312597
|
+
onClick: appendChildren
|
|
312598
|
+
}, "\u6DFB\u52A0\u5B50\u7EA7")),
|
|
312599
|
+
trigger: "hover"
|
|
312600
|
+
}, /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
312601
|
+
type: "link",
|
|
312602
|
+
size: "small",
|
|
312603
|
+
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
312604
|
+
type: "lmweb-plus-circle-fill",
|
|
312605
|
+
style: {
|
|
312606
|
+
fontSize: 16
|
|
312607
|
+
}
|
|
312608
|
+
})
|
|
312609
|
+
})) : /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
312277
312610
|
type: "link",
|
|
312278
312611
|
size: "small",
|
|
312279
312612
|
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
@@ -312283,17 +312616,10 @@
|
|
|
312283
312616
|
}
|
|
312284
312617
|
}),
|
|
312285
312618
|
onClick: function onClick() {
|
|
312286
|
-
return handleAdd(record);
|
|
312619
|
+
return handleAdd(record, (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? true : false);
|
|
312287
312620
|
}
|
|
312288
312621
|
}));
|
|
312289
|
-
};
|
|
312290
|
-
// const toStringValue = JSON.stringify(verifyValue);
|
|
312291
|
-
// if (verifyValue === undefined || verifyValue === null || verifyValue === '' || toStringValue === '[]' || toStringValue === '{}') {
|
|
312292
|
-
// return false;
|
|
312293
|
-
// }
|
|
312294
|
-
// return true;
|
|
312295
|
-
// }
|
|
312296
|
-
|
|
312622
|
+
};
|
|
312297
312623
|
/*
|
|
312298
312624
|
表格单元格
|
|
312299
312625
|
editEnum: 下拉框时的数据数组(非数组时是配置设置)
|
|
@@ -312345,6 +312671,12 @@
|
|
|
312345
312671
|
|
|
312346
312672
|
var inputRef = React.useRef(null);
|
|
312347
312673
|
var form = React.useContext(EditableContext$1);
|
|
312674
|
+
|
|
312675
|
+
var _useState5 = React.useState(false),
|
|
312676
|
+
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
312677
|
+
hoverStatus = _useState6[0],
|
|
312678
|
+
setHoverStatus = _useState6[1];
|
|
312679
|
+
|
|
312348
312680
|
React.useEffect(function () {
|
|
312349
312681
|
if (editing) {
|
|
312350
312682
|
var _inputRef$current;
|
|
@@ -312355,13 +312687,7 @@
|
|
|
312355
312687
|
|
|
312356
312688
|
var toggleEdit = function toggleEdit() {
|
|
312357
312689
|
setEditing(!editing); // form.setFieldsValue({ [dataIndex]: record[dataIndex] });
|
|
312358
|
-
}; //
|
|
312359
|
-
// const focusCapturedRef = useRef(false);
|
|
312360
|
-
// const curValue = useMemo(() => {
|
|
312361
|
-
// return record?.dataIndex
|
|
312362
|
-
// }, [record])
|
|
312363
|
-
// const curValueIsValid = isValidValue(curValue);
|
|
312364
|
-
// 校验保存
|
|
312690
|
+
}; // 校验保存
|
|
312365
312691
|
|
|
312366
312692
|
|
|
312367
312693
|
var save = /*#__PURE__*/function () {
|
|
@@ -312448,15 +312774,15 @@
|
|
|
312448
312774
|
/** 快捷刷子,把当前的所有列的值,刷成当前的选中的列 */
|
|
312449
312775
|
|
|
312450
312776
|
|
|
312451
|
-
var copyKey = function copyKey(e) {
|
|
312777
|
+
var copyKey = function copyKey(e, type) {
|
|
312452
312778
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
312453
312779
|
var dataIndex = col.dataIndex;
|
|
312454
|
-
handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex]);
|
|
312780
|
+
handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex], type, props.rowIndex);
|
|
312455
312781
|
};
|
|
312456
312782
|
|
|
312457
312783
|
var Control = function Control(con) {
|
|
312458
312784
|
var resultComponentProps = lodash.isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
312459
|
-
var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue']);
|
|
312785
|
+
var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
|
|
312460
312786
|
|
|
312461
312787
|
switch (con) {
|
|
312462
312788
|
case 'input':
|
|
@@ -312477,12 +312803,6 @@
|
|
|
312477
312803
|
noStyle: true
|
|
312478
312804
|
}, /*#__PURE__*/React__default['default'].cloneElement(resultComponentProps.addonAfter, {
|
|
312479
312805
|
onChange: handleFormItemChange
|
|
312480
|
-
})) : null,
|
|
312481
|
-
suffix: resultComponentProps.quickcopy ? /*#__PURE__*/React__default['default'].createElement("span", {
|
|
312482
|
-
className: 'lm_table_quickcopy'
|
|
312483
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
312484
|
-
onClick: copyKey,
|
|
312485
|
-
type: 'lmweb-icon_m_brush'
|
|
312486
312806
|
})) : null
|
|
312487
312807
|
}));
|
|
312488
312808
|
|
|
@@ -312565,7 +312885,7 @@
|
|
|
312565
312885
|
|
|
312566
312886
|
case 'switch':
|
|
312567
312887
|
return /*#__PURE__*/React__default['default'].createElement(Switch$2, _objectSpread(_objectSpread({
|
|
312568
|
-
size:
|
|
312888
|
+
size: "small"
|
|
312569
312889
|
}, clearAttrComponentProps), {}, {
|
|
312570
312890
|
onChange: handleFormItemChange
|
|
312571
312891
|
}));
|
|
@@ -312654,8 +312974,7 @@
|
|
|
312654
312974
|
}
|
|
312655
312975
|
|
|
312656
312976
|
return childNode;
|
|
312657
|
-
}, [col, isEdit, editing, getLength]); //
|
|
312658
|
-
// 出现死循环找我
|
|
312977
|
+
}, [col, isEdit, editing, getLength]); // 出现死循环找我
|
|
312659
312978
|
|
|
312660
312979
|
React.useEffect(function () {
|
|
312661
312980
|
var editable = col.editable,
|
|
@@ -312663,22 +312982,55 @@
|
|
|
312663
312982
|
|
|
312664
312983
|
if (isEdit && editable) {
|
|
312665
312984
|
form.setFieldsValue(_defineProperty$1({}, dataIndex, editable === 'date' ? hooks(record[dataIndex]) : record[dataIndex]));
|
|
312666
|
-
}
|
|
312667
|
-
// (isEdit && editable && record[dataIndex]) ||
|
|
312668
|
-
// (isHoverEdit && editable && record[dataIndex])
|
|
312669
|
-
// ) {
|
|
312670
|
-
// form.setFieldsValue({
|
|
312671
|
-
// [dataIndex]: editable === 'date' ? moment(record[dataIndex]) : record[dataIndex],
|
|
312672
|
-
// })
|
|
312673
|
-
// }
|
|
312674
|
-
|
|
312985
|
+
}
|
|
312675
312986
|
}, [record]);
|
|
312987
|
+
|
|
312988
|
+
var handleTdHover = function handleTdHover() {
|
|
312989
|
+
setHoverStatus(true);
|
|
312990
|
+
};
|
|
312991
|
+
|
|
312992
|
+
var handleTdMouseOut = function handleTdMouseOut() {
|
|
312993
|
+
setHoverStatus(false);
|
|
312994
|
+
};
|
|
312995
|
+
|
|
312676
312996
|
return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread(_objectSpread({}, lodash.omit(clearProps, ['dataIndex'])), {}, {
|
|
312677
312997
|
className: classnames(clearProps === null || clearProps === void 0 ? void 0 : clearProps.className, 'lm_custom_cell_td'),
|
|
312998
|
+
onMouseEnter: componentProps.quickcopy ? handleTdHover : undefined,
|
|
312999
|
+
onMouseLeave: componentProps.quickcopy ? handleTdMouseOut : undefined,
|
|
312678
313000
|
key: "r".concat(rowIndex, "_c").concat(colIndex)
|
|
312679
|
-
}),
|
|
313001
|
+
}), hoverStatus && props.rowIndex > 0 && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
313002
|
+
className: 'quick_copy_warp quick_copy_up',
|
|
313003
|
+
onClick: function onClick(e) {
|
|
313004
|
+
return copyKey(e, 'up');
|
|
313005
|
+
}
|
|
313006
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
313007
|
+
type: 'lmweb-icon_up'
|
|
313008
|
+
})), getMemoChildNode, hoverStatus && props.rowIndex < props.getLength - 1 && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
313009
|
+
className: 'quick_copy_warp quick_copy_down',
|
|
313010
|
+
onClick: function onClick(e) {
|
|
313011
|
+
return copyKey(e, 'down');
|
|
313012
|
+
}
|
|
313013
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
313014
|
+
type: 'lmweb-icon_down'
|
|
313015
|
+
})));
|
|
312680
313016
|
};
|
|
313017
|
+
/** true 不刷新, false 刷新 */
|
|
313018
|
+
|
|
313019
|
+
|
|
313020
|
+
var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
|
|
313021
|
+
var pickProps = ['record', 'colIndex'];
|
|
313022
|
+
var p = lodash.pick(prev, pickProps);
|
|
313023
|
+
var n = lodash.pick(next, pickProps); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313024
|
+
// console.log(prev, next, '-sss')
|
|
313025
|
+
|
|
313026
|
+
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
313027
|
+
|
|
313028
|
+
if (!checkMemoShouldUploadSpecialFun(prev, next)) {
|
|
313029
|
+
return false;
|
|
313030
|
+
}
|
|
312681
313031
|
|
|
313032
|
+
return lodash.isEqual(p, n);
|
|
313033
|
+
});
|
|
312682
313034
|
var EditTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
312683
313035
|
var defaultData = props.value,
|
|
312684
313036
|
columns = props.columns,
|
|
@@ -312695,6 +313047,7 @@
|
|
|
312695
313047
|
_props$quickOpetateCl = props.quickOpetateClearAll,
|
|
312696
313048
|
quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
|
|
312697
313049
|
rowSelection = props.rowSelection,
|
|
313050
|
+
virtual = props.virtual,
|
|
312698
313051
|
sortOpen = props.sortOpen,
|
|
312699
313052
|
colSortOpen = props.colSortOpen,
|
|
312700
313053
|
filterChange = props.filterChange,
|
|
@@ -312702,7 +313055,6 @@
|
|
|
312702
313055
|
size = _props$size === void 0 ? 'small' : _props$size,
|
|
312703
313056
|
recordCreatorProps = props.recordCreatorProps,
|
|
312704
313057
|
_props$shouldUpdate = props.shouldUpdate,
|
|
312705
|
-
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
312706
313058
|
resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
|
|
312707
313059
|
|
|
312708
313060
|
|
|
@@ -312715,20 +313067,15 @@
|
|
|
312715
313067
|
setDataSource = _useControllableValue2[1]; // const [count, setCount] = useState(0);
|
|
312716
313068
|
|
|
312717
313069
|
|
|
312718
|
-
var
|
|
312719
|
-
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
312720
|
-
_valid = _useState6[0],
|
|
312721
|
-
setValid = _useState6[1];
|
|
312722
|
-
|
|
312723
|
-
var _useState7 = React.useState([]),
|
|
313070
|
+
var _useState7 = React.useState({}),
|
|
312724
313071
|
_useState8 = _slicedToArray$1(_useState7, 2),
|
|
312725
|
-
|
|
312726
|
-
|
|
313072
|
+
_valid = _useState8[0],
|
|
313073
|
+
setValid = _useState8[1];
|
|
312727
313074
|
|
|
312728
313075
|
var _useState9 = React.useState([]),
|
|
312729
313076
|
_useState10 = _slicedToArray$1(_useState9, 2),
|
|
312730
|
-
|
|
312731
|
-
|
|
313077
|
+
localRowSelectList = _useState10[0],
|
|
313078
|
+
setLocalRowSelectList = _useState10[1];
|
|
312732
313079
|
/** 当前展开的列 */
|
|
312733
313080
|
|
|
312734
313081
|
|
|
@@ -312737,21 +313084,10 @@
|
|
|
312737
313084
|
expandedRowKeys = _useState12[0],
|
|
312738
313085
|
setExpandedRowKeys = _useState12[1];
|
|
312739
313086
|
|
|
312740
|
-
var dataSourceRef = React.useRef(
|
|
312741
|
-
var
|
|
312742
|
-
|
|
312743
|
-
|
|
312744
|
-
var onSortEnd = function onSortEnd(active, over) {
|
|
312745
|
-
var cloneArr = _toConsumableArray$1(dataSourceRef.current);
|
|
312746
|
-
|
|
312747
|
-
var oldIndex = cloneArr.findIndex(function (v) {
|
|
312748
|
-
return v[_rowKey] === active;
|
|
312749
|
-
});
|
|
312750
|
-
var newIndex = cloneArr.findIndex(function (v) {
|
|
312751
|
-
return v[_rowKey] === over;
|
|
312752
|
-
});
|
|
312753
|
-
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
312754
|
-
};
|
|
313087
|
+
var dataSourceRef = React.useRef(dataSource);
|
|
313088
|
+
var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
|
|
313089
|
+
dataSourceRef.current = dataSource;
|
|
313090
|
+
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
312755
313091
|
|
|
312756
313092
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
312757
313093
|
var _arrayMove;
|
|
@@ -312789,29 +313125,9 @@
|
|
|
312789
313125
|
});
|
|
312790
313126
|
setDataSource(res); // onChange?.(res)
|
|
312791
313127
|
};
|
|
312792
|
-
|
|
312793
|
-
React.useEffect(function () {
|
|
312794
|
-
dataSourceRef.current = dataSource;
|
|
312795
|
-
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
312796
|
-
|
|
312797
|
-
if (sortOpen) {
|
|
312798
|
-
var _sortDataSorceRef$cur;
|
|
312799
|
-
|
|
312800
|
-
var dataSourceKeys = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
312801
|
-
return item[_rowKey];
|
|
312802
|
-
}).join(',');
|
|
312803
|
-
var setCallBackFalgKeys = ((_sortDataSorceRef$cur = sortDataSorceRef.current) === null || _sortDataSorceRef$cur === void 0 ? void 0 : _sortDataSorceRef$cur.map(function (item) {
|
|
312804
|
-
return item[_rowKey];
|
|
312805
|
-
}).join(',')) || '';
|
|
312806
|
-
|
|
312807
|
-
if (dataSourceKeys !== setCallBackFalgKeys) {
|
|
312808
|
-
setCallBackFalg(dataSource);
|
|
312809
|
-
sortDataSorceRef.current = dataSource;
|
|
312810
|
-
}
|
|
312811
|
-
}
|
|
312812
|
-
}, [dataSource]);
|
|
312813
313128
|
/** 本地缓存一个选择数据 */
|
|
312814
313129
|
|
|
313130
|
+
|
|
312815
313131
|
React.useEffect(function () {
|
|
312816
313132
|
if (rowSelection) {
|
|
312817
313133
|
var selectedRowKeys = rowSelection.selectedRowKeys;
|
|
@@ -312964,7 +313280,7 @@
|
|
|
312964
313280
|
/** 快捷添加 */
|
|
312965
313281
|
|
|
312966
313282
|
|
|
312967
|
-
var handleTableRowAdd = function handleTableRowAdd(record) {
|
|
313283
|
+
var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren) {
|
|
312968
313284
|
var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
|
|
312969
313285
|
|
|
312970
313286
|
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;
|
|
@@ -312974,7 +313290,19 @@
|
|
|
312974
313290
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
312975
313291
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
312976
313292
|
if (item[_rowKey] === record[_rowKey]) {
|
|
312977
|
-
|
|
313293
|
+
if (isAppendInChindren) {
|
|
313294
|
+
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
313295
|
+
var _item$children;
|
|
313296
|
+
|
|
313297
|
+
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())));
|
|
313298
|
+
} else {
|
|
313299
|
+
item.children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
313300
|
+
}
|
|
313301
|
+
|
|
313302
|
+
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [item[_rowKey]]));
|
|
313303
|
+
} else {
|
|
313304
|
+
children.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313305
|
+
}
|
|
312978
313306
|
} else if (item.children) {
|
|
312979
313307
|
deeps(item.children);
|
|
312980
313308
|
}
|
|
@@ -312989,17 +313317,33 @@
|
|
|
312989
313317
|
});
|
|
312990
313318
|
|
|
312991
313319
|
if (index !== -1) {
|
|
312992
|
-
|
|
313320
|
+
if (isAppendInChindren) {
|
|
313321
|
+
var _draft$index$children, _draft$index, _draft$index2;
|
|
313322
|
+
|
|
313323
|
+
if ((_draft$index$children = draft[index].children) === null || _draft$index$children === void 0 ? void 0 : _draft$index$children.length) {
|
|
313324
|
+
var _draft$index$children2;
|
|
313325
|
+
|
|
313326
|
+
(_draft$index$children2 = draft[index].children) === null || _draft$index$children2 === void 0 ? void 0 : _draft$index$children2.push(_defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313327
|
+
} else {
|
|
313328
|
+
draft[index].children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
313329
|
+
}
|
|
313330
|
+
|
|
313331
|
+
!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]]));
|
|
313332
|
+
} else {
|
|
313333
|
+
draft.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313334
|
+
}
|
|
312993
313335
|
}
|
|
312994
313336
|
}
|
|
312995
313337
|
});
|
|
312996
313338
|
setDataSource(res);
|
|
312997
313339
|
};
|
|
312998
313340
|
|
|
312999
|
-
var handleCopy = function handleCopy(key, value) {
|
|
313341
|
+
var handleCopy = function handleCopy(key, value, type, rowIndex) {
|
|
313000
313342
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
313001
|
-
draft === null || draft === void 0 ? void 0 : draft.forEach(function (item) {
|
|
313002
|
-
|
|
313343
|
+
draft === null || draft === void 0 ? void 0 : draft.forEach(function (item, index) {
|
|
313344
|
+
if (type === 'up' && index < rowIndex || type === 'down' && index > rowIndex) {
|
|
313345
|
+
item[key] = value;
|
|
313346
|
+
}
|
|
313003
313347
|
});
|
|
313004
313348
|
});
|
|
313005
313349
|
setDataSource(res);
|
|
@@ -313026,9 +313370,9 @@
|
|
|
313026
313370
|
|
|
313027
313371
|
var DisableOptions = React.useMemo(function () {
|
|
313028
313372
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
313029
|
-
var
|
|
313030
|
-
optionOnly =
|
|
313031
|
-
options =
|
|
313373
|
+
var _ref8 = item.componentProps || {},
|
|
313374
|
+
optionOnly = _ref8.optionOnly,
|
|
313375
|
+
options = _ref8.options;
|
|
313032
313376
|
|
|
313033
313377
|
if (optionOnly && options) {
|
|
313034
313378
|
var dataIndex = item.dataIndex;
|
|
@@ -313114,19 +313458,6 @@
|
|
|
313114
313458
|
}
|
|
313115
313459
|
|
|
313116
313460
|
var newCol = _objectSpread(_objectSpread({}, col), {}, {
|
|
313117
|
-
shouldCellUpdate: function shouldCellUpdate(record, prevRecord) {
|
|
313118
|
-
var _col$componentProps2;
|
|
313119
|
-
|
|
313120
|
-
var dataIndex = col.dataIndex,
|
|
313121
|
-
editable = col.editable,
|
|
313122
|
-
relevanceCols = col.relevanceCols;
|
|
313123
|
-
|
|
313124
|
-
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) {
|
|
313125
|
-
return true;
|
|
313126
|
-
}
|
|
313127
|
-
|
|
313128
|
-
return record[dataIndex] !== prevRecord[dataIndex];
|
|
313129
|
-
},
|
|
313130
313461
|
onCell: function onCell(record, rowIndex) {
|
|
313131
313462
|
return {
|
|
313132
313463
|
getLength: dataSource.length,
|
|
@@ -313168,24 +313499,24 @@
|
|
|
313168
313499
|
return mapColumns(col, index);
|
|
313169
313500
|
});
|
|
313170
313501
|
return res;
|
|
313171
|
-
}, [columns, isAdd, sortOpen, useQuickOpetate,
|
|
313172
|
-
var DraggableContainer = React.useCallback(function (_ref7) {
|
|
313173
|
-
var _dataSourceRef$curren2;
|
|
313502
|
+
}, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, _toConsumableArray$1(memoOptions)]);
|
|
313174
313503
|
|
|
313175
|
-
|
|
313504
|
+
var onSortEnd = function onSortEnd(active, over) {
|
|
313505
|
+
var cloneArr = _toConsumableArray$1(dataSourceRef.current);
|
|
313176
313506
|
|
|
313177
|
-
|
|
313178
|
-
|
|
313179
|
-
}
|
|
313180
|
-
|
|
313181
|
-
|
|
313182
|
-
|
|
313183
|
-
|
|
313184
|
-
}
|
|
313185
|
-
|
|
313507
|
+
var oldIndex = cloneArr.findIndex(function (v) {
|
|
313508
|
+
return v[_rowKey] === active;
|
|
313509
|
+
});
|
|
313510
|
+
var newIndex = cloneArr.findIndex(function (v) {
|
|
313511
|
+
return v[_rowKey] === over;
|
|
313512
|
+
});
|
|
313513
|
+
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
313514
|
+
};
|
|
313515
|
+
|
|
313516
|
+
var colDraggableContainer = React.useCallback(function (_ref9) {
|
|
313186
313517
|
var _React$Children;
|
|
313187
313518
|
|
|
313188
|
-
var props = _extends$2({},
|
|
313519
|
+
var props = _extends$2({}, _ref9);
|
|
313189
313520
|
|
|
313190
313521
|
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) {
|
|
313191
313522
|
var _child$props, _child$props$column;
|
|
@@ -313194,39 +313525,11 @@
|
|
|
313194
313525
|
return child;
|
|
313195
313526
|
}
|
|
313196
313527
|
|
|
313197
|
-
return /*#__PURE__*/React__default['default'].createElement(SortableItem$
|
|
313528
|
+
return /*#__PURE__*/React__default['default'].createElement(SortableItem$3, {
|
|
313198
313529
|
id: child.key
|
|
313199
313530
|
}, child);
|
|
313200
313531
|
}));
|
|
313201
313532
|
}, [columns]);
|
|
313202
|
-
var config = React.useMemo(function () {
|
|
313203
|
-
var component = {
|
|
313204
|
-
body: Object.assign({
|
|
313205
|
-
row: sortOpen ? EditableSortRow : EditableRow$1,
|
|
313206
|
-
cell: EditableCell$1
|
|
313207
|
-
}, sortOpen ? {
|
|
313208
|
-
wrapper: DraggableContainer
|
|
313209
|
-
} : {})
|
|
313210
|
-
};
|
|
313211
|
-
|
|
313212
|
-
if (colSortOpen) {
|
|
313213
|
-
component['header'] = {
|
|
313214
|
-
row: colDraggableContainer
|
|
313215
|
-
};
|
|
313216
|
-
}
|
|
313217
|
-
|
|
313218
|
-
return _objectSpread({
|
|
313219
|
-
pagination: false,
|
|
313220
|
-
tableLayout: 'fixed',
|
|
313221
|
-
scroll: {
|
|
313222
|
-
x: '100%'
|
|
313223
|
-
},
|
|
313224
|
-
rowKey: function rowKey(record) {
|
|
313225
|
-
return record[_rowKey] || record.index || Math.random();
|
|
313226
|
-
},
|
|
313227
|
-
components: component
|
|
313228
|
-
}, resetProps);
|
|
313229
|
-
}, [resultColumns, dataSource, sortOpen, colSortOpen, size]);
|
|
313230
313533
|
React.useImperativeHandle(ref, function () {
|
|
313231
313534
|
return {
|
|
313232
313535
|
setRow: handleSave,
|
|
@@ -313238,17 +313541,57 @@
|
|
|
313238
313541
|
var isShowAddAction = React.useMemo(function () {
|
|
313239
313542
|
return isEdit && isAdd || isHoverEdit && isAdd;
|
|
313240
313543
|
}, [isEdit, isAdd, isHoverEdit]);
|
|
313544
|
+
var config = React.useRef(_objectSpread({
|
|
313545
|
+
pagination: false,
|
|
313546
|
+
tableLayout: 'fixed',
|
|
313547
|
+
scroll: {
|
|
313548
|
+
x: '100%'
|
|
313549
|
+
},
|
|
313550
|
+
rowKey: function rowKey(record) {
|
|
313551
|
+
return record[_rowKey] || record.index || Math.random();
|
|
313552
|
+
},
|
|
313553
|
+
components: {
|
|
313554
|
+
table: virtual ? VirtualTable$1 : null,
|
|
313555
|
+
body: Object.assign({
|
|
313556
|
+
row: function row(rowProps) {
|
|
313557
|
+
return sortOpen ? EditableSortRow(_objectSpread(_objectSpread({}, rowProps), {}, {
|
|
313558
|
+
virtual: virtual
|
|
313559
|
+
})) : EditableRow$1(_objectSpread(_objectSpread({}, rowProps), {}, {
|
|
313560
|
+
virtual: virtual
|
|
313561
|
+
}));
|
|
313562
|
+
},
|
|
313563
|
+
cell: MemoEditableCell
|
|
313564
|
+
}, sortOpen ? {
|
|
313565
|
+
wrapper: function wrapper(wrapperProps) {
|
|
313566
|
+
var _dataSourceRef$curren2;
|
|
313567
|
+
|
|
313568
|
+
return DraggableContainer(_objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
313569
|
+
virtual: virtual,
|
|
313570
|
+
keys: (_dataSourceRef$curren2 = dataSourceRef.current) === null || _dataSourceRef$curren2 === void 0 ? void 0 : _dataSourceRef$curren2.map(function (item) {
|
|
313571
|
+
return item[_rowKey];
|
|
313572
|
+
}),
|
|
313573
|
+
onSortEnd: onSortEnd
|
|
313574
|
+
}));
|
|
313575
|
+
}
|
|
313576
|
+
} : virtual ? {
|
|
313577
|
+
wrapper: VirtualWrapper$1
|
|
313578
|
+
} : {}),
|
|
313579
|
+
header: {
|
|
313580
|
+
row: colSortOpen ? colDraggableContainer : null
|
|
313581
|
+
}
|
|
313582
|
+
}
|
|
313583
|
+
}, resetProps));
|
|
313241
313584
|
|
|
313242
313585
|
if (colSortOpen) {
|
|
313243
313586
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
313244
313587
|
className: "lm_editTable_warpper"
|
|
313245
|
-
}, /*#__PURE__*/React__default['default'].createElement(DndContainer$
|
|
313588
|
+
}, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
|
|
313246
313589
|
move: onColSortEnd
|
|
313247
|
-
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$
|
|
313590
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$1, {
|
|
313248
313591
|
items: columns.reduce(function (acc, item) {
|
|
313249
313592
|
return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
|
|
313250
313593
|
}, [])
|
|
313251
|
-
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
|
|
313594
|
+
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
|
|
313252
313595
|
size: size || 'small',
|
|
313253
313596
|
columns: resultColumns,
|
|
313254
313597
|
rowClassName: "editable-row",
|
|
@@ -313282,7 +313625,7 @@
|
|
|
313282
313625
|
|
|
313283
313626
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
313284
313627
|
className: "lm_editTable_warpper"
|
|
313285
|
-
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config), {}, {
|
|
313628
|
+
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, config.current), {}, {
|
|
313286
313629
|
size: size || 'small',
|
|
313287
313630
|
columns: resultColumns,
|
|
313288
313631
|
rowClassName: "editable-row",
|
|
@@ -313990,7 +314333,7 @@
|
|
|
313990
314333
|
}
|
|
313991
314334
|
}
|
|
313992
314335
|
|
|
313993
|
-
var _excluded$
|
|
314336
|
+
var _excluded$2W = ["prefixCls", "getPopupContainer", "className", "placement", "size", "disabled", "bordered", "placeholder", "status"];
|
|
313994
314337
|
function generateRangePicker$1(generateConfig) {
|
|
313995
314338
|
var RangePicker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
313996
314339
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -314003,7 +314346,7 @@
|
|
|
314003
314346
|
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
314004
314347
|
placeholder = props.placeholder,
|
|
314005
314348
|
customStatus = props.status,
|
|
314006
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
314349
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2W);
|
|
314007
314350
|
|
|
314008
314351
|
var innerRef = React.useRef(null);
|
|
314009
314352
|
|
|
@@ -314103,7 +314446,7 @@
|
|
|
314103
314446
|
return RangePicker$1;
|
|
314104
314447
|
}
|
|
314105
314448
|
|
|
314106
|
-
var _excluded$
|
|
314449
|
+
var _excluded$2X = ["prefixCls", "getPopupContainer", "className", "size", "bordered", "placement", "placeholder", "disabled", "status"];
|
|
314107
314450
|
function generatePicker$2(generateConfig) {
|
|
314108
314451
|
function getPicker(picker, displayName) {
|
|
314109
314452
|
var Picker$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -314117,7 +314460,7 @@
|
|
|
314117
314460
|
placeholder = props.placeholder,
|
|
314118
314461
|
customDisabled = props.disabled,
|
|
314119
314462
|
customStatus = props.status,
|
|
314120
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
314463
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2X);
|
|
314121
314464
|
|
|
314122
314465
|
warning$6(picker !== 'quarter', displayName, "DatePicker.".concat(displayName, " is legacy usage. Please use DatePicker[picker='").concat(picker, "'] directly."));
|
|
314123
314466
|
|
|
@@ -314339,13 +314682,13 @@
|
|
|
314339
314682
|
return propValue;
|
|
314340
314683
|
};
|
|
314341
314684
|
|
|
314342
|
-
var _excluded$
|
|
314685
|
+
var _excluded$2Y = ["prefixCls", "title", "content", "_overlay"];
|
|
314343
314686
|
var Popover$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
314344
314687
|
var customizePrefixCls = _ref.prefixCls,
|
|
314345
314688
|
title = _ref.title,
|
|
314346
314689
|
content = _ref.content,
|
|
314347
314690
|
_overlay = _ref._overlay,
|
|
314348
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
314691
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$2Y);
|
|
314349
314692
|
|
|
314350
314693
|
var _React$useContext = React.useContext(ConfigContext),
|
|
314351
314694
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
@@ -315194,7 +315537,7 @@
|
|
|
315194
315537
|
|
|
315195
315538
|
var KeyCode$1 = /*@__PURE__*/getDefaultExportFromCjs(KeyCode_1);
|
|
315196
315539
|
|
|
315197
|
-
var _excluded$
|
|
315540
|
+
var _excluded$2Z = ["style", "noStyle", "disabled"];
|
|
315198
315541
|
var inlineStyle$1 = {
|
|
315199
315542
|
border: 0,
|
|
315200
315543
|
background: 'transparent',
|
|
@@ -315223,7 +315566,7 @@
|
|
|
315223
315566
|
var style = props.style,
|
|
315224
315567
|
noStyle = props.noStyle,
|
|
315225
315568
|
disabled = props.disabled,
|
|
315226
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
315569
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2Z);
|
|
315227
315570
|
|
|
315228
315571
|
var mergedStyle = {};
|
|
315229
315572
|
|
|
@@ -315434,7 +315777,7 @@
|
|
|
315434
315777
|
}, conditions);
|
|
315435
315778
|
});
|
|
315436
315779
|
|
|
315437
|
-
var _excluded$
|
|
315780
|
+
var _excluded$2_ = ["prefixCls", "component", "className", "aria-label", "setContentRef", "children"];
|
|
315438
315781
|
|
|
315439
315782
|
var Typography$2 = function Typography(_ref, ref) {
|
|
315440
315783
|
var customizePrefixCls = _ref.prefixCls,
|
|
@@ -315444,7 +315787,7 @@
|
|
|
315444
315787
|
ariaLabel = _ref['aria-label'],
|
|
315445
315788
|
setContentRef = _ref.setContentRef,
|
|
315446
315789
|
children = _ref.children,
|
|
315447
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
315790
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$2_);
|
|
315448
315791
|
|
|
315449
315792
|
var _React$useContext = React.useContext(ConfigContext),
|
|
315450
315793
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -315687,7 +316030,7 @@
|
|
|
315687
316030
|
EllipsisTooltip$1.displayName = 'EllipsisTooltip';
|
|
315688
316031
|
}
|
|
315689
316032
|
|
|
315690
|
-
var _excluded$
|
|
316033
|
+
var _excluded$2$ = ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"];
|
|
315691
316034
|
|
|
315692
316035
|
function wrapperDecorations$1(_ref, content) {
|
|
315693
316036
|
var mark = _ref.mark,
|
|
@@ -315739,7 +316082,7 @@
|
|
|
315739
316082
|
copyable = props.copyable,
|
|
315740
316083
|
component = props.component,
|
|
315741
316084
|
title = props.title,
|
|
315742
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
316085
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2$);
|
|
315743
316086
|
|
|
315744
316087
|
var _React$useContext = React.useContext(ConfigContext),
|
|
315745
316088
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -316157,12 +316500,12 @@
|
|
|
316157
316500
|
});
|
|
316158
316501
|
});
|
|
316159
316502
|
|
|
316160
|
-
var _excluded$
|
|
316503
|
+
var _excluded$30 = ["ellipsis", "rel"];
|
|
316161
316504
|
|
|
316162
316505
|
var Link$2 = function Link(_ref, ref) {
|
|
316163
316506
|
var ellipsis = _ref.ellipsis,
|
|
316164
316507
|
rel = _ref.rel,
|
|
316165
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
316508
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$30);
|
|
316166
316509
|
|
|
316167
316510
|
warning$6(_typeof$1(ellipsis) !== 'object', 'Typography.Link', '`ellipsis` only supports boolean value.');
|
|
316168
316511
|
var baseRef = React.useRef(null);
|
|
@@ -316196,11 +316539,11 @@
|
|
|
316196
316539
|
|
|
316197
316540
|
var Paragraph$7 = /*#__PURE__*/React.forwardRef(Paragraph$6);
|
|
316198
316541
|
|
|
316199
|
-
var _excluded$
|
|
316542
|
+
var _excluded$31 = ["ellipsis"];
|
|
316200
316543
|
|
|
316201
316544
|
var Text$2 = function Text(_ref, ref) {
|
|
316202
316545
|
var ellipsis = _ref.ellipsis,
|
|
316203
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
316546
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$31);
|
|
316204
316547
|
|
|
316205
316548
|
var mergedEllipsis = React.useMemo(function () {
|
|
316206
316549
|
if (ellipsis && _typeof$1(ellipsis) === 'object') {
|
|
@@ -316220,13 +316563,13 @@
|
|
|
316220
316563
|
|
|
316221
316564
|
var Text$3 = /*#__PURE__*/React.forwardRef(Text$2);
|
|
316222
316565
|
|
|
316223
|
-
var _excluded$
|
|
316566
|
+
var _excluded$32 = ["level"];
|
|
316224
316567
|
var TITLE_ELE_LIST$1 = tupleNum$1(1, 2, 3, 4, 5);
|
|
316225
316568
|
|
|
316226
316569
|
var Title$3 = function Title(props, ref) {
|
|
316227
316570
|
var _props$level = props.level,
|
|
316228
316571
|
level = _props$level === void 0 ? 1 : _props$level,
|
|
316229
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
316572
|
+
restProps = _objectWithoutProperties$1(props, _excluded$32);
|
|
316230
316573
|
|
|
316231
316574
|
var component;
|
|
316232
316575
|
|
|
@@ -316331,6 +316674,66 @@
|
|
|
316331
316674
|
RefAutoComplete$1.Option = Option;
|
|
316332
316675
|
RefAutoComplete$1.AntdAutoComplete = RefAutoComplete;
|
|
316333
316676
|
|
|
316677
|
+
var _excluded$33 = ["children", "treeData", "value", "defaultLabel"];
|
|
316678
|
+
var CLMTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
316679
|
+
var children = props.children,
|
|
316680
|
+
treeData = props.treeData,
|
|
316681
|
+
value = props.value,
|
|
316682
|
+
defaultLabel = props.defaultLabel,
|
|
316683
|
+
resetProps = _objectWithoutProperties$1(props, _excluded$33);
|
|
316684
|
+
|
|
316685
|
+
var deepChildren = React.useCallback(function (arr) {
|
|
316686
|
+
var flag = false;
|
|
316687
|
+
React__default['default'].Children.forEach(arr, function (child) {
|
|
316688
|
+
if ( /*#__PURE__*/React__default['default'].isValidElement(child)) {
|
|
316689
|
+
var _child$props = child.props,
|
|
316690
|
+
childValue = _child$props.value,
|
|
316691
|
+
childChildren = _child$props.children;
|
|
316692
|
+
|
|
316693
|
+
if (!flag) {
|
|
316694
|
+
if (childValue === value) {
|
|
316695
|
+
flag = true;
|
|
316696
|
+
} else if (childChildren) {
|
|
316697
|
+
flag = deepChildren(childChildren);
|
|
316698
|
+
}
|
|
316699
|
+
}
|
|
316700
|
+
}
|
|
316701
|
+
});
|
|
316702
|
+
return flag;
|
|
316703
|
+
}, [value]);
|
|
316704
|
+
var hasOption = React.useMemo(function () {
|
|
316705
|
+
var flag = false;
|
|
316706
|
+
|
|
316707
|
+
if (children) {
|
|
316708
|
+
flag = deepChildren(children);
|
|
316709
|
+
}
|
|
316710
|
+
|
|
316711
|
+
if (treeData) {
|
|
316712
|
+
var deepFind = function deepFind(arr) {
|
|
316713
|
+
return arr.some(function (v) {
|
|
316714
|
+
if (v.value === value) return true;
|
|
316715
|
+
return v.children && deepFind(v.children);
|
|
316716
|
+
});
|
|
316717
|
+
};
|
|
316718
|
+
|
|
316719
|
+
flag = deepFind(treeData);
|
|
316720
|
+
}
|
|
316721
|
+
|
|
316722
|
+
return flag;
|
|
316723
|
+
}, [children, value, deepChildren]); // 重组value: 传入value但找不到options项时,展示默认label
|
|
316724
|
+
|
|
316725
|
+
var resetValue = React.useMemo(function () {
|
|
316726
|
+
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
316727
|
+
return value;
|
|
316728
|
+
}, [value, hasOption]);
|
|
316729
|
+
return /*#__PURE__*/React__default['default'].createElement(TreeSelect$1, _objectSpread({
|
|
316730
|
+
ref: ref,
|
|
316731
|
+
value: resetValue
|
|
316732
|
+
}, resetProps), children);
|
|
316733
|
+
});
|
|
316734
|
+
var LMTreeSelect = CLMTreeSelect;
|
|
316735
|
+
LMTreeSelect.TreeNode = TreeSelect$1.TreeNode;
|
|
316736
|
+
|
|
316334
316737
|
function getDataOrAriaProps$2(props) {
|
|
316335
316738
|
return Object.keys(props).reduce(function (prev, key) {
|
|
316336
316739
|
if ((key.startsWith('data-') || key.startsWith('aria-') || key === 'role') && !key.startsWith('data-__')) {
|
|
@@ -316402,7 +316805,7 @@
|
|
|
316402
316805
|
return ErrorBoundary;
|
|
316403
316806
|
}(React.Component);
|
|
316404
316807
|
|
|
316405
|
-
var _excluded$
|
|
316808
|
+
var _excluded$34 = ["description", "prefixCls", "message", "banner", "className", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "duration"];
|
|
316406
316809
|
var iconMapFilled$1 = {
|
|
316407
316810
|
success: CheckCircleFilled$2,
|
|
316408
316811
|
info: InfoCircleFilled$2,
|
|
@@ -316475,7 +316878,7 @@
|
|
|
316475
316878
|
closeIcon = _ref$closeIcon === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined$2, null) : _ref$closeIcon,
|
|
316476
316879
|
action = _ref.action,
|
|
316477
316880
|
duration = _ref.duration,
|
|
316478
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
316881
|
+
props = _objectWithoutProperties$1(_ref, _excluded$34);
|
|
316479
316882
|
|
|
316480
316883
|
var _React$useState = React.useState(false),
|
|
316481
316884
|
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
@@ -316905,7 +317308,7 @@
|
|
|
316905
317308
|
};
|
|
316906
317309
|
};
|
|
316907
317310
|
|
|
316908
|
-
var _excluded$
|
|
317311
|
+
var _excluded$35 = ["className", "onUrge", "onDeleteComment"];
|
|
316909
317312
|
var prefixCls$c = 'lm_approval';
|
|
316910
317313
|
var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
|
|
316911
317314
|
var cacheColorMap = new Map();
|
|
@@ -317313,7 +317716,7 @@
|
|
|
317313
317716
|
onUrge = _props$onUrge === void 0 ? function () {} : _props$onUrge,
|
|
317314
317717
|
_props$onDeleteCommen2 = props.onDeleteComment,
|
|
317315
317718
|
onDeleteComment = _props$onDeleteCommen2 === void 0 ? function () {} : _props$onDeleteCommen2,
|
|
317316
|
-
others = _objectWithoutProperties$1(props, _excluded$
|
|
317719
|
+
others = _objectWithoutProperties$1(props, _excluded$35);
|
|
317317
317720
|
|
|
317318
317721
|
var _useState = React.useState(false),
|
|
317319
317722
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
@@ -319104,7 +319507,7 @@
|
|
|
319104
319507
|
return nodes;
|
|
319105
319508
|
}
|
|
319106
319509
|
|
|
319107
|
-
var _excluded$
|
|
319510
|
+
var _excluded$36 = ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"],
|
|
319108
319511
|
_excluded2$J = ["prefixCls", "className"];
|
|
319109
319512
|
var ConfigContext$6 = ConfigProvider$1.ConfigContext;
|
|
319110
319513
|
|
|
@@ -319129,7 +319532,7 @@
|
|
|
319129
319532
|
var defaultExpandAll = _ref2.defaultExpandAll,
|
|
319130
319533
|
defaultExpandParent = _ref2.defaultExpandParent,
|
|
319131
319534
|
defaultExpandedKeys = _ref2.defaultExpandedKeys,
|
|
319132
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
319535
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$36);
|
|
319133
319536
|
|
|
319134
319537
|
// Shift click usage
|
|
319135
319538
|
var lastSelectedKey = React.useRef();
|
|
@@ -319627,11 +320030,11 @@
|
|
|
319627
320030
|
blockNode: false
|
|
319628
320031
|
};
|
|
319629
320032
|
|
|
319630
|
-
var _excluded$
|
|
320033
|
+
var _excluded$37 = ["className"];
|
|
319631
320034
|
var prefixCls$d = 'lm_tree';
|
|
319632
320035
|
var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
319633
320036
|
var className = props.className,
|
|
319634
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
320037
|
+
rest = _objectWithoutProperties$1(props, _excluded$37);
|
|
319635
320038
|
|
|
319636
320039
|
return /*#__PURE__*/React__default['default'].createElement(Tree$2, _objectSpread(_objectSpread({
|
|
319637
320040
|
ref: ref
|
|
@@ -320690,7 +321093,7 @@
|
|
|
320690
321093
|
}, unitNodes);
|
|
320691
321094
|
}
|
|
320692
321095
|
|
|
320693
|
-
var _excluded$
|
|
321096
|
+
var _excluded$38 = ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"];
|
|
320694
321097
|
|
|
320695
321098
|
var ScrollNumber$1 = function ScrollNumber(_ref) {
|
|
320696
321099
|
var customizePrefixCls = _ref.prefixCls,
|
|
@@ -320703,7 +321106,7 @@
|
|
|
320703
321106
|
_ref$component = _ref.component,
|
|
320704
321107
|
component = _ref$component === void 0 ? 'sup' : _ref$component,
|
|
320705
321108
|
children = _ref.children,
|
|
320706
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
321109
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$38);
|
|
320707
321110
|
|
|
320708
321111
|
var _React$useContext = React.useContext(ConfigContext$1),
|
|
320709
321112
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
@@ -320753,7 +321156,7 @@
|
|
|
320753
321156
|
return /*#__PURE__*/React.createElement(component, newProps, numberNodes);
|
|
320754
321157
|
};
|
|
320755
321158
|
|
|
320756
|
-
var _excluded$
|
|
321159
|
+
var _excluded$39 = ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color", "count", "overflowCount", "dot", "size", "title", "offset", "style", "className", "showZero"];
|
|
320757
321160
|
|
|
320758
321161
|
var Badge$1 = function Badge(_ref) {
|
|
320759
321162
|
var _classNames, _classNames2;
|
|
@@ -320778,7 +321181,7 @@
|
|
|
320778
321181
|
className = _ref.className,
|
|
320779
321182
|
_ref$showZero = _ref.showZero,
|
|
320780
321183
|
showZero = _ref$showZero === void 0 ? false : _ref$showZero,
|
|
320781
|
-
restProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
321184
|
+
restProps = _objectWithoutProperties$1(_ref, _excluded$39);
|
|
320782
321185
|
|
|
320783
321186
|
var _React$useContext = React.useContext(ConfigContext$1),
|
|
320784
321187
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -320913,7 +321316,7 @@
|
|
|
320913
321316
|
|
|
320914
321317
|
Badge$1.Ribbon = Ribbon$1;
|
|
320915
321318
|
|
|
320916
|
-
var _excluded$
|
|
321319
|
+
var _excluded$3a = ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"];
|
|
320917
321320
|
|
|
320918
321321
|
var Divider$5 = function Divider(props) {
|
|
320919
321322
|
var _classNames;
|
|
@@ -320932,7 +321335,7 @@
|
|
|
320932
321335
|
children = props.children,
|
|
320933
321336
|
dashed = props.dashed,
|
|
320934
321337
|
plain = props.plain,
|
|
320935
|
-
restProps = _objectWithoutProperties$1(props, _excluded$
|
|
321338
|
+
restProps = _objectWithoutProperties$1(props, _excluded$3a);
|
|
320936
321339
|
|
|
320937
321340
|
var prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
320938
321341
|
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
|
|
@@ -321310,7 +321713,7 @@
|
|
|
321310
321713
|
}
|
|
321311
321714
|
}; // 状态管理操作
|
|
321312
321715
|
|
|
321313
|
-
var reducer$
|
|
321716
|
+
var reducer$6 = function reducer(state, action) {
|
|
321314
321717
|
var resize = action.resize,
|
|
321315
321718
|
transform = action.transform,
|
|
321316
321719
|
current = action.current;
|
|
@@ -321338,7 +321741,7 @@
|
|
|
321338
321741
|
}
|
|
321339
321742
|
}; // 仅在初始化时触发一次
|
|
321340
321743
|
|
|
321341
|
-
var initialState$
|
|
321744
|
+
var initialState$4 = function initialState(props) {
|
|
321342
321745
|
var initialIndex = props.initialIndex;
|
|
321343
321746
|
return _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
321344
321747
|
currentIndex: initialIndex
|
|
@@ -321689,10 +322092,10 @@
|
|
|
321689
322092
|
var Root = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
321690
322093
|
var bodyRef = React.useRef(null);
|
|
321691
322094
|
var initialState = React.useMemo(function () {
|
|
321692
|
-
return initialState$
|
|
322095
|
+
return initialState$4(props);
|
|
321693
322096
|
}, []);
|
|
321694
322097
|
|
|
321695
|
-
var _useReducer = React.useReducer(reducer$
|
|
322098
|
+
var _useReducer = React.useReducer(reducer$6, initialState),
|
|
321696
322099
|
_useReducer2 = _slicedToArray$1(_useReducer, 2),
|
|
321697
322100
|
state = _useReducer2[0],
|
|
321698
322101
|
dispatch = _useReducer2[1]; // 获取核心Methods
|
|
@@ -321758,7 +322161,7 @@
|
|
|
321758
322161
|
|
|
321759
322162
|
}; // 状态管理操作
|
|
321760
322163
|
|
|
321761
|
-
var reducer$
|
|
322164
|
+
var reducer$7 = function reducer(state, action) {
|
|
321762
322165
|
var result = action.result,
|
|
321763
322166
|
init = action.init;
|
|
321764
322167
|
|
|
@@ -321774,7 +322177,7 @@
|
|
|
321774
322177
|
}
|
|
321775
322178
|
}; // 仅在初始化时触发一次
|
|
321776
322179
|
|
|
321777
|
-
var initialState$
|
|
322180
|
+
var initialState$5 = function initialState() {
|
|
321778
322181
|
return _objectSpread({}, defaultState$1);
|
|
321779
322182
|
};
|
|
321780
322183
|
|
|
@@ -323448,14 +323851,14 @@
|
|
|
323448
323851
|
|
|
323449
323852
|
var Body$1 = /*#__PURE__*/React__default['default'].memo(Index$b);
|
|
323450
323853
|
|
|
323451
|
-
var _excluded$
|
|
323854
|
+
var _excluded$3b = ["value", "onChange", "leftIcon", "rightIcon"];
|
|
323452
323855
|
|
|
323453
323856
|
var ResetSlider = function ResetSlider(_ref) {
|
|
323454
323857
|
var value = _ref.value,
|
|
323455
323858
|
_onChange = _ref.onChange,
|
|
323456
323859
|
leftIcon = _ref.leftIcon,
|
|
323457
323860
|
rightIcon = _ref.rightIcon,
|
|
323458
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
323861
|
+
props = _objectWithoutProperties$1(_ref, _excluded$3b);
|
|
323459
323862
|
|
|
323460
323863
|
// 减
|
|
323461
323864
|
var decrement = function decrement() {
|
|
@@ -323609,10 +324012,10 @@
|
|
|
323609
324012
|
|
|
323610
324013
|
var LmBox = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
323611
324014
|
var initialState = React.useMemo(function () {
|
|
323612
|
-
return initialState$
|
|
324015
|
+
return initialState$5();
|
|
323613
324016
|
}, []);
|
|
323614
324017
|
|
|
323615
|
-
var _useReducer = React.useReducer(reducer$
|
|
324018
|
+
var _useReducer = React.useReducer(reducer$7, initialState),
|
|
323616
324019
|
_useReducer2 = _slicedToArray$1(_useReducer, 2),
|
|
323617
324020
|
state = _useReducer2[0],
|
|
323618
324021
|
dispatch = _useReducer2[1]; // 获取核心Methods
|
|
@@ -323675,7 +324078,7 @@
|
|
|
323675
324078
|
|
|
323676
324079
|
}; // 状态管理操作
|
|
323677
324080
|
|
|
323678
|
-
var reducer$
|
|
324081
|
+
var reducer$8 = function reducer(state, action) {
|
|
323679
324082
|
var transform = action.transform,
|
|
323680
324083
|
current = action.current,
|
|
323681
324084
|
visible = action.visible;
|
|
@@ -323708,7 +324111,7 @@
|
|
|
323708
324111
|
}
|
|
323709
324112
|
}; // 仅在初始化时触发一次
|
|
323710
324113
|
|
|
323711
|
-
var initialState$
|
|
324114
|
+
var initialState$6 = function initialState(props) {
|
|
323712
324115
|
var initialIndex = props.initialIndex;
|
|
323713
324116
|
return _objectSpread(_objectSpread({}, defaultState$2), {}, {
|
|
323714
324117
|
currentIndex: initialIndex
|
|
@@ -324100,10 +324503,10 @@
|
|
|
324100
324503
|
var LmImageViewerRoot = function LmImageViewerRoot(props, ref) {
|
|
324101
324504
|
var previewRef = React.useRef(null);
|
|
324102
324505
|
var initialState = React.useMemo(function () {
|
|
324103
|
-
return initialState$
|
|
324506
|
+
return initialState$6(props);
|
|
324104
324507
|
}, []);
|
|
324105
324508
|
|
|
324106
|
-
var _useReducer = React.useReducer(reducer$
|
|
324509
|
+
var _useReducer = React.useReducer(reducer$8, initialState),
|
|
324107
324510
|
_useReducer2 = _slicedToArray$1(_useReducer, 2),
|
|
324108
324511
|
state = _useReducer2[0],
|
|
324109
324512
|
dispatch = _useReducer2[1]; // 获取核心Methods
|
|
@@ -324235,7 +324638,7 @@
|
|
|
324235
324638
|
exports.Tooltip = Tooltip$4;
|
|
324236
324639
|
exports.Transfer = Transfer;
|
|
324237
324640
|
exports.Tree = LmTree;
|
|
324238
|
-
exports.TreeSelect =
|
|
324641
|
+
exports.TreeSelect = LMTreeSelect;
|
|
324239
324642
|
exports.Typography = Typography$3;
|
|
324240
324643
|
exports.Upload = LMUpload;
|
|
324241
324644
|
exports.UploadOss = UploadOss;
|