@luck-design-biz/luckda 1.0.0-alpha → 1.0.1-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 (540) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -40
  3. package/es/components/Builder/index.js +15 -3
  4. package/es/components/ComplexItem/index.js +65 -49
  5. package/es/components/LDActions/index.less +68 -68
  6. package/es/components/LdAutoForm/index.js +6 -4
  7. package/es/components/LdFormList/index.js +11 -10
  8. package/es/components/LdGrid/index.js +4 -4
  9. package/es/components/LdGridForm/index.js +40 -23
  10. package/es/components/LdGridForm/index.less +7 -7
  11. package/es/components/LdTree/index.less +40 -40
  12. package/es/helper/action.js +6 -6
  13. package/es/helper/form.js +15 -14
  14. package/es/helper/index.less +7 -7
  15. package/es/helper/ldBuilder.js +8 -3
  16. package/es/locales/zh-CN.js +41 -4
  17. package/es/lowcode/constants/api-url.js +87 -87
  18. package/es/lowcode/constants/event-topics.js +0 -2
  19. package/es/lowcode/engine/launcher.js +3 -1
  20. package/es/lowcode/engine/meta/box.props.json +3 -3
  21. package/es/lowcode/engine/meta/button.props.default.json +1 -1
  22. package/es/lowcode/engine/meta/button.props.json +2 -2
  23. package/es/lowcode/engine/meta/cardlist.props.default.json +1 -0
  24. package/es/lowcode/engine/meta/cardlist.props.json +2 -1
  25. package/es/lowcode/engine/meta/components-list.json +6 -126
  26. package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
  27. package/es/lowcode/engine/meta/dialog.props.json +76 -20
  28. package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
  29. package/es/lowcode/engine/meta/drawer.props.json +144 -24
  30. package/es/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
  31. package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -0
  32. package/es/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
  33. package/es/lowcode/engine/meta/fielddatadic.props.json +73 -0
  34. package/es/lowcode/engine/meta/fielddate.props.default.json +2 -0
  35. package/es/lowcode/engine/meta/fielddate.props.json +4 -2
  36. package/es/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
  37. package/es/lowcode/engine/meta/fieldnumber.props.json +3 -2
  38. package/es/lowcode/engine/meta/fielduser.props.default.json +1 -1
  39. package/es/lowcode/engine/meta/fielduser.props.json +1 -1
  40. package/es/lowcode/engine/meta/form.props.default.json +14 -4
  41. package/es/lowcode/engine/meta/form.props.json +53 -14
  42. package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
  43. package/es/lowcode/engine/meta/grouptree.props.json +89 -0
  44. package/es/lowcode/engine/meta/iframe.props.default.json +2 -1
  45. package/es/lowcode/engine/meta/iframe.props.json +3 -2
  46. package/es/lowcode/engine/meta/image.props.default.json +2 -1
  47. package/es/lowcode/engine/meta/image.props.json +3 -2
  48. package/es/lowcode/engine/meta/imex.props.default.json +2 -1
  49. package/es/lowcode/engine/meta/imex.props.json +27 -6
  50. package/es/lowcode/engine/meta/js-editor/auto-complete.json +65 -42
  51. package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
  52. package/es/lowcode/engine/meta/jsx.props.json +1 -1
  53. package/es/lowcode/engine/meta/layout.props.default.json +1 -1
  54. package/es/lowcode/engine/meta/layout.props.json +5 -5
  55. package/es/lowcode/engine/meta/link.props.default.json +2 -1
  56. package/es/lowcode/engine/meta/link.props.json +3 -2
  57. package/es/lowcode/engine/meta/page.props.json +6 -0
  58. package/es/lowcode/engine/meta/pagelayout.props.default.json +1 -1
  59. package/es/lowcode/engine/meta/pagelayout.props.json +1 -1
  60. package/es/lowcode/engine/meta/section.props.json +2 -1
  61. package/es/lowcode/engine/meta/split.props.default.json +1 -1
  62. package/es/lowcode/engine/meta/split.props.json +1 -1
  63. package/es/lowcode/engine/meta/table.props.json +3 -3
  64. package/es/lowcode/engine/meta/text.props.default.json +4 -2
  65. package/es/lowcode/engine/meta/text.props.json +8 -6
  66. package/es/lowcode/engine/meta/tree.props.json +2 -2
  67. package/es/lowcode/engine/provider/ContextProvider/index.js +83 -66
  68. package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
  69. package/es/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
  70. package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -15
  71. package/es/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
  72. package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
  73. package/es/lowcode/engine/provider/RemoteSourceProvider.js +1 -2
  74. package/es/lowcode/engine/tools/dataProcess.js +76 -76
  75. package/es/lowcode/engine/tools/helper.js +28 -2
  76. package/es/lowcode/engine/tools/initDS.js +263 -0
  77. package/es/lowcode/engine/tools/useCanvasRender.js +13 -1
  78. package/es/lowcode/engine/tools/useCombinedRefs.js +3 -2
  79. package/es/lowcode/painter/Components.js +2 -2
  80. package/es/lowcode/painter/Design.js +1 -0
  81. package/es/lowcode/painter/DesignOperator.js +25 -11
  82. package/es/lowcode/painter/Panel.js +2 -2
  83. package/es/lowcode/painter/components/AdvancePanel.js +3 -3
  84. package/es/lowcode/painter/components/Collapse.js +31 -28
  85. package/es/lowcode/painter/components/ColorInput.js +24 -24
  86. package/es/lowcode/painter/components/ListEditor.js +24 -24
  87. package/es/lowcode/painter/components/NumberInput.js +29 -29
  88. package/es/lowcode/painter/components/PanelItem.js +24 -24
  89. package/es/lowcode/painter/components/PopConfirm.js +8 -8
  90. package/es/lowcode/painter/components/PopForm.js +27 -27
  91. package/es/lowcode/painter/components/RuleInput.js +30 -30
  92. package/es/lowcode/painter/components/SortBox.js +22 -22
  93. package/es/lowcode/painter/components/TipIcon.js +16 -0
  94. package/es/lowcode/painter/components/VarEditor.js +456 -0
  95. package/es/lowcode/painter/components/code-editor/BaseEditor.js +32 -32
  96. package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
  97. package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +25 -25
  98. package/es/lowcode/painter/components/code-editor/JSEditor.js +23 -21
  99. package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
  100. package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
  101. package/es/lowcode/painter/components/field-setting/SettingUI.js +47 -5
  102. package/es/lowcode/painter/components/field-setting/index.js +27 -13
  103. package/es/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
  104. package/es/lowcode/painter/index.js +1 -0
  105. package/es/lowcode/painter/panel-section/BlockEditor/index.js +20 -6
  106. package/es/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
  107. package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
  108. package/es/lowcode/painter/panel-section/DataSetSelector.js +8 -0
  109. package/es/lowcode/painter/panel-section/FieldsSetting.js +30 -4
  110. package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
  111. package/es/lowcode/painter/panel-section/I18nInput.js +4 -2
  112. package/es/lowcode/painter/panel-section/Icon.js +32 -27
  113. package/es/lowcode/painter/panel-section/IconConditionSelector.js +7 -7
  114. package/es/lowcode/painter/panel-section/IconSelector.js +17 -17
  115. package/es/lowcode/painter/panel-section/ImpExp.js +1 -27
  116. package/es/lowcode/painter/panel-section/ImpExpAlone.js +1 -2
  117. package/es/lowcode/painter/panel-section/LayoutRatio.js +22 -21
  118. package/es/lowcode/painter/panel-section/PageVars.js +300 -0
  119. package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
  120. package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
  121. package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
  122. package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
  123. package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
  124. package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
  125. package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
  126. package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
  127. package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
  128. package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
  129. package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
  130. package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
  131. package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
  132. package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
  133. package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
  134. package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
  135. package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
  136. package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
  137. package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
  138. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +6 -5
  139. package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
  140. package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
  141. package/es/lowcode/painter/panel-section/StylePanel/index.js +15 -15
  142. package/es/lowcode/painter/panel-section/TabItems.js +6 -42
  143. package/es/lowcode/painter/panel-section/TextContent.js +79 -0
  144. package/es/lowcode/painter/services/complexPop.js +21 -0
  145. package/es/lowcode/painter/style/action-bind-modal.less +102 -102
  146. package/es/lowcode/painter/style/actions-editor.less +15 -15
  147. package/es/lowcode/painter/style/border-editor.less +36 -36
  148. package/es/lowcode/painter/style/border-radius-selector.less +42 -42
  149. package/es/lowcode/painter/style/border-selector.less +39 -39
  150. package/es/lowcode/painter/style/button-type.less +5 -5
  151. package/es/lowcode/painter/style/collapse.less +28 -28
  152. package/es/lowcode/painter/style/color-input.less +19 -19
  153. package/es/lowcode/painter/style/components.less +91 -91
  154. package/es/lowcode/painter/style/design.less +166 -160
  155. package/es/lowcode/painter/style/display.less +17 -17
  156. package/es/lowcode/painter/style/dragdrop.less +10 -10
  157. package/es/lowcode/painter/style/fields-setting.less +25 -25
  158. package/es/lowcode/painter/style/font-editor.less +9 -9
  159. package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
  160. package/es/lowcode/painter/style/icon-selector.less +22 -22
  161. package/es/lowcode/painter/style/icon.less +10 -10
  162. package/es/lowcode/painter/style/impexp.less +7 -7
  163. package/es/lowcode/painter/style/index.less +6 -6
  164. package/es/lowcode/painter/style/layout-ratio.less +51 -51
  165. package/es/lowcode/painter/style/list-editor.less +95 -95
  166. package/es/lowcode/painter/style/number-input.less +17 -17
  167. package/es/lowcode/painter/style/outline.less +28 -28
  168. package/es/lowcode/painter/style/page-layout-display.less +27 -27
  169. package/es/lowcode/painter/style/page-vars.less +25 -0
  170. package/es/lowcode/painter/style/panel-attrs.less +43 -43
  171. package/es/lowcode/painter/style/panel-item.less +54 -54
  172. package/es/lowcode/painter/style/panel.less +98 -98
  173. package/es/lowcode/painter/style/pop-confirm.less +17 -17
  174. package/es/lowcode/painter/style/pop-form.less +19 -19
  175. package/es/lowcode/painter/style/radio.less +24 -24
  176. package/es/lowcode/painter/style/ribbon.less +5 -5
  177. package/es/lowcode/painter/style/rule-input.less +12 -12
  178. package/es/lowcode/painter/style/split-display.less +18 -18
  179. package/es/lowcode/painter/style/style-panel.less +37 -37
  180. package/es/lowcode/painter/style/tabitems.less +90 -90
  181. package/es/lowcode/painter/style/treedragdrop.less +19 -19
  182. package/es/lowcode/preview/index.js +1 -0
  183. package/es/lowcode/view/Canvas.js +24 -22
  184. package/es/lowcode/view/Loading.js +5 -7
  185. package/es/lowcode/view/Page.js +37 -15
  186. package/es/lowcode/view/index.js +1 -0
  187. package/es/lowcode/view/lc-components/Box/index.js +22 -7
  188. package/es/lowcode/view/lc-components/Box/index.less +14 -14
  189. package/es/lowcode/view/lc-components/Box/meta.json +40 -40
  190. package/es/lowcode/view/lc-components/Button/index.js +40 -40
  191. package/es/lowcode/view/lc-components/Button/meta.json +127 -127
  192. package/es/lowcode/view/lc-components/Button/style.less +2 -2
  193. package/es/lowcode/view/lc-components/CardList/meta.json +154 -153
  194. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
  195. package/es/lowcode/view/lc-components/Dialog/index.js +34 -25
  196. package/es/lowcode/view/lc-components/Dialog/index.less +12 -8
  197. package/es/lowcode/view/lc-components/Dialog/meta.json +204 -150
  198. package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
  199. package/es/lowcode/view/lc-components/Drawer/index.js +149 -34
  200. package/es/lowcode/view/lc-components/Drawer/index.less +13 -10
  201. package/es/lowcode/view/lc-components/Drawer/meta.json +242 -131
  202. package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
  203. package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -133
  204. package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -139
  205. package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
  206. package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
  207. package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
  208. package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -142
  209. package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
  210. package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
  211. package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
  212. package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
  213. package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
  214. package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
  215. package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
  216. package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
  217. package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -129
  218. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
  219. package/es/lowcode/view/lc-components/Form/index.js +76 -51
  220. package/es/lowcode/view/lc-components/Form/meta.json +645 -610
  221. package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
  222. package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
  223. package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
  224. package/es/lowcode/view/lc-components/GroupTree/index.js +201 -0
  225. package/es/lowcode/view/lc-components/GroupTree/meta.json +89 -0
  226. package/es/lowcode/view/lc-components/Iframe/meta.json +33 -32
  227. package/es/lowcode/view/lc-components/ImEx/index.js +199 -128
  228. package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
  229. package/es/lowcode/view/lc-components/ImEx/meta.json +134 -113
  230. package/es/lowcode/view/lc-components/Image/meta.json +115 -114
  231. package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
  232. package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
  233. package/es/lowcode/view/lc-components/Layout/index.js +38 -21
  234. package/es/lowcode/view/lc-components/Layout/index.less +5 -5
  235. package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
  236. package/es/lowcode/view/lc-components/Link/meta.json +113 -112
  237. package/es/lowcode/view/lc-components/Page/meta.json +61 -55
  238. package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
  239. package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
  240. package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
  241. package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
  242. package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
  243. package/es/lowcode/view/lc-components/Section/index.js +2 -6
  244. package/es/lowcode/view/lc-components/Section/index.less +7 -7
  245. package/es/lowcode/view/lc-components/Section/meta.json +108 -107
  246. package/es/lowcode/view/lc-components/Split/index.js +19 -4
  247. package/es/lowcode/view/lc-components/Split/meta.json +53 -53
  248. package/es/lowcode/view/lc-components/Table/index.js +175 -148
  249. package/es/lowcode/view/lc-components/Table/meta.json +450 -450
  250. package/es/lowcode/view/lc-components/Tabs/index.js +42 -39
  251. package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
  252. package/es/lowcode/view/lc-components/Text/index.js +9 -2
  253. package/es/lowcode/view/lc-components/Text/meta.json +56 -56
  254. package/es/lowcode/view/lc-components/Tree/index.js +102 -107
  255. package/es/lowcode/view/lc-components/Tree/index.less +4 -4
  256. package/es/lowcode/view/lc-components/Tree/meta.json +357 -357
  257. package/es/lowcode/view/lc-components/Wrapper.js +17 -2
  258. package/es/lowcode/view/style/canvas.less +5 -5
  259. package/es/lowcode/view/style/loading.less +98 -84
  260. package/es/lowcode/view/style/page.less +7 -7
  261. package/es/services.js +19 -0
  262. package/es/upload/FilesWall/index.js +13 -13
  263. package/es/upload/FilesWall/index.less +74 -74
  264. package/es/upload/Form/gridForm.js +17 -7
  265. package/es/upload/Form/index.less +7 -7
  266. package/es/upload/FormItem/index.js +18 -18
  267. package/es/utils/form.js +25 -25
  268. package/es/utils/grid.js +5 -4
  269. package/lib/components/Builder/index.js +13 -1
  270. package/lib/components/ComplexItem/index.js +62 -47
  271. package/lib/components/LDActions/index.less +68 -68
  272. package/lib/components/LdAutoForm/index.js +5 -3
  273. package/lib/components/LdFormList/index.js +12 -11
  274. package/lib/components/LdGrid/index.js +4 -4
  275. package/lib/components/LdGridForm/index.js +40 -23
  276. package/lib/components/LdGridForm/index.less +7 -7
  277. package/lib/components/LdTree/index.less +40 -40
  278. package/lib/helper/action.js +6 -6
  279. package/lib/helper/form.js +15 -14
  280. package/lib/helper/index.less +7 -7
  281. package/lib/helper/ldBuilder.js +8 -3
  282. package/lib/locales/zh-CN.js +41 -4
  283. package/lib/lowcode/constants/api-url.js +87 -87
  284. package/lib/lowcode/constants/event-topics.js +1 -3
  285. package/lib/lowcode/engine/launcher.js +3 -1
  286. package/lib/lowcode/engine/meta/box.props.json +3 -3
  287. package/lib/lowcode/engine/meta/button.props.default.json +1 -1
  288. package/lib/lowcode/engine/meta/button.props.json +2 -2
  289. package/lib/lowcode/engine/meta/cardlist.props.default.json +1 -0
  290. package/lib/lowcode/engine/meta/cardlist.props.json +2 -1
  291. package/lib/lowcode/engine/meta/components-list.json +6 -126
  292. package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
  293. package/lib/lowcode/engine/meta/dialog.props.json +76 -20
  294. package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
  295. package/lib/lowcode/engine/meta/drawer.props.json +144 -24
  296. package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
  297. package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -0
  298. package/lib/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
  299. package/lib/lowcode/engine/meta/fielddatadic.props.json +73 -0
  300. package/lib/lowcode/engine/meta/fielddate.props.default.json +2 -0
  301. package/lib/lowcode/engine/meta/fielddate.props.json +4 -2
  302. package/lib/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
  303. package/lib/lowcode/engine/meta/fieldnumber.props.json +3 -2
  304. package/lib/lowcode/engine/meta/fielduser.props.default.json +1 -1
  305. package/lib/lowcode/engine/meta/fielduser.props.json +1 -1
  306. package/lib/lowcode/engine/meta/form.props.default.json +14 -4
  307. package/lib/lowcode/engine/meta/form.props.json +53 -14
  308. package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
  309. package/lib/lowcode/engine/meta/grouptree.props.json +89 -0
  310. package/lib/lowcode/engine/meta/iframe.props.default.json +2 -1
  311. package/lib/lowcode/engine/meta/iframe.props.json +3 -2
  312. package/lib/lowcode/engine/meta/image.props.default.json +2 -1
  313. package/lib/lowcode/engine/meta/image.props.json +3 -2
  314. package/lib/lowcode/engine/meta/imex.props.default.json +2 -1
  315. package/lib/lowcode/engine/meta/imex.props.json +27 -6
  316. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +65 -42
  317. package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
  318. package/lib/lowcode/engine/meta/jsx.props.json +1 -1
  319. package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
  320. package/lib/lowcode/engine/meta/layout.props.json +5 -5
  321. package/lib/lowcode/engine/meta/link.props.default.json +2 -1
  322. package/lib/lowcode/engine/meta/link.props.json +3 -2
  323. package/lib/lowcode/engine/meta/page.props.json +6 -0
  324. package/lib/lowcode/engine/meta/pagelayout.props.default.json +1 -1
  325. package/lib/lowcode/engine/meta/pagelayout.props.json +1 -1
  326. package/lib/lowcode/engine/meta/section.props.json +2 -1
  327. package/lib/lowcode/engine/meta/split.props.default.json +1 -1
  328. package/lib/lowcode/engine/meta/split.props.json +1 -1
  329. package/lib/lowcode/engine/meta/table.props.json +3 -3
  330. package/lib/lowcode/engine/meta/text.props.default.json +4 -2
  331. package/lib/lowcode/engine/meta/text.props.json +8 -6
  332. package/lib/lowcode/engine/meta/tree.props.json +2 -2
  333. package/lib/lowcode/engine/provider/ContextProvider/index.js +81 -64
  334. package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
  335. package/lib/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
  336. package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -16
  337. package/lib/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
  338. package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
  339. package/lib/lowcode/engine/provider/RemoteSourceProvider.js +2 -3
  340. package/lib/lowcode/engine/tools/dataProcess.js +76 -76
  341. package/lib/lowcode/engine/tools/helper.js +29 -2
  342. package/lib/lowcode/engine/tools/initDS.js +270 -0
  343. package/lib/lowcode/engine/tools/useCanvasRender.js +13 -1
  344. package/lib/lowcode/engine/tools/useCombinedRefs.js +2 -1
  345. package/lib/lowcode/painter/Components.js +2 -2
  346. package/lib/lowcode/painter/Design.js +1 -0
  347. package/lib/lowcode/painter/DesignOperator.js +24 -10
  348. package/lib/lowcode/painter/Panel.js +2 -2
  349. package/lib/lowcode/painter/components/AdvancePanel.js +3 -3
  350. package/lib/lowcode/painter/components/Collapse.js +31 -28
  351. package/lib/lowcode/painter/components/ColorInput.js +24 -24
  352. package/lib/lowcode/painter/components/ListEditor.js +24 -24
  353. package/lib/lowcode/painter/components/NumberInput.js +29 -29
  354. package/lib/lowcode/painter/components/PanelItem.js +24 -24
  355. package/lib/lowcode/painter/components/PopConfirm.js +8 -8
  356. package/lib/lowcode/painter/components/PopForm.js +27 -27
  357. package/lib/lowcode/painter/components/RuleInput.js +30 -30
  358. package/lib/lowcode/painter/components/SortBox.js +22 -22
  359. package/lib/lowcode/painter/components/TipIcon.js +23 -0
  360. package/lib/lowcode/painter/components/VarEditor.js +463 -0
  361. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +32 -32
  362. package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
  363. package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +25 -25
  364. package/lib/lowcode/painter/components/code-editor/JSEditor.js +23 -21
  365. package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
  366. package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
  367. package/lib/lowcode/painter/components/field-setting/SettingUI.js +46 -4
  368. package/lib/lowcode/painter/components/field-setting/index.js +27 -13
  369. package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
  370. package/lib/lowcode/painter/index.js +1 -0
  371. package/lib/lowcode/painter/panel-section/BlockEditor/index.js +19 -5
  372. package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
  373. package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
  374. package/lib/lowcode/painter/panel-section/DataSetSelector.js +8 -0
  375. package/lib/lowcode/painter/panel-section/FieldsSetting.js +30 -4
  376. package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
  377. package/lib/lowcode/painter/panel-section/I18nInput.js +4 -2
  378. package/lib/lowcode/painter/panel-section/Icon.js +31 -26
  379. package/lib/lowcode/painter/panel-section/IconConditionSelector.js +6 -6
  380. package/lib/lowcode/painter/panel-section/IconSelector.js +17 -17
  381. package/lib/lowcode/painter/panel-section/ImpExp.js +0 -26
  382. package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -1
  383. package/lib/lowcode/painter/panel-section/LayoutRatio.js +22 -21
  384. package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
  385. package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
  386. package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
  387. package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
  388. package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
  389. package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
  390. package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
  391. package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
  392. package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
  393. package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
  394. package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
  395. package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
  396. package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
  397. package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
  398. package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
  399. package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
  400. package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
  401. package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
  402. package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
  403. package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
  404. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +6 -5
  405. package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
  406. package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
  407. package/lib/lowcode/painter/panel-section/StylePanel/index.js +15 -15
  408. package/lib/lowcode/painter/panel-section/TabItems.js +6 -42
  409. package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
  410. package/lib/lowcode/painter/services/complexPop.js +28 -0
  411. package/lib/lowcode/painter/style/action-bind-modal.less +102 -102
  412. package/lib/lowcode/painter/style/actions-editor.less +15 -15
  413. package/lib/lowcode/painter/style/border-editor.less +36 -36
  414. package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
  415. package/lib/lowcode/painter/style/border-selector.less +39 -39
  416. package/lib/lowcode/painter/style/button-type.less +5 -5
  417. package/lib/lowcode/painter/style/collapse.less +28 -28
  418. package/lib/lowcode/painter/style/color-input.less +19 -19
  419. package/lib/lowcode/painter/style/components.less +91 -91
  420. package/lib/lowcode/painter/style/design.less +166 -160
  421. package/lib/lowcode/painter/style/display.less +17 -17
  422. package/lib/lowcode/painter/style/dragdrop.less +10 -10
  423. package/lib/lowcode/painter/style/fields-setting.less +25 -25
  424. package/lib/lowcode/painter/style/font-editor.less +9 -9
  425. package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
  426. package/lib/lowcode/painter/style/icon-selector.less +22 -22
  427. package/lib/lowcode/painter/style/icon.less +10 -10
  428. package/lib/lowcode/painter/style/impexp.less +7 -7
  429. package/lib/lowcode/painter/style/index.less +6 -6
  430. package/lib/lowcode/painter/style/layout-ratio.less +51 -51
  431. package/lib/lowcode/painter/style/list-editor.less +95 -95
  432. package/lib/lowcode/painter/style/number-input.less +17 -17
  433. package/lib/lowcode/painter/style/outline.less +28 -28
  434. package/lib/lowcode/painter/style/page-layout-display.less +27 -27
  435. package/lib/lowcode/painter/style/page-vars.less +25 -0
  436. package/lib/lowcode/painter/style/panel-attrs.less +43 -43
  437. package/lib/lowcode/painter/style/panel-item.less +54 -54
  438. package/lib/lowcode/painter/style/panel.less +98 -98
  439. package/lib/lowcode/painter/style/pop-confirm.less +17 -17
  440. package/lib/lowcode/painter/style/pop-form.less +19 -19
  441. package/lib/lowcode/painter/style/radio.less +24 -24
  442. package/lib/lowcode/painter/style/ribbon.less +5 -5
  443. package/lib/lowcode/painter/style/rule-input.less +12 -12
  444. package/lib/lowcode/painter/style/split-display.less +18 -18
  445. package/lib/lowcode/painter/style/style-panel.less +37 -37
  446. package/lib/lowcode/painter/style/tabitems.less +90 -90
  447. package/lib/lowcode/painter/style/treedragdrop.less +19 -19
  448. package/lib/lowcode/preview/index.js +1 -0
  449. package/lib/lowcode/view/Canvas.js +24 -22
  450. package/lib/lowcode/view/Loading.js +5 -7
  451. package/lib/lowcode/view/Page.js +35 -13
  452. package/lib/lowcode/view/index.js +1 -0
  453. package/lib/lowcode/view/lc-components/Box/index.js +21 -6
  454. package/lib/lowcode/view/lc-components/Box/index.less +14 -14
  455. package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
  456. package/lib/lowcode/view/lc-components/Button/index.js +38 -38
  457. package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
  458. package/lib/lowcode/view/lc-components/Button/style.less +2 -2
  459. package/lib/lowcode/view/lc-components/CardList/meta.json +154 -153
  460. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
  461. package/lib/lowcode/view/lc-components/Dialog/index.js +34 -25
  462. package/lib/lowcode/view/lc-components/Dialog/index.less +12 -8
  463. package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -150
  464. package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
  465. package/lib/lowcode/view/lc-components/Drawer/index.js +148 -33
  466. package/lib/lowcode/view/lc-components/Drawer/index.less +13 -10
  467. package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -131
  468. package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
  469. package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -133
  470. package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -139
  471. package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
  472. package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
  473. package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
  474. package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -142
  475. package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
  476. package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
  477. package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
  478. package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
  479. package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
  480. package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
  481. package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
  482. package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
  483. package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -129
  484. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
  485. package/lib/lowcode/view/lc-components/Form/index.js +75 -50
  486. package/lib/lowcode/view/lc-components/Form/meta.json +645 -610
  487. package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
  488. package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
  489. package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
  490. package/lib/lowcode/view/lc-components/GroupTree/index.js +209 -0
  491. package/lib/lowcode/view/lc-components/GroupTree/meta.json +89 -0
  492. package/lib/lowcode/view/lc-components/Iframe/meta.json +33 -32
  493. package/lib/lowcode/view/lc-components/ImEx/index.js +197 -126
  494. package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
  495. package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -113
  496. package/lib/lowcode/view/lc-components/Image/meta.json +115 -114
  497. package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
  498. package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
  499. package/lib/lowcode/view/lc-components/Layout/index.js +37 -20
  500. package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
  501. package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
  502. package/lib/lowcode/view/lc-components/Link/meta.json +113 -112
  503. package/lib/lowcode/view/lc-components/Page/meta.json +61 -55
  504. package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
  505. package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
  506. package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
  507. package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
  508. package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
  509. package/lib/lowcode/view/lc-components/Section/index.js +2 -6
  510. package/lib/lowcode/view/lc-components/Section/index.less +7 -7
  511. package/lib/lowcode/view/lc-components/Section/meta.json +108 -107
  512. package/lib/lowcode/view/lc-components/Split/index.js +18 -3
  513. package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
  514. package/lib/lowcode/view/lc-components/Table/index.js +176 -149
  515. package/lib/lowcode/view/lc-components/Table/meta.json +450 -450
  516. package/lib/lowcode/view/lc-components/Tabs/index.js +40 -37
  517. package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
  518. package/lib/lowcode/view/lc-components/Text/index.js +8 -1
  519. package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
  520. package/lib/lowcode/view/lc-components/Tree/index.js +102 -107
  521. package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
  522. package/lib/lowcode/view/lc-components/Tree/meta.json +357 -357
  523. package/lib/lowcode/view/lc-components/Wrapper.js +16 -1
  524. package/lib/lowcode/view/style/canvas.less +5 -5
  525. package/lib/lowcode/view/style/loading.less +98 -84
  526. package/lib/lowcode/view/style/page.less +7 -7
  527. package/lib/services.js +20 -0
  528. package/lib/upload/FilesWall/index.js +13 -13
  529. package/lib/upload/FilesWall/index.less +74 -74
  530. package/lib/upload/Form/gridForm.js +17 -7
  531. package/lib/upload/Form/index.less +7 -7
  532. package/lib/upload/FormItem/index.js +18 -18
  533. package/lib/utils/form.js +24 -24
  534. package/lib/utils/grid.js +4 -3
  535. package/lowcode.js +1 -1
  536. package/package.json +175 -175
  537. package/upload.js +1 -1
  538. package/utils.js +1 -1
  539. package/es/lowcode/view/lc-components/Form/index.less +0 -5
  540. package/lib/lowcode/view/lc-components/Form/index.less +0 -5
