@luck-design-biz/luckda 1.0.1 → 1.0.2-2

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 (474) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -40
  3. package/es/components/LDActions/index.less +70 -68
  4. package/es/components/LdAutoForm/index.js +2 -1
  5. package/es/components/LdCard/index.js +154 -67
  6. package/es/components/LdFormList/index.js +20 -6
  7. package/es/components/LdGrid/index.js +4 -4
  8. package/es/components/LdGridForm/index.js +40 -24
  9. package/es/components/LdGridForm/index.less +7 -7
  10. package/es/components/LdTree/index.js +14 -8
  11. package/es/components/LdTree/index.less +42 -40
  12. package/es/helper/action.js +6 -6
  13. package/es/helper/form.js +14 -14
  14. package/es/helper/index.less +7 -7
  15. package/es/helper/ldBuilder.js +1 -1
  16. package/es/locales/zh-CN.js +13 -4
  17. package/es/lowcode/constants/api-url.js +87 -87
  18. package/es/lowcode/constants/index.js +1 -1
  19. package/es/lowcode/engine/meta/cardlist.props.default.json +27 -6
  20. package/es/lowcode/engine/meta/cardlist.props.json +254 -72
  21. package/es/lowcode/engine/meta/components-list.json +12 -108
  22. package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
  23. package/es/lowcode/engine/meta/dialog.props.json +74 -18
  24. package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
  25. package/es/lowcode/engine/meta/drawer.props.json +144 -24
  26. package/es/lowcode/engine/meta/form.props.default.json +14 -3
  27. package/es/lowcode/engine/meta/form.props.json +49 -9
  28. package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
  29. package/es/lowcode/engine/meta/grouptree.props.json +83 -0
  30. package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
  31. package/es/lowcode/engine/meta/iframe.props.json +3 -4
  32. package/es/lowcode/engine/meta/image.props.default.json +3 -2
  33. package/es/lowcode/engine/meta/image.props.json +51 -16
  34. package/es/lowcode/engine/meta/imex.props.json +1 -1
  35. package/es/lowcode/engine/meta/js-editor/auto-complete.json +49 -31
  36. package/es/lowcode/engine/meta/link.props.default.json +1 -1
  37. package/es/lowcode/engine/meta/link.props.json +9 -9
  38. package/es/lowcode/engine/meta/table.props.json +1 -1
  39. package/es/lowcode/engine/meta/tabs.props.default.json +1 -1
  40. package/es/lowcode/engine/meta/tabs.props.json +1 -1
  41. package/es/lowcode/engine/meta/tree.props.json +2 -2
  42. package/es/lowcode/engine/provider/ContextProvider/index.js +50 -46
  43. package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +82 -2
  44. package/es/lowcode/engine/tools/dataProcess.js +76 -76
  45. package/es/lowcode/engine/tools/helper.js +21 -0
  46. package/es/lowcode/engine/tools/useCanvasRender.js +13 -1
  47. package/es/lowcode/painter/Components.js +8 -3
  48. package/es/lowcode/painter/Design.js +1 -0
  49. package/es/lowcode/painter/DesignOperator.js +25 -15
  50. package/es/lowcode/painter/DesignToolbar.js +78 -47
  51. package/es/lowcode/painter/Ribbon.js +14 -1
  52. package/es/lowcode/painter/components/ActionBindModal.js +3 -7
  53. package/es/lowcode/painter/components/AdvancePanel.js +11 -4
  54. package/es/lowcode/painter/components/Collapse.js +26 -26
  55. package/es/lowcode/painter/components/ColorInput.js +24 -24
  56. package/es/lowcode/painter/components/DragDrop/DragDropContext.js +144 -37
  57. package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +29 -6
  58. package/es/lowcode/painter/components/DragDrop/Overlay.js +5 -2
  59. package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
  60. package/es/lowcode/painter/components/ListEditor.js +24 -24
  61. package/es/lowcode/painter/components/NumberInput.js +29 -29
  62. package/es/lowcode/painter/components/PanelItem.js +24 -24
  63. package/es/lowcode/painter/components/PopConfirm.js +8 -8
  64. package/es/lowcode/painter/components/PopForm.js +27 -27
  65. package/es/lowcode/painter/components/RuleInput.js +30 -30
  66. package/es/lowcode/painter/components/SortBox.js +22 -22
  67. package/es/lowcode/painter/components/code-editor/BaseEditor.js +38 -33
  68. package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
  69. package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
  70. package/es/lowcode/painter/components/code-editor/JSEditor.js +20 -20
  71. package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
  72. package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
  73. package/es/lowcode/painter/components/field-setting/SettingUI.js +30 -2
  74. package/es/lowcode/painter/components/field-setting/index.js +26 -12
  75. package/es/lowcode/painter/expect.js +27 -0
  76. package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +20 -2
  77. package/es/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
  78. package/es/lowcode/painter/panel-section/ComplexPop.js +1 -1
  79. package/es/lowcode/painter/panel-section/DataSetSelector.js +14 -3
  80. package/es/lowcode/painter/panel-section/FieldState.js +11 -2
  81. package/es/lowcode/painter/panel-section/FieldsSetting.js +2 -2
  82. package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
  83. package/es/lowcode/painter/panel-section/Icon.js +23 -23
  84. package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
  85. package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
  86. package/es/lowcode/painter/panel-section/PageVars.js +1 -1
  87. package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
  88. package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
  89. package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
  90. package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
  91. package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
  92. package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
  93. package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
  94. package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
  95. package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
  96. package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
  97. package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
  98. package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
  99. package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +10 -2
  100. package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
  101. package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
  102. package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
  103. package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
  104. package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
  105. package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
  106. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -2
  107. package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
  108. package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
  109. package/es/lowcode/painter/panel-section/StylePanel/index.js +15 -15
  110. package/es/lowcode/painter/panel-section/TabItems.js +1 -1
  111. package/es/lowcode/painter/panel-section/TableTopFilter.js +3 -3
  112. package/es/lowcode/painter/panel-section/TableZebra.js +5 -1
  113. package/es/lowcode/painter/panel-section/TextContent.js +10 -2
  114. package/es/lowcode/painter/style/action-bind-modal.less +104 -102
  115. package/es/lowcode/painter/style/actions-editor.less +15 -15
  116. package/es/lowcode/painter/style/border-editor.less +36 -36
  117. package/es/lowcode/painter/style/border-radius-selector.less +42 -42
  118. package/es/lowcode/painter/style/border-selector.less +39 -39
  119. package/es/lowcode/painter/style/button-type.less +5 -5
  120. package/es/lowcode/painter/style/collapse.less +28 -28
  121. package/es/lowcode/painter/style/color-input.less +19 -19
  122. package/es/lowcode/painter/style/components.less +91 -91
  123. package/es/lowcode/painter/style/design.less +179 -160
  124. package/es/lowcode/painter/style/display.less +17 -17
  125. package/es/lowcode/painter/style/dragdrop.less +56 -10
  126. package/es/lowcode/painter/style/fields-setting.less +25 -25
  127. package/es/lowcode/painter/style/font-editor.less +9 -9
  128. package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
  129. package/es/lowcode/painter/style/icon-selector.less +22 -22
  130. package/es/lowcode/painter/style/icon.less +10 -10
  131. package/es/lowcode/painter/style/impexp.less +7 -7
  132. package/es/lowcode/painter/style/index.less +6 -6
  133. package/es/lowcode/painter/style/layout-ratio.less +51 -51
  134. package/es/lowcode/painter/style/list-editor.less +97 -95
  135. package/es/lowcode/painter/style/number-input.less +19 -17
  136. package/es/lowcode/painter/style/outline.less +30 -28
  137. package/es/lowcode/painter/style/page-layout-display.less +27 -27
  138. package/es/lowcode/painter/style/page-vars.less +25 -25
  139. package/es/lowcode/painter/style/panel-attrs.less +47 -43
  140. package/es/lowcode/painter/style/panel-item.less +54 -54
  141. package/es/lowcode/painter/style/panel.less +100 -98
  142. package/es/lowcode/painter/style/pop-confirm.less +17 -17
  143. package/es/lowcode/painter/style/pop-form.less +19 -19
  144. package/es/lowcode/painter/style/radio.less +24 -24
  145. package/es/lowcode/painter/style/ribbon.less +7 -5
  146. package/es/lowcode/painter/style/rule-input.less +12 -12
  147. package/es/lowcode/painter/style/split-display.less +18 -18
  148. package/es/lowcode/painter/style/style-panel.less +37 -37
  149. package/es/lowcode/painter/style/tabitems.less +90 -90
  150. package/es/lowcode/painter/svg/code.svg +3 -0
  151. package/es/lowcode/painter/svg/expect.svg +9 -0
  152. package/es/lowcode/view/lc-components/Box/index.js +4 -4
  153. package/es/lowcode/view/lc-components/Box/index.less +14 -14
  154. package/es/lowcode/view/lc-components/Box/meta.json +40 -40
  155. package/es/lowcode/view/lc-components/Button/index.js +33 -33
  156. package/es/lowcode/view/lc-components/Button/meta.json +127 -127
  157. package/es/lowcode/view/lc-components/Button/style.less +2 -2
  158. package/es/lowcode/view/lc-components/CardList/index.js +481 -12
  159. package/es/lowcode/view/lc-components/CardList/meta.json +335 -153
  160. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
  161. package/es/lowcode/view/lc-components/Dialog/index.js +28 -18
  162. package/es/lowcode/view/lc-components/Dialog/index.less +12 -8
  163. package/es/lowcode/view/lc-components/Dialog/meta.json +204 -150
  164. package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
  165. package/es/lowcode/view/lc-components/Drawer/index.js +149 -34
  166. package/es/lowcode/view/lc-components/Drawer/index.less +13 -10
  167. package/es/lowcode/view/lc-components/Drawer/meta.json +242 -131
  168. package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
  169. package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
  170. package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -141
  171. package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
  172. package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
  173. package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
  174. package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
  175. package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
  176. package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
  177. package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
  178. package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
  179. package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
  180. package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
  181. package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
  182. package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
  183. package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -129
  184. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
  185. package/es/lowcode/view/lc-components/Form/index.js +65 -48
  186. package/es/lowcode/view/lc-components/Form/meta.json +645 -609
  187. package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
  188. package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
  189. package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
  190. package/es/lowcode/view/lc-components/GroupTree/index.js +212 -0
  191. package/es/lowcode/view/lc-components/GroupTree/index.less +12 -0
  192. package/es/lowcode/view/lc-components/GroupTree/meta.json +83 -0
  193. package/es/lowcode/view/lc-components/Iframe/index.js +57 -7
  194. package/es/lowcode/view/lc-components/Iframe/meta.json +31 -32
  195. package/es/lowcode/view/lc-components/ImEx/index.js +25 -25
  196. package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
  197. package/es/lowcode/view/lc-components/ImEx/meta.json +134 -134
  198. package/es/lowcode/view/lc-components/Image/index.js +82 -6
  199. package/es/lowcode/view/lc-components/Image/index.less +27 -0
  200. package/es/lowcode/view/lc-components/Image/meta.json +149 -114
  201. package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
  202. package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
  203. package/es/lowcode/view/lc-components/Layout/index.js +16 -16
  204. package/es/lowcode/view/lc-components/Layout/index.less +5 -5
  205. package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
  206. package/es/lowcode/view/lc-components/Link/index.js +53 -5
  207. package/es/lowcode/view/lc-components/Link/index.less +15 -0
  208. package/es/lowcode/view/lc-components/Link/meta.json +112 -112
  209. package/es/lowcode/view/lc-components/Page/meta.json +61 -61
  210. package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
  211. package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
  212. package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
  213. package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
  214. package/es/lowcode/view/lc-components/Section/index.less +7 -7
  215. package/es/lowcode/view/lc-components/Section/meta.json +108 -108
  216. package/es/lowcode/view/lc-components/Split/meta.json +53 -53
  217. package/es/lowcode/view/lc-components/Table/index.js +152 -153
  218. package/es/lowcode/view/lc-components/Table/meta.json +450 -450
  219. package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +40 -4
  220. package/es/lowcode/view/lc-components/Tabs/index.js +24 -24
  221. package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
  222. package/es/lowcode/view/lc-components/Text/meta.json +56 -56
  223. package/es/lowcode/view/lc-components/Tree/index.js +117 -115
  224. package/es/lowcode/view/lc-components/Tree/index.less +4 -4
  225. package/es/lowcode/view/lc-components/Tree/meta.json +357 -357
  226. package/es/lowcode/view/style/canvas.less +5 -5
  227. package/es/lowcode/view/style/loading.less +98 -98
  228. package/es/lowcode/view/style/page.less +7 -7
  229. package/es/upload/FilesWall/index.js +13 -13
  230. package/es/upload/FilesWall/index.less +74 -74
  231. package/es/upload/Form/index.less +7 -7
  232. package/es/upload/FormItem/index.js +15 -15
  233. package/es/utils/form.js +21 -21
  234. package/es/utils/grid.js +3 -3
  235. package/lib/components/LDActions/index.less +70 -68
  236. package/lib/components/LdAutoForm/index.js +2 -1
  237. package/lib/components/LdCard/index.js +153 -66
  238. package/lib/components/LdFormList/index.js +19 -5
  239. package/lib/components/LdGrid/index.js +4 -4
  240. package/lib/components/LdGridForm/index.js +40 -24
  241. package/lib/components/LdGridForm/index.less +7 -7
  242. package/lib/components/LdTree/index.js +14 -8
  243. package/lib/components/LdTree/index.less +42 -40
  244. package/lib/helper/action.js +6 -6
  245. package/lib/helper/form.js +14 -14
  246. package/lib/helper/index.less +7 -7
  247. package/lib/helper/ldBuilder.js +2 -2
  248. package/lib/locales/zh-CN.js +13 -4
  249. package/lib/lowcode/constants/api-url.js +87 -87
  250. package/lib/lowcode/constants/index.js +1 -1
  251. package/lib/lowcode/engine/meta/cardlist.props.default.json +27 -6
  252. package/lib/lowcode/engine/meta/cardlist.props.json +254 -72
  253. package/lib/lowcode/engine/meta/components-list.json +12 -108
  254. package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
  255. package/lib/lowcode/engine/meta/dialog.props.json +74 -18
  256. package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
  257. package/lib/lowcode/engine/meta/drawer.props.json +144 -24
  258. package/lib/lowcode/engine/meta/form.props.default.json +14 -3
  259. package/lib/lowcode/engine/meta/form.props.json +49 -9
  260. package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
  261. package/lib/lowcode/engine/meta/grouptree.props.json +83 -0
  262. package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
  263. package/lib/lowcode/engine/meta/iframe.props.json +3 -4
  264. package/lib/lowcode/engine/meta/image.props.default.json +3 -2
  265. package/lib/lowcode/engine/meta/image.props.json +51 -16
  266. package/lib/lowcode/engine/meta/imex.props.json +1 -1
  267. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +49 -31
  268. package/lib/lowcode/engine/meta/link.props.default.json +1 -1
  269. package/lib/lowcode/engine/meta/link.props.json +9 -9
  270. package/lib/lowcode/engine/meta/table.props.json +1 -1
  271. package/lib/lowcode/engine/meta/tabs.props.default.json +1 -1
  272. package/lib/lowcode/engine/meta/tabs.props.json +1 -1
  273. package/lib/lowcode/engine/meta/tree.props.json +2 -2
  274. package/lib/lowcode/engine/provider/ContextProvider/index.js +50 -46
  275. package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +83 -3
  276. package/lib/lowcode/engine/tools/dataProcess.js +76 -76
  277. package/lib/lowcode/engine/tools/helper.js +22 -0
  278. package/lib/lowcode/engine/tools/useCanvasRender.js +13 -1
  279. package/lib/lowcode/painter/Components.js +8 -3
  280. package/lib/lowcode/painter/Design.js +1 -0
  281. package/lib/lowcode/painter/DesignOperator.js +25 -15
  282. package/lib/lowcode/painter/DesignToolbar.js +78 -47
  283. package/lib/lowcode/painter/Ribbon.js +14 -1
  284. package/lib/lowcode/painter/components/ActionBindModal.js +3 -7
  285. package/lib/lowcode/painter/components/AdvancePanel.js +10 -3
  286. package/lib/lowcode/painter/components/Collapse.js +26 -26
  287. package/lib/lowcode/painter/components/ColorInput.js +24 -24
  288. package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +142 -35
  289. package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +27 -4
  290. package/lib/lowcode/painter/components/DragDrop/Overlay.js +5 -2
  291. package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
  292. package/lib/lowcode/painter/components/ListEditor.js +24 -24
  293. package/lib/lowcode/painter/components/NumberInput.js +29 -29
  294. package/lib/lowcode/painter/components/PanelItem.js +24 -24
  295. package/lib/lowcode/painter/components/PopConfirm.js +8 -8
  296. package/lib/lowcode/painter/components/PopForm.js +27 -27
  297. package/lib/lowcode/painter/components/RuleInput.js +30 -30
  298. package/lib/lowcode/painter/components/SortBox.js +22 -22
  299. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +38 -33
  300. package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
  301. package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
  302. package/lib/lowcode/painter/components/code-editor/JSEditor.js +20 -20
  303. package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
  304. package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
  305. package/lib/lowcode/painter/components/field-setting/SettingUI.js +29 -1
  306. package/lib/lowcode/painter/components/field-setting/index.js +26 -12
  307. package/lib/lowcode/painter/expect.js +34 -0
  308. package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +19 -1
  309. package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
  310. package/lib/lowcode/painter/panel-section/ComplexPop.js +1 -1
  311. package/lib/lowcode/painter/panel-section/DataSetSelector.js +14 -3
  312. package/lib/lowcode/painter/panel-section/FieldState.js +11 -2
  313. package/lib/lowcode/painter/panel-section/FieldsSetting.js +2 -2
  314. package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
  315. package/lib/lowcode/painter/panel-section/Icon.js +23 -23
  316. package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
  317. package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
  318. package/lib/lowcode/painter/panel-section/PageVars.js +1 -1
  319. package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
  320. package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
  321. package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
  322. package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
  323. package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
  324. package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
  325. package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
  326. package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
  327. package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
  328. package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
  329. package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
  330. package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
  331. package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +10 -2
  332. package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
  333. package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
  334. package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
  335. package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
  336. package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
  337. package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
  338. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -2
  339. package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
  340. package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
  341. package/lib/lowcode/painter/panel-section/StylePanel/index.js +15 -15
  342. package/lib/lowcode/painter/panel-section/TabItems.js +1 -1
  343. package/lib/lowcode/painter/panel-section/TableTopFilter.js +3 -3
  344. package/lib/lowcode/painter/panel-section/TableZebra.js +5 -1
  345. package/lib/lowcode/painter/panel-section/TextContent.js +9 -1
  346. package/lib/lowcode/painter/style/action-bind-modal.less +104 -102
  347. package/lib/lowcode/painter/style/actions-editor.less +15 -15
  348. package/lib/lowcode/painter/style/border-editor.less +36 -36
  349. package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
  350. package/lib/lowcode/painter/style/border-selector.less +39 -39
  351. package/lib/lowcode/painter/style/button-type.less +5 -5
  352. package/lib/lowcode/painter/style/collapse.less +28 -28
  353. package/lib/lowcode/painter/style/color-input.less +19 -19
  354. package/lib/lowcode/painter/style/components.less +91 -91
  355. package/lib/lowcode/painter/style/design.less +179 -160
  356. package/lib/lowcode/painter/style/display.less +17 -17
  357. package/lib/lowcode/painter/style/dragdrop.less +56 -10
  358. package/lib/lowcode/painter/style/fields-setting.less +25 -25
  359. package/lib/lowcode/painter/style/font-editor.less +9 -9
  360. package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
  361. package/lib/lowcode/painter/style/icon-selector.less +22 -22
  362. package/lib/lowcode/painter/style/icon.less +10 -10
  363. package/lib/lowcode/painter/style/impexp.less +7 -7
  364. package/lib/lowcode/painter/style/index.less +6 -6
  365. package/lib/lowcode/painter/style/layout-ratio.less +51 -51
  366. package/lib/lowcode/painter/style/list-editor.less +97 -95
  367. package/lib/lowcode/painter/style/number-input.less +19 -17
  368. package/lib/lowcode/painter/style/outline.less +30 -28
  369. package/lib/lowcode/painter/style/page-layout-display.less +27 -27
  370. package/lib/lowcode/painter/style/page-vars.less +25 -25
  371. package/lib/lowcode/painter/style/panel-attrs.less +47 -43
  372. package/lib/lowcode/painter/style/panel-item.less +54 -54
  373. package/lib/lowcode/painter/style/panel.less +100 -98
  374. package/lib/lowcode/painter/style/pop-confirm.less +17 -17
  375. package/lib/lowcode/painter/style/pop-form.less +19 -19
  376. package/lib/lowcode/painter/style/radio.less +24 -24
  377. package/lib/lowcode/painter/style/ribbon.less +7 -5
  378. package/lib/lowcode/painter/style/rule-input.less +12 -12
  379. package/lib/lowcode/painter/style/split-display.less +18 -18
  380. package/lib/lowcode/painter/style/style-panel.less +37 -37
  381. package/lib/lowcode/painter/style/tabitems.less +90 -90
  382. package/lib/lowcode/painter/svg/code.svg +3 -0
  383. package/lib/lowcode/painter/svg/expect.svg +9 -0
  384. package/lib/lowcode/view/lc-components/Box/index.js +4 -4
  385. package/lib/lowcode/view/lc-components/Box/index.less +14 -14
  386. package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
  387. package/lib/lowcode/view/lc-components/Button/index.js +33 -33
  388. package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
  389. package/lib/lowcode/view/lc-components/Button/style.less +2 -2
  390. package/lib/lowcode/view/lc-components/CardList/index.js +480 -11
  391. package/lib/lowcode/view/lc-components/CardList/meta.json +335 -153
  392. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
  393. package/lib/lowcode/view/lc-components/Dialog/index.js +28 -18
  394. package/lib/lowcode/view/lc-components/Dialog/index.less +12 -8
  395. package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -150
  396. package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
  397. package/lib/lowcode/view/lc-components/Drawer/index.js +148 -33
  398. package/lib/lowcode/view/lc-components/Drawer/index.less +13 -10
  399. package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -131
  400. package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
  401. package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
  402. package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -141
  403. package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
  404. package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
  405. package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
  406. package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
  407. package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
  408. package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
  409. package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
  410. package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
  411. package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
  412. package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
  413. package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
  414. package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
  415. package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -129
  416. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
  417. package/lib/lowcode/view/lc-components/Form/index.js +64 -47
  418. package/lib/lowcode/view/lc-components/Form/meta.json +645 -609
  419. package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
  420. package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
  421. package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
  422. package/lib/lowcode/view/lc-components/GroupTree/index.js +220 -0
  423. package/lib/lowcode/view/lc-components/GroupTree/index.less +12 -0
  424. package/lib/lowcode/view/lc-components/GroupTree/meta.json +83 -0
  425. package/lib/lowcode/view/lc-components/Iframe/index.js +55 -5
  426. package/lib/lowcode/view/lc-components/Iframe/meta.json +31 -32
  427. package/lib/lowcode/view/lc-components/ImEx/index.js +25 -25
  428. package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
  429. package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -134
  430. package/lib/lowcode/view/lc-components/Image/index.js +80 -4
  431. package/lib/lowcode/view/lc-components/Image/index.less +27 -0
  432. package/lib/lowcode/view/lc-components/Image/meta.json +149 -114
  433. package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
  434. package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
  435. package/lib/lowcode/view/lc-components/Layout/index.js +16 -16
  436. package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
  437. package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
  438. package/lib/lowcode/view/lc-components/Link/index.js +52 -4
  439. package/lib/lowcode/view/lc-components/Link/index.less +15 -0
  440. package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
  441. package/lib/lowcode/view/lc-components/Page/meta.json +61 -61
  442. package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
  443. package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
  444. package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
  445. package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
  446. package/lib/lowcode/view/lc-components/Section/index.less +7 -7
  447. package/lib/lowcode/view/lc-components/Section/meta.json +108 -108
  448. package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
  449. package/lib/lowcode/view/lc-components/Table/index.js +152 -153
  450. package/lib/lowcode/view/lc-components/Table/meta.json +450 -450
  451. package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +38 -2
  452. package/lib/lowcode/view/lc-components/Tabs/index.js +24 -24
  453. package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
  454. package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
  455. package/lib/lowcode/view/lc-components/Tree/index.js +116 -114
  456. package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
  457. package/lib/lowcode/view/lc-components/Tree/meta.json +357 -357
  458. package/lib/lowcode/view/style/canvas.less +5 -5
  459. package/lib/lowcode/view/style/loading.less +98 -98
  460. package/lib/lowcode/view/style/page.less +7 -7
  461. package/lib/upload/FilesWall/index.js +13 -13
  462. package/lib/upload/FilesWall/index.less +74 -74
  463. package/lib/upload/Form/index.less +7 -7
  464. package/lib/upload/FormItem/index.js +15 -15
  465. package/lib/utils/form.js +21 -21
  466. package/lib/utils/grid.js +2 -2
  467. package/lowcode.js +1 -1
  468. package/package.json +176 -175
  469. package/upload.js +1 -1
  470. package/utils.js +1 -1
  471. package/es/lowcode/painter/style/treedragdrop.less +0 -19
  472. package/es/lowcode/view/lc-components/Form/index.less +0 -5
  473. package/lib/lowcode/painter/style/treedragdrop.less +0 -19
  474. package/lib/lowcode/view/lc-components/Form/index.less +0 -5
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 UmiJS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 UmiJS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,40 +1,40 @@
1
- # 微服务 3.0 纯净版
2
-
3
- luck-react-pure 是一个基于 qiankun 框架搭建的极简微服务框架,作为微服务业务子系统的开发基座。旨在为业务子系统提供简单、轻量的解决方案。该框架去除了冗余的功能,专注于提供基本的功能支持,使开发者能够更快速地搭建和开发业务子系统。
4
-
5
- ## 启动
6
-
7
- 安装 `node_modules`:
8
-
9
- ```bash
10
- pnpm install
11
- ```
12
-
13
- ## 开始项目
14
-
15
- ```bash
16
- pnpm start
17
- ```
18
-
19
- ## 代码校验
20
-
21
- 本框架提供了代码校验方案,校验不通过禁止提交代码,当提交代码时将会校验以下内容:
22
-
23
- ### 代码规范
24
-
25
- 根据 eslint 校验规范。
26
-
27
- ### commit message 校验
28
-
29
- commit message 格式:
30
-
31
- ```bash
32
- 💥 feat(模块): 添加了个很棒的功能
33
- 🐛 fix(模块): 修复了一些 bug
34
- 📝 docs(模块): 更新了一下文档
35
- 💄 UI(模块): 修改了一下样式
36
- 🎨 chore(模块): 对脚手架做了些更改
37
- 🚨 refactor(模块): 重构(即不是新增功能,也不是修改bug的代码变动)
38
- 🐞 test(模块): 增加、修改测试用例
39
- 🌟 release(3.0.1):url
40
- ```
1
+ # 微服务 3.0 纯净版
2
+
3
+ luck-react-pure 是一个基于 qiankun 框架搭建的极简微服务框架,作为微服务业务子系统的开发基座。旨在为业务子系统提供简单、轻量的解决方案。该框架去除了冗余的功能,专注于提供基本的功能支持,使开发者能够更快速地搭建和开发业务子系统。
4
+
5
+ ## 启动
6
+
7
+ 安装 `node_modules`:
8
+
9
+ ```bash
10
+ pnpm install
11
+ ```
12
+
13
+ ## 开始项目
14
+
15
+ ```bash
16
+ pnpm start
17
+ ```
18
+
19
+ ## 代码校验
20
+
21
+ 本框架提供了代码校验方案,校验不通过禁止提交代码,当提交代码时将会校验以下内容:
22
+
23
+ ### 代码规范
24
+
25
+ 根据 eslint 校验规范。
26
+
27
+ ### commit message 校验
28
+
29
+ commit message 格式:
30
+
31
+ ```bash
32
+ 💥 feat(模块): 添加了个很棒的功能
33
+ 🐛 fix(模块): 修复了一些 bug
34
+ 📝 docs(模块): 更新了一下文档
35
+ 💄 UI(模块): 修改了一下样式
36
+ 🎨 chore(模块): 对脚手架做了些更改
37
+ 🚨 refactor(模块): 重构(即不是新增功能,也不是修改bug的代码变动)
38
+ 🐞 test(模块): 增加、修改测试用例
39
+ 🌟 release(3.0.1):url
40
+ ```
@@ -1,68 +1,70 @@
1
- @spanDefault: #262626;
2
- @spanPrimary: var(--ant-primary-color);
3
- @spanDanger: #ff4d4f;
4
- @spanDestroy: #820014;
5
-
6
- .ldActions {
7
-
8
- button:not(:last-child) {
9
- margin-right: 4px;
10
- }
11
- button:not(:first-child) {
12
- margin-left: 4px;
13
- }
14
- span {
15
- cursor: pointer;
16
- }
17
-
18
- button.default {
19
- background-color: white;
20
- }
21
- span.default {
22
- color: @spanDefault;
23
- }
24
-
25
- button.primary {
26
- background-color: var(--ant-primary-color);
27
- border-color: var(--ant-primary-color);
28
- color: white;
29
- }
30
- span.primary {
31
- color: @spanPrimary;
32
- }
33
-
34
- button.danger {
35
- background-color: #ff4d4f;
36
- border-color: #ff4d4f;
37
- color: white;
38
- }
39
- span.danger {
40
- color: @spanDanger;
41
- }
42
-
43
- button.destroy {
44
- background-color: #820014;
45
- border-color: #820014;
46
- color: white;
47
- }
48
- span.destroy {
49
- color: @spanDestroy;
50
- }
51
-
52
- span.disabled {
53
- color: #bfbfbf;
54
- cursor: not-allowed;
55
- }
56
- }
57
- span.default.menuItem {
58
- color: @spanDefault;
59
- }
60
- span.primary.menuItem {
61
- color: @spanPrimary;
62
- }
63
- span.danger.menuItem {
64
- color: @spanDanger;
65
- }
66
- span.destroy.menuItem {
67
- color: @spanDestroy;
68
- }
1
+ @import '~@luck-helper/ui-design/es/style/themes/default.less';
2
+
3
+ @spanDefault: #262626;
4
+ @spanPrimary: var(--ant-primary-color);
5
+ @spanDanger: #ff4d4f;
6
+ @spanDestroy: #820014;
7
+
8
+ .ldActions {
9
+
10
+ button:not(:last-child) {
11
+ margin-right: 4px;
12
+ }
13
+ button:not(:first-child) {
14
+ margin-left: 4px;
15
+ }
16
+ span {
17
+ cursor: pointer;
18
+ }
19
+
20
+ button.default {
21
+ background-color: @component-background;
22
+ }
23
+ span.default {
24
+ color: @spanDefault;
25
+ }
26
+
27
+ button.primary {
28
+ background-color: var(--ant-primary-color);
29
+ border-color: var(--ant-primary-color);
30
+ color: white;
31
+ }
32
+ span.primary {
33
+ color: @spanPrimary;
34
+ }
35
+
36
+ button.danger {
37
+ background-color: #ff4d4f;
38
+ border-color: #ff4d4f;
39
+ color: white;
40
+ }
41
+ span.danger {
42
+ color: @spanDanger;
43
+ }
44
+
45
+ button.destroy {
46
+ background-color: #820014;
47
+ border-color: #820014;
48
+ color: white;
49
+ }
50
+ span.destroy {
51
+ color: @spanDestroy;
52
+ }
53
+
54
+ span.disabled {
55
+ color: #bfbfbf;
56
+ cursor: not-allowed;
57
+ }
58
+ }
59
+ span.default.menuItem {
60
+ color: @spanDefault;
61
+ }
62
+ span.primary.menuItem {
63
+ color: @spanPrimary;
64
+ }
65
+ span.danger.menuItem {
66
+ color: @spanDanger;
67
+ }
68
+ span.destroy.menuItem {
69
+ color: @spanDestroy;
70
+ }
@@ -72,7 +72,8 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
72
72
  var col = columnsObj[key];
