tntd 1.4.18 → 1.4.20
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 +1 -1
- package/components/Layout/Avatar.js +4 -4
- package/components/Layout/EnterpriseLayout/Avatar.js +10 -7
- package/components/Layout/EnterpriseLayout/Language.js +5 -3
- package/components/Layout/EnterpriseLayout/Theme.js +6 -7
- package/components/Layout/EnterpriseLayout/index.js +1 -1
- package/components/Layout/HeaderActions.js +13 -10
- package/components/Layout/HeaderTabs.js +13 -14
- package/components/Layout/Layout.js +2 -0
- package/components/Layout/index.js +2 -1
- package/components/Layout/storage.js +12 -2
- package/components/Page/index.js +2 -2
- package/components/locale.js +7 -2
- package/dist/1.tntd.js +1 -12
- package/dist/stats.json +28426 -28000
- package/dist/tntd.css +1 -1
- package/dist/tntd.js +13 -7
- package/es/ArrayInput/icon.js +5 -5
- package/es/ArrayInput/index.js +76 -108
- package/es/AuthContext.js +1 -1
- package/es/Columns/index.js +31 -38
- package/es/DevelopmentLogin/LoginModal.js +32 -45
- package/es/DevelopmentLogin/index.js +13 -17
- package/es/Ellipsis/Svg/CopySVG.js +13 -13
- package/es/Ellipsis/Svg/TickSVG.js +8 -8
- package/es/Ellipsis/index.js +59 -70
- package/es/Handle/index.js +25 -35
- package/es/Icon/fonts/iconfont.js +7 -12
- package/es/Icon/index.js +10 -13
- package/es/Img/Contain.js +24 -29
- package/es/Img/Cover.js +40 -54
- package/es/Img/index.js +36 -45
- package/es/Layout/ActionsContext.js +3 -2
- package/es/Layout/AppList.js +37 -92
- package/es/Layout/Application.js +26 -72
- package/es/Layout/Avatar.js +32 -69
- package/es/Layout/CompatibleLanguage.js +39 -94
- package/es/Layout/EnterpriseLayout/Avatar.js +49 -79
- package/es/Layout/EnterpriseLayout/Language.js +19 -34
- package/es/Layout/EnterpriseLayout/Theme.js +23 -37
- package/es/Layout/EnterpriseLayout/index.js +14 -16
- package/es/Layout/GlobalNavigation/NavigationPopup.js +59 -170
- package/es/Layout/GlobalNavigation/index.js +20 -54
- package/es/Layout/Header.js +25 -46
- package/es/Layout/HeaderActions.js +52 -63
- package/es/Layout/HeaderNavs.js +20 -47
- package/es/Layout/HeaderTabs.js +61 -115
- package/es/Layout/Iconfont.js +1 -1
- package/es/Layout/Language.js +14 -32
- package/es/Layout/Layout.js +88 -108
- package/es/Layout/Logo.js +16 -32
- package/es/Layout/OrgAppList.js +62 -107
- package/es/Layout/SideMenu.js +63 -124
- package/es/Layout/Theme.js +23 -61
- package/es/Layout/index.js +29 -36
- package/es/Layout/paaslayout/CompactSideMenu.js +35 -74
- package/es/Layout/paaslayout/Header.js +22 -45
- package/es/Layout/paaslayout/Logo.js +3 -13
- package/es/Layout/paaslayout/SideMenu.js +39 -78
- package/es/Layout/paaslayout/index.js +75 -102
- package/es/Layout/storage.js +26 -9
- package/es/LoadingButton/index.js +15 -24
- package/es/Modal/index.js +38 -46
- package/es/Page/Box.js +34 -41
- package/es/Page/index.js +54 -68
- package/es/Page/utils.js +0 -5
- package/es/QueryForm/Field/Checkbox.js +5 -9
- package/es/QueryForm/Field/Select.js +31 -41
- package/es/QueryForm/Field/SelectInput.js +26 -41
- package/es/QueryForm/Field/fieldsMap.js +0 -1
- package/es/QueryForm/Field/index.js +41 -71
- package/es/QueryForm/createActions.js +6 -7
- package/es/QueryForm/index.js +76 -135
- package/es/QueryListScene/List.js +74 -128
- package/es/QueryListScene/QueryForm.js +46 -81
- package/es/QueryListScene/QueryListScene.js +25 -40
- package/es/QueryListScene/Title.js +3 -3
- package/es/QueryListScene/Toolbar.js +11 -12
- package/es/Select/DropDownWrap.js +29 -50
- package/es/Select/index.js +135 -231
- package/es/Table/ResizableTable/index.js +26 -40
- package/es/Table/index.js +18 -16
- package/es/Title/index.js +21 -23
- package/es/locale.js +9 -7
- package/es/utils/checkAuth.js +3 -5
- package/es/utils/findMenuInfoByPath.js +0 -4
- package/es/utils/index.js +12 -23
- package/lib/ArrayInput/icon.js +6 -6
- package/lib/ArrayInput/index.js +78 -127
- package/lib/AuthContext.js +1 -4
- package/lib/Columns/index.js +31 -47
- package/lib/DevelopmentLogin/LoginModal.js +32 -58
- package/lib/DevelopmentLogin/index.js +16 -27
- package/lib/Ellipsis/Svg/CopySVG.js +13 -15
- package/lib/Ellipsis/Svg/TickSVG.js +8 -10
- package/lib/Ellipsis/index.js +58 -81
- package/lib/Handle/index.js +25 -47
- package/lib/Icon/fonts/iconfont.js +7 -12
- package/lib/Icon/index.js +11 -20
- package/lib/Img/Contain.js +24 -34
- package/lib/Img/Cover.js +42 -65
- package/lib/Img/index.js +36 -51
- package/lib/Layout/ActionsContext.js +1 -4
- package/lib/Layout/AppList.js +40 -118
- package/lib/Layout/Application.js +26 -86
- package/lib/Layout/Avatar.js +35 -89
- package/lib/Layout/CompatibleLanguage.js +39 -110
- package/lib/Layout/EnterpriseLayout/Avatar.js +52 -101
- package/lib/Layout/EnterpriseLayout/Language.js +21 -49
- package/lib/Layout/EnterpriseLayout/Theme.js +22 -46
- package/lib/Layout/EnterpriseLayout/index.js +14 -23
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +59 -186
- package/lib/Layout/GlobalNavigation/index.js +23 -74
- package/lib/Layout/Header.js +28 -63
- package/lib/Layout/HeaderActions.js +48 -74
- package/lib/Layout/HeaderNavs.js +23 -61
- package/lib/Layout/HeaderTabs.js +58 -126
- package/lib/Layout/Iconfont.js +1 -5
- package/lib/Layout/Language.js +17 -48
- package/lib/Layout/Layout.js +90 -128
- package/lib/Layout/Logo.js +19 -43
- package/lib/Layout/OrgAppList.js +64 -127
- package/lib/Layout/SideMenu.js +65 -143
- package/lib/Layout/Theme.js +23 -73
- package/lib/Layout/createActions.js +0 -5
- package/lib/Layout/images/index.js +0 -28
- package/lib/Layout/index.js +33 -57
- package/lib/Layout/paaslayout/CompactSideMenu.js +35 -84
- package/lib/Layout/paaslayout/Header.js +22 -55
- package/lib/Layout/paaslayout/Logo.js +3 -19
- package/lib/Layout/paaslayout/SideMenu.js +39 -87
- package/lib/Layout/paaslayout/index.js +77 -122
- package/lib/Layout/storage.js +29 -35
- package/lib/LoadingButton/index.js +15 -29
- package/lib/Modal/index.js +38 -53
- package/lib/Page/Box.js +34 -45
- package/lib/Page/index.js +54 -78
- package/lib/Page/utils.js +1 -9
- package/lib/QueryForm/Field/Checkbox.js +5 -13
- package/lib/QueryForm/Field/Select.js +33 -53
- package/lib/QueryForm/Field/SelectInput.js +28 -56
- package/lib/QueryForm/Field/fieldsMap.js +1 -15
- package/lib/QueryForm/Field/index.js +43 -81
- package/lib/QueryForm/createActions.js +6 -12
- package/lib/QueryForm/index.js +78 -157
- package/lib/QueryForm/useForm.js +0 -5
- package/lib/QueryListScene/List.js +76 -140
- package/lib/QueryListScene/QueryForm.js +46 -86
- package/lib/QueryListScene/QueryListScene.js +25 -46
- package/lib/QueryListScene/Title.js +3 -7
- package/lib/QueryListScene/Toolbar.js +11 -16
- package/lib/QueryListScene/createActions.js +0 -5
- package/lib/QueryListScene/index.js +0 -10
- package/lib/QueryListScene/useActions.js +0 -5
- package/lib/Select/DropDownWrap.js +31 -56
- package/lib/Select/index.js +135 -241
- package/lib/Table/ResizableTable/index.js +26 -48
- package/lib/Table/index.js +17 -28
- package/lib/Title/index.js +21 -28
- package/lib/index.js +35 -56
- package/lib/locale.js +11 -12
- package/lib/utils/checkAuth.js +4 -9
- package/lib/utils/findMenuInfoByPath.js +1 -8
- package/lib/utils/index.js +15 -42
- package/package.json +2 -2
- package/es/Layout/checkAuth.js +0 -29
- package/es/Layout/utils.js +0 -136
- package/lib/Layout/EnterpriseLayout/Header.js +0 -113
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
- package/lib/Layout/checkAuth.js +0 -39
- package/lib/Layout/utils.js +0 -166
|
@@ -1,75 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = require("react");
|
|
11
|
-
|
|
12
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
12
|
var _lodash = require("lodash");
|
|
19
|
-
|
|
20
13
|
var _ActionsContext = _interopRequireDefault(require("../ActionsContext"));
|
|
21
|
-
|
|
22
14
|
var _utils = require("../../utils");
|
|
23
|
-
|
|
24
15
|
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
25
|
-
|
|
26
16
|
var _NavigationPopup = _interopRequireDefault(require("./NavigationPopup"));
|
|
27
|
-
|
|
28
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
29
|
-
|
|
30
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
17
|
+
var _templateObject, _templateObject2;
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
43
|
-
|
|
44
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
21
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
|
+
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."); }
|
|
27
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
29
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
48
30
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
|
-
function _templateObject2() {
|
|
51
|
-
var data = _taggedTemplateLiteral(["\n .tnt-navigation-popup {\n position: absolute;\n left: 0;\n top: ", ";\n width: 100%;\n height: ", ";\n background: #FFF;\n box-shadow: 0 10px 10px -8px rgba(0,0,0,.1) inset,\n 0 10px 10px -8px rgba(0,0,0,.1);\n transition: all .15s ease-in-out;\n overflow: hidden;\n padding: 20px 16px;\n box-sizing: border-box;\n &.hide {\n height: 0;\n padding: 0;\n }\n }\n"]);
|
|
52
|
-
|
|
53
|
-
_templateObject2 = function _templateObject2() {
|
|
54
|
-
return data;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return data;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _templateObject() {
|
|
61
|
-
var data = _taggedTemplateLiteral(["\n &.active {\n color: ", " !important;\n }\n font-size: ", ";\n .tnt-icon {\n font-size: ", ";\n margin-right: 4px;\n }\n span {\n position: relative;\n font-size: ", ";\n top: ", ";\n font-family: auto;\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n .isInIframe & {\n display: none;\n }\n"]);
|
|
62
|
-
|
|
63
|
-
_templateObject = function _templateObject() {
|
|
64
|
-
return data;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return data;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
31
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
71
|
-
|
|
72
|
-
var Navigation = _styledComponents["default"].li(_templateObject(), function (_ref) {
|
|
32
|
+
var Navigation = _styledComponents["default"].li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.active {\n color: ", " !important;\n }\n font-size: ", ";\n .tnt-icon {\n font-size: ", ";\n margin-right: 4px;\n }\n span {\n position: relative;\n font-size: ", ";\n top: ", ";\n font-family: auto;\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n .isInIframe & {\n display: none;\n }\n"])), function (_ref) {
|
|
73
33
|
var theme = _ref.theme;
|
|
74
34
|
return theme.primaryColor;
|
|
75
35
|
}, function (_ref2) {
|
|
@@ -85,47 +45,39 @@ var Navigation = _styledComponents["default"].li(_templateObject(), function (_r
|
|
|
85
45
|
var size = _ref5.theme.size;
|
|
86
46
|
return size === 'large' ? '-3px' : '-2px';
|
|
87
47
|
});
|
|
88
|
-
|
|
89
48
|
var createPopupContainer = function createPopupContainer() {
|
|
90
49
|
var div = document.createElement('div');
|
|
91
50
|
div.setAttribute('class', 'tnt-navigation-popup');
|
|
92
51
|
return div;
|
|
93
52
|
};
|
|
94
|
-
|
|
95
|
-
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject2(), function (props) {
|
|
53
|
+
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .tnt-navigation-popup {\n position: absolute;\n left: 0;\n top: ", ";\n width: 100%;\n height: ", ";\n background: #FFF;\n box-shadow: 0 10px 10px -8px rgba(0,0,0,.1) inset,\n 0 10px 10px -8px rgba(0,0,0,.1);\n transition: all .15s ease-in-out;\n overflow: hidden;\n padding: 20px 16px;\n box-sizing: border-box;\n &.hide {\n height: 0;\n padding: 0;\n }\n }\n"])), function (props) {
|
|
96
54
|
return props.theme.size === 'large' ? '60px' : '50px';
|
|
97
55
|
}, function (props) {
|
|
98
56
|
return props.hasLevel3 ? '560px' : '530px';
|
|
99
57
|
});
|
|
100
|
-
|
|
101
58
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
102
59
|
var actions = (0, _react.useContext)(_ActionsContext["default"]);
|
|
103
60
|
var getText = actions.getText;
|
|
104
61
|
var headerRef = props.headerRef,
|
|
105
|
-
|
|
106
|
-
|
|
62
|
+
menus = props.menus;
|
|
107
63
|
var _useState = (0, _react.useState)(false),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
+
visible = _useState2[0],
|
|
66
|
+
setVisible = _useState2[1];
|
|
112
67
|
var popupRef = (0, _react.useRef)();
|
|
113
68
|
(0, _react.useEffect)(function () {
|
|
114
69
|
var _headerRef$current;
|
|
115
|
-
|
|
116
70
|
popupRef.current = createPopupContainer();
|
|
117
71
|
headerRef == null ? void 0 : (_headerRef$current = headerRef.current) == null ? void 0 : _headerRef$current.appendChild(popupRef.current);
|
|
118
72
|
return function () {
|
|
119
73
|
var _headerRef$current2;
|
|
120
|
-
|
|
121
74
|
headerRef == null ? void 0 : (_headerRef$current2 = headerRef.current) == null ? void 0 : _headerRef$current2.removeChild(popupRef.current);
|
|
122
75
|
};
|
|
123
76
|
}, []);
|
|
124
77
|
(0, _react.useEffect)(function () {
|
|
125
78
|
var classNames = popupRef.current.getAttribute('class').split(' ');
|
|
126
|
-
|
|
127
79
|
if (visible) {
|
|
128
|
-
_reactDom["default"].render(React.createElement(_NavigationPopup["default"], {
|
|
80
|
+
_reactDom["default"].render( /*#__PURE__*/React.createElement(_NavigationPopup["default"], {
|
|
129
81
|
actions: actions,
|
|
130
82
|
theme: props.theme,
|
|
131
83
|
menus: menus,
|
|
@@ -135,7 +87,6 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
135
87
|
return setVisible(false);
|
|
136
88
|
}
|
|
137
89
|
}), popupRef.current);
|
|
138
|
-
|
|
139
90
|
popupRef.current.setAttribute('class', classNames.filter(function (item) {
|
|
140
91
|
return item !== 'hide';
|
|
141
92
|
}).join(' '));
|
|
@@ -143,10 +94,9 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
143
94
|
popupRef.current.setAttribute('class', (0, _lodash.uniq)([].concat(_toConsumableArray(classNames), ['hide'])).join(' '));
|
|
144
95
|
}
|
|
145
96
|
}, [visible]);
|
|
146
|
-
return React.createElement(Navigation, {
|
|
97
|
+
return /*#__PURE__*/React.createElement(Navigation, {
|
|
147
98
|
onClick: function onClick(evt) {
|
|
148
99
|
var _evt$nativeEvent, _evt$nativeEvent2;
|
|
149
|
-
|
|
150
100
|
evt.stopPropagation();
|
|
151
101
|
(_evt$nativeEvent = evt.nativeEvent) == null ? void 0 : _evt$nativeEvent.stopImmediatePropagation();
|
|
152
102
|
(_evt$nativeEvent2 = evt.nativeEvent) == null ? void 0 : _evt$nativeEvent2.stopPropagation();
|
|
@@ -155,11 +105,10 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
155
105
|
className: (0, _classnames["default"])({
|
|
156
106
|
active: visible
|
|
157
107
|
})
|
|
158
|
-
}, React.createElement(_Iconfont["default"], {
|
|
108
|
+
}, /*#__PURE__*/React.createElement(_Iconfont["default"], {
|
|
159
109
|
type: "unordered-list"
|
|
160
|
-
}), React.createElement("span", null, getText('globalNavigation')), React.createElement(GlobalStyle, {
|
|
110
|
+
}), /*#__PURE__*/React.createElement("span", null, getText('globalNavigation')), /*#__PURE__*/React.createElement(GlobalStyle, {
|
|
161
111
|
hasLevel3: (0, _utils.hasLevel3)(menus)
|
|
162
112
|
}));
|
|
163
113
|
});
|
|
164
|
-
|
|
165
114
|
exports["default"] = _default;
|
package/lib/Layout/Header.js
CHANGED
|
@@ -1,55 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = require("react");
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
15
|
-
|
|
16
11
|
var _HeaderActions = _interopRequireDefault(require("./HeaderActions"));
|
|
17
|
-
|
|
18
12
|
var _AppList = _interopRequireDefault(require("./AppList"));
|
|
19
|
-
|
|
20
13
|
var _OrgAppList = _interopRequireDefault(require("./OrgAppList"));
|
|
21
|
-
|
|
14
|
+
var _templateObject, _templateObject2;
|
|
22
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
30
|
-
function _templateObject2() {
|
|
31
|
-
var data = _taggedTemplateLiteral(["\n flex: 1;\n .isInIframe & {\n display: none;\n }\n"]);
|
|
32
|
-
|
|
33
|
-
_templateObject2 = function _templateObject2() {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _templateObject() {
|
|
41
|
-
var data = _taggedTemplateLiteral(["\n position: relative;\n z-index: 201;\n height: ", ";\n display: flex;\n color: rgba(255,255,255,.85);\n background: #fff;\n .hasHeaderTabs & {\n // background: #191D29;\n background: #fff !important;\n box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.18);\n .tnt-layout-header-content {\n display: none;\n }\n }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // }\n\n .isInIframe.noAppList &,\n .isEmptyLayout & {\n display: none;\n }\n .tnt-themeS1 & {\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.15);\n }\n .tnt-themeS1.compatible & {\n /* background: #323b4a; */\n }\n padding-right: 20px;\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n .compatible & {\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n }\n transition: box-shadow .2s cubic-bezier(.4,0,.2,1), -webkit-box-shadow .2s cubic-bezier(.4,0,.2,1);\n\n .sidebar-collapsed-controller {\n text-align: center;\n width: ", ";\n line-height: ", ";\n height: ", ";\n cursor: pointer;\n color: ", ";\n margin-right: 10px;\n\n & > .tnt-icon {\n font-size: 16px;\n .large-size & {\n font-size: 20px;\n }\n }\n\n i {\n position: relative;\n top: -1px;\n vertical-align: sub;\n }\n\n &:hover {\n background-color: rgba(0,0,0,.06);\n }\n\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n color: ", ";\n }\n .large-size & {\n font-size: 18px;\n }\n .isInIframe & {\n display: none;\n }\n }\n"]);
|
|
42
|
-
|
|
43
|
-
_templateObject = function _templateObject() {
|
|
44
|
-
return data;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return data;
|
|
48
|
-
}
|
|
49
|
-
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
50
19
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
51
|
-
|
|
52
|
-
var Header = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
20
|
+
var Header = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: 201;\n height: ", ";\n display: flex;\n color: rgba(255,255,255,.85);\n background: #fff;\n .hasHeaderTabs & {\n // background: #191D29;\n background: #fff !important;\n box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.18);\n .tnt-layout-header-content {\n display: none;\n }\n }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // }\n\n .isInIframe.noAppList &,\n .isEmptyLayout & {\n display: none;\n }\n .tnt-themeS1 & {\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.15);\n }\n .tnt-themeS1.compatible & {\n /* background: #323b4a; */\n }\n padding-right: 20px;\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n .compatible & {\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n }\n transition: box-shadow .2s cubic-bezier(.4,0,.2,1), -webkit-box-shadow .2s cubic-bezier(.4,0,.2,1);\n\n .sidebar-collapsed-controller {\n text-align: center;\n width: ", ";\n line-height: ", ";\n height: ", ";\n cursor: pointer;\n color: ", ";\n margin-right: 10px;\n\n & > .tnt-icon {\n font-size: 16px;\n .large-size & {\n font-size: 20px;\n }\n }\n\n i {\n position: relative;\n top: -1px;\n vertical-align: sub;\n }\n\n &:hover {\n background-color: rgba(0,0,0,.06);\n }\n\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n color: ", ";\n }\n .large-size & {\n font-size: 18px;\n }\n .isInIframe & {\n display: none;\n }\n }\n"])), function (props) {
|
|
53
21
|
return "".concat(props.theme.headerHeight, "px");
|
|
54
22
|
}, function (props) {
|
|
55
23
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
@@ -64,35 +32,33 @@ var Header = _styledComponents["default"].div(_templateObject(), function (props
|
|
|
64
32
|
}, function (props) {
|
|
65
33
|
return "".concat(props.theme.primaryTextColor);
|
|
66
34
|
});
|
|
67
|
-
|
|
68
|
-
var Content = _styledComponents["default"].div(_templateObject2());
|
|
69
|
-
|
|
35
|
+
var Content = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n .isInIframe & {\n display: none;\n }\n"])));
|
|
70
36
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
71
37
|
var collapsed = props.collapsed,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
38
|
+
_props$collapseIconPl = props.collapseIconPlacement,
|
|
39
|
+
collapseIconPlacement = _props$collapseIconPl === void 0 ? 'right' : _props$collapseIconPl,
|
|
40
|
+
selectedAppKey = props.selectedAppKey,
|
|
41
|
+
appList = props.appList,
|
|
42
|
+
orgAppShow = props.orgAppShow,
|
|
43
|
+
orgAppList = props.orgAppList,
|
|
44
|
+
orgTreeConfig = props.orgTreeConfig,
|
|
45
|
+
selectedOrgKey = props.selectedOrgKey,
|
|
46
|
+
orgList = props.orgList,
|
|
47
|
+
headerTabs = props.headerTabs,
|
|
48
|
+
onAppChange = props.onAppChange,
|
|
49
|
+
onOrgChange = props.onOrgChange,
|
|
50
|
+
onCollapseChange = props.onCollapseChange,
|
|
51
|
+
extraActions = props.extraActions;
|
|
86
52
|
var headerRef = (0, _react.useRef)();
|
|
87
|
-
return React.createElement(Header, {
|
|
53
|
+
return /*#__PURE__*/React.createElement(Header, {
|
|
88
54
|
className: "tnt-layout-header",
|
|
89
55
|
ref: headerRef
|
|
90
|
-
}, collapseIconPlacement === 'right' && React.createElement("div", {
|
|
56
|
+
}, collapseIconPlacement === 'right' && /*#__PURE__*/React.createElement("div", {
|
|
91
57
|
className: "sidebar-collapsed-controller",
|
|
92
58
|
onClick: onCollapseChange
|
|
93
|
-
}, React.createElement(_Icon["default"], {
|
|
59
|
+
}, /*#__PURE__*/React.createElement(_Icon["default"], {
|
|
94
60
|
type: "menu-".concat(collapsed ? 'unfold' : 'fold')
|
|
95
|
-
})), headerTabs, orgList && React.createElement(_OrgAppList["default"], {
|
|
61
|
+
})), headerTabs, orgList && /*#__PURE__*/React.createElement(_OrgAppList["default"], {
|
|
96
62
|
orgAppShow: orgAppShow,
|
|
97
63
|
selectedOrgKey: selectedOrgKey,
|
|
98
64
|
orgList: orgList,
|
|
@@ -102,15 +68,14 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
102
68
|
orgAppList: orgAppList,
|
|
103
69
|
onAppChange: onAppChange,
|
|
104
70
|
headerTabs: headerTabs
|
|
105
|
-
}), appList && !orgList && React.createElement(_AppList["default"], {
|
|
71
|
+
}), appList && !orgList && /*#__PURE__*/React.createElement(_AppList["default"], {
|
|
106
72
|
items: appList,
|
|
107
73
|
selectedKey: selectedAppKey,
|
|
108
74
|
onChange: onAppChange
|
|
109
|
-
}), React.createElement(Content, {
|
|
75
|
+
}), /*#__PURE__*/React.createElement(Content, {
|
|
110
76
|
className: "tnt-layout-header-content"
|
|
111
|
-
}, props.children), React.createElement(_HeaderActions["default"], _extends({}, props, {
|
|
77
|
+
}, props.children), /*#__PURE__*/React.createElement(_HeaderActions["default"], _extends({}, props, {
|
|
112
78
|
headerRef: headerRef
|
|
113
79
|
}), extraActions));
|
|
114
80
|
});
|
|
115
|
-
|
|
116
81
|
exports["default"] = _default;
|
|
@@ -1,113 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
require("antd/lib/divider/style");
|
|
11
|
-
|
|
12
9
|
var _divider = _interopRequireDefault(require("antd/lib/divider"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _GlobalNavigation = _interopRequireDefault(require("./GlobalNavigation"));
|
|
17
|
-
|
|
18
12
|
var _Language = _interopRequireDefault(require("./Language"));
|
|
19
|
-
|
|
20
13
|
var _Theme = _interopRequireDefault(require("./Theme"));
|
|
21
|
-
|
|
22
14
|
var _CompatibleLanguage = _interopRequireDefault(require("./CompatibleLanguage"));
|
|
23
|
-
|
|
24
15
|
var _Application = _interopRequireDefault(require("./Application"));
|
|
25
|
-
|
|
26
16
|
var _Avatar = _interopRequireDefault(require("./Avatar"));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
17
|
+
var _excluded = ["type", "config", "theme", "userInfo", "menus", "apps", "extraActions", "headerRef", "onLanguageChange", "onThemeChange", "onApplicationChange", "onAppChange", "onOrgChange", "onCollapseChange", "onPersonalSetting", "onChangePassword", "onLogout", "onLogoClick", "AvatarCustom"];
|
|
18
|
+
var _templateObject;
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
-
|
|
34
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
35
|
-
|
|
36
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
37
|
-
|
|
38
|
-
function _templateObject() {
|
|
39
|
-
var data = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-block;\n line-height: ", ";\n margin: 0 0 0 20px;\n .hasHeaderTabs & {\n margin: 0;\n }\n padding: 0;\n white-space: nowrap;\n\n .isInIframe & {\n display: none;\n }\n\n & > li {\n height: 100%;\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n font-size: 20px;\n margin: 0 7.5px;\n color: ", ";\n .large-size & {\n margin: 0 10px;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n &:last-of-type {\n margin-right: 0;\n }\n .hasHeaderTabs & {\n color: #455064;\n }\n // \u5220\u9664\u8272\u7CFB\u533A\u5206 \u7EDF\u4E00\u8272\u8C03\n // .hasHeaderTabs:not(.tnt-themeS1) & {\n // color: rgba(255,255,255,.8);\n // }\n .hasHeaderTabs:not(.tnt-themeS1) & {\n color: #455064 !important;\n }\n }\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject = function _templateObject() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
24
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
49
|
-
|
|
50
|
-
var Actions = _styledComponents["default"].ul(_templateObject(), function (props) {
|
|
25
|
+
var Actions = _styledComponents["default"].ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-block;\n line-height: ", ";\n margin: 0 0 0 20px;\n .hasHeaderTabs & {\n margin: 0;\n }\n padding: 0;\n white-space: nowrap;\n\n .isInIframe & {\n display: none;\n }\n\n & > li {\n height: 100%;\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n font-size: 20px;\n margin: 0 7.5px;\n color: ", ";\n .large-size & {\n margin: 0 10px;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n &:last-of-type {\n margin-right: 0;\n }\n .hasHeaderTabs & {\n color: #455064;\n }\n // \u5220\u9664\u8272\u7CFB\u533A\u5206 \u7EDF\u4E00\u8272\u8C03\n // .hasHeaderTabs:not(.tnt-themeS1) & {\n // color: rgba(255,255,255,.8);\n // }\n .hasHeaderTabs:not(.tnt-themeS1) & {\n color: #455064 !important;\n }\n }\n"])), function (props) {
|
|
51
26
|
return "".concat(props.theme.headerHeight, "px");
|
|
52
27
|
}, function (props) {
|
|
53
28
|
return "".concat(props.theme.headerActionsColor);
|
|
54
29
|
});
|
|
55
|
-
|
|
56
30
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return React.createElement(Actions, rest, extraActions, globalNavigation && React.createElement(_GlobalNavigation["default"], {
|
|
31
|
+
var type = props.type,
|
|
32
|
+
_props$config = props.config,
|
|
33
|
+
_props$config2 = _props$config === void 0 ? {} : _props$config,
|
|
34
|
+
_props$config2$theme = _props$config2.theme,
|
|
35
|
+
theme = _props$config2$theme === void 0 ? true : _props$config2$theme,
|
|
36
|
+
_props$config2$avatar = _props$config2.avatar,
|
|
37
|
+
avatar = _props$config2$avatar === void 0 ? true : _props$config2$avatar,
|
|
38
|
+
_props$config2$langua = _props$config2.language,
|
|
39
|
+
language = _props$config2$langua === void 0 ? true : _props$config2$langua,
|
|
40
|
+
_props$config2$applic = _props$config2.application,
|
|
41
|
+
application = _props$config2$applic === void 0 ? false : _props$config2$applic,
|
|
42
|
+
_props$config2$global = _props$config2.globalNavigation,
|
|
43
|
+
globalNavigation = _props$config2$global === void 0 ? false : _props$config2$global,
|
|
44
|
+
compatible = props.theme.compatible,
|
|
45
|
+
_props$userInfo = props.userInfo,
|
|
46
|
+
userInfo = _props$userInfo === void 0 ? {} : _props$userInfo,
|
|
47
|
+
menus = props.menus,
|
|
48
|
+
apps = props.apps,
|
|
49
|
+
extraActions = props.extraActions,
|
|
50
|
+
headerRef = props.headerRef,
|
|
51
|
+
onLanguageChange = props.onLanguageChange,
|
|
52
|
+
onThemeChange = props.onThemeChange,
|
|
53
|
+
onApplicationChange = props.onApplicationChange,
|
|
54
|
+
onAppChange = props.onAppChange,
|
|
55
|
+
onOrgChange = props.onOrgChange,
|
|
56
|
+
onCollapseChange = props.onCollapseChange,
|
|
57
|
+
onPersonalSetting = props.onPersonalSetting,
|
|
58
|
+
onChangePassword = props.onChangePassword,
|
|
59
|
+
onLogout = props.onLogout,
|
|
60
|
+
onLogoClick = props.onLogoClick,
|
|
61
|
+
AvatarCustom = props.AvatarCustom,
|
|
62
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
63
|
+
return /*#__PURE__*/React.createElement(Actions, rest, extraActions, globalNavigation && /*#__PURE__*/React.createElement(_GlobalNavigation["default"], {
|
|
90
64
|
headerRef: headerRef,
|
|
91
65
|
menus: menus
|
|
92
|
-
}), !compatible ? React.createElement(React.Fragment, null, language && React.createElement(_Language["default"], {
|
|
66
|
+
}), type !== 'enterprise' && (!compatible ? /*#__PURE__*/React.createElement(React.Fragment, null, language && /*#__PURE__*/React.createElement(_Language["default"], {
|
|
93
67
|
language: userInfo.lang,
|
|
94
68
|
onChange: onLanguageChange
|
|
95
|
-
}), theme && React.createElement(_Theme["default"], {
|
|
69
|
+
}), theme && /*#__PURE__*/React.createElement(_Theme["default"], {
|
|
96
70
|
theme: userInfo.theme,
|
|
97
71
|
onChange: onThemeChange
|
|
98
|
-
})) : React.createElement(_CompatibleLanguage["default"], {
|
|
72
|
+
})) : /*#__PURE__*/React.createElement(_CompatibleLanguage["default"], {
|
|
99
73
|
config: props.config,
|
|
100
74
|
language: userInfo.lang,
|
|
101
75
|
theme: userInfo.theme,
|
|
102
76
|
onLanguageChange: onLanguageChange,
|
|
103
77
|
onThemeChange: onThemeChange
|
|
104
|
-
}), application && React.createElement(_Application["default"], {
|
|
78
|
+
})), application && /*#__PURE__*/React.createElement(_Application["default"], {
|
|
105
79
|
language: userInfo.lang,
|
|
106
80
|
apps: apps,
|
|
107
81
|
onChange: onApplicationChange
|
|
108
|
-
}), avatar && React.createElement(React.Fragment, null, React.createElement(_divider["default"], {
|
|
82
|
+
}), avatar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_divider["default"], {
|
|
109
83
|
type: "vertical"
|
|
110
|
-
}), AvatarCustom ? React.createElement(AvatarCustom, {
|
|
84
|
+
}), AvatarCustom ? /*#__PURE__*/React.createElement(AvatarCustom, {
|
|
111
85
|
userInfo: userInfo,
|
|
112
86
|
onPersonalSetting: onPersonalSetting,
|
|
113
87
|
onChangePassword: onChangePassword,
|
|
@@ -116,8 +90,9 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
116
90
|
config: {
|
|
117
91
|
theme: theme,
|
|
118
92
|
language: language
|
|
119
|
-
}
|
|
120
|
-
|
|
93
|
+
},
|
|
94
|
+
onLanguageChange: onLanguageChange
|
|
95
|
+
}) : /*#__PURE__*/React.createElement(_Avatar["default"], {
|
|
121
96
|
userInfo: userInfo,
|
|
122
97
|
onPersonalSetting: onPersonalSetting,
|
|
123
98
|
onChangePassword: onChangePassword,
|
|
@@ -129,5 +104,4 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
129
104
|
}
|
|
130
105
|
})));
|
|
131
106
|
});
|
|
132
|
-
|
|
133
107
|
exports["default"] = _default;
|