@oceanbase/design 0.1.0 → 0.1.2

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 (192) hide show
  1. package/dist/design.min.css +1 -1
  2. package/dist/design.min.js +1 -1
  3. package/es/BasicLayout/Header.d.ts +2 -2
  4. package/es/BasicLayout/Header.js +7 -8
  5. package/es/BasicLayout/index.d.ts +2 -2
  6. package/es/BasicLayout/index.js +9 -9
  7. package/es/BatchOperationBar/index.d.ts +1 -1
  8. package/es/Boundary/Components/Code.d.ts +1 -1
  9. package/es/Boundary/Components/Exception.d.ts +1 -1
  10. package/es/Boundary/index.d.ts +2 -2
  11. package/es/Dialog/index.d.ts +1 -1
  12. package/es/DocDialog/index.d.ts +2 -1
  13. package/es/DocDialog/index.js +2 -2
  14. package/es/FullscreenBox/index.d.ts +1 -1
  15. package/es/GraphToolbar/index.d.ts +2 -1
  16. package/es/Highlight/index.d.ts +1 -1
  17. package/es/Login/index.d.ts +1 -1
  18. package/es/NavMenu/index.js +4 -3
  19. package/es/PageContainer/ItemRender.d.ts +8 -0
  20. package/es/PageContainer/ItemRender.js +21 -0
  21. package/es/PageContainer/index.d.ts +2 -2
  22. package/es/PageContainer/index.js +14 -7
  23. package/es/PageContainer/index.less +4 -4
  24. package/es/Password/index.d.ts +2 -1
  25. package/es/Ranger/Ranger.d.ts +2 -1
  26. package/es/SideTip/index.d.ts +1 -1
  27. package/es/Table/index.d.ts +2 -1
  28. package/es/Table/style/index.js +1 -1
  29. package/es/TaskGraph/Graph.d.ts +2 -1
  30. package/es/TaskGraph/index.d.ts +2 -1
  31. package/es/Welcome/index.d.ts +1 -1
  32. package/es/Welcome/step.d.ts +2 -1
  33. package/es/_util/useHistory.d.ts +4 -0
  34. package/es/_util/useHistory.js +9 -0
  35. package/es/locale/LocaleWrapper.d.ts +2 -1
  36. package/lib/Action/Group.js +0 -2
  37. package/lib/Action/index.js +0 -2
  38. package/lib/Alert/index.js +0 -2
  39. package/lib/BasicLayout/Header.d.ts +2 -2
  40. package/lib/BasicLayout/Header.js +8 -11
  41. package/lib/BasicLayout/index.d.ts +2 -2
  42. package/lib/BasicLayout/index.js +8 -10
  43. package/lib/BasicLayout/locale/en-US.js +0 -2
  44. package/lib/BasicLayout/locale/zh-CN.js +0 -2
  45. package/lib/BasicLayout/locale/zh-TW.js +0 -2
  46. package/lib/BatchOperationBar/index.d.ts +1 -1
  47. package/lib/BatchOperationBar/index.js +0 -2
  48. package/lib/BatchOperationBar/locale/en-US.js +0 -2
  49. package/lib/BatchOperationBar/locale/zh-CN.js +0 -2
  50. package/lib/BatchOperationBar/locale/zh-TW.js +0 -2
  51. package/lib/Boundary/Components/Code.d.ts +1 -1
  52. package/lib/Boundary/Components/Exception.d.ts +1 -1
  53. package/lib/Boundary/Components/index.js +6 -0
  54. package/lib/Boundary/index.d.ts +2 -2
  55. package/lib/Boundary/index.js +0 -2
  56. package/lib/Boundary/locale/en-US.js +0 -2
  57. package/lib/Boundary/locale/zh-CN.js +0 -2
  58. package/lib/Boundary/locale/zh-TW.js +0 -2
  59. package/lib/Button/index.js +0 -2
  60. package/lib/Card/index.js +0 -2
  61. package/lib/ContentWithQuestion/index.js +0 -2
  62. package/lib/Descriptions/Item.js +0 -2
  63. package/lib/Descriptions/index.js +0 -2
  64. package/lib/Dialog/index.d.ts +1 -1
  65. package/lib/Dialog/index.js +0 -2
  66. package/lib/Dialog/locale/en-US.js +0 -2
  67. package/lib/Dialog/locale/zh-CN.js +0 -2
  68. package/lib/Dialog/locale/zh-TW.js +0 -2
  69. package/lib/DocDialog/index.d.ts +2 -1
  70. package/lib/DocDialog/index.js +3 -5
  71. package/lib/DocDialog/locale/en-US.js +0 -2
  72. package/lib/DocDialog/locale/zh-CN.js +0 -2
  73. package/lib/DocDialog/locale/zh-TW.js +0 -2
  74. package/lib/Form/FormItem.js +0 -2
  75. package/lib/Form/index.js +0 -2
  76. package/lib/FullscreenBox/index.d.ts +1 -1
  77. package/lib/FullscreenBox/index.js +0 -2
  78. package/lib/FullscreenBox/locale/en-US.js +0 -2
  79. package/lib/FullscreenBox/locale/zh-CN.js +0 -2
  80. package/lib/FullscreenBox/locale/zh-TW.js +0 -2
  81. package/lib/GraphToolbar/index.d.ts +2 -1
  82. package/lib/GraphToolbar/locale/en-US.js +0 -2
  83. package/lib/GraphToolbar/locale/zh-CN.js +0 -2
  84. package/lib/GraphToolbar/locale/zh-TW.js +0 -2
  85. package/lib/Highlight/DiffView/DiffCells.js +0 -2
  86. package/lib/Highlight/DiffView/index.js +0 -2
  87. package/lib/Highlight/HighlightCell.js +0 -2
  88. package/lib/Highlight/JsonView.js +0 -2
  89. package/lib/Highlight/index.d.ts +1 -1
  90. package/lib/Highlight/languages/bash.js +0 -2
  91. package/lib/Highlight/languages/cpp.js +0 -2
  92. package/lib/Highlight/languages/css.js +0 -2
  93. package/lib/Highlight/languages/dockerfile.js +0 -2
  94. package/lib/Highlight/languages/go.js +0 -2
  95. package/lib/Highlight/languages/groovy.js +0 -2
  96. package/lib/Highlight/languages/http.js +0 -2
  97. package/lib/Highlight/languages/java.js +0 -2
  98. package/lib/Highlight/languages/javascript.js +0 -2
  99. package/lib/Highlight/languages/json.js +0 -2
  100. package/lib/Highlight/languages/markdown.js +0 -2
  101. package/lib/Highlight/languages/nginx.js +0 -2
  102. package/lib/Highlight/languages/python.js +0 -2
  103. package/lib/Highlight/languages/ruby.js +0 -2
  104. package/lib/Highlight/languages/solidity.js +0 -2
  105. package/lib/Highlight/languages/sql.js +0 -2
  106. package/lib/Highlight/languages/typescript.js +0 -2
  107. package/lib/Highlight/languages/xml.js +0 -2
  108. package/lib/Highlight/languages/yaml.js +0 -2
  109. package/lib/Highlight/locale/en-US.js +0 -2
  110. package/lib/Highlight/locale/zh-CN.js +0 -2
  111. package/lib/Highlight/locale/zh-TW.js +0 -2
  112. package/lib/IconFont/index.js +0 -2
  113. package/lib/LocaleDropdown/index.js +0 -2
  114. package/lib/Login/ActivateForm.js +0 -2
  115. package/lib/Login/LoginForm.js +0 -2
  116. package/lib/Login/index.d.ts +1 -1
  117. package/lib/Login/index.js +0 -2
  118. package/lib/Login/locale/en-US.js +0 -2
  119. package/lib/Login/locale/zh-CN.js +0 -2
  120. package/lib/Login/locale/zh-TW.js +0 -2
  121. package/lib/Lottie/index.js +0 -2
  122. package/lib/Modal/index.js +0 -2
  123. package/lib/NavMenu/index.js +4 -5
  124. package/lib/PageContainer/ItemRender.d.ts +8 -0
  125. package/lib/{_util/itemRender.js → PageContainer/ItemRender.js} +21 -14
  126. package/lib/PageContainer/index.d.ts +2 -2
  127. package/lib/PageContainer/index.js +7 -9
  128. package/lib/PageContainer/index.less +4 -4
  129. package/lib/PageContainer/locale/en-US.js +0 -2
  130. package/lib/PageContainer/locale/zh-CN.js +0 -2
  131. package/lib/PageContainer/locale/zh-TW.js +0 -2
  132. package/lib/Password/Content.js +0 -2
  133. package/lib/Password/index.d.ts +2 -1
  134. package/lib/Password/index.js +0 -2
  135. package/lib/Password/locale/en-US.js +0 -2
  136. package/lib/Password/locale/zh-CN.js +0 -2
  137. package/lib/Password/locale/zh-TW.js +0 -2
  138. package/lib/Ranger/QuickPicker.js +0 -2
  139. package/lib/Ranger/Ranger.d.ts +2 -1
  140. package/lib/Ranger/Ranger.js +0 -2
  141. package/lib/Ranger/index.js +0 -2
  142. package/lib/Ranger/locale/en-US.js +0 -2
  143. package/lib/Ranger/locale/zh-CN.js +0 -2
  144. package/lib/Ranger/locale/zh-TW.js +0 -2
  145. package/lib/SideTip/Dragger.js +2 -4
  146. package/lib/SideTip/IconLoading.js +0 -2
  147. package/lib/SideTip/index.d.ts +1 -1
  148. package/lib/SideTip/index.js +0 -2
  149. package/lib/SideTip/locale/en-US.js +0 -2
  150. package/lib/SideTip/locale/zh-CN.js +0 -2
  151. package/lib/SideTip/locale/zh-TW.js +0 -2
  152. package/lib/Table/index.d.ts +2 -1
  153. package/lib/Table/index.js +0 -2
  154. package/lib/Table/locale/en-US.js +0 -2
  155. package/lib/Table/locale/zh-CN.js +0 -2
  156. package/lib/Table/locale/zh-TW.js +0 -2
  157. package/lib/Table/style/index.js +1 -1
  158. package/lib/Tabs/TabPane.js +0 -2
  159. package/lib/Tabs/hooks/useInkBar.js +0 -2
  160. package/lib/Tabs/hooks/useLegacyItems.js +0 -2
  161. package/lib/Tabs/index.js +0 -2
  162. package/lib/TaskGraph/Graph.d.ts +2 -1
  163. package/lib/TaskGraph/Graph.js +0 -2
  164. package/lib/TaskGraph/index.d.ts +2 -1
  165. package/lib/TaskGraph/index.js +0 -2
  166. package/lib/TaskGraph/locale/en-US.js +0 -2
  167. package/lib/TaskGraph/locale/zh-CN.js +0 -2
  168. package/lib/TaskGraph/locale/zh-TW.js +0 -2
  169. package/lib/TaskGraph/register.js +0 -2
  170. package/lib/Tooltip/MouseTooltip.js +0 -2
  171. package/lib/TreeSearch/index.js +0 -2
  172. package/lib/Welcome/index.d.ts +1 -1
  173. package/lib/Welcome/index.js +0 -2
  174. package/lib/Welcome/locale/en-US.js +0 -2
  175. package/lib/Welcome/locale/zh-CN.js +0 -2
  176. package/lib/Welcome/locale/zh-TW.js +0 -2
  177. package/lib/Welcome/step.d.ts +2 -1
  178. package/lib/Welcome/step.js +0 -2
  179. package/lib/_util/useHistory.d.ts +4 -0
  180. package/lib/_util/useHistory.js +30 -0
  181. package/lib/index.js +5 -1
  182. package/lib/locale/LocaleWrapper.d.ts +2 -1
  183. package/lib/locale/LocaleWrapper.js +0 -2
  184. package/lib/locale/en-US.js +0 -2
  185. package/lib/locale/zh-CN.js +0 -2
  186. package/lib/locale/zh-TW.js +0 -2
  187. package/lib/theme/index.js +0 -2
  188. package/package.json +11 -8
  189. package/README.md +0 -22
  190. package/es/_util/itemRender.d.ts +0 -2
  191. package/es/_util/itemRender.js +0 -12
  192. package/lib/_util/itemRender.d.ts +0 -2
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
2
  import type { Locale } from '../interface';
