@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.
- package/LICENSE +21 -21
- package/README.md +40 -49
- package/es/components/Builder/index.js +4 -4
- package/es/components/LdAutoForm/index.js +7 -9
- package/es/components/LdCard/index.js +5 -6
- package/es/components/LdCard/model.js +1 -1
- package/es/components/LdCom/index.js +2 -2
- package/es/components/LdFormList/index.js +19 -17
- package/es/components/LdGrid/index.js +11 -12
- package/es/components/LdGrid/model.js +1 -1
- package/es/components/LdGridForm/index.js +10 -10
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdInfoPanel/index.js +2 -2
- package/es/components/LdRuntimeCom/index.js +42 -0
- package/es/components/LdTree/index.js +3 -4
- package/es/components/LdTree/index.less +36 -36
- package/es/helper/FromItems.js +1 -1
- package/es/helper/action.js +8 -8
- package/es/helper/form.js +16 -16
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +1 -1
- package/es/helper/ldComBuild.js +4 -4
- package/es/index.js +10 -9
- package/es/lowcode/constants/api-url.js +2 -0
- package/es/lowcode/constants/event-topics.js +23 -0
- package/es/lowcode/constants/index.js +12 -0
- package/es/lowcode/engine/factory/DataFactory.js +1 -0
- package/es/lowcode/engine/meta/button.props.default.json +8 -0
- package/es/lowcode/engine/meta/cardlist.props.default.json +10 -0
- package/es/lowcode/engine/meta/components/button.json +104 -0
- package/es/lowcode/engine/meta/components/card-list.json +143 -0
- package/es/lowcode/engine/meta/components/drawer.json +143 -0
- package/es/lowcode/engine/meta/components/form.json +116 -0
- package/es/lowcode/engine/meta/components/iframe.json +31 -0
- package/es/lowcode/engine/meta/components/image.json +113 -0
- package/es/lowcode/engine/meta/components/imex.json +81 -0
- package/es/lowcode/engine/meta/components/jsx.json +24 -0
- package/es/lowcode/engine/meta/components/layout.json +107 -0
- package/es/lowcode/engine/meta/components/link.json +111 -0
- package/es/lowcode/engine/meta/components/modal.json +120 -0
- package/es/lowcode/engine/meta/components/section.json +107 -0
- package/es/lowcode/engine/meta/components/split.json +71 -0
- package/es/lowcode/engine/meta/components/table.json +161 -0
- package/es/lowcode/engine/meta/components/tabs.json +140 -0
- package/es/lowcode/engine/meta/components/text.json +65 -0
- package/es/lowcode/engine/meta/components/tree.json +156 -0
- package/es/lowcode/engine/meta/components-list.json +122 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +10 -0
- package/es/lowcode/engine/meta/form.props.default.json +5 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +3 -0
- package/es/lowcode/engine/meta/image.props.default.json +8 -0
- package/es/lowcode/engine/meta/imex.props.default.json +4 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -0
- package/es/lowcode/engine/meta/layout.props.default.json +5 -0
- package/es/lowcode/engine/meta/link.props.default.json +6 -0
- package/es/lowcode/engine/meta/modal.props.default.json +11 -0
- package/es/lowcode/engine/meta/section.props.default.json +9 -0
- package/es/lowcode/engine/meta/split.props.default.json +5 -0
- package/es/lowcode/engine/meta/table.props.default.json +10 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +10 -0
- package/es/lowcode/engine/meta/text.props.default.json +4 -0
- package/es/lowcode/engine/meta/tree.props.default.json +9 -0
- package/es/lowcode/engine/provider/ContextProvider.js +164 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +120 -0
- package/es/lowcode/engine/tools/dataProcess.js +188 -0
- package/es/lowcode/engine/tools/helper.js +4 -0
- package/es/lowcode/engine/tools/lcid.js +16 -0
- package/es/lowcode/index.js +3 -0
- package/es/lowcode/painter/Components.js +104 -0
- package/es/lowcode/painter/Design.js +97 -0
- package/es/lowcode/painter/I18n.js +5 -0
- package/es/lowcode/painter/Outline.js +202 -0
- package/es/lowcode/painter/Panel.js +8 -0
- package/es/lowcode/painter/Ribbon.js +136 -0
- package/es/lowcode/painter/components/PanelItem.js +20 -0
- package/es/lowcode/painter/components/RuleInput.js +105 -0
- package/es/lowcode/painter/index.js +19 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +123 -0
- package/es/lowcode/painter/panel-section/Radio.js +58 -0
- package/es/lowcode/painter/style/components.less +90 -0
- package/es/lowcode/painter/style/design.less +38 -0
- package/es/lowcode/painter/style/index.less +7 -0
- package/es/lowcode/painter/style/layout-ratio.less +51 -0
- package/es/lowcode/painter/style/outline.less +26 -0
- package/es/lowcode/painter/style/panel-item.less +21 -0
- package/es/lowcode/painter/style/panel.less +5 -0
- package/es/lowcode/painter/style/radio.less +24 -0
- package/es/lowcode/painter/style/ribbon.less +4 -0
- package/es/lowcode/painter/style/rule-input.less +13 -0
- package/es/lowcode/view/Canvas.js +135 -0
- package/es/lowcode/view/Loading.js +23 -0
- package/es/lowcode/view/Page.js +55 -0
- package/es/lowcode/view/index.js +18 -0
- package/es/lowcode/view/lc-components/Box/index.js +21 -0
- package/es/lowcode/view/lc-components/Button/index.js +37 -0
- package/es/lowcode/view/lc-components/CardList/index.js +20 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +50 -0
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +46 -0
- package/es/lowcode/view/lc-components/Form/index.js +20 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +20 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +20 -0
- package/es/lowcode/view/lc-components/Image/index.js +20 -0
- package/es/lowcode/view/lc-components/JSX/index.js +20 -0
- package/es/lowcode/view/lc-components/Layout/index.js +24 -0
- package/es/lowcode/view/lc-components/Link/index.js +20 -0
- package/es/lowcode/view/lc-components/Section/index.js +34 -0
- package/es/lowcode/view/lc-components/Split/index.js +21 -0
- package/es/lowcode/view/lc-components/Table/index.js +23 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +21 -0
- package/es/lowcode/view/lc-components/Text/index.js +23 -0
- package/es/lowcode/view/lc-components/Tree/index.js +20 -0
- package/es/lowcode/view/lc-components/Wrapper.js +45 -0
- package/es/lowcode/view/style/canvas.less +5 -0
- package/es/lowcode/view/style/loading.less +84 -0
- package/es/lowcode/view/style/page.less +6 -0
- package/es/services.js +1 -1
- package/es/upload/Form/gridForm.js +29 -7
- package/es/upload/Form/index.js +1 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +30 -18
- package/es/upload/index.js +3 -3
- package/es/utils/action.js +1 -1
- package/es/utils/form.js +26 -26
- package/es/utils/grid.js +22 -26
- package/es/utils/index.js +3 -3
- package/lib/components/Builder/index.js +3 -5
- package/lib/components/LdAutoForm/index.js +5 -8
- package/lib/components/LdCard/index.js +5 -7
- package/lib/components/LdCom/index.js +6 -11
- package/lib/components/LdFormList/index.js +15 -13
- package/lib/components/LdGrid/index.js +10 -12
- package/lib/components/LdGridForm/index.js +6 -7
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdInfoPanel/index.js +2 -3
- package/lib/components/LdPop/index.js +2 -4
- package/lib/components/LdRuntimeCom/index.js +49 -0
- package/lib/components/LdTree/index.js +2 -4
- package/lib/components/LdTree/index.less +36 -36
- package/lib/helper/FromItems.js +15 -29
- package/lib/helper/action.js +9 -11
- package/lib/helper/form.js +18 -20
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +1 -2
- package/lib/helper/ldComBuild.js +7 -11
- package/lib/index.js +9 -1
- package/lib/lowcode/constants/api-url.js +8 -0
- package/lib/lowcode/constants/event-topics.js +29 -0
- package/lib/lowcode/constants/index.js +18 -0
- package/lib/lowcode/engine/factory/DataFactory.js +3 -0
- package/lib/lowcode/engine/meta/button.props.default.json +8 -0
- package/lib/lowcode/engine/meta/cardlist.props.default.json +10 -0
- package/lib/lowcode/engine/meta/components/button.json +104 -0
- package/lib/lowcode/engine/meta/components/card-list.json +143 -0
- package/lib/lowcode/engine/meta/components/drawer.json +143 -0
- package/lib/lowcode/engine/meta/components/form.json +116 -0
- package/lib/lowcode/engine/meta/components/iframe.json +31 -0
- package/lib/lowcode/engine/meta/components/image.json +113 -0
- package/lib/lowcode/engine/meta/components/imex.json +81 -0
- package/lib/lowcode/engine/meta/components/jsx.json +24 -0
- package/lib/lowcode/engine/meta/components/layout.json +107 -0
- package/lib/lowcode/engine/meta/components/link.json +111 -0
- package/lib/lowcode/engine/meta/components/modal.json +120 -0
- package/lib/lowcode/engine/meta/components/section.json +107 -0
- package/lib/lowcode/engine/meta/components/split.json +71 -0
- package/lib/lowcode/engine/meta/components/table.json +161 -0
- package/lib/lowcode/engine/meta/components/tabs.json +140 -0
- package/lib/lowcode/engine/meta/components/text.json +65 -0
- package/lib/lowcode/engine/meta/components/tree.json +156 -0
- package/lib/lowcode/engine/meta/components-list.json +122 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +10 -0
- package/lib/lowcode/engine/meta/form.props.default.json +5 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +3 -0
- package/lib/lowcode/engine/meta/image.props.default.json +8 -0
- package/lib/lowcode/engine/meta/imex.props.default.json +4 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +5 -0
- package/lib/lowcode/engine/meta/link.props.default.json +6 -0
- package/lib/lowcode/engine/meta/modal.props.default.json +11 -0
- package/lib/lowcode/engine/meta/section.props.default.json +9 -0
- package/lib/lowcode/engine/meta/split.props.default.json +5 -0
- package/lib/lowcode/engine/meta/table.props.default.json +10 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +10 -0
- package/lib/lowcode/engine/meta/text.props.default.json +4 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +9 -0
- package/lib/lowcode/engine/provider/ContextProvider.js +172 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +128 -0
- package/lib/lowcode/engine/tools/dataProcess.js +201 -0
- package/lib/lowcode/engine/tools/helper.js +11 -0
- package/lib/lowcode/engine/tools/lcid.js +22 -0
- package/lib/lowcode/index.js +20 -0
- package/lib/lowcode/painter/Components.js +112 -0
- package/lib/lowcode/painter/Design.js +105 -0
- package/lib/lowcode/painter/I18n.js +12 -0
- package/lib/lowcode/painter/Outline.js +210 -0
- package/lib/lowcode/painter/Panel.js +16 -0
- package/lib/lowcode/painter/Ribbon.js +151 -0
- package/lib/lowcode/painter/components/PanelItem.js +26 -0
- package/lib/lowcode/painter/components/RuleInput.js +112 -0
- package/lib/lowcode/painter/index.js +26 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +131 -0
- package/lib/lowcode/painter/panel-section/Radio.js +65 -0
- package/lib/lowcode/painter/style/components.less +90 -0
- package/lib/lowcode/painter/style/design.less +38 -0
- package/lib/lowcode/painter/style/index.less +7 -0
- package/lib/lowcode/painter/style/layout-ratio.less +51 -0
- package/lib/lowcode/painter/style/outline.less +26 -0
- package/lib/lowcode/painter/style/panel-item.less +21 -0
- package/lib/lowcode/painter/style/panel.less +5 -0
- package/lib/lowcode/painter/style/radio.less +24 -0
- package/lib/lowcode/painter/style/ribbon.less +4 -0
- package/lib/lowcode/painter/style/rule-input.less +13 -0
- package/lib/lowcode/view/Canvas.js +150 -0
- package/lib/lowcode/view/Loading.js +30 -0
- package/lib/lowcode/view/Page.js +63 -0
- package/lib/lowcode/view/index.js +25 -0
- package/lib/lowcode/view/lc-components/Box/index.js +29 -0
- package/lib/lowcode/view/lc-components/Button/index.js +45 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +28 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +58 -0
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +54 -0
- package/lib/lowcode/view/lc-components/Form/index.js +28 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +28 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +28 -0
- package/lib/lowcode/view/lc-components/Image/index.js +28 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +28 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +32 -0
- package/lib/lowcode/view/lc-components/Link/index.js +28 -0
- package/lib/lowcode/view/lc-components/Section/index.js +42 -0
- package/lib/lowcode/view/lc-components/Split/index.js +29 -0
- package/lib/lowcode/view/lc-components/Table/index.js +31 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +29 -0
- package/lib/lowcode/view/lc-components/Text/index.js +31 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +28 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +52 -0
- package/lib/lowcode/view/style/canvas.less +5 -0
- package/lib/lowcode/view/style/loading.less +84 -0
- package/lib/lowcode/view/style/page.less +6 -0
- package/lib/upload/Form/gridForm.js +27 -6
- package/lib/upload/Form/index.js +1 -2
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +30 -19
- package/lib/upload/GridCell/index.js +1 -2
- package/lib/utils/form.js +26 -29
- package/lib/utils/grid.js +23 -28
- package/lowcode.js +1 -0
- package/package.json +157 -78
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/README.zh-CN.md +0 -51
package/lib/utils/form.js
CHANGED
|
@@ -26,11 +26,11 @@ var _excluded = ["comName", "property"],
|
|
|
26
26
|
_excluded7 = ["formItemRewrite"],
|
|
27
27
|
_excluded8 = ["name"],
|
|
28
28
|
_excluded9 = ["type", "name"];
|
|
29
|
-
/**
|
|
30
|
-
* 根据动态表单配置项生成formItem
|
|
31
|
-
* @param {动态表单配置项} props
|
|
32
|
-
* @param {自定义动态表单配置项} customProps
|
|
33
|
-
* @returns <BasicForm name='' ... />
|
|
29
|
+
/**
|
|
30
|
+
* 根据动态表单配置项生成formItem
|
|
31
|
+
* @param {动态表单配置项} props
|
|
32
|
+
* @param {自定义动态表单配置项} customProps
|
|
33
|
+
* @returns <BasicForm name='' ... />
|
|
34
34
|
*/
|
|
35
35
|
function getFormItem() {
|
|
36
36
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -63,13 +63,13 @@ function getFormItem() {
|
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* 根据后端返回数据组装表单数据
|
|
68
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
69
|
-
* @param {对象---后端返回的未处理数据} values
|
|
70
|
-
* @returns
|
|
66
|
+
/**
|
|
67
|
+
* 根据后端返回数据组装表单数据
|
|
68
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
69
|
+
* @param {对象---后端返回的未处理数据} values
|
|
70
|
+
* @returns
|
|
71
71
|
*/
|
|
72
|
-
var formItemDataFormat = function formItemDataFormat() {
|
|
72
|
+
var formItemDataFormat = exports.formItemDataFormat = function formItemDataFormat() {
|
|
73
73
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
74
74
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
75
75
|
var omitValues = {};
|
|
@@ -105,7 +105,7 @@ var formItemDataFormat = function formItemDataFormat() {
|
|
|
105
105
|
result[name] = values[name] ? JSON.parse(values[name]) : undefined;
|
|
106
106
|
break;
|
|
107
107
|
case 'year':
|
|
108
|
-
result[name] = values[
|
|
108
|
+
result[name] = values[name] ? (0, _moment.default)(values[name], 'YYYY') : undefined;
|
|
109
109
|
break;
|
|
110
110
|
case 'radio':
|
|
111
111
|
result[name] = values[name];
|
|
@@ -131,14 +131,13 @@ var formItemDataFormat = function formItemDataFormat() {
|
|
|
131
131
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, omitValues), data);
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
/**
|
|
135
|
-
* 数据格式化
|
|
136
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
137
|
-
* @param {对象---表单获取到的未处理数据} values
|
|
138
|
-
* @returns
|
|
134
|
+
/**
|
|
135
|
+
* 数据格式化
|
|
136
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
137
|
+
* @param {对象---表单获取到的未处理数据} values
|
|
138
|
+
* @returns
|
|
139
139
|
*/
|
|
140
|
-
exports.
|
|
141
|
-
var dataFormat = function dataFormat() {
|
|
140
|
+
var dataFormat = exports.dataFormat = function dataFormat() {
|
|
142
141
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
143
142
|
var _values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
144
143
|
// 姚小川说:冗余字段后端处理,不需要前端传给后端
|
|
@@ -195,15 +194,14 @@ var dataFormat = function dataFormat() {
|
|
|
195
194
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, values), data);
|
|
196
195
|
};
|
|
197
196
|
|
|
198
|
-
/**
|
|
199
|
-
*
|
|
200
|
-
* @param formType
|
|
201
|
-
* @param props
|
|
202
|
-
* @param customProps
|
|
203
|
-
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* @param formType
|
|
200
|
+
* @param props
|
|
201
|
+
* @param customProps
|
|
202
|
+
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
204
203
|
*/
|
|
205
|
-
exports.
|
|
206
|
-
var getFormColumn = function getFormColumn() {
|
|
204
|
+
var getFormColumn = exports.getFormColumn = function getFormColumn() {
|
|
207
205
|
var _props$config;
|
|
208
206
|
var formType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'grid';
|
|
209
207
|
var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
@@ -255,5 +253,4 @@ var getFormColumn = function getFormColumn() {
|
|
|
255
253
|
},
|
|
256
254
|
field: name
|
|
257
255
|
});
|
|
258
|
-
};
|
|
259
|
-
exports.getFormColumn = getFormColumn;
|
|
256
|
+
};
|
package/lib/utils/grid.js
CHANGED
|
@@ -10,7 +10,6 @@ exports.getGridColumn = void 0;
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
var _react = _interopRequireDefault(require("react"));
|
|
14
13
|
var _umi = require("umi");
|
|
15
14
|
var _lodash = require("lodash");
|
|
16
15
|
var _antd = require("luck-design/antd");
|
|
@@ -36,7 +35,7 @@ function getColumnRender(name, type) {
|
|
|
36
35
|
case 'textarea':
|
|
37
36
|
render = function render(text, record) {
|
|
38
37
|
var _props$config;
|
|
39
|
-
return record["".concat(name, "_virtual")] || ((
|
|
38
|
+
return record["".concat(name, "_virtual")] || ((_props$config = props.config) !== null && _props$config !== void 0 && _props$config.precision && text ? Number(text).toFixed(props.config.precision) : text);
|
|
40
39
|
};
|
|
41
40
|
break;
|
|
42
41
|
case 'date':
|
|
@@ -45,8 +44,8 @@ function getColumnRender(name, type) {
|
|
|
45
44
|
};
|
|
46
45
|
break;
|
|
47
46
|
case 'year':
|
|
48
|
-
render = function render(text
|
|
49
|
-
return
|
|
47
|
+
render = function render(text) {
|
|
48
|
+
return text;
|
|
50
49
|
};
|
|
51
50
|
break;
|
|
52
51
|
case 'user':
|
|
@@ -62,7 +61,7 @@ function getColumnRender(name, type) {
|
|
|
62
61
|
break;
|
|
63
62
|
case 'switch':
|
|
64
63
|
render = function render(text) {
|
|
65
|
-
return /*#__PURE__*/
|
|
64
|
+
return /*#__PURE__*/React.createElement(_antd.Switch, {
|
|
66
65
|
checked: !!text,
|
|
67
66
|
size: "small"
|
|
68
67
|
});
|
|
@@ -70,7 +69,7 @@ function getColumnRender(name, type) {
|
|
|
70
69
|
break;
|
|
71
70
|
case 'color':
|
|
72
71
|
render = function render(text) {
|
|
73
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/React.createElement(_antd.Tag, {
|
|
74
73
|
color: text
|
|
75
74
|
}, text);
|
|
76
75
|
};
|
|
@@ -92,7 +91,7 @@ function getColumnRender(name, type) {
|
|
|
92
91
|
previewUrl: "".concat(_ApiConfig.default.LUCKDA_HOST).concat(file.previewUrl)
|
|
93
92
|
};
|
|
94
93
|
});
|
|
95
|
-
return /*#__PURE__*/
|
|
94
|
+
return /*#__PURE__*/React.createElement(_GridCell.default, {
|
|
96
95
|
fileList: fileList
|
|
97
96
|
});
|
|
98
97
|
};
|
|
@@ -115,7 +114,7 @@ var getAlign = function getAlign(extraData, alignClass) {
|
|
|
115
114
|
return 'left';
|
|
116
115
|
}
|
|
117
116
|
};
|
|
118
|
-
var getGridColumn = function getGridColumn() {
|
|
117
|
+
var getGridColumn = exports.getGridColumn = function getGridColumn() {
|
|
119
118
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
120
119
|
comName = _ref.comName,
|
|
121
120
|
property = _ref.property,
|
|
@@ -183,14 +182,14 @@ var getGridColumn = function getGridColumn() {
|
|
|
183
182
|
data.filter = 'select';
|
|
184
183
|
data.filterParams = {
|
|
185
184
|
options: function options() {
|
|
186
|
-
var _getDvaApp
|
|
187
|
-
return (_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0
|
|
185
|
+
var _getDvaApp;
|
|
186
|
+
return (_getDvaApp = (0, _umi.getDvaApp)()) === null || _getDvaApp === void 0 || (_getDvaApp = _getDvaApp._store) === null || _getDvaApp === void 0 ? void 0 : _getDvaApp.dispatch({
|
|
188
187
|
type: 'global/getUser'
|
|
189
188
|
});
|
|
190
189
|
},
|
|
191
190
|
searchData: function searchData(str) {
|
|
192
|
-
var _getDvaApp2
|
|
193
|
-
return (_getDvaApp2 = (0, _umi.getDvaApp)()) === null || _getDvaApp2 === void 0
|
|
191
|
+
var _getDvaApp2;
|
|
192
|
+
return (_getDvaApp2 = (0, _umi.getDvaApp)()) === null || _getDvaApp2 === void 0 || (_getDvaApp2 = _getDvaApp2._store) === null || _getDvaApp2 === void 0 ? void 0 : _getDvaApp2.dispatch({
|
|
194
193
|
type: "global/getUser",
|
|
195
194
|
payload: str
|
|
196
195
|
});
|
|
@@ -205,8 +204,8 @@ var getGridColumn = function getGridColumn() {
|
|
|
205
204
|
if (_props.alias) {
|
|
206
205
|
data.filterParams = {
|
|
207
206
|
options: function options() {
|
|
208
|
-
var _getDvaApp3
|
|
209
|
-
return (_getDvaApp3 = (0, _umi.getDvaApp)()) === null || _getDvaApp3 === void 0
|
|
207
|
+
var _getDvaApp3;
|
|
208
|
+
return (_getDvaApp3 = (0, _umi.getDvaApp)()) === null || _getDvaApp3 === void 0 || (_getDvaApp3 = _getDvaApp3._store) === null || _getDvaApp3 === void 0 ? void 0 : _getDvaApp3.dispatch({
|
|
210
209
|
type: 'global/getDatadic',
|
|
211
210
|
payload: {
|
|
212
211
|
snamealias: _props.alias
|
|
@@ -221,8 +220,8 @@ var getGridColumn = function getGridColumn() {
|
|
|
221
220
|
data.filter = 'treeSelect';
|
|
222
221
|
data.filterParams = {
|
|
223
222
|
options: function options() {
|
|
224
|
-
var _getDvaApp4
|
|
225
|
-
return (_getDvaApp4 = (0, _umi.getDvaApp)()) === null || _getDvaApp4 === void 0
|
|
223
|
+
var _getDvaApp4;
|
|
224
|
+
return (_getDvaApp4 = (0, _umi.getDvaApp)()) === null || _getDvaApp4 === void 0 || (_getDvaApp4 = _getDvaApp4._store) === null || _getDvaApp4 === void 0 ? void 0 : _getDvaApp4.dispatch({
|
|
226
225
|
type: 'global/readGroup',
|
|
227
226
|
payload: {
|
|
228
227
|
sclassKey: _props.sclassKey
|
|
@@ -230,8 +229,8 @@ var getGridColumn = function getGridColumn() {
|
|
|
230
229
|
});
|
|
231
230
|
},
|
|
232
231
|
searchData: function searchData(str) {
|
|
233
|
-
var _getDvaApp5
|
|
234
|
-
return (_getDvaApp5 = (0, _umi.getDvaApp)()) === null || _getDvaApp5 === void 0
|
|
232
|
+
var _getDvaApp5;
|
|
233
|
+
return (_getDvaApp5 = (0, _umi.getDvaApp)()) === null || _getDvaApp5 === void 0 || (_getDvaApp5 = _getDvaApp5._store) === null || _getDvaApp5 === void 0 ? void 0 : _getDvaApp5.dispatch({
|
|
235
234
|
type: 'global/readGroup',
|
|
236
235
|
payload: {
|
|
237
236
|
sclassKey: _props.sclassKey,
|
|
@@ -263,8 +262,7 @@ var getGridColumn = function getGridColumn() {
|
|
|
263
262
|
case 'date':
|
|
264
263
|
formItemProps = {
|
|
265
264
|
dataFormat: function dataFormat(value) {
|
|
266
|
-
|
|
267
|
-
return _ref2 = {}, (0, _defineProperty2.default)(_ref2, name, value ? (0, _moment.default)(value).valueOf() : undefined), (0, _defineProperty2.default)(_ref2, "".concat(name, "_virtual"), value ? (0, _moment.default)(value).format('YYYY-MM-DD HH:mm:ss') : undefined), _ref2;
|
|
265
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, name, value ? (0, _moment.default)(value).valueOf() : undefined), "".concat(name, "_virtual"), value ? (0, _moment.default)(value).format('YYYY-MM-DD HH:mm:ss') : undefined);
|
|
268
266
|
},
|
|
269
267
|
inputFormat: function inputFormat(value, record, params) {
|
|
270
268
|
return (0, _moment.default)(record["".concat(name, "_virtual")], 'YYYY-MM-DD HH:mm:ss');
|
|
@@ -277,12 +275,11 @@ var getGridColumn = function getGridColumn() {
|
|
|
277
275
|
if (translateProps.multiple) {
|
|
278
276
|
formItemProps = {
|
|
279
277
|
dataFormat: function dataFormat(value) {
|
|
280
|
-
|
|
281
|
-
return _ref3 = {}, (0, _defineProperty2.default)(_ref3, name, value.map(function (v) {
|
|
278
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, name, value.map(function (v) {
|
|
282
279
|
return v.value || v.key;
|
|
283
|
-
}).join(',')),
|
|
280
|
+
}).join(',')), "".concat(name, "_virtual"), value.map(function (v) {
|
|
284
281
|
return v.label;
|
|
285
|
-
}).join(','))
|
|
282
|
+
}).join(','));
|
|
286
283
|
},
|
|
287
284
|
inputFormat: function inputFormat(value, record, params) {
|
|
288
285
|
return (0, _defineProperty2.default)({}, name, (0, _form.splitStrToObj)(value, record["".concat(name, "_virtual")]));
|
|
@@ -291,8 +288,7 @@ var getGridColumn = function getGridColumn() {
|
|
|
291
288
|
} else {
|
|
292
289
|
formItemProps = {
|
|
293
290
|
dataFormat: function dataFormat(value) {
|
|
294
|
-
|
|
295
|
-
return _ref5 = {}, (0, _defineProperty2.default)(_ref5, name, value ? value.value || value.key : undefined), (0, _defineProperty2.default)(_ref5, "".concat(name, "_virtual"), value ? value.label : undefined), _ref5;
|
|
291
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, name, value ? value.value || value.key : undefined), "".concat(name, "_virtual"), value ? value.label : undefined);
|
|
296
292
|
},
|
|
297
293
|
inputFormat: function inputFormat(value, record, params) {
|
|
298
294
|
return (0, _defineProperty2.default)({}, name, !(0, _lodash.isNil)(value) ? {
|
|
@@ -309,5 +305,4 @@ var getGridColumn = function getGridColumn() {
|
|
|
309
305
|
}
|
|
310
306
|
}
|
|
311
307
|
return data;
|
|
312
|
-
};
|
|
313
|
-
exports.getGridColumn = getGridColumn;
|
|
308
|
+
};
|
package/lowcode.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./es/lowcode');
|
package/package.json
CHANGED
|
@@ -1,78 +1,157 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@luck-design-biz/luckda",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"build": "father
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"test
|
|
14
|
-
"
|
|
15
|
-
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e js,jsx,less --debug -x 'tnpm run async'"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@luck-design-biz/luckda",
|
|
3
|
+
"version": "0.0.23",
|
|
4
|
+
"description": "前端配置管理中心业务组件库",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",
|
|
7
|
+
"build": "umi build",
|
|
8
|
+
"build-biz": "father build",
|
|
9
|
+
"async": "npm run build-biz && yalc push",
|
|
10
|
+
"lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx",
|
|
11
|
+
"release": "npm run build-biz && npm publish",
|
|
12
|
+
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
13
|
+
"test": "umi-test",
|
|
14
|
+
"test:coverage": "umi-test --coverage",
|
|
15
|
+
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e js,jsx,less --debug -x 'tnpm run async'",
|
|
16
|
+
"meta": "node generateMeta.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"es",
|
|
20
|
+
"lib",
|
|
21
|
+
"utils.js",
|
|
22
|
+
"upload.js",
|
|
23
|
+
"lowcode.js"
|
|
24
|
+
],
|
|
25
|
+
"main": "lib/index.js",
|
|
26
|
+
"module": "es/index.js",
|
|
27
|
+
"gitHooks": {
|
|
28
|
+
"pre-commit": "lint-staged"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=16",
|
|
32
|
+
"pnpm": ">=7.14.0"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/xieyt203/luck-biz-components.git",
|
|
38
|
+
"branch": "main"
|
|
39
|
+
},
|
|
40
|
+
"lint-staged": {
|
|
41
|
+
"**/*.less": "stylelint --syntax less",
|
|
42
|
+
"**/*.{js,jsx,tsx,ts,less,md,json}": [
|
|
43
|
+
"prettier --write",
|
|
44
|
+
"git add"
|
|
45
|
+
],
|
|
46
|
+
"**/*.{js,ts,jsx,tsx}": "npm run lint-staged:js"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@babel/runtime": "^7.18.9",
|
|
50
|
+
"@babel/standalone": "^7.24.0",
|
|
51
|
+
"ahooks": "^3.7.0",
|
|
52
|
+
"classnames": "^2.3.1",
|
|
53
|
+
"lodash": "^4.17.11",
|
|
54
|
+
"lz-string": "^1.5.0",
|
|
55
|
+
"moment": "^2.24.0",
|
|
56
|
+
"prop-types": "^15.8.1",
|
|
57
|
+
"querystring": "^0.2.0",
|
|
58
|
+
"react": "^16.12.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@amap/amap-jsapi-loader": "^0.0.7",
|
|
62
|
+
"@ant-design/pro-cli": "^1.0.28",
|
|
63
|
+
"@babel/core": "^7.20.2",
|
|
64
|
+
"@babel/eslint-parser": "^7.19.1",
|
|
65
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
66
|
+
"@babel/plugin-proposal-decorators": "^7.20.2",
|
|
67
|
+
"@babel/plugin-transform-strict-mode": "^7.18.6",
|
|
68
|
+
"@babel/polyfill": "^7.12.1",
|
|
69
|
+
"@luck-design-biz/base": "0.0.40",
|
|
70
|
+
"@luck-design-biz/bpm": "0.0.3",
|
|
71
|
+
"@luck-helper/ui-design": "0.0.4",
|
|
72
|
+
"@types/classnames": "^2.3.1",
|
|
73
|
+
"@types/express": "^4.17.14",
|
|
74
|
+
"@types/history": "^4.7.11",
|
|
75
|
+
"@types/lodash": "^4.14.189",
|
|
76
|
+
"@types/qs": "^6.9.7",
|
|
77
|
+
"@types/react": "^16.14.34",
|
|
78
|
+
"@types/react-dom": "^16.9.17",
|
|
79
|
+
"@types/react-helmet": "^5.0.20",
|
|
80
|
+
"@umijs/fabric": "^2.14.0",
|
|
81
|
+
"@umijs/plugin-qiankun": "^2.41.0",
|
|
82
|
+
"@umijs/preset-react": "~1.8.31",
|
|
83
|
+
"bpmn-js": "^7.5.0",
|
|
84
|
+
"bpmn-js-properties-panel": "^0.35.0",
|
|
85
|
+
"chalk": "^3.0.0",
|
|
86
|
+
"check-prettier": "^1.0.3",
|
|
87
|
+
"compression-webpack-plugin": "^6.1.1",
|
|
88
|
+
"core-js": "^3.26.1",
|
|
89
|
+
"cross-env": "^6.0.3",
|
|
90
|
+
"cross-port-killer": "^1.4.0",
|
|
91
|
+
"cross-var": "^1.1.0",
|
|
92
|
+
"d3-selection": "^1.4.2",
|
|
93
|
+
"dry-dry": "^0.4.0",
|
|
94
|
+
"enzyme": "^3.11.0",
|
|
95
|
+
"eslint": "^7.32.0",
|
|
96
|
+
"eslint-plugin-babel": "^5.3.1",
|
|
97
|
+
"eslint-plugin-react": "^7.31.10",
|
|
98
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
99
|
+
"express": "^4.18.2",
|
|
100
|
+
"father": "^4.3.1",
|
|
101
|
+
"gh-pages": "^2.2.0",
|
|
102
|
+
"gm-crypt": "^0.0.2",
|
|
103
|
+
"husky": "^7.0.4",
|
|
104
|
+
"import-sort-cli": "^6.0.0",
|
|
105
|
+
"import-sort-parser-babylon": "^6.0.0",
|
|
106
|
+
"import-sort-parser-typescript": "^6.0.0",
|
|
107
|
+
"import-sort-style-module": "^6.0.0",
|
|
108
|
+
"js-cookie": "^2.2.1",
|
|
109
|
+
"jsdom-global": "^3.0.2",
|
|
110
|
+
"lint-staged": "^11.2.6",
|
|
111
|
+
"luck-design": "0.1.72",
|
|
112
|
+
"node-fetch": "^2.6.7",
|
|
113
|
+
"nprogress": "^0.2.0",
|
|
114
|
+
"only-allow": "^1.1.1",
|
|
115
|
+
"prettier": "^2.7.1",
|
|
116
|
+
"pro-download": "1.0.1",
|
|
117
|
+
"promise-sequential": "^1.1.1",
|
|
118
|
+
"qrcode.react": "^1.0.1",
|
|
119
|
+
"qs": "^6.11.0",
|
|
120
|
+
"raphael": "^2.3.0",
|
|
121
|
+
"react-copy-to-clipboard": "^5.1.0",
|
|
122
|
+
"react-device-detect": "^1.17.0",
|
|
123
|
+
"react-dnd": "^9.5.1",
|
|
124
|
+
"react-dnd-html5-backend": "^9.5.1",
|
|
125
|
+
"react-dom": "^16.14.0",
|
|
126
|
+
"react-helmet": "^5.2.1",
|
|
127
|
+
"react-iframe": "^1.8.5",
|
|
128
|
+
"react-loading": "^2.0.3",
|
|
129
|
+
"react-viewer": "^3.2.2",
|
|
130
|
+
"resizable": "^1.2.1",
|
|
131
|
+
"slash2": "^2.0.0",
|
|
132
|
+
"stylelint": "^13.13.1",
|
|
133
|
+
"umi": "^3.5.35",
|
|
134
|
+
"umi-types": "^0.5.14",
|
|
135
|
+
"yorkie": "2.0.0"
|
|
136
|
+
},
|
|
137
|
+
"peerDependencies": {
|
|
138
|
+
"@luck-design-biz/base": ">= 0.0.10",
|
|
139
|
+
"@luck-design-biz/bpm": ">= 0.0.1",
|
|
140
|
+
"luck-design": ">=0.1.51",
|
|
141
|
+
"uuid": "^9.0.1"
|
|
142
|
+
},
|
|
143
|
+
"pnpm": {
|
|
144
|
+
"overrides": {
|
|
145
|
+
"immer": "^2.1.1"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"bugs": {
|
|
149
|
+
"url": "https://github.com/xieyt203/luck-biz-components/issues"
|
|
150
|
+
},
|
|
151
|
+
"homepage": "https://github.com/xieyt203/luck-biz-components#readme",
|
|
152
|
+
"directories": {
|
|
153
|
+
"doc": "docs",
|
|
154
|
+
"lib": "lib"
|
|
155
|
+
},
|
|
156
|
+
"author": ""
|
|
157
|
+
}
|
package/upload.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./es/upload');
|
|
1
|
+
module.exports = require('./es/upload');
|
package/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./es/utils');
|
|
1
|
+
module.exports = require('./es/utils');
|
package/README.zh-CN.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# 🌟 Dumi Template
|
|
2
|
-
|
|
3
|
-
为组件开发场景而生的文档模板
|
|
4
|
-
|
|
5
|
-
[English](./README.md) | 简体中文
|
|
6
|
-
|
|
7
|
-
## 🚀 如何使用?
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
## ✨ 在线预览
|
|
12
|
-
|
|
13
|
-
https://umijs.github.io/luck-biz-components/
|
|
14
|
-
|
|
15
|
-
## 📒 目录介绍
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
├── docs 文档存放路径
|
|
19
|
-
│ ├── index.md 首页展示
|
|
20
|
-
│ └── **.** 网站目录文档
|
|
21
|
-
├── src 组件主目录
|
|
22
|
-
│ ├── index.ts 组件注册
|
|
23
|
-
│ └── Foo 组件开发
|
|
24
|
-
├── .eslintrc.js eslint 配置
|
|
25
|
-
├── .fatherrc.ts father 配置
|
|
26
|
-
├── .umirc.ts dumi 配置
|
|
27
|
-
└── tsconfig.json typescript 配置
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
其余文件可自行查阅了解。
|
|
31
|
-
|
|
32
|
-
## 🤖 命令介绍
|
|
33
|
-
|
|
34
|
-
| 名称 | 描述 | 备注 |
|
|
35
|
-
| ----------------------- | -------------- | -------------------------------------------------------------------- |
|
|
36
|
-
| `npm run start` | 项目启动 | 使用 [dumi](https://github.com/umijs/dumi),组件开发和文档开发在一起 |
|
|
37
|
-
| `npm run test` | 组件测试 | - |
|
|
38
|
-
| `npm run test:coverage` | 代码覆盖率查看 | - |
|
|
39
|
-
| `npm run prettier` | 代码美化 | - |
|
|
40
|
-
| `npm run build` | 组件打包 | 使用 [father](https://github.com/umijs/father) 工具 |
|
|
41
|
-
| `npm run release` | 组件打包发布 | - |
|
|
42
|
-
| `npm run docs:build` | 文档打包 | - |
|
|
43
|
-
| `npm run docs:deploy` | 文档发布 | 这里默认是使用了 GitHub Pages |
|
|
44
|
-
| `npm run deploy` | 文档打包发布 | - |
|
|
45
|
-
|
|
46
|
-
## 交流群
|
|
47
|
-
|
|
48
|
-
<div>
|
|
49
|
-
<img data-type="dingtalk" src="https://gw.alipayobjects.com/zos/bmw-prod/ce3439e7-3bf9-4031-b823-6473439ec9e6/kxkiis4c_w1004_h1346.jpeg" width="300" />
|
|
50
|
-
<img data-type="wechat" src="https://gw.alipayobjects.com/zos/bmw-prod/c18bc2a5-719a-48ca-b225-c79ef88bfb43/k7m10ymd_w1004_h1346.jpeg" width="300" />
|
|
51
|
-
</div>
|