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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/es/components/ComplexItem/index.js +92 -0
  2. package/es/{lowcode/painter/services/toolbar.js → components/ComplexItem/service.js} +7 -11
  3. package/es/components/LDActions/index.js +8 -10
  4. package/es/components/LDActions/index.less +7 -4
  5. package/es/components/LdAutoForm/index.js +34 -11
  6. package/es/components/LdFormList/index.js +39 -23
  7. package/es/components/LdGrid/index.js +21 -7
  8. package/es/components/LdGridForm/index.js +32 -11
  9. package/es/components/LdTree/index.js +33 -15
  10. package/es/helper/FromItems.js +177 -94
  11. package/es/helper/form.js +55 -14
  12. package/es/helper/props_config.js +17 -0
  13. package/es/locales/zh-CN.js +26 -11
  14. package/es/lowcode/constants/api-url.js +354 -104
  15. package/es/lowcode/constants/event-topics.js +2 -0
  16. package/es/lowcode/constants/index.js +4 -2
  17. package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
  18. package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +1 -1
  19. package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
  20. package/es/lowcode/engine/meta/box.props.default.json +1 -1
  21. package/es/lowcode/engine/meta/box.props.json +4 -4
  22. package/es/lowcode/engine/meta/button.props.json +4 -4
  23. package/es/lowcode/engine/meta/cardlist.props.json +14 -4
  24. package/es/lowcode/engine/meta/components-list.json +109 -1
  25. package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
  26. package/es/lowcode/engine/meta/dialog.props.json +80 -43
  27. package/es/lowcode/engine/meta/drawer.props.json +9 -21
  28. package/es/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
  29. package/es/lowcode/engine/meta/fieldcolor.props.json +63 -0
  30. package/es/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
  31. package/es/lowcode/engine/meta/fieldcomplex.props.json +39 -0
  32. package/es/lowcode/engine/meta/fielddate.props.default.json +12 -0
  33. package/es/lowcode/engine/meta/fielddate.props.json +47 -0
  34. package/es/lowcode/engine/meta/fielddict.props.default.json +14 -0
  35. package/es/lowcode/engine/meta/fielddict.props.json +44 -0
  36. package/es/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
  37. package/es/lowcode/engine/meta/fieldeditor.props.json +44 -0
  38. package/es/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
  39. package/es/lowcode/engine/meta/fieldgroup.props.json +73 -0
  40. package/es/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
  41. package/es/lowcode/engine/meta/fieldnumber.props.json +48 -0
  42. package/es/lowcode/engine/meta/fieldradio.props.default.json +12 -0
  43. package/es/lowcode/engine/meta/fieldradio.props.json +20 -0
  44. package/es/lowcode/engine/meta/fieldregion.props.default.json +12 -0
  45. package/es/lowcode/engine/meta/fieldregion.props.json +26 -0
  46. package/es/lowcode/engine/meta/fieldselect.props.default.json +14 -0
  47. package/es/lowcode/engine/meta/fieldselect.props.json +58 -0
  48. package/es/lowcode/engine/meta/fieldstring.props.default.json +16 -0
  49. package/es/lowcode/engine/meta/fieldstring.props.json +62 -0
  50. package/es/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
  51. package/es/lowcode/engine/meta/fieldswitch.props.json +31 -0
  52. package/es/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
  53. package/es/lowcode/engine/meta/fieldtextarea.props.json +49 -0
  54. package/es/lowcode/engine/meta/fieldupload.props.default.json +15 -0
  55. package/es/lowcode/engine/meta/fieldupload.props.json +71 -0
  56. package/es/lowcode/engine/meta/fielduser.props.default.json +16 -0
  57. package/es/lowcode/engine/meta/fielduser.props.json +82 -0
  58. package/es/lowcode/engine/meta/fieldyear.props.default.json +12 -0
  59. package/es/lowcode/engine/meta/fieldyear.props.json +37 -0
  60. package/es/lowcode/engine/meta/form.props.default.json +4 -5
  61. package/es/lowcode/engine/meta/form.props.json +44 -35
  62. package/es/lowcode/engine/meta/image.props.json +2 -2
  63. package/es/lowcode/engine/meta/imex.props.default.json +8 -1
  64. package/es/lowcode/engine/meta/imex.props.json +54 -22
  65. package/es/lowcode/engine/meta/js-editor/auto-complete.json +53 -3
  66. package/es/lowcode/engine/meta/layout.props.json +2 -2
  67. package/es/lowcode/engine/meta/link.props.json +1 -1
  68. package/es/lowcode/engine/meta/page.props.json +2 -2
  69. package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
  70. package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
  71. package/es/lowcode/engine/meta/section.props.default.json +4 -6
  72. package/es/lowcode/engine/meta/section.props.json +52 -49
  73. package/es/lowcode/engine/meta/split.props.default.json +1 -1
  74. package/es/lowcode/engine/meta/split.props.json +4 -4
  75. package/es/lowcode/engine/meta/table.props.json +19 -13
  76. package/es/lowcode/engine/meta/tabs.props.json +3 -3
  77. package/es/lowcode/engine/meta/text.props.json +2 -2
  78. package/es/lowcode/engine/meta/tree.props.default.json +2 -0
  79. package/es/lowcode/engine/meta/tree.props.json +71 -8
  80. package/es/lowcode/engine/provider/ContextProvider/index.js +21 -35
  81. package/es/lowcode/engine/provider/RemoteSourceProvider.js +89 -37
  82. package/es/lowcode/engine/tools/dataProcess.js +4 -0
  83. package/es/lowcode/engine/tools/diff.js +60 -0
  84. package/es/lowcode/engine/tools/helper.js +47 -26
  85. package/es/lowcode/engine/tools/useCanvasRender.js +8 -9
  86. package/es/lowcode/engine/tools/usePageDataStore.js +331 -0
  87. package/es/lowcode/engine/tools/usePromiseState.js +8 -10
  88. package/es/lowcode/engine/tools/useTodo.js +20 -10
  89. package/es/lowcode/painter/Design.js +41 -6
  90. package/es/lowcode/painter/DesignOperator.js +112 -88
  91. package/es/lowcode/painter/DesignToolbar.js +280 -36
  92. package/es/lowcode/painter/Outline.js +12 -10
  93. package/es/lowcode/painter/Panel.js +84 -46
  94. package/es/lowcode/painter/components/ActionBindModal.js +38 -27
  95. package/es/lowcode/painter/components/AdvancePanel.js +37 -21
  96. package/es/lowcode/painter/components/AttrsPanel.js +45 -34
  97. package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
  98. package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
  99. package/es/lowcode/painter/components/FieldSelector.js +26 -13
  100. package/es/lowcode/painter/components/ListEditor.js +8 -2
  101. package/es/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
  102. package/es/lowcode/painter/components/code-editor/JSEditor.js +5 -9
  103. package/es/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
  104. package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
  105. package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
  106. package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
  107. package/es/lowcode/painter/components/field-setting/SettingUI.js +182 -31
  108. package/es/lowcode/painter/components/field-setting/index.js +40 -61
  109. package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
  110. package/es/lowcode/painter/index.js +1 -28
  111. package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
  112. package/es/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
  113. package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
  114. package/es/lowcode/painter/panel-section/BlocksEditor/index.js +55 -28
  115. package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
  116. package/es/lowcode/painter/panel-section/DataSetSelector.js +30 -7
  117. package/es/lowcode/painter/panel-section/FieldsSetting.js +124 -55
  118. package/es/lowcode/painter/panel-section/I18nInput.js +20 -0
  119. package/es/lowcode/painter/panel-section/ImpExp.js +99 -14
  120. package/es/lowcode/painter/panel-section/ImpExpAlone.js +108 -0
  121. package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +95 -0
  122. package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
  123. package/es/lowcode/painter/panel-section/SplitDisplay.js +25 -110
  124. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
  125. package/es/lowcode/painter/panel-section/StylePanel/index.js +10 -4
  126. package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
  127. package/es/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
  128. package/es/lowcode/painter/style/action-bind-modal.less +3 -3
  129. package/es/lowcode/painter/style/design.less +11 -4
  130. package/es/lowcode/painter/style/list-editor.less +36 -0
  131. package/es/lowcode/painter/style/page-layout-display.less +28 -0
  132. package/es/lowcode/painter/style/panel-item.less +1 -1
  133. package/es/lowcode/painter/style/split-display.less +0 -9
  134. package/es/lowcode/preview/index.js +20 -5
  135. package/es/lowcode/view/Canvas.js +6 -7
  136. package/es/lowcode/view/Page.js +5 -6
  137. package/es/lowcode/view/lc-components/Box/FunctionDesign.js +3 -2
  138. package/es/lowcode/view/lc-components/Box/FunctionLive.js +1 -0
  139. package/es/lowcode/view/lc-components/Box/FunctionPreview.js +1 -0
  140. package/es/lowcode/view/lc-components/Box/meta.json +4 -4
  141. package/es/lowcode/view/lc-components/Button/index.js +2 -6
  142. package/es/lowcode/view/lc-components/Button/meta.json +4 -4
  143. package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +1 -0
  144. package/es/lowcode/view/lc-components/CardList/FunctionLive.js +1 -0
  145. package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +1 -0
  146. package/es/lowcode/view/lc-components/CardList/meta.json +14 -4
  147. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -12
  148. package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -0
  149. package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +1 -0
  150. package/es/lowcode/view/lc-components/Dialog/index.js +119 -19
  151. package/es/lowcode/view/lc-components/Dialog/meta.json +73 -43
  152. package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +1 -0
  153. package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -0
  154. package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +1 -0
  155. package/es/lowcode/view/lc-components/Drawer/meta.json +9 -21
  156. package/es/lowcode/view/lc-components/FieldColor/meta.json +63 -0
  157. package/es/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
  158. package/es/lowcode/view/lc-components/FieldDate/meta.json +45 -0
  159. package/es/lowcode/view/lc-components/FieldDict/meta.json +44 -0
  160. package/es/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
  161. package/es/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
  162. package/es/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
  163. package/es/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
  164. package/es/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
  165. package/es/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
  166. package/es/lowcode/view/lc-components/FieldString/meta.json +62 -0
  167. package/es/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
  168. package/es/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
  169. package/es/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
  170. package/es/lowcode/view/lc-components/FieldUser/meta.json +82 -0
  171. package/es/lowcode/view/lc-components/FieldYear/meta.json +35 -0
  172. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +61 -9
  173. package/es/lowcode/view/lc-components/Form/FunctionLive.js +1 -0
  174. package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
  175. package/es/lowcode/view/lc-components/Form/index.js +401 -66
  176. package/es/lowcode/view/lc-components/Form/meta.json +44 -35
  177. package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -0
  178. package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -0
  179. package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +1 -0
  180. package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
  181. package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -0
  182. package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +1 -0
  183. package/es/lowcode/view/lc-components/ImEx/index.js +470 -11
  184. package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
  185. package/es/lowcode/view/lc-components/ImEx/meta.json +55 -23
  186. package/es/lowcode/view/lc-components/Image/FunctionDesign.js +1 -0
  187. package/es/lowcode/view/lc-components/Image/FunctionLive.js +1 -0
  188. package/es/lowcode/view/lc-components/Image/FunctionPreview.js +1 -0
  189. package/es/lowcode/view/lc-components/Image/meta.json +2 -2
  190. package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -0
  191. package/es/lowcode/view/lc-components/JSX/FunctionLive.js +1 -0
  192. package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +1 -0
  193. package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +13 -21
  194. package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
  195. package/es/lowcode/view/lc-components/Layout/meta.json +2 -2
  196. package/es/lowcode/view/lc-components/Link/FunctionDesign.js +1 -0
  197. package/es/lowcode/view/lc-components/Link/FunctionLive.js +1 -0
  198. package/es/lowcode/view/lc-components/Link/FunctionPreview.js +1 -0
  199. package/es/lowcode/view/lc-components/Link/meta.json +1 -1
  200. package/es/lowcode/view/lc-components/Page/meta.json +2 -2
  201. package/es/lowcode/view/lc-components/PageContent/index.js +8 -9
  202. package/es/lowcode/view/lc-components/PageFooter/index.js +2 -5
  203. package/es/lowcode/view/lc-components/PageHeader/index.js +5 -6
  204. package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +63 -0
  205. package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
  206. package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
  207. package/es/lowcode/view/lc-components/PageLayout/index.js +32 -0
  208. package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
  209. package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
  210. package/es/lowcode/view/lc-components/Section/FunctionDesign.js +25 -2
  211. package/es/lowcode/view/lc-components/Section/FunctionLive.js +1 -0
  212. package/es/lowcode/view/lc-components/Section/FunctionPreview.js +1 -0
  213. package/es/lowcode/view/lc-components/Section/index.js +114 -24
  214. package/es/lowcode/view/lc-components/Section/index.less +7 -0
  215. package/es/lowcode/view/lc-components/Section/meta.json +48 -49
  216. package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -22
  217. package/es/lowcode/view/lc-components/Split/FunctionLive.js +1 -0
  218. package/es/lowcode/view/lc-components/Split/FunctionPreview.js +1 -0
  219. package/es/lowcode/view/lc-components/Split/index.js +7 -11
  220. package/es/lowcode/view/lc-components/Split/meta.json +4 -4
  221. package/es/lowcode/view/lc-components/Table/FunctionLive.js +1 -0
  222. package/es/lowcode/view/lc-components/Table/FunctionPreview.js +1 -0
  223. package/es/lowcode/view/lc-components/Table/components/TopFilter.js +78 -57
  224. package/es/lowcode/view/lc-components/Table/components/TopImex.js +420 -0
  225. package/es/lowcode/view/lc-components/Table/index.js +294 -47
  226. package/es/lowcode/view/lc-components/Table/meta.json +19 -13
  227. package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -20
  228. package/es/lowcode/view/lc-components/Tabs/index.js +27 -12
  229. package/es/lowcode/view/lc-components/Tabs/meta.json +3 -3
  230. package/es/lowcode/view/lc-components/Text/FunctionDesign.js +1 -0
  231. package/es/lowcode/view/lc-components/Text/FunctionLive.js +1 -0
  232. package/es/lowcode/view/lc-components/Text/FunctionPreview.js +1 -0
  233. package/es/lowcode/view/lc-components/Text/meta.json +2 -2
  234. package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
  235. package/es/lowcode/view/lc-components/Tree/FunctionLive.js +1 -0
  236. package/es/lowcode/view/lc-components/Tree/index.js +103 -29
  237. package/es/lowcode/view/lc-components/Tree/meta.json +71 -9
  238. package/es/lowcode/view/lc-components/Wrapper.js +10 -12
  239. package/es/services.js +0 -24
  240. package/es/upload/FilesWall/file.png +0 -0
  241. package/es/upload/FilesWall/index.js +422 -0
  242. package/es/upload/FilesWall/index.less +74 -0
  243. package/es/upload/Form/gridForm.js +10 -5
  244. package/es/upload/Form/index.js +2 -1
  245. package/es/upload/FormItem/index.js +8 -9
  246. package/es/upload/index.js +2 -1
  247. package/es/utils/action.js +2 -2
  248. package/es/utils/form.js +16 -3
  249. package/es/utils/grid.js +8 -5
  250. package/lib/components/ComplexItem/index.js +100 -0
  251. package/lib/{lowcode/painter/services/toolbar.js → components/ComplexItem/service.js} +8 -12
  252. package/lib/components/LDActions/index.js +7 -9
  253. package/lib/components/LDActions/index.less +7 -4
  254. package/lib/components/LdAutoForm/index.js +33 -10
  255. package/lib/components/LdFormList/index.js +38 -22
  256. package/lib/components/LdGrid/index.js +21 -7
  257. package/lib/components/LdGridForm/index.js +30 -9
  258. package/lib/components/LdTree/index.js +33 -15
  259. package/lib/helper/FromItems.js +175 -92
  260. package/lib/helper/form.js +53 -13
  261. package/lib/helper/props_config.js +23 -0
  262. package/lib/locales/zh-CN.js +26 -11
  263. package/lib/lowcode/constants/api-url.js +355 -104
  264. package/lib/lowcode/constants/event-topics.js +3 -1
  265. package/lib/lowcode/constants/index.js +5 -3
  266. package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
  267. package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +3 -2
  268. package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
  269. package/lib/lowcode/engine/meta/box.props.default.json +1 -1
  270. package/lib/lowcode/engine/meta/box.props.json +4 -4
  271. package/lib/lowcode/engine/meta/button.props.json +4 -4
  272. package/lib/lowcode/engine/meta/cardlist.props.json +14 -4
  273. package/lib/lowcode/engine/meta/components-list.json +109 -1
  274. package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
  275. package/lib/lowcode/engine/meta/dialog.props.json +80 -43
  276. package/lib/lowcode/engine/meta/drawer.props.json +9 -21
  277. package/lib/lowcode/engine/meta/fieldcolor.props.default.json +14 -0
  278. package/lib/lowcode/engine/meta/fieldcolor.props.json +63 -0
  279. package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +13 -0
  280. package/lib/lowcode/engine/meta/fieldcomplex.props.json +39 -0
  281. package/lib/lowcode/engine/meta/fielddate.props.default.json +12 -0
  282. package/lib/lowcode/engine/meta/fielddate.props.json +47 -0
  283. package/lib/lowcode/engine/meta/fielddict.props.default.json +14 -0
  284. package/lib/lowcode/engine/meta/fielddict.props.json +44 -0
  285. package/lib/lowcode/engine/meta/fieldeditor.props.default.json +13 -0
  286. package/lib/lowcode/engine/meta/fieldeditor.props.json +44 -0
  287. package/lib/lowcode/engine/meta/fieldgroup.props.default.json +15 -0
  288. package/lib/lowcode/engine/meta/fieldgroup.props.json +73 -0
  289. package/lib/lowcode/engine/meta/fieldnumber.props.default.json +14 -0
  290. package/lib/lowcode/engine/meta/fieldnumber.props.json +48 -0
  291. package/lib/lowcode/engine/meta/fieldradio.props.default.json +12 -0
  292. package/lib/lowcode/engine/meta/fieldradio.props.json +20 -0
  293. package/lib/lowcode/engine/meta/fieldregion.props.default.json +12 -0
  294. package/lib/lowcode/engine/meta/fieldregion.props.json +26 -0
  295. package/lib/lowcode/engine/meta/fieldselect.props.default.json +14 -0
  296. package/lib/lowcode/engine/meta/fieldselect.props.json +58 -0
  297. package/lib/lowcode/engine/meta/fieldstring.props.default.json +16 -0
  298. package/lib/lowcode/engine/meta/fieldstring.props.json +62 -0
  299. package/lib/lowcode/engine/meta/fieldswitch.props.default.json +12 -0
  300. package/lib/lowcode/engine/meta/fieldswitch.props.json +31 -0
  301. package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +13 -0
  302. package/lib/lowcode/engine/meta/fieldtextarea.props.json +49 -0
  303. package/lib/lowcode/engine/meta/fieldupload.props.default.json +15 -0
  304. package/lib/lowcode/engine/meta/fieldupload.props.json +71 -0
  305. package/lib/lowcode/engine/meta/fielduser.props.default.json +16 -0
  306. package/lib/lowcode/engine/meta/fielduser.props.json +82 -0
  307. package/lib/lowcode/engine/meta/fieldyear.props.default.json +12 -0
  308. package/lib/lowcode/engine/meta/fieldyear.props.json +37 -0
  309. package/lib/lowcode/engine/meta/form.props.default.json +4 -5
  310. package/lib/lowcode/engine/meta/form.props.json +44 -35
  311. package/lib/lowcode/engine/meta/image.props.json +2 -2
  312. package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
  313. package/lib/lowcode/engine/meta/imex.props.json +54 -22
  314. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +53 -3
  315. package/lib/lowcode/engine/meta/layout.props.json +2 -2
  316. package/lib/lowcode/engine/meta/link.props.json +1 -1
  317. package/lib/lowcode/engine/meta/page.props.json +2 -2
  318. package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
  319. package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
  320. package/lib/lowcode/engine/meta/section.props.default.json +4 -6
  321. package/lib/lowcode/engine/meta/section.props.json +52 -49
  322. package/lib/lowcode/engine/meta/split.props.default.json +1 -1
  323. package/lib/lowcode/engine/meta/split.props.json +4 -4
  324. package/lib/lowcode/engine/meta/table.props.json +19 -13
  325. package/lib/lowcode/engine/meta/tabs.props.json +3 -3
  326. package/lib/lowcode/engine/meta/text.props.json +2 -2
  327. package/lib/lowcode/engine/meta/tree.props.default.json +2 -0
  328. package/lib/lowcode/engine/meta/tree.props.json +71 -8
  329. package/lib/lowcode/engine/provider/ContextProvider/index.js +37 -35
  330. package/lib/lowcode/engine/provider/RemoteSourceProvider.js +86 -34
  331. package/lib/lowcode/engine/tools/dataProcess.js +4 -0
  332. package/lib/lowcode/engine/tools/diff.js +67 -0
  333. package/lib/lowcode/engine/tools/helper.js +48 -25
  334. package/lib/lowcode/engine/tools/useCanvasRender.js +6 -7
  335. package/lib/lowcode/engine/tools/usePageDataStore.js +338 -0
  336. package/lib/lowcode/engine/tools/usePromiseState.js +6 -8
  337. package/lib/lowcode/engine/tools/useTodo.js +19 -9
  338. package/lib/lowcode/painter/Design.js +39 -4
  339. package/lib/lowcode/painter/DesignOperator.js +109 -85
  340. package/lib/lowcode/painter/DesignToolbar.js +277 -33
  341. package/lib/lowcode/painter/Outline.js +10 -8
  342. package/lib/lowcode/painter/Panel.js +82 -44
  343. package/lib/lowcode/painter/components/ActionBindModal.js +36 -25
  344. package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
  345. package/lib/lowcode/painter/components/AttrsPanel.js +44 -33
  346. package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
  347. package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
  348. package/lib/lowcode/painter/components/FieldSelector.js +26 -13
  349. package/lib/lowcode/painter/components/ListEditor.js +8 -2
  350. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
  351. package/lib/lowcode/painter/components/code-editor/JSEditor.js +5 -9
  352. package/lib/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
  353. package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
  354. package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
  355. package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
  356. package/lib/lowcode/painter/components/field-setting/SettingUI.js +179 -28
  357. package/lib/lowcode/painter/components/field-setting/index.js +40 -61
  358. package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
  359. package/lib/lowcode/painter/index.js +1 -30
  360. package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
  361. package/lib/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
  362. package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
  363. package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +53 -25
  364. package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
  365. package/lib/lowcode/painter/panel-section/DataSetSelector.js +30 -7
  366. package/lib/lowcode/painter/panel-section/FieldsSetting.js +121 -52
  367. package/lib/lowcode/painter/panel-section/I18nInput.js +27 -0
  368. package/lib/lowcode/painter/panel-section/ImpExp.js +99 -13
  369. package/lib/lowcode/painter/panel-section/ImpExpAlone.js +114 -0
  370. package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +103 -0
  371. package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
  372. package/lib/lowcode/painter/panel-section/SplitDisplay.js +24 -109
  373. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +5 -4
  374. package/lib/lowcode/painter/panel-section/StylePanel/index.js +10 -4
  375. package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
  376. package/lib/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
  377. package/lib/lowcode/painter/style/action-bind-modal.less +3 -3
  378. package/lib/lowcode/painter/style/design.less +11 -4
  379. package/lib/lowcode/painter/style/list-editor.less +36 -0
  380. package/lib/lowcode/painter/style/page-layout-display.less +28 -0
  381. package/lib/lowcode/painter/style/panel-item.less +1 -1
  382. package/lib/lowcode/painter/style/split-display.less +0 -9
  383. package/lib/lowcode/preview/index.js +21 -5
  384. package/lib/lowcode/view/Canvas.js +5 -6
  385. package/lib/lowcode/view/Page.js +5 -6
  386. package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +3 -2
  387. package/lib/lowcode/view/lc-components/Box/FunctionLive.js +2 -1
  388. package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +2 -1
  389. package/lib/lowcode/view/lc-components/Box/meta.json +4 -4
  390. package/lib/lowcode/view/lc-components/Button/index.js +2 -6
  391. package/lib/lowcode/view/lc-components/Button/meta.json +4 -4
  392. package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +2 -1
  393. package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +2 -1
  394. package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +2 -1
  395. package/lib/lowcode/view/lc-components/CardList/meta.json +14 -4
  396. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -11
  397. package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +2 -1
  398. package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +2 -1
  399. package/lib/lowcode/view/lc-components/Dialog/index.js +119 -19
  400. package/lib/lowcode/view/lc-components/Dialog/meta.json +73 -43
  401. package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -1
  402. package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +2 -1
  403. package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +2 -1
  404. package/lib/lowcode/view/lc-components/Drawer/meta.json +9 -21
  405. package/lib/lowcode/view/lc-components/FieldColor/meta.json +63 -0
  406. package/lib/lowcode/view/lc-components/FieldComplex/meta.json +39 -0
  407. package/lib/lowcode/view/lc-components/FieldDate/meta.json +45 -0
  408. package/lib/lowcode/view/lc-components/FieldDict/meta.json +44 -0
  409. package/lib/lowcode/view/lc-components/FieldEditor/meta.json +44 -0
  410. package/lib/lowcode/view/lc-components/FieldGroup/meta.json +73 -0
  411. package/lib/lowcode/view/lc-components/FieldNumber/meta.json +48 -0
  412. package/lib/lowcode/view/lc-components/FieldRadio/meta.json +20 -0
  413. package/lib/lowcode/view/lc-components/FieldRegion/meta.json +26 -0
  414. package/lib/lowcode/view/lc-components/FieldSelect/meta.json +58 -0
  415. package/lib/lowcode/view/lc-components/FieldString/meta.json +62 -0
  416. package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +31 -0
  417. package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +49 -0
  418. package/lib/lowcode/view/lc-components/FieldUpload/meta.json +71 -0
  419. package/lib/lowcode/view/lc-components/FieldUser/meta.json +82 -0
  420. package/lib/lowcode/view/lc-components/FieldYear/meta.json +35 -0
  421. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +58 -7
  422. package/lib/lowcode/view/lc-components/Form/FunctionLive.js +2 -1
  423. package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
  424. package/lib/lowcode/view/lc-components/Form/index.js +396 -61
  425. package/lib/lowcode/view/lc-components/Form/meta.json +44 -35
  426. package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +2 -1
  427. package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +2 -1
  428. package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +2 -1
  429. package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
  430. package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +2 -1
  431. package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +2 -1
  432. package/lib/lowcode/view/lc-components/ImEx/index.js +468 -9
  433. package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
  434. package/lib/lowcode/view/lc-components/ImEx/meta.json +55 -23
  435. package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +2 -1
  436. package/lib/lowcode/view/lc-components/Image/FunctionLive.js +2 -1
  437. package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +2 -1
  438. package/lib/lowcode/view/lc-components/Image/meta.json +2 -2
  439. package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +2 -1
  440. package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +2 -1
  441. package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +2 -1
  442. package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -19
  443. package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
  444. package/lib/lowcode/view/lc-components/Layout/meta.json +2 -2
  445. package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +2 -1
  446. package/lib/lowcode/view/lc-components/Link/FunctionLive.js +2 -1
  447. package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +2 -1
  448. package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
  449. package/lib/lowcode/view/lc-components/Page/meta.json +2 -2
  450. package/lib/lowcode/view/lc-components/PageContent/index.js +7 -8
  451. package/lib/lowcode/view/lc-components/PageFooter/index.js +2 -5
  452. package/lib/lowcode/view/lc-components/PageHeader/index.js +4 -5
  453. package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +71 -0
  454. package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
  455. package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
  456. package/lib/lowcode/view/lc-components/PageLayout/index.js +40 -0
  457. package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
  458. package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
  459. package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +25 -2
  460. package/lib/lowcode/view/lc-components/Section/FunctionLive.js +2 -1
  461. package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +2 -1
  462. package/lib/lowcode/view/lc-components/Section/index.js +113 -23
  463. package/lib/lowcode/view/lc-components/Section/index.less +7 -0
  464. package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
  465. package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +18 -21
  466. package/lib/lowcode/view/lc-components/Split/FunctionLive.js +2 -1
  467. package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +2 -1
  468. package/lib/lowcode/view/lc-components/Split/index.js +4 -8
  469. package/lib/lowcode/view/lc-components/Split/meta.json +4 -4
  470. package/lib/lowcode/view/lc-components/Table/FunctionLive.js +2 -1
  471. package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +2 -1
  472. package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +75 -55
  473. package/lib/lowcode/view/lc-components/Table/components/TopImex.js +428 -0
  474. package/lib/lowcode/view/lc-components/Table/index.js +292 -45
  475. package/lib/lowcode/view/lc-components/Table/meta.json +19 -13
  476. package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +9 -18
  477. package/lib/lowcode/view/lc-components/Tabs/index.js +26 -11
  478. package/lib/lowcode/view/lc-components/Tabs/meta.json +3 -3
  479. package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +2 -1
  480. package/lib/lowcode/view/lc-components/Text/FunctionLive.js +2 -1
  481. package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +2 -1
  482. package/lib/lowcode/view/lc-components/Text/meta.json +2 -2
  483. package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -3
  484. package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +2 -1
  485. package/lib/lowcode/view/lc-components/Tree/index.js +100 -26
  486. package/lib/lowcode/view/lc-components/Tree/meta.json +71 -9
  487. package/lib/lowcode/view/lc-components/Wrapper.js +11 -12
  488. package/lib/services.js +0 -25
  489. package/lib/upload/FilesWall/file.png +0 -0
  490. package/lib/upload/FilesWall/index.js +429 -0
  491. package/lib/upload/FilesWall/index.less +74 -0
  492. package/lib/upload/Form/gridForm.js +10 -5
  493. package/lib/upload/Form/index.js +2 -1
  494. package/lib/upload/FormItem/index.js +8 -9
  495. package/lib/upload/index.js +8 -1
  496. package/lib/utils/action.js +2 -2
  497. package/lib/utils/form.js +16 -3
  498. package/lib/utils/grid.js +8 -5
  499. package/package.json +175 -171
  500. package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
  501. package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
