linkmore-design 1.1.13-alpha.4 → 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.
Files changed (116) hide show
  1. package/dist/Button/demos/ghost.d.ts +2 -0
  2. package/dist/Descriptions/Cell.d.ts +1 -0
  3. package/dist/Descriptions/Item.d.ts +1 -0
  4. package/dist/LmDrag/LmDrag.d.ts +4 -0
  5. package/dist/LmDrag/components/DndContainer.d.ts +3 -0
  6. package/dist/LmDrag/components/sortableBox.d.ts +5 -0
  7. package/dist/LmDrag/components/sortableItem.d.ts +7 -0
  8. package/dist/LmDrag/demos/basic.d.ts +2 -0
  9. package/dist/LmDrag/index.d.ts +10 -0
  10. package/dist/LmDrag/style/index.d.ts +1 -0
  11. package/dist/LmDrag/style/variables.d.ts +1 -0
  12. package/dist/LmDrag/wrapper/Root.d.ts +3 -0
  13. package/dist/LmEditTable/EditTable.d.ts +15 -3
  14. package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  15. package/dist/LmUpload/fns/index.d.ts +1 -0
  16. package/dist/QuickMenu/index.d.ts +2 -1
  17. package/dist/Select/index.d.ts +3 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.umd.js +699 -99
  20. package/dist/index.umd.min.js +9 -9
  21. package/dist/variables.css +67 -25
  22. package/es/Button/index.js +4 -3
  23. package/es/Button/style/index.css +28 -25
  24. package/es/Button/style/variables.css +28 -25
  25. package/es/Descriptions/Cell.d.ts +1 -0
  26. package/es/Descriptions/Cell.js +5 -2
  27. package/es/Descriptions/Item.d.ts +1 -0
  28. package/es/Descriptions/Row.js +6 -1
  29. package/es/InputNumber/index.js +7 -9
  30. package/es/LmDrag/LmDrag.d.ts +4 -0
  31. package/es/LmDrag/LmDrag.js +30 -0
  32. package/es/LmDrag/components/DndContainer.d.ts +3 -0
  33. package/es/LmDrag/components/DndContainer.js +121 -0
  34. package/es/LmDrag/components/sortableBox.d.ts +5 -0
  35. package/es/LmDrag/components/sortableBox.js +23 -0
  36. package/es/LmDrag/components/sortableItem.d.ts +7 -0
  37. package/es/LmDrag/components/sortableItem.js +41 -0
  38. package/es/LmDrag/index.d.ts +10 -0
  39. package/es/LmDrag/index.js +3 -0
  40. package/es/LmDrag/style/index.css +0 -0
  41. package/es/LmDrag/style/index.d.ts +1 -0
  42. package/es/LmDrag/style/index.js +1 -0
  43. package/es/LmDrag/style/variables.css +0 -0
  44. package/es/LmDrag/style/variables.d.ts +1 -0
  45. package/es/LmDrag/style/variables.js +1 -0
  46. package/es/LmDrag/wrapper/Root.d.ts +3 -0
  47. package/es/LmDrag/wrapper/Root.js +12 -0
  48. package/es/LmEditTable/EditTable.d.ts +15 -3
  49. package/es/LmEditTable/EditTable.js +86 -55
  50. package/es/LmEditTable/sortableItemCol.js +3 -1
  51. package/es/LmFilter/components/DropdownFIlter.js +27 -6
  52. package/es/LmFilter/style/index.css +12 -0
  53. package/es/LmFilter/style/variables.css +12 -0
  54. package/es/LmUpload/LmUpload.js +2 -1
  55. package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  56. package/es/LmUpload/UploadList/ItemPictureCard.js +4 -3
  57. package/es/LmUpload/UploadList/index.js +52 -2
  58. package/es/LmUpload/fns/index.d.ts +1 -0
  59. package/es/LmUpload/fns/index.js +19 -3
  60. package/es/QuickMenu/index.d.ts +2 -1
  61. package/es/QuickMenu/index.js +11 -12
  62. package/es/Select/index.d.ts +3 -0
  63. package/es/Select/index.js +28 -1
  64. package/es/Select/style/index.css +27 -0
  65. package/es/Select/style/variables.css +27 -0
  66. package/es/index.d.ts +2 -0
  67. package/es/index.js +2 -1
  68. package/es/styles/variables.css +67 -25
  69. package/lib/Button/index.js +4 -3
  70. package/lib/Button/style/index.css +28 -25
  71. package/lib/Button/style/variables.css +28 -25
  72. package/lib/Descriptions/Cell.d.ts +1 -0
  73. package/lib/Descriptions/Cell.js +5 -2
  74. package/lib/Descriptions/Item.d.ts +1 -0
  75. package/lib/Descriptions/Row.js +6 -1
  76. package/lib/InputNumber/index.js +9 -9
  77. package/lib/LmDrag/LmDrag.d.ts +4 -0
  78. package/lib/LmDrag/LmDrag.js +44 -0
  79. package/lib/LmDrag/components/DndContainer.d.ts +3 -0
  80. package/lib/LmDrag/components/DndContainer.js +138 -0
  81. package/lib/LmDrag/components/sortableBox.d.ts +5 -0
  82. package/lib/LmDrag/components/sortableBox.js +37 -0
  83. package/lib/LmDrag/components/sortableItem.d.ts +7 -0
  84. package/lib/LmDrag/components/sortableItem.js +54 -0
  85. package/lib/LmDrag/index.d.ts +10 -0
  86. package/lib/LmDrag/index.js +19 -0
  87. package/lib/LmDrag/style/index.css +0 -0
  88. package/lib/LmDrag/style/index.d.ts +1 -0
  89. package/lib/LmDrag/style/index.js +3 -0
  90. package/lib/LmDrag/style/variables.css +0 -0
  91. package/lib/LmDrag/style/variables.d.ts +1 -0
  92. package/lib/LmDrag/style/variables.js +3 -0
  93. package/lib/LmDrag/wrapper/Root.d.ts +3 -0
  94. package/lib/LmDrag/wrapper/Root.js +26 -0
  95. package/lib/LmEditTable/EditTable.d.ts +15 -3
  96. package/lib/LmEditTable/EditTable.js +85 -54
  97. package/lib/LmEditTable/sortableItemCol.js +4 -1
  98. package/lib/LmFilter/components/DropdownFIlter.js +27 -6
  99. package/lib/LmFilter/style/index.css +12 -0
  100. package/lib/LmFilter/style/variables.css +12 -0
  101. package/lib/LmUpload/LmUpload.js +2 -1
  102. package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  103. package/lib/LmUpload/UploadList/ItemPictureCard.js +4 -3
  104. package/lib/LmUpload/UploadList/index.js +53 -2
  105. package/lib/LmUpload/fns/index.d.ts +1 -0
  106. package/lib/LmUpload/fns/index.js +19 -3
  107. package/lib/QuickMenu/index.d.ts +2 -1
  108. package/lib/QuickMenu/index.js +11 -12
  109. package/lib/Select/index.d.ts +3 -0
  110. package/lib/Select/index.js +29 -1
  111. package/lib/Select/style/index.css +27 -0
  112. package/lib/Select/style/variables.css +27 -0
  113. package/lib/index.d.ts +2 -0
  114. package/lib/index.js +15 -1
  115. package/lib/styles/variables.css +67 -25
  116. 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: !!restProps.danger
