@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,42 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import jaJP from '@oceanbase/design/es/locale/ja-JP';
|
|
8
|
+
import BasicLayout from "../BasicLayout/locale/ja-JP";
|
|
9
|
+
import BatchOperationBar from "../BatchOperationBar/locale/ja-JP";
|
|
10
|
+
import Boundary from "../Boundary/locale/ja-JP";
|
|
11
|
+
import Dialog from "../Dialog/locale/ja-JP";
|
|
12
|
+
import DocDialog from "../DocDialog/locale/ja-JP";
|
|
13
|
+
import FullscreenBox from "../FullscreenBox/locale/ja-JP";
|
|
14
|
+
import GraphToolbar from "../GraphToolbar/locale/ja-JP";
|
|
15
|
+
import Highlight from "../Highlight/locale/ja-JP";
|
|
16
|
+
import Login from "../Login/locale/ja-JP";
|
|
17
|
+
import PageContainer from "../PageContainer/locale/ja-JP";
|
|
18
|
+
import Password from "../Password/locale/ja-JP";
|
|
19
|
+
import Ranger from "../Ranger/locale/ja-JP";
|
|
20
|
+
import DateRanger from "../DateRanger/locale/ja-JP";
|
|
21
|
+
import SideTip from "../SideTip/locale/ja-JP";
|
|
22
|
+
import TaskGraph from "../TaskGraph/locale/ja-JP";
|
|
23
|
+
import Welcome from "../Welcome/locale/ja-JP";
|
|
24
|
+
export default _objectSpread(_objectSpread({}, jaJP), {}, {
|
|
25
|
+
// 业务组件
|
|
26
|
+
BasicLayout: BasicLayout,
|
|
27
|
+
PageContainer: PageContainer,
|
|
28
|
+
Login: Login,
|
|
29
|
+
Welcome: Welcome,
|
|
30
|
+
GraphToolbar: GraphToolbar,
|
|
31
|
+
TaskGraph: TaskGraph,
|
|
32
|
+
Ranger: Ranger,
|
|
33
|
+
Password: Password,
|
|
34
|
+
Boundary: Boundary,
|
|
35
|
+
Dialog: Dialog,
|
|
36
|
+
SideTip: SideTip,
|
|
37
|
+
DocDialog: DocDialog,
|
|
38
|
+
Highlight: Highlight,
|
|
39
|
+
FullscreenBox: FullscreenBox,
|
|
40
|
+
BatchOperationBar: BatchOperationBar,
|
|
41
|
+
DateRanger: DateRanger
|
|
42
|
+
});
|
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;
|
|
@@ -48,6 +49,64 @@ var getOrder = ({ type, fixed }) => {
|
|
|
48
49
|
}
|
|
49
50
|
return order;
|
|
50
51
|
};
|
|
52
|
+
var findActionComponent = (element, depth = 0) => {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
if (!import_react.default.isValidElement(element)) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (((_a = element.type) == null ? void 0 : _a.__DISPLAY_NAME) === "button" || ((_b = element.type) == null ? void 0 : _b.__DISPLAY_NAME) === "link") {
|
|
58
|
+
return { action: element, wrapper: null };
|
|
59
|
+
}
|
|
60
|
+
if (depth > 10) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const elementChildren = (_c = element.props) == null ? void 0 : _c.children;
|
|
64
|
+
if (elementChildren) {
|
|
65
|
+
const child = import_react.default.Children.only(elementChildren);
|
|
66
|
+
if (import_react.default.isValidElement(child)) {
|
|
67
|
+
const result = findActionComponent(child, depth + 1);
|
|
68
|
+
if (result) {
|
|
69
|
+
return { action: result.action, wrapper: element };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
};
|
|
75
|
+
var renderMenuItemContent = (action, actionProps, enableLoading) => {
|
|
76
|
+
const { loading, children, tooltip } = actionProps;
|
|
77
|
+
const result = findActionComponent(action);
|
|
78
|
+
if (!result) {
|
|
79
|
+
const content2 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
80
|
+
loading && enableLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
|
|
81
|
+
" ",
|
|
82
|
+
children || action
|
|
83
|
+
] });
|
|
84
|
+
return tooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: tooltip, children: content2 }) : content2;
|
|
85
|
+
}
|
|
86
|
+
const { action: actualAction, wrapper } = result;
|
|
87
|
+
const newAction = import_react.default.cloneElement(actualAction, {
|
|
88
|
+
...actualAction.props,
|
|
89
|
+
...actionProps,
|
|
90
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
91
|
+
loading && enableLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
|
|
92
|
+
" ",
|
|
93
|
+
children || actualAction.props.children
|
|
94
|
+
] })
|
|
95
|
+
});
|
|
96
|
+
if (wrapper) {
|
|
97
|
+
const wrapperProps = wrapper.props;
|
|
98
|
+
return import_react.default.cloneElement(wrapper, {
|
|
99
|
+
...wrapperProps,
|
|
100
|
+
children: newAction
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
104
|
+
loading && enableLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}),
|
|
105
|
+
" ",
|
|
106
|
+
children || actualAction.props.children
|
|
107
|
+
] });
|
|
108
|
+
return tooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { title: tooltip, children: content }) : content;
|
|
109
|
+
};
|
|
51
110
|
var Group_default = ({
|
|
52
111
|
prefixCls: customizePrefixCls,
|
|
53
112
|
size = 3,
|
|
@@ -95,58 +154,75 @@ var Group_default = ({
|
|
|
95
154
|
const getDefaultDisabled = (key) => (shouldDisabled == null ? void 0 : shouldDisabled(key)) ?? false;
|
|
96
155
|
let moreDom;
|
|
97
156
|
if (ellipsisType === "button") {
|
|
98
|
-
moreDom = /* @__PURE__ */
|
|
157
|
+
moreDom = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
158
|
import_design.Button,
|
|
100
159
|
{
|
|
101
160
|
size: buttonSize,
|
|
102
|
-
icon: moreText ? void 0 : /* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
|
|
161
|
+
icon: moreText ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisOutlined, { style: { cursor: "pointer" } }),
|
|
162
|
+
children: moreText
|
|
163
|
+
}
|
|
105
164
|
);
|
|
106
165
|
} else {
|
|
107
|
-
moreDom = /* @__PURE__ */
|
|
166
|
+
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
167
|
}
|
|
109
168
|
return wrapSSR(
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: ellipsisType === "button" ? 8 : 16, children: [
|
|
170
|
+
mainActions.map((action) => {
|
|
171
|
+
return import_react.default.cloneElement(action, {
|
|
172
|
+
// size should be covered by action props
|
|
173
|
+
size: buttonSize,
|
|
174
|
+
...action.props,
|
|
175
|
+
key: action.key,
|
|
176
|
+
enableLoading,
|
|
177
|
+
disabled: (0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key)
|
|
178
|
+
});
|
|
179
|
+
}),
|
|
180
|
+
ellipsisActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
181
|
+
import_design.Dropdown,
|
|
182
|
+
{
|
|
183
|
+
placement: dropDownPlacement,
|
|
184
|
+
overlay: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu, { className: `${prefixCls}-more-menu`, children: ellipsisActions.map((action, index) => {
|
|
185
|
+
const actionKey = action.key;
|
|
186
|
+
const actionResult = findActionComponent(action);
|
|
187
|
+
const actualAction = (actionResult == null ? void 0 : actionResult.action) || action;
|
|
188
|
+
const actionProps = actualAction.props;
|
|
189
|
+
const actionDisabled = actionProps.loading || ((0, import_lodash.isBoolean)(actionProps.disabled) ? actionProps.disabled : getDefaultDisabled(action.key));
|
|
190
|
+
const menuItemProps = (0, import_lodash.omit)(actionProps, [
|
|
191
|
+
"disabled",
|
|
192
|
+
"loading",
|
|
193
|
+
"tooltip",
|
|
194
|
+
"visible",
|
|
195
|
+
"fixed",
|
|
196
|
+
"enableLoading",
|
|
197
|
+
"onClick",
|
|
198
|
+
"children",
|
|
199
|
+
"danger"
|
|
200
|
+
]);
|
|
201
|
+
const handleMenuItemClick = (info) => {
|
|
202
|
+
var _a;
|
|
203
|
+
if (actionResult == null ? void 0 : actionResult.wrapper) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
(_a = actionProps.onClick) == null ? void 0 : _a.call(actionProps, info.domEvent);
|
|
207
|
+
};
|
|
208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
210
|
+
import_design.Menu.Item,
|
|
211
|
+
{
|
|
212
|
+
onClick: handleMenuItemClick,
|
|
213
|
+
disabled: actionDisabled,
|
|
214
|
+
danger: !!actionProps.danger,
|
|
215
|
+
...menuItemProps,
|
|
216
|
+
children: renderMenuItemContent(action, actionProps, enableLoading)
|
|
217
|
+
},
|
|
218
|
+
actionKey ?? index.toString()
|
|
219
|
+
),
|
|
220
|
+
actionProps.divider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Divider, {})
|
|
221
|
+
] });
|
|
222
|
+
}) }),
|
|
223
|
+
children: moreDom
|
|
224
|
+
}
|
|
225
|
+
)
|
|
226
|
+
] })
|
|
151
227
|
);
|
|
152
228
|
};
|
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
|
};
|
|
@@ -32,7 +32,6 @@ var genActionStyle = (token) => {
|
|
|
32
32
|
const margin = `-${paddingVertical}px -${paddingHorizontal}px`;
|
|
33
33
|
return {
|
|
34
34
|
[`${componentCls}-more-menu`]: {
|
|
35
|
-
background: "red",
|
|
36
35
|
[`${antCls}-dropdown-menu-item`]: {
|
|
37
36
|
[`${antCls}-typography`]: {
|
|
38
37
|
display: "block",
|
|
@@ -61,6 +60,22 @@ var genActionStyle = (token) => {
|
|
|
61
60
|
[`${antCls}-wave`]: {
|
|
62
61
|
display: "none"
|
|
63
62
|
}
|
|
63
|
+
},
|
|
64
|
+
// 确保 danger 状态的样式能够正确显示,不覆盖 Menu.Item 的默认 danger 颜色
|
|
65
|
+
[`&${antCls}-dropdown-menu-item-danger`]: {
|
|
66
|
+
[`${antCls}-typography`]: {
|
|
67
|
+
[`&:not(${antCls}-typography-disabled)`]: {
|
|
68
|
+
color: "unset"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
[`${antCls}-btn`]: {
|
|
72
|
+
[`&:not(:disabled):not(${antCls}-btn-disabled)`]: {
|
|
73
|
+
color: "unset",
|
|
74
|
+
[`&:hover`]: {
|
|
75
|
+
color: "unset"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
}
|
|
@@ -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 = {
|