@lingxiteam/assets 1.0.11-alpha.3 → 1.0.11-alpha.30
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/dealDsl/index.d.ts +1 -2
- package/es/dealDsl/index.js +1 -2
- package/es/dealDsl/preprocess/common.js +184 -19
- package/es/dealDsl/preprocessDSL.d.ts +2 -14
- package/es/dealDsl/preprocessDSL.js +2 -42
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +6 -2
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +56 -0
- package/es/error/errorDisplay/Web/Drawer/index.js +12 -4
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +200 -33
- package/es/error/errorDisplay/Web/Notification/Notice.js +5 -1
- package/es/error/errorDisplay/Web/Notification/Notification.js +10 -3
- package/es/error/errorDisplay/Web/Notification/Notification.less +12 -1
- package/es/error/errorDisplay/Web/Notification/index.js +20 -10
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +3 -1
- package/es/error/errorDisplay/compUtils.js +17 -1
- package/es/error/errorDisplay/const.js +1 -1
- package/es/error/errorDisplay/http.js +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/rootConfig/index.d.ts +4 -1025
- package/es/rootConfig/index.js +4 -24
- package/es/rootConfig/mobile/BusiComp.d.ts +5 -0
- package/es/rootConfig/mobile/BusiComp.js +13 -2
- package/es/rootConfig/mobile/MobileModal.d.ts +6 -2
- package/es/rootConfig/mobile/MobileModal.js +12 -5
- package/es/rootConfig/mobile/MobilePopover.d.ts +5 -0
- package/es/rootConfig/mobile/MobilePopover.js +13 -2
- package/es/rootConfig/mobile/index.d.ts +4 -0
- package/es/rootConfig/mobile/index.js +4 -0
- package/es/rootConfig/mobile/page.d.ts +17 -5
- package/es/rootConfig/mobile/page.js +43 -9
- package/es/rootConfig/pc/BusiComp.d.ts +4 -0
- package/es/rootConfig/pc/BusiComp.js +12 -2
- package/es/rootConfig/pc/Drawer.d.ts +5 -0
- package/es/rootConfig/pc/Drawer.js +10 -2
- package/es/rootConfig/pc/Modal.d.ts +5 -0
- package/es/rootConfig/pc/Modal.js +11 -3
- package/es/rootConfig/pc/Popover.d.ts +5 -0
- package/es/rootConfig/pc/Popover.js +7 -2
- package/es/rootConfig/pc/index.d.ts +5 -0
- package/es/rootConfig/pc/index.js +5 -0
- package/es/rootConfig/pc/page.d.ts +17 -10
- package/es/rootConfig/pc/page.js +43 -14
- package/es/rootConfig/todoActionList.d.ts +1861 -169
- package/es/rootConfig/todoActionList.js +2337 -185
- package/es/rootConfig/todoOptionList.d.ts +1468 -0
- package/es/rootConfig/todoOptionList.js +1680 -0
- package/es/security/encipher/sign.d.ts +1 -1
- package/es/security/encipher/sign.js +18 -39
- package/es/security/index.d.ts +1 -1
- package/es/theme/bin/default/modalWidth.js +8 -0
- package/es/theme/bin/default/theme.js +350 -0
- package/es/theme/bin/default/theme.less +347 -0
- package/es/theme/bin/default/theme.scss +347 -0
- package/es/theme/build.js +51 -0
- package/es/theme/src/default/index.js +239 -0
- package/es/theme/utils/colorPaletteMixin.js +59 -0
- package/es/theme/utils/px2Num.js +12 -0
- package/es/theme/utils/renderColors.js +27 -0
- package/es/utils/cookieUtil.js +36 -0
- package/es/utils/url.d.ts +14 -0
- package/es/utils/url.js +72 -0
- package/lib/IconSvg/index.d.ts +6 -0
- package/lib/IconSvg/index.js +30 -0
- package/lib/dealDsl/PropType.d.ts +7 -0
- package/lib/dealDsl/PropType.js +5 -0
- package/lib/dealDsl/index.d.ts +1 -0
- package/lib/dealDsl/index.js +12 -0
- package/{es/dealDsl/preprocess/editor.d.ts → lib/dealDsl/preprocess/common.d.ts} +1 -1
- package/lib/dealDsl/preprocess/common.js +342 -0
- package/lib/dealDsl/preprocessDSL.d.ts +9 -0
- package/lib/dealDsl/preprocessDSL.js +46 -0
- package/lib/dealDsl/utils/index.d.ts +13 -0
- package/lib/dealDsl/utils/index.js +29 -0
- package/lib/error/errorCatch/index.js +48 -0
- package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +115 -0
- package/lib/error/errorDisplay/Mobile/Drawer/Drawer.less +201 -0
- package/lib/error/errorDisplay/Mobile/Drawer/index.js +140 -0
- package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +207 -0
- package/lib/error/errorDisplay/Mobile/Modal/Modal.js +53 -0
- package/lib/error/errorDisplay/Mobile/Modal/Modal.less +146 -0
- package/lib/error/errorDisplay/Mobile/Modal/index.js +127 -0
- package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +21 -0
- package/lib/error/errorDisplay/SVGstring.js +18 -0
- package/lib/error/errorDisplay/Web/Drawer/Drawer.js +278 -0
- package/lib/error/errorDisplay/Web/Drawer/Drawer.less +445 -0
- package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +213 -0
- package/lib/error/errorDisplay/Web/Drawer/index.js +142 -0
- package/lib/error/errorDisplay/Web/ErrorMsg/index.js +444 -0
- package/lib/error/errorDisplay/Web/Notification/Notice.js +165 -0
- package/lib/error/errorDisplay/Web/Notification/Notification.js +156 -0
- package/lib/error/errorDisplay/Web/Notification/Notification.less +148 -0
- package/lib/error/errorDisplay/Web/Notification/index.js +103 -0
- package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +30 -0
- package/lib/error/errorDisplay/animation.less +112 -0
- package/lib/error/errorDisplay/compUtils.js +70 -0
- package/lib/error/errorDisplay/const.js +83 -0
- package/lib/error/errorDisplay/http.js +103 -0
- package/lib/error/errorDisplay/variables.less +1 -0
- package/lib/error/index.js +34 -0
- package/lib/images/ico-back.png +0 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +9 -1
- package/lib/rootConfig/index.d.ts +5 -0
- package/lib/rootConfig/index.js +28 -0
- package/lib/rootConfig/mobile/BusiComp.d.ts +71 -0
- package/lib/rootConfig/mobile/BusiComp.js +99 -0
- package/lib/rootConfig/mobile/MobileModal.d.ts +118 -0
- package/lib/rootConfig/mobile/MobileModal.js +147 -0
- package/lib/rootConfig/mobile/MobilePopover.d.ts +86 -0
- package/lib/rootConfig/mobile/MobilePopover.js +100 -0
- package/lib/rootConfig/mobile/index.d.ts +4 -0
- package/lib/rootConfig/mobile/index.js +34 -0
- package/lib/rootConfig/mobile/page.d.ts +169 -0
- package/lib/rootConfig/mobile/page.js +195 -0
- package/lib/rootConfig/pc/BusiComp.d.ts +70 -0
- package/lib/rootConfig/pc/BusiComp.js +98 -0
- package/lib/rootConfig/pc/Drawer.d.ts +155 -0
- package/lib/rootConfig/pc/Drawer.js +211 -0
- package/lib/rootConfig/pc/Modal.d.ts +165 -0
- package/lib/rootConfig/pc/Modal.js +203 -0
- package/lib/rootConfig/pc/Popover.d.ts +95 -0
- package/lib/rootConfig/pc/Popover.js +109 -0
- package/lib/rootConfig/pc/index.d.ts +5 -0
- package/lib/rootConfig/pc/index.js +41 -0
- package/lib/rootConfig/pc/page.d.ts +153 -0
- package/lib/rootConfig/pc/page.js +182 -0
- package/lib/rootConfig/todoActionList.d.ts +3144 -0
- package/lib/rootConfig/todoActionList.js +3651 -0
- package/lib/rootConfig/todoOptionList.d.ts +1468 -0
- package/lib/rootConfig/todoOptionList.js +1687 -0
- package/lib/security/const.d.ts +22 -0
- package/lib/security/const.js +38 -0
- package/lib/security/encipher/aes.d.ts +2 -0
- package/lib/security/encipher/aes.js +35 -0
- package/lib/security/encipher/des.d.ts +2 -0
- package/lib/security/encipher/des.js +34 -0
- package/lib/security/encipher/rsa.d.ts +2 -0
- package/lib/security/encipher/rsa.js +26 -0
- package/lib/security/encipher/sign.d.ts +6 -0
- package/lib/security/encipher/sign.js +110 -0
- package/lib/security/fetch.d.ts +9 -0
- package/lib/security/fetch.js +212 -0
- package/lib/security/httpEncryption.js +83 -0
- package/lib/security/index.d.ts +39 -0
- package/lib/security/index.js +29 -0
- package/lib/svg/check.svg +10 -0
- package/lib/svg/normal-check.svg +10 -0
- package/lib/svg/webViewError.svg +40 -0
- package/lib/theme/bin/default/modalWidth.js +15 -0
- package/lib/theme/bin/default/theme.js +352 -0
- package/lib/theme/bin/default/theme.less +347 -0
- package/lib/theme/bin/default/theme.scss +347 -0
- package/lib/theme/build.js +53 -0
- package/lib/theme/src/default/index.js +241 -0
- package/lib/theme/utils/colorPaletteMixin.js +61 -0
- package/lib/theme/utils/px2Num.js +14 -0
- package/lib/theme/utils/renderColors.js +29 -0
- package/lib/utils/cookieUtil.js +43 -0
- package/lib/utils/img.d.ts +1 -0
- package/lib/utils/img.js +10 -0
- package/lib/utils/url.d.ts +16 -0
- package/lib/utils/url.js +111 -0
- package/package.json +6 -3
- package/es/dealDsl/events/actionObj.d.ts +0 -3
- package/es/dealDsl/events/actionObj.js +0 -6
- package/es/dealDsl/events/index.d.ts +0 -6
- package/es/dealDsl/events/index.js +0 -14
- package/es/dealDsl/preprocess/editor.js +0 -21
- package/es/dealDsl/preprocess/engine.d.ts +0 -9
- package/es/dealDsl/preprocess/engine.js +0 -19
package/es/dealDsl/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { preprocessDSL
|
|
2
|
-
export { parseActionBefore } from './events';
|
|
1
|
+
export { preprocessDSL } from './preprocessDSL';
|
package/es/dealDsl/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { preprocessDSL
|
|
2
|
-
export { parseActionBefore } from './events';
|
|
1
|
+
export { preprocessDSL } from './preprocessDSL';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
import { hasSomeOwnProperty, hasEveryOwnProperty } from '../utils';
|
|
2
3
|
var h5 = {
|
|
3
4
|
Icon: function Icon() {
|
|
4
5
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5
6
|
var _component$props = component.props,
|
|
6
7
|
props = _component$props === void 0 ? {} : _component$props;
|
|
7
|
-
if (props.type) {
|
|
8
|
+
if (props.type && _typeof(props.type) === 'object') {
|
|
8
9
|
props.icon = props.type;
|
|
9
10
|
delete props.type;
|
|
10
11
|
}
|
|
@@ -20,6 +21,15 @@ var h5 = {
|
|
|
20
21
|
}
|
|
21
22
|
return component;
|
|
22
23
|
},
|
|
24
|
+
'DatePicker|Calendar|Picker': function DatePickerCalendarPicker() {
|
|
25
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
26
|
+
// TODO: 1.0.9 版本数据兼容
|
|
27
|
+
if (!component.props.hasOwnProperty('visible')) {
|
|
28
|
+
component.props.visible = false;
|
|
29
|
+
}
|
|
30
|
+
;
|
|
31
|
+
return component;
|
|
32
|
+
},
|
|
23
33
|
DformDate: function DformDate() {
|
|
24
34
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
25
35
|
var _component$props3 = component.props,
|
|
@@ -52,21 +62,51 @@ var h5 = {
|
|
|
52
62
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
53
63
|
var _component$props4 = component.props,
|
|
54
64
|
props = _component$props4 === void 0 ? {} : _component$props4;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
if (props.hasOwnProperty('type')) {
|
|
66
|
+
delete props.type;
|
|
67
|
+
delete props.theme;
|
|
68
|
+
delete props.fontAddress;
|
|
69
|
+
delete props.isIconFont;
|
|
70
|
+
delete props.iconFileInfo;
|
|
71
|
+
delete props.svgContent;
|
|
72
|
+
delete props.iconFile;
|
|
73
|
+
}
|
|
74
|
+
return component;
|
|
75
|
+
},
|
|
76
|
+
DformFile: function DformFile() {
|
|
77
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
78
|
+
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
79
|
+
var _component$props5 = component.props,
|
|
80
|
+
props = _component$props5 === void 0 ? {} : _component$props5;
|
|
81
|
+
var accept = props.accept,
|
|
82
|
+
acceptExtension = props.acceptExtension;
|
|
83
|
+
if (props.hasOwnProperty('accept')) {
|
|
84
|
+
props.uploadAccepType.accept = accept;
|
|
85
|
+
props === null || props === void 0 ? true : delete props.accept;
|
|
86
|
+
}
|
|
87
|
+
if (props.hasOwnProperty('acceptExtension')) {
|
|
88
|
+
props.uploadAccepType.acceptExtension = acceptExtension;
|
|
89
|
+
props === null || props === void 0 ? true : delete props.acceptExtension;
|
|
90
|
+
}
|
|
91
|
+
return component;
|
|
92
|
+
},
|
|
93
|
+
'Image|DformFile|DformImagePicker|Signature': function ImageDformFileDformImagePickerSignature() {
|
|
94
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
95
|
+
var _component$props6 = component.props,
|
|
96
|
+
props = _component$props6 === void 0 ? {} : _component$props6;
|
|
97
|
+
if (props.hasOwnProperty('action')) {
|
|
98
|
+
// 旧数据含有action,实际用到的值和columns当中的api是相同
|
|
99
|
+
props.columns.api = props.action;
|
|
100
|
+
delete props.action;
|
|
101
|
+
}
|
|
62
102
|
return component;
|
|
63
103
|
}
|
|
64
104
|
};
|
|
65
105
|
var pc = {
|
|
66
106
|
'DatePicker|TimePicker': function DatePickerTimePicker() {
|
|
67
107
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
68
|
-
var _component$
|
|
69
|
-
props = _component$
|
|
108
|
+
var _component$props7 = component.props,
|
|
109
|
+
props = _component$props7 === void 0 ? {} : _component$props7;
|
|
70
110
|
var isCurrent = props.isCurrent,
|
|
71
111
|
defaultValue = props.defaultValue,
|
|
72
112
|
customTime = props.customTime;
|
|
@@ -93,8 +133,8 @@ var pc = {
|
|
|
93
133
|
},
|
|
94
134
|
Button: function Button() {
|
|
95
135
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
96
|
-
var _component$
|
|
97
|
-
props = _component$
|
|
136
|
+
var _component$props8 = component.props,
|
|
137
|
+
props = _component$props8 === void 0 ? {} : _component$props8;
|
|
98
138
|
// const { popoverSetting, showPopover } = props;
|
|
99
139
|
if (props.iconType && !props.icon) {
|
|
100
140
|
var theme = props.theme,
|
|
@@ -123,15 +163,24 @@ var pc = {
|
|
|
123
163
|
},
|
|
124
164
|
'Dropdown|Menu': function DropdownMenu() {
|
|
125
165
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
126
|
-
var _component$
|
|
127
|
-
props = _component$
|
|
166
|
+
var _component$props9 = component.props,
|
|
167
|
+
props = _component$props9 === void 0 ? {} : _component$props9;
|
|
128
168
|
delete props.iconInfo;
|
|
129
169
|
return component;
|
|
130
170
|
},
|
|
131
171
|
'Input|Card|Collapse': function InputCardCollapse() {
|
|
132
172
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
133
|
-
var _component$
|
|
134
|
-
props = _component$
|
|
173
|
+
var _component$props10 = component.props,
|
|
174
|
+
props = _component$props10 === void 0 ? {} : _component$props10;
|
|
175
|
+
if (!props.icon) {
|
|
176
|
+
props.icon = {
|
|
177
|
+
type: props.type,
|
|
178
|
+
theme: props.theme || "outlined",
|
|
179
|
+
fontAddress: "",
|
|
180
|
+
isIconFont: false,
|
|
181
|
+
iconFileInfo: {}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
135
184
|
delete props.type;
|
|
136
185
|
delete props.theme;
|
|
137
186
|
delete props.fontAddress;
|
|
@@ -139,6 +188,15 @@ var pc = {
|
|
|
139
188
|
delete props.iconFileInfo;
|
|
140
189
|
delete props.svgContent;
|
|
141
190
|
delete props.iconFile;
|
|
191
|
+
if (!props.prefixIcon) {
|
|
192
|
+
props.prefixIcon = {
|
|
193
|
+
type: props.prefixIconType,
|
|
194
|
+
theme: props.prefixIconTheme || "outlined",
|
|
195
|
+
fontAddress: "",
|
|
196
|
+
isIconFont: false,
|
|
197
|
+
iconFileInfo: {}
|
|
198
|
+
};
|
|
199
|
+
}
|
|
142
200
|
delete props.prefixIconIconFileInfo;
|
|
143
201
|
delete props.prefixIconIsIconFont;
|
|
144
202
|
delete props.prefixIconType;
|
|
@@ -149,8 +207,17 @@ var pc = {
|
|
|
149
207
|
},
|
|
150
208
|
'StdUpload|Icon': function StdUploadIcon() {
|
|
151
209
|
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
152
|
-
var _component$
|
|
153
|
-
props = _component$
|
|
210
|
+
var _component$props11 = component.props,
|
|
211
|
+
props = _component$props11 === void 0 ? {} : _component$props11;
|
|
212
|
+
if (!props.icon) {
|
|
213
|
+
props.icon = {
|
|
214
|
+
type: props.type,
|
|
215
|
+
theme: props.theme || "outlined",
|
|
216
|
+
fontAddress: "",
|
|
217
|
+
isIconFont: false,
|
|
218
|
+
iconFileInfo: {}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
154
221
|
delete props.type;
|
|
155
222
|
delete props.theme;
|
|
156
223
|
delete props.fontAddress;
|
|
@@ -159,6 +226,104 @@ var pc = {
|
|
|
159
226
|
delete props.svgContent;
|
|
160
227
|
delete props.iconFile;
|
|
161
228
|
return component;
|
|
229
|
+
},
|
|
230
|
+
Table: function Table() {
|
|
231
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
232
|
+
var _component$props12 = component.props,
|
|
233
|
+
props = _component$props12 === void 0 ? {} : _component$props12;
|
|
234
|
+
if (typeof props.showCustom === 'boolean') {
|
|
235
|
+
// 旧数据
|
|
236
|
+
var iconPosition = props.iconPosition,
|
|
237
|
+
type = props.type,
|
|
238
|
+
theme = props.theme,
|
|
239
|
+
fontAddress = props.fontAddress,
|
|
240
|
+
isIconFont = props.isIconFont,
|
|
241
|
+
customTitle = props.customTitle,
|
|
242
|
+
customStyle = props.customStyle,
|
|
243
|
+
iconFile = props.iconFile,
|
|
244
|
+
showCustom = props.showCustom;
|
|
245
|
+
props.showCustom = {
|
|
246
|
+
iconPosition: iconPosition,
|
|
247
|
+
type: type,
|
|
248
|
+
theme: theme,
|
|
249
|
+
fontAddress: fontAddress,
|
|
250
|
+
isIconFont: isIconFont,
|
|
251
|
+
customTitle: customTitle,
|
|
252
|
+
customStyle: customStyle,
|
|
253
|
+
iconFile: iconFile,
|
|
254
|
+
hasCustom: showCustom
|
|
255
|
+
};
|
|
256
|
+
delete props.iconPosition;
|
|
257
|
+
delete props.type;
|
|
258
|
+
delete props.theme;
|
|
259
|
+
delete props.fontAddress;
|
|
260
|
+
delete props.isIconFont;
|
|
261
|
+
delete props.customTitle;
|
|
262
|
+
delete props.customStyle;
|
|
263
|
+
delete props.iconFile;
|
|
264
|
+
}
|
|
265
|
+
// 预处理内容列配置
|
|
266
|
+
var columns = props === null || props === void 0 ? void 0 : props.columns;
|
|
267
|
+
if (Array.isArray(columns)) {
|
|
268
|
+
props.columns = columns.map(function (colCfg) {
|
|
269
|
+
/**
|
|
270
|
+
* 1、兼容存量没有 editContent 情况:默认改为 -> 提示方式为默认提示 -> 提示内容为初始数据
|
|
271
|
+
* 2、false 假值表示:提示方式为无
|
|
272
|
+
*/
|
|
273
|
+
if (!(colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) && typeof (colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) !== 'boolean') {
|
|
274
|
+
colCfg.editContent = {
|
|
275
|
+
edittype: 'title',
|
|
276
|
+
title: {
|
|
277
|
+
"code": "$function main(text, row, index) { return text;}$",
|
|
278
|
+
"originCode": ["/**", " * 计算绑定的内容", " * @param {String} text 行数据中数据字段对应的原始值", " * @param {Object} row 行数据对象", " * @param {Number} index 行索引", " * @returns {Boolean} 实际值", " * 例:return row.id,表示当行主键为id时,返回内容为row.id实际的值", " */", "function main(text, row, index) {", " return text;", "}"]
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
return colCfg;
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
return component;
|
|
286
|
+
},
|
|
287
|
+
Upload: function Upload(component) {
|
|
288
|
+
var _component$props13 = component.props,
|
|
289
|
+
props = _component$props13 === void 0 ? {} : _component$props13;
|
|
290
|
+
if (props.hasOwnProperty('action')) {
|
|
291
|
+
// 旧数据含有action
|
|
292
|
+
props.columns.api = props.action;
|
|
293
|
+
delete props.action;
|
|
294
|
+
}
|
|
295
|
+
if (hasEveryOwnProperty(props, ['accept', 'acceptType'])) {
|
|
296
|
+
// 实际数据是取acceptType
|
|
297
|
+
delete props.accept;
|
|
298
|
+
}
|
|
299
|
+
return component;
|
|
300
|
+
},
|
|
301
|
+
StdUpload: function StdUpload(component) {
|
|
302
|
+
var props = component.props;
|
|
303
|
+
var accept = props.accept,
|
|
304
|
+
acceptExtension = props.acceptExtension,
|
|
305
|
+
action = props.action;
|
|
306
|
+
// 旧数据含有action
|
|
307
|
+
if (props.hasOwnProperty('action')) {
|
|
308
|
+
props.columns.api = action;
|
|
309
|
+
delete props.action;
|
|
310
|
+
}
|
|
311
|
+
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
312
|
+
if (props.hasOwnProperty('accept')) {
|
|
313
|
+
props.uploadAccepType.accept = accept;
|
|
314
|
+
props === null || props === void 0 ? true : delete props.accept;
|
|
315
|
+
}
|
|
316
|
+
if (props.hasOwnProperty('acceptExtension')) {
|
|
317
|
+
if (props.hasOwnProperty('uploadAccepType')) {
|
|
318
|
+
props.uploadAccepType.acceptExtension = acceptExtension;
|
|
319
|
+
} else {
|
|
320
|
+
// 兼容旧数据无uploadAccepType字段
|
|
321
|
+
props.uploadAccepType = {};
|
|
322
|
+
props.uploadAccepType.acceptExtension = acceptExtension;
|
|
323
|
+
}
|
|
324
|
+
props === null || props === void 0 ? true : delete props.acceptExtension;
|
|
325
|
+
}
|
|
326
|
+
return component;
|
|
162
327
|
}
|
|
163
328
|
};
|
|
164
329
|
/**
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type { ContextType } from "./PropType";
|
|
2
2
|
/**
|
|
3
|
-
* 本方法只处理运行态和配置态公共属性.
|
|
4
|
-
*
|
|
3
|
+
* 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
|
|
4
|
+
* 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
|
|
5
5
|
* @param component
|
|
6
6
|
* @param context
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
9
|
export declare const preprocessDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
|
|
10
|
-
/**
|
|
11
|
-
* 预处理DSL数据, 本方法仅在编辑器端使用。 处理后数据的权重高于preprocessDSL。
|
|
12
|
-
* @param component 组件JSON数据
|
|
13
|
-
* @param context 上下文
|
|
14
|
-
*/
|
|
15
|
-
export declare const preprocessEditorDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
|
|
16
|
-
/**
|
|
17
|
-
* 预处理DSL数据,本方法仅在运行态端使用。 处理后数据的权重高于preprocessDSL。
|
|
18
|
-
* @param component 组件JSON数据
|
|
19
|
-
* @param context 上下文
|
|
20
|
-
*/
|
|
21
|
-
export declare const preprocessEngineDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import preprocessObj from "./preprocess/common";
|
|
2
|
-
import preEditorObj from "./preprocess/editor";
|
|
3
|
-
import preEngineObj from "./preprocess/engine";
|
|
4
2
|
/**
|
|
5
3
|
* 支持属性key通过 "compName|compName"模式
|
|
6
4
|
* @param compName
|
|
@@ -18,8 +16,8 @@ var collectionMethods = function collectionMethods(compName, obj) {
|
|
|
18
16
|
return funcs;
|
|
19
17
|
};
|
|
20
18
|
/**
|
|
21
|
-
* 本方法只处理运行态和配置态公共属性.
|
|
22
|
-
*
|
|
19
|
+
* 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
|
|
20
|
+
* 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
|
|
23
21
|
* @param component
|
|
24
22
|
* @param context
|
|
25
23
|
* @returns
|
|
@@ -37,42 +35,4 @@ export var preprocessDSL = function preprocessDSL(component, context) {
|
|
|
37
35
|
targetComponents = (_fn = fn(targetComponents)) !== null && _fn !== void 0 ? _fn : targetComponents;
|
|
38
36
|
});
|
|
39
37
|
return targetComponents;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* 预处理DSL数据, 本方法仅在编辑器端使用。 处理后数据的权重高于preprocessDSL。
|
|
43
|
-
* @param component 组件JSON数据
|
|
44
|
-
* @param context 上下文
|
|
45
|
-
*/
|
|
46
|
-
export var preprocessEditorDSL = function preprocessEditorDSL(component, context) {
|
|
47
|
-
var targetComponents = component;
|
|
48
|
-
var _ref2 = component || {},
|
|
49
|
-
compName = _ref2.compName;
|
|
50
|
-
var _context$isMobile2 = context.isMobile,
|
|
51
|
-
isMobile = _context$isMobile2 === void 0 ? false : _context$isMobile2;
|
|
52
|
-
var platform = isMobile ? 'h5' : 'pc';
|
|
53
|
-
var methods = collectionMethods(compName, preEditorObj === null || preEditorObj === void 0 ? void 0 : preEditorObj[platform]);
|
|
54
|
-
methods.forEach(function (fn) {
|
|
55
|
-
var _fn2;
|
|
56
|
-
targetComponents = (_fn2 = fn(targetComponents)) !== null && _fn2 !== void 0 ? _fn2 : targetComponents;
|
|
57
|
-
});
|
|
58
|
-
return targetComponents;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* 预处理DSL数据,本方法仅在运行态端使用。 处理后数据的权重高于preprocessDSL。
|
|
62
|
-
* @param component 组件JSON数据
|
|
63
|
-
* @param context 上下文
|
|
64
|
-
*/
|
|
65
|
-
export var preprocessEngineDSL = function preprocessEngineDSL(component, context) {
|
|
66
|
-
var targetComponents = component;
|
|
67
|
-
var _ref3 = component || {},
|
|
68
|
-
compName = _ref3.compName;
|
|
69
|
-
var _context$isMobile3 = context.isMobile,
|
|
70
|
-
isMobile = _context$isMobile3 === void 0 ? false : _context$isMobile3;
|
|
71
|
-
var platform = isMobile ? 'h5' : 'pc';
|
|
72
|
-
var methods = collectionMethods(compName, preEngineObj === null || preEngineObj === void 0 ? void 0 : preEngineObj[platform]);
|
|
73
|
-
methods.forEach(function (fn) {
|
|
74
|
-
var _fn3;
|
|
75
|
-
targetComponents = (_fn3 = fn(targetComponents)) !== null && _fn3 !== void 0 ? _fn3 : targetComponents;
|
|
76
|
-
});
|
|
77
|
-
return targetComponents;
|
|
78
38
|
};
|
|
@@ -46,7 +46,8 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
46
46
|
_props$errorInfoProps = props.errorInfoProps,
|
|
47
47
|
errorInfoProps = _props$errorInfoProps === void 0 ? {
|
|
48
48
|
tabs: []
|
|
49
|
-
} : _props$errorInfoProps
|
|
49
|
+
} : _props$errorInfoProps,
|
|
50
|
+
subTitle = props.subTitle;
|
|
50
51
|
var _useState = useState([]),
|
|
51
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
52
53
|
extraConts = _useState2[0],
|
|
@@ -191,7 +192,10 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
191
192
|
tabsContent = errorInfoProps.tabsContent,
|
|
192
193
|
tabsFooter = errorInfoProps.tabsFooter,
|
|
193
194
|
onTabsChange = errorInfoProps.onTabsChange;
|
|
194
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isDomEle(
|
|
195
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isDomEle(subTitle) ? /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
className: "lx-drawer-sub-title",
|
|
197
|
+
title: subTitle
|
|
198
|
+
}, subTitle) : null, isDomEle(content) ? /*#__PURE__*/React.createElement("div", {
|
|
195
199
|
className: "lx-drawer-code-desc"
|
|
196
200
|
}, content) : null, /*#__PURE__*/React.createElement("div", {
|
|
197
201
|
className: classnames('lx-drawer-code-tabs', {
|
|
@@ -386,4 +386,60 @@
|
|
|
386
386
|
border-radius: 4px;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
+
|
|
390
|
+
&-sub-title {
|
|
391
|
+
background-color: rgba(28, 36, 46, 0.04);
|
|
392
|
+
color: rgba(28, 36, 46, 0.55);
|
|
393
|
+
height: 32px;
|
|
394
|
+
line-height: 32px;
|
|
395
|
+
padding: 0 16px;
|
|
396
|
+
white-space: nowrap;
|
|
397
|
+
text-overflow: ellipsis;
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
font-size: 12px;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
&-btn {
|
|
403
|
+
display: inline-block;
|
|
404
|
+
padding: 0 15px;
|
|
405
|
+
border: 1px solid rgba(28, 36, 46, 0.15);
|
|
406
|
+
border-radius: 4px;
|
|
407
|
+
height: 32px;
|
|
408
|
+
line-height: 30px;
|
|
409
|
+
color: #1c242e;
|
|
410
|
+
&:hover {
|
|
411
|
+
border-color: rgb(112, 158, 250);
|
|
412
|
+
color: rgb(112, 158, 250);
|
|
413
|
+
}
|
|
414
|
+
&-disabled {
|
|
415
|
+
cursor: not-allowed;
|
|
416
|
+
pointer-events: none;
|
|
417
|
+
&,
|
|
418
|
+
&:hover,
|
|
419
|
+
&:focus,
|
|
420
|
+
&:active {
|
|
421
|
+
border-color: #e5e5e5 !important;
|
|
422
|
+
color: rgba(28,36,46,0.65) !important;
|
|
423
|
+
background-color: #e5e5e5 !important;
|
|
424
|
+
opacity: 1;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
&-btn&-btn-primary {
|
|
430
|
+
color: rgb(68, 119, 238);
|
|
431
|
+
background-color: rgb(68, 119, 238);
|
|
432
|
+
&,
|
|
433
|
+
&:hover {
|
|
434
|
+
color: white;
|
|
435
|
+
}
|
|
436
|
+
&:hover {
|
|
437
|
+
border-color: rgb(112, 158, 250);
|
|
438
|
+
background-color: rgb(112, 158, 250);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
&-footer &-btn {
|
|
443
|
+
margin-left: 8px;
|
|
444
|
+
}
|
|
389
445
|
}
|
|
@@ -50,7 +50,8 @@ function getDrawerInstance() {
|
|
|
50
50
|
drawerInstance === null || drawerInstance === void 0 ? void 0 : drawerInstance.update(_objectSpread(_objectSpread({}, prarms), {}, {
|
|
51
51
|
key: cacheKey
|
|
52
52
|
}));
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
|
+
key: cacheKey
|
|
54
55
|
});
|
|
55
56
|
});
|
|
56
57
|
});
|
|
@@ -62,11 +63,13 @@ var drawerHandel = {
|
|
|
62
63
|
getDrawerInstance(options, function (_ref) {
|
|
63
64
|
var instance = _ref.instance,
|
|
64
65
|
_close = _ref.close,
|
|
65
|
-
update = _ref.update
|
|
66
|
+
update = _ref.update,
|
|
67
|
+
key = _ref.key;
|
|
66
68
|
var _ref2 = instance || {},
|
|
67
69
|
open = _ref2.open,
|
|
68
70
|
otherInstace = _objectWithoutProperties(_ref2, _excluded);
|
|
69
71
|
open(options);
|
|
72
|
+
drawerHandel.key = key;
|
|
70
73
|
resolve(_objectSpread(_objectSpread({}, otherInstace), {}, {
|
|
71
74
|
close: function close() {
|
|
72
75
|
if ((options === null || options === void 0 ? void 0 : options.onClose) instanceof Function) {
|
|
@@ -81,10 +84,15 @@ var drawerHandel = {
|
|
|
81
84
|
});
|
|
82
85
|
});
|
|
83
86
|
},
|
|
84
|
-
close: function close(
|
|
87
|
+
close: function close() {
|
|
88
|
+
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : drawerHandel.key;
|
|
85
89
|
Object.keys(drawerInstances).forEach(function (cacheKey) {
|
|
86
90
|
Promise.resolve(drawerInstances[cacheKey]).then(function (instance) {
|
|
87
|
-
instance.remove
|
|
91
|
+
if (instance === null || instance === void 0 ? void 0 : instance.remove) {
|
|
92
|
+
instance.remove(key);
|
|
93
|
+
} else {
|
|
94
|
+
instance.close(key);
|
|
95
|
+
}
|
|
88
96
|
});
|
|
89
97
|
delete drawerInstances[cacheKey];
|
|
90
98
|
});
|