linkmore-design 1.1.13-alpha.1 → 1.1.13-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/Button/demos/ghost.d.ts +2 -0
  3. package/dist/ConfigProvider/context.d.ts +1 -0
  4. package/dist/Descriptions/Cell.d.ts +1 -0
  5. package/dist/Descriptions/Item.d.ts +1 -0
  6. package/dist/Descriptions/index.d.ts +1 -1
  7. package/dist/Form/FormWrapper.d.ts +3 -0
  8. package/dist/Form/WrapperItem.d.ts +4 -0
  9. package/dist/Form/demos/disabled.d.ts +2 -0
  10. package/dist/Form/demos/responsive.d.ts +0 -1
  11. package/dist/Form/index.d.ts +2 -0
  12. package/dist/Form/interface.d.ts +12 -0
  13. package/dist/IconFont/demos/ConfigProvider.d.ts +2 -0
  14. package/dist/IconFont/index.d.ts +1 -2
  15. package/dist/LmDrag/LmDrag.d.ts +4 -0
  16. package/dist/LmDrag/components/DndContainer.d.ts +3 -0
  17. package/dist/LmDrag/components/sortableBox.d.ts +5 -0
  18. package/dist/LmDrag/components/sortableItem.d.ts +7 -0
  19. package/dist/LmDrag/demos/basic.d.ts +2 -0
  20. package/dist/LmDrag/index.d.ts +10 -0
  21. package/dist/LmDrag/style/index.d.ts +1 -0
  22. package/dist/LmDrag/style/variables.d.ts +1 -0
  23. package/dist/LmDrag/wrapper/Root.d.ts +3 -0
  24. package/dist/LmEditTable/EditTable.d.ts +16 -3
  25. package/dist/LmEditTable/components/DraggableContainer.d.ts +4 -1
  26. package/dist/LmEditTable/components/QuickOpetate.d.ts +12 -0
  27. package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  28. package/dist/LmEditTable/components/index.d.ts +7 -2
  29. package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
  30. package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  31. package/dist/LmEditTable/util.d.ts +5 -0
  32. package/dist/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  33. package/dist/LmFilter/LmFilter.d.ts +2 -6
  34. package/dist/LmTable/demos/summuy.d.ts +2 -0
  35. package/dist/LmTable/expression.d.ts +1 -0
  36. package/dist/LmTable/hooks/useGroupDataSource.d.ts +7 -0
  37. package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  38. package/dist/LmUpload/fns/index.d.ts +1 -0
  39. package/dist/QuickMenu/demos/useInDraw.d.ts +2 -0
  40. package/dist/QuickMenu/index.d.ts +3 -1
  41. package/dist/Select/index.d.ts +3 -0
  42. package/dist/TreeSelect/demos/treedata.d.ts +3 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.umd.js +2811 -1527
  45. package/dist/index.umd.min.js +17 -17
  46. package/dist/variables.css +270 -120
  47. package/es/Button/index.js +4 -3
  48. package/es/Button/style/index.css +28 -25
  49. package/es/Button/style/variables.css +28 -25
  50. package/es/Cascader/index.js +31 -3
  51. package/es/Cascader/style/index.css +1 -0
  52. package/es/Cascader/style/variables.css +1 -0
  53. package/es/ConfigProvider/context.d.ts +1 -0
  54. package/es/ConfigProvider/index.js +5 -3
  55. package/es/Descriptions/Cell.d.ts +1 -0
  56. package/es/Descriptions/Cell.js +5 -2
  57. package/es/Descriptions/Item.d.ts +1 -0
  58. package/es/Descriptions/Row.js +6 -1
  59. package/es/Descriptions/index.d.ts +1 -1
  60. package/es/Descriptions/index.js +3 -3
  61. package/es/Descriptions/style/index.css +3 -0
  62. package/es/Descriptions/style/variables.css +3 -0
  63. package/es/Form/Form.js +13 -4
  64. package/es/Form/FormItem/ItemHolder.js +1 -10
  65. package/es/Form/FormWrapper.d.ts +3 -0
  66. package/es/Form/FormWrapper.js +22 -0
  67. package/es/Form/WrapperItem.d.ts +4 -0
  68. package/es/Form/WrapperItem.js +217 -0
  69. package/es/Form/container.js +1 -13
  70. package/es/Form/images/icon_collapse.svg +1 -0
  71. package/es/Form/index.d.ts +2 -0
  72. package/es/Form/index.js +2 -0
  73. package/es/Form/interface.d.ts +12 -0
  74. package/es/Form/style/index.css +34 -41
  75. package/es/Form/style/variables.css +34 -41
  76. package/es/IconFont/index.d.ts +1 -2
  77. package/es/IconFont/index.js +18 -4
  78. package/es/ImageViewer/components/Operate.js +4 -7
  79. package/es/Input/index.js +47 -10
  80. package/es/InputNumber/index.js +23 -11
  81. package/es/InputNumber/style/index.css +7 -0
  82. package/es/InputNumber/style/variables.css +7 -0
  83. package/es/LmDrag/LmDrag.d.ts +4 -0
  84. package/es/LmDrag/LmDrag.js +30 -0
  85. package/es/LmDrag/components/DndContainer.d.ts +3 -0
  86. package/es/LmDrag/components/DndContainer.js +121 -0
  87. package/es/LmDrag/components/sortableBox.d.ts +5 -0
  88. package/es/LmDrag/components/sortableBox.js +23 -0
  89. package/es/LmDrag/components/sortableItem.d.ts +7 -0
  90. package/es/LmDrag/components/sortableItem.js +41 -0
  91. package/es/LmDrag/index.d.ts +10 -0
  92. package/es/LmDrag/index.js +3 -0
  93. package/es/LmDrag/style/index.css +0 -0
  94. package/es/LmDrag/style/index.d.ts +1 -0
  95. package/es/LmDrag/style/index.js +1 -0
  96. package/es/LmDrag/style/variables.css +0 -0
  97. package/es/LmDrag/style/variables.d.ts +1 -0
  98. package/es/LmDrag/style/variables.js +1 -0
  99. package/es/LmDrag/wrapper/Root.d.ts +3 -0
  100. package/es/LmDrag/wrapper/Root.js +12 -0
  101. package/es/LmEditTable/DragHandle.js +1 -1
  102. package/es/LmEditTable/EditTable.d.ts +16 -3
  103. package/es/LmEditTable/EditTable.js +295 -240
  104. package/es/LmEditTable/components/DraggableContainer.d.ts +4 -1
  105. package/es/LmEditTable/components/DraggableContainer.js +10 -3
  106. package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
  107. package/es/LmEditTable/components/QuickOpetate.js +82 -0
  108. package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  109. package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
  110. package/es/LmEditTable/components/index.d.ts +7 -2
  111. package/es/LmEditTable/components/index.js +3 -1
  112. package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
  113. package/es/LmEditTable/hooks/useForkRef.js +22 -0
  114. package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  115. package/es/LmEditTable/rowSort/DndContainerRow.js +81 -0
  116. package/es/LmEditTable/sortableItem.js +1 -0
  117. package/es/LmEditTable/sortableItemCol.js +40 -10
  118. package/es/LmEditTable/style/index.css +27 -0
  119. package/es/LmEditTable/style/variables.css +27 -0
  120. package/es/LmEditTable/util.d.ts +5 -0
  121. package/es/LmEditTable/util.js +51 -12
  122. package/es/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  123. package/es/LmEditTable/virtual/VirtualRow.js +5 -3
  124. package/es/LmEditTable/virtual/VirtualRowBack.js +12 -14
  125. package/es/LmFilter/LmFilter.js +6 -6
  126. package/es/LmFilter/components/CheckboxFilter.js +9 -4
  127. package/es/LmFilter/components/DropdownFIlter.js +186 -111
  128. package/es/LmFilter/components/SelectFilter.js +4 -3
  129. package/es/LmFilter/filterFns/index.js +5 -7
  130. package/es/LmFilter/index.js +0 -3
  131. package/es/LmFilter/style/index.css +82 -54
  132. package/es/LmFilter/style/variables.css +82 -54
  133. package/es/LmFilter/utils.js +6 -6
  134. package/es/LmSelect/style/index.css +1 -0
  135. package/es/LmSelect/style/variables.css +1 -0
  136. package/es/LmTable/Table.js +24 -15
  137. package/es/LmTable/expression.d.ts +1 -0
  138. package/es/LmTable/expression.js +31 -0
  139. package/es/LmTable/hooks/useGroupDataSource.js +50 -0
  140. package/es/LmTable/style/index.css +39 -0
  141. package/es/LmTable/style/variables.css +39 -0
  142. package/es/LmTable/virTual/VirtualRow.js +12 -14
  143. package/es/LmUpload/LmUpload.js +6 -3
  144. package/es/LmUpload/UploadList/ItemPicture.js +2 -1
  145. package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  146. package/es/LmUpload/UploadList/ItemPictureCard.js +15 -5
  147. package/es/LmUpload/UploadList/ItemText.js +7 -2
  148. package/es/LmUpload/UploadList/index.js +53 -2
  149. package/es/LmUpload/body/UploadCore.js +4 -1
  150. package/es/LmUpload/fns/index.d.ts +1 -0
  151. package/es/LmUpload/fns/index.js +27 -6
  152. package/es/LmUpload/style/index.css +17 -0
  153. package/es/LmUpload/style/variables.css +17 -0
  154. package/es/QuickMenu/index.d.ts +3 -1
  155. package/es/QuickMenu/index.js +22 -19
  156. package/es/Select/index.d.ts +3 -0
  157. package/es/Select/index.js +44 -7
  158. package/es/Select/style/index.css +28 -0
  159. package/es/Select/style/variables.css +28 -0
  160. package/es/TreeSelect/index.js +17 -2
  161. package/es/TreeSelect/style/index.css +3 -0
  162. package/es/TreeSelect/style/variables.css +3 -0
  163. package/es/index.d.ts +2 -0
  164. package/es/index.js +2 -1
  165. package/es/styles/variables.css +270 -120
  166. package/lib/Button/index.js +4 -3
  167. package/lib/Button/style/index.css +28 -25
  168. package/lib/Button/style/variables.css +28 -25
  169. package/lib/Cascader/index.js +35 -3
  170. package/lib/Cascader/style/index.css +1 -0
  171. package/lib/Cascader/style/variables.css +1 -0
  172. package/lib/ConfigProvider/context.d.ts +1 -0
  173. package/lib/ConfigProvider/index.js +5 -3
  174. package/lib/Descriptions/Cell.d.ts +1 -0
  175. package/lib/Descriptions/Cell.js +5 -2
  176. package/lib/Descriptions/Item.d.ts +1 -0
  177. package/lib/Descriptions/Row.js +6 -1
  178. package/lib/Descriptions/index.d.ts +1 -1
  179. package/lib/Descriptions/index.js +3 -3
  180. package/lib/Descriptions/style/index.css +3 -0
  181. package/lib/Descriptions/style/variables.css +3 -0
  182. package/lib/Form/Form.js +13 -4
  183. package/lib/Form/FormItem/ItemHolder.js +1 -10
  184. package/lib/Form/FormWrapper.d.ts +3 -0
  185. package/lib/Form/FormWrapper.js +34 -0
  186. package/lib/Form/WrapperItem.d.ts +4 -0
  187. package/lib/Form/WrapperItem.js +235 -0
  188. package/lib/Form/container.js +1 -13
  189. package/lib/Form/images/icon_collapse.svg +1 -0
  190. package/lib/Form/index.d.ts +2 -0
  191. package/lib/Form/index.js +3 -0
  192. package/lib/Form/interface.d.ts +12 -0
  193. package/lib/Form/style/index.css +34 -41
  194. package/lib/Form/style/variables.css +34 -41
  195. package/lib/IconFont/index.d.ts +1 -2
  196. package/lib/IconFont/index.js +25 -4
  197. package/lib/ImageViewer/components/Operate.js +4 -8
  198. package/lib/Input/index.js +52 -10
  199. package/lib/InputNumber/index.js +29 -11
  200. package/lib/InputNumber/style/index.css +7 -0
  201. package/lib/InputNumber/style/variables.css +7 -0
  202. package/lib/LmDrag/LmDrag.d.ts +4 -0
  203. package/lib/LmDrag/LmDrag.js +44 -0
  204. package/lib/LmDrag/components/DndContainer.d.ts +3 -0
  205. package/lib/LmDrag/components/DndContainer.js +138 -0
  206. package/lib/LmDrag/components/sortableBox.d.ts +5 -0
  207. package/lib/LmDrag/components/sortableBox.js +37 -0
  208. package/lib/LmDrag/components/sortableItem.d.ts +7 -0
  209. package/lib/LmDrag/components/sortableItem.js +54 -0
  210. package/lib/LmDrag/index.d.ts +10 -0
  211. package/lib/LmDrag/index.js +19 -0
  212. package/lib/LmDrag/style/index.css +0 -0
  213. package/lib/LmDrag/style/index.d.ts +1 -0
  214. package/lib/LmDrag/style/index.js +3 -0
  215. package/lib/LmDrag/style/variables.css +0 -0
  216. package/lib/LmDrag/style/variables.d.ts +1 -0
  217. package/lib/LmDrag/style/variables.js +3 -0
  218. package/lib/LmDrag/wrapper/Root.d.ts +3 -0
  219. package/lib/LmDrag/wrapper/Root.js +26 -0
  220. package/lib/LmEditTable/DragHandle.js +1 -1
  221. package/lib/LmEditTable/EditTable.d.ts +16 -3
  222. package/lib/LmEditTable/EditTable.js +290 -235
  223. package/lib/LmEditTable/components/DraggableContainer.d.ts +4 -1
  224. package/lib/LmEditTable/components/DraggableContainer.js +12 -5
  225. package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
  226. package/lib/LmEditTable/components/QuickOpetate.js +96 -0
  227. package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  228. package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
  229. package/lib/LmEditTable/components/index.d.ts +7 -2
  230. package/lib/LmEditTable/components/index.js +16 -0
  231. package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
  232. package/lib/LmEditTable/hooks/useForkRef.js +29 -0
  233. package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  234. package/lib/LmEditTable/rowSort/DndContainerRow.js +99 -0
  235. package/lib/LmEditTable/sortableItem.js +1 -0
  236. package/lib/LmEditTable/sortableItemCol.js +37 -8
  237. package/lib/LmEditTable/style/index.css +27 -0
  238. package/lib/LmEditTable/style/variables.css +27 -0
  239. package/lib/LmEditTable/util.d.ts +5 -0
  240. package/lib/LmEditTable/util.js +52 -11
  241. package/lib/LmEditTable/virtual/VirtualRow.d.ts +1 -0
  242. package/lib/LmEditTable/virtual/VirtualRow.js +8 -3
  243. package/lib/LmEditTable/virtual/VirtualRowBack.js +12 -14
  244. package/lib/LmFilter/LmFilter.js +6 -6
  245. package/lib/LmFilter/components/CheckboxFilter.js +9 -4
  246. package/lib/LmFilter/components/DropdownFIlter.js +186 -111
  247. package/lib/LmFilter/components/SelectFilter.js +4 -3
  248. package/lib/LmFilter/filterFns/index.js +5 -7
  249. package/lib/LmFilter/index.js +0 -3
  250. package/lib/LmFilter/style/index.css +82 -54
  251. package/lib/LmFilter/style/variables.css +82 -54
  252. package/lib/LmFilter/utils.js +6 -6
  253. package/lib/LmSelect/style/index.css +1 -0
  254. package/lib/LmSelect/style/variables.css +1 -0
  255. package/lib/LmTable/Table.js +24 -15
  256. package/lib/LmTable/expression.d.ts +1 -0
  257. package/lib/LmTable/expression.js +41 -0
  258. package/lib/LmTable/hooks/useGroupDataSource.js +50 -0
  259. package/lib/LmTable/style/index.css +39 -0
  260. package/lib/LmTable/style/variables.css +39 -0
  261. package/lib/LmTable/virTual/VirtualRow.js +12 -14
  262. package/lib/LmUpload/LmUpload.js +9 -3
  263. package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
  264. package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  265. package/lib/LmUpload/UploadList/ItemPictureCard.js +15 -5
  266. package/lib/LmUpload/UploadList/ItemText.js +7 -2
  267. package/lib/LmUpload/UploadList/index.js +54 -2
  268. package/lib/LmUpload/body/UploadCore.js +5 -1
  269. package/lib/LmUpload/fns/index.d.ts +1 -0
  270. package/lib/LmUpload/fns/index.js +27 -6
  271. package/lib/LmUpload/style/index.css +17 -0
  272. package/lib/LmUpload/style/variables.css +17 -0
  273. package/lib/QuickMenu/index.d.ts +3 -1
  274. package/lib/QuickMenu/index.js +21 -18
  275. package/lib/Select/index.d.ts +3 -0
  276. package/lib/Select/index.js +47 -7
  277. package/lib/Select/style/index.css +28 -0
  278. package/lib/Select/style/variables.css +28 -0
  279. package/lib/TreeSelect/index.js +21 -2
  280. package/lib/TreeSelect/style/index.css +3 -0
  281. package/lib/TreeSelect/style/variables.css +3 -0
  282. package/lib/index.d.ts +2 -0
  283. package/lib/index.js +15 -1
  284. package/lib/styles/variables.css +270 -120
  285. package/package.json +5 -1
