@luck-design-biz/luckda 0.0.22-4 → 0.0.23

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 (222) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -40
  3. package/es/components/Builder/index.js +1 -1
  4. package/es/components/LdFormList/index.js +4 -1
  5. package/es/components/LdGrid/index.js +4 -4
  6. package/es/components/LdGridForm/index.less +7 -7
  7. package/es/components/LdRuntimeCom/index.js +42 -0
  8. package/es/components/LdTree/index.less +36 -36
  9. package/es/helper/action.js +6 -6
  10. package/es/helper/form.js +14 -14
  11. package/es/helper/index.less +7 -7
  12. package/es/index.js +1 -0
  13. package/es/lowcode/constants/api-url.js +2 -0
  14. package/es/lowcode/constants/event-topics.js +23 -0
  15. package/es/lowcode/constants/index.js +12 -0
  16. package/es/lowcode/engine/factory/DataFactory.js +1 -0
  17. package/es/lowcode/engine/meta/button.props.default.json +8 -0
  18. package/es/lowcode/engine/meta/cardlist.props.default.json +10 -0
  19. package/es/lowcode/engine/meta/components/button.json +104 -0
  20. package/es/lowcode/engine/meta/components/card-list.json +143 -0
  21. package/es/lowcode/engine/meta/components/drawer.json +143 -0
  22. package/es/lowcode/engine/meta/components/form.json +116 -0
  23. package/es/lowcode/engine/meta/components/iframe.json +31 -0
  24. package/es/lowcode/engine/meta/components/image.json +113 -0
  25. package/es/lowcode/engine/meta/components/imex.json +81 -0
  26. package/es/lowcode/engine/meta/components/jsx.json +24 -0
  27. package/es/lowcode/engine/meta/components/layout.json +107 -0
  28. package/es/lowcode/engine/meta/components/link.json +111 -0
  29. package/es/lowcode/engine/meta/components/modal.json +120 -0
  30. package/es/lowcode/engine/meta/components/section.json +107 -0
  31. package/es/lowcode/engine/meta/components/split.json +71 -0
  32. package/es/lowcode/engine/meta/components/table.json +161 -0
  33. package/es/lowcode/engine/meta/components/tabs.json +140 -0
  34. package/es/lowcode/engine/meta/components/text.json +65 -0
  35. package/es/lowcode/engine/meta/components/tree.json +156 -0
  36. package/es/lowcode/engine/meta/components-list.json +122 -0
  37. package/es/lowcode/engine/meta/drawer.props.default.json +10 -0
  38. package/es/lowcode/engine/meta/form.props.default.json +5 -0
  39. package/es/lowcode/engine/meta/iframe.props.default.json +3 -0
  40. package/es/lowcode/engine/meta/image.props.default.json +8 -0
  41. package/es/lowcode/engine/meta/imex.props.default.json +4 -0
  42. package/es/lowcode/engine/meta/jsx.props.default.json +1 -0
  43. package/es/lowcode/engine/meta/layout.props.default.json +5 -0
  44. package/es/lowcode/engine/meta/link.props.default.json +6 -0
  45. package/es/lowcode/engine/meta/modal.props.default.json +11 -0
  46. package/es/lowcode/engine/meta/section.props.default.json +9 -0
  47. package/es/lowcode/engine/meta/split.props.default.json +5 -0
  48. package/es/lowcode/engine/meta/table.props.default.json +10 -0
  49. package/es/lowcode/engine/meta/tabs.props.default.json +10 -0
  50. package/es/lowcode/engine/meta/text.props.default.json +4 -0
  51. package/es/lowcode/engine/meta/tree.props.default.json +9 -0
  52. package/es/lowcode/engine/provider/ContextProvider.js +164 -0
  53. package/es/lowcode/engine/provider/EventBusProvider.js +120 -0
  54. package/es/lowcode/engine/tools/dataProcess.js +188 -0
  55. package/es/lowcode/engine/tools/helper.js +4 -0
  56. package/es/lowcode/engine/tools/lcid.js +16 -0
  57. package/es/lowcode/index.js +3 -0
  58. package/es/lowcode/painter/Components.js +104 -0
  59. package/es/lowcode/painter/Design.js +97 -0
  60. package/es/lowcode/painter/I18n.js +5 -0
  61. package/es/lowcode/painter/Outline.js +202 -0
  62. package/es/lowcode/painter/Panel.js +8 -0
  63. package/es/lowcode/painter/Ribbon.js +136 -0
  64. package/es/lowcode/painter/components/PanelItem.js +20 -0
  65. package/es/lowcode/painter/components/RuleInput.js +105 -0
  66. package/es/lowcode/painter/index.js +19 -0
  67. package/es/lowcode/painter/panel-section/LayoutRatio.js +123 -0
  68. package/es/lowcode/painter/panel-section/Radio.js +58 -0
  69. package/es/lowcode/painter/style/components.less +90 -0
  70. package/es/lowcode/painter/style/design.less +38 -0
  71. package/es/lowcode/painter/style/index.less +7 -0
  72. package/es/lowcode/painter/style/layout-ratio.less +51 -0
  73. package/es/lowcode/painter/style/outline.less +26 -0
  74. package/es/lowcode/painter/style/panel-item.less +21 -0
  75. package/es/lowcode/painter/style/panel.less +5 -0
  76. package/es/lowcode/painter/style/radio.less +24 -0
  77. package/es/lowcode/painter/style/ribbon.less +4 -0
  78. package/es/lowcode/painter/style/rule-input.less +13 -0
  79. package/es/lowcode/view/Canvas.js +135 -0
  80. package/es/lowcode/view/Loading.js +23 -0
  81. package/es/lowcode/view/Page.js +55 -0
  82. package/es/lowcode/view/index.js +18 -0
  83. package/es/lowcode/view/lc-components/Box/index.js +21 -0
  84. package/es/lowcode/view/lc-components/Button/index.js +37 -0
  85. package/es/lowcode/view/lc-components/CardList/index.js +20 -0
  86. package/es/lowcode/view/lc-components/Dialog/index.js +50 -0
  87. package/es/lowcode/view/lc-components/Dialog/index.less +3 -0
  88. package/es/lowcode/view/lc-components/Drawer/index.js +46 -0
  89. package/es/lowcode/view/lc-components/Form/index.js +20 -0
  90. package/es/lowcode/view/lc-components/Iframe/index.js +20 -0
  91. package/es/lowcode/view/lc-components/ImEx/index.js +20 -0
  92. package/es/lowcode/view/lc-components/Image/index.js +20 -0
  93. package/es/lowcode/view/lc-components/JSX/index.js +20 -0
  94. package/es/lowcode/view/lc-components/Layout/index.js +24 -0
  95. package/es/lowcode/view/lc-components/Link/index.js +20 -0
  96. package/es/lowcode/view/lc-components/Section/index.js +34 -0
  97. package/es/lowcode/view/lc-components/Split/index.js +21 -0
  98. package/es/lowcode/view/lc-components/Table/index.js +23 -0
  99. package/es/lowcode/view/lc-components/Tabs/index.js +21 -0
  100. package/es/lowcode/view/lc-components/Text/index.js +23 -0
  101. package/es/lowcode/view/lc-components/Tree/index.js +20 -0
  102. package/es/lowcode/view/lc-components/Wrapper.js +45 -0
  103. package/es/lowcode/view/style/canvas.less +5 -0
  104. package/es/lowcode/view/style/loading.less +84 -0
  105. package/es/lowcode/view/style/page.less +6 -0
  106. package/es/upload/Form/gridForm.js +1 -1
  107. package/es/upload/Form/index.less +7 -7
  108. package/es/upload/FormItem/index.js +15 -15
  109. package/es/utils/form.js +22 -22
  110. package/es/utils/grid.js +2 -2
  111. package/lib/components/Builder/index.js +1 -1
  112. package/lib/components/LdFormList/index.js +5 -1
  113. package/lib/components/LdGrid/index.js +4 -4
  114. package/lib/components/LdGridForm/index.less +7 -7
  115. package/lib/components/LdRuntimeCom/index.js +49 -0
  116. package/lib/components/LdTree/index.less +36 -36
  117. package/lib/helper/action.js +6 -6
  118. package/lib/helper/form.js +14 -14
  119. package/lib/helper/index.less +7 -7
  120. package/lib/index.js +9 -1
  121. package/lib/lowcode/constants/api-url.js +8 -0
  122. package/lib/lowcode/constants/event-topics.js +29 -0
  123. package/lib/lowcode/constants/index.js +18 -0
  124. package/lib/lowcode/engine/factory/DataFactory.js +3 -0
  125. package/lib/lowcode/engine/meta/button.props.default.json +8 -0
  126. package/lib/lowcode/engine/meta/cardlist.props.default.json +10 -0
  127. package/lib/lowcode/engine/meta/components/button.json +104 -0
  128. package/lib/lowcode/engine/meta/components/card-list.json +143 -0
  129. package/lib/lowcode/engine/meta/components/drawer.json +143 -0
  130. package/lib/lowcode/engine/meta/components/form.json +116 -0
  131. package/lib/lowcode/engine/meta/components/iframe.json +31 -0
  132. package/lib/lowcode/engine/meta/components/image.json +113 -0
  133. package/lib/lowcode/engine/meta/components/imex.json +81 -0
  134. package/lib/lowcode/engine/meta/components/jsx.json +24 -0
  135. package/lib/lowcode/engine/meta/components/layout.json +107 -0
  136. package/lib/lowcode/engine/meta/components/link.json +111 -0
  137. package/lib/lowcode/engine/meta/components/modal.json +120 -0
  138. package/lib/lowcode/engine/meta/components/section.json +107 -0
  139. package/lib/lowcode/engine/meta/components/split.json +71 -0
  140. package/lib/lowcode/engine/meta/components/table.json +161 -0
  141. package/lib/lowcode/engine/meta/components/tabs.json +140 -0
  142. package/lib/lowcode/engine/meta/components/text.json +65 -0
  143. package/lib/lowcode/engine/meta/components/tree.json +156 -0
  144. package/lib/lowcode/engine/meta/components-list.json +122 -0
  145. package/lib/lowcode/engine/meta/drawer.props.default.json +10 -0
  146. package/lib/lowcode/engine/meta/form.props.default.json +5 -0
  147. package/lib/lowcode/engine/meta/iframe.props.default.json +3 -0
  148. package/lib/lowcode/engine/meta/image.props.default.json +8 -0
  149. package/lib/lowcode/engine/meta/imex.props.default.json +4 -0
  150. package/lib/lowcode/engine/meta/jsx.props.default.json +1 -0
  151. package/lib/lowcode/engine/meta/layout.props.default.json +5 -0
  152. package/lib/lowcode/engine/meta/link.props.default.json +6 -0
  153. package/lib/lowcode/engine/meta/modal.props.default.json +11 -0
  154. package/lib/lowcode/engine/meta/section.props.default.json +9 -0
  155. package/lib/lowcode/engine/meta/split.props.default.json +5 -0
  156. package/lib/lowcode/engine/meta/table.props.default.json +10 -0
  157. package/lib/lowcode/engine/meta/tabs.props.default.json +10 -0
  158. package/lib/lowcode/engine/meta/text.props.default.json +4 -0
  159. package/lib/lowcode/engine/meta/tree.props.default.json +9 -0
  160. package/lib/lowcode/engine/provider/ContextProvider.js +172 -0
  161. package/lib/lowcode/engine/provider/EventBusProvider.js +128 -0
  162. package/lib/lowcode/engine/tools/dataProcess.js +201 -0
  163. package/lib/lowcode/engine/tools/helper.js +11 -0
  164. package/lib/lowcode/engine/tools/lcid.js +22 -0
  165. package/lib/lowcode/index.js +20 -0
  166. package/lib/lowcode/painter/Components.js +112 -0
  167. package/lib/lowcode/painter/Design.js +105 -0
  168. package/lib/lowcode/painter/I18n.js +12 -0
  169. package/lib/lowcode/painter/Outline.js +210 -0
  170. package/lib/lowcode/painter/Panel.js +16 -0
  171. package/lib/lowcode/painter/Ribbon.js +151 -0
  172. package/lib/lowcode/painter/components/PanelItem.js +26 -0
  173. package/lib/lowcode/painter/components/RuleInput.js +112 -0
  174. package/lib/lowcode/painter/index.js +26 -0
  175. package/lib/lowcode/painter/panel-section/LayoutRatio.js +131 -0
  176. package/lib/lowcode/painter/panel-section/Radio.js +65 -0
  177. package/lib/lowcode/painter/style/components.less +90 -0
  178. package/lib/lowcode/painter/style/design.less +38 -0
  179. package/lib/lowcode/painter/style/index.less +7 -0
  180. package/lib/lowcode/painter/style/layout-ratio.less +51 -0
  181. package/lib/lowcode/painter/style/outline.less +26 -0
  182. package/lib/lowcode/painter/style/panel-item.less +21 -0
  183. package/lib/lowcode/painter/style/panel.less +5 -0
  184. package/lib/lowcode/painter/style/radio.less +24 -0
  185. package/lib/lowcode/painter/style/ribbon.less +4 -0
  186. package/lib/lowcode/painter/style/rule-input.less +13 -0
  187. package/lib/lowcode/view/Canvas.js +150 -0
  188. package/lib/lowcode/view/Loading.js +30 -0
  189. package/lib/lowcode/view/Page.js +63 -0
  190. package/lib/lowcode/view/index.js +25 -0
  191. package/lib/lowcode/view/lc-components/Box/index.js +29 -0
  192. package/lib/lowcode/view/lc-components/Button/index.js +45 -0
  193. package/lib/lowcode/view/lc-components/CardList/index.js +28 -0
  194. package/lib/lowcode/view/lc-components/Dialog/index.js +58 -0
  195. package/lib/lowcode/view/lc-components/Dialog/index.less +3 -0
  196. package/lib/lowcode/view/lc-components/Drawer/index.js +54 -0
  197. package/lib/lowcode/view/lc-components/Form/index.js +28 -0
  198. package/lib/lowcode/view/lc-components/Iframe/index.js +28 -0
  199. package/lib/lowcode/view/lc-components/ImEx/index.js +28 -0
  200. package/lib/lowcode/view/lc-components/Image/index.js +28 -0
  201. package/lib/lowcode/view/lc-components/JSX/index.js +28 -0
  202. package/lib/lowcode/view/lc-components/Layout/index.js +32 -0
  203. package/lib/lowcode/view/lc-components/Link/index.js +28 -0
  204. package/lib/lowcode/view/lc-components/Section/index.js +42 -0
  205. package/lib/lowcode/view/lc-components/Split/index.js +29 -0
  206. package/lib/lowcode/view/lc-components/Table/index.js +31 -0
  207. package/lib/lowcode/view/lc-components/Tabs/index.js +29 -0
  208. package/lib/lowcode/view/lc-components/Text/index.js +31 -0
  209. package/lib/lowcode/view/lc-components/Tree/index.js +28 -0
  210. package/lib/lowcode/view/lc-components/Wrapper.js +52 -0
  211. package/lib/lowcode/view/style/canvas.less +5 -0
  212. package/lib/lowcode/view/style/loading.less +84 -0
  213. package/lib/lowcode/view/style/page.less +6 -0
  214. package/lib/upload/Form/gridForm.js +1 -1
  215. package/lib/upload/Form/index.less +7 -7
  216. package/lib/upload/FormItem/index.js +15 -15
  217. package/lib/utils/form.js +22 -22
  218. package/lib/utils/grid.js +2 -2
  219. package/lowcode.js +1 -0
  220. package/package.json +157 -151
  221. package/upload.js +1 -1
  222. package/utils.js +1 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 UmiJS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 UmiJS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,40 +1,40 @@
