@cloud-app-dev/vidc 1.0.48 → 2.0.0-alpha.1
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/README.md +4 -0
- package/es/AppContext/Sync.d.ts +6 -0
- package/es/AppContext/Sync.js +47 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +117 -0
- package/es/AppContext/interface.d.ts +29 -0
- package/es/AppContext/static.d.ts +6 -0
- package/es/AppContext/static.js +6 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/index.js +23 -0
- package/es/Config/interface.d.ts +39 -0
- package/es/Config/utils.d.ts +11 -0
- package/es/{DagInitialRequest/index.js → Config/utils.js} +39 -62
- package/es/ConfigContext/index.d.ts +6 -0
- package/es/ConfigContext/index.js +3 -0
- package/es/InitialConfig/index.d.ts +5 -7
- package/es/InitialConfig/index.js +11 -42
- package/es/InitialConfig/utils.d.ts +15 -0
- package/es/InitialConfig/utils.js +40 -305
- package/es/InitialRequest/index.d.ts +5 -11
- package/es/InitialRequest/index.js +50 -67
- package/es/InitialRequest/utils.d.ts +8 -0
- package/es/InitialRequest/utils.js +28 -567
- package/es/Service/http.d.ts +4 -0
- package/es/Service/http.js +152 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/index.js +14 -0
- package/es/Service/interface.d.ts +28 -0
- package/es/Service/logger.d.ts +3 -0
- package/es/Service/logger.js +13 -0
- package/es/Service/middleware.d.ts +5 -0
- package/es/Service/middleware.js +15 -0
- package/es/Service/utils.d.ts +3 -0
- package/es/Service/utils.js +11 -0
- package/es/WorkerFlow/Demo.js +1 -0
- package/es/WorkerFlow/Form/Condition.js +4 -5
- package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
- package/es/WorkerFlow/Form/GroupList.js +3 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +4 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +13 -6
- package/es/WorkerFlow/index.js +36 -7
- package/es/index.d.ts +4 -8
- package/es/index.js +4 -8
- package/package.json +2 -2
- package/es/AppLayout/AppHeader/index.css +0 -4
- package/es/AppLayout/AppHeader/index.d.ts +0 -18
- package/es/AppLayout/AppHeader/index.js +0 -41
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
- package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
- package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
- package/es/AppLayout/AppInlineMenu/index.css +0 -110
- package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
- package/es/AppLayout/AppInlineMenu/index.js +0 -194
- package/es/AppLayout/AppLogo/index.css +0 -74
- package/es/AppLayout/AppLogo/index.d.ts +0 -13
- package/es/AppLayout/AppLogo/index.js +0 -100
- package/es/AppLayout/AppTools/index.css +0 -0
- package/es/AppLayout/AppTools/index.d.ts +0 -8
- package/es/AppLayout/AppTools/index.js +0 -10
- package/es/AppLayout/FunctionPreview/index.css +0 -128
- package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
- package/es/AppLayout/FunctionPreview/index.js +0 -218
- package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
- package/es/AppLayout/Header/ListenceRoute.js +0 -28
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
- package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
- package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -25
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -97
- package/es/AppLayout/Header/NotifyAlarm.js +0 -122
- package/es/AppLayout/Header/ThemeTools.js +0 -69
- package/es/AppLayout/Header/Tools.d.ts +0 -11
- package/es/AppLayout/Header/Tools.js +0 -86
- package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
- package/es/AppLayout/Header/ToolsItem.js +0 -12
- package/es/AppLayout/Header/UserAction.d.ts +0 -10
- package/es/AppLayout/Header/UserAction.js +0 -224
- package/es/AppLayout/Header/index.css +0 -136
- package/es/AppLayout/Header/index.d.ts +0 -9
- package/es/AppLayout/Header/index.js +0 -36
- package/es/AppLayout/index.css +0 -21
- package/es/AppLayout/index.d.ts +0 -12
- package/es/AppLayout/index.js +0 -38
- package/es/AppLayout/service/index.js +0 -174
- package/es/AppLayout/service/prefix.js +0 -4
- package/es/AppLayout/service/url.js +0 -35
- package/es/AppLayout/utils/menu.js +0 -24
- package/es/AppLayout/utils.d.ts +0 -4
- package/es/AppLayout/utils.js +0 -112
- package/es/DagInitialConfig/index.css +0 -0
- package/es/DagInitialConfig/index.d.ts +0 -10
- package/es/DagInitialConfig/index.js +0 -70
- package/es/DagInitialConfig/utils.js +0 -185
- package/es/DagInitialRequest/index.css +0 -0
- package/es/DagInitialRequest/index.d.ts +0 -10
- package/es/DagInitialRequest/utils.js +0 -573
- package/es/FormContent/index.css +0 -27
- package/es/FormContent/index.d.ts +0 -19
- package/es/FormContent/index.js +0 -58
- package/es/OrgTree/index.css +0 -39
- package/es/OrgTree/index.d.ts +0 -16
- package/es/OrgTree/index.js +0 -176
- package/es/OrgUserTree/demo.d.ts +0 -2
- package/es/OrgUserTree/demo.js +0 -20
- package/es/OrgUserTree/index.css +0 -31
- package/es/OrgUserTree/index.d.ts +0 -28
- package/es/OrgUserTree/index.js +0 -131
- package/es/PlaceTree/demo.d.ts +0 -2
- package/es/PlaceTree/demo.js +0 -20
- package/es/PlaceTree/index.css +0 -40
- package/es/PlaceTree/index.d.ts +0 -26
- package/es/PlaceTree/index.js +0 -174
- package/es/Upload/AntUpload/index.css +0 -22
- package/es/Upload/AntUpload/index.d.ts +0 -19
- package/es/Upload/AntUpload/index.js +0 -226
- package/es/Upload/UploadChildren/index.css +0 -28
- package/es/Upload/UploadChildren/index.js +0 -26
- package/es/Upload/index.css +0 -0
- package/es/Upload/index.d.ts +0 -9
- package/es/Upload/index.js +0 -7
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import fetchAxios from 'fetch-like-axios';
|
|
3
|
+
import * as Middleware from './middleware';
|
|
4
|
+
import Config from '../Config';
|
|
5
|
+
import * as logger from './logger';
|
|
6
|
+
import { cloneDeep } from 'lodash';
|
|
7
|
+
import { formartDesc } from './utils';
|
|
8
|
+
var CancelToken = fetchAxios.CancelToken;
|
|
9
|
+
var config = {
|
|
10
|
+
baseURL: '/',
|
|
11
|
+
timeout: 60 * 1000,
|
|
12
|
+
xhrMode: 'fetch',
|
|
13
|
+
headers: {
|
|
14
|
+
Accept: 'application/json; charset=utf-8',
|
|
15
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var httpInstance = fetchAxios.create(config);
|
|
19
|
+
/**
|
|
20
|
+
* 请求之前拦截动作
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
httpInstance.interceptors.request.use(function (response) {
|
|
24
|
+
return response;
|
|
25
|
+
}, function (error) {
|
|
26
|
+
return console.error(error);
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* 请求之后拦截动作
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
httpInstance.interceptors.response.use(function (response) {
|
|
33
|
+
if (Middleware.responseMiddleware.length === 0) {
|
|
34
|
+
return response.data;
|
|
35
|
+
} else {
|
|
36
|
+
Middleware.responseMiddleware.forEach(function (fn) {
|
|
37
|
+
return response = fn(response);
|
|
38
|
+
});
|
|
39
|
+
return response;
|
|
40
|
+
}
|
|
41
|
+
}, function httpUtilErrorRequest(error) {
|
|
42
|
+
if (Middleware.responseErrorMiddleware.length !== 0) {
|
|
43
|
+
Middleware.responseErrorMiddleware.forEach(function (fn) {
|
|
44
|
+
return error = fn(error);
|
|
45
|
+
});
|
|
46
|
+
return Promise.reject(error);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!error.response) {
|
|
50
|
+
console.error(error);
|
|
51
|
+
return Promise.reject(error);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return Promise.reject(error.response);
|
|
55
|
+
});
|
|
56
|
+
export function $http(options) {
|
|
57
|
+
var cancel;
|
|
58
|
+
var cancelToken = new CancelToken(function (c) {
|
|
59
|
+
cancel = c;
|
|
60
|
+
|
|
61
|
+
if (options.cancelHttp) {
|
|
62
|
+
options.cancelHttp(cancel);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
var cancelHttp = options.cancelHttp,
|
|
67
|
+
newOptions = __rest(options, ["cancelHttp"]);
|
|
68
|
+
|
|
69
|
+
if (Config[options.url]) {
|
|
70
|
+
var item = cloneDeep(Config[options.url]);
|
|
71
|
+
|
|
72
|
+
if (Array.isArray(item)) {
|
|
73
|
+
var indexItem = item[options.loggerIndex || 0];
|
|
74
|
+
indexItem.description = formartDesc(indexItem.description, options.data);
|
|
75
|
+
logger.save(indexItem);
|
|
76
|
+
} else {
|
|
77
|
+
item.description = formartDesc(item.description, options.data);
|
|
78
|
+
logger.save(item);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return httpInstance(Object.assign(Object.assign({}, newOptions), {
|
|
83
|
+
cancelToken: cancelToken
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
export var $httpMultiPartInstance = fetchAxios.create({
|
|
87
|
+
xhrMode: 'fetch',
|
|
88
|
+
timeout: 10 * 60 * 1000,
|
|
89
|
+
headers: {
|
|
90
|
+
'Content-Type': 'multipart/form-data'
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
$httpMultiPartInstance.interceptors.response.use(function (response) {
|
|
94
|
+
return response.data;
|
|
95
|
+
}, function (error) {
|
|
96
|
+
return Promise.reject(error);
|
|
97
|
+
});
|
|
98
|
+
export var $httpXMLInstance = function xhrRequest(_ref) {
|
|
99
|
+
var url = _ref.url,
|
|
100
|
+
_ref$method = _ref.method,
|
|
101
|
+
method = _ref$method === void 0 ? 'GET' : _ref$method,
|
|
102
|
+
data = _ref.data,
|
|
103
|
+
headers = _ref.headers,
|
|
104
|
+
cancelHttp = _ref.cancelHttp,
|
|
105
|
+
_ref$isAsync = _ref.isAsync,
|
|
106
|
+
isAsync = _ref$isAsync === void 0 ? false : _ref$isAsync,
|
|
107
|
+
requestId = _ref.requestId;
|
|
108
|
+
|
|
109
|
+
if (!requestId) {
|
|
110
|
+
console.warn('缺少requestId');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return new Promise(function (resolve, reject) {
|
|
114
|
+
var xhr = new XMLHttpRequest();
|
|
115
|
+
|
|
116
|
+
var cancel = function cancel() {
|
|
117
|
+
return xhr.abort();
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
if (cancelHttp) {
|
|
121
|
+
cancelHttp(cancel);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
xhr.open(method, url, !isAsync);
|
|
125
|
+
|
|
126
|
+
if (headers) {
|
|
127
|
+
Object.keys(headers).forEach(function (key) {
|
|
128
|
+
xhr.setRequestHeader(key, headers[key]);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
xhr.onreadystatechange = function () {
|
|
133
|
+
if (xhr.readyState === 4 && (xhr.status === 200 || xhr.status === 304)) {
|
|
134
|
+
var _data;
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
_data = JSON.parse(xhr.response);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
_data = xhr.response;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
resolve(_data);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (xhr.readyState === 4 && !(xhr.status === 200 || xhr.status === 304)) {
|
|
146
|
+
reject(xhr);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
xhr.send(data ? JSON.stringify(data) : null);
|
|
151
|
+
});
|
|
152
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { $http, $httpMultiPartInstance, $httpXMLInstance } from './http';
|
|
2
|
+
import { registerResponseMiddleware, registerResponseErrorMiddleware } from './middleware';
|
|
3
|
+
import produce from 'immer';
|
|
4
|
+
import * as logger from './logger';
|
|
5
|
+
var ServiceInterface = {
|
|
6
|
+
$http: $http,
|
|
7
|
+
$httpXMLInstance: $httpXMLInstance,
|
|
8
|
+
$httpMultiPartInstance: $httpMultiPartInstance,
|
|
9
|
+
registerResponseMiddleware: registerResponseMiddleware,
|
|
10
|
+
registerResponseErrorMiddleware: registerResponseErrorMiddleware,
|
|
11
|
+
logger: logger
|
|
12
|
+
};
|
|
13
|
+
var proxy = produce(ServiceInterface, function () {});
|
|
14
|
+
export default proxy;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'fetch-like-axios';
|
|
2
|
+
|
|
3
|
+
export type loggerType = {
|
|
4
|
+
save(options: { description: string; module: string | number; function: string | number }, token?: string): Promise<any>;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type RsponseType = AxiosRequestConfig & { requestId?: string; cancelHttp?: (cancel: Function) => void; loggerIndex?: number };
|
|
8
|
+
|
|
9
|
+
export type XHRResponse = {
|
|
10
|
+
url: string;
|
|
11
|
+
method: string;
|
|
12
|
+
data?: any;
|
|
13
|
+
headers?: any;
|
|
14
|
+
cancelHttp?: any;
|
|
15
|
+
isAsync?: boolean;
|
|
16
|
+
requestId?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type MiddleWareType = (config: any) => any;
|
|
20
|
+
|
|
21
|
+
export type IServiceInterface = {
|
|
22
|
+
$http(options: RsponseType): Promise<any>;
|
|
23
|
+
$httpXMLInstance(options: XHRResponse): Promise<any>;
|
|
24
|
+
$httpMultiPartInstance(options: AxiosRequestConfig): Promise<any>;
|
|
25
|
+
registerResponseMiddleware(fn: MiddleWareType): void;
|
|
26
|
+
registerResponseErrorMiddleware(fn: MiddleWareType): void;
|
|
27
|
+
logger: loggerType;
|
|
28
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
|
+
import { $http } from './http';
|
|
3
|
+
export function save(data, token) {
|
|
4
|
+
return $http({
|
|
5
|
+
method: 'post',
|
|
6
|
+
url: "/api/log/v1/addLog",
|
|
7
|
+
data: data,
|
|
8
|
+
requestId: 'addLog',
|
|
9
|
+
headers: {
|
|
10
|
+
Authorization: token || _cache.getCache('token', 'session')
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MiddleWareType } from './interface';
|
|
2
|
+
export declare const responseMiddleware: Array<any>;
|
|
3
|
+
export declare const responseErrorMiddleware: Array<any>;
|
|
4
|
+
export declare function registerResponseMiddleware(fn: MiddleWareType): void;
|
|
5
|
+
export declare function registerResponseErrorMiddleware(fn: MiddleWareType): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var _global = window;
|
|
2
|
+
export var responseMiddleware = _global.responseMiddleware || [];
|
|
3
|
+
export var responseErrorMiddleware = _global.responseMiddleware || [];
|
|
4
|
+
export function registerResponseMiddleware(fn) {
|
|
5
|
+
if (!responseMiddleware.includes(fn)) {
|
|
6
|
+
responseMiddleware.push(fn);
|
|
7
|
+
_global.responseMiddleware = responseMiddleware;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export function registerResponseErrorMiddleware(fn) {
|
|
11
|
+
if (!responseErrorMiddleware.includes(fn)) {
|
|
12
|
+
responseErrorMiddleware.push(fn);
|
|
13
|
+
_global.responseErrorMiddleware = responseErrorMiddleware;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/es/WorkerFlow/Demo.js
CHANGED
|
@@ -4,7 +4,6 @@ import "antd/lib/button/style";
|
|
|
4
4
|
import _Button from "antd/lib/button";
|
|
5
5
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
6
6
|
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
7
|
-
import _useChangeEffect from "@cloud-app-dev/basic-components/es/useChangeEffect";
|
|
8
7
|
|
|
9
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
9
|
|
|
@@ -18,7 +17,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
18
17
|
|
|
19
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
19
|
|
|
21
|
-
import React, { useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
20
|
+
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
22
21
|
import RefModal from '../../RefModal';
|
|
23
22
|
|
|
24
23
|
function ConditionForm(_ref) {
|
|
@@ -30,6 +29,8 @@ function ConditionForm(_ref) {
|
|
|
30
29
|
|
|
31
30
|
var _a, _b;
|
|
32
31
|
|
|
32
|
+
console.log(item, useConditionFields);
|
|
33
|
+
|
|
33
34
|
var _useState = useState({
|
|
34
35
|
field: (item === null || item === void 0 ? void 0 : item.conditionList) ? (_a = item.conditionList[0]) === null || _a === void 0 ? void 0 : _a.field : '',
|
|
35
36
|
value: (item === null || item === void 0 ? void 0 : item.conditionList) ? (_b = item === null || item === void 0 ? void 0 : item.conditionList[0]) === null || _b === void 0 ? void 0 : _b.value : ''
|
|
@@ -104,8 +105,7 @@ function ConditionForm(_ref) {
|
|
|
104
105
|
};
|
|
105
106
|
});
|
|
106
107
|
}, []);
|
|
107
|
-
|
|
108
|
-
_useChangeEffect(function () {
|
|
108
|
+
useEffect(function () {
|
|
109
109
|
if (state.field !== undefined && state.value !== undefined && formItem) {
|
|
110
110
|
var conditionList = [{
|
|
111
111
|
field: state.field,
|
|
@@ -129,7 +129,6 @@ function ConditionForm(_ref) {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
}, [state.field, state.value, formItem, options]);
|
|
132
|
-
|
|
133
132
|
return /*#__PURE__*/React.createElement(_ContentBox.InfoBox, {
|
|
134
133
|
title: "\u8BBE\u7F6E\u6761\u4EF6",
|
|
135
134
|
contentStyle: {
|
|
@@ -5,6 +5,7 @@ interface IGroupListProps {
|
|
|
5
5
|
checkedKeys: string[];
|
|
6
6
|
keywords?: string;
|
|
7
7
|
onChecked: (ids: string[]) => void;
|
|
8
|
+
title: string;
|
|
8
9
|
}
|
|
9
|
-
declare function GroupList({ list, onKeywordChange, onChecked, checkedKeys }: IGroupListProps): JSX.Element;
|
|
10
|
+
declare function GroupList({ list, onKeywordChange, onChecked, checkedKeys, title }: IGroupListProps): JSX.Element;
|
|
10
11
|
export default GroupList;
|
|
@@ -7,12 +7,13 @@ function GroupList(_ref) {
|
|
|
7
7
|
var list = _ref.list,
|
|
8
8
|
onKeywordChange = _ref.onKeywordChange,
|
|
9
9
|
onChecked = _ref.onChecked,
|
|
10
|
-
checkedKeys = _ref.checkedKeys
|
|
10
|
+
checkedKeys = _ref.checkedKeys,
|
|
11
|
+
title = _ref.title;
|
|
11
12
|
return /*#__PURE__*/React.createElement("div", {
|
|
12
13
|
className: "lm-c-check-list-wrapper vidc-list-component post-group-list"
|
|
13
14
|
}, /*#__PURE__*/React.createElement(TreeTitle, {
|
|
14
15
|
titleExt: false,
|
|
15
|
-
title:
|
|
16
|
+
title: title,
|
|
16
17
|
inputPlaceholder: "\u8BF7\u8F93\u5165\u5C97\u4F4D\u540D\u79F0",
|
|
17
18
|
onChange: onKeywordChange
|
|
18
19
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -156,7 +156,8 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
156
156
|
});
|
|
157
157
|
},
|
|
158
158
|
keywords: state.keyword1,
|
|
159
|
-
onChecked: onUserChecked1
|
|
159
|
+
onChecked: onUserChecked1,
|
|
160
|
+
title: "\u5C97\u4F4D\u5217\u8868"
|
|
160
161
|
}), /*#__PURE__*/React.createElement(GroupList, {
|
|
161
162
|
list: renderList,
|
|
162
163
|
checkedKeys: state.selectIds,
|
|
@@ -168,7 +169,8 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
168
169
|
});
|
|
169
170
|
},
|
|
170
171
|
keywords: state.keyword2,
|
|
171
|
-
onChecked: onUserChecked2
|
|
172
|
+
onChecked: onUserChecked2,
|
|
173
|
+
title: "\u5DF2\u6DFB\u52A0\uFF08".concat(state.selectIds.length, "\uFF09")
|
|
172
174
|
}));
|
|
173
175
|
}
|
|
174
176
|
|
|
@@ -13,7 +13,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
13
13
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
|
|
16
|
-
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
16
|
+
import React, { useState, useEffect, useRef, useCallback, useContext } from 'react';
|
|
17
|
+
import WFC from '../OperatorContext';
|
|
17
18
|
|
|
18
19
|
function TitleElement(_ref) {
|
|
19
20
|
var nodeName = _ref.nodeName,
|
|
@@ -22,6 +23,9 @@ function TitleElement(_ref) {
|
|
|
22
23
|
icon = _ref.icon,
|
|
23
24
|
delNode = _ref.delNode;
|
|
24
25
|
|
|
26
|
+
var _useContext = useContext(WFC),
|
|
27
|
+
readOnly = _useContext.readOnly;
|
|
28
|
+
|
|
25
29
|
var _useState = useState(nodeName),
|
|
26
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
31
|
title = _useState2[0],
|
|
@@ -41,11 +45,11 @@ function TitleElement(_ref) {
|
|
|
41
45
|
}
|
|
42
46
|
}, [title, placeholder]);
|
|
43
47
|
useEffect(function () {
|
|
44
|
-
return editable && input.current.focus();
|
|
48
|
+
return !readOnly && editable && input.current.focus();
|
|
45
49
|
}, [editable]);
|
|
46
50
|
|
|
47
51
|
_useChangeEffect(function () {
|
|
48
|
-
!editable && onTitleChange && onTitleChange(title);
|
|
52
|
+
!readOnly && !editable && onTitleChange && onTitleChange(title);
|
|
49
53
|
}, [title, editable]);
|
|
50
54
|
|
|
51
55
|
return /*#__PURE__*/React.createElement(React.Fragment, null, icon && /*#__PURE__*/React.createElement(_IconFont, {
|
|
@@ -53,7 +57,7 @@ function TitleElement(_ref) {
|
|
|
53
57
|
style: {
|
|
54
58
|
paddingRight: 4
|
|
55
59
|
}
|
|
56
|
-
}), editable ? /*#__PURE__*/React.createElement("input", {
|
|
60
|
+
}), !readOnly && editable ? /*#__PURE__*/React.createElement("input", {
|
|
57
61
|
ref: input,
|
|
58
62
|
type: "text",
|
|
59
63
|
className: "cloudapp-input editable-title-input",
|
|
@@ -70,8 +74,11 @@ function TitleElement(_ref) {
|
|
|
70
74
|
className: "editable-title",
|
|
71
75
|
onClick: function onClick() {
|
|
72
76
|
return setEditable(true);
|
|
73
|
-
}
|
|
74
|
-
|
|
77
|
+
},
|
|
78
|
+
style: readOnly ? {
|
|
79
|
+
borderColor: 'transparent'
|
|
80
|
+
} : undefined
|
|
81
|
+
}, title), !readOnly && /*#__PURE__*/React.createElement(_IconFont, {
|
|
75
82
|
className: "worker-flow-node-del",
|
|
76
83
|
type: "icon-MarkNo",
|
|
77
84
|
onClick: delNode,
|
package/es/WorkerFlow/index.js
CHANGED
|
@@ -70,8 +70,17 @@ function WorkerFlow(_ref, ref) {
|
|
|
70
70
|
|
|
71
71
|
var updateNode = function updateNode() {
|
|
72
72
|
return setConfig(Object.assign({}, config));
|
|
73
|
-
};
|
|
74
|
-
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* @mate 节点函数介绍
|
|
76
|
+
* @description 链表操作: 几种行为, 添加行为,删除行为,点击行为 pRef.childNode -> node.childNode -> 后继
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @description 添加节点
|
|
81
|
+
* @param type
|
|
82
|
+
* @param node
|
|
83
|
+
*/
|
|
75
84
|
|
|
76
85
|
|
|
77
86
|
function onInsertNode(type, node) {
|
|
@@ -114,7 +123,15 @@ function WorkerFlow(_ref, ref) {
|
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
updateNode();
|
|
117
|
-
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @description 删除节点的操作
|
|
129
|
+
* @param parentNode
|
|
130
|
+
* @param node
|
|
131
|
+
* @param type
|
|
132
|
+
* @param index
|
|
133
|
+
* @returns
|
|
134
|
+
*/
|
|
118
135
|
|
|
119
136
|
|
|
120
137
|
function onDeleteNode(parentNode, node, type, index) {
|
|
@@ -164,7 +181,14 @@ function WorkerFlow(_ref, ref) {
|
|
|
164
181
|
modal.confirm(Object.assign(Object.assign({}, options), {
|
|
165
182
|
onOk: onOk
|
|
166
183
|
}));
|
|
167
|
-
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @description 选中节点操作
|
|
187
|
+
* @param node
|
|
188
|
+
* @param parentNode
|
|
189
|
+
* @param index
|
|
190
|
+
* @returns
|
|
191
|
+
*/
|
|
168
192
|
|
|
169
193
|
|
|
170
194
|
function onSelectNode(node, parentNode, index) {
|
|
@@ -263,12 +287,17 @@ function WorkerFlow(_ref, ref) {
|
|
|
263
287
|
useFormKeys: useFormKeys
|
|
264
288
|
};
|
|
265
289
|
}, [config]);
|
|
290
|
+
/**
|
|
291
|
+
* @description onChange传递数据
|
|
292
|
+
*/
|
|
266
293
|
|
|
267
294
|
_useChangeEffect(function () {
|
|
268
|
-
|
|
269
|
-
onChange(getConfig());
|
|
270
|
-
}
|
|
295
|
+
return onChange && onChange(getConfig());
|
|
271
296
|
}, [config]);
|
|
297
|
+
/**
|
|
298
|
+
* @description ref传递数据
|
|
299
|
+
*/
|
|
300
|
+
|
|
272
301
|
|
|
273
302
|
useImperativeHandle(ref, function () {
|
|
274
303
|
return {
|
package/es/index.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
export { default as Api } from './Api';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as AppContext } from './AppContext';
|
|
3
3
|
export { default as AutoExit } from './AutoExit';
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
4
|
+
export { default as Config } from './Config';
|
|
5
|
+
export { default as ConfigContext } from './ConfigContext';
|
|
6
6
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
7
7
|
export { default as DeviceList } from './DeviceList';
|
|
8
8
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
9
9
|
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
10
|
-
export { default as FormContent } from './FormContent';
|
|
11
10
|
export { default as InitialConfig } from './InitialConfig';
|
|
12
11
|
export { default as InitialRequest } from './InitialRequest';
|
|
13
12
|
export { default as List } from './List';
|
|
14
|
-
export { default as OrgTree } from './OrgTree';
|
|
15
|
-
export { default as OrgUserTree } from './OrgUserTree';
|
|
16
|
-
export { default as PlaceTree } from './PlaceTree';
|
|
17
13
|
export { default as RefDrawer } from './RefDrawer';
|
|
18
14
|
export { default as RefModal } from './RefModal';
|
|
15
|
+
export { default as Service } from './Service';
|
|
19
16
|
export { default as TreeMode } from './TreeMode';
|
|
20
17
|
export { default as TreeTitle } from './TreeTitle';
|
|
21
|
-
export { default as Upload } from './Upload';
|
|
22
18
|
export { default as UserSelect } from './UserSelect';
|
|
23
19
|
export { default as WorkerFlow } from './WorkerFlow';
|
package/es/index.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
export { default as Api } from './Api';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as AppContext } from './AppContext';
|
|
3
3
|
export { default as AutoExit } from './AutoExit';
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
4
|
+
export { default as Config } from './Config';
|
|
5
|
+
export { default as ConfigContext } from './ConfigContext';
|
|
6
6
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
7
7
|
export { default as DeviceList } from './DeviceList';
|
|
8
8
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
9
9
|
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
10
|
-
export { default as FormContent } from './FormContent';
|
|
11
10
|
export { default as InitialConfig } from './InitialConfig';
|
|
12
11
|
export { default as InitialRequest } from './InitialRequest';
|
|
13
12
|
export { default as List } from './List';
|
|
14
|
-
export { default as OrgTree } from './OrgTree';
|
|
15
|
-
export { default as OrgUserTree } from './OrgUserTree';
|
|
16
|
-
export { default as PlaceTree } from './PlaceTree';
|
|
17
13
|
export { default as RefDrawer } from './RefDrawer';
|
|
18
14
|
export { default as RefModal } from './RefModal';
|
|
15
|
+
export { default as Service } from './Service';
|
|
19
16
|
export { default as TreeMode } from './TreeMode';
|
|
20
17
|
export { default as TreeTitle } from './TreeTitle';
|
|
21
|
-
export { default as Upload } from './Upload';
|
|
22
18
|
export { default as UserSelect } from './UserSelect';
|
|
23
19
|
export { default as WorkerFlow } from './WorkerFlow';
|
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": "
|
|
5
|
+
"version": "2.0.0-alpha.1",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|
|
61
|
-
"url": "git+http://git.topvdn.com/
|
|
61
|
+
"url": "git+http://git.topvdn.com/cloudapp/vidc.git",
|
|
62
62
|
"branch": "master",
|
|
63
63
|
"platform": "github"
|
|
64
64
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as H from 'history';
|
|
3
|
-
import { UserInfo } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
4
|
-
import './index.less';
|
|
5
|
-
interface IAppHeaderProps {
|
|
6
|
-
className?: string;
|
|
7
|
-
renderMenu?: boolean;
|
|
8
|
-
isMenuHome?: boolean;
|
|
9
|
-
systemLogo?: string;
|
|
10
|
-
defaultSrc?: string;
|
|
11
|
-
systemName?: string;
|
|
12
|
-
appTools?: React.ReactNode;
|
|
13
|
-
history: H.History;
|
|
14
|
-
menuType?: string;
|
|
15
|
-
userInfo?: UserInfo;
|
|
16
|
-
}
|
|
17
|
-
declare function AppHeader({ className, renderMenu, isMenuHome, systemLogo, defaultSrc, systemName, appTools, history, menuType, userInfo }: IAppHeaderProps): JSX.Element;
|
|
18
|
-
export default AppHeader;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import AppLogo from '../AppLogo';
|
|
3
|
-
import AppTools from '../AppTools';
|
|
4
|
-
import AppHorizontalMenu from '../AppHorizontalMenu';
|
|
5
|
-
import MenuEmptyBox from '../AppHorizontalMenu/MenuEmptyBox';
|
|
6
|
-
import "./index.css";
|
|
7
|
-
|
|
8
|
-
function AppHeader(_ref) {
|
|
9
|
-
var _ref$className = _ref.className,
|
|
10
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11
|
-
renderMenu = _ref.renderMenu,
|
|
12
|
-
isMenuHome = _ref.isMenuHome,
|
|
13
|
-
systemLogo = _ref.systemLogo,
|
|
14
|
-
defaultSrc = _ref.defaultSrc,
|
|
15
|
-
systemName = _ref.systemName,
|
|
16
|
-
appTools = _ref.appTools,
|
|
17
|
-
history = _ref.history,
|
|
18
|
-
menuType = _ref.menuType,
|
|
19
|
-
userInfo = _ref.userInfo;
|
|
20
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: "app-header-content ".concat(className),
|
|
22
|
-
style: {
|
|
23
|
-
display: 'flex',
|
|
24
|
-
width: '100%',
|
|
25
|
-
height: '100%',
|
|
26
|
-
overflow: 'hidden'
|
|
27
|
-
}
|
|
28
|
-
}, /*#__PURE__*/React.createElement(AppLogo, {
|
|
29
|
-
systemLogo: systemLogo,
|
|
30
|
-
history: history,
|
|
31
|
-
isMenuHome: isMenuHome,
|
|
32
|
-
defaultSrc: defaultSrc,
|
|
33
|
-
systemName: systemName,
|
|
34
|
-
userInfo: userInfo
|
|
35
|
-
}), menuType !== 'inline' ? /*#__PURE__*/React.createElement(AppHorizontalMenu, {
|
|
36
|
-
renderMenu: renderMenu,
|
|
37
|
-
history: history
|
|
38
|
-
}) : /*#__PURE__*/React.createElement(MenuEmptyBox, null), /*#__PURE__*/React.createElement(AppTools, null, appTools));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default AppHeader;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function MenuEmptyBox(): JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FeatureItem } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
3
|
-
interface ISubGroupProps {
|
|
4
|
-
item: FeatureItem & any;
|
|
5
|
-
onClick: (e: React.MouseEvent, item: FeatureItem) => void;
|
|
6
|
-
currentMenuKeys: string[];
|
|
7
|
-
}
|
|
8
|
-
declare function SubGroup({ item, onClick, currentMenuKeys }: ISubGroupProps): JSX.Element;
|
|
9
|
-
export default SubGroup;
|