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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +20 -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 +49 -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 +7 -3
  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 +116 -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 +20 -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 +3 -1
  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 +5 -6
  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 +20 -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 +50 -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 +7 -3
  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 +116 -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 +20 -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 +3 -1
  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 +5 -6
  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 +6 -4
  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,10 +1,11 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { useReducer, useState } from 'react';
4
- import { useSetState, useMemoizedFn } from 'ahooks';
4
+ import { useSetState, useMemoizedFn, useDebounceFn } from 'ahooks';
5
5
  import { Tooltip, Radio, Input, Icon } from 'luck-design/antd';
6
6
  import { isString, isArray, isNil } from 'lodash';
7
7
  import { formatMessage, suid } from '@luck-design-biz/base/utils';
8
+ import { useContext } from "../../engine/provider/ContextProvider";
8
9
  import { SortBox, SortItem } from "../components/SortBox";
9
10
  import { ListEditor, ListEditorItem } from "../components/ListEditor";
10
11
  import PopConfirm from "../components/PopConfirm";
@@ -19,7 +20,9 @@ var _RADIO_STYLE_ = {
19
20
  };
20
21
  var TableTopFilter = function TableTopFilter(_ref) {
21
22
  var defaultValue = _ref.defaultValue,
22
- _onChange = _ref.onChange;
23
+ _onChange = _ref.onChange,
24
+ nodeId = _ref.nodeId;
25
+ var ctx = useContext();
23
26
  var _useState = useState(function () {
24
27
  if (isNil(defaultValue)) return 'nil';
25
28
  if (isString(defaultValue)) return 'customApi';
@@ -41,6 +44,17 @@ var TableTopFilter = function TableTopFilter(_ref) {
41
44
  _useState4 = _slicedToArray(_useState3, 2),
42
45
  apiUrl = _useState4[0],
43
46
  setApiUrl = _useState4[1];
47
+ var _useDebounceFn = useDebounceFn(function (val) {
48
+ setDict({
49
+ key: val
50
+ });
51
+ if (dict !== null && dict !== void 0 && dict.field) _onChange(_objectSpread(_objectSpread({}, dict), {}, {
52
+ key: val
53
+ }));
54
+ }, {
55
+ wait: 400
56
+ }),
57
+ handleDictChange = _useDebounceFn.run;
44
58
  var handleAdd = useMemoizedFn(function () {
45
59
  var id = suid();
46
60
  dispatch({
@@ -48,7 +62,7 @@ var TableTopFilter = function TableTopFilter(_ref) {
48
62
  payload: {
49
63
  id: id,
50
64
  value: id,
51
- field: id,
65
+ field: void 0,
52
66
  label: "\u8FC7\u6EE4\u9879".concat(options.length + 1)
53
67
  },
54
68
  callback: function callback(newOptions) {
@@ -137,9 +151,10 @@ var TableTopFilter = function TableTopFilter(_ref) {
137
151
  id: "".concat(_I18N_PREFIX_, ".field"),
138
152
  label: '字段'
139
153
  })), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(FieldSelector, {
154
+ dsid: ctx.componentMap.get(nodeId).api.getSelfData().props.dataset.uid,
140
155
  defaultValue: opt.field,
141
156
  style: {
142
- width: '50%'
157
+ width: '100%'
143
158
  },
144
159
  placeholder: formatMessage({
145
160
  id: "".concat(_I18N_PREFIX_, ".field.placeholder"),
@@ -203,7 +218,7 @@ var TableTopFilter = function TableTopFilter(_ref) {
203
218
  }
204
219
  }, /*#__PURE__*/React.createElement(Input, {
205
220
  size: "small",
206
- value: dict === null || dict === void 0 ? void 0 : dict.key,
221
+ defaultValue: dict === null || dict === void 0 ? void 0 : dict.key,
207
222
  style: {
208
223
  width: '50%'
209
224
  },
@@ -212,15 +227,10 @@ var TableTopFilter = function TableTopFilter(_ref) {
212
227
  label: '请输入字典key'
213
228
  }),
214
229
  onChange: function onChange(e) {
215
- var key = e.target.value;
216
- setDict({
217
- key: key
218
- });
219
- if (dict !== null && dict !== void 0 && dict.field) _onChange(_objectSpread(_objectSpread({}, dict), {}, {
220
- key: key
221
- }));
230
+ return handleDictChange(e.target.value);
222
231
  }
223
232
  }), /*#__PURE__*/React.createElement(FieldSelector, {
233
+ dsid: ctx.componentMap.get(nodeId).api.getSelfData().props.dataset.uid,
224
234
  style: {
225
235
  width: '50%'
226
236
  },
@@ -278,7 +288,7 @@ var TableTopFilter = function TableTopFilter(_ref) {
278
288
  size: "small",
279
289
  value: apiUrl,
280
290
  placeholder: formatMessage({
281
- id: "".concat(_I18N_PREFIX_, ".dict.placeholder"),
291
+ id: "".concat(_I18N_PREFIX_, ".customApi.placeholder"),
282
292
  label: '请输入接口地址'
283
293
  }),
284
294
  style: {
@@ -55,8 +55,8 @@ var TreeRootEditor = function TreeRootEditor(_ref) {
55
55
  }
56
56
  }))), /*#__PURE__*/React.createElement(Tooltip, {
57
57
  title: formatMessage({
58
- id: 'luckda.lowcode.painter.edit',
59
- label: '编辑'
58
+ id: 'luckda.lowcode.painter.bind',
59
+ label: '绑定动作'
60
60
  })
61
61
  }, /*#__PURE__*/React.createElement(Icon, {
62
62
  type: "paper-clip",
@@ -1,7 +1,7 @@
1
1
  .lc-painter-panel-action-bind-modal {
2
2
  &-body {
3
3
  width: 100%;
4
- height: 460px;
4
+ height: 660px;
5
5
  display: flex;
6
6
  font-size: 12px;
7
7
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  .selector-box {
12
12
  width: 100%;
13
- height: 420px;
13
+ height: 620px;
14
14
  border: 1px solid #e8e8e8;
15
15
  border-radius: 6px;
16
16
  display: flex;
@@ -68,7 +68,7 @@
68
68
 
69
69
  .code-box {
70
70
  width: 100%;
71
- height: 420px;
71
+ height: 620px;
72
72
  border: 1px solid #e8e8e8;
73
73
  border-radius: 6px;
74
74
  overflow: hidden;
@@ -63,6 +63,11 @@
63
63
  color: #8c8c8c;
64
64
  background: #f1f2f3;
65
65
  }
66
+
67
+ .toolbar-item.disabled {
68
+ color: #d9d9d9;
69
+ cursor: not-allowed;
70
+ }
66
71
  }
67
72
 
68
73
  &-workspace {
@@ -77,9 +82,8 @@
77
82
 
78
83
  &-simulator {
79
84
  min-height: 100%;
80
- height: auto;
81
85
  :global {
82
- .ant-form-item, .resizer {
86
+ .ant-form-item, .ant-collapse-header, .resizer, .ant-tree-node-content-wrapper {
83
87
  pointer-events: none;
84
88
  }
85
89
  .luck-grid-table {
@@ -119,7 +123,7 @@
119
123
  .selector-item();
120
124
  }
121
125
 
122
- :local {
126
+ :global {
123
127
  .instance-node-selector {
124
128
  padding: 0 6px;
125
129
  margin-right: 3px;
@@ -7,6 +7,7 @@
7
7
  width: 100%;
8
8
  .list-item {
9
9
  height: 28px;
10
+ position: relative;
10
11
  background: #fff;
11
12
  border: 1px solid #e5e6e8;
12
13
  border-radius: 6px;
@@ -37,6 +38,41 @@
37
38
  cursor: pointer;
38
39
  }
39
40
  }
41
+
42
+ .list-item-bottom-line {
43
+ width: 100%;
44
+ height: 8px;
45
+ border-bottom: solid 1px var(--ant-primary-color);
46
+ position: absolute;
47
+ left: 0;
48
+ bottom: -6px;
49
+ padding-top: 4px;
50
+ display: none;
51
+ align-items: center;
52
+ justify-content: center;
53
+ cursor: pointer;
54
+ z-index: 10;
55
+ }
56
+ .list-item-bottom-line::after {
57
+ content: "+";
58
+ height: 12px;
59
+ margin-top: 4px;
60
+ color: var(--ant-primary-color);
61
+ border: solid 1px var(--ant-primary-color);
62
+ border-radius: 10px;
63
+ font-weight: bold;
64
+ font-size: 14px;
65
+ background-color: white;
66
+ padding: 0 8px;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ }
71
+ &:hover {
72
+ .list-item-bottom-line {
73
+ display: flex;
74
+ }
75
+ }
40
76
  }
41
77
  }
42
78
 
@@ -0,0 +1,28 @@
1
+ .lc-painter-panel-section-pagelayoutdisplay {
2
+ .display-type-box {
3
+ display: grid;
4
+ grid-template-columns: repeat(3, 1fr);
5
+ grid-column-gap: 4px;
6
+
7
+ .display-type-item {
8
+ border: 1px solid rgba(0, 0, 0, 0.2);
9
+ border-radius: 4px;
10
+ padding: 3px;
11
+ height: 42px;
12
+ display: flex;
13
+
14
+ &:hover {
15
+ cursor: pointer;
16
+ border-color: var(--ant-primary-color);
17
+ }
18
+
19
+ &.active {
20
+ border-color: var(--ant-primary-color);
21
+ }
22
+
23
+ .item-block {
24
+ background-color: rgb(192, 194, 196);
25
+ }
26
+ }
27
+ }
28
+ }
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  /* 使.item-component-box的直接子元素铺满 */
35
- .item-component > *:not(.ant-switch) {
35
+ .item-component > *:not(:global(.ant-switch)) {
36
36
  flex-grow: 1;
37
37
  }
38
38
  .panel-pointer {
@@ -11,15 +11,6 @@
11
11
  height: 42px;
12
12
  display: flex;
13
13
 
14
- &:hover {
15
- cursor: pointer;
16
- border-color: var(--ant-primary-color);
17
- }
18
-
19
- &.active {
20
- border-color: var(--ant-primary-color);
21
- }
22
-
23
14
  .item-block {
24
15
  background-color: rgb(192, 194, 196);
25
16
  }
@@ -1,14 +1,29 @@
1
- import React from "react";
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useState } from 'react';
3
+ import { useUpdateEffect } from 'ahooks';
2
4
  import EventBusProvider from "../engine/provider/EventBusProvider";
3
5
  import ContextProvider from "../engine/provider/ContextProvider";
4
6
  import Page from "../view/Page";
5
7
  import { RUNTIME } from "../constants/index";
6
8
  var Preview = function Preview(_ref) {
7
- var code = _ref.code;
8
- return /*#__PURE__*/React.createElement(EventBusProvider, {
9
+ var code = _ref.code,
10
+ userId = _ref.userId,
11
+ debug = _ref.debug;
12
+ var _useState = useState(userId),
13
+ _useState2 = _slicedToArray(_useState, 2),
14
+ currentKey = _useState2[0],
15
+ setCurrentKey = _useState2[1];
16
+ useUpdateEffect(function () {
17
+ setCurrentKey(void 0);
18
+ setTimeout(function () {
19
+ setCurrentKey(userId);
20
+ });
21
+ }, [userId]);
22
+ return code && currentKey ? /*#__PURE__*/React.createElement(EventBusProvider, {
9
23
  runtime: RUNTIME.PREVIEW
10
24
  }, /*#__PURE__*/React.createElement(ContextProvider, {
11
- code: code
12
- }, /*#__PURE__*/React.createElement(Page, null)));
25
+ code: code,
26
+ debug: debug
27
+ }, /*#__PURE__*/React.createElement(Page, null))) : null;
13
28
  };
14
29
  export default Preview;
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React from 'react';
4
4
  import styled from 'styled-components';
5
5
  import classNames from 'classnames';
6
- import { usePageData } from "../engine/provider/ContextProvider";
6
+ import { useGet } from "../engine/provider/ContextProvider";
7
7
  import PageHeader from "./lc-components/PageHeader";
8
8
  import PageContent from "./lc-components/PageContent";
9
9
  import PageFooter from "./lc-components/PageFooter";
@@ -18,12 +18,11 @@ var PageRoot = styled.div.withConfig({
18
18
  });
19
19
  var Canvas = function Canvas(_ref) {
20
20
  var className = _ref.className;
21
- var _usePageData = usePageData(['props.css', 'props.enableHeader', 'props.enableFooter']),
22
- _usePageData2 = _slicedToArray(_usePageData, 1),
23
- _usePageData2$ = _slicedToArray(_usePageData2[0], 3),
24
- pagerootCss = _usePageData2$[0],
25
- enableHeader = _usePageData2$[1],
26
- enableFooter = _usePageData2$[2];
21
+ var _useGet = useGet(['props.css', 'props.enableHeader', 'props.enableFooter']),
22
+ _useGet2 = _slicedToArray(_useGet, 3),
23
+ pagerootCss = _useGet2[0],
24
+ enableHeader = _useGet2[1],
25
+ enableFooter = _useGet2[2];
27
26
  return /*#__PURE__*/React.createElement(PageRoot, {
28
27
  id: "page-canvas",
29
28
  className: classNames(styles['lc-view-canvas'], _defineProperty({}, className, !!className)),
@@ -1,11 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["className"];
4
+ var _excluded = ["className", "children"];
5
5
  import React, { useRef, forwardRef } from 'react';
6
6
  import { useMemoizedFn } from 'ahooks';
7
7
  import classNames from 'classnames';
8
- import { isNil } from 'lodash';
9
8
  import styled from 'styled-components';
10
9
  import { useRemoteSource } from "../engine/provider/ContextProvider";
11
10
  import Loading from "./Loading";
@@ -19,12 +18,12 @@ var Masker = styled.div.withConfig({
19
18
  })(["position:absolute;top:0;left:0;width:100%;height:100%;z-index:2400;background:rgba(0,0,0,0.45);cursor:none;"]);
20
19
  var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
21
20
  var className = _ref2.className,
21
+ children = _ref2.children,
22
22
  props = _objectWithoutProperties(_ref2, _excluded);
23
23
  var _ref = useRef(null);
24
24
  var _rootRef = ref || _ref;
25
25
  var _useRemoteSource = useRemoteSource(),
26
- loading = _useRemoteSource.loading,
27
- pageData = _useRemoteSource.pageData;
26
+ loading = _useRemoteSource.loading;
28
27
  var getTargetDom = useMemoizedFn(function () {
29
28
  return _rootRef.current;
30
29
  });
@@ -33,7 +32,7 @@ var LCPage = /*#__PURE__*/forwardRef(function (_ref2, ref) {
33
32
  getTargetDom: getTargetDom
34
33
  }, /*#__PURE__*/React.createElement("div", _extends({
35
34
  ref: _rootRef,
36
- className: classNames(styles['lc-view-page'], _defineProperty(_defineProperty({}, styles.isloading, loading), className, !!className))
37
- }, props), isNil(pageData) ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Canvas, null), loading ? /*#__PURE__*/React.createElement(Masker, null, /*#__PURE__*/React.createElement(Loading, null)) : null)));
35
+ className: classNames(styles['lc-view-page'], 'affixWrap', _defineProperty(_defineProperty({}, styles.isloading, loading), className, !!className))
36
+ }, props), children, /*#__PURE__*/React.createElement(Canvas, null), loading ? /*#__PURE__*/React.createElement(Masker, null, /*#__PURE__*/React.createElement(Loading, null)) : null));
38
37
  });
39
38
  export default LCPage;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["children"];
4
+ var _excluded = ["children", "className"];
5
5
  import React from 'react';
6
6
  import { useCreation } from 'ahooks';
7
7
  import classNames from 'classnames';
@@ -9,12 +9,13 @@ import Index from "./index";
9
9
  import styles from "./index.less";
10
10
  var FunctionDesign = function FunctionDesign(_ref) {
11
11
  var children = _ref.children,
12
+ className = _ref.className,
12
13
  props = _objectWithoutProperties(_ref, _excluded);
13
14
  var isEmpty = useCreation(function () {
14
15
  return !children || React.Children.count(children) === 0;
15
16
  }, [children]);
16
17
  return /*#__PURE__*/React.createElement(Index, _extends({
17
- className: classNames(styles['lc-component-box-design'], _defineProperty({}, styles.placeholder, isEmpty))
18
+ className: classNames(styles['lc-component-box-design'], _defineProperty(_defineProperty({}, styles.placeholder, isEmpty), "className", !!className))
18
19
  }, props), isEmpty ? '点击组件库的组件或拖拽组件到这里' : children);
19
20
  };
20
21
  export default FunctionDesign;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "component": "Box",
3
- "name": "容器",
3
+ "name": "盒子",
4
4
  "desc": "盒子是一个用于包裹其他组件的包装器,是一个单纯的容器组件,可以对其设置样式达到想要的效果。",
5
5
  "icon": "icon-box",
6
6
  "group": "container",
@@ -21,19 +21,19 @@
21
21
  "key": "onMount",
22
22
  "name": "组件首次渲染时",
23
23
  "desc": "在组件首次渲染时,执行方法",
24
- "func": "(params)=>{\n\t\n}"
24
+ "func": "function onMount(params) {\n\t\n}"
25
25
  },
26
26
  {
27
27
  "key": "onUnmount",
28
28
  "name": "组件卸载时",
29
29
  "desc": "在组件卸载时,执行方法。",
30
- "func": "(params)=>{\n\t\n}"
30
+ "func": "function onUnmount(params) {\n\t\n}"
31
31
  },
32
32
  {
33
33
  "key": "onClick",
34
34
  "name": "点击事件",
35
35
  "desc": "点击文本时,执行方法",
36
- "func": "(e)=>{\n\t\n}"
36
+ "func": "function onClick(e) {\n\t\n}"
37
37
  }
38
38
  ]
39
39
  }
@@ -33,14 +33,10 @@ var LCButton = function LCButton(_ref) {
33
33
  var ref = useRef();
34
34
  var ctx = useContext();
35
35
  useMount(function () {
36
- ctx.doAction(advance.events.onMount, {
37
- instance: ref.current
38
- });
36
+ ctx.doAction(advance.events.onMount);
39
37
  });
40
38
  useUnmount(function () {
41
- ctx.doAction(advance.events.onUnmount, {
42
- instance: ref.current
43
- });
39
+ ctx.doAction(advance.events.onUnmount);
44
40
  });
45
41
  var handleClick = useMemoizedFn(function (e) {
46
42
  if (onClick) {
@@ -16,7 +16,7 @@
16
16
  {
17
17
  "key": "title",
18
18
  "name": "标题",
19
- "type": "string",
19
+ "type": "_I18nInput",
20
20
  "repositioning": true,
21
21
  "default": "按钮"
22
22
  },
@@ -108,19 +108,19 @@
108
108
  "key": "onMount",
109
109
  "name": "组件首次渲染时",
110
110
  "desc": "在组件首次渲染时,执行方法",
111
- "func": "(instance)=>{\n\t\n}"
111
+ "func": "function onMount() {\n\t\n}"
112
112
  },
113
113
  {
114
114
  "key": "onUnmount",
115
115
  "name": "组件卸载时",
116
116
  "desc": "在组件卸载时,执行方法。",
117
- "func": "(instance)=>{\n\t\n}"
117
+ "func": "function onUnmount() {\n\t\n}"
118
118
  },
119
119
  {
120
120
  "key": "onClick",
121
121
  "name": "点击事件",
122
122
  "desc": "点击文本时,执行方法",
123
- "func": "(e)=>{\n\t\n}"
123
+ "func": "function onClick(e) {\n\t\n}"
124
124
  }
125
125
  ]
126
126
  }
@@ -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 FunctionDesign = function FunctionDesign(_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 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,
@@ -15,9 +15,19 @@
15
15
  },
16
16
  {
17
17
  "key": "dataset",
18
- "name": "首次数据自动加载",
19
- "desc": "选择系统中的可用树形数据集",
20
- "type": "_DataSetSelector"
18
+ "name": "数据集",
19
+ "type": "_DataSetSelector",
20
+ "component": "table",
21
+ "next": {
22
+ "name": "字段配置",
23
+ "props": [
24
+ {
25
+ "key": "fields",
26
+ "name": "#字段配置器",
27
+ "type": "_FieldsSetting"
28
+ }
29
+ ]
30
+ }
21
31
  },
22
32
  {
23
33
  "key": "autoLoad",
@@ -57,7 +67,7 @@
57
67
  "key": "actionTitle",
58
68
  "name": "操作列标题",
59
69
  "desc": "操作列的标题",
60
- "type": "string",
70
+ "type": "_I18nInput",
61
71
  "default": "操作列"
62
72
  },
63
73
  {
@@ -1,16 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
5
  var _excluded = ["id", "children", "className"];
7
6
  import React from 'react';
8
7
  import { useCreation } from 'ahooks';
9
- import { cloneDeep } from 'lodash';
10
8
  import Index from "./index";
11
9
  import { suid } from '@luck-design-biz/base/utils';
12
- import { useContext, usePageData } from "../../../engine/provider/ContextProvider";
13
- import { add } from "../../../engine/tools/dataProcess";
10
+ import { useContext, addNode } from "../../../engine/provider/ContextProvider";
14
11
  import classNames from 'classnames';
15
12
  import styles from "./index.less";
16
13
  import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
@@ -20,20 +17,14 @@ var FunctionDesign = function FunctionDesign(_ref) {
20
17
  className = _ref.className,
21
18
  props = _objectWithoutProperties(_ref, _excluded);
22
19
  var ctx = useContext();
23
- var _usePageData = usePageData(),
24
- _usePageData2 = _slicedToArray(_usePageData, 2),
25
- setPageData = _usePageData2[1].setPageData;
26
20
  useCreation(function () {
27
21
  if (children !== null && children !== void 0 && children.length) return;
28
22
  ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
29
- var compId = _ref2.id,
30
- pageData = _ref2.pageData;
23
+ var compId = _ref2.id;
31
24
  if (compId !== id) return;
32
- var cloneData = cloneDeep(pageData);
33
- add(cloneData, id, "box_".concat(suid()), _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
25
+ addNode(id, "box_".concat(suid()), _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
34
26
  buildIn: true
35
27
  }));
36
- setPageData(cloneData);
37
28
  }).watch();
38
29
  }, []);
39
30
  return /*#__PURE__*/React.createElement(Index, _extends({
@@ -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,