@@ -3,18 +3,16 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
5
5
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
6
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
- var _excluded = ["id", "title", "type", "size", "iconFont", "block", "ghost", "css", "className", "onClick", "advance", "impexpSetting"];
8
6
  import React, { useRef, useState, useEffect } from 'react';
9
7
  import PropTypes from 'prop-types';
10
- import { useMemoizedFn, useMount, useUnmount, useRequest } from 'ahooks';
11
- import { notification, Icon as IconAntd, Upload, Button as ButtonAntd, Progress, message } from 'luck-design/antd';
8
+ import { useMemoizedFn, useRequest } from 'ahooks';
9
+ import { notification, Progress, message } from 'luck-design/antd';
12
10
  import { BasicForm, BasicFormItem, PopWindow } from 'luck-design';
13
11
  import api from "@/services/ApiConfig";
14
12
  import styled from 'styled-components';
15
13
  import classNames from 'classnames';
16
14
  import styles from "./index.less";
17
- import { useRemoteSource } from "../../../engine/provider/ContextProvider";
15
+ import { useContext, useRemoteSource } from "../../../engine/provider/ContextProvider";
18
16
  import Wrapper from "../Wrapper";
19
17
  import { LdButton as Button } from "../../../../components/LdCom";
20
18
  import Icon from "../../../../components/IconFont";
