linkmore-design 1.1.28 → 1.1.30

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 (266) hide show
  1. package/dist/Form/FormItem/index.d.ts +1 -0
  2. package/dist/LmEditTable/DndContainer.d.ts +6 -3
  3. package/dist/LmEditTable/EditTable.d.ts +16 -5
  4. package/dist/LmEditTable/components/DraggableContainer.d.ts +10 -0
  5. package/dist/LmEditTable/components/QuickOpetate.d.ts +12 -0
  6. package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  7. package/dist/LmEditTable/components/customRenderEmpty.d.ts +2 -0
  8. package/dist/LmEditTable/components/index.d.ts +17 -0
  9. package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
  10. package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  11. package/dist/LmEditTable/sortableItem.d.ts +3 -2
  12. package/dist/LmEditTable/util.d.ts +10 -0
  13. package/dist/LmEditTable/virtual/VirtualRow.d.ts +7 -0
  14. package/dist/LmEditTable/virtual/VirtualRow2.d.ts +7 -0
  15. package/dist/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  16. package/dist/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  17. package/dist/LmEditTable/virtual/context.d.ts +13 -0
  18. package/dist/LmEditTable/virtual/index.d.ts +4 -0
  19. package/dist/LmTable/common/index.d.ts +10 -0
  20. package/dist/LmTable/components/CalcExpression.d.ts +9 -0
  21. package/dist/LmTable/components/Container/Container.d.ts +20 -0
  22. package/dist/LmTable/components/Container/index.d.ts +2 -0
  23. package/dist/LmTable/components/DndContainer.d.ts +37 -5
  24. package/dist/LmTable/components/HeaderCol.d.ts +1 -0
  25. package/dist/LmTable/components/Item/Item.d.ts +37 -0
  26. package/dist/LmTable/components/Item/components/Action/Action.d.ts +10 -0
  27. package/dist/LmTable/components/Item/components/Action/index.d.ts +2 -0
  28. package/dist/LmTable/components/Item/components/Handle/index.d.ts +4 -0
  29. package/dist/LmTable/components/Item/components/Remove/index.d.ts +2 -0
  30. package/dist/LmTable/components/Item/components/index.d.ts +3 -0
  31. package/dist/LmTable/components/Item/index.d.ts +2 -0
  32. package/dist/LmTable/components/{sortableBoxCol.d.ts → SortableBox.d.ts} +0 -0
  33. package/dist/LmTable/demos/{excelGroup.d.ts → draggable.d.ts} +0 -0
  34. package/dist/LmTable/demos/resize.d.ts +2 -0
  35. package/dist/LmTable/expression.d.ts +2 -1
  36. package/dist/LmTable/hooks/useDndItems.d.ts +13 -0
  37. package/dist/LmTable/hooks/useGroupDataSource.d.ts +1 -2
  38. package/dist/LmTable/hooks/useResizeObserver.d.ts +13 -0
  39. package/dist/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
  40. package/dist/LmTable/testDemos/group.d.ts +2 -0
  41. package/dist/LmTable/util.d.ts +1 -1
  42. package/dist/LmTable/virTual/VirtualRow.d.ts +1 -1
  43. package/dist/index.d.ts +1 -2
  44. package/dist/index.umd.css +367 -0
  45. package/dist/index.umd.js +4362 -52840
  46. package/dist/index.umd.min.css +1 -1
  47. package/dist/index.umd.min.js +23 -47
  48. package/dist/variables.css +129 -6
  49. package/es/CardTable/style/index.css +3 -2
  50. package/es/CardTable/style/variables.css +3 -2
  51. package/es/CustomTableOption/columnsSort.js +41 -19
  52. package/es/CustomTableOption/filterSort.js +14 -6
  53. package/es/CustomTableOption/style/index.css +3 -0
  54. package/es/CustomTableOption/style/variables.css +3 -0
  55. package/es/Dropdown/style/index.css +1 -1
  56. package/es/Dropdown/style/variables.css +1 -1
  57. package/es/Empty/index.js +0 -1
  58. package/es/Form/FormItem/index.d.ts +1 -0
  59. package/es/Form/FormItem/index.js +31 -17
  60. package/es/Form/style/index.css +4 -0
  61. package/es/Form/style/variables.css +4 -0
  62. package/es/InputNumber/index.js +7 -9
  63. package/es/LmEditTable/DndContainer.d.ts +6 -3
  64. package/es/LmEditTable/DndContainer.js +70 -10
  65. package/es/LmEditTable/DragHandle.js +1 -1
  66. package/es/LmEditTable/EditTable.d.ts +16 -5
  67. package/es/LmEditTable/EditTable.js +855 -436
  68. package/es/LmEditTable/components/DraggableContainer.d.ts +10 -0
  69. package/es/LmEditTable/components/DraggableContainer.js +39 -0
  70. package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
  71. package/es/LmEditTable/components/QuickOpetate.js +82 -0
  72. package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  73. package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
  74. package/es/LmEditTable/components/customRenderEmpty.d.ts +2 -0
  75. package/es/LmEditTable/components/customRenderEmpty.js +20 -0
  76. package/es/LmEditTable/components/index.d.ts +17 -0
  77. package/es/LmEditTable/components/index.js +8 -0
  78. package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
  79. package/es/LmEditTable/hooks/useForkRef.js +22 -0
  80. package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  81. package/es/LmEditTable/rowSort/DndContainerRow.js +83 -0
  82. package/es/LmEditTable/sortableItem.d.ts +3 -2
  83. package/es/LmEditTable/sortableItem.js +16 -4
  84. package/es/LmEditTable/sortableItemCol.js +40 -10
  85. package/es/LmEditTable/style/index.css +105 -1
  86. package/es/LmEditTable/style/variables.css +105 -1
  87. package/es/LmEditTable/util.d.ts +10 -0
  88. package/es/LmEditTable/util.js +162 -9
  89. package/es/LmEditTable/virtual/VirtualRow.d.ts +7 -0
  90. package/es/LmEditTable/virtual/VirtualRow.js +148 -0
  91. package/es/LmEditTable/virtual/VirtualRow2.d.ts +7 -0
  92. package/es/LmEditTable/virtual/VirtualRow2.js +62 -0
  93. package/es/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  94. package/es/LmEditTable/virtual/VirtualTable.js +64 -0
  95. package/es/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  96. package/es/LmEditTable/virtual/VirtualWrapper.js +60 -0
  97. package/es/LmEditTable/virtual/context.d.ts +13 -0
  98. package/es/LmEditTable/virtual/context.js +66 -0
  99. package/es/LmEditTable/virtual/index.d.ts +4 -0
  100. package/es/LmEditTable/virtual/index.js +4 -0
  101. package/es/LmTable/Table.js +269 -163
  102. package/es/LmTable/common/index.d.ts +10 -0
  103. package/es/LmTable/common/index.js +38 -0
  104. package/es/LmTable/components/CalcExpression.d.ts +9 -0
  105. package/es/LmTable/components/CalcExpression.js +150 -0
  106. package/es/LmTable/components/Container/Container.css +94 -0
  107. package/es/LmTable/components/Container/Container.d.ts +20 -0
  108. package/es/LmTable/components/Container/Container.js +52 -0
  109. package/es/LmTable/components/Container/index.d.ts +2 -0
  110. package/es/LmTable/components/Container/index.js +1 -0
  111. package/es/LmTable/components/DndContainer.d.ts +37 -5
  112. package/es/LmTable/components/DndContainer.js +704 -24
  113. package/es/LmTable/components/HeaderCol.js +61 -0
  114. package/es/LmTable/components/Item/Item.css +113 -0
  115. package/es/LmTable/components/Item/Item.d.ts +37 -0
  116. package/es/LmTable/components/Item/Item.js +88 -0
  117. package/es/LmTable/components/Item/components/Action/Action.css +41 -0
  118. package/es/LmTable/components/Item/components/Action/Action.d.ts +10 -0
  119. package/es/LmTable/components/Item/components/Action/Action.js +35 -0
  120. package/es/LmTable/components/Item/components/Action/index.d.ts +2 -0
  121. package/es/LmTable/components/Item/components/Action/index.js +1 -0
  122. package/es/LmTable/components/Item/components/Handle/index.d.ts +4 -0
  123. package/es/LmTable/components/Item/components/Handle/index.js +15 -0
  124. package/es/LmTable/components/Item/components/Remove/index.d.ts +2 -0
  125. package/es/LmTable/components/Item/components/Remove/index.js +16 -0
  126. package/es/LmTable/components/Item/components/index.d.ts +3 -0
  127. package/es/LmTable/components/Item/components/index.js +3 -0
  128. package/es/LmTable/components/Item/index.d.ts +2 -0
  129. package/es/LmTable/components/Item/index.js +2 -0
  130. package/es/LmTable/components/{sortableBoxCol.js → SortableBox.js} +0 -0
  131. package/es/LmTable/expression.d.ts +2 -1
  132. package/es/LmTable/expression.js +92 -16
  133. package/es/LmTable/hooks/useDndItems.d.ts +13 -0
  134. package/es/LmTable/hooks/useDndItems.js +234 -0
  135. package/es/LmTable/hooks/useGroupDataSource.js +2 -24
  136. package/es/LmTable/hooks/useResizeObserver.d.ts +13 -0
  137. package/es/LmTable/hooks/useResizeObserver.js +49 -0
  138. package/es/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
  139. package/es/LmTable/multipleContainersKeyboardCoordinates.js +117 -0
  140. package/es/LmTable/style/index.css +13 -2
  141. package/es/LmTable/style/variables.css +13 -2
  142. package/es/LmTable/testDemos/group.js +131 -0
  143. package/es/LmTable/util.js +22 -2
  144. package/es/LmTable/virTual/VirtualRow.d.ts +1 -1
  145. package/es/LmTable/virTual/VirtualRow.js +82 -48
  146. package/es/LmTable/virTual/VirtualTable.js +43 -11
  147. package/es/LmTable/virTual/context.js +14 -2
  148. package/es/LmUpload/fns/index.js +1 -1
  149. package/es/Modal/index.js +10 -3
  150. package/es/Radio/index.js +9 -1
  151. package/es/Switch/index.js +7 -2
  152. package/es/hooks/useEvent/index.js +1 -1
  153. package/es/index.d.ts +1 -2
  154. package/es/locale-provider/index.js +1 -1
  155. package/es/styles/variables.css +129 -6
  156. package/lib/CardTable/style/index.css +3 -2
  157. package/lib/CardTable/style/variables.css +3 -2
  158. package/lib/CustomTableOption/columnsSort.js +48 -23
  159. package/lib/CustomTableOption/filterSort.js +19 -10
  160. package/lib/CustomTableOption/style/index.css +3 -0
  161. package/lib/CustomTableOption/style/variables.css +3 -0
  162. package/lib/Dropdown/style/index.css +1 -1
  163. package/lib/Dropdown/style/variables.css +1 -1
  164. package/lib/Empty/index.js +0 -1
  165. package/lib/Form/FormItem/index.d.ts +1 -0
  166. package/lib/Form/FormItem/index.js +32 -17
  167. package/lib/Form/style/index.css +4 -0
  168. package/lib/Form/style/variables.css +4 -0
  169. package/lib/InputNumber/index.js +9 -9
  170. package/lib/LmEditTable/DndContainer.d.ts +6 -3
  171. package/lib/LmEditTable/DndContainer.js +74 -9
  172. package/lib/LmEditTable/DragHandle.js +1 -1
  173. package/lib/LmEditTable/EditTable.d.ts +16 -5
  174. package/lib/LmEditTable/EditTable.js +853 -433
  175. package/lib/LmEditTable/components/DraggableContainer.d.ts +10 -0
  176. package/lib/LmEditTable/components/DraggableContainer.js +52 -0
  177. package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
  178. package/lib/LmEditTable/components/QuickOpetate.js +96 -0
  179. package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  180. package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
  181. package/lib/LmEditTable/components/customRenderEmpty.d.ts +2 -0
  182. package/lib/LmEditTable/components/customRenderEmpty.js +32 -0
  183. package/lib/LmEditTable/components/index.d.ts +17 -0
  184. package/lib/LmEditTable/components/index.js +45 -0
  185. package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
  186. package/lib/LmEditTable/hooks/useForkRef.js +29 -0
  187. package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
  188. package/lib/LmEditTable/rowSort/DndContainerRow.js +100 -0
  189. package/lib/LmEditTable/sortableItem.d.ts +3 -2
  190. package/lib/LmEditTable/sortableItem.js +19 -5
  191. package/lib/LmEditTable/sortableItemCol.js +37 -8
  192. package/lib/LmEditTable/style/index.css +105 -1
  193. package/lib/LmEditTable/style/variables.css +105 -1
  194. package/lib/LmEditTable/util.d.ts +10 -0
  195. package/lib/LmEditTable/util.js +171 -8
  196. package/lib/LmEditTable/virtual/VirtualRow.d.ts +7 -0
  197. package/lib/LmEditTable/virtual/VirtualRow.js +164 -0
  198. package/lib/LmEditTable/virtual/VirtualRow2.d.ts +7 -0
  199. package/lib/LmEditTable/virtual/VirtualRow2.js +78 -0
  200. package/lib/LmEditTable/virtual/VirtualTable.d.ts +3 -0
  201. package/lib/LmEditTable/virtual/VirtualTable.js +81 -0
  202. package/lib/LmEditTable/virtual/VirtualWrapper.d.ts +3 -0
  203. package/lib/LmEditTable/virtual/VirtualWrapper.js +73 -0
  204. package/lib/LmEditTable/virtual/context.d.ts +13 -0
  205. package/lib/LmEditTable/virtual/context.js +76 -0
  206. package/lib/LmEditTable/virtual/index.d.ts +4 -0
  207. package/lib/LmEditTable/virtual/index.js +31 -0
  208. package/lib/LmTable/Table.js +269 -163
  209. package/lib/LmTable/common/index.d.ts +10 -0
  210. package/lib/LmTable/common/index.js +48 -0
  211. package/lib/LmTable/components/CalcExpression.d.ts +9 -0
  212. package/lib/LmTable/components/CalcExpression.js +166 -0
  213. package/lib/LmTable/components/Container/Container.css +94 -0
  214. package/lib/LmTable/components/Container/Container.d.ts +20 -0
  215. package/lib/LmTable/components/Container/Container.js +66 -0
  216. package/lib/LmTable/components/Container/index.d.ts +2 -0
  217. package/lib/LmTable/components/Container/index.js +13 -0
  218. package/lib/LmTable/components/DndContainer.d.ts +37 -5
  219. package/lib/LmTable/components/DndContainer.js +714 -26
  220. package/lib/LmTable/components/HeaderCol.js +61 -0
  221. package/lib/LmTable/components/Item/Item.css +113 -0
  222. package/lib/LmTable/components/Item/Item.d.ts +37 -0
  223. package/lib/LmTable/components/Item/Item.js +104 -0
  224. package/lib/LmTable/components/Item/components/Action/Action.css +41 -0
  225. package/lib/LmTable/components/Item/components/Action/Action.d.ts +10 -0
  226. package/lib/LmTable/components/Item/components/Action/Action.js +50 -0
  227. package/lib/LmTable/components/Item/components/Action/index.d.ts +2 -0
  228. package/lib/LmTable/components/Item/components/Action/index.js +13 -0
  229. package/lib/LmTable/components/Item/components/Handle/index.d.ts +4 -0
  230. package/lib/LmTable/components/Item/components/Handle/index.js +27 -0
  231. package/lib/LmTable/components/Item/components/Remove/index.d.ts +2 -0
  232. package/lib/LmTable/components/Item/components/Remove/index.js +27 -0
  233. package/lib/LmTable/components/Item/components/index.d.ts +3 -0
  234. package/lib/LmTable/components/Item/components/index.js +31 -0
  235. package/lib/LmTable/components/Item/index.d.ts +2 -0
  236. package/lib/LmTable/components/Item/index.js +33 -0
  237. package/lib/LmTable/components/{sortableBoxCol.js → SortableBox.js} +0 -0
  238. package/lib/LmTable/expression.d.ts +2 -1
  239. package/lib/LmTable/expression.js +96 -17
  240. package/lib/LmTable/hooks/useDndItems.d.ts +13 -0
  241. package/lib/LmTable/hooks/useDndItems.js +247 -0
  242. package/lib/LmTable/hooks/useGroupDataSource.js +2 -24
  243. package/lib/LmTable/hooks/useResizeObserver.d.ts +13 -0
  244. package/lib/LmTable/hooks/useResizeObserver.js +61 -0
  245. package/lib/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
  246. package/lib/LmTable/multipleContainersKeyboardCoordinates.js +126 -0
  247. package/lib/LmTable/style/index.css +13 -2
  248. package/lib/LmTable/style/variables.css +13 -2
  249. package/lib/LmTable/testDemos/group.js +131 -0
  250. package/lib/LmTable/util.js +22 -2
  251. package/lib/LmTable/virTual/VirtualRow.d.ts +1 -1
  252. package/lib/LmTable/virTual/VirtualRow.js +81 -48
  253. package/lib/LmTable/virTual/VirtualTable.js +43 -10
  254. package/lib/LmTable/virTual/context.js +14 -2
  255. package/lib/LmUpload/fns/index.js +1 -1
  256. package/lib/Modal/index.js +10 -3
  257. package/lib/Radio/index.js +9 -1
  258. package/lib/Switch/index.js +9 -2
  259. package/lib/hooks/useEvent/index.js +1 -1
  260. package/lib/index.d.ts +1 -2
  261. package/lib/locale-provider/index.js +1 -1
  262. package/lib/styles/variables.css +129 -6
  263. package/package.json +3 -5
  264. package/dist/LmTable/components/sortableItemCol.d.ts +0 -1
  265. package/es/LmTable/components/sortableItemCol.js +0 -56
  266. package/lib/LmTable/components/sortableItemCol.js +0 -56
