@oceanbase/ui 1.0.0-alpha.2 → 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/FooterToolbar/style/index.d.ts +0 -2
- package/es/FooterToolbar/style/index.js +0 -12
- package/es/Highlight/index.d.ts +1 -1
- package/es/ProCard/style/index.d.ts +2 -2
- package/es/ProCard/style/index.js +3 -2
- package/es/ProTable/style/index.d.ts +2 -2
- package/es/ProTable/style/index.js +6 -5
- 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.js +349 -313
- 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.d.ts +1 -1
- 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 +9 -5
- 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 +5 -4
- package/lib/ProCard/style/index.d.ts +2 -2
- package/lib/ProCard/style/index.js +3 -2
- package/lib/ProTable/index.js +5 -4
- package/lib/ProTable/style/index.d.ts +2 -2
- package/lib/ProTable/style/index.js +6 -7
- 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 +3 -3
package/lib/SideTip/Dragger.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(Dragger_exports);
|
|
|
35
35
|
var import_classnames = __toESM(require("classnames"));
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_utils = require("./utils");
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var INIT_RIGHT = 32;
|
|
39
40
|
var INIT_BOTTOM = 32;
|
|
40
41
|
var Draggable = class extends import_react.default.Component {
|
|
@@ -245,7 +246,7 @@ var Draggable = class extends import_react.default.Component {
|
|
|
245
246
|
[`${containerPrefix}-hide`]: hide,
|
|
246
247
|
[`${containerPrefix}-hide-not-dragged`]: hide && !dragged
|
|
247
248
|
});
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
249
250
|
"div",
|
|
250
251
|
{
|
|
251
252
|
id,
|
|
@@ -254,9 +255,9 @@ var Draggable = class extends import_react.default.Component {
|
|
|
254
255
|
onMouseEnter,
|
|
255
256
|
onMouseLeave,
|
|
256
257
|
style: hide ? { ...containerStyle, right: -width / 1.5 } : containerStyle,
|
|
257
|
-
className: containerClassName
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
className: containerClassName,
|
|
259
|
+
children
|
|
260
|
+
}
|
|
260
261
|
);
|
|
261
262
|
}
|
|
262
263
|
};
|
|
@@ -32,9 +32,9 @@ __export(IconLoading_exports, {
|
|
|
32
32
|
default: () => IconLoading_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(IconLoading_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
35
|
var import_icons = __toESM(require("@oceanbase/icons"));
|
|
37
|
-
var
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var LoadingSvg = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
38
|
"svg",
|
|
39
39
|
{
|
|
40
40
|
version: "1.1",
|
|
@@ -46,31 +46,31 @@ var LoadingSvg = () => /* @__PURE__ */ import_react.default.createElement(
|
|
|
46
46
|
height: "1em",
|
|
47
47
|
stroke: "currentColor",
|
|
48
48
|
viewBox: "3 3 34 34",
|
|
49
|
-
preserveAspectRatio: "xMinYMin meet"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"path",
|
|
53
|
-
{
|
|
54
|
-
strokeWidth: "1",
|
|
55
|
-
strokeMiterlimit: "10",
|
|
56
|
-
d: "M5.203,20\n c0-8.159,6.638-14.797,14.797-14.797V5C11.729,5,5,11.729,5,20s6.729,15,15,15v-0.203C11.841,34.797,5.203,28.159,5.203,20z",
|
|
57
|
-
transform: "rotate(278.217 20 20)"
|
|
58
|
-
},
|
|
59
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
60
|
-
"animateTransform",
|
|
49
|
+
preserveAspectRatio: "xMinYMin meet",
|
|
50
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
"path",
|
|
61
52
|
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
53
|
+
strokeWidth: "1",
|
|
54
|
+
strokeMiterlimit: "10",
|
|
55
|
+
d: "M5.203,20\n c0-8.159,6.638-14.797,14.797-14.797V5C11.729,5,5,11.729,5,20s6.729,15,15,15v-0.203C11.841,34.797,5.203,28.159,5.203,20z",
|
|
56
|
+
transform: "rotate(278.217 20 20)",
|
|
57
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
"animateTransform",
|
|
59
|
+
{
|
|
60
|
+
attributeName: "transform",
|
|
61
|
+
type: "rotate",
|
|
62
|
+
from: "0 20 20",
|
|
63
|
+
to: "360 20 20",
|
|
64
|
+
calcMode: "spline",
|
|
65
|
+
keySplines: "0.2, 0.2, 0.2, 0.2",
|
|
66
|
+
keyTimes: "0;1",
|
|
67
|
+
dur: "1.2s",
|
|
68
|
+
repeatCount: "indefinite"
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
|
-
|
|
73
|
+
}
|
|
74
74
|
);
|
|
75
|
-
var iconLoading = (props) => /* @__PURE__ */
|
|
75
|
+
var iconLoading = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.default, { component: LoadingSvg, ...props });
|
|
76
76
|
var IconLoading_default = iconLoading;
|
package/lib/SideTip/index.js
CHANGED
|
@@ -42,6 +42,7 @@ var import_Dragger = __toESM(require("./Dragger"));
|
|
|
42
42
|
var import_IconLoading = __toESM(require("./IconLoading"));
|
|
43
43
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var STORE_SIDETIP_HIDE = "ob-sidetip-hide";
|
|
46
47
|
var getLocalStorageKey = (id) => {
|
|
47
48
|
return [`${STORE_SIDETIP_HIDE}`, id].join("-");
|
|
@@ -132,7 +133,7 @@ var SideTip = (props) => {
|
|
|
132
133
|
typeCls && `${buttonPrefix}-icon-${typeCls}`,
|
|
133
134
|
sizeCls && `${buttonPrefix}-icon-${sizeCls}`
|
|
134
135
|
);
|
|
135
|
-
const iconDom = /* @__PURE__ */
|
|
136
|
+
const iconDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: iconClassName, children: import_react.default.isValidElement(icon) ? icon : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: icon, alt: "icon", width: "100%", height: "100%" }) });
|
|
136
137
|
const closeClassName = (0, import_classnames.default)(`${buttonPrefix}-close`, {
|
|
137
138
|
[`${buttonPrefix}-close-show`]: open || visible,
|
|
138
139
|
[`${buttonPrefix}-close-${typeCls}`]: typeCls,
|
|
@@ -147,13 +148,19 @@ var SideTip = (props) => {
|
|
|
147
148
|
[`${buttonPrefix}-loading-${typeCls}`]: typeCls,
|
|
148
149
|
[`${buttonPrefix}-loading-${sizeCls}`]: sizeCls
|
|
149
150
|
});
|
|
150
|
-
const InnerButton = /* @__PURE__ */
|
|
151
|
-
|
|
151
|
+
const InnerButton = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: buttonClassName, ref: buttonRef, style: buttonStyle, children: [
|
|
152
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_IconLoading.default, { className: loadingClassName }),
|
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
154
|
+
iconDom,
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, { className: closeClassName })
|
|
156
|
+
] })
|
|
157
|
+
] });
|
|
158
|
+
const BadgeButton = badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Badge, { offset: [-6, 6], ...badge, children: InnerButton }) : InnerButton;
|
|
152
159
|
const hideIconClassName = (0, import_classnames.default)(`${prefix}-hide`, {
|
|
153
160
|
[`${prefix}-hide-hovered`]: hovered
|
|
154
161
|
});
|
|
155
|
-
const hideIcon = /* @__PURE__ */
|
|
156
|
-
return /* @__PURE__ */
|
|
162
|
+
const hideIcon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: "ui-mini-hide", onClick: hideSideTip, className: hideIconClassName, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-hide-icon` }) });
|
|
163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
157
164
|
import_Dragger.default,
|
|
158
165
|
{
|
|
159
166
|
id,
|
|
@@ -171,11 +178,13 @@ var SideTip = (props) => {
|
|
|
171
178
|
onDrag,
|
|
172
179
|
getPopupContainer,
|
|
173
180
|
className,
|
|
174
|
-
draggable
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
draggable,
|
|
182
|
+
children: [
|
|
183
|
+
tooltip && tooltip.title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { ...tooltip, getPopupContainer: () => buttonRef.current, children: BadgeButton }) : BadgeButton,
|
|
184
|
+
hideable && hideIcon,
|
|
185
|
+
children
|
|
186
|
+
]
|
|
187
|
+
}
|
|
179
188
|
);
|
|
180
189
|
};
|
|
181
190
|
var SideTip_default = (0, import_LocaleWrapper.default)({
|
package/lib/TagSelect/Group.js
CHANGED
|
@@ -38,6 +38,7 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_TagSelectContext = __toESM(require("./TagSelectContext"));
|
|
39
39
|
var import_Item = __toESM(require("./Item"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
42
|
function toArray(value) {
|
|
42
43
|
let res = value;
|
|
43
44
|
if (value === void 0) {
|
|
@@ -106,21 +107,24 @@ var Group = ({
|
|
|
106
107
|
return option;
|
|
107
108
|
});
|
|
108
109
|
}, [options]);
|
|
109
|
-
const childrenNode = options.length ? memoOptions.map((option) => /* @__PURE__ */
|
|
110
|
+
const childrenNode = options.length ? memoOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
111
|
import_Item.default,
|
|
111
112
|
{
|
|
112
|
-
key: option.value.toString(),
|
|
113
113
|
disabled: "disabled" in option ? option.disabled : restProps.disabled,
|
|
114
114
|
value: option.value,
|
|
115
115
|
onChange: option.onChange,
|
|
116
116
|
style: option.style,
|
|
117
|
-
checked: value == null ? void 0 : value.includes(option.value)
|
|
117
|
+
checked: value == null ? void 0 : value.includes(option.value),
|
|
118
|
+
children: option.label
|
|
118
119
|
},
|
|
119
|
-
option.
|
|
120
|
+
option.value.toString()
|
|
120
121
|
)) : children;
|
|
121
122
|
const groupCls = (0, import_classnames.default)(`${prefix}-container`, hashId, className);
|
|
122
123
|
return wrapSSR(
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TagSelectContext.default.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: groupCls, children: [
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-title`, children: title }),
|
|
126
|
+
childrenNode
|
|
127
|
+
] }) })
|
|
124
128
|
);
|
|
125
129
|
};
|
|
126
130
|
var Group_default = Group;
|
package/lib/TagSelect/Item.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_style = __toESM(require("./style"));
|
|
40
40
|
var import_util = require("../_util");
|
|
41
41
|
var import_TagSelectContext = __toESM(require("./TagSelectContext"));
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var Item = ({
|
|
43
44
|
children,
|
|
44
45
|
handleChange,
|
|
@@ -81,28 +82,31 @@ var Item = ({
|
|
|
81
82
|
}
|
|
82
83
|
}, [tagSelectGroup.value, restProps.value]);
|
|
83
84
|
const renderCover = () => {
|
|
84
|
-
return coverType === "string" ? /* @__PURE__ */
|
|
85
|
+
return coverType === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-cover`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: cover, alt: "tagselect" }) }) : cover;
|
|
85
86
|
};
|
|
86
87
|
return wrapSSR(
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
onChange
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
tagSelectGroup.handleValueChange
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: wrapperClassName, style: restProps.style, children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
+
import_rc_checkbox.default,
|
|
91
|
+
{
|
|
92
|
+
...restProps,
|
|
93
|
+
checked,
|
|
94
|
+
prefixCls,
|
|
95
|
+
onChange: (e) => {
|
|
96
|
+
if (!("checked" in restProps) && !Object.keys(tagSelectGroup).length) {
|
|
97
|
+
setChecked(e.target.checked);
|
|
98
|
+
}
|
|
99
|
+
if (onChange) {
|
|
100
|
+
onChange(e);
|
|
101
|
+
}
|
|
102
|
+
if (tagSelectGroup.handleValueChange) {
|
|
103
|
+
tagSelectGroup.handleValueChange(e.target.value);
|
|
104
|
+
}
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
),
|
|
108
|
+
cover ? renderCover() : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children })
|
|
109
|
+
] })
|
|
106
110
|
);
|
|
107
111
|
};
|
|
108
112
|
var Item_default = Item;
|
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)({
|
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
|
);
|