@@ -50,12 +48,18 @@ var LCImex = function LCImex(_ref) {
50
48
  onClick = _ref.onClick,
51
49
  advance = _ref.advance,
52
50
  impexpSetting = _ref.impexpSetting,
53
- rest = _objectWithoutProperties(_ref, _excluded);
51
+ serial = _ref.serial,
52
+ serialEffect = _ref.serialEffect;
54
53
  var ref = useRef();
55
- var uploadRef = useRef();
54
+ var ctx = useContext();
56
55
  var _useRemoteSource = useRemoteSource(),
57
- module = _useRemoteSource.module,
58
- moduleCode = _useRemoteSource.moduleCode;
56
+ module = _useRemoteSource.module;
57
+ useEffect(function () {
58
+ ctx.doAction(advance.events.onMount);
59
+ return function () {
60
+ return ctx.doAction(advance.events.onUnmount);
61
+ };
62
+ }, []);
59
63
  var getTargetDom = useMemoizedFn(function () {
60
64
  var _ref$current;
61
65
  return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.buttonNode;
@@ -76,7 +80,7 @@ var LCImex = function LCImex(_ref) {
76
80
  var _fetchExcelStateParams = {
77
81
  moduleCode: moduleCode,
78
82
  behaviorKey: behaviorKey,
79
- reportType: "export"
83
+ reportType: 'export'
80
84
  };
81
85
  getFindexcelstate(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
82
86
  if (response.code === 1) {
@@ -123,7 +127,7 @@ var LCImex = function LCImex(_ref) {
123
127
  _exportExcelParams = {
124
128
  moduleCode: module.moduleCode,
125
129
  behaviorKey: behaviorKey,
126
- reportType: "export"
130
+ reportType: 'export'
127
131
  };
128
132
  _exportExcelPrefix = "/".concat(strategy);
129
133
  _context.next = 9;
@@ -151,47 +155,68 @@ var LCImex = function LCImex(_ref) {
151
155
  };
152
156
  }());
153
157
  };
154
- var doExportAll = function doExportAll(onExportAll) {
155
- var key = 'exportAll';
156
- var notificationConfig = {
157
- key: key,
158
- duration: null,
159
- message: '正在导出数据...',
160
- placement: 'bottomRight',
161
- closeIcon: /*#__PURE__*/React.createElement("div", null),
162
- icon: /*#__PURE__*/React.createElement(Icon, {
163
- type: "cloud-download",
164
- className: styles.exportTheme
165
- })
166
- };
167
- var process = function process(i) {
168
- notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
169
- description: /*#__PURE__*/React.createElement(Progress, {
170
- percent: i
171
- })
172
- }));
173
- };
174
- notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
175
- description: /*#__PURE__*/React.createElement(Progress, {
176
- percent: 0
177
- })
158
+ var doExportAll = /*#__PURE__*/function () {
159
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(onExportAll) {
160
+ var key, notificationConfig, process, ret;
161
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
162
+ while (1) switch (_context2.prev = _context2.next) {
163
+ case 0:
164
+ key = 'exportAll';
165
+ notificationConfig = {
166
+ key: key,
167
+ duration: null,
168
+ message: '正在导出数据...',
169
+ placement: 'bottomRight',
170
+ closeIcon: /*#__PURE__*/React.createElement("div", null),
171
+ icon: /*#__PURE__*/React.createElement(Icon, {
172
+ type: "cloud-download",
173
+ className: styles.exportTheme
174
+ })
175
+ };
176
+ process = function process(i) {
177
+ notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
178
+ description: /*#__PURE__*/React.createElement(Progress, {
179
+ percent: i
180
+ })
181
+ }));
182
+ };
183
+ notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
184
+ description: /*#__PURE__*/React.createElement(Progress, {
185
+ percent: 0
186
+ })
187
+ }));
188
+ _context2.prev = 4;
189
+ _context2.next = 7;
190
+ return onExportAll(process);
191
+ case 7:
192
+ ret = _context2.sent;
193
+ if (ret) {
194
+ window.location.href = ret;
195
+ }
196
+ notification.close(key);
197
+ _context2.next = 15;
198
+ break;
199
+ case 12:
200
+ _context2.prev = 12;
201
+ _context2.t0 = _context2["catch"](4);
202
+ notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
203
+ icon: /*#__PURE__*/React.createElement(Icon, {
204
+ type: "cloud-download",
205
+ className: styles.exportErrorTheme
206
+ }),
207
+ message: '导出失败',
208
+ duration: 4
209
+ }));
210
+ case 15:
211
+ case "end":
212
+ return _context2.stop();
213
+ }
214
+ }, _callee2, null, [[4, 12]]);
178
215
  }));