@@ -1,3 +1,7 @@
1
+ .lm_editTable_warpper {
2
+ height: 100%;
3
+ width: 100%;
4
+ }
1
5
  .lm_editTable_warpper .ant-picker {
2
6
  width: 100%;
3
7
  }
@@ -14,7 +18,7 @@
14
18
  content: '-';
15
19
  }
16
20
  .lm_editTable_warpper .ant-table-thead .ant-table-cell {
17
- height: 40px;
21
+ min-height: 40px;
18
22
  padding: 10px 8px;
19
23
  font-family: PingFangSC-Medium;
20
24
  font-size: 12px;
@@ -26,6 +30,9 @@
26
30
  width: 32px;
27
31
  padding: 0 8px;
28
32
  }
33
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
34
+ height: 100%;
35
+ }
29
36
  .lm_editTable_warpper .lm_editTable_cell {
30
37
  cursor: pointer;
31
38
  height: 40px;
@@ -37,6 +44,16 @@
37
44
  letter-spacing: 0px;
38
45
  color: var(--color-85);
39
46
  }
47
+ .lm_editTable_warpper .lm_custom_cell_td {
48
+ position: relative;
49
+ }
50
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append .ant-table-row-expand-icon {
51
+ margin-right: 8px;
52
+ flex: none;
53
+ }
54
+ .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
55
+ flex: 1 1 auto;
56
+ }
40
57
  .lm_editTable_warpper .lm_custom_cell_td .ant-form-item-control-input-content {
41
58
  display: flex;
42
59
  flex-direction: row;
@@ -48,6 +65,32 @@
48
65
  .lm_editTable_warpper .lm_custom_cell_td .ant-table-row-expand-icon {
49
66
  margin-top: 6px;
50
67
  }
68
+ .lm_editTable_warpper .lm_custom_cell_td .quick_copy_warp {
69
+ font-size: 8px;
70
+ position: absolute;
71
+ left: calc(50% - 10px);
72
+ z-index: 100;
73
+ width: 20px;
74
+ height: 10px;
75
+ background-color: var(--color-6);
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ color: #D8D8D8;
80
+ }
81
+ .lm_editTable_warpper .lm_custom_cell_td .quick_copy_warp:hover {
82
+ cursor: pointer;
83
+ background-color: var(--primary-color);
84
+ color: #fff;
85
+ }
86
+ .lm_editTable_warpper .lm_custom_cell_td .quick_copy_up {
87
+ top: -4px;
88
+ left: calc(50% - 10px);
89
+ }
90
+ .lm_editTable_warpper .lm_custom_cell_td .quick_copy_down {
91
+ bottom: -6px;
92
+ left: calc(50% - 10px);
93
+ }
51
94
  .lm_editTable_warpper .lm_editTable_cell_edit {
52
95
  height: 40px;
53
96
  padding: 8px 8px !important;
@@ -59,6 +102,9 @@
59
102
  .lm_editTable_warpper .lm_table_quickcopy .anticon {
60
103
  color: var(--text-color);
61
104
  }
105
+ .lm_editTable_warpper .ant-table-body {
106
+ scroll-behavior: smooth;
107
+ }
62
108
  .lm_editTable_warpper .icon_drag {
63
109
  color: var(--tip-text-color);
64
110
  }
@@ -75,12 +121,55 @@
75
121
  .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
76
122
  background-color: rgba(0, 0, 0, 0.06) !important;
77
123
  }
124
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
125
+ background-color: rgba(0, 0, 0, 0.06) !important;
126
+ }
127
+ .lm_editTable_warpper .lm_table_empty {
128
+ display: flex;
129
+ flex-direction: column;
130
+ align-items: center;
131
+ padding: 12px 0;
132
+ font-size: 12px;
133
+ }
134
+ .lm_editTable_warpper .lm_table_empty > img {
135
+ width: 130px;
136
+ height: 80px;
137
+ margin-bottom: 8px;
138
+ }
139
+ .lm_editTable_warpper .lm_table_empty .empty_img {
140
+ margin-bottom: 8px;
141
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAACgCAYAAADq8hJGAAAABHNCSVQICAgIfAhkiAAADh9JREFUeJzt3U1sG2d+x/HvMy98EUlblivHbmPXrrN14KCbLBrEhwViC0jjxusgiz3oViC5NLdstkCBHraoChRFT6mL9uJLHBQoUCiHtnBgBHBQ+VAECGDD6SHZYOvYRrqxEzu2JVMWxZeZpwdyJpJqSRQ15PDl97mMHHGGfzLUPD8+8zzPGKQrZmdnMwD5fN4DePXVV5fa3G8CoFAolACWl5cBCILgNsD09HStC+X2rZmZGQfghRde8AFc1/UAbt26FQAUCoU6wPT0dJBWjcPESbsAEekfJu0Chs2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T0S2oG9a5xWJYr3kMGqJYj3tvv7NHrf29+22yEk/TtqzKkFFsxOTpoQgIrGBb21XJIvIeq9pqy2mSBpW9aF0KwmsRwlBRGJqFdv0mCQS6TSRyGhZ29KnkgA2o4QgIjG1YkNug2Qjbei3FrzblBBERERERGQD/wcbRqz954lTWQAAAABJRU5ErkJggg==');
142
+ background-size: cover;
143
+ }
144
+ .lm_editTable_warpper .lm_table_empty > span {
145
+ color: var(--font-color);
146
+ }
147
+ .lm_editTable_warpper .ant-table-empty table {
148
+ height: 100%;
149
+ }
78
150
  .lm_editTable_warpper .ant-picker {
79
151
  height: 24px !important;
80
152
  padding: 2px 8px;
81
153
  padding-left: 7px;
82
154
  box-sizing: border-box;
83
155
  }
