@oceanbase/ui 0.2.23 → 0.2.24
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/BasicLayout/index.js +5 -5
- package/es/BasicLayout/style/index.js +16 -6
- package/es/Highlight/index.d.ts +1 -1
- package/es/PageContainer/index.js +9 -4
- package/es/PageContainer/style/index.js +6 -3
- package/es/Ranger/QuickPicker.d.ts +2 -2
- package/es/Ranger/index.d.ts +2 -0
- package/es/Ranger/index.js +2 -0
- package/es/TreeSearch/index.d.ts +2 -2
- package/lib/BasicLayout/index.js +5 -4
- package/lib/BasicLayout/style/index.js +19 -8
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/PageContainer/index.js +8 -2
- package/lib/PageContainer/style/index.js +6 -3
- package/lib/Ranger/QuickPicker.d.ts +2 -2
- package/lib/Ranger/index.d.ts +2 -0
- package/lib/Ranger/index.js +8 -0
- package/lib/TreeSearch/index.d.ts +2 -2
- package/package.json +3 -3
package/es/BasicLayout/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var SubMenu = Menu.SubMenu,
|
|
|
38
38
|
Item = Menu.Item;
|
|
39
39
|
var prefix = getPrefix('layout');
|
|
40
40
|
var BasicLayout = function BasicLayout(_ref) {
|
|
41
|
-
var _classNames2;
|
|
41
|
+
var _classNames, _classNames2;
|
|
42
42
|
var children = _ref.children,
|
|
43
43
|
_ref$location = _ref.location,
|
|
44
44
|
_ref$location2 = _ref$location === void 0 ? {} : _ref$location,
|
|
@@ -64,10 +64,10 @@ var BasicLayout = function BasicLayout(_ref) {
|
|
|
64
64
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
65
65
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
66
66
|
getPrefixCls = _useContext.getPrefixCls;
|
|
67
|
-
var prefixCls = getPrefixCls('basic-layout', customizePrefixCls);
|
|
67
|
+
var prefixCls = getPrefixCls('pro-basic-layout', customizePrefixCls);
|
|
68
68
|
var _useStyle = useStyle(prefixCls),
|
|
69
69
|
wrapSSR = _useStyle.wrapSSR;
|
|
70
|
-
var basicLayoutCls = classNames(className);
|
|
70
|
+
var basicLayoutCls = classNames(prefixCls, className);
|
|
71
71
|
var navigate = useNavigate();
|
|
72
72
|
// 侧边栏导航是否收起
|
|
73
73
|
var _useState = useState(defaultCollapsed),
|
|
@@ -254,7 +254,7 @@ var BasicLayout = function BasicLayout(_ref) {
|
|
|
254
254
|
var siderWidth = 0;
|
|
255
255
|
// 根据菜单项的配置计算侧边栏的宽度
|
|
256
256
|
if (subSideMenus && menus) {
|
|
257
|
-
siderWidth = collapsed ?
|
|
257
|
+
siderWidth = collapsed ? 52 * 2 : 208;
|
|
258
258
|
} else if (subSideMenus && !menus) {
|
|
259
259
|
siderWidth = 52;
|
|
260
260
|
} else if (!subSideMenus && menus) {
|
|
@@ -267,7 +267,7 @@ var BasicLayout = function BasicLayout(_ref) {
|
|
|
267
267
|
className: "".concat(prefix, "-banner-wrapper"),
|
|
268
268
|
children: banner
|
|
269
269
|
}), /*#__PURE__*/_jsx(Layout, _objectSpread(_objectSpread({
|
|
270
|
-
className: classNames(prefix, className, basicLayoutCls,
|
|
270
|
+
className: classNames(prefix, className, basicLayoutCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-with-banner"), banner), _defineProperty(_classNames, "".concat(prefixCls, "-sider-").concat(siderWidth), true), _classNames))
|
|
271
271
|
}, restProps), {}, {
|
|
272
272
|
children: /*#__PURE__*/_jsxs(React.Fragment, {
|
|
273
273
|
children: [/*#__PURE__*/_jsx(Header, _objectSpread({
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
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; }
|
|
3
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
7
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
8
|
export var genBasicLayoutStyle = function genBasicLayoutStyle(token) {
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
var componentCls = token.componentCls,
|
|
10
|
+
proComponentsCls = token.proComponentsCls,
|
|
11
|
+
motionDurationSlow = token.motionDurationSlow;
|
|
12
|
+
var siderWidthList = [0, 52, 52 * 2, 192, 208];
|
|
13
|
+
var footerBarStyle = {};
|
|
14
|
+
siderWidthList.forEach(function (width) {
|
|
15
|
+
footerBarStyle["".concat(componentCls).concat(componentCls, "-sider-").concat(width)] = _defineProperty({}, "".concat(proComponentsCls, "-footer-bar"), {
|
|
16
|
+
// footer bar width adapt to sider width of BasicLayout
|
|
17
|
+
width: width === 0 ? '100%' : "calc(100% - ".concat(width, "px - 24px)"),
|
|
18
|
+
transition: "width ".concat(motionDurationSlow)
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return _objectSpread(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(proComponentsCls, "-page-container"), {
|
|
10
22
|
// 48px is the height of BasicLayout header
|
|
11
23
|
minHeight: 'calc(100vh - 48px)'
|
|
12
|
-
}),
|
|
13
|
-
width: "calc(100% - 192px - 24px)"
|
|
14
|
-
}), _ref;
|
|
24
|
+
})), footerBarStyle);
|
|
15
25
|
};
|
|
16
26
|
export default (function (prefixCls) {
|
|
17
27
|
var useStyle = genComponentStyleHook('BasicLayout', function (token) {
|
package/es/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "bash" | "json" | "java" | "go" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["prefixCls", "className", "header", "content", "extraContent", "tabList", "tabBarExtraContent", "locale"];
|
|
2
|
+
var _excluded = ["prefixCls", "className", "header", "content", "extraContent", "tabList", "tabBarExtraContent", "footerToolBarProps", "locale"];
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
5
|
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; }
|
|
@@ -27,6 +27,7 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
27
27
|
extraContent = _ref.extraContent,
|
|
28
28
|
tabList = _ref.tabList,
|
|
29
29
|
tabBarExtraContent = _ref.tabBarExtraContent,
|
|
30
|
+
footerToolBarProps = _ref.footerToolBarProps,
|
|
30
31
|
locale = _ref.locale,
|
|
31
32
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
@@ -41,7 +42,7 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
41
42
|
breadcrumb = _ref2.breadcrumb;
|
|
42
43
|
var reloadProps = isObject(reload) && ! /*#__PURE__*/React.isValidElement(reload) ? reload : {};
|
|
43
44
|
var reloadCls = classNames("".concat(rootPrefixCls, "-page-header-heading-reload"), reloadProps.className);
|
|
44
|
-
var newSubTitle = subTitle && /*#__PURE__*/_jsxs(Space, {
|
|
45
|
+
var newSubTitle = (reload || subTitle) && /*#__PURE__*/_jsxs(Space, {
|
|
45
46
|
size: 12,
|
|
46
47
|
children: [reload && /*#__PURE__*/_jsx(Tooltip, {
|
|
47
48
|
title: locale.reload,
|
|
@@ -63,7 +64,7 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
63
64
|
}
|
|
64
65
|
}, breadcrumb)
|
|
65
66
|
});
|
|
66
|
-
var noHasHeader = ['title', 'subTitle', 'extra', 'tags', '
|
|
67
|
+
var noHasHeader = ['title', 'subTitle', 'extra', 'tags', 'avatar', 'backIcon', 'breadcrumb'].every(function (item) {
|
|
67
68
|
return !(newHeader !== null && newHeader !== void 0 && newHeader[item]);
|
|
68
69
|
}) && !content && !extraContent && !tabList && !tabBarExtraContent;
|
|
69
70
|
var pageContainerCls = classNames(_defineProperty({}, "".concat(prefixCls, "-no-page-header"), noHasHeader), className);
|
|
@@ -74,7 +75,11 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
74
75
|
content: content,
|
|
75
76
|
extraContent: extraContent,
|
|
76
77
|
tabList: tabList,
|
|
77
|
-
tabBarExtraContent: tabBarExtraContent
|
|
78
|
+
tabBarExtraContent: tabBarExtraContent,
|
|
79
|
+
footerToolBarProps: _objectSpread(_objectSpread({}, footerToolBarProps), {}, {
|
|
80
|
+
// render footer as same level with PageContainer instead of under body
|
|
81
|
+
portalDom: false
|
|
82
|
+
})
|
|
78
83
|
}, restProps)));
|
|
79
84
|
};
|
|
80
85
|
export default LocaleWrapper({
|
|
@@ -24,7 +24,8 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
|
24
24
|
}, _defineProperty(_$concat3, "".concat(proComponentsCls, "-grid-content"), {
|
|
25
25
|
minHeight: 'auto'
|
|
26
26
|
}), _defineProperty(_$concat3, "".concat(antCls, "-page-header"), (_$concat2 = {}, _defineProperty(_$concat2, "".concat(antCls, "-page-header-breadcrumb"), {
|
|
27
|
-
|
|
27
|
+
// overwritten pro-components style
|
|
28
|
+
paddingBlockStart: 0
|
|
28
29
|
}), _defineProperty(_$concat2, "".concat(antCls, "-page-header-heading-title"), {
|
|
29
30
|
fontSize: fontSizeHeading3
|
|
30
31
|
}), _defineProperty(_$concat2, "".concat(antCls, "-page-header-heading-reload"), {
|
|
@@ -44,8 +45,10 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
|
44
45
|
}), _$concat)), _defineProperty(_$concat2, "".concat(antCls, "-page-header-footer"), {
|
|
45
46
|
marginBlockStart: 0
|
|
46
47
|
}), _$concat2)), _defineProperty(_$concat3, "".concat(componentCls, "-warp-page-header"), {
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
paddingInlineStart: paddingLG,
|
|
49
|
+
paddingInlineEnd: paddingLG,
|
|
50
|
+
paddingBlockStart: padding,
|
|
51
|
+
paddingBlockEnd: padding
|
|
49
52
|
}), _defineProperty(_$concat3, "".concat(componentCls, "-children-container"), {
|
|
50
53
|
paddingInline: paddingLG,
|
|
51
54
|
paddingBlockStart: 0,
|
|
@@ -2,7 +2,7 @@ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
|
|
|
2
2
|
import type { RangeValue } from './Ranger';
|
|
3
3
|
import type { RangeOption } from './typing';
|
|
4
4
|
export type QuickType = 'select' | 'dropdown';
|
|
5
|
-
interface
|
|
5
|
+
interface QuickPickerProps extends LocaleWrapperProps {
|
|
6
6
|
selects: RangeOption[];
|
|
7
7
|
type?: QuickType;
|
|
8
8
|
onChange: (range: RangeValue) => void;
|
|
@@ -13,5 +13,5 @@ interface IProps extends LocaleWrapperProps {
|
|
|
13
13
|
isMoment?: boolean;
|
|
14
14
|
size?: 'small' | 'large' | 'middle';
|
|
15
15
|
}
|
|
16
|
-
declare const _default: (props:
|
|
16
|
+
declare const _default: (props: QuickPickerProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
17
17
|
export default _default;
|
package/es/Ranger/index.d.ts
CHANGED
package/es/Ranger/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { LAST_MONTH, LAST_QUARTER, LAST_WEEK, LAST_YEAR, NEAR_10_MINUTES, NEAR_1_HOURS, NEAR_1_MINUTES, NEAR_20_MINUTES, NEAR_2_HOURS, NEAR_30_MINUTES, NEAR_3_HOURS, NEAR_5_MINUTES, NEAR_6_HOURS, NEXT_MONTH, NEXT_QUARTER, NEXT_WEEK, NEXT_YEAR, THIS_MONTH, THIS_QUARTER, THIS_WEEK, THIS_YEAR, TODAY, TOMORROW, YESTERDAY } from "./constant";
|
|
2
2
|
import QuickPicker from "./QuickPicker";
|
|
3
3
|
import InternalRanger from "./Ranger";
|
|
4
|
+
export * from "./QuickPicker";
|
|
5
|
+
export * from "./Ranger";
|
|
4
6
|
var Ranger = InternalRanger;
|
|
5
7
|
|
|
6
8
|
// 内置 ranges
|
package/es/TreeSearch/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface TreeSearchRef {
|
|
|
17
17
|
checkAll: () => void;
|
|
18
18
|
invertSelect: () => void;
|
|
19
19
|
}
|
|
20
|
-
interface
|
|
20
|
+
interface TreeSearchProps {
|
|
21
21
|
treeData: Node[];
|
|
22
22
|
titleRender?: (nodeData: DataNode) => React.ReactNode;
|
|
23
23
|
checkable?: boolean;
|
|
@@ -34,5 +34,5 @@ interface IProps {
|
|
|
34
34
|
loadData?: (data: unknown) => Promise<void>;
|
|
35
35
|
searchStyle?: {};
|
|
36
36
|
}
|
|
37
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
37
|
+
declare const _default: React.ForwardRefExoticComponent<TreeSearchProps & React.RefAttributes<TreeSearchRef>>;
|
|
38
38
|
export default _default;
|
package/lib/BasicLayout/index.js
CHANGED
|
@@ -71,9 +71,9 @@ var BasicLayout = ({
|
|
|
71
71
|
...restProps
|
|
72
72
|
}) => {
|
|
73
73
|
const { getPrefixCls } = (0, import_react.useContext)(import_design2.ConfigProvider.ConfigContext);
|
|
74
|
-
const prefixCls = getPrefixCls("basic-layout", customizePrefixCls);
|
|
74
|
+
const prefixCls = getPrefixCls("pro-basic-layout", customizePrefixCls);
|
|
75
75
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
76
|
-
const basicLayoutCls = (0, import_classnames.default)(className);
|
|
76
|
+
const basicLayoutCls = (0, import_classnames.default)(prefixCls, className);
|
|
77
77
|
const navigate = (0, import_useNavigate.default)();
|
|
78
78
|
const [collapsed, setCollapsed] = (0, import_react.useState)(defaultCollapsed);
|
|
79
79
|
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)(defaultSelectedKeys);
|
|
@@ -233,7 +233,7 @@ var BasicLayout = ({
|
|
|
233
233
|
};
|
|
234
234
|
let siderWidth = 0;
|
|
235
235
|
if (subSideMenus && menus) {
|
|
236
|
-
siderWidth = collapsed ?
|
|
236
|
+
siderWidth = collapsed ? 52 * 2 : 208;
|
|
237
237
|
} else if (subSideMenus && !menus) {
|
|
238
238
|
siderWidth = 52;
|
|
239
239
|
} else if (!subSideMenus && menus) {
|
|
@@ -246,7 +246,8 @@ var BasicLayout = ({
|
|
|
246
246
|
import_design2.Layout,
|
|
247
247
|
{
|
|
248
248
|
className: (0, import_classnames.default)(prefix, className, basicLayoutCls, {
|
|
249
|
-
[`${prefix}-with-banner`]: banner
|
|
249
|
+
[`${prefix}-with-banner`]: banner,
|
|
250
|
+
[`${prefixCls}-sider-${siderWidth}`]: true
|
|
250
251
|
}),
|
|
251
252
|
...restProps
|
|
252
253
|
},
|
|
@@ -25,16 +25,27 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genBasicLayoutStyle = (token) => {
|
|
28
|
-
const { proComponentsCls } = token;
|
|
28
|
+
const { componentCls, proComponentsCls, motionDurationSlow } = token;
|
|
29
|
+
const siderWidthList = [0, 52, 52 * 2, 192, 208];
|
|
30
|
+
const footerBarStyle = {};
|
|
31
|
+
siderWidthList.forEach((width) => {
|
|
32
|
+
footerBarStyle[`${componentCls}${componentCls}-sider-${width}`] = {
|
|
33
|
+
[`${proComponentsCls}-footer-bar`]: {
|
|
34
|
+
// footer bar width adapt to sider width of BasicLayout
|
|
35
|
+
width: width === 0 ? "100%" : `calc(100% - ${width}px - 24px)`,
|
|
36
|
+
transition: `width ${motionDurationSlow}`
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
});
|
|
29
40
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
[`${componentCls}`]: {
|
|
42
|
+
// Set style of PageContainer in BasicLayout
|
|
43
|
+
[`${proComponentsCls}-page-container`]: {
|
|
44
|
+
// 48px is the height of BasicLayout header
|
|
45
|
+
minHeight: "calc(100vh - 48px)"
|
|
46
|
+
}
|
|
34
47
|
},
|
|
35
|
-
|
|
36
|
-
width: `calc(100% - 192px - 24px)`
|
|
37
|
-
}
|
|
48
|
+
...footerBarStyle
|
|
38
49
|
};
|
|
39
50
|
};
|
|
40
51
|
var style_default = (prefixCls) => {
|
package/lib/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "java" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -50,6 +50,7 @@ var PageContainer = ({
|
|
|
50
50
|
extraContent,
|
|
51
51
|
tabList,
|
|
52
52
|
tabBarExtraContent,
|
|
53
|
+
footerToolBarProps,
|
|
53
54
|
locale,
|
|
54
55
|
...restProps
|
|
55
56
|
}) => {
|
|
@@ -63,7 +64,7 @@ var PageContainer = ({
|
|
|
63
64
|
`${rootPrefixCls}-page-header-heading-reload`,
|
|
64
65
|
reloadProps.className
|
|
65
66
|
);
|
|
66
|
-
const newSubTitle = subTitle && /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 12 }, reload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
|
|
67
|
+
const newSubTitle = (reload || subTitle) && /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 12 }, reload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
|
|
67
68
|
const newHeader = header && {
|
|
68
69
|
...header,
|
|
69
70
|
subTitle: newSubTitle,
|
|
@@ -72,7 +73,7 @@ var PageContainer = ({
|
|
|
72
73
|
...breadcrumb
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
|
-
const noHasHeader = ["title", "subTitle", "extra", "tags", "
|
|
76
|
+
const noHasHeader = ["title", "subTitle", "extra", "tags", "avatar", "backIcon", "breadcrumb"].every(
|
|
76
77
|
(item) => !(newHeader == null ? void 0 : newHeader[item])
|
|
77
78
|
) && !content && !extraContent && !tabList && !tabBarExtraContent;
|
|
78
79
|
const pageContainerCls = (0, import_classnames.default)(
|
|
@@ -92,6 +93,11 @@ var PageContainer = ({
|
|
|
92
93
|
extraContent,
|
|
93
94
|
tabList,
|
|
94
95
|
tabBarExtraContent,
|
|
96
|
+
footerToolBarProps: {
|
|
97
|
+
...footerToolBarProps,
|
|
98
|
+
// render footer as same level with PageContainer instead of under body
|
|
99
|
+
portalDom: false
|
|
100
|
+
},
|
|
95
101
|
...restProps
|
|
96
102
|
}
|
|
97
103
|
)
|
|
@@ -49,7 +49,8 @@ var genPageContainerStyle = (token) => {
|
|
|
49
49
|
},
|
|
50
50
|
[`${antCls}-page-header`]: {
|
|
51
51
|
[`${antCls}-page-header-breadcrumb`]: {
|
|
52
|
-
|
|
52
|
+
// overwritten pro-components style
|
|
53
|
+
paddingBlockStart: 0
|
|
53
54
|
},
|
|
54
55
|
[`${antCls}-page-header-heading-title`]: {
|
|
55
56
|
fontSize: fontSizeHeading3
|
|
@@ -80,8 +81,10 @@ var genPageContainerStyle = (token) => {
|
|
|
80
81
|
},
|
|
81
82
|
// 减小内容区左右两侧间距
|
|
82
83
|
[`${componentCls}-warp-page-header`]: {
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
paddingInlineStart: paddingLG,
|
|
85
|
+
paddingInlineEnd: paddingLG,
|
|
86
|
+
paddingBlockStart: padding,
|
|
87
|
+
paddingBlockEnd: padding
|
|
85
88
|
},
|
|
86
89
|
[`${componentCls}-children-container`]: {
|
|
87
90
|
paddingInline: paddingLG,
|
|
@@ -2,7 +2,7 @@ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
|
|
|
2
2
|
import type { RangeValue } from './Ranger';
|
|
3
3
|
import type { RangeOption } from './typing';
|
|
4
4
|
export type QuickType = 'select' | 'dropdown';
|
|
5
|
-
interface
|
|
5
|
+
interface QuickPickerProps extends LocaleWrapperProps {
|
|
6
6
|
selects: RangeOption[];
|
|
7
7
|
type?: QuickType;
|
|
8
8
|
onChange: (range: RangeValue) => void;
|
|
@@ -13,5 +13,5 @@ interface IProps extends LocaleWrapperProps {
|
|
|
13
13
|
isMoment?: boolean;
|
|
14
14
|
size?: 'small' | 'large' | 'middle';
|
|
15
15
|
}
|
|
16
|
-
declare const _default: (props:
|
|
16
|
+
declare const _default: (props: QuickPickerProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
17
17
|
export default _default;
|
package/lib/Ranger/index.d.ts
CHANGED
package/lib/Ranger/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -35,6 +36,8 @@ module.exports = __toCommonJS(Ranger_exports);
|
|
|
35
36
|
var import_constant = require("./constant");
|
|
36
37
|
var import_QuickPicker = __toESM(require("./QuickPicker"));
|
|
37
38
|
var import_Ranger = __toESM(require("./Ranger"));
|
|
39
|
+
__reExport(Ranger_exports, require("./QuickPicker"), module.exports);
|
|
40
|
+
__reExport(Ranger_exports, require("./Ranger"), module.exports);
|
|
38
41
|
var Ranger = import_Ranger.default;
|
|
39
42
|
Ranger.NEAR_1_MINUTES = import_constant.NEAR_1_MINUTES;
|
|
40
43
|
Ranger.NEAR_5_MINUTES = import_constant.NEAR_5_MINUTES;
|
|
@@ -62,3 +65,8 @@ Ranger.LAST_YEAR = import_constant.LAST_YEAR;
|
|
|
62
65
|
Ranger.NEXT_YEAR = import_constant.NEXT_YEAR;
|
|
63
66
|
Ranger.QuickPicker = import_QuickPicker.default;
|
|
64
67
|
var Ranger_default = Ranger;
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
...require("./QuickPicker"),
|
|
71
|
+
...require("./Ranger")
|
|
72
|
+
});
|
|
@@ -17,7 +17,7 @@ export interface TreeSearchRef {
|
|
|
17
17
|
checkAll: () => void;
|
|
18
18
|
invertSelect: () => void;
|
|
19
19
|
}
|
|
20
|
-
interface
|
|
20
|
+
interface TreeSearchProps {
|
|
21
21
|
treeData: Node[];
|
|
22
22
|
titleRender?: (nodeData: DataNode) => React.ReactNode;
|
|
23
23
|
checkable?: boolean;
|
|
@@ -34,5 +34,5 @@ interface IProps {
|
|
|
34
34
|
loadData?: (data: unknown) => Promise<void>;
|
|
35
35
|
searchStyle?: {};
|
|
36
36
|
}
|
|
37
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
37
|
+
declare const _default: React.ForwardRefExoticComponent<TreeSearchProps & React.RefAttributes<TreeSearchRef>>;
|
|
38
38
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ant-design/cssinjs": "^1.17.2",
|
|
38
38
|
"@ant-design/pro-components": "^2.6.30",
|
|
39
39
|
"@ant-design/pro-layout": "^7.17.8",
|
|
40
|
-
"@oceanbase/design": "^0.2.
|
|
40
|
+
"@oceanbase/design": "^0.2.23",
|
|
41
41
|
"@oceanbase/icons": "^0.2.8",
|
|
42
42
|
"@oceanbase/util": "^0.2.10",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react": ">=16.9.0",
|
|
67
67
|
"react-dom": ">=16.9.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "1138341df7a35d3d4939ccea79225ddf220de2cc"
|
|
70
70
|
}
|