@cloud-app-dev/vidc 1.0.38 → 1.0.42
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/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 +6 -13
- 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 +10 -15
- package/es/AppLayout/AppLogo/index.d.ts +13 -0
- package/es/AppLayout/AppLogo/index.js +9 -10
- package/es/AppLayout/AppTools/index.d.ts +7 -9
- package/es/AppLayout/FunctionPreview/index.d.ts +22 -0
- package/es/AppLayout/FunctionPreview/index.js +33 -39
- 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 +1 -2
- package/es/AppLayout/Header/Tools.d.ts +11 -0
- package/es/AppLayout/Header/Tools.js +2 -3
- 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 +28 -34
- 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/utils.d.ts +4 -0
- package/es/AppLayout/utils.js +9 -35
- package/es/OrgUserTree/index.d.ts +6 -0
- package/es/OrgUserTree/index.js +4 -0
- package/es/PlaceTree/index.js +2 -1
- package/es/TreeMode/index.d.ts +1 -0
- package/es/TreeMode/index.js +10 -1
- package/es/WorkerFlow/Demo.js +2 -32
- package/es/WorkerFlow/Form/Approver.d.ts +3 -2
- package/es/WorkerFlow/Form/Approver.js +14 -3
- package/es/WorkerFlow/Form/Handle.d.ts +3 -2
- package/es/WorkerFlow/Form/Handle.js +13 -3
- 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 +1 -1
- package/es/WorkerFlow/Nodes/Handle.js +1 -1
- package/es/WorkerFlow/Nodes/Notifier.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.js +9 -2
- package/es/WorkerFlow/interface.d.ts +3 -1
- package/es/WorkerFlow/utils.d.ts +2 -0
- package/es/WorkerFlow/utils.js +52 -14
- package/package.json +3 -3
- package/scripts/entry.js +1 -1
|
@@ -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;
|
|
@@ -2,12 +2,6 @@ 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
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
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; }
|
|
10
|
-
|
|
11
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
6
|
|
|
13
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."); }
|
|
@@ -65,7 +59,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
65
59
|
var container = menuBoxRef.current.querySelector('.menu-layout-wrapper');
|
|
66
60
|
var menuBox = container.querySelector('.menu-layout-box');
|
|
67
61
|
setState(function (old) {
|
|
68
|
-
return
|
|
62
|
+
return Object.assign(Object.assign({}, old), {
|
|
69
63
|
visible: container.clientWidth < menuBox.clientWidth
|
|
70
64
|
});
|
|
71
65
|
});
|
|
@@ -79,7 +73,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
79
73
|
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(uuid()) : ''));
|
|
80
74
|
setTimeout(function () {
|
|
81
75
|
return setState(function (old) {
|
|
82
|
-
return
|
|
76
|
+
return Object.assign(Object.assign({}, old), {
|
|
83
77
|
isFunc: false
|
|
84
78
|
});
|
|
85
79
|
});
|
|
@@ -94,7 +88,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
94
88
|
}
|
|
95
89
|
|
|
96
90
|
setPosState(function (old) {
|
|
97
|
-
return
|
|
91
|
+
return Object.assign(Object.assign({}, old), {
|
|
98
92
|
offset: offset
|
|
99
93
|
});
|
|
100
94
|
});
|
|
@@ -110,7 +104,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
setPosState(function (old) {
|
|
113
|
-
return
|
|
107
|
+
return Object.assign(Object.assign({}, old), {
|
|
114
108
|
offset: offset
|
|
115
109
|
});
|
|
116
110
|
});
|
|
@@ -150,7 +144,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
150
144
|
className: "app-menu-item-top app-top-all-func ".concat(state.isFunc ? 'app-menu-item-top-selected' : ''),
|
|
151
145
|
onClick: function onClick() {
|
|
152
146
|
return setState(function (old) {
|
|
153
|
-
return
|
|
147
|
+
return Object.assign(Object.assign({}, old), {
|
|
154
148
|
isFunc: true
|
|
155
149
|
});
|
|
156
150
|
});
|
|
@@ -210,7 +204,6 @@ function AppHorizontalMenu(_ref) {
|
|
|
210
204
|
type: "top"
|
|
211
205
|
}, state.isFunc ? /*#__PURE__*/React.createElement(FunctionPreview, {
|
|
212
206
|
className: "app-horizontal-funcs",
|
|
213
|
-
currentMenuKeys: app.currentMenuKeys,
|
|
214
207
|
onMenuSelect: onMenuSelect,
|
|
215
208
|
key: "all",
|
|
216
209
|
menuList: auth.userMenuList
|
|
@@ -223,7 +216,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
223
216
|
className: "fun-preview-mask",
|
|
224
217
|
onClick: function onClick() {
|
|
225
218
|
return setState(function (old) {
|
|
226
|
-
return
|
|
219
|
+
return Object.assign(Object.assign({}, old), {
|
|
227
220
|
isFunc: false
|
|
228
221
|
});
|
|
229
222
|
});
|
|
@@ -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;
|
|
@@ -2,12 +2,6 @@ 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
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
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; }
|
|
10
|
-
|
|
11
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
6
|
|
|
13
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."); }
|
|
@@ -59,7 +53,8 @@ function AppInlineMenu(_ref) {
|
|
|
59
53
|
};
|
|
60
54
|
}, [state.collapsed]);
|
|
61
55
|
var scrollSize = useMemo(function () {
|
|
62
|
-
|
|
56
|
+
var root = document.querySelector(':root');
|
|
57
|
+
return root.style.getPropertyValue('--scrollbar-width');
|
|
63
58
|
}, []);
|
|
64
59
|
var onMenuSelect = useCallback(function (e, item, flag) {
|
|
65
60
|
if (item.level === 3) {
|
|
@@ -71,7 +66,7 @@ function AppInlineMenu(_ref) {
|
|
|
71
66
|
|
|
72
67
|
if (flag) {
|
|
73
68
|
setState(function (old) {
|
|
74
|
-
return
|
|
69
|
+
return Object.assign(Object.assign({}, old), {
|
|
75
70
|
subMenuKey: '',
|
|
76
71
|
subMenus: [],
|
|
77
72
|
collapsed: true
|
|
@@ -83,7 +78,7 @@ function AppInlineMenu(_ref) {
|
|
|
83
78
|
}
|
|
84
79
|
|
|
85
80
|
setState(function (old) {
|
|
86
|
-
return
|
|
81
|
+
return Object.assign(Object.assign({}, old), {
|
|
87
82
|
subMenuKey: old.subMenuKey === item.code ? '' : item.code,
|
|
88
83
|
subMenus: item.children
|
|
89
84
|
});
|
|
@@ -91,20 +86,21 @@ function AppInlineMenu(_ref) {
|
|
|
91
86
|
}, [auth.userMenuList, history]);
|
|
92
87
|
var onSelectFuns = useCallback(function () {
|
|
93
88
|
return setState(function (old) {
|
|
94
|
-
return
|
|
89
|
+
return Object.assign(Object.assign({}, old), {
|
|
95
90
|
subMenuKey: old.subMenuKey === 'all' ? '' : 'all'
|
|
96
91
|
});
|
|
97
92
|
});
|
|
98
93
|
}, []);
|
|
99
94
|
useLayoutEffect(function () {
|
|
100
95
|
var fn = function fn(e) {
|
|
101
|
-
var
|
|
96
|
+
var arr = Array.from(e.path);
|
|
97
|
+
var item = arr.find(function (v) {
|
|
102
98
|
return v.classList && (v.classList.contains('app-inline-menu-sub-container') || v.classList.contains('app-inline-menu-container'));
|
|
103
99
|
});
|
|
104
100
|
|
|
105
101
|
if (!item) {
|
|
106
102
|
setState(function (old) {
|
|
107
|
-
return
|
|
103
|
+
return Object.assign(Object.assign({}, old), {
|
|
108
104
|
collapsed: true,
|
|
109
105
|
subMenuKey: '',
|
|
110
106
|
subMenus: []
|
|
@@ -130,7 +126,7 @@ function AppInlineMenu(_ref) {
|
|
|
130
126
|
className: "menu-collapsed-btn",
|
|
131
127
|
onClick: function onClick() {
|
|
132
128
|
return setState(function (old) {
|
|
133
|
-
return
|
|
129
|
+
return Object.assign(Object.assign({}, old), {
|
|
134
130
|
collapsed: !state.collapsed
|
|
135
131
|
});
|
|
136
132
|
});
|
|
@@ -155,7 +151,7 @@ function AppInlineMenu(_ref) {
|
|
|
155
151
|
type: "icon-quangongneng"
|
|
156
152
|
}), !state.collapsed ? /*#__PURE__*/React.createElement("span", null, "\u5FEB\u901F\u5BFC\u822A") : null))), menuList.map(function (v) {
|
|
157
153
|
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' : ''),
|
|
154
|
+
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
155
|
key: v.code
|
|
160
156
|
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
161
157
|
title: v.name,
|
|
@@ -178,7 +174,6 @@ function AppInlineMenu(_ref) {
|
|
|
178
174
|
}) : /*#__PURE__*/React.createElement(React.Fragment, {
|
|
179
175
|
key: "menuempty"
|
|
180
176
|
}), state.subMenuKey && state.subMenuKey === 'all' ? /*#__PURE__*/React.createElement(FunctionPreview, {
|
|
181
|
-
currentMenuKeys: app.currentMenuKeys,
|
|
182
177
|
style: popStyle,
|
|
183
178
|
onMenuSelect: onMenuSelect,
|
|
184
179
|
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,7 +1,7 @@
|
|
|
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
6
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
7
7
|
|
|
@@ -25,8 +25,7 @@ export default function AppLogo(_ref) {
|
|
|
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),
|
|
@@ -44,11 +43,11 @@ export default function AppLogo(_ref) {
|
|
|
44
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;
|
|
@@ -3,10 +3,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
3
3
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
4
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
5
5
|
|
|
6
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
7
|
-
|
|
8
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
9
|
-
|
|
10
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
7
|
|
|
12
8
|
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); } }
|
|
@@ -27,11 +23,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
27
23
|
|
|
28
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
25
|
|
|
26
|
+
import { __awaiter } from "tslib";
|
|
30
27
|
import React from 'react';
|
|
31
28
|
import { getFunctionCount, clearFunctionCount, deleteFunctionItemCount } from '../utils';
|
|
32
29
|
import { cache } from '@cloud-app-dev/utils';
|
|
33
30
|
import "./index.css";
|
|
34
31
|
var CACHE_KEY = 'functionCount';
|
|
32
|
+
var _global = window;
|
|
35
33
|
|
|
36
34
|
var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
37
35
|
_inherits(FunctionPreview, _React$Component);
|
|
@@ -43,7 +41,8 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
43
41
|
|
|
44
42
|
_classCallCheck(this, FunctionPreview);
|
|
45
43
|
|
|
46
|
-
_this = _super.call(this);
|
|
44
|
+
_this = _super.call(this, props);
|
|
45
|
+
_this.menuList = []; // eslint-disable-next-line no-undef
|
|
47
46
|
|
|
48
47
|
_this.getNearList = function () {
|
|
49
48
|
getFunctionCount().then(function (counts) {
|
|
@@ -59,31 +58,32 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
59
58
|
});
|
|
60
59
|
};
|
|
61
60
|
|
|
62
|
-
_this.clearNearList =
|
|
63
|
-
return regeneratorRuntime.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
case 2:
|
|
71
|
-
cache.setUserCache(CACHE_KEY, []);
|
|
61
|
+
_this.clearNearList = function () {
|
|
62
|
+
return __awaiter(_assertThisInitialized(_this), void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
63
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
64
|
+
while (1) {
|
|
65
|
+
switch (_context.prev = _context.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
_context.next = 2;
|
|
68
|
+
return clearFunctionCount();
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
case 2:
|
|
71
|
+
cache.setUserCache(CACHE_KEY, []);
|
|
72
|
+
this.setState({
|
|
73
|
+
nearList: []
|
|
74
|
+
});
|
|
76
75
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
case 4:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context.stop();
|
|
79
|
+
}
|
|
80
80
|
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
81
|
+
}, _callee, this);
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
84
|
|
|
85
|
-
_this.deleteCountItem =
|
|
86
|
-
|
|
85
|
+
_this.deleteCountItem = function (event, item) {
|
|
86
|
+
return __awaiter(_assertThisInitialized(_this), void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
87
87
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
88
88
|
while (1) {
|
|
89
89
|
switch (_context2.prev = _context2.next) {
|
|
@@ -93,25 +93,20 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
return deleteFunctionItemCount(item.alias);
|
|
94
94
|
|
|
95
95
|
case 3:
|
|
96
|
-
|
|
96
|
+
this.getNearList();
|
|
97
97
|
|
|
98
98
|
case 4:
|
|
99
99
|
case "end":
|
|
100
100
|
return _context2.stop();
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
}, _callee2);
|
|
103
|
+
}, _callee2, this);
|
|
104
104
|
}));
|
|
105
|
+
};
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
return _ref2.apply(this, arguments);
|
|
108
|
-
};
|
|
109
|
-
}();
|
|
110
|
-
|
|
111
|
-
var _counts = cache.getUserCache(CACHE_KEY) || [];
|
|
112
|
-
|
|
107
|
+
var counts = cache.getUserCache(CACHE_KEY) || [];
|
|
113
108
|
_this.state = {
|
|
114
|
-
nearList:
|
|
109
|
+
nearList: counts.map(function (item) {
|
|
115
110
|
return _Store.auth.getInfoByName(item.id);
|
|
116
111
|
}).filter(function (v) {
|
|
117
112
|
return !!v;
|
|
@@ -125,8 +120,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
125
120
|
return v.level === 3 && v.type !== 0;
|
|
126
121
|
});
|
|
127
122
|
return _this;
|
|
128
|
-
}
|
|
129
|
-
|
|
123
|
+
}
|
|
130
124
|
|
|
131
125
|
_createClass(FunctionPreview, [{
|
|
132
126
|
key: "render",
|
|
@@ -139,7 +133,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
139
133
|
className = _this$props.className;
|
|
140
134
|
var keyword = this.state.keyword;
|
|
141
135
|
var list = this.menuList.filter(function (v2) {
|
|
142
|
-
return v2.name.includes(keyword) ||
|
|
136
|
+
return v2.name.includes(keyword) || _global.pinyinUtil.getFirstLetter(v2.name).includes(keyword.toUpperCase()) || _global.pinyinUtil.getPinyin(v2.name).replace(/\s/g, '').includes(keyword.toLowerCase());
|
|
143
137
|
});
|
|
144
138
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
145
139
|
className: "app-inline-menu-sub-container app-inline-funs-sub-container ".concat(className),
|