tntd 1.4.19 → 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.
Files changed (170) hide show
  1. package/components/Layout/Avatar.js +4 -4
  2. package/components/Layout/EnterpriseLayout/Avatar.js +10 -7
  3. package/components/Layout/EnterpriseLayout/Language.js +5 -3
  4. package/components/Layout/EnterpriseLayout/Theme.js +6 -7
  5. package/components/Layout/EnterpriseLayout/index.js +1 -1
  6. package/components/Layout/HeaderActions.js +13 -10
  7. package/components/Layout/HeaderTabs.js +13 -14
  8. package/components/Layout/Layout.js +2 -0
  9. package/components/Layout/index.js +2 -1
  10. package/components/Layout/storage.js +12 -2
  11. package/components/Page/index.js +2 -2
  12. package/components/locale.js +7 -2
  13. package/dist/1.tntd.js +1 -12
  14. package/dist/stats.json +28424 -27998
  15. package/dist/tntd.css +1 -1
  16. package/dist/tntd.js +13 -7
  17. package/es/ArrayInput/icon.js +5 -5
  18. package/es/ArrayInput/index.js +76 -108
  19. package/es/AuthContext.js +1 -1
  20. package/es/Columns/index.js +31 -38
  21. package/es/DevelopmentLogin/LoginModal.js +32 -45
  22. package/es/DevelopmentLogin/index.js +13 -17
  23. package/es/Ellipsis/Svg/CopySVG.js +13 -13
  24. package/es/Ellipsis/Svg/TickSVG.js +8 -8
  25. package/es/Ellipsis/index.js +58 -69
  26. package/es/Handle/index.js +25 -35
  27. package/es/Icon/fonts/iconfont.js +7 -12
  28. package/es/Icon/index.js +10 -13
  29. package/es/Img/Contain.js +24 -29
  30. package/es/Img/Cover.js +40 -54
  31. package/es/Img/index.js +36 -45
  32. package/es/Layout/ActionsContext.js +3 -2
  33. package/es/Layout/AppList.js +37 -92
  34. package/es/Layout/Application.js +26 -72
  35. package/es/Layout/Avatar.js +32 -69
  36. package/es/Layout/CompatibleLanguage.js +39 -94
  37. package/es/Layout/EnterpriseLayout/Avatar.js +49 -79
  38. package/es/Layout/EnterpriseLayout/Language.js +19 -34
  39. package/es/Layout/EnterpriseLayout/Theme.js +23 -37
  40. package/es/Layout/EnterpriseLayout/index.js +14 -16
  41. package/es/Layout/GlobalNavigation/NavigationPopup.js +59 -170
  42. package/es/Layout/GlobalNavigation/index.js +20 -54
  43. package/es/Layout/Header.js +25 -46
  44. package/es/Layout/HeaderActions.js +52 -63
  45. package/es/Layout/HeaderNavs.js +20 -47
  46. package/es/Layout/HeaderTabs.js +61 -115
  47. package/es/Layout/Iconfont.js +1 -1
  48. package/es/Layout/Language.js +14 -32
  49. package/es/Layout/Layout.js +88 -108
  50. package/es/Layout/Logo.js +16 -32
  51. package/es/Layout/OrgAppList.js +62 -107
  52. package/es/Layout/SideMenu.js +63 -124
  53. package/es/Layout/Theme.js +23 -61
  54. package/es/Layout/index.js +29 -36
  55. package/es/Layout/paaslayout/CompactSideMenu.js +35 -74
  56. package/es/Layout/paaslayout/Header.js +22 -45
  57. package/es/Layout/paaslayout/Logo.js +3 -13
  58. package/es/Layout/paaslayout/SideMenu.js +39 -78
  59. package/es/Layout/paaslayout/index.js +75 -102
  60. package/es/Layout/storage.js +26 -9
  61. package/es/LoadingButton/index.js +15 -24
  62. package/es/Modal/index.js +38 -46
  63. package/es/Page/Box.js +34 -41
  64. package/es/Page/index.js +54 -68
  65. package/es/Page/utils.js +0 -5
  66. package/es/QueryForm/Field/Checkbox.js +5 -9
  67. package/es/QueryForm/Field/Select.js +31 -41
  68. package/es/QueryForm/Field/SelectInput.js +26 -41
  69. package/es/QueryForm/Field/fieldsMap.js +0 -1
  70. package/es/QueryForm/Field/index.js +41 -71
  71. package/es/QueryForm/createActions.js +6 -7
  72. package/es/QueryForm/index.js +76 -135
  73. package/es/QueryListScene/List.js +74 -128
  74. package/es/QueryListScene/QueryForm.js +46 -81
  75. package/es/QueryListScene/QueryListScene.js +25 -40
  76. package/es/QueryListScene/Title.js +3 -3
  77. package/es/QueryListScene/Toolbar.js +11 -12
  78. package/es/Select/DropDownWrap.js +29 -50
  79. package/es/Select/index.js +135 -231
  80. package/es/Table/ResizableTable/index.js +26 -40
  81. package/es/Table/index.js +18 -16
  82. package/es/Title/index.js +21 -23
  83. package/es/locale.js +9 -7
  84. package/es/utils/checkAuth.js +3 -5
  85. package/es/utils/findMenuInfoByPath.js +0 -4
  86. package/es/utils/index.js +12 -23
  87. package/lib/ArrayInput/icon.js +6 -6
  88. package/lib/ArrayInput/index.js +78 -127
  89. package/lib/AuthContext.js +1 -4
  90. package/lib/Columns/index.js +31 -47
  91. package/lib/DevelopmentLogin/LoginModal.js +32 -58
  92. package/lib/DevelopmentLogin/index.js +16 -27
  93. package/lib/Ellipsis/Svg/CopySVG.js +13 -15
  94. package/lib/Ellipsis/Svg/TickSVG.js +8 -10
  95. package/lib/Ellipsis/index.js +57 -80
  96. package/lib/Handle/index.js +25 -47
  97. package/lib/Icon/fonts/iconfont.js +7 -12
  98. package/lib/Icon/index.js +11 -20
  99. package/lib/Img/Contain.js +24 -34
  100. package/lib/Img/Cover.js +42 -65
  101. package/lib/Img/index.js +36 -51
  102. package/lib/Layout/ActionsContext.js +1 -4
  103. package/lib/Layout/AppList.js +40 -118
  104. package/lib/Layout/Application.js +26 -86
  105. package/lib/Layout/Avatar.js +35 -89
  106. package/lib/Layout/CompatibleLanguage.js +39 -110
  107. package/lib/Layout/EnterpriseLayout/Avatar.js +52 -101
  108. package/lib/Layout/EnterpriseLayout/Language.js +21 -49
  109. package/lib/Layout/EnterpriseLayout/Theme.js +22 -46
  110. package/lib/Layout/EnterpriseLayout/index.js +14 -23
  111. package/lib/Layout/GlobalNavigation/NavigationPopup.js +59 -186
  112. package/lib/Layout/GlobalNavigation/index.js +23 -74
  113. package/lib/Layout/Header.js +28 -63
  114. package/lib/Layout/HeaderActions.js +48 -74
  115. package/lib/Layout/HeaderNavs.js +23 -61
  116. package/lib/Layout/HeaderTabs.js +58 -126
  117. package/lib/Layout/Iconfont.js +1 -5
  118. package/lib/Layout/Language.js +17 -48
  119. package/lib/Layout/Layout.js +90 -128
  120. package/lib/Layout/Logo.js +19 -43
  121. package/lib/Layout/OrgAppList.js +64 -127
  122. package/lib/Layout/SideMenu.js +65 -143
  123. package/lib/Layout/Theme.js +23 -73
  124. package/lib/Layout/createActions.js +0 -5
  125. package/lib/Layout/images/index.js +0 -28
  126. package/lib/Layout/index.js +33 -57
  127. package/lib/Layout/paaslayout/CompactSideMenu.js +35 -84
  128. package/lib/Layout/paaslayout/Header.js +22 -55
  129. package/lib/Layout/paaslayout/Logo.js +3 -19
  130. package/lib/Layout/paaslayout/SideMenu.js +39 -87
  131. package/lib/Layout/paaslayout/index.js +77 -122
  132. package/lib/Layout/storage.js +29 -35
  133. package/lib/LoadingButton/index.js +15 -29
  134. package/lib/Modal/index.js +38 -53
  135. package/lib/Page/Box.js +34 -45
  136. package/lib/Page/index.js +54 -78
  137. package/lib/Page/utils.js +1 -9
  138. package/lib/QueryForm/Field/Checkbox.js +5 -13
  139. package/lib/QueryForm/Field/Select.js +33 -53
  140. package/lib/QueryForm/Field/SelectInput.js +28 -56
  141. package/lib/QueryForm/Field/fieldsMap.js +1 -15
  142. package/lib/QueryForm/Field/index.js +43 -81
  143. package/lib/QueryForm/createActions.js +6 -12
  144. package/lib/QueryForm/index.js +78 -157
  145. package/lib/QueryForm/useForm.js +0 -5
  146. package/lib/QueryListScene/List.js +76 -140
  147. package/lib/QueryListScene/QueryForm.js +46 -86
  148. package/lib/QueryListScene/QueryListScene.js +25 -46
  149. package/lib/QueryListScene/Title.js +3 -7
  150. package/lib/QueryListScene/Toolbar.js +11 -16
  151. package/lib/QueryListScene/createActions.js +0 -5
  152. package/lib/QueryListScene/index.js +0 -10
  153. package/lib/QueryListScene/useActions.js +0 -5
  154. package/lib/Select/DropDownWrap.js +31 -56
  155. package/lib/Select/index.js +135 -241
  156. package/lib/Table/ResizableTable/index.js +26 -48
  157. package/lib/Table/index.js +17 -28
  158. package/lib/Title/index.js +21 -28
  159. package/lib/index.js +35 -56
  160. package/lib/locale.js +11 -12
  161. package/lib/utils/checkAuth.js +4 -9
  162. package/lib/utils/findMenuInfoByPath.js +1 -8
  163. package/lib/utils/index.js +15 -42
  164. package/package.json +2 -2
  165. package/es/Layout/checkAuth.js +0 -29
  166. package/es/Layout/utils.js +0 -136
  167. package/lib/Layout/EnterpriseLayout/Header.js +0 -113
  168. package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
  169. package/lib/Layout/checkAuth.js +0 -39
  170. package/lib/Layout/utils.js +0 -166
@@ -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 || 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); }
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
- _ref$children = _ref.children,
23
- children = _ref$children === void 0 ? [] : _ref$children,
24
- type = _ref.type,
25
- _ref$num = _ref.num,
26
- num = _ref$num === void 0 ? 3 : _ref$num,
27
- lang = _ref.lang,
28
- _ref$divider = _ref.divider,
29
- divider = _ref$divider === void 0 ? true : _ref$divider,
30
- lessOneMoreFit = _ref.lessOneMoreFit,
31
- rest = _objectWithoutProperties(_ref, ["children", "type", "num", "lang", "divider", "lessOneMoreFit"]);
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
- lastChildPart = null; // 只有1个时不适配
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) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider
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
  });