@luck-design-biz/luckda 0.0.25-1 → 0.0.25-11

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 (501) hide show
  1. package/es/components/ComplexItem/index.js +92 -0
  2. package/es/{lowcode/painter/services/toolbar.js → components/ComplexItem/service.js} +7 -11
  3. package/es/components/LDActions/index.js +8 -10
  4. package/es/components/LDActions/index.less +7 -4
  5. package/es/components/LdAutoForm/index.js +34 -11
  6. package/es/components/LdFormList/index.js +39 -23
  7. package/es/components/LdGrid/index.js +21 -7
  8. package/es/components/LdGridForm/index.js +32 -11
  9. package/es/components/LdTree/index.js +33 -15
  10. package/es/helper/FromItems.js +177 -94
  11. package/es/helper/form.js +55 -14
  12. package/es/helper/props_config.js +17 -0
  13. package/es/locales/zh-CN.js +26 -11
  14. package/es/lowcode/constants/api-url.js +354 -104
  15. package/es/lowcode/constants/event-topics.js +2 -0
  16. package/es/lowcode/constants/index.js +4 -2
  17. package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
  18. package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +1 -1
  19. package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
  20. package/es/lowcode/engine/meta/box.props.default.json +1 -1
  21. package/es/lowcode/engine/meta/box.props.json +4 -4
  22. package/es/lowcode/engine/meta/button.props.json +4 -4
  23. package/es/lowcode/engine/meta/cardlist.props.json +14 -4
  24. package/es/lowcode/engine/meta/components-list.json +109 -1
  25. package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
  26. package/es/lowcode/engine/meta/dialog.props.json +80 -43
  27. package/es/lowcode/engine/meta/drawer.props.json +9 -21
  28. package/es/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
  29. package/es/lowcode/engine/meta/fieldcolor.props.json +63 -0
  30. package/es/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
  31. package/es/lowcode/engine/meta/fieldcomplex.props.json +39 -0
  32. package/es/lowcode/engine/meta/fielddate.props.default.json +12 -0
  33. package/es/lowcode/engine/meta/fielddate.props.json +47 -0
  34. package/es/lowcode/engine/meta/fielddict.props.default.json +14 -0
  35. package/es/lowcode/engine/meta/fielddict.props.json +44 -0
  36. package/es/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
  37. package/es/lowcode/engine/meta/fieldeditor.props.json +44 -0
  38. package/es/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
  39. package/es/lowcode/engine/meta/fieldgroup.props.json +73 -0
  40. package/es/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
  41. package/es/lowcode/engine/meta/fieldnumber.props.json +48 -0
  42. package/es/lowcode/engine/meta/fieldradio.props.default.json +12 -0
  43. package/es/lowcode/engine/meta/fieldradio.props.json +20 -0
  44. package/es/lowcode/engine/meta/fieldregion.props.default.json +12 -0
  45. package/es/lowcode/engine/meta/fieldregion.props.json +26 -0
  46. package/es/lowcode/engine/meta/fieldselect.props.default.json +14 -0
  47. package/es/lowcode/engine/meta/fieldselect.props.json +58 -0
  48. package/es/lowcode/engine/meta/fieldstring.props.default.json +16 -0
  49. package/es/lowcode/engine/meta/fieldstring.props.json +62 -0
  50. package/es/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
  51. package/es/lowcode/engine/meta/fieldswitch.props.json +31 -0
  52. package/es/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
  53. package/es/lowcode/engine/meta/fieldtextarea.props.json +49 -0
  54. package/es/lowcode/engine/meta/fieldupload.props.default.json +15 -0
  55. package/es/lowcode/engine/meta/fieldupload.props.json +71 -0
  56. package/es/lowcode/engine/meta/fielduser.props.default.json +16 -0
  57. package/es/lowcode/engine/meta/fielduser.props.json +82 -0
  58. package/es/lowcode/engine/meta/fieldyear.props.default.json +12 -0
  59. package/es/lowcode/engine/meta/fieldyear.props.json +37 -0
  60. package/es/lowcode/engine/meta/form.props.default.json +4 -5
  61. package/es/lowcode/engine/meta/form.props.json +44 -35
  62. package/es/lowcode/engine/meta/image.props.json +2 -2
  63. package/es/lowcode/engine/meta/imex.props.default.json +8 -1
  64. package/es/lowcode/engine/meta/imex.props.json +54 -22
  65. package/es/lowcode/engine/meta/js-editor/auto-complete.json +53 -3
  66. package/es/lowcode/engine/meta/layout.props.json +2 -2
  67. package/es/lowcode/engine/meta/link.props.json +1 -1
  68. package/es/lowcode/engine/meta/page.props.json +2 -2
  69. package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
  70. package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
  71. package/es/lowcode/engine/meta/section.props.default.json +4 -6
  72. package/es/lowcode/engine/meta/section.props.json +52 -49
  73. package/es/lowcode/engine/meta/split.props.default.json +1 -1
  74. package/es/lowcode/engine/meta/split.props.json +4 -4
  75. package/es/lowcode/engine/meta/table.props.json +19 -13
  76. package/es/lowcode/engine/meta/tabs.props.json +3 -3
  77. package/es/lowcode/engine/meta/text.props.json +2 -2
  78. package/es/lowcode/engine/meta/tree.props.default.json +2 -0
  79. package/es/lowcode/engine/meta/tree.props.json +71 -8
  80. package/es/lowcode/engine/provider/ContextProvider/index.js +21 -35
  81. package/es/lowcode/engine/provider/RemoteSourceProvider.js +89 -37
  82. package/es/lowcode/engine/tools/dataProcess.js +4 -0
  83. package/es/lowcode/engine/tools/diff.js +60 -0
  84. package/es/lowcode/engine/tools/helper.js +47 -26
  85. package/es/lowcode/engine/tools/useCanvasRender.js +8 -9
  86. package/es/lowcode/engine/tools/usePageDataStore.js +331 -0
  87. package/es/lowcode/engine/tools/usePromiseState.js +8 -10
  88. package/es/lowcode/engine/tools/useTodo.js +20 -10
  89. package/es/lowcode/painter/Design.js +41 -6
  90. package/es/lowcode/painter/DesignOperator.js +112 -88
  91. package/es/lowcode/painter/DesignToolbar.js +280 -36
  92. package/es/lowcode/painter/Outline.js +12 -10
  93. package/es/lowcode/painter/Panel.js +84 -46
  94. package/es/lowcode/painter/components/ActionBindModal.js +38 -27
  95. package/es/lowcode/painter/components/AdvancePanel.js +37 -21
  96. package/es/lowcode/painter/components/AttrsPanel.js +45 -34
  97. package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
  98. package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
  99. package/es/lowcode/painter/components/FieldSelector.js +26 -13
  100. package/es/lowcode/painter/components/ListEditor.js +8 -2
  101. package/es/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
  102. package/es/lowcode/painter/components/code-editor/JSEditor.js +5 -9
  103. package/es/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
  104. package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
  105. package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
  106. package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
  107. package/es/lowcode/painter/components/field-setting/SettingUI.js +182 -31
  108. package/es/lowcode/painter/components/field-setting/index.js +40 -61
  109. package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
  110. package/es/lowcode/painter/index.js +1 -28
  111. package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
  112. package/es/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
  113. package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
  114. package/es/lowcode/painter/panel-section/BlocksEditor/index.js +55 -28
  115. package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
  116. package/es/lowcode/painter/panel-section/DataSetSelector.js +30 -7
  117. package/es/lowcode/painter/panel-section/FieldsSetting.js +124 -55
  118. package/es/lowcode/painter/panel-section/I18nInput.js +20 -0
  119. package/es/lowcode/painter/panel-section/ImpExp.js +99 -14
  120. package/es/lowcode/painter/panel-section/ImpExpAlone.js +108 -0
  121. package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +95 -0
  122. package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
  123. package/es/lowcode/painter/panel-section/SplitDisplay.js +25 -110
  124. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
  125. package/es/lowcode/painter/panel-section/StylePanel/index.js +10 -4
  126. package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
  127. package/es/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
  128. package/es/lowcode/painter/style/action-bind-modal.less +3 -3
  129. package/es/lowcode/painter/style/design.less +11 -4
  130. package/es/lowcode/painter/style/list-editor.less +36 -0
  131. package/es/lowcode/painter/style/page-layout-display.less +28 -0
  132. package/es/lowcode/painter/style/panel-item.less +1 -1
  133. package/es/lowcode/painter/style/split-display.less +0 -9
  134. package/es/lowcode/preview/index.js +20 -5
  135. package/es/lowcode/view/Canvas.js +6 -7
  136. package/es/lowcode/view/Page.js +5 -6
  137. package/es/lowcode/view/lc-components/Box/FunctionDesign.js +3 -2
  138. package/es/lowcode/view/lc-components/Box/FunctionLive.js +1 -0
  139. package/es/lowcode/view/lc-components/Box/FunctionPreview.js +1 -0
  140. package/es/lowcode/view/lc-components/Box/meta.json +4 -4
  141. package/es/lowcode/view/lc-components/Button/index.js +2 -6
  142. package/es/lowcode/view/lc-components/Button/meta.json +4 -4
  143. package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +1 -0
  144. package/es/lowcode/view/lc-components/CardList/FunctionLive.js +1 -0
  145. package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +1 -0
  146. package/es/lowcode/view/lc-components/CardList/meta.json +14 -4
  147. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -12
  148. package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -0
  149. package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +1 -0
  150. package/es/lowcode/view/lc-components/Dialog/index.js +119 -19
  151. package/es/lowcode/view/lc-components/Dialog/meta.json +73 -43
  152. package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +1 -0
  153. package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -0
  154. package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +1 -0
  155. package/es/lowcode/view/lc-components/Drawer/meta.json +9 -21
  156. package/es/lowcode/view/lc-components/FieldColor/meta.json +63 -0
  157. package/es/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
  158. package/es/lowcode/view/lc-components/FieldDate/meta.json +45 -0
  159. package/es/lowcode/view/lc-components/FieldDict/meta.json +44 -0
  160. package/es/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
  161. package/es/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
  162. package/es/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
  163. package/es/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
  164. package/es/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
  165. package/es/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
  166. package/es/lowcode/view/lc-components/FieldString/meta.json +62 -0
  167. package/es/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
  168. package/es/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
  169. package/es/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
  170. package/es/lowcode/view/lc-components/FieldUser/meta.json +82 -0
  171. package/es/lowcode/view/lc-components/FieldYear/meta.json +35 -0
  172. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +61 -9
  173. package/es/lowcode/view/lc-components/Form/FunctionLive.js +1 -0
  174. package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
  175. package/es/lowcode/view/lc-components/Form/index.js +401 -66
  176. package/es/lowcode/view/lc-components/Form/meta.json +44 -35
  177. package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -0
  178. package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -0
  179. package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +1 -0
  180. package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
  181. package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -0
  182. package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +1 -0
  183. package/es/lowcode/view/lc-components/ImEx/index.js +470 -11
  184. package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
  185. package/es/lowcode/view/lc-components/ImEx/meta.json +55 -23
  186. package/es/lowcode/view/lc-components/Image/FunctionDesign.js +1 -0
  187. package/es/lowcode/view/lc-components/Image/FunctionLive.js +1 -0
  188. package/es/lowcode/view/lc-components/Image/FunctionPreview.js +1 -0
  189. package/es/lowcode/view/lc-components/Image/meta.json +2 -2
  190. package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -0
  191. package/es/lowcode/view/lc-components/JSX/FunctionLive.js +1 -0
  192. package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +1 -0
  193. package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +13 -21
  194. package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
  195. package/es/lowcode/view/lc-components/Layout/meta.json +2 -2
  196. package/es/lowcode/view/lc-components/Link/FunctionDesign.js +1 -0
  197. package/es/lowcode/view/lc-components/Link/FunctionLive.js +1 -0
  198. package/es/lowcode/view/lc-components/Link/FunctionPreview.js +1 -0
  199. package/es/lowcode/view/lc-components/Link/meta.json +1 -1
  200. package/es/lowcode/view/lc-components/Page/meta.json +2 -2
  201. package/es/lowcode/view/lc-components/PageContent/index.js +8 -9
  202. package/es/lowcode/view/lc-components/PageFooter/index.js +2 -5
  203. package/es/lowcode/view/lc-components/PageHeader/index.js +5 -6
  204. package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +63 -0
  205. package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
  206. package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
  207. package/es/lowcode/view/lc-components/PageLayout/index.js +32 -0
  208. package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
  209. package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
  210. package/es/lowcode/view/lc-components/Section/FunctionDesign.js +25 -2
  211. package/es/lowcode/view/lc-components/Section/FunctionLive.js +1 -0
  212. package/es/lowcode/view/lc-components/Section/FunctionPreview.js +1 -0
  213. package/es/lowcode/view/lc-components/Section/index.js +114 -24
  214. package/es/lowcode/view/lc-components/Section/index.less +7 -0
  215. package/es/lowcode/view/lc-components/Section/meta.json +48 -49
  216. package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -22
  217. package/es/lowcode/view/lc-components/Split/FunctionLive.js +1 -0
  218. package/es/lowcode/view/lc-components/Split/FunctionPreview.js +1 -0
  219. package/es/lowcode/view/lc-components/Split/index.js +7 -11
  220. package/es/lowcode/view/lc-components/Split/meta.json +4 -4
  221. package/es/lowcode/view/lc-components/Table/FunctionLive.js +1 -0
  222. package/es/lowcode/view/lc-components/Table/FunctionPreview.js +1 -0
  223. package/es/lowcode/view/lc-components/Table/components/TopFilter.js +78 -57
  224. package/es/lowcode/view/lc-components/Table/components/TopImex.js +420 -0
  225. package/es/lowcode/view/lc-components/Table/index.js +294 -47
  226. package/es/lowcode/view/lc-components/Table/meta.json +19 -13
  227. package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -20
  228. package/es/lowcode/view/lc-components/Tabs/index.js +27 -12
  229. package/es/lowcode/view/lc-components/Tabs/meta.json +3 -3
  230. package/es/lowcode/view/lc-components/Text/FunctionDesign.js +1 -0
  231. package/es/lowcode/view/lc-components/Text/FunctionLive.js +1 -0
  232. package/es/lowcode/view/lc-components/Text/FunctionPreview.js +1 -0
  233. package/es/lowcode/view/lc-components/Text/meta.json +2 -2
  234. package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
  235. package/es/lowcode/view/lc-components/Tree/FunctionLive.js +1 -0
  236. package/es/lowcode/view/lc-components/Tree/index.js +103 -29
  237. package/es/lowcode/view/lc-components/Tree/meta.json +71 -9
  238. package/es/lowcode/view/lc-components/Wrapper.js +10 -12
  239. package/es/services.js +0 -24
  240. package/es/upload/FilesWall/file.png +0 -0
  241. package/es/upload/FilesWall/index.js +422 -0
  242. package/es/upload/FilesWall/index.less +74 -0
  243. package/es/upload/Form/gridForm.js +10 -5
  244. package/es/upload/Form/index.js +2 -1
  245. package/es/upload/FormItem/index.js +8 -9
  246. package/es/upload/index.js +2 -1
  247. package/es/utils/action.js +2 -2
  248. package/es/utils/form.js +16 -3
  249. package/es/utils/grid.js +8 -5
  250. package/lib/components/ComplexItem/index.js +100 -0
  251. package/lib/{lowcode/painter/services/toolbar.js → components/ComplexItem/service.js} +8 -12
  252. package/lib/components/LDActions/index.js +7 -9
  253. package/lib/components/LDActions/index.less +7 -4
  254. package/lib/components/LdAutoForm/index.js +33 -10
  255. package/lib/components/LdFormList/index.js +38 -22
  256. package/lib/components/LdGrid/index.js +21 -7
  257. package/lib/components/LdGridForm/index.js +30 -9
  258. package/lib/components/LdTree/index.js +33 -15
  259. package/lib/helper/FromItems.js +175 -92
  260. package/lib/helper/form.js +53 -13
  261. package/lib/helper/props_config.js +23 -0
  262. package/lib/locales/zh-CN.js +26 -11
  263. package/lib/lowcode/constants/api-url.js +355 -104
  264. package/lib/lowcode/constants/event-topics.js +3 -1
  265. package/lib/lowcode/constants/index.js +5 -3
  266. package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
  267. package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +3 -2
  268. package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
  269. package/lib/lowcode/engine/meta/box.props.default.json +1 -1
  270. package/lib/lowcode/engine/meta/box.props.json +4 -4
  271. package/lib/lowcode/engine/meta/button.props.json +4 -4
  272. package/lib/lowcode/engine/meta/cardlist.props.json +14 -4
  273. package/lib/lowcode/engine/meta/components-list.json +109 -1
  274. package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
  275. package/lib/lowcode/engine/meta/dialog.props.json +80 -43
  276. package/lib/lowcode/engine/meta/drawer.props.json +9 -21
  277. package/lib/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
  278. package/lib/lowcode/engine/meta/fieldcolor.props.json +63 -0
  279. package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
  280. package/lib/lowcode/engine/meta/fieldcomplex.props.json +39 -0
  281. package/lib/lowcode/engine/meta/fielddate.props.default.json +12 -0
  282. package/lib/lowcode/engine/meta/fielddate.props.json +47 -0
  283. package/lib/lowcode/engine/meta/fielddict.props.default.json +14 -0
  284. package/lib/lowcode/engine/meta/fielddict.props.json +44 -0
  285. package/lib/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
  286. package/lib/lowcode/engine/meta/fieldeditor.props.json +44 -0
  287. package/lib/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
  288. package/lib/lowcode/engine/meta/fieldgroup.props.json +73 -0
  289. package/lib/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
  290. package/lib/lowcode/engine/meta/fieldnumber.props.json +48 -0
  291. package/lib/lowcode/engine/meta/fieldradio.props.default.json +12 -0
  292. package/lib/lowcode/engine/meta/fieldradio.props.json +20 -0
  293. package/lib/lowcode/engine/meta/fieldregion.props.default.json +12 -0
  294. package/lib/lowcode/engine/meta/fieldregion.props.json +26 -0
  295. package/lib/lowcode/engine/meta/fieldselect.props.default.json +14 -0
  296. package/lib/lowcode/engine/meta/fieldselect.props.json +58 -0
  297. package/lib/lowcode/engine/meta/fieldstring.props.default.json +16 -0
  298. package/lib/lowcode/engine/meta/fieldstring.props.json +62 -0
  299. package/lib/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
  300. package/lib/lowcode/engine/meta/fieldswitch.props.json +31 -0
  301. package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
  302. package/lib/lowcode/engine/meta/fieldtextarea.props.json +49 -0
  303. package/lib/lowcode/engine/meta/fieldupload.props.default.json +15 -0
  304. package/lib/lowcode/engine/meta/fieldupload.props.json +71 -0
  305. package/lib/lowcode/engine/meta/fielduser.props.default.json +16 -0
  306. package/lib/lowcode/engine/meta/fielduser.props.json +82 -0
  307. package/lib/lowcode/engine/meta/fieldyear.props.default.json +12 -0
  308. package/lib/lowcode/engine/meta/fieldyear.props.json +37 -0
  309. package/lib/lowcode/engine/meta/form.props.default.json +4 -5
  310. package/lib/lowcode/engine/meta/form.props.json +44 -35
  311. package/lib/lowcode/engine/meta/image.props.json +2 -2
  312. package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
  313. package/lib/lowcode/engine/meta/imex.props.json +54 -22
  314. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +53 -3
  315. package/lib/lowcode/engine/meta/layout.props.json +2 -2
  316. package/lib/lowcode/engine/meta/link.props.json +1 -1
  317. package/lib/lowcode/engine/meta/page.props.json +2 -2
  318. package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
  319. package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
  320. package/lib/lowcode/engine/meta/section.props.default.json +4 -6
  321. package/lib/lowcode/engine/meta/section.props.json +52 -49
  322. package/lib/lowcode/engine/meta/split.props.default.json +1 -1
  323. package/lib/lowcode/engine/meta/split.props.json +4 -4
  324. package/lib/lowcode/engine/meta/table.props.json +19 -13
  325. package/lib/lowcode/engine/meta/tabs.props.json +3 -3
  326. package/lib/lowcode/engine/meta/text.props.json +2 -2
  327. package/lib/lowcode/engine/meta/tree.props.default.json +2 -0
  328. package/lib/lowcode/engine/meta/tree.props.json +71 -8
  329. package/lib/lowcode/engine/provider/ContextProvider/index.js +37 -35
  330. package/lib/lowcode/engine/provider/RemoteSourceProvider.js +86 -34
  331. package/lib/lowcode/engine/tools/dataProcess.js +4 -0
  332. package/lib/lowcode/engine/tools/diff.js +67 -0
  333. package/lib/lowcode/engine/tools/helper.js +48 -25
  334. package/lib/lowcode/engine/tools/useCanvasRender.js +6 -7
  335. package/lib/lowcode/engine/tools/usePageDataStore.js +338 -0
  336. package/lib/lowcode/engine/tools/usePromiseState.js +6 -8
  337. package/lib/lowcode/engine/tools/useTodo.js +19 -9
  338. package/lib/lowcode/painter/Design.js +39 -4
  339. package/lib/lowcode/painter/DesignOperator.js +109 -85
  340. package/lib/lowcode/painter/DesignToolbar.js +277 -33
  341. package/lib/lowcode/painter/Outline.js +10 -8
  342. package/lib/lowcode/painter/Panel.js +82 -44
  343. package/lib/lowcode/painter/components/ActionBindModal.js +36 -25
  344. package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
  345. package/lib/lowcode/painter/components/AttrsPanel.js +44 -33
  346. package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
  347. package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
  348. package/lib/lowcode/painter/components/FieldSelector.js +26 -13
  349. package/lib/lowcode/painter/components/ListEditor.js +8 -2
  350. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
  351. package/lib/lowcode/painter/components/code-editor/JSEditor.js +5 -9
  352. package/lib/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
  353. package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
  354. package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
  355. package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
  356. package/lib/lowcode/painter/components/field-setting/SettingUI.js +179 -28
  357. package/lib/lowcode/painter/components/field-setting/index.js +40 -61
  358. package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
  359. package/lib/lowcode/painter/index.js +1 -30
  360. package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
  361. package/lib/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
  362. package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
  363. package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +53 -25
  364. package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
  365. package/lib/lowcode/painter/panel-section/DataSetSelector.js +30 -7
  366. package/lib/lowcode/painter/panel-section/FieldsSetting.js +121 -52
  367. package/lib/lowcode/painter/panel-section/I18nInput.js +27 -0
  368. package/lib/lowcode/painter/panel-section/ImpExp.js +99 -13
  369. package/lib/lowcode/painter/panel-section/ImpExpAlone.js +114 -0
  370. package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +103 -0
  371. package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
  372. package/lib/lowcode/painter/panel-section/SplitDisplay.js +24 -109
  373. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +5 -4
  374. package/lib/lowcode/painter/panel-section/StylePanel/index.js +10 -4
  375. package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
  376. package/lib/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
  377. package/lib/lowcode/painter/style/action-bind-modal.less +3 -3
  378. package/lib/lowcode/painter/style/design.less +11 -4
  379. package/lib/lowcode/painter/style/list-editor.less +36 -0
  380. package/lib/lowcode/painter/style/page-layout-display.less +28 -0
  381. package/lib/lowcode/painter/style/panel-item.less +1 -1
  382. package/lib/lowcode/painter/style/split-display.less +0 -9
  383. package/lib/lowcode/preview/index.js +21 -5
  384. package/lib/lowcode/view/Canvas.js +5 -6
  385. package/lib/lowcode/view/Page.js +5 -6
  386. package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +3 -2
  387. package/lib/lowcode/view/lc-components/Box/FunctionLive.js +2 -1
  388. package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +2 -1
  389. package/lib/lowcode/view/lc-components/Box/meta.json +4 -4
  390. package/lib/lowcode/view/lc-components/Button/index.js +2 -6
  391. package/lib/lowcode/view/lc-components/Button/meta.json +4 -4
  392. package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +2 -1
  393. package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +2 -1
  394. package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +2 -1
  395. package/lib/lowcode/view/lc-components/CardList/meta.json +14 -4
  396. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -11
  397. package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +2 -1
  398. package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +2 -1
  399. package/lib/lowcode/view/lc-components/Dialog/index.js +119 -19
  400. package/lib/lowcode/view/lc-components/Dialog/meta.json +73 -43
  401. package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -1
  402. package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +2 -1
  403. package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +2 -1
  404. package/lib/lowcode/view/lc-components/Drawer/meta.json +9 -21
  405. package/lib/lowcode/view/lc-components/FieldColor/meta.json +63 -0
  406. package/lib/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
  407. package/lib/lowcode/view/lc-components/FieldDate/meta.json +45 -0
  408. package/lib/lowcode/view/lc-components/FieldDict/meta.json +44 -0
  409. package/lib/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
  410. package/lib/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
  411. package/lib/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
  412. package/lib/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
  413. package/lib/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
  414. package/lib/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
  415. package/lib/lowcode/view/lc-components/FieldString/meta.json +62 -0
  416. package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
  417. package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
  418. package/lib/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
  419. package/lib/lowcode/view/lc-components/FieldUser/meta.json +82 -0
  420. package/lib/lowcode/view/lc-components/FieldYear/meta.json +35 -0
  421. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +58 -7
  422. package/lib/lowcode/view/lc-components/Form/FunctionLive.js +2 -1
  423. package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
  424. package/lib/lowcode/view/lc-components/Form/index.js +396 -61
  425. package/lib/lowcode/view/lc-components/Form/meta.json +44 -35
  426. package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +2 -1
  427. package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +2 -1
  428. package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +2 -1
  429. package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
  430. package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +2 -1
  431. package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +2 -1
  432. package/lib/lowcode/view/lc-components/ImEx/index.js +468 -9
  433. package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
  434. package/lib/lowcode/view/lc-components/ImEx/meta.json +55 -23
  435. package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +2 -1
  436. package/lib/lowcode/view/lc-components/Image/FunctionLive.js +2 -1
  437. package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +2 -1
  438. package/lib/lowcode/view/lc-components/Image/meta.json +2 -2
  439. package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +2 -1
  440. package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +2 -1
  441. package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +2 -1
  442. package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -19
  443. package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
  444. package/lib/lowcode/view/lc-components/Layout/meta.json +2 -2
  445. package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +2 -1
  446. package/lib/lowcode/view/lc-components/Link/FunctionLive.js +2 -1
  447. package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +2 -1
  448. package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
  449. package/lib/lowcode/view/lc-components/Page/meta.json +2 -2
  450. package/lib/lowcode/view/lc-components/PageContent/index.js +7 -8
  451. package/lib/lowcode/view/lc-components/PageFooter/index.js +2 -5
  452. package/lib/lowcode/view/lc-components/PageHeader/index.js +4 -5
  453. package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +71 -0
  454. package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
  455. package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
  456. package/lib/lowcode/view/lc-components/PageLayout/index.js +40 -0
  457. package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
  458. package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
  459. package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +25 -2
  460. package/lib/lowcode/view/lc-components/Section/FunctionLive.js +2 -1
  461. package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +2 -1
  462. package/lib/lowcode/view/lc-components/Section/index.js +113 -23
  463. package/lib/lowcode/view/lc-components/Section/index.less +7 -0
  464. package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
  465. package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +18 -21
  466. package/lib/lowcode/view/lc-components/Split/FunctionLive.js +2 -1
  467. package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +2 -1
  468. package/lib/lowcode/view/lc-components/Split/index.js +4 -8
  469. package/lib/lowcode/view/lc-components/Split/meta.json +4 -4
  470. package/lib/lowcode/view/lc-components/Table/FunctionLive.js +2 -1
  471. package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +2 -1
  472. package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +75 -55
  473. package/lib/lowcode/view/lc-components/Table/components/TopImex.js +428 -0
  474. package/lib/lowcode/view/lc-components/Table/index.js +292 -45
  475. package/lib/lowcode/view/lc-components/Table/meta.json +19 -13
  476. package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -18
  477. package/lib/lowcode/view/lc-components/Tabs/index.js +26 -11
  478. package/lib/lowcode/view/lc-components/Tabs/meta.json +3 -3
  479. package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +2 -1
  480. package/lib/lowcode/view/lc-components/Text/FunctionLive.js +2 -1
  481. package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +2 -1
  482. package/lib/lowcode/view/lc-components/Text/meta.json +2 -2
  483. package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
  484. package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +2 -1
  485. package/lib/lowcode/view/lc-components/Tree/index.js +100 -26
  486. package/lib/lowcode/view/lc-components/Tree/meta.json +71 -9
  487. package/lib/lowcode/view/lc-components/Wrapper.js +11 -12
  488. package/lib/services.js +0 -25
  489. package/lib/upload/FilesWall/file.png +0 -0
  490. package/lib/upload/FilesWall/index.js +429 -0
  491. package/lib/upload/FilesWall/index.less +74 -0
  492. package/lib/upload/Form/gridForm.js +10 -5
  493. package/lib/upload/Form/index.js +2 -1
  494. package/lib/upload/FormItem/index.js +8 -9
  495. package/lib/upload/index.js +8 -1
  496. package/lib/utils/action.js +2 -2
  497. package/lib/utils/form.js +16 -3
  498. package/lib/utils/grid.js +8 -5
  499. package/package.json +175 -171
  500. package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
  501. package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
