linkmore-design 1.1.13-alpha.0 → 1.1.13-alpha.10

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 (254) 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/QuickOpetate.d.ts +12 -0
  26. package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  27. package/dist/LmEditTable/components/index.d.ts +3 -1
  28. package/dist/LmFilter/LmFilter.d.ts +2 -6
  29. package/dist/LmTable/demos/summuy.d.ts +2 -0
  30. package/dist/LmTable/expression.d.ts +1 -0
  31. package/dist/LmTable/hooks/useGroupDataSource.d.ts +7 -0
  32. package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  33. package/dist/LmUpload/fns/index.d.ts +1 -0
  34. package/dist/QuickMenu/demos/useInDraw.d.ts +2 -0
  35. package/dist/QuickMenu/index.d.ts +3 -1
  36. package/dist/Select/index.d.ts +3 -0
  37. package/dist/TreeSelect/demos/treedata.d.ts +3 -0
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.umd.js +2660 -1507
  40. package/dist/index.umd.min.js +17 -17
  41. package/dist/variables.css +263 -120
  42. package/es/Button/index.js +4 -3
  43. package/es/Button/style/index.css +28 -25
  44. package/es/Button/style/variables.css +28 -25
  45. package/es/Cascader/index.js +31 -3
  46. package/es/Cascader/style/index.css +1 -0
  47. package/es/Cascader/style/variables.css +1 -0
  48. package/es/ConfigProvider/context.d.ts +1 -0
  49. package/es/ConfigProvider/index.js +5 -3
  50. package/es/Descriptions/Cell.d.ts +1 -0
  51. package/es/Descriptions/Cell.js +5 -2
  52. package/es/Descriptions/Item.d.ts +1 -0
  53. package/es/Descriptions/Row.js +6 -1
  54. package/es/Descriptions/index.d.ts +1 -1
  55. package/es/Descriptions/index.js +3 -3
  56. package/es/Descriptions/style/index.css +3 -0
  57. package/es/Descriptions/style/variables.css +3 -0
  58. package/es/Form/Form.js +13 -4
  59. package/es/Form/FormItem/ItemHolder.js +1 -10
  60. package/es/Form/FormWrapper.d.ts +3 -0
  61. package/es/Form/FormWrapper.js +22 -0
  62. package/es/Form/WrapperItem.d.ts +4 -0
  63. package/es/Form/WrapperItem.js +217 -0
  64. package/es/Form/container.js +1 -13
  65. package/es/Form/images/icon_collapse.svg +1 -0
  66. package/es/Form/index.d.ts +2 -0
  67. package/es/Form/index.js +2 -0
  68. package/es/Form/interface.d.ts +12 -0
  69. package/es/Form/style/index.css +34 -41
  70. package/es/Form/style/variables.css +34 -41
  71. package/es/IconFont/index.d.ts +1 -2
  72. package/es/IconFont/index.js +18 -4
  73. package/es/ImageViewer/components/Operate.js +4 -7
  74. package/es/Input/index.js +47 -10
  75. package/es/InputNumber/index.js +23 -11
  76. package/es/InputNumber/style/index.css +7 -0
  77. package/es/InputNumber/style/variables.css +7 -0
  78. package/es/LmDrag/LmDrag.d.ts +4 -0
  79. package/es/LmDrag/LmDrag.js +30 -0
  80. package/es/LmDrag/components/DndContainer.d.ts +3 -0
  81. package/es/LmDrag/components/DndContainer.js +121 -0
  82. package/es/LmDrag/components/sortableBox.d.ts +5 -0
  83. package/es/LmDrag/components/sortableBox.js +23 -0
  84. package/es/LmDrag/components/sortableItem.d.ts +7 -0
  85. package/es/LmDrag/components/sortableItem.js +41 -0
  86. package/es/LmDrag/index.d.ts +10 -0
  87. package/es/LmDrag/index.js +3 -0
  88. package/es/LmDrag/style/index.css +0 -0
  89. package/es/LmDrag/style/index.d.ts +1 -0
  90. package/es/LmDrag/style/index.js +1 -0
  91. package/es/LmDrag/style/variables.css +0 -0
  92. package/es/LmDrag/style/variables.d.ts +1 -0
  93. package/es/LmDrag/style/variables.js +1 -0
  94. package/es/LmDrag/wrapper/Root.d.ts +3 -0
  95. package/es/LmDrag/wrapper/Root.js +12 -0
  96. package/es/LmEditTable/EditTable.d.ts +16 -3
  97. package/es/LmEditTable/EditTable.js +276 -235
  98. package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
  99. package/es/LmEditTable/components/QuickOpetate.js +82 -0
  100. package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  101. package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
  102. package/es/LmEditTable/components/index.d.ts +3 -1
  103. package/es/LmEditTable/components/index.js +3 -1
  104. package/es/LmEditTable/sortableItemCol.js +40 -10
  105. package/es/LmEditTable/style/index.css +20 -0
  106. package/es/LmEditTable/style/variables.css +20 -0
  107. package/es/LmEditTable/util.js +51 -15
  108. package/es/LmFilter/LmFilter.js +6 -6
  109. package/es/LmFilter/components/CheckboxFilter.js +9 -4
  110. package/es/LmFilter/components/DropdownFIlter.js +186 -111
  111. package/es/LmFilter/components/SelectFilter.js +4 -3
  112. package/es/LmFilter/filterFns/index.js +4 -6
  113. package/es/LmFilter/index.js +0 -3
  114. package/es/LmFilter/style/index.css +82 -54
  115. package/es/LmFilter/style/variables.css +82 -54
  116. package/es/LmFilter/utils.js +6 -6
  117. package/es/LmSelect/style/index.css +1 -0
  118. package/es/LmSelect/style/variables.css +1 -0
  119. package/es/LmTable/Table.js +24 -15
  120. package/es/LmTable/expression.d.ts +1 -0
  121. package/es/LmTable/expression.js +31 -0
  122. package/es/LmTable/hooks/useGroupDataSource.js +50 -0
  123. package/es/LmTable/style/index.css +39 -0
  124. package/es/LmTable/style/variables.css +39 -0
  125. package/es/LmUpload/LmUpload.js +6 -3
  126. package/es/LmUpload/UploadList/ItemPicture.js +2 -1
  127. package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  128. package/es/LmUpload/UploadList/ItemPictureCard.js +15 -5
  129. package/es/LmUpload/UploadList/ItemText.js +7 -2
  130. package/es/LmUpload/UploadList/index.js +53 -2
  131. package/es/LmUpload/body/UploadCore.js +4 -1
  132. package/es/LmUpload/fns/index.d.ts +1 -0
  133. package/es/LmUpload/fns/index.js +27 -6
  134. package/es/LmUpload/style/index.css +17 -0
  135. package/es/LmUpload/style/variables.css +17 -0
  136. package/es/QuickMenu/index.d.ts +3 -1
  137. package/es/QuickMenu/index.js +22 -19
  138. package/es/Select/index.d.ts +3 -0
  139. package/es/Select/index.js +44 -7
  140. package/es/Select/style/index.css +28 -0
  141. package/es/Select/style/variables.css +28 -0
  142. package/es/TreeSelect/index.js +17 -2
  143. package/es/TreeSelect/style/index.css +3 -0
  144. package/es/TreeSelect/style/variables.css +3 -0
  145. package/es/index.d.ts +2 -0
  146. package/es/index.js +2 -1
  147. package/es/styles/variables.css +263 -120
  148. package/lib/Button/index.js +4 -3
  149. package/lib/Button/style/index.css +28 -25
  150. package/lib/Button/style/variables.css +28 -25
  151. package/lib/Cascader/index.js +35 -3
  152. package/lib/Cascader/style/index.css +1 -0
  153. package/lib/Cascader/style/variables.css +1 -0
  154. package/lib/ConfigProvider/context.d.ts +1 -0
  155. package/lib/ConfigProvider/index.js +5 -3
  156. package/lib/Descriptions/Cell.d.ts +1 -0
  157. package/lib/Descriptions/Cell.js +5 -2
  158. package/lib/Descriptions/Item.d.ts +1 -0
  159. package/lib/Descriptions/Row.js +6 -1
  160. package/lib/Descriptions/index.d.ts +1 -1
  161. package/lib/Descriptions/index.js +3 -3
  162. package/lib/Descriptions/style/index.css +3 -0
  163. package/lib/Descriptions/style/variables.css +3 -0
  164. package/lib/Form/Form.js +13 -4
  165. package/lib/Form/FormItem/ItemHolder.js +1 -10
  166. package/lib/Form/FormWrapper.d.ts +3 -0
  167. package/lib/Form/FormWrapper.js +34 -0
  168. package/lib/Form/WrapperItem.d.ts +4 -0
  169. package/lib/Form/WrapperItem.js +235 -0
  170. package/lib/Form/container.js +1 -13
  171. package/lib/Form/images/icon_collapse.svg +1 -0
  172. package/lib/Form/index.d.ts +2 -0
  173. package/lib/Form/index.js +3 -0
  174. package/lib/Form/interface.d.ts +12 -0
  175. package/lib/Form/style/index.css +34 -41
  176. package/lib/Form/style/variables.css +34 -41
  177. package/lib/IconFont/index.d.ts +1 -2
  178. package/lib/IconFont/index.js +25 -4
  179. package/lib/ImageViewer/components/Operate.js +4 -8
  180. package/lib/Input/index.js +52 -10
  181. package/lib/InputNumber/index.js +29 -11
  182. package/lib/InputNumber/style/index.css +7 -0
  183. package/lib/InputNumber/style/variables.css +7 -0
  184. package/lib/LmDrag/LmDrag.d.ts +4 -0
  185. package/lib/LmDrag/LmDrag.js +44 -0
  186. package/lib/LmDrag/components/DndContainer.d.ts +3 -0
  187. package/lib/LmDrag/components/DndContainer.js +138 -0
  188. package/lib/LmDrag/components/sortableBox.d.ts +5 -0
  189. package/lib/LmDrag/components/sortableBox.js +37 -0
  190. package/lib/LmDrag/components/sortableItem.d.ts +7 -0
  191. package/lib/LmDrag/components/sortableItem.js +54 -0
  192. package/lib/LmDrag/index.d.ts +10 -0
  193. package/lib/LmDrag/index.js +19 -0
  194. package/lib/LmDrag/style/index.css +0 -0
  195. package/lib/LmDrag/style/index.d.ts +1 -0
  196. package/lib/LmDrag/style/index.js +3 -0
  197. package/lib/LmDrag/style/variables.css +0 -0
  198. package/lib/LmDrag/style/variables.d.ts +1 -0
  199. package/lib/LmDrag/style/variables.js +3 -0
  200. package/lib/LmDrag/wrapper/Root.d.ts +3 -0
  201. package/lib/LmDrag/wrapper/Root.js +26 -0
  202. package/lib/LmEditTable/EditTable.d.ts +16 -3
  203. package/lib/LmEditTable/EditTable.js +272 -231
  204. package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
  205. package/lib/LmEditTable/components/QuickOpetate.js +96 -0
  206. package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
  207. package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
  208. package/lib/LmEditTable/components/index.d.ts +3 -1
  209. package/lib/LmEditTable/components/index.js +16 -0
  210. package/lib/LmEditTable/sortableItemCol.js +37 -8
  211. package/lib/LmEditTable/style/index.css +20 -0
  212. package/lib/LmEditTable/style/variables.css +20 -0
  213. package/lib/LmEditTable/util.js +50 -14
  214. package/lib/LmFilter/LmFilter.js +6 -6
  215. package/lib/LmFilter/components/CheckboxFilter.js +9 -4
  216. package/lib/LmFilter/components/DropdownFIlter.js +186 -111
  217. package/lib/LmFilter/components/SelectFilter.js +4 -3
  218. package/lib/LmFilter/filterFns/index.js +4 -6
  219. package/lib/LmFilter/index.js +0 -3
  220. package/lib/LmFilter/style/index.css +82 -54
  221. package/lib/LmFilter/style/variables.css +82 -54
  222. package/lib/LmFilter/utils.js +6 -6
  223. package/lib/LmSelect/style/index.css +1 -0
  224. package/lib/LmSelect/style/variables.css +1 -0
  225. package/lib/LmTable/Table.js +24 -15
  226. package/lib/LmTable/expression.d.ts +1 -0
  227. package/lib/LmTable/expression.js +41 -0
  228. package/lib/LmTable/hooks/useGroupDataSource.js +50 -0
  229. package/lib/LmTable/style/index.css +39 -0
  230. package/lib/LmTable/style/variables.css +39 -0
  231. package/lib/LmUpload/LmUpload.js +9 -3
  232. package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
  233. package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
  234. package/lib/LmUpload/UploadList/ItemPictureCard.js +15 -5
  235. package/lib/LmUpload/UploadList/ItemText.js +7 -2
  236. package/lib/LmUpload/UploadList/index.js +54 -2
  237. package/lib/LmUpload/body/UploadCore.js +5 -1
  238. package/lib/LmUpload/fns/index.d.ts +1 -0
  239. package/lib/LmUpload/fns/index.js +27 -6
  240. package/lib/LmUpload/style/index.css +17 -0
  241. package/lib/LmUpload/style/variables.css +17 -0
  242. package/lib/QuickMenu/index.d.ts +3 -1
  243. package/lib/QuickMenu/index.js +21 -18
  244. package/lib/Select/index.d.ts +3 -0
  245. package/lib/Select/index.js +47 -7
  246. package/lib/Select/style/index.css +28 -0
  247. package/lib/Select/style/variables.css +28 -0
  248. package/lib/TreeSelect/index.js +21 -2
  249. package/lib/TreeSelect/style/index.css +3 -0
  250. package/lib/TreeSelect/style/variables.css +3 -0
  251. package/lib/index.d.ts +2 -0
  252. package/lib/index.js +15 -1
  253. package/lib/styles/variables.css +263 -120
  254. package/package.json +5 -1
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ interface IOpetateProps {
3
+ record: Record<string, any>;
4
+ rowKey?: string;
5
+ handleAdd?: (row?: any, addInChildren?: boolean) => void;
6
+ handleDelete?: (rowKey?: string) => void;
7
+ options?: string[];
8
+ getLength?: number;
9
+ quickOpetateClearAll?: boolean;
10
+ }
11
+ declare const QuickOpetate: FC<IOpetateProps>;
12
+ export default QuickOpetate;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _Button = _interopRequireDefault(require("../../Button"));
13
+
14
+ var _IconFont = _interopRequireDefault(require("../../IconFont"));
15
+
16
+ var _Popover = _interopRequireDefault(require("../../Popover"));
17
+
18
+ var _DisabledContext = _interopRequireDefault(require("../../ConfigProvider/DisabledContext"));
19
+
20
+ var QuickOpetate = function QuickOpetate(_ref) {
21
+ var record = _ref.record,
22
+ rowKey = _ref.rowKey,
23
+ handleAdd = _ref.handleAdd,
24
+ handleDelete = _ref.handleDelete,
25
+ _ref$options = _ref.options,
26
+ options = _ref$options === void 0 ? ['add', 'delete'] : _ref$options,
27
+ getLength = _ref.getLength,
28
+ quickOpetateClearAll = _ref.quickOpetateClearAll;
29
+ var disabled = _react.default.useContext(_DisabledContext.default) || false;
30
+
31
+ var appendChildren = function appendChildren() {
32
+ handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
33
+ };
34
+
35
+ var appendAdd = function appendAdd() {
36
+ handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
37
+ };
38
+
39
+ return /*#__PURE__*/_react.default.createElement("div", {
40
+ style: {
41
+ display: 'flex',
42
+ alignItems: 'center',
43
+ justifyContent: 'flex-start',
44
+ marginLeft: '-4px'
45
+ }
46
+ }, options.includes('delete') && /*#__PURE__*/_react.default.createElement(_Button.default, {
47
+ type: "link",
48
+ size: "small",
49
+ disabled: !quickOpetateClearAll && getLength < 2 || disabled,
50
+ icon: /*#__PURE__*/_react.default.createElement(_IconFont.default, {
51
+ type: "lmweb-minus-circle",
52
+ style: {
53
+ fontSize: 16
54
+ }
55
+ }),
56
+ onClick: function onClick() {
57
+ return handleDelete(record[rowKey]);
58
+ }
59
+ }), (options === null || options === void 0 ? void 0 : options.includes('add')) && (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/_react.default.createElement(_Popover.default, {
60
+ placement: "bottom",
61
+ overlayClassName: "lm_table_append_add_popover",
62
+ open: open,
63
+ title: null,
64
+ content: /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", {
65
+ onClick: appendAdd
66
+ }, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/_react.default.createElement("li", {
67
+ onClick: appendChildren
68
+ }, "\u6DFB\u52A0\u5B50\u7EA7")),
69
+ trigger: "hover"
70
+ }, /*#__PURE__*/_react.default.createElement(_Button.default, {
71
+ type: "link",
72
+ size: "small",
73
+ icon: /*#__PURE__*/_react.default.createElement(_IconFont.default, {
74
+ type: "lmweb-plus-circle-fill",
75
+ style: {
76
+ fontSize: 16
77
+ }
78
+ })
79
+ })) : (options === null || options === void 0 ? void 0 : options.includes('add')) || (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/_react.default.createElement(_Button.default, {
80
+ type: "link",
81
+ size: "small",
82
+ disabled: disabled,
83
+ icon: /*#__PURE__*/_react.default.createElement(_IconFont.default, {
84
+ type: "lmweb-plus-circle-fill",
85
+ style: {
86
+ fontSize: 16
87
+ }
88
+ }),
89
+ onClick: function onClick() {
90
+ return handleAdd(record, !!(options === null || options === void 0 ? void 0 : options.includes('addInChildren')));
91
+ }
92
+ }) : null);
93
+ };
94
+
95
+ var _default = QuickOpetate;
96
+ exports.default = _default;
@@ -0,0 +1,13 @@
1
+ interface IBottomOpetateCompoentProps {
2
+ isShowAddAction?: boolean;
3
+ handleAdd?: () => void;
4
+ recordCreatorProps?: {
5
+ creatorButtonText?: string;
6
+ style?: Record<string, any>;
7
+ initData?: Record<string, any> | (() => Record<string, any>);
8
+ customAddClick?: () => void;
9
+ };
10
+ disabled?: boolean;
11
+ }
12
+ declare const BottomOpetateComponent: (props: IBottomOpetateCompoentProps) => JSX.Element;
13
+ export default BottomOpetateComponent;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _index = require("../../index");
13
+
14
+ var BottomOpetateComponent = function BottomOpetateComponent(props) {
15
+ var isShowAddAction = props.isShowAddAction,
16
+ recordCreatorProps = props.recordCreatorProps,
17
+ handleAdd = props.handleAdd,
18
+ _props$disabled = props.disabled,
19
+ disabled = _props$disabled === void 0 ? false : _props$disabled;
20
+ return isShowAddAction ? /*#__PURE__*/_react.default.createElement(_index.Button, {
21
+ className: "lm_editTable_add_bar",
22
+ type: "dashed",
23
+ disabled: disabled,
24
+ onClick: (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.customAddClick) || handleAdd,
25
+ style: Object.assign({
26
+ marginTop: 8
27
+ }, (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.style) || {})
28
+ }, /*#__PURE__*/_react.default.createElement(_index.IconFont, {
29
+ type: "lmweb-plus"
30
+ }), (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.creatorButtonText) || '新增') : null;
31
+ };
32
+
33
+ var _default = BottomOpetateComponent;
34
+ exports.default = _default;
@@ -1,5 +1,7 @@
1
1
  import DraggableContainer from './DraggableContainer';
