@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
package/lib/Action/Group.js
CHANGED
|
@@ -37,6 +37,7 @@ var import_design = require("@oceanbase/design");
|
|
|
37
37
|
var import_icons = require("@oceanbase/icons");
|
|
38
38
|
var import_lodash = require("lodash");
|
|
39
39
|
var import_style = __toESM(require("./style"));
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
41
|
var getOrder = ({ type, fixed }) => {
|
|
41
42
|
const ORDER_SET = { primary: 3, fixed: 2, default: 0 };
|
|
42
43
|
let order = ORDER_SET.default;
|
|
@@ -95,58 +96,68 @@ var Group_default = ({
|
|
|
95
96
|
const getDefaultDisabled = (key) => (shouldDisabled == null ? void 0 : shouldDisabled(key)) ?? false;
|
|
96
97
|
let moreDom;
|
|
97
98
|
if (ellipsisType === "button") {
|
|
98
|
-
moreDom = /* @__PURE__ */
|
|
99
|
+
moreDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
100
|
import_design.Button,
|
|
100
101
|
{
|
|
101
102
|
size: buttonSize,
|
|
102
|
-
icon: moreText ? void 0 : /* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
icon: moreText ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } }),
|
|
104
|
+
children: moreText
|
|
105
|
+
}
|
|
105
106
|
);
|
|
106
107
|
} else {
|
|
107
|
-
moreDom = /* @__PURE__ */
|
|
108
|
+
moreDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Typography.Link, { children: moreText ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } }) });
|
|
108
109
|
}
|
|
109
110
|
return wrapSSR(
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
disabled =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: ellipsisType === "button" ? 8 : 16, children: [
|
|
112
|
+
mainActions.map((action) => {
|
|
113
|
+
return import_react.default.cloneElement(action, {
|
|
114
|
+
// size should be covered by action props
|
|
115
|
+
size: buttonSize,
|
|
116
|
+
...action.props,
|
|
117
|
+
key: action.key,
|
|
118
|
+
enableLoading,
|
|
119
|
+
disabled: (0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key)
|
|
120
|
+
});
|
|
121
|
+
}),
|
|
122
|
+
ellipsisActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
+
import_design.Dropdown,
|
|
124
|
+
{
|
|
125
|
+
placement: dropDownPlacement,
|
|
126
|
+
overlay: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu, { className: `${prefixCls}-more-menu`, children: ellipsisActions.map((action, index) => {
|
|
127
|
+
const actionKey = action.key;
|
|
128
|
+
let disabled = false;
|
|
129
|
+
if ((0, import_lodash.isBoolean)(action.props.disabled))
|
|
130
|
+
disabled = action.props.disabled;
|
|
131
|
+
else if (shouldDisabled)
|
|
132
|
+
disabled = shouldDisabled(action.key);
|
|
133
|
+
const actionDisabled = action.props.loading || ((0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key));
|
|
134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
136
|
+
import_design.Menu.Item,
|
|
137
|
+
{
|
|
138
|
+
onClick: ({ domEvent }) => {
|
|
139
|
+
var _a, _b;
|
|
140
|
+
(_b = (_a = action.props).onClick) == null ? void 0 : _b.call(
|
|
141
|
+
_a,
|
|
142
|
+
domEvent
|
|
143
|
+
);
|
|
144
|
+
},
|
|
145
|
+
...(0, import_lodash.omit)(action.props, ["disabled"]),
|
|
146
|
+
disabled: actionDisabled,
|
|
147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Tooltip, { title: action.props.tooltip, children: [
|
|
148
|
+
action.props.loading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
|
|
149
|
+
" ",
|
|
150
|
+
action.props.children || action
|
|
151
|
+
] })
|
|
152
|
+
},
|
|
153
|
+
actionKey ?? index.toString()
|
|
154
|
+
),
|
|
155
|
+
action.props.divider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Divider, {})
|
|
156
|
+
] });
|
|
157
|
+
}) }),
|
|
158
|
+
children: moreDom
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] })
|
|
151
162
|
);
|
|
152
163
|
};
|
package/lib/Action/Item.js
CHANGED
|
@@ -36,6 +36,7 @@ module.exports = __toCommonJS(Item_exports);
|
|
|
36
36
|
var import_icons = require("@oceanbase/icons");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
40
|
var ActionButton = class extends import_react.default.PureComponent {
|
|
40
41
|
constructor() {
|
|
41
42
|
super(...arguments);
|
|
@@ -45,7 +46,7 @@ var ActionButton = class extends import_react.default.PureComponent {
|
|
|
45
46
|
}
|
|
46
47
|
render() {
|
|
47
48
|
const { children, onClick, enableLoading = true, tooltip, loading, ...restProps } = this.props;
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { placement: "top", title: tooltip, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
50
|
import_design.Button,
|
|
50
51
|
{
|
|
51
52
|
loading: enableLoading && (loading || this.state.loading),
|
|
@@ -58,10 +59,10 @@ var ActionButton = class extends import_react.default.PureComponent {
|
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
|
-
...restProps
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
));
|
|
62
|
+
...restProps,
|
|
63
|
+
children
|
|
64
|
+
}
|
|
65
|
+
) });
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
68
|
ActionButton.__DISPLAY_NAME = "button";
|
|
@@ -85,7 +86,7 @@ var ActionLink = class extends import_react.default.PureComponent {
|
|
|
85
86
|
style,
|
|
86
87
|
...restProps
|
|
87
88
|
} = this.props;
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
90
|
import_design.Typography.Link,
|
|
90
91
|
{
|
|
91
92
|
style: { padding: 0, ...style },
|
|
@@ -99,9 +100,13 @@ var ActionLink = class extends import_react.default.PureComponent {
|
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
},
|
|
102
|
-
...restProps
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
...restProps,
|
|
104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Tooltip, { placement: "top", title: tooltip, children: [
|
|
105
|
+
loading || this.state.disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}) : "",
|
|
106
|
+
" ",
|
|
107
|
+
children
|
|
108
|
+
] })
|
|
109
|
+
}
|
|
105
110
|
);
|
|
106
111
|
}
|
|
107
112
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { CSSObject } from '@ant-design/cssinjs';
|
|
3
3
|
import type { OBToken } from '../../_util/genComponentStyleHook';
|
|
4
|
-
export declare const genActionStyle:
|
|
4
|
+
export declare const genActionStyle: (token: OBToken) => CSSObject;
|
|
5
5
|
declare const _default: (prefixCls: string) => {
|
|
6
6
|
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
7
7
|
hashId: string;
|
|
@@ -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/BackgroundTaskManager/RefreshMan.tsx
|
|
@@ -34,8 +24,9 @@ __export(RefreshMan_exports, {
|
|
|
34
24
|
module.exports = __toCommonJS(RefreshMan_exports);
|
|
35
25
|
var import_ahooks = require("ahooks");
|
|
36
26
|
var import_design = require("@oceanbase/design");
|
|
37
|
-
var import_react =
|
|
27
|
+
var import_react = require("react");
|
|
38
28
|
var import_constants = require("./constants");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
30
|
var RefreshMan = (0, import_react.forwardRef)((props, ref) => {
|
|
40
31
|
const {
|
|
41
32
|
run,
|
|
@@ -78,7 +69,7 @@ var RefreshMan = (0, import_react.forwardRef)((props, ref) => {
|
|
|
78
69
|
stopLoop();
|
|
79
70
|
};
|
|
80
71
|
}, [startLoop, stopLoop, timeout]);
|
|
81
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Spin, { spinning: spinning && refreshManLoading, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }) });
|
|
82
73
|
});
|
|
83
74
|
// Annotate the CommonJS export names for ESM import in node:
|
|
84
75
|
0 && (module.exports = {
|
|
@@ -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/BackgroundTaskManager/index.tsx
|
|
@@ -34,10 +24,11 @@ __export(BackgroundTaskManager_exports, {
|
|
|
34
24
|
default: () => BackgroundTaskManager_default
|
|
35
25
|
});
|
|
36
26
|
module.exports = __toCommonJS(BackgroundTaskManager_exports);
|
|
37
|
-
var import_react =
|
|
27
|
+
var import_react = require("react");
|
|
38
28
|
var import_design = require("@oceanbase/design");
|
|
39
29
|
var import_constants = require("./constants");
|
|
40
30
|
var import_RefreshMan = require("./RefreshMan");
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
32
|
var NotificationApi = /* @__PURE__ */ ((NotificationApi2) => {
|
|
42
33
|
NotificationApi2["success"] = "success";
|
|
43
34
|
NotificationApi2["error"] = "error";
|
|
@@ -166,7 +157,7 @@ var BackgroundTaskManager_default = (0, import_react.forwardRef)((props, ref) =>
|
|
|
166
157
|
window.removeEventListener("beforeunload", onUnload);
|
|
167
158
|
};
|
|
168
159
|
}, [queue, preset]);
|
|
169
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: !!taskQueue.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RefreshMan.RefreshMan, { run, rollingFrequency }) });
|
|
170
161
|
});
|
|
171
162
|
// Annotate the CommonJS export names for ESM import in node:
|
|
172
163
|
0 && (module.exports = {
|
|
@@ -36,7 +36,7 @@ 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_moment = __toESM(require("moment"));
|
|
39
|
-
var import_react =
|
|
39
|
+
var import_react = require("react");
|
|
40
40
|
var import_constant = require("../constant");
|
|
41
41
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
42
42
|
var import_util = require("../_util");
|
|
@@ -46,6 +46,7 @@ var import_oceanbase_logo = __toESM(require("../assets/logo/oceanbase_logo.svg")
|
|
|
46
46
|
var import_oceanbase_logo_dark = __toESM(require("../assets/logo/oceanbase_logo_dark.svg"));
|
|
47
47
|
var import_LocaleDropdown = __toESM(require("../LocaleDropdown"));
|
|
48
48
|
var import_Header = __toESM(require("./style/Header"));
|
|
49
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
50
|
var Header = ({
|
|
50
51
|
prefixCls: customizePrefixCls,
|
|
51
52
|
showLabel = true,
|
|
@@ -76,7 +77,7 @@ var Header = ({
|
|
|
76
77
|
const navigate = (0, import_useNavigate.default)();
|
|
77
78
|
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
78
79
|
const isWelcome = pathname === welcomePath;
|
|
79
|
-
const helpMenu = /* @__PURE__ */
|
|
80
|
+
const helpMenu = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
81
|
import_design.Menu,
|
|
81
82
|
{
|
|
82
83
|
onClick: ({ key }) => {
|
|
@@ -96,73 +97,130 @@ var Header = ({
|
|
|
96
97
|
} else if (key === "about") {
|
|
97
98
|
setVisible(true);
|
|
98
99
|
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
},
|
|
101
|
+
children: [
|
|
102
|
+
welcomePath && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale.welcome }, "welcome"),
|
|
103
|
+
versionNoticePath && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale.versionNotice }, "versionNotice"),
|
|
104
|
+
docsPath && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale.viewDocs }, "viewDocs"),
|
|
105
|
+
pdfPath && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale.downloadDocs }, "downloadDocs"),
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: `${locale.about}${appData.shortName ? ` ${appData.shortName}` : ""}` }, "about")
|
|
107
|
+
]
|
|
108
|
+
}
|
|
106
109
|
);
|
|
107
110
|
return wrapSSR(
|
|
108
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
109
112
|
"div",
|
|
110
113
|
{
|
|
111
114
|
...restProps,
|
|
112
115
|
className: (0, import_classnames.default)(prefixCls, {
|
|
113
116
|
[`${prefixCls}-welcome`]: isWelcome
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
117
|
+
}),
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-content`, children: [
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
+
"img",
|
|
122
|
+
{
|
|
123
|
+
src: simpleLogoUrl,
|
|
124
|
+
alt: "",
|
|
125
|
+
onClick: () => {
|
|
126
|
+
navigate == null ? void 0 : navigate("/");
|
|
127
|
+
},
|
|
128
|
+
className: `${prefixCls}-logo`
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-title`, children: title }),
|
|
132
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-extra ${prefixCls}-extra-with-label`, children: [
|
|
133
|
+
extra,
|
|
134
|
+
showHelp && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: helpMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className: `${prefixCls}-extra-item`, children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.BulbOutlined, {}),
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-testid": "help", children: locale.help })
|
|
137
|
+
] }) }),
|
|
138
|
+
showLocale && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LocaleDropdown.default, { locales: locales || langs, className: `${prefixCls}-extra-item` }),
|
|
139
|
+
userMenu ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: userMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { shape: "round", size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className: `${prefixCls}-extra-item`, children: [
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserOutlined, {}),
|
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: username })
|
|
142
|
+
] }) }) }) : (
|
|
143
|
+
// userMenu username 都不存在时,不展示该项
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: username ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { shape: "round", size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className: `${prefixCls}-extra-item`, children: [
|
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserOutlined, {}),
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: username })
|
|
147
|
+
] }) }) : null })
|
|
148
|
+
)
|
|
149
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-extra`, children: [
|
|
150
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-extra-item`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: helpMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-extra-icon-wrapper`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.BulbFilled, {}) }) }) }),
|
|
151
|
+
docsPath && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: locale.viewDocs, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
152
|
+
"span",
|
|
153
|
+
{
|
|
154
|
+
className: `${prefixCls}-extra-item`,
|
|
155
|
+
onClick: () => {
|
|
156
|
+
(0, import_util.directTo)(docsPath);
|
|
157
|
+
},
|
|
158
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-extra-icon-wrapper`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ReadFilled, {}) })
|
|
159
|
+
}
|
|
160
|
+
) }),
|
|
161
|
+
showLocale && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
162
|
+
import_LocaleDropdown.default,
|
|
163
|
+
{
|
|
164
|
+
showLabel: true,
|
|
165
|
+
locales: locales || langs,
|
|
166
|
+
className: `${prefixCls}-extra-item`
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
userMenu ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-extra-item`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: userMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-extra-user-wrapper`, children: [
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserFilled, { className: `${prefixCls}-extra-user-icon` }),
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-extra-username`, children: username })
|
|
172
|
+
] }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-extra-item`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-extra-user-wrapper`, children: [
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserFilled, { className: `${prefixCls}-extra-user-icon` }),
|
|
174
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: username })
|
|
175
|
+
] }) })
|
|
176
|
+
] })
|
|
177
|
+
] }),
|
|
178
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
179
|
+
import_design.Modal,
|
|
180
|
+
{
|
|
181
|
+
visible,
|
|
182
|
+
open: visible,
|
|
183
|
+
destroyOnClose: true,
|
|
184
|
+
footer: false,
|
|
185
|
+
onCancel: () => {
|
|
186
|
+
setVisible(false);
|
|
187
|
+
},
|
|
188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-about-wrapper`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-about`, children: [
|
|
189
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: logoUrl, alt: "", className: `${prefixCls}-logo` }),
|
|
190
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-release-info`, children: [
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-version`, children: [
|
|
192
|
+
locale.version,
|
|
193
|
+
": ",
|
|
194
|
+
appData.version
|
|
195
|
+
] }),
|
|
196
|
+
appData.releaseTime && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-date`, children: `${locale.releaseTime}: ${appData.releaseTime}` })
|
|
197
|
+
] }),
|
|
198
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
199
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: import_constant.OB_SITE_LINK, target: "_blank", rel: "noopener noreferrer", children: import_constant.OB_SITE_LINK }) }),
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
style: { display: "flex", justifyContent: "space-between", alignItems: "center" },
|
|
204
|
+
children: [
|
|
205
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-copyright`, children: [
|
|
206
|
+
locale.right,
|
|
207
|
+
" ",
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CopyrightOutlined, {}),
|
|
209
|
+
" ",
|
|
210
|
+
(0, import_moment.default)().year(),
|
|
211
|
+
" ",
|
|
212
|
+
locale.company
|
|
213
|
+
] }),
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: (theme == null ? void 0 : theme.isDark) ? import_oceanbase_logo_dark.default : import_oceanbase_logo.default, alt: "", style: { height: 12 } })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
] })
|
|
219
|
+
] }) })
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
]
|
|
223
|
+
}
|
|
166
224
|
)
|
|
167
225
|
);
|
|
168
226
|
};
|