@oceanbase/ui 0.2.12 → 0.2.14

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 (95) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Item.js +6 -8
  3. package/es/Action/index.d.ts +1 -0
  4. package/es/BackgroundTaskManager/index.d.ts +5 -5
  5. package/es/BackgroundTaskManager/index.js +1 -1
  6. package/es/BasicLayout/Header.d.ts +1 -1
  7. package/es/BasicLayout/Header.js +4 -4
  8. package/es/BasicLayout/index.d.ts +3 -2
  9. package/es/BasicLayout/index.js +4 -4
  10. package/es/BasicLayout/style/index.d.ts +2 -2
  11. package/es/BatchOperationBar/index.d.ts +3 -3
  12. package/es/Boundary/constant.d.ts +4 -4
  13. package/es/Boundary/index.d.ts +1 -0
  14. package/es/DocDialog/index.js +1 -2
  15. package/es/FullscreenBox/index.d.ts +1 -1
  16. package/es/Highlight/JsonView.d.ts +1 -0
  17. package/es/Highlight/index.d.ts +4 -3
  18. package/es/LocaleDropdown/index.d.ts +1 -1
  19. package/es/Login/ActivateForm.d.ts +1 -1
  20. package/es/Login/ActivateForm.js +5 -5
  21. package/es/Login/LoginForm.d.ts +1 -1
  22. package/es/Login/RegisterForm.d.ts +1 -1
  23. package/es/Login/RegisterForm.js +5 -5
  24. package/es/Login/index.d.ts +2 -2
  25. package/es/NavMenu/index.js +5 -6
  26. package/es/PageContainer/ItemRender.d.ts +2 -1
  27. package/es/PageContainer/ItemRender.js +4 -3
  28. package/es/PageContainer/index.d.ts +2 -2
  29. package/es/PageContainer/style/index.d.ts +1 -1
  30. package/es/Password/index.d.ts +2 -2
  31. package/es/Ranger/QuickPicker.d.ts +2 -1
  32. package/es/Ranger/Ranger.d.ts +3 -3
  33. package/es/Ranger/index.d.ts +1 -32
  34. package/es/SideTip/index.d.ts +4 -4
  35. package/es/TreeSearch/index.d.ts +1 -1
  36. package/es/TreeSearch/util.d.ts +1 -0
  37. package/es/Welcome/index.d.ts +2 -2
  38. package/es/_util/genComponentStyleHook.d.ts +1 -1
  39. package/es/_util/genComponentStyleHook.js +5 -5
  40. package/es/_util/useNavigate.d.ts +2 -0
  41. package/es/_util/useNavigate.js +7 -0
  42. package/es/interface.d.ts +1 -1
  43. package/es/locale/en-US.js +2 -2
  44. package/es/locale/index.d.ts +2 -2
  45. package/es/locale/zh-CN.js +2 -2
  46. package/es/locale/zh-TW.js +2 -2
  47. package/lib/Action/Item.js +5 -7
  48. package/lib/Action/index.d.ts +1 -0
  49. package/lib/BackgroundTaskManager/index.d.ts +5 -5
  50. package/lib/BackgroundTaskManager/index.js +1 -1
  51. package/lib/BasicLayout/Header.d.ts +1 -1
  52. package/lib/BasicLayout/Header.js +4 -4
  53. package/lib/BasicLayout/index.d.ts +3 -2
  54. package/lib/BasicLayout/index.js +4 -4
  55. package/lib/BasicLayout/style/index.d.ts +2 -2
  56. package/lib/BatchOperationBar/index.d.ts +3 -3
  57. package/lib/Boundary/constant.d.ts +4 -4
  58. package/lib/Boundary/index.d.ts +1 -0
  59. package/lib/DocDialog/index.js +1 -2
  60. package/lib/FullscreenBox/index.d.ts +1 -1
  61. package/lib/Highlight/JsonView.d.ts +1 -0
  62. package/lib/Highlight/index.d.ts +4 -3
  63. package/lib/LocaleDropdown/index.d.ts +1 -1
  64. package/lib/Login/ActivateForm.d.ts +1 -1
  65. package/lib/Login/ActivateForm.js +5 -5
  66. package/lib/Login/LoginForm.d.ts +1 -1
  67. package/lib/Login/RegisterForm.d.ts +1 -1
  68. package/lib/Login/RegisterForm.js +5 -5
  69. package/lib/Login/index.d.ts +2 -2
  70. package/lib/NavMenu/index.js +5 -6
  71. package/lib/PageContainer/ItemRender.d.ts +2 -1
  72. package/lib/PageContainer/ItemRender.js +5 -4
  73. package/lib/PageContainer/index.d.ts +2 -2
  74. package/lib/PageContainer/style/index.d.ts +1 -1
  75. package/lib/Password/index.d.ts +2 -2
  76. package/lib/Ranger/QuickPicker.d.ts +2 -1
  77. package/lib/Ranger/Ranger.d.ts +3 -3
  78. package/lib/Ranger/index.d.ts +1 -32
  79. package/lib/SideTip/index.d.ts +4 -4
  80. package/lib/TreeSearch/index.d.ts +1 -1
  81. package/lib/TreeSearch/util.d.ts +1 -0
  82. package/lib/Welcome/index.d.ts +2 -2
  83. package/lib/_util/genComponentStyleHook.d.ts +1 -1
  84. package/lib/_util/genComponentStyleHook.js +3 -3
  85. package/lib/_util/useNavigate.d.ts +2 -0
  86. package/lib/_util/{useHistory.js → useNavigate.js} +10 -10
  87. package/lib/interface.d.ts +1 -1
  88. package/lib/locale/en-US.js +1 -1
  89. package/lib/locale/index.d.ts +2 -2
  90. package/lib/locale/zh-CN.js +1 -1
  91. package/lib/locale/zh-TW.js +1 -1
  92. package/package.json +9 -10
  93. package/es/_util/useHistory.d.ts +0 -4
  94. package/es/_util/useHistory.js +0 -9
  95. package/lib/_util/useHistory.d.ts +0 -4