@@ -1,35 +1,125 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["id", "children"];
4
- import React, { useRef, useImperativeHandle } from 'react';
5
- import { useMemoizedFn } from 'ahooks';
2
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import React, { useRef, useEffect } from 'react';
4
+ import { findDOMNode } from 'react-dom';
5
+ import { useMemoizedFn, useCreation } from 'ahooks';
6
+ import styled from 'styled-components';
7
+ import classNames from 'classnames';
8
+ import { Collapse, Icon, Tooltip } from 'luck-design/antd';
9
+ import { useContext } from "../../../engine/provider/ContextProvider";
10
+ import IconFont from "../../../../components/IconFont";
11
+ import LdRuntimeCom from "../../../../components/LdRuntimeCom";
6
12
  import Wrapper from "../Wrapper";
7
- import { Box } from 'luck-design';
8
- var LCSection = function LCSection(_ref) {
9
- var id = _ref.id,
10
- children = _ref.children,
11
- props = _objectWithoutProperties(_ref, _excluded);
13
+ import styles from "./index.less";
14
+ var StyledCollapse = styled(Collapse).withConfig({
15
+ displayName: "StyledCollapse",
16
+ componentId: "luckda-6530__sc-lb0zuy-0"
17
+ })(["", ""], function (props) {
18
+ return props.$css;
19
+ });
20
+ var StyledPanel = styled(Collapse.Panel).withConfig({
21
+ displayName: "StyledPanel",
22
+ componentId: "luckda-6530__sc-lb0zuy-1"
23
+ })([".ant-collapse-content-box{", "}"], function (props) {
24
+ return !props.padding ? 'padding: 0' : void 0;
25
+ });
26
+ var HeaderWrapper = styled.div.withConfig({
27
+ displayName: "HeaderWrapper",
28
+ componentId: "luckda-6530__sc-lb0zuy-2"
29
+ })(["width:auto;display:inline-flex;align-items:center;"]);
30
+ var Header = function Header(_ref) {
31
+ var title = _ref.title,
32
+ icon = _ref.icon,
33
+ tooltip = _ref.tooltip,
34
+ subtitle = _ref.subtitle;
35
+ return /*#__PURE__*/React.createElement(HeaderWrapper, null, icon ? /*#__PURE__*/React.createElement(IconFont, {
36
+ type: icon,
37
+ style: {
38
+ marginRight: 8,
39
+ fontSize: 14,
40
+ color: '#878f95'
41
+ }
42
+ }) : null, title, tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
43
+ title: tooltip
44
+ }, /*#__PURE__*/React.createElement(Icon, {
45
+ type: "info-circle",
46
+ theme: "filled",
47
+ style: {
48
+ margin: '0 8px',
49
+ fontSize: 14,
50
+ color: 'var(--ant-primary-color)'
51
+ }
52
+ })) : null, subtitle ? /*#__PURE__*/React.createElement(LdRuntimeCom, null, subtitle) : null);
53
+ };
54
+ var LCSection = function LCSection(_ref2) {
55
+ var id = _ref2.id,
56
+ children = _ref2.children,
57
+ collapse = _ref2.collapse,
58
+ title = _ref2.title,
59
+ iconFont = _ref2.iconFont,
60
+ tooltip = _ref2.tooltip,
61
+ subtitle = _ref2.subtitle,
62
+ extra = _ref2.extra,
63
+ simple = _ref2.simple,
64
+ destroyInactivePanel = _ref2.destroyInactivePanel,
65
+ padding = _ref2.padding,
66
+ css = _ref2.css,
67
+ advance = _ref2.advance;
12
68
  var ref = useRef();
13
- var apiRef = useRef();
69
+ var ctx = useContext();
70
+ var _useCreation = useCreation(function () {
71
+ if (collapse) {
72
+ return {
73
+ _collapseProps: {
74
+ defaultActiveKey: [id]
75
+ },
76
+ _panelProps: {}
77
+ };
78
+ }
79
+ return {
80
+ _collapseProps: {
81
+ activeKey: [id]
82
+ },
83
+ _panelProps: {
84
+ showArrow: false
85
+ }
86
+ };
87
+ }, [collapse]),
88
+ _collapseProps = _useCreation._collapseProps,
89
+ _panelProps = _useCreation._panelProps;
90
+ useEffect(function () {
91
+ ctx.doAction(advance.events.onMount, {
92
+ instance: ref.current
93
+ });
94
+ return function () {
95
+ ctx.doAction(advance.events.onUnmount, {
96
+ instance: ref.current
97
+ });
98
+ };
99
+ }, []);
14
100
  var getTargetDom = useMemoizedFn(function () {
15
- return ref.current;
16
- });
17
- useImperativeHandle(apiRef, function () {
18
- return {};
101
+ return findDOMNode(ref.current);
19
102
  });
20
103
  return /*#__PURE__*/React.createElement(Wrapper, {
21
104
  id: id,
22
105
  displayName: "Section",
23
- getTargetDom: getTargetDom,
24
- api: apiRef
25
- }, /*#__PURE__*/React.createElement(Box, _extends({
106
+ getTargetDom: getTargetDom
107
+ }, /*#__PURE__*/React.createElement(StyledCollapse, _extends({
26
108
  ref: ref,
27
- width: 240,
28
- height: "auto",
29
- direction: "column",
30
- style: {
31
- backgroundColor: 'yellow'
32
- }
33
- }, props), "LCSection", children));
109
+ bordered: !simple,
110
+ className: classNames(styles['lc-component-Section'], _defineProperty({}, styles['simple-theme'], simple)),
111
+ destroyInactivePanel: destroyInactivePanel,
112
+ $css: css
113
+ }, _collapseProps), /*#__PURE__*/React.createElement(StyledPanel, _extends({
114
+ header: /*#__PURE__*/React.createElement(Header, {
115
+ title: title,
116
+ icon: iconFont,
117
+ tooltip: tooltip,
118
+ subtitle: subtitle
119
+ }),
120
+ key: id,
121
+ extra: extra ? /*#__PURE__*/React.createElement(LdRuntimeCom, null, extra) : null,
122
+ padding: padding
123
+ }, _panelProps), children)));
34
124
  };