73
73
  if ((setting === null || setting === void 0 ? void 0 : setting._type) === 'divider') {
74
74
  result.push( /*#__PURE__*/React.createElement(BasicDivider, {
75
- title: setting === null || setting === void 0 ? void 0 : setting.fieldAliasName
75
+ title: setting === null || setting === void 0 ? void 0 : setting.fieldAliasName,
76
+ key: key
76
77
  }));
77
78
  } else if (col !== null && col !== void 0 && col.isShowInForm && (isNil(setting) || setting !== null && setting !== void 0 && setting.isShow)) {
78
79
  var customFiled = filedsRewrite.find(function (_field) {
@@ -1,11 +1,13 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
2
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "loading", "wrapperRef", "hasMore", "list", "detail", "params", "doQuery", "onQuery", "unclosableSet", "formatDataSource", "resultSet", "cardConfig", "cardActions", "onOperationsClick", "readOnly", "batchOperations", "readFilter"],
5
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
+ var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "namespace", "loading", "wrapperRef", "hasMore", "list", "detail", "params", "doQuery", "onQuery", "unclosableSet", "formatDataSource", "resultSet", "cardConfig", "maxActionsCount", "cardActions", "onOperationsClick", "readOnly", "batchOperations", "readFilter", "wrapper", "wrapperProps", "draggable", "onDrop", "onMount", "onUnmount"],
6
7
  _excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery"];
7
- import React, { forwardRef, useImperativeHandle, useRef, useEffect } from 'react';
8
+ import React, { forwardRef, useImperativeHandle, useRef, useEffect, useLayoutEffect } from 'react';
8
9
  import { getDvaApp } from 'umi';
10
+ import classNames from 'classnames';
9
11
  import PropTypes from 'prop-types';
10
12
  import { Icon, Tooltip } from 'luck-design/antd';
11
13
  import { ResultSet, PermissionUtil } from 'luck-design';
@@ -16,37 +18,92 @@ import ldBuilder from "../../helper/ldBuilder";
16
18
  import { CardList, Card } from '@luck-design-biz/base/List';
17
19
  import { formatMessage } from '@luck-design-biz/base/utils';
18
20
  import { build } from '@luck-design-biz/base/Component';
19
- var LdCard = function LdCard(_ref) {
20
- var columns = _ref.columns,
21
- resources = _ref.resources,
22
- actions = _ref.actions,
23
- doAction = _ref.doAction,
24
- afterInit = _ref.afterInit,
25
- namespace = _ref.namespace,
26
- loading = _ref.loading,
27
- wrapperRef = _ref.wrapperRef,
28
- hasMore = _ref.hasMore,
29
- list = _ref.list,
30
- detail = _ref.detail,
31
- params = _ref.params,
32
- doQuery = _ref.doQuery,
33
- onQuery = _ref.onQuery,
34
- unclosableSet = _ref.unclosableSet,
35
- formatDataSource = _ref.formatDataSource,
36
- resultSet = _ref.resultSet,
37
- cardConfig = _ref.cardConfig,
38
- cardActions = _ref.cardActions,
21
+ var Action = function Action(_ref) {
22
+ var data = _ref.data,
23
+ action = _ref.action,
39
24
  onOperationsClick = _ref.onOperationsClick,
40
- readOnly = _ref.readOnly,
41
- batchOperations = _ref.batchOperations,
42
- readFilter = _ref.readFilter,
43
- props = _objectWithoutProperties(_ref, _excluded);
25
+ _ref$inPopover = _ref.inPopover,
26
+ inPopover = _ref$inPopover === void 0 ? false : _ref$inPopover;
27
+ var style = _objectSpread({
28
+ fontSize: '18px'
29
+ }, action.style);
30
+ if (action.disabled) style.color = 'var(--luck-color-disabled)';
31
+ if (inPopover) style = _objectSpread(_objectSpread({}, style), {}, {
32
+ display: 'flex',
33
+ cursor: 'pointer'
34
+ });
35
+ if (action.render) return /*#__PURE__*/React.createElement("div", {
36
+ style: style
37
+ }, action.render());
38
+ var renderDiv = function renderDiv(_title) {
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ style: style,
41
+ onClick: function onClick(e) {
42
+ e.stopPropagation();
43
+ action.onClick ? action.onClick(data, e) : onOperationsClick(action.key, data, e);
44
+ }
45
+ }, action.iconNode ? action.iconNode : /*#__PURE__*/React.createElement(Icon, {
46
+ type: action.icon
47
+ }), _title && /*#__PURE__*/React.createElement("span", {
48
+ style: {
49
+ marginLeft: '4px',
50
+ fontSize: '12px'
51
+ }
52
+ }, _title));
53
+ };
54
+ if (inPopover) return renderDiv(action.title);
55
+ return /*#__PURE__*/React.createElement(Tooltip, {
56
+ placement: "top",
57
+ title: action.title
58
+ }, renderDiv());
59
+ };
60
+ var LdCard = function LdCard(_ref2) {
61
+ var columns = _ref2.columns,
62
+ resources = _ref2.resources,
63
+ actions = _ref2.actions,
64
+ doAction = _ref2.doAction,
65
+ afterInit = _ref2.afterInit,
66
+ namespace = _ref2.namespace,
67
+ loading = _ref2.loading,
68
+ wrapperRef = _ref2.wrapperRef,
69
+ hasMore = _ref2.hasMore,
70
+ list = _ref2.list,
71
+ detail = _ref2.detail,
72
+ params = _ref2.params,
73
+ doQuery = _ref2.doQuery,
74
+ onQuery = _ref2.onQuery,
75
+ unclosableSet = _ref2.unclosableSet,
76
+ formatDataSource = _ref2.formatDataSource,
77
+ resultSet = _ref2.resultSet,
78
+ cardConfig = _ref2.cardConfig,
79
+ maxActionsCount = _ref2.maxActionsCount,
80
+ cardActions = _ref2.cardActions,
81
+ onOperationsClick = _ref2.onOperationsClick,
82
+ readOnly = _ref2.readOnly,
83
+ batchOperations = _ref2.batchOperations,
84
+ readFilter = _ref2.readFilter,
85
+ wrapper = _ref2.wrapper,
86
+ wrapperProps = _ref2.wrapperProps,
87
+ draggable = _ref2.draggable,
88
+ onDrop = _ref2.onDrop,
89
+ onMount = _ref2.onMount,
90
+ onUnmount = _ref2.onUnmount,
91
+ props = _objectWithoutProperties(_ref2, _excluded);
44
92
  var cardRef = useRef(null);
45
93
  useEffect(function () {
46
94
  readFilter && readFilter(params);
47
95
  }, [params]);
48
96
  useImperativeHandle(wrapperRef, function () {
49
97
  return _objectSpread(_objectSpread({}, cardRef.current), {}, {
98
+ getProps: function getProps() {
99
+ var _getDvaApp;
100
+ return {
101
+ apiUrl: (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 || (_getDvaApp = _getDvaApp._store.getState()[namespace]) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp.apiUrl,
102
+ filter: {
103
+ params: params
104
+ }
105
+ };
106
+ },
50
107
  onLdQuery: function onLdQuery() {
51
108
  var _params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
52
109
  doQuery({
@@ -56,6 +113,14 @@ var LdCard = function LdCard(_ref) {
56
113
  }
57
114
  });
58
115
  });
116
+ useLayoutEffect(function () {
117
+ onMount && onMount({
118
+ params: params
119
+ });
120
+ return function () {
121
+ onUnmount && onUnmount();
122
+ };
123
+ }, []);
59
124
  var _batchOperations = useCreation(function () {
60
125
  return (batchOperations || []).map(function (i) {
61
126
  return _objectSpread(_objectSpread({}, i), {}, {
@@ -66,6 +131,7 @@ var LdCard = function LdCard(_ref) {
66
131
  var renderCard = useMemoizedFn(function (item) {
67
132
  return /*#__PURE__*/React.createElement(Card, _extends({}, cardConfig, {
68
133
  dataSource: item,
134
+ showDragHandle: draggable,
69
135
  operates: readOnly ? [] : item['__infuse_serial__'] || resources,
70
136
  onCardClick: function onCardClick(_item, e) {
71
137
  return onOperationsClick && onOperationsClick('read', _item, e);
@@ -73,33 +139,51 @@ var LdCard = function LdCard(_ref) {
73
139
  onCardDelete: function onCardDelete(_item, e) {
74
140
  return onOperationsClick && onOperationsClick('delete', _item, e);
75
141
  },
76
- actions: PermissionUtil(cardActions.map(function (i) {
77
- return i.render ? /*#__PURE__*/React.createElement("div", {
78
- key: i.key,
79
- wanted: i.resource || 'virtual',
80
- style: {
81
- fontSize: '18px'
82
- }
83
- }, i.render()) : /*#__PURE__*/React.createElement(Tooltip, {
84
- key: i.key,
85
- wanted: i.resource || 'virtual',
86
- placement: "top",
87
- title: i.title
88
- }, /*#__PURE__*/React.createElement("div", {
89
- style: {
90
- fontSize: '18px'
91
- },
92
- onClick: function onClick(e) {
93
- e.stopPropagation();
94
- i.onClick ? i.onClick(item, e) : onOperationsClick(i.key, item, e);
95
- }
96
- }, /*#__PURE__*/React.createElement(Icon, {
97
- type: i.icon
98
- })));
99
- }), readOnly ? [] : [].concat(_toConsumableArray(item['__infuse_serial__'] || resources), ['virtual']))
142
+ actions: PermissionUtil(cardActions.map(function (action) {
143
+ return /*#__PURE__*/React.createElement(Action, {
144
+ key: action.key,
145
+ wanted: action.resource || 'virtual',
146
+ data: item,
147
+ action: action
148
+ });
149
+ }), readOnly ? [] : [].concat(_toConsumableArray(item['__infuse_serial__'] || resources), ['virtual']), false, 'right', maxActionsCount)
100
150
  }));
101
151
  });
102
- return /*#__PURE__*/React.createElement(React.Fragment, null, difference(Object.keys(params), resultSet.invisibleSet || []).length > 0 && /*#__PURE__*/React.createElement(ResultSet, _extends({
152
+ var handleDragEnd = useMemoizedFn(function (evt) {
153
+ var oldIndex = evt.oldIndex,
154
+ newIndex = evt.newIndex;
155
+ var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
156
+ var dragNodeProps = detail[list[oldIndex]];
157
+ var targetNodeProps = detail[list[newIndex]];
158
+ if (onDrop) onDrop({
159
+ dragNodeProps: dragNodeProps,
160
+ targetNodeProps: targetNodeProps,
161
+ evt: evt
162
+ });else {
163
+ doAction('drag', {
164
+ get: {
165
+ datasetCode: props.dataSetKey
166
+ },
167
+ post: {
168
+ fromId: dragNodeProps[PRIMARY],
169
+ toId: targetNodeProps[PRIMARY]
170
+ }
171
+ }, {
172
+ showConfirm: false,
173
+ callback: function callback(success) {
174
+ return success && doQuery();
175
+ }
176
+ });
177
+ }
178
+ });
179
+ var _ref3 = wrapperProps || {},
180
+ className = _ref3.className,
181
+ _wrapperProps = _ref3._wrapperProps;
182
+ return /*#__PURE__*/React.createElement("div", _extends({
183
+ ref: wrapper
184
+ }, _wrapperProps, {
185
+ className: classNames('luck-card-list', _defineProperty({}, className, !!className))
186
+ }), difference(Object.keys(params), resultSet.invisibleSet || []).length > 0 && /*#__PURE__*/React.createElement(ResultSet, _extends({
103
187
  set: params,
104
188
  onQuery: onQuery
105
189
  }, resultSet, {
@@ -107,14 +191,16 @@ var LdCard = function LdCard(_ref) {
107
191
  })), /*#__PURE__*/React.createElement(CardList, _extends({
108
192
  col: 4,
109
193
  loading: loading,
110
- renderCard: renderCard
194
+ renderCard: renderCard,
195
+ onDragEnd: handleDragEnd
111
196
  }, props, {
112
197
  operates: [].concat(_toConsumableArray(resources), ['virtual']),
113
198
  modelName: namespace,
114
199
  dataSource: formatDataSource(list, detail),
115
200
  hasMore: !!hasMore,
116
201
  batchOperations: _batchOperations,
117
- ref: cardRef
202
+ ref: cardRef,
203
+ draggable: draggable
118
204
  })));
119
205
  };
120
206
  var ForwardLdCard = /*#__PURE__*/forwardRef(function (props, ref) {
@@ -122,23 +208,23 @@ var ForwardLdCard = /*#__PURE__*/forwardRef(function (props, ref) {
122
208
  wrapperRef: ref
123
209
  }, props));
124
210
  });
125
- var LdIndex = function LdIndex(_ref2) {
126
- var namespace = _ref2.ldId,
127
- moduleCode = _ref2.moduleCode,
128
- suppressInit = _ref2.suppressInit,
129
- overModel = _ref2.overModel,
130
- afterQuery = _ref2.afterQuery,
131
- props = _objectWithoutProperties(_ref2, _excluded2);
211
+ var LdIndex = function LdIndex(_ref4) {
212
+ var namespace = _ref4.ldId,
213
+ moduleCode = _ref4.moduleCode,
214
+ suppressInit = _ref4.suppressInit,
215
+ overModel = _ref4.overModel,
216
+ afterQuery = _ref4.afterQuery,
217
+ props = _objectWithoutProperties(_ref4, _excluded2);
132
218
  if (includes(props.isTree, props.dataSetKey)) return formatMessage({
133
219
  id: 'luckda.ldCard.notTres',
134
220
  label: '此数据集为树形数据集,请选择非树形数据集'
135
221
  });
136
222
  var Component = useCreation(function () {
137
- var _getDvaApp, _getDvaApp2;
138
- (_getDvaApp = getDvaApp()) === null || _getDvaApp === void 0 || _getDvaApp.unmodel(namespace);
139
- if (!((_getDvaApp2 = getDvaApp()) !== null && _getDvaApp2 !== void 0 && _getDvaApp2._store.getState()[namespace])) {
140
- var _getDvaApp3;
141
- (_getDvaApp3 = getDvaApp()) === null || _getDvaApp3 === void 0 || _getDvaApp3.model(createModel(namespace, _objectSpread(_objectSpread({
223
+ var _getDvaApp2, _getDvaApp3;
224
+ (_getDvaApp2 = getDvaApp()) === null || _getDvaApp2 === void 0 || _getDvaApp2.unmodel(namespace);
225
+ if (!((_getDvaApp3 = getDvaApp()) !== null && _getDvaApp3 !== void 0 && _getDvaApp3._store.getState()[namespace])) {
226
+ var _getDvaApp4;
227
+ (_getDvaApp4 = getDvaApp()) === null || _getDvaApp4 === void 0 || _getDvaApp4.model(createModel(namespace, _objectSpread(_objectSpread({
142
228
  isFlow: !!props.isFlow
143
229
  }, overModel), {}, {
144
230
  dataSetKey: props.dataSetKey,
@@ -190,7 +276,8 @@ Index.defaultProps = {
190
276
  },
191
277
  cardActions: [],
192
278
  overModel: {},
193
- cardKey: window.appConfig.constraintKeys.PRIMARY
279
+ cardKey: window.appConfig.constraintKeys.PRIMARY,
280
+ maxActionsCount: 3
194
281
  };
195
282
  export default /*#__PURE__*/forwardRef(function (props, ref) {
196
283
  return /*#__PURE__*/React.createElement(Index, _extends({
@@ -6,11 +6,11 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
7
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
8
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
9
- var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading"],
9
+ var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading", "showConfigBtn", "affixBarZIndex"],
10
10
  _excluded2 = ["dataSets", "doAction", "resources"],
11
11
  _excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
12
12
  _excluded4 = ["ldId", "initData", "overModel"];
13
- import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, useState, useEffect } from 'react';
13
+ import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, useState } from 'react';
14
14
  import { connect, getDvaApp, useRouteMatch } from 'umi';
15
15
  import PropTypes from 'prop-types';
16
16
  import { isArray, sortBy, mapValues, reduce, includes } from 'lodash';
@@ -59,6 +59,9 @@ var LdFormList = function LdFormList(_ref) {
59
59
  bpmButtonProps = _ref$bpmButtonProps === void 0 ? {} : _ref$bpmButtonProps,
60
60
  setVerifyRules = _ref.setVerifyRules,
61
61
  afterSubmitLoading = _ref.afterSubmitLoading,
62
+ _ref$showConfigBtn = _ref.showConfigBtn,
63
+ showConfigBtn = _ref$showConfigBtn === void 0 ? true : _ref$showConfigBtn,
64
+ affixBarZIndex = _ref.affixBarZIndex,
62
65
  props = _objectWithoutProperties(_ref, _excluded);
63
66
  var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
64
67
  var currentValueRef = useRef(null);
@@ -121,7 +124,7 @@ var LdFormList = function LdFormList(_ref) {
121
124
  return /*#__PURE__*/React.createElement(FormBtn, _extends({
122
125
  type: type,
123
126
  formId: formId,
124
- showConfigBtn: false
127
+ showConfigBtn: showConfigBtn
125
128
  }, extraConfig));
126
129
  });
127
130
 
@@ -131,7 +134,17 @@ var LdFormList = function LdFormList(_ref) {
131
134
  bizData: bizData,
132
135
  suppressDept: false,
133
136
  showHistory: luckTheme === 'base' ? 'sider' : 'drawer',
134
- placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ? 'topRight' : 'bottomRight'
137
+ placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ? 'topRight' : 'bottomRight',
138
+ onStartProcess: function onStartProcess(res) {
139
+ if ((res === null || res === void 0 ? void 0 : res.code) === 1) {
140
+ formListRef.current.doQuery();
141
+ }
142
+ },
143
+ onOperateComplete: function onOperateComplete(code, type, res) {
144
+ if (code === 1) {
145
+ formListRef.current.doQuery();
146
+ }
147
+ }
135
148
  }, bpmButtonProps)));
136
149
  };
137
150
  useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -215,9 +228,9 @@ var LdFormList = function LdFormList(_ref) {
215
228
  if (afterSubmit) {
216
229
  afterSubmit(success, mainKey, res);
217
230
  } else {
218
- var _formListRef$current;
231
+ var _formListRef$current, _formListRef$current2;
219
232
  props.parentModelName && ((_formListRef$current = formListRef.current) === null || _formListRef$current === void 0 ? void 0 : _formListRef$current.doParentsQuery());
220
- formListRef.current.onQuery(null, _defineProperty({}, mainFormLdId, mainFormData), function () {
233
+ (_formListRef$current2 = formListRef.current) === null || _formListRef$current2 === void 0 || _formListRef$current2.onQuery(null, _defineProperty({}, mainFormLdId, mainFormData), function () {
221
234
  formListRef.current.setFormMode('info');
222
235
  });
223
236
  }
@@ -273,6 +286,7 @@ var LdFormList = function LdFormList(_ref) {
273
286
  renderRight: isCustomRenderAffixRight ? renderAffixRightCustom : renderAffixRight,
274
287
  title: saveBtnTitle,
275
288
  layout: affixLayout || defaultLayout,
289
+ zIndex: affixBarZIndex,
276
290
  getContainer: getContainer
277
291
  }), sortBy([].concat(_toConsumableArray(formList), _toConsumableArray(formExtra)), function (o) {
278
292
  var _o$props;
@@ -93,10 +93,10 @@ var LdGrid = function LdGrid(_ref) {
93
93
  });
94
94
  }, [batchOperations]);
95
95
 
96
- /**
97
- * 优先级
98
- * columnsReset 重置columns,不受模块管理限制,写什么展示什么
99
- * columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
96
+ /**
97
+ * 优先级
98
+ * columnsReset 重置columns,不受模块管理限制,写什么展示什么
99
+ * columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
100
100
  */
101
101
  var _columns = useCreation(function () {
102
102
  if (columnsReset) {