2
- export { DraggableContainer };
2
+ import BottomOpetateComponent from './bottomOpetateComponent';
3
+ import QuickOpetate from './QuickOpetate';
4
+ export { DraggableContainer, BottomOpetateComponent, QuickOpetate };
3
5
  declare const _default: {
4
6
  DraggableContainer: ({ keys, onSortEnd, virtual, ...props }: {
5
7
  [x: string]: any;
@@ -5,16 +5,32 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
+ Object.defineProperty(exports, "BottomOpetateComponent", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _bottomOpetateComponent.default;
12
+ }
13
+ });
8
14
  Object.defineProperty(exports, "DraggableContainer", {
9
15
  enumerable: true,
10
16
  get: function get() {
11
17
  return _DraggableContainer.default;
12
18
  }
13
19
  });
20
+ Object.defineProperty(exports, "QuickOpetate", {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _QuickOpetate.default;
24
+ }
25
+ });
14
26
  exports.default = void 0;
15
27
 
16
28
  var _DraggableContainer = _interopRequireDefault(require("./DraggableContainer"));
17
29
 
30
+ var _bottomOpetateComponent = _interopRequireDefault(require("./bottomOpetateComponent"));
31
+
32
+ var _QuickOpetate = _interopRequireDefault(require("./QuickOpetate"));
33
+
18
34
  var _default = {
19
35
  DraggableContainer: _DraggableContainer.default
20
36
  };
