tntd 1.4.32 → 1.4.33-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Ellipsis/index.js +47 -15
- package/components/QueryListScene/QueryForm.js +4 -4
- package/components/QueryListScene/createActions.js +4 -4
- package/dist/1.tntd.js +1 -1
- package/dist/stats.json +24089 -23289
- package/dist/tntd.css +1 -1
- package/dist/tntd.js +7 -10
- package/es/ArrayInput/icon.js +5 -5
- package/es/ArrayInput/index.js +79 -111
- package/es/AuthContext.js +1 -1
- package/es/Columns/index.js +33 -40
- package/es/DevelopmentLogin/LoginModal.js +33 -46
- package/es/DevelopmentLogin/index.js +14 -18
- package/es/Ellipsis/Svg/CopySVG.js +13 -13
- package/es/Ellipsis/Svg/TickSVG.js +8 -8
- package/es/Ellipsis/index.js +100 -79
- package/es/Handle/index.js +46 -64
- package/es/Icon/fonts/iconfont.js +7 -12
- package/es/Icon/index.js +12 -15
- package/es/Img/Contain.js +26 -31
- package/es/Img/Cover.js +43 -57
- package/es/Img/index.js +39 -48
- package/es/Layout/ActionsContext.js +3 -2
- package/es/Layout/AppList.js +39 -94
- package/es/Layout/Application.js +28 -74
- package/es/Layout/Avatar.js +30 -67
- package/es/Layout/CompatibleLanguage.js +41 -96
- package/es/Layout/EnterpriseLayout/Avatar.js +39 -77
- package/es/Layout/EnterpriseLayout/Language.js +16 -34
- package/es/Layout/EnterpriseLayout/Theme.js +18 -36
- package/es/Layout/EnterpriseLayout/index.js +14 -16
- package/es/Layout/GlobalNavigation/NavigationPopup.js +61 -172
- package/es/Layout/GlobalNavigation/index.js +22 -56
- package/es/Layout/Header.js +26 -47
- package/es/Layout/HeaderActions.js +45 -59
- package/es/Layout/HeaderNavs.js +24 -51
- package/es/Layout/HeaderTabs.js +53 -106
- package/es/Layout/Iconfont.js +1 -1
- package/es/Layout/Language.js +16 -34
- package/es/Layout/Layout.js +88 -110
- package/es/Layout/Logo.js +17 -33
- package/es/Layout/OrgAppList.js +64 -109
- package/es/Layout/SideMenu.js +67 -128
- package/es/Layout/Theme.js +25 -63
- package/es/Layout/index.js +28 -37
- package/es/Layout/paaslayout/CompactSideMenu.js +37 -76
- package/es/Layout/paaslayout/Header.js +23 -46
- package/es/Layout/paaslayout/Logo.js +4 -14
- package/es/Layout/paaslayout/SideMenu.js +41 -80
- package/es/Layout/paaslayout/index.js +77 -104
- package/es/Layout/storage.js +10 -9
- package/es/LoadingButton/index.js +18 -27
- package/es/Modal/index.js +42 -51
- package/es/Page/Box.js +36 -43
- package/es/Page/index.js +56 -71
- package/es/Page/utils.js +0 -5
- package/es/QueryForm/Field/Checkbox.js +7 -11
- package/es/QueryForm/Field/Select.js +34 -44
- package/es/QueryForm/Field/SelectInput.js +31 -46
- package/es/QueryForm/Field/fieldsMap.js +0 -1
- package/es/QueryForm/Field/index.js +46 -78
- package/es/QueryForm/createActions.js +6 -7
- package/es/QueryForm/index.js +79 -140
- package/es/QueryListScene/List.js +83 -139
- package/es/QueryListScene/QueryForm.js +54 -91
- package/es/QueryListScene/QueryListScene.js +29 -47
- package/es/QueryListScene/Title.js +3 -3
- package/es/QueryListScene/Toolbar.js +13 -14
- package/es/QueryListScene/createActions.js +4 -4
- package/es/Select/DropDownWrap.js +32 -55
- package/es/Select/index.js +140 -232
- package/es/Table/ResizableTable/index.js +29 -43
- package/es/Table/index.js +20 -19
- package/es/Title/index.js +23 -25
- package/es/locale.js +1 -5
- package/es/utils/checkAuth.js +6 -8
- package/es/utils/findMenuInfoByPath.js +0 -4
- package/es/utils/index.js +17 -27
- package/lib/ArrayInput/icon.js +7 -9
- package/lib/ArrayInput/index.js +82 -131
- package/lib/AuthContext.js +2 -6
- package/lib/Columns/index.js +36 -54
- package/lib/DevelopmentLogin/LoginModal.js +36 -63
- package/lib/DevelopmentLogin/index.js +21 -31
- package/lib/Ellipsis/Svg/CopySVG.js +15 -18
- package/lib/Ellipsis/Svg/TickSVG.js +10 -13
- package/lib/Ellipsis/index.js +105 -93
- package/lib/Handle/index.js +51 -87
- package/lib/Icon/fonts/iconfont.js +7 -12
- package/lib/Icon/iconList.js +1 -2
- package/lib/Icon/index.js +16 -26
- package/lib/Img/Contain.js +29 -40
- package/lib/Img/Cover.js +48 -72
- package/lib/Img/index.js +42 -58
- package/lib/Layout/ActionsContext.js +1 -5
- package/lib/Layout/AppList.js +45 -124
- package/lib/Layout/Application.js +31 -92
- package/lib/Layout/Avatar.js +36 -91
- package/lib/Layout/CompatibleLanguage.js +44 -116
- package/lib/Layout/EnterpriseLayout/Avatar.js +45 -105
- package/lib/Layout/EnterpriseLayout/Language.js +22 -54
- package/lib/Layout/EnterpriseLayout/Theme.js +21 -50
- package/lib/Layout/EnterpriseLayout/index.js +17 -27
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +64 -192
- package/lib/Layout/GlobalNavigation/index.js +28 -80
- package/lib/Layout/Header.js +36 -68
- package/lib/Layout/HeaderActions.js +51 -81
- package/lib/Layout/HeaderNavs.js +30 -70
- package/lib/Layout/HeaderTabs.js +58 -127
- package/lib/Layout/Iconfont.js +4 -9
- package/lib/Layout/Language.js +22 -54
- package/lib/Layout/Layout.js +93 -134
- package/lib/Layout/Logo.js +26 -47
- package/lib/Layout/OrgAppList.js +69 -133
- package/lib/Layout/SideMenu.js +72 -151
- package/lib/Layout/Theme.js +28 -79
- package/lib/Layout/createActions.js +3 -9
- package/lib/Layout/images/index.js +5 -36
- package/lib/Layout/index.js +35 -63
- package/lib/Layout/paaslayout/CompactSideMenu.js +40 -90
- package/lib/Layout/paaslayout/Header.js +30 -60
- package/lib/Layout/paaslayout/Logo.js +11 -24
- package/lib/Layout/paaslayout/SideMenu.js +44 -93
- package/lib/Layout/paaslayout/index.js +82 -128
- package/lib/Layout/storage.js +26 -68
- package/lib/LoadingButton/index.js +21 -36
- package/lib/Modal/index.js +45 -62
- package/lib/Page/Box.js +38 -50
- package/lib/Page/index.js +58 -84
- package/lib/Page/utils.js +5 -16
- package/lib/QueryForm/Field/Checkbox.js +10 -19
- package/lib/QueryForm/Field/Select.js +39 -60
- package/lib/QueryForm/Field/SelectInput.js +36 -65
- package/lib/QueryForm/Field/fieldsMap.js +6 -23
- package/lib/QueryForm/Field/index.js +50 -91
- package/lib/QueryForm/createActions.js +9 -16
- package/lib/QueryForm/index.js +83 -165
- package/lib/QueryForm/useForm.js +1 -6
- package/lib/QueryListScene/List.js +89 -153
- package/lib/QueryListScene/QueryForm.js +58 -101
- package/lib/QueryListScene/QueryListScene.js +31 -56
- package/lib/QueryListScene/Title.js +6 -11
- package/lib/QueryListScene/Toolbar.js +16 -22
- package/lib/QueryListScene/createActions.js +7 -13
- package/lib/QueryListScene/index.js +5 -19
- package/lib/QueryListScene/useActions.js +1 -6
- package/lib/Select/DropDownWrap.js +35 -63
- package/lib/Select/index.js +142 -245
- package/lib/Table/ResizableTable/index.js +31 -54
- package/lib/Table/index.js +21 -34
- package/lib/Title/index.js +26 -34
- package/lib/index.js +36 -57
- package/lib/locale.js +9 -25
- package/lib/utils/checkAuth.js +9 -16
- package/lib/utils/findMenuInfoByPath.js +3 -12
- package/lib/utils/index.js +26 -60
- package/package.json +3 -2
|
@@ -4,29 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _Logo = _interopRequireDefault(require("../Logo"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
25
|
-
|
|
26
|
-
var LogoWrapper = (0, _styledComponents["default"])(_Logo["default"])(_templateObject());
|
|
27
|
-
|
|
28
|
-
var _default = function _default(props) {
|
|
29
|
-
return React.createElement(LogoWrapper, props);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports["default"] = _default;
|
|
9
|
+
var _templateObject;
|
|
10
|
+
/**
|
|
11
|
+
* @file Logo
|
|
12
|
+
* @author zhangyou
|
|
13
|
+
*/
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
|
+
var LogoWrapper = (0, _styledComponents["default"])(_Logo["default"])(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: #17233d !important;\n letter-spacing: 0;\n background: #fff !important;\n box-shadow: none !important;\n .isInIframe & {\n display: none;\n }\n\n &:after {\n display: none;\n }\n\n .tnt-themeS1 & {\n color: rgba(255,255,255,.85) !important;\n background: #323b4a !important;\n }\n"])));
|
|
17
|
+
var _default = exports["default"] = function _default(props) {
|
|
18
|
+
return /*#__PURE__*/React.createElement(LogoWrapper, props);
|
|
19
|
+
};
|
|
@@ -4,91 +4,52 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
var data = _taggedTemplateLiteral(["\n background: #fff;\n list-style: none;\n font-size: 14px;\n color: #17233D;\n margin: 10px 0 0;\n padding: 0;\n li {\n position: relative;\n line-height: 38px;\n cursor: pointer;\n padding-left: 20px;\n & > a {\n color: #17233D;\n & > span {\n padding-left: 10px;\n }\n }\n &.active {\n background: #EAEDF8;\n &:before {\n position: absolute;\n left: 0;\n top: 0;\n content: '';\n width: 4px;\n height: 100%;\n background-color: #4C79FF;\n }\n }\n }\n"]);
|
|
28
|
-
|
|
29
|
-
_templateObject2 = function _templateObject2() {
|
|
30
|
-
return data;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _templateObject() {
|
|
37
|
-
var data = _taggedTemplateLiteral(["\n background: #fff;\n list-style: none;\n margin: 0;\n padding: 0;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n .isInIframe & {\n display: none;\n }\n \n & > li {\n font-size: 14px;\n letter-spacing: 0;\n margin-top: 20px;\n &:first-child {\n margin-top: 30px;\n }\n & > span {\n line-height: 38px;\n opacity: 0.4;\n display: inline-block;\n width: calc(100% - 20px);\n color: #17233D;\n border-bottom: 1px solid #B2BECD;\n margin-left: 20px;\n }\n }\n"]);
|
|
38
|
-
|
|
39
|
-
_templateObject = function _templateObject() {
|
|
40
|
-
return data;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return data;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
47
|
-
|
|
48
|
-
var SideMenu = _styledComponents["default"].ul(_templateObject());
|
|
49
|
-
|
|
50
|
-
var SubMenu = _styledComponents["default"].ul(_templateObject2());
|
|
51
|
-
|
|
52
|
-
var _default = function _default(props) {
|
|
11
|
+
var _templateObject, _templateObject2;
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
14
|
+
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."); }
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
18
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
19
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
20
|
+
var SideMenu = _styledComponents["default"].ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #fff;\n list-style: none;\n margin: 0;\n padding: 0;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n .isInIframe & {\n display: none;\n }\n \n & > li {\n font-size: 14px;\n letter-spacing: 0;\n margin-top: 20px;\n &:first-child {\n margin-top: 30px;\n }\n & > span {\n line-height: 38px;\n opacity: 0.4;\n display: inline-block;\n width: calc(100% - 20px);\n color: #17233D;\n border-bottom: 1px solid #B2BECD;\n margin-left: 20px;\n }\n }\n"])));
|
|
21
|
+
var SubMenu = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: #fff;\n list-style: none;\n font-size: 14px;\n color: #17233D;\n margin: 10px 0 0;\n padding: 0;\n li {\n position: relative;\n line-height: 38px;\n cursor: pointer;\n padding-left: 20px;\n & > a {\n color: #17233D;\n & > span {\n padding-left: 10px;\n }\n }\n &.active {\n background: #EAEDF8;\n &:before {\n position: absolute;\n left: 0;\n top: 0;\n content: '';\n width: 4px;\n height: 100%;\n background-color: #4C79FF;\n }\n }\n }\n"])));
|
|
22
|
+
var _default = exports["default"] = function _default(props) {
|
|
53
23
|
var language = props.language,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
24
|
+
_props$menus = props.menus,
|
|
25
|
+
menus = _props$menus === void 0 ? [] : _props$menus,
|
|
26
|
+
formatMenuPath = props.formatMenuPath,
|
|
27
|
+
changeRouter = props.changeRouter,
|
|
28
|
+
selectedKey = props.selectedKey,
|
|
29
|
+
onBeforeChange = props.onBeforeChange,
|
|
30
|
+
onChange = props.onChange,
|
|
31
|
+
onSelect = props.onSelect;
|
|
63
32
|
var _useState = (0, _react.useState)(selectedKey),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
activeMenu = _useState2[0],
|
|
35
|
+
setActiveMenu = _useState2[1];
|
|
68
36
|
var defaultBeforeChange = function defaultBeforeChange(_ref) {
|
|
69
37
|
var data = _ref.data;
|
|
70
38
|
return !isNewTabMenu(data);
|
|
71
39
|
};
|
|
72
|
-
|
|
73
40
|
var defaultSelect = function defaultSelect(_ref2) {
|
|
74
41
|
var _window$location$path;
|
|
75
|
-
|
|
76
42
|
var data = _ref2.data;
|
|
77
|
-
|
|
78
43
|
var _ref3 = data || {},
|
|
79
|
-
|
|
80
|
-
|
|
44
|
+
path = _ref3.path;
|
|
81
45
|
var formatPath = formatMenuPath || function (path) {
|
|
82
46
|
return path;
|
|
83
47
|
};
|
|
84
|
-
|
|
85
48
|
if (isNewTabMenu(data)) {
|
|
86
49
|
openInNewTab(formatPath(data == null ? void 0 : data.path, data));
|
|
87
50
|
return;
|
|
88
51
|
}
|
|
89
|
-
|
|
90
52
|
var routerPrefix = (_window$location$path = window.location.pathname.match(/(^\/[^\/]+)/i)) == null ? void 0 : _window$location$path[1];
|
|
91
|
-
|
|
92
53
|
if (window.location.pathname.startsWith(routerPrefix)) {
|
|
93
54
|
var forwardPath = formatPath(path, data);
|
|
94
55
|
changeRouter ? changeRouter(forwardPath, data) : window.history.pushState(data, data == null ? void 0 : data.name, forwardPath);
|
|
@@ -96,38 +57,33 @@ var _default = function _default(props) {
|
|
|
96
57
|
window.location.href = formatPath(path, data);
|
|
97
58
|
}
|
|
98
59
|
};
|
|
99
|
-
|
|
100
60
|
var selectMenu = function selectMenu() {
|
|
101
61
|
var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
102
62
|
var finalBeforeChange = onBeforeChange || defaultBeforeChange;
|
|
103
63
|
var finalSelect = onSelect || defaultSelect;
|
|
104
|
-
|
|
105
64
|
if (param.key !== activeMenu) {
|
|
106
65
|
if (finalBeforeChange(param, activeMenu)) {
|
|
107
66
|
setActiveMenu(param.key);
|
|
108
67
|
onChange && onChange(param);
|
|
109
68
|
}
|
|
110
69
|
}
|
|
111
|
-
|
|
112
70
|
finalSelect(param);
|
|
113
71
|
};
|
|
114
|
-
|
|
115
72
|
var MenuItem = function MenuItem(_ref4) {
|
|
116
73
|
var item = _ref4.item;
|
|
117
74
|
var code = item.code,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
75
|
+
groupName = item.groupName,
|
|
76
|
+
enName = item.enName,
|
|
77
|
+
_item$children = item.children,
|
|
78
|
+
children = _item$children === void 0 ? [] : _item$children;
|
|
123
79
|
var SubMenuItem = function SubMenuItem(_ref5) {
|
|
124
80
|
var menu = _ref5.menu;
|
|
125
81
|
var code = menu.code,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return React.createElement("li", {
|
|
82
|
+
menuName = menu.menuName,
|
|
83
|
+
enName = menu.enName,
|
|
84
|
+
icon = menu.icon,
|
|
85
|
+
path = menu.path;
|
|
86
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
131
87
|
key: code,
|
|
132
88
|
onClick: function onClick(evt) {
|
|
133
89
|
return selectMenu({
|
|
@@ -139,47 +95,42 @@ var _default = function _default(props) {
|
|
|
139
95
|
className: (0, _classnames["default"])({
|
|
140
96
|
active: code === activeMenu
|
|
141
97
|
})
|
|
142
|
-
}, React.createElement("a", {
|
|
98
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
143
99
|
href: path,
|
|
144
100
|
onClick: function onClick(evt) {
|
|
145
101
|
return evt.preventDefault();
|
|
146
102
|
}
|
|
147
|
-
}, icon instanceof _react.Component ? icon : React.createElement(_Iconfont["default"], {
|
|
103
|
+
}, icon instanceof _react.Component ? icon : /*#__PURE__*/React.createElement(_Iconfont["default"], {
|
|
148
104
|
type: icon
|
|
149
|
-
}), React.createElement("span", null, {
|
|
105
|
+
}), /*#__PURE__*/React.createElement("span", null, {
|
|
150
106
|
cn: menuName,
|
|
151
107
|
en: enName
|
|
152
108
|
}[language])));
|
|
153
109
|
};
|
|
154
|
-
|
|
155
110
|
if (groupName && children.length) {
|
|
156
|
-
return React.createElement("li", {
|
|
111
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
157
112
|
key: code
|
|
158
|
-
}, React.createElement("span", null, {
|
|
113
|
+
}, /*#__PURE__*/React.createElement("span", null, {
|
|
159
114
|
cn: groupName,
|
|
160
115
|
en: enName
|
|
161
|
-
}[language]), React.createElement(SubMenu, null, children.map(function (subItem) {
|
|
162
|
-
return React.createElement(SubMenuItem, {
|
|
116
|
+
}[language]), /*#__PURE__*/React.createElement(SubMenu, null, children.map(function (subItem) {
|
|
117
|
+
return /*#__PURE__*/React.createElement(SubMenuItem, {
|
|
163
118
|
menu: subItem,
|
|
164
119
|
key: subItem == null ? void 0 : subItem.code
|
|
165
120
|
});
|
|
166
121
|
})));
|
|
167
122
|
}
|
|
168
|
-
|
|
169
|
-
return React.createElement(SubMenuItem, {
|
|
123
|
+
return /*#__PURE__*/React.createElement(SubMenuItem, {
|
|
170
124
|
menu: item
|
|
171
125
|
});
|
|
172
126
|
};
|
|
173
|
-
|
|
174
127
|
(0, _react.useEffect)(function () {
|
|
175
128
|
setActiveMenu(selectedKey);
|
|
176
129
|
}, [selectedKey]);
|
|
177
|
-
return React.createElement(SideMenu, null, menus.map(function (menu) {
|
|
178
|
-
return React.createElement(MenuItem, {
|
|
130
|
+
return /*#__PURE__*/React.createElement(SideMenu, null, menus.map(function (menu) {
|
|
131
|
+
return /*#__PURE__*/React.createElement(MenuItem, {
|
|
179
132
|
item: menu,
|
|
180
133
|
key: menu.code
|
|
181
134
|
});
|
|
182
135
|
}));
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
exports["default"] = _default;
|
|
136
|
+
};
|
|
@@ -1,126 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
require("antd/lib/layout/style");
|
|
11
|
-
|
|
12
9
|
var _layout = _interopRequireDefault(require("antd/lib/layout"));
|
|
13
|
-
|
|
14
10
|
var _react = require("react");
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
-
|
|
20
13
|
var _lodash = require("lodash");
|
|
21
|
-
|
|
22
14
|
var _utils = require("../../utils");
|
|
23
|
-
|
|
24
15
|
var _HeaderNavs = _interopRequireDefault(require("../HeaderNavs"));
|
|
25
|
-
|
|
26
16
|
var _Header = _interopRequireDefault(require("./Header"));
|
|
27
|
-
|
|
28
17
|
var _SideMenu = _interopRequireDefault(require("./SideMenu"));
|
|
29
|
-
|
|
30
18
|
var _CompactSideMenu = _interopRequireDefault(require("./CompactSideMenu"));
|
|
31
|
-
|
|
32
19
|
var _storage = require("../storage");
|
|
33
|
-
|
|
34
|
-
function _getRequireWildcardCache() { if (typeof WeakMap
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_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; }
|
|
51
|
-
|
|
52
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
-
|
|
54
|
-
function _templateObject() {
|
|
55
|
-
var data = _taggedTemplateLiteral(["\n position: relative;\n height: 100vh;\n overflow: hidden;\n & > .ant-layout {\n flex-direction: row;\n & > .ant-layout-content {\n overflow-x: hidden;\n flex: 1;\n }\n }\n .tnt-layout-sider {\n overflow-x: hidden;\n background: #fff !important;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n z-index: 8;\n }\n &.isInIframe, &.isEmptyLayout {\n .tnt-layout-sider {\n display: none;\n }\n }\n &.tnt-themeS1 .tnt-layout-sider {\n background: #fff !important;\n }\n .tnt-layout-content {\n background: ", ";\n }\n"]);
|
|
56
|
-
|
|
57
|
-
_templateObject = function _templateObject() {
|
|
58
|
-
return data;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
65
|
-
|
|
20
|
+
var _templateObject;
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
24
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
30
|
+
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."); }
|
|
31
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
32
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
33
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
34
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
35
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
66
36
|
var Content = _layout["default"].Content,
|
|
67
|
-
|
|
68
|
-
var TNTPaasLayout = (0, _styledComponents["default"])(_layout["default"])(_templateObject(), function (props) {
|
|
37
|
+
Sider = _layout["default"].Sider;
|
|
38
|
+
var TNTPaasLayout = (0, _styledComponents["default"])(_layout["default"])(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n height: 100vh;\n overflow: hidden;\n & > .ant-layout {\n flex-direction: row;\n & > .ant-layout-content {\n overflow-x: hidden;\n flex: 1;\n }\n }\n .tnt-layout-sider {\n overflow-x: hidden;\n background: #fff !important;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n z-index: 8;\n }\n &.isInIframe, &.isEmptyLayout {\n .tnt-layout-sider {\n display: none;\n }\n }\n &.tnt-themeS1 .tnt-layout-sider {\n background: #fff !important;\n }\n .tnt-layout-content {\n background: ", ";\n }\n"])), function (props) {
|
|
69
39
|
return props.theme.lightBgColor;
|
|
70
40
|
});
|
|
71
|
-
|
|
72
41
|
var noop = function noop() {
|
|
73
42
|
return true;
|
|
74
43
|
};
|
|
75
|
-
|
|
76
|
-
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
44
|
+
var _default = exports["default"] = (0, _styledComponents.withTheme)(function (props) {
|
|
77
45
|
var appKey = props.appKey,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
46
|
+
logo = props.logo,
|
|
47
|
+
name = props.name,
|
|
48
|
+
enName = props.enName,
|
|
49
|
+
isInIframe = props.isInIframe,
|
|
50
|
+
isEmptyLayout = props.isEmptyLayout,
|
|
51
|
+
selectedAppKey = props.selectedAppKey,
|
|
52
|
+
appList = props.appList,
|
|
53
|
+
_props$config = props.config,
|
|
54
|
+
config = _props$config === void 0 ? {} : _props$config,
|
|
55
|
+
extraHeaderActions = props.extraHeaderActions,
|
|
56
|
+
headerNavs = props.headerNavs,
|
|
57
|
+
sideMenu = props.sideMenu,
|
|
58
|
+
selectedMenuKey = props.selectedMenuKey,
|
|
59
|
+
_props$menuAlignMode = props.menuAlignMode,
|
|
60
|
+
menuAlignMode = _props$menuAlignMode === void 0 ? 'side' : _props$menuAlignMode,
|
|
61
|
+
_props$menus = props.menus,
|
|
62
|
+
menus = _props$menus === void 0 ? [] : _props$menus,
|
|
63
|
+
formatMenuPath = props.formatMenuPath,
|
|
64
|
+
changeRouter = props.changeRouter,
|
|
65
|
+
_props$onLogoClick = props.onLogoClick,
|
|
66
|
+
onLogoClick = _props$onLogoClick === void 0 ? noop : _props$onLogoClick,
|
|
67
|
+
_props$onThemeChange = props.onThemeChange,
|
|
68
|
+
_onThemeChange = _props$onThemeChange === void 0 ? noop : _props$onThemeChange,
|
|
69
|
+
_props$onLanguageChan = props.onLanguageChange,
|
|
70
|
+
_onLanguageChange = _props$onLanguageChan === void 0 ? noop : _props$onLanguageChan,
|
|
71
|
+
_props$onApplicationC = props.onApplicationChange,
|
|
72
|
+
_onApplicationChange = _props$onApplicationC === void 0 ? noop : _props$onApplicationC,
|
|
73
|
+
_props$onAppChange = props.onAppChange,
|
|
74
|
+
onAppChange = _props$onAppChange === void 0 ? noop : _props$onAppChange,
|
|
75
|
+
onLogout = props.onLogout,
|
|
76
|
+
_props$onBeforeMenuCh = props.onBeforeMenuChange,
|
|
77
|
+
onBeforeMenuChange = _props$onBeforeMenuCh === void 0 ? noop : _props$onBeforeMenuCh,
|
|
78
|
+
_props$onMenuChange = props.onMenuChange,
|
|
79
|
+
onMenuChange = _props$onMenuChange === void 0 ? noop : _props$onMenuChange,
|
|
80
|
+
_props$onMenuSelect = props.onMenuSelect,
|
|
81
|
+
onMenuSelect = _props$onMenuSelect === void 0 ? noop : _props$onMenuSelect,
|
|
82
|
+
_props$onHeaderNavCha = props.onHeaderNavChange,
|
|
83
|
+
onHeaderNavChange = _props$onHeaderNavCha === void 0 ? noop : _props$onHeaderNavCha;
|
|
117
84
|
var _useState = (0, _react.useState)(props.userInfo || {}),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
85
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
86
|
+
userInfo = _useState2[0],
|
|
87
|
+
setUserInfo = _useState2[1];
|
|
88
|
+
var theme = (0, _storage.getThemeStore)() || userInfo.theme || 'themeS2';
|
|
89
|
+
// theme === 'default' ? 'themeS2' : theme;
|
|
124
90
|
theme = ['default', 'themeS3'].includes(theme) ? 'themeS2' : theme;
|
|
125
91
|
var language = (0, _storage.getLanguageStore)() || userInfo.lang || 'cn';
|
|
126
92
|
var menusMapByApp = menus.reduce(function (acc, menu) {
|
|
@@ -128,31 +94,24 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
128
94
|
var singleGroupMap = subMenus.reduce(function (acc, subMenu) {
|
|
129
95
|
var path = subMenu.path;
|
|
130
96
|
var appKey = !/^http/i.test(path) ? path == null ? void 0 : path.match(/\/([^\/]+)/)[1] : '';
|
|
131
|
-
|
|
132
97
|
if (appKey) {
|
|
133
|
-
acc[appKey] = acc[appKey] || _objectSpread({}, menu, {
|
|
98
|
+
acc[appKey] = acc[appKey] || _objectSpread(_objectSpread({}, menu), {}, {
|
|
134
99
|
children: []
|
|
135
100
|
});
|
|
136
101
|
acc[appKey].children.push(subMenu);
|
|
137
102
|
}
|
|
138
|
-
|
|
139
103
|
return acc;
|
|
140
104
|
}, {});
|
|
141
|
-
|
|
142
105
|
for (var _appKey in singleGroupMap) {
|
|
143
106
|
acc[_appKey] = acc[_appKey] || [];
|
|
144
|
-
|
|
145
107
|
acc[_appKey].push(singleGroupMap[_appKey]);
|
|
146
108
|
}
|
|
147
|
-
|
|
148
109
|
return acc;
|
|
149
110
|
}, {});
|
|
150
|
-
|
|
151
111
|
var _useState3 = (0, _react.useState)(appKey),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
112
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
113
|
+
currentAppKey = _useState4[0],
|
|
114
|
+
setCurrentAppKey = _useState4[1];
|
|
156
115
|
var apps = (0, _lodash.reduce)(menusMapByApp, function (acc, value, key) {
|
|
157
116
|
acc.push({
|
|
158
117
|
appKey: key,
|
|
@@ -163,23 +122,22 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
163
122
|
var isMenusTop = menuAlignMode === 'top';
|
|
164
123
|
var headerNavMenus = headerNavs;
|
|
165
124
|
var currentSystemMenus = menusMapByApp[currentAppKey] || [];
|
|
166
|
-
|
|
167
125
|
var _useState5 = (0, _react.useState)((0, _lodash.get)(currentSystemMenus, '0.code')),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
126
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
127
|
+
currentHeaderNavKey = _useState6[0],
|
|
128
|
+
setCurrentHeaderNavKey = _useState6[1];
|
|
172
129
|
var sideMenus = isMenusTop ? (0, _lodash.get)(currentSystemMenus.find(function (_ref) {
|
|
173
130
|
var code = _ref.code;
|
|
174
131
|
return currentHeaderNavKey === code;
|
|
175
132
|
}), 'children', []) : currentSystemMenus;
|
|
176
|
-
var FinalSideMenu = isMenusTop ? _CompactSideMenu["default"] : _SideMenu["default"];
|
|
133
|
+
var FinalSideMenu = isMenusTop ? _CompactSideMenu["default"] : _SideMenu["default"];
|
|
177
134
|
|
|
135
|
+
// 一级菜单放在顶部(Header里面菜单作为一级导航)
|
|
178
136
|
if (isMenusTop) {
|
|
179
|
-
headerNavMenus = React.createElement(_HeaderNavs["default"], {
|
|
137
|
+
headerNavMenus = /*#__PURE__*/React.createElement(_HeaderNavs["default"], {
|
|
180
138
|
selectedKey: currentHeaderNavKey,
|
|
181
139
|
navs: currentSystemMenus.map(function (item) {
|
|
182
|
-
return _objectSpread({}, item, {
|
|
140
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
183
141
|
key: item.code,
|
|
184
142
|
name: item.groupName
|
|
185
143
|
});
|
|
@@ -190,7 +148,6 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
190
148
|
}
|
|
191
149
|
});
|
|
192
150
|
}
|
|
193
|
-
|
|
194
151
|
(0, _react.useEffect)(function () {
|
|
195
152
|
setUserInfo(props.userInfo);
|
|
196
153
|
}, [props.userInfo]);
|
|
@@ -199,7 +156,7 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
199
156
|
setCurrentHeaderNavKey((0, _lodash.get)((0, _utils.getSelectedMenuInfo)(selectedMenuKey, menus), 'menu.code'));
|
|
200
157
|
}
|
|
201
158
|
}, [menus, selectedMenuKey]);
|
|
202
|
-
return React.createElement(TNTPaasLayout, {
|
|
159
|
+
return /*#__PURE__*/React.createElement(TNTPaasLayout, {
|
|
203
160
|
className: (0, _classnames["default"])("tnt-".concat(theme, " ").concat(props.className || ''), {
|
|
204
161
|
'large-size': props.theme.size === 'large',
|
|
205
162
|
compatible: props.theme.compatible,
|
|
@@ -207,7 +164,7 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
207
164
|
isEmptyLayout: isEmptyLayout,
|
|
208
165
|
noAppList: !appList
|
|
209
166
|
})
|
|
210
|
-
}, React.createElement(_Header["default"], {
|
|
167
|
+
}, /*#__PURE__*/React.createElement(_Header["default"], {
|
|
211
168
|
logo: logo,
|
|
212
169
|
name: name,
|
|
213
170
|
enName: enName,
|
|
@@ -224,29 +181,28 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
224
181
|
onLogoClick: onLogoClick,
|
|
225
182
|
onAppChange: onAppChange,
|
|
226
183
|
onThemeChange: function onThemeChange(theme) {
|
|
227
|
-
setUserInfo(_objectSpread({}, userInfo, {
|
|
184
|
+
setUserInfo(_objectSpread(_objectSpread({}, userInfo), {}, {
|
|
228
185
|
theme: theme
|
|
229
186
|
}));
|
|
230
187
|
_onThemeChange && _onThemeChange(theme);
|
|
231
188
|
},
|
|
232
189
|
onLanguageChange: function onLanguageChange(lang) {
|
|
233
|
-
setUserInfo(_objectSpread({}, userInfo, {
|
|
190
|
+
setUserInfo(_objectSpread(_objectSpread({}, userInfo), {}, {
|
|
234
191
|
lang: lang
|
|
235
192
|
}));
|
|
236
193
|
_onLanguageChange && _onLanguageChange(lang);
|
|
237
194
|
},
|
|
238
195
|
onApplicationChange: function onApplicationChange(appKey) {
|
|
239
196
|
setCurrentAppKey(appKey);
|
|
240
|
-
|
|
241
197
|
_onApplicationChange(appKey);
|
|
242
198
|
},
|
|
243
199
|
onLogout: onLogout
|
|
244
|
-
}, headerNavMenus), React.createElement(_layout["default"], null, !(0, _lodash.isUndefined)(sideMenu) ? sideMenu : React.createElement(Sider, {
|
|
200
|
+
}, headerNavMenus), /*#__PURE__*/React.createElement(_layout["default"], null, !(0, _lodash.isUndefined)(sideMenu) ? sideMenu : /*#__PURE__*/React.createElement(Sider, {
|
|
245
201
|
breakpoint: "md",
|
|
246
202
|
className: "tnt-layout-sider",
|
|
247
203
|
width: 220,
|
|
248
204
|
trigger: null
|
|
249
|
-
}, React.createElement(FinalSideMenu, {
|
|
205
|
+
}, /*#__PURE__*/React.createElement(FinalSideMenu, {
|
|
250
206
|
language: language,
|
|
251
207
|
selectedKey: selectedMenuKey,
|
|
252
208
|
menus: sideMenus,
|
|
@@ -255,9 +211,7 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
255
211
|
onBeforeChange: onBeforeMenuChange,
|
|
256
212
|
onChange: onMenuChange,
|
|
257
213
|
onSelect: onMenuSelect
|
|
258
|
-
})), React.createElement(Content, {
|
|
214
|
+
})), /*#__PURE__*/React.createElement(Content, {
|
|
259
215
|
className: "tnt-layout-content"
|
|
260
216
|
}, props.children)));
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
exports["default"] = _default;
|
|
217
|
+
});
|