@luck-design-biz/luckda 0.0.22 → 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 (251) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -49
  3. package/es/components/Builder/index.js +4 -4
  4. package/es/components/LdAutoForm/index.js +7 -9
  5. package/es/components/LdCard/index.js +5 -6
  6. package/es/components/LdCard/model.js +1 -1
  7. package/es/components/LdCom/index.js +2 -2
  8. package/es/components/LdFormList/index.js +19 -17
  9. package/es/components/LdGrid/index.js +11 -12
  10. package/es/components/LdGrid/model.js +1 -1
  11. package/es/components/LdGridForm/index.js +10 -10
  12. package/es/components/LdGridForm/index.less +7 -7
  13. package/es/components/LdInfoPanel/index.js +2 -2
  14. package/es/components/LdRuntimeCom/index.js +42 -0
  15. package/es/components/LdTree/index.js +3 -4
  16. package/es/components/LdTree/index.less +36 -36
  17. package/es/helper/FromItems.js +1 -1
  18. package/es/helper/action.js +8 -8
  19. package/es/helper/form.js +16 -16
  20. package/es/helper/index.less +7 -7
  21. package/es/helper/ldBuilder.js +1 -1
  22. package/es/helper/ldComBuild.js +4 -4
  23. package/es/index.js +10 -9
  24. package/es/lowcode/constants/api-url.js +2 -0
  25. package/es/lowcode/constants/event-topics.js +23 -0
  26. package/es/lowcode/constants/index.js +12 -0
  27. package/es/lowcode/engine/factory/DataFactory.js +1 -0
  28. package/es/lowcode/engine/meta/button.props.default.json +8 -0
  29. package/es/lowcode/engine/meta/cardlist.props.default.json +10 -0
  30. package/es/lowcode/engine/meta/components/button.json +104 -0
  31. package/es/lowcode/engine/meta/components/card-list.json +143 -0
  32. package/es/lowcode/engine/meta/components/drawer.json +143 -0
  33. package/es/lowcode/engine/meta/components/form.json +116 -0
  34. package/es/lowcode/engine/meta/components/iframe.json +31 -0
  35. package/es/lowcode/engine/meta/components/image.json +113 -0
  36. package/es/lowcode/engine/meta/components/imex.json +81 -0
  37. package/es/lowcode/engine/meta/components/jsx.json +24 -0
  38. package/es/lowcode/engine/meta/components/layout.json +107 -0
  39. package/es/lowcode/engine/meta/components/link.json +111 -0
  40. package/es/lowcode/engine/meta/components/modal.json +120 -0
  41. package/es/lowcode/engine/meta/components/section.json +107 -0
  42. package/es/lowcode/engine/meta/components/split.json +71 -0
  43. package/es/lowcode/engine/meta/components/table.json +161 -0
  44. package/es/lowcode/engine/meta/components/tabs.json +140 -0
  45. package/es/lowcode/engine/meta/components/text.json +65 -0
  46. package/es/lowcode/engine/meta/components/tree.json +156 -0
  47. package/es/lowcode/engine/meta/components-list.json +122 -0
  48. package/es/lowcode/engine/meta/drawer.props.default.json +10 -0
  49. package/es/lowcode/engine/meta/form.props.default.json +5 -0
  50. package/es/lowcode/engine/meta/iframe.props.default.json +3 -0
  51. package/es/lowcode/engine/meta/image.props.default.json +8 -0
  52. package/es/lowcode/engine/meta/imex.props.default.json +4 -0
  53. package/es/lowcode/engine/meta/jsx.props.default.json +1 -0
  54. package/es/lowcode/engine/meta/layout.props.default.json +5 -0
  55. package/es/lowcode/engine/meta/link.props.default.json +6 -0
  56. package/es/lowcode/engine/meta/modal.props.default.json +11 -0
  57. package/es/lowcode/engine/meta/section.props.default.json +9 -0
  58. package/es/lowcode/engine/meta/split.props.default.json +5 -0
  59. package/es/lowcode/engine/meta/table.props.default.json +10 -0
  60. package/es/lowcode/engine/meta/tabs.props.default.json +10 -0
  61. package/es/lowcode/engine/meta/text.props.default.json +4 -0
  62. package/es/lowcode/engine/meta/tree.props.default.json +9 -0
  63. package/es/lowcode/engine/provider/ContextProvider.js +164 -0
  64. package/es/lowcode/engine/provider/EventBusProvider.js +120 -0
  65. package/es/lowcode/engine/tools/dataProcess.js +188 -0
  66. package/es/lowcode/engine/tools/helper.js +4 -0
  67. package/es/lowcode/engine/tools/lcid.js +16 -0
  68. package/es/lowcode/index.js +3 -0
  69. package/es/lowcode/painter/Components.js +104 -0
  70. package/es/lowcode/painter/Design.js +97 -0
  71. package/es/lowcode/painter/I18n.js +5 -0
  72. package/es/lowcode/painter/Outline.js +202 -0
  73. package/es/lowcode/painter/Panel.js +8 -0
  74. package/es/lowcode/painter/Ribbon.js +136 -0
  75. package/es/lowcode/painter/components/PanelItem.js +20 -0
  76. package/es/lowcode/painter/components/RuleInput.js +105 -0
  77. package/es/lowcode/painter/index.js +19 -0
  78. package/es/lowcode/painter/panel-section/LayoutRatio.js +123 -0
  79. package/es/lowcode/painter/panel-section/Radio.js +58 -0
  80. package/es/lowcode/painter/style/components.less +90 -0
  81. package/es/lowcode/painter/style/design.less +38 -0
  82. package/es/lowcode/painter/style/index.less +7 -0
  83. package/es/lowcode/painter/style/layout-ratio.less +51 -0
  84. package/es/lowcode/painter/style/outline.less +26 -0
  85. package/es/lowcode/painter/style/panel-item.less +21 -0
  86. package/es/lowcode/painter/style/panel.less +5 -0
  87. package/es/lowcode/painter/style/radio.less +24 -0
  88. package/es/lowcode/painter/style/ribbon.less +4 -0
  89. package/es/lowcode/painter/style/rule-input.less +13 -0
  90. package/es/lowcode/view/Canvas.js +135 -0
  91. package/es/lowcode/view/Loading.js +23 -0
  92. package/es/lowcode/view/Page.js +55 -0
  93. package/es/lowcode/view/index.js +18 -0
  94. package/es/lowcode/view/lc-components/Box/index.js +21 -0
  95. package/es/lowcode/view/lc-components/Button/index.js +37 -0
  96. package/es/lowcode/view/lc-components/CardList/index.js +20 -0
  97. package/es/lowcode/view/lc-components/Dialog/index.js +50 -0
  98. package/es/lowcode/view/lc-components/Dialog/index.less +3 -0
  99. package/es/lowcode/view/lc-components/Drawer/index.js +46 -0
  100. package/es/lowcode/view/lc-components/Form/index.js +20 -0
  101. package/es/lowcode/view/lc-components/Iframe/index.js +20 -0
  102. package/es/lowcode/view/lc-components/ImEx/index.js +20 -0
  103. package/es/lowcode/view/lc-components/Image/index.js +20 -0
  104. package/es/lowcode/view/lc-components/JSX/index.js +20 -0
  105. package/es/lowcode/view/lc-components/Layout/index.js +24 -0
  106. package/es/lowcode/view/lc-components/Link/index.js +20 -0
  107. package/es/lowcode/view/lc-components/Section/index.js +34 -0
  108. package/es/lowcode/view/lc-components/Split/index.js +21 -0
  109. package/es/lowcode/view/lc-components/Table/index.js +23 -0
  110. package/es/lowcode/view/lc-components/Tabs/index.js +21 -0
  111. package/es/lowcode/view/lc-components/Text/index.js +23 -0
  112. package/es/lowcode/view/lc-components/Tree/index.js +20 -0
  113. package/es/lowcode/view/lc-components/Wrapper.js +45 -0
  114. package/es/lowcode/view/style/canvas.less +5 -0
  115. package/es/lowcode/view/style/loading.less +84 -0
  116. package/es/lowcode/view/style/page.less +6 -0
  117. package/es/services.js +1 -1
  118. package/es/upload/Form/gridForm.js +29 -7
  119. package/es/upload/Form/index.js +1 -1
  120. package/es/upload/Form/index.less +7 -7
  121. package/es/upload/FormItem/index.js +30 -18
  122. package/es/upload/index.js +3 -3
  123. package/es/utils/action.js +1 -1
  124. package/es/utils/form.js +26 -26
  125. package/es/utils/grid.js +22 -26
  126. package/es/utils/index.js +3 -3
  127. package/lib/components/Builder/index.js +3 -5
  128. package/lib/components/LdAutoForm/index.js +5 -8
  129. package/lib/components/LdCard/index.js +5 -7
  130. package/lib/components/LdCom/index.js +6 -11
  131. package/lib/components/LdFormList/index.js +15 -13
  132. package/lib/components/LdGrid/index.js +10 -12
  133. package/lib/components/LdGridForm/index.js +6 -7
  134. package/lib/components/LdGridForm/index.less +7 -7
  135. package/lib/components/LdInfoPanel/index.js +2 -3
  136. package/lib/components/LdPop/index.js +2 -4
  137. package/lib/components/LdRuntimeCom/index.js +49 -0
  138. package/lib/components/LdTree/index.js +2 -4
  139. package/lib/components/LdTree/index.less +36 -36
  140. package/lib/helper/FromItems.js +15 -29
  141. package/lib/helper/action.js +9 -11
  142. package/lib/helper/form.js +18 -20
  143. package/lib/helper/index.less +7 -7
  144. package/lib/helper/ldBuilder.js +1 -2
  145. package/lib/helper/ldComBuild.js +7 -11
  146. package/lib/index.js +9 -1
  147. package/lib/lowcode/constants/api-url.js +8 -0
  148. package/lib/lowcode/constants/event-topics.js +29 -0
  149. package/lib/lowcode/constants/index.js +18 -0
  150. package/lib/lowcode/engine/factory/DataFactory.js +3 -0
  151. package/lib/lowcode/engine/meta/button.props.default.json +8 -0
  152. package/lib/lowcode/engine/meta/cardlist.props.default.json +10 -0
  153. package/lib/lowcode/engine/meta/components/button.json +104 -0
  154. package/lib/lowcode/engine/meta/components/card-list.json +143 -0
  155. package/lib/lowcode/engine/meta/components/drawer.json +143 -0
  156. package/lib/lowcode/engine/meta/components/form.json +116 -0
  157. package/lib/lowcode/engine/meta/components/iframe.json +31 -0
  158. package/lib/lowcode/engine/meta/components/image.json +113 -0
  159. package/lib/lowcode/engine/meta/components/imex.json +81 -0
  160. package/lib/lowcode/engine/meta/components/jsx.json +24 -0
  161. package/lib/lowcode/engine/meta/components/layout.json +107 -0
  162. package/lib/lowcode/engine/meta/components/link.json +111 -0
  163. package/lib/lowcode/engine/meta/components/modal.json +120 -0
  164. package/lib/lowcode/engine/meta/components/section.json +107 -0
  165. package/lib/lowcode/engine/meta/components/split.json +71 -0
  166. package/lib/lowcode/engine/meta/components/table.json +161 -0
  167. package/lib/lowcode/engine/meta/components/tabs.json +140 -0
  168. package/lib/lowcode/engine/meta/components/text.json +65 -0
  169. package/lib/lowcode/engine/meta/components/tree.json +156 -0
  170. package/lib/lowcode/engine/meta/components-list.json +122 -0
  171. package/lib/lowcode/engine/meta/drawer.props.default.json +10 -0
  172. package/lib/lowcode/engine/meta/form.props.default.json +5 -0
  173. package/lib/lowcode/engine/meta/iframe.props.default.json +3 -0
  174. package/lib/lowcode/engine/meta/image.props.default.json +8 -0
  175. package/lib/lowcode/engine/meta/imex.props.default.json +4 -0
  176. package/lib/lowcode/engine/meta/jsx.props.default.json +1 -0
  177. package/lib/lowcode/engine/meta/layout.props.default.json +5 -0
  178. package/lib/lowcode/engine/meta/link.props.default.json +6 -0
  179. package/lib/lowcode/engine/meta/modal.props.default.json +11 -0
  180. package/lib/lowcode/engine/meta/section.props.default.json +9 -0
  181. package/lib/lowcode/engine/meta/split.props.default.json +5 -0
  182. package/lib/lowcode/engine/meta/table.props.default.json +10 -0
  183. package/lib/lowcode/engine/meta/tabs.props.default.json +10 -0
  184. package/lib/lowcode/engine/meta/text.props.default.json +4 -0
  185. package/lib/lowcode/engine/meta/tree.props.default.json +9 -0
  186. package/lib/lowcode/engine/provider/ContextProvider.js +172 -0
  187. package/lib/lowcode/engine/provider/EventBusProvider.js +128 -0
  188. package/lib/lowcode/engine/tools/dataProcess.js +201 -0
  189. package/lib/lowcode/engine/tools/helper.js +11 -0
  190. package/lib/lowcode/engine/tools/lcid.js +22 -0
  191. package/lib/lowcode/index.js +20 -0
  192. package/lib/lowcode/painter/Components.js +112 -0
  193. package/lib/lowcode/painter/Design.js +105 -0
  194. package/lib/lowcode/painter/I18n.js +12 -0
  195. package/lib/lowcode/painter/Outline.js +210 -0
  196. package/lib/lowcode/painter/Panel.js +16 -0
  197. package/lib/lowcode/painter/Ribbon.js +151 -0
  198. package/lib/lowcode/painter/components/PanelItem.js +26 -0
  199. package/lib/lowcode/painter/components/RuleInput.js +112 -0
  200. package/lib/lowcode/painter/index.js +26 -0
  201. package/lib/lowcode/painter/panel-section/LayoutRatio.js +131 -0
  202. package/lib/lowcode/painter/panel-section/Radio.js +65 -0
  203. package/lib/lowcode/painter/style/components.less +90 -0
  204. package/lib/lowcode/painter/style/design.less +38 -0
  205. package/lib/lowcode/painter/style/index.less +7 -0
  206. package/lib/lowcode/painter/style/layout-ratio.less +51 -0
  207. package/lib/lowcode/painter/style/outline.less +26 -0
  208. package/lib/lowcode/painter/style/panel-item.less +21 -0
  209. package/lib/lowcode/painter/style/panel.less +5 -0
  210. package/lib/lowcode/painter/style/radio.less +24 -0
  211. package/lib/lowcode/painter/style/ribbon.less +4 -0
  212. package/lib/lowcode/painter/style/rule-input.less +13 -0
  213. package/lib/lowcode/view/Canvas.js +150 -0
  214. package/lib/lowcode/view/Loading.js +30 -0
  215. package/lib/lowcode/view/Page.js +63 -0
  216. package/lib/lowcode/view/index.js +25 -0
  217. package/lib/lowcode/view/lc-components/Box/index.js +29 -0
  218. package/lib/lowcode/view/lc-components/Button/index.js +45 -0
  219. package/lib/lowcode/view/lc-components/CardList/index.js +28 -0
  220. package/lib/lowcode/view/lc-components/Dialog/index.js +58 -0
  221. package/lib/lowcode/view/lc-components/Dialog/index.less +3 -0
  222. package/lib/lowcode/view/lc-components/Drawer/index.js +54 -0
  223. package/lib/lowcode/view/lc-components/Form/index.js +28 -0
  224. package/lib/lowcode/view/lc-components/Iframe/index.js +28 -0
  225. package/lib/lowcode/view/lc-components/ImEx/index.js +28 -0
  226. package/lib/lowcode/view/lc-components/Image/index.js +28 -0
  227. package/lib/lowcode/view/lc-components/JSX/index.js +28 -0
  228. package/lib/lowcode/view/lc-components/Layout/index.js +32 -0
  229. package/lib/lowcode/view/lc-components/Link/index.js +28 -0
  230. package/lib/lowcode/view/lc-components/Section/index.js +42 -0
  231. package/lib/lowcode/view/lc-components/Split/index.js +29 -0
  232. package/lib/lowcode/view/lc-components/Table/index.js +31 -0
  233. package/lib/lowcode/view/lc-components/Tabs/index.js +29 -0
  234. package/lib/lowcode/view/lc-components/Text/index.js +31 -0
  235. package/lib/lowcode/view/lc-components/Tree/index.js +28 -0
  236. package/lib/lowcode/view/lc-components/Wrapper.js +52 -0
  237. package/lib/lowcode/view/style/canvas.less +5 -0
  238. package/lib/lowcode/view/style/loading.less +84 -0
  239. package/lib/lowcode/view/style/page.less +6 -0
  240. package/lib/upload/Form/gridForm.js +27 -6
  241. package/lib/upload/Form/index.js +1 -2
  242. package/lib/upload/Form/index.less +7 -7
  243. package/lib/upload/FormItem/index.js +30 -19
  244. package/lib/upload/GridCell/index.js +1 -2
  245. package/lib/utils/form.js +26 -29
  246. package/lib/utils/grid.js +23 -28
  247. package/lowcode.js +1 -0
  248. package/package.json +157 -78
  249. package/upload.js +1 -1
  250. package/utils.js +1 -1
  251. package/README.zh-CN.md +0 -51
