@oceanbase/ui 0.4.19 → 0.4.21
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.
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/Group.js +121 -15
- package/es/Action/style/index.js +8 -4
- package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
- package/es/BasicLayout/locale/ja-JP.js +12 -0
- package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
- package/es/BatchOperationBar/locale/ja-JP.js +6 -0
- package/es/Boundary/locale/ja-JP.d.ts +11 -0
- package/es/Boundary/locale/ja-JP.js +10 -0
- package/es/DateRanger/Ranger.d.ts +4 -0
- package/es/DateRanger/Ranger.js +158 -14
- package/es/DateRanger/constant/index.js +1 -1
- package/es/DateRanger/index.less +23 -0
- package/es/DateRanger/locale/ja-JP.d.ts +56 -0
- package/es/DateRanger/locale/ja-JP.js +20 -0
- package/es/Dialog/locale/ja-JP.d.ts +5 -0
- package/es/Dialog/locale/ja-JP.js +4 -0
- package/es/DocDialog/locale/ja-JP.d.ts +2 -0
- package/es/DocDialog/locale/ja-JP.js +1 -0
- package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
- package/es/FullscreenBox/locale/ja-JP.js +1 -0
- package/es/GraphToolbar/locale/ja-JP.d.ts +9 -0
- package/es/GraphToolbar/locale/ja-JP.js +8 -0
- package/es/Highlight/locale/ja-JP.d.ts +4 -0
- package/es/Highlight/locale/ja-JP.js +3 -0
- package/es/Login/locale/ja-JP.d.ts +28 -0
- package/es/Login/locale/ja-JP.js +27 -0
- package/es/PageContainer/locale/ja-JP.d.ts +4 -0
- package/es/PageContainer/locale/ja-JP.js +3 -0
- package/es/Password/locale/ja-JP.d.ts +13 -0
- package/es/Password/locale/ja-JP.js +12 -0
- package/es/ProTable/index.js +4 -1
- package/es/Ranger/locale/ja-JP.d.ts +28 -0
- package/es/Ranger/locale/ja-JP.js +29 -0
- package/es/SideTip/locale/ja-JP.d.ts +2 -0
- package/es/SideTip/locale/ja-JP.js +1 -0
- package/es/TaskGraph/locale/ja-JP.d.ts +13 -0
- package/es/TaskGraph/locale/ja-JP.js +12 -0
- package/es/Welcome/locale/ja-JP.d.ts +5 -0
- package/es/Welcome/locale/ja-JP.js +4 -0
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +42 -0
- package/lib/Action/Group.js +122 -46
- package/lib/Action/Item.js +14 -9
- package/lib/Action/style/index.js +16 -1
- package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
- package/lib/BackgroundTaskManager/index.js +3 -12
- package/lib/BasicLayout/Header.js +120 -62
- package/lib/BasicLayout/index.js +166 -143
- package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
- package/lib/BasicLayout/locale/ja-JP.js +36 -0
- package/lib/BatchOperationBar/index.js +59 -44
- package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
- package/lib/BatchOperationBar/locale/ja-JP.js +30 -0
- package/lib/Boundary/Components/Code.js +11 -5
- package/lib/Boundary/Components/Exception.js +33 -23
- package/lib/Boundary/Components/Function.js +11 -5
- package/lib/Boundary/locale/ja-JP.d.ts +11 -0
- package/lib/Boundary/locale/ja-JP.js +34 -0
- package/lib/ContentWithIcon/index.js +30 -22
- package/lib/ContentWithQuestion/index.js +8 -3
- package/lib/DateRanger/PickerPanel.js +235 -217
- package/lib/DateRanger/Ranger.d.ts +4 -0
- package/lib/DateRanger/Ranger.js +396 -227
- package/lib/DateRanger/constant/index.js +1 -1
- package/lib/DateRanger/index.less +23 -0
- package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
- package/lib/DateRanger/locale/ja-JP.js +49 -0
- package/lib/Dialog/Anchor.js +8 -5
- package/lib/Dialog/EventProxy.js +3 -12
- package/lib/Dialog/index.js +132 -108
- package/lib/Dialog/locale/ja-JP.d.ts +5 -0
- package/lib/Dialog/locale/ja-JP.js +28 -0
- package/lib/DocDialog/index.js +3 -2
- package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
- package/lib/DocDialog/locale/ja-JP.js +25 -0
- package/lib/FooterToolbar/index.js +3 -2
- package/lib/FullscreenBox/index.js +16 -7
- package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
- package/lib/FullscreenBox/locale/ja-JP.js +25 -0
- package/lib/GraphToolbar/index.js +70 -58
- package/lib/GraphToolbar/locale/ja-JP.d.ts +9 -0
- package/lib/GraphToolbar/locale/ja-JP.js +32 -0
- package/lib/Highlight/DiffView/DiffCells.js +17 -10
- package/lib/Highlight/DiffView/index.js +35 -31
- package/lib/Highlight/HighlightCell.js +13 -10
- package/lib/Highlight/JsonView.js +15 -14
- package/lib/Highlight/index.js +50 -45
- package/lib/Highlight/locale/ja-JP.d.ts +4 -0
- package/lib/Highlight/locale/ja-JP.js +27 -0
- package/lib/IconFont/index.js +2 -12
- package/lib/LightFilter/index.js +3 -2
- package/lib/LocaleDropdown/index.js +13 -20
- package/lib/Login/ActivateForm.js +53 -60
- package/lib/Login/LoginForm.js +118 -109
- package/lib/Login/RegisterForm.js +79 -86
- package/lib/Login/index.js +92 -64
- package/lib/Login/locale/ja-JP.d.ts +28 -0
- package/lib/Login/locale/ja-JP.js +51 -0
- package/lib/NavMenu/index.js +9 -8
- package/lib/PageContainer/ItemRender.js +5 -5
- package/lib/PageContainer/index.js +8 -4
- package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
- package/lib/PageContainer/locale/ja-JP.js +27 -0
- package/lib/PageLoading/index.js +6 -16
- package/lib/Password/Content.js +38 -42
- package/lib/Password/index.js +83 -68
- package/lib/Password/locale/ja-JP.d.ts +13 -0
- package/lib/Password/locale/ja-JP.js +36 -0
- package/lib/ProCard/index.js +4 -3
- package/lib/ProTable/index.js +10 -5
- package/lib/Ranger/QuickPicker.js +24 -15
- package/lib/Ranger/Ranger.js +37 -34
- package/lib/Ranger/locale/ja-JP.d.ts +28 -0
- package/lib/Ranger/locale/ja-JP.js +53 -0
- package/lib/SideTip/Dragger.js +5 -4
- package/lib/SideTip/IconLoading.js +25 -25
- package/lib/SideTip/index.js +19 -10
- package/lib/SideTip/locale/ja-JP.d.ts +2 -0
- package/lib/SideTip/locale/ja-JP.js +25 -0
- package/lib/TagSelect/Group.js +9 -5
- package/lib/TagSelect/Item.js +22 -18
- package/lib/TaskGraph/Graph.js +29 -24
- package/lib/TaskGraph/index.js +56 -50
- package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
- package/lib/TaskGraph/locale/ja-JP.js +36 -0
- package/lib/TreeSearch/index.js +30 -35
- package/lib/Welcome/index.js +64 -37
- package/lib/Welcome/locale/ja-JP.d.ts +5 -0
- package/lib/Welcome/locale/ja-JP.js +28 -0
- package/lib/Welcome/step.js +11 -4
- package/lib/locale/LocaleWrapper.js +15 -14
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +71 -0
- 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 桁の数字、2 文字の大文字、2 文字の小文字、2 文字の特殊文字 (._+@#$%) を含み、長さ 8~32 文字",
|
|
43
|
+
confirmPwdLabel: "パスワード確認",
|
|
44
|
+
confirmPwdMessage: "パスワードを再度入力してください",
|
|
45
|
+
registerBtn: "今すぐ登録",
|
|
46
|
+
registerTitle: "アカウント登録",
|
|
47
|
+
activeTitle: "パスワードを設定してアカウントを有効化",
|
|
48
|
+
activeTitleDescrition: "アカウントのセキュリティのため、パスワードを設定してアカウントを有効化する必要があります",
|
|
49
|
+
activeSubmitBtn: "有効化",
|
|
50
|
+
activeBackBtn: "前のステップに戻る"
|
|
51
|
+
};
|
package/lib/NavMenu/index.js
CHANGED
|
@@ -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 =
|
|
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__ */
|
|
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
|
-
|
|
109
|
-
|
|
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__ */
|
|
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
|
-
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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,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
|
+
};
|
package/lib/PageLoading/index.js
CHANGED
|
@@ -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__ */
|
|
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__ */
|
|
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
|
-
|
|
57
|
+
},
|
|
58
|
+
children: spinElement
|
|
59
|
+
}
|
|
70
60
|
) : spinElement;
|
|
71
61
|
};
|
|
72
62
|
var PageLoading_default = PageLoading;
|
package/lib/Password/Content.js
CHANGED
|
@@ -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__ */
|
|
43
|
-
success: /* @__PURE__ */
|
|
44
|
-
wait: /* @__PURE__ */
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
status =
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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;
|
package/lib/Password/index.js
CHANGED
|
@@ -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 =
|
|
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__ */
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
],
|
|
167
|
-
tooltips: ["", locale.copySuccessfully]
|
|
156
|
+
style: {
|
|
157
|
+
fontSize: 14,
|
|
158
|
+
color: token.colorTextTertiary,
|
|
159
|
+
lineHeight: "22px",
|
|
160
|
+
marginTop: token.marginXXS
|
|
168
161
|
},
|
|
169
|
-
|
|
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
|
+
};
|