@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.
- 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/en-US.js +1 -1
- package/es/Boundary/locale/ja-JP.d.ts +11 -0
- package/es/Boundary/locale/ja-JP.js +10 -0
- package/es/Boundary/locale/zh-CN.js +1 -1
- package/es/Boundary/locale/zh-TW.js +1 -1
- 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/Login/locale/zh-CN.js +2 -2
- 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/en-US.js +1 -1
- package/lib/Boundary/locale/ja-JP.d.ts +11 -0
- package/lib/Boundary/locale/ja-JP.js +34 -0
- package/lib/Boundary/locale/zh-CN.js +1 -1
- package/lib/Boundary/locale/zh-TW.js +1 -1
- 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/Login/locale/zh-CN.js +2 -2
- 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
|
@@ -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/BasicLayout/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
|
+
help: "ヘルプ",
|
|
27
|
+
welcome: "ウェルカムページ",
|
|
28
|
+
versionNotice: "更新情報",
|
|
29
|
+
viewDocs: "マニュアルを見る",
|
|
30
|
+
downloadDocs: "マニュアルをダウンロード",
|
|
31
|
+
about: "製品について",
|
|
32
|
+
version: "バージョン",
|
|
33
|
+
releaseTime: "リリース日",
|
|
34
|
+
company: "Beijing OceanBase Technology Co., Ltd.",
|
|
35
|
+
right: "All Rights Reserved"
|
|
36
|
+
};
|
|
@@ -36,10 +36,11 @@ var import_icons = require("@oceanbase/icons");
|
|
|
36
36
|
var import_design = require("@oceanbase/design");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_lodash = require("lodash");
|
|
39
|
-
var import_react =
|
|
39
|
+
var import_react = require("react");
|
|
40
40
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
42
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var prefix = "ob-batch-operation-bar";
|
|
44
45
|
var BatchOperationBar = (props) => {
|
|
45
46
|
var _a, _b;
|
|
@@ -55,9 +56,9 @@ var BatchOperationBar = (props) => {
|
|
|
55
56
|
className = "",
|
|
56
57
|
cancelText = locale == null ? void 0 : locale.cancelText,
|
|
57
58
|
openText = locale == null ? void 0 : locale.openText,
|
|
58
|
-
openIcon = /* @__PURE__ */
|
|
59
|
+
openIcon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DownOutlined, {}),
|
|
59
60
|
hiddenText = locale == null ? void 0 : locale.hiddenText,
|
|
60
|
-
hiddenIcon = /* @__PURE__ */
|
|
61
|
+
hiddenIcon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UpOutlined, {}),
|
|
61
62
|
showCancelBtn = true,
|
|
62
63
|
showOpenBtn = true,
|
|
63
64
|
position = ["bottom", "right"],
|
|
@@ -95,7 +96,7 @@ var BatchOperationBar = (props) => {
|
|
|
95
96
|
const disPlayBtnRender = () => {
|
|
96
97
|
if (!showOpenBtn)
|
|
97
98
|
return null;
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
99
100
|
"div",
|
|
100
101
|
{
|
|
101
102
|
className: (0, import_classnames.default)({
|
|
@@ -103,18 +104,20 @@ var BatchOperationBar = (props) => {
|
|
|
103
104
|
[`${prefix}-close-btn`]: !isOpen,
|
|
104
105
|
[`${prefix}-display-btn`]: true
|
|
105
106
|
}),
|
|
106
|
-
onClick: () => setIsOpen(!isOpen)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
onClick: () => setIsOpen(!isOpen),
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
className: (0, import_classnames.default)({
|
|
113
|
+
[`${prefix}-display-text`]: true
|
|
114
|
+
}),
|
|
115
|
+
children: isOpen ? hiddenText : openText
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
isOpen ? hiddenIcon : openIcon
|
|
119
|
+
]
|
|
120
|
+
}
|
|
118
121
|
);
|
|
119
122
|
};
|
|
120
123
|
(0, import_react.useEffect)(() => {
|
|
@@ -123,40 +126,52 @@ var BatchOperationBar = (props) => {
|
|
|
123
126
|
else
|
|
124
127
|
setSelectedData(selectedRows);
|
|
125
128
|
}, [selectedRows]);
|
|
126
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
127
130
|
"div",
|
|
128
131
|
{
|
|
129
132
|
className: (0, import_classnames.default)({
|
|
130
133
|
[className]: !!className,
|
|
131
134
|
[prefix]: true
|
|
132
135
|
}),
|
|
133
|
-
style
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
136
|
+
style,
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-header`, children: [
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
|
|
140
|
+
!!alertRender ? alertRender == null ? void 0 : alertRender(selectedData) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
|
|
141
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-title`, children: title }),
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: (_b = (_a = locale == null ? void 0 : locale.alertText) == null ? void 0 : _a.replace) == null ? void 0 : _b.call(_a, /\$\{\}/, (selectedData == null ? void 0 : selectedData.length) || 0) })
|
|
143
|
+
] }),
|
|
144
|
+
!!showCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
145
|
+
"span",
|
|
146
|
+
{
|
|
147
|
+
className: (0, import_classnames.default)({
|
|
148
|
+
[`${prefix}-cancel`]: true
|
|
149
|
+
}),
|
|
150
|
+
onClick: () => cleanSelectedRows(),
|
|
151
|
+
children: cancelText
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
disPlayBtnRender()
|
|
155
|
+
] }),
|
|
156
|
+
!!alertOptionRender && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: alertOptionRender == null ? void 0 : alertOptionRender({
|
|
157
|
+
selectedRows: selectedData,
|
|
158
|
+
setSelectedRows,
|
|
159
|
+
cleanSelectedRows
|
|
160
|
+
}) })
|
|
161
|
+
] }),
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: (0, import_classnames.default)({
|
|
166
|
+
[`${prefix}-content`]: true,
|
|
167
|
+
[`${prefix}-content-active`]: !!isOpen,
|
|
168
|
+
[`${prefix}-content-hidden`]: !isOpen
|
|
169
|
+
}),
|
|
170
|
+
children: typeof content === "function" ? content == null ? void 0 : content({ selectedRows: selectedData, setSelectedRows, cleanSelectedRows }) : content
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
]
|
|
174
|
+
}
|
|
160
175
|
);
|
|
161
176
|
};
|
|
162
177
|
var BatchOperationBar_default = (0, import_LocaleWrapper.default)({
|
|
@@ -0,0 +1,30 @@
|
|
|
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/BatchOperationBar/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
|
+
cancelText: "選択解除",
|
|
27
|
+
openText: "選択済みを展開",
|
|
28
|
+
hiddenText: "選択済みを折りたたむ",
|
|
29
|
+
alertText: "${} 件を選択しました"
|
|
30
|
+
};
|
|
@@ -33,18 +33,19 @@ __export(Code_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Code_exports);
|
|
35
35
|
var import_design = require("@oceanbase/design");
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
|
|
38
38
|
var import_constant = require("../constant");
|
|
39
39
|
var import_zh_CN = __toESM(require("../locale/zh-CN"));
|
|
40
40
|
var import_classnames = __toESM(require("classnames"));
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var BoundaryCode = (props) => {
|
|
42
43
|
const { children, onClick, code, imageUrl, title, buttonText, locale, className, ...restProps } = props;
|
|
43
44
|
const info = (0, import_react.useMemo)(() => {
|
|
44
45
|
const data = (0, import_constant.CODE_PRESET)(locale);
|
|
45
46
|
return data[code];
|
|
46
47
|
}, [code, locale]);
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
49
|
"div",
|
|
49
50
|
{
|
|
50
51
|
className: (0, import_classnames.default)(
|
|
@@ -53,9 +54,14 @@ var BoundaryCode = (props) => {
|
|
|
53
54
|
`ob-boundary-${code}`,
|
|
54
55
|
className
|
|
55
56
|
),
|
|
56
|
-
...restProps
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
...restProps,
|
|
58
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || info.imageUrl }),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || info.title }),
|
|
61
|
+
children,
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: onClick || info.onClick, children: buttonText || info.buttonText })
|
|
63
|
+
] })
|
|
64
|
+
}
|
|
59
65
|
);
|
|
60
66
|
};
|
|
61
67
|
var Code = (0, import_LocaleWrapper.default)({
|
|
@@ -38,6 +38,7 @@ var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
|
|
|
38
38
|
var import_constant = require("../constant");
|
|
39
39
|
var import_zh_CN = __toESM(require("../locale/zh-CN"));
|
|
40
40
|
var import_classnames = __toESM(require("classnames"));
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var BoundaryException = class extends import_react.default.PureComponent {
|
|
42
43
|
constructor() {
|
|
43
44
|
super(...arguments);
|
|
@@ -85,31 +86,36 @@ var BoundaryException = class extends import_react.default.PureComponent {
|
|
|
85
86
|
const errorDescription = info == null ? void 0 : info.componentStack;
|
|
86
87
|
const errorMessage = (error || "").toString();
|
|
87
88
|
if ((_a = this.state) == null ? void 0 : _a.hasError) {
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
90
|
"div",
|
|
90
91
|
{
|
|
91
92
|
className: (0, import_classnames.default)("boundary-container", "ob-boundary-error", className),
|
|
92
|
-
...restProps
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
93
|
+
...restProps,
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || errorInfo.imageUrl }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || errorInfo.title }),
|
|
97
|
+
showError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
+
import_design.Alert,
|
|
99
|
+
{
|
|
100
|
+
type: "error",
|
|
101
|
+
showIcon: true,
|
|
102
|
+
message: errorMessage,
|
|
103
|
+
description: errorDescription,
|
|
104
|
+
style: {
|
|
105
|
+
marginTop: 24,
|
|
106
|
+
overflow: "auto",
|
|
107
|
+
maxHeight: "50vh",
|
|
108
|
+
// 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
|
|
109
|
+
textAlign: "left"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
) : subscription && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: subscription }),
|
|
113
|
+
hasButton ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: () => this.onClick(), children: buttonText || errorInfo.buttonText }) : ""
|
|
114
|
+
] })
|
|
115
|
+
}
|
|
110
116
|
);
|
|
111
117
|
} else if (isNotCompatible) {
|
|
112
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
119
|
"div",
|
|
114
120
|
{
|
|
115
121
|
className: (0, import_classnames.default)(
|
|
@@ -117,9 +123,13 @@ var BoundaryException = class extends import_react.default.PureComponent {
|
|
|
117
123
|
"ob-boundary-browser-not-compatible",
|
|
118
124
|
className
|
|
119
125
|
),
|
|
120
|
-
...restProps
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
...restProps,
|
|
127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || notCompatibleInfo.imageUrl }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || notCompatibleInfo.title }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: subscription ? subscription : notCompatibleInfo.subscription })
|
|
131
|
+
] })
|
|
132
|
+
}
|
|
123
133
|
);
|
|
124
134
|
}
|
|
125
135
|
return this.props.children;
|
|
@@ -33,20 +33,26 @@ __export(Function_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Function_exports);
|
|
35
35
|
var import_design = require("@oceanbase/design");
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var BoundaryFunction = (props) => {
|
|
39
40
|
const { children, state, config, onClick, className, ...restProps } = props;
|
|
40
41
|
const info = (0, import_react.useMemo)(() => {
|
|
41
42
|
return state ? config[state] : config[Object.keys(config)[0]];
|
|
42
43
|
}, [config, state]);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
45
|
"div",
|
|
45
46
|
{
|
|
46
47
|
className: (0, import_classnames.default)("boundary-container", "ob-boundary-function", className),
|
|
47
|
-
...restProps
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
...restProps,
|
|
49
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: info.imageUrl }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: info.title }),
|
|
52
|
+
children,
|
|
53
|
+
info.buttonText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: onClick || info.onClick, children: info.buttonText })
|
|
54
|
+
] })
|
|
55
|
+
}
|
|
50
56
|
);
|
|
51
57
|
};
|
|
52
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -28,7 +28,7 @@ var en_US_default = {
|
|
|
28
28
|
noPage: "This page was not found",
|
|
29
29
|
normal: "normal operation",
|
|
30
30
|
test: "Click to test crash effect",
|
|
31
|
-
collapse: "The page crashed
|
|
31
|
+
collapse: "The page crashed",
|
|
32
32
|
incompatible: "Incompatible browser version",
|
|
33
33
|
proposal: "The browser version is too low. In order to avoid possible security risks, it is recommended to use Chrome browser version 80 or above"
|
|
34
34
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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/Boundary/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
|
+
goHome: "ホームに戻る",
|
|
27
|
+
noPermission: "このページへのアクセス権限がありません",
|
|
28
|
+
noPage: "このページが見つかりません",
|
|
29
|
+
normal: "正常動作",
|
|
30
|
+
test: "クリックしてクラッシュをテスト",
|
|
31
|
+
collapse: "ページがクラッシュしました",
|
|
32
|
+
incompatible: "ブラウザがサポートされていません",
|
|
33
|
+
proposal: "ブラウザのバージョンが古すぎます。セキュリティリスクを避けるため、Chrome 80以上のご利用をおすすめします"
|
|
34
|
+
};
|
|
@@ -32,12 +32,13 @@ __export(ContentWithIcon_exports, {
|
|
|
32
32
|
default: () => ContentWithIcon_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(ContentWithIcon_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_icons = require("@oceanbase/icons");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
39
|
var import_util = require("../_util");
|
|
40
40
|
var import_index = require("./index.less");
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
var prefix = (0, import_util.getPrefix)("content-with-question");
|
|
42
43
|
var ContentWithIcon = ({
|
|
43
44
|
content,
|
|
@@ -58,7 +59,7 @@ var ContentWithIcon = ({
|
|
|
58
59
|
}) => {
|
|
59
60
|
const defaultIconType = () => {
|
|
60
61
|
if (iconType === "question") {
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
63
|
import_icons.QuestionCircleOutlined,
|
|
63
64
|
{
|
|
64
65
|
style: { color: color === "default" ? "#132039" : color, fontSize: size },
|
|
@@ -68,7 +69,7 @@ var ContentWithIcon = ({
|
|
|
68
69
|
}
|
|
69
70
|
if (iconType === "info") {
|
|
70
71
|
if (infoColor) {
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
73
|
import_icons.InfoCircleFilled,
|
|
73
74
|
{
|
|
74
75
|
style: { color: infoColor, fontSize: size },
|
|
@@ -76,7 +77,7 @@ var ContentWithIcon = ({
|
|
|
76
77
|
}
|
|
77
78
|
);
|
|
78
79
|
} else {
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
81
|
import_icons.InfoCircleOutlined,
|
|
81
82
|
{
|
|
82
83
|
style: { color: "3333333", fontSize: size },
|
|
@@ -86,7 +87,7 @@ var ContentWithIcon = ({
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
if (iconType === "exclamation") {
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
91
|
import_icons.ExclamationCircleFilled,
|
|
91
92
|
{
|
|
92
93
|
style: { color: exclamationColor, fontSize: size },
|
|
@@ -99,32 +100,39 @@ var ContentWithIcon = ({
|
|
|
99
100
|
const getIcon = (iconConfig) => {
|
|
100
101
|
return iconConfig ? !textHidden && iconType === "info" ? (
|
|
101
102
|
// 文本描述直接展示且只在 info 类型下生效
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
|
|
104
|
+
iconConfig,
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#5C6B8A" }, children: "文本示意不超过二十字文本示意不超过二十字" })
|
|
106
|
+
] })
|
|
103
107
|
) : (
|
|
104
108
|
// 提示文案描述带有链接
|
|
105
|
-
tooltipWithLink ? /* @__PURE__ */
|
|
109
|
+
tooltipWithLink ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Popover, { ...popOver, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType() }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tooltip, { ...tooltip, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType() })
|
|
106
110
|
) : null;
|
|
107
111
|
};
|
|
108
|
-
return /* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
113
|
"span",
|
|
110
114
|
{
|
|
111
115
|
className: (0, import_classnames.default)({
|
|
112
116
|
[`${prefix}-item`]: true,
|
|
113
117
|
[className]: !!className
|
|
114
118
|
}),
|
|
115
|
-
...restProps
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
...restProps,
|
|
120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
|
|
121
|
+
getIcon(
|
|
122
|
+
// 图标在文字前
|
|
123
|
+
prefixIcon === true ? defaultIconType() : prefixIcon
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
"span",
|
|
127
|
+
{
|
|
128
|
+
"data-testid": "content",
|
|
129
|
+
style: { color: color === "default" ? "#5C6B8A" : color, fontSize: size },
|
|
130
|
+
children: content ?? children
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
getIcon(suffixIcon)
|
|
134
|
+
] })
|
|
135
|
+
}
|
|
136
|
+
) });
|
|
129
137
|
};
|
|
130
138
|
var ContentWithIcon_default = ContentWithIcon;
|
|
@@ -35,8 +35,9 @@ module.exports = __toCommonJS(ContentWithQuestion_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_style = __toESM(require("./style"));
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
41
|
var ContentWithQuestion = ({
|
|
41
42
|
content,
|
|
42
43
|
tooltip,
|
|
@@ -51,10 +52,14 @@ var ContentWithQuestion = ({
|
|
|
51
52
|
const prefixCls = getPrefixCls("content-with-question", customizePrefixCls);
|
|
52
53
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
53
54
|
const getIcon = (iconConfig) => {
|
|
54
|
-
return iconConfig ? /* @__PURE__ */
|
|
55
|
+
return iconConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { ...tooltip, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.QuestionCircleOutlined, { className: `${prefixCls}-help` }) }) : null;
|
|
55
56
|
};
|
|
56
57
|
return wrapSSR(
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_classnames.default)(`${prefixCls}-item`, className), ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
|
|
59
|
+
getIcon(prefixIcon),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-testid": "content", children: content ?? children }),
|
|
61
|
+
getIcon(suffixIcon)
|
|
62
|
+
] }) })
|
|
58
63
|
);
|
|
59
64
|
};
|
|
60
65
|
var ContentWithQuestion_default = ContentWithQuestion;
|