@@ -5,6 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
+ exports.checkExpandIconColumnIndex = checkExpandIconColumnIndex;
8
9
  exports.checkMemoShouldUploadSpecialFun = checkMemoShouldUploadSpecialFun;
9
10
  exports.checkRowKeyByDataSource = checkRowKeyByDataSource;
10
11
  exports.deepDataSourcePreKeys = deepDataSourcePreKeys;
@@ -28,19 +29,20 @@ function isObjEmpty(obj) {
28
29
  function deepDataSourcePreKeys(dataSource, rowKey) {
29
30
  var deepDataSource = [];
30
31
 
31
- var eachChildren = function eachChildren(children, preKeys) {
32
- children === null || children === void 0 ? void 0 : children.forEach(function (item) {
32
+ var eachChildren = function eachChildren(children, preKeys, deepIds) {
33
+ children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
33
34
  deepDataSource.push(Object.assign(Object.assign({}, item), {
34
- preKeys: [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])
35
+ preKeys: [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]),
36
+ _deepIds: [].concat((0, _toConsumableArray2.default)(deepIds), [index + 1])
35
37
  }));
36
38
 
37
39
  if (item === null || item === void 0 ? void 0 : item.children) {
38
- eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
40
+ eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]), [].concat((0, _toConsumableArray2.default)(deepIds), [index + 1])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
39
41
  }
40
42
  });
