@luck-design-biz/luckda 0.0.25-1 → 0.0.25-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 (139) hide show
  1. package/es/locales/zh-CN.js +9 -0
  2. package/es/lowcode/constants/api-url.js +184 -100
  3. package/es/lowcode/constants/index.js +2 -1
  4. package/es/lowcode/engine/meta/box.props.default.json +1 -1
  5. package/es/lowcode/engine/meta/box.props.json +1 -1
  6. package/es/lowcode/engine/meta/button.props.json +1 -1
  7. package/es/lowcode/engine/meta/cardlist.props.json +1 -1
  8. package/es/lowcode/engine/meta/components-list.json +1 -1
  9. package/es/lowcode/engine/meta/dialog.props.json +1 -1
  10. package/es/lowcode/engine/meta/drawer.props.json +1 -1
  11. package/es/lowcode/engine/meta/form.props.default.json +4 -5
  12. package/es/lowcode/engine/meta/form.props.json +33 -30
  13. package/es/lowcode/engine/meta/image.props.json +2 -2
  14. package/es/lowcode/engine/meta/imex.props.json +1 -1
  15. package/es/lowcode/engine/meta/link.props.json +1 -1
  16. package/es/lowcode/engine/meta/section.props.default.json +4 -6
  17. package/es/lowcode/engine/meta/section.props.json +52 -49
  18. package/es/lowcode/engine/meta/text.props.json +2 -2
  19. package/es/lowcode/engine/meta/tree.props.json +2 -2
  20. package/es/lowcode/engine/provider/ContextProvider/index.js +10 -2
  21. package/es/lowcode/engine/provider/RemoteSourceProvider.js +28 -15
  22. package/es/lowcode/engine/tools/helper.js +23 -21
  23. package/es/lowcode/engine/tools/useCanvasRender.js +5 -7
  24. package/es/lowcode/engine/tools/usePromiseState.js +23 -14
  25. package/es/lowcode/painter/Design.js +34 -2
  26. package/es/lowcode/painter/DesignOperator.js +6 -8
  27. package/es/lowcode/painter/DesignToolbar.js +258 -21
  28. package/es/lowcode/painter/Panel.js +8 -9
  29. package/es/lowcode/painter/components/AttrsPanel.js +6 -6
  30. package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
  31. package/es/lowcode/painter/components/ListEditor.js +8 -2
  32. package/es/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
  33. package/es/lowcode/painter/components/field-setting/SettingUI.js +26 -7
  34. package/es/lowcode/painter/components/field-setting/index.js +18 -8
  35. package/es/lowcode/painter/index.js +1 -28
  36. package/es/lowcode/painter/panel-section/ActionsColumnWidth.js +25 -0
  37. package/es/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
  38. package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
  39. package/es/lowcode/painter/panel-section/BlocksEditor/index.js +48 -15
  40. package/es/lowcode/painter/panel-section/FieldsSetting.js +48 -27
  41. package/es/lowcode/painter/panel-section/I18nInput.js +20 -0
  42. package/es/lowcode/painter/style/design.less +6 -2
  43. package/es/lowcode/painter/style/list-editor.less +36 -0
  44. package/es/lowcode/preview/index.js +17 -4
  45. package/es/lowcode/view/lc-components/Box/meta.json +1 -1
  46. package/es/lowcode/view/lc-components/Button/meta.json +1 -1
  47. package/es/lowcode/view/lc-components/CardList/meta.json +1 -1
  48. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -4
  49. package/es/lowcode/view/lc-components/Dialog/meta.json +1 -1
  50. package/es/lowcode/view/lc-components/Drawer/meta.json +1 -1
  51. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +66 -4
  52. package/es/lowcode/view/lc-components/Form/index.js +232 -61
  53. package/es/lowcode/view/lc-components/Form/meta.json +33 -30
  54. package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
  55. package/es/lowcode/view/lc-components/Image/meta.json +2 -2
  56. package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +6 -7
  57. package/es/lowcode/view/lc-components/Link/meta.json +1 -1
  58. package/es/lowcode/view/lc-components/Section/FunctionDesign.js +31 -2
  59. package/es/lowcode/view/lc-components/Section/index.js +114 -24
  60. package/es/lowcode/view/lc-components/Section/index.less +7 -0
  61. package/es/lowcode/view/lc-components/Section/meta.json +48 -49
  62. package/es/lowcode/view/lc-components/Split/FunctionDesign.js +4 -6
  63. package/es/lowcode/view/lc-components/Split/index.js +4 -4
  64. package/es/lowcode/view/lc-components/Table/index.js +7 -6
  65. package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +2 -4
  66. package/es/lowcode/view/lc-components/Text/meta.json +2 -2
  67. package/es/lowcode/view/lc-components/Tree/meta.json +2 -2
  68. package/es/upload/Form/gridForm.js +7 -3
  69. package/lib/locales/zh-CN.js +9 -0
  70. package/lib/lowcode/constants/api-url.js +183 -100
  71. package/lib/lowcode/constants/index.js +3 -2
  72. package/lib/lowcode/engine/meta/box.props.default.json +1 -1
  73. package/lib/lowcode/engine/meta/box.props.json +1 -1
  74. package/lib/lowcode/engine/meta/button.props.json +1 -1
  75. package/lib/lowcode/engine/meta/cardlist.props.json +1 -1
  76. package/lib/lowcode/engine/meta/components-list.json +1 -1
  77. package/lib/lowcode/engine/meta/dialog.props.json +1 -1
  78. package/lib/lowcode/engine/meta/drawer.props.json +1 -1
  79. package/lib/lowcode/engine/meta/form.props.default.json +4 -5
  80. package/lib/lowcode/engine/meta/form.props.json +33 -30
  81. package/lib/lowcode/engine/meta/image.props.json +2 -2
  82. package/lib/lowcode/engine/meta/imex.props.json +1 -1
  83. package/lib/lowcode/engine/meta/link.props.json +1 -1
  84. package/lib/lowcode/engine/meta/section.props.default.json +4 -6
  85. package/lib/lowcode/engine/meta/section.props.json +52 -49
  86. package/lib/lowcode/engine/meta/text.props.json +2 -2
  87. package/lib/lowcode/engine/meta/tree.props.json +2 -2
  88. package/lib/lowcode/engine/provider/ContextProvider/index.js +10 -2
  89. package/lib/lowcode/engine/provider/RemoteSourceProvider.js +24 -11
  90. package/lib/lowcode/engine/tools/helper.js +23 -21
  91. package/lib/lowcode/engine/tools/useCanvasRender.js +3 -5
  92. package/lib/lowcode/engine/tools/usePromiseState.js +22 -14
  93. package/lib/lowcode/painter/Design.js +32 -0
  94. package/lib/lowcode/painter/DesignOperator.js +5 -7
  95. package/lib/lowcode/painter/DesignToolbar.js +256 -19
  96. package/lib/lowcode/painter/Panel.js +7 -8
  97. package/lib/lowcode/painter/components/AttrsPanel.js +6 -6
  98. package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +5 -2
  99. package/lib/lowcode/painter/components/ListEditor.js +8 -2
  100. package/lib/lowcode/painter/components/field-setting/BatchSetting.js +13 -3
  101. package/lib/lowcode/painter/components/field-setting/SettingUI.js +26 -7
  102. package/lib/lowcode/painter/components/field-setting/index.js +18 -8
  103. package/lib/lowcode/painter/index.js +1 -30
  104. package/lib/lowcode/painter/panel-section/ActionsColumnWidth.js +32 -0
  105. package/lib/lowcode/painter/panel-section/BlockEditor/index.js +7 -4
  106. package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +4 -3
  107. package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +47 -13
  108. package/lib/lowcode/painter/panel-section/FieldsSetting.js +46 -25
  109. package/lib/lowcode/painter/panel-section/I18nInput.js +27 -0
  110. package/lib/lowcode/painter/style/design.less +6 -2
  111. package/lib/lowcode/painter/style/list-editor.less +36 -0
  112. package/lib/lowcode/preview/index.js +18 -4
  113. package/lib/lowcode/view/lc-components/Box/meta.json +1 -1
  114. package/lib/lowcode/view/lc-components/Button/meta.json +1 -1
  115. package/lib/lowcode/view/lc-components/CardList/meta.json +1 -1
  116. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -4
  117. package/lib/lowcode/view/lc-components/Dialog/meta.json +1 -1
  118. package/lib/lowcode/view/lc-components/Drawer/meta.json +1 -1
  119. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +64 -2
  120. package/lib/lowcode/view/lc-components/Form/index.js +230 -59
  121. package/lib/lowcode/view/lc-components/Form/meta.json +33 -30
  122. package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
  123. package/lib/lowcode/view/lc-components/Image/meta.json +2 -2
  124. package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +5 -6
  125. package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
  126. package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +31 -2
  127. package/lib/lowcode/view/lc-components/Section/index.js +113 -23
  128. package/lib/lowcode/view/lc-components/Section/index.less +7 -0
  129. package/lib/lowcode/view/lc-components/Section/meta.json +48 -49
  130. package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +5 -7
  131. package/lib/lowcode/view/lc-components/Split/index.js +4 -4
  132. package/lib/lowcode/view/lc-components/Table/index.js +7 -6
  133. package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +4 -6
  134. package/lib/lowcode/view/lc-components/Text/meta.json +2 -2
  135. package/lib/lowcode/view/lc-components/Tree/meta.json +2 -2
  136. package/lib/upload/Form/gridForm.js +7 -3
  137. package/package.json +1 -1
  138. package/es/lowcode/painter/services/toolbar.js +0 -25
  139. package/lib/lowcode/painter/services/toolbar.js +0 -32
