@oceanbase/ui 0.4.20 → 0.4.22

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 (135) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.js +121 -15
  3. package/es/Action/style/index.js +8 -4
  4. package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
  5. package/es/BasicLayout/locale/ja-JP.js +12 -0
  6. package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  7. package/es/BatchOperationBar/locale/ja-JP.js +6 -0
  8. package/es/Boundary/locale/en-US.js +1 -1
  9. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  10. package/es/Boundary/locale/ja-JP.js +10 -0
  11. package/es/Boundary/locale/zh-CN.js +1 -1
  12. package/es/Boundary/locale/zh-TW.js +1 -1
  13. package/es/DateRanger/locale/ja-JP.d.ts +56 -0
  14. package/es/DateRanger/locale/ja-JP.js +20 -0
  15. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  16. package/es/Dialog/locale/ja-JP.js +4 -0
  17. package/es/DocDialog/locale/ja-JP.d.ts +2 -0
  18. package/es/DocDialog/locale/ja-JP.js +1 -0
  19. package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
  20. package/es/FullscreenBox/locale/ja-JP.js +1 -0
  21. package/es/GraphToolbar/locale/ja-JP.d.ts +9 -0
  22. package/es/GraphToolbar/locale/ja-JP.js +8 -0
  23. package/es/Highlight/locale/ja-JP.d.ts +4 -0
  24. package/es/Highlight/locale/ja-JP.js +3 -0
  25. package/es/Login/locale/ja-JP.d.ts +28 -0
  26. package/es/Login/locale/ja-JP.js +27 -0
  27. package/es/Login/locale/zh-CN.js +2 -2
  28. package/es/PageContainer/locale/ja-JP.d.ts +4 -0
  29. package/es/PageContainer/locale/ja-JP.js +3 -0
  30. package/es/Password/locale/ja-JP.d.ts +13 -0
  31. package/es/Password/locale/ja-JP.js +12 -0
  32. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  33. package/es/Ranger/locale/ja-JP.js +29 -0
  34. package/es/SideTip/locale/ja-JP.d.ts +2 -0
  35. package/es/SideTip/locale/ja-JP.js +1 -0
  36. package/es/TaskGraph/locale/ja-JP.d.ts +13 -0
  37. package/es/TaskGraph/locale/ja-JP.js +12 -0
  38. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  39. package/es/Welcome/locale/ja-JP.js +4 -0
  40. package/es/locale/ja-JP.d.ts +3 -0
  41. package/es/locale/ja-JP.js +42 -0
  42. package/lib/Action/Group.js +122 -46
  43. package/lib/Action/Item.js +14 -9
  44. package/lib/Action/style/index.js +16 -1
  45. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  46. package/lib/BackgroundTaskManager/index.js +3 -12
  47. package/lib/BasicLayout/Header.js +120 -62
  48. package/lib/BasicLayout/index.js +166 -143
  49. package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
  50. package/lib/BasicLayout/locale/ja-JP.js +36 -0
  51. package/lib/BatchOperationBar/index.js +59 -44
  52. package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  53. package/lib/BatchOperationBar/locale/ja-JP.js +30 -0
  54. package/lib/Boundary/Components/Code.js +11 -5
  55. package/lib/Boundary/Components/Exception.js +33 -23
  56. package/lib/Boundary/Components/Function.js +11 -5
  57. package/lib/Boundary/locale/en-US.js +1 -1
  58. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  59. package/lib/Boundary/locale/ja-JP.js +34 -0
  60. package/lib/Boundary/locale/zh-CN.js +1 -1
  61. package/lib/Boundary/locale/zh-TW.js +1 -1
  62. package/lib/ContentWithIcon/index.js +30 -22
  63. package/lib/ContentWithQuestion/index.js +8 -3
  64. package/lib/DateRanger/PickerPanel.js +235 -217
  65. package/lib/DateRanger/Ranger.js +349 -313
  66. package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
  67. package/lib/DateRanger/locale/ja-JP.js +49 -0
  68. package/lib/Dialog/Anchor.js +8 -5
  69. package/lib/Dialog/EventProxy.js +3 -12
  70. package/lib/Dialog/index.js +132 -108
  71. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  72. package/lib/Dialog/locale/ja-JP.js +28 -0
  73. package/lib/DocDialog/index.js +3 -2
  74. package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
  75. package/lib/DocDialog/locale/ja-JP.js +25 -0
  76. package/lib/FooterToolbar/index.js +3 -2
  77. package/lib/FullscreenBox/index.js +16 -7
  78. package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
  79. package/lib/FullscreenBox/locale/ja-JP.js +25 -0
  80. package/lib/GraphToolbar/index.js +70 -58
  81. package/lib/GraphToolbar/locale/ja-JP.d.ts +9 -0
  82. package/lib/GraphToolbar/locale/ja-JP.js +32 -0
  83. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  84. package/lib/Highlight/DiffView/index.js +35 -31
  85. package/lib/Highlight/HighlightCell.js +13 -10
  86. package/lib/Highlight/JsonView.js +15 -14
  87. package/lib/Highlight/index.js +50 -45
  88. package/lib/Highlight/locale/ja-JP.d.ts +4 -0
  89. package/lib/Highlight/locale/ja-JP.js +27 -0
  90. package/lib/IconFont/index.js +2 -12
  91. package/lib/LightFilter/index.js +3 -2
  92. package/lib/LocaleDropdown/index.js +13 -20
  93. package/lib/Login/ActivateForm.js +53 -60
  94. package/lib/Login/LoginForm.js +118 -109
  95. package/lib/Login/RegisterForm.js +79 -86
  96. package/lib/Login/index.js +92 -64
  97. package/lib/Login/locale/ja-JP.d.ts +28 -0
  98. package/lib/Login/locale/ja-JP.js +51 -0
  99. package/lib/Login/locale/zh-CN.js +2 -2
  100. package/lib/NavMenu/index.js +9 -8
  101. package/lib/PageContainer/ItemRender.js +5 -5
  102. package/lib/PageContainer/index.js +8 -4
  103. package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
  104. package/lib/PageContainer/locale/ja-JP.js +27 -0
  105. package/lib/PageLoading/index.js +6 -16
  106. package/lib/Password/Content.js +38 -42
  107. package/lib/Password/index.js +83 -68
  108. package/lib/Password/locale/ja-JP.d.ts +13 -0
  109. package/lib/Password/locale/ja-JP.js +36 -0
  110. package/lib/ProCard/index.js +4 -3
  111. package/lib/ProTable/index.js +5 -4
  112. package/lib/Ranger/QuickPicker.js +24 -15
  113. package/lib/Ranger/Ranger.js +37 -34
  114. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  115. package/lib/Ranger/locale/ja-JP.js +53 -0
  116. package/lib/SideTip/Dragger.js +5 -4
  117. package/lib/SideTip/IconLoading.js +25 -25
  118. package/lib/SideTip/index.js +19 -10
  119. package/lib/SideTip/locale/ja-JP.d.ts +2 -0
  120. package/lib/SideTip/locale/ja-JP.js +25 -0
  121. package/lib/TagSelect/Group.js +9 -5
  122. package/lib/TagSelect/Item.js +22 -18
  123. package/lib/TaskGraph/Graph.js +29 -24
  124. package/lib/TaskGraph/index.js +56 -50
  125. package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
  126. package/lib/TaskGraph/locale/ja-JP.js +36 -0
  127. package/lib/TreeSearch/index.js +30 -35
  128. package/lib/Welcome/index.js +64 -37
  129. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  130. package/lib/Welcome/locale/ja-JP.js +28 -0
  131. package/lib/Welcome/step.js +11 -4
  132. package/lib/locale/LocaleWrapper.js +15 -14
  133. package/lib/locale/ja-JP.d.ts +3 -0
  134. package/lib/locale/ja-JP.js +71 -0
  135. package/package.json +5 -5