3
+ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
4
4
  import './Header.less';
5
5
  export declare type OverlayFunc = () => React.ReactElement;
6
6
  export interface HeaderLocale {
@@ -41,5 +41,5 @@ export interface HeaderProps extends LocaleWrapperProps {
41
41
  locales?: Locale[];
42
42
  langs?: Locale[];
43
43
  }
44
- declare const _default: any;
44
+ declare const _default: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<React.ComponentType<HeaderProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<HeaderProps>, {}>;
45
45
  export default _default;
@@ -12,17 +12,16 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  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; }
14
14
  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; }
15
- import React, { useState } from 'react';
16
- import { Dropdown, Menu, Modal, Tooltip, Space, Button } from 'antd';
15
+ import { BulbFilled, BulbOutlined, CopyrightOutlined, ReadFilled, UserOutlined } from '@ant-design/icons';
16
+ import { Button, Dropdown, Menu, Modal, Space, Tooltip } from 'antd';
17
17
  import classNames from 'classnames';
18
18
  import moment from 'moment';
19
- import { CopyrightOutlined, BulbFilled, ReadFilled } from '@ant-design/icons';
20
- import { BulbOutlined, UserOutlined } from '@ant-design/icons';
21
- import { useHistory } from 'react-router-dom';
22
- import LocaleWrapper from "../locale/LocaleWrapper";
23
- import zhCN from "./locale/zh-CN";
19
+ import React, { useState } from 'react';
24
20
  import { OB_SITE_LINK } from "../constant";