41
43
  };
42
44
 
43
- eachChildren(dataSource, []);
45
+ eachChildren(dataSource, [], []);
44
46
  return (0, _lodash.keyBy)(deepDataSource, rowKey);
45
47
  }
46
48
 
@@ -74,7 +76,7 @@ function checkRowKeyByDataSource(dataSource, rowKey) {
74
76
 
75
77
  return Object.assign(Object.assign({}, v), (0, _defineProperty2.default)({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
76
78
  });
77
- return res;
79
+ return res || [];
78
80
  }
79
81
 
80
82
  function getExpandStatus(children) {
@@ -84,7 +86,7 @@ function getExpandStatus(children) {
84
86
  }
85
87
 
86
88
  function checkMemoShouldUploadSpecialFun(prev, next) {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
89
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
88
90
 
89
91
  var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
90
92
 
@@ -94,13 +96,38 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
94
96
 
95
97
  var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
96
98
  var nextCol = next === null || next === void 0 ? void 0 : next.col;
99
+ /** TODO: 使用了自定义render, 是否要判断rowIndex? 这样排序之后,渲染的性能就会变差 */
100
+
101
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'children']), (0, _lodash.pick)(next, ['colIndex', 'record', 'children']))) {
102
+ return false;
103
+ }
104
+
105
+ if (!(next === null || next === void 0 ? void 0 : next.quickOpetateClearAll) && ((next === null || next === void 0 ? void 0 : next.getLength) < 2 || (prev === null || prev === void 0 ? void 0 : prev.getLength) === 1) && (next === null || next === void 0 ? void 0 : next.dataIndex) === 'lm_edit_opetate') {
106
+ return false;
107
+ }
108
+
109
+ if (prev.isEdit !== next.isEdit) {
110
+ return false;
111
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
112
+
113
+
114
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && (((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.render) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.render)) && (!(0, _lodash.isEqual)((0, _lodash.omit)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), (0, _lodash.omit)(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render'])) || !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'rowIndex']), (0, _lodash.pick)(next, ['colIndex', 'record', 'rowIndex'])))) {
115
+ return false;
116
+ }
97
117
 
98
118
  if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed)) && !(0, _lodash.isEqual)(prev === null || prev === void 0 ? void 0 : prev.style, next === null || next === void 0 ? void 0 : next.style)) {
99
119
  return false;
100
120
  }