@@ -0,0 +1,28 @@
1
+ declare const _default: {
2
+ usernamePlaceholder: string;
3
+ usernameMessage: string;
4
+ passwordPlaceholder: string;
5
+ passwordMessage: string;
6
+ loginText: string;
7
+ otherLoginText: string;
8
+ isLoadingWarn: string;
9
+ usernameLabel: string;
10
+ switchLoginLabel: string;
11
+ switchRegisterLabel: string;
12
+ userExistMessage: string;
13
+ usernameFormatMessage: string;
14
+ samePasswordMessage: string;
15
+ usernameHelp: string;
16
+ usernameLengthMessage: string;
17
+ passwordLabel: string;
18
+ passwordHelp: string;
19
+ confirmPwdLabel: string;
20
+ confirmPwdMessage: string;
21
+ registerBtn: string;
22
+ registerTitle: string;
23
+ activeTitle: string;
24
+ activeTitleDescrition: string;
25
+ activeSubmitBtn: string;
26
+ activeBackBtn: string;
27
+ };
28
+ export default _default;
@@ -0,0 +1,51 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Login/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ usernamePlaceholder: "ユーザー名を入力してください",
27
+ usernameMessage: "ユーザー名を入力してください",
28
+ passwordPlaceholder: "パスワードを入力してください",
29
+ passwordMessage: "パスワードを入力してください",
30
+ loginText: "ログイン",
31
+ otherLoginText: "外部アカウントでログイン",
32
+ isLoadingWarn: "処理中",
33
+ usernameLabel: "ユーザー名",
34
+ switchLoginLabel: "既存アカウントにログイン",
35
+ switchRegisterLabel: "アカウントを作成",
36
+ userExistMessage: "ユーザー名は既に存在します",
37
+ usernameFormatMessage: "ユーザー名の形式が要件を満たしていません",
38
+ samePasswordMessage: "確認パスワードが一致しません",
39
+ usernameHelp: "半角英数字、アンダースコア、特殊文字 (._+@#$%) が使用可能です(4〜48文字)",
40
+ usernameLengthMessage: "ユーザー名の長さは 4~48 文字",
41
+ passwordLabel: "パスワード",
42
+ passwordHelp: "数字、大文字、小文字、特殊文字 (._+@#$%) をそれぞれ2文字以上含み、8〜32文字で入力してください",
43
+ confirmPwdLabel: "パスワード確認",
44
+ confirmPwdMessage: "パスワードを再度入力してください",
45
+ registerBtn: "今すぐ登録",
46
+ registerTitle: "アカウント登録",
47
+ activeTitle: "パスワードを設定してアカウントを有効化",
48
+ activeTitleDescrition: "セキュリティ保護のため、パスワードを設定してアカウントを有効化してください",
49
+ activeSubmitBtn: "有効化する",
50
+ activeBackBtn: "戻る"
51
+ };
@@ -23,8 +23,8 @@ __export(zh_CN_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(zh_CN_exports);
25
25
  var zh_CN_default = {
26
- usernamePlaceholder: "请输入账号",
27
- usernameMessage: "请输入账号",
26
+ usernamePlaceholder: "请输入用户名",
27
+ usernameMessage: "请输入用户名",
28
28
  passwordPlaceholder: "请输入密码",
29
29
  passwordMessage: "请输入密码",
30
30
  loginText: "登录",
@@ -35,10 +35,11 @@ module.exports = __toCommonJS(NavMenu_exports);
35
35
  var import_design = require("@oceanbase/design");
36
36
  var import_lodash = require("lodash");
37
37
  var import_path_to_regexp = require("path-to-regexp");
38
- var import_react = __toESM(require("react"));
38
+ var import_react = require("react");
39
39
  var import_util = require("../_util");
40
40
  var import_useNavigate = __toESM(require("../_util/useNavigate"));
41
41
  var import_index = require("./index.less");
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var prefix = (0, import_util.getPrefix)("menu");
43
44
  var NavMenu_default = (props) => {
44
45
  const { menuList, className, style } = props;
@@ -95,7 +96,7 @@ var NavMenu_default = (props) => {
95
96
  },
96
97
  [navigate]
97
98
  );
98
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-container ${className}`, style }, /* @__PURE__ */ import_react.default.createElement(
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-container ${className}`, style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
100
  import_design.Menu,
100
101
  {
101
102
  style: { height: "100%", borderRight: 0 },
@@ -103,10 +104,10 @@ var NavMenu_default = (props) => {
103
104
  selectedKeys,
104
105
  onSelect: onMenuItemSelect,
105
106
  mode: "inline",
106
- theme: "light"
107
- },
108
- menus.map((config) => {
109
- return /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: config.key, disabled: config.disabled ?? false }, config.openNewTab ? /* @__PURE__ */ import_react.default.createElement("a", { id: config.id, href: config.link, target: "_blank", rel: "noreferrer" }, config.title) : /* @__PURE__ */ import_react.default.createElement("a", { id: config.id, onClick: () => onMenuClick(config.link) }, config.title));
110
- })
111
- ));
107
+ theme: "light",
108
+ children: menus.map((config) => {
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { disabled: config.disabled ?? false, children: config.openNewTab ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { id: config.id, href: config.link, target: "_blank", rel: "noreferrer", children: config.title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { id: config.id, onClick: () => onMenuClick(config.link), children: config.title }) }, config.key);
110
+ })
111
+ }
112
+ ) });
112
113
  };
