@cloud-app-dev/vidc 2.0.0-alpha.5 → 2.0.0-alpha.9
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/Config/index.js +43 -9
- package/es/Config/interface.d.ts +16 -3
- package/es/Config/utils.d.ts +2 -18
- package/es/Config/utils.js +1 -12
- package/es/DeviceSelect/index.js +2 -1
- package/es/HightLevel/index.js +2 -1
- package/es/InitialRequest/index.js +17 -9
- package/es/InitialRequest/utils.d.ts +5 -4
- package/es/InitialRequest/utils.js +53 -88
- package/es/List/index.js +2 -1
- package/es/List/utils.js +1 -1
- package/es/LoaderApp/index.js +2 -2
- package/es/LoaderApp/utils.js +3 -8
- package/es/Picture/index.js +1 -1
- package/es/Picture/utils.js +1 -1
- package/es/ScrollList/index.js +2 -1
- package/es/UserSelect/index.js +4 -1
- package/es/WorkerFlow/Form/EmptyUserSet.js +2 -4
- package/es/WorkerFlow/Form/FormAuth.js +1 -1
- package/es/WorkerFlow/Form/GroupSelect.js +2 -4
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +2 -1
- package/es/WorkerFlow/Form/LevelGroupSelect.js +2 -4
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -4
- package/es/WorkerFlow/Form/UserSelect.js +2 -4
- package/es/WorkerFlow/Form/UserSelectModalContent.js +4 -1
- package/es/WorkerFlow/Form/UserSet.js +1 -1
- package/es/WorkerFlow/index.js +1 -1
- package/es/WorkerFlow/utils.js +2 -2
- package/package.json +3 -3
package/es/Config/index.js
CHANGED
|
@@ -1,36 +1,70 @@
|
|
|
1
1
|
import produce from 'immer';
|
|
2
|
+
import { insertThemeStyle } from './utils';
|
|
2
3
|
var Config = {
|
|
3
4
|
app: produce({}, function () {}),
|
|
4
5
|
bs: produce({}, function () {}),
|
|
5
6
|
feature: produce([], function () {}),
|
|
6
7
|
pFeature: produce([], function () {}),
|
|
7
8
|
theme: produce({}, function () {}),
|
|
8
|
-
registerAppConfig: function registerAppConfig(
|
|
9
|
+
registerAppConfig: function registerAppConfig() {
|
|
10
|
+
var app = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
9
11
|
Config.app = produce(Config.app, function (draft) {
|
|
10
12
|
app.forEach(function (item) {
|
|
11
13
|
draft[item.routerPrefix] = item;
|
|
12
14
|
});
|
|
13
15
|
});
|
|
14
16
|
},
|
|
15
|
-
registerFeatrue: function registerFeatrue(
|
|
17
|
+
registerFeatrue: function registerFeatrue() {
|
|
18
|
+
var feature = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
16
19
|
Config.feature = produce(Config.feature, function (draft) {
|
|
17
|
-
|
|
20
|
+
feature.forEach(function (item) {
|
|
21
|
+
var index = draft.findIndex(function (v) {
|
|
22
|
+
return v.id === item.id;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (index === -1) {
|
|
26
|
+
draft.push(item);
|
|
27
|
+
} else {
|
|
28
|
+
draft[index] = item;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
18
31
|
});
|
|
19
32
|
},
|
|
20
|
-
registerBSConfig: function registerBSConfig(
|
|
33
|
+
registerBSConfig: function registerBSConfig() {
|
|
34
|
+
var bs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
35
|
Config.bs = produce(Config.bs, function (draft) {
|
|
22
|
-
|
|
36
|
+
Object.keys(bs).forEach(function (key) {
|
|
37
|
+
draft[key] = bs[key];
|
|
38
|
+
});
|
|
23
39
|
});
|
|
24
40
|
},
|
|
25
|
-
registerPlatformFeature: function registerPlatformFeature(
|
|
41
|
+
registerPlatformFeature: function registerPlatformFeature() {
|
|
42
|
+
var pFeature = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
26
43
|
Config.pFeature = produce(Config.pFeature, function (draft) {
|
|
27
|
-
|
|
44
|
+
pFeature.forEach(function (item) {
|
|
45
|
+
var index = draft.findIndex(function (v) {
|
|
46
|
+
return v.id === item.id;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (index === -1) {
|
|
50
|
+
draft.push(item);
|
|
51
|
+
} else {
|
|
52
|
+
draft[index] = item;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
28
55
|
});
|
|
29
56
|
},
|
|
30
|
-
registerThemeConfig: function registerThemeConfig(
|
|
57
|
+
registerThemeConfig: function registerThemeConfig() {
|
|
58
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59
|
+
insertThemeStyle(theme);
|
|
31
60
|
Config.theme = produce(Config.theme, function (draft) {
|
|
32
|
-
|
|
61
|
+
Object.keys(theme).forEach(function (key) {
|
|
62
|
+
draft[key] = theme[key];
|
|
63
|
+
});
|
|
33
64
|
});
|
|
65
|
+
},
|
|
66
|
+
getThemeVarValue: function getThemeVarValue(themeKey) {
|
|
67
|
+
return getComputedStyle(document.querySelector(':root')).getPropertyValue("--".concat(themeKey));
|
|
34
68
|
}
|
|
35
69
|
};
|
|
36
70
|
|
package/es/Config/interface.d.ts
CHANGED
|
@@ -26,9 +26,22 @@ export type FeatureItemType = {
|
|
|
26
26
|
export type BSConfigType = {
|
|
27
27
|
systemLogo: string;
|
|
28
28
|
systemName: string;
|
|
29
|
+
parterLogo: string[];
|
|
30
|
+
loginBG: string;
|
|
29
31
|
icp: string[];
|
|
30
32
|
openSocket: boolean;
|
|
31
33
|
chromeDownloadUrl: string;
|
|
34
|
+
AppTimeOut: number;
|
|
35
|
+
shortcut: string;
|
|
36
|
+
download: { chrome: string; player: string };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type ThemeInfoType = {
|
|
40
|
+
vars: { [key: string]: string[] };
|
|
41
|
+
style: {
|
|
42
|
+
menuType: 'inline' | 'horizontal';
|
|
43
|
+
hasTab: boolean;
|
|
44
|
+
};
|
|
32
45
|
};
|
|
33
46
|
|
|
34
47
|
export type ConfigKey = 'app' | 'feature' | 'pFeature' | 'bs';
|
|
@@ -38,12 +51,12 @@ export type ConfigJOSN = {
|
|
|
38
51
|
feature: FeatureItemType[];
|
|
39
52
|
pFeature: FeatureItemType[];
|
|
40
53
|
bs: BSConfigType;
|
|
41
|
-
theme:
|
|
54
|
+
theme: ThemeInfoType;
|
|
42
55
|
registerAppConfig: (conf: AppItemType[]) => void;
|
|
43
56
|
registerFeatrue: (conf: FeatureItemType[]) => void;
|
|
44
57
|
registerBSConfig: (conf: BSConfigType) => void;
|
|
45
58
|
registerPlatformFeature: (conf: FeatureItemType[]) => void;
|
|
46
|
-
registerThemeConfig: (conf:
|
|
47
|
-
|
|
59
|
+
registerThemeConfig: (conf: ThemeInfoType) => void;
|
|
60
|
+
getThemeVarValue: (themeKey: string) => string;
|
|
48
61
|
[key: string]: any;
|
|
49
62
|
};
|
package/es/Config/utils.d.ts
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
app: {
|
|
5
|
-
[key: string]: import("./interface").AppItemType;
|
|
6
|
-
};
|
|
7
|
-
feature: import("./interface").FeatureItemType[];
|
|
8
|
-
pFeature: import("./interface").FeatureItemType[];
|
|
9
|
-
bs: import("./interface").BSConfigType;
|
|
10
|
-
theme: any;
|
|
11
|
-
registerAppConfig: (conf: import("./interface").AppItemType[]) => void;
|
|
12
|
-
registerFeatrue: (conf: import("./interface").FeatureItemType[]) => void;
|
|
13
|
-
registerBSConfig: (conf: import("./interface").BSConfigType) => void;
|
|
14
|
-
registerPlatformFeature: (conf: import("./interface").FeatureItemType[]) => void;
|
|
15
|
-
registerThemeConfig: (conf: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}) => void;
|
|
18
|
-
};
|
|
1
|
+
import { ThemeInfoType } from './interface';
|
|
2
|
+
export declare function insertThemeStyle(options: ThemeInfoType): void;
|
package/es/Config/utils.js
CHANGED
|
@@ -20,13 +20,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
20
20
|
|
|
21
21
|
var style = document.createElement('style');
|
|
22
22
|
var isInit = false;
|
|
23
|
-
export function
|
|
23
|
+
export function insertThemeStyle(options) {
|
|
24
24
|
var _ref;
|
|
25
25
|
|
|
26
26
|
var tplStr = ':root{<content>}';
|
|
27
|
-
var data = Object.assign({}, options);
|
|
28
|
-
data.vars = {};
|
|
29
|
-
data.style = {};
|
|
30
27
|
|
|
31
28
|
var attrArr = (_ref = []).concat.apply(_ref, _toConsumableArray(Object.values(options.vars)));
|
|
32
29
|
|
|
@@ -43,12 +40,4 @@ export function formartThemeConfig(options) {
|
|
|
43
40
|
isInit = true;
|
|
44
41
|
document.head.appendChild(style);
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
if (options.style) {
|
|
48
|
-
Object.keys(options.style).forEach(function (k) {
|
|
49
|
-
data.style[k] = options.style[k];
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return data;
|
|
54
43
|
}
|
package/es/DeviceSelect/index.js
CHANGED
|
@@ -31,7 +31,8 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
31
31
|
import TreeMode from '../TreeMode';
|
|
32
32
|
import DynamicDeviceList from '../DynamicDeviceList';
|
|
33
33
|
import DeviceList from '../DeviceList';
|
|
34
|
-
import
|
|
34
|
+
import uniq from 'lodash-es/uniq';
|
|
35
|
+
import uniqBy from 'lodash-es/uniqBy';
|
|
35
36
|
import IconFont from '../IconFont';
|
|
36
37
|
import "./index.css";
|
|
37
38
|
|
package/es/HightLevel/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _nextTick from "@cloud-app-dev/utils/es/nextTick";
|
|
2
|
+
|
|
1
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
4
|
|
|
3
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -40,7 +42,7 @@ function InitialRequest(_ref) {
|
|
|
40
42
|
|
|
41
43
|
var init = function init() {
|
|
42
44
|
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
43
|
-
var _yield$initialization,
|
|
45
|
+
var _yield$initialization, userFeatures, operationInfo, systemFeatures, userInfo, themeConfig;
|
|
44
46
|
|
|
45
47
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
46
48
|
while (1) {
|
|
@@ -51,18 +53,24 @@ function InitialRequest(_ref) {
|
|
|
51
53
|
|
|
52
54
|
case 2:
|
|
53
55
|
_yield$initialization = _context.sent;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
userFeatures = _yield$initialization.userFeatures;
|
|
57
|
+
operationInfo = _yield$initialization.operationInfo;
|
|
58
|
+
systemFeatures = _yield$initialization.systemFeatures;
|
|
57
59
|
userInfo = _yield$initialization.userInfo;
|
|
60
|
+
themeConfig = _yield$initialization.themeConfig;
|
|
58
61
|
updateUser(userInfo);
|
|
59
|
-
updateOperation(
|
|
60
|
-
Config.registerFeatrue(
|
|
61
|
-
Config.registerPlatformFeature(
|
|
62
|
-
|
|
62
|
+
updateOperation(operationInfo);
|
|
63
|
+
Config.registerFeatrue(userFeatures);
|
|
64
|
+
Config.registerPlatformFeature(systemFeatures);
|
|
65
|
+
Config.registerThemeConfig(themeConfig);
|
|
66
|
+
|
|
67
|
+
_nextTick(function () {
|
|
68
|
+
return setIsInit(true);
|
|
69
|
+
});
|
|
70
|
+
|
|
63
71
|
_BASE_DATA_INIT = true;
|
|
64
72
|
|
|
65
|
-
case
|
|
73
|
+
case 15:
|
|
66
74
|
case "end":
|
|
67
75
|
return _context.stop();
|
|
68
76
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UserInfoType, OperationInfoType } from '../AppContext/interface';
|
|
2
|
-
import { FeatureItemType } from '../Config/interface';
|
|
2
|
+
import { FeatureItemType, ThemeInfoType } from '../Config/interface';
|
|
3
3
|
export declare function initialization(): Promise<{
|
|
4
4
|
userInfo: UserInfoType;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
userFeatures: FeatureItemType[];
|
|
6
|
+
systemFeatures: FeatureItemType[];
|
|
7
|
+
operationInfo: OperationInfoType;
|
|
8
|
+
themeConfig: ThemeInfoType;
|
|
8
9
|
}>;
|
|
@@ -13,24 +13,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
|
|
15
15
|
import { __awaiter } from "tslib";
|
|
16
|
-
import Config from '../Config';
|
|
17
16
|
import Service from '../Service';
|
|
18
|
-
|
|
19
|
-
function catchPromise(fn) {
|
|
20
|
-
return new Promise(function (resolve) {
|
|
21
|
-
fn.then(function (res) {
|
|
22
|
-
return resolve(res);
|
|
23
|
-
}, function (err) {
|
|
24
|
-
console.error(err);
|
|
25
|
-
resolve(null);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
17
|
var method = 'post';
|
|
31
18
|
export function initialization() {
|
|
19
|
+
var _a;
|
|
20
|
+
|
|
32
21
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
33
|
-
var headers, result, userInfo, userId,
|
|
22
|
+
var headers, result, userInfo, userId, systemId, centerUrl, userPrivilegesUrl, systemFeatureUrl, themeConfigUrl, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, centerInfo, _yield$Promise$all2$2, userFeatures, _yield$Promise$all2$3, systemFeatures, _yield$Promise$all2$4, themeInfo;
|
|
34
23
|
|
|
35
24
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
36
25
|
while (1) {
|
|
@@ -43,102 +32,78 @@ export function initialization() {
|
|
|
43
32
|
return Service.$http({
|
|
44
33
|
url: '/api/user/v1/getUserByToken',
|
|
45
34
|
method: method,
|
|
46
|
-
headers: headers
|
|
47
|
-
requestId: 'getUserInfo'
|
|
35
|
+
headers: headers
|
|
48
36
|
});
|
|
49
37
|
|
|
50
38
|
case 3:
|
|
51
39
|
result = _context.sent;
|
|
52
40
|
userInfo = result.data;
|
|
53
41
|
userId = userInfo.id;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
centerUrl = "/api/user/operationCenter/v1/operationCenters/".concat(operationCenterId);
|
|
62
|
-
_context.next = 12;
|
|
63
|
-
return Service.$http({
|
|
64
|
-
data: data2,
|
|
65
|
-
method: method,
|
|
42
|
+
systemId = userInfo.operationCenterId;
|
|
43
|
+
centerUrl = "/api/user/operationCenter/v1/operationCenters/".concat(systemId);
|
|
44
|
+
userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
|
|
45
|
+
systemFeatureUrl = "/api/system/".concat(systemId, "/list");
|
|
46
|
+
themeConfigUrl = '/api/system/config/type';
|
|
47
|
+
_context.next = 13;
|
|
48
|
+
return Promise.all([Service.$http({
|
|
66
49
|
url: centerUrl,
|
|
50
|
+
data: {
|
|
51
|
+
id: systemId
|
|
52
|
+
},
|
|
67
53
|
headers: headers,
|
|
68
|
-
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
case 12:
|
|
72
|
-
centerInfo = _context.sent;
|
|
73
|
-
_context.next = 15;
|
|
74
|
-
return Service.$http({
|
|
75
|
-
url: "/api/micro/configureApplication/v1/queryConfigureApplicationById/".concat(operationCenterId)
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
case 15:
|
|
79
|
-
themeInfo = _context.sent;
|
|
80
|
-
themeConfig = themeInfo.data || {}; // eslint-disable-next-line no-eval
|
|
81
|
-
|
|
82
|
-
themeId = themeConfig.themeId || centerInfo.data.hues;
|
|
83
|
-
|
|
84
|
-
if (!themeId) {
|
|
85
|
-
_context.next = 24;
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
themeUrl = "/api/micro/configure/v1/queryConfigureByConfigureId/".concat(themeId);
|
|
90
|
-
_context.next = 22;
|
|
91
|
-
return Service.$http({
|
|
92
|
-
data: data2,
|
|
93
|
-
method: 'get',
|
|
94
|
-
url: themeUrl,
|
|
95
|
-
headers: headers
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
case 22:
|
|
99
|
-
themeRes = _context.sent;
|
|
100
|
-
|
|
101
|
-
try {
|
|
102
|
-
Config.registerThemeConfig(themeRes.data);
|
|
103
|
-
} catch (e) {
|
|
104
|
-
console.error(e);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
case 24:
|
|
108
|
-
userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
|
|
109
|
-
centerPrivilegesUrl = "/api/micro/applicationSystemScene/v1/queryAllFunctionByApplicationSystemId/".concat(operationCenterId);
|
|
110
|
-
_context.next = 28;
|
|
111
|
-
return Promise.all([catchPromise(Service.$http({
|
|
112
|
-
data: data,
|
|
113
|
-
method: method,
|
|
54
|
+
method: method
|
|
55
|
+
}), Service.$http({
|
|
114
56
|
url: userPrivilegesUrl,
|
|
115
|
-
headers: headers
|
|
116
|
-
|
|
117
|
-
|
|
57
|
+
headers: headers,
|
|
58
|
+
data: {
|
|
59
|
+
id: userId
|
|
60
|
+
},
|
|
61
|
+
method: method
|
|
62
|
+
}), Service.$http({
|
|
63
|
+
url: systemFeatureUrl,
|
|
64
|
+
data: {
|
|
65
|
+
id: systemId
|
|
66
|
+
},
|
|
118
67
|
method: 'get',
|
|
119
|
-
url: centerPrivilegesUrl,
|
|
120
68
|
headers: headers
|
|
121
|
-
})
|
|
69
|
+
}), Service.$http({
|
|
70
|
+
url: themeConfigUrl,
|
|
71
|
+
headers: headers,
|
|
72
|
+
method: method,
|
|
73
|
+
data: {
|
|
74
|
+
type: 'theme',
|
|
75
|
+
systemId: systemId
|
|
76
|
+
}
|
|
77
|
+
})]);
|
|
122
78
|
|
|
123
|
-
case
|
|
79
|
+
case 13:
|
|
124
80
|
_yield$Promise$all = _context.sent;
|
|
125
|
-
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all,
|
|
81
|
+
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 4);
|
|
126
82
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
127
|
-
|
|
128
|
-
data:
|
|
83
|
+
centerInfo = _yield$Promise$all2$ === void 0 ? {
|
|
84
|
+
data: {}
|
|
129
85
|
} : _yield$Promise$all2$;
|
|
130
86
|
_yield$Promise$all2$2 = _yield$Promise$all2[1];
|
|
131
|
-
|
|
87
|
+
userFeatures = _yield$Promise$all2$2 === void 0 ? {
|
|
132
88
|
data: []
|
|
133
89
|
} : _yield$Promise$all2$2;
|
|
90
|
+
_yield$Promise$all2$3 = _yield$Promise$all2[2];
|
|
91
|
+
systemFeatures = _yield$Promise$all2$3 === void 0 ? {
|
|
92
|
+
data: []
|
|
93
|
+
} : _yield$Promise$all2$3;
|
|
94
|
+
_yield$Promise$all2$4 = _yield$Promise$all2[3];
|
|
95
|
+
themeInfo = _yield$Promise$all2$4 === void 0 ? {
|
|
96
|
+
data: {}
|
|
97
|
+
} : _yield$Promise$all2$4;
|
|
134
98
|
return _context.abrupt("return", {
|
|
135
99
|
userInfo: userInfo,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
100
|
+
userFeatures: userFeatures.data,
|
|
101
|
+
systemFeatures: systemFeatures.data,
|
|
102
|
+
operationInfo: centerInfo.data,
|
|
103
|
+
themeConfig: ((_a = themeInfo === null || themeInfo === void 0 ? void 0 : themeInfo.data) === null || _a === void 0 ? void 0 : _a.content) || {}
|
|
139
104
|
});
|
|
140
105
|
|
|
141
|
-
case
|
|
106
|
+
case 24:
|
|
142
107
|
case "end":
|
|
143
108
|
return _context.stop();
|
|
144
109
|
}
|
package/es/List/index.js
CHANGED
|
@@ -21,7 +21,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
|
|
23
23
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
24
|
-
import
|
|
24
|
+
import difference from 'lodash-es/difference';
|
|
25
|
+
import uniq from 'lodash-es/uniq';
|
|
25
26
|
import VList from '../VList';
|
|
26
27
|
import { RenderItem } from './renderItem';
|
|
27
28
|
import { computedCheckStatus } from './utils';
|
package/es/List/utils.js
CHANGED
package/es/LoaderApp/index.js
CHANGED
|
@@ -112,12 +112,12 @@ function LoaderApp(_ref) {
|
|
|
112
112
|
}, [appProps.currentId, appProps.tabId, appProps.updateTime]);
|
|
113
113
|
return /*#__PURE__*/React.createElement("main", {
|
|
114
114
|
ref: domRef,
|
|
115
|
-
className: "loaded-app-layout ".concat(appConfig.
|
|
115
|
+
className: "loaded-app-layout ".concat(appConfig.routerPrefix, "-").concat(id),
|
|
116
116
|
style: style
|
|
117
117
|
}, /*#__PURE__*/React.createElement("style", {
|
|
118
118
|
ref: styleRef
|
|
119
119
|
}), /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
id: appConfig.
|
|
120
|
+
id: appConfig.routerPrefix,
|
|
121
121
|
style: {
|
|
122
122
|
width: '100%',
|
|
123
123
|
height: '100%'
|
package/es/LoaderApp/utils.js
CHANGED
|
@@ -2,20 +2,15 @@ export var getMicroConfig = function getMicroConfig() {
|
|
|
2
2
|
var appConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3
3
|
var appProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4
4
|
var container = arguments.length > 2 ? arguments[2] : undefined;
|
|
5
|
-
var
|
|
5
|
+
var routerPrefix = appConfig.routerPrefix,
|
|
6
6
|
resource = appConfig.resource;
|
|
7
|
-
|
|
8
|
-
if (!name) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
7
|
var microAppEntry = {
|
|
13
8
|
scripts: [resource[0]],
|
|
14
9
|
styles: [resource[1]],
|
|
15
|
-
html: "<div id=\"".concat(
|
|
10
|
+
html: "<div id=\"".concat(routerPrefix, "\" style=\"height:100%\"></div>")
|
|
16
11
|
};
|
|
17
12
|
return {
|
|
18
|
-
name:
|
|
13
|
+
name: routerPrefix,
|
|
19
14
|
container: container,
|
|
20
15
|
props: appProps,
|
|
21
16
|
entry: microAppEntry
|
package/es/Picture/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import Tools from './component/Tools';
|
|
|
23
23
|
import DrawRect from './component/DrawRect';
|
|
24
24
|
import WheelScale from './component/WheelScale';
|
|
25
25
|
import DefaultRects from './component/DefaultRects';
|
|
26
|
-
import
|
|
26
|
+
import isFunction from 'lodash-es/isFunction';
|
|
27
27
|
import "./index.css";
|
|
28
28
|
|
|
29
29
|
function Picture(_a) {
|
package/es/Picture/utils.js
CHANGED
package/es/ScrollList/index.js
CHANGED
|
@@ -28,7 +28,8 @@ import AutoSizer from 'react-virtualized/dist/es/AutoSizer';
|
|
|
28
28
|
import InfiniteLoader from 'react-virtualized/dist/es/InfiniteLoader';
|
|
29
29
|
import List from 'react-virtualized/dist/es/List';
|
|
30
30
|
import IconFont from '../IconFont';
|
|
31
|
-
import
|
|
31
|
+
import debounce from 'lodash-es/debounce';
|
|
32
|
+
import cloneDeep from 'lodash-es/cloneDeep';
|
|
32
33
|
import { computedCuurentGrid, arraySliceForX, simpleGrid } from './utils';
|
|
33
34
|
import "./index.css";
|
|
34
35
|
var ScrollList = /*#__PURE__*/forwardRef(function InfiniteScrollLayout(props, ref) {
|
package/es/UserSelect/index.js
CHANGED
|
@@ -23,7 +23,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
23
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
24
24
|
import api from '../Api';
|
|
25
25
|
import TreeMode from '../TreeMode';
|
|
26
|
-
import
|
|
26
|
+
import uniq from 'lodash-es/uniq';
|
|
27
|
+
import intersectionWith from 'lodash-es/intersectionWith';
|
|
28
|
+
import uniqBy from 'lodash-es/uniqBy';
|
|
29
|
+
import differenceWith from 'lodash-es/differenceWith';
|
|
27
30
|
import IconFont from '../IconFont';
|
|
28
31
|
import useChangeEffect from '../useChangeEffect';
|
|
29
32
|
import useHttp from '../useHttp';
|
|
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
|
|
20
20
|
import { __awaiter } from "tslib";
|
|
21
21
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
22
|
-
import
|
|
22
|
+
import replace from 'lodash-es/replace';
|
|
23
23
|
import chroma from 'chroma-js';
|
|
24
24
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
25
25
|
import RefModal from '../../RefModal';
|
|
@@ -43,9 +43,7 @@ function EmptyUserSet(_ref) {
|
|
|
43
43
|
var cRef = useRef(null);
|
|
44
44
|
var color = useMemo(function () {
|
|
45
45
|
var c = getComputedStyle(document.querySelector(':root')).getPropertyValue('--primary');
|
|
46
|
-
|
|
47
|
-
var col = _.replace(c, ' ', '');
|
|
48
|
-
|
|
46
|
+
var col = replace(c, ' ', '');
|
|
49
47
|
return chroma(col).alpha(0.5).hex('rgba');
|
|
50
48
|
}, []);
|
|
51
49
|
var userModify = useCallback(function () {
|
|
@@ -25,7 +25,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
25
25
|
|
|
26
26
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
27
27
|
import ContentBox from '../../ContentBox';
|
|
28
|
-
import
|
|
28
|
+
import cloneDeep from 'lodash-es/cloneDeep';
|
|
29
29
|
|
|
30
30
|
function FormAuth(_ref) {
|
|
31
31
|
var form = _ref.form,
|
|
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
|
|
20
20
|
import { __awaiter } from "tslib";
|
|
21
21
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
22
|
-
import
|
|
22
|
+
import replace from 'lodash-es/replace';
|
|
23
23
|
import chroma from 'chroma-js';
|
|
24
24
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
25
25
|
import IconFont from '../../IconFont';
|
|
@@ -44,9 +44,7 @@ function GroupSelect(_ref) {
|
|
|
44
44
|
var cRef = useRef(null);
|
|
45
45
|
var color = useMemo(function () {
|
|
46
46
|
var c = getComputedStyle(document.querySelector(':root')).getPropertyValue('--primary');
|
|
47
|
-
|
|
48
|
-
var col = _.replace(c, ' ', '');
|
|
49
|
-
|
|
47
|
+
var col = replace(c, ' ', '');
|
|
50
48
|
return chroma(col).alpha(0.5).hex('rgba');
|
|
51
49
|
}, []);
|
|
52
50
|
var userModify = useCallback(function () {
|
|
@@ -23,7 +23,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
23
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
24
24
|
import api from '../../Api';
|
|
25
25
|
import TreeMode from '../../TreeMode';
|
|
26
|
-
import
|
|
26
|
+
import uniq from 'lodash-es/uniq';
|
|
27
|
+
import intersectionWith from 'lodash-es/intersectionWith';
|
|
27
28
|
import useHttp from '../../useHttp';
|
|
28
29
|
import { formatRenderGroup } from './utils';
|
|
29
30
|
import GroupList from './GroupList';
|
|
@@ -21,7 +21,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
21
21
|
|
|
22
22
|
import { __awaiter } from "tslib";
|
|
23
23
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
24
|
-
import
|
|
24
|
+
import replace from 'lodash-es/replace';
|
|
25
25
|
import chroma from 'chroma-js';
|
|
26
26
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
27
27
|
import { formatRenderGroup, ToUpperNumberString } from './utils';
|
|
@@ -51,9 +51,7 @@ function LevelGroupSelect(_ref) {
|
|
|
51
51
|
var cRef = useRef(null);
|
|
52
52
|
var color = useMemo(function () {
|
|
53
53
|
var c = getComputedStyle(document.querySelector(':root')).getPropertyValue('--primary');
|
|
54
|
-
|
|
55
|
-
var col = _.replace(c, ' ', '');
|
|
56
|
-
|
|
54
|
+
var col = replace(c, ' ', '');
|
|
57
55
|
return chroma(col).alpha(0.5).hex('rgba');
|
|
58
56
|
}, []);
|
|
59
57
|
var userModify = useCallback(function () {
|
|
@@ -21,7 +21,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
21
21
|
|
|
22
22
|
import { __awaiter } from "tslib";
|
|
23
23
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
24
|
-
import
|
|
24
|
+
import replace from 'lodash-es/replace';
|
|
25
25
|
import chroma from 'chroma-js';
|
|
26
26
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
27
27
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
@@ -52,9 +52,7 @@ function UserAndGroupSelect(_ref) {
|
|
|
52
52
|
var cRef = useRef(null);
|
|
53
53
|
var color = useMemo(function () {
|
|
54
54
|
var c = getComputedStyle(document.querySelector(':root')).getPropertyValue('--primary');
|
|
55
|
-
|
|
56
|
-
var col = _.replace(c, ' ', '');
|
|
57
|
-
|
|
55
|
+
var col = replace(c, ' ', '');
|
|
58
56
|
return chroma(col).alpha(0.5).hex('rgba');
|
|
59
57
|
}, []);
|
|
60
58
|
var userModify = useCallback(function () {
|
|
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
|
|
20
20
|
import { __awaiter } from "tslib";
|
|
21
21
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
22
|
-
import
|
|
22
|
+
import replace from 'lodash-es/replace';
|
|
23
23
|
import chroma from 'chroma-js';
|
|
24
24
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
25
25
|
import RefModal from '../../RefModal';
|
|
@@ -43,9 +43,7 @@ function UserSelect(_ref) {
|
|
|
43
43
|
var cRef = useRef(null);
|
|
44
44
|
var color = useMemo(function () {
|
|
45
45
|
var c = getComputedStyle(document.querySelector(':root')).getPropertyValue('--primary');
|
|
46
|
-
|
|
47
|
-
var col = _.replace(c, ' ', '');
|
|
48
|
-
|
|
46
|
+
var col = replace(c, ' ', '');
|
|
49
47
|
return chroma(col).alpha(0.5).hex('rgba');
|
|
50
48
|
}, []);
|
|
51
49
|
var userModify = useCallback(function () {
|
|
@@ -22,7 +22,10 @@ import React, { useCallback, useMemo, useState, forwardRef, useImperativeHandle
|
|
|
22
22
|
import api from '../../Api';
|
|
23
23
|
import TreeMode from '../../TreeMode';
|
|
24
24
|
import List from '../../ListExt';
|
|
25
|
-
import
|
|
25
|
+
import uniq from 'lodash-es/uniq';
|
|
26
|
+
import intersectionWith from 'lodash-es/intersectionWith';
|
|
27
|
+
import uniqBy from 'lodash-es/uniqBy';
|
|
28
|
+
import differenceWith from 'lodash-es/differenceWith';
|
|
26
29
|
import useHttp from '../../useHttp';
|
|
27
30
|
var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalContent(_ref, ref) {
|
|
28
31
|
var selectUsers = _ref.selectUsers;
|
|
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
|
|
18
18
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
19
|
import { UserSetOptions } from '../Nodes/Constants';
|
|
20
|
-
import
|
|
20
|
+
import cloneDeep from 'lodash-es/cloneDeep';
|
|
21
21
|
import UsersHandleType from './UsersHandleType';
|
|
22
22
|
import UserSelect from './UserSelect';
|
|
23
23
|
import UserAndGroupSelect from './UserAndGroupSelect';
|
package/es/WorkerFlow/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import ApproverForm from './Form/Approver';
|
|
|
31
31
|
import ConditionForm from './Form/Condition';
|
|
32
32
|
import NotifierForm from './Form/Notifier';
|
|
33
33
|
import { TemplateConfig1 } from './template';
|
|
34
|
-
import
|
|
34
|
+
import cloneDeep from 'lodash-es/cloneDeep';
|
|
35
35
|
import EndNode from './Nodes/End';
|
|
36
36
|
import Render from './Nodes/Render';
|
|
37
37
|
import Tools from './Tools';
|
package/es/WorkerFlow/utils.js
CHANGED
|
@@ -10,7 +10,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10
10
|
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import cloneDeep from 'lodash-es/cloneDeep';
|
|
14
14
|
import { getNodeById } from './XML/utils';
|
|
15
15
|
export function getJAVATaskData(data) {
|
|
16
16
|
var _a;
|
|
@@ -137,7 +137,7 @@ export function getNextNode(node) {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
export function filterNoticeNode(data) {
|
|
140
|
-
var newData =
|
|
140
|
+
var newData = cloneDeep(data);
|
|
141
141
|
|
|
142
142
|
var fn = function fn(node) {
|
|
143
143
|
var _a; // 过滤抄送节点
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@cloud-app-dev/vidc",
|
|
4
4
|
"description": "Video Image Data Componennts",
|
|
5
|
-
"version": "2.0.0-alpha.
|
|
5
|
+
"version": "2.0.0-alpha.9",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"fetch-like-axios": "^0.0.5",
|
|
37
37
|
"immer": "^9.0.5",
|
|
38
38
|
"jsencrypt": "^3.2.1",
|
|
39
|
-
"lodash": "^4.17.
|
|
39
|
+
"lodash-es": "^4.17.21",
|
|
40
40
|
"mobx": "^6.3.2",
|
|
41
41
|
"rc-queue-anim": "^2.0.0",
|
|
42
42
|
"react-virtualized": "^9.22.3"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@cloud-app-dev/utils": "^3.0.2",
|
|
46
46
|
"@types/add-dom-event-listener": "^1.1.0",
|
|
47
47
|
"@types/chroma-js": "^2.1.3",
|
|
48
|
-
"@types/lodash": "^4.
|
|
48
|
+
"@types/lodash-es": "^4.17.5",
|
|
49
49
|
"@types/react-virtualized": "^9.21.15",
|
|
50
50
|
"@umijs/test": "^3.0.5",
|
|
51
51
|
"antd": "^4.17.0",
|