179
- onExportAll(process).then(function (ret) {
180
- if (ret) {
181
- window.location.href = ret;
182
- }
183
- notification.close(key);
184
- }).catch(function () {
185
- return notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
186
- icon: /*#__PURE__*/React.createElement(Icon, {
187
- type: "cloud-download",
188
- className: styles.exportErrorTheme
189
- }),
190
- message: '导出失败',
191
- duration: 4
192
- }));
193
- });
194
- };
216
+ return function doExportAll(_x3) {
217
+ return _ref4.apply(this, arguments);
218
+ };
219
+ }();
195
220
 
196
221
  // ========= 导出 ==========
197
222
 
@@ -216,18 +241,18 @@ var LCImex = function LCImex(_ref) {
216
241
  manual: true
217
242
  }),
218
243
  runAsyncImport = _useRequest2.runAsync;
219
- var fecthFindExcelState = function fecthFindExcelState(_ref4, callback) {
220
- var strategy = _ref4.strategy,
221
- batchNo = _ref4.batchNo,
222
- moduleCode = _ref4.moduleCode,
223
- behaviorKey = _ref4.behaviorKey,
224
- templateId = _ref4.templateId;
244
+ var fecthFindExcelState = function fecthFindExcelState(_ref5, callback) {
245
+ var strategy = _ref5.strategy,
246
+ batchNo = _ref5.batchNo,
247
+ moduleCode = _ref5.moduleCode,
248
+ behaviorKey = _ref5.behaviorKey,
249
+ templateId = _ref5.templateId;
225
250
  var _fetchExcelStatePrefix = "/".concat(strategy, "/").concat(batchNo);
226
251
  var _fetchExcelStateParams = {
227
252
  moduleCode: moduleCode,
228
253
  behaviorKey: behaviorKey,
229
254
  templateId: templateId,
230
- reportType: "import"
255
+ reportType: 'import'
231
256
  };
232
257
  getFindexcelstate(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
233
258
  if (response.code === 1) {
@@ -263,13 +288,13 @@ var LCImex = function LCImex(_ref) {
263
288
  }
264
289
  }, [visible]);
265
290
  var handleImport = /*#__PURE__*/function () {
266
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
291
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
267
292
  var _importExcelParams, strategy, importParameter, _importExcelPrefix, importExcelResponse;
268
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
269
- while (1) switch (_context2.prev = _context2.next) {
293
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
294
+ while (1) switch (_context3.prev = _context3.next) {
270
295
  case 0:
271
296
  if (err) {
272
- _context2.next = 14;
297
+ _context3.next = 14;
273
298
  break;
274
299
  }
275
300
  _importExcelParams = new FormData();
@@ -287,10 +312,10 @@ var LCImex = function LCImex(_ref) {
287
312
  };
288
313
  _importExcelParams.append('importParameter', JSON.stringify(importParameter));
289
314
  _importExcelPrefix = "/".concat(strategy);
290
- _context2.next = 9;
315
+ _context3.next = 9;
291
316
  return runAsyncImport(_importExcelPrefix, _importExcelParams);
292
317
  case 9:
293
- importExcelResponse = _context2.sent;
318
+ importExcelResponse = _context3.sent;
294
319
  setActionStep('uploading');
295
320
  fecthFindExcelState(_objectSpread({
296
321
  strategy: strategy,
@@ -298,70 +323,111 @@ var LCImex = function LCImex(_ref) {
298
323
  }, importParameter), function (result) {
299
324
  setUploadResult(result || {});
300
325
  });
301
- _context2.next = 15;
326
+ _context3.next = 15;
302
327
  break;
303
328
  case 14:
304
329
  message.info('请选择Excel文件!');
305
330
  case 15:
306
331
  case "end":
307
- return _context2.stop();
332
+ return _context3.stop();
308
333
  }
309
- }, _callee2);
334
+ }, _callee3);
310
335
  }));