@@ -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
+ }
@@ -31,7 +31,7 @@ import { getDvaApp } from 'umi';
31
31
  import { BasicFormItem } from 'luck-design';
32
32
  import { TreeSelector, RegionFormItem } from '@luck-design-biz/base';
33
33
  import { DatadicDropDown, UserSelectDropDown as UserItem } from '@luck-design-biz/base/sys/dropdown';
34
- import buildUploadFormItem from '../upload/FormItem';
34
+ import buildUploadFormItem from "../upload/FormItem";
35
35
  export var getNumberItem = function getNumberItem() {
36
36
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
37
37
  handleValueChange = _ref.handleValueChange,
@@ -4,15 +4,15 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import { Modal } from 'luck-design/antd';
5
5
  import { showPop, formatMessage } from '@luck-design-biz/base/utils';
6
6
  import { transform, isArray, startsWith, keyBy } from 'lodash';
7
- import { dataFormat, behaviorCall } from '../utils';
8
- import { defaultComName } from './form';
7
+ import { dataFormat, behaviorCall } from "../utils";
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,15 +90,15 @@ 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;
100
- if (props === null || props === void 0 ? void 0 : props.multiple) delete props.multiple;
101
- if (props === null || props === void 0 ? void 0 : (_props$confiig = props.confiig) === null || _props$confiig === void 0 ? void 0 : _props$confiig.mode) delete props.confiig.mode;
100
+ if (props !== null && props !== void 0 && props.multiple) delete props.multiple;
101
+ if (props !== null && props !== void 0 && (_props$confiig = props.confiig) !== null && _props$confiig !== void 0 && _props$confiig.mode) delete props.confiig.mode;
102
102
  // alias、sclassKey?
103
103
  return props;
104
104
  }
