@luck-design-biz/luckda 1.0.1-1 → 1.0.1-3

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 (43) hide show
  1. package/es/components/LdFormList/index.js +4 -2
  2. package/es/components/LdGridForm/index.js +34 -24
  3. package/es/locales/zh-CN.js +3 -3
  4. package/es/lowcode/engine/meta/cardlist.props.default.json +1 -0
  5. package/es/lowcode/engine/meta/cardlist.props.json +1 -0
  6. package/es/lowcode/engine/meta/components-list.json +0 -132
  7. package/es/lowcode/engine/meta/drawer.props.default.json +1 -0
  8. package/es/lowcode/engine/meta/drawer.props.json +1 -0
  9. package/es/lowcode/engine/meta/iframe.props.default.json +1 -0
  10. package/es/lowcode/engine/meta/iframe.props.json +1 -0
  11. package/es/lowcode/engine/meta/image.props.default.json +1 -0
  12. package/es/lowcode/engine/meta/image.props.json +1 -0
  13. package/es/lowcode/engine/meta/link.props.default.json +1 -0
  14. package/es/lowcode/engine/meta/link.props.json +1 -0
  15. package/es/lowcode/painter/components/field-setting/SettingUI.js +8 -4
  16. package/es/lowcode/view/lc-components/CardList/meta.json +1 -0
  17. package/es/lowcode/view/lc-components/Drawer/meta.json +1 -0
  18. package/es/lowcode/view/lc-components/Form/index.js +2 -1
  19. package/es/lowcode/view/lc-components/Iframe/meta.json +1 -0
  20. package/es/lowcode/view/lc-components/Image/meta.json +1 -0
  21. package/es/lowcode/view/lc-components/Link/meta.json +1 -0
  22. package/lib/components/LdFormList/index.js +4 -2
  23. package/lib/components/LdGridForm/index.js +34 -24
  24. package/lib/locales/zh-CN.js +3 -3
  25. package/lib/lowcode/engine/meta/cardlist.props.default.json +1 -0
  26. package/lib/lowcode/engine/meta/cardlist.props.json +1 -0
  27. package/lib/lowcode/engine/meta/components-list.json +0 -132
  28. package/lib/lowcode/engine/meta/drawer.props.default.json +1 -0
  29. package/lib/lowcode/engine/meta/drawer.props.json +1 -0
  30. package/lib/lowcode/engine/meta/iframe.props.default.json +1 -0
  31. package/lib/lowcode/engine/meta/iframe.props.json +1 -0
  32. package/lib/lowcode/engine/meta/image.props.default.json +1 -0
  33. package/lib/lowcode/engine/meta/image.props.json +1 -0
  34. package/lib/lowcode/engine/meta/link.props.default.json +1 -0
  35. package/lib/lowcode/engine/meta/link.props.json +1 -0
  36. package/lib/lowcode/painter/components/field-setting/SettingUI.js +8 -4
  37. package/lib/lowcode/view/lc-components/CardList/meta.json +1 -0
  38. package/lib/lowcode/view/lc-components/Drawer/meta.json +1 -0
  39. package/lib/lowcode/view/lc-components/Form/index.js +2 -1
  40. package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -0
  41. package/lib/lowcode/view/lc-components/Image/meta.json +1 -0
  42. package/lib/lowcode/view/lc-components/Link/meta.json +1 -0
  43. package/package.json +1 -1
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
7
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
8
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
9
- var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading"],
9
+ var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading", "showConfigBtn"],
10
10
  _excluded2 = ["dataSets", "doAction", "resources"],
11
11
  _excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
12
12
  _excluded4 = ["ldId", "initData", "overModel"];
@@ -59,6 +59,8 @@ var LdFormList = function LdFormList(_ref) {
59
59
  bpmButtonProps = _ref$bpmButtonProps === void 0 ? {} : _ref$bpmButtonProps,
60
60
  setVerifyRules = _ref.setVerifyRules,
61
61
  afterSubmitLoading = _ref.afterSubmitLoading,
62
+ _ref$showConfigBtn = _ref.showConfigBtn,
63
+ showConfigBtn = _ref$showConfigBtn === void 0 ? true : _ref$showConfigBtn,
62
64
  props = _objectWithoutProperties(_ref, _excluded);
63
65
  var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
64
66
  var currentValueRef = useRef(null);
@@ -121,7 +123,7 @@ var LdFormList = function LdFormList(_ref) {
121
123
  return /*#__PURE__*/React.createElement(FormBtn, _extends({
122
124
  type: type,
123
125
  formId: formId,
124
- showConfigBtn: false
126
+ showConfigBtn: showConfigBtn
125
127
  }, extraConfig));
126
128
  });