21
+ import LocaleWrapper from "../locale/LocaleWrapper";
25
22
  import { directTo, getPrefix } from "../_util";
23
+ import useHistory from "../_util/useHistory";
24
+ import zhCN from "./locale/zh-CN";
26
25
  // @ts-ignore
27
26
  import logoImg from "../assets/logo/oceanbase_logo.svg";
28
27
  // @ts-ignore
@@ -57,11 +56,11 @@ var Header = function Header(_ref) {
57
56
  locales = _ref.locales,
58
57
  langs = _ref.langs,
59
58
  restProps = _objectWithoutProperties(_ref, _excluded);
59
+ var history = useHistory();
60
60
  var _useState = useState(false),
61
61
  _useState2 = _slicedToArray(_useState, 2),
62
62
  visible = _useState2[0],
63
63
  setVisible = _useState2[1];
64
- var history = useHistory();
65
64
  // 是否为欢迎页
66
65
  // 主要是为了处理与欢迎页搭配使用的场景
67
66
  var isWelcome = pathname === welcomePath;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import type { BadgeProps } from 'antd/es/badge';
3
2
  import type { MenuProps } from 'antd/es/menu';
3
+ import React from 'react';
4
4
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
5
5
  import type { HeaderProps } from './Header';
6
6
  import './index.less';
@@ -41,5 +41,5 @@ export interface BasicLayoutProps extends LocaleWrapperProps {
41
41
  subSideMenuProps?: MenuProps;
42
42
  style?: React.CSSProperties;
43
43
  }
44
- declare const _default: any;
44
+ declare const _default: React.ForwardRefExoticComponent<BasicLayoutProps & React.RefAttributes<React.ComponentType<BasicLayoutProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<BasicLayoutProps>, {}>;
45
45
  export default _default;
@@ -12,21 +12,21 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  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; }
14
14
  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; }