311
- return function handleImport(_x3, _x4) {
312
- return _ref5.apply(this, arguments);
336
+ return function handleImport(_x4, _x5) {
337
+ return _ref6.apply(this, arguments);
313
338
  };
314
339
  }();
315
340
 
316
341
  // ========= 导入 ==========
317
342
 
318
343
  var handleClick = useMemoizedFn( /*#__PURE__*/function () {
319
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
320
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
321
- while (1) switch (_context3.prev = _context3.next) {
344
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
345
+ var resault, response;
346
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
347
+ while (1) switch (_context4.prev = _context4.next) {
322
348
  case 0:
323
349
  if (!onClick) {
324
- _context3.next = 3;
350
+ _context4.next = 3;
325
351
  break;
326
352
  }
327
353
  onClick(e);
328
- return _context3.abrupt("return");
354
+ return _context4.abrupt("return");
329
355
  case 3:
356
+ _context4.next = 5;
357
+ return ctx.doAction(advance.events.beforeExe);
358
+ case 5:
359
+ resault = _context4.sent;
360
+ if (!(resault === false)) {
361
+ _context4.next = 9;
362
+ break;
363
+ }
364
+ ctx.doAction(advance.events.afterExe, {
365
+ success: false
366
+ });
367
+ return _context4.abrupt("return");
368
+ case 9:
330
369
  if (!(impexpSetting.type === 'export')) {
331
- _context3.next = 7;
370
+ _context4.next = 20;
332
371
  break;
333
372
  }
334
- // ! 导出
335
- if (isString(impexpSetting.customParam) && impexpSetting.customParam) {
336
- doExportAll(handleExportAll);
337
- } else {
338
- message.info("\u672A\u914D\u7F6E\u884C\u4E3A\uFF01");
373
+ if (!(isString(impexpSetting.customParam) && impexpSetting.customParam)) {
374
+ _context4.next = 16;
375
+ break;
339
376
  }
340
- _context3.next = 11;
377
+ _context4.next = 13;
378
+ return doExportAll(handleExportAll);
379
+ case 13:
380
+ ctx.doAction(advance.events.afterExe, {
381
+ success: true
382
+ });
383
+ _context4.next = 18;
341
384
  break;
342
- case 7:
385
+ case 16:
386
+ message.info("\u672A\u914D\u7F6E\u884C\u4E3A\uFF01");
387
+ ctx.doAction(advance.events.afterExe, {
388
+ success: false
389
+ });
390
+ case 18:
391
+ _context4.next = 29;
392
+ break;
393
+ case 20:
343
394
  if (impexpSetting.customParam) {
344
- _context3.next = 9;
395
+ _context4.next = 23;
345
396
  break;
346
397
  }
347
- return _context3.abrupt("return", message.info("\u672A\u914D\u7F6E\u6A21\u7248\uFF01"));
348
- case 9:
349
- if (!impexpSetting.customType) {
350
- noAuthGetTemplateUrl(impexpSetting.customParam).then(function (response) {
351
- if (response.code === 1) {
352
- setTemplateUrl(response.data);
353
- }
398
+ ctx.doAction(advance.events.afterExe, {
399
+ success: false
400
+ });
401
+ return _context4.abrupt("return", message.info("\u672A\u914D\u7F6E\u6A21\u7248\uFF01"));
402
+ case 23:
403
+ if (impexpSetting.customType) {
404
+ _context4.next = 28;
405
+ break;
406
+ }
407
+ _context4.next = 26;
408
+ return noAuthGetTemplateUrl(impexpSetting.customParam);
409
+ case 26:
410
+ response = _context4.sent;
411
+ if (response.code === 1) {
412
+ setTemplateUrl(response.data);
413
+ ctx.doAction(advance.events.afterExe, {
414
+ success: true
415
+ });
416
+ } else {
417
+ ctx.doAction(advance.events.afterExe, {
418
+ success: false
354
419
  });
355
420
  }
421
+ case 28:
356
422
  setVisible(true);
357
- case 11:
423
+ case 29:
358
424
  case "end":
359
- return _context3.stop();
425
+ return _context4.stop();
360
426
  }
361
- }, _callee3);
427
+ }, _callee4);
362
428
  }));