@@ -32,21 +32,21 @@ __export(ItemRender_exports, {
32
32
  default: () => ItemRender_default
33
33
  });
34
34
  module.exports = __toCommonJS(ItemRender_exports);
35
- var import_react = __toESM(require("react"));
36
35
  var import_useNavigate = __toESM(require("../_util/useNavigate"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var ItemRender_default = ({ route, params, routes, paths }) => {
38
38
  const routeIndex = routes.indexOf(route);
39
39
  const last = routeIndex === routes.length - 1;
40
40
  const title = route.title || route.breadcrumbName;
41
41
  const path = route.href || routes.slice(0, routeIndex + 1).map((item) => item.path).join("/");
42
42
  const navigate = (0, import_useNavigate.default)();
43
- return last ? /* @__PURE__ */ import_react.default.createElement("span", null, title) : /* @__PURE__ */ import_react.default.createElement(
43
+ return last ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
44
  "a",
45
45
  {
46
46
  onClick: () => {
47
47
  navigate == null ? void 0 : navigate(path);
48
- }
49
- },
50
- title
48
+ },
49
+ children: title
50
+ }
51
51
  );
52
52
  };
@@ -43,6 +43,7 @@ var import_ItemRender = __toESM(require("./ItemRender"));
43
43
  var import_PageLoading = __toESM(require("../PageLoading"));