@@ -6,14 +6,18 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
11
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
15
  var _react = _interopRequireWildcard(require("react"));
13
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
17
  var _ahooks = require("ahooks");
15
18
  var _lodash = require("lodash");
16
19
  var _classnames = _interopRequireDefault(require("classnames"));
20
+ var _base = require("@luck-design-biz/base");
17
21
  var _ContextProvider = require("../../../engine/provider/ContextProvider");
18
22
  var _Wrapper = _interopRequireDefault(require("../Wrapper"));
19
23
  var _index = require("../../../../index");
@@ -21,6 +25,8 @@ var _TopFilter = _interopRequireDefault(require("./components/TopFilter"));
21
25
  var _helper = require("../../../engine/tools/helper");
22
26
  var _tablePropsDefault = _interopRequireDefault(require("../../../engine/meta/table.props.default.json"));
23
27
  var _constants = require("../../../constants");
28
+ var _apiUrl2 = require("../../../constants/api-url");
29
+ var _TopImex = require("./components/TopImex");
24
30
  var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
25
31
  var id = _ref.id,
26
32
  className = _ref.className,
@@ -59,12 +65,33 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
59
65
  columnsReset = _ref.columnsReset,
60
66
  modelParams = _ref.modelParams,
61
67
  onGridReady = _ref.onGridReady,