@@ -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
+ }
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import React, { useContext } from 'react';
3
- import { LuckDaContext } from '../components/Builder';
3
+ import { LuckDaContext } from "../components/Builder";
4
4
  import { formatMessage } from '@luck-design-biz/base/utils';
5
5
  var builder = function builder(wrapped) {
6
6
  var LdCom = function LdCom(props) {
@@ -5,9 +5,9 @@ var _excluded = ["className"];
5
5
  import React, { useContext, Fragment } from 'react';
6
6
  import { includes, intersectionWith } from 'lodash';
7
7
  import { ChildrenUtil } from '@luck-design-biz/base/utils';
8
- import { LuckDaContext } from '../components/Builder';
8
+ import { LuckDaContext } from "../components/Builder";
9
9
  import classNames from 'classnames';
10
- import styles from './index.less';
10
+ import styles from "./index.less";
11
11
  export var getResources = function getResources() {
12
12
  var _ref = useContext(LuckDaContext) || {},
13
13
  _ref$resources = _ref.resources,
@@ -19,7 +19,7 @@ export var ldComBuilder = function ldComBuilder(Com) {
19
19
  var _com$props;
20
20
  var resources = getResources();
21
21
  var com = /*#__PURE__*/React.createElement(Com, props);
22
- return !(com === null || com === void 0 ? void 0 : (_com$props = com.props) === null || _com$props === void 0 ? void 0 : _com$props.resource) || includes(resources, com.props.resource) ? com : Fragment;
22
+ return !(com !== null && com !== void 0 && (_com$props = com.props) !== null && _com$props !== void 0 && _com$props.resource) || includes(resources, com.props.resource) ? com : Fragment;
23
23
  };
24
24
  return Component;
25
25
  };
@@ -40,7 +40,7 @@ export var deepFilterCom = function deepFilterCom(Com, childMark) {
40
40
  }));