44
44
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
45
45
  var import_style = __toESM(require("./style"));
46
+ var import_jsx_runtime = require("react/jsx-runtime");
46
47
  var PageContainer = ({
47
48
  prefixCls: customizePrefixCls,
48
49
  className,
@@ -68,12 +69,15 @@ var PageContainer = ({
68
69
  `${rootPrefixCls}-page-header-heading-reload`,
69
70
  reloadProps.className
70
71
  );
71
- const newSubTitle = (reload || subTitle) && /* @__PURE__ */ import_react.default.createElement(import_design.Space, null, reload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
72
+ const newSubTitle = (reload || subTitle) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
73
+ reload && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.reload, children: (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls }) }),
74
+ subTitle
75
+ ] });
72
76
  const newHeader = header && {
73
77
  ...header,
74
78
  subTitle: newSubTitle,
75
79
  breadcrumb: breadcrumb && {
76
- itemRender: (route, params, routes, paths) => /* @__PURE__ */ import_react.default.createElement(import_ItemRender.default, { route, params, routes, paths }),
80
+ itemRender: (route, params, routes, paths) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ItemRender.default, { route, params, routes, paths }),
77
81
  ...breadcrumb
78
82
  }
79
83
  };
@@ -87,7 +91,7 @@ var PageContainer = ({
87
91
  className
88
92
  );
89
93
  return wrapSSR(
90
- /* @__PURE__ */ import_react.default.createElement(
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
95
  import_pro_components.PageContainer,
92
96
  {
93
97
  prefixCls: customizePrefixCls,
@@ -98,7 +102,7 @@ var PageContainer = ({
98
102
  extraContent,
99
103
  tabList,
100
104
  tabBarExtraContent,
101
- loading: loading === true ? /* @__PURE__ */ import_react.default.createElement(import_PageLoading.default, { matchWrapperHeight: false }) : loading,
105
+ loading: loading === true ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PageLoading.default, { matchWrapperHeight: false }) : loading,
102
106
  footerToolBarProps: {
103
107
  // render footer under parent instead of body by default
104
108
  portalDom: false,
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ reload: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/PageContainer/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ reload: "再読み込み"
27
+ };
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // src/PageLoading/index.tsx
@@ -32,15 +22,15 @@ __export(PageLoading_exports, {
32
22
  default: () => PageLoading_default
33
23
  });
34
24
  module.exports = __toCommonJS(PageLoading_exports);
35
- var import_react = __toESM(require("react"));
36
25
  var import_design = require("@oceanbase/design");
26
+ var import_jsx_runtime = require("react/jsx-runtime");
37
27
  var PageLoading = ({
38
28
  prefixCls: customizePrefixCls,
39
29
  style,
40
30
  matchWrapperHeight = false,
41
31
  ...restProps
42
32
  }) => {
43
- const spinElement = /* @__PURE__ */ import_react.default.createElement(
33
+ const spinElement = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
34
  import_design.Spin,
45
35
  {
46
36
  size: "large",
@@ -58,15 +48,15 @@ var PageLoading = ({
58
48
  ...restProps
59
49
  }
60
50
  );
61
- return matchWrapperHeight ? /* @__PURE__ */ import_react.default.createElement(
51
+ return matchWrapperHeight ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
52
  "div",
63
53
  {
64
54
  style: {
65
55
  height: "100%",
66
56
  position: "relative"
67
- }
68
- },
69
- spinElement
57
+ },
58
+ children: spinElement
59
+ }
70
60
  ) : spinElement;
71
61
  };
72
62
  var PageLoading_default = PageLoading;
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // src/Password/Content.tsx
@@ -34,14 +24,14 @@ __export(Content_exports, {
34
24
  module.exports = __toCommonJS(Content_exports);
35
25
  var import_icons = require("@oceanbase/icons");
36
26
  var import_design = require("@oceanbase/design");
37
- var import_react = __toESM(require("react"));
38
27
  var import_design2 = require("@oceanbase/design");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
39
29
  var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
40
30
  const { token } = import_design2.theme.useToken();
41
31
  const statusIconMap = {
42
- error: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleFilled, { style: { color: token.colorError } }),
43
- success: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleFilled, { style: { color: token.colorSuccess } }),
44
- wait: /* @__PURE__ */ import_react.default.createElement(
32
+ error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleFilled, { style: { color: token.colorError } }),
33
+ success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleFilled, { style: { color: token.colorSuccess } }),
34
+ wait: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
35
  "div",
46
36
  {
47
37
  style: {
@@ -49,19 +39,19 @@ var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
49
39
  alignItems: "center",
50
40
  justifyContent: "center",
51
41
  height: token.fontSize * token.lineHeight
52
- }
53
- },
54
- /* @__PURE__ */ import_react.default.createElement(
55
- "div",
56
- {
57
- style: {
58
- width: 8,
59
- height: 8,
60
- backgroundColor: token.colorFillSecondary,
61
- borderRadius: "50%"
42
+ },
43
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "div",
45
+ {
46
+ style: {
47
+ width: 8,
48
+ height: 8,
49
+ backgroundColor: token.colorFillSecondary,
50
+ borderRadius: "50%"
51
+ }
62
52
  }
63
- }
64
- )
53
+ )
54
+ }
65
55
  )
66
56
  };
67
57
  const isRequireFail = rules.filter((rule) => !rule.optional).filter((rule) => fieldError.includes(rule.message)).length > 0;
@@ -78,21 +68,27 @@ var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
78
68
  } else {
79
69
  strokeColor = token.colorSuccess;
80
70
  }