@@ -1,33 +1,2 @@
1
- import QuickPicker from './QuickPicker';
2
- import InternalRanger from './Ranger';
3
- import type { RangeOption } from './typing';
4
- declare type InternalRangerType = typeof InternalRanger;
5
- interface RangerType extends InternalRangerType {
6
- NEAR_1_MINUTES: RangeOption;
7
- NEAR_5_MINUTES: RangeOption;
8
- NEAR_10_MINUTES: RangeOption;
9
- NEAR_20_MINUTES: RangeOption;
10
- NEAR_30_MINUTES: RangeOption;
11
- NEAR_1_HOURS: RangeOption;
12
- NEAR_2_HOURS: RangeOption;
13
- NEAR_3_HOURS: RangeOption;
14
- NEAR_6_HOURS: RangeOption;
15
- TODAY: RangeOption;
16
- YESTERDAY: RangeOption;
17
- TOMORROW: RangeOption;
18
- THIS_WEEK: RangeOption;
19
- LAST_WEEK: RangeOption;
20
- NEXT_WEEK: RangeOption;
21
- THIS_MONTH: RangeOption;
22
- LAST_MONTH: RangeOption;
23
- NEXT_MONTH: RangeOption;
24
- THIS_QUARTER: RangeOption;
25
- LAST_QUARTER: RangeOption;
26
- NEXT_QUARTER: RangeOption;
27
- THIS_YEAR: RangeOption;
28
- LAST_YEAR: RangeOption;
29
- NEXT_YEAR: RangeOption;
30
- QuickPicker: typeof QuickPicker;
31
- }
32
- declare const Ranger: RangerType;
1
+ declare const Ranger: any;
33
2
  export default Ranger;
@@ -1,10 +1,10 @@
1
- import type { BadgeProps } from 'antd/es/badge/index';
2
- import type { TooltipPropsWithTitle } from 'antd/es/tooltip/index';
1
+ import type { BadgeProps } from '@oceanbase/design/es/badge/index';
2
+ import type { TooltipPropsWithTitle } from '@oceanbase/design/es/tooltip/index';
3
3
  import React from 'react';
4
4
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
5
5
  import './index.less';