41
41
  return ChildrenUtil.deepFilter(com, function (child) {
42
42
  var _child$props;
43
- var data = !childMark(child) || !(child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.resource) || includes(resources, child.props.resource);
43
+ var data = !childMark(child) || !(child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.resource) || includes(resources, child.props.resource);
44
44
  return data;
45
45
  });
46
46
  };
package/es/index.js CHANGED
@@ -1,9 +1,10 @@
1
- export { default as ldModuleBuild } from './components/Builder';
2
- export { default as LdTree } from './components/LdTree';
3
- export { default as LdGrid } from './components/LdGrid';
4
- export { default as LdFormList } from './components/LdFormList';
5
- export { default as buildLdAutoForm } from './components/LdAutoForm';
6
- export { default as buildLdGridForm } from './components/LdGridForm';
7
- export { default as LdInfoPanel } from './components/LdInfoPanel';
8
- export { default as LdCard } from './components/LdCard';
9
- export * from './components/LdCom';
1
+ export { default as ldModuleBuild } from "./components/Builder";
2
+ export { default as LdTree } from "./components/LdTree";
3
+ export { default as LdGrid } from "./components/LdGrid";
4
+ export { default as LdFormList } from "./components/LdFormList";
5
+ export { default as buildLdAutoForm } from "./components/LdAutoForm";
6
+ export { default as buildLdGridForm } from "./components/LdGridForm";
7
+ export { default as LdInfoPanel } from "./components/LdInfoPanel";
8
+ export { default as LdCard } from "./components/LdCard";
9
+ export { default as LdRuntimeCom } from "./components/LdRuntimeCom";
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
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "component": "CardList",
3
+ "name": "卡片列表",
4
+ "desc": "用于以卡片的形式展示相关的信息或内容列表。它提供了一种可视化的方式来呈现多个项目,每个项目通常由一个卡片表示,包含相关的文本、图像和其他元素。",
5
+ "icon": "icon-cardlist",
6
+ "group": "advance",
7
+ "groupName": "高级",
8
+ "props": [
9
+ {
10
+ "key": "id",
11
+ "desc": "唯一标识",
12
+ "type": "string",
13
+ "disabled": true
14
+ },
15
+ {
16
+ "key": "dateset",
17
+ "name": "首次数据自动加载",
18
+ "desc": "选择系统中的可用树形数据集",
19
+ "type": "_DataSetSelector"
20
+ },
21
+ {
22
+ "key": "autoLoad",
23
+ "name": "首次数据自动加载",
24
+ "desc": "首次数据是否自动加载,若存在必须带搜索条件再加载的情况,需要关闭",
25
+ "type": "boolean",
26
+ "default": true
27
+ },
28
+ {
29
+ "key": "readOnly",
30
+ "name": "是否只读",
31
+ "desc": "卡片列表是否只读",
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ {
36
+ "key": "isFlow",
37
+ "name": "是否流式",
38
+ "desc": "是否流式(不分页)",
39
+ "type": "boolean",
40
+ "default": false
41
+ },
42
+ {
43
+ "key": "defaultPageSize",
44
+ "name": "默认分页数",
45
+ "desc": "isFlow为false时设置,默认单页分页数",
46
+ "type": "number",
47
+ "default": 30
48
+ },
49
+ {
50
+ "key": "batchOperations",
51
+ "name": "批量操作",
52
+ "desc": "批量操作配置",
53
+ "type": "_CardListActionSelector"
54
+ },
55
+ {
56
+ "key": "actionTitle",
57
+ "name": "操作列标题",
58
+ "desc": "操作列的标题",
59
+ "type": "string",
60
+ "default": "操作列"
61
+ },
62
+ {
63
+ "key": "actionWidth",
64
+ "name": "操作列宽度",
65
+ "desc": "操作列宽度设置",
66
+ "type": "number",
67
+ "default": 100
68
+ },
69
+ {
70
+ "key": "actionHidden",
71
+ "name": "操作列是否隐藏",
72
+ "desc": "操作列是否隐藏",
73
+ "type": "boolean",
74
+ "default": false
75
+ },
76
+ {
77
+ "key": "maxWebShownActionCount",
78
+ "name": "操作列最大展示数",
79
+ "desc": "操作列最大展示数,超出最大数变为最大展示数-1+更多",
80
+ "type": "number",
81
+ "default": 2
82
+ },
83
+ {
84
+ "key": "actions",
85
+ "name": "操作项",
86
+ "desc": "单行操作项",
87
+ "type": "_ActionSelector"
88
+ },
89
+ {
90
+ "key": "batchActions",
91
+ "name": "批量操作项",
92
+ "desc": "批量操作项",
93
+ "type": "_ActionSelector"
94
+ }
95
+ ],
96
+ "style": {},
97
+ "advance": {
98
+ "events": [
99
+ {
100
+ "key": "onMount",
101
+ "name": "组件首次渲染时",
102
+ "desc": "在组件首次渲染时,执行方法",
103
+ "func": "(params)=>{\n\t\n}"
104
+ },
105
+ {
106
+ "key": "onUnmount",
107
+ "name": "组件卸载时",
108
+ "desc": "在组件卸载时,执行方法。",
109
+ "func": "(params)=>{\n\t\n}"
110
+ },
111
+ {
112
+ "key": "onBatchOperationsClick",
113
+ "name": "批量操作点击",
114
+ "desc": "点击操作的回调函数",
115
+ "func": "(key, selectedRows)=>{\n\t\n}"
116
+ },
117
+ {
118
+ "key": "onActionClick",
119
+ "name": "操作列点击",
120
+ "desc": "点击操作的回调函数",
121
+ "func": "(itemData)=>{\n\t\n}"
122
+ },
123
+ {
124
+ "key": "actionRender",
125
+ "name": "操作列定制渲染",
126
+ "desc": "返回为false时,该操作不可见",
127
+ "func": "(title, rowData)=>{\n\t\n}"
128
+ },
129
+ {
130
+ "key": "onRowClick",
131
+ "name": "行单击",
132
+ "desc": "单击表格行时,执行方法",
133
+ "func": "(data, rowIndex, params)=>{\n\t\n}"
134
+ },
135
+ {
136
+ "key": "onCardRender",
137
+ "name": "操作列点击",
138
+ "desc": "点击操作的回调函数",
139
+ "func": "(itemData)=>{\n\t\n}"
140
+ }
141
+ ]
142
+ }
143
+ }