@luck-design-biz/luckda 0.0.24-1 → 0.0.24-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/es/components/Builder/index.js +6 -4
  4. package/es/components/LdAutoForm/index.js +0 -0
  5. package/es/components/LdCard/index.js +0 -0
  6. package/es/components/LdCard/model.js +0 -0
  7. package/es/components/LdCom/index.js +0 -0
  8. package/es/components/LdFormList/index.js +0 -0
  9. package/es/components/LdFormList/model.js +0 -0
  10. package/es/components/LdGrid/index.js +12 -3
  11. package/es/components/LdGrid/model.js +0 -0
  12. package/es/components/LdGridForm/index.js +0 -0
  13. package/es/components/LdGridForm/index.less +0 -0
  14. package/es/components/LdInfoPanel/index.js +0 -0
  15. package/es/components/LdPop/index.js +0 -0
  16. package/es/components/LdRuntimeCom/index.js +0 -0
  17. package/es/components/LdTree/index.js +0 -0
  18. package/es/components/LdTree/index.less +0 -0
  19. package/es/helper/FromItems.js +0 -0
  20. package/es/helper/action.js +0 -0
  21. package/es/helper/form.js +0 -0
  22. package/es/helper/index.less +0 -0
  23. package/es/helper/ldBuilder.js +0 -0
  24. package/es/helper/ldComBuild.js +0 -0
  25. package/es/index.js +0 -0
  26. package/es/lowcode/constants/api-url.js +291 -1
  27. package/es/lowcode/constants/event-topics.js +4 -4
  28. package/es/lowcode/constants/index.js +0 -0
  29. package/es/lowcode/engine/factory/DataFactory.js +0 -0
  30. package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
  31. package/es/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
  32. package/es/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +32 -0
  33. package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
  34. package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
  35. package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
  36. package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +12 -11
  37. package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
  38. package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
  39. package/es/lowcode/engine/meta/box.props.default.json +0 -0
  40. package/es/lowcode/engine/meta/box.props.json +0 -0
  41. package/es/lowcode/engine/meta/button.props.default.json +0 -0
  42. package/es/lowcode/engine/meta/button.props.json +7 -2
  43. package/es/lowcode/engine/meta/cardlist.props.default.json +0 -0
  44. package/es/lowcode/engine/meta/cardlist.props.json +0 -0
  45. package/es/lowcode/engine/meta/components-list.json +6 -6
  46. package/es/lowcode/engine/meta/dialog.props.default.json +0 -0
  47. package/es/lowcode/engine/meta/dialog.props.json +0 -0
  48. package/es/lowcode/engine/meta/drawer.props.default.json +0 -0
  49. package/es/lowcode/engine/meta/drawer.props.json +0 -0
  50. package/es/lowcode/engine/meta/form.props.default.json +0 -0
  51. package/es/lowcode/engine/meta/form.props.json +0 -0
  52. package/es/lowcode/engine/meta/iframe.props.default.json +0 -0
  53. package/es/lowcode/engine/meta/iframe.props.json +0 -0
  54. package/es/lowcode/engine/meta/image.props.default.json +0 -0
  55. package/es/lowcode/engine/meta/image.props.json +0 -0
  56. package/es/lowcode/engine/meta/imex.props.default.json +0 -0
  57. package/es/lowcode/engine/meta/imex.props.json +0 -0
  58. package/es/lowcode/engine/meta/js-editor/auto-complete.json +28 -28
  59. package/es/lowcode/engine/meta/jsx.props.default.json +0 -0
  60. package/es/lowcode/engine/meta/jsx.props.json +0 -0
  61. package/es/lowcode/engine/meta/layout.props.default.json +0 -0
  62. package/es/lowcode/engine/meta/layout.props.json +0 -0
  63. package/es/lowcode/engine/meta/link.props.default.json +0 -0
  64. package/es/lowcode/engine/meta/link.props.json +0 -0
  65. package/es/lowcode/engine/meta/section.props.default.json +0 -0
  66. package/es/lowcode/engine/meta/section.props.json +0 -0
  67. package/es/lowcode/engine/meta/split.props.default.json +0 -0
  68. package/es/lowcode/engine/meta/split.props.json +0 -0
  69. package/es/lowcode/engine/meta/table.props.default.json +20 -2
  70. package/es/lowcode/engine/meta/table.props.json +99 -37
  71. package/es/lowcode/engine/meta/tabs.props.default.json +0 -0
  72. package/es/lowcode/engine/meta/tabs.props.json +0 -0
  73. package/es/lowcode/engine/meta/text.props.default.json +0 -0
  74. package/es/lowcode/engine/meta/text.props.json +0 -0
  75. package/es/lowcode/engine/meta/tree.props.default.json +0 -0
  76. package/es/lowcode/engine/meta/tree.props.json +0 -0
  77. package/es/lowcode/engine/provider/ContextProvider.js +40 -28
  78. package/es/lowcode/engine/provider/EventBusProvider.js +0 -0
  79. package/es/lowcode/engine/tools/dataProcess.js +5 -3
  80. package/es/lowcode/engine/tools/helper.js +68 -0
  81. package/es/lowcode/engine/tools/usePromiseState.js +0 -0
  82. package/es/lowcode/index.js +3 -1
  83. package/es/lowcode/painter/Components.js +0 -0
  84. package/es/lowcode/painter/Design.js +27 -304
  85. package/es/lowcode/painter/DesignOperator.js +271 -0
  86. package/es/lowcode/painter/DesignToolbar.js +91 -0
  87. package/es/lowcode/painter/I18n.js +0 -0
  88. package/es/lowcode/painter/Outline.js +31 -27
  89. package/es/lowcode/painter/Panel.js +71 -33
  90. package/es/lowcode/painter/Ribbon.js +0 -0
  91. package/es/lowcode/painter/components/Collapse.js +67 -8
  92. package/es/lowcode/painter/components/ColorInput.js +125 -0
  93. package/es/lowcode/painter/components/{TabEditor.js → ListEditor.js} +17 -16
  94. package/es/lowcode/painter/components/NumberInput.js +72 -17
  95. package/es/lowcode/painter/components/PanelItem.js +40 -11
  96. package/es/lowcode/painter/components/PopConfirm.js +4 -1
  97. package/es/lowcode/painter/components/PopForm.js +0 -0
  98. package/es/lowcode/painter/components/RuleInput.js +5 -3
  99. package/es/lowcode/painter/components/SortBox.js +0 -0
  100. package/es/lowcode/painter/components/actions-editor/ActionEditor.js +147 -0
  101. package/es/lowcode/painter/components/actions-editor/index.js +170 -0
  102. package/es/lowcode/painter/components/code-editor/BaseEditor.js +42 -64
  103. package/es/lowcode/painter/components/code-editor/CssEditor.js +27 -0
  104. package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +37 -14
  105. package/es/lowcode/painter/components/code-editor/JSEditor.js +22 -0
  106. package/es/lowcode/painter/components/code-editor/index.js +0 -0
  107. package/es/lowcode/painter/index.js +6 -2
  108. package/es/lowcode/painter/panel-section/ButtonType.js +0 -0
  109. package/es/lowcode/painter/panel-section/DataSetSelector.js +61 -0
  110. package/es/lowcode/painter/panel-section/Icon.js +0 -0
  111. package/es/lowcode/painter/panel-section/IconSelector.js +0 -0
  112. package/es/lowcode/painter/panel-section/LayoutRatio.js +2 -1
  113. package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +61 -0
  114. package/es/lowcode/painter/panel-section/StylePanel/Border.js +150 -0
  115. package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +87 -0
  116. package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +66 -0
  117. package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +66 -0
  118. package/es/lowcode/painter/panel-section/StylePanel/Display.js +15 -11
  119. package/es/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -0
  120. package/es/lowcode/painter/panel-section/StylePanel/Font.js +162 -0
  121. package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +386 -0
  122. package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +78 -0
  123. package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +23 -0
  124. package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +20 -0
  125. package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +23 -0
  126. package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +42 -10
  127. package/es/lowcode/painter/panel-section/StylePanel/Margin.js +60 -0
  128. package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +50 -0
  129. package/es/lowcode/painter/panel-section/StylePanel/Padding.js +61 -0
  130. package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +41 -0
  131. package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +216 -0
  132. package/es/lowcode/painter/panel-section/StylePanel/Size.js +53 -0
  133. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +55 -8
  134. package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +16 -0
  135. package/es/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +23 -20
  136. package/es/lowcode/painter/panel-section/StylePanel/index.js +17 -0
  137. package/es/lowcode/painter/panel-section/TabItems.js +7 -37
  138. package/es/lowcode/painter/panel-section/TableActions.js +19 -0
  139. package/es/lowcode/painter/panel-section/TableZebra.js +14 -0
  140. package/es/lowcode/painter/panel-section/WidthHeight.js +39 -0
  141. package/es/lowcode/painter/services/I18n.js +0 -0
  142. package/es/lowcode/painter/style/actions-editor.less +16 -0
  143. package/es/lowcode/painter/style/border-editor.less +36 -0
  144. package/es/lowcode/painter/style/border-radius-selector.less +43 -0
  145. package/es/lowcode/painter/style/border-selector.less +40 -0
  146. package/es/lowcode/painter/style/button-type.less +0 -0
  147. package/es/lowcode/painter/style/collapse.less +2 -1
  148. package/es/lowcode/painter/style/color-input.less +19 -0
  149. package/es/lowcode/painter/style/components.less +0 -0
  150. package/es/lowcode/painter/style/design.less +7 -0
  151. package/es/lowcode/painter/style/display.less +0 -0
  152. package/es/lowcode/painter/style/font-editor.less +9 -0
  153. package/es/lowcode/painter/style/fullscreen-editor.less +0 -0
  154. package/es/lowcode/painter/style/icon-selector.less +0 -0
  155. package/es/lowcode/painter/style/icon.less +0 -0
  156. package/es/lowcode/painter/style/index.less +0 -0
  157. package/es/lowcode/painter/style/layout-ratio.less +0 -0
  158. package/{lib/lowcode/painter/style/tabeditor.less → es/lowcode/painter/style/list-editor.less} +9 -40
  159. package/es/lowcode/painter/style/number-input.less +0 -0
  160. package/es/lowcode/painter/style/outline.less +0 -0
  161. package/es/lowcode/painter/style/panel-item.less +11 -1
  162. package/es/lowcode/painter/style/panel.less +3 -16
  163. package/es/lowcode/painter/style/pop-confirm.less +0 -0
  164. package/es/lowcode/painter/style/pop-form.less +0 -0
  165. package/es/lowcode/painter/style/radio.less +0 -0
  166. package/es/lowcode/painter/style/ribbon.less +0 -0
  167. package/es/lowcode/painter/style/rule-input.less +0 -0
  168. package/es/lowcode/painter/style/style-panel.less +32 -0
  169. package/es/lowcode/painter/style/tabitems.less +0 -0
  170. package/es/lowcode/view/Canvas.js +16 -15
  171. package/es/lowcode/view/Loading.js +0 -0
  172. package/es/lowcode/view/Page.js +10 -225
  173. package/es/lowcode/view/index.js +5 -6
  174. package/es/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
  175. package/es/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
  176. package/es/lowcode/view/lc-components/Box/index.js +2 -2
  177. package/es/lowcode/view/lc-components/Box/index.less +0 -0
  178. package/es/lowcode/view/lc-components/Box/meta.json +0 -0
  179. package/es/lowcode/view/lc-components/Button/FunctionDesign.js +0 -0
  180. package/es/lowcode/view/lc-components/Button/FunctionLive.js +0 -0
  181. package/es/lowcode/view/lc-components/Button/index.js +10 -7
  182. package/es/lowcode/view/lc-components/Button/meta.json +7 -2
  183. package/es/lowcode/view/lc-components/Button/style.less +3 -0
  184. package/es/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
  185. package/es/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
  186. package/es/lowcode/view/lc-components/CardList/index.js +0 -0
  187. package/es/lowcode/view/lc-components/CardList/meta.json +0 -0
  188. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +48 -3
  189. package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
  190. package/es/lowcode/view/lc-components/Dialog/index.js +21 -23
  191. package/es/lowcode/view/lc-components/Dialog/index.less +1 -1
  192. package/es/lowcode/view/lc-components/Dialog/meta.json +0 -0
  193. package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +13 -2
  194. package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
  195. package/es/lowcode/view/lc-components/Drawer/index.js +19 -22
  196. package/es/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
  197. package/es/lowcode/view/lc-components/Drawer/meta.json +0 -0
  198. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +0 -0
  199. package/es/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
  200. package/es/lowcode/view/lc-components/Form/index.js +0 -0
  201. package/es/lowcode/view/lc-components/Form/meta.json +0 -0
  202. package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
  203. package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
  204. package/es/lowcode/view/lc-components/Iframe/index.js +0 -0
  205. package/es/lowcode/view/lc-components/Iframe/meta.json +0 -0
  206. package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -0
  207. package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
  208. package/es/lowcode/view/lc-components/ImEx/index.js +0 -0
  209. package/es/lowcode/view/lc-components/ImEx/meta.json +0 -0
  210. package/es/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
  211. package/es/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
  212. package/es/lowcode/view/lc-components/Image/index.js +0 -0
  213. package/es/lowcode/view/lc-components/Image/meta.json +0 -0
  214. package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
  215. package/es/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
  216. package/es/lowcode/view/lc-components/JSX/index.js +0 -0
  217. package/es/lowcode/view/lc-components/JSX/meta.json +0 -0
  218. package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -0
  219. package/es/lowcode/view/lc-components/Layout/FunctionLive.js +0 -0
  220. package/es/lowcode/view/lc-components/Layout/index.js +0 -0
  221. package/es/lowcode/view/lc-components/Layout/index.less +0 -0
  222. package/es/lowcode/view/lc-components/Layout/meta.json +0 -0
  223. package/es/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
  224. package/es/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
  225. package/es/lowcode/view/lc-components/Link/index.js +0 -0
  226. package/es/lowcode/view/lc-components/Link/meta.json +0 -0
  227. package/es/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
  228. package/es/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
  229. package/es/lowcode/view/lc-components/Section/index.js +0 -0
  230. package/es/lowcode/view/lc-components/Section/meta.json +0 -0
  231. package/es/lowcode/view/lc-components/Split/FunctionDesign.js +0 -0
  232. package/es/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
  233. package/es/lowcode/view/lc-components/Split/index.js +0 -0
  234. package/es/lowcode/view/lc-components/Split/meta.json +0 -0
  235. package/es/lowcode/view/lc-components/Table/FunctionDesign.js +4 -2
  236. package/es/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
  237. package/es/lowcode/view/lc-components/Table/index.js +222 -132
  238. package/es/lowcode/view/lc-components/Table/meta.json +88 -37
  239. package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -0
  240. package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -0
  241. package/es/lowcode/view/lc-components/Tabs/index.js +0 -0
  242. package/es/lowcode/view/lc-components/Tabs/meta.json +0 -0
  243. package/es/lowcode/view/lc-components/Text/FunctionDesign.js +0 -0
  244. package/es/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
  245. package/es/lowcode/view/lc-components/Text/index.js +0 -0
  246. package/es/lowcode/view/lc-components/Text/meta.json +0 -0
  247. package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -0
  248. package/es/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
  249. package/es/lowcode/view/lc-components/Tree/index.js +0 -0
  250. package/es/lowcode/view/lc-components/Tree/meta.json +0 -0
  251. package/es/lowcode/view/lc-components/Wrapper.js +0 -0
  252. package/es/lowcode/view/style/canvas.less +0 -0
  253. package/es/lowcode/view/style/loading.less +0 -0
  254. package/es/lowcode/view/style/page.less +0 -0
  255. package/es/services.js +0 -0
  256. package/es/upload/Form/gridForm.js +0 -0
  257. package/es/upload/Form/index.js +0 -0
  258. package/es/upload/Form/index.less +0 -0
  259. package/es/upload/FormItem/index.js +0 -0
  260. package/es/upload/GridCell/index.js +0 -0
  261. package/es/upload/index.js +0 -0
  262. package/es/utils/action.js +0 -0
  263. package/es/utils/form.js +0 -0
  264. package/es/utils/grid.js +0 -0
  265. package/es/utils/index.js +0 -0
  266. package/lib/components/Builder/index.js +5 -3
  267. package/lib/components/LdAutoForm/index.js +0 -0
  268. package/lib/components/LdCard/index.js +0 -0
  269. package/lib/components/LdCard/model.js +0 -0
  270. package/lib/components/LdCom/index.js +0 -0
  271. package/lib/components/LdFormList/index.js +0 -0
  272. package/lib/components/LdFormList/model.js +0 -0
  273. package/lib/components/LdGrid/index.js +12 -3
  274. package/lib/components/LdGrid/model.js +0 -0
  275. package/lib/components/LdGridForm/index.js +0 -0
  276. package/lib/components/LdGridForm/index.less +0 -0
  277. package/lib/components/LdInfoPanel/index.js +0 -0
  278. package/lib/components/LdPop/index.js +0 -0
  279. package/lib/components/LdRuntimeCom/index.js +0 -0
  280. package/lib/components/LdTree/index.js +0 -0
  281. package/lib/components/LdTree/index.less +0 -0
  282. package/lib/helper/FromItems.js +0 -0
  283. package/lib/helper/action.js +0 -0
  284. package/lib/helper/form.js +0 -0
  285. package/lib/helper/index.less +0 -0
  286. package/lib/helper/ldBuilder.js +0 -0
  287. package/lib/helper/ldComBuild.js +0 -0
  288. package/lib/index.js +0 -0
  289. package/lib/lowcode/constants/api-url.js +293 -2
  290. package/lib/lowcode/constants/event-topics.js +5 -5
  291. package/lib/lowcode/constants/index.js +0 -0
  292. package/lib/lowcode/engine/factory/DataFactory.js +0 -0
  293. package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +0 -0
  294. package/lib/lowcode/engine/factory/panel-item-factory/GroupStrategy.js +0 -0
  295. package/lib/lowcode/engine/factory/panel-item-factory/NumberStrategy.js +38 -0
  296. package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +0 -0
  297. package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -1
  298. package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +0 -0
  299. package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +11 -10
  300. package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +11 -1
  301. package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
  302. package/lib/lowcode/engine/meta/box.props.default.json +0 -0
  303. package/lib/lowcode/engine/meta/box.props.json +0 -0
  304. package/lib/lowcode/engine/meta/button.props.default.json +0 -0
  305. package/lib/lowcode/engine/meta/button.props.json +7 -2
  306. package/lib/lowcode/engine/meta/cardlist.props.default.json +0 -0
  307. package/lib/lowcode/engine/meta/cardlist.props.json +0 -0
  308. package/lib/lowcode/engine/meta/components-list.json +6 -6
  309. package/lib/lowcode/engine/meta/dialog.props.default.json +0 -0
  310. package/lib/lowcode/engine/meta/dialog.props.json +0 -0
  311. package/lib/lowcode/engine/meta/drawer.props.default.json +0 -0
  312. package/lib/lowcode/engine/meta/drawer.props.json +0 -0
  313. package/lib/lowcode/engine/meta/form.props.default.json +0 -0
  314. package/lib/lowcode/engine/meta/form.props.json +0 -0
  315. package/lib/lowcode/engine/meta/iframe.props.default.json +0 -0
  316. package/lib/lowcode/engine/meta/iframe.props.json +0 -0
  317. package/lib/lowcode/engine/meta/image.props.default.json +0 -0
  318. package/lib/lowcode/engine/meta/image.props.json +0 -0
  319. package/lib/lowcode/engine/meta/imex.props.default.json +0 -0
  320. package/lib/lowcode/engine/meta/imex.props.json +0 -0
  321. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +28 -28
  322. package/lib/lowcode/engine/meta/jsx.props.default.json +0 -0
  323. package/lib/lowcode/engine/meta/jsx.props.json +0 -0
  324. package/lib/lowcode/engine/meta/layout.props.default.json +0 -0
  325. package/lib/lowcode/engine/meta/layout.props.json +0 -0
  326. package/lib/lowcode/engine/meta/link.props.default.json +0 -0
  327. package/lib/lowcode/engine/meta/link.props.json +0 -0
  328. package/lib/lowcode/engine/meta/section.props.default.json +0 -0
  329. package/lib/lowcode/engine/meta/section.props.json +0 -0
  330. package/lib/lowcode/engine/meta/split.props.default.json +0 -0
  331. package/lib/lowcode/engine/meta/split.props.json +0 -0
  332. package/lib/lowcode/engine/meta/table.props.default.json +20 -2
  333. package/lib/lowcode/engine/meta/table.props.json +99 -37
  334. package/lib/lowcode/engine/meta/tabs.props.default.json +0 -0
  335. package/lib/lowcode/engine/meta/tabs.props.json +0 -0
  336. package/lib/lowcode/engine/meta/text.props.default.json +0 -0
  337. package/lib/lowcode/engine/meta/text.props.json +0 -0
  338. package/lib/lowcode/engine/meta/tree.props.default.json +0 -0
  339. package/lib/lowcode/engine/meta/tree.props.json +0 -0
  340. package/lib/lowcode/engine/provider/ContextProvider.js +40 -28
  341. package/lib/lowcode/engine/provider/EventBusProvider.js +0 -0
  342. package/lib/lowcode/engine/tools/dataProcess.js +5 -3
  343. package/lib/lowcode/engine/tools/helper.js +70 -0
  344. package/lib/lowcode/engine/tools/usePromiseState.js +0 -0
  345. package/lib/lowcode/index.js +5 -1
  346. package/lib/lowcode/painter/Components.js +0 -0
  347. package/lib/lowcode/painter/Design.js +24 -300
  348. package/lib/lowcode/painter/DesignOperator.js +278 -0
  349. package/lib/lowcode/painter/DesignToolbar.js +99 -0
  350. package/lib/lowcode/painter/I18n.js +0 -0
  351. package/lib/lowcode/painter/Outline.js +31 -27
  352. package/lib/lowcode/painter/Panel.js +71 -33
  353. package/lib/lowcode/painter/Ribbon.js +0 -0
  354. package/lib/lowcode/painter/components/Collapse.js +65 -7
  355. package/lib/lowcode/painter/components/ColorInput.js +132 -0
  356. package/lib/lowcode/painter/components/{TabEditor.js → ListEditor.js} +19 -18
  357. package/lib/lowcode/painter/components/NumberInput.js +70 -16
  358. package/lib/lowcode/painter/components/PanelItem.js +40 -11
  359. package/lib/lowcode/painter/components/PopConfirm.js +4 -1
  360. package/lib/lowcode/painter/components/PopForm.js +0 -0
  361. package/lib/lowcode/painter/components/RuleInput.js +5 -3
  362. package/lib/lowcode/painter/components/SortBox.js +0 -0
  363. package/lib/lowcode/painter/components/actions-editor/ActionEditor.js +155 -0
  364. package/lib/lowcode/painter/components/actions-editor/index.js +178 -0
  365. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +40 -63
  366. package/lib/lowcode/painter/components/code-editor/CssEditor.js +26 -0
  367. package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +35 -13
  368. package/lib/lowcode/painter/components/code-editor/JSEditor.js +22 -0
  369. package/lib/lowcode/painter/components/code-editor/index.js +0 -0
  370. package/lib/lowcode/painter/index.js +6 -2
  371. package/lib/lowcode/painter/panel-section/ButtonType.js +0 -0
  372. package/lib/lowcode/painter/panel-section/DataSetSelector.js +69 -0
  373. package/lib/lowcode/painter/panel-section/Icon.js +0 -0
  374. package/lib/lowcode/painter/panel-section/IconSelector.js +0 -0
  375. package/lib/lowcode/painter/panel-section/LayoutRatio.js +2 -1
  376. package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +68 -0
  377. package/lib/lowcode/painter/panel-section/StylePanel/Border.js +158 -0
  378. package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +95 -0
  379. package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +73 -0
  380. package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +73 -0
  381. package/lib/lowcode/painter/panel-section/StylePanel/Display.js +15 -11
  382. package/lib/lowcode/painter/panel-section/StylePanel/DisplaySvg.js +0 -0
  383. package/lib/lowcode/painter/panel-section/StylePanel/Font.js +170 -0
  384. package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +392 -0
  385. package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +85 -0
  386. package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +29 -0
  387. package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +26 -0
  388. package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +29 -0
  389. package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +40 -9
  390. package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +67 -0
  391. package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +57 -0
  392. package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +68 -0
  393. package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +48 -0
  394. package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +224 -0
  395. package/lib/lowcode/painter/panel-section/StylePanel/{Width.js → Size.js} +39 -35
  396. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +55 -8
  397. package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +22 -0
  398. package/lib/lowcode/painter/panel-section/StylePanel/{Height.js → WidthHeight.js} +22 -19
  399. package/lib/lowcode/painter/panel-section/StylePanel/index.js +16 -0
  400. package/lib/lowcode/painter/panel-section/TabItems.js +7 -37
  401. package/lib/lowcode/painter/panel-section/TableActions.js +26 -0
  402. package/lib/lowcode/painter/panel-section/TableZebra.js +21 -0
  403. package/lib/lowcode/painter/panel-section/WidthHeight.js +46 -0
  404. package/lib/lowcode/painter/services/I18n.js +0 -0
  405. package/lib/lowcode/painter/style/actions-editor.less +16 -0
  406. package/lib/lowcode/painter/style/border-editor.less +36 -0
  407. package/lib/lowcode/painter/style/border-radius-selector.less +43 -0
  408. package/lib/lowcode/painter/style/border-selector.less +40 -0
  409. package/lib/lowcode/painter/style/button-type.less +0 -0
  410. package/lib/lowcode/painter/style/collapse.less +2 -1
  411. package/lib/lowcode/painter/style/color-input.less +19 -0
  412. package/lib/lowcode/painter/style/components.less +0 -0
  413. package/lib/lowcode/painter/style/design.less +7 -0
  414. package/lib/lowcode/painter/style/display.less +0 -0
  415. package/lib/lowcode/painter/style/font-editor.less +9 -0
  416. package/lib/lowcode/painter/style/fullscreen-editor.less +0 -0
  417. package/lib/lowcode/painter/style/icon-selector.less +0 -0
  418. package/lib/lowcode/painter/style/icon.less +0 -0
  419. package/lib/lowcode/painter/style/index.less +0 -0
  420. package/lib/lowcode/painter/style/layout-ratio.less +0 -0
  421. package/{es/lowcode/painter/style/tabeditor.less → lib/lowcode/painter/style/list-editor.less} +9 -40
  422. package/lib/lowcode/painter/style/number-input.less +0 -0
  423. package/lib/lowcode/painter/style/outline.less +0 -0
  424. package/lib/lowcode/painter/style/panel-item.less +11 -1
  425. package/lib/lowcode/painter/style/panel.less +3 -16
  426. package/lib/lowcode/painter/style/pop-confirm.less +0 -0
  427. package/lib/lowcode/painter/style/pop-form.less +0 -0
  428. package/lib/lowcode/painter/style/radio.less +0 -0
  429. package/lib/lowcode/painter/style/ribbon.less +0 -0
  430. package/lib/lowcode/painter/style/rule-input.less +0 -0
  431. package/lib/lowcode/painter/style/style-panel.less +32 -0
  432. package/lib/lowcode/painter/style/tabitems.less +0 -0
  433. package/lib/lowcode/view/Canvas.js +16 -15
  434. package/lib/lowcode/view/Loading.js +0 -0
  435. package/lib/lowcode/view/Page.js +9 -224
  436. package/lib/lowcode/view/index.js +5 -6
  437. package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +0 -0
  438. package/lib/lowcode/view/lc-components/Box/FunctionLive.js +0 -0
  439. package/lib/lowcode/view/lc-components/Box/index.js +2 -2
  440. package/lib/lowcode/view/lc-components/Box/index.less +0 -0
  441. package/lib/lowcode/view/lc-components/Box/meta.json +0 -0
  442. package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +0 -0
  443. package/lib/lowcode/view/lc-components/Button/FunctionLive.js +0 -0
  444. package/lib/lowcode/view/lc-components/Button/index.js +10 -7
  445. package/lib/lowcode/view/lc-components/Button/meta.json +7 -2
  446. package/lib/lowcode/view/lc-components/Button/style.less +3 -0
  447. package/lib/lowcode/view/lc-components/CardList/FunctionDesign.js +0 -0
  448. package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +0 -0
  449. package/lib/lowcode/view/lc-components/CardList/index.js +0 -0
  450. package/lib/lowcode/view/lc-components/CardList/meta.json +0 -0
  451. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +49 -3
  452. package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +0 -0
  453. package/lib/lowcode/view/lc-components/Dialog/index.js +20 -22
  454. package/lib/lowcode/view/lc-components/Dialog/index.less +1 -1
  455. package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -0
  456. package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +13 -2
  457. package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +0 -0
  458. package/lib/lowcode/view/lc-components/Drawer/index.js +18 -21
  459. package/lib/lowcode/view/lc-components/Drawer/{style.less → index.less} +1 -1
  460. package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -0
  461. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +0 -0
  462. package/lib/lowcode/view/lc-components/Form/FunctionLive.js +0 -0
  463. package/lib/lowcode/view/lc-components/Form/index.js +0 -0
  464. package/lib/lowcode/view/lc-components/Form/meta.json +0 -0
  465. package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +0 -0
  466. package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +0 -0
  467. package/lib/lowcode/view/lc-components/Iframe/index.js +0 -0
  468. package/lib/lowcode/view/lc-components/Iframe/meta.json +0 -0
  469. package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +0 -0
  470. package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +0 -0
  471. package/lib/lowcode/view/lc-components/ImEx/index.js +0 -0
  472. package/lib/lowcode/view/lc-components/ImEx/meta.json +0 -0
  473. package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +0 -0
  474. package/lib/lowcode/view/lc-components/Image/FunctionLive.js +0 -0
  475. package/lib/lowcode/view/lc-components/Image/index.js +0 -0
  476. package/lib/lowcode/view/lc-components/Image/meta.json +0 -0
  477. package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +0 -0
  478. package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +0 -0
  479. package/lib/lowcode/view/lc-components/JSX/index.js +0 -0
  480. package/lib/lowcode/view/lc-components/JSX/meta.json +0 -0
  481. package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +0 -0
  482. package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +0 -0
  483. package/lib/lowcode/view/lc-components/Layout/index.js +0 -0
  484. package/lib/lowcode/view/lc-components/Layout/index.less +0 -0
  485. package/lib/lowcode/view/lc-components/Layout/meta.json +0 -0
  486. package/lib/lowcode/view/lc-components/Link/FunctionDesign.js +0 -0
  487. package/lib/lowcode/view/lc-components/Link/FunctionLive.js +0 -0
  488. package/lib/lowcode/view/lc-components/Link/index.js +0 -0
  489. package/lib/lowcode/view/lc-components/Link/meta.json +0 -0
  490. package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +0 -0
  491. package/lib/lowcode/view/lc-components/Section/FunctionLive.js +0 -0
  492. package/lib/lowcode/view/lc-components/Section/index.js +0 -0
  493. package/lib/lowcode/view/lc-components/Section/meta.json +0 -0
  494. package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +0 -0
  495. package/lib/lowcode/view/lc-components/Split/FunctionLive.js +0 -0
  496. package/lib/lowcode/view/lc-components/Split/index.js +0 -0
  497. package/lib/lowcode/view/lc-components/Split/meta.json +0 -0
  498. package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +4 -2
  499. package/lib/lowcode/view/lc-components/Table/FunctionLive.js +0 -0
  500. package/lib/lowcode/view/lc-components/Table/index.js +221 -131
  501. package/lib/lowcode/view/lc-components/Table/meta.json +88 -37
  502. package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +0 -0
  503. package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +0 -0
  504. package/lib/lowcode/view/lc-components/Tabs/index.js +0 -0
  505. package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -0
  506. package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +0 -0
  507. package/lib/lowcode/view/lc-components/Text/FunctionLive.js +0 -0
  508. package/lib/lowcode/view/lc-components/Text/index.js +0 -0
  509. package/lib/lowcode/view/lc-components/Text/meta.json +0 -0
  510. package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +0 -0
  511. package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +0 -0
  512. package/lib/lowcode/view/lc-components/Tree/index.js +0 -0
  513. package/lib/lowcode/view/lc-components/Tree/meta.json +0 -0
  514. package/lib/lowcode/view/lc-components/Wrapper.js +0 -0
  515. package/lib/lowcode/view/style/canvas.less +0 -0
  516. package/lib/lowcode/view/style/loading.less +0 -0
  517. package/lib/lowcode/view/style/page.less +0 -0
  518. package/lib/services.js +0 -0
  519. package/lib/upload/Form/gridForm.js +0 -0
  520. package/lib/upload/Form/index.js +0 -0
  521. package/lib/upload/Form/index.less +0 -0
  522. package/lib/upload/FormItem/index.js +0 -0
  523. package/lib/upload/GridCell/index.js +0 -0
  524. package/lib/upload/index.js +0 -0
  525. package/lib/utils/action.js +0 -0
  526. package/lib/utils/form.js +0 -0
  527. package/lib/utils/grid.js +0 -0
  528. package/lib/utils/index.js +0 -0
  529. package/lowcode.js +0 -0
  530. package/package.json +7 -5
  531. package/upload.js +0 -0
  532. package/utils.js +0 -0
  533. package/es/lowcode/painter/panel-section/StylePanel/Width.js +0 -48