@@ -163,7 +163,11 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
163
163
  };
164
164
  }, [bantchActions.todoList]);
165
165
  var _others = useCreation(function () {
166
- var temp = {};
166
+ var temp = {
167
+ defaultColDef: {
168
+ draggable: draggable
169
+ }
170
+ };
167
171
  if (!isNil(formatDataSource)) {
168
172
  temp.formatDataSource = function (list, detail) {
169
173
  return executeCode(ctx, formatDataSource, ['list', 'detail'], list, detail);
@@ -192,7 +196,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
192
196
  temp.overModel = executeCode(ctx, modelParams);
193
197
  }
194
198
  return temp;
195
- }, [fields, formatDataSource, getDataPath, columnsRewrite, columnsReset, modelParams]);
199
+ }, [fields, formatDataSource, getDataPath, columnsRewrite, columnsReset, modelParams, draggable]);
196
200
  var renderFunctionArea = useMemoizedFn(function () {
197
201
  var _topActionGroup$todoL;
198
202
  return !!(topActionGroup !== null && topActionGroup !== void 0 && (_topActionGroup$todoL = topActionGroup.todoList) !== null && _topActionGroup$todoL !== void 0 && _topActionGroup$todoL.length) ? /*#__PURE__*/React.createElement(LDActions, _extends({}, topActionGroup, {
@@ -309,10 +313,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
309
313
  renderIndex: renderIndex,
310
314
  suppressInit: !autoLoad,
311
315
  getRowStyle: _getRowStyle,
312
- suppressPreset: suppressPreset,
313
- defaultColDef: {
314
- draggable: draggable
315
- }
316
+ suppressPreset: suppressPreset
316
317
  }, _pagination, _actionsColumn, _rowSelection, _export, _batchActions, _others, {
317
318
  readFilter: _readFilter,
318
319
  renderFunctionArea: renderFunctionArea,
@@ -6,7 +6,6 @@ var _excluded = ["children", "id", "items"];
6
6
  import React, { useEffect } from 'react';
7
7
  import Index from "./index";
8
8
  import { useCreation } from 'ahooks';
9
- import { cloneDeep, differenceBy } from 'lodash';
10
9
  import { suid } from '@luck-design-biz/base/utils';
11
10
  import { useContext, usePageData } from "../../../engine/provider/ContextProvider";
12
11
  import { add, findNodeAndParent } from "../../../engine/tools/dataProcess";
@@ -26,13 +25,12 @@ var FunctionDesign = function FunctionDesign(_ref) {
26
25
  var compId = _ref2.id,
27
26
  pageData = _ref2.pageData;
28
27
  if (compId !== id) return;
29
- var cloneData = cloneDeep(pageData);
30
28
  var boxId = "box_".concat(suid());
31
- add(cloneData, id, boxId, _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
29
+ add(pageData, id, boxId, _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
32
30
  buildIn: true,
33
31
  tabId: items[0].id
34
32
  }));
35
- setPageData(cloneData);
33
+ setPageData(pageData);
36
34
  }).watch();
37
35
  }, []);
38
36
  useEffect(function () {
@@ -17,7 +17,7 @@
17
17
  "key": "content",
18
18
  "name": "内容",
19
19
  "desc": "文本内容设置",
20
- "type": "string"
20
+ "type": "_I18nInput"
21
21
  },
22
22
  {
23
23
  "key": "showTitle",
@@ -30,7 +30,7 @@
30
30
  "key": "title",
31
31
  "name": "自定义标题",
32
32
  "desc": "显示标题时配置。自定义标题内容",
33
- "type": "string"
33
+ "type": "_I18nInput"
34
34
  },
35
35
  {
36
36
  "key": "maxLine",
@@ -23,7 +23,7 @@
23
23
  "key": "title",
24
24
  "name": "标题",
25
25
  "desc": "头部标题",
26
- "type": "string"
26
+ "type": "_I18nInput"
27
27
  },
28
28
  {
29
29
  "key": "readOnly",
@@ -81,7 +81,7 @@
81
81
  "key": "treeNodeTitle",
82
82
  "name": "展示字段",
83
83
  "desc": "展示字段的key",
84
- "type": "string",
84
+ "type": "_I18nInput",
85
85
  "default": "sname"
86
86
  },
87
87
  {
@@ -270,9 +270,6 @@ var UploadGridForm = function UploadGridForm(_ref) {
270
270
 
271
271
  // 预览
272
272
  var resetActionsColumn = useMemoizedFn(function (data, index, _actions, params) {
273
- if (resetActions) {
274
- return resetActions(data, index, actionList, params);
275
- }
276
273
  var actions = _actions.filter(function (item) {
277
274
  return item.wanted !== 'update' && item.wanted !== 'add';
278
275
  });
@@ -313,6 +310,9 @@ var UploadGridForm = function UploadGridForm(_ref) {
313
310
  });
314
311
  }
315
312
  });
313
+ if (resetActions) {
314
+ return resetActions(data, index, actions, params);
315
+ }
316
316
  return actions;
317
317
  });
