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.
Files changed (157) hide show
  1. package/components/Ellipsis/index.js +47 -15
  2. package/components/QueryListScene/QueryForm.js +4 -4
  3. package/components/QueryListScene/createActions.js +4 -4
  4. package/dist/1.tntd.js +1 -1
  5. package/dist/stats.json +24089 -23289
  6. package/dist/tntd.css +1 -1
  7. package/dist/tntd.js +7 -10
  8. package/es/ArrayInput/icon.js +5 -5
  9. package/es/ArrayInput/index.js +79 -111
  10. package/es/AuthContext.js +1 -1
  11. package/es/Columns/index.js +33 -40
  12. package/es/DevelopmentLogin/LoginModal.js +33 -46
  13. package/es/DevelopmentLogin/index.js +14 -18
  14. package/es/Ellipsis/Svg/CopySVG.js +13 -13
  15. package/es/Ellipsis/Svg/TickSVG.js +8 -8
  16. package/es/Ellipsis/index.js +100 -79
  17. package/es/Handle/index.js +46 -64
  18. package/es/Icon/fonts/iconfont.js +7 -12
  19. package/es/Icon/index.js +12 -15
  20. package/es/Img/Contain.js +26 -31
  21. package/es/Img/Cover.js +43 -57
  22. package/es/Img/index.js +39 -48
  23. package/es/Layout/ActionsContext.js +3 -2
  24. package/es/Layout/AppList.js +39 -94
  25. package/es/Layout/Application.js +28 -74
  26. package/es/Layout/Avatar.js +30 -67
  27. package/es/Layout/CompatibleLanguage.js +41 -96
  28. package/es/Layout/EnterpriseLayout/Avatar.js +39 -77
  29. package/es/Layout/EnterpriseLayout/Language.js +16 -34
  30. package/es/Layout/EnterpriseLayout/Theme.js +18 -36
  31. package/es/Layout/EnterpriseLayout/index.js +14 -16
  32. package/es/Layout/GlobalNavigation/NavigationPopup.js +61 -172
  33. package/es/Layout/GlobalNavigation/index.js +22 -56
  34. package/es/Layout/Header.js +26 -47
  35. package/es/Layout/HeaderActions.js +45 -59
  36. package/es/Layout/HeaderNavs.js +24 -51
  37. package/es/Layout/HeaderTabs.js +53 -106
  38. package/es/Layout/Iconfont.js +1 -1
  39. package/es/Layout/Language.js +16 -34
  40. package/es/Layout/Layout.js +88 -110
  41. package/es/Layout/Logo.js +17 -33
  42. package/es/Layout/OrgAppList.js +64 -109
  43. package/es/Layout/SideMenu.js +67 -128
  44. package/es/Layout/Theme.js +25 -63
  45. package/es/Layout/index.js +28 -37
  46. package/es/Layout/paaslayout/CompactSideMenu.js +37 -76
  47. package/es/Layout/paaslayout/Header.js +23 -46
  48. package/es/Layout/paaslayout/Logo.js +4 -14
  49. package/es/Layout/paaslayout/SideMenu.js +41 -80
  50. package/es/Layout/paaslayout/index.js +77 -104
  51. package/es/Layout/storage.js +10 -9
  52. package/es/LoadingButton/index.js +18 -27
  53. package/es/Modal/index.js +42 -51
  54. package/es/Page/Box.js +36 -43
  55. package/es/Page/index.js +56 -71
  56. package/es/Page/utils.js +0 -5
  57. package/es/QueryForm/Field/Checkbox.js +7 -11
  58. package/es/QueryForm/Field/Select.js +34 -44
  59. package/es/QueryForm/Field/SelectInput.js +31 -46
  60. package/es/QueryForm/Field/fieldsMap.js +0 -1
  61. package/es/QueryForm/Field/index.js +46 -78
  62. package/es/QueryForm/createActions.js +6 -7
  63. package/es/QueryForm/index.js +79 -140
  64. package/es/QueryListScene/List.js +83 -139
  65. package/es/QueryListScene/QueryForm.js +54 -91
  66. package/es/QueryListScene/QueryListScene.js +29 -47
  67. package/es/QueryListScene/Title.js +3 -3
  68. package/es/QueryListScene/Toolbar.js +13 -14
  69. package/es/QueryListScene/createActions.js +4 -4
  70. package/es/Select/DropDownWrap.js +32 -55
  71. package/es/Select/index.js +140 -232
  72. package/es/Table/ResizableTable/index.js +29 -43
  73. package/es/Table/index.js +20 -19
  74. package/es/Title/index.js +23 -25
  75. package/es/locale.js +1 -5
  76. package/es/utils/checkAuth.js +6 -8
  77. package/es/utils/findMenuInfoByPath.js +0 -4
  78. package/es/utils/index.js +17 -27
  79. package/lib/ArrayInput/icon.js +7 -9
  80. package/lib/ArrayInput/index.js +82 -131
  81. package/lib/AuthContext.js +2 -6
  82. package/lib/Columns/index.js +36 -54
  83. package/lib/DevelopmentLogin/LoginModal.js +36 -63
  84. package/lib/DevelopmentLogin/index.js +21 -31
  85. package/lib/Ellipsis/Svg/CopySVG.js +15 -18
  86. package/lib/Ellipsis/Svg/TickSVG.js +10 -13
  87. package/lib/Ellipsis/index.js +105 -93
  88. package/lib/Handle/index.js +51 -87
  89. package/lib/Icon/fonts/iconfont.js +7 -12
  90. package/lib/Icon/iconList.js +1 -2
  91. package/lib/Icon/index.js +16 -26
  92. package/lib/Img/Contain.js +29 -40
  93. package/lib/Img/Cover.js +48 -72
  94. package/lib/Img/index.js +42 -58
  95. package/lib/Layout/ActionsContext.js +1 -5
  96. package/lib/Layout/AppList.js +45 -124
  97. package/lib/Layout/Application.js +31 -92
  98. package/lib/Layout/Avatar.js +36 -91
  99. package/lib/Layout/CompatibleLanguage.js +44 -116
  100. package/lib/Layout/EnterpriseLayout/Avatar.js +45 -105
  101. package/lib/Layout/EnterpriseLayout/Language.js +22 -54
  102. package/lib/Layout/EnterpriseLayout/Theme.js +21 -50
  103. package/lib/Layout/EnterpriseLayout/index.js +17 -27
  104. package/lib/Layout/GlobalNavigation/NavigationPopup.js +64 -192
  105. package/lib/Layout/GlobalNavigation/index.js +28 -80
  106. package/lib/Layout/Header.js +36 -68
  107. package/lib/Layout/HeaderActions.js +51 -81
  108. package/lib/Layout/HeaderNavs.js +30 -70
  109. package/lib/Layout/HeaderTabs.js +58 -127
  110. package/lib/Layout/Iconfont.js +4 -9
  111. package/lib/Layout/Language.js +22 -54
  112. package/lib/Layout/Layout.js +93 -134
  113. package/lib/Layout/Logo.js +26 -47
  114. package/lib/Layout/OrgAppList.js +69 -133
  115. package/lib/Layout/SideMenu.js +72 -151
  116. package/lib/Layout/Theme.js +28 -79
  117. package/lib/Layout/createActions.js +3 -9
  118. package/lib/Layout/images/index.js +5 -36
  119. package/lib/Layout/index.js +35 -63
  120. package/lib/Layout/paaslayout/CompactSideMenu.js +40 -90
  121. package/lib/Layout/paaslayout/Header.js +30 -60
  122. package/lib/Layout/paaslayout/Logo.js +11 -24
  123. package/lib/Layout/paaslayout/SideMenu.js +44 -93
  124. package/lib/Layout/paaslayout/index.js +82 -128
  125. package/lib/Layout/storage.js +26 -68
  126. package/lib/LoadingButton/index.js +21 -36
  127. package/lib/Modal/index.js +45 -62
  128. package/lib/Page/Box.js +38 -50
  129. package/lib/Page/index.js +58 -84
  130. package/lib/Page/utils.js +5 -16
  131. package/lib/QueryForm/Field/Checkbox.js +10 -19
  132. package/lib/QueryForm/Field/Select.js +39 -60
  133. package/lib/QueryForm/Field/SelectInput.js +36 -65
  134. package/lib/QueryForm/Field/fieldsMap.js +6 -23
  135. package/lib/QueryForm/Field/index.js +50 -91
  136. package/lib/QueryForm/createActions.js +9 -16
  137. package/lib/QueryForm/index.js +83 -165
  138. package/lib/QueryForm/useForm.js +1 -6
  139. package/lib/QueryListScene/List.js +89 -153
  140. package/lib/QueryListScene/QueryForm.js +58 -101
  141. package/lib/QueryListScene/QueryListScene.js +31 -56
  142. package/lib/QueryListScene/Title.js +6 -11
  143. package/lib/QueryListScene/Toolbar.js +16 -22
  144. package/lib/QueryListScene/createActions.js +7 -13
  145. package/lib/QueryListScene/index.js +5 -19
  146. package/lib/QueryListScene/useActions.js +1 -6
  147. package/lib/Select/DropDownWrap.js +35 -63
  148. package/lib/Select/index.js +142 -245
  149. package/lib/Table/ResizableTable/index.js +31 -54
  150. package/lib/Table/index.js +21 -34
  151. package/lib/Title/index.js +26 -34
  152. package/lib/index.js +36 -57
  153. package/lib/locale.js +9 -25
  154. package/lib/utils/checkAuth.js +9 -16
  155. package/lib/utils/findMenuInfoByPath.js +3 -12
  156. package/lib/utils/index.js +26 -60
  157. package/package.json +3 -2