@@ -2,39 +2,40 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import React from 'react';
3
3
  import { Icon } from 'luck-design/antd';
4
4
  import { formatMessage } from '@luck-design-biz/base/utils';
5
- import styles from "../style/tabeditor.less";
5
+ import styles from "../style/list-editor.less";
6
6
 
7
7
  /**
8
- * TabEditor 是一个用于管理和展示一组可编辑标签项的容器组件。
9
- * 它提供了一个添加新标签项的操作按钮,并通过 children 属性接收一组 TabEditorItem 组件。
8
+ * ListEditor 是一个用于管理和展示一组可编辑标签项的容器组件。
9
+ * 它提供了一个添加新标签项的操作按钮,并通过 children 属性接收一组 ListEditorItem 组件。
10
10
  *
11
11
  * @param {Object} props - 组件接收的属性。
12
- * @param {ReactNode} props.children - TabEditorItem 组件的实例,表示可编辑的标签项。
12
+ * @param {ReactNode} props.children - ListEditorItem 组件的实例,表示可编辑的标签项。
13
13
  * @param {Function} props.handleAdd - 一个回调函数,当用户点击添加按钮时被触发,用于添加新的标签项。
14
14
  * @returns {ReactNode} 渲染一个带有操作按钮和标签项的容器。
15
15
  */