363
- return function (_x5) {
364
- return _ref6.apply(this, arguments);
429
+ return function (_x6) {
430
+ return _ref7.apply(this, arguments);
365
431
  };
366
432
  }());
367
433
  return /*#__PURE__*/React.createElement(Wrapper, {
@@ -376,24 +442,29 @@ var LCImex = function LCImex(_ref) {
376
442
  ghost: ghost,
377
443
  $css: css,
378
444
  className: classNames(_defineProperty({}, className, !!className)),
445
+ resource: serial,
446
+ serialEffect: serialEffect,
379
447
  onClick: handleClick
380
448
  }, iconFont ? /*#__PURE__*/React.createElement(Icon, {
381
449
  type: iconFont
382
450
  }) : null, title || formatMessage({
383
451
  id: 'luckda.lowcode.painter.import',
384
452
  label: '导入'
385
- })), /*#__PURE__*/React.createElement(PopWindow, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
453
+ })), /*#__PURE__*/React.createElement(PopWindow, {
386
454
  visible: visible,
387
455
  title: "\u4E0A\u4F20excel\u6587\u4EF6",
388
456
  mode: "modal",
389
- size: "mini"
390
- }, "visible", visible), "destroyOnClose", true), "footer", actionStep === 'undone' ? function () {
391
- return /*#__PURE__*/React.createElement(React.Fragment, null);
392
- } : null), "onClose", function onClose() {
393
- if (actionStep !== 'uploading') {
394
- setVisible(false);
457
+ size: "mini",
458
+ destroyOnClose: true,
459
+ footer: actionStep === 'undone' ? function () {
460
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
461
+ } : null,
462
+ onClose: function onClose() {
463
+ if (actionStep !== 'uploading') {
464
+ setVisible(false);
465
+ }
395
466
  }
396
- }), actionStep === 'undone' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicForm, {
467
+ }, actionStep === 'undone' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicForm, {
397
468
  onSubmit: handleImport,
398
469
  layout: "drawer",
399
470
  buttonRender: function buttonRender() {
@@ -438,41 +509,41 @@ var LCImex = function LCImex(_ref) {
438
509
  }, "\u4E0B\u8F7D\u51FA\u9519\u8868\u683C\u4FE1\u606F") : ''))));