127
129
 
@@ -70,33 +70,43 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
70
70
  var keys = isEmpty(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
71
71
  var _defaultValues = {};
72
72
  var _nodes = reduce(keys, function (result, key) {
73
+ var _customColumn;
73
74
  var setting = fieldsObj[key];
74
75
  var col = columnsObj[key];
75
- if (col !== null && col !== void 0 && col.isShowInForm) {
76
- var _customColumn;
77
- var customColumn = columnsRewrite.find(function (column) {
78
- return column.field === col.aliaName;
79
- }) || {};
80
- if (col.isReadOnly) customColumn = _objectSpread(_objectSpread({}, customColumn), {}, {
81
- editable: false,
82
- mode: 'grid'
83
- });
84
- _defaultValues = _objectSpread(_objectSpread({}, _defaultValues), {}, _defineProperty(_defineProperty({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
85
- var newCol = _objectSpread(_objectSpread({}, col), {}, {
86
- setVerifyRules: setVerifyRules,
87
- fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
88
- });
89
- var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip'];
90
- result.push(getFormColumn(type, newCol, _objectSpread(_objectSpread(_objectSpread({}, pick(setting, defaultSet)), customColumn), {}, {
91
- formItemRewrite: _objectSpread(_objectSpread({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
92
- moduleCode: moduleCode,
93
- formRef: formRef,
94
- formMode: formMode,
95
- render: setting === null || setting === void 0 ? void 0 : setting.render,
96
- setting: omit(setting, [].concat(defaultSet, ['uid', 'field', 'render']))
97
- })
98
- })));
76
+ if (!(col !== null && col !== void 0 && col.isShowInForm) && !(col !== null && col !== void 0 && col.isShowInGrid)) {
77
+ return result;
99
78
  }
79
+ var customColumn = columnsRewrite.find(function (column) {
80
+ return column.field === col.aliaName;
81
+ }) || {};
82
+ if (col !== null && col !== void 0 && col.isShowInForm && !(col !== null && col !== void 0 && col.isShowInGrid)) {
83
+ customColumn.mode = 'form';
84
+ } else if (!(col !== null && col !== void 0 && col.isShowInForm) && col !== null && col !== void 0 && col.isShowInGrid) {
85
+ customColumn.mode = 'grid';
86
+ }
87
+ if (col.isReadOnly) customColumn = _objectSpread(_objectSpread({}, customColumn), {}, {
88
+ editable: false,
89
+ formItemProps: function formItemProps() {
90
+ return {
91
+ readOnly: true
92
+ };
93
+ }
94
+ });
95
+ _defaultValues = _objectSpread(_objectSpread({}, _defaultValues), {}, _defineProperty(_defineProperty({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
96
+ var newCol = _objectSpread(_objectSpread({}, col), {}, {
97
+ setVerifyRules: setVerifyRules,
98
+ fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
99
+ });
100
+ var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip', 'formMode'];
101
+ result.push(getFormColumn(type, newCol, _objectSpread(_objectSpread(_objectSpread({}, pick(setting, defaultSet)), customColumn), {}, {
102
+ formItemRewrite: _objectSpread(_objectSpread({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
103
+ moduleCode: moduleCode,
104
+ formRef: formRef,
105
+ formMode: formMode,
106
+ render: setting === null || setting === void 0 ? void 0 : setting.render,
107
+ setting: omit(setting, [].concat(defaultSet, ['uid', 'field', 'render']))
108
+ })
109
+ })));
100
110
  return result;
101
111
  }, []);
102
112
  defaultValues.current = _defaultValues;
@@ -227,15 +227,15 @@ export default {
227
227
  "luckda.lowcode.painter.panel-section.fieldsSetting.fixed.none": "不固定",
228
228
  "luckda.lowcode.painter.panel-section.fieldsSetting.fixed.left": "左",
229
229
  "luckda.lowcode.painter.panel-section.fieldsSetting.fixed.right": "右",
230
- "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.single": "行修改",
231
- "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.bulk": "批量修改",
230
+ "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.single": "单行",
231
+ "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.bulk": "批量",
232
232
  "luckda.lowcode.painter.delete.tip": "确定删除吗?",
233
233
  "luckda.lowcode.painter.panel-section.fieldsSetting.width": "列宽",
234
234
  "luckda.lowcode.painter.panel-section.fieldsSetting.align": "内容对齐",
235
235
  "luckda.lowcode.painter.panel-section.fieldsSetting.headerAlign": "表头对齐",
236
236
  "luckda.lowcode.painter.panel-section.fieldsSetting.pinned": "固定列",
237
237
  "luckda.lowcode.painter.panel-section.fieldsSetting.tip": "过长提示",
238
- "luckda.lowcode.painter.panel-section.fieldsSetting.formMode": "表单模式",
238
+ "luckda.lowcode.painter.panel-section.fieldsSetting.formMode": "修改方式",
239
239
  "luckda.lowcode.painter.panel-section.fieldsSetting.fieldColumn": "占列数",
240
240
  "luckda.lowcode.painter.panel-section.fieldsSetting.isEqual": "唯一校验",
241
241
  "luckda.lowcode.painter.panel-section.fieldsSetting.required": "是否必填",
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-cardlist",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "autoLoad": true,
10
11
  "readOnly": false,
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-cardlist",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -57,24 +57,6 @@
57
57
  "desc": "需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 Modal 在当前页面正中打开一个浮层,承载相应的操作。",
58
58
  "icon": "icon-dialog"
59
59
  },
60
- {
61
- "component": "Drawer",
62
- "name": "抽屉",
63
- "desc": "抽屉从父窗体边缘滑入,覆盖住部分父窗体内容。用户在抽屉内操作时不必离开当前任务,操作完成后,可以平滑地回到原任务。",
64
- "icon": "icon-drawer"
65
- },
66
- {
67
- "component": "Iframe",
68
- "name": "Iframe",
69
- "desc": "用于在当前文档中嵌入另一个独立的 HTML 文档、网页或其他类型的媒体内容。它提供了一种将外部内容嵌入到网页中的方法。",
70
- "icon": "icon-iframe"
71
- },
72
- {
73
- "component": "Image",
74
- "name": "图片",
75
- "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
76
- "icon": "icon-image"
77
- },
78
60
  {
79
61
  "component": "ImEx",
80
62
  "name": "导入导出",
@@ -87,12 +69,6 @@
87
69
  "desc": "通过编写JSX代码实现React组件的动态渲染。",
88
70
  "icon": "icon-jsx"
89
71
  },
90
- {
91
- "component": "Link",
92
- "name": "超链",
93
- "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
94
- "icon": "icon-link"
95
- },
96
72
  {
97
73
  "component": "Text",
98
74
  "name": "文本",
@@ -101,118 +77,10 @@
101
77
  }
102
78
  ]
103
79
  },
104
- {
105
- "group": "field",
106
- "groupName": "表单项",
107
- "components": [
108
- {
109
- "component": "FieldColor",
110
- "name": "颜色",
111
- "desc": "颜色类型表单项",
112
- "icon": "icon-fieldstring"
113
- },
114
- {
115
- "component": "FieldComplex",
116
- "name": "复合",
117
- "desc": "复合类型表单项",
118
- "icon": "icon-fieldstring"
119
- },
120
- {
121
- "component": "FieldDate",
122
- "name": "日期",
123
- "desc": "日期类型表单项",
124
- "icon": "icon-fieldstring"
125
- },
126
- {
127
- "component": "FieldDict",
128
- "name": "数据字典",
129
- "desc": "数据字典类型表单项",
130
- "icon": "icon-fieldstring"
131
- },
132
- {
133
- "component": "FieldEditor",
134
- "name": "富文本",
135
- "desc": "富文本类型表单项",
136
- "icon": "icon-fieldstring"
137
- },
138
- {
139
- "component": "FieldGroup",
140
- "name": "组维度",
141
- "desc": "组维度类型表单项",
142
- "icon": "icon-fieldstring"
143
- },
144
- {
145
- "component": "FieldNumber",
146
- "name": "数字",
147
- "desc": "数字类型表单项",
148
- "icon": "icon-fieldstring"
149
- },
150
- {
151
- "component": "FieldRadio",
152
- "name": "单选组件",
153
- "desc": "圆形单选表单项",
154
- "icon": "icon-fieldstring"
155
- },
156
- {
157
- "component": "FieldRegion",
158
- "name": "省市区选择",
159
- "desc": "省市区级联选择表单项",
160
- "icon": "icon-fieldstring"
161
- },
162
- {
163
- "component": "FieldSelect",
164
- "name": "下拉选择器",
165
- "desc": "下拉选择器,支持单选、多选、tag标签选择",
166
- "icon": "icon-fieldstring"
167
- },
168
- {
169
- "component": "FieldString",
170
- "name": "字符串",
171
- "desc": "字符串类型表单项",
172
- "icon": "icon-fieldstring"
173
- },
174
- {
175
- "component": "FieldSwitch",
176
- "name": "开关",
177
- "desc": "开关类型表单项",
178
- "icon": "icon-fieldstring"
179
- },
180
- {
181
- "component": "FieldTextarea",
182
- "name": "文本框",
183
- "desc": "文本框类型表单项",
184
- "icon": "icon-fieldstring"
185
- },
186
- {
187
- "component": "FieldUpload",
188
- "name": "附件上传",
189
- "desc": "附件上传表单项",
190
- "icon": "icon-fieldstring"
191
- },
192
- {
193
- "component": "FieldUser",
194
- "name": "用户",
195
- "desc": "用户类型表单项",
196
- "icon": "icon-fieldstring"
197
- },
198
- {
199
- "component": "FieldYear",
200
- "name": "年份选择",
201
- "desc": "年份选择表单项",
202
- "icon": "icon-fieldstring"
203
- }
204
- ]
205
- },
206
80
  {
207
81
  "group": "advance",
208
82
  "groupName": "高级",
209
83
  "components": [
210
- {
211
- "component": "CardList",
212
- "name": "卡片列表",
213
- "desc": "用于以卡片的形式展示相关的信息或内容列表。它提供了一种可视化的方式来呈现多个项目,每个项目通常由一个卡片表示,包含相关的文本、图像和其他元素。",
214
- "icon": "icon-cardlist"
215
- },
216
84
  {
217
85
  "component": "Form",
218
86
  "name": "复杂表单",
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-drawer",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "title": "抽屉",
10
11
  "width": 420,
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-drawer",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-iframe",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "css": "",
10
11
  "supportFullScreen": true
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-iframe",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "css": "",
10
11
  "width": 350,
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "css": "",
10
11
  "textOverflow": false,
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -61,13 +61,13 @@ var _PINNED_OPTIONS_ = [{
61
61
  var _FORM_MODE_OPTIONS_ = [{
62
62
  label: formatMessage({
63
63
  id: "".concat(_I18N_PREFIX_, ".formMode.single"),
64
- label: '行修改'
64
+ label: '单行'
65
65
  }),
66
66
  value: 'single'
67
67
  }, {
68
68
  label: formatMessage({
69
69
  id: "".concat(_I18N_PREFIX_, ".formMode.bulk"),
70
- label: '批量修改'
70
+ label: '批量'
71
71
  }),
72
72
  value: 'bulk'
73
73
  }];
@@ -84,6 +84,10 @@ var StyledRadio = styled(Radio.Group).withConfig({
84
84
  displayName: "StyledRadio",
85
85
  componentId: "luckda-6530__sc-1n41f3z-2"
86
86
  })(["span.ant-radio + *{padding-left:4px;padding-right:4px;}"]);
87
+ var StyledCheckbox = styled(Checkbox.Group).withConfig({
88
+ displayName: "StyledCheckbox",
89
+ componentId: "luckda-6530__sc-1n41f3z-3"
90
+ })([".ant-checkbox-wrapper{font-size:12px;}"]);
87
91
  var _DEFAULT_RENDER_CODE = "function render(value, data, rowIndex, params) { \n return value;\n}";
88
92
  var SettingUI = function SettingUI(_ref) {
89
93
  var loading = _ref.loading,
@@ -333,9 +337,9 @@ var SettingUI = function SettingUI(_ref) {
333
337
  }))), component === 'tableForm' && /*#__PURE__*/React.createElement(PanelItem, {
334
338
  label: formatMessage({
335
339
  id: "".concat(_I18N_PREFIX_, ".formMode"),
336
- label: '表单模式'
340
+ label: '修改方式'
337
341
  })
338
- }, /*#__PURE__*/React.createElement(Checkbox.Group, {
342
+ }, /*#__PURE__*/React.createElement(StyledCheckbox, {
339
343
  options: _FORM_MODE_OPTIONS_,
340
344
  defaultValue: fieldData.formMode ? [fieldData.formMode] : ['single', 'bulk'],
341
345
  onChange: function onChange(val) {
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-cardlist",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-drawer",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -593,7 +593,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
593
593
  return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
594
594
  },
595
595
  afterInit: afterInit,
596
- validateErrorCallback: (_promiseRef$current2 = promiseRef.current) === null || _promiseRef$current2 === void 0 ? void 0 : _promiseRef$current2.call(promiseRef)
596
+ validateErrorCallback: (_promiseRef$current2 = promiseRef.current) === null || _promiseRef$current2 === void 0 ? void 0 : _promiseRef$current2.call(promiseRef),
597
+ showConfigBtn: false
597
598
  }));
598
599
  });
599
600
  LCForm.defaultProps = omitBadProps(defaultMeta);
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-iframe",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -31,7 +31,7 @@ var _LdPop = require("../LdPop");
31
31
  var _model = _interopRequireDefault(require("./model"));
32
32
  var _action = require("../../helper/action");
33
33
  var _utils2 = require("../../lowcode/engine/provider/ContextProvider/utils");
34
- var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading"],
34
+ var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading", "showConfigBtn"],
35
35
  _excluded2 = ["dataSets", "doAction", "resources"],
36
36
  _excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
37
37
  _excluded4 = ["ldId", "initData", "overModel"];
@@ -66,6 +66,8 @@ var LdFormList = function LdFormList(_ref) {
66
66
  bpmButtonProps = _ref$bpmButtonProps === void 0 ? {} : _ref$bpmButtonProps,
67
67
  setVerifyRules = _ref.setVerifyRules,
68
68
  afterSubmitLoading = _ref.afterSubmitLoading,
69
+ _ref$showConfigBtn = _ref.showConfigBtn,
70
+ showConfigBtn = _ref$showConfigBtn === void 0 ? true : _ref$showConfigBtn,
69
71
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
70
72
  var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
71
73
  var currentValueRef = (0, _react.useRef)(null);
@@ -128,7 +130,7 @@ var LdFormList = function LdFormList(_ref) {
128
130
  return /*#__PURE__*/_react.default.createElement(_FormList.FormBtn, (0, _extends2.default)({
129
131
  type: type,
130
132
  formId: formId,
131
- showConfigBtn: false
133
+ showConfigBtn: showConfigBtn
132
134
  }, extraConfig));
133
135
  });
134
136
 
@@ -78,33 +78,43 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
78
78
  var keys = (0, _lodash.isEmpty)(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
79
79
  var _defaultValues = {};
80
80
  var _nodes = (0, _lodash.reduce)(keys, function (result, key) {
81
+ var _customColumn;
81
82
  var setting = fieldsObj[key];
82
83
  var col = columnsObj[key];
83
- if (col !== null && col !== void 0 && col.isShowInForm) {
84
- var _customColumn;
85
- var customColumn = columnsRewrite.find(function (column) {
86
- return column.field === col.aliaName;
87
- }) || {};
88
- if (col.isReadOnly) customColumn = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, customColumn), {}, {
89
- editable: false,
90
- mode: 'grid'
91
- });
92
- _defaultValues = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, _defaultValues), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
93
- var newCol = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
94
- setVerifyRules: setVerifyRules,
95
- fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
96
- });
97
- var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip'];
98
- result.push((0, _utils.getFormColumn)(type, newCol, (0, _objectSpread4.default)((0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _lodash.pick)(setting, defaultSet)), customColumn), {}, {
99
- formItemRewrite: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
100
- moduleCode: moduleCode,
101
- formRef: formRef,
102
- formMode: formMode,
103
- render: setting === null || setting === void 0 ? void 0 : setting.render,
104
- setting: (0, _lodash.omit)(setting, [].concat(defaultSet, ['uid', 'field', 'render']))
105
- })
106
- })));
84
+ if (!(col !== null && col !== void 0 && col.isShowInForm) && !(col !== null && col !== void 0 && col.isShowInGrid)) {
85
+ return result;
107
86
  }
87
+ var customColumn = columnsRewrite.find(function (column) {
88
+ return column.field === col.aliaName;
89
+ }) || {};
90
+ if (col !== null && col !== void 0 && col.isShowInForm && !(col !== null && col !== void 0 && col.isShowInGrid)) {
91
+ customColumn.mode = 'form';
92
+ } else if (!(col !== null && col !== void 0 && col.isShowInForm) && col !== null && col !== void 0 && col.isShowInGrid) {
93
+ customColumn.mode = 'grid';
94
+ }
95
+ if (col.isReadOnly) customColumn = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, customColumn), {}, {
96
+ editable: false,
97
+ formItemProps: function formItemProps() {
98
+ return {
99
+ readOnly: true
100
+ };
101
+ }
102
+ });
103
+ _defaultValues = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, _defaultValues), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
104
+ var newCol = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
105
+ setVerifyRules: setVerifyRules,
106
+ fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
107
+ });
108
+ var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip', 'formMode'];
109
+ result.push((0, _utils.getFormColumn)(type, newCol, (0, _objectSpread4.default)((0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _lodash.pick)(setting, defaultSet)), customColumn), {}, {
110
+ formItemRewrite: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
111
+ moduleCode: moduleCode,
112
+ formRef: formRef,
113
+ formMode: formMode,
114
+ render: setting === null || setting === void 0 ? void 0 : setting.render,
115
+ setting: (0, _lodash.omit)(setting, [].concat(defaultSet, ['uid', 'field', 'render']))
116
+ })
117
+ })));
108
118
  return result;
