linkmore-design 1.1.13-alpha.3 → 1.1.13-alpha.5
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/Button/demos/ghost.d.ts +2 -0
- package/dist/Descriptions/Cell.d.ts +1 -0
- package/dist/Descriptions/Item.d.ts +1 -0
- package/dist/Descriptions/index.d.ts +1 -1
- package/dist/LmDrag/LmDrag.d.ts +4 -0
- package/dist/LmDrag/components/DndContainer.d.ts +3 -0
- package/dist/LmDrag/components/sortableBox.d.ts +5 -0
- package/dist/LmDrag/components/sortableItem.d.ts +7 -0
- package/dist/LmDrag/demos/basic.d.ts +2 -0
- package/dist/LmDrag/index.d.ts +10 -0
- package/dist/LmDrag/style/index.d.ts +1 -0
- package/dist/LmDrag/style/variables.d.ts +1 -0
- package/dist/LmDrag/wrapper/Root.d.ts +3 -0
- package/dist/LmEditTable/EditTable.d.ts +15 -3
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/dist/LmUpload/fns/index.d.ts +1 -0
- package/dist/QuickMenu/demos/useInDraw.d.ts +2 -0
- package/dist/QuickMenu/index.d.ts +3 -1
- package/dist/Select/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.umd.js +757 -125
- package/dist/index.umd.min.js +9 -9
- package/dist/variables.css +76 -25
- package/es/Button/index.js +4 -3
- package/es/Button/style/index.css +28 -25
- package/es/Button/style/variables.css +28 -25
- package/es/Cascader/index.js +16 -2
- package/es/Descriptions/Cell.d.ts +1 -0
- package/es/Descriptions/Cell.js +5 -2
- package/es/Descriptions/Item.d.ts +1 -0
- package/es/Descriptions/Row.js +6 -1
- package/es/Descriptions/index.d.ts +1 -1
- package/es/Descriptions/index.js +3 -3
- package/es/Descriptions/style/index.css +3 -0
- package/es/Descriptions/style/variables.css +3 -0
- package/es/InputNumber/index.js +18 -13
- package/es/InputNumber/style/index.css +3 -0
- package/es/InputNumber/style/variables.css +3 -0
- package/es/LmDrag/LmDrag.d.ts +4 -0
- package/es/LmDrag/LmDrag.js +30 -0
- package/es/LmDrag/components/DndContainer.d.ts +3 -0
- package/es/LmDrag/components/DndContainer.js +121 -0
- package/es/LmDrag/components/sortableBox.d.ts +5 -0
- package/es/LmDrag/components/sortableBox.js +23 -0
- package/es/LmDrag/components/sortableItem.d.ts +7 -0
- package/es/LmDrag/components/sortableItem.js +41 -0
- package/es/LmDrag/index.d.ts +10 -0
- package/es/LmDrag/index.js +3 -0
- package/es/LmDrag/style/index.css +0 -0
- package/es/LmDrag/style/index.d.ts +1 -0
- package/es/LmDrag/style/index.js +1 -0
- package/es/LmDrag/style/variables.css +0 -0
- package/es/LmDrag/style/variables.d.ts +1 -0
- package/es/LmDrag/style/variables.js +1 -0
- package/es/LmDrag/wrapper/Root.d.ts +3 -0
- package/es/LmDrag/wrapper/Root.js +12 -0
- package/es/LmEditTable/EditTable.d.ts +15 -3
- package/es/LmEditTable/EditTable.js +88 -57
- package/es/LmEditTable/sortableItemCol.js +3 -1
- package/es/LmEditTable/util.js +1 -1
- package/es/LmFilter/components/DropdownFIlter.js +27 -6
- package/es/LmFilter/style/index.css +12 -0
- package/es/LmFilter/style/variables.css +12 -0
- package/es/LmUpload/LmUpload.js +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +4 -3
- package/es/LmUpload/UploadList/index.js +52 -2
- package/es/LmUpload/fns/index.d.ts +1 -0
- package/es/LmUpload/fns/index.js +19 -3
- package/es/QuickMenu/index.d.ts +3 -1
- package/es/QuickMenu/index.js +22 -19
- package/es/Select/index.d.ts +3 -0
- package/es/Select/index.js +28 -1
- package/es/Select/style/index.css +27 -0
- package/es/Select/style/variables.css +27 -0
- package/es/TreeSelect/index.js +16 -2
- package/es/TreeSelect/style/index.css +3 -0
- package/es/TreeSelect/style/variables.css +3 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/styles/variables.css +76 -25
- package/lib/Button/index.js +4 -3
- package/lib/Button/style/index.css +28 -25
- package/lib/Button/style/variables.css +28 -25
- package/lib/Cascader/index.js +20 -2
- package/lib/Descriptions/Cell.d.ts +1 -0
- package/lib/Descriptions/Cell.js +5 -2
- package/lib/Descriptions/Item.d.ts +1 -0
- package/lib/Descriptions/Row.js +6 -1
- package/lib/Descriptions/index.d.ts +1 -1
- package/lib/Descriptions/index.js +3 -3
- package/lib/Descriptions/style/index.css +3 -0
- package/lib/Descriptions/style/variables.css +3 -0
- package/lib/InputNumber/index.js +22 -13
- package/lib/InputNumber/style/index.css +3 -0
- package/lib/InputNumber/style/variables.css +3 -0
- package/lib/LmDrag/LmDrag.d.ts +4 -0
- package/lib/LmDrag/LmDrag.js +44 -0
- package/lib/LmDrag/components/DndContainer.d.ts +3 -0
- package/lib/LmDrag/components/DndContainer.js +138 -0
- package/lib/LmDrag/components/sortableBox.d.ts +5 -0
- package/lib/LmDrag/components/sortableBox.js +37 -0
- package/lib/LmDrag/components/sortableItem.d.ts +7 -0
- package/lib/LmDrag/components/sortableItem.js +54 -0
- package/lib/LmDrag/index.d.ts +10 -0
- package/lib/LmDrag/index.js +19 -0
- package/lib/LmDrag/style/index.css +0 -0
- package/lib/LmDrag/style/index.d.ts +1 -0
- package/lib/LmDrag/style/index.js +3 -0
- package/lib/LmDrag/style/variables.css +0 -0
- package/lib/LmDrag/style/variables.d.ts +1 -0
- package/lib/LmDrag/style/variables.js +3 -0
- package/lib/LmDrag/wrapper/Root.d.ts +3 -0
- package/lib/LmDrag/wrapper/Root.js +26 -0
- package/lib/LmEditTable/EditTable.d.ts +15 -3
- package/lib/LmEditTable/EditTable.js +87 -56
- package/lib/LmEditTable/sortableItemCol.js +4 -1
- package/lib/LmEditTable/util.js +1 -1
- package/lib/LmFilter/components/DropdownFIlter.js +27 -6
- package/lib/LmFilter/style/index.css +12 -0
- package/lib/LmFilter/style/variables.css +12 -0
- package/lib/LmUpload/LmUpload.js +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +4 -3
- package/lib/LmUpload/UploadList/index.js +53 -2
- package/lib/LmUpload/fns/index.d.ts +1 -0
- package/lib/LmUpload/fns/index.js +19 -3
- package/lib/QuickMenu/index.d.ts +3 -1
- package/lib/QuickMenu/index.js +21 -18
- package/lib/Select/index.d.ts +3 -0
- package/lib/Select/index.js +29 -1
- package/lib/Select/style/index.css +27 -0
- package/lib/Select/style/variables.css +27 -0
- package/lib/TreeSelect/index.js +20 -2
- package/lib/TreeSelect/style/index.css +3 -0
- package/lib/TreeSelect/style/variables.css +3 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -1
- package/lib/styles/variables.css +76 -25
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -14966,7 +14966,7 @@
|
|
|
14966
14966
|
|
|
14967
14967
|
var _objectWithoutProperties$1 = /*@__PURE__*/getDefaultExportFromCjs(objectWithoutProperties);
|
|
14968
14968
|
|
|
14969
|
-
var _excluded$a = ["children", "className", "size", "type", "hover"];
|
|
14969
|
+
var _excluded$a = ["children", "className", "size", "type", "hover", "danger"];
|
|
14970
14970
|
|
|
14971
14971
|
var LMButton = function LMButton(props) {
|
|
14972
14972
|
var children = props.children,
|
|
@@ -14976,6 +14976,7 @@
|
|
|
14976
14976
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
14977
14977
|
_props$hover = props.hover,
|
|
14978
14978
|
hover = _props$hover === void 0 ? false : _props$hover,
|
|
14979
|
+
danger = props.danger,
|
|
14979
14980
|
restProps = _objectWithoutProperties$1(props, _excluded$a);
|
|
14980
14981
|
|
|
14981
14982
|
var globalSize = customizeSize || React__default['default'].useContext(SizeContext$1) || 'middle';
|
|
@@ -14985,12 +14986,12 @@
|
|
|
14985
14986
|
|
|
14986
14987
|
var classs = classnames('lm-button', className, {
|
|
14987
14988
|
'lm-button-icon-only': !children
|
|
14988
|
-
}, _defineProperty$1({}, "lm-button-".concat(size), size), _defineProperty$1({}, "lm-button-".concat(type), type), _defineProperty$1({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
14989
|
+
}, _defineProperty$1({}, "lm-button-danger", danger), _defineProperty$1({}, "lm-button-".concat(size), size), _defineProperty$1({}, "lm-button-".concat(type), type), _defineProperty$1({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
14989
14990
|
return /*#__PURE__*/React__default['default'].createElement(Button, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
14990
14991
|
className: classs,
|
|
14991
14992
|
size: size,
|
|
14992
14993
|
type: type,
|
|
14993
|
-
danger: !!
|
|
14994
|
+
danger: !!danger
|
|
14994
14995
|
}), children);
|
|
14995
14996
|
};
|
|
14996
14997
|
|
|
@@ -34782,7 +34783,7 @@
|
|
|
34782
34783
|
Cascader$1.SHOW_PARENT = SHOW_PARENT$1;
|
|
34783
34784
|
Cascader$1.SHOW_CHILD = SHOW_CHILD$1;
|
|
34784
34785
|
|
|
34785
|
-
var _excluded$y = ["children", "className", "dropdownClassName", "placeholder", "defaultLabel"];
|
|
34786
|
+
var _excluded$y = ["children", "className", "dropdownClassName", "placeholder", "defaultLabel", "disabled", "size"];
|
|
34786
34787
|
var prefixCls = 'lm_cascader';
|
|
34787
34788
|
var prefixDropdownCls = 'lm_cascader_dropdown';
|
|
34788
34789
|
|
|
@@ -34793,7 +34794,15 @@
|
|
|
34793
34794
|
_props$placeholder = props.placeholder,
|
|
34794
34795
|
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
|
|
34795
34796
|
defaultLabel = props.defaultLabel,
|
|
34796
|
-
|
|
34797
|
+
customDisabled = props.disabled,
|
|
34798
|
+
customizeSize = props.size,
|
|
34799
|
+
others = _objectWithoutProperties$1(props, _excluded$y); // ===================== Disabled =====================
|
|
34800
|
+
|
|
34801
|
+
|
|
34802
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
34803
|
+
var size = React__default['default'].useContext(SizeContext$1);
|
|
34804
|
+
var mergeSize = customizeSize || size;
|
|
34805
|
+
var mergedDisabled = customDisabled || disabled;
|
|
34797
34806
|
|
|
34798
34807
|
var displayRender = function displayRender(label, selectedOptions) {
|
|
34799
34808
|
var hasUndefined = selectedOptions.some(function (v) {
|
|
@@ -34807,12 +34816,15 @@
|
|
|
34807
34816
|
return label.join('/');
|
|
34808
34817
|
};
|
|
34809
34818
|
|
|
34810
|
-
return /*#__PURE__*/React__default['default'].createElement(Cascader$1, _objectSpread({
|
|
34819
|
+
return /*#__PURE__*/React__default['default'].createElement(Cascader$1, _objectSpread(_objectSpread({
|
|
34811
34820
|
placeholder: placeholder,
|
|
34812
34821
|
className: classnames(prefixCls, className),
|
|
34813
34822
|
dropdownClassName: classnames(prefixDropdownCls, dropdownClassName),
|
|
34814
34823
|
displayRender: displayRender
|
|
34815
|
-
}, others)
|
|
34824
|
+
}, others), {}, {
|
|
34825
|
+
size: mergeSize,
|
|
34826
|
+
disabled: mergedDisabled
|
|
34827
|
+
}));
|
|
34816
34828
|
};
|
|
34817
34829
|
|
|
34818
34830
|
var Checkbox$1 = /*#__PURE__*/function (_Component) {
|
|
@@ -90787,7 +90799,7 @@
|
|
|
90787
90799
|
console.log('报错了!', '报错项:', item, '报错值', filterValue);
|
|
90788
90800
|
return filterValue;
|
|
90789
90801
|
}
|
|
90790
|
-
}, [type, filterValue]);
|
|
90802
|
+
}, [type, data, filterValue]);
|
|
90791
90803
|
|
|
90792
90804
|
if (isString) {
|
|
90793
90805
|
return /*#__PURE__*/React__default['default'].createElement("span", null, String);
|
|
@@ -90801,7 +90813,8 @@
|
|
|
90801
90813
|
var filterValue = instance.filterValue,
|
|
90802
90814
|
setFilterValue = instance.setFilterValue;
|
|
90803
90815
|
var title = item.title,
|
|
90804
|
-
colon = item.colon
|
|
90816
|
+
colon = item.colon,
|
|
90817
|
+
clearIconTrigger = item.clearIconTrigger; // 是否有筛选值/是否处于筛选状态
|
|
90805
90818
|
|
|
90806
90819
|
var active = React.useMemo(function () {
|
|
90807
90820
|
return getIsHas(filterValue);
|
|
@@ -90816,6 +90829,29 @@
|
|
|
90816
90829
|
e.stopPropagation();
|
|
90817
90830
|
setFilterValue(getValueForType(item.type));
|
|
90818
90831
|
}
|
|
90832
|
+
}; // Icon展示方式
|
|
90833
|
+
|
|
90834
|
+
|
|
90835
|
+
var Icon = function Icon() {
|
|
90836
|
+
// hover时出现清空
|
|
90837
|
+
if (clearIconTrigger === 'hover') {
|
|
90838
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
90839
|
+
type: "lmweb-close-circle-fill",
|
|
90840
|
+
onClick: handleClear,
|
|
90841
|
+
className: "icon_clear"
|
|
90842
|
+
}), /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
90843
|
+
type: "lmweb-down",
|
|
90844
|
+
className: "icon_down"
|
|
90845
|
+
}));
|
|
90846
|
+
} // 日期类型并且未选中时返回日期自带icon
|
|
90847
|
+
|
|
90848
|
+
|
|
90849
|
+
if (item.type === 'date' && !active) return null; // 选中时展示清楚按钮
|
|
90850
|
+
|
|
90851
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
90852
|
+
type: active ? 'lmweb-close-circle-fill' : 'lmweb-down',
|
|
90853
|
+
onClick: handleClear
|
|
90854
|
+
});
|
|
90819
90855
|
};
|
|
90820
90856
|
|
|
90821
90857
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, (title || showColon) && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -90829,10 +90865,7 @@
|
|
|
90829
90865
|
item: item
|
|
90830
90866
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
90831
90867
|
className: "filter_item_icon addon_after"
|
|
90832
|
-
},
|
|
90833
|
-
type: active ? 'lmweb-close-circle-fill' : 'lmweb-down',
|
|
90834
|
-
onClick: handleClear
|
|
90835
|
-
}) : null));
|
|
90868
|
+
}, /*#__PURE__*/React__default['default'].createElement(Icon, null)));
|
|
90836
90869
|
});
|
|
90837
90870
|
/*
|
|
90838
90871
|
* css样式控制
|
|
@@ -181471,10 +181504,11 @@
|
|
|
181471
181504
|
}, [uid]); // 从对象中读取存在的指定属性
|
|
181472
181505
|
|
|
181473
181506
|
var getFileHasValue = React.useCallback(function (obj) {
|
|
181507
|
+
if (!obj) return '';
|
|
181474
181508
|
var extend = [uid, 'fileName'];
|
|
181475
181509
|
var val = '';
|
|
181476
181510
|
extend.forEach(function (v) {
|
|
181477
|
-
if (!val) val = obj[v];
|
|
181511
|
+
if (!val && obj[v]) val = obj[v];
|
|
181478
181512
|
});
|
|
181479
181513
|
return val;
|
|
181480
181514
|
}, [uid]); // 获取当前的文件列表
|
|
@@ -181892,7 +181926,21 @@
|
|
|
181892
181926
|
var _props$onDownload;
|
|
181893
181927
|
|
|
181894
181928
|
(_props$onDownload = props.onDownload) === null || _props$onDownload === void 0 ? void 0 : _props$onDownload.call(props, file);
|
|
181895
|
-
}, [props.onDownload]);
|
|
181929
|
+
}, [props.onDownload]); // 拖拽移动事件
|
|
181930
|
+
|
|
181931
|
+
var move = React.useCallback(function (active, over, fileList) {
|
|
181932
|
+
var _props$onMove;
|
|
181933
|
+
|
|
181934
|
+
(_props$onMove = props.onMove) === null || _props$onMove === void 0 ? void 0 : _props$onMove.call(props, active, over, fileList);
|
|
181935
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
181936
|
+
file: active,
|
|
181937
|
+
fileList: fileList
|
|
181938
|
+
});
|
|
181939
|
+
dispatch({
|
|
181940
|
+
type: 'changeFileList',
|
|
181941
|
+
fileList: fileList
|
|
181942
|
+
});
|
|
181943
|
+
}, [props.onMove, onChange, dispatch]);
|
|
181896
181944
|
var CoreMethods = {
|
|
181897
181945
|
getIsMaxCount: getIsMaxCount,
|
|
181898
181946
|
getFileHasValue: getFileHasValue,
|
|
@@ -181902,7 +181950,8 @@
|
|
|
181902
181950
|
getUploadStatus: getUploadStatus,
|
|
181903
181951
|
remove: remove,
|
|
181904
181952
|
preview: preview,
|
|
181905
|
-
download: download
|
|
181953
|
+
download: download,
|
|
181954
|
+
move: move
|
|
181906
181955
|
};
|
|
181907
181956
|
var RefMethods = {
|
|
181908
181957
|
getState: function getState() {
|
|
@@ -182173,7 +182222,8 @@
|
|
|
182173
182222
|
var PictureItem$1 = function PictureItem(_ref) {
|
|
182174
182223
|
var file = _ref.file,
|
|
182175
182224
|
index = _ref.index,
|
|
182176
|
-
instance = _ref.instance
|
|
182225
|
+
instance = _ref.instance,
|
|
182226
|
+
listeners = _ref.listeners;
|
|
182177
182227
|
var dispatch = instance.dispatch,
|
|
182178
182228
|
readOnly = instance.readOnly,
|
|
182179
182229
|
size = instance.size,
|
|
@@ -182230,13 +182280,13 @@
|
|
|
182230
182280
|
});
|
|
182231
182281
|
};
|
|
182232
182282
|
|
|
182233
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182283
|
+
return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread({
|
|
182234
182284
|
className: classnames('lm_upload_item', 'lm_upload_item_card', isError && 'lm_upload_item_error'),
|
|
182235
182285
|
style: {
|
|
182236
182286
|
height: size,
|
|
182237
182287
|
width: size
|
|
182238
182288
|
}
|
|
182239
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182289
|
+
}, listeners || {}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182240
182290
|
className: "lm_upload_item_thumb"
|
|
182241
182291
|
}, isError || !isImg ? renderThumb(resetFile) : /*#__PURE__*/React__default['default'].createElement(Image$1, {
|
|
182242
182292
|
width: resetSize.width,
|
|
@@ -182288,11 +182338,15 @@
|
|
|
182288
182338
|
|
|
182289
182339
|
var LmUploadList = function LmUploadList(_ref) {
|
|
182290
182340
|
var instance = _ref.instance;
|
|
182291
|
-
var
|
|
182341
|
+
var uid = instance.uid,
|
|
182342
|
+
getFileHasValue = instance.getFileHasValue,
|
|
182292
182343
|
getFileList = instance.getFileList,
|
|
182293
182344
|
itemRender = instance.itemRender,
|
|
182294
182345
|
listType = instance.listType,
|
|
182295
|
-
showUploadList = instance.showUploadList
|
|
182346
|
+
showUploadList = instance.showUploadList,
|
|
182347
|
+
enableDrag = instance.enableDrag,
|
|
182348
|
+
fileNames = instance.fileNames,
|
|
182349
|
+
move = instance.move;
|
|
182296
182350
|
if (!showUploadList) return null;
|
|
182297
182351
|
var fileList = React.useMemo(function () {
|
|
182298
182352
|
var _getFileList;
|
|
@@ -182301,6 +182355,51 @@
|
|
|
182301
182355
|
return a.seq - b.seq;
|
|
182302
182356
|
});
|
|
182303
182357
|
}, [getFileList]);
|
|
182358
|
+
|
|
182359
|
+
var handleMove = function handleMove(active, over, fileList) {
|
|
182360
|
+
try {
|
|
182361
|
+
var fileMap = fileList.map(function (v) {
|
|
182362
|
+
if (getFileHasValue(v) === getFileHasValue(active)) {
|
|
182363
|
+
return _objectSpread(_objectSpread({}, v), {}, {
|
|
182364
|
+
seq: over[fileNames.seq]
|
|
182365
|
+
});
|
|
182366
|
+
}
|
|
182367
|
+
|
|
182368
|
+
if (getFileHasValue(v) === getFileHasValue(over)) {
|
|
182369
|
+
return _objectSpread(_objectSpread({}, v), {}, {
|
|
182370
|
+
seq: active[fileNames.seq]
|
|
182371
|
+
});
|
|
182372
|
+
}
|
|
182373
|
+
|
|
182374
|
+
return v;
|
|
182375
|
+
});
|
|
182376
|
+
move(active, over, fileMap);
|
|
182377
|
+
} catch (error) {
|
|
182378
|
+
console.log('移动出现了错误', error);
|
|
182379
|
+
}
|
|
182380
|
+
};
|
|
182381
|
+
|
|
182382
|
+
if (enableDrag) {
|
|
182383
|
+
return /*#__PURE__*/React__default['default'].createElement(LmDrag$1, {
|
|
182384
|
+
options: fileList,
|
|
182385
|
+
rowKey: uid,
|
|
182386
|
+
move: handleMove
|
|
182387
|
+
}, function (_ref2) {
|
|
182388
|
+
var item = _ref2.item,
|
|
182389
|
+
listeners = _ref2.listeners,
|
|
182390
|
+
index = _ref2.index;
|
|
182391
|
+
return render$1(itemRender || RenderItem, {
|
|
182392
|
+
type: listType,
|
|
182393
|
+
key: getFileHasValue(item) || index,
|
|
182394
|
+
index: index,
|
|
182395
|
+
file: item,
|
|
182396
|
+
fileList: fileList,
|
|
182397
|
+
instance: instance,
|
|
182398
|
+
listeners: listeners
|
|
182399
|
+
});
|
|
182400
|
+
});
|
|
182401
|
+
}
|
|
182402
|
+
|
|
182304
182403
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file, idx) {
|
|
182305
182404
|
return render$1(itemRender || RenderItem, {
|
|
182306
182405
|
type: listType,
|
|
@@ -182531,7 +182630,7 @@
|
|
|
182531
182630
|
size: 100,
|
|
182532
182631
|
fileSize: 10,
|
|
182533
182632
|
fileSizeType: 'M',
|
|
182534
|
-
uid: '
|
|
182633
|
+
uid: 'fileName',
|
|
182535
182634
|
accept: '',
|
|
182536
182635
|
type: ['jpg', 'jpeg', 'png'],
|
|
182537
182636
|
listType: 'card',
|
|
@@ -182546,6 +182645,7 @@
|
|
|
182546
182645
|
itemRender: null,
|
|
182547
182646
|
enabledPreview: true,
|
|
182548
182647
|
enabledCrop: false,
|
|
182648
|
+
enableDrag: false,
|
|
182549
182649
|
enabledOss: false,
|
|
182550
182650
|
// oss配置
|
|
182551
182651
|
ossConfig: function ossConfig() {
|
|
@@ -188601,35 +188701,40 @@
|
|
|
188601
188701
|
}));
|
|
188602
188702
|
};
|
|
188603
188703
|
|
|
188604
|
-
var _excluded$1j = ["children", "className", "disabled"];
|
|
188704
|
+
var _excluded$1j = ["children", "className", "disabled", "size"];
|
|
188605
188705
|
var prefixCls$3 = 'lm_input-number';
|
|
188606
|
-
|
|
188607
|
-
var LMInputNumber = function LMInputNumber(props) {
|
|
188706
|
+
var LMInputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
188608
188707
|
var children = props.children,
|
|
188609
188708
|
className = props.className,
|
|
188610
188709
|
customDisabled = props.disabled,
|
|
188710
|
+
customizeSize = props.size,
|
|
188611
188711
|
rest = _objectWithoutProperties$1(props, _excluded$1j); // ===================== Disabled =====================
|
|
188612
188712
|
|
|
188613
188713
|
|
|
188614
188714
|
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
188615
|
-
var mergedDisabled = customDisabled || disabled;
|
|
188616
|
-
|
|
188715
|
+
var mergedDisabled = customDisabled || disabled; // ===================== size =====================
|
|
188716
|
+
|
|
188717
|
+
var size = React__default['default'].useContext(SizeContext$1);
|
|
188718
|
+
var mergeSize = customizeSize || size;
|
|
188719
|
+
return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread(_objectSpread({
|
|
188720
|
+
ref: ref,
|
|
188617
188721
|
className: classnames(className, prefixCls$3),
|
|
188618
|
-
disabled: mergedDisabled,
|
|
188619
188722
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
188620
|
-
}, rest)
|
|
188621
|
-
|
|
188622
|
-
|
|
188723
|
+
}, rest), {}, {
|
|
188724
|
+
size: mergeSize,
|
|
188725
|
+
disabled: mergedDisabled
|
|
188726
|
+
}));
|
|
188727
|
+
});
|
|
188623
188728
|
var CInputNumber = LMInputNumber;
|
|
188624
|
-
|
|
188625
|
-
CInputNumber.Price = function (props) {
|
|
188729
|
+
CInputNumber.Price = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
188626
188730
|
return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread({
|
|
188627
188731
|
prefix: "\uFFE5",
|
|
188732
|
+
ref: ref,
|
|
188628
188733
|
formatter: function formatter(value) {
|
|
188629
188734
|
return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
188630
188735
|
}
|
|
188631
188736
|
}, props));
|
|
188632
|
-
};
|
|
188737
|
+
});
|
|
188633
188738
|
|
|
188634
188739
|
var getRenderPropValue = function getRenderPropValue(propValue) {
|
|
188635
188740
|
if (!propValue) {
|
|
@@ -227239,6 +227344,20 @@
|
|
|
227239
227344
|
return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
|
|
227240
227345
|
}
|
|
227241
227346
|
|
|
227347
|
+
function getRelativeTransformOrigin(event, rect) {
|
|
227348
|
+
const eventCoordinates = getEventCoordinates(event);
|
|
227349
|
+
|
|
227350
|
+
if (!eventCoordinates) {
|
|
227351
|
+
return '0 0';
|
|
227352
|
+
}
|
|
227353
|
+
|
|
227354
|
+
const transformOrigin = {
|
|
227355
|
+
x: (eventCoordinates.x - rect.left) / rect.width * 100,
|
|
227356
|
+
y: (eventCoordinates.y - rect.top) / rect.height * 100
|
|
227357
|
+
};
|
|
227358
|
+
return `${transformOrigin.x}% ${transformOrigin.y}%`;
|
|
227359
|
+
}
|
|
227360
|
+
|
|
227242
227361
|
/**
|
|
227243
227362
|
* Sort collisions from smallest to greatest value
|
|
227244
227363
|
*/
|
|
@@ -229632,6 +229751,237 @@
|
|
|
229632
229751
|
};
|
|
229633
229752
|
}
|
|
229634
229753
|
|
|
229754
|
+
const defaultDropAnimation = {
|
|
229755
|
+
duration: 250,
|
|
229756
|
+
easing: 'ease',
|
|
229757
|
+
dragSourceOpacity: 0
|
|
229758
|
+
};
|
|
229759
|
+
function useDropAnimation({
|
|
229760
|
+
animate,
|
|
229761
|
+
adjustScale,
|
|
229762
|
+
activeId,
|
|
229763
|
+
draggableNodes,
|
|
229764
|
+
duration,
|
|
229765
|
+
dragSourceOpacity,
|
|
229766
|
+
easing,
|
|
229767
|
+
node,
|
|
229768
|
+
transform
|
|
229769
|
+
}) {
|
|
229770
|
+
const [dropAnimationComplete, setDropAnimationComplete] = React.useState(false);
|
|
229771
|
+
useIsomorphicLayoutEffect$a(() => {
|
|
229772
|
+
var _draggableNodes$activ;
|
|
229773
|
+
|
|
229774
|
+
if (!animate || !activeId || !easing || !duration) {
|
|
229775
|
+
if (animate) {
|
|
229776
|
+
setDropAnimationComplete(true);
|
|
229777
|
+
}
|
|
229778
|
+
|
|
229779
|
+
return;
|
|
229780
|
+
}
|
|
229781
|
+
|
|
229782
|
+
const finalNode = (_draggableNodes$activ = draggableNodes[activeId]) == null ? void 0 : _draggableNodes$activ.node.current;
|
|
229783
|
+
|
|
229784
|
+
if (transform && node && finalNode && finalNode.parentNode !== null) {
|
|
229785
|
+
const fromNode = getMeasurableNode(node);
|
|
229786
|
+
|
|
229787
|
+
if (fromNode) {
|
|
229788
|
+
const from = fromNode.getBoundingClientRect();
|
|
229789
|
+
const to = getTransformAgnosticClientRect(finalNode);
|
|
229790
|
+
const delta = {
|
|
229791
|
+
x: from.left - to.left,
|
|
229792
|
+
y: from.top - to.top
|
|
229793
|
+
};
|
|
229794
|
+
|
|
229795
|
+
if (Math.abs(delta.x) || Math.abs(delta.y)) {
|
|
229796
|
+
const scaleDelta = {
|
|
229797
|
+
scaleX: adjustScale ? to.width * transform.scaleX / from.width : 1,
|
|
229798
|
+
scaleY: adjustScale ? to.height * transform.scaleY / from.height : 1
|
|
229799
|
+
};
|
|
229800
|
+
const finalTransform = CSS.Transform.toString({
|
|
229801
|
+
x: transform.x - delta.x,
|
|
229802
|
+
y: transform.y - delta.y,
|
|
229803
|
+
...scaleDelta
|
|
229804
|
+
});
|
|
229805
|
+
const originalOpacity = finalNode.style.opacity;
|
|
229806
|
+
|
|
229807
|
+
if (dragSourceOpacity != null) {
|
|
229808
|
+
finalNode.style.opacity = `${dragSourceOpacity}`;
|
|
229809
|
+
}
|
|
229810
|
+
|
|
229811
|
+
const nodeAnimation = node.animate([{
|
|
229812
|
+
transform: CSS.Transform.toString(transform)
|
|
229813
|
+
}, {
|
|
229814
|
+
transform: finalTransform
|
|
229815
|
+
}], {
|
|
229816
|
+
easing,
|
|
229817
|
+
duration
|
|
229818
|
+
});
|
|
229819
|
+
|
|
229820
|
+
nodeAnimation.onfinish = () => {
|
|
229821
|
+
node.style.display = 'none';
|
|
229822
|
+
setDropAnimationComplete(true);
|
|
229823
|
+
|
|
229824
|
+
if (finalNode && dragSourceOpacity != null) {
|
|
229825
|
+
finalNode.style.opacity = originalOpacity;
|
|
229826
|
+
}
|
|
229827
|
+
};
|
|
229828
|
+
|
|
229829
|
+
return;
|
|
229830
|
+
}
|
|
229831
|
+
}
|
|
229832
|
+
}
|
|
229833
|
+
|
|
229834
|
+
setDropAnimationComplete(true);
|
|
229835
|
+
}, [animate, activeId, adjustScale, draggableNodes, duration, easing, dragSourceOpacity, node, transform]);
|
|
229836
|
+
useIsomorphicLayoutEffect$a(() => {
|
|
229837
|
+
if (dropAnimationComplete) {
|
|
229838
|
+
setDropAnimationComplete(false);
|
|
229839
|
+
}
|
|
229840
|
+
}, [dropAnimationComplete]);
|
|
229841
|
+
return dropAnimationComplete;
|
|
229842
|
+
}
|
|
229843
|
+
|
|
229844
|
+
const defaultTransform = {
|
|
229845
|
+
x: 0,
|
|
229846
|
+
y: 0,
|
|
229847
|
+
scaleX: 1,
|
|
229848
|
+
scaleY: 1
|
|
229849
|
+
};
|
|
229850
|
+
|
|
229851
|
+
const defaultTransition = activatorEvent => {
|
|
229852
|
+
const isKeyboardActivator = isKeyboardEvent(activatorEvent);
|
|
229853
|
+
return isKeyboardActivator ? 'transform 250ms ease' : undefined;
|
|
229854
|
+
};
|
|
229855
|
+
|
|
229856
|
+
const DragOverlay = /*#__PURE__*/React__default['default'].memo(({
|
|
229857
|
+
adjustScale = false,
|
|
229858
|
+
children,
|
|
229859
|
+
dropAnimation = defaultDropAnimation,
|
|
229860
|
+
style: styleProp,
|
|
229861
|
+
transition = defaultTransition,
|
|
229862
|
+
modifiers,
|
|
229863
|
+
wrapperElement = 'div',
|
|
229864
|
+
className,
|
|
229865
|
+
zIndex = 999
|
|
229866
|
+
}) => {
|
|
229867
|
+
var _active$id, _attributesSnapshot$c;
|
|
229868
|
+
|
|
229869
|
+
const {
|
|
229870
|
+
active,
|
|
229871
|
+
activeNodeRect,
|
|
229872
|
+
containerNodeRect,
|
|
229873
|
+
draggableNodes,
|
|
229874
|
+
activatorEvent,
|
|
229875
|
+
over,
|
|
229876
|
+
dragOverlay,
|
|
229877
|
+
scrollableAncestors,
|
|
229878
|
+
scrollableAncestorRects,
|
|
229879
|
+
windowRect
|
|
229880
|
+
} = useDndContext();
|
|
229881
|
+
const transform = React.useContext(ActiveDraggableContext);
|
|
229882
|
+
const modifiedTransform = applyModifiers(modifiers, {
|
|
229883
|
+
activatorEvent,
|
|
229884
|
+
active,
|
|
229885
|
+
activeNodeRect,
|
|
229886
|
+
containerNodeRect,
|
|
229887
|
+
draggingNodeRect: dragOverlay.rect,
|
|
229888
|
+
over,
|
|
229889
|
+
overlayNodeRect: dragOverlay.rect,
|
|
229890
|
+
scrollableAncestors,
|
|
229891
|
+
scrollableAncestorRects,
|
|
229892
|
+
transform,
|
|
229893
|
+
windowRect
|
|
229894
|
+
});
|
|
229895
|
+
const isDragging = active !== null;
|
|
229896
|
+
const finalTransform = adjustScale ? modifiedTransform : { ...modifiedTransform,
|
|
229897
|
+
scaleX: 1,
|
|
229898
|
+
scaleY: 1
|
|
229899
|
+
};
|
|
229900
|
+
const initialRect = useLazyMemo(previousValue => {
|
|
229901
|
+
if (isDragging) {
|
|
229902
|
+
if (previousValue) {
|
|
229903
|
+
return previousValue;
|
|
229904
|
+
}
|
|
229905
|
+
|
|
229906
|
+
if (!activeNodeRect) {
|
|
229907
|
+
return null;
|
|
229908
|
+
}
|
|
229909
|
+
|
|
229910
|
+
return { ...activeNodeRect
|
|
229911
|
+
};
|
|
229912
|
+
}
|
|
229913
|
+
|
|
229914
|
+
return null;
|
|
229915
|
+
}, [isDragging, activeNodeRect]);
|
|
229916
|
+
const style = initialRect ? {
|
|
229917
|
+
position: 'fixed',
|
|
229918
|
+
width: initialRect.width,
|
|
229919
|
+
height: initialRect.height,
|
|
229920
|
+
top: initialRect.top,
|
|
229921
|
+
left: initialRect.left,
|
|
229922
|
+
zIndex,
|
|
229923
|
+
transform: CSS.Transform.toString(finalTransform),
|
|
229924
|
+
touchAction: 'none',
|
|
229925
|
+
transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, initialRect) : undefined,
|
|
229926
|
+
transition: typeof transition === 'function' ? transition(activatorEvent) : transition,
|
|
229927
|
+
...styleProp
|
|
229928
|
+
} : undefined;
|
|
229929
|
+
const attributes = isDragging ? {
|
|
229930
|
+
style,
|
|
229931
|
+
children,
|
|
229932
|
+
className,
|
|
229933
|
+
transform: finalTransform
|
|
229934
|
+
} : undefined;
|
|
229935
|
+
const attributesSnapshot = React.useRef(attributes);
|
|
229936
|
+
const derivedAttributes = attributes != null ? attributes : attributesSnapshot.current;
|
|
229937
|
+
const {
|
|
229938
|
+
children: finalChildren,
|
|
229939
|
+
transform: _,
|
|
229940
|
+
...otherAttributes
|
|
229941
|
+
} = derivedAttributes != null ? derivedAttributes : {};
|
|
229942
|
+
const prevActiveId = React.useRef((_active$id = active == null ? void 0 : active.id) != null ? _active$id : null);
|
|
229943
|
+
const dropAnimationComplete = useDropAnimation({
|
|
229944
|
+
animate: Boolean(dropAnimation && prevActiveId.current && !active),
|
|
229945
|
+
adjustScale,
|
|
229946
|
+
activeId: prevActiveId.current,
|
|
229947
|
+
draggableNodes,
|
|
229948
|
+
duration: dropAnimation == null ? void 0 : dropAnimation.duration,
|
|
229949
|
+
easing: dropAnimation == null ? void 0 : dropAnimation.easing,
|
|
229950
|
+
dragSourceOpacity: dropAnimation == null ? void 0 : dropAnimation.dragSourceOpacity,
|
|
229951
|
+
node: dragOverlay.nodeRef.current,
|
|
229952
|
+
transform: (_attributesSnapshot$c = attributesSnapshot.current) == null ? void 0 : _attributesSnapshot$c.transform
|
|
229953
|
+
});
|
|
229954
|
+
const shouldRender = Boolean(finalChildren && (children || dropAnimation && !dropAnimationComplete));
|
|
229955
|
+
React.useEffect(() => {
|
|
229956
|
+
if ((active == null ? void 0 : active.id) !== prevActiveId.current) {
|
|
229957
|
+
var _active$id2;
|
|
229958
|
+
|
|
229959
|
+
prevActiveId.current = (_active$id2 = active == null ? void 0 : active.id) != null ? _active$id2 : null;
|
|
229960
|
+
}
|
|
229961
|
+
|
|
229962
|
+
if (active && attributesSnapshot.current !== attributes) {
|
|
229963
|
+
attributesSnapshot.current = attributes;
|
|
229964
|
+
}
|
|
229965
|
+
}, [active, attributes]);
|
|
229966
|
+
React.useEffect(() => {
|
|
229967
|
+
if (dropAnimationComplete) {
|
|
229968
|
+
attributesSnapshot.current = undefined;
|
|
229969
|
+
}
|
|
229970
|
+
}, [dropAnimationComplete]);
|
|
229971
|
+
|
|
229972
|
+
if (!shouldRender) {
|
|
229973
|
+
return null;
|
|
229974
|
+
}
|
|
229975
|
+
|
|
229976
|
+
return React__default['default'].createElement(InternalContext.Provider, {
|
|
229977
|
+
value: defaultInternalContext
|
|
229978
|
+
}, React__default['default'].createElement(ActiveDraggableContext.Provider, {
|
|
229979
|
+
value: defaultTransform
|
|
229980
|
+
}, React__default['default'].createElement(wrapperElement, { ...otherAttributes,
|
|
229981
|
+
ref: dragOverlay.setRef
|
|
229982
|
+
}, finalChildren)));
|
|
229983
|
+
});
|
|
229984
|
+
|
|
229635
229985
|
/**
|
|
229636
229986
|
* Move an array item to a different position. Returns a new array with the item moved to the new position.
|
|
229637
229987
|
*/
|
|
@@ -229921,7 +230271,7 @@
|
|
|
229921
230271
|
|
|
229922
230272
|
return newIndex !== index && containerId === previousContainerId;
|
|
229923
230273
|
};
|
|
229924
|
-
const defaultTransition = {
|
|
230274
|
+
const defaultTransition$1 = {
|
|
229925
230275
|
duration: 200,
|
|
229926
230276
|
easing: 'ease'
|
|
229927
230277
|
};
|
|
@@ -229992,7 +230342,7 @@
|
|
|
229992
230342
|
id,
|
|
229993
230343
|
strategy: localStrategy,
|
|
229994
230344
|
resizeObserverConfig,
|
|
229995
|
-
transition = defaultTransition
|
|
230345
|
+
transition = defaultTransition$1
|
|
229996
230346
|
}) {
|
|
229997
230347
|
const {
|
|
229998
230348
|
items,
|
|
@@ -288270,7 +288620,7 @@
|
|
|
288270
288620
|
|
|
288271
288621
|
LMRadio.Button = Radio$1.Button;
|
|
288272
288622
|
|
|
288273
|
-
var _excluded$2h = ["children", "className", "size", "disabled", "dropdownClassName", "options", "value", "defaultLabel"];
|
|
288623
|
+
var _excluded$2h = ["children", "className", "size", "disabled", "dropdownClassName", "options", "value", "defaultLabel", "suffix", "icon", "iconClick"];
|
|
288274
288624
|
var prefixCls$7 = 'lm_select';
|
|
288275
288625
|
var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
288276
288626
|
var children = props.children,
|
|
@@ -288281,6 +288631,9 @@
|
|
|
288281
288631
|
options = props.options,
|
|
288282
288632
|
value = props.value,
|
|
288283
288633
|
defaultLabel = props.defaultLabel,
|
|
288634
|
+
suffix = props.suffix,
|
|
288635
|
+
icon = props.icon,
|
|
288636
|
+
iconClick = props.iconClick,
|
|
288284
288637
|
rest = _objectWithoutProperties$1(props, _excluded$2h); // ===================== Size =====================
|
|
288285
288638
|
|
|
288286
288639
|
|
|
@@ -288319,6 +288672,29 @@
|
|
|
288319
288672
|
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
288320
288673
|
return value;
|
|
288321
288674
|
}, [value, defaultLabel, hasOption]);
|
|
288675
|
+
|
|
288676
|
+
if (icon) {
|
|
288677
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
288678
|
+
className: 'lm_select_has_icon',
|
|
288679
|
+
style: props.style
|
|
288680
|
+
}, /*#__PURE__*/React__default['default'].createElement(Select$2, _objectSpread(_objectSpread({
|
|
288681
|
+
className: classnames(className, prefixCls$7),
|
|
288682
|
+
size: size,
|
|
288683
|
+
ref: ref,
|
|
288684
|
+
value: resetValue,
|
|
288685
|
+
options: options,
|
|
288686
|
+
disabled: mergedDisabled || undefined
|
|
288687
|
+
}, rest), {}, {
|
|
288688
|
+
dropdownClassName: classnames('lm_select_dropdown', dropdownClassName)
|
|
288689
|
+
}), children), /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
288690
|
+
size: size,
|
|
288691
|
+
onClick: iconClick,
|
|
288692
|
+
className: 'lm_select_icon_button',
|
|
288693
|
+
disabled: mergedDisabled || undefined,
|
|
288694
|
+
icon: icon
|
|
288695
|
+
}));
|
|
288696
|
+
}
|
|
288697
|
+
|
|
288322
288698
|
return /*#__PURE__*/React__default['default'].createElement(Select$2, _objectSpread(_objectSpread({
|
|
288323
288699
|
className: classnames(className, prefixCls$7),
|
|
288324
288700
|
size: size,
|
|
@@ -312511,7 +312887,8 @@
|
|
|
312511
312887
|
var children = _ref.children,
|
|
312512
312888
|
props = _objectWithoutProperties$1(_ref, _excluded$2S);
|
|
312513
312889
|
|
|
312514
|
-
|
|
312890
|
+
var rProps = lodash.omit(_objectSpread(_objectSpread({}, props), children.props), ['isSticky', 'colStart', 'colEnd', 'prefixCls', 'fixLeft', 'fixRight', 'lastFixLeft', 'firstFixRight', 'lastFixRight', 'firstFixLeft', 'isSticky', 'additionalProps', 'rowType']);
|
|
312891
|
+
return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread(_objectSpread({}, rProps), {}, {
|
|
312515
312892
|
ref: ref
|
|
312516
312893
|
})); // <th {...props} ref={ref as any}>
|
|
312517
312894
|
// {/* {(children as any)?.props?.children || children} */}
|
|
@@ -312618,7 +312995,7 @@
|
|
|
312618
312995
|
|
|
312619
312996
|
return _objectSpread(_objectSpread({}, v), {}, _defineProperty$1({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
|
|
312620
312997
|
});
|
|
312621
|
-
return res;
|
|
312998
|
+
return res || [];
|
|
312622
312999
|
}
|
|
312623
313000
|
function getExpandStatus(children) {
|
|
312624
313001
|
var _children$2, _children$2$props, _children$2$props$chi, _children$2$props$chi2, _children$2$props$chi3;
|
|
@@ -313131,8 +313508,7 @@
|
|
|
313131
313508
|
|
|
313132
313509
|
case 'inputRange':
|
|
313133
313510
|
return /*#__PURE__*/React__default['default'].createElement(InputRange$1, _objectSpread(_objectSpread({
|
|
313134
|
-
onChange: handleFormItemChange
|
|
313135
|
-
ref: inputRef
|
|
313511
|
+
onChange: handleFormItemChange
|
|
313136
313512
|
}, resultComponentProps), {}, {
|
|
313137
313513
|
record: record,
|
|
313138
313514
|
rowIndex: rowIndex,
|
|
@@ -313225,7 +313601,6 @@
|
|
|
313225
313601
|
return /*#__PURE__*/React__default['default'].createElement(Opetate$1, _objectSpread({
|
|
313226
313602
|
record: record,
|
|
313227
313603
|
rowKey: rowKey,
|
|
313228
|
-
ref: inputRef,
|
|
313229
313604
|
handleAdd: handleTableRowAdd,
|
|
313230
313605
|
handleDelete: handleTableRowDelete,
|
|
313231
313606
|
getLength: getLength,
|
|
@@ -313354,6 +313729,8 @@
|
|
|
313354
313729
|
return lodash.isEqual(p, n);
|
|
313355
313730
|
});
|
|
313356
313731
|
var EditTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
313732
|
+
var _localRowSelectList$s2;
|
|
313733
|
+
|
|
313357
313734
|
var defaultData = props.value,
|
|
313358
313735
|
columns = props.columns,
|
|
313359
313736
|
isEdit = props.isEdit,
|
|
@@ -313394,19 +313771,31 @@
|
|
|
313394
313771
|
var _useState7 = React.useState({}),
|
|
313395
313772
|
_useState8 = _slicedToArray$1(_useState7, 2),
|
|
313396
313773
|
_valid = _useState8[0],
|
|
313397
|
-
setValid = _useState8[1];
|
|
313774
|
+
setValid = _useState8[1]; // const [localRowSelectList, setLocalRowSelectList] = useState([])
|
|
313398
313775
|
|
|
313399
|
-
|
|
313400
|
-
|
|
313401
|
-
|
|
313402
|
-
|
|
313776
|
+
|
|
313777
|
+
var transformRowSelect = function transformRowSelect(selectedRowKeys, selectedRows, info) {
|
|
313778
|
+
var _rowSelection$onChang;
|
|
313779
|
+
|
|
313780
|
+
return rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onChang = rowSelection.onChange) === null || _rowSelection$onChang === void 0 ? void 0 : _rowSelection$onChang.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
313781
|
+
};
|
|
313782
|
+
|
|
313783
|
+
var _useControllableValue3 = useControllableValue({
|
|
313784
|
+
value: {
|
|
313785
|
+
selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || []
|
|
313786
|
+
},
|
|
313787
|
+
onChange: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) ? transformRowSelect : undefined
|
|
313788
|
+
}),
|
|
313789
|
+
_useControllableValue4 = _slicedToArray$1(_useControllableValue3, 2),
|
|
313790
|
+
localRowSelectList = _useControllableValue4[0],
|
|
313791
|
+
setLocalRowSelectList = _useControllableValue4[1];
|
|
313403
313792
|
/** 当前展开的列 */
|
|
313404
313793
|
|
|
313405
313794
|
|
|
313406
|
-
var
|
|
313407
|
-
|
|
313408
|
-
expandedRowKeys =
|
|
313409
|
-
setExpandedRowKeys =
|
|
313795
|
+
var _useState9 = React.useState([]),
|
|
313796
|
+
_useState10 = _slicedToArray$1(_useState9, 2),
|
|
313797
|
+
expandedRowKeys = _useState10[0],
|
|
313798
|
+
setExpandedRowKeys = _useState10[1];
|
|
313410
313799
|
|
|
313411
313800
|
var dataSourceRef = React.useRef(dataSource);
|
|
313412
313801
|
var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
|
|
@@ -313450,25 +313839,20 @@
|
|
|
313450
313839
|
setDataSource(res); // onChange?.(res)
|
|
313451
313840
|
};
|
|
313452
313841
|
/** 本地缓存一个选择数据 */
|
|
313842
|
+
// useEffect(() => {
|
|
313843
|
+
// if (rowSelection) {
|
|
313844
|
+
// const { selectedRowKeys } = rowSelection
|
|
313845
|
+
// if (selectedRowKeys) {
|
|
313846
|
+
// setLocalRowSelectList(localRowSelectList || [])
|
|
313847
|
+
// }
|
|
313848
|
+
// }
|
|
313849
|
+
// }, [rowSelection])
|
|
313850
|
+
// const editTableRowChange = (selectRows) => {
|
|
313851
|
+
// setLocalRowSelectList(selectRows)
|
|
313852
|
+
// ;(rowSelection?.onChange as any)?.(selectRows)
|
|
313853
|
+
// }
|
|
313453
313854
|
|
|
313454
313855
|
|
|
313455
|
-
React.useEffect(function () {
|
|
313456
|
-
if (rowSelection) {
|
|
313457
|
-
var selectedRowKeys = rowSelection.selectedRowKeys;
|
|
313458
|
-
|
|
313459
|
-
if (selectedRowKeys) {
|
|
313460
|
-
setLocalRowSelectList(localRowSelectList || []);
|
|
313461
|
-
}
|
|
313462
|
-
}
|
|
313463
|
-
}, [rowSelection]);
|
|
313464
|
-
|
|
313465
|
-
var editTableRowChange = function editTableRowChange(selectRows) {
|
|
313466
|
-
var _rowSelection$onChang;
|
|
313467
|
-
|
|
313468
|
-
setLocalRowSelectList(selectRows);
|
|
313469
|
-
rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onChang = rowSelection.onChange) === null || _rowSelection$onChang === void 0 ? void 0 : _rowSelection$onChang.call(rowSelection, selectRows);
|
|
313470
|
-
};
|
|
313471
|
-
|
|
313472
313856
|
var handleSave = function handleSave(row, options) {
|
|
313473
313857
|
var _deepDataSourceRef$cu, _deepDataSourceRef$cu2;
|
|
313474
313858
|
|
|
@@ -313558,7 +313942,8 @@
|
|
|
313558
313942
|
var handleTableRowDelete = function handleTableRowDelete(key) {
|
|
313559
313943
|
var _deepDataSourceRef$cu3, _deepDataSourceRef$cu4;
|
|
313560
313944
|
|
|
313561
|
-
var
|
|
313945
|
+
var rkey = lodash.isObject(key) ? key[_rowKey] : key;
|
|
313946
|
+
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu3 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu3 === void 0 ? void 0 : (_deepDataSourceRef$cu4 = _deepDataSourceRef$cu3[rkey]) === null || _deepDataSourceRef$cu4 === void 0 ? void 0 : _deepDataSourceRef$cu4.preKeys;
|
|
313562
313947
|
|
|
313563
313948
|
if (preKeys.length > 1) {
|
|
313564
313949
|
/** 说明删除的是children中的数据 */
|
|
@@ -313604,28 +313989,29 @@
|
|
|
313604
313989
|
/** 快捷添加 */
|
|
313605
313990
|
|
|
313606
313991
|
|
|
313607
|
-
var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren) {
|
|
313992
|
+
var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren, defaultRecord) {
|
|
313608
313993
|
var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
|
|
313609
313994
|
|
|
313610
|
-
var
|
|
313995
|
+
var rkey = lodash.isObject(record) ? record[_rowKey] : record;
|
|
313996
|
+
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu5 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu5 === void 0 ? void 0 : (_deepDataSourceRef$cu6 = _deepDataSourceRef$cu5[rkey]) === null || _deepDataSourceRef$cu6 === void 0 ? void 0 : _deepDataSourceRef$cu6.preKeys;
|
|
313611
313997
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
313612
313998
|
if (preKeys.length > 1) {
|
|
313613
313999
|
var deeps = function deeps(children) {
|
|
313614
314000
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
313615
314001
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
313616
|
-
if (item[_rowKey] ===
|
|
314002
|
+
if (item[_rowKey] === rkey) {
|
|
313617
314003
|
if (isAppendInChindren) {
|
|
313618
314004
|
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
313619
314005
|
var _item$children;
|
|
313620
314006
|
|
|
313621
|
-
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())));
|
|
314007
|
+
item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.push(defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313622
314008
|
} else {
|
|
313623
|
-
item.children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
314009
|
+
item.children = [defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
313624
314010
|
}
|
|
313625
314011
|
|
|
313626
314012
|
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [item[_rowKey]]));
|
|
313627
314013
|
} else {
|
|
313628
|
-
children.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314014
|
+
children.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
313629
314015
|
}
|
|
313630
314016
|
} else if (item.children) {
|
|
313631
314017
|
deeps(item.children);
|
|
@@ -313637,7 +314023,7 @@
|
|
|
313637
314023
|
deeps(draft);
|
|
313638
314024
|
} else {
|
|
313639
314025
|
var index = draft.findIndex(function (item) {
|
|
313640
|
-
return
|
|
314026
|
+
return rkey === item[_rowKey];
|
|
313641
314027
|
});
|
|
313642
314028
|
|
|
313643
314029
|
if (index !== -1) {
|
|
@@ -313659,6 +314045,7 @@
|
|
|
313659
314045
|
}
|
|
313660
314046
|
}
|
|
313661
314047
|
});
|
|
314048
|
+
console.log(preKeys, '--preKeys', res);
|
|
313662
314049
|
setDataSource(res);
|
|
313663
314050
|
};
|
|
313664
314051
|
|
|
@@ -313694,9 +314081,9 @@
|
|
|
313694
314081
|
|
|
313695
314082
|
var DisableOptions = React.useMemo(function () {
|
|
313696
314083
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
313697
|
-
var
|
|
313698
|
-
optionOnly =
|
|
313699
|
-
options =
|
|
314084
|
+
var _ref10 = item.componentProps || {},
|
|
314085
|
+
optionOnly = _ref10.optionOnly,
|
|
314086
|
+
options = _ref10.options;
|
|
313700
314087
|
|
|
313701
314088
|
if (optionOnly && options) {
|
|
313702
314089
|
var dataIndex = item.dataIndex;
|
|
@@ -313725,7 +314112,7 @@
|
|
|
313725
314112
|
/** 组装之后的最终columns */
|
|
313726
314113
|
|
|
313727
314114
|
var resultColumns = React.useMemo(function () {
|
|
313728
|
-
var _localColumns;
|
|
314115
|
+
var _localColumns, _localColumns2, _localColumns3;
|
|
313729
314116
|
|
|
313730
314117
|
var rColumns = hasDisableOptions ? DisableOptions : columns;
|
|
313731
314118
|
var localColumns = [sortOpen ? {
|
|
@@ -313771,7 +314158,7 @@
|
|
|
313771
314158
|
} : null]).filter(function (item) {
|
|
313772
314159
|
return item;
|
|
313773
314160
|
});
|
|
313774
|
-
localColumns = localColumns.map(function (item, index) {
|
|
314161
|
+
localColumns = (_localColumns = localColumns) === null || _localColumns === void 0 ? void 0 : _localColumns.map(function (item, index) {
|
|
313775
314162
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
313776
314163
|
order: [null, undefined].includes(item.order) ? index : item.order
|
|
313777
314164
|
});
|
|
@@ -313781,7 +314168,7 @@
|
|
|
313781
314168
|
var leftColumns = [];
|
|
313782
314169
|
var mainColumns = [];
|
|
313783
314170
|
var rightColumns = [];
|
|
313784
|
-
(
|
|
314171
|
+
(_localColumns2 = localColumns) === null || _localColumns2 === void 0 ? void 0 : _localColumns2.forEach(function (item) {
|
|
313785
314172
|
if ((item === null || item === void 0 ? void 0 : item.fixed) === 'left') {
|
|
313786
314173
|
leftColumns.push(item);
|
|
313787
314174
|
} else if ((item === null || item === void 0 ? void 0 : item.fixed) === 'right') {
|
|
@@ -313845,7 +314232,7 @@
|
|
|
313845
314232
|
return newCol;
|
|
313846
314233
|
};
|
|
313847
314234
|
|
|
313848
|
-
var res = localColumns.map(function (col, index) {
|
|
314235
|
+
var res = (_localColumns3 = localColumns) === null || _localColumns3 === void 0 ? void 0 : _localColumns3.map(function (col, index) {
|
|
313849
314236
|
return mapColumns(col, index);
|
|
313850
314237
|
});
|
|
313851
314238
|
return res;
|
|
@@ -313863,10 +314250,10 @@
|
|
|
313863
314250
|
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
313864
314251
|
};
|
|
313865
314252
|
|
|
313866
|
-
var colDraggableContainer = React.useCallback(function (
|
|
314253
|
+
var colDraggableContainer = React.useCallback(function (_ref11) {
|
|
313867
314254
|
var _React$Children;
|
|
313868
314255
|
|
|
313869
|
-
var props = _extends$2({},
|
|
314256
|
+
var props = _extends$2({}, _ref11);
|
|
313870
314257
|
|
|
313871
314258
|
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) {
|
|
313872
314259
|
var _child$props, _child$props$column;
|
|
@@ -313883,6 +314270,25 @@
|
|
|
313883
314270
|
React.useImperativeHandle(ref, function () {
|
|
313884
314271
|
return {
|
|
313885
314272
|
setRow: handleSave,
|
|
314273
|
+
getCheckboxRecords: function getCheckboxRecords() {
|
|
314274
|
+
return localRowSelectList.selectedRows;
|
|
314275
|
+
},
|
|
314276
|
+
deleteRowData: function deleteRowData(data) {
|
|
314277
|
+
return handleTableRowDelete(data);
|
|
314278
|
+
},
|
|
314279
|
+
addRowData: function addRowData(data, addInChind, defaultValue) {
|
|
314280
|
+
return handleTableRowAdd(data, addInChind, defaultValue);
|
|
314281
|
+
},
|
|
314282
|
+
clearSelect: function clearSelect() {
|
|
314283
|
+
setLocalRowSelectList({
|
|
314284
|
+
selectedRows: []
|
|
314285
|
+
});
|
|
314286
|
+
},
|
|
314287
|
+
customSetCheckboxRecords: function customSetCheckboxRecords(value) {
|
|
314288
|
+
setLocalRowSelectList({
|
|
314289
|
+
selectedRows: value
|
|
314290
|
+
});
|
|
314291
|
+
},
|
|
313886
314292
|
valid: function valid() {
|
|
313887
314293
|
return _valid;
|
|
313888
314294
|
}
|
|
@@ -313933,6 +314339,8 @@
|
|
|
313933
314339
|
}, resetProps));
|
|
313934
314340
|
|
|
313935
314341
|
if (colSortOpen) {
|
|
314342
|
+
var _localRowSelectList$s;
|
|
314343
|
+
|
|
313936
314344
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
313937
314345
|
className: "lm_editTable_warpper"
|
|
313938
314346
|
}, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
|
|
@@ -313948,17 +314356,18 @@
|
|
|
313948
314356
|
bordered: true,
|
|
313949
314357
|
pagination: false,
|
|
313950
314358
|
// components={tableComponents}
|
|
313951
|
-
rowSelection: !rowSelection ? undefined : {
|
|
314359
|
+
rowSelection: !rowSelection ? undefined : _objectSpread(_objectSpread({
|
|
313952
314360
|
fixed: true,
|
|
313953
314361
|
type: 'checkbox',
|
|
313954
|
-
columnWidth: 36
|
|
313955
|
-
|
|
313956
|
-
|
|
314362
|
+
columnWidth: 36
|
|
314363
|
+
}, rowSelection), {}, {
|
|
314364
|
+
selectedRowKeys: localRowSelectList === null || localRowSelectList === void 0 ? void 0 : (_localRowSelectList$s = localRowSelectList.selectedRows) === null || _localRowSelectList$s === void 0 ? void 0 : _localRowSelectList$s.map(function (v) {
|
|
314365
|
+
return lodash.isObject(v) ? v[_rowKey] : v;
|
|
313957
314366
|
}),
|
|
313958
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
313959
|
-
|
|
314367
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
314368
|
+
setLocalRowSelectList(selectedRowKeys, selectedRows, info);
|
|
313960
314369
|
}
|
|
313961
|
-
},
|
|
314370
|
+
}),
|
|
313962
314371
|
dataSource: dataSource
|
|
313963
314372
|
})))), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
313964
314373
|
className: "lm_editTable_add_bar",
|
|
@@ -313989,17 +314398,18 @@
|
|
|
313989
314398
|
return setExpandedRowKeys(expandedRows);
|
|
313990
314399
|
}
|
|
313991
314400
|
},
|
|
313992
|
-
rowSelection: !rowSelection ? undefined : {
|
|
314401
|
+
rowSelection: !rowSelection ? undefined : _objectSpread(_objectSpread({
|
|
313993
314402
|
fixed: true,
|
|
313994
314403
|
type: 'checkbox',
|
|
313995
|
-
columnWidth: 36
|
|
313996
|
-
|
|
313997
|
-
|
|
314404
|
+
columnWidth: 36
|
|
314405
|
+
}, rowSelection), {}, {
|
|
314406
|
+
selectedRowKeys: localRowSelectList === null || localRowSelectList === void 0 ? void 0 : (_localRowSelectList$s2 = localRowSelectList.selectedRows) === null || _localRowSelectList$s2 === void 0 ? void 0 : _localRowSelectList$s2.map(function (v) {
|
|
314407
|
+
return lodash.isObject(v) ? v[_rowKey] : v;
|
|
313998
314408
|
}),
|
|
313999
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
314000
|
-
|
|
314409
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
314410
|
+
setLocalRowSelectList(selectedRowKeys, selectedRows, info);
|
|
314001
314411
|
}
|
|
314002
|
-
},
|
|
314412
|
+
}),
|
|
314003
314413
|
dataSource: dataSource
|
|
314004
314414
|
})), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
314005
314415
|
className: "lm_editTable_add_bar",
|
|
@@ -314043,7 +314453,8 @@
|
|
|
314043
314453
|
top = _props$top === void 0 ? '104px' : _props$top,
|
|
314044
314454
|
_props$menuData = props.menuData,
|
|
314045
314455
|
menuData = _props$menuData === void 0 ? [] : _props$menuData,
|
|
314046
|
-
warpElement = props.warpElement
|
|
314456
|
+
warpElement = props.warpElement,
|
|
314457
|
+
root = props.root;
|
|
314047
314458
|
var idTopInfo = React.useRef({});
|
|
314048
314459
|
|
|
314049
314460
|
var _useState = React.useState(false),
|
|
@@ -314062,6 +314473,11 @@
|
|
|
314062
314473
|
var scroll = useScroll(getTargetElement$1(warpElement || document), function () {
|
|
314063
314474
|
return scrollOpenStatus;
|
|
314064
314475
|
});
|
|
314476
|
+
var filterMenuData = React.useMemo(function () {
|
|
314477
|
+
return menuData === null || menuData === void 0 ? void 0 : menuData.filter(function (item) {
|
|
314478
|
+
return item.hidden !== true;
|
|
314479
|
+
});
|
|
314480
|
+
}, [menuData]);
|
|
314065
314481
|
|
|
314066
314482
|
function clearActiveToc() {
|
|
314067
314483
|
[].forEach.call(document.querySelectorAll('.lm_menu_list li a'), function (node) {
|
|
@@ -314087,7 +314503,7 @@
|
|
|
314087
314503
|
(_menuTimeEventRef$cur = menuTimeEventRef.current) === null || _menuTimeEventRef$cur === void 0 ? void 0 : _menuTimeEventRef$cur.destroy();
|
|
314088
314504
|
}
|
|
314089
314505
|
|
|
314090
|
-
if (!
|
|
314506
|
+
if (!filterMenuData.length) {
|
|
314091
314507
|
return;
|
|
314092
314508
|
} // eslint-disable-next-line global-require
|
|
314093
314509
|
|
|
@@ -314098,12 +314514,13 @@
|
|
|
314098
314514
|
var scrollama = require('scrollama');
|
|
314099
314515
|
|
|
314100
314516
|
menuTimeEventRef.current = scrollama();
|
|
314517
|
+
console.log(getTargetElement$1(warpElement || document), '--getTargetElement(warpElement || document)');
|
|
314101
314518
|
(_menuTimeEventRef$cur2 = menuTimeEventRef.current) === null || _menuTimeEventRef$cur2 === void 0 ? void 0 : (_menuTimeEventRef$cur3 = _menuTimeEventRef$cur2.setup({
|
|
314102
|
-
step:
|
|
314519
|
+
step: filterMenuData.map(function (item) {
|
|
314103
314520
|
return document.getElementById("".concat(item.menuId));
|
|
314104
|
-
}).filter(Boolean)
|
|
314105
|
-
|
|
314106
|
-
|
|
314521
|
+
}).filter(Boolean),
|
|
314522
|
+
container: getTargetElement$1(warpElement || document),
|
|
314523
|
+
root: root ? getTargetElement$1(root) : undefined
|
|
314107
314524
|
})) === null || _menuTimeEventRef$cur3 === void 0 ? void 0 : _menuTimeEventRef$cur3.onStepEnter(function (_ref) {
|
|
314108
314525
|
var element = _ref.element;
|
|
314109
314526
|
updateActiveToc(element.id);
|
|
@@ -314111,7 +314528,7 @@
|
|
|
314111
314528
|
};
|
|
314112
314529
|
|
|
314113
314530
|
function setKeysDom() {
|
|
314114
|
-
|
|
314531
|
+
filterMenuData.forEach(function (item) {
|
|
314115
314532
|
var _getTargetElement, _document$getElementB;
|
|
314116
314533
|
|
|
314117
314534
|
var warpTop = ((_getTargetElement = getTargetElement$1(warpElement || document)) === null || _getTargetElement === void 0 ? void 0 : _getTargetElement.offsetTop) || 0;
|
|
@@ -314135,12 +314552,6 @@
|
|
|
314135
314552
|
wait: 50
|
|
314136
314553
|
});
|
|
314137
314554
|
|
|
314138
|
-
var bindDom = function bindDom() {
|
|
314139
|
-
if (!Object.keys(idTopInfo.current).length) {
|
|
314140
|
-
setKeysDom();
|
|
314141
|
-
}
|
|
314142
|
-
};
|
|
314143
|
-
|
|
314144
314555
|
var handleScroll = function handleScroll() {
|
|
314145
314556
|
setScrollOpenStatus(true);
|
|
314146
314557
|
};
|
|
@@ -314155,10 +314566,6 @@
|
|
|
314155
314566
|
var _getTargetElement2;
|
|
314156
314567
|
|
|
314157
314568
|
// bindScroller();
|
|
314158
|
-
setTimeout(function () {
|
|
314159
|
-
bindDom();
|
|
314160
|
-
bindScroller();
|
|
314161
|
-
}, 200);
|
|
314162
314569
|
(_getTargetElement2 = getTargetElement$1(warpElement || document)) === null || _getTargetElement2 === void 0 ? void 0 : _getTargetElement2.addEventListener('scroll', handleScroll, {
|
|
314163
314570
|
once: true
|
|
314164
314571
|
});
|
|
@@ -314168,6 +314575,12 @@
|
|
|
314168
314575
|
(_getTargetElement3 = getTargetElement$1(warpElement || document)) === null || _getTargetElement3 === void 0 ? void 0 : _getTargetElement3.removeEventListener('scroll', handleScroll);
|
|
314169
314576
|
};
|
|
314170
314577
|
}, []);
|
|
314578
|
+
React.useEffect(function () {
|
|
314579
|
+
setTimeout(function () {
|
|
314580
|
+
setKeysDom();
|
|
314581
|
+
bindScroller();
|
|
314582
|
+
}, 200);
|
|
314583
|
+
}, [filterMenuData]);
|
|
314171
314584
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
314172
314585
|
className: classnames(prefixCls$a),
|
|
314173
314586
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -314189,7 +314602,7 @@
|
|
|
314189
314602
|
})
|
|
314190
314603
|
}), /*#__PURE__*/React__default['default'].createElement("ul", {
|
|
314191
314604
|
className: classnames('lm_menu_list', hovering && 'show', className)
|
|
314192
|
-
},
|
|
314605
|
+
}, filterMenuData.map(function (item) {
|
|
314193
314606
|
return /*#__PURE__*/React__default['default'].createElement("li", {
|
|
314194
314607
|
key: item.menuId,
|
|
314195
314608
|
onClick: function onClick() {
|
|
@@ -317024,14 +317437,22 @@
|
|
|
317024
317437
|
RefAutoComplete$1.Option = Option;
|
|
317025
317438
|
RefAutoComplete$1.AntdAutoComplete = RefAutoComplete;
|
|
317026
317439
|
|
|
317027
|
-
var _excluded$32 = ["children", "treeData", "value", "defaultLabel"];
|
|
317440
|
+
var _excluded$32 = ["children", "treeData", "value", "defaultLabel", "disabled", "size"];
|
|
317028
317441
|
var CLMTreeSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
317029
317442
|
var children = props.children,
|
|
317030
317443
|
treeData = props.treeData,
|
|
317031
317444
|
value = props.value,
|
|
317032
317445
|
defaultLabel = props.defaultLabel,
|
|
317033
|
-
|
|
317446
|
+
customDisabled = props.disabled,
|
|
317447
|
+
customizeSize = props.size,
|
|
317448
|
+
resetProps = _objectWithoutProperties$1(props, _excluded$32); // ===================== Disabled =====================
|
|
317449
|
+
|
|
317450
|
+
|
|
317451
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
317452
|
+
var mergedDisabled = customDisabled || disabled; // ===================== size =====================
|
|
317034
317453
|
|
|
317454
|
+
var size = React__default['default'].useContext(SizeContext$1);
|
|
317455
|
+
var mergeSize = customizeSize || size;
|
|
317035
317456
|
var deepChildren = React.useCallback(function (arr) {
|
|
317036
317457
|
var flag = false;
|
|
317037
317458
|
React__default['default'].Children.forEach(arr, function (child) {
|
|
@@ -317078,7 +317499,10 @@
|
|
|
317078
317499
|
}, [value, hasOption]);
|
|
317079
317500
|
return /*#__PURE__*/React__default['default'].createElement(TreeSelect$1, _objectSpread({
|
|
317080
317501
|
ref: ref,
|
|
317081
|
-
|
|
317502
|
+
className: 'lm_tree_select',
|
|
317503
|
+
value: resetValue,
|
|
317504
|
+
size: mergeSize,
|
|
317505
|
+
disabled: mergedDisabled
|
|
317082
317506
|
}, resetProps), children);
|
|
317083
317507
|
});
|
|
317084
317508
|
var LMTreeSelect = CLMTreeSelect;
|
|
@@ -321725,6 +322149,7 @@
|
|
|
321725
322149
|
var itemPrefixCls = _ref.itemPrefixCls,
|
|
321726
322150
|
component = _ref.component,
|
|
321727
322151
|
span = _ref.span,
|
|
322152
|
+
rowSpan = _ref.rowSpan,
|
|
321728
322153
|
className = _ref.className,
|
|
321729
322154
|
style = _ref.style,
|
|
321730
322155
|
labelStyle = _ref.labelStyle,
|
|
@@ -321741,7 +322166,8 @@
|
|
|
321741
322166
|
return /*#__PURE__*/React.createElement(Component, {
|
|
321742
322167
|
className: classnames((_classNames = {}, _defineProperty$1(_classNames, "".concat(itemPrefixCls, "-item-label"), notEmpty(label)), _defineProperty$1(_classNames, "".concat(itemPrefixCls, "-item-content"), notEmpty(content)), _classNames), className),
|
|
321743
322168
|
style: style,
|
|
321744
|
-
colSpan: span
|
|
322169
|
+
colSpan: span,
|
|
322170
|
+
rowSpan: rowSpan
|
|
321745
322171
|
}, notEmpty(label) && /*#__PURE__*/React.createElement("span", {
|
|
321746
322172
|
style: labelStyle
|
|
321747
322173
|
}, label), notEmpty(content) && /*#__PURE__*/React.createElement("span", {
|
|
@@ -321752,7 +322178,8 @@
|
|
|
321752
322178
|
return /*#__PURE__*/React.createElement(Component, {
|
|
321753
322179
|
className: classnames("".concat(itemPrefixCls, "-item"), className),
|
|
321754
322180
|
style: style,
|
|
321755
|
-
colSpan: span
|
|
322181
|
+
colSpan: span,
|
|
322182
|
+
rowSpan: rowSpan
|
|
321756
322183
|
}, /*#__PURE__*/React.createElement("div", {
|
|
321757
322184
|
className: "".concat(itemPrefixCls, "-item-container")
|
|
321758
322185
|
}, (label || label === 0) && /*#__PURE__*/React.createElement("span", {
|
|
@@ -321786,6 +322213,8 @@
|
|
|
321786
322213
|
contentStyle = _ref3$props.contentStyle,
|
|
321787
322214
|
_ref3$props$span = _ref3$props.span,
|
|
321788
322215
|
span = _ref3$props$span === void 0 ? 1 : _ref3$props$span,
|
|
322216
|
+
_ref3$props$rowSpan = _ref3$props.rowSpan,
|
|
322217
|
+
rowSpan = _ref3$props$rowSpan === void 0 ? 1 : _ref3$props$rowSpan,
|
|
321789
322218
|
key = _ref3.key;
|
|
321790
322219
|
|
|
321791
322220
|
if (typeof component === 'string') {
|
|
@@ -321796,6 +322225,7 @@
|
|
|
321796
322225
|
labelStyle: _objectSpread(_objectSpread({}, rootLabelStyle), labelStyle),
|
|
321797
322226
|
contentStyle: _objectSpread(_objectSpread({}, rootContentStyle), contentStyle),
|
|
321798
322227
|
span: span,
|
|
322228
|
+
rowSpan: rowSpan,
|
|
321799
322229
|
colon: colon,
|
|
321800
322230
|
component: component,
|
|
321801
322231
|
itemPrefixCls: itemPrefixCls,
|
|
@@ -321810,6 +322240,7 @@
|
|
|
321810
322240
|
className: className,
|
|
321811
322241
|
style: _objectSpread(_objectSpread(_objectSpread({}, rootLabelStyle), style), labelStyle),
|
|
321812
322242
|
span: 1,
|
|
322243
|
+
rowSpan: rowSpan,
|
|
321813
322244
|
colon: colon,
|
|
321814
322245
|
component: component[0],
|
|
321815
322246
|
itemPrefixCls: itemPrefixCls,
|
|
@@ -321820,6 +322251,7 @@
|
|
|
321820
322251
|
className: className,
|
|
321821
322252
|
style: _objectSpread(_objectSpread(_objectSpread({}, rootContentStyle), style), contentStyle),
|
|
321822
322253
|
span: span * 2 - 1,
|
|
322254
|
+
rowSpan: rowSpan,
|
|
321823
322255
|
component: component[1],
|
|
321824
322256
|
itemPrefixCls: itemPrefixCls,
|
|
321825
322257
|
bordered: bordered,
|
|
@@ -321996,9 +322428,9 @@
|
|
|
321996
322428
|
value: contextValue
|
|
321997
322429
|
}, /*#__PURE__*/React.createElement("div", {
|
|
321998
322430
|
className: classnames(prefixCls, (_classNames = {}, _defineProperty$1(_classNames, "".concat(prefixCls, "-").concat(size), size && size !== 'default'), _defineProperty$1(_classNames, "".concat(prefixCls, "-bordered"), !!bordered), _defineProperty$1(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className, 'lm_descriptions', {
|
|
321999
|
-
|
|
322000
|
-
|
|
322001
|
-
|
|
322431
|
+
lm_descriptions_default: containerType === 'default',
|
|
322432
|
+
lm_descriptions_drawer: containerType === 'drawer',
|
|
322433
|
+
lm_descriptions_modal: containerType === 'modal'
|
|
322002
322434
|
}),
|
|
322003
322435
|
style: style
|
|
322004
322436
|
}, (title || extra) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -324909,6 +325341,205 @@
|
|
|
324909
325341
|
|
|
324910
325342
|
var LmImageViewer$1 = /*#__PURE__*/React.forwardRef(LmImageViewer);
|
|
324911
325343
|
|
|
325344
|
+
var SortableItem$4 = function SortableItem(_ref) {
|
|
325345
|
+
var index = _ref.index,
|
|
325346
|
+
item = _ref.item,
|
|
325347
|
+
instance = _ref.instance;
|
|
325348
|
+
var children = instance.children,
|
|
325349
|
+
rowKey = instance.rowKey;
|
|
325350
|
+
|
|
325351
|
+
var _useSortable = useSortable({
|
|
325352
|
+
id: item[rowKey] || index,
|
|
325353
|
+
data: {
|
|
325354
|
+
item: item
|
|
325355
|
+
}
|
|
325356
|
+
}),
|
|
325357
|
+
attributes = _useSortable.attributes,
|
|
325358
|
+
listeners = _useSortable.listeners,
|
|
325359
|
+
setNodeRef = _useSortable.setNodeRef,
|
|
325360
|
+
transform = _useSortable.transform,
|
|
325361
|
+
transition = _useSortable.transition;
|
|
325362
|
+
|
|
325363
|
+
var resetStyle = React.useMemo(function () {
|
|
325364
|
+
return {
|
|
325365
|
+
transform: CSS.Transform.toString(transform),
|
|
325366
|
+
transition: transition
|
|
325367
|
+
};
|
|
325368
|
+
}, [transform, transition]);
|
|
325369
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", _objectSpread({
|
|
325370
|
+
className: "lm_drag_item",
|
|
325371
|
+
ref: setNodeRef,
|
|
325372
|
+
style: resetStyle
|
|
325373
|
+
}, attributes), children === null || children === void 0 ? void 0 : children({
|
|
325374
|
+
item: item,
|
|
325375
|
+
listeners: listeners,
|
|
325376
|
+
index: index
|
|
325377
|
+
})));
|
|
325378
|
+
};
|
|
325379
|
+
|
|
325380
|
+
var SortableItem$5 = /*#__PURE__*/React__default['default'].memo(SortableItem$4);
|
|
325381
|
+
|
|
325382
|
+
var SortableBox$3 = function SortableBox(_ref) {
|
|
325383
|
+
var instance = _ref.instance;
|
|
325384
|
+
var items = instance.items,
|
|
325385
|
+
rowKey = instance.rowKey,
|
|
325386
|
+
options = instance.options;
|
|
325387
|
+
return /*#__PURE__*/React__default['default'].createElement(SortableContext$1, {
|
|
325388
|
+
items: items,
|
|
325389
|
+
strategy: rectSortingStrategy
|
|
325390
|
+
}, options === null || options === void 0 ? void 0 : options.map(function (item, idx) {
|
|
325391
|
+
return /*#__PURE__*/React__default['default'].createElement(SortableItem$5, {
|
|
325392
|
+
instance: instance,
|
|
325393
|
+
index: idx,
|
|
325394
|
+
key: item[rowKey] || idx,
|
|
325395
|
+
item: item
|
|
325396
|
+
});
|
|
325397
|
+
}));
|
|
325398
|
+
};
|
|
325399
|
+
|
|
325400
|
+
var SortableBox$4 = /*#__PURE__*/React__default['default'].memo(SortableBox$3);
|
|
325401
|
+
|
|
325402
|
+
var DragOver = /*#__PURE__*/React__default['default'].memo(function (_ref) {
|
|
325403
|
+
var instance = _ref.instance;
|
|
325404
|
+
var isDragging = instance.isDragging,
|
|
325405
|
+
activeId = instance.activeId,
|
|
325406
|
+
rowKey = instance.rowKey,
|
|
325407
|
+
children = instance.children,
|
|
325408
|
+
options = instance.options;
|
|
325409
|
+
var item = activeId && options.find(function (v) {
|
|
325410
|
+
return v[rowKey] === activeId;
|
|
325411
|
+
});
|
|
325412
|
+
return /*#__PURE__*/React__default['default'].createElement(DragOverlay, {
|
|
325413
|
+
adjustScale: false
|
|
325414
|
+
}, isDragging ? children({
|
|
325415
|
+
item: item,
|
|
325416
|
+
listeners: {}
|
|
325417
|
+
}) : null);
|
|
325418
|
+
});
|
|
325419
|
+
/*
|
|
325420
|
+
* restrictToParentElement 拖拽限制在父元素内
|
|
325421
|
+
*/
|
|
325422
|
+
// 可拖拽容器
|
|
325423
|
+
|
|
325424
|
+
var DndContainer$3 = function DndContainer(_ref2) {
|
|
325425
|
+
var options = _ref2.options,
|
|
325426
|
+
rowKey = _ref2.rowKey,
|
|
325427
|
+
children = _ref2.children,
|
|
325428
|
+
move = _ref2.move;
|
|
325429
|
+
|
|
325430
|
+
var _React$useState = React__default['default'].useState(false),
|
|
325431
|
+
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
325432
|
+
isDragging = _React$useState2[0],
|
|
325433
|
+
setIsDragging = _React$useState2[1]; // 是否拖拽中
|
|
325434
|
+
|
|
325435
|
+
|
|
325436
|
+
var _React$useState3 = React__default['default'].useState(null),
|
|
325437
|
+
_React$useState4 = _slicedToArray$1(_React$useState3, 2),
|
|
325438
|
+
activeId = _React$useState4[0],
|
|
325439
|
+
setActiveId = _React$useState4[1]; // 是否拖拽中
|
|
325440
|
+
|
|
325441
|
+
|
|
325442
|
+
var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
325443
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
325444
|
+
}));
|
|
325445
|
+
|
|
325446
|
+
var handleMove = function handleMove(activeItem, overItem) {
|
|
325447
|
+
var fileMap = options.map(function (v) {
|
|
325448
|
+
if (v[rowKey] === activeItem[rowKey]) {
|
|
325449
|
+
return _objectSpread({}, overItem);
|
|
325450
|
+
}
|
|
325451
|
+
|
|
325452
|
+
if (v[rowKey] === overItem[rowKey]) {
|
|
325453
|
+
return _objectSpread({}, activeItem);
|
|
325454
|
+
}
|
|
325455
|
+
|
|
325456
|
+
return v;
|
|
325457
|
+
});
|
|
325458
|
+
move === null || move === void 0 ? void 0 : move(activeItem, overItem, fileMap);
|
|
325459
|
+
}; // 开始拖拽
|
|
325460
|
+
|
|
325461
|
+
|
|
325462
|
+
var handleDragStart = function handleDragStart(_ref3) {
|
|
325463
|
+
var active = _ref3.active;
|
|
325464
|
+
setIsDragging(true);
|
|
325465
|
+
|
|
325466
|
+
if (!active) {
|
|
325467
|
+
return;
|
|
325468
|
+
}
|
|
325469
|
+
|
|
325470
|
+
setActiveId(active.id);
|
|
325471
|
+
}; // 拖拽结束
|
|
325472
|
+
|
|
325473
|
+
|
|
325474
|
+
var handleDragEnd = function handleDragEnd(event) {
|
|
325475
|
+
var active = event.active,
|
|
325476
|
+
over = event.over;
|
|
325477
|
+
setActiveId(null); // 未移入时触发
|
|
325478
|
+
|
|
325479
|
+
if (!(over === null || over === void 0 ? void 0 : over.id)) {
|
|
325480
|
+
return;
|
|
325481
|
+
} // 移入时触发更新数据
|
|
325482
|
+
|
|
325483
|
+
|
|
325484
|
+
if (active.id !== over.id) {
|
|
325485
|
+
handleMove(active.data.current.item, over.data.current.item);
|
|
325486
|
+
}
|
|
325487
|
+
};
|
|
325488
|
+
|
|
325489
|
+
var instance = {
|
|
325490
|
+
isDragging: isDragging,
|
|
325491
|
+
activeId: activeId,
|
|
325492
|
+
options: options,
|
|
325493
|
+
rowKey: rowKey,
|
|
325494
|
+
children: children,
|
|
325495
|
+
move: move,
|
|
325496
|
+
items: options === null || options === void 0 ? void 0 : options.map(function (v) {
|
|
325497
|
+
return v[rowKey];
|
|
325498
|
+
})
|
|
325499
|
+
};
|
|
325500
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContext, {
|
|
325501
|
+
sensors: sensors,
|
|
325502
|
+
onDragStart: handleDragStart,
|
|
325503
|
+
onDragEnd: handleDragEnd,
|
|
325504
|
+
onDragCancel: function onDragCancel() {
|
|
325505
|
+
return setActiveId(null);
|
|
325506
|
+
},
|
|
325507
|
+
modifiers: [restrictToParentElement],
|
|
325508
|
+
collisionDetection: closestCenter
|
|
325509
|
+
}, /*#__PURE__*/React__default['default'].createElement(SortableBox$4, {
|
|
325510
|
+
instance: instance
|
|
325511
|
+
}), /*#__PURE__*/React__default['default'].createElement(DragOver, {
|
|
325512
|
+
instance: instance
|
|
325513
|
+
}));
|
|
325514
|
+
};
|
|
325515
|
+
|
|
325516
|
+
var Root$1 = function Root(props, ref) {
|
|
325517
|
+
// 向外暴露出的方法
|
|
325518
|
+
React.useImperativeHandle(ref, function () {
|
|
325519
|
+
return {};
|
|
325520
|
+
});
|
|
325521
|
+
return /*#__PURE__*/React__default['default'].createElement(DndContainer$3, _objectSpread({}, props));
|
|
325522
|
+
};
|
|
325523
|
+
|
|
325524
|
+
var Root$2 = /*#__PURE__*/React.forwardRef(Root$1);
|
|
325525
|
+
|
|
325526
|
+
var LmDrag = function LmDrag(_ref, ref) {
|
|
325527
|
+
var resetProps = _extends$2({}, _ref);
|
|
325528
|
+
|
|
325529
|
+
var defaultRef = React.useRef(null);
|
|
325530
|
+
|
|
325531
|
+
var defaultProps = _objectSpread({
|
|
325532
|
+
options: [],
|
|
325533
|
+
rowKey: 'id'
|
|
325534
|
+
}, resetProps);
|
|
325535
|
+
|
|
325536
|
+
return /*#__PURE__*/React__default['default'].createElement(Root$2, _objectSpread({
|
|
325537
|
+
ref: ref || defaultRef
|
|
325538
|
+
}, defaultProps));
|
|
325539
|
+
};
|
|
325540
|
+
|
|
325541
|
+
var LmDrag$1 = /*#__PURE__*/React.forwardRef(LmDrag);
|
|
325542
|
+
|
|
324912
325543
|
exports.Alert = Alert$1;
|
|
324913
325544
|
exports.Approval = LMApproval;
|
|
324914
325545
|
exports.AutoComplete = RefAutoComplete$1;
|
|
@@ -324951,6 +325582,7 @@
|
|
|
324951
325582
|
exports.Layout = Layout$1;
|
|
324952
325583
|
exports.LeftTable = LeftSide;
|
|
324953
325584
|
exports.List = List$2;
|
|
325585
|
+
exports.LmDrag = LmDrag$1;
|
|
324954
325586
|
exports.LmEditTable = LmEditTable;
|
|
324955
325587
|
exports.LmFilter = LmFilter$1;
|
|
324956
325588
|
exports.LmImgList = LmImgList;
|