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
package/lib/Layout/HeaderNavs.js
CHANGED
|
@@ -1,63 +1,30 @@
|
|
|
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"] = exports.HeaderNavs = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = require("react");
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _lodash = require("lodash");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function _templateObject2() {
|
|
37
|
-
var data = _taggedTemplateLiteral(["\n position: relative;\n margin: 0;\n padding: 0 20px;\n cursor: pointer;\n display: inline-block;\n line-height: ", ";\n transition: background-color .5;\n\n a {\n font-size: 14px;\n color: ", ";\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n .tnt-themeS1 & {\n color: rgba(255,255,255,.8);\n }\n }\n\n &:hover, &.active {\n a {\n color: ", ";\n .tnt-themeS1 & {\n color: #418AFF;\n }\n }\n }\n &.active {\n &:after {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 3px;\n background: ", ";\n display: inline-block;\n content: \"\";\n .tnt-themeS1 & {\n background: #418AFF;\n }\n }\n }\n"]);
|
|
38
|
-
|
|
39
|
-
_templateObject2 = function _templateObject2() {
|
|
40
|
-
return data;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return data;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _templateObject() {
|
|
47
|
-
var data = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: right;\n"]);
|
|
48
|
-
|
|
49
|
-
_templateObject = function _templateObject() {
|
|
50
|
-
return data;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return data;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
57
|
-
|
|
58
|
-
var Navs = _styledComponents["default"].ul(_templateObject());
|
|
59
|
-
|
|
60
|
-
var NavItem = _styledComponents["default"].li(_templateObject2(), function (props) {
|
|
12
|
+
var _excluded = ["theme", "navs", "onChange", "onSelect"];
|
|
13
|
+
var _templateObject, _templateObject2;
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
|
+
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."); }
|
|
19
|
+
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; } }
|
|
20
|
+
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; }
|
|
21
|
+
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; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
23
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
24
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
25
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
26
|
+
var Navs = _styledComponents["default"].ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: right;\n"])));
|
|
27
|
+
var NavItem = _styledComponents["default"].li(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n margin: 0;\n padding: 0 20px;\n cursor: pointer;\n display: inline-block;\n line-height: ", ";\n transition: background-color .5;\n\n a {\n font-size: 14px;\n color: ", ";\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n .tnt-themeS1 & {\n color: rgba(255,255,255,.8);\n }\n }\n\n &:hover, &.active {\n a {\n color: ", ";\n .tnt-themeS1 & {\n color: #418AFF;\n }\n }\n }\n &.active {\n &:after {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 3px;\n background: ", ";\n display: inline-block;\n content: \"\";\n .tnt-themeS1 & {\n background: #418AFF;\n }\n }\n }\n"])), function (props) {
|
|
61
28
|
return props.theme.size === 'large' ? '60px' : '50px';
|
|
62
29
|
}, function (props) {
|
|
63
30
|
return props.theme.secondaryTextColor;
|
|
@@ -66,35 +33,30 @@ var NavItem = _styledComponents["default"].li(_templateObject2(), function (prop
|
|
|
66
33
|
}, function (props) {
|
|
67
34
|
return props.theme.primaryColor;
|
|
68
35
|
});
|
|
69
|
-
|
|
70
|
-
var HeaderNavs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
36
|
+
var HeaderNavs = exports.HeaderNavs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
71
37
|
var theme = _ref.theme,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
38
|
+
_ref$navs = _ref.navs,
|
|
39
|
+
navs = _ref$navs === void 0 ? [] : _ref$navs,
|
|
40
|
+
onChange = _ref.onChange,
|
|
41
|
+
onSelect = _ref.onSelect,
|
|
42
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
78
43
|
var _useState = (0, _react.useState)(props.selectedKey || (0, _lodash.get)(navs, '0.key')),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
+
selectedKey = _useState2[0],
|
|
46
|
+
setSelectedKey = _useState2[1];
|
|
83
47
|
var onClickNav = function onClickNav(nav) {
|
|
84
48
|
setSelectedKey(nav.key);
|
|
85
49
|
onSelect && onSelect(nav);
|
|
86
|
-
|
|
87
50
|
if (selectedKey !== nav.key) {
|
|
88
51
|
onChange && onChange(nav);
|
|
89
52
|
setSelectedKey(nav.key);
|
|
90
53
|
}
|
|
91
54
|
};
|
|
92
|
-
|
|
93
55
|
(0, _react.useEffect)(function () {
|
|
94
56
|
setSelectedKey(props.selectedKey || (0, _lodash.get)(navs, '0.key'));
|
|
95
57
|
}, [navs, props.selectedKey]);
|
|
96
|
-
return React.createElement(Navs, props, navs.map(function (nav) {
|
|
97
|
-
return React.createElement(NavItem, {
|
|
58
|
+
return /*#__PURE__*/React.createElement(Navs, props, navs.map(function (nav) {
|
|
59
|
+
return /*#__PURE__*/React.createElement(NavItem, {
|
|
98
60
|
key: nav.key,
|
|
99
61
|
theme: theme,
|
|
100
62
|
className: (0, _classnames["default"])({
|
|
@@ -103,7 +65,7 @@ var HeaderNavs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
103
65
|
onClick: function onClick() {
|
|
104
66
|
return onClickNav(nav);
|
|
105
67
|
}
|
|
106
|
-
}, React.createElement("a", {
|
|
68
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
107
69
|
href: nav.key,
|
|
108
70
|
onClick: function onClick(evt) {
|
|
109
71
|
return evt.preventDefault();
|
|
@@ -111,6 +73,4 @@ var HeaderNavs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
111
73
|
}, nav.name));
|
|
112
74
|
}));
|
|
113
75
|
});
|
|
114
|
-
exports
|
|
115
|
-
var _default = HeaderNavs;
|
|
116
|
-
exports["default"] = _default;
|
|
76
|
+
var _default = exports["default"] = HeaderNavs;
|
package/lib/Layout/HeaderTabs.js
CHANGED
|
@@ -1,83 +1,38 @@
|
|
|
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"] = exports.HeaderTabs = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = require("react");
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _lodash = require("lodash");
|
|
17
|
-
|
|
18
12
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache() { if (typeof WeakMap
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
function _templateObject3() {
|
|
43
|
-
var data = _taggedTemplateLiteral(["\n position: relative;\n margin: 0;\n padding: 0 20px 0 10px;\n cursor: pointer;\n display: inline-block;\n line-height: ", ";\n /* transition: background-color .5; */\n width: 130px;\n color: rgba(255,255,255,.6);\n\n .tnt-icon[type=close] {\n display: none;\n position: absolute;\n right: 0;\n top: 0;\n font-size: 10px;\n padding: 0 10px;\n cursor: pointer;\n z-index: 1;\n }\n\n &:not(:last-child):after {\n position: absolute;\n content: \"\";\n right: 0;\n top: 6px;\n height: 24px;\n width: 1px;\n // opacity: .5;\n // background: #fff;\n background: #E1E6EE;\n opacity: .5;\n // .tnt-themeS1 & {\n // background: #E1E6EE;\n // opacity: 1;\n // }\n }\n\n &.active,\n &.activeTabPreSibling {\n &:after {\n display: none;\n }\n }\n\n a {\n font-size: 14px;\n color: ", ";//rgba(255,255,255,.6);\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transition: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n line-height: 36px;\n width: 100%;\n // &:hover {\n // color: rgba(255,255,255,.8);\n // }\n // .tnt-themeS1 & {\n // color: ", ";\n // }\n }\n\n &:hover,\n &.active {\n .tnt-icon[type=close] {\n display: unset;\n color: #455064;\n // .tnt-themeS1 & {\n // color: #455064;\n // }\n }\n }\n\n &.active {\n background: #F1F2F5;\n border-radius: 2px 2px 0 0;\n color: ", ";\n font-weight: 600;\n\n a {\n color: ", ";\n }\n }\n"]);
|
|
44
|
-
|
|
45
|
-
_templateObject3 = function _templateObject3() {
|
|
46
|
-
return data;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return data;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _templateObject2() {
|
|
53
|
-
var data = _taggedTemplateLiteral(["\n margin: 14px 0 0;\n padding: 0;\n list-style: none;\n text-align: left;\n height: 36px;\n line-height: 36px;\n flex: 1;\n white-space: nowrap;\n padding-right: 40px;\n transition: transform 0.25s linear;\n position: absolute;\n"]);
|
|
54
|
-
|
|
55
|
-
_templateObject2 = function _templateObject2() {
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _templateObject() {
|
|
63
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n margin-right: 12px;\n margin-left: 4px;\n\n .tnt-layout-header-tabs-arrows {\n position: absolute;\n right: 0;\n bottom: 0;\n font-size: 16px;\n line-height: 36px;\n height: 36px;\n background: #fff !important;\n color: rgba(255,255,255,.8) !important;\n .tnt-icon {\n cursor: pointer;\n color: rgba(139,145,158,1);\n &[disabled] {\n color: rgba(139, 145, 158, .5);\n pointer-events: none;\n cursor: not-allowed;\n }\n }\n // background: #191D29;\n // .tnt-icon {\n // cursor: pointer;\n // &[disabled] {\n // color: rgba(139, 145, 158, .5);\n // pointer-events: none;\n // cursor: not-allowed;\n // }\n // }\n // .tnt-themeS1 & {\n // background: #fff;\n // .tnt-icon {\n // color: rgba(139,145,158,1);\n // }\n // }\n // \u591A\u7B7E\u9875\u7684\u7BAD\u5934\u6837\u5F0F\n // .tnt-themeS3 & {\n // background: ", "; //#1D4295;\n // .tnt-icon {\n // color: rgba(255, 255, 255, .5);\n // &[disabled] {\n // color: rgba(139, 145, 158, .5);\n // pointer-events: none;\n // cursor: not-allowed;\n // }\n // }\n // }\n }\n"]);
|
|
64
|
-
|
|
65
|
-
_templateObject = function _templateObject() {
|
|
66
|
-
return data;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
73
|
-
|
|
74
|
-
var TabsContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
13
|
+
var _excluded = ["theme", "className", "tabs", "onTabChange", "onTabSelect", "onTabClose", "appListVisible", "orgListVisible", "orgAppListVisible", "language"];
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
|
+
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; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); }
|
|
22
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
23
|
+
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."); }
|
|
24
|
+
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; } }
|
|
25
|
+
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; }
|
|
26
|
+
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; } }
|
|
27
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
28
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
29
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
30
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
31
|
+
var TabsContainer = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n margin-right: 12px;\n margin-left: 4px;\n\n .tnt-layout-header-tabs-arrows {\n position: absolute;\n right: 0;\n bottom: 0;\n font-size: 16px;\n line-height: 36px;\n height: 36px;\n background: #fff !important;\n color: rgba(255,255,255,.8) !important;\n .tnt-icon {\n cursor: pointer;\n color: rgba(139,145,158,1);\n &[disabled] {\n color: rgba(139, 145, 158, .5);\n pointer-events: none;\n cursor: not-allowed;\n }\n }\n // background: #191D29;\n // .tnt-icon {\n // cursor: pointer;\n // &[disabled] {\n // color: rgba(139, 145, 158, .5);\n // pointer-events: none;\n // cursor: not-allowed;\n // }\n // }\n // .tnt-themeS1 & {\n // background: #fff;\n // .tnt-icon {\n // color: rgba(139,145,158,1);\n // }\n // }\n // \u591A\u7B7E\u9875\u7684\u7BAD\u5934\u6837\u5F0F\n // .tnt-themeS3 & {\n // background: ", "; //#1D4295;\n // .tnt-icon {\n // color: rgba(255, 255, 255, .5);\n // &[disabled] {\n // color: rgba(139, 145, 158, .5);\n // pointer-events: none;\n // cursor: not-allowed;\n // }\n // }\n // }\n }\n"])), function (props) {
|
|
75
32
|
return "".concat(props.theme.blueBgColor);
|
|
76
33
|
});
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
var TabItem = _styledComponents["default"].li(_templateObject3(), function (props) {
|
|
34
|
+
var Tabs = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 14px 0 0;\n padding: 0;\n list-style: none;\n text-align: left;\n height: 36px;\n line-height: 36px;\n flex: 1;\n white-space: nowrap;\n padding-right: 40px;\n transition: transform 0.25s linear;\n position: absolute;\n"])));
|
|
35
|
+
var TabItem = _styledComponents["default"].li(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n margin: 0;\n padding: 0 20px 0 10px;\n cursor: pointer;\n display: inline-block;\n line-height: ", ";\n /* transition: background-color .5; */\n width: 130px;\n color: rgba(255,255,255,.6);\n\n .tnt-icon[type=close] {\n display: none;\n position: absolute;\n right: 0;\n top: 0;\n font-size: 10px;\n padding: 0 10px;\n cursor: pointer;\n z-index: 1;\n }\n\n &:not(:last-child):after {\n position: absolute;\n content: \"\";\n right: 0;\n top: 6px;\n height: 24px;\n width: 1px;\n // opacity: .5;\n // background: #fff;\n background: #E1E6EE;\n opacity: .5;\n // .tnt-themeS1 & {\n // background: #E1E6EE;\n // opacity: 1;\n // }\n }\n\n &.active,\n &.activeTabPreSibling {\n &:after {\n display: none;\n }\n }\n\n a {\n font-size: 14px;\n color: ", ";//rgba(255,255,255,.6);\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transition: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n line-height: 36px;\n width: 100%;\n // &:hover {\n // color: rgba(255,255,255,.8);\n // }\n // .tnt-themeS1 & {\n // color: ", ";\n // }\n }\n\n &:hover,\n &.active {\n .tnt-icon[type=close] {\n display: unset;\n color: #455064;\n // .tnt-themeS1 & {\n // color: #455064;\n // }\n }\n }\n\n &.active {\n background: #F1F2F5;\n border-radius: 2px 2px 0 0;\n color: ", ";\n font-weight: 600;\n\n a {\n color: ", ";\n }\n }\n"])), function (props) {
|
|
81
36
|
return props.theme.size === 'large' ? '46px' : '36px';
|
|
82
37
|
}, function (props) {
|
|
83
38
|
return props.theme.headerActionsColor;
|
|
@@ -88,59 +43,49 @@ var TabItem = _styledComponents["default"].li(_templateObject3(), function (prop
|
|
|
88
43
|
}, function (props) {
|
|
89
44
|
return props.theme.primaryTextColor;
|
|
90
45
|
});
|
|
91
|
-
|
|
92
|
-
var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
46
|
+
var HeaderTabs = exports.HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
93
47
|
var theme = _ref.theme,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
48
|
+
className = _ref.className,
|
|
49
|
+
_ref$tabs = _ref.tabs,
|
|
50
|
+
tabs = _ref$tabs === void 0 ? [] : _ref$tabs,
|
|
51
|
+
onTabChange = _ref.onTabChange,
|
|
52
|
+
onTabSelect = _ref.onTabSelect,
|
|
53
|
+
onTabClose = _ref.onTabClose,
|
|
54
|
+
appListVisible = _ref.appListVisible,
|
|
55
|
+
orgListVisible = _ref.orgListVisible,
|
|
56
|
+
orgAppListVisible = _ref.orgAppListVisible,
|
|
57
|
+
language = _ref.language,
|
|
58
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
106
59
|
var _useState = (0, _react.useState)(props.selectedKey || (0, _lodash.get)(tabs, '0.key')),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
selectedKey = _useState2[0],
|
|
62
|
+
setSelectedKey = _useState2[1];
|
|
111
63
|
var _useState3 = (0, _react.useState)(tabs || []),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
64
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
+
tabItems = _useState4[0],
|
|
66
|
+
setTabItems = _useState4[1];
|
|
116
67
|
var _useState5 = (0, _react.useState)(false),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
68
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
|
+
arrowVisible = _useState6[0],
|
|
70
|
+
setArrowVisible = _useState6[1];
|
|
121
71
|
var _useState7 = (0, _react.useState)({
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
72
|
+
start: true,
|
|
73
|
+
end: true
|
|
74
|
+
}),
|
|
75
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
76
|
+
tabsPositionFlags = _useState8[0],
|
|
77
|
+
setTabsPositionFlags = _useState8[1];
|
|
129
78
|
var tabsRef = (0, _react.useRef)();
|
|
130
|
-
|
|
131
79
|
var getTabsDom = function getTabsDom() {
|
|
132
80
|
return tabsRef.current;
|
|
133
81
|
};
|
|
134
|
-
|
|
135
82
|
var onTabClick = function onTabClick(tab, index) {
|
|
136
83
|
setSelectedKey(tab.key);
|
|
137
84
|
onTabSelect == null ? void 0 : onTabSelect(tab);
|
|
138
|
-
|
|
139
85
|
if (selectedKey !== tab.key) {
|
|
140
86
|
onTabChange == null ? void 0 : onTabChange(tab);
|
|
141
87
|
}
|
|
142
88
|
};
|
|
143
|
-
|
|
144
89
|
var closeTabHandle = function closeTabHandle(tab, index, evt) {
|
|
145
90
|
evt.stopPropagation();
|
|
146
91
|
var newTabItems = tabItems.filter(function (_ref2) {
|
|
@@ -149,20 +94,16 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
149
94
|
});
|
|
150
95
|
var newSelectedKey = selectedKey;
|
|
151
96
|
setTabItems(newTabItems);
|
|
152
|
-
|
|
153
97
|
if (tab.key === selectedKey) {
|
|
154
98
|
var _newTabItems$, _newTabItems;
|
|
155
|
-
|
|
156
99
|
newSelectedKey = index === 0 ? (_newTabItems$ = newTabItems[0]) == null ? void 0 : _newTabItems$.key : (_newTabItems = newTabItems[index - 1]) == null ? void 0 : _newTabItems.key;
|
|
157
100
|
setSelectedKey(newSelectedKey);
|
|
158
101
|
}
|
|
159
|
-
|
|
160
102
|
onTabClose == null ? void 0 : onTabClose(tab, newTabItems, newTabItems.find(function (_ref3) {
|
|
161
103
|
var key = _ref3.key;
|
|
162
104
|
return key === newSelectedKey;
|
|
163
105
|
}));
|
|
164
106
|
};
|
|
165
|
-
|
|
166
107
|
var onMoveToLeft = function onMoveToLeft() {
|
|
167
108
|
var tabsDom = getTabsDom();
|
|
168
109
|
var parentBBox = tabsDom.parentNode.getBoundingClientRect();
|
|
@@ -178,7 +119,6 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
178
119
|
end: Math.abs(newX) < width - parentWidth
|
|
179
120
|
});
|
|
180
121
|
};
|
|
181
|
-
|
|
182
122
|
var onMoveToRight = function onMoveToRight() {
|
|
183
123
|
var tabsDom = getTabsDom();
|
|
184
124
|
var parentBBox = tabsDom.parentNode.getBoundingClientRect();
|
|
@@ -194,7 +134,6 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
194
134
|
end: Math.abs(newX) < width - parentWidth
|
|
195
135
|
});
|
|
196
136
|
};
|
|
197
|
-
|
|
198
137
|
var translateTabsDom = function translateTabsDom(tabs, selectedKey) {
|
|
199
138
|
if (!selectedKey) return;
|
|
200
139
|
var index = tabs.indexOf(tabs.find(function (_ref4) {
|
|
@@ -212,19 +151,15 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
212
151
|
var parentWidth = parentBBox.width - 36;
|
|
213
152
|
var width = tabItems.length * 130;
|
|
214
153
|
var tailX = x + parentWidth; //当前滑动窗口尾部坐标
|
|
215
|
-
|
|
216
154
|
var newX = -x;
|
|
217
|
-
|
|
218
155
|
if (bbox.left < x) {
|
|
219
156
|
newX = -bbox.left;
|
|
220
157
|
} else if (bbox.right >= tailX) {
|
|
221
158
|
newX = parentWidth - bbox.right;
|
|
222
159
|
}
|
|
223
|
-
|
|
224
160
|
if (newX + width < parentWidth) {
|
|
225
161
|
newX = -(width - parentWidth);
|
|
226
162
|
}
|
|
227
|
-
|
|
228
163
|
newX = Math.min(0, newX);
|
|
229
164
|
tabsDom.style.transform = "translateX(".concat(newX, "px)");
|
|
230
165
|
setTabsPositionFlags({
|
|
@@ -232,7 +167,6 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
232
167
|
end: Math.abs(newX) < width - parentWidth
|
|
233
168
|
});
|
|
234
169
|
};
|
|
235
|
-
|
|
236
170
|
(0, _react.useEffect)(function () {
|
|
237
171
|
setSelectedKey(props.selectedKey || (0, _lodash.get)(tabs, '0.key'));
|
|
238
172
|
setTabItems(tabs);
|
|
@@ -245,15 +179,14 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
245
179
|
(0, _react.useEffect)(function () {
|
|
246
180
|
translateTabsDom(tabItems, selectedKey);
|
|
247
181
|
}, [tabItems, selectedKey, appListVisible, orgListVisible, orgAppListVisible]);
|
|
248
|
-
return React.createElement(TabsContainer, _extends({}, props, {
|
|
182
|
+
return /*#__PURE__*/React.createElement(TabsContainer, _extends({}, props, {
|
|
249
183
|
className: (0, _classnames["default"])('tnt-layout-header-tabs', _defineProperty({}, className, className))
|
|
250
|
-
}), React.createElement(Tabs, {
|
|
184
|
+
}), /*#__PURE__*/React.createElement(Tabs, {
|
|
251
185
|
className: "tnt-layout-header-tabs-content",
|
|
252
186
|
ref: tabsRef
|
|
253
187
|
}, tabItems.map(function (tab, index) {
|
|
254
188
|
var _tabItems;
|
|
255
|
-
|
|
256
|
-
return React.createElement(TabItem, {
|
|
189
|
+
return /*#__PURE__*/React.createElement(TabItem, {
|
|
257
190
|
key: tab.key,
|
|
258
191
|
theme: theme,
|
|
259
192
|
className: (0, _classnames["default"])({
|
|
@@ -263,7 +196,7 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
263
196
|
onClick: function onClick() {
|
|
264
197
|
return onTabClick(tab, index);
|
|
265
198
|
}
|
|
266
|
-
}, React.createElement("a", {
|
|
199
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
267
200
|
href: tab.key,
|
|
268
201
|
onClick: function onClick(evt) {
|
|
269
202
|
return evt.preventDefault();
|
|
@@ -271,22 +204,20 @@ var HeaderTabs = (0, _styledComponents.withTheme)(function (_ref) {
|
|
|
271
204
|
}, {
|
|
272
205
|
cn: tab.name,
|
|
273
206
|
en: tab.enName || tab.name
|
|
274
|
-
}[language || 'cn']), tab.closable !== false && tabItems.length > 1 && React.createElement(_Icon["default"], {
|
|
207
|
+
}[language || 'cn']), tab.closable !== false && tabItems.length > 1 && /*#__PURE__*/React.createElement(_Icon["default"], {
|
|
275
208
|
type: "close",
|
|
276
209
|
onClick: closeTabHandle.bind(null, tab, index)
|
|
277
210
|
}));
|
|
278
|
-
})), arrowVisible && React.createElement("div", {
|
|
211
|
+
})), arrowVisible && /*#__PURE__*/React.createElement("div", {
|
|
279
212
|
className: "tnt-layout-header-tabs-arrows"
|
|
280
|
-
}, React.createElement(_Icon["default"], {
|
|
213
|
+
}, /*#__PURE__*/React.createElement(_Icon["default"], {
|
|
281
214
|
type: "left",
|
|
282
215
|
onClick: onMoveToLeft,
|
|
283
216
|
disabled: !tabsPositionFlags.start
|
|
284
|
-
}), React.createElement(_Icon["default"], {
|
|
217
|
+
}), /*#__PURE__*/React.createElement(_Icon["default"], {
|
|
285
218
|
type: "right",
|
|
286
219
|
onClick: onMoveToRight,
|
|
287
220
|
disabled: !tabsPositionFlags.end
|
|
288
221
|
})));
|
|
289
222
|
});
|
|
290
|
-
exports
|
|
291
|
-
var _default = HeaderTabs;
|
|
292
|
-
exports["default"] = _default;
|
|
223
|
+
var _default = exports["default"] = HeaderTabs;
|
package/lib/Layout/Iconfont.js
CHANGED
|
@@ -4,13 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return React.createElement(_Icon["default"], props);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
exports["default"] = _default;
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
var _default = exports["default"] = function _default(props) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(_Icon["default"], props);
|
|
11
|
+
};
|