62
- advance = _ref.advance;
68
+ advance = _ref.advance,
69
+ _ref$autoRowClick = _ref.autoRowClick,
70
+ autoRowClick = _ref$autoRowClick === void 0 ? true : _ref$autoRowClick;
63
71
  var ctx = (0, _ContextProvider.useContext)();
64
72
  var _useRemoteSource = (0, _ContextProvider.useRemoteSource)(),
65
73
  module = _useRemoteSource.module;
74
+ var apiRef = (0, _react.useRef)();
66
75
  var wrapperRef = (0, _react.useRef)();
67
76
  var instanceRef = (0, _react.useRef)();
77
+ var _useSetState = (0, _ahooks.useSetState)({}),
78
+ _useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
79
+ clickedRow = _useSetState2[0],
80
+ setClickedRow = _useSetState2[1];
81
+ (0, _react.useImperativeHandle)(apiRef, function () {
82
+ return {
83
+ /**
84
+ * 获取表格实例
85
+ * @method
86
+ */
87
+ getInstance: function getInstance() {
88
+ return instanceRef.current;
89
+ }
90
+ };
91
+ });
92
+ (0, _ahooks.useUpdateEffect)(function () {
93
+ ctx.setPagePublicResource((0, _defineProperty2.default)({}, id, clickedRow));
94
+ }, [clickedRow]);
68
95
  var _pagination = (0, _ahooks.useCreation)(function () {
69
96
  return {
70
97
  isFlow: !pagination,
@@ -97,11 +124,28 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
97
124
  };
98
125
  return action;
99
126
  }(function (data, rowIndex, params) {
100
- ctx.doAction(action.actionPool, {
101
- data: data,
102
- rowIndex: rowIndex,
103
- params: params
104
- });
127
+ var doAction = function doAction() {
128
+ ctx.doAction(action.actionPool, {
129
+ data: data,
130
+ rowIndex: rowIndex,
131
+ params: params,
132
+ datasetCode: dataset.code
133
+ });
134
+ };
135
+ if (action.riskLevel === 'danger') {
136
+ _base.Modal.confirm({
137
+ title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
138
+ onOk: doAction
139
+ });
140
+ } else if (action.riskLevel === 'destroy') {
141
+ (0, _base.recheck)({
142
+ title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
143
+ checkWords: "\u6267\u884C".concat(action.name),
144
+ onOk: doAction
145
+ });
146
+ } else {
147
+ doAction();
148
+ }
105
149
  }),
106
150
  resource: action.serial,
107
151
  style: action.riskLevel === 'default' ? null : {
@@ -134,24 +178,167 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
134
178
  data: data,
135
179
  isSelected: isSelected,
136
180
  SelectedRows: SelectedRows,
137
- params: params
181
+ params: params,
182
+ datasetCode: dataset.code
138
183
  });