101
121
 
102
- if ((((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.optionOnly) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.optionOnly)) && !(0, _lodash.isEqual)((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.options, (_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.options)) {
103
- // return isEqual(prevCol?.componentProps?.options, nextCol?.componentProps?.options)
122
+ if ((((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.optionOnly) || ((_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.optionOnly)) && !(0, _lodash.isEqual)((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.options, (_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.options)) {
123
+ return false;
124
+ }
125
+
126
+ if ((((_g = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _g === void 0 ? void 0 : _g.options) || ((_h = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _h === void 0 ? void 0 : _h.options)) && !(0, _lodash.isEqual)((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.options, (_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.options)) {
127
+ return false;
128
+ }
129
+
130
+ if (((0, _lodash.isFunction)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || (0, _lodash.isFunction)(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !(0, _lodash.isEqual)(prevCol.newOptions, nextCol.newOptions) && !(0, _lodash.isEqual)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
104
131
  return false;
105
132
  }
106
133
 
@@ -109,13 +136,17 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
109
136
  return false;
110
137
  }
111
138
 
139
+ if (next.className.indexOf('drag-visible') > -1) {
140
+ return (0, _lodash.isEqual)(prev.style, next.style);
141
+ }
142
+
112
143
  if (next.className.indexOf('ant-table-selection-column') > -1) {
113
- return (0, _lodash.isEqual)((_f = (_e = prev.children) === null || _e === void 0 ? void 0 : _e[1]) === null || _f === void 0 ? void 0 : _f.props, (_h = (_g = next.children) === null || _g === void 0 ? void 0 : _g[1]) === null || _h === void 0 ? void 0 : _h.props);
144
+ return (0, _lodash.isEqual)((_m = (_l = prev.children) === null || _l === void 0 ? void 0 : _l[1]) === null || _m === void 0 ? void 0 : _m.props, (_p = (_o = next.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props);
114
145
  }
115
146
  /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
116
147
 
117
148
 
118
- if (((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.quickcopy) || ((_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.quickcopy)) {
149
+ if (((_q = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _q === void 0 ? void 0 : _q.quickcopy) || ((_r = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _r === void 0 ? void 0 : _r.quickcopy)) {
119
150
  var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
120
151
  var p = (0, _lodash.pick)(prev, pickProps);
121
152
  var n = (0, _lodash.pick)(next, pickProps);
@@ -125,6 +156,16 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
125
156
  return true;
126
157
  }
127
158
 
159
+ function checkExpandIconColumnIndex(_ref) {
160
+ var rowSelection = _ref.rowSelection,
161
+ sortOpen = _ref.sortOpen,
162
+ indexCol = _ref.indexCol;
163
+ var arr = [rowSelection, sortOpen, indexCol].filter(function (item) {
164
+ return !!item;
165
+ });
166
+ return arr.length;
167
+ }
168
+
128
169
  var _default = {
129
170
  isObjEmpty: isObjEmpty
130
171
  };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  interface rowProps {
3
3
  children?: any;
4
+ pref?: any;
4
5
  }
5
6
  declare const VirtualRow: React.NamedExoticComponent<rowProps>;
6
7
  export default VirtualRow;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
6
 
5
7
  Object.defineProperty(exports, "__esModule", {
@@ -11,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
11
13
 
12
14
  var _context = require("./context");
13
15
 
16
+ var _useForkRef = _interopRequireDefault(require("../hooks/useForkRef"));
17
+
14
18
  var __rest = void 0 && (void 0).__rest || function (s, e) {
15
19
  var t = {};
16
20
 
@@ -26,7 +30,8 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
26
30
 
27
31
  var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
28
32
  var children = _a.children,
29
- resetProps = __rest(_a, ["children"]);
33
+ pref = _a.pref,
34
+ resetProps = __rest(_a, ["children", "pref"]);
30
35
 
31
36
  var _useStore = (0, _context.useStore)(),
32
37
  state = _useStore.state,
@@ -62,10 +67,10 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
62
67
  }
63
68
  };
64
69
 
65
- initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
70
+ initHeight(trRef);
66
71
  }, [trRef, dispatch, rowHeight, totalLen, ref]);
67
72
  return /*#__PURE__*/_react.default.createElement("tr", Object.assign({}, resetProps, {
68
- ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
73
+ ref: (0, _useForkRef.default)(pref, trRef)
69
74
  }), children);
70
75
  });
71
76
 
@@ -36,12 +36,16 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
36
36
  var rowHeight = state.rowHeight,
37
37
  totalLen = state.totalLen;
38
38
  var virtualItems = instance.columnVirtual.virtualItems;
39
- var trRef = (0, _react.useRef)(null); // 列长度
39
+ var trRef = (0, _react.useRef)(null); // 非固定列长度
40
40
 
41
41
  var columnsLen = (0, _react.useMemo)(function () {
42
42
  var _a;
43
43
 
44
- return (_a = children === null || children === void 0 ? void 0 : children.length) !== null && _a !== void 0 ? _a : 0;
44
+ return (_a = children === null || children === void 0 ? void 0 : children.filter(function (v) {
45
+ var _a, _b;
46
+
47
+ return typeof ((_a = v.props) === null || _a === void 0 ? void 0 : _a.fixLeft) !== 'number' && typeof ((_b = v.props) === null || _b === void 0 ? void 0 : _b.fixRight) !== 'number';
48
+ }).length) !== null && _a !== void 0 ? _a : 0;
45
49
  }, [children]);
46
50
  (0, _react.useEffect)(function () {
47
51
  if (state.columnsLen !== columnsLen) {
@@ -88,26 +92,20 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
88
92
  fixedRight: [],
89
93
  columns: []
90
94
  });
91
- }, [children]); // 截取非固定列
92
-
93
- var resetVirtualItems = (0, _react.useMemo)(function () {
94
- var fixedLeft = fixedColumns.fixedLeft,
95
- columns = fixedColumns.columns;
96
- return virtualItems.slice(fixedLeft.length, fixedLeft.length + columns.length);
97
- }, [fixedColumns, virtualItems]); // 横向单元格合并
95
+ }, [children]); // 横向单元格合并
98
96
 
99
97
  var colSpan = (0, _react.useMemo)(function () {
100
98
  var _a;
101
99
 
102
- var startIndex = ((_a = resetVirtualItems === null || resetVirtualItems === void 0 ? void 0 : resetVirtualItems[0]) === null || _a === void 0 ? void 0 : _a.index) || 0;
103
- return startIndex ? startIndex - fixedColumns.fixedLeft.length : startIndex;
104
- }, [fixedColumns, resetVirtualItems]);
100
+ return (_a = virtualItems[0]) === null || _a === void 0 ? void 0 : _a.index;
101
+ }, [virtualItems]);
102
+ console.log('virtualItems', virtualItems);
105
103
  return /*#__PURE__*/_react.default.createElement("tr", Object.assign({}, resetProps, {
106
104
  ref: Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef
107
105
  }), fixedColumns.fixedLeft, !!colSpan && /*#__PURE__*/_react.default.createElement("td", {
108
106
  colSpan: colSpan
109
- }), resetVirtualItems.map(function (virtualCol) {
110
- return children[virtualCol.index];
107
+ }), virtualItems.map(function (virtualCol) {
108
+ return fixedColumns.columns[virtualCol.index];
111
109
  }), fixedColumns.fixedRight);
112
110
  });
113
111
 
@@ -21,9 +21,10 @@ var _FilterRoot = _interopRequireDefault(require("./wrapper/FilterRoot"));
21
21
 
22
22
  var _localization = require("./localization");
23
23
 
24
- var _excluded = ["searchConfig", "localization"];
24
+ var _components = _interopRequireDefault(require("./components"));
25
25
 
26
- var LmFilter = function LmFilter(_ref, ref) {
26
+ var _excluded = ["searchConfig", "localization"];
27
+ var LmFilter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
27
28
  var _ref$searchConfig = _ref.searchConfig,
28
29
  searchConfig = _ref$searchConfig === void 0 ? {} : _ref$searchConfig,
29
30
  _ref$localization = _ref.localization,
@@ -64,8 +65,7 @@ var LmFilter = function LmFilter(_ref, ref) {
64
65
  return /*#__PURE__*/_react.default.createElement(_FilterRoot.default, (0, _extends2.default)({
65
66
  ref: ref || defaultRef
66
67
  }, defaultProps, resetProps));
67
- };
68
-
69
- var _default = /*#__PURE__*/(0, _react.forwardRef)(LmFilter);
70
-
68
+ });
69
+ LmFilter.FilterControl = _components.default;
70
+ var _default = LmFilter;
71
71
  exports.default = _default;
@@ -43,7 +43,9 @@ var CheckboxFilter = function CheckboxFilter(_ref) {
43
43
  visible = instance.visible,
44
44
  setVisible = instance.setVisible;
45
45
  var _itemProps$data = itemProps.data,
46
- filters = _itemProps$data === void 0 ? [] : _itemProps$data;
46
+ filters = _itemProps$data === void 0 ? [] : _itemProps$data,
47
+ showSearch = itemProps.showSearch,
48
+ showAllChecked = itemProps.showAllChecked;
47
49
  var inputRef = (0, _react.useRef)(); // 选中的数据项: [key, key, ...];
48
50
 
49
51
  var _useState = (0, _react.useState)(filterValue),
@@ -62,8 +64,11 @@ var CheckboxFilter = function CheckboxFilter(_ref) {
62
64
  var delayedFn = (0, _hooks.useDelayedFn)(); // 是否存在搜索, 当数据大于8时存在搜索
63
65
 
64
66
  var isSearch = (0, _react.useMemo)(function () {
65
- return filters.length > 8;
66
- }, [filters.length]); // 是否全选: 选中的数据大于等于筛选后的数据 && 筛选后的数据全部存在于选中的数据中
67
+ return filters.length > 8 && !!(showSearch !== null && showSearch !== void 0 ? showSearch : true);
68
+ }, [filters.length, showSearch]);
69
+ var isAllCheck = (0, _react.useMemo)(function () {
70
+ return !!(showAllChecked !== null && showAllChecked !== void 0 ? showAllChecked : true);
71
+ }, [showAllChecked]); // 是否全选: 选中的数据大于等于筛选后的数据 && 筛选后的数据全部存在于选中的数据中
67
72
 
68
73
  var checkAll = (0, _react.useMemo)(function () {
69
74
  var isAll = checkedValues.length >= options.length;
@@ -145,7 +150,7 @@ var CheckboxFilter = function CheckboxFilter(_ref) {
145
150
  ref: inputRef,
146
151
  onSearch: handleFilter,
147
152
  onChange: handleFilter
148
- }), /*#__PURE__*/_react.default.createElement("div", {
153
+ }), isAllCheck && /*#__PURE__*/_react.default.createElement("div", {
149
154
  className: "filter_header_operate"
150
155
  }, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Checkbox, {
151
156
  indeterminate: indeterminate,