@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/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",
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@ant-design/cssinjs": "^1.24.0",
|
|
42
42
|
"@ant-design/pro-components": "^2.8.10",
|
|
43
43
|
"@antv/g6": "3.4.10",
|
|
44
|
-
"@oceanbase/design": "^1.0.0-alpha.
|
|
44
|
+
"@oceanbase/design": "^1.0.0-alpha.3",
|
|
45
45
|
"@oceanbase/icons": "^1.0.0-alpha.0",
|
|
46
46
|
"@oceanbase/util": "^1.0.0-alpha.1",
|
|
47
47
|
"ahooks": "^2.10.14",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": ">=16.9.0",
|
|
71
71
|
"react-dom": ">=16.9.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "62c3cf2b25248d70e4f1826e69c019a38e03753e"
|
|
74
74
|
}
|