1
- # 微服务 3.0 纯净版
2
-
3
- luck-react-pure 是一个基于 qiankun 框架搭建的极简微服务框架,作为微服务业务子系统的开发基座。旨在为业务子系统提供简单、轻量的解决方案。该框架去除了冗余的功能,专注于提供基本的功能支持,使开发者能够更快速地搭建和开发业务子系统。
4
-
5
- ## 启动
6
-
7
- 安装 `node_modules`:
8
-
9
- ```bash
10
- pnpm install
11
- ```
12
-
13
- ## 开始项目
14
-
15
- ```bash
16
- pnpm start
17
- ```
18
-
19
- ## 代码校验
20
-
21
- 本框架提供了代码校验方案,校验不通过禁止提交代码,当提交代码时将会校验以下内容:
22
-
23
- ### 代码规范
24
-
25
- 根据 eslint 校验规范。
26
-
27
- ### commit message 校验
28
-
29
- commit message 格式:
30
-
31
- ```bash
32
- 💥 feat(模块): 添加了个很棒的功能
33
- 🐛 fix(模块): 修复了一些 bug
34
- 📝 docs(模块): 更新了一下文档
35
- 💄 UI(模块): 修改了一下样式
36
- 🎨 chore(模块): 对脚手架做了些更改
37
- 🚨 refactor(模块): 重构(即不是新增功能,也不是修改bug的代码变动)
38
- 🐞 test(模块): 增加、修改测试用例
39
- 🌟 release(3.0.1):url
40
- ```
1
+ # 微服务 3.0 纯净版
2
+
3
+ luck-react-pure 是一个基于 qiankun 框架搭建的极简微服务框架,作为微服务业务子系统的开发基座。旨在为业务子系统提供简单、轻量的解决方案。该框架去除了冗余的功能,专注于提供基本的功能支持,使开发者能够更快速地搭建和开发业务子系统。
4
+
5
+ ## 启动
6
+
7
+ 安装 `node_modules`:
8
+
9
+ ```bash
10
+ pnpm install
11
+ ```
12
+
13
+ ## 开始项目
14
+
15
+ ```bash
16
+ pnpm start
17
+ ```
18
+
19
+ ## 代码校验
20
+
21
+ 本框架提供了代码校验方案,校验不通过禁止提交代码,当提交代码时将会校验以下内容:
22
+
23
+ ### 代码规范
24
+
25
+ 根据 eslint 校验规范。
26
+
27
+ ### commit message 校验
28
+
29
+ commit message 格式:
30
+
31
+ ```bash
32
+ 💥 feat(模块): 添加了个很棒的功能
33
+ 🐛 fix(模块): 修复了一些 bug
34
+ 📝 docs(模块): 更新了一下文档
35
+ 💄 UI(模块): 修改了一下样式
36
+ 🎨 chore(模块): 对脚手架做了些更改
37
+ 🚨 refactor(模块): 重构(即不是新增功能,也不是修改bug的代码变动)
38
+ 🐞 test(模块): 增加、修改测试用例
39
+ 🌟 release(3.0.1):url
40
+ ```
@@ -92,7 +92,7 @@ var builder = function builder(WrappedComponent, moduleCode) {
92
92
  var _props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
93
93
  fieldProps.current = _objectSpread(_objectSpread({}, fieldProps.current), _props);
94
94
  };