81
- return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_design.Progress, { percent: value ? percent : 0, strokeColor, showInfo: false }), /* @__PURE__ */ import_react.default.createElement("ul", { style: { margin: 0, marginTop: "10px", listStyle: "none", padding: "0" } }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 4, direction: "vertical" }, rules == null ? void 0 : rules.map((rule) => {
82
- const isError = fieldError.includes(rule.message);
83
- let status = "wait";
84
- if (isError) {
85
- status = rule.optional ? "wait" : "error";
86
- } else {
87
- status = "success";
88
- }
89
- if (!value) {
90
- status = "error";
91
- }
92
- if (!isTouched) {
93
- status = "wait";
94
- }
95
- return /* @__PURE__ */ import_react.default.createElement("li", { key: `${rule.message}` }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: status === "wait" ? 14 : 8, align: "start" }, isValidating ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null) : statusIconMap[status], /* @__PURE__ */ import_react.default.createElement("span", null, rule.message)));
96
- }))));
71
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Progress, { percent: value ? percent : 0, strokeColor, showInfo: false }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: { margin: 0, marginTop: "10px", listStyle: "none", padding: "0" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Space, { size: 4, direction: "vertical", children: rules == null ? void 0 : rules.map((rule) => {
74
+ const isError = fieldError.includes(rule.message);
75
+ let status = "wait";
76
+ if (isError) {
77
+ status = rule.optional ? "wait" : "error";
78
+ } else {
79
+ status = "success";
80
+ }
81
+ if (!value) {
82
+ status = "error";
83
+ }
84
+ if (!isTouched) {
85
+ status = "wait";
86
+ }
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: status === "wait" ? 14 : 8, align: "start", children: [
88
+ isValidating ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}) : statusIconMap[status],
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: rule.message })
90
+ ] }) }, `${rule.message}`);
91
+ }) }) })
92
+ ] });
97
93
  };