35
125
  export default LCSection;
@@ -0,0 +1,7 @@
1
+ .lc-component-Section.simple-theme {
2
+ :global {
3
+ .ant-collapse-item {
4
+ border-bottom: none !important;
5
+ }
6
+ }
7
+ }
@@ -8,100 +8,99 @@
8
8
  "order": 1,
9
9
  "props": [
10
10
  {
11
- "key": "fieldId",
11
+ "key": "id",
12
12
  "name": "唯一标识",
13
- "desc": "组件的唯一标识符,不能够与其它组件重名,不能够为空,且只能够使用以字母开头的,下划线以及数字的组合",
14
13
  "type": "string",
15
14
  "disabled": true
16
15
  },
17
16
  {
18
17
  "key": "collapse",
19
18
  "name": "折叠",
20
- "desc": "是否采用折叠分组",
21
- "type": "boolean",
19
+ "type": "switch",
22
20
  "default": true
23
21
  },
24
22
  {
25
- "key": "showHeader",
26
- "name": "显示头部",
27
- "desc": "表示是否分组显示头部(仅在非折叠情况下有效)",
28
- "type": "boolean",
29
- "default": true
23
+ "key": "simple",
24
+ "name": "简洁风格",
25
+ "type": "switch",
26
+ "default": false
27
+ },
28
+ {
29
+ "key": "padding",
30
+ "name": "内边距",
31
+ "type": "switch",
32
+ "default": true,
33
+ "repositioning": true
34
+ },
35
+ {
36
+ "key": "destroyInactivePanel",
37
+ "name": "隐藏销毁",
38
+ "desc": "面板被折叠隐藏时销毁面板中的组件",
39
+ "type": "switch",
40
+ "default": false
30
41
  },
31
42
  {
32
43
  "key": "title",
33
44
  "name": "分组标题",
34
- "desc": "表示分组标题的名称",
35
- "type": "string",
45
+ "type": "_I18nInput",
36
46
  "default": "分组"
37
47
  },
38
48
  {
39
- "key": "icon",
49
+ "key": "iconFont",
40
50
  "name": "图标",
41
- "desc": "用于设置分组标题前面的图标",
42
- "type": "Icon"
51
+ "type": "_Icon",
52
+ "next": {
53
+ "name": "选择图标",
54
+ "autoClose": true,
55
+ "props": [
56
+ {
57
+ "key": "iconFont",
58
+ "name": "#图标选择器",
59
+ "type": "_IconSelector"
60
+ }
61
+ ]
62
+ }
43
63
  },
44
64
  {
45
65
  "key": "tooltip",
46
66
  "name": "用户提示",
47
- "desc": "用于设置分组的用户提示",
48
- "type": "string"
67
+ "type": "_I18nInput"
49
68
  },
50
69
  {
51
70
  "key": "subtitle",
52
71
  "name": "副标题插槽",
53
72
  "desc": "分组副标题的插槽内容",
54
- "type": "string"
73
+ "type": "_JSEditor",
74
+ "defaultCode": "function Component() { \n return <span>subtitle</span>; \n}",
75
+ "mustConfirm": true,
76
+ "wrapper": "collapse",
77
+ "wrapperProps": { "suppressIcon": true }
55
78
  },
56
79
  {
57
80
  "key": "extra",
58
81
  "name": "扩展区域插槽",
59
82
  "desc": "分组扩展区域的插槽内容",
60
- "type": "string"
61
- },
62
- {
63
- "key": "showHeaderDivider",
64
- "name": "头部分割线",
65
- "desc": "是否展示头部分割线(仅在非折叠情况下有效)",
66
- "type": "boolean",
67
- "default": true
68
- },
69
- {
70
- "key": "showBorder",
71
- "name": "显示边框",
72
- "desc": "是否展示分组边框(仅在非折叠情况下有效)",
73
- "type": "boolean",
74
- "default": false
75
- },
76
- {
77
- "key": "withMargin",
78
- "name": "外边距",
79
- "desc": "是否展示外边距",
80
- "type": "boolean",
81
- "default": false
82
- },
83
- {
84
- "key": "withPadding",
85
- "name": "内边距",
86
- "desc": "是否展示内边距",
87
- "type": "boolean",
88
- "default": true
83
+ "type": "_JSEditor",
84
+ "defaultCode": "function Component() { \n return <div>extra</div>; \n}",
85
+ "mustConfirm": true,
86
+ "wrapper": "collapse",
87
+ "wrapperProps": { "suppressIcon": true }
89
88
  }
90
89
  ],