139
184
  },
140
185
  onChange: function onChange(rows, nodes, params) {
141
186
  ctx.doAction(advance.events.onRowSelected, {
142
187
  rows: rows,
143
188
  nodes: nodes,
144
- params: params
189
+ params: params,
190
+ datasetCode: dataset.code
145
191
  });
146
192
  }
147
193
  }
148
194
  } : false;
149
195
  }, [rowSelection, suppressRowSelectionPagination, rowSelectionMode, defaultRowSelectedCode, rowSelectableCode]);
196
+ var _useRequest = (0, _ahooks.useRequest)(_apiUrl2.exportExcel, {
197
+ manual: true
198
+ }),
199
+ runAsync = _useRequest.runAsync;
200
+
201
+ // 查询进度
202
+ var fecthExcelState = function fecthExcelState(_ref2, procress, resolve, reject) {
203
+ var strategy = _ref2.strategy,
204
+ batchNo = _ref2.batchNo,
205
+ moduleCode = _ref2.moduleCode,
206
+ behaviorKey = _ref2.behaviorKey;
207
+ var _fetchExcelStatePrefix = "/".concat(strategy, "/").concat(batchNo);
208
+ var _fetchExcelStateParams = {
209
+ moduleCode: moduleCode,
210
+ behaviorKey: behaviorKey,
211
+ reportType: "export"
212
+ };
213
+ (0, _apiUrl2.getFindexcelstate)(_fetchExcelStatePrefix, _fetchExcelStateParams).then(function (response) {
214
+ if (response.code === 1) {
215
+ var _response$data = response.data,
216
+ successCount = _response$data.successCount,
217
+ totalCount = _response$data.totalCount,
218
+ downloadUrl = _response$data.downloadUrl;
219
+ if (successCount >= totalCount) {
220
+ resolve(downloadUrl);
221
+ } else {
222
+ procress((successCount / totalCount * 100).toFixed(1));
223
+ setTimeout(function () {
224
+ fecthExcelState({
225
+ strategy: strategy,
226
+ batchNo: batchNo,
227
+ moduleCode: moduleCode,
228
+ behaviorKey: behaviorKey
229
+ }, procress, resolve, reject);
230
+ }, 500);
231
+ }
232
+ } else {
233
+ reject();
234
+ }
235
+ }).catch(function () {
236
+ reject();
237
+ });
238
+ };
239
+ var _onExportAll = function _onExportAll(procress) {
240
+ return new Promise( /*#__PURE__*/function () {
241
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(resolve, reject) {
242
+ var isBehavior, behaviorKey, strategy, _exportExcelParams, _exportExcelPrefix, exportExcelResponse, _ref4, _ref5, _getProps, apiUrl, _strategy, joiner, labels, fieldInfo, defaultExcelParams, _exportExcelParams2, _exportExcelPrefix2, _exportExcelResponse;
243
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
244
+ while (1) switch (_context.prev = _context.next) {
245
+ case 0:
246
+ isBehavior = (0, _lodash.isString)(impexp.export);
247
+ if (!isBehavior) {
248
+ _context.next = 12;
249
+ break;
250
+ }
251
+ // ! 行为
252
+ behaviorKey = impexp.export;
253
+ strategy = 'behavior';
254
+ _exportExcelParams = {
255
+ moduleCode: module.moduleCode,
256
+ behaviorKey: behaviorKey,
257
+ reportType: "export"
258
+ };
259
+ _exportExcelPrefix = "/".concat(strategy);
260
+ _context.next = 8;
261
+ return runAsync(_exportExcelPrefix, _exportExcelParams);
262
+ case 8:
263
+ exportExcelResponse = _context.sent;
264
+ if (exportExcelResponse.code === 1) {
265
+ fecthExcelState({
266
+ strategy: strategy,
267
+ batchNo: exportExcelResponse.data,
268
+ moduleCode: module.moduleCode,
269
+ behaviorKey: behaviorKey
270
+ }, procress, resolve, reject);
271
+ } else {
272
+ reject();
273
+ }
274
+ _context.next = 25;
275
+ break;
276
+ case 12:
277
+ _getProps = (_ref4 = (instanceRef === null || instanceRef === void 0 ? void 0 : instanceRef.current) || (ref === null || ref === void 0 ? void 0 : ref.current)) === null || _ref4 === void 0 ? void 0 : _ref4.getProps(), apiUrl = _getProps.apiUrl;
278
+ _strategy = 'report_server';
279
+ joiner = apiUrl.indexOf('?') !== -1 ? '&' : '?';
280
+ labels = [];
281
+ fieldInfo = [];
282
+ (_ref5 = (instanceRef === null || instanceRef === void 0 ? void 0 : instanceRef.current) || (ref === null || ref === void 0 ? void 0 : ref.current)) === null || _ref5 === void 0 || (_ref5 = _ref5.gridApi) === null || _ref5 === void 0 || _ref5.columnApi.getAllDisplayedColumns().forEach(function (column) {
283
+ if (column.colId !== 'luck-expand' && column.colId !== 'luck-select' && column.colId !== 'luck-index' && column.colId !== 'luck-actions' && column.colId !== 'fraction_drag'
284
+ // && !column.colDef.draggable
285
+ ) {
286
+ labels.push(column.colDef.headerName);
287
+ fieldInfo.push({
288
+ width: column.actualWidth,
289
+ fieldNm: column.colId
290
+ });
291
+ }
292
+ });
293
+ defaultExcelParams = {
294
+ bgColor: "#69b1ff",
295
+ dataUrl: "".concat(window.location.origin, "/api").concat(apiUrl).concat(joiner, "token=").concat(window.cookie.get(window.appConfig.authSaveKey)),
296
+ excelName: "download.xls",
297
+ fieldInfo: fieldInfo,
298
+ islock: false,
299
+ labels: labels === null || labels === void 0 ? void 0 : labels.join(),
300
+ reqBody: null
301
+ };
302
+ _exportExcelParams2 = (0, _objectSpread2.default)({
303
+ moduleCode: module.moduleCode,
304
+ reportType: "export"
305
+ }, defaultExcelParams);
306
+ _exportExcelPrefix2 = "/".concat(_strategy);
307
+ _context.next = 23;
308
+ return runAsync(_exportExcelPrefix2, _exportExcelParams2);
309
+ case 23:
310
+ _exportExcelResponse = _context.sent;
311
+ if (_exportExcelResponse.code === 1) {
312
+ fecthExcelState({
313
+ strategy: _strategy,
314
+ batchNo: _exportExcelResponse.data,
315
+ moduleCode: module.moduleCode
316
+ }, procress, resolve, reject);
317
+ } else {
318
+ reject();
319
+ }
320
+ case 25:
321
+ case "end":
322
+ return _context.stop();
323
+ }
324
+ }, _callee);
325
+ }));
326
+ return function (_x4, _x5) {
327
+ return _ref3.apply(this, arguments);
328
+ };
329
+ }());
330
+ };
150
331
  var _export = (0, _ahooks.useCreation)(function () {
151
- return {
152
- enableExportAll: !!impexp.export,
153
- apiUrl: (0, _lodash.isString)(impexp.export) ? impexp.export : void 0
332
+ var _temp = {
333
+ enableExportAll: !!impexp.export
154
334
  };
335
+ if (!!impexp.export) {
336
+ var _ref6;
337
+ var _tableProps = (_ref6 = (instanceRef === null || instanceRef === void 0 ? void 0 : instanceRef.current) || (ref === null || ref === void 0 ? void 0 : ref.current)) === null || _ref6 === void 0 ? void 0 : _ref6.getProps();
338
+ _temp.apiUrl = _tableProps === null || _tableProps === void 0 ? void 0 : _tableProps.apiUrl;
339
+ _temp.onExportAll = _onExportAll;
340
+ }
341
+ return _temp;
155
342
  }, [impexp.export]);
156
343
  var _batchActions = (0, _ahooks.useCreation)(function () {
157
344
  return {
@@ -165,13 +352,18 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
165
352
  onBatchOperationsClick: function onBatchOperationsClick(key, selectedRows) {
166
353
  ctx.doAction(action.actionPool, {
167
354
  key: key,
168
- selectedRows: selectedRows
355
+ selectedRows: selectedRows,
356
+ datasetCode: dataset.code
169
357
  });
170
358
  }
171
359
  };
172
360
  }, [bantchActions.todoList]);
173
361
  var _others = (0, _ahooks.useCreation)(function () {
174
- var temp = {};
362
+ var temp = {
363
+ defaultColDef: {
364
+ draggable: draggable
365
+ }
366
+ };
175
367
  if (!(0, _lodash.isNil)(formatDataSource)) {
176
368
  temp.formatDataSource = function (list, detail) {
177
369
  return (0, _helper.executeCode)(ctx, formatDataSource, ['list', 'detail'], list, detail);
@@ -200,20 +392,47 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
200
392
  temp.overModel = (0, _helper.executeCode)(ctx, modelParams);
201
393
  }
202
394
  return temp;
203
- }, [fields, formatDataSource, getDataPath, columnsRewrite, columnsReset, modelParams]);
395
+ }, [fields, formatDataSource, getDataPath, columnsRewrite, columnsReset, modelParams, draggable]);
204
396
  var renderFunctionArea = (0, _ahooks.useMemoizedFn)(function () {
205
397
  var _topActionGroup$todoL;
206
- return !!(topActionGroup !== null && topActionGroup !== void 0 && (_topActionGroup$todoL = topActionGroup.todoList) !== null && _topActionGroup$todoL !== void 0 && _topActionGroup$todoL.length) ? /*#__PURE__*/_react.default.createElement(_index.LDActions, (0, _extends2.default)({}, topActionGroup, {
207
- doAction: function doAction(action) {
208
- return ctx.doAction(action, {
209
- indtance: instanceRef.current
210
- });
211
- }
212
- })) : null;
398
+ var resultComp = [];
399
+ if (!!(topActionGroup !== null && topActionGroup !== void 0 && (_topActionGroup$todoL = topActionGroup.todoList) !== null && _topActionGroup$todoL !== void 0 && _topActionGroup$todoL.length)) {
400
+ resultComp.push( /*#__PURE__*/_react.default.createElement(_index.LDActions, (0, _extends2.default)({}, topActionGroup, {
401
+ doAction: function doAction(action) {
402
+ return ctx.doAction(action, {
403
+ datasetCode: dataset.code
404
+ });
405
+ }
406
+ })));
407
+ }
408
+ if (impexp.import) {
409
+ var _ref7;
410
+ var _getProps2 = (_ref7 = instanceRef.current || ref.current) === null || _ref7 === void 0 ? void 0 : _ref7.getProps(),
411
+ apiUrl = _getProps2.apiUrl;
412
+ resultComp.push( /*#__PURE__*/_react.default.createElement(_TopImex.TopUpload, {
413
+ apiUrl: apiUrl,
414
+ moduleCode: module.moduleCode,
415
+ options: impexp,
416
+ tableRef: instanceRef.current || ref.current
417
+ }));
418
+ }
419
+ if (impexp.export) {
420
+ var _ref8;
421
+ var _getProps3 = (_ref8 = instanceRef.current || ref.current) === null || _ref8 === void 0 ? void 0 : _ref8.getProps(),
422
+ _apiUrl = _getProps3.apiUrl;
423
+ resultComp.push( /*#__PURE__*/_react.default.createElement(_TopImex.TopExport, {
424
+ apiUrl: _apiUrl,
425
+ moduleCode: module.moduleCode,
426
+ options: impexp,
427
+ tableRef: instanceRef.current || ref.current
428
+ }));
429
+ }
430
+ return resultComp;
213
431
  });