109
119
  }, []);
110
120
  defaultValues.current = _defaultValues;
@@ -233,15 +233,15 @@ var _default = exports.default = {
233
233
  "luckda.lowcode.painter.panel-section.fieldsSetting.fixed.none": "不固定",
234
234
  "luckda.lowcode.painter.panel-section.fieldsSetting.fixed.left": "左",
235
235
  "luckda.lowcode.painter.panel-section.fieldsSetting.fixed.right": "右",
236
- "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.single": "行修改",
237
- "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.bulk": "批量修改",
236
+ "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.single": "单行",
237
+ "luckda.lowcode.painter.panel-section.fieldsSetting.formMode.bulk": "批量",
238
238
  "luckda.lowcode.painter.delete.tip": "确定删除吗?",
239
239
  "luckda.lowcode.painter.panel-section.fieldsSetting.width": "列宽",
240
240
  "luckda.lowcode.painter.panel-section.fieldsSetting.align": "内容对齐",
241
241
  "luckda.lowcode.painter.panel-section.fieldsSetting.headerAlign": "表头对齐",
242
242
  "luckda.lowcode.painter.panel-section.fieldsSetting.pinned": "固定列",
243
243
  "luckda.lowcode.painter.panel-section.fieldsSetting.tip": "过长提示",
244
- "luckda.lowcode.painter.panel-section.fieldsSetting.formMode": "表单模式",
244
+ "luckda.lowcode.painter.panel-section.fieldsSetting.formMode": "修改方式",
245
245
  "luckda.lowcode.painter.panel-section.fieldsSetting.fieldColumn": "占列数",
246
246
  "luckda.lowcode.painter.panel-section.fieldsSetting.isEqual": "唯一校验",
247
247
  "luckda.lowcode.painter.panel-section.fieldsSetting.required": "是否必填",
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-cardlist",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "autoLoad": true,
10
11
  "readOnly": false,
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-cardlist",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -57,24 +57,6 @@
57
57
  "desc": "需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 Modal 在当前页面正中打开一个浮层,承载相应的操作。",
58
58
  "icon": "icon-dialog"
59
59
  },
