@oceanbase/ui 0.4.11 → 0.4.12
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 +6 -7
- package/es/Action/Item.d.ts +3 -2
- package/es/BasicLayout/Header.d.ts +2 -0
- package/es/BasicLayout/Header.js +7 -2
- package/es/BasicLayout/locale/en-US.d.ts +1 -0
- package/es/BasicLayout/locale/en-US.js +1 -0
- package/es/BasicLayout/locale/zh-CN.d.ts +1 -0
- package/es/BasicLayout/locale/zh-CN.js +1 -0
- package/es/BasicLayout/locale/zh-TW.d.ts +1 -0
- package/es/BasicLayout/locale/zh-TW.js +1 -0
- package/es/ContentWithIcon/index.js +1 -1
- package/es/DateRanger/PickerPanel.d.ts +1 -1
- package/es/DateRanger/PickerPanel.js +88 -140
- package/es/Dialog/Anchor.d.ts +1 -1
- package/es/Dialog/EventProxy.d.ts +1 -1
- package/es/Highlight/DiffView/DiffCells.d.ts +1 -1
- package/es/Highlight/HighlightCell.d.ts +1 -1
- package/es/Highlight/JsonView.d.ts +1 -1
- package/es/IconFont/index.d.ts +1 -1
- package/es/NavMenu/index.d.ts +1 -1
- package/es/PageContainer/ItemRender.d.ts +1 -1
- package/es/ProCard/index.js +5 -4
- package/es/ProCard/style/index.js +6 -3
- package/es/ProTable/index.d.ts +9 -4
- package/es/ProTable/index.js +9 -4
- package/es/Ranger/QuickPicker.d.ts +1 -1
- package/es/SideTip/Dragger.d.ts +1 -1
- package/es/SideTip/IconLoading.d.ts +1 -1
- package/lib/Action/Group.js +15 -15
- package/lib/Action/Item.d.ts +3 -2
- package/lib/BasicLayout/Header.d.ts +2 -0
- package/lib/BasicLayout/Header.js +4 -0
- package/lib/BasicLayout/locale/en-US.d.ts +1 -0
- package/lib/BasicLayout/locale/en-US.js +1 -0
- package/lib/BasicLayout/locale/zh-CN.d.ts +1 -0
- package/lib/BasicLayout/locale/zh-CN.js +1 -0
- package/lib/BasicLayout/locale/zh-TW.d.ts +1 -0
- package/lib/BasicLayout/locale/zh-TW.js +1 -0
- package/lib/ContentWithIcon/index.js +1 -1
- package/lib/DateRanger/PickerPanel.d.ts +1 -1
- package/lib/DateRanger/PickerPanel.js +57 -122
- package/lib/Dialog/Anchor.d.ts +1 -1
- package/lib/Dialog/EventProxy.d.ts +1 -1
- package/lib/Highlight/DiffView/DiffCells.d.ts +1 -1
- package/lib/Highlight/HighlightCell.d.ts +1 -1
- package/lib/Highlight/JsonView.d.ts +1 -1
- package/lib/IconFont/index.d.ts +1 -1
- package/lib/NavMenu/index.d.ts +1 -1
- package/lib/PageContainer/ItemRender.d.ts +1 -1
- package/lib/ProCard/index.js +3 -3
- package/lib/ProCard/style/index.js +13 -4
- package/lib/ProTable/index.d.ts +9 -4
- package/lib/ProTable/index.js +8 -4
- package/lib/Ranger/QuickPicker.d.ts +1 -1
- package/lib/SideTip/Dragger.d.ts +1 -1
- package/lib/SideTip/IconLoading.d.ts +1 -1
- package/package.json +9 -9
package/es/ProTable/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ProTableProps } from '@ant-design/pro-components';
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProTableProps as AntProTableProps } from '@ant-design/pro-components';
|
|
3
|
+
export interface ProTableProps<T, U, ValueType> extends AntProTableProps<T, U, ValueType> {
|
|
4
|
+
innerBordered?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function ProTable<T, U, ValueType>({ form, headerTitle, options, optionsRender, toolbar, toolBarRender, size, bordered, innerBordered, expandable, rowSelection, pagination: customPagination, footer, locale, cardProps: outerCardProps, prefixCls: customizePrefixCls, tableClassName, className, ...restProps }: ProTableProps<T, U, ValueType>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
declare namespace ProTable {
|
|
8
|
+
var Summary;
|
|
9
|
+
}
|
|
5
10
|
export default ProTable;
|
package/es/ProTable/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
var _excluded = ["form", "headerTitle", "options", "optionsRender", "toolbar", "toolBarRender", "size", "expandable", "rowSelection", "pagination", "footer", "locale", "cardProps", "prefixCls", "tableClassName", "className"],
|
|
2
|
+
var _excluded = ["form", "headerTitle", "options", "optionsRender", "toolbar", "toolBarRender", "size", "bordered", "innerBordered", "expandable", "rowSelection", "pagination", "footer", "locale", "cardProps", "prefixCls", "tableClassName", "className"],
|
|
3
3
|
_excluded2 = ["emptyText"];
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -16,7 +16,9 @@ import { isEmpty } from 'lodash';
|
|
|
16
16
|
import useLightFilterStyle from "../LightFilter/style";
|
|
17
17
|
import useStyle from "./style";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
|
|
19
|
+
// type CompoundedComponent = React.FC<ProTableProps<T, U, ValueType>> & typeof AntProTable;
|
|
20
|
+
|
|
21
|
+
function ProTable(_ref) {
|
|
20
22
|
var form = _ref.form,
|
|
21
23
|
headerTitle = _ref.headerTitle,
|
|
22
24
|
options = _ref.options,
|
|
@@ -24,6 +26,8 @@ var ProTable = function ProTable(_ref) {
|
|
|
24
26
|
toolbar = _ref.toolbar,
|
|
25
27
|
toolBarRender = _ref.toolBarRender,
|
|
26
28
|
size = _ref.size,
|
|
29
|
+
bordered = _ref.bordered,
|
|
30
|
+
innerBordered = _ref.innerBordered,
|
|
27
31
|
expandable = _ref.expandable,
|
|
28
32
|
rowSelection = _ref.rowSelection,
|
|
29
33
|
customPagination = _ref.pagination,
|
|
@@ -42,7 +46,7 @@ var ProTable = function ProTable(_ref) {
|
|
|
42
46
|
var _Table$useStyle = Table.useStyle(tablePrefixCls),
|
|
43
47
|
tableWrapSSR = _Table$useStyle.wrapSSR;
|
|
44
48
|
var pagination = Table.useDefaultPagination(customPagination);
|
|
45
|
-
var tableCls = classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(tablePrefixCls, "-expandable"), !isEmpty(expandable)), "".concat(tablePrefixCls, "-selectable"), !!rowSelection), "".concat(tablePrefixCls, "-has-footer"), !!footer), tableClassName);
|
|
49
|
+
var tableCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(tablePrefixCls, "-expandable"), !isEmpty(expandable)), "".concat(tablePrefixCls, "-selectable"), !!rowSelection), "".concat(tablePrefixCls, "-has-footer"), !!footer), "".concat(tablePrefixCls, "-inner-bordered"), innerBordered), tableClassName);
|
|
46
50
|
|
|
47
51
|
// customize LightFilter style
|
|
48
52
|
var lightFilterPrefixCls = getPrefixCls('pro-form-light-filter', customizePrefixCls);
|
|
@@ -65,6 +69,7 @@ var ProTable = function ProTable(_ref) {
|
|
|
65
69
|
, _objectSpread({
|
|
66
70
|
defaultSize: "large",
|
|
67
71
|
size: size,
|
|
72
|
+
bordered: bordered || innerBordered,
|
|
68
73
|
form: _objectSpread({
|
|
69
74
|
// query form should remove required mark
|
|
70
75
|
requiredMark: false
|
|
@@ -93,6 +98,6 @@ var ProTable = function ProTable(_ref) {
|
|
|
93
98
|
tableClassName: tableCls,
|
|
94
99
|
className: proTableCls
|
|
95
100
|
}, restProps)))));
|
|
96
|
-
}
|
|
101
|
+
}
|
|
97
102
|
ProTable.Summary = AntProTable.Summary;
|
|
98
103
|
export default ProTable;
|
|
@@ -13,5 +13,5 @@ export interface QuickPickerProps extends LocaleWrapperProps {
|
|
|
13
13
|
isMoment?: boolean;
|
|
14
14
|
size?: 'small' | 'large' | 'middle';
|
|
15
15
|
}
|
|
16
|
-
declare const _default: (props: QuickPickerProps) => import("@emotion/react/
|
|
16
|
+
declare const _default: (props: QuickPickerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
17
|
export default _default;
|
package/es/SideTip/Dragger.d.ts
CHANGED
|
@@ -41,6 +41,6 @@ declare class Draggable extends React.Component<DraggableProps, DraggableState>
|
|
|
41
41
|
handleMouseDown: (e: any) => void;
|
|
42
42
|
handleMouseMove: (e: any) => void;
|
|
43
43
|
handleMouseUp: (e: any) => void;
|
|
44
|
-
render(): import("@emotion/react/
|
|
44
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
45
|
}
|
|
46
46
|
export default Draggable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const iconLoading: (props: any) => import("@emotion/react/
|
|
1
|
+
declare const iconLoading: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default iconLoading;
|
package/lib/Action/Group.js
CHANGED
|
@@ -128,22 +128,22 @@ var Group_default = ({
|
|
|
128
128
|
else if (shouldDisabled)
|
|
129
129
|
disabled = shouldDisabled(action.key);
|
|
130
130
|
const actionDisabled = action.props.loading || ((0, import_lodash.isBoolean)(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key));
|
|
131
|
-
return (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
...(0, import_lodash.omit)(action.props, "disabled"),
|
|
142
|
-
disabled: actionDisabled
|
|
131
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
132
|
+
import_design.Menu.Item,
|
|
133
|
+
{
|
|
134
|
+
key: actionKey ?? index.toString(),
|
|
135
|
+
onClick: ({ domEvent }) => {
|
|
136
|
+
var _a, _b;
|
|
137
|
+
(_b = (_a = action.props).onClick) == null ? void 0 : _b.call(
|
|
138
|
+
_a,
|
|
139
|
+
domEvent
|
|
140
|
+
);
|
|
143
141
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
...(0, import_lodash.omit)(action.props, ["disabled"]),
|
|
143
|
+
disabled: actionDisabled
|
|
144
|
+
},
|
|
145
|
+
/* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: action.props.tooltip }, action.props.loading && /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null), " ", action.props.children || action)
|
|
146
|
+
), action.props.divider && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Divider, null));
|
|
147
147
|
}))
|
|
148
148
|
},
|
|
149
149
|
moreDom
|
package/lib/Action/Item.d.ts
CHANGED
|
@@ -10,13 +10,14 @@ export interface BaseProps extends ButtonProps {
|
|
|
10
10
|
enableLoading?: boolean;
|
|
11
11
|
tooltip?: string;
|
|
12
12
|
loading?: boolean;
|
|
13
|
+
divider?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare class ActionButton extends React.PureComponent<BaseProps> {
|
|
15
16
|
static __DISPLAY_NAME: string;
|
|
16
17
|
state: {
|
|
17
18
|
loading: boolean;
|
|
18
19
|
};
|
|
19
|
-
render(): import("@emotion/react/
|
|
20
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
21
|
}
|
|
21
22
|
export declare class ActionLink extends React.PureComponent<BaseProps> {
|
|
22
23
|
static __DISPLAY_NAME: string;
|
|
@@ -24,5 +25,5 @@ export declare class ActionLink extends React.PureComponent<BaseProps> {
|
|
|
24
25
|
loading: boolean;
|
|
25
26
|
disabled: boolean;
|
|
26
27
|
};
|
|
27
|
-
render(): import("@emotion/react/
|
|
28
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
28
29
|
}
|
|
@@ -5,6 +5,7 @@ export type OverlayFunc = () => React.ReactElement;
|
|
|
5
5
|
export interface HeaderLocale {
|
|
6
6
|
help: string;
|
|
7
7
|
welcome: string;
|
|
8
|
+
versionNotice?: string;
|
|
8
9
|
viewDocs: string;
|
|
9
10
|
downloadDocs?: string;
|
|
10
11
|
about: string;
|
|
@@ -27,6 +28,7 @@ export interface HeaderProps extends LocaleWrapperProps {
|
|
|
27
28
|
extra?: React.ReactNode;
|
|
28
29
|
pathname?: string;
|
|
29
30
|
welcomePath?: string;
|
|
31
|
+
versionNoticePath?: string;
|
|
30
32
|
docsPath?: string;
|
|
31
33
|
pdfPath?: string;
|
|
32
34
|
iconUrl?: string;
|
|
@@ -53,6 +53,7 @@ var Header = ({
|
|
|
53
53
|
extra,
|
|
54
54
|
pathname,
|
|
55
55
|
welcomePath,
|
|
56
|
+
versionNoticePath,
|
|
56
57
|
docsPath,
|
|
57
58
|
pdfPath,
|
|
58
59
|
iconUrl,
|
|
@@ -82,6 +83,8 @@ var Header = ({
|
|
|
82
83
|
var _a;
|
|
83
84
|
if (key === "welcome") {
|
|
84
85
|
navigate == null ? void 0 : navigate(welcomePath);
|
|
86
|
+
} else if (key === "versionNotice") {
|
|
87
|
+
(0, import_util.directTo)(versionNoticePath);
|
|
85
88
|
} else if (key === "viewDocs") {
|
|
86
89
|
(0, import_util.directTo)(docsPath);
|
|
87
90
|
} else if (key === "downloadDocs") {
|
|
@@ -96,6 +99,7 @@ var Header = ({
|
|
|
96
99
|
}
|
|
97
100
|
},
|
|
98
101
|
welcomePath && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: "welcome" }, locale.welcome),
|
|
102
|
+
versionNoticePath && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: "versionNotice" }, locale.versionNotice),
|
|
99
103
|
docsPath && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: "viewDocs" }, locale.viewDocs),
|
|
100
104
|
pdfPath && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: "downloadDocs" }, locale.downloadDocs),
|
|
101
105
|
/* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: "about" }, `${locale.about}${appData.shortName ? ` ${appData.shortName}` : ""}`)
|
|
@@ -34,7 +34,7 @@ __export(ContentWithIcon_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(ContentWithIcon_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
-
var import_icons = require("@
|
|
37
|
+
var import_icons = require("@oceanbase/icons");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
39
|
var import_util = require("../_util");
|
|
40
40
|
var import_index = require("./index.less");
|
|
@@ -19,5 +19,5 @@ export interface PickerPanelProps {
|
|
|
19
19
|
disabledDate: any;
|
|
20
20
|
locale: any;
|
|
21
21
|
}
|
|
22
|
-
declare const InternalPickerPanel: (props: PickerPanelProps) => import("@emotion/react/
|
|
22
|
+
declare const InternalPickerPanel: (props: PickerPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
23
|
export default InternalPickerPanel;
|
|
@@ -46,6 +46,19 @@ var import_dayjs2 = __toESM(require("dayjs"));
|
|
|
46
46
|
var import_util = require("../_util");
|
|
47
47
|
var import_constant = require("./constant");
|
|
48
48
|
var ALL_ERROR_TYPE_LIST = ["endDate", "startDate", "endTime", "startTime"];
|
|
49
|
+
var CLICK_STATE = {
|
|
50
|
+
START: "START",
|
|
51
|
+
END: "END"
|
|
52
|
+
};
|
|
53
|
+
var useClickFSA = () => {
|
|
54
|
+
const [state, setState] = (0, import_react.useState)(CLICK_STATE.END);
|
|
55
|
+
const next = () => {
|
|
56
|
+
setState((ps) => {
|
|
57
|
+
return ps === CLICK_STATE.START ? CLICK_STATE.END : CLICK_STATE.START;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
return [state, next];
|
|
61
|
+
};
|
|
49
62
|
var prefix = (0, import_util.getPrefix)("ranger-picker-panel");
|
|
50
63
|
var prefixCls = "ant-picker";
|
|
51
64
|
var TIME_FORMAT = "HH:mm:ss";
|
|
@@ -63,6 +76,7 @@ var InternalPickerPanel = (props) => {
|
|
|
63
76
|
} = props;
|
|
64
77
|
const rootCls = (0, import_useCSSVarCls.default)(prefixCls);
|
|
65
78
|
const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls, rootCls);
|
|
79
|
+
const [clickFSA, clickFSANext] = useClickFSA();
|
|
66
80
|
const [defaultS, defaultE] = defaultValue;
|
|
67
81
|
const [calendarValue, setCalendarValue] = import_react.default.useState(defaultValue);
|
|
68
82
|
const [internalHoverValues, setInternalHoverValues] = import_react.default.useState(null);
|
|
@@ -88,7 +102,9 @@ var InternalPickerPanel = (props) => {
|
|
|
88
102
|
return clone;
|
|
89
103
|
}
|
|
90
104
|
const onPanelHover = (date) => {
|
|
91
|
-
setInternalHoverValues(
|
|
105
|
+
setInternalHoverValues(
|
|
106
|
+
date && clickFSA === CLICK_STATE.START ? fillCalendarValue(date, activeIndex) : null
|
|
107
|
+
);
|
|
92
108
|
};
|
|
93
109
|
const formatValues = [...calendarValue].sort((a, b) => {
|
|
94
110
|
return (a == null ? void 0 : a.valueOf()) - (b == null ? void 0 : b.valueOf());
|
|
@@ -99,8 +115,8 @@ var InternalPickerPanel = (props) => {
|
|
|
99
115
|
const [_sDate, _eDate] = formatValues;
|
|
100
116
|
const setFormatDateToForm = () => {
|
|
101
117
|
form.setFieldsValue({
|
|
102
|
-
startDate: _sDate,
|
|
103
|
-
endDate: _eDate
|
|
118
|
+
startDate: getDateInstance(_sDate),
|
|
119
|
+
endDate: getDateInstance(_eDate)
|
|
104
120
|
});
|
|
105
121
|
};
|
|
106
122
|
(0, import_react.useEffect)(() => {
|
|
@@ -115,88 +131,13 @@ var InternalPickerPanel = (props) => {
|
|
|
115
131
|
pre[errorKey] = "error";
|
|
116
132
|
return pre;
|
|
117
133
|
}, {});
|
|
118
|
-
const
|
|
119
|
-
const v = e.target.value;
|
|
134
|
+
const formatDate = (v) => {
|
|
120
135
|
const date = getDateInstance(v, DATE_FORMAT, true);
|
|
121
136
|
return date.isValid() ? date.format(DATE_FORMAT) : null;
|
|
122
137
|
};
|
|
123
|
-
const
|
|
138
|
+
const validateInputDate = (e) => {
|
|
124
139
|
const v = e.target.value;
|
|
125
|
-
|
|
126
|
-
if (!(h && m && s))
|
|
127
|
-
return null;
|
|
128
|
-
if (!(h.length === 2 && m.length === 2 && s.length === 2))
|
|
129
|
-
return null;
|
|
130
|
-
const date = getDateInstance(v, TIME_FORMAT, true);
|
|
131
|
-
return date.isValid() ? date.format(TIME_FORMAT) : null;
|
|
132
|
-
};
|
|
133
|
-
const selectDateInputRange = (inputDomRef) => {
|
|
134
|
-
if (!inputDomRef)
|
|
135
|
-
return;
|
|
136
|
-
if (inputDomRef.selectionStart >= 0 && inputDomRef.selectionStart <= 4) {
|
|
137
|
-
inputDomRef.setSelectionRange(0, 4);
|
|
138
|
-
}
|
|
139
|
-
if (inputDomRef.selectionStart > 4 && inputDomRef.selectionStart <= 7) {
|
|
140
|
-
inputDomRef.setSelectionRange(5, 7);
|
|
141
|
-
}
|
|
142
|
-
if (inputDomRef.selectionStart > 7 && inputDomRef.selectionStart <= 10) {
|
|
143
|
-
inputDomRef.setSelectionRange(8, 10);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
const selectTimeInputRange = (inputDomRef) => {
|
|
147
|
-
if (!inputDomRef)
|
|
148
|
-
return;
|
|
149
|
-
if (inputDomRef.selectionStart >= 0 && inputDomRef.selectionStart <= 2) {
|
|
150
|
-
inputDomRef.setSelectionRange(0, 2);
|
|
151
|
-
}
|
|
152
|
-
if (inputDomRef.selectionStart > 2 && inputDomRef.selectionStart <= 5) {
|
|
153
|
-
inputDomRef.setSelectionRange(3, 5);
|
|
154
|
-
}
|
|
155
|
-
if (inputDomRef.selectionStart > 5 && inputDomRef.selectionStart <= 8) {
|
|
156
|
-
inputDomRef.setSelectionRange(6, 8);
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
const handleDateInputKeyDown = (inputDomRef, e) => {
|
|
160
|
-
if (!inputDomRef)
|
|
161
|
-
return;
|
|
162
|
-
if (e.key === "Enter") {
|
|
163
|
-
inputDomRef.blur();
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
if (e.key === "ArrowLeft") {
|
|
167
|
-
const curIndex = inputDomRef.selectionStart;
|
|
168
|
-
inputDomRef.setSelectionRange(curIndex - 1, curIndex - 1);
|
|
169
|
-
}
|
|
170
|
-
if (e.key === "ArrowRight") {
|
|
171
|
-
const curIndex = inputDomRef.selectionEnd;
|
|
172
|
-
inputDomRef.setSelectionRange(curIndex + 1, curIndex + 1);
|
|
173
|
-
}
|
|
174
|
-
requestIdleCallback(() => {
|
|
175
|
-
if (validateInputDate(e)) {
|
|
176
|
-
selectDateInputRange(inputDomRef);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
};
|
|
180
|
-
const handleTimeInputKeyDown = (inputDomRef, e) => {
|
|
181
|
-
if (!inputDomRef)
|
|
182
|
-
return;
|
|
183
|
-
if (e.key === "Enter") {
|
|
184
|
-
inputDomRef.blur();
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
if (e.key === "ArrowLeft") {
|
|
188
|
-
const curIndex = inputDomRef.selectionStart;
|
|
189
|
-
inputDomRef.setSelectionRange(curIndex - 1, curIndex - 1);
|
|
190
|
-
}
|
|
191
|
-
if (e.key === "ArrowRight") {
|
|
192
|
-
const curIndex = inputDomRef.selectionEnd;
|
|
193
|
-
inputDomRef.setSelectionRange(curIndex + 1, curIndex + 1);
|
|
194
|
-
}
|
|
195
|
-
requestIdleCallback(() => {
|
|
196
|
-
if (validateInputTime(e)) {
|
|
197
|
-
selectTimeInputRange(inputDomRef);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
140
|
+
return formatDate(v);
|
|
200
141
|
};
|
|
201
142
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(prefix) }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { direction: "vertical", size: 12, style: { margin: "12px 0" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
202
143
|
import_design.Form,
|
|
@@ -217,25 +158,26 @@ var InternalPickerPanel = (props) => {
|
|
|
217
158
|
rules: [{ required: true }]
|
|
218
159
|
},
|
|
219
160
|
/* @__PURE__ */ import_react.default.createElement(
|
|
220
|
-
import_design.
|
|
161
|
+
import_design.DatePicker,
|
|
221
162
|
{
|
|
222
|
-
|
|
163
|
+
format: {
|
|
164
|
+
format: "YYYY-MM-DD",
|
|
165
|
+
type: "mask"
|
|
166
|
+
},
|
|
167
|
+
style: { width: 128 },
|
|
168
|
+
open: false,
|
|
169
|
+
suffixIcon: null,
|
|
170
|
+
allowClear: false,
|
|
223
171
|
onBlur: (e) => {
|
|
224
172
|
const v = validateInputDate(e);
|
|
225
173
|
if (v) {
|
|
226
|
-
form.setFieldValue("startDate", v);
|
|
174
|
+
form.setFieldValue("startDate", getDateInstance(v));
|
|
227
175
|
setCalendarValue(([, eDate]) => {
|
|
228
176
|
return [getDateInstance(v), eDate];
|
|
229
177
|
});
|
|
230
178
|
} else {
|
|
231
179
|
setFormatDateToForm();
|
|
232
180
|
}
|
|
233
|
-
},
|
|
234
|
-
onClick: () => {
|
|
235
|
-
selectDateInputRange(form.getFieldInstance("startDate").nativeElement);
|
|
236
|
-
},
|
|
237
|
-
onKeyDown: (e) => {
|
|
238
|
-
handleDateInputKeyDown(form.getFieldInstance("startDate").nativeElement, e);
|
|
239
181
|
}
|
|
240
182
|
}
|
|
241
183
|
)
|
|
@@ -257,16 +199,9 @@ var InternalPickerPanel = (props) => {
|
|
|
257
199
|
needConfirm: false,
|
|
258
200
|
getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
259
201
|
style: { width: "100%" },
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
);
|
|
264
|
-
},
|
|
265
|
-
onKeyDown: (e) => {
|
|
266
|
-
handleTimeInputKeyDown(
|
|
267
|
-
form.getFieldInstance("startTime").nativeElement.querySelector("input"),
|
|
268
|
-
e
|
|
269
|
-
);
|
|
202
|
+
format: {
|
|
203
|
+
format: "HH:mm:ss",
|
|
204
|
+
type: "mask"
|
|
270
205
|
}
|
|
271
206
|
}
|
|
272
207
|
)
|
|
@@ -281,24 +216,26 @@ var InternalPickerPanel = (props) => {
|
|
|
281
216
|
rules: [{ required: true }]
|
|
282
217
|
},
|
|
283
218
|
/* @__PURE__ */ import_react.default.createElement(
|
|
284
|
-
import_design.
|
|
219
|
+
import_design.DatePicker,
|
|
285
220
|
{
|
|
221
|
+
format: {
|
|
222
|
+
format: "YYYY-MM-DD",
|
|
223
|
+
type: "mask"
|
|
224
|
+
},
|
|
225
|
+
style: { width: 128 },
|
|
226
|
+
open: false,
|
|
227
|
+
suffixIcon: null,
|
|
228
|
+
allowClear: false,
|
|
286
229
|
onBlur: (e) => {
|
|
287
230
|
const v = validateInputDate(e);
|
|
288
231
|
if (v) {
|
|
289
|
-
form.setFieldValue("endDate", v);
|
|
232
|
+
form.setFieldValue("endDate", getDateInstance(v));
|
|
290
233
|
setCalendarValue(([sDate]) => {
|
|
291
234
|
return [sDate, getDateInstance(v)];
|
|
292
235
|
});
|
|
293
236
|
} else {
|
|
294
237
|
setFormatDateToForm();
|
|
295
238
|
}
|
|
296
|
-
},
|
|
297
|
-
onClick: () => {
|
|
298
|
-
selectDateInputRange(form.getFieldInstance("endDate").nativeElement);
|
|
299
|
-
},
|
|
300
|
-
onKeyDown: (e) => {
|
|
301
|
-
handleDateInputKeyDown(form.getFieldInstance("endDate").nativeElement, e);
|
|
302
239
|
}
|
|
303
240
|
}
|
|
304
241
|
)
|
|
@@ -320,16 +257,9 @@ var InternalPickerPanel = (props) => {
|
|
|
320
257
|
needConfirm: false,
|
|
321
258
|
getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
322
259
|
style: { width: "100%" },
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
);
|
|
327
|
-
},
|
|
328
|
-
onKeyDown: (e) => {
|
|
329
|
-
handleTimeInputKeyDown(
|
|
330
|
-
form.getFieldInstance("endTime").nativeElement.querySelector("input"),
|
|
331
|
-
e
|
|
332
|
-
);
|
|
260
|
+
format: {
|
|
261
|
+
format: "HH:mm:ss",
|
|
262
|
+
type: "mask"
|
|
333
263
|
}
|
|
334
264
|
}
|
|
335
265
|
)
|
|
@@ -355,7 +285,12 @@ var InternalPickerPanel = (props) => {
|
|
|
355
285
|
onPanelHover(res[0]);
|
|
356
286
|
},
|
|
357
287
|
onSelect: (...res) => {
|
|
358
|
-
|
|
288
|
+
clickFSANext();
|
|
289
|
+
if (clickFSA === CLICK_STATE.END) {
|
|
290
|
+
setCalendarValue([res[0], res[0]]);
|
|
291
|
+
} else {
|
|
292
|
+
setCalendarValue(fillCalendarValue(res[0], activeIndex));
|
|
293
|
+
}
|
|
359
294
|
setActiveIndex((index) => {
|
|
360
295
|
return index + 1 === 2 ? 0 : index + 1;
|
|
361
296
|
});
|
|
@@ -400,11 +335,11 @@ var InternalPickerPanel = (props) => {
|
|
|
400
335
|
onClick: () => {
|
|
401
336
|
form.validateFields().then((values) => {
|
|
402
337
|
const { startDate, startTime, endDate, endTime } = values;
|
|
403
|
-
const [sTime, eTime] = startDate
|
|
338
|
+
const [sTime, eTime] = startDate.isSame(endDate) ? [startTime, endTime].sort((a, b) => {
|
|
404
339
|
return (a == null ? void 0 : a.valueOf()) - (b == null ? void 0 : b.valueOf());
|
|
405
340
|
}) : [startTime, endTime];
|
|
406
|
-
const start = `${startDate} ${sTime.format(TIME_FORMAT)}`;
|
|
407
|
-
const end = `${endDate} ${eTime.format(TIME_FORMAT)}`;
|
|
341
|
+
const start = `${formatDate(startDate)} ${sTime.format(TIME_FORMAT)}`;
|
|
342
|
+
const end = `${formatDate(endDate)} ${eTime.format(TIME_FORMAT)}`;
|
|
408
343
|
let errorList = [];
|
|
409
344
|
let message = "";
|
|
410
345
|
rules == null ? void 0 : rules.some((item) => {
|
package/lib/Dialog/Anchor.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export declare class Anchor extends React.Component<IAnchorProps> {
|
|
|
15
15
|
onDragStart: (event: PointerEvent) => void;
|
|
16
16
|
onDragMove: (event: PointerEvent) => void;
|
|
17
17
|
onDragEnd: (event: PointerEvent) => void;
|
|
18
|
-
render(): import("@emotion/react/
|
|
18
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
19
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
export declare const EventProxy: (props: HTMLAttributes<HTMLDivElement>) => import("@emotion/react/
|
|
2
|
+
export declare const EventProxy: (props: HTMLAttributes<HTMLDivElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -14,4 +14,4 @@ export interface DiffCellsProps {
|
|
|
14
14
|
onMouseDown?: React.MouseEventHandler;
|
|
15
15
|
hashId?: string;
|
|
16
16
|
}
|
|
17
|
-
export default function DiffCells({ diffPrefixCls, data, emptyText, width, lock, rowOffset, onMouseDown, hashId, }: DiffCellsProps): import("@emotion/react/
|
|
17
|
+
export default function DiffCells({ diffPrefixCls, data, emptyText, width, lock, rowOffset, onMouseDown, hashId, }: DiffCellsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -15,4 +15,4 @@ export interface HighlightCellProps {
|
|
|
15
15
|
lineNumber?: boolean;
|
|
16
16
|
hashId?: string;
|
|
17
17
|
}
|
|
18
|
-
export default function HighlightCell({ prefixCls, theme, data, emptyText, width, lock, lineNumber, onMouseDown, hashId, }: HighlightCellProps): import("@emotion/react/
|
|
18
|
+
export default function HighlightCell({ prefixCls, theme, data, emptyText, width, lock, lineNumber, onMouseDown, hashId, }: HighlightCellProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,5 @@ import './index.less';
|
|
|
3
3
|
export interface JsonViewProps extends HighlightProps {
|
|
4
4
|
json: object;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: ({ json, theme, style, className, height, onCopyChange, copyable, }: JsonViewProps) => import("@emotion/react/
|
|
6
|
+
declare const _default: ({ json, theme, style, className, height, onCopyChange, copyable, }: JsonViewProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default _default;
|
package/lib/IconFont/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export interface IconFontProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated Please use `@oceanbase/icons` instead.
|
|
10
10
|
*/
|
|
11
|
-
declare const IconFont: (props: IconFontProps) => import("@emotion/react/
|
|
11
|
+
declare const IconFont: (props: IconFontProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default IconFont;
|
package/lib/NavMenu/index.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export interface NavMenuProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
17
|
}
|
|
18
|
-
declare const _default: (props: NavMenuProps) => import("@emotion/react/
|
|
18
|
+
declare const _default: (props: NavMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
19
|
export default _default;
|
package/lib/ProCard/index.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(ProCard_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_pro_components = require("@ant-design/pro-components");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
|
+
var import_util = require("@oceanbase/design/es/_util");
|
|
38
39
|
var import_classnames = __toESM(require("classnames"));
|
|
39
40
|
var import_style = __toESM(require("./style"));
|
|
40
41
|
var ProCard = ({
|
|
@@ -50,12 +51,11 @@ var ProCard = ({
|
|
|
50
51
|
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
51
52
|
const prefixCls = getPrefixCls("pro-card", customizePrefixCls);
|
|
52
53
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
53
|
-
const
|
|
54
|
-
const noBodyPadding = zeroPaddingList.includes(bodyStyle == null ? void 0 : bodyStyle.padding) || ghost;
|
|
54
|
+
const noBodyHorizontalPadding = (0, import_util.isHorizontalPaddingZero)(bodyStyle == null ? void 0 : bodyStyle.padding) || ghost;
|
|
55
55
|
const proCardCls = (0, import_classnames.default)(
|
|
56
56
|
{
|
|
57
57
|
[`${prefixCls}-has-title`]: !!title,
|
|
58
|
-
[`${prefixCls}-no-body-padding`]:
|
|
58
|
+
[`${prefixCls}-no-body-horizontal-padding`]: noBodyHorizontalPadding,
|
|
59
59
|
[`${prefixCls}-no-divider`]: !headerBordered,
|
|
60
60
|
[`${prefixCls}-contain-tabs`]: !!tabs
|
|
61
61
|
},
|