214
432
  var renderFilterArea = (0, _ahooks.useMemoizedFn)(function () {
215
433
  return topFilter ? /*#__PURE__*/_react.default.createElement(_TopFilter.default, {
216
- filter: topFilter
434
+ filter: topFilter,
435
+ instance: instanceRef
217
436
  }) : null;
218
437
  });
219
438
  var _wrapperProps = (0, _ahooks.useCreation)(function () {
@@ -231,31 +450,35 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
231
450
  };
232
451
  });
233
452
  var _readFilter = (0, _ahooks.useMemoizedFn)(function (params, filters) {
234
- return ctx._setPagePublicResource({
453
+ return setClickedRow({
235
454
  params: params,
236
455
  filters: filters
237
456
  });
238
457
  });
239
458
  var _handleGridReady = (0, _ahooks.useMemoizedFn)(function (params, instance) {
240
- instanceRef.current = instance;
241
459
  onGridReady === null || onGridReady === void 0 || onGridReady(params, instance);
242
460
  ctx.doAction(advance.events.onMount, {
243
461
  params: params,
244
- instance: instance
462
+ datasetCode: dataset.code
245
463
  });
246
464
  });
247
465
  var _handleRowClick = (0, _ahooks.useMemoizedFn)(function (data, rowIndex, params) {
466
+ setClickedRow({
467
+ clickedRow: data
468
+ });
248
469
  ctx.doAction(advance.events.onRowClick, {
249
470
  data: data,
250
471
  rowIndex: rowIndex,
251
- params: params
472
+ params: params,
473
+ datasetCode: dataset.code
252
474
  });
253
475
  });
254
476
  var _handleRowDoubleClick = (0, _ahooks.useMemoizedFn)(function (data, rowIndex, params) {
255
477
  ctx.doAction(advance.events.onRowDoubleClick, {
256
478
  data: data,
257
479
  rowIndex: rowIndex,
258
- params: params
480
+ params: params,
481
+ datasetCode: dataset.code
259
482
  });
260
483
  });
261
484
  var _handleRowDragged = (0, _ahooks.useMemoizedFn)(function (toId, fromId, params) {
@@ -263,12 +486,14 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
263
486
  ctx.doAction(advance.events.onRowDragged, {
264
487
  toId: toId,
265
488
  fromId: fromId,
266
- params: params
489
+ params: params,
490
+ datasetCode: dataset.code
267
491
  });
268
492
  } else {
269
- ctx.doAction([['drag', {
493
+ var _actionsPool = [['drag', {
270
494
  category: 'page-action',
271
- code: JSON.stringify({
495
+ code: "function onRowDragged(toId, fromId, params){return {data: { toId, fromId }};}",
496
+ code1: JSON.stringify({
272
497
  moduleCode: module.moduleCode,
273
498
  datasetCode: dataset.code,
274
499
  data: {
@@ -276,39 +501,61 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
276
501
  fromId: fromId
277
502
  }
278
503
  })
279
- }]]);
504
+ }]];
505
+ ctx.doAction(_actionsPool, {
506
+ toId: toId,
507
+ fromId: fromId,
508
+ params: params,
509
+ datasetCode: dataset.code
510
+ });
280
511
  }
281
512
  });
282
513
  var _afterInit = (0, _ahooks.useMemoizedFn)(function (res, dispatch, props) {
283
514
  ctx.doAction(advance.events.afterInit, {
284
515
  res: res,
285
516
  dispatch: dispatch,
286
- props: props
517
+ props: props,
518
+ datasetCode: dataset.code
287
519
  });
288
520
  });
289
521
  var _afterQuery = (0, _ahooks.useMemoizedFn)(function (res) {
290
522
  ctx.doAction(advance.events.afterQuery, {
291
- res: res
292
- });
293
- });
294
- (0, _ahooks.useUnmount)(function () {
295
- ctx.doAction(advance.events.onUnmount, {
296
- instance: instanceRef.current
523
+ res: res,
524
+ datasetCode: dataset.code
297
525
  });
298
526
  });
527
+ (0, _react.useEffect)(function () {
528
+ var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref10) {
529
+ var resource = _ref10.resource,
530
+ prevResource = _ref10.prevResource;
531
+ ctx.doAction(advance.events.onPagePublicResourceChanged, {
532
+ resource: resource,
533
+ prevResource: prevResource,
534
+ instance: (ref === null || ref === void 0 ? void 0 : ref.current) || (instanceRef === null || instanceRef === void 0 ? void 0 : instanceRef.current)
535
+ });
536
+ }).watch();
537
+ return function () {
538
+ ctx.$unsubscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED, tid);
539
+ ctx.doAction(advance.events.onUnmount, {
540
+ datasetCode: dataset === null || dataset === void 0 ? void 0 : dataset.code
541
+ });
542
+ };
543
+ }, []);
299
544
  var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