318
318
  var handleBatchOperationsClick = useMemoizedFn(function (key, selectedRows, cb) {
@@ -380,6 +380,10 @@ var UploadGridForm = function UploadGridForm(_ref) {
380
380
  supportUploadTypes: supportUploadTypes,
381
381
  beforeUpload: _beforeUpload
382
382
  });
383
+ },
384
+ onChange: function onChange(e) {
385
+ handleUploadChange(e);
386
+ rest.onChange && rest.onChange(e);
383
387
  }
384
388
  })
385
389
  }), /*#__PURE__*/React.createElement(BasicFormItem, {
@@ -13,7 +13,16 @@ var _default = exports.default = {
13
13
  "luckda.lowcode.modal": "模态视图层",
14
14
  "luckda.lowcode.painter.I18n.search": "搜索文案",
15
15
  "luckda.lowcode.painter.I18n.add": "新增文案",
16
+ "luckda.lowcode.design.toolbar.clear.tip": "清除提示",
17
+ "luckda.lowcode.design.toolbar.clear": "清除缓存",
16
18
  "luckda.lowcode.error.pagedata": "页面数据错误",
19
+ "luckda.lowcode.design.toolbar.pageAttrs": "页面属性",
20
+ "luckda.lowcode.design.toolbar.preview": "预览",
21
+ "luckda.lowcode.design.toolbar.save": "保存",
22
+ "luckda.lowcode.design.toolbar.pagePreview": "页面预览",
23
+ "luckda.lowcode.design.toolbar.selectUser": "请选择模拟登录人",
24
+ "app.base.operate.comfire.leave": "离开当前页面?",
25
+ "app.base.operate.comfire.message.leave": "系统可能不会保存您所做的更改。",
17
26
  "luckda.lowcode.painter.components.search": "搜索组件",
18
27
  "ccm.dev.page.set.components.base": "基础组件",
19
28
  "ccm.dev.page.set.components.custom": "自定义组件",