60
- {
61
- "component": "Drawer",
62
- "name": "抽屉",
63
- "desc": "抽屉从父窗体边缘滑入,覆盖住部分父窗体内容。用户在抽屉内操作时不必离开当前任务,操作完成后,可以平滑地回到原任务。",
64
- "icon": "icon-drawer"
65
- },
66
- {
67
- "component": "Iframe",
68
- "name": "Iframe",
69
- "desc": "用于在当前文档中嵌入另一个独立的 HTML 文档、网页或其他类型的媒体内容。它提供了一种将外部内容嵌入到网页中的方法。",
70
- "icon": "icon-iframe"
71
- },
72
- {
73
- "component": "Image",
74
- "name": "图片",
75
- "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
76
- "icon": "icon-image"
77
- },
78
60
  {
79
61
  "component": "ImEx",
80
62
  "name": "导入导出",
@@ -87,12 +69,6 @@
87
69
  "desc": "通过编写JSX代码实现React组件的动态渲染。",
88
70
  "icon": "icon-jsx"
89
71
  },
90
- {
91
- "component": "Link",
92
- "name": "超链",
93
- "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
94
- "icon": "icon-link"
95
- },
96
72
  {
97
73
  "component": "Text",
98
74
  "name": "文本",
@@ -101,118 +77,10 @@
101
77
  }