14994
+ danger: !!danger
14994
14995
  }), children);
14995
14996
  };
14996
14997
 
@@ -90798,7 +90799,7 @@
90798
90799
  console.log('报错了!', '报错项:', item, '报错值', filterValue);
90799
90800
  return filterValue;
90800
90801
  }
90801
- }, [type, filterValue]);
90802
+ }, [type, data, filterValue]);
90802
90803
 
90803
90804
  if (isString) {
90804
90805
  return /*#__PURE__*/React__default['default'].createElement("span", null, String);
@@ -90812,7 +90813,8 @@
90812
90813
  var filterValue = instance.filterValue,
90813
90814
  setFilterValue = instance.setFilterValue;
90814
90815
  var title = item.title,
90815
- colon = item.colon; // 是否有筛选值/是否处于筛选状态
90816
+ colon = item.colon,
90817
+ clearIconTrigger = item.clearIconTrigger; // 是否有筛选值/是否处于筛选状态
90816
90818
 
90817
90819
  var active = React.useMemo(function () {
90818
90820
  return getIsHas(filterValue);
@@ -90827,6 +90829,29 @@
90827
90829
  e.stopPropagation();
90828
90830
  setFilterValue(getValueForType(item.type));
90829
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
+ });
90830
90855
  };
90831
90856
 
90832
90857
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, (title || showColon) && /*#__PURE__*/React__default['default'].createElement("div", {
@@ -90840,10 +90865,7 @@
90840
90865
  item: item
90841
90866
  })), /*#__PURE__*/React__default['default'].createElement("div", {
90842
90867
  className: "filter_item_icon addon_after"
90843
- }, item.type !== 'date' || active ? /*#__PURE__*/React__default['default'].createElement(IconFont, {
90844
- type: active ? 'lmweb-close-circle-fill' : 'lmweb-down',
90845
- onClick: handleClear
90846
- }) : null));
90868
+ }, /*#__PURE__*/React__default['default'].createElement(Icon, null)));
90847
90869
  });