156
+ .lm_editTable_warpper .ant-table-bordered > .ant-table-container {
157
+ border: 1px solid #f0f0f0;
158
+ }
159
+ .lm_editTable_warpper.lm_editable_autosize .ant-table-wrapper,
160
+ .lm_editTable_warpper.lm_editable_autosize .ant-spin-nested-loading,
161
+ .lm_editTable_warpper.lm_editable_autosize .ant-spin-container,
162
+ .lm_editTable_warpper.lm_editable_autosize .ant-table,
163
+ .lm_editTable_warpper.lm_editable_autosize .ant-table-container {
164
+ height: 100%;
165
+ }
166
+ .lm_editTable_warpper.lm_editable_autosize .ant-table-wrapper .ant-table-body,
167
+ .lm_editTable_warpper.lm_editable_autosize .ant-spin-nested-loading .ant-table-body,
168
+ .lm_editTable_warpper.lm_editable_autosize .ant-spin-container .ant-table-body,
169
+ .lm_editTable_warpper.lm_editable_autosize .ant-table .ant-table-body,
170
+ .lm_editTable_warpper.lm_editable_autosize .ant-table-container .ant-table-body {
171
+ height: calc(100% - 41px);
172
+ }
84
173
  .lm_editTable_wrapperRange .inputRange {
85
174
  display: inline-flex;
86
175
  align-items: center;
@@ -118,3 +207,18 @@
118
207
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
119
208
  background-color: var(--color-15);
120
209
  }
