@lingxiteam/assets 1.0.11-alpha.25 → 1.0.11-alpha.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/es/error/errorDisplay/variables.less +0 -1
  2. package/lib/dealDsl/preprocess/common.js +31 -15
  3. package/lib/rootConfig/mobile/page.d.ts +4 -0
  4. package/lib/rootConfig/mobile/page.js +10 -0
  5. package/lib/rootConfig/pc/page.d.ts +4 -0
  6. package/lib/rootConfig/pc/page.js +10 -0
  7. package/package.json +1 -1
  8. package/es/IconSvg/index.d.ts +0 -6
  9. package/es/IconSvg/index.js +0 -23
  10. package/es/dealDsl/PropType.d.ts +0 -7
  11. package/es/dealDsl/PropType.js +0 -1
  12. package/es/dealDsl/index.d.ts +0 -1
  13. package/es/dealDsl/index.js +0 -1
  14. package/es/dealDsl/preprocess/common.d.ts +0 -9
  15. package/es/dealDsl/preprocess/common.js +0 -311
  16. package/es/dealDsl/preprocessDSL.d.ts +0 -9
  17. package/es/dealDsl/preprocessDSL.js +0 -38
  18. package/es/dealDsl/utils/index.d.ts +0 -13
  19. package/es/dealDsl/utils/index.js +0 -21
  20. package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +0 -104
  21. package/es/error/errorDisplay/Mobile/Drawer/Drawer.less +0 -201
  22. package/es/error/errorDisplay/Mobile/Drawer/index.js +0 -132
  23. package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +0 -199
  24. package/es/error/errorDisplay/Mobile/Modal/Modal.js +0 -43
  25. package/es/error/errorDisplay/Mobile/Modal/Modal.less +0 -146
  26. package/es/error/errorDisplay/Mobile/Modal/index.js +0 -119
  27. package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +0 -13
  28. package/es/error/errorDisplay/Web/Drawer/Drawer.js +0 -268
  29. package/es/error/errorDisplay/Web/Drawer/Drawer.less +0 -445
  30. package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +0 -203
  31. package/es/error/errorDisplay/Web/Drawer/index.js +0 -132
  32. package/es/error/errorDisplay/Web/ErrorMsg/index.js +0 -436
  33. package/es/error/errorDisplay/Web/Notification/Notice.js +0 -155
  34. package/es/error/errorDisplay/Web/Notification/Notification.js +0 -146
  35. package/es/error/errorDisplay/Web/Notification/Notification.less +0 -148
  36. package/es/error/errorDisplay/Web/Notification/index.js +0 -95
  37. package/es/error/errorDisplay/Web/defaultGlobalConfig.js +0 -23
  38. package/es/index.d.ts +0 -9
  39. package/es/index.js +0 -10
  40. package/es/rootConfig/index.d.ts +0 -5
  41. package/es/rootConfig/index.js +0 -5
  42. package/es/rootConfig/mobile/BusiComp.d.ts +0 -71
  43. package/es/rootConfig/mobile/BusiComp.js +0 -92
  44. package/es/rootConfig/mobile/MobileModal.d.ts +0 -118
  45. package/es/rootConfig/mobile/MobileModal.js +0 -140
  46. package/es/rootConfig/mobile/MobilePopover.d.ts +0 -86
  47. package/es/rootConfig/mobile/MobilePopover.js +0 -93
  48. package/es/rootConfig/mobile/index.d.ts +0 -4
  49. package/es/rootConfig/mobile/index.js +0 -4
  50. package/es/rootConfig/mobile/page.d.ts +0 -165
  51. package/es/rootConfig/mobile/page.js +0 -178
  52. package/es/rootConfig/pc/BusiComp.d.ts +0 -70
  53. package/es/rootConfig/pc/BusiComp.js +0 -91
  54. package/es/rootConfig/pc/Drawer.d.ts +0 -155
  55. package/es/rootConfig/pc/Drawer.js +0 -204
  56. package/es/rootConfig/pc/Modal.d.ts +0 -165
  57. package/es/rootConfig/pc/Modal.js +0 -196
  58. package/es/rootConfig/pc/Popover.d.ts +0 -95
  59. package/es/rootConfig/pc/Popover.js +0 -102
  60. package/es/rootConfig/pc/index.d.ts +0 -5
  61. package/es/rootConfig/pc/index.js +0 -5
  62. package/es/rootConfig/pc/page.d.ts +0 -149
  63. package/es/rootConfig/pc/page.js +0 -165
  64. package/es/rootConfig/todoActionList.d.ts +0 -3144
  65. package/es/rootConfig/todoActionList.js +0 -3642
  66. package/es/rootConfig/todoOptionList.d.ts +0 -1468
  67. package/es/rootConfig/todoOptionList.js +0 -1680
  68. package/es/security/const.d.ts +0 -22
  69. package/es/security/const.js +0 -23
  70. package/es/security/encipher/aes.d.ts +0 -2
  71. package/es/security/encipher/aes.js +0 -26
  72. package/es/security/encipher/des.d.ts +0 -2
  73. package/es/security/encipher/des.js +0 -25
  74. package/es/security/encipher/rsa.d.ts +0 -2
  75. package/es/security/encipher/rsa.js +0 -17
  76. package/es/security/encipher/sign.d.ts +0 -6
  77. package/es/security/encipher/sign.js +0 -101
  78. package/es/security/fetch.d.ts +0 -9
  79. package/es/security/fetch.js +0 -205
  80. package/es/security/index.d.ts +0 -39
  81. package/es/security/index.js +0 -21
  82. package/es/theme/bin/default/modalWidth.js +0 -8
  83. package/es/theme/bin/default/theme.js +0 -350
  84. package/es/theme/bin/default/theme.less +0 -347
  85. package/es/theme/bin/default/theme.scss +0 -347
  86. package/es/theme/src/default/index.js +0 -239
  87. package/es/theme/utils/colorPaletteMixin.js +0 -59
  88. package/es/theme/utils/px2Num.js +0 -12
  89. package/es/theme/utils/renderColors.js +0 -27
  90. package/es/utils/img.d.ts +0 -1
  91. package/es/utils/img.js +0 -3
  92. package/es/utils/url.d.ts +0 -16
  93. package/es/utils/url.js +0 -102