15
- import React, { useState, useEffect } from 'react';
16
- import { Divider, Layout, Menu, Tooltip } from 'antd';
17
- import { useHistory } from 'react-router-dom';
18
- import { isNullValue } from '@oceanbase/util';
19
15
  import { CaretRightFilled, LeftOutlined, RightOutlined } from '@ant-design/icons';
20
16
  import { setAlpha } from '@ant-design/pro-components';
17
+ import { isNullValue } from '@oceanbase/util';
18
+ import { Divider, Layout, Menu, Tooltip } from 'antd';
19
+ import classnames from 'classnames';
21
20
  import { some } from 'lodash';
22
21
  import { pathToRegexp } from 'path-to-regexp';
22
+ import React, { useEffect, useState } from 'react';
23
23
  import LocaleWrapper from "../locale/LocaleWrapper";
24
- import zhCN from "./locale/zh-CN";
25
- import { urlToList, isEnglish, getPrefix } from "../_util";
24
+ import { token } from "../StaticFunction";
25
+ import { getPrefix, isEnglish, urlToList } from "../_util";
26
+ import useHistory from "../_util/useHistory";
26
27
  import Header from "./Header";
27
- import classnames from 'classnames';
28
28
  import "./index.less";
29
- import { token } from "../StaticFunction";
29
+ import zhCN from "./locale/zh-CN";
30
30
  var Content = Layout.Content,
31
31
  Sider = Layout.Sider;
32
32
  var SubMenu = Menu.SubMenu,