@@ -1,27 +1,6 @@
1
- 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); }
2
-
3
- function _templateObject2() {
4
- var data = _taggedTemplateLiteral(["\n flex: 1;\n .isInIframe & {\n display: none;\n }\n"]);
5
-
6
- _templateObject2 = function _templateObject2() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject() {
14
- var data = _taggedTemplateLiteral(["\n position: relative;\n z-index: 201;\n height: ", ";\n display: flex;\n color: rgba(255,255,255,.85);\n background: #fff;\n .hasHeaderTabs & {\n // background: #191D29;\n background: #fff !important;\n box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.18);\n .tnt-layout-header-content {\n display: none;\n }\n }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // }\n\n .isInIframe.noAppList &,\n .isEmptyLayout & {\n display: none;\n }\n .tnt-themeS1 & {\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.15);\n }\n .tnt-themeS1.compatible & {\n /* background: #323b4a; */\n }\n padding-right: 20px;\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n .compatible & {\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n }\n transition: box-shadow .2s cubic-bezier(.4,0,.2,1), -webkit-box-shadow .2s cubic-bezier(.4,0,.2,1);\n\n .sidebar-collapsed-controller {\n text-align: center;\n width: ", ";\n line-height: ", ";\n height: ", ";\n cursor: pointer;\n color: ", ";\n margin-right: 10px;\n\n & > .tnt-icon {\n font-size: 16px;\n .large-size & {\n font-size: 20px;\n }\n }\n\n i {\n position: relative;\n top: -1px;\n vertical-align: sub;\n }\n\n &:hover {\n background-color: rgba(0,0,0,.06);\n }\n\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n color: ", ";\n }\n .large-size & {\n font-size: 18px;\n }\n .isInIframe & {\n display: none;\n }\n }\n"]);
15
-
16
- _templateObject = function _templateObject() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
24
-
1
+ var _templateObject, _templateObject2;
2
+ 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); }
3
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
25
4
  /**
26
5
  * @file Layout header
27
6
  * @author zhangyou
@@ -32,7 +11,7 @@ import Icon from '../Icon';
32
11
  import Actions from './HeaderActions';
33
12
  import AppList from './AppList';
34
13
  import OrgAppList from './OrgAppList';
35
- var Header = styled.div(_templateObject(), function (props) {
14
+ var Header = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: 201;\n height: ", ";\n display: flex;\n color: rgba(255,255,255,.85);\n background: #fff;\n .hasHeaderTabs & {\n // background: #191D29;\n background: #fff !important;\n box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.18);\n .tnt-layout-header-content {\n display: none;\n }\n }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // }\n\n .isInIframe.noAppList &,\n .isEmptyLayout & {\n display: none;\n }\n .tnt-themeS1 & {\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.15);\n }\n .tnt-themeS1.compatible & {\n /* background: #323b4a; */\n }\n padding-right: 20px;\n background: #FFFFFF;\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n .compatible & {\n box-shadow: 0 1px 10px 0 rgba(0,0,0,0.10);\n }\n transition: box-shadow .2s cubic-bezier(.4,0,.2,1), -webkit-box-shadow .2s cubic-bezier(.4,0,.2,1);\n\n .sidebar-collapsed-controller {\n text-align: center;\n width: ", ";\n line-height: ", ";\n height: ", ";\n cursor: pointer;\n color: ", ";\n margin-right: 10px;\n\n & > .tnt-icon {\n font-size: 16px;\n .large-size & {\n font-size: 20px;\n }\n }\n\n i {\n position: relative;\n top: -1px;\n vertical-align: sub;\n }\n\n &:hover {\n background-color: rgba(0,0,0,.06);\n }\n\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n color: ", ";\n }\n .large-size & {\n font-size: 18px;\n }\n .isInIframe & {\n display: none;\n }\n }\n"])), function (props) {
36
15
  return "".concat(props.theme.headerHeight, "px");