@@ -1 +0,0 @@
1
- @hd: 1px;
@@ -108,10 +108,26 @@ var h5 = {
108
108
  }
109
109
  };
110
110
  var pc = {
111
- 'DatePicker|TimePicker': function DatePickerTimePicker() {
111
+ //FIXME 临时处理输入框图标问题
112
+ Input: function Input() {
112
113
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
113
114
  var _component$props7 = component.props,
114
115
  props = _component$props7 === void 0 ? {} : _component$props7;
116
+ if (props.type) {
117
+ props.icon = {
118
+ type: props.type,
119
+ theme: props.theme || "outlined",
120
+ fontAddress: "",
121
+ isIconFont: false,
122
+ iconFileInfo: {}
123
+ };
124
+ }
125
+ return component;
126
+ },
127
+ 'DatePicker|TimePicker': function DatePickerTimePicker() {
128
+ var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
129
+ var _component$props8 = component.props,
130
+ props = _component$props8 === void 0 ? {} : _component$props8;
115
131
  var isCurrent = props.isCurrent,
116
132
  defaultValue = props.defaultValue,
117
133
  customTime = props.customTime;
@@ -138,8 +154,8 @@ var pc = {
138
154
  },
139
155
  Button: function Button() {
140
156
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
141
- var _component$props8 = component.props,
142
- props = _component$props8 === void 0 ? {} : _component$props8;
157
+ var _component$props9 = component.props,
158
+ props = _component$props9 === void 0 ? {} : _component$props9;
143
159
  // const { popoverSetting, showPopover } = props;
144
160
  if (props.iconType && !props.icon) {
145
161
  var theme = props.theme,
@@ -168,15 +184,15 @@ var pc = {
168
184
  },
169
185
  'Dropdown|Menu': function DropdownMenu() {
170
186
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
171
- var _component$props9 = component.props,
172
- props = _component$props9 === void 0 ? {} : _component$props9;
187
+ var _component$props10 = component.props,
188
+ props = _component$props10 === void 0 ? {} : _component$props10;
173
189
  delete props.iconInfo;
174
190
  return component;
175
191
  },
176
192
  'Input|Card|Collapse': function InputCardCollapse() {
177
193
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
178
- var _component$props10 = component.props,
179
- props = _component$props10 === void 0 ? {} : _component$props10;
194
+ var _component$props11 = component.props,
195
+ props = _component$props11 === void 0 ? {} : _component$props11;
180
196
  delete props.type;
181
197
  delete props.theme;
182
198
  delete props.fontAddress;
@@ -194,8 +210,8 @@ var pc = {
194
210
  },
195
211
  'StdUpload|Icon': function StdUploadIcon() {
196
212
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
197
- var _component$props11 = component.props,
198
- props = _component$props11 === void 0 ? {} : _component$props11;
213
+ var _component$props12 = component.props,
214
+ props = _component$props12 === void 0 ? {} : _component$props12;
199
215
  delete props.type;
200
216
  delete props.theme;
201
217
  delete props.fontAddress;
@@ -207,8 +223,8 @@ var pc = {
207
223
  },
208
224
  Table: function Table() {
209
225
  var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
210
- var _component$props12 = component.props,
211
- props = _component$props12 === void 0 ? {} : _component$props12;
226
+ var _component$props13 = component.props,
227
+ props = _component$props13 === void 0 ? {} : _component$props13;
212
228
  if (typeof props.showCustom === 'boolean') {
213
229
  // 旧数据
214
230
  var iconPosition = props.iconPosition,
@@ -263,8 +279,8 @@ var pc = {
263
279
  return component;
264
280
  },
265
281
  Upload: function Upload(component) {
266
- var _component$props13 = component.props,
267
- props = _component$props13 === void 0 ? {} : _component$props13;
282
+ var _component$props14 = component.props,
283
+ props = _component$props14 === void 0 ? {} : _component$props14;
268
284
  if (props.hasOwnProperty('action')) {
269
285
  // 旧数据含有action
270
286
  props.columns.api = props.action;
@@ -298,8 +314,8 @@ var pc = {
298
314
  return component;
299
315
  },
300
316
  Icon: function Icon(component) {
301
- var _component$props14, _component$props15;
302
- if ((component === null || component === void 0 ? void 0 : (_component$props14 = component.props) === null || _component$props14 === void 0 ? void 0 : _component$props14.type) && !(component === null || component === void 0 ? void 0 : (_component$props15 = component.props) === null || _component$props15 === void 0 ? void 0 : _component$props15.icon)) {
317
+ var _component$props15, _component$props16;
318
+ if ((component === null || component === void 0 ? void 0 : (_component$props15 = component.props) === null || _component$props15 === void 0 ? void 0 : _component$props15.type) && !(component === null || component === void 0 ? void 0 : (_component$props16 = component.props) === null || _component$props16 === void 0 ? void 0 : _component$props16.icon)) {
303
319
  component.props.icon = {
304
320
  type: component.props.type,
305
321
  theme: component.props.theme
@@ -14,6 +14,10 @@ declare const _default: {
14
14
  name: string;
15
15
  code: string;
16
16
  }[];
17
+ compState: {
18
+ name: string;
19
+ code: string;
20
+ }[];
17
21
  };
18
22
  style: {};
19
23
  setEvents: never[];
@@ -26,6 +26,16 @@ var _default = {
26
26
  }, {
27
27
  name: '业务数据',
28
28
  code: 'bizData'
29
+ }],
30
+ compState: [{
31
+ name: '业务主键',
32
+ code: 'bizId'
33
+ }, {
34
+ name: '业务场景',
35
+ code: 'sceneCode'
36
+ }, {
37
+ name: '业务数据',
38
+ code: 'bizData'
29
39
  }]
30
40
  },
31
41
  style: {},
@@ -14,6 +14,10 @@ declare const _default: {
14
14
  name: string;
15
15
  code: string;
16
16
  }[];
17
+ compState: {
18
+ name: string;
19
+ code: string;
20
+ }[];
17
21
  };
18
22
  style: {};
19
23
  setEvents: never[];
@@ -26,6 +26,16 @@ var _default = {
26
26
  }, {
27
27
  name: '业务数据',
28
28
  code: 'bizData'
29
+ }],
30
+ compState: [{
31
+ name: '业务主键',
32
+ code: 'bizId'
33
+ }, {
34
+ name: '业务场景',
35
+ code: 'sceneCode'
36
+ }, {
37
+ name: '业务数据',
38
+ code: 'bizData'
29
39
  }]
30
40
  },
31
41
  style: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxiteam/assets",
3
- "version": "1.0.11-alpha.25",
3
+ "version": "1.0.11-alpha.26",
4
4
  "description": "灵犀低代码平台移动端 - 工具类",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface SvgIconProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
3
- src: string;
4
- }
5
- declare const IconSvg: React.FC<SvgIconProps>;
6
- export default IconSvg;
@@ -1,23 +0,0 @@
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
- var _excluded = ["style", "src"];
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { getSvgImageBase64 } from '../utils/img';
12
- var IconSvg = function IconSvg(props) {
13
- var _props$style = props.style,
14
- style = _props$style === void 0 ? {} : _props$style,
15
- src = props.src,
16
- restProps = _objectWithoutProperties(props, _excluded);
17
- return _jsx("i", _objectSpread(_objectSpread({}, restProps), {}, {
18
- style: _objectSpread(_objectSpread({}, restProps), {}, {
19
- backgroundImage: getSvgImageBase64(src)
20
- })
21
- }));
22
- };
23
- export default IconSvg;
@@ -1,7 +0,0 @@
1
- export interface ContextType {
2
- platformType: 'LowCode' | 'ZeroCode' | 'Design';
3
- isMobile: boolean;
4
- }
5
- export type JSONType = Record<string, any>;
6
- export type ProcessFunctionType = (component: JSONType) => JSONType;
7
- export type ProcessPlatformType = Record<string, ProcessFunctionType>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export { preprocessDSL } from './preprocessDSL';
@@ -1 +0,0 @@
1
- export { preprocessDSL } from './preprocessDSL';
@@ -1,9 +0,0 @@
1
- import type { ProcessPlatformType } from "../PropType";
2
- /**
3
- * 配置态和运行态共用
4
- */
5
- declare const _default: {
6
- h5: ProcessPlatformType;
7
- pc: ProcessPlatformType;
8
- };
9
- export default _default;
@@ -1,311 +0,0 @@
1
- import { hasSomeOwnProperty, hasEveryOwnProperty } from '../utils';
2
- var h5 = {
3
- Icon: function Icon() {
4
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5
- var _component$props = component.props,
6
- props = _component$props === void 0 ? {} : _component$props;
7
- if (props.type) {
8
- props.icon = props.type;
9
- delete props.type;
10
- }
11
- return component;
12
- },
13
- Divider: function Divider() {
14
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15
- var _component$props2 = component.props,
16
- props = _component$props2 === void 0 ? {} : _component$props2;
17
- if (props.status !== undefined) {
18
- props.visible = props.status;
19
- delete props.status;
20
- }
21
- return component;
22
- },
23
- 'DatePicker|Calendar|Picker': function DatePickerCalendarPicker() {
24
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
25
- // TODO: 1.0.9 版本数据兼容
26
- if (!component.props.hasOwnProperty('visible')) {
27
- component.props.visible = false;
28
- }
29
- ;
30
- return component;
31
- },
32
- DformDate: function DformDate() {
33
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
34
- var _component$props3 = component.props,
35
- props = _component$props3 === void 0 ? {} : _component$props3;
36
- var isCurrent = props.isCurrent,
37
- defaultValue = props.defaultValue,
38
- customTime = props.customTime;
39
- // props中存在isCurrent/customTime属性,就转化。
40
- if (hasSomeOwnProperty(props, ['isCurrent', 'customTime'])) {
41
- props.defaultValue = {
42
- isCurrent: isCurrent,
43
- defaultValue: defaultValue,
44
- customTime: customTime,
45
- type: function () {
46
- if (isCurrent) {
47
- return 'isCurrent';
48
- }
49
- if (customTime) {
50
- return 'custom';
51
- }
52
- return 'now';
53
- }()
54
- };
55
- delete props.isCurrent;
56
- delete props.customTime;
57
- }
58
- return component;
59
- },
60
- 'DMultiplePicker|DformDate|DformInput|DformSelect|DformPicker': function DMultiplePickerDformDateDformInputDformSelectDformPicker() {
61
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
62
- var _component$props4 = component.props,
63
- props = _component$props4 === void 0 ? {} : _component$props4;
64
- if (props.hasOwnProperty('type')) {
65
- delete props.type;
66
- delete props.theme;
67
- delete props.fontAddress;
68
- delete props.isIconFont;
69
- delete props.iconFileInfo;
70
- delete props.svgContent;
71
- delete props.iconFile;
72
- }
73
- return component;
74
- },
75
- DformFile: function DformFile() {
76
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
77
- // 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
78
- var _component$props5 = component.props,
79
- props = _component$props5 === void 0 ? {} : _component$props5;
80
- var accept = props.accept,
81
- acceptExtension = props.acceptExtension;
82
- if (props.hasOwnProperty('accept')) {
83
- props.uploadAccepType.accept = accept;
84
- props === null || props === void 0 ? true : delete props.accept;
85
- }
86
- if (props.hasOwnProperty('acceptExtension')) {
87
- props.uploadAccepType.acceptExtension = acceptExtension;
88
- props === null || props === void 0 ? true : delete props.acceptExtension;
89
- }
90
- return component;
91
- },
92
- 'Image|DformFile|DformImagePicker|Signature': function ImageDformFileDformImagePickerSignature() {
93
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
94
- var _component$props6 = component.props,
95
- props = _component$props6 === void 0 ? {} : _component$props6;
96
- if (props.hasOwnProperty('action')) {
97
- // 旧数据含有action,实际用到的值和columns当中的api是相同
98
- props.columns.api = props.action;
99
- delete props.action;
100
- }
101
- return component;
102
- }
103
- };
104
- var pc = {
105
- 'DatePicker|TimePicker': function DatePickerTimePicker() {
106
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
107
- var _component$props7 = component.props,
108
- props = _component$props7 === void 0 ? {} : _component$props7;
109
- var isCurrent = props.isCurrent,
110
- defaultValue = props.defaultValue,
111
- customTime = props.customTime;
112
- // props中存在isCurrent/customTime属性,就转化。
113
- if (hasSomeOwnProperty(props, ['isCurrent', 'customTime'])) {
114
- props.defaultValue = {
115
- isCurrent: isCurrent,
116
- defaultValue: defaultValue,
117
- customTime: customTime,
118
- type: function () {
119
- if (isCurrent) {
120
- return 'isCurrent';
121
- }
122
- if (customTime) {
123
- return 'custom';
124
- }
125
- return 'now';
126
- }()
127
- };
128
- delete props.isCurrent;
129
- delete props.customTime;
130
- }
131
- return component;
132
- },
133
- Button: function Button() {
134
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
135
- var _component$props8 = component.props,
136
- props = _component$props8 === void 0 ? {} : _component$props8;
137
- // const { popoverSetting, showPopover } = props;
138
- if (props.iconType && !props.icon) {
139
- var theme = props.theme,
140
- fontAddress = props.fontAddress,
141
- isIconFont = props.isIconFont,
142
- svgContent = props.svgContent,
143
- iconFile = props.iconFile;
144
- props.icon = {
145
- type: props.iconType,
146
- theme: theme,
147
- fontAddress: fontAddress,
148
- isIconFont: isIconFont,
149
- svgContent: svgContent,
150
- iconFile: iconFile
151
- };
152
- props.icon.type = props.iconType;
153
- delete props.iconType;
154
- }
155
- delete props.theme;
156
- delete props.fontAddress;
157
- delete props.isIconFont;
158
- delete props.iconFileInfo;
159
- delete props.svgContent;
160
- delete props.iconFile;
161
- return component;
162
- },
163
- 'Dropdown|Menu': function DropdownMenu() {
164
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
165
- var _component$props9 = component.props,
166
- props = _component$props9 === void 0 ? {} : _component$props9;
167
- delete props.iconInfo;
168
- return component;
169
- },
170
- 'Input|Card|Collapse': function InputCardCollapse() {
171
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
172
- var _component$props10 = component.props,
173
- props = _component$props10 === void 0 ? {} : _component$props10;
174
- delete props.type;
175
- delete props.theme;
176
- delete props.fontAddress;
177
- delete props.isIconFont;
178
- delete props.iconFileInfo;
179
- delete props.svgContent;
180
- delete props.iconFile;
181
- delete props.prefixIconIconFileInfo;
182
- delete props.prefixIconIsIconFont;
183
- delete props.prefixIconType;
184
- delete props.prefixIconTheme;
185
- delete props.prefixIconFontAddress;
186
- delete props.prefixIconiconFile;
187
- return component;
188
- },
189
- 'StdUpload|Icon': function StdUploadIcon() {
190
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
191
- var _component$props11 = component.props,
192
- props = _component$props11 === void 0 ? {} : _component$props11;
193
- delete props.type;
194
- delete props.theme;
195
- delete props.fontAddress;
196
- delete props.isIconFont;
197
- delete props.iconFileInfo;
198
- delete props.svgContent;
199
- delete props.iconFile;
200
- return component;
201
- },
202
- Table: function Table() {
203
- var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
204
- var _component$props12 = component.props,
205
- props = _component$props12 === void 0 ? {} : _component$props12;
206
- if (typeof props.showCustom === 'boolean') {
207
- // 旧数据
208
- var iconPosition = props.iconPosition,
209
- type = props.type,
210
- theme = props.theme,
211
- fontAddress = props.fontAddress,
212
- isIconFont = props.isIconFont,
213
- customTitle = props.customTitle,
214
- customStyle = props.customStyle,
215
- iconFile = props.iconFile,
216
- showCustom = props.showCustom;
217
- props.showCustom = {
218
- iconPosition: iconPosition,
219
- type: type,
220
- theme: theme,
221
- fontAddress: fontAddress,
222
- isIconFont: isIconFont,
223
- customTitle: customTitle,
224
- customStyle: customStyle,
225
- iconFile: iconFile,
226
- hasCustom: showCustom
227
- };
228
- delete props.iconPosition;
229
- delete props.type;
230
- delete props.theme;
231
- delete props.fontAddress;
232
- delete props.isIconFont;
233
- delete props.customTitle;
234
- delete props.customStyle;
235
- delete props.iconFile;
236
- }
237
- // 预处理内容列配置
238
- var columns = props === null || props === void 0 ? void 0 : props.columns;
239
- if (Array.isArray(columns)) {
240
- props.columns = columns.map(function (colCfg) {
241
- /**
242
- * 1、兼容存量没有 editContent 情况:默认改为 -> 提示方式为默认提示 -> 提示内容为初始数据
243
- * 2、false 假值表示:提示方式为无
244
- */
245
- if (!(colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) && typeof (colCfg === null || colCfg === void 0 ? void 0 : colCfg.editContent) !== 'boolean') {
246
- colCfg.editContent = {
247
- edittype: 'title',
248
- title: {
249
- "code": "$function main(text, row, index) { return text;}$",
250
- "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;", "}"]
251
- }
252
- };
253
- }
254
- return colCfg;
255
- });
256
- }
257
- return component;
258
- },
259
- Upload: function Upload(component) {
260
- var _component$props13 = component.props,
261
- props = _component$props13 === void 0 ? {} : _component$props13;
262
- if (props.hasOwnProperty('action')) {
263
- // 旧数据含有action
264
- props.columns.api = props.action;
265
- delete props.action;
266
- }
267
- if (hasEveryOwnProperty(props, ['accept', 'acceptType'])) {
268
- // 实际数据是取acceptType
269
- delete props.accept;
270
- }
271
- return component;
272
- },
273
- StdUpload: function StdUpload(component) {
274
- var props = component.props;
275
- var accept = props.accept,
276
- acceptExtension = props.acceptExtension,
277
- action = props.action;
278
- // 旧数据含有action
279
- if (props.hasOwnProperty('action')) {
280
- props.columns.api = action;
281
- delete props.action;
282
- }
283
- // 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
284
- if (props.hasOwnProperty('accept')) {
285
- props.uploadAccepType.accept = accept;
286
- props === null || props === void 0 ? true : delete props.accept;
287
- }
288
- if (props.hasOwnProperty('acceptExtension')) {
289
- props.uploadAccepType.acceptExtension = acceptExtension;
290
- props === null || props === void 0 ? true : delete props.acceptExtension;
291
- }
292
- return component;
293
- },
294
- Icon: function Icon(component) {
295
- var _component$props14, _component$props15;
296
- if ((component === null || component === void 0 ? void 0 : (_component$props14 = component.props) === null || _component$props14 === void 0 ? void 0 : _component$props14.type) && !(component === null || component === void 0 ? void 0 : (_component$props15 = component.props) === null || _component$props15 === void 0 ? void 0 : _component$props15.icon)) {
297
- component.props.icon = {
298
- type: component.props.type,
299
- theme: component.props.theme
300
- };
301
- }
302
- return component;
303
- }
304
- };
305
- /**
306
- * 配置态和运行态共用
307
- */
308
- export default {
309
- h5: h5,
310
- pc: pc
311
- };
@@ -1,9 +0,0 @@
1
- import type { ContextType } from "./PropType";
2
- /**
3
- * 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
4
- * 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
5
- * @param component
6
- * @param context
7
- * @returns
8
- */
9
- export declare const preprocessDSL: (component: Record<string, any>, context: ContextType) => Record<string, any>;
@@ -1,38 +0,0 @@
1
- import preprocessObj from "./preprocess/common";
2
- /**
3
- * 支持属性key通过 "compName|compName"模式
4
- * @param compName
5
- * @param obj
6
- * @returns
7
- */
8
- var collectionMethods = function collectionMethods(compName, obj) {
9
- var funcs = [];
10
- Object.keys(obj).forEach(function (key) {
11
- var compNames = key.replace(/\s/g, '').split('|');
12
- if (compNames.includes(compName)) {
13
- funcs.push(obj[key]);
14
- }
15
- });
16
- return funcs;
17
- };
18
- /**
19
- * 本方法只处理运行态和配置态公共属性. 也就是配置态运行态都会生效
20
- * 如果需要修改单独特性属性,请使用在配置态中preprocessEditorDSL 处理
21
- * @param component
22
- * @param context
23
- * @returns
24
- */
25
- export var preprocessDSL = function preprocessDSL(component, context) {
26
- var targetComponents = component;
27
- var _ref = component || {},
28
- compName = _ref.compName;
29
- var _context$isMobile = context.isMobile,
30
- isMobile = _context$isMobile === void 0 ? false : _context$isMobile;
31
- var platform = isMobile ? 'h5' : 'pc';
32
- var methods = collectionMethods(compName, preprocessObj === null || preprocessObj === void 0 ? void 0 : preprocessObj[platform]);
33
- methods.forEach(function (fn) {
34
- var _fn;
35
- targetComponents = (_fn = fn(targetComponents)) !== null && _fn !== void 0 ? _fn : targetComponents;
36
- });
37
- return targetComponents;
38
- };
@@ -1,13 +0,0 @@
1
- /**
2
- * 是否包含某属性,或的关系。 包含`propertyNames`中的一个值即可
3
- * @param target
4
- * @param propertyNames
5
- */
6
- export declare const hasSomeOwnProperty: (target: Object, propertyNames: string[]) => boolean;
7
- /**
8
- * 是否包含某属性,且的关系。 必须包含`propertyNames`中的所有属性
9
- * @param target
10
- * @param propertyNames
11
- * @returns
12
- */
13
- export declare const hasEveryOwnProperty: (target: Object, propertyNames: string[]) => boolean;
@@ -1,21 +0,0 @@
1
- /**
2
- * 是否包含某属性,或的关系。 包含`propertyNames`中的一个值即可
3
- * @param target
4
- * @param propertyNames
5
- */
6
- export var hasSomeOwnProperty = function hasSomeOwnProperty(target, propertyNames) {
7
- return propertyNames.some(function (property) {
8
- return target.hasOwnProperty(property);
9
- });
10
- };
11
- /**
12
- * 是否包含某属性,且的关系。 必须包含`propertyNames`中的所有属性
13
- * @param target
14
- * @param propertyNames
15
- * @returns
16
- */
17
- export var hasEveryOwnProperty = function hasEveryOwnProperty(target, propertyNames) {
18
- return propertyNames.every(function (property) {
19
- return target.hasOwnProperty(property);
20
- });
21
- };