@cloud-app-dev/vidc 1.0.50 → 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/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/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/index.js +36 -7
- package/es/index.d.ts +1 -8
- package/es/index.js +1 -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/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 -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,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_';
|
|
@@ -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
|
|
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,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",
|
|
@@ -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;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
2
|
-
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
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); }
|
|
8
|
-
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
13
|
-
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; }
|
|
14
|
-
|
|
15
|
-
import React, { useMemo } from 'react';
|
|
16
|
-
|
|
17
|
-
function SubGroup(_ref) {
|
|
18
|
-
var item = _ref.item,
|
|
19
|
-
_onClick = _ref.onClick,
|
|
20
|
-
currentMenuKeys = _ref.currentMenuKeys;
|
|
21
|
-
var size = useMemo(function () {
|
|
22
|
-
return Math.max.apply(Math, _toConsumableArray(item.children.map(function (v) {
|
|
23
|
-
return v.name.length;
|
|
24
|
-
}))) * 30;
|
|
25
|
-
}, [item.children]);
|
|
26
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: "app-horizontal-submenu-pop"
|
|
28
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: "sub-menu-box"
|
|
30
|
-
}, Array.isArray(item.children) && item.children.map(function (v) {
|
|
31
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className: "sub-menu-group",
|
|
33
|
-
key: v.code
|
|
34
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: "sub-menu-group-title",
|
|
36
|
-
style: {
|
|
37
|
-
width: size
|
|
38
|
-
}
|
|
39
|
-
}, /*#__PURE__*/React.createElement("span", null, v.name), /*#__PURE__*/React.createElement(_IconFont, {
|
|
40
|
-
type: "icon-S_Arrow_SolidRight"
|
|
41
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: "sub-menu-group-item"
|
|
43
|
-
}, Array.isArray(v.children) && v.children.map(function (item) {
|
|
44
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
key: item.code,
|
|
46
|
-
className: "app-menu-item-lv3 ".concat(currentMenuKeys.includes("".concat(item.code)) ? 'app-menu-item-lv3-selected' : ''),
|
|
47
|
-
onClick: function onClick(e) {
|
|
48
|
-
return _onClick(e, item);
|
|
49
|
-
}
|
|
50
|
-
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
51
|
-
type: item.icon || 'icon-L_Bar_Objectification1'
|
|
52
|
-
}), item.name);
|
|
53
|
-
})));
|
|
54
|
-
})));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default SubGroup;
|