@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
package/lib/TaskGraph/Graph.js
CHANGED
|
@@ -42,6 +42,7 @@ var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
|
42
42
|
var import_util2 = require("../_util");
|
|
43
43
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
44
44
|
var import_graph = require("./graph.less");
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var { Text } = import_design.Typography;
|
|
46
47
|
var prefix = (0, import_util2.getPrefix)("task-graph-item");
|
|
47
48
|
var TaskGraph = class extends import_react.default.PureComponent {
|
|
@@ -225,34 +226,38 @@ var TaskGraph = class extends import_react.default.PureComponent {
|
|
|
225
226
|
}
|
|
226
227
|
];
|
|
227
228
|
const filterMenus = menus.filter((item) => operations.includes(item.value));
|
|
228
|
-
const menu = /* @__PURE__ */
|
|
229
|
-
(item) => item.value === "taskId" ? /* @__PURE__ */
|
|
229
|
+
const menu = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu, { id: "menu", onClick: this.handleMenuClick, style: { left: -1500 }, children: filterMenus.map(
|
|
230
|
+
(item) => item.value === "taskId" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
230
231
|
"div",
|
|
231
232
|
{
|
|
232
233
|
className: `${prefix}-task-id-wrapper`,
|
|
233
|
-
style: filterMenus.length > 1 ? { borderBottom: "1px solid #e8e8e8" } : {}
|
|
234
|
-
|
|
235
|
-
/* @__PURE__ */ import_react.default.createElement(Text, { copyable: true }, `ID: ${currentSubTask && currentSubTask.id}`)
|
|
236
|
-
) : /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: item.value }, item.label)
|
|
237
|
-
));
|
|
238
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, this.graph && /* @__PURE__ */ import_react.default.createElement(import_GraphToolbar.default, { mode: "fixed", graph: this.graph }), /* @__PURE__ */ import_react.default.createElement(
|
|
239
|
-
"div",
|
|
240
|
-
{
|
|
241
|
-
id: "container",
|
|
242
|
-
ref: (node) => {
|
|
243
|
-
this.main = node;
|
|
234
|
+
style: filterMenus.length > 1 ? { borderBottom: "1px solid #e8e8e8" } : {},
|
|
235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { copyable: true, children: `ID: ${currentSubTask && currentSubTask.id}` })
|
|
244
236
|
}
|
|
245
|
-
}
|
|
246
|
-
)
|
|
247
|
-
|
|
248
|
-
{
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
237
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: item.label }, item.value)
|
|
238
|
+
) });
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
240
|
+
this.graph && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GraphToolbar.default, { mode: "fixed", graph: this.graph }),
|
|
241
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
242
|
+
"div",
|
|
243
|
+
{
|
|
244
|
+
id: "container",
|
|
245
|
+
ref: (node) => {
|
|
246
|
+
this.main = node;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
251
|
+
import_design.Dropdown,
|
|
252
|
+
{
|
|
253
|
+
visible: true,
|
|
254
|
+
open: true,
|
|
255
|
+
overlay: menu,
|
|
256
|
+
overlayClassName: `${prefix}-menu`,
|
|
257
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {})
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
] });
|
|
256
261
|
}
|
|
257
262
|
};
|
|
258
263
|
var Graph_default = (0, import_LocaleWrapper.default)({
|
package/lib/TaskGraph/index.js
CHANGED
|
@@ -35,13 +35,14 @@ module.exports = __toCommonJS(TaskGraph_exports);
|
|
|
35
35
|
var import_icons = require("@oceanbase/icons");
|
|
36
36
|
var import_design = require("@oceanbase/design");
|
|
37
37
|
var import_lodash = require("lodash");
|
|
38
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_react_split_pane = __toESM(require("react-split-pane"));
|
|
40
40
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
41
41
|
var import_util = require("../_util");
|
|
42
42
|
var import_Graph = __toESM(require("./Graph"));
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var { TabPane } = import_design.Tabs;
|
|
46
47
|
var MIN_SIZE = 56;
|
|
47
48
|
var DEFAULT_SIZE = 240;
|
|
@@ -84,7 +85,7 @@ var TaskGraph = ({
|
|
|
84
85
|
onTabsEdit(targetKey, action);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
88
89
|
import_react_split_pane.default,
|
|
89
90
|
{
|
|
90
91
|
split: "horizontal",
|
|
@@ -100,62 +101,67 @@ var TaskGraph = ({
|
|
|
100
101
|
setCollapsed(false);
|
|
101
102
|
}
|
|
102
103
|
},
|
|
103
|
-
className: `${prefix}-split-pane
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{
|
|
108
|
-
onLogAdd: (subTask) => {
|
|
109
|
-
const isExisted = (0, import_lodash.find)(panes, (item) => item.id === subTask.id);
|
|
110
|
-
if (!isExisted) {
|
|
111
|
-
setPanes([...panes, subTask]);
|
|
112
|
-
}
|
|
113
|
-
setCollapsed(false);
|
|
114
|
-
if (size === MIN_SIZE) {
|
|
115
|
-
setSize(DEFAULT_SIZE);
|
|
116
|
-
}
|
|
117
|
-
setActiveKey(subTask && `${subTask.id}`);
|
|
118
|
-
},
|
|
119
|
-
...restProps
|
|
120
|
-
}
|
|
121
|
-
)),
|
|
122
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-tabs-wrapper` }, /* @__PURE__ */ import_react.default.createElement(
|
|
123
|
-
import_design.Tabs,
|
|
124
|
-
{
|
|
125
|
-
type: "editable-card",
|
|
126
|
-
hideAdd: true,
|
|
127
|
-
activeKey,
|
|
128
|
-
onChange: (key) => {
|
|
129
|
-
setActiveKey(key);
|
|
130
|
-
if (onTabsChange) {
|
|
131
|
-
onTabsChange(key);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
onEdit: handleEditLogWindow,
|
|
135
|
-
tabBarExtraContent: collapsed ? /* @__PURE__ */ import_react.default.createElement(
|
|
136
|
-
import_icons.UpOutlined,
|
|
104
|
+
className: `${prefix}-split-pane`,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { position: "absolute", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
import_Graph.default,
|
|
137
108
|
{
|
|
138
|
-
|
|
139
|
-
|
|
109
|
+
onLogAdd: (subTask) => {
|
|
110
|
+
const isExisted = (0, import_lodash.find)(panes, (item) => item.id === subTask.id);
|
|
111
|
+
if (!isExisted) {
|
|
112
|
+
setPanes([...panes, subTask]);
|
|
113
|
+
}
|
|
114
|
+
setCollapsed(false);
|
|
140
115
|
if (size === MIN_SIZE) {
|
|
141
116
|
setSize(DEFAULT_SIZE);
|
|
142
117
|
}
|
|
143
|
-
|
|
118
|
+
setActiveKey(subTask && `${subTask.id}`);
|
|
119
|
+
},
|
|
120
|
+
...restProps
|
|
144
121
|
}
|
|
145
|
-
)
|
|
146
|
-
|
|
122
|
+
) }),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-tabs-wrapper`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
import_design.Tabs,
|
|
147
125
|
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
126
|
+
type: "editable-card",
|
|
127
|
+
hideAdd: true,
|
|
128
|
+
activeKey,
|
|
129
|
+
onChange: (key) => {
|
|
130
|
+
setActiveKey(key);
|
|
131
|
+
if (onTabsChange) {
|
|
132
|
+
onTabsChange(key);
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
onEdit: handleEditLogWindow,
|
|
136
|
+
tabBarExtraContent: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
+
import_icons.UpOutlined,
|
|
138
|
+
{
|
|
139
|
+
onClick: () => {
|
|
140
|
+
setCollapsed(!collapsed);
|
|
141
|
+
if (size === MIN_SIZE) {
|
|
142
|
+
setSize(DEFAULT_SIZE);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
152
145
|
}
|
|
153
|
-
|
|
146
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
147
|
+
import_icons.DownOutlined,
|
|
148
|
+
{
|
|
149
|
+
onClick: () => {
|
|
150
|
+
setCollapsed(!collapsed);
|
|
151
|
+
if (size === MIN_SIZE) {
|
|
152
|
+
setSize(DEFAULT_SIZE);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
children: panes.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TabPane, { tab: `${item.name} (ID: ${item.id})`, children: [
|
|
158
|
+
logLoading && item.status !== "RUNNING" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Spin, {}) : subTaskLog,
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Spin, { spinning: item.status === "RUNNING" })
|
|
160
|
+
] }, `${item.id}`))
|
|
154
161
|
}
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
))
|
|
162
|
+
) })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
159
165
|
);
|
|
160
166
|
};
|
|
161
167
|
var TaskGraph_default = (0, import_LocaleWrapper.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/TaskGraph/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
|
+
successful: "完了",
|
|
27
|
+
running: "タスク実行中",
|
|
28
|
+
failed: "タスク失敗",
|
|
29
|
+
pending: "未開始",
|
|
30
|
+
taskId: "タスク ID",
|
|
31
|
+
log: "ログを表示",
|
|
32
|
+
parameter: "パラメータを表示",
|
|
33
|
+
stop: "実行を停止",
|
|
34
|
+
retry: "再実行",
|
|
35
|
+
skip: "成功に設定"
|
|
36
|
+
};
|
package/lib/TreeSearch/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/TreeSearch/index.tsx
|
|
@@ -34,8 +24,9 @@ __export(TreeSearch_exports, {
|
|
|
34
24
|
module.exports = __toCommonJS(TreeSearch_exports);
|
|
35
25
|
var import_icons = require("@oceanbase/icons");
|
|
36
26
|
var import_design = require("@oceanbase/design");
|
|
37
|
-
var import_react =
|
|
27
|
+
var import_react = require("react");
|
|
38
28
|
var import_util = require("./util");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
30
|
var TreeSearch_default = (0, import_react.forwardRef)(
|
|
40
31
|
({
|
|
41
32
|
treeData = [],
|
|
@@ -107,29 +98,33 @@ var TreeSearch_default = (0, import_react.forwardRef)(
|
|
|
107
98
|
};
|
|
108
99
|
const treeHeight = innerHeight ? innerHeight - (32 + 12 * 2 + 1) : 0;
|
|
109
100
|
const defaultSearchStyle = { padding: "0 12px" };
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: treeWrapperDOM, style: { width, height: height ?? "100%" }, children: [
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
103
|
+
import_design.Form,
|
|
104
|
+
{
|
|
105
|
+
form,
|
|
106
|
+
onValuesChange: onSearch,
|
|
107
|
+
style: Object.assign(defaultSearchStyle, searchStyle),
|
|
108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { noStyle: true, name: "searchKey", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input, { "data-testid": "search", prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchOutlined, {}) }) })
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Divider, { style: { margin: "12px 0" } }),
|
|
112
|
+
searchData.length !== 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
|
+
import_design.Tree,
|
|
114
|
+
{
|
|
115
|
+
height: treeHeight,
|
|
116
|
+
showIcon: true,
|
|
117
|
+
checkable,
|
|
118
|
+
blockNode: true,
|
|
119
|
+
selectable: false,
|
|
120
|
+
checkedKeys,
|
|
121
|
+
onCheck,
|
|
122
|
+
titleRender,
|
|
123
|
+
defaultExpandAll,
|
|
124
|
+
treeData: form.getFieldValue("searchKey") ? searchData : memoTreeData,
|
|
125
|
+
loadData
|
|
126
|
+
}
|
|
127
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Empty, { image: import_design.Empty.PRESENTED_IMAGE_SIMPLE })
|
|
128
|
+
] });
|
|
134
129
|
}
|
|
135
130
|
);
|
package/lib/Welcome/index.js
CHANGED
|
@@ -35,12 +35,12 @@ module.exports = __toCommonJS(Welcome_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 = __toESM(require("react"));
|
|
39
38
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
40
39
|
var import_util = require("../_util");
|
|
41
40
|
var import_index = require("./index.less");
|
|
42
41
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
43
42
|
var import_step = __toESM(require("./step"));
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
44
|
var prefix = (0, import_util.getPrefix)("welcome");
|
|
45
45
|
var Welcome = ({
|
|
46
46
|
title,
|
|
@@ -58,7 +58,13 @@ var Welcome = ({
|
|
|
58
58
|
}) => {
|
|
59
59
|
const isDefault = stepType === "default";
|
|
60
60
|
const renderStep = (item, index) => {
|
|
61
|
-
const DefaultStep = () => /* @__PURE__ */
|
|
61
|
+
const DefaultStep = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Col, { span: 12, "data-testid": "steps", className: `${prefix}-item`, children: [
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-order-wrapper`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-order`, children: index + 1 }) }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: `${prefix}-title`, children: item.title }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: `${prefix}-description`, children: item.description })
|
|
66
|
+
] })
|
|
67
|
+
] }, item.title);
|
|
62
68
|
const StepProps = {
|
|
63
69
|
title: item.title,
|
|
64
70
|
description: item.description,
|
|
@@ -67,44 +73,65 @@ var Welcome = ({
|
|
|
67
73
|
operations: item.operations,
|
|
68
74
|
locale
|
|
69
75
|
};
|
|
70
|
-
const StepItem = isDefault ? /* @__PURE__ */
|
|
76
|
+
const StepItem = isDefault ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultStep, {}, item.title) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_step.default, { "data-testid": "steps", ...StepProps }, item.title);
|
|
71
77
|
return StepItem;
|
|
72
78
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${`${prefix}-container`} ${className}`, ...restProps, children: [
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
81
|
+
import_design.Row,
|
|
82
|
+
{
|
|
83
|
+
className: `${prefix}-page-header`,
|
|
84
|
+
style: {
|
|
85
|
+
backgroundImage: `url("${bgImage}")`
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Col, { span: 24, className: `${prefix}-title`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: title }) }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Col, { span: 16, className: `${prefix}-description`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: description }) })
|
|
90
|
+
]
|
|
79
91
|
}
|
|
80
|
-
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Card, { bordered: false, className: `${prefix}-introduce`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Row, { gutter: 78, children: introduces.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Col, { span: 8, className: `${prefix}-item`, "data-testid": "introduces", children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: item.image, alt: "", height: 80 }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: `${prefix}-title`, children: item.title }),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: `${prefix}-description`, children: item.description })
|
|
98
|
+
] })
|
|
99
|
+
] }, item.image)) }) }),
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Row, { className: `${prefix}-content`, children: [
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Col, { span: 14, className: isDefault ? `${prefix}-left` : `${prefix}-border-right`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Row, { justify: "space-around", children: [
|
|
102
|
+
steps.map((item, index) => renderStep(item, index)),
|
|
103
|
+
isDefault && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Col, { span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-btn-wrapper`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
|
+
import_design.Button,
|
|
105
|
+
{
|
|
106
|
+
size: "large",
|
|
107
|
+
type: "primary",
|
|
108
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.PlusOutlined, {}),
|
|
109
|
+
block: true,
|
|
110
|
+
...buttonProps,
|
|
111
|
+
children: buttonText
|
|
112
|
+
}
|
|
113
|
+
) }) })
|
|
114
|
+
] }) }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Col, { span: 10, className: `${prefix}-right`, children: [
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: `${prefix}-title`, children: locale.helpTitle }),
|
|
117
|
+
helps.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
+
import_design.Button,
|
|
119
|
+
{
|
|
120
|
+
shape: "round",
|
|
121
|
+
onClick: () => {
|
|
122
|
+
(0, import_util.directTo)(item.link);
|
|
123
|
+
},
|
|
124
|
+
className: (0, import_classnames.default)({
|
|
125
|
+
[`${prefix}-more`]: !!item.isMore
|
|
126
|
+
}),
|
|
127
|
+
"data-testid": "helps",
|
|
128
|
+
children: item.title
|
|
129
|
+
},
|
|
130
|
+
item.title
|
|
131
|
+
))
|
|
132
|
+
] })
|
|
133
|
+
] })
|
|
134
|
+
] });
|
|
108
135
|
};
|
|
109
136
|
var Welcome_default = (0, import_LocaleWrapper.default)({
|
|
110
137
|
componentName: "Welcome",
|
|
@@ -0,0 +1,28 @@
|
|
|
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/Welcome/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
|
+
helpTitle: "クイックスタート",
|
|
27
|
+
defaultOperation: "デフォルト操作"
|
|
28
|
+
};
|
package/lib/Welcome/step.js
CHANGED
|
@@ -33,17 +33,24 @@ __export(step_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(step_exports);
|
|
35
35
|
var import_design = require("@oceanbase/design");
|
|
36
|
-
var import_react = __toESM(require("react"));
|
|
37
36
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
38
37
|
var import_util = require("../_util");
|
|
39
38
|
var import_index = require("./index.less");
|
|
40
39
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
41
|
var prefix = (0, import_util.getPrefix)("welcome-step");
|
|
42
42
|
var WelcomeStep = (props) => {
|
|
43
43
|
const { title, description, operations, imgUrl, locale } = props;
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Col, { span: 11, className: prefix, children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-left`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imgUrl, alt: "", width: "60" }) }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-right`, children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: `${prefix}-title`, children: title }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: `${prefix}-description`, children: description }),
|
|
49
|
+
operations && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-operations`, children: operations == null ? void 0 : operations.map((operation, index) => {
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { onClick: operation.onClick, className: `${prefix}-operation`, children: operation.text || locale.defaultOperation }, index);
|
|
51
|
+
}) })
|
|
52
|
+
] })
|
|
53
|
+
] }, title);
|
|
47
54
|
};
|
|
48
55
|
var step_default = (0, import_LocaleWrapper.default)({
|
|
49
56
|
componentName: "WelcomeStep",
|
|
@@ -35,6 +35,10 @@ module.exports = __toCommonJS(LocaleWrapper_exports);
|
|
|
35
35
|
var import_design = require("@oceanbase/design");
|
|
36
36
|
var import_hoist_non_react_statics = __toESM(require("hoist-non-react-statics"));
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_jsx_runtime = (
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
require("react/jsx-runtime")
|
|
41
|
+
);
|
|
38
42
|
var LocaleWrapper_default = ({ componentName, defaultLocale }) => (BaseComponent) => {
|
|
39
43
|
class Hoc extends import_react.default.Component {
|
|
40
44
|
render() {
|
|
@@ -48,19 +52,16 @@ var LocaleWrapper_default = ({ componentName, defaultLocale }) => (BaseComponent
|
|
|
48
52
|
// 这里使用 antLocale,不能直接顶掉 locale 属性,有些组件内部会维护一个 locale 去做特殊判断
|
|
49
53
|
antLocale: (antLocale == null ? void 0 : antLocale.locale) || "zh-cn"
|
|
50
54
|
};
|
|
51
|
-
return (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
...newProps
|
|
62
|
-
}
|
|
63
|
-
)
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
+
BaseComponent,
|
|
57
|
+
{
|
|
58
|
+
ref: forwardedRef,
|
|
59
|
+
theme: {
|
|
60
|
+
hashed: ((_a = process.env.NODE_ENV) == null ? void 0 : _a.toLowerCase()) !== "test"
|
|
61
|
+
},
|
|
62
|
+
locale: { ...localeData, ...customLocale },
|
|
63
|
+
...newProps
|
|
64
|
+
}
|
|
64
65
|
);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
@@ -69,7 +70,7 @@ var LocaleWrapper_default = ({ componentName, defaultLocale }) => (BaseComponent
|
|
|
69
70
|
Hoc.contextType = import_design.ConfigProvider.ConfigContext;
|
|
70
71
|
const ForwardComponent = import_react.default.forwardRef(
|
|
71
72
|
// @ts-ignore
|
|
72
|
-
(props, ref) => /* @__PURE__ */
|
|
73
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Hoc, { ...props, forwardedRef: ref })
|
|
73
74
|
);
|
|
74
75
|
return (0, import_hoist_non_react_statics.default)(ForwardComponent, BaseComponent);
|
|
75
76
|
};
|