91
- "css": {},
90
+ "css": "width: 100%;",
92
91
  "advance": {
93
92
  "events": [
94
93
  {
95
94
  "key": "onMount",
96
95
  "name": "组件首次渲染时",
97
96
  "desc": "在组件首次渲染时,执行方法",
98
- "func": "(params)=>{\n\t\n}"
97
+ "func": "function onMount(){\n\t\n}"
99
98
  },
100
99
  {
101
100
  "key": "onUnmount",
102
101
  "name": "组件卸载时",
103
102
  "desc": "在组件卸载时,执行方法。",
104
- "func": "(params)=>{\n\t\n}"
103
+ "func": "function onUnmount()=>{\n\t\n}"
105
104
  }
106
105
  ]
107
106
  }
@@ -1,15 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
4
  var _excluded = ["children", "id", "display"];
6
5
  import React, { useEffect } from 'react';
7
6
  import { useCreation, useMemoizedFn } from 'ahooks';
8
- import { drop, cloneDeep } from 'lodash';
9
7
  import { suid } from '@luck-design-biz/base/utils';
10
- import { useContext, usePageData } from "../../../engine/provider/ContextProvider";
8
+ import { drop } from 'lodash';
9
+ import { useContext, useGet, addNode, deleteNode } from "../../../engine/provider/ContextProvider";
11
10
  import Index from "./index";