102
78
  ]
103
79
  },
104
- {
105
- "group": "field",
106
- "groupName": "表单项",
107
- "components": [
108
- {
109
- "component": "FieldColor",
110
- "name": "颜色",
111
- "desc": "颜色类型表单项",
112
- "icon": "icon-fieldstring"
113
- },
114
- {
115
- "component": "FieldComplex",
116
- "name": "复合",
117
- "desc": "复合类型表单项",
118
- "icon": "icon-fieldstring"
119
- },
120
- {
121
- "component": "FieldDate",
122
- "name": "日期",
123
- "desc": "日期类型表单项",
124
- "icon": "icon-fieldstring"
125
- },
126
- {
127
- "component": "FieldDict",
128
- "name": "数据字典",
129
- "desc": "数据字典类型表单项",
130
- "icon": "icon-fieldstring"
131
- },
132
- {
133
- "component": "FieldEditor",
134
- "name": "富文本",
135
- "desc": "富文本类型表单项",
136
- "icon": "icon-fieldstring"
137
- },
138
- {
139
- "component": "FieldGroup",
140
- "name": "组维度",
141
- "desc": "组维度类型表单项",
142
- "icon": "icon-fieldstring"
143
- },
144
- {
145
- "component": "FieldNumber",
146
- "name": "数字",
147
- "desc": "数字类型表单项",
148
- "icon": "icon-fieldstring"
149
- },
150
- {
151
- "component": "FieldRadio",
152
- "name": "单选组件",
153
- "desc": "圆形单选表单项",
154
- "icon": "icon-fieldstring"
155
- },
156
- {
157
- "component": "FieldRegion",
158
- "name": "省市区选择",
159
- "desc": "省市区级联选择表单项",
160
- "icon": "icon-fieldstring"
161
- },
162
- {
163
- "component": "FieldSelect",
164
- "name": "下拉选择器",
165
- "desc": "下拉选择器,支持单选、多选、tag标签选择",
166
- "icon": "icon-fieldstring"
167
- },
168
- {
169
- "component": "FieldString",
170
- "name": "字符串",
171
- "desc": "字符串类型表单项",
172
- "icon": "icon-fieldstring"
173
- },
174
- {
175
- "component": "FieldSwitch",
176
- "name": "开关",
177
- "desc": "开关类型表单项",
178
- "icon": "icon-fieldstring"
179
- },
180
- {
181
- "component": "FieldTextarea",
182
- "name": "文本框",
183
- "desc": "文本框类型表单项",
184
- "icon": "icon-fieldstring"
185
- },
186
- {
187
- "component": "FieldUpload",
188
- "name": "附件上传",
189
- "desc": "附件上传表单项",
190
- "icon": "icon-fieldstring"
191
- },
192
- {
193
- "component": "FieldUser",
194
- "name": "用户",
195
- "desc": "用户类型表单项",
196
- "icon": "icon-fieldstring"
197
- },
198
- {
199
- "component": "FieldYear",
200
- "name": "年份选择",
201
- "desc": "年份选择表单项",
202
- "icon": "icon-fieldstring"
203
- }
204
- ]
205
- },
206
80
  {
207
81
  "group": "advance",
208
82
  "groupName": "高级",
209
83
  "components": [
210
- {
211
- "component": "CardList",
212
- "name": "卡片列表",
213
- "desc": "用于以卡片的形式展示相关的信息或内容列表。它提供了一种可视化的方式来呈现多个项目,每个项目通常由一个卡片表示,包含相关的文本、图像和其他元素。",
214
- "icon": "icon-cardlist"
215
- },
216
84
  {
217
85
  "component": "Form",
218
86
  "name": "复杂表单",
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-drawer",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "title": "抽屉",
10
11
  "width": 420,
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-drawer",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-iframe",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "css": "",
10
11
  "supportFullScreen": true
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-iframe",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "css": "",
10
11
  "width": 350,
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "css": "",
10
11
  "textOverflow": false,
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -69,13 +69,13 @@ var _PINNED_OPTIONS_ = [{
69
69
  var _FORM_MODE_OPTIONS_ = [{
70
70
  label: (0, _utils.formatMessage)({
71
71
  id: "".concat(_I18N_PREFIX_, ".formMode.single"),
72
- label: '行修改'
72
+ label: '单行'
73
73
  }),
74
74
  value: 'single'
75
75
  }, {
76
76
  label: (0, _utils.formatMessage)({
77
77
  id: "".concat(_I18N_PREFIX_, ".formMode.bulk"),
78
- label: '批量修改'
78
+ label: '批量'
79
79
  }),
80
80
  value: 'bulk'
81
81
  }];
@@ -92,6 +92,10 @@ var StyledRadio = (0, _styledComponents.default)(_antd.Radio.Group).withConfig({
92
92
  displayName: "StyledRadio",
93
93
  componentId: "luckda-6530__sc-1n41f3z-2"
94
94
  })(["span.ant-radio + *{padding-left:4px;padding-right:4px;}"]);
95
+ var StyledCheckbox = (0, _styledComponents.default)(_antd.Checkbox.Group).withConfig({
96
+ displayName: "StyledCheckbox",
97
+ componentId: "luckda-6530__sc-1n41f3z-3"
98
+ })([".ant-checkbox-wrapper{font-size:12px;}"]);
95
99
  var _DEFAULT_RENDER_CODE = "function render(value, data, rowIndex, params) { \n return value;\n}";
96
100
  var SettingUI = function SettingUI(_ref) {
97
101
  var loading = _ref.loading,
@@ -341,9 +345,9 @@ var SettingUI = function SettingUI(_ref) {
341
345
  }))), component === 'tableForm' && /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
342
346
  label: (0, _utils.formatMessage)({
343
347
  id: "".concat(_I18N_PREFIX_, ".formMode"),
344
- label: '表单模式'
348
+ label: '修改方式'
345
349
  })
346
- }, /*#__PURE__*/_react.default.createElement(_antd.Checkbox.Group, {
350
+ }, /*#__PURE__*/_react.default.createElement(StyledCheckbox, {
347
351
  options: _FORM_MODE_OPTIONS_,
348
352
  defaultValue: fieldData.formMode ? [fieldData.formMode] : ['single', 'bulk'],
349
353
  onChange: function onChange(val) {
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-cardlist",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-drawer",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -601,7 +601,8 @@ var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
601
601
  return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
602
602
  },
603
603
  afterInit: afterInit,
604
- validateErrorCallback: (_promiseRef$current2 = promiseRef.current) === null || _promiseRef$current2 === void 0 ? void 0 : _promiseRef$current2.call(promiseRef)
604
+ validateErrorCallback: (_promiseRef$current2 = promiseRef.current) === null || _promiseRef$current2 === void 0 ? void 0 : _promiseRef$current2.call(promiseRef),
605
+ showConfigBtn: false
605
606
  }));
606
607
  });
607
608
  LCForm.defaultProps = (0, _helper.omitBadProps)(_formPropsDefault.default);
@@ -5,6 +5,7 @@
5
5
  "icon": "icon-iframe",
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
@@ -5,6 +5,7 @@
5
5
  "group": "basic",
6
6
  "groupName": "基础",
7
7
  "desc": "用于创建可点击的链接,以便用户可以跳转到其他页面或访问相关内容。超链组件提供了简单而直观的方式来创建和管理链接。",
8
+ "hidden": true,
8
9
  "order": 1,
9
10
  "props": [
10
11
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luck-design-biz/luckda",
3
- "version": "1.0.1-1",
3
+ "version": "1.0.1-3",
4
4
  "description": "前端配置管理中心业务组件库",
5
5
  "scripts": {
6
6
  "start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",