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/Handle/index.js
CHANGED
|
@@ -4,34 +4,28 @@ import "antd/lib/menu/style";
|
|
|
4
4
|
import _Menu from "antd/lib/menu";
|
|
5
5
|
import "antd/lib/divider/style";
|
|
6
6
|
import _Divider from "antd/lib/divider";
|
|
7
|
-
|
|
8
|
-
function _extends() { _extends = Object.assign
|
|
9
|
-
|
|
7
|
+
var _excluded = ["children", "type", "num", "lang", "divider", "lessOneMoreFit"];
|
|
8
|
+
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); }
|
|
10
9
|
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; }
|
|
11
|
-
|
|
12
10
|
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; }
|
|
13
|
-
|
|
14
11
|
import { Fragment } from 'react';
|
|
15
12
|
import Icon from '../Icon';
|
|
16
13
|
import './index.less';
|
|
17
14
|
var clsPrefix = 'tnt-more-menus';
|
|
18
15
|
export default (function (props) {
|
|
19
16
|
var _lastChildPart2, _lastChildPart3;
|
|
20
|
-
|
|
21
17
|
var _ref = props || {},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
_ref$children = _ref.children,
|
|
19
|
+
children = _ref$children === void 0 ? [] : _ref$children,
|
|
20
|
+
type = _ref.type,
|
|
21
|
+
_ref$num = _ref.num,
|
|
22
|
+
num = _ref$num === void 0 ? 3 : _ref$num,
|
|
23
|
+
lang = _ref.lang,
|
|
24
|
+
_ref$divider = _ref.divider,
|
|
25
|
+
divider = _ref$divider === void 0 ? true : _ref$divider,
|
|
26
|
+
lessOneMoreFit = _ref.lessOneMoreFit,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
28
|
var newChildren = [];
|
|
34
|
-
|
|
35
29
|
if (Array.isArray(children)) {
|
|
36
30
|
newChildren = (children == null ? void 0 : children.filter(function (item) {
|
|
37
31
|
return !!item;
|
|
@@ -39,54 +33,50 @@ export default (function (props) {
|
|
|
39
33
|
} else if (children) {
|
|
40
34
|
newChildren.push(children);
|
|
41
35
|
}
|
|
42
|
-
|
|
43
36
|
var preChildPart = newChildren,
|
|
44
|
-
|
|
37
|
+
lastChildPart = null;
|
|
45
38
|
|
|
39
|
+
// 只有1个时不适配
|
|
46
40
|
if (lessOneMoreFit && newChildren.length - num === 1) {
|
|
47
41
|
preChildPart = newChildren;
|
|
48
42
|
} else if (newChildren && num && !isNaN(num) && newChildren.length > num) {
|
|
49
43
|
preChildPart = newChildren.slice(0, num);
|
|
50
44
|
lastChildPart = newChildren.slice(num);
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
;
|
|
54
|
-
|
|
55
47
|
if (divider && preChildPart) {
|
|
56
48
|
var preChildLen = preChildPart.length;
|
|
57
49
|
preChildPart = preChildPart.map(function (dom, i) {
|
|
58
50
|
var _lastChildPart;
|
|
59
|
-
|
|
60
|
-
return React.createElement(Fragment, {
|
|
51
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
61
52
|
key: i
|
|
62
|
-
}, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart)
|
|
63
|
-
) && React.createElement(_Divider, {
|
|
53
|
+
}, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) != null && _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider
|
|
54
|
+
) && /*#__PURE__*/React.createElement(_Divider, {
|
|
64
55
|
type: "vertical"
|
|
65
56
|
}));
|
|
66
57
|
});
|
|
67
58
|
}
|
|
68
|
-
|
|
69
|
-
var menu = React.createElement(_Menu, {
|
|
59
|
+
var menu = /*#__PURE__*/React.createElement(_Menu, {
|
|
70
60
|
className: "org-pop-opera-btn"
|
|
71
61
|
}, (_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.map(function (child, i) {
|
|
72
|
-
return React.createElement(_Menu.Item, {
|
|
62
|
+
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
73
63
|
key: i
|
|
74
64
|
}, child);
|
|
75
65
|
}));
|
|
76
|
-
return React.createElement("div", _extends({
|
|
66
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
77
67
|
onClick: function onClick(e) {
|
|
78
68
|
e.stopPropagation();
|
|
79
69
|
}
|
|
80
|
-
}, rest), preChildPart, ((_lastChildPart3 = lastChildPart) == null ? void 0 : _lastChildPart3.length) > 0 && React.createElement(_Dropdown, {
|
|
70
|
+
}, rest), preChildPart, ((_lastChildPart3 = lastChildPart) == null ? void 0 : _lastChildPart3.length) > 0 && /*#__PURE__*/React.createElement(_Dropdown, {
|
|
81
71
|
overlay: menu,
|
|
82
72
|
arrow: true
|
|
83
|
-
}, type === 'icon' ? React.createElement(Icon, {
|
|
73
|
+
}, type === 'icon' ? /*#__PURE__*/React.createElement(Icon, {
|
|
84
74
|
type: "more"
|
|
85
|
-
}) : React.createElement("a", {
|
|
75
|
+
}) : /*#__PURE__*/React.createElement("a", {
|
|
86
76
|
className: "ant-dropdown-more"
|
|
87
|
-
}, lang === 'en' ? 'More' : '更多', React.createElement("i", {
|
|
77
|
+
}, lang === 'en' ? 'More' : '更多', /*#__PURE__*/React.createElement("i", {
|
|
88
78
|
className: "".concat(clsPrefix, "-dropdown-icon")
|
|
89
|
-
}, React.createElement(Icon, {
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
90
80
|
type: "down"
|
|
91
81
|
})))));
|
|
92
82
|
});
|