210
+ .lm_edittable_col_sort_item {
211
+ overflow: hidden;
212
+ }
213
+ .lm_editable_col_drag {
214
+ background-color: #fff;
215
+ font-size: 12px;
216
+ display: flex;
217
+ box-sizing: border-box;
218
+ transform: translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));
219
+ transform-origin: 0 0;
220
+ touch-action: manipulation;
221
+ scale: 1.05;
222
+ box-shadow: 0 0 0 calc(1px / var(--scale-x, 1)) rgba(63, 63, 68, 0.05), 0 1px calc(3px / var(--scale-x, 1)) 0 rgba(34, 33, 81, 0.15);
223
+ padding: 8px;
224
+ }
@@ -2,6 +2,16 @@ export declare function isObjEmpty(obj: Record<string, any>): boolean;
2
2
  export declare function deepDataSourcePreKeys(dataSource: any[], rowKey: string): any;
3
3
  export declare function isExpandRow(children: any): boolean;
4
4
  export declare function checkRowKeyByDataSource(dataSource: any, rowKey: any): any;
5
+ export declare function getExpandStatus(children: any): any;
6
+ export declare function checkMemoShouldUploadSpecialFun(prev: any, next: any): any;
7
+ export declare function checkExpandIconColumnIndex({ rowSelection, sortOpen, indexCol }: {
8
+ rowSelection: any;
9
+ sortOpen: any;
10
+ indexCol: any;
11
+ }): number;
12
+ export declare function checkDataSourceIsEmpty(config: any, dataSource: any, scrollInfo: any): any;
13
+ /** 根据传入的disabedRows, 得出最终需要disabed的rowKeys */
14
+ export declare function checkTableRowIsDisable(deepDataSource: any, disabledRows: any, rowKey: any): any[];
5
15
  declare const _default: {
6
16
  isObjEmpty: typeof isObjEmpty;
7
17
  };
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import { keyBy } from 'lodash';
3
+ import { keyBy, isEqual, pick, isFunction, omit, isObject } from 'lodash';
4
4
  export function isObjEmpty(obj) {
5
5
  var _a;
6
6
 
@@ -9,25 +9,26 @@ export function isObjEmpty(obj) {
9
9
  export function deepDataSourcePreKeys(dataSource, rowKey) {
10
10
  var deepDataSource = [];
11
11
 
12
- var eachChildren = function eachChildren(children, preKeys) {
13
- children === null || children === void 0 ? void 0 : children.forEach(function (item) {
12
+ var eachChildren = function eachChildren(children, preKeys, deepIds) {
13
+ children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
14
14
  deepDataSource.push(Object.assign(Object.assign({}, item), {
15
- preKeys: [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])
15
+ preKeys: [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]),
16
+ _deepIds: [].concat(_toConsumableArray(deepIds), [index + 1])
16
17
  }));
17
18
 
18
19
  if (item === null || item === void 0 ? void 0 : item.children) {
19
- eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
20
+ eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat(_toConsumableArray(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]), [].concat(_toConsumableArray(deepIds), [index + 1])); // deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
20
21
  }
21
22
  });
22
23
  };
23
24
 
24
- eachChildren(dataSource, []);
25
+ eachChildren(dataSource, [], []);
25
26
  return keyBy(deepDataSource, rowKey);
26
27
  }
