@oceanbase/ui 1.0.0-alpha.1 → 1.0.0-alpha.3
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/style/index.d.ts +2 -2
- 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/FooterToolbar/style/index.d.ts +0 -2
- package/es/FooterToolbar/style/index.js +0 -12
- package/es/PageContainer/index.js +14 -4
- package/es/PageContainer/style/index.js +5 -7
- package/es/ProCard/index.js +11 -3
- package/es/ProCard/style/index.d.ts +2 -2
- package/es/ProCard/style/index.js +6 -3
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/index.js +11 -5
- package/es/ProTable/style/index.d.ts +2 -2
- package/es/ProTable/style/index.js +6 -3
- package/lib/Action/Group.js +57 -46
- package/lib/Action/Item.js +14 -9
- package/lib/Action/style/index.d.ts +2 -2
- 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/BatchOperationBar/index.js +59 -44
- 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/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/Dialog/Anchor.js +8 -5
- package/lib/Dialog/EventProxy.js +3 -12
- package/lib/Dialog/index.js +132 -108
- package/lib/DocDialog/index.js +3 -2
- package/lib/FooterToolbar/index.js +3 -2
- package/lib/FooterToolbar/style/index.d.ts +0 -2
- package/lib/FooterToolbar/style/index.js +0 -17
- package/lib/FullscreenBox/index.js +16 -7
- package/lib/GraphToolbar/index.js +70 -58
- 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/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/NavMenu/index.js +9 -8
- package/lib/PageContainer/ItemRender.js +5 -5
- package/lib/PageContainer/index.js +17 -6
- package/lib/PageContainer/style/index.js +5 -6
- package/lib/PageLoading/index.js +6 -16
- package/lib/Password/Content.js +38 -42
- package/lib/Password/index.js +83 -68
- package/lib/ProCard/index.js +6 -3
- package/lib/ProCard/style/index.d.ts +2 -2
- package/lib/ProCard/style/index.js +6 -2
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/index.js +19 -8
- package/lib/ProTable/style/index.d.ts +2 -2
- package/lib/ProTable/style/index.js +7 -1
- package/lib/Ranger/QuickPicker.js +24 -15
- package/lib/Ranger/Ranger.js +37 -34
- package/lib/SideTip/Dragger.js +5 -4
- package/lib/SideTip/IconLoading.js +25 -25
- package/lib/SideTip/index.js +19 -10
- 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/TreeSearch/index.js +30 -35
- package/lib/Welcome/index.js +64 -37
- package/lib/Welcome/step.js +11 -4
- package/lib/locale/LocaleWrapper.js +15 -14
- package/package.json +4 -4
|
@@ -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/LocaleDropdown/index.tsx
|
|
@@ -35,25 +25,25 @@ module.exports = __toCommonJS(LocaleDropdown_exports);
|
|
|
35
25
|
var import_icons = require("@oceanbase/icons");
|
|
36
26
|
var import_util = require("@oceanbase/util");
|
|
37
27
|
var import_design = require("@oceanbase/design");
|
|
38
|
-
var import_react = __toESM(require("react"));
|
|
39
28
|
var import_constant = require("../constant");
|
|
40
29
|
var import_util2 = require("../_util");
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
31
|
var LocaleDropdown = ({
|
|
42
32
|
locales,
|
|
43
33
|
showLabel,
|
|
44
34
|
className,
|
|
45
35
|
...restProps
|
|
46
36
|
}) => {
|
|
47
|
-
const localeMenu = /* @__PURE__ */
|
|
37
|
+
const localeMenu = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
38
|
import_design.Menu,
|
|
49
39
|
{
|
|
50
40
|
onClick: ({ key }) => {
|
|
51
41
|
(0, import_util2.setLocale)(key);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
},
|
|
43
|
+
children: import_constant.LOCALE_LIST.filter((item) => !locales || locales.includes(item.value)).map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: item.label }, item.value))
|
|
44
|
+
}
|
|
55
45
|
);
|
|
56
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: localeMenu, ...restProps, children: showLabel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
47
|
"span",
|
|
58
48
|
{
|
|
59
49
|
style: {
|
|
@@ -66,9 +56,12 @@ var LocaleDropdown = ({
|
|
|
66
56
|
textAlign: "center",
|
|
67
57
|
border: "0.88px solid #ced4e1",
|
|
68
58
|
borderRadius: 14
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
) : /* @__PURE__ */
|
|
59
|
+
},
|
|
60
|
+
children: (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).minLabel
|
|
61
|
+
}
|
|
62
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className, children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.GlobalOutlined, {}),
|
|
64
|
+
(0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).shortLabel
|
|
65
|
+
] }) });
|
|
73
66
|
};
|
|
74
67
|
var LocaleDropdown_default = LocaleDropdown;
|
|
@@ -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/Login/ActivateForm.tsx
|
|
@@ -34,10 +24,11 @@ __export(ActivateForm_exports, {
|
|
|
34
24
|
module.exports = __toCommonJS(ActivateForm_exports);
|
|
35
25
|
var import_design = require("@oceanbase/design");
|
|
36
26
|
var import_lodash = require("lodash");
|
|
37
|
-
var import_react =
|
|
27
|
+
var import_react = require("react");
|
|
38
28
|
var import_util = require("../_util");
|
|
39
29
|
var import_index = require("./index.less");
|
|
40
30
|
var import_RegisterForm = require("./RegisterForm");
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
32
|
var prefix = (0, import_util.getPrefix)("login");
|
|
42
33
|
var Activate = ({
|
|
43
34
|
locale,
|
|
@@ -67,7 +58,7 @@ var Activate = ({
|
|
|
67
58
|
pattern: import_RegisterForm.PASSWORD_REGEX,
|
|
68
59
|
message: locale.passwordHelp
|
|
69
60
|
};
|
|
70
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
71
62
|
import_design.Form,
|
|
72
63
|
{
|
|
73
64
|
layout: "vertical",
|
|
@@ -75,58 +66,60 @@ var Activate = ({
|
|
|
75
66
|
className: `${prefix}-form`,
|
|
76
67
|
form,
|
|
77
68
|
...restProps,
|
|
78
|
-
"data-testid": "login.register"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
name: "password",
|
|
85
|
-
label: locale.passwordLabel,
|
|
86
|
-
dependencies: ["confirmPassword"],
|
|
87
|
-
help: passwordRegexpRule.message,
|
|
88
|
-
validateFirst: true,
|
|
89
|
-
rules: [
|
|
69
|
+
"data-testid": "login.register",
|
|
70
|
+
children: [
|
|
71
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Alert, { type: "error", showIcon: true, className: `${prefix}-alert`, message: errorMessage }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
import_design.Form.Item,
|
|
90
74
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
75
|
+
name: "password",
|
|
76
|
+
label: locale.passwordLabel,
|
|
77
|
+
dependencies: ["confirmPassword"],
|
|
78
|
+
help: passwordRegexpRule.message,
|
|
79
|
+
validateFirst: true,
|
|
80
|
+
rules: [
|
|
81
|
+
{
|
|
82
|
+
required: true,
|
|
83
|
+
message: locale.passwordMessage
|
|
84
|
+
},
|
|
85
|
+
passwordRegexpRule
|
|
86
|
+
],
|
|
87
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input.Password, { visibilityToggle: true, autoComplete: "new-password" })
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
+
import_design.Form.Item,
|
|
107
92
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
name: "confirmPassword",
|
|
94
|
+
label: locale.confirmPwdLabel,
|
|
95
|
+
dependencies: ["password"],
|
|
96
|
+
validateFirst: true,
|
|
97
|
+
rules: [
|
|
98
|
+
{
|
|
99
|
+
required: true,
|
|
100
|
+
message: locale.confirmPwdMessage
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
validator: handleValidateConfirmPassword
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input.Password, { visibilityToggle: true, autoComplete: "new-password" })
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
import_design.Button,
|
|
111
111
|
{
|
|
112
|
-
|
|
112
|
+
htmlType: "submit",
|
|
113
|
+
loading,
|
|
114
|
+
type: "primary",
|
|
115
|
+
block: true,
|
|
116
|
+
className: `${prefix}-submit-btn`,
|
|
117
|
+
children: locale.activeSubmitBtn
|
|
113
118
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
119
|
-
import_design.Button,
|
|
120
|
-
{
|
|
121
|
-
htmlType: "submit",
|
|
122
|
-
loading,
|
|
123
|
-
type: "primary",
|
|
124
|
-
block: true,
|
|
125
|
-
className: `${prefix}-submit-btn`
|
|
126
|
-
},
|
|
127
|
-
locale.activeSubmitBtn
|
|
128
|
-
),
|
|
129
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-switch-btn` }, /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "link", onClick: goBack }, locale.activeBackBtn))
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-switch-btn`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "link", onClick: goBack, children: locale.activeBackBtn }) })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
130
123
|
);
|
|
131
124
|
};
|
|
132
125
|
var ActivateForm_default = Activate;
|
package/lib/Login/LoginForm.js
CHANGED
|
@@ -35,10 +35,11 @@ module.exports = __toCommonJS(LoginForm_exports);
|
|
|
35
35
|
var import_icons = require("@oceanbase/icons");
|
|
36
36
|
var import_design = require("@oceanbase/design");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_design2 = require("@oceanbase/design");
|
|
40
40
|
var import_util = require("../_util");
|
|
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)("login");
|
|
43
44
|
var Login = ({
|
|
44
45
|
loading,
|
|
@@ -55,7 +56,7 @@ var Login = ({
|
|
|
55
56
|
}) => {
|
|
56
57
|
const { token } = import_design2.theme.useToken();
|
|
57
58
|
const [focusInput, setFocusInput] = (0, import_react.useState)("");
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
59
60
|
import_design.Form,
|
|
60
61
|
{
|
|
61
62
|
layout: "vertical",
|
|
@@ -63,119 +64,127 @@ var Login = ({
|
|
|
63
64
|
className: `${prefix}-form`,
|
|
64
65
|
style: { paddingLeft: showAuthCode ? 96 : 0 },
|
|
65
66
|
...restProps,
|
|
66
|
-
"data-testid": "login.form"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
name: "username",
|
|
73
|
-
rules: [
|
|
67
|
+
"data-testid": "login.form",
|
|
68
|
+
children: [
|
|
69
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Alert, { type: "error", showIcon: true, className: `${prefix}-alert`, message: errorMessage }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
import_design.Form.Item,
|
|
74
72
|
{
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
name: "username",
|
|
74
|
+
rules: [
|
|
75
|
+
{
|
|
76
|
+
required: true,
|
|
77
|
+
message: locale.usernameMessage
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
import_design.Input,
|
|
82
|
+
{
|
|
83
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserOutlined, { style: { color: token.colorIcon } }),
|
|
84
|
+
placeholder: locale.usernamePlaceholder,
|
|
85
|
+
onFocus: () => {
|
|
86
|
+
setFocusInput("username");
|
|
87
|
+
},
|
|
88
|
+
onBlur: () => {
|
|
89
|
+
setFocusInput("");
|
|
90
|
+
},
|
|
91
|
+
className: (0, import_classnames.default)({
|
|
92
|
+
[`${prefix}-focus-input`]: focusInput === "username"
|
|
93
|
+
}),
|
|
94
|
+
...(componentProps == null ? void 0 : componentProps.username) || {}
|
|
95
|
+
}
|
|
96
|
+
)
|
|
77
97
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
import_design.Input,
|
|
82
|
-
{
|
|
83
|
-
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, { style: { color: token.colorIcon } }),
|
|
84
|
-
placeholder: locale.usernamePlaceholder,
|
|
85
|
-
onFocus: () => {
|
|
86
|
-
setFocusInput("username");
|
|
87
|
-
},
|
|
88
|
-
onBlur: () => {
|
|
89
|
-
setFocusInput("");
|
|
90
|
-
},
|
|
91
|
-
className: (0, import_classnames.default)({
|
|
92
|
-
[`${prefix}-focus-input`]: focusInput === "username"
|
|
93
|
-
}),
|
|
94
|
-
...(componentProps == null ? void 0 : componentProps.username) || {}
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
),
|
|
98
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
99
|
-
import_design.Form.Item,
|
|
100
|
-
{
|
|
101
|
-
name: "password",
|
|
102
|
-
rules: passwordOptional ? [] : [
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
|
+
import_design.Form.Item,
|
|
103
101
|
{
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
name: "password",
|
|
103
|
+
rules: passwordOptional ? [] : [
|
|
104
|
+
{
|
|
105
|
+
required: true,
|
|
106
|
+
message: locale.passwordMessage
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
import_design.Input.Password,
|
|
111
|
+
{
|
|
112
|
+
visibilityToggle: true,
|
|
113
|
+
autoComplete: "current-password",
|
|
114
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LockOutlined, { style: { color: token.colorIcon } }),
|
|
115
|
+
placeholder: locale.passwordPlaceholder,
|
|
116
|
+
onFocus: () => {
|
|
117
|
+
setFocusInput("password");
|
|
118
|
+
},
|
|
119
|
+
onBlur: () => {
|
|
120
|
+
setFocusInput("");
|
|
121
|
+
},
|
|
122
|
+
className: focusInput === "password" ? `${prefix}-focus-input` : "",
|
|
123
|
+
...(componentProps == null ? void 0 : componentProps.password) || {}
|
|
124
|
+
}
|
|
125
|
+
)
|
|
106
126
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
),
|
|
128
|
+
showAuthCode && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className: `${prefix}-auth-code`, children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
|
+
import_design.Form.Item,
|
|
131
|
+
{
|
|
132
|
+
name: "authCode",
|
|
133
|
+
rules: [
|
|
134
|
+
{
|
|
135
|
+
required: true,
|
|
136
|
+
message: "验证码不能为空"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
import_design.Input,
|
|
141
|
+
{
|
|
142
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SafetyCertificateOutlined, { style: { color: token.colorIcon } }),
|
|
143
|
+
placeholder: "请输入验证码",
|
|
144
|
+
onFocus: () => {
|
|
145
|
+
setFocusInput("authCode");
|
|
146
|
+
},
|
|
147
|
+
onBlur: () => {
|
|
148
|
+
setFocusInput("");
|
|
149
|
+
},
|
|
150
|
+
className: (0, import_classnames.default)({
|
|
151
|
+
[`${prefix}-focus-input`]: focusInput === "authCode"
|
|
152
|
+
}),
|
|
153
|
+
...(componentProps == null ? void 0 : componentProps.authCode) || {}
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_classnames.default)(`${prefix}-code-btn`), children: [
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: authCodeImg, alt: "", width: "96", height: "38" }),
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-code-mask`, onClick: onAuthCodeImgChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SyncOutlined, {}) })
|
|
161
|
+
] })
|
|
162
|
+
] }),
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
164
|
+
import_design.Button,
|
|
132
165
|
{
|
|
133
|
-
|
|
134
|
-
|
|
166
|
+
htmlType: "submit",
|
|
167
|
+
loading,
|
|
168
|
+
type: "primary",
|
|
169
|
+
block: true,
|
|
170
|
+
className: `${prefix}-submit-btn`,
|
|
171
|
+
children: locale.loginText
|
|
135
172
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}),
|
|
152
|
-
...(componentProps == null ? void 0 : componentProps.authCode) || {}
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}-code-btn`) }, /* @__PURE__ */ import_react.default.createElement("img", { src: authCodeImg, alt: "", width: "96", height: "38" }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-code-mask`, onClick: onAuthCodeImgChange }, /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, null)))),
|
|
156
|
-
/* @__PURE__ */ import_react.default.createElement(import_design.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(
|
|
157
|
-
import_design.Button,
|
|
158
|
-
{
|
|
159
|
-
htmlType: "submit",
|
|
160
|
-
loading,
|
|
161
|
-
type: "primary",
|
|
162
|
-
block: true,
|
|
163
|
-
className: `${prefix}-submit-btn`
|
|
164
|
-
},
|
|
165
|
-
locale.loginText
|
|
166
|
-
)),
|
|
167
|
-
showOtherLoginButton && /* @__PURE__ */ import_react.default.createElement(import_design.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(
|
|
168
|
-
import_design.Button,
|
|
169
|
-
{
|
|
170
|
-
htmlType: "button",
|
|
171
|
-
loading: otherLoginProps.loading,
|
|
172
|
-
type: "primary",
|
|
173
|
-
block: true,
|
|
174
|
-
onClick: otherLoginProps.onFinish,
|
|
175
|
-
className: `${prefix}-submit-btn`
|
|
176
|
-
},
|
|
177
|
-
locale.otherLoginText
|
|
178
|
-
))
|
|
173
|
+
) }),
|
|
174
|
+
showOtherLoginButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
175
|
+
import_design.Button,
|
|
176
|
+
{
|
|
177
|
+
htmlType: "button",
|
|
178
|
+
loading: otherLoginProps.loading,
|
|
179
|
+
type: "primary",
|
|
180
|
+
block: true,
|
|
181
|
+
onClick: otherLoginProps.onFinish,
|
|
182
|
+
className: `${prefix}-submit-btn`,
|
|
183
|
+
children: locale.otherLoginText
|
|
184
|
+
}
|
|
185
|
+
) })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
179
188
|
);
|
|
180
189
|
};
|
|
181
190
|
var LoginForm_default = Login;
|