439
510
  };
440
511
  LCImex.propTypes = {
441
- /**
442
- * @name 唯一标识
443
- * @type string
444
- * @disabled true
512
+ /**
513
+ * @name 唯一标识
514
+ * @type string
515
+ * @disabled true
445
516
  */
446
517
  id: PropTypes.string.isRequired,
447
- /**
448
- * @name 按钮标题
449
- * @type string
450
- * @default 12:3:9
518
+ /**
519
+ * @name 按钮标题
520
+ * @type string
521
+ * @default 12:3:9
451
522
  */
452
523
  title: PropTypes.string,
453
- /**
454
- * @name 按钮类型
455
- * @type _ButtonType
456
- * @default 'default'
524
+ /**
525
+ * @name 按钮类型
526
+ * @type _ButtonType
527
+ * @default 'default'
457
528
  */
458
529
  type: PropTypes.oneOf(['default', 'primary', 'dashed', 'danger']),
459
- /**
460
- * @name impexpSetting
461
- * @type _ImpExpAlone
462
- * @default { "customType": false, "customParam": null, "type": "export" }
530
+ /**
531
+ * @name impexpSetting
532
+ * @type _ImpExpAlone
533
+ * @default { "customType": false, "customParam": null, "type": "export" }
463
534
  */
464
535
  impexpSetting: PropTypes.object,
465
- /**
466
- * @name 按钮大小
467
- * @type segmented
468
- * @options [{ "label": "小", "value": "small"}, { "label": "中", "value": "middle" }, { "label": "大", "value": "large" }]
469
- * @default 'default'
536
+ /**
537
+ * @name 按钮大小
538
+ * @type segmented
539
+ * @options [{ "label": "小", "value": "small"}, { "label": "中", "value": "middle" }, { "label": "大", "value": "large" }]
540
+ * @default 'default'
470
541
  */
471
542
  size: PropTypes.oneOf(['small', 'default', 'large']),
472
- /**
473
- * @name 将按钮宽度调整为其父宽度的选项
474
- * @type boolean
475
- * @default false
543
+ /**
544
+ * @name 将按钮宽度调整为其父宽度的选项
545
+ * @type boolean
546
+ * @default false
476
547
  */
477
548
  block: PropTypes.bool
478
549
  };
@@ -1,7 +1,7 @@
1
- .exportTheme {
2
- color: var(--luck-color-primary);
3
- }
4
-
5
- .exportErrorTheme {
6
- color: var(--luck-color-danger);
7
- }
1
+ .exportTheme {
2
+ color: var(--luck-color-primary);
3
+ }
4
+
5
+ .exportErrorTheme {
6
+ color: var(--luck-color-danger);
7
+ }