6
- export declare type SideTipType = 'primary' | 'default';
7
- export declare type SideTipSize = 'small' | 'default';
6
+ export type SideTipType = 'primary' | 'default';
7
+ export type SideTipSize = 'small' | 'default';
8
8
  export interface Position {
9
9
  /**
10
10
  * @title 距离右侧
@@ -1,4 +1,4 @@
1
- import type { DataNode } from 'antd/es/tree';
1
+ import type { DataNode } from '@oceanbase/design/es/tree';
2
2
  import React from 'react';
3
3
  export interface Node {
4
4
  originTitle?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Node, TreeNode } from '.';
2
3
  /** 根据 key 判断节点是否为叶子节点 */
3
4
  export declare const isLeaf: (node: TreeNode) => boolean;
@@ -1,4 +1,4 @@
1
- import type { ButtonProps } from 'antd/es/button';
1
+ import type { ButtonProps } from '@oceanbase/design/es/button';
2
2
  import React from 'react';
3
3
  import './index.less';
4
4
  export interface IntroduceItem {
@@ -19,7 +19,7 @@ export interface WelcomeLocale {
19
19
  helpTitle: string;
20
20
  defaultOperation: string;
21
21
  }
22
- export declare type StepType = 'default' | 'card';
22
+ export type StepType = 'default' | 'card';
23
23
  export interface WelcomeProps {
24
24
  title: string;
25
25
  description: string;
@@ -1,5 +1,5 @@
1
1
  import type { ProAliasToken } from '@ant-design/pro-components';
2
- import type { GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { GenerateStyle } from '@oceanbase/design/es/theme';
3
3
  export interface OBToken extends ProAliasToken {
4
4
  /** Wrap component class with `.` prefix */
5
5
  componentCls: string;
@@ -37,10 +37,10 @@ var import_react = __toESM(require("react"));
37
37
  var import_design = require("@oceanbase/design");
38
38
  function genComponentStyleHook(componentName, styleFn) {
39
39
  return (prefixCls) => {
40
+ const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
41
+ const rootPrefixCls = getPrefixCls();
42
+ const componentCls = `.${prefixCls}`;
40
43
  return (0, import_pro_components.useStyle)(componentName, (token) => {
41
- const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
42
- const rootPrefixCls = getPrefixCls();
43
- const componentCls = `.${prefixCls}`;
44
44
  const mergedToken = {
45
45
  ...token,
46
46
  componentCls,
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("@oceanbase/design/es/config-provider").NavigateFunction;
2
+ export default _default;
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // src/_util/useHistory.ts
20
- var useHistory_exports = {};
21
- __export(useHistory_exports, {
22
- default: () => useHistory_default
19
+ // src/_util/useNavigate.ts
20
+ var useNavigate_exports = {};
21
+ __export(useNavigate_exports, {
22
+ default: () => useNavigate_default
23
23
  });
24
- module.exports = __toCommonJS(useHistory_exports);
25
- var import_react_router_dom = require("react-router-dom");
26
- var useHistory_default = () => {
27
- return {
28
- push: import_react_router_dom.useHistory ? (0, import_react_router_dom.useHistory)().push : import_react_router_dom.useNavigate ? (0, import_react_router_dom.useNavigate)() : null
29
- };
24
+ module.exports = __toCommonJS(useNavigate_exports);
25
+ var import_react = require("react");
26
+ var import_design = require("@oceanbase/design");
27
+ var useNavigate_default = () => {
28
+ const { navigate } = (0, import_react.useContext)(import_design.ConfigProvider.ExtendedConfigContext);
29
+ return navigate;
30
30
  };
@@ -1 +1 @@
1
- export declare type Locale = 'zh-TW' | 'zh-CN' | 'en-US';
1
+ export type Locale = 'zh-TW' | 'zh-CN' | 'en-US';
@@ -32,7 +32,7 @@ __export(en_US_exports, {
32
32
  default: () => en_US_default
33
33
  });
34
34
  module.exports = __toCommonJS(en_US_exports);
35
- var import_en_US = __toESM(require("antd/es/locale/en_US"));
35
+ var import_en_US = __toESM(require("@oceanbase/design/es/locale/en-US"));
36
36
  var import_en_US2 = __toESM(require("../BasicLayout/locale/en-US"));
37
37
  var import_en_US3 = __toESM(require("../BatchOperationBar/locale/en-US"));
38
38
  var import_en_US4 = __toESM(require("../Boundary/locale/en-US"));
@@ -1,4 +1,4 @@
1
- import type { Locale as AntLocale } from 'antd/es/locale';
2
- export interface Locale extends AntLocale {
1
+ import type { Locale as DesignLocale } from '@oceanbase/design/es/locale';
2
+ export interface Locale extends DesignLocale {
3
3
  [key: string]: any;
4
4
  }
@@ -32,7 +32,7 @@ __export(zh_CN_exports, {
32
32
  default: () => zh_CN_default
33
33
  });
34
34
  module.exports = __toCommonJS(zh_CN_exports);
35
- var import_zh_CN = __toESM(require("antd/es/locale/zh_CN"));
35
+ var import_zh_CN = __toESM(require("@oceanbase/design/es/locale/zh-CN"));
36
36
  var import_zh_CN2 = __toESM(require("../BasicLayout/locale/zh-CN"));
37
37
  var import_zh_CN3 = __toESM(require("../BatchOperationBar/locale/zh-CN"));
38
38
  var import_zh_CN4 = __toESM(require("../Dialog/locale/zh-CN"));
@@ -32,7 +32,7 @@ __export(zh_TW_exports, {
32
32
  default: () => zh_TW_default
33
33
  });
34
34
  module.exports = __toCommonJS(zh_TW_exports);
35
- var import_zh_TW = __toESM(require("antd/es/locale/zh_TW"));
35
+ var import_zh_TW = __toESM(require("@oceanbase/design/es/locale/zh-TW"));
36
36
  var import_zh_TW2 = __toESM(require("../BasicLayout/locale/zh-TW"));
37
37
  var import_zh_TW3 = __toESM(require("../BatchOperationBar/locale/zh-TW"));
38
38
  var import_zh_TW4 = __toESM(require("../Dialog/locale/zh-TW"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "The UI library based on OceanBase Design",
5
5
  "keywords": [
6
6
  "OceanBase",
@@ -35,11 +35,11 @@
35
35
  "build": "father build"
36
36
  },
37
37
  "dependencies": {
38
- "@ant-design/cssinjs": "^1.11.1",
39
- "@ant-design/pro-components": "^2.6.4",
40
- "@oceanbase/design": "^0.2.11",
41
- "@oceanbase/icons": "^0.2.2",
42
- "@oceanbase/util": "^0.2.3",
38
+ "@ant-design/cssinjs": "^1.16.1",
39
+ "@ant-design/pro-components": "^2.6.10",
40
+ "@oceanbase/design": "^0.2.13",
41
+ "@oceanbase/icons": "^0.2.3",
42
+ "@oceanbase/util": "^0.2.5",
43
43
  "ahooks": "^2.10.14",
44
44
  "classnames": "^2.3.2",
45
45
  "dayjs": "^1.11.9",
@@ -52,7 +52,7 @@
52
52
  "moment": "^2.29.4",
53
53
  "path-to-regexp": "^6.2.1",
54
54
  "randexp": "^0.5.3",
55
- "rc-util": "^5.34.1",
55
+ "rc-util": "^5.35.0",
56
56
  "react-copy-to-clipboard": "^5.1.0",
57
57
  "react-json-view": "^1.21.3",
58
58
  "react-split-pane": "^0.1.92",
@@ -64,8 +64,7 @@
64
64
  "peerDependencies": {
65
65
  "@antv/g6": "3.4.10",
66
66
  "react": "^16.9.0",
67
- "react-dom": "^16.9.0",
68
- "react-router-dom": ">=5.2.0"
67
+ "react-dom": "^16.9.0"
69
68
  },
70
- "gitHead": "7832a50e185575f5f159f08ae0ef79136aab7a22"
69
+ "gitHead": "7444bbf570d5d05c83bf86f54543ae0cdf97b6e0"
71
70
  }
@@ -1,4 +0,0 @@
1
- declare const _default: () => {
2
- push: any;
3
- };
4
- export default _default;
@@ -1,9 +0,0 @@
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 +0,0 @@
1
- declare const _default: () => {
2
- push: any;
3
- };
4
- export default _default;