@@ -56,6 +56,7 @@ var BasicLayout = function BasicLayout(_ref) {
56
56
  subSideMenus = _ref.subSideMenus,
57
57
  className = _ref.className,
58
58
  restProps = _objectWithoutProperties(_ref, _excluded);
59
+ var history = useHistory();
59
60
  // 侧边栏导航是否收起
60
61
  var _useState = useState(defaultCollapsed),
61
62
  _useState2 = _slicedToArray(_useState, 2),
@@ -69,7 +70,6 @@ var BasicLayout = function BasicLayout(_ref) {
69
70
  _useState6 = _slicedToArray(_useState5, 2),
70
71
  openKeys = _useState6[0],
71
72
  setOpenKeys = _useState6[1];
72
- var history = useHistory();
73
73
  useEffect(function () {
74
74
  // 获取当前选中的菜单
75
75
  var selectedMenuKeys = urlToList(pathname).map(function (itemPath) {
@@ -29,5 +29,5 @@ export interface Props extends LocaleWrapperProps {
29
29
  position?: [Vertical, Horizontal];
30
30
  barStyle?: React.CSSProperties;
31
31
  }
32
- declare const _default: any;
32
+ declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<React.ComponentType<Props>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<Props>, {}>;
33
33
  export default _default;
@@ -11,4 +11,4 @@ export interface IBoundaryCode extends LocaleWrapperProps {
11
11
  buttonText?: string;
12
12
  locale?: BoundaryLocale;
13
13
  }
14
- export declare const Code: any;
14
+ export declare const Code: React.ForwardRefExoticComponent<IBoundaryCode & React.RefAttributes<React.ComponentType<IBoundaryCode>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<IBoundaryCode>, {}>;
@@ -14,4 +14,4 @@ export interface ExceptionProps extends LocaleWrapperProps {
14
14
  hasButton?: boolean;
15
15
  locale?: BoundaryLocale;
16
16
  }
17
- export declare const Exception: any;
17
+ export declare const Exception: React.ForwardRefExoticComponent<ExceptionProps & React.RefAttributes<React.ComponentType<ExceptionProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<ExceptionProps>, {}>;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import './index.less';
3
3
  declare const _default: {
4
- Code: any;
4
+ Code: import("react").ForwardRefExoticComponent<import("./Components").IBoundaryCode & import("react").RefAttributes<import("react").ComponentType<import("./Components").IBoundaryCode>>> & import("hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("./Components").IBoundaryCode>, {}>;
5
5
  Function: import("react").FC<import("./Components").IBoundaryFunction>;
6
- Exception: any;
6
+ Exception: import("react").ForwardRefExoticComponent<import("./Components").ExceptionProps & import("react").RefAttributes<import("react").ComponentType<import("./Components").ExceptionProps>>> & import("hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("./Components").ExceptionProps>, {}>;
7
7
  };
8
8
  export default _default;
@@ -31,5 +31,5 @@ export interface IDialogProps extends LocaleWrapperProps {
31
31
  setRootWidth?: (newWidth: string) => void;
32
32
  isEmbed?: boolean;
33
33
  }
34
- declare const _default: any;
34
+ declare const _default: React.ForwardRefExoticComponent<IDialogProps & React.RefAttributes<React.ComponentType<IDialogProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<IDialogProps>, {}>;
35
35
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
2
3
  interface IDialogConfig {
3
4
  height?: number;
@@ -20,5 +21,5 @@ export interface IDocDialogProps extends LocaleWrapperProps {
20
21
  setRootWidth: (newWidth: string) => void;
21
22
  setVisible: (payload: boolean) => void;
22
23
  }
23
- declare const _default: any;
24
+ declare const _default: import("react").ForwardRefExoticComponent<IDocDialogProps & import("react").RefAttributes<import("react").ComponentType<IDocDialogProps>>> & import("hoist-non-react-statics").NonReactStatics<import("react").ComponentType<IDocDialogProps>, {}>;
24
25
  export default _default;
@@ -10,10 +10,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useEffect, useState, useMemo } from 'react';
14
- import Dialog from "../Dialog";
15
13
  import { debounce } from 'lodash';
14
+ import { useEffect, useMemo, useState } from 'react';
16
15
  import { useLocation } from 'react-router-dom';
16
+ import Dialog from "../Dialog";
17
17
  import LocaleWrapper from "../locale/LocaleWrapper";
18
18
  import zhCN from "./locale/zh-CN";
19
19
  var DEFAULT_EMBDED_WIDTH = 0.4;
@@ -38,5 +38,5 @@ export interface FullscreenBoxProps extends LocaleWrapperProps {
38
38
  */
39
39
  children?: any;
40
40
  }
41
- declare const _default: any;
41
+ declare const _default: React.ForwardRefExoticComponent<FullscreenBoxProps & React.RefAttributes<React.ComponentType<FullscreenBoxProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<FullscreenBoxProps>, {}>;
42
42
  export default _default;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { Graph } from '@antv/g6';
2
3
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
4
  import './index.less';
@@ -22,5 +23,5 @@ export interface GraphToolbarProps extends LocaleWrapperProps {
22
23
  locale?: GraphToolbarLocale;
23
24
  className?: string;
24
25
  }
25
- declare const _default: any;
26
+ declare const _default: React.ForwardRefExoticComponent<GraphToolbarProps & React.RefAttributes<React.ComponentType<GraphToolbarProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<GraphToolbarProps>, {}>;
26
27
  export default _default;
@@ -99,5 +99,5 @@ export interface HighlightProps extends LocaleWrapperProps {
99
99
  onCopyChange?: (value: string | Object) => void | Function;
100
100
  }
101
101
  export declare const renderHightlight: (language: any, content: any) => import("highlight.js").HighlightResult;
102
- declare const _default: any;
102
+ declare const _default: React.ForwardRefExoticComponent<HighlightProps & React.RefAttributes<React.ComponentType<HighlightProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<HighlightProps>, {}>;
103
103
  export default _default;
@@ -62,5 +62,5 @@ export interface LoginProps extends FormProps {
62
62
  onShowActivateChange?: (isShow: boolean) => void;
63
63
  onAuthCodeImgChange?: () => void;
64
64
  }
65
- declare const _default: any;
65
+ declare const _default: React.ForwardRefExoticComponent<LoginProps & React.RefAttributes<React.ComponentType<LoginProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<LoginProps>, {}>;
66
66
  export default _default;
@@ -5,11 +5,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { Menu } from 'antd';
8
- import React, { useCallback, useEffect, useState } from 'react';
9
- import { useHistory, useLocation } from 'react-router-dom';
10
- import { pathToRegexp } from 'path-to-regexp';
11
8
  import { isArray } from 'lodash';
9
+ import { pathToRegexp } from 'path-to-regexp';
10
+ import React, { useCallback, useEffect, useState } from 'react';
11
+ import { useLocation } from 'react-router-dom';
12
12
  import { getPrefix } from "../_util";
13
+ import useHistory from "../_util/useHistory";
13
14
  import "./index.less";
14
15
  var prefix = getPrefix('menu');
15
16
  export default (function (props) {
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const _default: ({ route, params, routes, paths }: {
3
+ route: any;
4
+ params: any;
5
+ routes: any;
6
+ paths: any;
7
+ }) => import("react").JSX.Element;
8
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import useHistory from "../_util/useHistory";
2
+ export default (function (_ref) {
3
+ var route = _ref.route,
4
+ params = _ref.params,
5
+ routes = _ref.routes,
6
+ paths = _ref.paths;
7
+ var routeIndex = routes.indexOf(route);
8
+ var last = routeIndex === routes.length - 1;
9
+ // title > breadcrumbName
10
+ var title = route.title || route.breadcrumbName;
11
+ // href (目的路径) > path (拼接路径)
12
+ var path = route.href || routes.slice(0, routeIndex + 1).map(function (item) {
13
+ return item.path;
14
+ }).join('/');
15
+ var history = useHistory();
16
+ return last ? /*#__PURE__*/React.createElement("span", null, title) : /*#__PURE__*/React.createElement("a", {
17
+ onClick: function onClick() {
18
+ history.push(path);
19
+ }
20
+ }, title);
21
+ });
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import type { IconComponentProps } from '@ant-design/icons/es/components/Icon';
3
2
  import type { PageContainerProps as AntPageContainerProps, PageHeaderProps as AntPageHeaderProps } from '@ant-design/pro-components';
3
+ import React from 'react';
4
4
  import './index.less';
5
5
  export declare type ReloadType = boolean | IconComponentProps | React.ReactNode;
6
6
  export interface PageContainerLocale {
@@ -13,5 +13,5 @@ export interface PageContainerProps extends AntPageContainerProps {
13
13
  header?: PageHeaderProps;
14
14
  locale?: PageContainerLocale;
15
15
  }
16
- declare const _default: any;
16
+ declare const _default: React.ForwardRefExoticComponent<PageContainerProps & React.RefAttributes<React.ComponentType<PageContainerProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<PageContainerProps>, {}>;
17
17
  export default _default;
@@ -8,18 +8,18 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
8
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); }
9
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
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; }
11
- import React from 'react';
12
- import { Space } from 'antd';
13
11
  import { SyncOutlined } from '@ant-design/icons';
14
12
  import { PageContainer as AntPageContainer } from '@ant-design/pro-components';
15
- import { isObject } from 'lodash';
13
+ import { Space } from 'antd';
16
14
  import classNames from 'classnames';
17
- import itemRender from "../_util/itemRender";
15
+ import { isObject } from 'lodash';
16
+ import React from 'react';
18
17
  import { globalConfig } from "../ConfigProvider";
19
- import Tooltip from "../Tooltip";
20
18
  import LocaleWrapper from "../locale/LocaleWrapper";
21
- import zhCN from "./locale/zh-CN";
19
+ import Tooltip from "../Tooltip";
22
20
  import "./index.less";
21
+ import ItemRender from "./ItemRender";
22
+ import zhCN from "./locale/zh-CN";
23
23
  var PageContainer = function PageContainer(_ref) {
24
24
  var header = _ref.header,
25
25
  locale = _ref.locale,
@@ -42,7 +42,14 @@ var PageContainer = function PageContainer(_ref) {
42
42
  var newHeader = header && _objectSpread(_objectSpread({}, header), {}, {
43
43
  subTitle: newSubTitle,
44
44
  breadcrumb: _objectSpread({
45
- itemRender: itemRender
45
+ itemRender: function itemRender(route, params, routes, paths) {
46
+ return /*#__PURE__*/React.createElement(ItemRender, {
47
+ route: route,
48
+ params: params,
49
+ routes: routes,
50
+ paths: paths
51
+ });
52
+ }
46
53
  }, breadcrumb)
47
54
  });
48
55
  return /*#__PURE__*/React.createElement(AntPageContainer, _extends({
@@ -44,10 +44,10 @@
44
44
  padding-inline: 24px;
45
45
  padding-block: 16px;
46
46
  }
47
- .@{prefixCls}-pro-page-container-children-content {
48
- padding-inline: 24px !important;
49
- padding-block-start: 0 !important;
50
- padding-block-end: 24px !important;
47
+ .@{prefixCls}-pro-page-container-children-container {
48
+ padding-inline: 24px;
49
+ padding-block-start: 0;
50
+ padding-block-end: 24px;
51
51
  }
52
52
  }
53
53
 
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { PasswordProps as AntdPasswordProps } from 'antd/es/input';
2
3
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
4
  import type { Validator } from './Content';
@@ -21,5 +22,5 @@ export interface PasswordProps extends LocaleWrapperProps, Omit<AntdPasswordProp
21
22
  generatePasswordRegex?: RegExp;
22
23
  locale?: PasswordLocale;
23
24
  }
24
- declare const _default: any;
25
+ declare const _default: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.ComponentType<PasswordProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<PasswordProps>, {}>;
25
26
  export default _default;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { Moment } from 'moment';
2
3
  import type { Dayjs } from 'dayjs';
3
4
  import './index.less';
@@ -7,5 +8,5 @@ export declare type RangeDateValue = {
7
8
  name: RangeName;
8
9
  range: RangeValue;
9
10
  };
10
- declare const _default: any;
11
+ declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<React.ComponentType<any>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<any>, {}>;
11
12
  export default _default;
@@ -152,5 +152,5 @@ export interface SideTipState {
152
152
  hide?: boolean;
153
153
  hovered?: boolean;
154
154
  }
155
- declare const _default: any;
155
+ declare const _default: React.ForwardRefExoticComponent<SideTipProps & React.RefAttributes<React.ComponentType<SideTipProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<SideTipProps>, {}>;
156
156
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import React from 'react';
2
3
  import type { TableProps as AntTableProps } from 'antd';
3
4
  import type { ColumnsType } from 'antd/es/table';
4
5
  export interface TableProps<T> extends AntTableProps<T> {
@@ -12,5 +13,5 @@ export interface TableProps<T> extends AntTableProps<T> {
12
13
  toolAlertRender?: false | ((selectedRowKeys: any, selectedRows: any) => ReactNode);
13
14
  toolSelectedContent?: (selectedRowKeys: any, selectedRows: any) => ReactNode;
14
15
  }
15
- declare const _default: any;
16
+ declare const _default: React.ForwardRefExoticComponent<TableProps<unknown> & React.RefAttributes<React.ComponentType<TableProps<unknown>>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<TableProps<unknown>>, {}>;
16
17
  export default _default;
@@ -77,7 +77,7 @@ export var genTableStyle = function genTableStyle(token) {
77
77
  padding: largeCellPadding
78
78
  })), _$concat7)), _defineProperty(_ref, "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-expandable)"), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered)"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:not(".concat(componentCls, "-measure-row) > td"), {
79
79
  border: 'none'
80
- })))), _defineProperty(_ref, "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), (_$concat$concat4 = {}, _defineProperty(_$concat$concat4, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-expanded-row)"), _defineProperty({
80
+ })))), _defineProperty(_ref, "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), (_$concat$concat4 = {}, _defineProperty(_$concat$concat4, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), _defineProperty({
81
81
  td: {
82
82
  backgroundColor: colorBgBase
83
83
  }
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { GraphData } from '@antv/g6/lib/types';
2
3
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
4
  import './graph.less';
@@ -20,5 +21,5 @@ export interface TaskGraphProps extends LocaleWrapperProps {
20
21
  assetsPath?: string;
21
22
  locale?: TaskGraphLocale;
22
23
  }
23
- declare const _default: any;
24
+ declare const _default: React.ForwardRefExoticComponent<TaskGraphProps & React.RefAttributes<React.ComponentType<TaskGraphProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<TaskGraphProps>, {}>;
24
25
  export default _default;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { GraphData } from '@antv/g6/lib/types';
2
3
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
4
  import type { TaskGraphLocale } from './Graph';
@@ -12,5 +13,5 @@ export interface TaskGraphProps extends LocaleWrapperProps {
12
13
  assetsPath?: string;
13
14
  locale?: TaskGraphLocale;
14
15
  }
15
- declare const _default: any;
16
+ declare const _default: React.ForwardRefExoticComponent<TaskGraphProps & React.RefAttributes<React.ComponentType<TaskGraphProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<TaskGraphProps>, {}>;
16
17
  export default _default;
@@ -34,5 +34,5 @@ export interface WelcomeProps {
34
34
  className?: string;
35
35
  style?: React.CSSProperties;
36
36
  }
37
- declare const _default: any;
37
+ declare const _default: React.ForwardRefExoticComponent<WelcomeProps & React.RefAttributes<React.ComponentType<WelcomeProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<WelcomeProps>, {}>;
38
38
  export default _default;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import './index.less';
2
3
  export interface OperationProps {
3
4
  text: string;
@@ -14,5 +15,5 @@ export interface WelcomeStepProps {
14
15
  operations?: OperationProps[];
15
16
  locale?: WelcomeStepLocale;
16
17
  }
17
- declare const _default: any;
18
+ declare const _default: React.ForwardRefExoticComponent<WelcomeStepProps & React.RefAttributes<React.ComponentType<WelcomeStepProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<WelcomeStepProps>, {}>;
18
19
  export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: () => {
2
+ push: any;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { useHistory,
2
+ // react-router-dom v6
3
+ // @ts-ignore
4
+ useNavigate } from 'react-router-dom';
5
+ export default (function () {
6
+ return {
7
+ push: useHistory ? useHistory().push : useNavigate ? useNavigate() : null
8
+ };
9
+ });
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import hoistNonReactStatic from 'hoist-non-react-statics';
2
3
  export interface LocaleWrapperProps {
3
4
  locale?: any;
4
5
  }
@@ -6,5 +7,5 @@ export interface LocaleWrapperInput {
6
7
  componentName: string;
7
8
  defaultLocale: any;
8
9
  }
9
- declare const _default: ({ componentName, defaultLocale }: LocaleWrapperInput) => <BaseProps extends LocaleWrapperProps>(BaseComponent: React.ComponentType<BaseProps>) => any;
10
+ declare const _default: ({ componentName, defaultLocale }: LocaleWrapperInput) => <BaseProps extends LocaleWrapperProps>(BaseComponent: React.ComponentType<BaseProps>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<BaseProps> & React.RefAttributes<React.ComponentType<BaseProps>>> & hoistNonReactStatic.NonReactStatics<React.ComponentType<BaseProps>, {}>;
10
11
  export default _default;
@@ -122,5 +122,3 @@ var Group_default = ({
122
122
  moreDom
123
123
  ));
124
124
  };
125
- // Annotate the CommonJS export names for ESM import in node:
126
- 0 && (module.exports = {});
@@ -35,5 +35,3 @@ module.exports = __toCommonJS(Action_exports);
35
35
  var import_Group = __toESM(require("./Group"));
36
36
  var import_Item = require("./Item");
37
37
  var Action_default = { Group: import_Group.default, Button: import_Item.ActionButton, Link: import_Item.ActionLink };
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {});
@@ -61,5 +61,3 @@ if (process.env.NODE_ENV !== "production") {
61
61
  Alert.displayName = import_antd.Alert.displayName;
62
62
  }
63
63
  var Alert_default = Alert;
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {});
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
2
  import type { Locale } from '../interface';
3
+ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
4
4
  import './Header.less';
5
5
  export declare type OverlayFunc = () => React.ReactElement;
6
6
  export interface HeaderLocale {
@@ -41,5 +41,5 @@ export interface HeaderProps extends LocaleWrapperProps {
41
41
  locales?: Locale[];
42
42
  langs?: Locale[];
43
43
  }
44
- declare const _default: any;
44
+ declare const _default: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<React.ComponentType<HeaderProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<HeaderProps>, {}>;
45
45
  export default _default;
@@ -32,17 +32,16 @@ __export(Header_exports, {
32
32
  default: () => Header_default
33
33
  });
34
34
  module.exports = __toCommonJS(Header_exports);
35
- var import_react = __toESM(require("react"));
35
+ var import_icons = require("@ant-design/icons");
36
36
  var import_antd = require("antd");
37
37
  var import_classnames = __toESM(require("classnames"));
38
38
  var import_moment = __toESM(require("moment"));
39
- var import_icons = require("@ant-design/icons");
40
- var import_icons2 = require("@ant-design/icons");
41
- var import_react_router_dom = require("react-router-dom");
42
- var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
43
- var import_zh_CN = __toESM(require("./locale/zh-CN"));
39
+ var import_react = __toESM(require("react"));
44
40
  var import_constant = require("../constant");
41
+ var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
45
42
  var import_util = require("../_util");
43
+ var import_useHistory = __toESM(require("../_util/useHistory"));
44
+ var import_zh_CN = __toESM(require("./locale/zh-CN"));
46
45
  var import_oceanbase_logo = __toESM(require("../assets/logo/oceanbase_logo.svg"));
47
46
  var import_user = __toESM(require("../assets/user.svg"));
48
47
  var import_LocaleDropdown = __toESM(require("../LocaleDropdown"));
@@ -70,8 +69,8 @@ var Header = ({
70
69
  langs,
71
70
  ...restProps
72
71
  }) => {
72
+ const history = (0, import_useHistory.default)();
73
73
  const [visible, setVisible] = (0, import_react.useState)(false);
74
- const history = (0, import_react_router_dom.useHistory)();
75
74
  const isWelcome = pathname === welcomePath;
76
75
  const helpMenu = /* @__PURE__ */ import_react.default.createElement(
77
76
  import_antd.Menu,
@@ -115,9 +114,9 @@ var Header = ({
115
114
  },
116
115
  className: `${prefix}-logo`
117
116
  }
118
- ), title && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-title` }, title), showLabel ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-extra ${prefix}-extra-with-label` }, extra, showHelp && /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { overlay: helpMenu }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons2.BulbOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", { "data-testid": "help" }, locale.help))), showLocale && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_LocaleDropdown.default, { locales: locales || langs })), userMenu ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { overlay: userMenu }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { shape: "round", size: "small" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons2.UserOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", null, username)))) : (
117
+ ), title && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-title` }, title), showLabel ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-extra ${prefix}-extra-with-label` }, extra, showHelp && /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { overlay: helpMenu }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons.BulbOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", { "data-testid": "help" }, locale.help))), showLocale && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_LocaleDropdown.default, { locales: locales || langs })), userMenu ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { overlay: userMenu }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { shape: "round", size: "small" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", null, username)))) : (
119
118
  // userMenu username 都不存在时,不展示该项
120
- /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, username ? /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { shape: "round", size: "small" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons2.UserOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", null, username))) : null)
119
+ /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, username ? /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { shape: "round", size: "small" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", null, username))) : null)
121
120
  )) : /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-extra` }, /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { overlay: helpMenu }, /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-extra-icon-wrapper` }, /* @__PURE__ */ import_react.default.createElement(import_icons.BulbFilled, null)))), docsPath && /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: locale.viewDocs }, /* @__PURE__ */ import_react.default.createElement(
122
121
  "span",
123
122
  {
@@ -176,5 +175,3 @@ var Header_default = (0, import_LocaleWrapper.default)({
176
175
  componentName: "BasicLayout",
177
176
  defaultLocale: import_zh_CN.default
178
177
  })(Header);
179
- // Annotate the CommonJS export names for ESM import in node:
180
- 0 && (module.exports = {});
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import type { BadgeProps } from 'antd/es/badge';
3
2
  import type { MenuProps } from 'antd/es/menu';
3
+ import React from 'react';
4
4
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
5
5
  import type { HeaderProps } from './Header';
6
6
  import './index.less';
@@ -41,5 +41,5 @@ export interface BasicLayoutProps extends LocaleWrapperProps {
41
41
  subSideMenuProps?: MenuProps;
42
42
  style?: React.CSSProperties;
43
43
  }
44
- declare const _default: any;
44
+ declare const _default: React.ForwardRefExoticComponent<BasicLayoutProps & React.RefAttributes<React.ComponentType<BasicLayoutProps>>> & import("hoist-non-react-statics").NonReactStatics<React.ComponentType<BasicLayoutProps>, {}>;
45
45
  export default _default;