@@ -26,20 +26,47 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
26
26
  return t;
27
27
  };
28
28
 
29
+ // interface ItemType {
30
+ // children: React.ReactNode
31
+ // }
32
+ // interface ItemInstance {}
33
+ // @ts-ignore
29
34
  var Item = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
30
- var _b;
31
-
32
35
  var children = _a.children,
33
- props = __rest(_a, ["children"]);
36
+ props = __rest(_a, ["children"]); // const rProps = omit({ ...props, ...children.props }, [
37
+ // 'isSticky',
38
+ // 'colStart',
39
+ // 'colEnd',
40
+ // 'prefixCls',
41
+ // 'fixLeft',
42
+ // 'fixRight',
43
+ // 'lastFixLeft',
44
+ // 'firstFixRight',
45
+ // 'lastFixRight',
46
+ // 'firstFixLeft',
47
+ // 'isSticky',
48
+ // 'additionalProps',
49
+ // 'rowType',
50
+ // ])
51
+
34
52
 
35
- return /*#__PURE__*/_react.default.createElement("th", Object.assign({}, props, {
36
- ref: ref
37
- }), ((_b = children === null || children === void 0 ? void 0 : children.props) === null || _b === void 0 ? void 0 : _b.children) || children);
53
+ return (
54
+ /*#__PURE__*/
55
+ // <th {...rProps} ref={ref as any} />
56
+ _react.default.createElement("th", Object.assign({}, props, children.props, {
57
+ ref: ref
58
+ })) // <th {...props} ref={ref as any}>
59
+ // {(children as any)?.props?.children || children}
60
+ // </th>
61
+
62
+ );
38
63
  });