12
- import { add, deleteById, findNodeAndParent } from "../../../engine/tools/dataProcess";
13
11
  import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
14
12
  var FunctionDesign = function FunctionDesign(_ref) {
15
13
  var children = _ref.children,
@@ -17,42 +15,41 @@ var FunctionDesign = function FunctionDesign(_ref) {
17
15
  display = _ref.display,
18
16
  props = _objectWithoutProperties(_ref, _excluded);
19
17
  var ctx = useContext();
20
- var _usePageData = usePageData(),
21
- _usePageData2 = _slicedToArray(_usePageData, 2),
22
- setPageData = _usePageData2[1].setPageData;
23
- var refreshChild = useMemoizedFn(function (_pageData) {
24
- var cloneData = cloneDeep(_pageData);
25
- var _findNodeAndParent = findNodeAndParent(id, cloneData),
26
- current = _findNodeAndParent.node;
27
- var ratioArr = display.ratio ? display.ratio.split(':') : new Array(display.type.length);
18
+ var current = useGet({
19
+ id: id
20
+ });
21
+ var refreshChild = useMemoizedFn(function () {
22
+ var _current$children;
23
+ var ratioArr = display.ratio.split(':');
24
+ if (ratioArr.length === ((_current$children = current.children) === null || _current$children === void 0 ? void 0 : _current$children.length)) return;
28
25
  drop(current.children, ratioArr.length).forEach(function (boxId) {
29
- deleteById(cloneData, boxId);
26
+ deleteNode(boxId);
30
27
  });
31
28
  ratioArr.forEach(function (_, index) {
32
- var _current$children;
33
- if (!((_current$children = current.children) !== null && _current$children !== void 0 && _current$children[index])) {
34
- add(cloneData, id, "box_".concat(suid()), _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
29
+ var _current$children2;
30
+ if (!((_current$children2 = current.children) !== null && _current$children2 !== void 0 && _current$children2[index])) {
31
+ addNode(id, "box_".concat(suid()), _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
35
32
  buildIn: true
36
33
  }));
37
34
  }
38
35
  });
39
- setPageData(cloneData);
40
36
  });
41
37
  useCreation(function () {
42
38
  if (children !== null && children !== void 0 && children.length) return;
43
39
  ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
44
- var compId = _ref2.id,
45
- pageData = _ref2.pageData;
40
+ var compId = _ref2.id;
46
41
  if (compId !== id) return;
47
- refreshChild(pageData);
42
+ refreshChild();
48
43
  }).watch();
49
44
  }, []);
50
45
  useEffect(function () {
51
46
  var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
52
47
  var compId = _ref3.id,
53
- pageData = _ref3.pageData;
48
+ newValue = _ref3.newValue;
54
49
  if (compId !== id) return;
55
- refreshChild(pageData);
50
+ if (newValue.hasOwnProperty('display')) {
51
+ refreshChild();
52
+ }
56
53
  }).watch();
57
54
  return function () {
58
55
  return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
@@ -1,5 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  var _excluded = ["children"];
3
+ import React from 'react';
3
4
  import Index from "./index";
4
5
  var FunctionLive = function FunctionLive(_ref) {
5
6
  var children = _ref.children,
@@ -1,5 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  var _excluded = ["children"];
3
+ import React from 'react';
3
4
  import Index from "./index";
4
5
  var FunctionPreview = function FunctionPreview(_ref) {
5
6
  var children = _ref.children,
@@ -1,8 +1,8 @@
1
1
  import React, { useRef } from 'react';
2
- import { useMemoizedFn, useCreation, usePrevious } from 'ahooks';
2
+ import { useMemoizedFn, useCreation } from 'ahooks';
3
3
  import styled from 'styled-components';
4
- import { isNil, sum } from 'lodash';
5
- import { Layout, MemorySplit } from '@luck-design-biz/base';
4
+ import { sum } from 'lodash';
5
+ import { MemorySplit } from '@luck-design-biz/base';
6
6
  import Wrapper from "../Wrapper";
7
7
  var _MAPPING_ = {
8
8
  left: 'min',
@@ -21,13 +21,11 @@ var LCSplit = function LCSplit(_ref) {
21
21
  children = _ref.children,
22
22
  css = _ref.css,
23
23
  display = _ref.display;
24
- var prevDisplay = usePrevious(display);
25
24
  var ref = useRef();
26
25
  var getTargetDom = useMemoizedFn(function () {
27
26
  return ref.current;
28
27
  });
29
28
  var _useCreation = useCreation(function () {
30
- if (isNil(display.ratio)) return {};
31
29
  var arr = display.ratio.split(':').map(function (r) {
32
30
  return parseInt(r);
33
31
  });
@@ -45,16 +43,14 @@ var LCSplit = function LCSplit(_ref) {
45
43
  }, /*#__PURE__*/React.createElement(Div, {
46
44
  ref: ref,
47
45
  $css: css
48
- }, prevDisplay && prevDisplay.type !== display.type ? null : display.type === 'normal' ? /*#__PURE__*/React.createElement(MemorySplit, {
46
+ }, /*#__PURE__*/React.createElement(MemorySplit, {
49
47
  split: display.split
50
48
  }, ratioArr.map(function (r, i) {
51
49
  return /*#__PURE__*/React.createElement(MemorySplit.Pane, {
52
- fastTo: i === display.fastTo.length ? 'max' : _MAPPING_[display.fastTo[i]],
50
+ fastTo: !display.fastTo || i === display.fastTo.length ? 'max' : _MAPPING_[display.fastTo[i]],
53
51
  initialSize: "".concat(r / total * 100, "%"),
54
52
  key: i
55
- }, children[i]);
56
- })) : /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Layout.Sider, null, children[0]), /*#__PURE__*/React.createElement(Layout.Main, null, display.type === 'lr' ? children[1] : /*#__PURE__*/React.createElement(MemorySplit, {
57
- split: display.type === 'ltb' ? 'horizontal' : 'vertical'
58
- }, children[1], children[2])))));
53
+ }, children === null || children === void 0 ? void 0 : children[i]);
54
+ }))));
59
55
  };
