@cloud-app-dev/vidc 1.0.39 → 1.0.43
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/.fatherrc.js +3 -0
- package/.umirc.ts +3 -0
- package/es/AppLayout/AppHeader/index.d.ts +18 -0
- package/es/AppLayout/AppHeader/index.js +5 -6
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +1 -0
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +9 -0
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +13 -0
- package/es/AppLayout/AppHorizontalMenu/index.js +10 -16
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +9 -0
- package/es/AppLayout/AppInlineMenu/SubGroup.js +29 -70
- package/es/AppLayout/AppInlineMenu/index.d.ts +12 -0
- package/es/AppLayout/AppInlineMenu/index.js +14 -18
- package/es/AppLayout/AppLogo/index.d.ts +13 -0
- package/es/AppLayout/AppLogo/index.js +11 -12
- package/es/AppLayout/AppTools/index.d.ts +7 -9
- package/es/AppLayout/FunctionPreview/index.d.ts +22 -0
- package/es/AppLayout/FunctionPreview/index.js +35 -40
- package/es/AppLayout/Header/ListenceRoute.d.ts +5 -0
- package/es/AppLayout/Header/ListenceRoute.js +1 -1
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +6 -0
- package/es/AppLayout/Header/ModifyPassword/index.js +72 -38
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +10 -0
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +4 -10
- package/es/AppLayout/Header/NotifyAlarm.js +14 -9
- package/es/AppLayout/Header/Tools.d.ts +11 -0
- package/es/AppLayout/Header/Tools.js +4 -5
- package/es/AppLayout/Header/ToolsItem.d.ts +1 -0
- package/es/AppLayout/Header/ToolsItem.js +7 -14
- package/es/AppLayout/Header/UserAction.d.ts +10 -0
- package/es/AppLayout/Header/UserAction.js +30 -36
- package/es/AppLayout/Header/index.d.ts +9 -0
- package/es/AppLayout/Header/index.js +10 -22
- package/es/AppLayout/index.d.ts +10 -12
- package/es/AppLayout/index.js +2 -1
- package/es/AppLayout/service/index.js +5 -5
- package/es/AppLayout/utils.d.ts +4 -0
- package/es/AppLayout/utils.js +12 -37
- package/es/DagInitialRequest/utils.js +7 -8
- package/es/InitialRequest/index.js +2 -2
- package/es/InitialRequest/utils.js +8 -9
- package/es/OrgUserTree/index.d.ts +6 -0
- package/es/OrgUserTree/index.js +6 -2
- package/es/PlaceTree/index.js +4 -3
- package/es/TreeMode/index.d.ts +1 -0
- package/es/TreeMode/index.js +12 -3
- package/es/UserSelect/demo.d.ts +2 -0
- package/es/UserSelect/demo.js +20 -0
- package/es/UserSelect/index.js +8 -5
- package/es/WorkerFlow/Demo.js +4 -33
- package/es/WorkerFlow/Form/Approver.d.ts +3 -2
- package/es/WorkerFlow/Form/Approver.js +14 -3
- package/es/WorkerFlow/Form/Condition.js +4 -1
- package/es/WorkerFlow/Form/FormAuth.js +1 -1
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +25 -13
- package/es/WorkerFlow/Form/Handle.d.ts +3 -2
- package/es/WorkerFlow/Form/Handle.js +13 -3
- package/es/WorkerFlow/Form/Notifier.js +2 -1
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +41 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +12 -2
- package/es/WorkerFlow/Form/UserSet.d.ts +3 -2
- package/es/WorkerFlow/Form/UserSet.js +8 -5
- package/es/WorkerFlow/Form/UsersHandleType.js +3 -1
- package/es/WorkerFlow/Nodes/Add.js +16 -5
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +3 -4
- package/es/WorkerFlow/Nodes/AddOptionList.js +6 -6
- package/es/WorkerFlow/Nodes/Approver.js +1 -1
- package/es/WorkerFlow/Nodes/Condition.js +8 -11
- package/es/WorkerFlow/Nodes/Handle.js +1 -1
- package/es/WorkerFlow/Nodes/Notifier.js +1 -1
- package/es/WorkerFlow/Nodes/TitleElement.js +1 -1
- package/es/WorkerFlow/Tools.d.ts +1 -1
- package/es/WorkerFlow/Tools.js +3 -2
- package/es/WorkerFlow/XML/utils.d.ts +1 -0
- package/es/WorkerFlow/XML/utils.js +30 -0
- package/es/WorkerFlow/index.css +12 -2
- package/es/WorkerFlow/index.js +9 -2
- package/es/WorkerFlow/interface.d.ts +5 -2
- package/es/WorkerFlow/utils.d.ts +2 -2
- package/es/WorkerFlow/utils.js +16 -4
- package/es/utils.js +2 -2
- package/package.json +3 -3
- package/scripts/entry.js +1 -1
package/.fatherrc.js
CHANGED
|
@@ -11,5 +11,8 @@ export default {
|
|
|
11
11
|
extraBabelPlugins: [
|
|
12
12
|
['import', { libraryName: 'antd', style: true }, 'antd'],
|
|
13
13
|
['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
|
|
14
|
+
['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
|
|
15
|
+
['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
|
|
16
|
+
['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
|
|
14
17
|
],
|
|
15
18
|
};
|
package/.umirc.ts
CHANGED
|
@@ -14,6 +14,9 @@ export default defineConfig({
|
|
|
14
14
|
extraBabelPlugins: [
|
|
15
15
|
['import', { libraryName: 'antd', style: true }, 'antd'],
|
|
16
16
|
['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
|
|
17
|
+
['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
|
|
18
|
+
['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
|
|
19
|
+
['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
|
|
17
20
|
],
|
|
18
21
|
theme: {
|
|
19
22
|
'@ant-prefix': 'cloudapp',
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -4,16 +4,15 @@ import AppTools from '../AppTools';
|
|
|
4
4
|
import AppHorizontalMenu from '../AppHorizontalMenu';
|
|
5
5
|
import MenuEmptyBox from '../AppHorizontalMenu/MenuEmptyBox';
|
|
6
6
|
import "./index.css";
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
function AppHeader(_ref) {
|
|
8
9
|
var _ref$className = _ref.className,
|
|
9
10
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
10
11
|
renderMenu = _ref.renderMenu,
|
|
11
12
|
isMenuHome = _ref.isMenuHome,
|
|
12
|
-
menuSelect = _ref.menuSelect,
|
|
13
13
|
systemLogo = _ref.systemLogo,
|
|
14
14
|
defaultSrc = _ref.defaultSrc,
|
|
15
15
|
systemName = _ref.systemName,
|
|
16
|
-
selectedKeys = _ref.selectedKeys,
|
|
17
16
|
appTools = _ref.appTools,
|
|
18
17
|
history = _ref.history,
|
|
19
18
|
menuType = _ref.menuType,
|
|
@@ -35,8 +34,8 @@ export default function AppHeader(_ref) {
|
|
|
35
34
|
userInfo: userInfo
|
|
36
35
|
}), menuType !== 'inline' ? /*#__PURE__*/React.createElement(AppHorizontalMenu, {
|
|
37
36
|
renderMenu: renderMenu,
|
|
38
|
-
onSelect: menuSelect,
|
|
39
|
-
selectedKeys: selectedKeys,
|
|
40
37
|
history: history
|
|
41
38
|
}) : /*#__PURE__*/React.createElement(MenuEmptyBox, null), /*#__PURE__*/React.createElement(AppTools, null, appTools));
|
|
42
|
-
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default AppHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuEmptyBox(): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AuthStoreInterface } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
2
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
import * as H from 'history';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface IAppHorizontalMenuProps {
|
|
6
|
+
auth?: AuthStoreInterface;
|
|
7
|
+
app?: AppStoreInterface;
|
|
8
|
+
history: H.History;
|
|
9
|
+
renderMenu?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function AppHorizontalMenu({ auth, app, history, renderMenu }: IAppHorizontalMenuProps): JSX.Element;
|
|
12
|
+
declare const _default: typeof AppHorizontalMenu & import("mobx-react").IWrappedComponent<IAppHorizontalMenuProps>;
|
|
13
|
+
export default _default;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import "antd/lib/popover/style";
|
|
2
2
|
import _Popover from "antd/lib/popover";
|
|
3
3
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
import _uuid from "@cloud-app-dev/utils/es/uuid";
|
|
5
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
10
6
|
|
|
11
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
8
|
|
|
@@ -22,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
22
18
|
|
|
23
19
|
import React, { useState, useMemo, useCallback, useRef, useEffect } from 'react';
|
|
24
20
|
import { inject, observer } from 'mobx-react';
|
|
25
|
-
import { treeHelper, uuid } from '@cloud-app-dev/utils';
|
|
26
21
|
import { updateFunctionCount } from '../utils';
|
|
27
22
|
import FunctionPreview from '../FunctionPreview';
|
|
28
23
|
import QueueAnim from 'rc-queue-anim';
|
|
@@ -41,7 +36,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
41
36
|
});
|
|
42
37
|
}, [auth.userMenuList]);
|
|
43
38
|
var menuList = useMemo(function () {
|
|
44
|
-
return renderMenu ?
|
|
39
|
+
return renderMenu ? _treeHelper.computTreeList(filterMenus, 'code', 'parentCode') : [];
|
|
45
40
|
}, [filterMenus, renderMenu]);
|
|
46
41
|
|
|
47
42
|
var _useState = useState({
|
|
@@ -65,7 +60,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
65
60
|
var container = menuBoxRef.current.querySelector('.menu-layout-wrapper');
|
|
66
61
|
var menuBox = container.querySelector('.menu-layout-box');
|
|
67
62
|
setState(function (old) {
|
|
68
|
-
return
|
|
63
|
+
return Object.assign(Object.assign({}, old), {
|
|
69
64
|
visible: container.clientWidth < menuBox.clientWidth
|
|
70
65
|
});
|
|
71
66
|
});
|
|
@@ -76,10 +71,10 @@ function AppHorizontalMenu(_ref) {
|
|
|
76
71
|
var menu = auth.userMenuList.find(function (v) {
|
|
77
72
|
return +v.code === +item.code;
|
|
78
73
|
});
|
|
79
|
-
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(
|
|
74
|
+
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(_uuid()) : ''));
|
|
80
75
|
setTimeout(function () {
|
|
81
76
|
return setState(function (old) {
|
|
82
|
-
return
|
|
77
|
+
return Object.assign(Object.assign({}, old), {
|
|
83
78
|
isFunc: false
|
|
84
79
|
});
|
|
85
80
|
});
|
|
@@ -94,7 +89,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
94
89
|
}
|
|
95
90
|
|
|
96
91
|
setPosState(function (old) {
|
|
97
|
-
return
|
|
92
|
+
return Object.assign(Object.assign({}, old), {
|
|
98
93
|
offset: offset
|
|
99
94
|
});
|
|
100
95
|
});
|
|
@@ -110,7 +105,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
setPosState(function (old) {
|
|
113
|
-
return
|
|
108
|
+
return Object.assign(Object.assign({}, old), {
|
|
114
109
|
offset: offset
|
|
115
110
|
});
|
|
116
111
|
});
|
|
@@ -150,7 +145,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
150
145
|
className: "app-menu-item-top app-top-all-func ".concat(state.isFunc ? 'app-menu-item-top-selected' : ''),
|
|
151
146
|
onClick: function onClick() {
|
|
152
147
|
return setState(function (old) {
|
|
153
|
-
return
|
|
148
|
+
return Object.assign(Object.assign({}, old), {
|
|
154
149
|
isFunc: true
|
|
155
150
|
});
|
|
156
151
|
});
|
|
@@ -210,7 +205,6 @@ function AppHorizontalMenu(_ref) {
|
|
|
210
205
|
type: "top"
|
|
211
206
|
}, state.isFunc ? /*#__PURE__*/React.createElement(FunctionPreview, {
|
|
212
207
|
className: "app-horizontal-funcs",
|
|
213
|
-
currentMenuKeys: app.currentMenuKeys,
|
|
214
208
|
onMenuSelect: onMenuSelect,
|
|
215
209
|
key: "all",
|
|
216
210
|
menuList: auth.userMenuList
|
|
@@ -223,7 +217,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
223
217
|
className: "fun-preview-mask",
|
|
224
218
|
onClick: function onClick() {
|
|
225
219
|
return setState(function (old) {
|
|
226
|
-
return
|
|
220
|
+
return Object.assign(Object.assign({}, old), {
|
|
227
221
|
isFunc: false
|
|
228
222
|
});
|
|
229
223
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ISubGroupProps {
|
|
3
|
+
menuList: any[];
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
onMenuSelect?: (e: React.MouseEvent, v2: any, flag: boolean) => void;
|
|
6
|
+
currentMenuKeys?: string[];
|
|
7
|
+
}
|
|
8
|
+
declare function SubGroup({ menuList, style, onMenuSelect, currentMenuKeys }: ISubGroupProps): JSX.Element;
|
|
9
|
+
export default SubGroup;
|
|
@@ -1,75 +1,34 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
-
|
|
3
1
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
-
|
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
-
|
|
7
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
8
|
-
|
|
9
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10
|
-
|
|
11
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12
|
-
|
|
13
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
-
|
|
15
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
|
-
|
|
17
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
18
|
-
|
|
19
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
|
-
|
|
21
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
|
-
|
|
23
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
-
|
|
25
2
|
import React from 'react';
|
|
26
3
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
57
|
-
key: v2.code,
|
|
58
|
-
className: "app-menu-lv3-item ".concat(currentMenuKeys.includes("".concat(v2.code)) ? 'app-menu-lv3-item-selected' : ''),
|
|
59
|
-
onClick: function onClick(e) {
|
|
60
|
-
return onMenuSelect(e, v2, true);
|
|
61
|
-
}
|
|
62
|
-
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
63
|
-
type: v2.icon || 'icon-L_Bar_Objectification1'
|
|
64
|
-
}), " ", /*#__PURE__*/React.createElement("span", null, v2.name), /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "menu-bg-mask"
|
|
66
|
-
}));
|
|
67
|
-
}));
|
|
68
|
-
})));
|
|
69
|
-
}
|
|
70
|
-
}]);
|
|
71
|
-
|
|
72
|
-
return SubGroup;
|
|
73
|
-
}(React.Component);
|
|
4
|
+
function SubGroup(_ref) {
|
|
5
|
+
var menuList = _ref.menuList,
|
|
6
|
+
style = _ref.style,
|
|
7
|
+
onMenuSelect = _ref.onMenuSelect,
|
|
8
|
+
currentMenuKeys = _ref.currentMenuKeys;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "app-inline-menu-sub-container",
|
|
11
|
+
style: style
|
|
12
|
+
}, /*#__PURE__*/React.createElement("ul", null, menuList.map(function (v) {
|
|
13
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
14
|
+
key: v.code
|
|
15
|
+
}, /*#__PURE__*/React.createElement("li", {
|
|
16
|
+
className: "app-menu-lv2-item",
|
|
17
|
+
key: v.code
|
|
18
|
+
}, /*#__PURE__*/React.createElement("span", null, v.name)), Array.isArray(v.children) && v.children.map(function (v2) {
|
|
19
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
20
|
+
key: v2.code,
|
|
21
|
+
className: "app-menu-lv3-item ".concat(currentMenuKeys.includes("".concat(v2.code)) ? 'app-menu-lv3-item-selected' : ''),
|
|
22
|
+
onClick: function onClick(e) {
|
|
23
|
+
return onMenuSelect(e, v2, true);
|
|
24
|
+
}
|
|
25
|
+
}, /*#__PURE__*/React.createElement(_IconFont, {
|
|
26
|
+
type: v2.icon || 'icon-L_Bar_Objectification1'
|
|
27
|
+
}), " ", /*#__PURE__*/React.createElement("span", null, v2.name), /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "menu-bg-mask"
|
|
29
|
+
}));
|
|
30
|
+
}));
|
|
31
|
+
})));
|
|
32
|
+
}
|
|
74
33
|
|
|
75
34
|
export default SubGroup;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as H from 'history';
|
|
2
|
+
import { AppStoreInterface } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
import { AuthStoreInterface } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface IAppInlineMenuProps {
|
|
6
|
+
auth?: AuthStoreInterface;
|
|
7
|
+
app?: AppStoreInterface;
|
|
8
|
+
history: H.History;
|
|
9
|
+
}
|
|
10
|
+
declare function AppInlineMenu({ auth, app, history }: IAppInlineMenuProps): JSX.Element;
|
|
11
|
+
declare const _default: typeof AppInlineMenu & import("mobx-react").IWrappedComponent<IAppInlineMenuProps>;
|
|
12
|
+
export default _default;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import "antd/lib/tooltip/style";
|
|
2
2
|
import _Tooltip from "antd/lib/tooltip";
|
|
3
3
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
import _uuid from "@cloud-app-dev/utils/es/uuid";
|
|
5
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
10
6
|
|
|
11
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
8
|
|
|
@@ -22,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
22
18
|
|
|
23
19
|
import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react';
|
|
24
20
|
import { inject, observer } from 'mobx-react';
|
|
25
|
-
import { treeHelper, uuid } from '@cloud-app-dev/utils';
|
|
26
21
|
import QueueAnim from 'rc-queue-anim';
|
|
27
22
|
import FunctionPreview from '../FunctionPreview';
|
|
28
23
|
import SubGroup from './SubGroup';
|
|
@@ -51,7 +46,7 @@ function AppInlineMenu(_ref) {
|
|
|
51
46
|
});
|
|
52
47
|
}, [auth.userMenuList]);
|
|
53
48
|
var menuList = useMemo(function () {
|
|
54
|
-
return
|
|
49
|
+
return _treeHelper.computTreeList(filterMenus, 'code', 'parentCode');
|
|
55
50
|
}, [filterMenus]);
|
|
56
51
|
var popStyle = useMemo(function () {
|
|
57
52
|
return {
|
|
@@ -59,7 +54,8 @@ function AppInlineMenu(_ref) {
|
|
|
59
54
|
};
|
|
60
55
|
}, [state.collapsed]);
|
|
61
56
|
var scrollSize = useMemo(function () {
|
|
62
|
-
|
|
57
|
+
var root = document.querySelector(':root');
|
|
58
|
+
return root.style.getPropertyValue('--scrollbar-width');
|
|
63
59
|
}, []);
|
|
64
60
|
var onMenuSelect = useCallback(function (e, item, flag) {
|
|
65
61
|
if (item.level === 3) {
|
|
@@ -67,11 +63,11 @@ function AppInlineMenu(_ref) {
|
|
|
67
63
|
var menu = auth.userMenuList.find(function (v) {
|
|
68
64
|
return +v.code === +item.code;
|
|
69
65
|
});
|
|
70
|
-
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(
|
|
66
|
+
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(_uuid()) : ''));
|
|
71
67
|
|
|
72
68
|
if (flag) {
|
|
73
69
|
setState(function (old) {
|
|
74
|
-
return
|
|
70
|
+
return Object.assign(Object.assign({}, old), {
|
|
75
71
|
subMenuKey: '',
|
|
76
72
|
subMenus: [],
|
|
77
73
|
collapsed: true
|
|
@@ -83,7 +79,7 @@ function AppInlineMenu(_ref) {
|
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
setState(function (old) {
|
|
86
|
-
return
|
|
82
|
+
return Object.assign(Object.assign({}, old), {
|
|
87
83
|
subMenuKey: old.subMenuKey === item.code ? '' : item.code,
|
|
88
84
|
subMenus: item.children
|
|
89
85
|
});
|
|
@@ -91,20 +87,21 @@ function AppInlineMenu(_ref) {
|
|
|
91
87
|
}, [auth.userMenuList, history]);
|
|
92
88
|
var onSelectFuns = useCallback(function () {
|
|
93
89
|
return setState(function (old) {
|
|
94
|
-
return
|
|
90
|
+
return Object.assign(Object.assign({}, old), {
|
|
95
91
|
subMenuKey: old.subMenuKey === 'all' ? '' : 'all'
|
|
96
92
|
});
|
|
97
93
|
});
|
|
98
94
|
}, []);
|
|
99
95
|
useLayoutEffect(function () {
|
|
100
96
|
var fn = function fn(e) {
|
|
101
|
-
var
|
|
97
|
+
var arr = Array.from(e.path);
|
|
98
|
+
var item = arr.find(function (v) {
|
|
102
99
|
return v.classList && (v.classList.contains('app-inline-menu-sub-container') || v.classList.contains('app-inline-menu-container'));
|
|
103
100
|
});
|
|
104
101
|
|
|
105
102
|
if (!item) {
|
|
106
103
|
setState(function (old) {
|
|
107
|
-
return
|
|
104
|
+
return Object.assign(Object.assign({}, old), {
|
|
108
105
|
collapsed: true,
|
|
109
106
|
subMenuKey: '',
|
|
110
107
|
subMenus: []
|
|
@@ -130,7 +127,7 @@ function AppInlineMenu(_ref) {
|
|
|
130
127
|
className: "menu-collapsed-btn",
|
|
131
128
|
onClick: function onClick() {
|
|
132
129
|
return setState(function (old) {
|
|
133
|
-
return
|
|
130
|
+
return Object.assign(Object.assign({}, old), {
|
|
134
131
|
collapsed: !state.collapsed
|
|
135
132
|
});
|
|
136
133
|
});
|
|
@@ -155,7 +152,7 @@ function AppInlineMenu(_ref) {
|
|
|
155
152
|
type: "icon-quangongneng"
|
|
156
153
|
}), !state.collapsed ? /*#__PURE__*/React.createElement("span", null, "\u5FEB\u901F\u5BFC\u822A") : null))), menuList.map(function (v) {
|
|
157
154
|
return /*#__PURE__*/React.createElement("li", {
|
|
158
|
-
className: "app-menu-top-item ".concat(app.currentMenuKeys.includes("".concat(v.code)) ? 'app-menu-top-item-selected' : '', " ").concat(state.subMenuKey === v.code ? 'app-menu-sub-item-selected' : ''),
|
|
155
|
+
className: "app-menu-top-item ".concat(app.currentMenuKeys.includes("".concat(v.code)) ? 'app-menu-top-item-selected' : '', " ").concat("".concat(state.subMenuKey) === "".concat(v.code) ? 'app-menu-sub-item-selected' : ''),
|
|
159
156
|
key: v.code
|
|
160
157
|
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
161
158
|
title: v.name,
|
|
@@ -178,7 +175,6 @@ function AppInlineMenu(_ref) {
|
|
|
178
175
|
}) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
179
176
|
key: "menuempty"
|
|
180
177
|
}), state.subMenuKey && state.subMenuKey === 'all' ? /*#__PURE__*/React.createElement(FunctionPreview, {
|
|
181
|
-
currentMenuKeys: app.currentMenuKeys,
|
|
182
178
|
style: popStyle,
|
|
183
179
|
onMenuSelect: onMenuSelect,
|
|
184
180
|
key: "all",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { UserInfo } from '@cloud-app-dev/basic-components/es/Store/app';
|
|
3
|
+
import * as H from 'history';
|
|
4
|
+
interface IAppLogoProps {
|
|
5
|
+
systemLogo?: string;
|
|
6
|
+
defaultSrc?: string;
|
|
7
|
+
systemName?: string;
|
|
8
|
+
userInfo?: UserInfo;
|
|
9
|
+
isMenuHome?: boolean;
|
|
10
|
+
history?: H.History;
|
|
11
|
+
}
|
|
12
|
+
export default function AppLogo({ systemLogo, defaultSrc, systemName, userInfo, isMenuHome }: IAppLogoProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "antd/lib/col/style";
|
|
2
|
-
import _Col from "antd/lib/col";
|
|
3
1
|
import _ImageView from "@cloud-app-dev/basic-components/es/ImageView";
|
|
4
2
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
3
|
+
import "antd/lib/col/style";
|
|
4
|
+
import _Col from "antd/lib/col";
|
|
5
5
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
6
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
6
7
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
7
8
|
|
|
8
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -18,15 +19,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
18
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
20
|
|
|
20
21
|
import React, { useState, useEffect, useMemo } from 'react';
|
|
21
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
22
22
|
import "./index.css";
|
|
23
23
|
export default function AppLogo(_ref) {
|
|
24
24
|
var systemLogo = _ref.systemLogo,
|
|
25
25
|
defaultSrc = _ref.defaultSrc,
|
|
26
26
|
systemName = _ref.systemName,
|
|
27
27
|
userInfo = _ref.userInfo,
|
|
28
|
-
isMenuHome = _ref.isMenuHome
|
|
29
|
-
history = _ref.history;
|
|
28
|
+
isMenuHome = _ref.isMenuHome;
|
|
30
29
|
var BSConfig = _Config.BSConfig;
|
|
31
30
|
|
|
32
31
|
var _useState = useState(false),
|
|
@@ -41,14 +40,14 @@ export default function AppLogo(_ref) {
|
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
var GatewayState = useMemo(function () {
|
|
44
|
-
return
|
|
43
|
+
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
45
44
|
}, []);
|
|
46
45
|
useEffect(function () {
|
|
47
|
-
//用户名显示是否加入行政区划
|
|
48
|
-
|
|
49
|
-
var _BSConfig$funcConfig;
|
|
46
|
+
var _a; //用户名显示是否加入行政区划
|
|
47
|
+
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
if (!isMenuHome) {
|
|
50
|
+
if (userInfo.addressCode && ((_a = BSConfig === null || BSConfig === void 0 ? void 0 : BSConfig.funcConfig) === null || _a === void 0 ? void 0 : _a.needUserAddress)) {
|
|
52
51
|
_Service.$http({
|
|
53
52
|
method: 'get',
|
|
54
53
|
url: "/micro-apps/micro-dep-librarys/config/location.json"
|
|
@@ -89,8 +88,8 @@ export default function AppLogo(_ref) {
|
|
|
89
88
|
defaultSrc: defaultSrc
|
|
90
89
|
})), !isMenuHome || GatewayState ? /*#__PURE__*/React.createElement("span", {
|
|
91
90
|
className: "logo-name",
|
|
92
|
-
title: name
|
|
93
|
-
|
|
91
|
+
title: name,
|
|
92
|
+
// onClick={() => handleGateway()}
|
|
94
93
|
style: {
|
|
95
94
|
cursor: 'pointer'
|
|
96
95
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IAppToolsProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default AppTools;
|
|
7
|
+
export default function AppTools({ className, children }: IAppToolsProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FeatureItem } from '@cloud-app-dev/basic-components/es/Store/auth';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface IFunctionPreviewProps {
|
|
5
|
+
menuList: FeatureItem[];
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
className?: string;
|
|
8
|
+
onMenuSelect: (e: React.MouseEvent, item: FeatureItem, flag?: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
interface IFunctionPreviewState {
|
|
11
|
+
nearList: any[];
|
|
12
|
+
keyword: string;
|
|
13
|
+
}
|
|
14
|
+
declare class FunctionPreview extends React.Component<IFunctionPreviewProps, IFunctionPreviewState> {
|
|
15
|
+
menuList: FeatureItem[];
|
|
16
|
+
constructor(props: IFunctionPreviewProps);
|
|
17
|
+
getNearList: () => void;
|
|
18
|
+
clearNearList: () => Promise<void>;
|
|
19
|
+
deleteCountItem: (event: React.MouseEvent, item: FeatureItem) => Promise<void>;
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
export default FunctionPreview;
|