98
94
  var Content_default = Content;
@@ -34,12 +34,13 @@ __export(Password_exports, {
34
34
  module.exports = __toCommonJS(Password_exports);
35
35
  var import_design = require("@oceanbase/design");
36
36
  var import_randexp = __toESM(require("randexp"));
37
- var import_react = __toESM(require("react"));
37
+ var import_react = require("react");
38
38
  var import_design2 = require("@oceanbase/design");
39
39
  var import_icons = require("@oceanbase/icons");
40
40
  var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
41
41
  var import_Content = __toESM(require("./Content"));
42
42
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var Password = ({
44
45
  value,
45
46
  locale,
@@ -95,81 +96,95 @@ var Password = ({
95
96
  }
96
97
  return getRandomPassword();
97
98
  };
98
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ import_react.default.createElement(
99
- import_design.Popover,
100
- {
101
- trigger: "click",
102
- placement: "right",
103
- popupAlign: {
104
- offset: [48, 0]
105
- },
106
- content: /* @__PURE__ */ import_react.default.createElement(
107
- import_Content.default,
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex" }, children: [
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
+ import_design.Popover,
108
103
  {
109
- isTouched,
110
- value,
111
- isValidating,
112
- rules: newRules,
113
- fieldError
104
+ trigger: "click",
105
+ placement: "right",
106
+ popupAlign: {
107
+ offset: [48, 0]
108
+ },
109
+ content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ import_Content.default,
111
+ {
112
+ isTouched,
113
+ value,
114
+ isValidating,
115
+ rules: newRules,
116
+ fieldError
117
+ }
118
+ ),
119
+ overlayStyle: { maxWidth: 400 },
120
+ overlayInnerStyle: {
121
+ padding: `${token.padding / 2}px ${token.padding}px ${token.padding}px ${token.padding}px`
122
+ },
123
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
+ import_design.Input.Password,
125
+ {
126
+ value,
127
+ autoComplete: "new-password",
128
+ onChange: (e) => {
129
+ var _a;
130
+ handleChange((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
131
+ },
132
+ placeholder: generatePasswordRegex ? locale.generatePlaceholder : locale.placeholder,
133
+ ...restProps
134
+ }
135
+ )
114
136
  }
115
137
  ),
116
- overlayStyle: { maxWidth: 400 },
117
- overlayInnerStyle: {
118
- padding: `${token.padding / 2}px ${token.padding}px ${token.padding}px ${token.padding}px`
119
- }
120
- },
121
- /* @__PURE__ */ import_react.default.createElement(
122
- import_design.Input.Password,
123
- {
124
- value,
125
- autoComplete: "new-password",
126
- onChange: (e) => {
127
- var _a;
128
- handleChange((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
129
- },
130
- placeholder: generatePasswordRegex ? locale.generatePlaceholder : locale.placeholder,
131
- ...restProps
132
- }
133
- )
134
- ), generatePasswordRegex && /* @__PURE__ */ import_react.default.createElement(
135
- import_design.Button,
136
- {
137
- onClick: () => {
138
- if (generatePassword instanceof Function) {
139
- handleChange(generatePassword());
140
- } else {
141
- handleChange(getRandomPassword());
138
+ generatePasswordRegex && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ import_design.Button,
140
+ {
141
+ onClick: () => {
142
+ if (generatePassword instanceof Function) {
143
+ handleChange(generatePassword());
144
+ } else {
145
+ handleChange(getRandomPassword());
146
+ }
147
+ },
148
+ style: { marginLeft: 8 },
149
+ children: locale.randomlyGenerate
142
150
  }
143
- },
144
- style: { marginLeft: 8 }
145
- },
146
- locale.randomlyGenerate
147
- )), value && (fieldError == null ? void 0 : fieldError.length) === 0 && /* @__PURE__ */ import_react.default.createElement(
148
- "div",
149
- {
150
- style: {
151
- fontSize: 14,
152
- color: token.colorTextTertiary,
153
- lineHeight: "22px",
154
- marginTop: token.marginXXS
155
- }
156
- },
157
- locale.pleaseRememberYourPassword,
158
- /* @__PURE__ */ import_react.default.createElement(
159
- import_design.Typography.Text,
151
+ )
152
+ ] }),
153
+ value && (fieldError == null ? void 0 : fieldError.length) === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
154
+ "div",
160
155
  {
161
- copyable: {
162
- text: value,
163
- icon: [
164
- /* @__PURE__ */ import_react.default.createElement(import_design.Space, { key: "copy", size: token.marginXXS }, /* @__PURE__ */ import_react.default.createElement(import_icons.CopyOutlined, null), /* @__PURE__ */ import_react.default.createElement("a", null, locale.copyPassword)),
165
- /* @__PURE__ */ import_react.default.createElement(import_design.Space, { key: "copy-success", size: token.marginXXS }, /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null), /* @__PURE__ */ import_react.default.createElement("a", null, locale.copyPassword))
166
- ],
167
- tooltips: ["", locale.copySuccessfully]
156
+ style: {
157
+ fontSize: 14,
158
+ color: token.colorTextTertiary,
159
+ lineHeight: "22px",
160
+ marginTop: token.marginXXS
168
161
  },
169
- style: { marginLeft: token.marginXS }
162
+ children: [
163
+ locale.pleaseRememberYourPassword,
164
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
165
+ import_design.Typography.Text,
166
+ {
167
+ copyable: {
168
+ text: value,
169
+ icon: [
170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: token.marginXXS, children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CopyOutlined, {}),
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { children: locale.copyPassword })
173
+ ] }, "copy"),
174
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: token.marginXXS, children: [
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckOutlined, {}),
176
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { children: locale.copyPassword })
177
+ ] }, "copy-success")
178
+ ],
179
+ tooltips: ["", locale.copySuccessfully]
180
+ },
181
+ style: { marginLeft: token.marginXS }
182
+ }
183
+ )
184
+ ]
170
185
  }
