@luck-design-biz/luckda 1.0.6-13tl → 1.0.7
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/es/components/Builder/index.js +37 -27
- package/es/components/ComplexItem/index.js +5 -3
- package/es/components/ComplexItem/service.js +6 -3
- package/es/components/LdAutoForm/index.js +25 -12
- package/es/components/LdCard/index.js +10 -8
- package/es/components/LdCom/index.js +3 -2
- package/es/components/LdFormList/index.js +5 -4
- package/es/components/LdGrid/index.js +29 -20
- package/es/components/LdGridForm/index.js +16 -7
- package/es/components/LdInfoPanel/index.js +16 -10
- package/es/helper/FromItems.js +64 -5
- package/es/helper/form.js +8 -2
- package/es/helper/ldBuilder.js +9 -5
- package/es/helper/ldComBuild.js +16 -11
- package/es/locales/zh-CN.js +40 -4
- package/es/lowcode/constants/api-url.js +202 -175
- package/es/lowcode/constants/event-topics.js +2 -0
- package/es/lowcode/constants/index.js +5 -4
- package/es/lowcode/engine/meta/components-list.json +6 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/es/lowcode/engine/meta/fielddate.props.json +48 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/es/lowcode/engine/meta/pagecomponent.props.default.json +8 -0
- package/es/lowcode/engine/meta/pagecomponent.props.json +41 -0
- package/es/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/es/lowcode/engine/meta/proxy.props.json +66 -0
- package/es/lowcode/engine/provider/ContextProvider/index.js +45 -9
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +36 -30
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +11 -5
- package/es/lowcode/engine/provider/ContextProvider/useTodo.js +2 -4
- package/es/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/es/lowcode/engine/provider/PageProxyProvider.js +95 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/es/lowcode/engine/tools/helper.js +44 -5
- package/es/lowcode/engine/tools/initDS.js +4 -4
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +129 -27
- package/es/lowcode/painter/DesignToolbar.js +88 -173
- package/es/lowcode/painter/components/AdvancePanel.js +28 -10
- package/es/lowcode/painter/components/TipIcon.js +12 -4
- package/es/lowcode/painter/components/field-setting/SettingUI.js +56 -4
- package/es/lowcode/painter/components/field-setting/index.js +24 -1
- package/es/lowcode/painter/components/shortcut-modal/KeyIcon.js +11 -0
- package/es/lowcode/painter/components/shortcut-modal/index.js +208 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +10 -19
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/es/lowcode/painter/panel-section/ConditionCheck.js +0 -1
- package/es/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/es/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +2 -1
- package/es/lowcode/painter/panel-section/JSEditor/ToolBar.js +7 -4
- package/es/lowcode/painter/panel-section/JSEditor/index.js +15 -5
- package/es/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/es/lowcode/painter/panel-section/ProxyLinker.js +137 -0
- package/es/lowcode/painter/panel-section/ProxyParams.js +28 -0
- package/es/lowcode/painter/panel-section/ProxyParamsSetter.js +240 -0
- package/es/lowcode/painter/style/panel-item.less +1 -0
- package/es/lowcode/preview/DebugTool.js +78 -0
- package/es/lowcode/preview/DebugToolDetail.js +103 -0
- package/es/lowcode/preview/index.js +10 -17
- package/es/lowcode/preview/useDebugSettings.js +62 -0
- package/es/lowcode/view/Canvas.js +5 -1
- package/es/lowcode/view/Page.js +8 -3
- package/es/lowcode/view/lc-components/CardList/index.js +3 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +9 -7
- package/es/lowcode/view/lc-components/Drawer/index.js +2 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +48 -0
- package/es/lowcode/view/lc-components/Form/index.js +3 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionDesign.js +17 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionLive.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionPreview.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/index.js +42 -0
- package/es/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/es/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +5 -23
- package/es/lowcode/view/lc-components/Table/index.js +12 -6
- package/es/lowcode/view/lc-components/Tabs/index.js +6 -2
- package/es/lowcode/view/lc-components/Tree/index.js +3 -0
- package/es/lowcode/view/lc-components/Wrapper.js +7 -1
- package/es/services.js +25 -7
- package/es/utils/action.js +3 -2
- package/es/utils/form.js +37 -4
- package/es/utils/grid.js +2 -1
- package/lib/components/Builder/index.js +36 -26
- package/lib/components/ComplexItem/index.js +5 -3
- package/lib/components/ComplexItem/service.js +6 -3
- package/lib/components/LdAutoForm/index.js +22 -9
- package/lib/components/LdCard/index.js +10 -8
- package/lib/components/LdCom/index.js +3 -2
- package/lib/components/LdFormList/index.js +4 -3
- package/lib/components/LdGrid/index.js +29 -20
- package/lib/components/LdGridForm/index.js +13 -4
- package/lib/components/LdInfoPanel/index.js +15 -9
- package/lib/helper/FromItems.js +64 -5
- package/lib/helper/form.js +8 -2
- package/lib/helper/ldBuilder.js +8 -5
- package/lib/helper/ldComBuild.js +14 -9
- package/lib/locales/zh-CN.js +40 -4
- package/lib/lowcode/constants/api-url.js +204 -175
- package/lib/lowcode/constants/event-topics.js +3 -1
- package/lib/lowcode/constants/index.js +6 -5
- package/lib/lowcode/engine/meta/components-list.json +6 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +48 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/lib/lowcode/engine/meta/pagecomponent.props.default.json +8 -0
- package/lib/lowcode/engine/meta/pagecomponent.props.json +41 -0
- package/lib/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/lib/lowcode/engine/meta/proxy.props.json +66 -0
- package/lib/lowcode/engine/provider/ContextProvider/index.js +50 -13
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +37 -31
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +10 -4
- package/lib/lowcode/engine/provider/ContextProvider/useTodo.js +1 -3
- package/lib/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/lib/lowcode/engine/provider/PageProxyProvider.js +103 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/lib/lowcode/engine/tools/helper.js +44 -4
- package/lib/lowcode/engine/tools/initDS.js +4 -4
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +126 -24
- package/lib/lowcode/painter/DesignToolbar.js +84 -169
- package/lib/lowcode/painter/components/AdvancePanel.js +27 -9
- package/lib/lowcode/painter/components/TipIcon.js +12 -4
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +55 -3
- package/lib/lowcode/painter/components/field-setting/index.js +24 -1
- package/lib/lowcode/painter/components/shortcut-modal/KeyIcon.js +18 -0
- package/lib/lowcode/painter/components/shortcut-modal/index.js +215 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +9 -18
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/lib/lowcode/painter/panel-section/ConditionCheck.js +0 -1
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +2 -1
- package/lib/lowcode/painter/panel-section/JSEditor/ToolBar.js +7 -4
- package/lib/lowcode/painter/panel-section/JSEditor/index.js +14 -4
- package/lib/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/lib/lowcode/painter/panel-section/ProxyLinker.js +145 -0
- package/lib/lowcode/painter/panel-section/ProxyParams.js +35 -0
- package/lib/lowcode/painter/panel-section/ProxyParamsSetter.js +248 -0
- package/lib/lowcode/painter/style/panel-item.less +1 -0
- package/lib/lowcode/preview/DebugTool.js +86 -0
- package/lib/lowcode/preview/DebugToolDetail.js +111 -0
- package/lib/lowcode/preview/index.js +10 -18
- package/lib/lowcode/preview/useDebugSettings.js +69 -0
- package/lib/lowcode/view/Canvas.js +5 -1
- package/lib/lowcode/view/Page.js +8 -3
- package/lib/lowcode/view/lc-components/CardList/index.js +3 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +9 -7
- package/lib/lowcode/view/lc-components/Drawer/index.js +2 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +48 -0
- package/lib/lowcode/view/lc-components/Form/index.js +3 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionDesign.js +24 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionLive.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionPreview.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/index.js +50 -0
- package/lib/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/lib/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +4 -22
- package/lib/lowcode/view/lc-components/Table/index.js +12 -6
- package/lib/lowcode/view/lc-components/Tabs/index.js +5 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +3 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +6 -0
- package/lib/services.js +26 -7
- package/lib/utils/action.js +6 -0
- package/lib/utils/form.js +38 -4
- package/lib/utils/grid.js +2 -1
- package/package.json +1 -1
- package/es/lowcode/engine/meta/button.api.json +0 -0
- package/lib/lowcode/engine/meta/button.api.json +0 -0
package/es/helper/FromItems.js
CHANGED
|
@@ -9,7 +9,7 @@ var _excluded = ["onBlur"],
|
|
|
9
9
|
_excluded4 = ["handleValueChange", "config"],
|
|
10
10
|
_excluded5 = ["onBlur"],
|
|
11
11
|
_excluded6 = ["handleValueChange", "config"],
|
|
12
|
-
_excluded7 = ["onChange"],
|
|
12
|
+
_excluded7 = ["onChange", "format"],
|
|
13
13
|
_excluded8 = ["handleValueChange", "config"],
|
|
14
14
|
_excluded9 = ["handleValueChange", "onChange", "params", "extraFilter"],
|
|
15
15
|
_excluded10 = ["onChange"],
|
|
@@ -18,7 +18,7 @@ var _excluded = ["onBlur"],
|
|
|
18
18
|
_excluded13 = ["handleValueChange", "config", "allowClear"],
|
|
19
19
|
_excluded14 = ["renderInfoMode"],
|
|
20
20
|
_excluded15 = ["onChange"],
|
|
21
|
-
_excluded16 = ["handleValueChange", "config", "selectorProps", "suppressSelect"],
|
|
21
|
+
_excluded16 = ["handleValueChange", "config", "selectorProps", "suppressSelect", "auth", "leafOnly"],
|
|
22
22
|
_excluded17 = ["onClose"],
|
|
23
23
|
_excluded18 = ["handleValueChange", "config"],
|
|
24
24
|
_excluded19 = ["onChange"],
|
|
@@ -40,6 +40,60 @@ import { DatadicDropDown as DatedicFormItem, UserSelectDropDown as UserItem } fr
|
|
|
40
40
|
import buildUploadFormItem from "../upload/FormItem";
|
|
41
41
|
import ComplexItem from "../components/ComplexItem";
|
|
42
42
|
import { LC_COMPONENT_UNIT_KEY, LC_FORMITEM_UNIT } from "../lowcode/constants";
|
|
43
|
+
var data_config = {
|
|
44
|
+
'YYYY-MM-DD HH:mm:ss': {
|
|
45
|
+
type: 'date',
|
|
46
|
+
showTime: {
|
|
47
|
+
format: 'HH:mm:ss'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
'YYYY-MM-DD HH:mm': {
|
|
51
|
+
type: 'date',
|
|
52
|
+
showTime: {
|
|
53
|
+
format: 'HH:mm'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
'YYYY-MM-DD HH': {
|
|
57
|
+
type: 'date',
|
|
58
|
+
showTime: {
|
|
59
|
+
format: 'HH'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
'YYYY-MM-DD': {
|
|
63
|
+
type: 'date',
|
|
64
|
+
showTime: false
|
|
65
|
+
},
|
|
66
|
+
'YYYY-MM': {
|
|
67
|
+
type: 'month',
|
|
68
|
+
showTime: false
|
|
69
|
+
},
|
|
70
|
+
'YYYY-wo': {
|
|
71
|
+
type: 'week',
|
|
72
|
+
showTime: false
|
|
73
|
+
},
|
|
74
|
+
'YYYY': {
|
|
75
|
+
type: 'year',
|
|
76
|
+
showTime: false
|
|
77
|
+
},
|
|
78
|
+
'HH:mm:ss': {
|
|
79
|
+
type: 'time',
|
|
80
|
+
showTime: {
|
|
81
|
+
format: 'HH:mm:ss'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
'HH:mm': {
|
|
85
|
+
type: 'time',
|
|
86
|
+
showTime: {
|
|
87
|
+
format: 'HH:mm'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
'mm:ss': {
|
|
91
|
+
type: 'time',
|
|
92
|
+
showTime: {
|
|
93
|
+
format: 'mm:ss'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
43
97
|
export var getNumberItem = function getNumberItem() {
|
|
44
98
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
45
99
|
handleValueChange = _ref.handleValueChange,
|
|
@@ -104,13 +158,14 @@ export var getDateItem = function getDateItem() {
|
|
|
104
158
|
_ref7$config = _ref7.config,
|
|
105
159
|
_ref7$config2 = _ref7$config === void 0 ? {} : _ref7$config,
|
|
106
160
|
_onChange = _ref7$config2.onChange,
|
|
161
|
+
format = _ref7$config2.format,
|
|
107
162
|
_config = _objectWithoutProperties(_ref7$config2, _excluded7),
|
|
108
163
|
props = _objectWithoutProperties(_ref7, _excluded8);
|
|
109
164
|
return /*#__PURE__*/React.createElement(BasicFormItem, _extends({}, props, {
|
|
110
165
|
$attrs: _defineProperty(_defineProperty({}, LC_COMPONENT_UNIT_KEY, LC_FORMITEM_UNIT), 'data-__component', 'FieldDate'),
|
|
111
166
|
type: "datePicker",
|
|
112
|
-
config: _objectSpread(_objectSpread({}, _config), {}, {
|
|
113
|
-
|
|
167
|
+
config: _objectSpread(_objectSpread(_objectSpread({}, data_config[format]), _config), {}, {
|
|
168
|
+
format: format,
|
|
114
169
|
onChange: function onChange(date, dateString) {
|
|
115
170
|
handleValueChange && handleValueChange(date);
|
|
116
171
|
_onChange && _onChange(date, dateString);
|
|
@@ -235,10 +290,14 @@ export var getGroupItem = function getGroupItem(_ref19) {
|
|
|
235
290
|
_ref19$selectorProps = _ref19.selectorProps,
|
|
236
291
|
selectorProps = _ref19$selectorProps === void 0 ? {} : _ref19$selectorProps,
|
|
237
292
|
suppressSelect = _ref19.suppressSelect,
|
|
293
|
+
_ref19$auth = _ref19.auth,
|
|
294
|
+
auth = _ref19$auth === void 0 ? false : _ref19$auth,
|
|
295
|
+
_ref19$leafOnly = _ref19.leafOnly,
|
|
296
|
+
leafOnly = _ref19$leafOnly === void 0 ? false : _ref19$leafOnly,
|
|
238
297
|
props = _objectWithoutProperties(_ref19, _excluded16);
|
|
239
298
|
return /*#__PURE__*/React.createElement(TreeSelector, _extends({}, props, {
|
|
240
299
|
$attrs: _defineProperty(_defineProperty({}, LC_COMPONENT_UNIT_KEY, LC_FORMITEM_UNIT), 'data-__component', 'FieldGroup'),
|
|
241
|
-
api: "/api/base/group/sysGroupTree/noAuthReadJurisTree?sclassKey=".concat(props.sclassKey),
|
|
300
|
+
api: "/api/base/group/sysGroupTree/".concat(auth ? 'noAuthReadJurisTree' : 'noAuthReadNoJurisTree', "?sclassKey=").concat(props.sclassKey, "&ex=").concat(escape(leafOnly ? 'ichildren!=0' : '')),
|
|
242
301
|
selectorProps: _objectSpread(_objectSpread({}, selectorProps), {}, {
|
|
243
302
|
suppressSelect: suppressSelect
|
|
244
303
|
}),
|
package/es/helper/form.js
CHANGED
|
@@ -66,12 +66,18 @@ export function translator() {
|
|
|
66
66
|
var allConfig = _objectSpread(_objectSpread({}, props), JSON.parse(extra || '{}'));
|
|
67
67
|
var _props = {
|
|
68
68
|
name: allConfig.aliaName,
|
|
69
|
-
label: allConfig.fieldName,
|
|
69
|
+
label: allConfig.fieldAliasName || allConfig.fieldName,
|
|
70
70
|
config: {
|
|
71
71
|
required: !!allConfig.isNotNull,
|
|
72
|
-
disabled: !!allConfig.isReadOnly
|
|
72
|
+
disabled: !!allConfig.isReadOnly,
|
|
73
|
+
placeholder: allConfig.placeholder,
|
|
74
|
+
rows: allConfig.rows
|
|
73
75
|
},
|
|
74
76
|
layout: 'block',
|
|
77
|
+
align: allConfig.align,
|
|
78
|
+
headerAlign: allConfig.headerAlign,
|
|
79
|
+
width: allConfig.width,
|
|
80
|
+
tip: allConfig.tip,
|
|
75
81
|
col: allConfig.col || 1,
|
|
76
82
|
row: allConfig.row || 1
|
|
77
83
|
};
|
package/es/helper/ldBuilder.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import {
|
|
4
|
+
import { useLDCtx } from "../components/Builder";
|
|
5
5
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
6
6
|
export var ErrorWrapper = styled.span.withConfig({
|
|
7
7
|
displayName: "ErrorWrapper",
|
|
@@ -13,12 +13,15 @@ var builder = function builder(wrapped) {
|
|
|
13
13
|
dataSetKey = props.dataSetKey,
|
|
14
14
|
wrapper = props.wrapper,
|
|
15
15
|
className = props.className,
|
|
16
|
-
style = props.style
|
|
17
|
-
|
|
16
|
+
style = props.style,
|
|
17
|
+
pageProxy = props.pageProxy;
|
|
18
|
+
var _ref = useLDCtx(pageProxy) || {},
|
|
18
19
|
resources = _ref.resources,
|
|
19
20
|
actions = _ref.actions,
|
|
20
21
|
_ref$dataSets = _ref.dataSets,
|
|
21
22
|
dataSets = _ref$dataSets === void 0 ? [] : _ref$dataSets,
|
|
23
|
+
_ref$moduleUiList = _ref.moduleUiList,
|
|
24
|
+
moduleUiList = _ref$moduleUiList === void 0 ? {} : _ref$moduleUiList,
|
|
22
25
|
_ref$isTree = _ref.isTree,
|
|
23
26
|
isTree = _ref$isTree === void 0 ? [] : _ref$isTree,
|
|
24
27
|
doAction = _ref.doAction,
|
|
@@ -59,7 +62,8 @@ var builder = function builder(wrapped) {
|
|
|
59
62
|
resources: resources,
|
|
60
63
|
actions: actions,
|
|
61
64
|
doAction: doAction,
|
|
62
|
-
moduleCode: moduleCode
|
|
65
|
+
moduleCode: moduleCode,
|
|
66
|
+
uiSettings: moduleUiList[dataSetKey] // form和grid的页面配置信息
|
|
63
67
|
});
|
|
64
68
|
return wrapped(wrappedProps);
|
|
65
69
|
};
|
package/es/helper/ldComBuild.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["$css"],
|
|
5
|
-
_excluded2 = ["className", "$css"];
|
|
6
|
-
import React, {
|
|
4
|
+
var _excluded = ["$css", "pageProxy"],
|
|
5
|
+
_excluded2 = ["className", "$css", "pageProxy"];
|
|
6
|
+
import React, { forwardRef } from 'react';
|
|
7
7
|
import { useCreation } from 'ahooks';
|
|
8
8
|
import { includes, intersectionWith, isNil } from 'lodash';
|
|
9
9
|
import { ChildrenUtil } from '@luck-design-biz/base/utils';
|
|
10
|
-
import {
|
|
10
|
+
import { useLDCtx } from "../components/Builder";
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import styles from "./index.less";
|
|
13
|
-
export var getResources = function getResources() {
|
|
14
|
-
var _ref =
|
|
13
|
+
export var getResources = function getResources(pageProxy) {
|
|
14
|
+
var _ref = useLDCtx(pageProxy) || {},
|
|
15
15
|
_ref$resources = _ref.resources,
|
|
16
16
|
resources = _ref$resources === void 0 ? [] : _ref$resources;
|
|
17
17
|
return resources;
|
|
@@ -19,26 +19,29 @@ export var getResources = function getResources() {
|
|
|
19
19
|
export var ldComBuilder = function ldComBuilder(Com) {
|
|
20
20
|
var Component = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
21
21
|
var $css = _ref2.$css,
|
|
22
|
+
pageProxy = _ref2.pageProxy,
|
|
22
23
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
23
|
-
var resources = getResources();
|
|
24
|
+
var resources = getResources(pageProxy);
|
|
24
25
|
var hasResources = useCreation(function () {
|
|
25
26
|
return isNil(props === null || props === void 0 ? void 0 : props.resource) || includes(resources, props.resource);
|
|
26
27
|
}, [props === null || props === void 0 ? void 0 : props.resource, resources]);
|
|
27
28
|
if (hasResources) {
|
|
28
29
|
return /*#__PURE__*/React.createElement(Com, _extends({}, props, {
|
|
30
|
+
pageProxy: pageProxy,
|
|
29
31
|
ref: ref
|
|
30
32
|
}));
|
|
31
33
|
}
|
|
32
34
|
return props.serialEffect === 'hidden' ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement(Com, _extends({}, props, {
|
|
33
35
|
disabled: true,
|
|
36
|
+
pageProxy: pageProxy,
|
|
34
37
|
ref: ref
|
|
35
38
|
}));
|
|
36
39
|
});
|
|
37
40
|
return Component;
|
|
38
41
|
};
|
|
39
|
-
export var filterOptions = function filterOptions(options) {
|
|
40
|
-
var key = arguments.length >
|
|
41
|
-
var resources = getResources();
|
|
42
|
+
export var filterOptions = function filterOptions(options, pageProxy) {
|
|
43
|
+
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'resource';
|
|
44
|
+
var resources = getResources(pageProxy);
|
|
42
45
|
return intersectionWith(options, resources, function (arrVal, othVal) {
|
|
43
46
|
return !arrVal[key] || arrVal[key] === othVal;
|
|
44
47
|
});
|
|
@@ -47,9 +50,11 @@ export var deepFilterCom = function deepFilterCom(Com, childMark) {
|
|
|
47
50
|
var Component = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
48
51
|
var className = _ref3.className,
|
|
49
52
|
$css = _ref3.$css,
|
|
53
|
+
pageProxy = _ref3.pageProxy,
|
|
50
54
|
props = _objectWithoutProperties(_ref3, _excluded2);
|
|
51
|
-
var resources = getResources();
|
|
55
|
+
var resources = getResources(pageProxy);
|
|
52
56
|
var com = /*#__PURE__*/React.createElement(Com, _extends({}, props, {
|
|
57
|
+
pageProxy: pageProxy,
|
|
53
58
|
className: classNames(styles.ldLabs, _defineProperty({}, className, !!className)),
|
|
54
59
|
ref: ref
|
|
55
60
|
}));
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"luckda.lowcode.view.lc-components.label.all": "全部",
|
|
3
|
+
"luckda.lowcode.view.lc-component.design.show": "请在预览、运行界面查看嵌入的代理页面",
|
|
3
4
|
"luckda.lowcode.painter.import": "导入",
|
|
4
5
|
"luckda.lowcode.painter.components.fullscreen-exit.tip": "退出全屏",
|
|
5
6
|
"luckda.lowcode.painter.components.fullscreen.tip": "全屏",
|
|
@@ -7,6 +8,9 @@ export default {
|
|
|
7
8
|
"lc.form.validator.textNum": "个字符",
|
|
8
9
|
"lc.form.validator.numberBelowMin": "低于最小值",
|
|
9
10
|
"lc.form.validator.numberExceedMax": "超过最大值",
|
|
11
|
+
"luckda.lowcode.design.toolbar.selectUser": "模拟登录人",
|
|
12
|
+
"luckda.lowcode.design.toolbar.placeholder.selectUser": "请选择模拟登录人",
|
|
13
|
+
"luckda.lowcode.design.toolbar.debugTool": "调试工具",
|
|
10
14
|
"luckda.lowcode.painter.I18n.empty": "敬请期待",
|
|
11
15
|
"luckda.lowcode.painter.panel.attrs": "属性",
|
|
12
16
|
"luckda.lowcode.painter.panel.css": "样式",
|
|
@@ -34,11 +38,10 @@ export default {
|
|
|
34
38
|
"luckda.lowcode.design.toolbar.clear": "清除缓存",
|
|
35
39
|
"luckda.lowcode.not.mobile": "此功能暂未开放",
|
|
36
40
|
"luckda.lowcode.design.toolbar.pageAttrs": "页面属性",
|
|
37
|
-
"luckda.lowcode.design.toolbar.
|
|
41
|
+
"luckda.lowcode.design.toolbar.shortcut": "快捷键",
|
|
38
42
|
"luckda.lowcode.design.toolbar.code": "Schema面板",
|
|
43
|
+
"luckda.lowcode.design.toolbar.debug": "调试",
|
|
39
44
|
"luckda.lowcode.design.toolbar.save": "保存",
|
|
40
|
-
"luckda.lowcode.design.toolbar.pagePreview": "页面预览",
|
|
41
|
-
"luckda.lowcode.design.toolbar.selectUser": "请选择模拟登录人",
|
|
42
45
|
"app.base.operate.comfire.leave": "离开当前页面?",
|
|
43
46
|
"app.base.operate.comfire.message.leave": "系统可能不会保存您所做的更改。",
|
|
44
47
|
"luckda.lowcode.painter.components.search": "搜索组件",
|
|
@@ -76,6 +79,22 @@ export default {
|
|
|
76
79
|
"luckda.lowcode.painter.panel-section.splitdisplay.split": "分割方向",
|
|
77
80
|
"luckda.lowcode.painter.panel-section.splitdisplay.ratio": "列比例",
|
|
78
81
|
"luckda.lowcode.painter.panel-section.Layoutratio.placeholder": "请输入列比例",
|
|
82
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin.state": "页面全局状态",
|
|
83
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin.global": "页面全局变量",
|
|
84
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin.url": "页面URL参数",
|
|
85
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin.string": "字符串常量",
|
|
86
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin.num": "数字常量",
|
|
87
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin.bool": "布尔常量",
|
|
88
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-name": "参数名称",
|
|
89
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.warn.param-name": "请输入参数名称",
|
|
90
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-origin": "参数来源",
|
|
91
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.param-value": "值或变量名",
|
|
92
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.warn.param-value": "请输入参数值或变量名",
|
|
93
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.add": "添加参数",
|
|
94
|
+
"luckda.lowcode.painter.panel-section.proxy-params-setter.save": "保存并返回",
|
|
95
|
+
"luckda.lowcode.painter.panel-section.proxy-linker.add": "新建页面",
|
|
96
|
+
"luckda.lowcode.painter.panel-section.proxy-linker.edit": "编辑页面",
|
|
97
|
+
"luckda.lowcode.painter.panel-section.proxy-linker.sync": "同步数据",
|
|
79
98
|
"luckda.lowcode.painter.pageVars.var": "变量",
|
|
80
99
|
"luckda.lowcode.painter.pageVars.api": "远程 API",
|
|
81
100
|
"luckda.lowcode.painter.pageVars.edit": "编辑数据源",
|
|
@@ -192,6 +211,7 @@ export default {
|
|
|
192
211
|
"luckda.lowcode.painter.panel-section.blocksEditor.writer": "行内编辑表格",
|
|
193
212
|
"luckda.lowcode.painter.panel-section.blocksEditor.uploadForm": "附件列表",
|
|
194
213
|
"luckda.lowcode.painter.panel-section.blocksEditor.blank": "空白区",
|
|
214
|
+
"luckda.lowcode.painter.panel-section.blocksEditor.defaultBlock": "默认区块",
|
|
195
215
|
"luckda.lowcode.painter.panel-section.blocksEditor.addBlock": "新增区块",
|
|
196
216
|
"luckda.lowcode.painter.panel-section.actionsEditor.button": "按钮",
|
|
197
217
|
"luckda.lowcode.painter.panel-section.actionsEditor.text": "文本",
|
|
@@ -247,6 +267,20 @@ export default {
|
|
|
247
267
|
"luckda.lowcode.painter.actionBindModal.params": "配置参数",
|
|
248
268
|
"luckda.lowcode.painter.actionBindModal.params.info": "请勿随意修改配置参数结构和参数名称,参数异常可能会导致请求失败",
|
|
249
269
|
"luckda.lowcode.painter.actionBindModal.noActionSelected": "请在右侧选择行为项",
|
|
270
|
+
"luckda.lowcode.design.toolbar.shortcut.save": "保存",
|
|
271
|
+
"luckda.lowcode.design.toolbar.shortcut.preview": "预览调试",
|
|
272
|
+
"luckda.lowcode.design.toolbar.shortcut.undo": "撤销",
|
|
273
|
+
"luckda.lowcode.design.toolbar.shortcut.redo": "重做",
|
|
274
|
+
"luckda.lowcode.design.toolbar.shortcut.copy": "克隆组件",
|
|
275
|
+
"luckda.lowcode.design.toolbar.shortcut.delete": "删除组件",
|
|
276
|
+
"luckda.lowcode.design.toolbar.shortcut.selectParent": "选择父级组件",
|
|
277
|
+
"luckda.lowcode.design.toolbar.shortcut.selectChildren": "选择子级组件",
|
|
278
|
+
"luckda.lowcode.design.toolbar.shortcut.selectLeftBrother": "向左选择兄弟组件",
|
|
279
|
+
"luckda.lowcode.design.toolbar.shortcut.selectRightBrother": "向右选择兄弟组件",
|
|
280
|
+
"luckda.lowcode.design.toolbar.shortcut.moveLeft": "向左移动组件",
|
|
281
|
+
"luckda.lowcode.design.toolbar.shortcut.moveRight": "向右移动组件",
|
|
282
|
+
"luckda.lowcode.design.toolbar.shortcut.general": "常规操作",
|
|
283
|
+
"luckda.lowcode.design.toolbar.shortcut.others": "组件选择和移动",
|
|
250
284
|
"luckda.lowcode.painter.panel-section.fieldsSetting.align.left": "居左",
|
|
251
285
|
"luckda.lowcode.painter.panel-section.fieldsSetting.align.center": "居中",
|
|
252
286
|
"luckda.lowcode.painter.panel-section.fieldsSetting.align.right": "居右",
|
|
@@ -269,6 +303,7 @@ export default {
|
|
|
269
303
|
"luckda.lowcode.painter.panel-section.fieldsSetting.form.display": "表单中显示",
|
|
270
304
|
"luckda.lowcode.painter.panel-section.fieldsSetting.writable": "是否可写",
|
|
271
305
|
"luckda.lowcode.painter.panel-section.fieldsSetting.readonly": "是否只读",
|
|
306
|
+
"luckda.lowcode.painter.panel-section.fieldsSetting.dateFormat": "日期格式",
|
|
272
307
|
"luckda.lowcode.painter.panel-section.fieldsSetting.render": "内容定制渲染",
|
|
273
308
|
"luckda.lowcode.painter.panel-section.fieldsSetting.defaultValue": "默认值",
|
|
274
309
|
"luckda.lowcode.painter.settingTo": "设置为",
|
|
@@ -294,5 +329,6 @@ export default {
|
|
|
294
329
|
"luckda.lowcode.painter.panel-section.fieldsSetting.checkRules.message.verifyType": "请选择校验规则",
|
|
295
330
|
"luckda.lowcode.painter.panel-section.fieldsSetting.checkRules.errorMsg": "错误提示",
|
|
296
331
|
"luckda.lowcode.painter.panel-section.fieldsSetting.checkRules.message.errorMsg": "请输入错误提示",
|
|
297
|
-
"luckda.lowcode.painter.panel-section.fieldsSetting.checkRules.logic": "校验逻辑"
|
|
332
|
+
"luckda.lowcode.painter.panel-section.fieldsSetting.checkRules.logic": "校验逻辑",
|
|
333
|
+
"luckda.lowcode.view.lc-component.design.nocode": "缺少页面代理编码配置"
|
|
298
334
|
};
|