95
- if (loading) return 'loading...';
95
+ if (loading) return null;
96
96
  if (!moduleData) return formatMessage({
97
97
  id: 'luckda.module.loadFailed',
98
98
  label: '模块信息加载失败'
@@ -14,6 +14,7 @@ import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, u
14
14
  import { connect, getDvaApp, useRouteMatch, useModel } from 'umi';
15
15
  import PropTypes from 'prop-types';
16
16
  import { useCreation, useMemoizedFn, useAsyncEffect } from 'ahooks';
17
+ import { createDeepCompareEffect } from 'ahooks/es/createDeepCompareEffect';
17
18
  import { BasicDivider } from 'luck-design';
18
19
  import { ChildrenUtil } from '@luck-design-biz/base/utils';
19
20
  import { FormList, FormListAffix, FormBtn } from '@luck-design-biz/base/FormList';
@@ -28,6 +29,7 @@ import { isArray, sortBy, mapValues } from 'lodash';
28
29
  import { BpmButton } from '@luck-design-biz/bpm';
29
30
  import { readBehaviorCall } from "../../services";
30
31
  import { parse, stringify } from 'querystring';
32
+ var useDeepCompareAsyncEffect = createDeepCompareEffect(useAsyncEffect);
31
33
 
32
34
  // 组件
33
35
  var LdFormList = function LdFormList(_ref) {
@@ -124,7 +126,7 @@ var LdFormList = function LdFormList(_ref) {
124
126
  placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ? 'topRight' : 'bottomRight'
125
127
  }, bpmButtonProps)));