171
186
  )
172
- ));
187
+ ] });
173
188
  };
174
189
  var Password_default = (0, import_LocaleWrapper.default)({
175
190
  componentName: "Password",
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ lengthRuleMessage: string;
3
+ charRuleMessage: string;
4
+ strengthRuleMessage: string;
5
+ placeholder: string;
6
+ generatePlaceholder: string;
7
+ randomlyGenerate: string;
8
+ pleaseRememberYourPassword: string;
9
+ copySuccessfully: string;
10
+ copyPassword: string;
11
+ andKeepItProperly: string;
12
+ };
13
+ export default _default;
@@ -0,0 +1,36 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Password/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ lengthRuleMessage: "長さは 8~32 文字",
27
+ charRuleMessage: '英字、数字、および特殊文字(~!@#%^&*_-+= (){}[]:;,.?/`$"<>)のみ使用可能',
28
+ strengthRuleMessage: "大文字・小文字・数字・特殊文字をそれぞれ2文字以上含める必要があります",
29
+ placeholder: "パスワードを入力してください",
30
+ generatePlaceholder: "入力またはランダム生成",
31
+ randomlyGenerate: "ランダム生成",
32
+ pleaseRememberYourPassword: "パスワードを必ず保存してください",
33
+ copySuccessfully: "コピー成功",
34
+ copyPassword: "パスワードをコピーし",
35
+ andKeepItProperly: "適切に保管してください"
36
+ };