@lingxiteam/assets 1.0.11 → 1.0.12
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/preprocess/common.js +27 -16
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +31 -0
- package/es/error/errorDisplay/Web/Drawer/index.js +12 -4
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +27 -4
- package/es/error/errorDisplay/Web/Notification/index.js +22 -11
- package/es/rootConfig/mobile/BusiComp.js +1 -1
- package/es/rootConfig/mobile/MobileModal.js +1 -1
- package/es/rootConfig/mobile/MobilePopover.js +1 -1
- package/es/rootConfig/pc/BusiComp.js +1 -1
- package/es/rootConfig/pc/Drawer.js +1 -1
- package/es/rootConfig/pc/Modal.js +1 -1
- package/es/rootConfig/pc/Popover.js +1 -1
- package/es/rootConfig/todoActionList.js +1 -1
- package/es/rootConfig/todoOptionList.js +1 -1
- package/es/theme/bin/cucc/theme.js +275 -0
- package/es/theme/bin/cucc/theme.less +272 -0
- package/es/theme/bin/cucc/theme.scss +272 -0
- package/es/theme/bin/default/theme.js +275 -0
- package/es/theme/bin/default/theme.less +272 -0
- package/es/theme/bin/default/theme.scss +272 -0
- package/es/theme/build.js +42 -0
- package/es/theme/src/cucc/index.js +131 -0
- package/es/theme/src/default/index.js +131 -0
- package/es/theme/utils/colorPaletteMixin.js +59 -0
- package/es/theme/utils/px2Num.js +12 -0
- package/es/theme/utils/renderColors.js +16 -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/events/actionObj.d.ts +3 -0
- package/lib/dealDsl/events/actionObj.js +13 -0
- package/lib/dealDsl/events/index.d.ts +6 -0
- package/lib/dealDsl/events/index.js +21 -0
- package/lib/dealDsl/index.d.ts +2 -0
- package/lib/dealDsl/index.js +31 -0
- package/lib/dealDsl/preprocess/common.d.ts +9 -0
- package/lib/dealDsl/preprocess/common.js +277 -0
- package/lib/dealDsl/preprocess/editor.d.ts +9 -0
- package/lib/dealDsl/preprocess/editor.js +28 -0
- package/lib/dealDsl/preprocess/engine.d.ts +9 -0
- package/lib/dealDsl/preprocess/engine.js +26 -0
- package/lib/dealDsl/preprocessDSL.d.ts +21 -0
- package/lib/dealDsl/preprocessDSL.js +88 -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 +274 -0
- package/lib/error/errorDisplay/Web/Drawer/Drawer.less +420 -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 +301 -0
- package/lib/error/errorDisplay/Web/Notification/Notice.js +161 -0
- package/lib/error/errorDisplay/Web/Notification/Notification.js +149 -0
- package/lib/error/errorDisplay/Web/Notification/Notification.less +137 -0
- package/lib/error/errorDisplay/Web/Notification/index.js +104 -0
- package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +29 -0
- package/lib/error/errorDisplay/animation.less +112 -0
- package/lib/error/errorDisplay/compUtils.js +52 -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/rootConfig/index.d.ts +5 -0
- package/lib/rootConfig/index.js +28 -0
- package/lib/rootConfig/mobile/BusiComp.d.ts +66 -0
- package/lib/rootConfig/mobile/BusiComp.js +88 -0
- package/lib/rootConfig/mobile/MobileModal.d.ts +114 -0
- package/lib/rootConfig/mobile/MobileModal.js +140 -0
- package/lib/rootConfig/mobile/MobilePopover.d.ts +81 -0
- package/lib/rootConfig/mobile/MobilePopover.js +89 -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 +157 -0
- package/lib/rootConfig/mobile/page.js +161 -0
- package/lib/rootConfig/pc/BusiComp.d.ts +66 -0
- package/lib/rootConfig/pc/BusiComp.js +88 -0
- package/lib/rootConfig/pc/Drawer.d.ts +150 -0
- package/lib/rootConfig/pc/Drawer.js +203 -0
- package/lib/rootConfig/pc/Modal.d.ts +160 -0
- package/lib/rootConfig/pc/Modal.js +195 -0
- package/lib/rootConfig/pc/Popover.d.ts +90 -0
- package/lib/rootConfig/pc/Popover.js +104 -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 +146 -0
- package/lib/rootConfig/pc/page.js +153 -0
- package/lib/rootConfig/todoActionList.d.ts +3082 -0
- package/lib/rootConfig/todoActionList.js +3600 -0
- package/lib/rootConfig/todoOptionList.d.ts +1466 -0
- package/lib/rootConfig/todoOptionList.js +1685 -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 +102 -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/cucc/theme.js +277 -0
- package/lib/theme/bin/cucc/theme.less +272 -0
- package/lib/theme/bin/cucc/theme.scss +272 -0
- package/lib/theme/bin/default/theme.js +277 -0
- package/lib/theme/bin/default/theme.less +272 -0
- package/lib/theme/bin/default/theme.scss +272 -0
- package/lib/theme/build.js +44 -0
- package/lib/theme/src/cucc/index.js +133 -0
- package/lib/theme/src/default/index.js +133 -0
- package/lib/theme/utils/colorPaletteMixin.js +61 -0
- package/lib/theme/utils/px2Num.js +14 -0
- package/lib/theme/utils/renderColors.js +18 -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
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
var renderColors = require('../../utils/renderColors');
|
|
8
|
+
var px2Num = require('../../utils/px2Num');
|
|
9
|
+
var colors = {
|
|
10
|
+
blue: '#3295fa',
|
|
11
|
+
cyan: '#0dd1a9',
|
|
12
|
+
green: '#02b342',
|
|
13
|
+
gold: '#faaf0c',
|
|
14
|
+
volcano: '#fa6432',
|
|
15
|
+
red: '#f23030',
|
|
16
|
+
purple: '#6732e6',
|
|
17
|
+
geekblue: '#3366ee',
|
|
18
|
+
pink: '#eb2f96',
|
|
19
|
+
orange: '#fa8c16',
|
|
20
|
+
yellow: '#fadb14',
|
|
21
|
+
lime: '#a0d911'
|
|
22
|
+
};
|
|
23
|
+
var sceneColors = {
|
|
24
|
+
primary: '#4477ee',
|
|
25
|
+
info: '#4477ee',
|
|
26
|
+
success: '#36bf36',
|
|
27
|
+
warning: '#faad14',
|
|
28
|
+
error: '#f52230',
|
|
29
|
+
highlight: '#fa6432'
|
|
30
|
+
};
|
|
31
|
+
var colorPlate = renderColors(colors, 'base');
|
|
32
|
+
var sceneColorPlate = renderColors(sceneColors);
|
|
33
|
+
|
|
34
|
+
// 黑色色阶
|
|
35
|
+
var blackPlate = {
|
|
36
|
+
'black-1': 'rgba(28, 36, 46, 0.15)',
|
|
37
|
+
'black-2': 'rgba(28, 36, 46, 0.25)',
|
|
38
|
+
'black-3': 'rgba(28, 36, 46, 0.35)',
|
|
39
|
+
'black-4': 'rgba(28, 36, 46, 0.45)',
|
|
40
|
+
'black-5': 'rgba(28, 36, 46, 0.55)',
|
|
41
|
+
'black-6': 'rgba(28, 36, 46, 0.65)',
|
|
42
|
+
'black-7': 'rgba(28, 36, 46, 0.75)',
|
|
43
|
+
'black-8': 'rgba(28, 36, 46, 0.85)',
|
|
44
|
+
'black-9': 'rgba(28, 36, 46, 0.95)',
|
|
45
|
+
'black-10': 'rgba(28, 36, 46, 1)'
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// 文字尺寸
|
|
49
|
+
var fontSizes = {
|
|
50
|
+
'font-size-base': '14px',
|
|
51
|
+
'font-size-lg': '16px',
|
|
52
|
+
'font-size-md': '15px',
|
|
53
|
+
'font-size-sm': '12px',
|
|
54
|
+
'font-weight': '500'
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// 圆角
|
|
58
|
+
var radius = {
|
|
59
|
+
'border-radius-base': '2px',
|
|
60
|
+
'border-radius-md': '4px',
|
|
61
|
+
'border-radius-lg': '8px',
|
|
62
|
+
'border-radius-round': '50%'
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// 间距
|
|
66
|
+
var paddings = {
|
|
67
|
+
'padding-lg': '20px',
|
|
68
|
+
'padding-md': '16px',
|
|
69
|
+
'padding-sm': '12px',
|
|
70
|
+
'padding-xs': '8px',
|
|
71
|
+
'padding-xxs': '4px',
|
|
72
|
+
'padding-xxxs': '2px'
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// 尺寸
|
|
76
|
+
var sizes = {
|
|
77
|
+
'size-xs': '16px',
|
|
78
|
+
'size-sm': '24px',
|
|
79
|
+
'size-md': '28px',
|
|
80
|
+
'size-base': '32px',
|
|
81
|
+
'size-lg': '40px',
|
|
82
|
+
'size-xl': '56px'
|
|
83
|
+
};
|
|
84
|
+
var variable = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colorPlate), sceneColorPlate), blackPlate), {}, {
|
|
85
|
+
white: '#fff',
|
|
86
|
+
black: 'rgba(28, 36, 46, 1)',
|
|
87
|
+
'link-color': '#2299ff',
|
|
88
|
+
'body-background': '#fff',
|
|
89
|
+
'background-color-base': '#edf0f5',
|
|
90
|
+
'border-color-base': '#e5e5e5',
|
|
91
|
+
'dividing-color': '#e5e5e5',
|
|
92
|
+
'border-color-split': '#f0f0f0',
|
|
93
|
+
'component-background': '#fff',
|
|
94
|
+
'background-color-light': 'hsv(0, 0, 98%)',
|
|
95
|
+
'disabled-bg': '#f5f5f5',
|
|
96
|
+
'modal-mask-bg': blackPlate['black-4'],
|
|
97
|
+
'item-hover-bg': '#f5f5f5',
|
|
98
|
+
'heading-color': blackPlate['black-10'],
|
|
99
|
+
'text-color': blackPlate['black-8'],
|
|
100
|
+
'text-color-paragraph': blackPlate['black-6'],
|
|
101
|
+
'text-color-secondary': blackPlate['black-4'],
|
|
102
|
+
'disabled-color': blackPlate['black-2'],
|
|
103
|
+
'text-color-inverse': '#fff',
|
|
104
|
+
'line-height-base': '1.5715',
|
|
105
|
+
'icon-color': 'inherit',
|
|
106
|
+
'icon-color-hover': blackPlate['black-7'],
|
|
107
|
+
'icon-color-secondary': blackPlate['black-4'],
|
|
108
|
+
'icon-color-heading': blackPlate['black-10']
|
|
109
|
+
}, fontSizes), {}, {
|
|
110
|
+
'heading-1-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.71), "px"),
|
|
111
|
+
'heading-2-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.14), "px"),
|
|
112
|
+
'heading-3-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.71), "px"),
|
|
113
|
+
'heading-4-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.42), "px"),
|
|
114
|
+
'heading-5-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.14), "px"),
|
|
115
|
+
'heading-6-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1), "px")
|
|
116
|
+
}, radius), paddings), sizes), {}, {
|
|
117
|
+
'btn-height-base': sizes['size-base'],
|
|
118
|
+
'btn-height-lg': sizes['size-lg'],
|
|
119
|
+
'btn-height-sm': sizes['size-sm'],
|
|
120
|
+
'radio-size': sizes['size-xs'],
|
|
121
|
+
'checkbox-size': sizes['size-xs'],
|
|
122
|
+
'input-height-base': sizes['size-base'],
|
|
123
|
+
'input-height-lg': sizes['size-lg'],
|
|
124
|
+
'input-height-sm': sizes['size-sm'],
|
|
125
|
+
'menu-inline-toplevel-item-height': sizes['size-lg'],
|
|
126
|
+
'menu-item-height': sizes['size-lg'],
|
|
127
|
+
'tabs-card-height': sizes['size-lg'],
|
|
128
|
+
'tree-title-height': sizes['size-sm'],
|
|
129
|
+
'transfer-header-height': sizes['size-lg']
|
|
130
|
+
});
|
|
131
|
+
module.exports = variable;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var tinycolor = require('tinycolor2');
|
|
2
|
+
var hueStep = 2;
|
|
3
|
+
var saturationStep = 16;
|
|
4
|
+
var saturationStep2 = 5;
|
|
5
|
+
var brightnessStep1 = 5;
|
|
6
|
+
var brightnessStep2 = 15;
|
|
7
|
+
var lightColorCount = 5;
|
|
8
|
+
var darkColorCount = 4;
|
|
9
|
+
function getHue(hsv, i, isLight) {
|
|
10
|
+
var hue;
|
|
11
|
+
if (hsv.h >= 60 && hsv.h <= 240) {
|
|
12
|
+
hue = isLight ? hsv.h - hueStep * i : hsv.h + hueStep * i;
|
|
13
|
+
} else {
|
|
14
|
+
hue = isLight ? hsv.h + hueStep * i : hsv.h - hueStep * i;
|
|
15
|
+
}
|
|
16
|
+
if (hue < 0) {
|
|
17
|
+
hue += 360;
|
|
18
|
+
} else if (hue >= 360) {
|
|
19
|
+
hue -= 360;
|
|
20
|
+
}
|
|
21
|
+
return Math.round(hue);
|
|
22
|
+
}
|
|
23
|
+
function getSaturation(hsv, i, isLight) {
|
|
24
|
+
var saturation;
|
|
25
|
+
if (isLight) {
|
|
26
|
+
saturation = Math.round(hsv.s * 100) - saturationStep * i;
|
|
27
|
+
} else if (i === darkColorCount) {
|
|
28
|
+
saturation = Math.round(hsv.s * 100) + saturationStep;
|
|
29
|
+
} else {
|
|
30
|
+
saturation = Math.round(hsv.s * 100) + saturationStep2 * i;
|
|
31
|
+
}
|
|
32
|
+
if (saturation > 100) {
|
|
33
|
+
saturation = 100;
|
|
34
|
+
}
|
|
35
|
+
if (isLight && i === lightColorCount && saturation > 10) {
|
|
36
|
+
saturation = 10;
|
|
37
|
+
}
|
|
38
|
+
if (saturation < 6) {
|
|
39
|
+
saturation = 6;
|
|
40
|
+
}
|
|
41
|
+
return Math.round(saturation);
|
|
42
|
+
}
|
|
43
|
+
function getValue(hsv, i, isLight) {
|
|
44
|
+
if (isLight) {
|
|
45
|
+
return Math.round(hsv.v * 100) + brightnessStep1 * i;
|
|
46
|
+
}
|
|
47
|
+
return Math.round(hsv.v * 100) - brightnessStep2 * i;
|
|
48
|
+
}
|
|
49
|
+
function colorPalette(color, index) {
|
|
50
|
+
var isLight = index <= 6;
|
|
51
|
+
var hsv = tinycolor(color).toHsv();
|
|
52
|
+
var i = isLight ? lightColorCount + 1 - index : index - lightColorCount - 1;
|
|
53
|
+
return tinycolor({
|
|
54
|
+
h: getHue(hsv, i, isLight),
|
|
55
|
+
s: getSaturation(hsv, i, isLight),
|
|
56
|
+
v: getValue(hsv, i, isLight)
|
|
57
|
+
}).toHexString();
|
|
58
|
+
}
|
|
59
|
+
module.exports = colorPalette;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var colorPaletteMixin = require('./colorPaletteMixin');
|
|
2
|
+
function renderColors(colors) {
|
|
3
|
+
var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'color';
|
|
4
|
+
var res = {};
|
|
5
|
+
if (colors && Object.keys(colors).length > 0) {
|
|
6
|
+
Object.keys(colors).forEach(function (item) {
|
|
7
|
+
for (var i = 0; i <= 10; i += 1) {
|
|
8
|
+
var name = i === 0 ? "".concat(item, "-").concat(suffix) : "".concat(item, "-").concat(i);
|
|
9
|
+
var color = i === 0 ? colors[item] : colorPaletteMixin(colors[item], i);
|
|
10
|
+
res[name] = color;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return res;
|
|
15
|
+
}
|
|
16
|
+
module.exports = renderColors;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
var _img = require("../utils/img");
|
|
10
|
+
var _excluded = ["style", "src"];
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
var IconSvg = function IconSvg(props) {
|
|
19
|
+
var _props$style = props.style,
|
|
20
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
21
|
+
src = props.src,
|
|
22
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
23
|
+
return (0, _jsxRuntime.jsx)("i", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
24
|
+
style: _objectSpread(_objectSpread({}, restProps), {}, {
|
|
25
|
+
backgroundImage: (0, _img.getSvgImageBase64)(src)
|
|
26
|
+
})
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
var _default = IconSvg;
|
|
30
|
+
exports.default = _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
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>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.actionObj = void 0;
|
|
7
|
+
var actionObj = {
|
|
8
|
+
apiRequest: function apiRequest(action) {
|
|
9
|
+
// 在这里修改动作参数
|
|
10
|
+
return action;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.actionObj = actionObj;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseActionBefore = void 0;
|
|
7
|
+
var _actionObj = require("./actionObj");
|
|
8
|
+
/**
|
|
9
|
+
* 动作解析前
|
|
10
|
+
* @param action
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
var parseActionBefore = function parseActionBefore(action) {
|
|
14
|
+
var newAction = action;
|
|
15
|
+
if (_actionObj.actionObj[newAction.value]) {
|
|
16
|
+
var _actionObj$newAction$;
|
|
17
|
+
newAction = (_actionObj$newAction$ = _actionObj.actionObj[newAction.value](action)) !== null && _actionObj$newAction$ !== void 0 ? _actionObj$newAction$ : newAction;
|
|
18
|
+
}
|
|
19
|
+
return newAction;
|
|
20
|
+
};
|
|
21
|
+
exports.parseActionBefore = parseActionBefore;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "parseActionBefore", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _events.parseActionBefore;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "preprocessDSL", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _preprocessDSL.preprocessDSL;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "preprocessEditorDSL", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _preprocessDSL.preprocessEditorDSL;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "preprocessEngineDSL", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _preprocessDSL.preprocessEngineDSL;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var _preprocessDSL = require("./preprocessDSL");
|
|
31
|
+
var _events = require("./events");
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _utils = require("../utils");
|
|
8
|
+
var h5 = {
|
|
9
|
+
Icon: function Icon() {
|
|
10
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11
|
+
var _component$props = component.props,
|
|
12
|
+
props = _component$props === void 0 ? {} : _component$props;
|
|
13
|
+
if (props.type) {
|
|
14
|
+
props.icon = props.type;
|
|
15
|
+
delete props.type;
|
|
16
|
+
}
|
|
17
|
+
return component;
|
|
18
|
+
},
|
|
19
|
+
Divider: function Divider() {
|
|
20
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
|
+
var _component$props2 = component.props,
|
|
22
|
+
props = _component$props2 === void 0 ? {} : _component$props2;
|
|
23
|
+
if (props.status !== undefined) {
|
|
24
|
+
props.visible = props.status;
|
|
25
|
+
delete props.status;
|
|
26
|
+
}
|
|
27
|
+
return component;
|
|
28
|
+
},
|
|
29
|
+
DformDate: function DformDate() {
|
|
30
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
31
|
+
var _component$props3 = component.props,
|
|
32
|
+
props = _component$props3 === void 0 ? {} : _component$props3;
|
|
33
|
+
var isCurrent = props.isCurrent,
|
|
34
|
+
defaultValue = props.defaultValue,
|
|
35
|
+
customTime = props.customTime;
|
|
36
|
+
// props中存在isCurrent/customTime属性,就转化。
|
|
37
|
+
if ((0, _utils.hasSomeOwnProperty)(props, ['isCurrent', 'customTime'])) {
|
|
38
|
+
props.defaultValue = {
|
|
39
|
+
isCurrent: isCurrent,
|
|
40
|
+
defaultValue: defaultValue,
|
|
41
|
+
customTime: customTime,
|
|
42
|
+
type: function () {
|
|
43
|
+
if (isCurrent) {
|
|
44
|
+
return 'isCurrent';
|
|
45
|
+
}
|
|
46
|
+
if (customTime) {
|
|
47
|
+
return 'custom';
|
|
48
|
+
}
|
|
49
|
+
return 'now';
|
|
50
|
+
}()
|
|
51
|
+
};
|
|
52
|
+
delete props.isCurrent;
|
|
53
|
+
delete props.customTime;
|
|
54
|
+
}
|
|
55
|
+
return component;
|
|
56
|
+
},
|
|
57
|
+
'DMultiplePicker|DformDate|DformInput|DformSelect|DformPicker': function DMultiplePickerDformDateDformInputDformSelectDformPicker() {
|
|
58
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59
|
+
var _component$props4 = component.props,
|
|
60
|
+
props = _component$props4 === void 0 ? {} : _component$props4;
|
|
61
|
+
delete props.type;
|
|
62
|
+
delete props.theme;
|
|
63
|
+
delete props.fontAddress;
|
|
64
|
+
delete props.isIconFont;
|
|
65
|
+
delete props.iconFileInfo;
|
|
66
|
+
delete props.svgContent;
|
|
67
|
+
delete props.iconFile;
|
|
68
|
+
return component;
|
|
69
|
+
},
|
|
70
|
+
DformFile: function DformFile() {
|
|
71
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
72
|
+
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
73
|
+
var _component$props5 = component.props,
|
|
74
|
+
props = _component$props5 === void 0 ? {} : _component$props5;
|
|
75
|
+
var accept = props.accept,
|
|
76
|
+
acceptExtension = props.acceptExtension;
|
|
77
|
+
if (props.hasOwnProperty('accept')) {
|
|
78
|
+
props.uploadAccepType.accept = accept;
|
|
79
|
+
props === null || props === void 0 ? true : delete props.accept;
|
|
80
|
+
}
|
|
81
|
+
if (props.hasOwnProperty('acceptExtension')) {
|
|
82
|
+
props.uploadAccepType.acceptExtension = acceptExtension;
|
|
83
|
+
props === null || props === void 0 ? true : delete props.acceptExtension;
|
|
84
|
+
}
|
|
85
|
+
return component;
|
|
86
|
+
},
|
|
87
|
+
'Image|DformFile|DformImagePicker|Signature': function ImageDformFileDformImagePickerSignature() {
|
|
88
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
89
|
+
var _component$props6 = component.props,
|
|
90
|
+
props = _component$props6 === void 0 ? {} : _component$props6;
|
|
91
|
+
if (props.hasOwnProperty('action')) {
|
|
92
|
+
// 旧数据含有action,实际用到的值和columns当中的api是相同
|
|
93
|
+
props.columns.api = props.action;
|
|
94
|
+
delete props.action;
|
|
95
|
+
}
|
|
96
|
+
return component;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var pc = {
|
|
100
|
+
'DatePicker|TimePicker': function DatePickerTimePicker() {
|
|
101
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
102
|
+
var _component$props7 = component.props,
|
|
103
|
+
props = _component$props7 === void 0 ? {} : _component$props7;
|
|
104
|
+
var isCurrent = props.isCurrent,
|
|
105
|
+
defaultValue = props.defaultValue,
|
|
106
|
+
customTime = props.customTime;
|
|
107
|
+
// props中存在isCurrent/customTime属性,就转化。
|
|
108
|
+
if ((0, _utils.hasSomeOwnProperty)(props, ['isCurrent', 'customTime'])) {
|
|
109
|
+
props.defaultValue = {
|
|
110
|
+
isCurrent: isCurrent,
|
|
111
|
+
defaultValue: defaultValue,
|
|
112
|
+
customTime: customTime,
|
|
113
|
+
type: function () {
|
|
114
|
+
if (isCurrent) {
|
|
115
|
+
return 'isCurrent';
|
|
116
|
+
}
|
|
117
|
+
if (customTime) {
|
|
118
|
+
return 'custom';
|
|
119
|
+
}
|
|
120
|
+
return 'now';
|
|
121
|
+
}()
|
|
122
|
+
};
|
|
123
|
+
delete props.isCurrent;
|
|
124
|
+
delete props.customTime;
|
|
125
|
+
}
|
|
126
|
+
return component;
|
|
127
|
+
},
|
|
128
|
+
Button: function Button() {
|
|
129
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
130
|
+
var _component$props8 = component.props,
|
|
131
|
+
props = _component$props8 === void 0 ? {} : _component$props8;
|
|
132
|
+
// const { popoverSetting, showPopover } = props;
|
|
133
|
+
if (props.iconType && !props.icon) {
|
|
134
|
+
var theme = props.theme,
|
|
135
|
+
fontAddress = props.fontAddress,
|
|
136
|
+
isIconFont = props.isIconFont,
|
|
137
|
+
svgContent = props.svgContent,
|
|
138
|
+
iconFile = props.iconFile;
|
|
139
|
+
props.icon = {
|
|
140
|
+
type: props.iconType,
|
|
141
|
+
theme: theme,
|
|
142
|
+
fontAddress: fontAddress,
|
|
143
|
+
isIconFont: isIconFont,
|
|
144
|
+
svgContent: svgContent,
|
|
145
|
+
iconFile: iconFile
|
|
146
|
+
};
|
|
147
|
+
props.icon.type = props.iconType;
|
|
148
|
+
delete props.iconType;
|
|
149
|
+
}
|
|
150
|
+
delete props.theme;
|
|
151
|
+
delete props.fontAddress;
|
|
152
|
+
delete props.isIconFont;
|
|
153
|
+
delete props.iconFileInfo;
|
|
154
|
+
delete props.svgContent;
|
|
155
|
+
delete props.iconFile;
|
|
156
|
+
return component;
|
|
157
|
+
},
|
|
158
|
+
'Dropdown|Menu': function DropdownMenu() {
|
|
159
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
160
|
+
var _component$props9 = component.props,
|
|
161
|
+
props = _component$props9 === void 0 ? {} : _component$props9;
|
|
162
|
+
delete props.iconInfo;
|
|
163
|
+
return component;
|
|
164
|
+
},
|
|
165
|
+
'Input|Card|Collapse': function InputCardCollapse() {
|
|
166
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
167
|
+
var _component$props10 = component.props,
|
|
168
|
+
props = _component$props10 === void 0 ? {} : _component$props10;
|
|
169
|
+
delete props.type;
|
|
170
|
+
delete props.theme;
|
|
171
|
+
delete props.fontAddress;
|
|
172
|
+
delete props.isIconFont;
|
|
173
|
+
delete props.iconFileInfo;
|
|
174
|
+
delete props.svgContent;
|
|
175
|
+
delete props.iconFile;
|
|
176
|
+
delete props.prefixIconIconFileInfo;
|
|
177
|
+
delete props.prefixIconIsIconFont;
|
|
178
|
+
delete props.prefixIconType;
|
|
179
|
+
delete props.prefixIconTheme;
|
|
180
|
+
delete props.prefixIconFontAddress;
|
|
181
|
+
delete props.prefixIconiconFile;
|
|
182
|
+
return component;
|
|
183
|
+
},
|
|
184
|
+
'StdUpload|Icon': function StdUploadIcon() {
|
|
185
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
186
|
+
var _component$props11 = component.props,
|
|
187
|
+
props = _component$props11 === void 0 ? {} : _component$props11;
|
|
188
|
+
delete props.type;
|
|
189
|
+
delete props.theme;
|
|
190
|
+
delete props.fontAddress;
|
|
191
|
+
delete props.isIconFont;
|
|
192
|
+
delete props.iconFileInfo;
|
|
193
|
+
delete props.svgContent;
|
|
194
|
+
delete props.iconFile;
|
|
195
|
+
return component;
|
|
196
|
+
},
|
|
197
|
+
Table: function Table() {
|
|
198
|
+
var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
199
|
+
var _component$props12 = component.props,
|
|
200
|
+
props = _component$props12 === void 0 ? {} : _component$props12;
|
|
201
|
+
if (typeof props.showCustom === 'boolean') {
|
|
202
|
+
// 旧数据
|
|
203
|
+
var iconPosition = props.iconPosition,
|
|
204
|
+
type = props.type,
|
|
205
|
+
theme = props.theme,
|
|
206
|
+
fontAddress = props.fontAddress,
|
|
207
|
+
isIconFont = props.isIconFont,
|
|
208
|
+
customTitle = props.customTitle,
|
|
209
|
+
customStyle = props.customStyle,
|
|
210
|
+
iconFile = props.iconFile,
|
|
211
|
+
showCustom = props.showCustom;
|
|
212
|
+
props.showCustom = {
|
|
213
|
+
iconPosition: iconPosition,
|
|
214
|
+
type: type,
|
|
215
|
+
theme: theme,
|
|
216
|
+
fontAddress: fontAddress,
|
|
217
|
+
isIconFont: isIconFont,
|
|
218
|
+
customTitle: customTitle,
|
|
219
|
+
customStyle: customStyle,
|
|
220
|
+
iconFile: iconFile,
|
|
221
|
+
hasCustom: showCustom
|
|
222
|
+
};
|
|
223
|
+
delete props.iconPosition;
|
|
224
|
+
delete props.type;
|
|
225
|
+
delete props.theme;
|
|
226
|
+
delete props.fontAddress;
|
|
227
|
+
delete props.isIconFont;
|
|
228
|
+
delete props.customTitle;
|
|
229
|
+
delete props.customStyle;
|
|
230
|
+
delete props.iconFile;
|
|
231
|
+
}
|
|
232
|
+
return component;
|
|
233
|
+
},
|
|
234
|
+
Upload: function Upload(component) {
|
|
235
|
+
var _component$props13 = component.props,
|
|
236
|
+
props = _component$props13 === void 0 ? {} : _component$props13;
|
|
237
|
+
if (props.hasOwnProperty('action')) {
|
|
238
|
+
// 旧数据含有action
|
|
239
|
+
props.columns.api = props.action;
|
|
240
|
+
delete props.action;
|
|
241
|
+
}
|
|
242
|
+
if ((0, _utils.hasEveryOwnProperty)(props, ['accept', 'acceptType'])) {
|
|
243
|
+
// 实际数据是取acceptType
|
|
244
|
+
delete props.accept;
|
|
245
|
+
}
|
|
246
|
+
return component;
|
|
247
|
+
},
|
|
248
|
+
StdUpload: function StdUpload(component) {
|
|
249
|
+
var props = component.props;
|
|
250
|
+
var accept = props.accept,
|
|
251
|
+
acceptExtension = props.acceptExtension,
|
|
252
|
+
action = props.action;
|
|
253
|
+
// 旧数据含有action
|
|
254
|
+
if (props.hasOwnProperty('action')) {
|
|
255
|
+
props.columns.api = action;
|
|
256
|
+
delete props.action;
|
|
257
|
+
}
|
|
258
|
+
// 新数据改成 accept、acceptExtension 从uploadAccepType当中获取 eg uploadAccepType = {accept,acceptExtension}
|
|
259
|
+
if (props.hasOwnProperty('accept')) {
|
|
260
|
+
props.uploadAccepType.accept = accept;
|
|
261
|
+
props === null || props === void 0 ? true : delete props.accept;
|
|
262
|
+
}
|
|
263
|
+
if (props.hasOwnProperty('acceptExtension')) {
|
|
264
|
+
props.uploadAccepType.acceptExtension = acceptExtension;
|
|
265
|
+
props === null || props === void 0 ? true : delete props.acceptExtension;
|
|
266
|
+
}
|
|
267
|
+
return component;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* 配置态和运行态共用
|
|
272
|
+
*/
|
|
273
|
+
var _default = {
|
|
274
|
+
h5: h5,
|
|
275
|
+
pc: pc
|
|
276
|
+
};
|
|
277
|
+
exports.default = _default;
|