@oceanbase/ui 0.4.20 → 0.4.21
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/ja-JP.d.ts +11 -0
- package/es/Boundary/locale/ja-JP.js +10 -0
- 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/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/ja-JP.d.ts +11 -0
- package/lib/Boundary/locale/ja-JP.js +34 -0
- 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/NavMenu/index.js +9 -8
- package/lib/PageContainer/ItemRender.js +5 -5
- package/lib/PageContainer/index.js +8 -4
- package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
- package/lib/PageContainer/locale/ja-JP.js +27 -0
- package/lib/PageLoading/index.js +6 -16
- package/lib/Password/Content.js +38 -42
- package/lib/Password/index.js +83 -68
- package/lib/Password/locale/ja-JP.d.ts +13 -0
- package/lib/Password/locale/ja-JP.js +36 -0
- package/lib/ProCard/index.js +4 -3
- package/lib/ProTable/index.js +5 -4
- package/lib/Ranger/QuickPicker.js +24 -15
- package/lib/Ranger/Ranger.js +37 -34
- package/lib/Ranger/locale/ja-JP.d.ts +28 -0
- package/lib/Ranger/locale/ja-JP.js +53 -0
- package/lib/SideTip/Dragger.js +5 -4
- package/lib/SideTip/IconLoading.js +25 -25
- package/lib/SideTip/index.js +19 -10
- package/lib/SideTip/locale/ja-JP.d.ts +2 -0
- package/lib/SideTip/locale/ja-JP.js +25 -0
- package/lib/TagSelect/Group.js +9 -5
- package/lib/TagSelect/Item.js +22 -18
- package/lib/TaskGraph/Graph.js +29 -24
- package/lib/TaskGraph/index.js +56 -50
- package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
- package/lib/TaskGraph/locale/ja-JP.js +36 -0
- package/lib/TreeSearch/index.js +30 -35
- package/lib/Welcome/index.js +64 -37
- package/lib/Welcome/locale/ja-JP.d.ts +5 -0
- package/lib/Welcome/locale/ja-JP.js +28 -0
- package/lib/Welcome/step.js +11 -4
- package/lib/locale/LocaleWrapper.js +15 -14
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +71 -0
- package/package.json +5 -5
package/lib/ProCard/index.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(ProCard_exports, {
|
|
|
32
32
|
default: () => ProCard_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(ProCard_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import_pro_components = require("@ant-design/pro-components");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
var import_util = require("@oceanbase/design/es/_util");
|
|
@@ -40,6 +40,7 @@ var import_design2 = require("@oceanbase/design");
|
|
|
40
40
|
var import_classnames = __toESM(require("classnames"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
var import_icons = require("@oceanbase/icons");
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var ProCard = ({
|
|
44
45
|
ghost,
|
|
45
46
|
title,
|
|
@@ -65,7 +66,7 @@ var ProCard = ({
|
|
|
65
66
|
className
|
|
66
67
|
);
|
|
67
68
|
return wrapSSR(
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
70
|
import_pro_components.ProCard,
|
|
70
71
|
{
|
|
71
72
|
prefixCls: customizePrefixCls,
|
|
@@ -79,7 +80,7 @@ var ProCard = ({
|
|
|
79
80
|
bodyStyle,
|
|
80
81
|
className: proCardCls,
|
|
81
82
|
collapsibleIconRender: ({ collapsed }) => {
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
84
|
import_icons.CaretRightFilled,
|
|
84
85
|
{
|
|
85
86
|
className: `${iconPrefixCls} ${iconPrefixCls}-right ${prefixCls}-collapsible-icon`,
|
package/lib/ProTable/index.js
CHANGED
|
@@ -32,13 +32,14 @@ __export(ProTable_exports, {
|
|
|
32
32
|
default: () => ProTable_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(ProTable_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import_pro_components = require("@ant-design/pro-components");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
39
|
var import_lodash = require("lodash");
|
|
40
40
|
var import_style = __toESM(require("../LightFilter/style"));
|
|
41
41
|
var import_style2 = __toESM(require("./style"));
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
function ProTable({
|
|
43
44
|
form,
|
|
44
45
|
headerTitle,
|
|
@@ -78,13 +79,13 @@ function ProTable({
|
|
|
78
79
|
const prefixCls = getPrefixCls("pro-table", customizePrefixCls);
|
|
79
80
|
const { wrapSSR } = (0, import_style2.default)(prefixCls);
|
|
80
81
|
const proTableCls = (0, import_classnames.default)(className);
|
|
81
|
-
const { emptyText = /* @__PURE__ */
|
|
82
|
+
const { emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Empty, { image: import_design.Empty.PRESENTED_IMAGE_SIMPLE }), ...restLocale } = locale || {};
|
|
82
83
|
const cardProps = typeof outerCardProps === "boolean" ? {} : outerCardProps;
|
|
83
84
|
const proCardCls = getPrefixCls("pro-card", customizePrefixCls);
|
|
84
85
|
return tableWrapSSR(
|
|
85
86
|
lightFilterWrapSSR(
|
|
86
87
|
wrapSSR(
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
89
|
import_pro_components.ProTable,
|
|
89
90
|
{
|
|
90
91
|
defaultSize: "large",
|
|
@@ -125,7 +126,7 @@ function ProTable({
|
|
|
125
126
|
footer,
|
|
126
127
|
locale: {
|
|
127
128
|
...restLocale,
|
|
128
|
-
emptyText: /* @__PURE__ */
|
|
129
|
+
emptyText: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${tablePrefixCls}-empty-wrapper`, children: typeof emptyText === "function" ? emptyText() : emptyText })
|
|
129
130
|
},
|
|
130
131
|
prefixCls: customizePrefixCls,
|
|
131
132
|
tableClassName: tableCls,
|
|
@@ -38,9 +38,10 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
38
38
|
var import_dayjs = __toESM(require("dayjs"));
|
|
39
39
|
var import_lodash = require("lodash");
|
|
40
40
|
var import_moment = __toESM(require("moment"));
|
|
41
|
-
var import_react =
|
|
41
|
+
var import_react = require("react");
|
|
42
42
|
var import_util = require("../_util");
|
|
43
43
|
var import_constant = require("./constant");
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
45
|
var prefix = (0, import_util.getPrefix)("ranger-quick-picker");
|
|
45
46
|
var RangeDropdown = ({
|
|
46
47
|
selects,
|
|
@@ -50,19 +51,25 @@ var RangeDropdown = ({
|
|
|
50
51
|
locale = {},
|
|
51
52
|
...rest
|
|
52
53
|
}) => {
|
|
53
|
-
const menu = /* @__PURE__ */
|
|
54
|
+
const menu = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
54
55
|
import_design.Menu,
|
|
55
56
|
{
|
|
56
57
|
onClick: (e) => {
|
|
57
58
|
onChange(e.key);
|
|
58
59
|
},
|
|
59
|
-
style: { minWidth: 120 }
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
style: { minWidth: 120 },
|
|
61
|
+
children: [
|
|
62
|
+
selects.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale[item.name] || item.name }, item.name)),
|
|
63
|
+
customable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale.customize }, import_constant.CUSTOMIZE)
|
|
64
|
+
]
|
|
65
|
+
}
|
|
63
66
|
);
|
|
64
67
|
const match = selects.find((item) => item.name === value);
|
|
65
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: menu, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { style: { cursor: "pointer" }, className: (0, import_classnames.default)(prefix, `${prefix}-dropdown`), children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ClockCircleOutlined, {}),
|
|
70
|
+
locale[match == null ? void 0 : match.name] || (match == null ? void 0 : match.name),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DownOutlined, {})
|
|
72
|
+
] }) });
|
|
66
73
|
};
|
|
67
74
|
var RangeSelect = ({
|
|
68
75
|
selects,
|
|
@@ -76,7 +83,7 @@ var RangeSelect = ({
|
|
|
76
83
|
const handleChange = (nextValue) => {
|
|
77
84
|
onChange(nextValue);
|
|
78
85
|
};
|
|
79
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
87
|
import_design.Select,
|
|
81
88
|
{
|
|
82
89
|
className: (0, import_classnames.default)(prefix, `${prefix}-select`),
|
|
@@ -84,12 +91,14 @@ var RangeSelect = ({
|
|
|
84
91
|
onSelect: handleChange,
|
|
85
92
|
value,
|
|
86
93
|
size,
|
|
87
|
-
...rest
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
...rest,
|
|
95
|
+
children: [
|
|
96
|
+
selects.map((item) => {
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Select.Option, { value: item.name, children: locale[item.name] || item.name }, item.name);
|
|
98
|
+
}),
|
|
99
|
+
customable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Select.Option, { value: import_constant.CUSTOMIZE, children: locale.customize }, import_constant.CUSTOMIZE)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
93
102
|
);
|
|
94
103
|
};
|
|
95
104
|
var QuickPicker_default = (props) => {
|
|
@@ -118,5 +127,5 @@ var QuickPicker_default = (props) => {
|
|
|
118
127
|
}
|
|
119
128
|
onNameChange(value);
|
|
120
129
|
};
|
|
121
|
-
return type === "select" ? /* @__PURE__ */
|
|
130
|
+
return type === "select" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RangeSelect, { value: innerName, selects, onChange: handleChange, ...rest }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RangeDropdown, { value: innerName, selects, onChange: handleChange, ...rest });
|
|
122
131
|
};
|
package/lib/Ranger/Ranger.js
CHANGED
|
@@ -37,13 +37,14 @@ var import_dayjs = __toESM(require("dayjs"));
|
|
|
37
37
|
var import_lodash = require("lodash");
|
|
38
38
|
var import_moment = __toESM(require("moment"));
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
|
-
var import_react =
|
|
40
|
+
var import_react = require("react");
|
|
41
41
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
42
42
|
var import_util = require("../_util");
|
|
43
43
|
var import_constant = require("./constant");
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
45
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
46
46
|
var import_QuickPicker = __toESM(require("./QuickPicker"));
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
48
|
var prefix = (0, import_util.getPrefix)("ranger");
|
|
48
49
|
var Ranger = (props) => {
|
|
49
50
|
var _a;
|
|
@@ -121,7 +122,7 @@ var Ranger = (props) => {
|
|
|
121
122
|
}
|
|
122
123
|
const showRange = mode === "default" || rangeName === import_constant.CUSTOMIZE;
|
|
123
124
|
const showQuickPicker = selects.length !== 0;
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
125
126
|
import_design.Space,
|
|
126
127
|
{
|
|
127
128
|
size: 0,
|
|
@@ -131,38 +132,40 @@ var Ranger = (props) => {
|
|
|
131
132
|
},
|
|
132
133
|
prefix
|
|
133
134
|
),
|
|
134
|
-
style: rest.style
|
|
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
|
-
|
|
135
|
+
style: rest.style,
|
|
136
|
+
children: [
|
|
137
|
+
showQuickPicker && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
138
|
+
import_QuickPicker.default,
|
|
139
|
+
{
|
|
140
|
+
customable: true,
|
|
141
|
+
type: internalQuickType,
|
|
142
|
+
onChange: rangeChange,
|
|
143
|
+
onNameChange: handleNameChange,
|
|
144
|
+
selects,
|
|
145
|
+
name: rangeName,
|
|
146
|
+
locale,
|
|
147
|
+
isMoment,
|
|
148
|
+
size,
|
|
149
|
+
...quickPickerProps
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
showRange && // @ts-ignore
|
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
154
|
+
import_design.DatePicker.RangePicker,
|
|
155
|
+
{
|
|
156
|
+
disabledDate: pastOnly ? disabledFuture : disabledDate,
|
|
157
|
+
format: import_constant.DATE_TIME_FORMAT,
|
|
158
|
+
defaultValue,
|
|
159
|
+
value: innerValue || defaultInternalValue,
|
|
160
|
+
onChange: datePickerChange,
|
|
161
|
+
showTime: true,
|
|
162
|
+
className: `${prefix}-range-picker`,
|
|
163
|
+
size,
|
|
164
|
+
...(0, import_lodash.omit)(rest, "value", "onChange")
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
]
|
|
168
|
+
}
|
|
166
169
|
);
|
|
167
170
|
};
|
|
168
171
|
var Ranger_default = (0, import_LocaleWrapper.default)({
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
customize: string;
|
|
3
|
+
'\u8FD1 1 \u5206\u949F': string;
|
|
4
|
+
'\u8FD1 5 \u5206\u949F': string;
|
|
5
|
+
'\u8FD1 10 \u5206\u949F': string;
|
|
6
|
+
'\u8FD1 20 \u5206\u949F': string;
|
|
7
|
+
'\u8FD1 30 \u5206\u949F': string;
|
|
8
|
+
'\u8FD1 1 \u5C0F\u65F6': string;
|
|
9
|
+
'\u8FD1 2 \u5C0F\u65F6': string;
|
|
10
|
+
'\u8FD1 3 \u5C0F\u65F6': string;
|
|
11
|
+
'\u8FD1 6 \u5C0F\u65F6': string;
|
|
12
|
+
今天: string;
|
|
13
|
+
昨天: string;
|
|
14
|
+
明天: string;
|
|
15
|
+
本周: string;
|
|
16
|
+
上周: string;
|
|
17
|
+
下周: string;
|
|
18
|
+
本月: string;
|
|
19
|
+
上月: string;
|
|
20
|
+
下月: string;
|
|
21
|
+
本季度: string;
|
|
22
|
+
上季度: string;
|
|
23
|
+
下季度: string;
|
|
24
|
+
今年: string;
|
|
25
|
+
去年: string;
|
|
26
|
+
明年: string;
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Ranger/locale/ja-JP.ts
|
|
20
|
+
var ja_JP_exports = {};
|
|
21
|
+
__export(ja_JP_exports, {
|
|
22
|
+
default: () => ja_JP_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ja_JP_exports);
|
|
25
|
+
var ja_JP_default = {
|
|
26
|
+
customize: "カスタム時間",
|
|
27
|
+
// 为保证和之前的逻辑兼容,仍然使用中文作为 key
|
|
28
|
+
// TODO: 后续需要替换为英文 key
|
|
29
|
+
"近 1 分钟": "過去 1 分",
|
|
30
|
+
"近 5 分钟": "過去 5 分",
|
|
31
|
+
"近 10 分钟": "過去 10 分",
|
|
32
|
+
"近 20 分钟": "過去 20 分",
|
|
33
|
+
"近 30 分钟": "過去 30 分",
|
|
34
|
+
"近 1 小时": "過去 1 時間",
|
|
35
|
+
"近 2 小时": "過去 2 時間",
|
|
36
|
+
"近 3 小时": "過去 3 時間",
|
|
37
|
+
"近 6 小时": "過去 6 時間",
|
|
38
|
+
今天: "今日",
|
|
39
|
+
昨天: "昨日",
|
|
40
|
+
明天: "明日",
|
|
41
|
+
本周: "今週",
|
|
42
|
+
上周: "先週",
|
|
43
|
+
下周: "来週",
|
|
44
|
+
本月: "今月",
|
|
45
|
+
上月: "先月",
|
|
46
|
+
下月: "来月",
|
|
47
|
+
本季度: "今四半期",
|
|
48
|
+
上季度: "前四半期",
|
|
49
|
+
下季度: "次四半期",
|
|
50
|
+
今年: "今年",
|
|
51
|
+
去年: "去年",
|
|
52
|
+
明年: "来年"
|
|
53
|
+
};
|
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)({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/SideTip/locale/ja-JP.ts
|
|
20
|
+
var ja_JP_exports = {};
|
|
21
|
+
__export(ja_JP_exports, {
|
|
22
|
+
default: () => ja_JP_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ja_JP_exports);
|
|
25
|
+
var ja_JP_default = {};
|
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;
|