126
128
  };
127
- useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
129
+ useDeepCompareAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
128
130
  var _props$formData$mainF, _params, response, _yield$readBehaviorCa, code, data, _props$formData$mainF2, _props$formData$mainF3, bpmInfoObj, tempObj;
129
131
  return _regeneratorRuntime().wrap(function _callee$(_context) {
130
132
  while (1) switch (_context.prev = _context.next) {
@@ -150,6 +152,7 @@ var LdFormList = function LdFormList(_ref) {
150
152
  }
151
153
  _context.next = 8;
152
154
  return readBehaviorCall(_objectSpread(_objectSpread({}, _params), {}, {
155
+ // bizKey: bizData.bizKey,
153
156
  behaviorKey: 'readBpm'
154
157
  }));
155
158
  case 8:
@@ -81,10 +81,10 @@ var LdGrid = function LdGrid(_ref) {
81
81
  });
82
82
  }, [batchOperations]);
83
83
 
84
- /**
85
- * 优先级
86
- * columnsReset 重置columns,不受模块管理限制,写什么展示什么
87
- * columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
84
+ /**
85
+ * 优先级
86
+ * columnsReset 重置columns,不受模块管理限制,写什么展示什么
87
+ * columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
88
88
  */
89
89
  var _columns = useCreation(function () {
90
90
  if (columnsReset) return columnsReset;
@@ -1,7 +1,7 @@
1
- .ldGridForm {
2
- :global {
3
- .ag-layout-auto-height {
4
- height: 100% !important;
5
- }
6
- }
7
- }
1
+ .ldGridForm {
2
+ :global {
3
+ .ag-layout-auto-height {
4
+ height: 100% !important;
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,42 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useEffect, useState } from 'react';
3
+ import * as Babel from '@babel/standalone';
4
+ import * as LuckAntd from 'luck-design/antd';
5
+ import * as LuckDesign from 'luck-design';
6
+
7
+ /**
8
+ * 实时代码渲染组件
9
+ * todo:沙箱上下文的集成
10
+ * todo:Loading效果的优化
11
+ */
12
+ var LdRuntimeCom = function LdRuntimeCom(_ref) {
13
+ var children = _ref.children;
14
+ var _useState = useState(null),
15
+ _useState2 = _slicedToArray(_useState, 2),
16
+ Component = _useState2[0],
17
+ setComponent = _useState2[1];
18
+ var code = React.Children.toArray(children).join('').trim();
19
+ useEffect(function () {
20
+ if (code) {
21
+ // 使用Babel转换代码
22
+ var transformedCode = Babel.transform(code, {
23
+ presets: ['react']
24
+ }).code;
25
+
26
+ // 输出编译后的代码用于排错
27
+ console.log('transformedCode', transformedCode);
28
+
29
+ // 自动
30
+ var functionNameMatch = transformedCode.match(/function\s+([^\s(]+)/);
31
+ if (functionNameMatch && functionNameMatch.length > 1) {
32
+ var functionName = functionNameMatch[1];
33
+ var execute = new Function('React', 'LuckAntd', 'LuckDesign', "".concat(transformedCode, "; return ").concat(functionName, ";"));
34
+ // 设置组件状态
35
+ var ReactComponent = execute(React, LuckAntd, LuckDesign);
36
+ setComponent( /*#__PURE__*/React.createElement(ReactComponent, null));
37
+ }
38
+ }
39
+ }, [code]);
40
+ return Component ? Component : /*#__PURE__*/React.createElement("div", null, "Loading...");
41
+ };
42
+ export default LdRuntimeCom;
@@ -1,36 +1,36 @@
1
- .tree {
2
- .nodeTitle {
3
- display: flex;
4
- align-items: center;
5
- width: 100%;
6
-
7
- div {
8
- flex: 1;
9
- overflow-x: hidden;
10
- white-space: nowrap;
11
- text-overflow: ellipsis;
12
- }
13
- div.nodeTitleDisabled {
14
- color: var(--luck-text-color-disabled);
15
- }
16
- div.nodeTitleDisabled:hover {
17
- cursor: not-allowed;
18
- }
19
- }
20
-
21
- :global {
22
- .ant-tree-title {
23
- width: 100%;
24
- }
25
- }
26
- }
27
- .classTreeOperates {
28
- :global(.ant-popover-inner-content) {
29
- padding: 0;
30
- }
31
- .rightMenu {
32
- display: block;
33
- padding: 4px 8px;
34
- color: var(--luck-text-color-);
35
- }
36
- }
1
+ .tree {
2
+ .nodeTitle {
3
+ display: flex;
4
+ align-items: center;
5
+ width: 100%;
6
+
7
+ div {
8
+ flex: 1;
9
+ overflow-x: hidden;
10
+ white-space: nowrap;
11
+ text-overflow: ellipsis;
12
+ }
13
+ div.nodeTitleDisabled {
14
+ color: var(--luck-text-color-disabled);
15
+ }
16
+ div.nodeTitleDisabled:hover {
17
+ cursor: not-allowed;
18
+ }
19
+ }
20
+
21
+ :global {
22
+ .ant-tree-title {
23
+ width: 100%;
24
+ }
25
+ }
26
+ }
27
+ .classTreeOperates {
28
+ :global(.ant-popover-inner-content) {
29
+ padding: 0;
30
+ }
31
+ .rightMenu {
32
+ display: block;
33
+ padding: 4px 8px;
34
+ color: var(--luck-text-color-);
35
+ }
36
+ }
@@ -7,12 +7,12 @@ import { transform, isArray, startsWith, keyBy } from 'lodash';
7
7
  import { dataFormat, behaviorCall } from "../utils";
8
8
  import { defaultComName } from "./form";
9
9
 
10
- /**
11
- * 提交行为
12
- * @param action 行为
13
- * @param data 数据
14
- * @param parmas 附件设置
15
- * @param moduleData 当前模块信息
10
+ /**
11
+ * 提交行为
12
+ * @param action 行为
13
+ * @param data 数据
14
+ * @param parmas 附件设置
15
+ * @param moduleData 当前模块信息
16
16
  */
17
17
  export var doAction = function doAction(action) {
18
18
  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
package/es/helper/form.js CHANGED
@@ -25,11 +25,11 @@ export var defaultComName = {
25
25
  file: 'upload'
26
26
  };
27
27
 
28
- /**
29
- * 动态表单配置项转译
30
- * @param {key string} keyStr
31
- * @param {label string} labelStr
32
- * @returns [{key,label}]
28
+ /**
29
+ * 动态表单配置项转译
30
+ * @param {key string} keyStr
31
+ * @param {label string} labelStr
32
+ * @returns [{key,label}]
33
33
  */
34
34
  export var splitStrToObj = function splitStrToObj(keyStr, labelStr) {
35
35
  var keys = keyStr && keyStr.length > 0 ? keyStr.split(',') : undefined;
@@ -46,11 +46,11 @@ export var splitStrToObj = function splitStrToObj(keyStr, labelStr) {
46
46
  return undefined;
47
47
  };
48
48
 
49
- /**
50
- * 动态表单配置项转译
51
- * @param {动态表单配置项} props
52
- * @param {自定义动态表单配置项} customProps
53
- * @returns {name: '',...}
49
+ /**
50
+ * 动态表单配置项转译
51
+ * @param {动态表单配置项} props
52
+ * @param {自定义动态表单配置项} customProps
53
+ * @returns {name: '',...}
54
54
  */
55
55
  export function translator() {
56
56
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
@@ -90,10 +90,10 @@ export function translator() {
90
90
  return _props;
91
91
  }
92
92
 
93
- /**
94
- * 删除自动移操作中的不可覆盖字段
95
- * @param props
96
- * @returns {{multiple}|*}
93
+ /**
94
+ * 删除自动移操作中的不可覆盖字段
95
+ * @param props
96
+ * @returns {{multiple}|*}
97
97
  */
98
98
  export function formatCustomProps(props) {
99
99
  var _props$confiig;
@@ -1,7 +1,7 @@
1
- .ldLabs{
2
- :global{
3
- .ant-tabs-bar{
4
- margin: 0 0 4px 0;
5
- }
6
- }
7
- }
1
+ .ldLabs{
2
+ :global{
3
+ .ant-tabs-bar{
4
+ margin: 0 0 4px 0;
5
+ }
6
+ }
7
+ }
package/es/index.js CHANGED
@@ -6,4 +6,5 @@ export { default as buildLdAutoForm } from "./components/LdAutoForm";
6
6
  export { default as buildLdGridForm } from "./components/LdGridForm";
7
7
  export { default as LdInfoPanel } from "./components/LdInfoPanel";
8
8
  export { default as LdCard } from "./components/LdCard";
9
+ export { default as LdRuntimeCom } from "./components/LdRuntimeCom";
9
10
  export * from "./components/LdCom";
@@ -0,0 +1,2 @@
1
+ // icon地址
2
+ export var ICON = '/public/icons/iconfont.json';
@@ -0,0 +1,23 @@
1
+ /******************************** 通用Topic开始 ********************************/
2
+
3
+ // 组件的加载完成事件
4
+ export var COMPONENT_MOUNT = 'component-mount';
5
+ // 组件的卸载事件
6
+ export var COMPONENT_UNMOUNT = 'component-unmount';
7
+
8
+ /******************************** 通用Topic结束 ********************************/
9
+
10
+ /******************************* Design Topic开始 *******************************/
11
+
12
+ // 组件的hover事件
13
+ export var COMPONENT_HOVER = 'component-hover';
14
+ // 组件的激活事件
15
+ export var COMPONENT_ACTIVE = 'component-active';
16
+ // 组件设置的click事件
17
+ export var COMPONENT_SETTING_CLICK = 'component-setting-click';
18
+
19
+ /******************************* Design Topic结束 *******************************/
20
+
21
+ /******************************** Live Topic开始 ********************************/
22
+
23
+ /******************************** Live Topic结束 ********************************/
@@ -0,0 +1,12 @@
1
+ export var RUNTIME = {
2
+ LIVE: 'live',
3
+ DESIGN: 'design',
4
+ PREVIEW: 'preview'
5
+ };
6
+ export var CELL_CLASS_NAME = 'ld-lc-cell';
7
+ export var CELL_KEY = {
8
+ PAGE_ROOT: 'page_root',
9
+ PAGE_HEADER: 'page_header',
10
+ PAGE_CONTENT: 'page_content',
11
+ PAGE_FOOTER: 'page_footer'
12
+ };
@@ -0,0 +1,8 @@
1
+ {
2
+ "title": "按钮",
3
+ "type": {
4
+ "key": "primary"
5
+ },
6
+ "size": "middle",
7
+ "effect": "hidden"
8
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "autoLoad": true,
3
+ "readOnly": false,
4
+ "isFlow": false,
5
+ "defaultPageSize": 30,
6
+ "actionTitle": "操作列",
7
+ "actionWidth": 100,
8
+ "actionHidden": false,
9
+ "maxWebShownActionCount": 2
10
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "component": "Button",
3
+ "name": "按钮",
4
+ "desc": "用于触发特定的操作或动作,以便用户可以轻松地创建具有自定义样式和行为的界面。",
5
+ "icon": "icon-button",
6
+ "group": "basic",
7
+ "groupName": "基础",
8
+ "props": [
9
+ {
10
+ "key": "id",
11
+ "desc": "唯一标识",
12
+ "type": "string",
13
+ "disabled": true
14
+ },
15
+ {
16
+ "key": "title",
17
+ "name": "标题",
18
+ "desc": "按钮上显示的文字",
19
+ "type": "string",
20
+ "default": "按钮"
21
+ },
22
+ {
23
+ "key": "type",
24
+ "desc": "按钮类型",
25
+ "type": "_ButtonType",
26
+ "default": {
27
+ "key": "primary"
28
+ }
29
+ },
30
+ {
31
+ "key": "size",
32
+ "name": "按钮",
33
+ "desc": "按钮的大小尺寸",
34
+ "type": "radio",
35
+ "options": [
36
+ {
37
+ "label": "小",
38
+ "value": "small"
39
+ },
40
+ {
41
+ "label": "中",
42
+ "value": "middle"
43
+ },
44
+ {
45
+ "label": "大",
46
+ "value": "large"
47
+ }
48
+ ],
49
+ "default": "middle"
50
+ },
51
+ {
52
+ "key": "icon",
53
+ "name": "图标",
54
+ "desc": "按钮标题前的图标",
55
+ "type": "Icon"
56
+ },
57
+ {
58
+ "key": "serials",
59
+ "name": "资源串",
60
+ "desc": "挂接模块资源串",
61
+ "type": "string"
62
+ },
63
+ {
64
+ "key": "effect",
65
+ "name": "资源串效果",
66
+ "desc": "当资源串条件生效时按钮的效果",
67
+ "type": "radio",
68
+ "options": [
69
+ {
70
+ "label": "禁用",
71
+ "value": "disable"
72
+ },
73
+ {
74
+ "label": "隐藏",
75
+ "value": "hidden"
76
+ }
77
+ ],
78
+ "default": "hidden"
79
+ }
80
+ ],
81
+ "style": {},
82
+ "advance": {
83
+ "events": [
84
+ {
85
+ "key": "onMount",
86
+ "name": "组件首次渲染时",
87
+ "desc": "在组件首次渲染时,执行方法",
88
+ "func": "(params)=>{\n\t\n}"
89
+ },
90
+ {
91
+ "key": "onUnmount",
92
+ "name": "组件卸载时",
93
+ "desc": "在组件卸载时,执行方法。",
94
+ "func": "(params)=>{\n\t\n}"
95
+ },
96
+ {
97
+ "key": "onClick",
98
+ "name": "点击事件",
99
+ "desc": "点击文本时,执行方法",
100
+ "func": "(e)=>{\n\t\n}"
101
+ }
102
+ ]
103
+ }
104
+ }