@oceanbase/ui 0.2.4 → 0.2.6
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/index.d.ts +1 -0
- package/es/Boundary/index.d.ts +1 -0
- package/es/PageContainer/style/index.js +2 -2
- package/es/Ranger/Ranger.js +2 -1
- package/es/TaskGraph/index.js +4 -2
- package/es/index.less +1 -0
- package/lib/Action/index.d.ts +1 -0
- package/lib/Boundary/index.d.ts +1 -0
- package/lib/PageContainer/style/index.js +2 -2
- package/lib/Ranger/Ranger.js +4 -3
- package/lib/TaskGraph/index.js +3 -2
- package/lib/index.less +1 -0
- package/package.json +3 -3
package/es/Action/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ActionButton, ActionLink } from './Item';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
Group: ({ size, children, dropDownPlacement, shouldVisible, shouldDisabled, enableLoading, moreText, }: import("./Group").GroupProps) => import("react").JSX.Element;
|
package/es/Boundary/index.d.ts
CHANGED
|
@@ -43,8 +43,8 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
|
43
43
|
}), _$concat)), _defineProperty(_$concat2, "".concat(antCls, "-page-header-footer"), {
|
|
44
44
|
marginBlockStart: 0
|
|
45
45
|
}), _$concat2)), _defineProperty(_$concat3, "".concat(componentCls, "-warp-page-header"), {
|
|
46
|
-
paddingInline: paddingLG,
|
|
47
|
-
paddingBlock: padding
|
|
46
|
+
paddingInline: "".concat(paddingLG, "px !important"),
|
|
47
|
+
paddingBlock: "".concat(padding, "px !important")
|
|
48
48
|
}), _defineProperty(_$concat3, "".concat(componentCls, "-children-container"), {
|
|
49
49
|
paddingInline: paddingLG,
|
|
50
50
|
paddingBlockStart: 0,
|
package/es/Ranger/Ranger.js
CHANGED
|
@@ -21,6 +21,7 @@ import zhCN from "./locale/zh-CN";
|
|
|
21
21
|
import QuickPicker from "./QuickPicker";
|
|
22
22
|
var prefix = getPrefix('ranger');
|
|
23
23
|
var Ranger = function Ranger(props) {
|
|
24
|
+
var _selects$;
|
|
24
25
|
var _props$selects = props.selects,
|
|
25
26
|
selects = _props$selects === void 0 ? [NEAR_1_MINUTES, NEAR_30_MINUTES, NEAR_1_HOURS] : _props$selects,
|
|
26
27
|
value = props.value,
|
|
@@ -46,7 +47,7 @@ var Ranger = function Ranger(props) {
|
|
|
46
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47
48
|
innerValue = _useState2[0],
|
|
48
49
|
setInnerValue = _useState2[1];
|
|
49
|
-
var _useState3 = useState(value || defaultValue ? CUSTOMIZE : defaultQuickValue !== null && defaultQuickValue !== void 0 ? defaultQuickValue : selects[0]
|
|
50
|
+
var _useState3 = useState(value || defaultValue ? CUSTOMIZE : defaultQuickValue !== null && defaultQuickValue !== void 0 ? defaultQuickValue : selects === null || selects === void 0 ? void 0 : (_selects$ = selects[0]) === null || _selects$ === void 0 ? void 0 : _selects$.name),
|
|
50
51
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
51
52
|
rangeName = _useState4[0],
|
|
52
53
|
setRangeName = _useState4[1];
|
package/es/TaskGraph/index.js
CHANGED
|
@@ -68,9 +68,11 @@ var TaskGraph = function TaskGraph(_ref) {
|
|
|
68
68
|
// 关闭当前打开的 tab 页
|
|
69
69
|
if (newPanes.length > 0 && activeKey === targetKey) {
|
|
70
70
|
if (lastIndex >= 0) {
|
|
71
|
-
|
|
71
|
+
var _newPanes$lastIndex;
|
|
72
|
+
setActiveKey("".concat(newPanes === null || newPanes === void 0 ? void 0 : (_newPanes$lastIndex = newPanes[lastIndex]) === null || _newPanes$lastIndex === void 0 ? void 0 : _newPanes$lastIndex.id));
|
|
72
73
|
} else {
|
|
73
|
-
|
|
74
|
+
var _newPanes$;
|
|
75
|
+
setActiveKey("".concat(newPanes === null || newPanes === void 0 ? void 0 : (_newPanes$ = newPanes[0]) === null || _newPanes$ === void 0 ? void 0 : _newPanes$.id));
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
setPanes(newPanes);
|
package/es/index.less
CHANGED
package/lib/Action/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ActionButton, ActionLink } from './Item';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
Group: ({ size, children, dropDownPlacement, shouldVisible, shouldDisabled, enableLoading, moreText, }: import("./Group").GroupProps) => import("react").JSX.Element;
|
package/lib/Boundary/index.d.ts
CHANGED
|
@@ -79,8 +79,8 @@ var genPageContainerStyle = (token) => {
|
|
|
79
79
|
},
|
|
80
80
|
// 减小内容区左右两侧间距
|
|
81
81
|
[`${componentCls}-warp-page-header`]: {
|
|
82
|
-
paddingInline: paddingLG
|
|
83
|
-
paddingBlock: padding
|
|
82
|
+
paddingInline: `${paddingLG}px !important`,
|
|
83
|
+
paddingBlock: `${padding}px !important`
|
|
84
84
|
},
|
|
85
85
|
[`${componentCls}-children-container`]: {
|
|
86
86
|
paddingInline: paddingLG,
|
package/lib/Ranger/Ranger.js
CHANGED
|
@@ -45,6 +45,7 @@ var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
|
45
45
|
var import_QuickPicker = __toESM(require("./QuickPicker"));
|
|
46
46
|
var prefix = (0, import_util.getPrefix)("ranger");
|
|
47
47
|
var Ranger = (props) => {
|
|
48
|
+
var _a;
|
|
48
49
|
const {
|
|
49
50
|
selects = [import_constant.NEAR_1_MINUTES, import_constant.NEAR_30_MINUTES, import_constant.NEAR_1_HOURS],
|
|
50
51
|
value,
|
|
@@ -64,11 +65,11 @@ var Ranger = (props) => {
|
|
|
64
65
|
const isMoment = import_moment.default.isMoment(defaultValue == null ? void 0 : defaultValue[0]) || import_moment.default.isMoment(defaultValue == null ? void 0 : defaultValue[1]) || import_moment.default.isMoment(value == null ? void 0 : value[0]) || import_moment.default.isMoment(value == null ? void 0 : value[1]);
|
|
65
66
|
const [innerValue, setInnerValue] = (0, import_react.useState)(value ?? defaultValue);
|
|
66
67
|
const [rangeName, setRangeName] = (0, import_react.useState)(
|
|
67
|
-
value || defaultValue ? import_constant.CUSTOMIZE : defaultQuickValue ?? selects[0].name
|
|
68
|
+
value || defaultValue ? import_constant.CUSTOMIZE : defaultQuickValue ?? ((_a = selects == null ? void 0 : selects[0]) == null ? void 0 : _a.name)
|
|
68
69
|
);
|
|
69
70
|
const defaultInternalValue = (0, import_react.useMemo)(() => {
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
71
|
+
var _a2;
|
|
72
|
+
return (_a2 = selects.find((item) => item.name === rangeName)) == null ? void 0 : _a2.range(isMoment ? (0, import_moment.default)() : (0, import_dayjs.default)());
|
|
72
73
|
}, [defaultValue]);
|
|
73
74
|
const compare = (m1, m2) => {
|
|
74
75
|
if (Array.isArray(m1) && !Array.isArray(m2))
|
package/lib/TaskGraph/index.js
CHANGED
|
@@ -58,6 +58,7 @@ var TaskGraph = ({
|
|
|
58
58
|
const [panes, setPanes] = (0, import_react.useState)([]);
|
|
59
59
|
const [collapsed, setCollapsed] = (0, import_react.useState)(true);
|
|
60
60
|
function handleEditLogWindow(targetKey, action) {
|
|
61
|
+
var _a, _b;
|
|
61
62
|
if (action === "remove") {
|
|
62
63
|
let lastIndex = -1;
|
|
63
64
|
panes.forEach((item, i) => {
|
|
@@ -68,9 +69,9 @@ var TaskGraph = ({
|
|
|
68
69
|
const newPanes = panes.filter((item) => `${item.id}` !== targetKey);
|
|
69
70
|
if (newPanes.length > 0 && activeKey === targetKey) {
|
|
70
71
|
if (lastIndex >= 0) {
|
|
71
|
-
setActiveKey(`${newPanes[lastIndex].id}`);
|
|
72
|
+
setActiveKey(`${(_a = newPanes == null ? void 0 : newPanes[lastIndex]) == null ? void 0 : _a.id}`);
|
|
72
73
|
} else {
|
|
73
|
-
setActiveKey(`${newPanes[0].id}`);
|
|
74
|
+
setActiveKey(`${(_b = newPanes == null ? void 0 : newPanes[0]) == null ? void 0 : _b.id}`);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
setPanes(newPanes);
|
package/lib/index.less
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"OceanBase",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ant-design/cssinjs": "^1.9.1",
|
|
39
39
|
"@ant-design/pro-components": "^2.4.12",
|
|
40
|
-
"@oceanbase/design": "^0.2.
|
|
40
|
+
"@oceanbase/design": "^0.2.6",
|
|
41
41
|
"@oceanbase/icons": "^0.2.1",
|
|
42
42
|
"@oceanbase/util": "^0.2.2",
|
|
43
43
|
"ahooks": "^2.10.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"react-dom": "^16.9.0",
|
|
68
68
|
"react-router-dom": ">=5.2.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "ad719a3964434132196e732bb61004498ad829ee"
|
|
71
71
|
}
|