300
545
  return wrapperRef.current;
301
546
  });
302
547
  return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
303
548
  id: id,
304
549
  displayName: "Table",
305
- getTargetDom: getTargetDom
550
+ getTargetDom: getTargetDom,
551
+ api: apiRef
306
552
  }, /*#__PURE__*/_react.default.createElement(_index.LdGrid, (0, _extends2.default)({
307
- ref: ref,
553
+ ref: ref || instanceRef,
308
554
  wrapper: wrapperRef,
309
555
  wrapperProps: _wrapperProps,
310
556
  width: width,
311
557
  height: height,
558
+ _loading: ctx.loading,
312
559
  bordered: bordered,
313
560
  className: (0, _classnames.default)((0, _defineProperty2.default)({}, className, !!className)),
314
561
  ldId: id,
@@ -318,9 +565,7 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
318
565
  suppressInit: !autoLoad,
319
566
  getRowStyle: _getRowStyle,
320
567
  suppressPreset: suppressPreset,
321
- defaultColDef: {
322
- draggable: draggable
323
- }
568
+ suppressPropertyNamesCheck: true
324
569
  }, _pagination, _actionsColumn, _rowSelection, _export, _batchActions, _others, {
325
570
  readFilter: _readFilter,
326
571
  renderFunctionArea: renderFunctionArea,
@@ -330,7 +575,8 @@ var LCTable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
330
575
  onRowDoubleClick: _handleRowDoubleClick,
331
576
  onRowDragged: _handleRowDragged,
332
577
  afterInit: _afterInit,
333
- afterQuery: _afterQuery
578
+ afterQuery: _afterQuery,
579
+ autoRowClick: autoRowClick
334
580
  })));