16
- export var TabEditor = function TabEditor(_ref) {
16
+ export var ListEditor = function ListEditor(_ref) {
17
17
  var children = _ref.children,
18
+ addText = _ref.addText,
18
19
  handleAdd = _ref.handleAdd;
19
20
  return /*#__PURE__*/React.createElement("div", {
20
- className: styles['lc-painter-panel-section-components-tabeditor']
21
+ className: styles['lc-painter-panel-section-components-listeditor']
21
22
  }, /*#__PURE__*/React.createElement("div", {
22
- className: styles['tabs-box']
23
+ className: styles['list-box']
23
24
  }, children), /*#__PURE__*/React.createElement("div", {
24
- className: styles['tabs-actions']
25
+ className: styles['list-actions']
25
26
  }, /*#__PURE__*/React.createElement("div", {
26
- className: styles['tabs-action'],
27
+ className: styles['list-action'],
27
28
  onClick: handleAdd
28
29
  }, /*#__PURE__*/React.createElement(Icon, {
29
30
  type: "plus-circle"
30
- }), ' ', formatMessage({
31
- id: 'luckda.lowcode.painter.panel-section.components.tabeditor.add',
31
+ }), ' ', addText || formatMessage({
32
+ id: 'luckda.lowcode.painter.panel-section.components.listeditor.add',
32
33
  label: '添加一项'
33
34
  }))));
34
35
  };
35
36
 
36
37
  /**
37
- * TabEditorItem 是一个可编辑的标签项组件,用于在 TabEditor 容器内展示。
38
+ * ListEditorItem 是一个可编辑的标签项组件,用于在 ListEditor 容器内展示。
38
39
  * 它支持拖拽排序,并可以通过左侧和右侧的插槽来自定义内容。
39
40
  *
40
41
  * @param {Object} props - 组件接收的属性。
@@ -50,7 +51,7 @@ export var TabEditor = function TabEditor(_ref) {
50
51
  * @param {string} props.transition - 定义拖拽动画的CSS过渡属性。
51
52
  * @returns {ReactNode} 渲染一个可编辑的标签项,支持拖拽排序。
52
53
  */
53
- export var TabEditorItem = function TabEditorItem(_ref2) {
54
+ export var ListEditorItem = function ListEditorItem(_ref2) {
54
55
  var item = _ref2.item,
55
56
  left = _ref2.left,
56
57
  right = _ref2.right,
@@ -64,9 +65,9 @@ export var TabEditorItem = function TabEditorItem(_ref2) {
64
65
  return /*#__PURE__*/React.createElement("div", {
65
66
  ref: setNodeRef,
66
67
  style: style,
67
- className: styles['tabitem']
68
+ className: styles['list-item']
68
69
  }, /*#__PURE__*/React.createElement("div", {
69
- className: styles['tabitem-left']
70
+ className: styles['list-item-left']
70
71
  }, /*#__PURE__*/React.createElement("div", _extends({
71
72
  ref: setActivatorNodeRef
72
73
  }, attributes, listeners, {
@@ -83,6 +84,6 @@ export var TabEditorItem = function TabEditorItem(_ref2) {
83
84
  }, /*#__PURE__*/React.createElement("path", {
84
85
  d: "M0.499972716,6 L1.50002728,6 C1.77615459,6 2,6.22384541 2,6.49997272 C2,6.77610002 1.77615459,6.99994543 1.50002728,6.99994543 L0.499972716,6.99994543 C0.22384541,6.99994543 3.38158422e-17,6.77610002 0,6.49997272 C-3.38158422e-17,6.22384541 0.22384541,6 0.499972716,6 Z M0.499972716,3 L1.50002728,3 C1.77615459,3 2,3.22384541 2,3.49997272 C2,3.77610002 1.77615459,3.99994543 1.50002728,3.99994543 L0.499972716,3.99994543 C0.22384541,3.99994543 3.38158422e-17,3.77610002 0,3.49997272 C-3.38158422e-17,3.22384541 0.22384541,3 0.499972716,3 Z M0.499972716,7.28787148e-18 L1.50002728,5.55666624e-14 C1.77615459,7.07214574e-14 2,0.22384541 2,0.499972716 C2,0.776100022 1.77615459,0.999945432 1.50002728,0.999945432 L0.499972716,0.999945432 C0.22384541,0.999945432 3.38158422e-17,0.776100022 0,0.499972716 C-3.38158422e-17,0.22384541 0.22384541,5.0723721e-17 0.499972716,0 Z M0.5,9.00002729 L1.5,9.00002729 C1.77614237,9.00002729 2,9.22388491 2,9.50002729 C2,9.77616966 1.77614237,10.0000273 1.5,10.0000273 L0.5,10.0000273 C0.223857625,10.0000273 3.38176876e-17,9.77616966 0,9.50002729 C-3.38176876e-17,9.22388491 0.223857625,9.00002729 0.5,9.00002729 Z M0.5,12.0000273 L1.5,12.0000273 C1.77614237,12.0000273 2,12.2238849 2,12.5000273 C2,12.7761697 1.77614237,13.0000273 1.5,13.0000273 L0.5,13.0000273 C0.223857625,13.0000273 3.38176876e-17,12.7761697 0,12.5000273 C-3.38176876e-17,12.2238849 0.223857625,12.0000273 0.5,12.0000273 Z M0.5,15.0000273 L1.5,15.0000273 C1.77614237,15.0000273 2,15.2238849 2,15.5000273 C2,15.7761697 1.77614237,16.0000273 1.5,16.0000273 L0.5,16.0000273 C0.223857625,16.0000273 3.38176876e-17,15.7761697 0,15.5000273 C-3.38176876e-17,15.2238849 0.223857625,15.0000273 0.5,15.0000273 Z M3.49997272,6 L4.50002728,6 C4.77615459,6 5,6.22384541 5,6.49997272 C5,6.77610002 4.77615459,6.99994543 4.50002728,6.99994543 L3.49997272,6.99994543 C3.22384541,6.99994543 3,6.77610002 3,6.49997272 C3,6.22384541 3.22384541,6 3.49997272,6 Z M3.49997272,3 L4.50002728,3 C4.77615459,3 5,3.22384541 5,3.49997272 C5,3.77610002 4.77615459,3.99994543 4.50002728,3.99994543 L3.49997272,3.99994543 C3.22384541,3.99994543 3,3.77610002 3,3.49997272 C3,3.22384541 3.22384541,3 3.49997272,3 Z M3.49997272,7.28787148e-18 L4.50002728,5.55666624e-14 C4.77615459,7.07214574e-14 5,0.22384541 5,0.499972716 C5,0.776100022 4.77615459,0.999945432 4.50002728,0.999945432 L3.49997272,0.999945432 C3.22384541,0.999945432 3,0.776100022 3,0.499972716 C3,0.22384541 3.22384541,5.0723721e-17 3.49997272,0 Z M3.5,9.00002729 L4.5,9.00002729 C4.77614237,9.00002729 5,9.22388491 5,9.50002729 C5,9.77616966 4.77614237,10.0000273 4.5,10.0000273 L3.5,10.0000273 C3.22385763,10.0000273 3,9.77616966 3,9.50002729 C3,9.22388491 3.22385763,9.00002729 3.5,9.00002729 Z M3.5,12.0000273 L4.5,12.0000273 C4.77614237,12.0000273 5,12.2238849 5,12.5000273 C5,12.7761697 4.77614237,13.0000273 4.5,13.0000273 L3.5,13.0000273 C3.22385763,13.0000273 3,12.7761697 3,12.5000273 C3,12.2238849 3.22385763,12.0000273 3.5,12.0000273 Z M3.5,15.0000273 L4.5,15.0000273 C4.77614237,15.0000273 5,15.2238849 5,15.5000273 C5,15.7761697 4.77614237,16.0000273 4.5,16.0000273 L3.5,16.0000273 C3.22385763,16.0000273 3,15.7761697 3,15.5000273 C3,15.2238849 3.22385763,15.0000273 3.5,15.0000273 Z"
85
86
  }))), left), /*#__PURE__*/React.createElement("div", {
86
- className: styles['tabitem-right']
87
+ className: styles['list-item-right']
87
88
  }, right));
88
89
  };
@@ -1,44 +1,95 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["value", "options", "onChange", "defaultValue"];
5
- import React, { useState, useEffect, useRef } from 'react';
4
+ var _excluded = ["value", "options", "onChange", "defaultValue", "allowNull", "convertInt"];
5
+ import React, { useState } from 'react';
6
+ import { useUpdateEffect } from 'ahooks';
6
7
  import styles from "../style/number-input.less";
7
8
  import { InputNumber, Dropdown, Menu } from 'luck-design/antd';
9
+ import { isNil } from 'lodash';
10
+
11
+ /**
12
+ * NumberInput 组件是一个带单位选择的数字输入框组件,允许用户输入一个数值并从预定义的选项中选择一个单位。
13
+ * 它支持默认值、空值、自动类型转换以及自定义更改处理逻辑。
14
+ * 组件内部通过 Dropdown 组件提供一个单位的下拉选择菜单,并通过 InputNumber 接收数值输入。
15
+ * 该组件也支持将输入值转换为整数或保持为原始格式,并允许通过 options 定制可选单位。
16
+ *
17
+ * @component
18
+ * @example
19
+ * const options = [{ value: 'px', label: '像素' }, { value: '%', label: '百分比' }];
20
+ * <NumberInput
21
+ * value={100}
22
+ * options={options}
23
+ * onChange={(newValue) => console.log('New value:', newValue)}
24
+ * defaultValue={0}
25
+ * allowNull={true}
26
+ * convertInt={false}
27
+ * />
28
+ *
29
+ * @param {Object} props - 组件的属性。
30
+ * @param {number|string} props.value - 初始化输入框的值。
31
+ * @param {Object[]} props.options - 可选单位的数组,每个对象包含 value(单位的值)和 label(显示在下拉菜单中的标签)。
32
+ * @param {Function} props.onChange - 当输入值或单位改变时触发的回调函数。传递新的值作为参数。
33
+ * @param {number|string} [props.defaultValue] - 未指定 value 时的默认值。
34
+ * @param {boolean} [props.allowNull=true] - 是否允许空值。
35
+ * @param {boolean} [props.convertInt=false] - 是否将输入值转换为整数。
36
+ * @param {Object} rest - 传递给 InputNumber 组件的其他属性。
37
+ *
38
+ * @returns {ReactElement} 返回一个 React 元素,表示一个带单位选择的数字输入框组件。
39
+ */
8
40
  export default function (_ref) {
9
41
  var value = _ref.value,
10
42
  options = _ref.options,
11
43
  onChange = _ref.onChange,
12
- _ref$defaultValue = _ref.defaultValue,
13
- defaultValue = _ref$defaultValue === void 0 ? 100 : _ref$defaultValue,
44
+ defaultValue = _ref.defaultValue,
45
+ _ref$allowNull = _ref.allowNull,
46
+ allowNull = _ref$allowNull === void 0 ? true : _ref$allowNull,
47
+ _ref$convertInt = _ref.convertInt,
48
+ convertInt = _ref$convertInt === void 0 ? false : _ref$convertInt,
14
49
  rest = _objectWithoutProperties(_ref, _excluded);
15
- var _useState = useState(value),
50
+ var _useState = useState(value !== null && value !== void 0 ? value : defaultValue),
16
51
  _useState2 = _slicedToArray(_useState, 2),
17
52
  val = _useState2[0],
18
53
  setVal = _useState2[1];
19
- var initValue;
20
- useEffect(function () {
54
+ useUpdateEffect(function () {
21
55
  setVal(value);
22
56
  }, [value]);
23
- var _parseValue = parseValue(val),
57
+ var _parseValue = parseValue(val, options),
24
58
  number = _parseValue.number,
25
59
  unit = _parseValue.unit;
26
60
  var handleSelect = function handleSelect(item) {
27
61
  var newValue;
28
62
  if (item.key == 'auto') newValue = item.key;else if (isNaN(number)) {
29
- newValue = defaultValue + item.key;
63
+ var defaultNumber = defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0;
64
+ if (isNaN(defaultNumber)) {
65
+ var match = defaultNumber.match(/[\d\.]+/);
66
+ defaultNumber = match ? parseFloat(match[0]) : 0;
67
+ }
68
+ newValue = defaultNumber + item.key;
30
69
  } else {
31
70
  newValue = number + item.key;
32
71
  }
33
72
  changeValue(newValue);
34
73
  };
35
74
  var handleChange = function handleChange(value) {
36
- changeValue(value + (unit !== null && unit !== void 0 ? unit : options[0].value));
75
+ if (!isNil(value)) changeValue(value + (unit !== null && unit !== void 0 ? unit : options[0].value));else changeValue(null);
37
76
  };
38
77
  var changeValue = function changeValue(value) {
39
- console.log('changeValue', value);
40
- if (onChange) onChange(value);
41
- setVal(value);
78
+ // 分离需要数字前缀的值和不需要数字前缀的值(如auto)
79
+ var numericValues = options.filter(function (option) {
80
+ return option.value !== 'auto';
81
+ }).map(function (option) {
82
+ return option.value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
83
+ }).join('|');
84
+
85
+ // 构建正则表达式
86
+ var regex = new RegExp("^(\\d*(?:".concat(numericValues, ")|auto)$"));
87
+ var isValid = regex.test(value);
88
+ if (isValid || allowNull && (value === '' || value == null)) {
89
+ // 如果value符合要求,执行以下代码
90
+ if (onChange) onChange(convertInt ? parseInt(value) : value);
91
+ setVal(value);
92
+ }
42
93
  };
43
94
  var optionName = options[0].label;
44
95
  var menu = /*#__PURE__*/React.createElement(Menu, {
@@ -63,13 +114,17 @@ export default function (_ref) {
63
114
  className: styles['num-option']
64
115
  }, /*#__PURE__*/React.createElement(Dropdown, {
65
116
  overlay: menu,
66
- value: unit
117
+ value: unit,
118
+ disabled: options.length === 1,
119
+ getPopupContainer: function getPopupContainer() {
120
+ return document.getElementById('lc-design-workspace');
121
+ }
67
122
  }, /*#__PURE__*/React.createElement("span", null, optionName)))));
68
123
  }
69
124
 
70
125
  // 解析value,分离数字和单位
71
- var parseValue = function parseValue(value) {
72
- if (!value) {
126
+ var parseValue = function parseValue(value, options) {
127
+ if (value === null || typeof value === 'undefined' || value === '') {
73
128
  return {
74
129
  number: null,
75
130
  unit: null
@@ -82,7 +137,7 @@ var parseValue = function parseValue(value) {
82
137
  if (result) {
83
138
  return {
84
139
  number: result[1],
85
- unit: result[2] ? result[2] : null // 如果有非数字字符,则返回该字符,否则返回 null
140
+ unit: result[2] ? result[2] : options[0].value // 如果有非数字字符,则返回该字符,否则返回默认单位的第一项
86
141
  };
87
142
  } else {
88
143
  return {
@@ -1,8 +1,11 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
3
  import React, { useState, useEffect } from 'react';
4
+ import { useMemoizedFn, useCreation } from 'ahooks';
5
+ import { Tooltip, Icon } from 'luck-design/antd';
3
6
  import { startsWith } from 'lodash';
7
+ import classNames from 'classnames';
4
8
  import styles from "../style/panel-item.less";
5
- import { Icon } from 'luck-design/antd';
6
9
 
7
10
  /**
8
11
  * `PanelItem` 组件用于展示属性面板中的单个属性项。
@@ -30,34 +33,60 @@ import { Icon } from 'luck-design/antd';
30
33
  * @returns {React.Element} 渲染属性名称、对应的组件以及可选的额外内容。
31
34
  */
32
35
  export default function (_ref) {
33
- var label = _ref.label,
36
+ var field = _ref.field,
37
+ label = _ref.label,
38
+ desc = _ref.desc,
34
39
  _ref$collapsed = _ref.collapsed,
35
40
  collapsed = _ref$collapsed === void 0 ? true : _ref$collapsed,
36
41
  addon = _ref.addon,
42
+ suppressPadding = _ref.suppressPadding,
37
43
  children = _ref.children;
38
44
  var _useState = useState(collapsed),
39
45
  _useState2 = _slicedToArray(_useState, 2),
40
46
  curClps = _useState2[0],
41
47
  setCurClps = _useState2[1];
42
- var HandleClick = function HandleClick() {
48
+ var HandleClick = useMemoizedFn(function () {
49
+ if (!addon) return;
43
50
  setCurClps(!curClps);
44
- };
51
+ });
52
+ var tip = useCreation(function () {
53
+ var str = void 0;
54
+ if (field) {
55
+ str = "\u5C5E\u6027\uFF1A".concat(field);
56
+ }
57
+ if (desc) {
58
+ str += "".concat(str ? ' | ' : '', "\u8BF4\u660E\uFF1A").concat(desc);
59
+ }
60
+ return str;
61
+ }, [field, desc]);
45
62
  useEffect(function () {
46
63
  setCurClps(collapsed);
47
64
  }, [collapsed]);
48
65
  return /*#__PURE__*/React.createElement("div", {
49
- className: styles['lc-painter-components-panelitem']
66
+ className: classNames(styles['lc-painter-components-panelitem'], _defineProperty({}, styles['no-padding'], !!suppressPadding))
50
67
  }, /*#__PURE__*/React.createElement("div", {
51
68
  className: styles['panelrow']
52
- }, /*#__PURE__*/React.createElement("div", {
53
- className: styles['item-label']
69
+ }, label && !startsWith(label, '#') && /*#__PURE__*/React.createElement("div", {
70
+ className: "".concat(styles['item-label']).concat(addon ? ' panel-pointer' : ''),
71
+ onClick: HandleClick
54
72
  }, addon && /*#__PURE__*/React.createElement(Icon, {
55
73
  className: styles['item-icon'],
56
- type: !curClps ? 'down' : 'right',
57
- onClick: HandleClick
58
- }), label && !startsWith(label, '#') && /*#__PURE__*/React.createElement("span", null, label)), /*#__PURE__*/React.createElement("span", {
74
+ type: !curClps ? 'down' : 'right'
75
+ }), /*#__PURE__*/React.createElement(Tooltip, {
76
+ overlayStyle: {
77
+ fontSize: '12px'
78
+ },
79
+ title: tip,
80
+ getPopupContainer: function getPopupContainer() {
81
+ return document.getElementById('lc-design-workspace');
82
+ }
83
+ }, /*#__PURE__*/React.createElement("span", {
84
+ style: desc ? {
85
+ cursor: 'help'
86
+ } : null
87
+ }, label))), /*#__PURE__*/React.createElement("span", {
59
88
  className: styles['item-component']
60
- }, children)), !curClps && /*#__PURE__*/React.createElement("div", {
89
+ }, children)), !curClps && addon && /*#__PURE__*/React.createElement("div", {
61
90
  className: styles['addon']
62
91
  }, addon));
63
92
  }
@@ -15,6 +15,9 @@ import styles from "../style/pop-confirm.less";
15
15
  export default function (props) {
16
16
  return /*#__PURE__*/React.createElement(Popconfirm, _extends({
17
17
  overlayClassName: styles['lc-painter-panel-section-components-popconfirm'],
18
- icon: null
18
+ icon: null,
19
+ getPopupContainer: function getPopupContainer() {
20
+ return document.getElementById('lc-design-workspace');
21
+ }
19
22
  }, props));
20
23
  }
File without changes
@@ -3,8 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- var _excluded = ["onValueChange", "rules", "value"];
6
+ var _excluded = ["onValueChange", "rules", "value", "defaultValue"];
7
7
  import React, { forwardRef, useState, useEffect } from 'react';
8
+ import { useUpdateEffect } from 'ahooks';
8
9
  import { Input, Tooltip } from 'luck-design/antd';
9
10
  import classNames from 'classnames';
10
11
  import styles from "../style/rule-input.less";
@@ -44,8 +45,9 @@ export default /*#__PURE__*/forwardRef(function (_ref, ref) {
44
45
  var onValueChange = _ref.onValueChange,
45
46
  rules = _ref.rules,
46
47
  value = _ref.value,
48
+ defaultValue = _ref.defaultValue,
47
49
  rest = _objectWithoutProperties(_ref, _excluded);
48
- var _useState = useState(value),
50
+ var _useState = useState(value || defaultValue),
49
51
  _useState2 = _slicedToArray(_useState, 2),
50
52
  inputValue = _useState2[0],
51
53
  setInputValue = _useState2[1]; // 托管输入值的状态
@@ -55,7 +57,7 @@ export default /*#__PURE__*/forwardRef(function (_ref, ref) {
55
57
  setErr = _useState4[1];
56
58
 
57
59
  // 使用useEffect钩子监听value的变化
58
- useEffect(function () {
60
+ useUpdateEffect(function () {
59
61
  setInputValue(value);
60
62
  setErr(null);
61
63
  }, [value]);
File without changes
@@ -0,0 +1,147 @@
1
+ import React, { useRef } from 'react';
2
+ import { useMemoizedFn } from 'ahooks';
3
+ import { Tooltip, Icon, Input, Segmented, Select } from 'luck-design/antd';
4
+ import { cloneDeep, debounce } from 'lodash';
5
+ import PopConfirm from "../../components/PopConfirm";
6
+ import { PopForm, PopFormItem, PopFormItemLeft, PopFormItemRight } from "../../components/PopForm";
7
+ import JSEditor from "../../components/code-editor/JSEditor";
8
+ import FullScreenEditor from "../../components/code-editor/FullScreenEditor";
9
+ import { formatMessage } from '@luck-design-biz/base/utils';
10
+ import styles from "../../style/actions-editor.less";
11
+ var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.actionEditor';
12
+ var _SERIAL_EFFECT_OPTIONS_ = [{
13
+ label: formatMessage({
14
+ id: "".concat(_I18N_PREFIX_, ".hidden"),
15
+ label: '隐藏'
16
+ }),
17
+ value: 'hidden'
18
+ }, {
19
+ label: formatMessage({
20
+ id: "".concat(_I18N_PREFIX_, ".disable"),
21
+ label: '禁用'
22
+ }),
23
+ value: 'disable'
24
+ }];
25
+ var _RISK_LEVEL_OPTIONS_ = [{
26
+ label: formatMessage({
27
+ id: "".concat(_I18N_PREFIX_, ".default"),
28
+ label: '一般'
29
+ }),
30
+ value: 'default'
31
+ }, {
32
+ label: formatMessage({
33
+ id: "".concat(_I18N_PREFIX_, ".danger"),
34
+ label: '危险'
35
+ }),
36
+ value: 'danger'
37
+ }, {
38
+ label: formatMessage({
39
+ id: "".concat(_I18N_PREFIX_, ".destroy"),
40
+ label: '毁灭'
41
+ }),
42
+ value: 'destroy'
43
+ }];
44
+ var ActionEditor = function ActionEditor(_ref) {
45
+ var action = _ref.action,
46
+ onChange = _ref.onChange;
47
+ var editorRef = useRef();
48
+ var valueRef = useRef(cloneDeep(action));
49
+ var handleCodeChange = useRef(debounce(function (code) {
50
+ valueRef.current.actionCode = code;
51
+ onChange(valueRef.current);
52
+ }, 400));
53
+ var handleChange = useMemoizedFn(function (field, value) {
54
+ valueRef.current[field] = value;
55
+ onChange(valueRef.current);
56
+ });
57
+ var handOnEditorLoad = useMemoizedFn(function () {
58
+ editorRef.current.editor.setValue(action.actionCode);
59
+ });
60
+ return /*#__PURE__*/React.createElement(PopForm, null, /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
61
+ id: "".concat(_I18N_PREFIX_, ".name"),
62
+ label: '名称'
63
+ })), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
64
+ size: "small",
65
+ defaultValue: action.name,
66
+ onChange: function onChange(e) {
67
+ return handleChange('name', e.target.value);
68
+ },
69
+ placeholder: formatMessage({
70
+ id: "".concat(_I18N_PREFIX_, ".name.placeholder"),
71
+ label: '请输入行为名称'
72
+ })
73
+ }))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
74
+ id: "".concat(_I18N_PREFIX_, ".serial"),
75
+ label: '资源串'
76
+ })), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Input, {
77
+ size: "small",
78
+ defaultValue: action.serial,
79
+ onChange: function onChange(e) {
80
+ return handleChange('serial', e.target.value);
81
+ },
82
+ placeholder: formatMessage({
83
+ id: "".concat(_I18N_PREFIX_, ".serial.placeholder"),
84
+ label: '请输入行为名称'
85
+ })
86
+ }))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
87
+ id: "".concat(_I18N_PREFIX_, ".serialEffect"),
88
+ label: '越权效果'
89
+ })), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Segmented, {
90
+ size: "small",
91
+ options: _SERIAL_EFFECT_OPTIONS_,
92
+ value: action.serialEffect,
93
+ onChange: function onChange(value) {
94
+ return handleChange('serialEffect', value);
95
+ }
96
+ }))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
97
+ id: "".concat(_I18N_PREFIX_, ".serialEffect"),
98
+ label: '风险等级'
99
+ })), /*#__PURE__*/React.createElement(PopFormItemRight, null, /*#__PURE__*/React.createElement(Segmented, {
100
+ size: "small",
101
+ options: _RISK_LEVEL_OPTIONS_,
102
+ value: action.riskLevel,
103
+ onChange: function onChange(value) {
104
+ return handleChange('riskLevel', value);
105
+ }
106
+ }))), /*#__PURE__*/React.createElement(PopFormItem, null, /*#__PURE__*/React.createElement(PopFormItemLeft, null, formatMessage({
107
+ id: "".concat(_I18N_PREFIX_, ".actionPool"),
108
+ label: '行为池'
109
+ })), /*#__PURE__*/React.createElement(PopFormItemRight, {
110
+ style: {
111
+ position: 'relative'
112
+ }
113
+ }, /*#__PURE__*/React.createElement(Select, {
114
+ size: "small",
115
+ mode: "multiple",
116
+ className: styles['action-pool-selector'],
117
+ defaultValue: action.actionPool,
118
+ onChange: function onChange(value) {
119
+ return handleChange('actionPool', value);
120
+ }
121
+ }, /*#__PURE__*/React.createElement(Select.Option, {
122
+ value: "jack"
123
+ }, "Jack"), /*#__PURE__*/React.createElement(Select.Option, {
124
+ value: "lucy"
125
+ }, "Lucy"), /*#__PURE__*/React.createElement(Select.Option, {
126
+ value: "yiminghe"
127
+ }, "Yiminghe")), /*#__PURE__*/React.createElement(Tooltip, {
128
+ title: formatMessage({
129
+ id: 'luckda.lowcode.painter.coder',
130
+ label: '编码器'
131
+ })
132
+ }, /*#__PURE__*/React.createElement(PopConfirm, {
133
+ placement: "top",
134
+ title: /*#__PURE__*/React.createElement(FullScreenEditor, {
135
+ ref: editorRef,
136
+ EditorComponent: JSEditor,
137
+ width: "640px",
138
+ height: "300px",
139
+ onChange: handleCodeChange.current,
140
+ onLoad: handOnEditorLoad
141
+ })
142
+ }, /*#__PURE__*/React.createElement(Icon, {
143
+ type: "code",
144
+ className: styles['action-pool-coder']
145
+ }))))));
146
+ };
147
+ export default ActionEditor;