90848
90870
  /*
90849
90871
  * css样式控制
@@ -181482,10 +181504,11 @@
181482
181504
  }, [uid]); // 从对象中读取存在的指定属性
181483
181505
 
181484
181506
  var getFileHasValue = React.useCallback(function (obj) {
181507
+ if (!obj) return '';
181485
181508
  var extend = [uid, 'fileName'];
181486
181509
  var val = '';
181487
181510
  extend.forEach(function (v) {
181488
- if (!val) val = obj[v];
181511
+ if (!val && obj[v]) val = obj[v];
181489
181512
  });
181490
181513
  return val;
181491
181514
  }, [uid]); // 获取当前的文件列表
@@ -181903,7 +181926,21 @@
181903
181926
  var _props$onDownload;
181904
181927
 
181905
181928
  (_props$onDownload = props.onDownload) === null || _props$onDownload === void 0 ? void 0 : _props$onDownload.call(props, file);
181906
- }, [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]);
181907
181944
  var CoreMethods = {
181908
181945
  getIsMaxCount: getIsMaxCount,
181909
181946
  getFileHasValue: getFileHasValue,
@@ -181913,7 +181950,8 @@
181913
181950
  getUploadStatus: getUploadStatus,
181914
181951
  remove: remove,
181915
181952
  preview: preview,
181916
- download: download
181953
+ download: download,
181954
+ move: move
181917
181955
  };
181918
181956
  var RefMethods = {
181919
181957
  getState: function getState() {
@@ -182184,7 +182222,8 @@
182184
182222
  var PictureItem$1 = function PictureItem(_ref) {
182185
182223
  var file = _ref.file,
182186
182224
  index = _ref.index,
182187
- instance = _ref.instance;
182225
+ instance = _ref.instance,
182226
+ listeners = _ref.listeners;
182188
182227
  var dispatch = instance.dispatch,
182189
182228
  readOnly = instance.readOnly,
182190
182229
  size = instance.size,
@@ -182241,13 +182280,13 @@
182241
182280
  });
182242
182281
  };
182243
182282
 
182244
- return /*#__PURE__*/React__default['default'].createElement("div", {
182283
+ return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread({
182245
182284
  className: classnames('lm_upload_item', 'lm_upload_item_card', isError && 'lm_upload_item_error'),
182246
182285
  style: {
182247
182286
  height: size,
182248
182287
  width: size
182249
182288
  }
182250
- }, /*#__PURE__*/React__default['default'].createElement("div", {
182289
+ }, listeners || {}), /*#__PURE__*/React__default['default'].createElement("div", {
182251
182290
  className: "lm_upload_item_thumb"
182252
182291
  }, isError || !isImg ? renderThumb(resetFile) : /*#__PURE__*/React__default['default'].createElement(Image$1, {
182253
182292
  width: resetSize.width,
@@ -182299,11 +182338,15 @@
182299
182338
 
182300
182339
  var LmUploadList = function LmUploadList(_ref) {
182301
182340
  var instance = _ref.instance;
182302
- var getFileHasValue = instance.getFileHasValue,
182341
+ var uid = instance.uid,
182342
+ getFileHasValue = instance.getFileHasValue,
182303
182343
  getFileList = instance.getFileList,
182304
182344
  itemRender = instance.itemRender,
182305
182345
  listType = instance.listType,
182306
- showUploadList = instance.showUploadList;
182346
+ showUploadList = instance.showUploadList,
182347
+ enableDrag = instance.enableDrag,
182348
+ fileNames = instance.fileNames,
182349
+ move = instance.move;
182307
182350
  if (!showUploadList) return null;
182308
182351
  var fileList = React.useMemo(function () {
182309
182352
  var _getFileList;
@@ -182312,6 +182355,51 @@
182312
182355
  return a.seq - b.seq;
182313
182356
  });
182314
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
+
182315
182403
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file, idx) {
182316
182404
  return render$1(itemRender || RenderItem, {
182317
182405
  type: listType,
@@ -182542,7 +182630,7 @@
182542
182630
  size: 100,
182543
182631
  fileSize: 10,
182544
182632
  fileSizeType: 'M',
182545
- uid: 'uid',
182633
+ uid: 'fileName',
182546
182634
  accept: '',
182547
182635
  type: ['jpg', 'jpeg', 'png'],
182548
182636
  listType: 'card',
@@ -182557,6 +182645,7 @@
182557
182645
  itemRender: null,
182558
182646
  enabledPreview: true,
182559
182647
  enabledCrop: false,
182648
+ enableDrag: false,
182560
182649
  enabledOss: false,
182561
182650
  // oss配置
182562
182651
  ossConfig: function ossConfig() {
@@ -188614,8 +188703,7 @@
188614
188703
 
188615
188704
  var _excluded$1j = ["children", "className", "disabled", "size"];
188616
188705
  var prefixCls$3 = 'lm_input-number';
188617
-
188618
- var LMInputNumber = function LMInputNumber(props) {
188706
+ var LMInputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {
188619
188707
  var children = props.children,
188620
188708
  className = props.className,
188621
188709
  customDisabled = props.disabled,
@@ -188629,24 +188717,24 @@
188629
188717
  var size = React__default['default'].useContext(SizeContext$1);
188630
188718
  var mergeSize = customizeSize || size;
188631
188719
  return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread(_objectSpread({
188720
+ ref: ref,
188632
188721
  className: classnames(className, prefixCls$3),
188633
188722
  placeholder: "\u8BF7\u8F93\u5165"
188634
188723
  }, rest), {}, {
188635
188724
  size: mergeSize,
188636
188725
  disabled: mergedDisabled
188637
188726
  }));
188638
- };
188639
-
188727
+ });
188640
188728
  var CInputNumber = LMInputNumber;
188641
-
188642
- CInputNumber.Price = function (props) {
188729
+ CInputNumber.Price = /*#__PURE__*/React.forwardRef(function (props, ref) {
188643
188730
  return /*#__PURE__*/React__default['default'].createElement(InputNumber$1, _objectSpread({
188644
188731
  prefix: "\uFFE5",
188732
+ ref: ref,
188645
188733
  formatter: function formatter(value) {
188646
188734
  return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
188647
188735
  }
188648
188736
  }, props));
188649
- };
188737
+ });
188650
188738
 
188651
188739
  var getRenderPropValue = function getRenderPropValue(propValue) {
188652
188740
  if (!propValue) {
@@ -227256,6 +227344,20 @@
227256
227344
  return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
227257
227345
  }
227258
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
+
227259
227361
  /**
227260
227362
  * Sort collisions from smallest to greatest value
227261
227363
  */
@@ -229649,6 +229751,237 @@
229649
229751
  };
229650
229752
  }
229651
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
+
229652
229985
  /**
229653
229986
  * Move an array item to a different position. Returns a new array with the item moved to the new position.
229654
229987
  */
@@ -229938,7 +230271,7 @@
229938
230271
 
229939
230272
  return newIndex !== index && containerId === previousContainerId;
229940
230273
  };
229941
- const defaultTransition = {
230274
+ const defaultTransition$1 = {
229942
230275
  duration: 200,
229943
230276
  easing: 'ease'
229944
230277
  };
@@ -230009,7 +230342,7 @@
230009
230342
  id,
230010
230343
  strategy: localStrategy,
230011
230344
  resizeObserverConfig,
230012
- transition = defaultTransition
230345
+ transition = defaultTransition$1
230013
230346
  }) {
230014
230347
  const {
230015
230348
  items,
@@ -288287,7 +288620,7 @@
288287
288620
 
288288
288621
  LMRadio.Button = Radio$1.Button;
288289
288622
 
288290
- 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"];
288291
288624
  var prefixCls$7 = 'lm_select';
288292
288625
  var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
288293
288626
  var children = props.children,
@@ -288298,6 +288631,9 @@
288298
288631
  options = props.options,
288299
288632
  value = props.value,
288300
288633
  defaultLabel = props.defaultLabel,
288634
+ suffix = props.suffix,
288635
+ icon = props.icon,
288636
+ iconClick = props.iconClick,
288301
288637
  rest = _objectWithoutProperties$1(props, _excluded$2h); // ===================== Size =====================
288302
288638
 
288303
288639
 
@@ -288336,6 +288672,29 @@
288336
288672
  if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
288337
288673
  return value;
288338
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
+
288339
288698
  return /*#__PURE__*/React__default['default'].createElement(Select$2, _objectSpread(_objectSpread({
288340
288699
  className: classnames(className, prefixCls$7),
288341
288700
  size: size,
@@ -312528,7 +312887,8 @@
312528
312887
  var children = _ref.children,
312529
312888
  props = _objectWithoutProperties$1(_ref, _excluded$2S);
312530
312889
 
312531
- return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread(_objectSpread(_objectSpread({}, props), children.props), {}, {
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), {}, {
312532
312892
  ref: ref
312533
312893
  })); // <th {...props} ref={ref as any}>
312534
312894
  // {/* {(children as any)?.props?.children || children} */}
@@ -313148,8 +313508,7 @@
313148
313508
 
313149
313509
  case 'inputRange':
313150
313510
  return /*#__PURE__*/React__default['default'].createElement(InputRange$1, _objectSpread(_objectSpread({
313151
- onChange: handleFormItemChange,
313152
- ref: inputRef
313511
+ onChange: handleFormItemChange
313153
313512
  }, resultComponentProps), {}, {
313154
313513
  record: record,
313155
313514
  rowIndex: rowIndex,
@@ -313242,7 +313601,6 @@
313242
313601
  return /*#__PURE__*/React__default['default'].createElement(Opetate$1, _objectSpread({
313243
313602
  record: record,
313244
313603
  rowKey: rowKey,
313245
- ref: inputRef,
313246
313604
  handleAdd: handleTableRowAdd,
313247
313605
  handleDelete: handleTableRowDelete,
313248
313606
  getLength: getLength,
@@ -313371,6 +313729,8 @@
313371
313729
  return lodash.isEqual(p, n);
313372
313730
  });
313373
313731
  var EditTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
313732
+ var _localRowSelectList$s2;
313733
+
313374
313734
  var defaultData = props.value,
313375
313735
  columns = props.columns,
313376
313736
  isEdit = props.isEdit,
@@ -313411,19 +313771,31 @@
313411
313771
  var _useState7 = React.useState({}),
313412
313772
  _useState8 = _slicedToArray$1(_useState7, 2),
313413
313773
  _valid = _useState8[0],
313414
- setValid = _useState8[1];
313774
+ setValid = _useState8[1]; // const [localRowSelectList, setLocalRowSelectList] = useState([])
313415
313775
 
313416
- var _useState9 = React.useState([]),
313417
- _useState10 = _slicedToArray$1(_useState9, 2),
313418
- localRowSelectList = _useState10[0],
313419
- setLocalRowSelectList = _useState10[1];
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];
313420
313792
  /** 当前展开的列 */
313421
313793
 
313422
313794
 
313423
- var _useState11 = React.useState([]),
313424
- _useState12 = _slicedToArray$1(_useState11, 2),
313425
- expandedRowKeys = _useState12[0],
313426
- setExpandedRowKeys = _useState12[1];
313795
+ var _useState9 = React.useState([]),
313796
+ _useState10 = _slicedToArray$1(_useState9, 2),
313797
+ expandedRowKeys = _useState10[0],
313798
+ setExpandedRowKeys = _useState10[1];
313427
313799
 
313428
313800
  var dataSourceRef = React.useRef(dataSource);
313429
313801
  var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
@@ -313467,25 +313839,20 @@
313467
313839
  setDataSource(res); // onChange?.(res)
313468
313840
  };
313469
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
+ // }
313470
313854
 
313471
313855
 
313472
- React.useEffect(function () {
313473
- if (rowSelection) {
313474
- var selectedRowKeys = rowSelection.selectedRowKeys;
313475
-
313476
- if (selectedRowKeys) {
313477
- setLocalRowSelectList(localRowSelectList || []);
313478
- }
313479
- }
313480
- }, [rowSelection]);
313481
-
313482
- var editTableRowChange = function editTableRowChange(selectRows) {
313483
- var _rowSelection$onChang;
313484
-
313485
- setLocalRowSelectList(selectRows);
313486
- rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$onChang = rowSelection.onChange) === null || _rowSelection$onChang === void 0 ? void 0 : _rowSelection$onChang.call(rowSelection, selectRows);
313487
- };
313488
-
313489
313856
  var handleSave = function handleSave(row, options) {
313490
313857
  var _deepDataSourceRef$cu, _deepDataSourceRef$cu2;
313491
313858
 
@@ -313575,7 +313942,8 @@
313575
313942
  var handleTableRowDelete = function handleTableRowDelete(key) {
313576
313943
  var _deepDataSourceRef$cu3, _deepDataSourceRef$cu4;
313577
313944
 
313578
- var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu3 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu3 === void 0 ? void 0 : (_deepDataSourceRef$cu4 = _deepDataSourceRef$cu3[key]) === null || _deepDataSourceRef$cu4 === void 0 ? void 0 : _deepDataSourceRef$cu4.preKeys;
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;
313579
313947
 
313580
313948
  if (preKeys.length > 1) {
313581
313949
  /** 说明删除的是children中的数据 */
@@ -313621,28 +313989,29 @@
313621
313989
  /** 快捷添加 */
313622
313990
 
313623
313991
 
313624
- var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren) {
313992
+ var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren, defaultRecord) {
313625
313993
  var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
313626
313994
 
313627
- 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;
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;
313628
313997
  var res = fn(dataSourceRef.current, function (draft) {
313629
313998
  if (preKeys.length > 1) {
313630
313999
  var deeps = function deeps(children) {
313631
314000
  children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
313632
314001
  if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
313633
- if (item[_rowKey] === record[_rowKey]) {
314002
+ if (item[_rowKey] === rkey) {
313634
314003
  if (isAppendInChindren) {
313635
314004
  if (item === null || item === void 0 ? void 0 : item.children) {
313636
314005
  var _item$children;
313637
314006
 
313638
- 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())));
313639
314008
  } else {
313640
- item.children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
314009
+ item.children = [defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now()))];
313641
314010
  }
313642
314011
 
313643
314012
  !expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [item[_rowKey]]));
313644
314013
  } else {
313645
- children.splice(index + 1, 0, _defineProperty$1({}, _rowKey, "".concat(Date.now())));
314014
+ children.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
313646
314015
  }
313647
314016
  } else if (item.children) {
313648
314017
  deeps(item.children);
@@ -313654,7 +314023,7 @@
313654
314023
  deeps(draft);
313655
314024
  } else {
313656
314025
  var index = draft.findIndex(function (item) {
313657
- return record[_rowKey] === item[_rowKey];
314026
+ return rkey === item[_rowKey];
313658
314027
  });
313659
314028
 
313660
314029
  if (index !== -1) {
@@ -313676,6 +314045,7 @@
313676
314045
  }
313677
314046
  }
313678
314047
  });
314048
+ console.log(preKeys, '--preKeys', res);
313679
314049
  setDataSource(res);
313680
314050
  };
313681
314051
 
@@ -313711,9 +314081,9 @@
313711
314081
 
313712
314082
  var DisableOptions = React.useMemo(function () {
313713
314083
  var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
313714
- var _ref8 = item.componentProps || {},
313715
- optionOnly = _ref8.optionOnly,
313716
- options = _ref8.options;
314084
+ var _ref10 = item.componentProps || {},
314085
+ optionOnly = _ref10.optionOnly,
314086
+ options = _ref10.options;
313717
314087
 
313718
314088
  if (optionOnly && options) {
313719
314089
  var dataIndex = item.dataIndex;
@@ -313880,10 +314250,10 @@
313880
314250
  setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
313881
314251
  };
313882
314252
 
313883
- var colDraggableContainer = React.useCallback(function (_ref9) {
314253
+ var colDraggableContainer = React.useCallback(function (_ref11) {
313884
314254
  var _React$Children;
313885
314255
 
313886
- var props = _extends$2({}, _ref9);
314256
+ var props = _extends$2({}, _ref11);
313887
314257
 
313888
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) {
313889
314259
  var _child$props, _child$props$column;
@@ -313900,6 +314270,25 @@
313900
314270
  React.useImperativeHandle(ref, function () {
313901
314271
  return {
313902
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
+ },
313903
314292
  valid: function valid() {
313904
314293
  return _valid;
313905
314294
  }
@@ -313950,6 +314339,8 @@
313950
314339
  }, resetProps));
313951
314340
 
313952
314341
  if (colSortOpen) {
314342
+ var _localRowSelectList$s;
314343
+
313953
314344
  return /*#__PURE__*/React__default['default'].createElement("div", {
313954
314345
  className: "lm_editTable_warpper"
313955
314346
  }, /*#__PURE__*/React__default['default'].createElement(DndContainer$2, {
@@ -313965,17 +314356,18 @@
313965
314356
  bordered: true,
313966
314357
  pagination: false,
313967
314358
  // components={tableComponents}
313968
- rowSelection: !rowSelection ? undefined : {
314359
+ rowSelection: !rowSelection ? undefined : _objectSpread(_objectSpread({
313969
314360
  fixed: true,
313970
314361
  type: 'checkbox',
313971
- columnWidth: 36,
313972
- selectedRowKeys: localRowSelectList === null || localRowSelectList === void 0 ? void 0 : localRowSelectList.map(function (v) {
313973
- return v[_rowKey];
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;
313974
314366
  }),
313975
- onChange: function onChange(selectedRowKeys, selectedRows) {
313976
- editTableRowChange(selectedRows);
314367
+ onChange: function onChange(selectedRowKeys, selectedRows, info) {
314368
+ setLocalRowSelectList(selectedRowKeys, selectedRows, info);
313977
314369
  }
313978
- },
314370
+ }),
313979
314371
  dataSource: dataSource
313980
314372
  })))), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
313981
314373
  className: "lm_editTable_add_bar",
@@ -314006,17 +314398,18 @@
314006
314398
  return setExpandedRowKeys(expandedRows);
314007
314399
  }
314008
314400
  },
314009
- rowSelection: !rowSelection ? undefined : {
314401
+ rowSelection: !rowSelection ? undefined : _objectSpread(_objectSpread({
314010
314402
  fixed: true,
314011
314403
  type: 'checkbox',
314012
- columnWidth: 36,
314013
- selectedRowKeys: localRowSelectList === null || localRowSelectList === void 0 ? void 0 : localRowSelectList.map(function (v) {
314014
- return v[_rowKey];
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;
314015
314408
  }),
314016
- onChange: function onChange(selectedRowKeys, selectedRows) {
314017
- editTableRowChange(selectedRows);
314409
+ onChange: function onChange(selectedRowKeys, selectedRows, info) {
314410
+ setLocalRowSelectList(selectedRowKeys, selectedRows, info);
314018
314411
  }
314019
- },
314412
+ }),
314020
314413
  dataSource: dataSource
314021
314414
  })), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
314022
314415
  className: "lm_editTable_add_bar",
@@ -314060,7 +314453,8 @@
314060
314453
  top = _props$top === void 0 ? '104px' : _props$top,
314061
314454
  _props$menuData = props.menuData,
314062
314455
  menuData = _props$menuData === void 0 ? [] : _props$menuData,
314063
- warpElement = props.warpElement;
314456
+ warpElement = props.warpElement,
314457
+ root = props.root;
314064
314458
  var idTopInfo = React.useRef({});
314065
314459
 
314066
314460
  var _useState = React.useState(false),
@@ -314120,11 +314514,13 @@
314120
314514
  var scrollama = require('scrollama');
314121
314515
 
314122
314516
  menuTimeEventRef.current = scrollama();
314517
+ console.log(getTargetElement$1(warpElement || document), '--getTargetElement(warpElement || document)');
314123
314518
  (_menuTimeEventRef$cur2 = menuTimeEventRef.current) === null || _menuTimeEventRef$cur2 === void 0 ? void 0 : (_menuTimeEventRef$cur3 = _menuTimeEventRef$cur2.setup({
314124
314519
  step: filterMenuData.map(function (item) {
314125
314520
  return document.getElementById("".concat(item.menuId));
314126
314521
  }).filter(Boolean),
314127
- container: getTargetElement$1(warpElement || document)
314522
+ container: getTargetElement$1(warpElement || document),
314523
+ root: root ? getTargetElement$1(root) : undefined
314128
314524
  })) === null || _menuTimeEventRef$cur3 === void 0 ? void 0 : _menuTimeEventRef$cur3.onStepEnter(function (_ref) {
314129
314525
  var element = _ref.element;
314130
314526
  updateActiveToc(element.id);
@@ -314156,12 +314552,6 @@
314156
314552
  wait: 50
314157
314553
  });
314158
314554
 
314159
- var bindDom = function bindDom() {
314160
- if (!Object.keys(idTopInfo.current).length) {
314161
- setKeysDom();
314162
- }
314163
- };
314164
-
314165
314555
  var handleScroll = function handleScroll() {
314166
314556
  setScrollOpenStatus(true);
314167
314557
  };
@@ -314176,10 +314566,6 @@
314176
314566
  var _getTargetElement2;
314177
314567
 
314178
314568
  // bindScroller();
314179
- setTimeout(function () {
314180
- bindDom();
314181
- bindScroller();
314182
- }, 200);
314183
314569
  (_getTargetElement2 = getTargetElement$1(warpElement || document)) === null || _getTargetElement2 === void 0 ? void 0 : _getTargetElement2.addEventListener('scroll', handleScroll, {
314184
314570
  once: true
314185
314571
  });
@@ -314189,6 +314575,12 @@
314189
314575
  (_getTargetElement3 = getTargetElement$1(warpElement || document)) === null || _getTargetElement3 === void 0 ? void 0 : _getTargetElement3.removeEventListener('scroll', handleScroll);
314190
314576
  };
314191
314577
  }, []);
314578
+ React.useEffect(function () {
314579
+ setTimeout(function () {
314580
+ setKeysDom();
314581
+ bindScroller();
314582
+ }, 200);
314583
+ }, [filterMenuData]);
314192
314584
  return /*#__PURE__*/React__default['default'].createElement("div", {
314193
314585
  className: classnames(prefixCls$a),
314194
314586
  onMouseEnter: function onMouseEnter() {
@@ -321757,6 +322149,7 @@
321757
322149
  var itemPrefixCls = _ref.itemPrefixCls,
321758
322150
  component = _ref.component,
321759
322151
  span = _ref.span,
322152
+ rowSpan = _ref.rowSpan,
321760
322153
  className = _ref.className,
321761
322154
  style = _ref.style,
321762
322155
  labelStyle = _ref.labelStyle,
@@ -321773,7 +322166,8 @@
321773
322166
  return /*#__PURE__*/React.createElement(Component, {
321774
322167
  className: classnames((_classNames = {}, _defineProperty$1(_classNames, "".concat(itemPrefixCls, "-item-label"), notEmpty(label)), _defineProperty$1(_classNames, "".concat(itemPrefixCls, "-item-content"), notEmpty(content)), _classNames), className),
321775
322168
  style: style,
321776
- colSpan: span
322169
+ colSpan: span,
322170
+ rowSpan: rowSpan
321777
322171
  }, notEmpty(label) && /*#__PURE__*/React.createElement("span", {
321778
322172
  style: labelStyle
321779
322173
  }, label), notEmpty(content) && /*#__PURE__*/React.createElement("span", {
@@ -321784,7 +322178,8 @@
321784
322178
  return /*#__PURE__*/React.createElement(Component, {
321785
322179
  className: classnames("".concat(itemPrefixCls, "-item"), className),
321786
322180
  style: style,
321787
- colSpan: span
322181
+ colSpan: span,
322182
+ rowSpan: rowSpan
321788
322183
  }, /*#__PURE__*/React.createElement("div", {
321789
322184
  className: "".concat(itemPrefixCls, "-item-container")
321790
322185
  }, (label || label === 0) && /*#__PURE__*/React.createElement("span", {
@@ -321818,6 +322213,8 @@
321818
322213
  contentStyle = _ref3$props.contentStyle,
321819
322214
  _ref3$props$span = _ref3$props.span,
321820
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,
321821
322218
  key = _ref3.key;
321822
322219
 
321823
322220
  if (typeof component === 'string') {
@@ -321828,6 +322225,7 @@
321828
322225
  labelStyle: _objectSpread(_objectSpread({}, rootLabelStyle), labelStyle),
321829
322226
  contentStyle: _objectSpread(_objectSpread({}, rootContentStyle), contentStyle),
321830
322227
  span: span,
322228
+ rowSpan: rowSpan,
321831
322229
  colon: colon,
321832
322230
  component: component,
321833
322231
  itemPrefixCls: itemPrefixCls,
@@ -321842,6 +322240,7 @@
321842
322240
  className: className,
321843
322241
  style: _objectSpread(_objectSpread(_objectSpread({}, rootLabelStyle), style), labelStyle),
321844
322242
  span: 1,
322243
+ rowSpan: rowSpan,
321845
322244
  colon: colon,
321846
322245
  component: component[0],
321847
322246
  itemPrefixCls: itemPrefixCls,
@@ -321852,6 +322251,7 @@
321852
322251
  className: className,
321853
322252
  style: _objectSpread(_objectSpread(_objectSpread({}, rootContentStyle), style), contentStyle),
321854
322253
  span: span * 2 - 1,
322254
+ rowSpan: rowSpan,
321855
322255
  component: component[1],
321856
322256
  itemPrefixCls: itemPrefixCls,
321857
322257
  bordered: bordered,
@@ -324941,6 +325341,205 @@
324941
325341
 
324942
325342
  var LmImageViewer$1 = /*#__PURE__*/React.forwardRef(LmImageViewer);
324943
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
+
324944
325543
  exports.Alert = Alert$1;
324945
325544
  exports.Approval = LMApproval;
324946
325545
  exports.AutoComplete = RefAutoComplete$1;
@@ -324983,6 +325582,7 @@
324983
325582
  exports.Layout = Layout$1;
324984
325583
  exports.LeftTable = LeftSide;
324985
325584
  exports.List = List$2;
325585
+ exports.LmDrag = LmDrag$1;
324986
325586
  exports.LmEditTable = LmEditTable;
324987
325587
  exports.LmFilter = LmFilter$1;
324988
325588
  exports.LmImgList = LmImgList;