37
16
  }, function (props) {
38
17
  return "".concat(props.theme.blueBgColor, " !important");
@@ -47,33 +26,33 @@ var Header = styled.div(_templateObject(), function (props) {
47
26
  }, function (props) {
48
27
  return "".concat(props.theme.primaryTextColor);
49
28
  });
50
- var Content = styled.div(_templateObject2());
29
+ var Content = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n .isInIframe & {\n display: none;\n }\n"])));
51
30
  export default withTheme(function (props) {
52
31
  var collapsed = props.collapsed,
53
- _props$collapseIconPl = props.collapseIconPlacement,
54
- collapseIconPlacement = _props$collapseIconPl === void 0 ? 'right' : _props$collapseIconPl,
55
- selectedAppKey = props.selectedAppKey,
56
- appList = props.appList,
57
- orgAppShow = props.orgAppShow,
58
- orgAppList = props.orgAppList,
59
- orgTreeConfig = props.orgTreeConfig,
60
- selectedOrgKey = props.selectedOrgKey,
61
- orgList = props.orgList,
62
- headerTabs = props.headerTabs,
63
- onAppChange = props.onAppChange,
64
- onOrgChange = props.onOrgChange,
65
- onCollapseChange = props.onCollapseChange,
66
- extraActions = props.extraActions;
32
+ _props$collapseIconPl = props.collapseIconPlacement,
33
+ collapseIconPlacement = _props$collapseIconPl === void 0 ? 'right' : _props$collapseIconPl,
34
+ selectedAppKey = props.selectedAppKey,
35
+ appList = props.appList,
36
+ orgAppShow = props.orgAppShow,
37
+ orgAppList = props.orgAppList,
38
+ orgTreeConfig = props.orgTreeConfig,
39
+ selectedOrgKey = props.selectedOrgKey,
40
+ orgList = props.orgList,
41
+ headerTabs = props.headerTabs,
42
+ onAppChange = props.onAppChange,
43
+ onOrgChange = props.onOrgChange,
44
+ onCollapseChange = props.onCollapseChange,
45
+ extraActions = props.extraActions;
67
46
  var headerRef = useRef();
68
- return React.createElement(Header, {
47
+ return /*#__PURE__*/React.createElement(Header, {
69
48
  className: "tnt-layout-header",
70
49
  ref: headerRef
71
- }, collapseIconPlacement === 'right' && React.createElement("div", {
50
+ }, collapseIconPlacement === 'right' && /*#__PURE__*/React.createElement("div", {
72
51
  className: "sidebar-collapsed-controller",
73
52
  onClick: onCollapseChange
74
- }, React.createElement(Icon, {
53
+ }, /*#__PURE__*/React.createElement(Icon, {
75
54
  type: "menu-".concat(collapsed ? 'unfold' : 'fold')
76
- })), headerTabs, orgList && React.createElement(OrgAppList, {
55
+ })), headerTabs, orgList && /*#__PURE__*/React.createElement(OrgAppList, {
77
56
  orgAppShow: orgAppShow,
78
57
  selectedOrgKey: selectedOrgKey,
79
58
  orgList: orgList,
@@ -83,13 +62,13 @@ export default withTheme(function (props) {
83
62
  orgAppList: orgAppList,
84
63
  onAppChange: onAppChange,
85
64
  headerTabs: headerTabs
86
- }), appList && !orgList && React.createElement(AppList, {
65
+ }), appList && !orgList && /*#__PURE__*/React.createElement(AppList, {
87
66
  items: appList,
88
67
  selectedKey: selectedAppKey,
89
68
  onChange: onAppChange
90
- }), React.createElement(Content, {
69
+ }), /*#__PURE__*/React.createElement(Content, {
91
70
  className: "tnt-layout-header-content"
92
- }, props.children), React.createElement(Actions, _extends({}, props, {
71
+ }, props.children), /*#__PURE__*/React.createElement(Actions, _extends({}, props, {
93
72
  headerRef: headerRef
94
73
  }), extraActions));
95
74
  });
@@ -1,22 +1,10 @@
1
1
  import "antd/lib/divider/style";
2
2
  import _Divider from "antd/lib/divider";
3
-
4
- 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; }
5
-
6
- 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; }
7
-
8
- function _templateObject() {
9
- var data = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-block;\n line-height: ", ";\n margin: 0 0 0 20px;\n .hasHeaderTabs & {\n margin: 0;\n }\n padding: 0;\n white-space: nowrap;\n\n .isInIframe & {\n display: none;\n }\n\n & > li {\n height: 100%;\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n font-size: 20px;\n margin: 0 7.5px;\n color: ", ";\n .large-size & {\n margin: 0 10px;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n &:last-of-type {\n margin-right: 0;\n }\n .hasHeaderTabs & {\n color: #455064;\n }\n // \u5220\u9664\u8272\u7CFB\u533A\u5206 \u7EDF\u4E00\u8272\u8C03\n // .hasHeaderTabs:not(.tnt-themeS1) & {\n // color: rgba(255,255,255,.8);\n // }\n .hasHeaderTabs:not(.tnt-themeS1) & {\n color: #455064 !important;\n }\n }\n"]);
10
-
11
- _templateObject = function _templateObject() {
12
- return data;
13
- };
14
-
15
- return data;
16
- }
17
-
18
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
-
3
+ var _excluded = ["type", "config", "theme", "userInfo", "menus", "apps", "extraActions", "headerRef", "onLanguageChange", "onThemeChange", "onApplicationChange", "onAppChange", "onOrgChange", "onCollapseChange", "onPersonalSetting", "onChangePassword", "onLogout", "onLogoClick", "AvatarCustom"];
4
+ var _templateObject;
5
+ 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; }
6
+ 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; }
7
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
20
8
  import styled, { withTheme } from 'styled-components';
21
9
  import GlobalNavigation from './GlobalNavigation';
22
10
  import Language from './Language';
@@ -24,68 +12,66 @@ import Theme from './Theme';
24
12
  import LanguageTheme from './CompatibleLanguage';
25
13
  import Application from './Application';
26
14
  import Avatar from './Avatar';
27
- var Actions = styled.ul(_templateObject(), function (props) {
15
+ var Actions = styled.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-block;\n line-height: ", ";\n margin: 0 0 0 20px;\n .hasHeaderTabs & {\n margin: 0;\n }\n padding: 0;\n white-space: nowrap;\n\n .isInIframe & {\n display: none;\n }\n\n & > li {\n height: 100%;\n display: inline-block;\n vertical-align: top;\n cursor: pointer;\n font-size: 20px;\n margin: 0 7.5px;\n color: ", ";\n .large-size & {\n margin: 0 10px;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n &:last-of-type {\n margin-right: 0;\n }\n .hasHeaderTabs & {\n color: #455064;\n }\n // \u5220\u9664\u8272\u7CFB\u533A\u5206 \u7EDF\u4E00\u8272\u8C03\n // .hasHeaderTabs:not(.tnt-themeS1) & {\n // color: rgba(255,255,255,.8);\n // }\n .hasHeaderTabs:not(.tnt-themeS1) & {\n color: #455064 !important;\n }\n }\n"])), function (props) {
28
16
  return "".concat(props.theme.headerHeight, "px");
29
17
  }, function (props) {
30
18
  return "".concat(props.theme.headerActionsColor);
31
19
  });
32
20
  export default withTheme(function (props) {
33
21
  var type = props.type,
34
- _props$config = props.config;
35
- _props$config = _props$config === void 0 ? {} : _props$config;
36
-
37
- var _props$config$theme = _props$config.theme,
38
- theme = _props$config$theme === void 0 ? true : _props$config$theme,
39
- _props$config$avatar = _props$config.avatar,
40
- avatar = _props$config$avatar === void 0 ? true : _props$config$avatar,
41
- _props$config$languag = _props$config.language,
42
- language = _props$config$languag === void 0 ? true : _props$config$languag,
43
- _props$config$applica = _props$config.application,
44
- application = _props$config$applica === void 0 ? false : _props$config$applica,
45
- _props$config$globalN = _props$config.globalNavigation,
46
- globalNavigation = _props$config$globalN === void 0 ? false : _props$config$globalN,
47
- compatible = props.theme.compatible,
48
- _props$userInfo = props.userInfo,
49
- userInfo = _props$userInfo === void 0 ? {} : _props$userInfo,
50
- menus = props.menus,
51
- apps = props.apps,
52
- extraActions = props.extraActions,
53
- headerRef = props.headerRef,
54
- onLanguageChange = props.onLanguageChange,
55
- onThemeChange = props.onThemeChange,
56
- onApplicationChange = props.onApplicationChange,
57
- onAppChange = props.onAppChange,
58
- onOrgChange = props.onOrgChange,
59
- onCollapseChange = props.onCollapseChange,
60
- onPersonalSetting = props.onPersonalSetting,
61
- onChangePassword = props.onChangePassword,
62
- onLogout = props.onLogout,
63
- onLogoClick = props.onLogoClick,
64
- AvatarCustom = props.AvatarCustom,
65
- rest = _objectWithoutProperties(props, ["type", "config", "theme", "userInfo", "menus", "apps", "extraActions", "headerRef", "onLanguageChange", "onThemeChange", "onApplicationChange", "onAppChange", "onOrgChange", "onCollapseChange", "onPersonalSetting", "onChangePassword", "onLogout", "onLogoClick", "AvatarCustom"]);
66
-
67
- return React.createElement(Actions, rest, extraActions, globalNavigation && React.createElement(GlobalNavigation, {
22
+ _props$config = props.config,
23
+ _props$config2 = _props$config === void 0 ? {} : _props$config,
24
+ _props$config2$theme = _props$config2.theme,
25
+ theme = _props$config2$theme === void 0 ? true : _props$config2$theme,
26
+ _props$config2$avatar = _props$config2.avatar,
27
+ avatar = _props$config2$avatar === void 0 ? true : _props$config2$avatar,
28
+ _props$config2$langua = _props$config2.language,
29
+ language = _props$config2$langua === void 0 ? true : _props$config2$langua,
30
+ _props$config2$applic = _props$config2.application,
31
+ application = _props$config2$applic === void 0 ? false : _props$config2$applic,
32
+ _props$config2$global = _props$config2.globalNavigation,
33
+ globalNavigation = _props$config2$global === void 0 ? false : _props$config2$global,
34
+ compatible = props.theme.compatible,
35
+ _props$userInfo = props.userInfo,
36
+ userInfo = _props$userInfo === void 0 ? {} : _props$userInfo,
37
+ menus = props.menus,
38
+ apps = props.apps,
39
+ extraActions = props.extraActions,
40
+ headerRef = props.headerRef,
41
+ onLanguageChange = props.onLanguageChange,
42
+ onThemeChange = props.onThemeChange,
43
+ onApplicationChange = props.onApplicationChange,
44
+ onAppChange = props.onAppChange,
45
+ onOrgChange = props.onOrgChange,
46
+ onCollapseChange = props.onCollapseChange,
47
+ onPersonalSetting = props.onPersonalSetting,
48
+ onChangePassword = props.onChangePassword,
49
+ onLogout = props.onLogout,
50
+ onLogoClick = props.onLogoClick,
51
+ AvatarCustom = props.AvatarCustom,
52
+ rest = _objectWithoutProperties(props, _excluded);
53
+ return /*#__PURE__*/React.createElement(Actions, rest, extraActions, globalNavigation && /*#__PURE__*/React.createElement(GlobalNavigation, {
68
54
  headerRef: headerRef,
69
55
  menus: menus
70
- }), type !== 'enterprise' && (!compatible ? React.createElement(React.Fragment, null, language && React.createElement(Language, {
56
+ }), type !== 'enterprise' && (!compatible ? /*#__PURE__*/React.createElement(React.Fragment, null, language && /*#__PURE__*/React.createElement(Language, {
71
57
  language: userInfo.lang,
72
58
  onChange: onLanguageChange
73
- }), theme && React.createElement(Theme, {
59
+ }), theme && /*#__PURE__*/React.createElement(Theme, {
74
60
  theme: userInfo.theme,
75
61
  onChange: onThemeChange
76
- })) : React.createElement(LanguageTheme, {
62
+ })) : /*#__PURE__*/React.createElement(LanguageTheme, {
77
63
  config: props.config,
78
64
  language: userInfo.lang,
79
65
  theme: userInfo.theme,
80
66
  onLanguageChange: onLanguageChange,
81
67
  onThemeChange: onThemeChange
82
- })), application && React.createElement(Application, {
68
+ })), application && /*#__PURE__*/React.createElement(Application, {
83
69
  language: userInfo.lang,
84
70
  apps: apps,
85
71
  onChange: onApplicationChange
86
- }), avatar && React.createElement(React.Fragment, null, React.createElement(_Divider, {
72
+ }), avatar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Divider, {
87
73
  type: "vertical"
88
- }), AvatarCustom ? React.createElement(AvatarCustom, {
74
+ }), AvatarCustom ? /*#__PURE__*/React.createElement(AvatarCustom, {
89
75
  userInfo: userInfo,
90
76
  onPersonalSetting: onPersonalSetting,
91
77
  onChangePassword: onChangePassword,
@@ -96,7 +82,7 @@ export default withTheme(function (props) {
96
82
  language: language
97
83
  },
98
84
  onLanguageChange: onLanguageChange
99
- }) : React.createElement(Avatar, {
85
+ }) : /*#__PURE__*/React.createElement(Avatar, {
100
86
  userInfo: userInfo,
101
87
  onPersonalSetting: onPersonalSetting,
102
88
  onChangePassword: onChangePassword,
@@ -1,43 +1,20 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
2
-
3
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
4
-
5
- function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
-
7
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
-
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; }
10
-
11
- 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; }
12
-
13
- function _templateObject2() {
14
- 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"]);
15
-
16
- _templateObject2 = function _templateObject2() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- function _templateObject() {
24
- var data = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: right;\n"]);
25
-
26
- _templateObject = function _templateObject() {
27
- return data;
28
- };
29
-
30
- return data;
31
- }
32
-
33
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
34
-
1
+ var _excluded = ["theme", "navs", "onChange", "onSelect"];
2
+ var _templateObject, _templateObject2;
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ 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."); }
5
+ 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; } }
6
+ 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; }
7
+ 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; } }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
9
+ 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; }
10
+ 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; }
11
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
35
12
  import { useState, useEffect } from 'react';
36
13
  import styled, { withTheme } from 'styled-components';
37
14
  import cn from 'classnames';
38
15
  import { get } from 'lodash';
39
- var Navs = styled.ul(_templateObject());
40
- var NavItem = styled.li(_templateObject2(), function (props) {
16
+ var Navs = styled.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n list-style: none;\n text-align: right;\n"])));
17
+ var NavItem = styled.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) {
41
18
  return props.theme.size === 'large' ? '60px' : '50px';
42
19
  }, function (props) {
43
20
  return props.theme.secondaryTextColor;
@@ -48,32 +25,28 @@ var NavItem = styled.li(_templateObject2(), function (props) {
48
25
  });
49
26
  export var HeaderNavs = withTheme(function (_ref) {
50
27
  var theme = _ref.theme,
51
- _ref$navs = _ref.navs,
52
- navs = _ref$navs === void 0 ? [] : _ref$navs,
53
- onChange = _ref.onChange,
54
- onSelect = _ref.onSelect,
55
- props = _objectWithoutProperties(_ref, ["theme", "navs", "onChange", "onSelect"]);
56
-
28
+ _ref$navs = _ref.navs,
29
+ navs = _ref$navs === void 0 ? [] : _ref$navs,
30
+ onChange = _ref.onChange,
31
+ onSelect = _ref.onSelect,
32
+ props = _objectWithoutProperties(_ref, _excluded);
57
33
  var _useState = useState(props.selectedKey || get(navs, '0.key')),
58
- _useState2 = _slicedToArray(_useState, 2),
59
- selectedKey = _useState2[0],
60
- setSelectedKey = _useState2[1];
61
-
34
+ _useState2 = _slicedToArray(_useState, 2),
35
+ selectedKey = _useState2[0],
36
+ setSelectedKey = _useState2[1];
62
37
  var onClickNav = function onClickNav(nav) {
63
38
  setSelectedKey(nav.key);
64
39
  onSelect && onSelect(nav);
65
-
66
40
  if (selectedKey !== nav.key) {
67
41
  onChange && onChange(nav);
68
42
  setSelectedKey(nav.key);
69
43
  }
70
44
  };
71
-
72
45
  useEffect(function () {
73
46
  setSelectedKey(props.selectedKey || get(navs, '0.key'));
74
47
  }, [navs, props.selectedKey]);
75
- return React.createElement(Navs, props, navs.map(function (nav) {
76
- return React.createElement(NavItem, {
48
+ return /*#__PURE__*/React.createElement(Navs, props, navs.map(function (nav) {
49
+ return /*#__PURE__*/React.createElement(NavItem, {
77
50
  key: nav.key,
78
51
  theme: theme,
79
52
  className: cn({
@@ -82,7 +55,7 @@ export var HeaderNavs = withTheme(function (_ref) {
82
55
  onClick: function onClick() {
83
56
  return onClickNav(nav);
84
57
  }
85
- }, React.createElement("a", {
58
+ }, /*#__PURE__*/React.createElement("a", {
86
59
  href: nav.key,
87
60
  onClick: function onClick(evt) {
88
61
  return evt.preventDefault();