@cloud-app-dev/vidc 1.0.47 → 2.0.0-alpha.0
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/.umirc.ts +1 -1
- 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 +111 -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/AutoExit/index.d.ts +1 -1
- package/es/RefDrawer/index.d.ts +2 -2
- package/es/RefModal/index.d.ts +2 -2
- package/es/TreeMode/index.js +1 -2
- package/es/WorkerFlow/Demo.js +1 -0
- package/es/WorkerFlow/Form/Condition.js +8 -8
- 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/Form/UserSet.js +1 -6
- package/es/WorkerFlow/Nodes/TitleElement.js +13 -6
- package/es/WorkerFlow/index.js +40 -8
- package/es/WorkerFlow/utils.js +1 -1
- package/es/index.d.ts +1 -8
- package/es/index.js +1 -8
- package/package.json +4 -4
- 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 -21
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -98
- 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/index.js +0 -77
- 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 -177
- 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 -132
- 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 -175
- 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
package/.umirc.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { defineConfig } from 'dumi';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
const token =
|
|
5
|
-
'eyJhbGciOiJIUzI1NiJ9.
|
|
5
|
+
'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NiIsImV4dCI6MTYzODY4NzgyNzEwNywidWlkIjoiMTAxMDAwMDAwMjQ5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTAzODddLCJ2YWxpZFRpbWUiOm51bGwsIm9wdENlbnRlcklkIjoiMTAwMTAwMDAwMjMzIiwidXNlclR5cGUiOjEwMDcwMiwiaWF0IjoxNjM4NDI4NjI3MTA3fQ.eEvUc9_eGBdUi2QCMDNjOYgTzTKwiLX-7DEQ_O9kjhs';
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
title: '云应用-业务组件库',
|
package/README.md
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import { _LOGIN_STATUS_EVENT_CHANGE_, _OPERATION_EVENT_CHANGE_, _USER_EVENT_CHANGE_ } from './static';
|
|
4
|
+
|
|
5
|
+
function Sync(_ref) {
|
|
6
|
+
var stateChange = _ref.stateChange;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @description 用户微应用之间的状态同步
|
|
10
|
+
*/
|
|
11
|
+
useEffect(function () {
|
|
12
|
+
var userFn = function userFn(user) {
|
|
13
|
+
return stateChange({
|
|
14
|
+
user: user
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var operationFn = function operationFn(operation) {
|
|
19
|
+
return stateChange({
|
|
20
|
+
operation: operation
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var statusFn = function statusFn(status) {
|
|
25
|
+
return stateChange({
|
|
26
|
+
loginStatus: status
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
_SocketEmitter.on(_USER_EVENT_CHANGE_, userFn);
|
|
31
|
+
|
|
32
|
+
_SocketEmitter.on(_OPERATION_EVENT_CHANGE_, operationFn);
|
|
33
|
+
|
|
34
|
+
_SocketEmitter.on(_LOGIN_STATUS_EVENT_CHANGE_, statusFn);
|
|
35
|
+
|
|
36
|
+
return function () {
|
|
37
|
+
_SocketEmitter.off(_USER_EVENT_CHANGE_, userFn);
|
|
38
|
+
|
|
39
|
+
_SocketEmitter.off(_OPERATION_EVENT_CHANGE_, operationFn);
|
|
40
|
+
|
|
41
|
+
_SocketEmitter.off(_LOGIN_STATUS_EVENT_CHANGE_, statusFn);
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default Sync;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppContextInterface } from './interface';
|
|
3
|
+
declare function Provider({ children }: {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}): JSX.Element;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
Provider: typeof Provider;
|
|
8
|
+
Context: React.Context<AppContextInterface>;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
|
|
2
|
+
import _nextTick from "@cloud-app-dev/utils/es/nextTick";
|
|
3
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
4
|
+
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
|
|
7
|
+
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."); }
|
|
8
|
+
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
|
|
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
|
+
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
+
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
|
|
17
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
18
|
+
import Sync from './Sync';
|
|
19
|
+
import { _USER_SESSION_, _OPERATION_SESSION_, _LOGIN_STATUS_SESSION_, _USER_EVENT_CHANGE_, _OPERATION_EVENT_CHANGE_, _LOGIN_STATUS_EVENT_CHANGE_ } from './static';
|
|
20
|
+
var Context = /*#__PURE__*/React.createContext(null);
|
|
21
|
+
|
|
22
|
+
function Provider(_ref) {
|
|
23
|
+
var children = _ref.children;
|
|
24
|
+
|
|
25
|
+
var _useState = useState({
|
|
26
|
+
user: _cache.getCache(_USER_SESSION_, 'session') || {},
|
|
27
|
+
operation: _cache.getCache(_OPERATION_SESSION_, 'session') || {},
|
|
28
|
+
loginStatus: _cache.getCache(_LOGIN_STATUS_SESSION_, 'session') || false
|
|
29
|
+
}),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
state = _useState2[0],
|
|
32
|
+
setState = _useState2[1];
|
|
33
|
+
|
|
34
|
+
function updateUser() {
|
|
35
|
+
var user = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
36
|
+
var newUser = Object.assign(Object.assign({}, state.user), user);
|
|
37
|
+
setState(function (old) {
|
|
38
|
+
return Object.assign(Object.assign({}, old), {
|
|
39
|
+
user: newUser
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
_nextTick(function () {
|
|
44
|
+
_SocketEmitter.emit(_USER_EVENT_CHANGE_, newUser);
|
|
45
|
+
|
|
46
|
+
_cache.setCache(_USER_SESSION_, newUser, 'session');
|
|
47
|
+
|
|
48
|
+
console.warn('AppContext updateUser is run !', user);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function updateOperation() {
|
|
53
|
+
var operation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
54
|
+
var newOperation = Object.assign(Object.assign({}, state.operation), operation);
|
|
55
|
+
setState(function (old) {
|
|
56
|
+
return Object.assign(Object.assign({}, old), {
|
|
57
|
+
operation: newOperation
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
_nextTick(function () {
|
|
62
|
+
_SocketEmitter.emit(_OPERATION_EVENT_CHANGE_, newOperation);
|
|
63
|
+
|
|
64
|
+
_cache.setCache(_OPERATION_SESSION_, newOperation, 'session');
|
|
65
|
+
|
|
66
|
+
console.warn('AppContext updateOperation is run !', operation);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function updateLoginStatus(status) {
|
|
71
|
+
setState(function (old) {
|
|
72
|
+
return Object.assign(Object.assign({}, old), {
|
|
73
|
+
loginStatus: status
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
_nextTick(function () {
|
|
78
|
+
_SocketEmitter.emit(_LOGIN_STATUS_EVENT_CHANGE_, status);
|
|
79
|
+
|
|
80
|
+
_cache.setCache(_LOGIN_STATUS_SESSION_, status, 'session');
|
|
81
|
+
|
|
82
|
+
console.warn('AppContext updateLoginStatus is run !', status);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var stateChange = useCallback(function (options) {
|
|
87
|
+
return setState(function (old) {
|
|
88
|
+
return Object.assign(Object.assign({}, old), options);
|
|
89
|
+
});
|
|
90
|
+
}, []);
|
|
91
|
+
var providerValue = useMemo(function () {
|
|
92
|
+
return {
|
|
93
|
+
user: state.user,
|
|
94
|
+
operation: state.operation,
|
|
95
|
+
loginStatus: state.loginStatus,
|
|
96
|
+
updateUser: updateUser,
|
|
97
|
+
updateOperation: updateOperation,
|
|
98
|
+
updateLoginStatus: updateLoginStatus
|
|
99
|
+
};
|
|
100
|
+
}, [state.user, state.operation, state.loginStatus]);
|
|
101
|
+
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
102
|
+
value: providerValue
|
|
103
|
+
}, children, /*#__PURE__*/React.createElement(Sync, {
|
|
104
|
+
stateChange: stateChange
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default {
|
|
109
|
+
Provider: Provider,
|
|
110
|
+
Context: Context
|
|
111
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type UserInfoType = {
|
|
2
|
+
acceptAgreement: boolean;
|
|
3
|
+
id: string;
|
|
4
|
+
idCardNotNull: false;
|
|
5
|
+
lockTime: string;
|
|
6
|
+
loginName: string;
|
|
7
|
+
operationCenterId: string;
|
|
8
|
+
organizationId: string;
|
|
9
|
+
organizationName: string;
|
|
10
|
+
phoneNum: string;
|
|
11
|
+
realName: string;
|
|
12
|
+
roleIds: string[];
|
|
13
|
+
userAvatarUrl?: string;
|
|
14
|
+
userGrade: string;
|
|
15
|
+
userSource: string;
|
|
16
|
+
userType: string;
|
|
17
|
+
validState: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type OperationInfoType = {};
|
|
21
|
+
|
|
22
|
+
export interface AppContextInterface {
|
|
23
|
+
user: UserInfoType;
|
|
24
|
+
operation: OperationInfoType;
|
|
25
|
+
loginStatus: boolean;
|
|
26
|
+
updateUser: (user: UserInfoType) => void;
|
|
27
|
+
updateOperation: (user: OperationInfoType) => void;
|
|
28
|
+
updateLoginStatus: (status: boolean) => void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const _USER_EVENT_CHANGE_ = "_USER_EVENT_CHANGE_";
|
|
2
|
+
export declare const _OPERATION_EVENT_CHANGE_ = "_OPERATION_EVENT_CHANGE_";
|
|
3
|
+
export declare const _LOGIN_STATUS_EVENT_CHANGE_ = "_LOGIN_STATUS_EVENT_CHANGE_";
|
|
4
|
+
export declare const _USER_SESSION_ = "_USER_SESSION_";
|
|
5
|
+
export declare const _OPERATION_SESSION_ = "_OPERATION_SESSION_";
|
|
6
|
+
export declare const _LOGIN_STATUS_SESSION_ = "_LOGIN_STATUS_SESSION_";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var _USER_EVENT_CHANGE_ = '_USER_EVENT_CHANGE_';
|
|
2
|
+
export var _OPERATION_EVENT_CHANGE_ = '_OPERATION_EVENT_CHANGE_';
|
|
3
|
+
export var _LOGIN_STATUS_EVENT_CHANGE_ = '_LOGIN_STATUS_EVENT_CHANGE_';
|
|
4
|
+
export var _USER_SESSION_ = '_USER_SESSION_';
|
|
5
|
+
export var _OPERATION_SESSION_ = '_OPERATION_SESSION_';
|
|
6
|
+
export var _LOGIN_STATUS_SESSION_ = '_LOGIN_STATUS_SESSION_';
|
package/es/AutoExit/index.d.ts
CHANGED
package/es/RefDrawer/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface IUseDrawerHookState {
|
|
|
7
7
|
width?: number | string;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface IRefDrawerMethodsProps {
|
|
11
11
|
open: (options: IUseDrawerHookState) => void;
|
|
12
12
|
close: () => void;
|
|
13
13
|
}
|
|
14
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefDrawerMethodsProps>>;
|
|
15
15
|
export default _default;
|
package/es/RefModal/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface IUseModalHookState {
|
|
|
7
7
|
width?: number | string;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface IRefModalMethodsProps {
|
|
11
11
|
open: (options: IUseModalHookState) => void;
|
|
12
12
|
close: () => void;
|
|
13
13
|
}
|
|
14
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefModalMethodsProps>>;
|
|
15
15
|
export default _default;
|
package/es/TreeMode/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
2
2
|
import _Tree from "@cloud-app-dev/basic-components/es/Tree";
|
|
3
|
-
import _CBox from "@cloud-app-dev/basic-components/es/CBox";
|
|
4
3
|
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
5
4
|
import _useHttp2 from "@cloud-app-dev/basic-components/es/useHttp";
|
|
6
5
|
|
|
@@ -153,7 +152,7 @@ function TreeMode(_a) {
|
|
|
153
152
|
onDefailtSelect(id);
|
|
154
153
|
}
|
|
155
154
|
}, [treeData, treeKey]);
|
|
156
|
-
return /*#__PURE__*/React.createElement(
|
|
155
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
157
156
|
className: "bc-type-tree-layout ".concat(className)
|
|
158
157
|
}, /*#__PURE__*/React.createElement(TreeTitle, {
|
|
159
158
|
title: title,
|
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,20 +17,23 @@ 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) {
|
|
25
24
|
var form = _ref.form,
|
|
26
25
|
item = _ref.item,
|
|
27
26
|
onChange = _ref.onChange,
|
|
28
|
-
|
|
27
|
+
_ref$useConditionFiel = _ref.useConditionFields,
|
|
28
|
+
useConditionFields = _ref$useConditionFiel === void 0 ? [] : _ref$useConditionFiel;
|
|
29
29
|
|
|
30
30
|
var _a, _b;
|
|
31
31
|
|
|
32
|
+
console.log(item, useConditionFields);
|
|
33
|
+
|
|
32
34
|
var _useState = useState({
|
|
33
|
-
field: (
|
|
34
|
-
value: ((_b = item === null || item === void 0 ? void 0 : item.conditionList[0]) === null || _b === void 0 ? void 0 : _b.value
|
|
35
|
+
field: (item === null || item === void 0 ? void 0 : item.conditionList) ? (_a = item.conditionList[0]) === null || _a === void 0 ? void 0 : _a.field : '',
|
|
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 : ''
|
|
35
37
|
}),
|
|
36
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
37
39
|
state = _useState2[0],
|
|
@@ -103,8 +105,7 @@ function ConditionForm(_ref) {
|
|
|
103
105
|
};
|
|
104
106
|
});
|
|
105
107
|
}, []);
|
|
106
|
-
|
|
107
|
-
_useChangeEffect(function () {
|
|
108
|
+
useEffect(function () {
|
|
108
109
|
if (state.field !== undefined && state.value !== undefined && formItem) {
|
|
109
110
|
var conditionList = [{
|
|
110
111
|
field: state.field,
|
|
@@ -128,7 +129,6 @@ function ConditionForm(_ref) {
|
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
}, [state.field, state.value, formItem, options]);
|
|
131
|
-
|
|
132
132
|
return /*#__PURE__*/React.createElement(_ContentBox.InfoBox, {
|
|
133
133
|
title: "\u8BBE\u7F6E\u6761\u4EF6",
|
|
134
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
|
|
|
@@ -170,15 +170,10 @@ function UserSelectType2(_ref3) {
|
|
|
170
170
|
_onChange3 = _ref3.onChange,
|
|
171
171
|
type = _ref3.type,
|
|
172
172
|
emptyUsers = _ref3.emptyUsers;
|
|
173
|
-
var userList = useMemo(function () {
|
|
174
|
-
return users.filter(function (v) {
|
|
175
|
-
return v.key === 'userId';
|
|
176
|
-
});
|
|
177
|
-
}, [users]);
|
|
178
173
|
return /*#__PURE__*/React.createElement("div", {
|
|
179
174
|
className: "user-select-type1"
|
|
180
175
|
}, /*#__PURE__*/React.createElement(UserAndGroupSelect, {
|
|
181
|
-
userList:
|
|
176
|
+
userList: users,
|
|
182
177
|
onChange: function onChange(users) {
|
|
183
178
|
return _onChange3(_defineProperty({}, type, users));
|
|
184
179
|
}
|
|
@@ -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) {
|
|
@@ -207,9 +231,12 @@ function WorkerFlow(_ref, ref) {
|
|
|
207
231
|
}).includes(node.type)) {
|
|
208
232
|
var nodeName = node.type === 4 ? node.conditionNodes[index].nodeName : node.nodeName;
|
|
209
233
|
var FormContent = FormMap[node.type];
|
|
210
|
-
var
|
|
234
|
+
var fiels = node.type === 4 ? _toConsumableArray(node.conditionNodes.map(function (v) {
|
|
211
235
|
return v.id !== node.conditionNodes[index].id ? v.conditionList : [];
|
|
212
236
|
})).flat() : [];
|
|
237
|
+
var useConditionFields = fiels.filter(function (v) {
|
|
238
|
+
return !!v;
|
|
239
|
+
});
|
|
213
240
|
var nodeItem = node.type === 4 ? node.conditionNodes[index] : node;
|
|
214
241
|
var from = nodeItem.form ? form.map(function (v) {
|
|
215
242
|
return nodeItem.form.find(function (v2) {
|
|
@@ -260,12 +287,17 @@ function WorkerFlow(_ref, ref) {
|
|
|
260
287
|
useFormKeys: useFormKeys
|
|
261
288
|
};
|
|
262
289
|
}, [config]);
|
|
290
|
+
/**
|
|
291
|
+
* @description onChange传递数据
|
|
292
|
+
*/
|
|
263
293
|
|
|
264
294
|
_useChangeEffect(function () {
|
|
265
|
-
|
|
266
|
-
onChange(getConfig());
|
|
267
|
-
}
|
|
295
|
+
return onChange && onChange(getConfig());
|
|
268
296
|
}, [config]);
|
|
297
|
+
/**
|
|
298
|
+
* @description ref传递数据
|
|
299
|
+
*/
|
|
300
|
+
|
|
269
301
|
|
|
270
302
|
useImperativeHandle(ref, function () {
|
|
271
303
|
return {
|
package/es/WorkerFlow/utils.js
CHANGED
|
@@ -168,7 +168,7 @@ export function getUserFormKeys(data) {
|
|
|
168
168
|
var arr = [];
|
|
169
169
|
|
|
170
170
|
var fn = function fn(node) {
|
|
171
|
-
if (node.bpmnType == 'sequenceFlow') {
|
|
171
|
+
if (node.bpmnType == 'sequenceFlow' && node.conditionList) {
|
|
172
172
|
arr.push.apply(arr, _toConsumableArray(node.conditionList));
|
|
173
173
|
}
|
|
174
174
|
|
package/es/index.d.ts
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
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 DagInitialConfig } from './DagInitialConfig';
|
|
5
|
-
export { default as DagInitialRequest } from './DagInitialRequest';
|
|
6
4
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
7
5
|
export { default as DeviceList } from './DeviceList';
|
|
8
6
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
9
7
|
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
10
|
-
export { default as FormContent } from './FormContent';
|
|
11
8
|
export { default as InitialConfig } from './InitialConfig';
|
|
12
9
|
export { default as InitialRequest } from './InitialRequest';
|
|
13
10
|
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
11
|
export { default as RefDrawer } from './RefDrawer';
|
|
18
12
|
export { default as RefModal } from './RefModal';
|
|
19
13
|
export { default as TreeMode } from './TreeMode';
|
|
20
14
|
export { default as TreeTitle } from './TreeTitle';
|
|
21
|
-
export { default as Upload } from './Upload';
|
|
22
15
|
export { default as UserSelect } from './UserSelect';
|
|
23
16
|
export { default as WorkerFlow } from './WorkerFlow';
|
package/es/index.js
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
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 DagInitialConfig } from './DagInitialConfig';
|
|
5
|
-
export { default as DagInitialRequest } from './DagInitialRequest';
|
|
6
4
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
7
5
|
export { default as DeviceList } from './DeviceList';
|
|
8
6
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
9
7
|
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
10
|
-
export { default as FormContent } from './FormContent';
|
|
11
8
|
export { default as InitialConfig } from './InitialConfig';
|
|
12
9
|
export { default as InitialRequest } from './InitialRequest';
|
|
13
10
|
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
11
|
export { default as RefDrawer } from './RefDrawer';
|
|
18
12
|
export { default as RefModal } from './RefModal';
|
|
19
13
|
export { default as TreeMode } from './TreeMode';
|
|
20
14
|
export { default as TreeTitle } from './TreeTitle';
|
|
21
|
-
export { default as Upload } from './Upload';
|
|
22
15
|
export { default as UserSelect } from './UserSelect';
|
|
23
16
|
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.0",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"rc-queue-anim": "^2.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@cloud-app-dev/utils": "^2.0.
|
|
41
|
-
"@cloud-app-dev/basic-components": "^1.0.
|
|
40
|
+
"@cloud-app-dev/utils": "^2.0.2",
|
|
41
|
+
"@cloud-app-dev/basic-components": "^1.0.62",
|
|
42
42
|
"@types/chroma-js": "^2.1.3",
|
|
43
43
|
"@types/lodash": "^4.14.172",
|
|
44
44
|
"@umijs/test": "^3.0.5",
|
|
@@ -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
|
}
|