@oceanbase/ui 0.4.20 → 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.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/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/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.js +349 -313
- 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 +5 -4
- 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
package/lib/Highlight/index.js
CHANGED
|
@@ -70,6 +70,7 @@ var import_yaml = __toESM(require("./languages/yaml"));
|
|
|
70
70
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
71
71
|
var import_useKeyDownCopyEvent = require("./useKeyDownCopyEvent");
|
|
72
72
|
var import_index = require("./index.less");
|
|
73
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
73
74
|
var languageMap = {
|
|
74
75
|
javascript: import_javascript.default,
|
|
75
76
|
typescript: import_typescript.default,
|
|
@@ -143,7 +144,7 @@ var Highlight = (props) => {
|
|
|
143
144
|
}));
|
|
144
145
|
setCodeBlock(
|
|
145
146
|
rowList.map((src, index) => {
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
147
148
|
import_HighlightCell.default,
|
|
148
149
|
{
|
|
149
150
|
lineNumber,
|
|
@@ -152,7 +153,7 @@ var Highlight = (props) => {
|
|
|
152
153
|
theme,
|
|
153
154
|
prefixCls
|
|
154
155
|
}
|
|
155
|
-
));
|
|
156
|
+
) }, index);
|
|
156
157
|
})
|
|
157
158
|
);
|
|
158
159
|
};
|
|
@@ -168,7 +169,7 @@ var Highlight = (props) => {
|
|
|
168
169
|
};
|
|
169
170
|
if (innerHTML) {
|
|
170
171
|
customProps.dangerouslySetInnerHTML = { __html: children };
|
|
171
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...customProps });
|
|
172
173
|
}
|
|
173
174
|
const CopyButton = () => {
|
|
174
175
|
const [copyId, setCopyId] = (0, import_react.useState)();
|
|
@@ -178,7 +179,7 @@ var Highlight = (props) => {
|
|
|
178
179
|
};
|
|
179
180
|
});
|
|
180
181
|
const [copied, setCopied] = (0, import_react.useState)(false);
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
182
183
|
import_react_copy_to_clipboard.default,
|
|
183
184
|
{
|
|
184
185
|
text: children && children.length ? children : "",
|
|
@@ -190,35 +191,37 @@ var Highlight = (props) => {
|
|
|
190
191
|
setCopied(false);
|
|
191
192
|
}, 2e3);
|
|
192
193
|
setCopyId(tempCopyId);
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
196
|
-
"button",
|
|
197
|
-
{
|
|
198
|
-
disabled: copied,
|
|
199
|
-
className: (0, import_classnames.default)(`${prefixCls}-copy`),
|
|
200
|
-
style: {
|
|
201
|
-
background: `${theme === THEME_DARK ? `#2b303b` : token.colorBgLayout}`
|
|
202
|
-
}
|
|
203
194
|
},
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
{
|
|
207
|
-
className: (0, import_classnames.default)(`${prefixCls}-copy-icon`, { scoll: copied }),
|
|
208
|
-
style: { color: `${theme === THEME_DARK ? token.colorBgLayout : `#2b303b`}` }
|
|
209
|
-
}
|
|
210
|
-
),
|
|
211
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
212
|
-
import_icons.CheckOutlined,
|
|
195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
196
|
+
"button",
|
|
213
197
|
{
|
|
214
|
-
|
|
215
|
-
|
|
198
|
+
disabled: copied,
|
|
199
|
+
className: (0, import_classnames.default)(`${prefixCls}-copy`),
|
|
200
|
+
style: {
|
|
201
|
+
background: `${theme === THEME_DARK ? `#2b303b` : token.colorBgLayout}`
|
|
202
|
+
},
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
205
|
+
import_icons.CopyOutlined,
|
|
206
|
+
{
|
|
207
|
+
className: (0, import_classnames.default)(`${prefixCls}-copy-icon`, { scoll: copied }),
|
|
208
|
+
style: { color: `${theme === THEME_DARK ? token.colorBgLayout : `#2b303b`}` }
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
212
|
+
import_icons.CheckOutlined,
|
|
213
|
+
{
|
|
214
|
+
className: (0, import_classnames.default)(`${prefixCls}-copy-icon`),
|
|
215
|
+
style: { color: "rgb(63,177,99)" }
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
]
|
|
216
219
|
}
|
|
217
220
|
)
|
|
218
|
-
|
|
219
|
-
));
|
|
221
|
+
}
|
|
222
|
+
) });
|
|
220
223
|
};
|
|
221
|
-
return /* @__PURE__ */
|
|
224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
222
225
|
"pre",
|
|
223
226
|
{
|
|
224
227
|
...customProps,
|
|
@@ -226,29 +229,31 @@ var Highlight = (props) => {
|
|
|
226
229
|
...customStyle,
|
|
227
230
|
position: "relative"
|
|
228
231
|
},
|
|
229
|
-
className: (0, import_classnames.default)(`${prefixCls}`, className, themeClass)
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
232
|
+
className: (0, import_classnames.default)(`${prefixCls}`, className, themeClass),
|
|
233
|
+
children: [
|
|
234
|
+
copyable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyButton, {}),
|
|
235
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
236
|
+
"table",
|
|
237
|
+
{
|
|
238
|
+
style: {
|
|
239
|
+
height
|
|
240
|
+
},
|
|
241
|
+
className: (0, import_classnames.default)(
|
|
242
|
+
`${theme === THEME_DARK ? `${prefixCls}-dark` : `${prefixCls}-light`}`
|
|
243
|
+
),
|
|
244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: codeBlock })
|
|
245
|
+
}
|
|
240
246
|
)
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
));
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
) });
|
|
245
250
|
};
|
|
246
251
|
var HighlightWrapper = (props) => {
|
|
247
252
|
const { language, children } = props;
|
|
248
253
|
if (language === "json" && children && typeof children === "object" && !import_react.default.isValidElement(children)) {
|
|
249
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_JsonView.default, { ...props, json: children });
|
|
250
255
|
}
|
|
251
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Highlight, { ...props });
|
|
252
257
|
};
|
|
253
258
|
HighlightWrapper.Diff = import_DiffView.default;
|
|
254
259
|
var Highlight_default = (0, import_LocaleWrapper.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/Highlight/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
|
+
copied: "コピー成功"
|
|
27
|
+
};
|
package/lib/IconFont/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/IconFont/index.tsx
|
|
@@ -32,10 +22,10 @@ __export(IconFont_exports, {
|
|
|
32
22
|
default: () => IconFont_default
|
|
33
23
|
});
|
|
34
24
|
module.exports = __toCommonJS(IconFont_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
25
|
var import_iconfont = require("./font/iconfont.css");
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
27
|
var IconFont = (props) => {
|
|
38
28
|
const { type, className, ...restProps } = props;
|
|
39
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { className: `iconfont ${type} ${className}`, ...restProps });
|
|
40
30
|
};
|
|
41
31
|
var IconFont_default = IconFont;
|
package/lib/LightFilter/index.js
CHANGED
|
@@ -32,14 +32,15 @@ __export(LightFilter_exports, {
|
|
|
32
32
|
default: () => LightFilter_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(LightFilter_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import_pro_components = require("@ant-design/pro-components");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
var import_style = __toESM(require("./style"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
40
|
function LightFilter({ prefixCls: customizePrefixCls, ...restProps }) {
|
|
40
41
|
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
41
42
|
const prefixCls = getPrefixCls("pro-form-light-filter", customizePrefixCls);
|
|
42
43
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
43
|
-
return wrapSSR(/* @__PURE__ */
|
|
44
|
+
return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_pro_components.LightFilter, { prefixCls: customizePrefixCls, ...restProps }));
|
|
44
45
|
}
|
|
45
46
|
var LightFilter_default = LightFilter;
|
|
@@ -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;
|