60
56
  export default LCSplit;
@@ -27,26 +27,26 @@
27
27
  ]
28
28
  }
29
29
  ],
30
- "css": "background-color: transparent",
30
+ "css": "width: 100%, height: 100%, background-color: transparent",
31
31
  "advance": {
32
32
  "events": [
33
33
  {
34
34
  "key": "onMount",
35
35
  "name": "组件首次渲染时",
36
36
  "desc": "在组件首次渲染时,执行方法",
37
- "func": "(params)=>{\n\t\n}"
37
+ "func": "function onMount() {\n\t\n}"
38
38
  },
39
39
  {
40
40
  "key": "onUnmount",
41
41
  "name": "组件卸载时",
42
42
  "desc": "在组件卸载时,执行方法。",
43
- "func": "(params)=>{\n\t\n}"
43
+ "func": "function onUnmount() {\n\t\n}"
44
44
  },
45
45
  {
46
46
  "key": "onChange",
47
47
  "name": "尺寸变化事件",
48
48
  "desc": "在面板尺寸发生变化时,执行方法",
49
- "func": "(value)=>{\n\t\n}"
49
+ "func": "function onChange(value) {\n\t\n}"
50
50
  }
51
51
  ]
52
52
  }
@@ -1,5 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  var _excluded = ["children"];
3
+ import React from 'react';
3
4
  import Index from "./index";
