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
package/es/Layout/AppList.js
CHANGED
|
@@ -8,59 +8,18 @@ import "antd/lib/menu/style";
|
|
|
8
8
|
import _Menu from "antd/lib/menu";
|
|
9
9
|
import "antd/lib/select/style";
|
|
10
10
|
import _Select from "antd/lib/select";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
11
|
+
var _templateObject,
|
|
12
|
+
_templateObject2,
|
|
13
|
+
_templateObject3,
|
|
14
|
+
_templateObject4,
|
|
15
|
+
_this = this;
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
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."); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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; } }
|
|
20
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
-
|
|
22
|
-
function _templateObject4() {
|
|
23
|
-
var data = _taggedTemplateLiteral(["\n display: block;\n color: #666;\n line-height: ", ";\n font-size: ", ";\n\n .tnt-themeS1 & {\n color: rgba(255,255,255,.85);\n }\n &:hover {\n color: #666;\n }\n i {\n margin-left: 12px;\n }\n"]);
|
|
24
|
-
|
|
25
|
-
_templateObject4 = function _templateObject4() {
|
|
26
|
-
return data;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return data;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function _templateObject3() {
|
|
33
|
-
var data = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n"]);
|
|
34
|
-
|
|
35
|
-
_templateObject3 = function _templateObject3() {
|
|
36
|
-
return data;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return data;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function _templateObject2() {
|
|
43
|
-
var data = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u53BB\u6389\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\u8C03\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u7EDF\u4E00\u8272\u8C03\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
44
|
-
|
|
45
|
-
_templateObject2 = function _templateObject2() {
|
|
46
|
-
return data;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return data;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _templateObject() {
|
|
53
|
-
var data = _taggedTemplateLiteral(["\n border-radius: 0;\n min-width: 250px;\n max-height: 350px;\n overflow-y: auto;\n border: 1px solid #ccc;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;\n .ant-dropdown-menu-item {\n padding: 0 20px;\n height: 44px;\n line-height: 44px;\n &:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n &.app-search-warp {\n padding: 0;\n &:hover {\n background: none;\n }\n .ant-input-affix-wrapper {\n height: 100%;\n }\n .ant-input {\n border: none;\n border-bottom: 1px dashed #dcdcdc;\n box-shadow: none;\n padding: 0 20px;\n }\n }\n i {\n margin-right: 0 !important;\n margin-left: 6px !important;\n }\n }\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
54
|
-
|
|
55
|
-
_templateObject = function _templateObject() {
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
22
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
63
|
-
|
|
64
23
|
import { useState, useEffect } from 'react';
|
|
65
24
|
import styled, { withTheme } from 'styled-components';
|
|
66
25
|
import { get } from 'lodash';
|
|
@@ -68,26 +27,25 @@ import Icon from '../Icon';
|
|
|
68
27
|
import { getCurrentAppStore, setCurrentAppStore } from './storage';
|
|
69
28
|
import { traverseTree } from '../utils';
|
|
70
29
|
var Option = _Select.Option;
|
|
71
|
-
var MenuList = styled(_Menu)(_templateObject())
|
|
30
|
+
var MenuList = styled(_Menu)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 0;\n min-width: 250px;\n max-height: 350px;\n overflow-y: auto;\n border: 1px solid #ccc;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;\n .ant-dropdown-menu-item {\n padding: 0 20px;\n height: 44px;\n line-height: 44px;\n &:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n &.app-search-warp {\n padding: 0;\n &:hover {\n background: none;\n }\n .ant-input-affix-wrapper {\n height: 100%;\n }\n .ant-input {\n border: none;\n border-bottom: 1px dashed #dcdcdc;\n box-shadow: none;\n padding: 0 20px;\n }\n }\n i {\n margin-right: 0 !important;\n margin-left: 6px !important;\n }\n }\n .isInIframe & {\n margin-left: 20px;\n }\n"])));
|
|
72
31
|
|
|
73
|
-
|
|
32
|
+
// 新版UI
|
|
33
|
+
var AppsSelect = styled(_Select)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u53BB\u6389\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\u8C03\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u7EDF\u4E00\u8272\u8C03\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"])), function (props) {
|
|
74
34
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
75
35
|
});
|
|
76
|
-
var AppTreeSelect = styled(_TreeSelect)(_templateObject3());
|
|
77
|
-
var SwitchAppMenu = styled.a(_templateObject4(), function (props) {
|
|
36
|
+
var AppTreeSelect = styled(_TreeSelect)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n"])));
|
|
37
|
+
var SwitchAppMenu = styled.a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n color: #666;\n line-height: ", ";\n font-size: ", ";\n\n .tnt-themeS1 & {\n color: rgba(255,255,255,.85);\n }\n &:hover {\n color: #666;\n }\n i {\n margin-left: 12px;\n }\n"])), function (props) {
|
|
78
38
|
return "".concat(props.theme.headerHeight, "px");
|
|
79
39
|
}, function (props) {
|
|
80
40
|
return "".concat(props.theme.size === 'large' ? 16 : 14, "px");
|
|
81
41
|
});
|
|
82
42
|
export default withTheme(function (props) {
|
|
83
43
|
var selectedKey = props.selectedKey,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
44
|
+
_props$items = props.items,
|
|
45
|
+
items = _props$items === void 0 ? [] : _props$items,
|
|
46
|
+
onChange = props.onChange;
|
|
88
47
|
var getInitialSelectedApp = function getInitialSelectedApp() {
|
|
89
48
|
var currentAppStore = getCurrentAppStore();
|
|
90
|
-
|
|
91
49
|
var findAppByKey = function findAppByKey(selectedKey) {
|
|
92
50
|
var findApp;
|
|
93
51
|
traverseTree(items, function (item) {
|
|
@@ -98,34 +56,29 @@ export default withTheme(function (props) {
|
|
|
98
56
|
});
|
|
99
57
|
return findApp;
|
|
100
58
|
};
|
|
101
|
-
|
|
102
59
|
var currentApp = findAppByKey(selectedKey || get(currentAppStore, 'key'));
|
|
103
60
|
return currentApp || items[0];
|
|
104
61
|
};
|
|
105
|
-
|
|
106
62
|
var changeApp = function changeApp(app) {
|
|
107
63
|
setSelectedApp(app);
|
|
108
64
|
setCurrentAppStore(app);
|
|
109
65
|
onChange && onChange(app);
|
|
110
66
|
};
|
|
111
|
-
|
|
112
67
|
var _useState = useState(),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
68
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
+
searchValue = _useState2[0],
|
|
70
|
+
setSearchValue = _useState2[1];
|
|
117
71
|
var _useState3 = useState(getInitialSelectedApp()),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var Menus = React.createElement(MenuList, {
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
selectedApp = _useState4[0],
|
|
74
|
+
setSelectedApp = _useState4[1];
|
|
75
|
+
var Menus = /*#__PURE__*/React.createElement(MenuList, {
|
|
123
76
|
selectedKeys: [get(selectedApp, 'key')]
|
|
124
|
-
}, React.createElement(_Menu.Item, {
|
|
77
|
+
}, /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
125
78
|
className: "app-search-warp",
|
|
126
79
|
key: "search",
|
|
127
80
|
disabled: true
|
|
128
|
-
}, React.createElement(_Input, {
|
|
81
|
+
}, /*#__PURE__*/React.createElement(_Input, {
|
|
129
82
|
allowClear: true,
|
|
130
83
|
placeholder: "\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",
|
|
131
84
|
value: searchValue,
|
|
@@ -134,37 +87,31 @@ export default withTheme(function (props) {
|
|
|
134
87
|
}
|
|
135
88
|
})), items.filter(function () {
|
|
136
89
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
90
|
+
key = _ref.key,
|
|
91
|
+
name = _ref.name;
|
|
140
92
|
var regExp = new RegExp(searchValue, 'i');
|
|
141
|
-
|
|
142
93
|
if (searchValue) {
|
|
143
94
|
return regExp.test(key) || regExp.test(name);
|
|
144
95
|
}
|
|
145
|
-
|
|
146
96
|
return true;
|
|
147
97
|
}).map(function (item) {
|
|
148
|
-
return React.createElement(_Menu.Item, {
|
|
98
|
+
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
149
99
|
key: item.key,
|
|
150
100
|
onClick: changeApp.bind(_this, item)
|
|
151
101
|
}, item.name);
|
|
152
102
|
}));
|
|
153
103
|
useEffect(function () {
|
|
154
104
|
var newApp = getInitialSelectedApp();
|
|
155
|
-
|
|
156
105
|
if ((newApp == null ? void 0 : newApp.key) !== (selectedApp == null ? void 0 : selectedApp.key)) {
|
|
157
106
|
changeApp(newApp);
|
|
158
107
|
}
|
|
159
108
|
}, [items, selectedKey]);
|
|
160
|
-
|
|
161
109
|
if (!props.theme.compatible) {
|
|
162
|
-
if (items
|
|
110
|
+
if (items != null && items.some(function (item) {
|
|
163
111
|
var _item$children;
|
|
164
|
-
|
|
165
112
|
return (_item$children = item.children) == null ? void 0 : _item$children.length;
|
|
166
113
|
})) {
|
|
167
|
-
return React.createElement(AppTreeSelect, {
|
|
114
|
+
return /*#__PURE__*/React.createElement(AppTreeSelect, {
|
|
168
115
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
169
116
|
showSearch: true,
|
|
170
117
|
treeNodeFilterProp: "title",
|
|
@@ -197,8 +144,7 @@ export default withTheme(function (props) {
|
|
|
197
144
|
}
|
|
198
145
|
});
|
|
199
146
|
}
|
|
200
|
-
|
|
201
|
-
return React.createElement(AppsSelect, {
|
|
147
|
+
return /*#__PURE__*/React.createElement(AppsSelect, {
|
|
202
148
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
203
149
|
showSearch: true,
|
|
204
150
|
optionFilterProp: "children",
|
|
@@ -216,18 +162,17 @@ export default withTheme(function (props) {
|
|
|
216
162
|
}
|
|
217
163
|
}, items.map(function (_ref3) {
|
|
218
164
|
var key = _ref3.key,
|
|
219
|
-
|
|
220
|
-
return React.createElement(Option, {
|
|
165
|
+
name = _ref3.name;
|
|
166
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
221
167
|
key: key,
|
|
222
168
|
value: key
|
|
223
169
|
}, name);
|
|
224
170
|
}));
|
|
225
171
|
}
|
|
226
|
-
|
|
227
|
-
return React.createElement(_Dropdown, {
|
|
172
|
+
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
228
173
|
overlay: Menus,
|
|
229
174
|
trigger: ['click']
|
|
230
|
-
}, React.createElement(SwitchAppMenu, null, React.createElement("span", null, get(selectedApp, 'name', '请选择')), React.createElement(Icon, {
|
|
175
|
+
}, /*#__PURE__*/React.createElement(SwitchAppMenu, null, /*#__PURE__*/React.createElement("span", null, get(selectedApp, 'name', '请选择')), /*#__PURE__*/React.createElement(Icon, {
|
|
231
176
|
type: "caret-down"
|
|
232
177
|
})));
|
|
233
178
|
});
|
package/es/Layout/Application.js
CHANGED
|
@@ -1,58 +1,17 @@
|
|
|
1
1
|
import "antd/lib/popover/style";
|
|
2
2
|
import _Popover from "antd/lib/popover";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
3
|
+
var _templateObject,
|
|
4
|
+
_templateObject2,
|
|
5
|
+
_templateObject3,
|
|
6
|
+
_templateObject4,
|
|
7
|
+
_this = this;
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
+
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; } }
|
|
12
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
|
|
14
|
-
function _templateObject4() {
|
|
15
|
-
var data = _taggedTemplateLiteral(["\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n"]);
|
|
16
|
-
|
|
17
|
-
_templateObject4 = function _templateObject4() {
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return data;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _templateObject3() {
|
|
25
|
-
var data = _taggedTemplateLiteral(["\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover, &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"]);
|
|
26
|
-
|
|
27
|
-
_templateObject3 = function _templateObject3() {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _templateObject2() {
|
|
35
|
-
var data = _taggedTemplateLiteral(["\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n"]);
|
|
36
|
-
|
|
37
|
-
_templateObject2 = function _templateObject2() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _templateObject() {
|
|
45
|
-
var data = _taggedTemplateLiteral(["\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d99;\n .tnt-themeS1 & {\n color: rgba(255,255,255,.85);\n }\n }\n"]);
|
|
46
|
-
|
|
47
|
-
_templateObject = function _templateObject() {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
55
|
-
|
|
56
15
|
import { useState } from 'react';
|
|
57
16
|
import styled from 'styled-components';
|
|
58
17
|
import cn from 'classnames';
|
|
@@ -60,56 +19,51 @@ import { get } from 'lodash';
|
|
|
60
19
|
import { systemMap as applicationsMap } from '@tntx/logo-icon';
|
|
61
20
|
import Iconfont from './Iconfont';
|
|
62
21
|
import { defaultLogo } from './images';
|
|
63
|
-
var App = styled.li(_templateObject());
|
|
64
|
-
var AppList = styled.ul(_templateObject2());
|
|
65
|
-
var AppItem = styled.li(_templateObject3());
|
|
66
|
-
var AppContentWrapper = styled.div(_templateObject4());
|
|
67
|
-
|
|
22
|
+
var App = styled.li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d99;\n .tnt-themeS1 & {\n color: rgba(255,255,255,.85);\n }\n }\n"])));
|
|
23
|
+
var AppList = styled.ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n"])));
|
|
24
|
+
var AppItem = styled.li(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover, &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"])));
|
|
25
|
+
var AppContentWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n"])));
|
|
68
26
|
var AppContent = function AppContent(props) {
|
|
69
27
|
var language = props.language,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
28
|
+
apps = props.apps,
|
|
29
|
+
onChange = props.onChange;
|
|
73
30
|
var _useState = useState(props.appKey),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
appKey = _useState2[0],
|
|
33
|
+
setAppKey = _useState2[1];
|
|
78
34
|
var changeApp = function changeApp(appKey) {
|
|
79
35
|
setAppKey(appKey);
|
|
80
36
|
onChange && onChange(appKey);
|
|
81
37
|
};
|
|
82
|
-
|
|
83
|
-
return React.createElement(AppContentWrapper, null, React.createElement(AppList, null, apps.sort(function (a, b) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(AppContentWrapper, null, /*#__PURE__*/React.createElement(AppList, null, apps.sort(function (a, b) {
|
|
84
39
|
return get(applicationsMap, "".concat(a.appKey, ".sort"), 1) - get(applicationsMap, "".concat(b.appKey, ".sort"), 1);
|
|
85
40
|
}).map(function (_ref) {
|
|
86
41
|
var key = _ref.appKey;
|
|
87
|
-
return React.createElement(AppItem, {
|
|
42
|
+
return /*#__PURE__*/React.createElement(AppItem, {
|
|
88
43
|
key: key,
|
|
89
44
|
className: cn({
|
|
90
45
|
active: appKey === key
|
|
91
46
|
}),
|
|
92
47
|
onClick: changeApp.bind(_this, key)
|
|
93
|
-
}, React.createElement("img", {
|
|
48
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
94
49
|
src: get(applicationsMap, "".concat(key, ".logo"), defaultLogo),
|
|
95
50
|
onError: function onError(e) {
|
|
96
51
|
e.target.onerror = null;
|
|
97
52
|
e.target.src = defaultLogo;
|
|
98
53
|
}
|
|
99
|
-
}), React.createElement("div", null, get(applicationsMap, "".concat(key, ".").concat({
|
|
54
|
+
}), /*#__PURE__*/React.createElement("div", null, get(applicationsMap, "".concat(key, ".").concat({
|
|
100
55
|
cn: 'name',
|
|
101
56
|
en: 'enName'
|
|
102
57
|
}[language || 'cn']), key)));
|
|
103
58
|
})));
|
|
104
59
|
};
|
|
105
|
-
|
|
106
60
|
export default (function (props) {
|
|
107
|
-
return React.createElement(App, null, React.createElement(_Popover, {
|
|
61
|
+
return /*#__PURE__*/React.createElement(App, null, /*#__PURE__*/React.createElement(_Popover, {
|
|
108
62
|
placement: "bottomRight",
|
|
109
63
|
title: null,
|
|
110
|
-
content: React.createElement(AppContent, props),
|
|
64
|
+
content: /*#__PURE__*/React.createElement(AppContent, props),
|
|
111
65
|
trigger: "click"
|
|
112
|
-
}, React.createElement(Iconfont, {
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
113
67
|
type: "application"
|
|
114
68
|
})));
|
|
115
69
|
});
|
package/es/Layout/Avatar.js
CHANGED
|
@@ -2,115 +2,78 @@ import "antd/lib/popover/style";
|
|
|
2
2
|
import _Popover from "antd/lib/popover";
|
|
3
3
|
import "antd/lib/button/style";
|
|
4
4
|
import _Button from "antd/lib/button";
|
|
5
|
-
|
|
6
|
-
function _templateObject3() {
|
|
7
|
-
var data = _taggedTemplateLiteral(["\n min-width: 235px;\n z-index: 1;\n background-color: #fff;\n border-radius: 4px;\n\n .isInIframe & {\n display: none;\n }\n \n .user-info-body {\n padding: 30px 20px 20px 24px;\n line-height: 16px;\n .user-info-body-username {\n margin-top: 0px;\n font-size: 16px;\n color: #333;\n font-weight: normal;\n margin-bottom: 10px;\n line-height: 16px;\n }\n .user-info-body-account {\n margin-top: 0px;\n color: #666;\n margin-bottom: 14px;\n line-height: 16px;\n }\n a {\n margin-right: 16px;\n }\n }\n .user-info-footer {\n border-top: 1px solid #ccc;\n background-color: #f5f5f5;\n padding: 8px 20px;\n text-align: right;\n .user-info-footer-signout:hover {\n box-shadow: 0 2px 8px rgba(0, 0, 0, .1);\n border-color: #d9d9d9;\n color: rgba(0, 0, 0, 0.65);\n }\n }\n"]);
|
|
8
|
-
|
|
9
|
-
_templateObject3 = function _templateObject3() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
return data;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function _templateObject2() {
|
|
17
|
-
var data = _taggedTemplateLiteral(["\n .tnt-layout-personal-popover {\n .ant-popover-inner-content {\n padding: 0;\n }\n }\n"]);
|
|
18
|
-
|
|
19
|
-
_templateObject2 = function _templateObject2() {
|
|
20
|
-
return data;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return data;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function _templateObject() {
|
|
27
|
-
var data = _taggedTemplateLiteral(["\n margin-right: 0;\n font-size: 0;\n img {\n width: 26px;\n height: 26px;\n border-radius: 50%;\n cursor: pointer;\n .large-size & {\n width: 32px;\n height: 32px;\n }\n }\n"]);
|
|
28
|
-
|
|
29
|
-
_templateObject = function _templateObject() {
|
|
30
|
-
return data;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
|
-
|
|
5
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
36
6
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
37
|
-
|
|
38
7
|
import { useContext } from 'react';
|
|
39
8
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
40
|
-
import deleteAllCookiesFactory from 'delete-all-cookies';
|
|
41
9
|
import { get } from 'lodash';
|
|
42
10
|
import images from './images';
|
|
43
11
|
import ActionsContext from './ActionsContext';
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
|
|
12
|
+
import { clearLoginCookie } from './storage';
|
|
13
|
+
var Avatar = styled.li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-right: 0;\n font-size: 0;\n img {\n width: 26px;\n height: 26px;\n border-radius: 50%;\n cursor: pointer;\n .large-size & {\n width: 32px;\n height: 32px;\n }\n }\n"])));
|
|
14
|
+
var GlobalStyle = createGlobalStyle(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .tnt-layout-personal-popover {\n .ant-popover-inner-content {\n padding: 0;\n }\n }\n"])));
|
|
15
|
+
var UserInfoWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 235px;\n z-index: 1;\n background-color: #fff;\n border-radius: 4px;\n\n .isInIframe & {\n display: none;\n }\n \n .user-info-body {\n padding: 30px 20px 20px 24px;\n line-height: 16px;\n .user-info-body-username {\n margin-top: 0px;\n font-size: 16px;\n color: #333;\n font-weight: normal;\n margin-bottom: 10px;\n line-height: 16px;\n }\n .user-info-body-account {\n margin-top: 0px;\n color: #666;\n margin-bottom: 14px;\n line-height: 16px;\n }\n a {\n margin-right: 16px;\n }\n }\n .user-info-footer {\n border-top: 1px solid #ccc;\n background-color: #f5f5f5;\n padding: 8px 20px;\n text-align: right;\n .user-info-footer-signout:hover {\n box-shadow: 0 2px 8px rgba(0, 0, 0, .1);\n border-color: #d9d9d9;\n color: rgba(0, 0, 0, 0.65);\n }\n }\n"])));
|
|
48
16
|
var UserInfoContent = function UserInfoContent(props) {
|
|
49
17
|
var userInfo = props.userInfo,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
18
|
+
onLogout = props.onLogout,
|
|
19
|
+
_props$onChangePasswo = props.onChangePassword,
|
|
20
|
+
onChangePassword = _props$onChangePasswo === void 0 ? function () {
|
|
21
|
+
return true;
|
|
22
|
+
} : _props$onChangePasswo,
|
|
23
|
+
_props$onPersonalSett = props.onPersonalSetting,
|
|
24
|
+
onPersonalSetting = _props$onPersonalSett === void 0 ? function () {
|
|
25
|
+
return true;
|
|
26
|
+
} : _props$onPersonalSett;
|
|
60
27
|
var _useContext = useContext(ActionsContext),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return React.createElement(UserInfoWrapper, {
|
|
28
|
+
getText = _useContext.getText;
|
|
29
|
+
return /*#__PURE__*/React.createElement(UserInfoWrapper, {
|
|
64
30
|
className: "user-info-setting-wrap"
|
|
65
|
-
}, React.createElement("div", {
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
66
32
|
className: "user-info-body"
|
|
67
|
-
}, React.createElement("p", {
|
|
33
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
68
34
|
className: "user-info-body-username"
|
|
69
|
-
}, userInfo.userName || '
|
|
35
|
+
}, userInfo.userName || getText('nameNull')), /*#__PURE__*/React.createElement("p", {
|
|
70
36
|
className: "user-info-body-account"
|
|
71
|
-
}, userInfo.account), React.createElement("a", {
|
|
37
|
+
}, userInfo.account), /*#__PURE__*/React.createElement("a", {
|
|
72
38
|
onClick: onPersonalSetting,
|
|
73
39
|
href: "/bridge/userCenter?currentTab=1"
|
|
74
|
-
}, getText('personalSettings')), React.createElement("a", {
|
|
40
|
+
}, getText('personalSettings')), /*#__PURE__*/React.createElement("a", {
|
|
75
41
|
onClick: onChangePassword,
|
|
76
42
|
href: "/bridge/userCenter?currentTab=2"
|
|
77
|
-
}, getText('changePwd'))), React.createElement("div", {
|
|
43
|
+
}, getText('changePwd'))), /*#__PURE__*/React.createElement("div", {
|
|
78
44
|
className: "user-info-footer"
|
|
79
|
-
}, React.createElement(_Button, {
|
|
45
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
|
80
46
|
className: "user-info-footer-signout",
|
|
81
47
|
onClick: function onClick() {
|
|
82
48
|
if (onLogout) {
|
|
83
49
|
onLogout();
|
|
84
|
-
|
|
50
|
+
clearLoginCookie();
|
|
85
51
|
} else {
|
|
86
|
-
|
|
52
|
+
clearLoginCookie();
|
|
87
53
|
window.location.href = "/user/login?callbackUrl=".concat(window.encodeURI(location.href));
|
|
88
54
|
}
|
|
89
55
|
}
|
|
90
|
-
}, React.createElement("a", null, getText('signOut')))));
|
|
56
|
+
}, /*#__PURE__*/React.createElement("a", null, getText('signOut')))));
|
|
91
57
|
};
|
|
92
|
-
|
|
93
58
|
export default (function (props) {
|
|
94
59
|
var _images$empty2;
|
|
95
|
-
|
|
96
60
|
var _props$userInfo = props.userInfo,
|
|
97
|
-
|
|
61
|
+
userInfo = _props$userInfo === void 0 ? {} : _props$userInfo;
|
|
98
62
|
var avatar = userInfo.avatar;
|
|
99
|
-
return React.createElement(Avatar, null, React.createElement(_Popover, {
|
|
63
|
+
return /*#__PURE__*/React.createElement(Avatar, null, /*#__PURE__*/React.createElement(_Popover, {
|
|
100
64
|
popupClassName: "tnt-layout-personal-popover",
|
|
101
65
|
placement: "bottomRight",
|
|
102
66
|
title: null,
|
|
103
|
-
content: React.createElement(UserInfoContent, props),
|
|
67
|
+
content: /*#__PURE__*/React.createElement(UserInfoContent, props),
|
|
104
68
|
trigger: "click"
|
|
105
|
-
}, avatar ? React.createElement("img", {
|
|
69
|
+
}, avatar ? /*#__PURE__*/React.createElement("img", {
|
|
106
70
|
src: avatar.indexOf('base64') > 0 ? avatar : get(images[avatar], 'default', images[avatar]),
|
|
107
71
|
onError: function onError(e) {
|
|
108
72
|
var _images$empty;
|
|
109
|
-
|
|
110
73
|
e.target.onerror = null;
|
|
111
74
|
e.target.src = ((_images$empty = images.empty) == null ? void 0 : _images$empty["default"]) || images.empty;
|
|
112
75
|
}
|
|
113
|
-
}) : React.createElement("img", {
|
|
76
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
114
77
|
src: ((_images$empty2 = images.empty) == null ? void 0 : _images$empty2["default"]) || images.empty
|
|
115
|
-
})), React.createElement(GlobalStyle, null));
|
|
78
|
+
})), /*#__PURE__*/React.createElement(GlobalStyle, null));
|
|
116
79
|
});
|