39
64
 
40
65
  function SortableItem(props) {
66
+ var id = props.id;
67
+
41
68
  var _useSortable = (0, _sortable.useSortable)({
42
- id: props.id
69
+ id: id
43
70
  }),
44
71
  attributes = _useSortable.attributes,
45
72
  listeners = _useSortable.listeners,
@@ -49,7 +76,9 @@ function SortableItem(props) {
49
76
 
50
77
  var style = {
51
78
  position: 'relative',
52
- transform: _utilities.CSS.Translate.toString(transform),
79
+ transform: _utilities.CSS.Translate.toString(transform ? Object.assign(Object.assign({}, transform), {
80
+ y: 0
81
+ }) : transform),
53
82
  transition: transition,
54
83
  touchAction: 'none',
55
84
  height: '40px',
@@ -538,6 +538,9 @@ p {
538
538
  width: 32px;
539
539
  padding: 0 8px;
540
540
  }
541
+ .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 {
542
+ height: 100%;
543
+ }
541
544
  .lm_editTable_warpper .lm_editTable_cell {
542
545
  cursor: pointer;
543
546
  height: 40px;
@@ -552,6 +555,14 @@ p {
552
555
  .lm_editTable_warpper .lm_custom_cell_td {
553
556
  position: relative;
554
557
  }
558
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append {
559
+ display: flex;
560
+ flex-direction: row;
561
+ flex-wrap: nowrap;
562
+ }
563
+ .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
564
+ flex: 1 1 auto;
565
+ }
555
566
  .lm_editTable_warpper .lm_custom_cell_td .ant-form-item-control-input-content {
556
567
  display: flex;
557
568
  flex-direction: row;
@@ -600,6 +611,9 @@ p {
600
611
  .lm_editTable_warpper .lm_table_quickcopy .anticon {
601
612
  color: var(--text-color);
602
613
  }
614
+ .lm_editTable_warpper .ant-table-body {
615
+ scroll-behavior: smooth;
616
+ }
603
617
  .lm_editTable_warpper .icon_drag {
604
618
  color: var(--tip-text-color);
605
619
  }
@@ -613,6 +627,12 @@ p {
613
627
  padding-left: 8px;
614
628
  padding-right: 8px;
615
629
  }
630
+ .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 {
631
+ background-color: rgba(0, 0, 0, 0.06) !important;
632
+ }
633
+ .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 {
634
+ background-color: rgba(0, 0, 0, 0.06) !important;
635
+ }
616
636
  .lm_editTable_warpper .ant-picker {
617
637
  height: 24px !important;
618
638
  padding: 2px 8px;
@@ -26,6 +26,9 @@
26
26
  width: 32px;
27
27
  padding: 0 8px;
28
28
  }
29
+ .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 {
30
+ height: 100%;
31
+ }
29
32
  .lm_editTable_warpper .lm_editTable_cell {
30
33
  cursor: pointer;
31
34
  height: 40px;
@@ -40,6 +43,14 @@
40
43
  .lm_editTable_warpper .lm_custom_cell_td {
41
44
  position: relative;
42
45
  }
46
+ .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append {
47
+ display: flex;
48
+ flex-direction: row;
49
+ flex-wrap: nowrap;
50
+ }
51
+ .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
52
+ flex: 1 1 auto;
53
+ }
43
54
  .lm_editTable_warpper .lm_custom_cell_td .ant-form-item-control-input-content {
44
55
  display: flex;
45
56
  flex-direction: row;
@@ -88,6 +99,9 @@
88
99
  .lm_editTable_warpper .lm_table_quickcopy .anticon {
89
100
  color: var(--text-color);
90
101
  }
102
+ .lm_editTable_warpper .ant-table-body {
103
+ scroll-behavior: smooth;
104
+ }
91
105
  .lm_editTable_warpper .icon_drag {
92
106
  color: var(--tip-text-color);
93
107
  }
@@ -101,6 +115,12 @@
101
115
  padding-left: 8px;
102
116
  padding-right: 8px;
103
117
  }
118
+ .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 {
119
+ background-color: rgba(0, 0, 0, 0.06) !important;
120
+ }
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 {
122
+ background-color: rgba(0, 0, 0, 0.06) !important;
123
+ }
104
124
  .lm_editTable_warpper .ant-picker {
105
125
  height: 24px !important;
106
126
  padding: 2px 8px;
@@ -28,19 +28,20 @@ function isObjEmpty(obj) {
28
28
  function deepDataSourcePreKeys(dataSource, rowKey) {
29
29
  var deepDataSource = [];
30
30
 
31
- var eachChildren = function eachChildren(children, preKeys) {
32
- children === null || children === void 0 ? void 0 : children.forEach(function (item) {
31
+ var eachChildren = function eachChildren(children, preKeys, deepIds) {
32
+ children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
33
33
  deepDataSource.push(Object.assign(Object.assign({}, item), {
34
- preKeys: [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]])
34
+ preKeys: [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]),
35
+ _deepIds: [].concat((0, _toConsumableArray2.default)(deepIds), [index + 1])
35
36
  }));
36
37
 
37
38
  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]] })
39
+ 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
40
  }
40
41
  });
41
42
  };
42
43
 
43
- eachChildren(dataSource, []);
44
+ eachChildren(dataSource, [], []);
44
45
  return (0, _lodash.keyBy)(deepDataSource, rowKey);
45
46
  }
46
47
 
@@ -74,7 +75,7 @@ function checkRowKeyByDataSource(dataSource, rowKey) {
74
75
 
75
76
  return Object.assign(Object.assign({}, v), (0, _defineProperty2.default)({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
76
77
  });
77
- return res;
78
+ return res || [];
78
79
  }
79
80
 
80
81
  function getExpandStatus(children) {
@@ -84,7 +85,7 @@ function getExpandStatus(children) {
84
85
  }
85
86
 
86
87
  function checkMemoShouldUploadSpecialFun(prev, next) {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
88
89
 
89
90
  var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
90
91
 
@@ -94,24 +95,59 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
94
95
 
95
96
  var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
96
97
  var nextCol = next === null || next === void 0 ? void 0 : next.col;
98
+ /** TODO: 使用了自定义render, 是否要判断rowIndex? 这样排序之后,渲染的性能就会变差 */
97
99
 
98
- 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)) {
99
- return (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);
100
+ 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']))) {
101
+ return false;
102
+ }
103
+
104
+ if (prev.isEdit !== next.isEdit) {
105
+ return false;
106
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
107
+
108
+
109
+ 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'])))) {
110
+ return false;
111
+ }
112
+
113
+ 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)) {
114
+ return false;
115
+ }
116
+
117
+ 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)) {
118
+ return false;
119
+ }
120
+
121
+ 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)) {
122
+ return false;
123
+ }
124
+
125
+ 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)) {
126
+ return false;
127
+ }
128
+
129
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.order) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) && !(0, _lodash.isEqual)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.order, nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) {
130
+ // return isEqual(prevCol?.order, nextCol?.fixed)
131
+ return false;
132
+ }
133
+
134
+ if (next.className.indexOf('drag-visible') > -1) {
135
+ return (0, _lodash.isEqual)(prev.style, next.style);
136
+ }
137
+
138
+ if (next.className.indexOf('ant-table-selection-column') > -1) {
139
+ 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);
100
140
  }
101
141
  /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
102
142
 
103
143
 
104
- if (((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.quickcopy) || ((_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.quickcopy)) {
144
+ 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)) {
105
145
  var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
106
146
  var p = (0, _lodash.pick)(prev, pickProps);
107
147
  var n = (0, _lodash.pick)(next, pickProps);
108
148
  return (0, _lodash.isEqual)(p, n);
109
149
  }
110
150
 
111
- if (next.className.indexOf('ant-table-selection-column') > -1) {
112
- return (0, _lodash.isEqual)((_h = (_g = prev.children) === null || _g === void 0 ? void 0 : _g[1]) === null || _h === void 0 ? void 0 : _h.props, (_k = (_j = next.children) === null || _j === void 0 ? void 0 : _j[1]) === null || _k === void 0 ? void 0 : _k.props);
113
- }
114
-
115
151
  return true;
116
152
  }
117
153
 
@@ -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,