335
581
  });
336
582
  LCTable.propTypes = {
@@ -527,6 +773,7 @@ LCTable.propTypes = {
527
773
  */
528
774
  impexp: _propTypes.default.shape({
529
775
  import: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
776
+ importType: _propTypes.default.bool,
530
777
  export: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string])
531
778
  }),
532
779
  /**
@@ -17,14 +17,14 @@
17
17
  "key": "dataset",
18
18
  "name": "数据集",
19
19
  "type": "_DataSetSelector",
20
+ "component": "table",
20
21
  "next": {
21
22
  "name": "字段配置",
22
23
  "props": [
23
24
  {
24
25
  "key": "fields",
25
26
  "name": "#字段配置器",
26
- "type": "_FieldsSetting",
27
- "component": "table"
27
+ "type": "_FieldsSetting"
28
28
  }
29
29
  ]
30
30
  }
@@ -61,7 +61,7 @@
61
61
  "name": "顶部按钮组",
62
62
  "type": "_ActionsEditor",
63
63
  "default": { "display": "button", "max": 2, "moreText": "操作", "todoList": [] },
64
- "defaultCode": "function todo(instance) { \n \n}",
64
+ "defaultCode": "function todo() { \n \n}",
65
65
  "wrapper": "collapse"
66
66
  },
67
67
  {
@@ -100,7 +100,7 @@
100
100
  "name": "表格操作项",
101
101
  "type": "_ActionsEditor",
102
102
  "default": { "display": "text", "max": 2, "moreText": "更多操作", "todoList": [] },
103
- "defaultCode": "function onActionClick(data) {\n\n}",
103
+ "defaultCode": "function onActionClick(data, rowIndex, params) {\n\n}",
104
104
  "wrapper": "collapse",
105
105
  "wrapperProps": { "suppressIcon": true }
106
106
  }
@@ -344,55 +344,61 @@
344
344
  "key": "onMount",
345
345
  "name": "组件首次渲染时",
346
346
  "desc": "在组件首次渲染时,执行方法",
347
- "func": "(params, instance)=>{\n\t\n}"
347
+ "func": "function onMount(params) {\n\t\n}"
348
348
  },
349
349
  {
350
350
  "key": "onUnmount",
351
351
  "name": "组件卸载时",
352
352
  "desc": "在组件卸载时,执行方法。",
353
- "func": "(instance)=>{\n\t\n}"
353
+ "func": "function onUnmount() {\n\t\n}"
354
354
  },
355
355
  {
356
356
  "key": "onRowClick",
357
357
  "name": "行单击",
358
358
  "desc": "单击表格行时,执行方法",
359
- "func": "(data, rowIndex, params)=>{\n\t\n}"
359
+ "func": "function onRowClick(data, rowIndex, params) {\n\t\n}"
360
360
  },
361
361
  {
362
362
  "key": "onRowDoubleClick",
363
363
  "name": "行双击",
364
364
  "desc": "双击表格行时,执行方法",
365
- "func": "(data, rowIndex, params)=>{\n\t\n}"
365
+ "func": "function onRowDoubleClick(data, rowIndex, params) {\n\t\n}"
366
366
  },
367
367
  {
368
368
  "key": "onRowSelected",
369
369
  "name": "行选择",
370
370
  "desc": "选中行时,执行方法",
371
- "func": "(data, isSelected, SelectedRows, params)=>{\n\t\n}"
371
+ "func": "function onRowSelected(data, isSelected, SelectedRows, params) {\n\t\n}"
372
372
  },
373
373
  {
374
374
  "key": "onRowSelectChange",
375
375
  "name": "行选择变化",
376
376
  "desc": "行选中发生变化时,执行方法",
377
- "func": "(rows, nodes, params)=>{\n\t\n}"
377
+ "func": "function onRowSelectChange(rows, nodes, params) {\n\t\n}"
378
378
  },
379
379
  {
380
380
  "key": "onRowDragged",
381
381
  "name": "行拖拽后",
382
382
  "desc": "拖拽行使其顺序发生变化后,执行方法",
383
- "func": "(toId, fromId, params)=>{\n\t\n}"
383
+ "func": "function onRowDragged(toId, fromId, params) {\n\t\n}"
384
+ },
385
+ {
386
+ "key": "onPagePublicResourceChanged",
387
+ "name": "页面共享资源变化后",
388
+ "desc": "当页面共享资源发生变化后(pagePublicResourceChanged),执行方法",
389
+ "func": "function onPagePublicResourceChanged(resource, prevResource, instance) {\n\t\n}"
384
390
  },
385
391
  {
386
392
  "key": "afterInit",
387
393
  "name": "初始化后的回调",
388
394
  "desc": "组件及数据加载完成后,执行方法",
389
- "func": "(res, dispatch, props)=>{\n\t\n}"
395
+ "func": "function afterInit(res, dispatch, props) {\n\t\n}"
390
396
  },
391
397
  {
392
398
  "key": "afterQuery",
393
399
  "name": "数据读取回调",
394
400
  "desc": "读取数据源后执行方法,返回接口中原始数据",
395
- "func": "(res)=>{\n\t\n}"
401
+ "func": "function afterQuery(res) {\n\t\n}"
396
402
  }
397
403
  ]
398
404
  }