27
28
  export function isExpandRow(children) {
28
- var _a, _b, _c, _d, _e;
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
29
30
 
30
- return ['Collapse row', 'Expand row'].includes((_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label']);
31
+ return ['Collapse row', 'Expand row'].includes((_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label']) || ((_l = (_k = (_j = (_h = (_g = (_f = children === null || children === void 0 ? void 0 : children[0]) === null || _f === void 0 ? void 0 : _f.props) === null || _g === void 0 ? void 0 : _g.children) === null || _h === void 0 ? void 0 : _h[1]) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.className) === null || _l === void 0 ? void 0 : _l.indexOf('ant-table-row-expand-icon')) > -1;
31
32
  }
32
33
  export function checkRowKeyByDataSource(dataSource, rowKey) {
33
34
  var addRowKey = function addRowKey(children, pkey) {
@@ -53,7 +54,159 @@ export function checkRowKeyByDataSource(dataSource, rowKey) {
53
54
 
54
55
  return Object.assign(Object.assign({}, v), _defineProperty({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
55
56
  });
56
- return res;
57
+ return res || [];
58
+ }
59
+ export function getExpandStatus(children) {
60
+ var _a, _b, _c, _d, _e;
61
+
62
+ return isExpandRow(children) ? (_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label'] : '';
63
+ }
64
+ export function checkMemoShouldUploadSpecialFun(prev, next) {
65
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
66
+
67
+ var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
68
+
69
+ if (!checkExpandStatus) {
70
+ return false;
71
+ }
72
+
73
+ var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
74
+ var nextCol = next === null || next === void 0 ? void 0 : next.col;
75
+ /** TODO: 使用了自定义render, 是否要判断rowIndex? 这样排序之后,渲染的性能就会变差 */
76
+
77
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !isEqual(pick(prev, ['colIndex', 'record', 'children']), pick(next, ['colIndex', 'record', 'children']))) {
78
+ return false;
79
+ }
80
+
81
+ 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') {
82
+ return false;
83
+ }
84
+
85
+ if (prev.isEdit !== next.isEdit) {
86
+ return false;
87
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
88
+
89
+
90
+ 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)) && (!isEqual(omit(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), omit(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render'])) || !isEqual(pick(prev, ['colIndex', 'record', 'rowIndex']), pick(next, ['colIndex', 'record', 'rowIndex'])))) {
91
+ return false;
92
+ }
93
+
94
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed)) && !isEqual(prev === null || prev === void 0 ? void 0 : prev.style, next === null || next === void 0 ? void 0 : next.style)) {
95
+ return false;
96
+ }
97
+
98
+ 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)) && !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)) {
99
+ return false;
100
+ }
101
+
102
+ 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)) && !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)) {
103
+ return false;
104
+ }
105
+
106
+ if ((isFunction(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || isFunction(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !isEqual(prevCol.newOptions, nextCol.newOptions) && !isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
107
+ return false;
108
+ }
109
+
110
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.order) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) && !isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.order, nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) {
111
+ // return isEqual(prevCol?.order, nextCol?.fixed)
112
+ return false;
113
+ }
114
+
115
+ if (next.className.indexOf('drag-visible') > -1) {
116
+ return isEqual(prev.style, next.style);
117
+ }
118
+
119
+ if (((_l = next.className) === null || _l === void 0 ? void 0 : _l.indexOf('ant-table-row-expand-icon-cell')) > -1) {
120
+ return false;
121
+ }
122
+
123
+ if (((_m = next.className) === null || _m === void 0 ? void 0 : _m.indexOf('ant-table-cell-with-append')) > -1) {
124
+ return false;
125
+ }
126
+
127
+ if (next.className.indexOf('ant-table-selection-column') > -1) {
128
+ return isEqual((_p = (_o = prev.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props, (_r = (_q = next.children) === null || _q === void 0 ? void 0 : _q[1]) === null || _r === void 0 ? void 0 : _r.props);
129
+ }
130
+ /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
131
+
132
+
133
+ if (((_s = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _s === void 0 ? void 0 : _s.quickcopy) || ((_t = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _t === void 0 ? void 0 : _t.quickcopy)) {
134
+ var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
135
+ var p = pick(prev, pickProps);
136
+ var n = pick(next, pickProps);
137
+ return isEqual(p, n);
138
+ }
139
+
140
+ return true;
141
+ }
142
+ export function checkExpandIconColumnIndex(_ref) {
143
+ var rowSelection = _ref.rowSelection,
144
+ sortOpen = _ref.sortOpen,
145
+ indexCol = _ref.indexCol;
146
+ var arr = [rowSelection, sortOpen, indexCol].filter(function (item) {
147
+ return !!item;
148
+ });
149
+ return arr.length;
150
+ }
151
+ export function checkDataSourceIsEmpty(config, dataSource, scrollInfo) {
152
+ var _a, _b;
153
+
154
+ var resultConfig = Object.assign({}, config);
155
+
156
+ if (scrollInfo) {
157
+ resultConfig = Object.assign(Object.assign({}, resultConfig), {
158
+ scroll: {
159
+ x: ((_a = resultConfig.scroll) === null || _a === void 0 ? void 0 : _a.x) || '100%',
160
+ y: scrollInfo.height || ((_b = resultConfig.scroll) === null || _b === void 0 ? void 0 : _b.y)
161
+ }
162
+ });
163
+ }
164
+
165
+ if (dataSource.length) {
166
+ return resultConfig;
167
+ }
168
+
169
+ return Object.assign(Object.assign({}, resultConfig), {
170
+ components: Object.assign(Object.assign({}, resultConfig.components), {
171
+ body: {}
172
+ })
173
+ });
174
+ }
175
+ /** 根据传入的disabedRows, 得出最终需要disabed的rowKeys */
176
+
177
+ export function checkTableRowIsDisable(deepDataSource, disabledRows, rowKey) {
178
+ var disabledRkeys = [];
179
+
180
+ if (!disabledRows.length) {
181
+ return disabledRkeys;
182
+ }
183
+
184
+ var disableIds = disabledRows.map(function (item) {
185
+ return isObject(item) ? item === null || item === void 0 ? void 0 : item[rowKey] : item;
186
+ });
187
+
188
+ function deep(children, arrs) {
189
+ children === null || children === void 0 ? void 0 : children.forEach(function (item) {
190
+ arrs.push(item[rowKey]);
191
+
192
+ if (item.children) {
193
+ deep(item.children, arrs);
194
+ }
195
+ });
196
+ }
197
+
198
+ if (disableIds.length) {
199
+ disableIds === null || disableIds === void 0 ? void 0 : disableIds.forEach(function (item) {
200
+ disabledRkeys.push(item);
201
+ var record = deepDataSource[item];
202
+
203
+ if (record === null || record === void 0 ? void 0 : record.children) {
204
+ deep(record.children, disabledRkeys);
205
+ }
206
+ });
207
+ }
208
+
209
+ return disabledRkeys;
57
210
  }
58
211
  export default {
59
212
  isObjEmpty: isObjEmpty
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface rowProps {
3
+ children?: any;
4
+ pref?: any;
5
+ }
6
+ declare const VirtualRow: React.NamedExoticComponent<rowProps>;
7
+ export default VirtualRow;
@@ -0,0 +1,148 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+
4
+ for (var p in s) {
5
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
6
+ }
7
+
8
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+
14
+ import React, { useRef, useMemo, useEffect } from 'react';
15
+ import { useStore } from './context';
16
+ import useForkRef from '../hooks/useForkRef';
17
+ import { omit } from 'lodash';
18
+
19
+ var useOptions = function useOptions(_ref) {
20
+ var children = _ref.children,
21
+ ref = _ref.ref,
22
+ trRef = _ref.trRef;
23
+
24
+ var _a;
25
+
26
+ var _useStore = useStore(),
27
+ state = _useStore.state,
28
+ dispatch = _useStore.dispatch,
29
+ instance = _useStore.instance;
30
+
31
+ var virtualItems = instance.columnVirtual.virtualItems;
32
+ var rowHeight = state.rowHeight,
33
+ totalLen = state.totalLen;
34
+ var sliceColumns = useMemo(function () {
35
+ var _a;
36
+
37
+ return (_a = children === null || children === void 0 ? void 0 : children.reduce) === null || _a === void 0 ? void 0 : _a.call(children, function (pre, cur) {
38
+ var _a, _b;
39
+
40
+ if (typeof ((_a = cur.props) === null || _a === void 0 ? void 0 : _a.fixLeft) === 'number') {
41
+ pre.leftColumns.push(cur);
42
+ return pre;
43
+ }
44
+
45
+ if (typeof ((_b = cur.props) === null || _b === void 0 ? void 0 : _b.fixRight) === 'number') {
46
+ pre.rightColumns.push(cur);
47
+ return pre;
48
+ }
49
+
50
+ pre.centerColumns.push(cur);
51
+ return pre;
52
+ }, {
53
+ leftColumns: [],
54
+ rightColumns: [],
55
+ centerColumns: []
56
+ });
57
+ }, [children]);
58
+ useEffect(function () {
59
+ dispatch({
60
+ type: 'changeSliceColumns',
61
+ sliceColumns: sliceColumns
62
+ });
63
+ }, [sliceColumns]); // 非固定列长度
64
+
65
+ var centerColumnsLen = useMemo(function () {
66
+ var _a, _b;
67
+
68
+ return (_b = (_a = sliceColumns === null || sliceColumns === void 0 ? void 0 : sliceColumns.centerColumns) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
69
+ }, [sliceColumns]);
70
+ useEffect(function () {
71
+ if (state.columnsLen !== centerColumnsLen) {
72
+ dispatch({
73
+ type: 'changeColumnsLen',
74
+ columnsLen: centerColumnsLen !== null && centerColumnsLen !== void 0 ? centerColumnsLen : 0
75
+ });
76
+ }
77
+ }, [centerColumnsLen, dispatch, state.columnsLen]); // 获取行的高度
78
+
79
+ useEffect(function () {
80
+ var initHeight = function initHeight(tempRef) {
81
+ var _a, _b, _c;
82
+
83
+ if (((_a = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && !rowHeight && totalLen) {
84
+ var tempRowHeight = (_c = (_b = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) !== null && _c !== void 0 ? _c : 0;
85
+ dispatch({
86
+ type: 'initHeight',
87
+ rowHeight: tempRowHeight + 1
88
+ });
89
+ }
90
+ };
91
+
92
+ initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
93
+ }, [trRef, dispatch, rowHeight, totalLen, ref]); // 横向单元格合并
94
+
95
+ var leftColSpan = useMemo(function () {
96
+ var _a;
97
+
98
+ return (_a = virtualItems[0]) === null || _a === void 0 ? void 0 : _a.index;
99
+ }, [virtualItems]); // 右侧隐藏数量
100
+
101
+ var rightColSpan = useMemo(function () {
102
+ var _a;
103
+
104
+ return ((_a = sliceColumns === null || sliceColumns === void 0 ? void 0 : sliceColumns.centerColumns) === null || _a === void 0 ? void 0 : _a.length) - (virtualItems === null || virtualItems === void 0 ? void 0 : virtualItems.length) - leftColSpan || 0;
105
+ }, [(_a = sliceColumns === null || sliceColumns === void 0 ? void 0 : sliceColumns.centerColumns) === null || _a === void 0 ? void 0 : _a.length, virtualItems.length, leftColSpan]);
106
+ return Object.assign(Object.assign({
107
+ virtualItems: virtualItems
108
+ }, sliceColumns), {
109
+ leftColSpan: leftColSpan,
110
+ rightColSpan: rightColSpan
111
+ });
112
+ };
113
+
114
+ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
115
+ var children = _a.children,
116
+ pref = _a.pref,
117
+ resetProps = __rest(_a, ["children", "pref"]);
118
+
119
+ var trRef = useRef(null);
120
+ var clearProps = omit(resetProps, ['dataKey', 'pushAllForm']);
121
+
122
+ var _useOptions = useOptions({
123
+ children: children,
124
+ ref: ref,
125
+ trRef: trRef
126
+ }),
127
+ virtualItems = _useOptions.virtualItems,
128
+ leftColumns = _useOptions.leftColumns,
129
+ centerColumns = _useOptions.centerColumns,
130
+ rightColumns = _useOptions.rightColumns,
131
+ leftColSpan = _useOptions.leftColSpan,
132
+ rightColSpan = _useOptions.rightColSpan;
133
+
134
+ return /*#__PURE__*/React.createElement("tr", Object.assign({}, clearProps, {
135
+ ref: useForkRef(pref, trRef)
136
+ }), leftColumns, !!leftColSpan && /*#__PURE__*/React.createElement("td", {
137
+ key: "leftColSpan",
138
+ colSpan: leftColSpan
139
+ }), virtualItems.map(function (virtualCol) {
140
+ return /*#__PURE__*/React.cloneElement(centerColumns[virtualCol.index], {
141
+ ref: virtualCol.measureRef
142
+ });
143
+ }), !!rightColSpan && /*#__PURE__*/React.createElement("td", {
144
+ key: "rightColSpan",
145
+ colSpan: rightColSpan
146
+ }), rightColumns);
147
+ });
148
+ export default VirtualRow;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface rowProps {
3
+ children?: any;
4
+ pref?: any;
5
+ }
6
+ declare const VirtualRow: React.NamedExoticComponent<rowProps>;
7
+ export default VirtualRow;
@@ -0,0 +1,62 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+
4
+ for (var p in s) {
5
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
6
+ }
7
+
8
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+
14
+ import React, { useRef, useMemo, useEffect } from 'react';
15
+ import { useStore } from './context';
16
+ import useForkRef from '../hooks/useForkRef';
17
+ var VirtualRow = /*#__PURE__*/React.memo(function (_a, ref) {
18
+ var children = _a.children,
19
+ pref = _a.pref,
20
+ resetProps = __rest(_a, ["children", "pref"]);
21
+
22
+ var _useStore = useStore(),
23
+ state = _useStore.state,
24
+ dispatch = _useStore.dispatch;
25
+
26
+ var rowHeight = state.rowHeight,
27
+ totalLen = state.totalLen;
28
+ var trRef = useRef(null); // 列长度
29
+
30
+ var columnsLen = useMemo(function () {
31
+ var _a;
32
+
33
+ return (_a = children === null || children === void 0 ? void 0 : children.length) !== null && _a !== void 0 ? _a : 0;
34
+ }, [children]);
35
+ useEffect(function () {
36
+ if (state.columnsLen !== columnsLen) {
37
+ dispatch({
38
+ type: 'changeColumnsLen',
39
+ columnsLen: columnsLen !== null && columnsLen !== void 0 ? columnsLen : 0
40
+ });
41
+ }
42
+ }, [columnsLen, dispatch, state.columnsLen]);
43
+ useEffect(function () {
44
+ var initHeight = function initHeight(tempRef) {
45
+ var _a, _b, _c;
46
+
47
+ if (((_a = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && !rowHeight && totalLen) {
48
+ var tempRowHeight = (_c = (_b = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) !== null && _c !== void 0 ? _c : 0;
49
+ dispatch({
50
+ type: 'initHeight',
51
+ rowHeight: tempRowHeight
52
+ });
53
+ }
54
+ };
55
+
56
+ initHeight(trRef);
57
+ }, [trRef, dispatch, rowHeight, totalLen, ref]);
58
+ return /*#__PURE__*/React.createElement("tr", Object.assign({}, resetProps, {
59
+ ref: useForkRef(pref, trRef)
60
+ }), children);
61
+ });
62
+ export default VirtualRow;
@@ -0,0 +1,3 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ declare const VirtualTable: React.MemoExoticComponent<(tableProps: PropsWithChildren<any>) => JSX.Element>;
3
+ export default VirtualTable;