4
5
  var FunctionLive = function FunctionLive(_ref) {
5
6
  var children = _ref.children,
@@ -1,5 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  var _excluded = ["children"];
3
+ import React from 'react';
3
4
  import Index from "./index";
4
5
  var FunctionPreview = function FunctionPreview(_ref) {
5
6
  var children = _ref.children,
@@ -1,96 +1,117 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
3
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
5
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
6
  import React, { useState } from 'react';
5
- import { useAsyncEffect } from 'ahooks';
6
- import { Segmented } from 'luck-design/antd';
7
+ import { useAsyncEffect, useMemoizedFn } from 'ahooks';
8
+ import { Radio } from 'luck-design/antd';
7
9
  import { isArray, isString } from 'lodash';
8
- function mockDict() {
9
- return new Promise(function (resolve) {
10
- setTimeout(function () {
11
- resolve([{
12
- value: '1',
13
- label: '启用'
14
- }, {
15
- value: '2',
16
- label: '未启用'
17
- }, {
18
- value: '0',
19
- label: '未知'
20
- }]);
21
- }, 600);
22
- });
23
- }
24
- function mockDApi() {
25
- return new Promise(function (resolve) {
26
- setTimeout(function () {
27
- resolve({
28
- options: [{
29
- value: '2023',
30
- label: '2023年'
31
- }, {
32
- value: '2024',
33
- label: '2024年'
34
- }, {
35
- value: '2024',
36
- label: '2025年'
37
- }],
38
- field: 'planYear'
39
- });
40
- }, 600);
41
- });
42
- }
10
+ import { formatMessage } from '@luck-design-biz/base/utils';
11
+ import { request } from '@luck-design-biz/base/utils';
12
+ import { fetchDataDic } from "../../../../constants/api-url";
43
13
  var TopFilter = function TopFilter(_ref) {
44
- var filter = _ref.filter;
14
+ var filter = _ref.filter,
15
+ instance = _ref.instance;
45
16
  var _useState = useState(isArray(filter) ? filter : []),
46
17
  _useState2 = _slicedToArray(_useState, 2),
47
18
  optons = _useState2[0],
48
19
  setOptions = _useState2[1];
20
+ var _useState3 = useState(void 0),
21
+ _useState4 = _slicedToArray(_useState3, 2),
22
+ apiField = _useState4[0],
23
+ setApiField = _useState4[1];
49
24
  useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
50
- var _yield$mockDApi, options, field;
25
+ var _yield$request, options, field, _yield$fetchDataDic, code, list, detail;
51
26
  return _regeneratorRuntime().wrap(function _callee$(_context) {
52
27
  while (1) switch (_context.prev = _context.next) {
53
28
  case 0:
54
29
  if (!isString(filter)) {
55
- _context.next = 9;
30
+ _context.next = 10;
56
31
  break;
57
32
  }
58
33
  _context.next = 3;
59
- return mockDApi();
34
+ return request(filter);
60
35
  case 3:
61
- _yield$mockDApi = _context.sent;
62
- options = _yield$mockDApi.options;
63
- field = _yield$mockDApi.field;
36
+ _yield$request = _context.sent;
37
+ options = _yield$request.options;
38
+ field = _yield$request.field;
64
39
  setOptions(options);
65
- _context.next = 19;
40
+ setApiField(field);
41
+ _context.next = 22;
66
42
  break;
67
- case 9:
43
+ case 10:
68
44
  if (!isArray(filter)) {
69
- _context.next = 13;
45
+ _context.next = 14;
70
46
  break;
71
47
  }
72
48
  setOptions(filter);
73
- _context.next = 19;
49
+ _context.next = 22;
74
50
  break;
75
- case 13:
51
+ case 14:
76
52
  if (!(filter.key && filter.field)) {
77
- _context.next = 19;
53
+ _context.next = 22;
78
54
  break;
79
55
  }
80
- _context.t0 = setOptions;
81
56
  _context.next = 17;
82
- return mockDict();
57
+ return fetchDataDic({
58
+ snamealias: filter.key
59
+ });
83
60
  case 17:
84
- _context.t1 = _context.sent;
85
- (0, _context.t0)(_context.t1);
86
- case 19:
61
+ _yield$fetchDataDic = _context.sent;
62
+ code = _yield$fetchDataDic.code;
63
+ list = _yield$fetchDataDic.list;
64
+ detail = _yield$fetchDataDic.detail;
65
+ if (code === 1) {
66
+ setOptions([{
67
+ value: 'all',
68
+ label: formatMessage({
69
+ id: "luckda.lowcode.view.lc-components.label.all",
70
+ label: '全部'
71
+ })
72
+ }].concat(_toConsumableArray(list.map(function (_id) {
73
+ return {
74
+ value: detail[_id].sfactvalue,
75
+ label: detail[_id].sname
76
+ };
77
+ }))));
78
+ }
79
+ case 22:
87
80
  case "end":
88
81
  return _context.stop();
89
82
  }
90
83
  }, _callee);
91
84
  })), [filter]);
92
- return /*#__PURE__*/React.createElement(Segmented, {
93
- options: optons
85
+ var handleValueChange = useMemoizedFn(function (e) {
86
+ var val = e.target.value;
87
+ var _key = apiField || filter.field;
88
+ if (val === 'all') {
89
+ instance.current.onLdQuery(_defineProperty({}, _key, {
90
+ operate: 'remove'
91
+ }));
92
+ } else {
93
+ var _opt = optons.find(function (_ref3) {
94
+ var value = _ref3.value;
95
+ return val === value;
96
+ });
97
+ instance.current.onLdQuery(_defineProperty({}, _key, {
98
+ key: _key,
99
+ value: val,
100
+ label: _opt.label
101
+ }));
102
+ }
94
103
  });
104
+ return /*#__PURE__*/React.createElement(Radio.Group, {
105
+ defaultValue: "all",
106
+ buttonStyle: "solid",
107
+ onChange: handleValueChange
108
+ }, optons.map(function (_ref4) {
109
+ var value = _ref4.value,
110
+ label = _ref4.label;
111
+ return /*#__PURE__*/React.createElement(Radio.Button, {
112
+ key: value,
113
+ value: value
114
+ }, label);
115
+ }));
95
116
  };
96
117
  export default TopFilter;