@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.
Files changed (58) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.js +6 -7
  3. package/es/Action/Item.d.ts +3 -2
  4. package/es/BasicLayout/Header.d.ts +2 -0
  5. package/es/BasicLayout/Header.js +7 -2
  6. package/es/BasicLayout/locale/en-US.d.ts +1 -0
  7. package/es/BasicLayout/locale/en-US.js +1 -0
  8. package/es/BasicLayout/locale/zh-CN.d.ts +1 -0
  9. package/es/BasicLayout/locale/zh-CN.js +1 -0
  10. package/es/BasicLayout/locale/zh-TW.d.ts +1 -0
  11. package/es/BasicLayout/locale/zh-TW.js +1 -0
  12. package/es/ContentWithIcon/index.js +1 -1
  13. package/es/DateRanger/PickerPanel.d.ts +1 -1
  14. package/es/DateRanger/PickerPanel.js +88 -140
  15. package/es/Dialog/Anchor.d.ts +1 -1
  16. package/es/Dialog/EventProxy.d.ts +1 -1
  17. package/es/Highlight/DiffView/DiffCells.d.ts +1 -1
  18. package/es/Highlight/HighlightCell.d.ts +1 -1
  19. package/es/Highlight/JsonView.d.ts +1 -1
  20. package/es/IconFont/index.d.ts +1 -1
  21. package/es/NavMenu/index.d.ts +1 -1
  22. package/es/PageContainer/ItemRender.d.ts +1 -1
  23. package/es/ProCard/index.js +5 -4
  24. package/es/ProCard/style/index.js +6 -3
  25. package/es/ProTable/index.d.ts +9 -4
  26. package/es/ProTable/index.js +9 -4
  27. package/es/Ranger/QuickPicker.d.ts +1 -1
  28. package/es/SideTip/Dragger.d.ts +1 -1
  29. package/es/SideTip/IconLoading.d.ts +1 -1
  30. package/lib/Action/Group.js +15 -15
  31. package/lib/Action/Item.d.ts +3 -2
  32. package/lib/BasicLayout/Header.d.ts +2 -0
  33. package/lib/BasicLayout/Header.js +4 -0
  34. package/lib/BasicLayout/locale/en-US.d.ts +1 -0
  35. package/lib/BasicLayout/locale/en-US.js +1 -0
  36. package/lib/BasicLayout/locale/zh-CN.d.ts +1 -0
  37. package/lib/BasicLayout/locale/zh-CN.js +1 -0
  38. package/lib/BasicLayout/locale/zh-TW.d.ts +1 -0
  39. package/lib/BasicLayout/locale/zh-TW.js +1 -0
  40. package/lib/ContentWithIcon/index.js +1 -1
  41. package/lib/DateRanger/PickerPanel.d.ts +1 -1
  42. package/lib/DateRanger/PickerPanel.js +57 -122
  43. package/lib/Dialog/Anchor.d.ts +1 -1
  44. package/lib/Dialog/EventProxy.d.ts +1 -1
  45. package/lib/Highlight/DiffView/DiffCells.d.ts +1 -1
  46. package/lib/Highlight/HighlightCell.d.ts +1 -1
  47. package/lib/Highlight/JsonView.d.ts +1 -1
  48. package/lib/IconFont/index.d.ts +1 -1
  49. package/lib/NavMenu/index.d.ts +1 -1
  50. package/lib/PageContainer/ItemRender.d.ts +1 -1
  51. package/lib/ProCard/index.js +3 -3
  52. package/lib/ProCard/style/index.js +13 -4
  53. package/lib/ProTable/index.d.ts +9 -4
  54. package/lib/ProTable/index.js +8 -4
  55. package/lib/Ranger/QuickPicker.d.ts +1 -1
  56. package/lib/SideTip/Dragger.d.ts +1 -1
  57. package/lib/SideTip/IconLoading.d.ts +1 -1
  58. package/package.json +9 -9
@@ -11,6 +11,7 @@ import { isBoolean, max, omit } from 'lodash';
11
11
  import useStyle from "./style";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
14
15
  var getOrder = function getOrder(_ref) {
15
16
  var type = _ref.type,
16
17
  fixed = _ref.fixed;
@@ -124,24 +125,22 @@ export default (function (_ref2) {
124
125
  if (isBoolean(action.props.disabled)) disabled = action.props.disabled;else if (shouldDisabled) disabled = shouldDisabled(action.key);
125
126
  // 当用户传入loading 或者 传入 disabled 的情况都要禁用按钮
126
127
  var actionDisabled = action.props.loading || (isBoolean(action.props.disabled) ? action.props.disabled : getDefaultDisabled(action.key));
127
- return (
128
- /*#__PURE__*/
129
- // @ts-ignore
130
- _jsx(Menu.Item, _objectSpread(_objectSpread({
128
+ return /*#__PURE__*/_jsxs(_Fragment, {
129
+ children: [/*#__PURE__*/_jsx(Menu.Item, _objectSpread(_objectSpread({
131
130
  // @ts-ignore
132
131
  onClick: function onClick(_ref4) {
133
132
  var _action$props$onClick, _action$props;
134
133
  var domEvent = _ref4.domEvent;
135
134
  (_action$props$onClick = (_action$props = action.props).onClick) === null || _action$props$onClick === void 0 || _action$props$onClick.call(_action$props, domEvent);
136
135
  }
137
- }, omit(action.props, 'disabled')), {}, {
136
+ }, omit(action.props, ['disabled'])), {}, {
138
137
  disabled: actionDisabled,
139
138
  children: /*#__PURE__*/_jsxs(Tooltip, {
140
139
  title: action.props.tooltip,
141
140
  children: [action.props.loading && /*#__PURE__*/_jsx(LoadingOutlined, {}), ' ', action.props.children || action]
142
141
  })
143
- }), (_ref3 = actionKey) !== null && _ref3 !== void 0 ? _ref3 : index.toString())
144
- );
142
+ }), (_ref3 = actionKey) !== null && _ref3 !== void 0 ? _ref3 : index.toString()), action.props.divider && /*#__PURE__*/_jsx(Menu.Divider, {})]
143
+ });
145
144
  })
146
145
  }),
147
146
  children: moreDom
@@ -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/types/jsx-namespace").EmotionJSX.Element;
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/types/jsx-namespace").EmotionJSX.Element;
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;
@@ -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 = ["prefixCls", "showLabel", "title", "extra", "pathname", "welcomePath", "docsPath", "pdfPath", "iconUrl", "logoUrl", "simpleLogoUrl", "username", "userMenu", "appData", "locale", "showHelp", "showLocale", "locales", "langs"];
2
+ var _excluded = ["prefixCls", "showLabel", "title", "extra", "pathname", "welcomePath", "versionNoticePath", "docsPath", "pdfPath", "iconUrl", "logoUrl", "simpleLogoUrl", "username", "userMenu", "appData", "locale", "showHelp", "showLocale", "locales", "langs"];
3
3
  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; }
4
4
  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; }
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; }
@@ -42,6 +42,7 @@ var Header = function Header(_ref) {
42
42
  extra = _ref.extra,
43
43
  pathname = _ref.pathname,
44
44
  welcomePath = _ref.welcomePath,
45
+ versionNoticePath = _ref.versionNoticePath,
45
46
  docsPath = _ref.docsPath,
46
47
  pdfPath = _ref.pdfPath,
47
48
  iconUrl = _ref.iconUrl,
@@ -81,6 +82,8 @@ var Header = function Header(_ref) {
81
82
  var key = _ref2.key;
82
83
  if (key === 'welcome') {
83
84
  navigate === null || navigate === void 0 || navigate(welcomePath);
85
+ } else if (key === 'versionNotice') {
86
+ directTo(versionNoticePath);
84
87
  } else if (key === 'viewDocs') {
85
88
  directTo(docsPath);
86
89
  } else if (key === 'downloadDocs') {
@@ -96,7 +99,9 @@ var Header = function Header(_ref) {
96
99
  },
97
100
  children: [welcomePath && /*#__PURE__*/_jsx(Menu.Item, {
98
101
  children: locale.welcome
99
- }, "welcome"), docsPath && /*#__PURE__*/_jsx(Menu.Item, {
102
+ }, "welcome"), versionNoticePath && /*#__PURE__*/_jsx(Menu.Item, {
103
+ children: locale.versionNotice
104
+ }, "versionNotice"), docsPath && /*#__PURE__*/_jsx(Menu.Item, {
100
105
  children: locale.viewDocs
101
106
  }, "viewDocs"), pdfPath && /*#__PURE__*/_jsx(Menu.Item, {
102
107
  children: locale.downloadDocs
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  help: string;
3
3
  welcome: string;
4
+ versionNotice: string;
4
5
  viewDocs: string;
5
6
  downloadDocs: string;
6
7
  about: string;
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  help: 'Help',
3
3
  welcome: 'Welcome page',
4
+ versionNotice: 'version notice',
4
5
  viewDocs: 'Check the user manual',
5
6
  downloadDocs: 'Download the user manual',
6
7
  about: 'About',
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  help: string;
3
3
  welcome: string;
4
+ versionNotice: string;
4
5
  viewDocs: string;
5
6
  downloadDocs: string;
6
7
  about: string;
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  help: '帮助',
3
3
  welcome: '欢迎页',
4
+ versionNotice: '版本公告',
4
5
  viewDocs: '查看用户手册',
5
6
  downloadDocs: '下载用户手册',
6
7
  about: '关于',
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  help: string;
3
3
  welcome: string;
4
+ versionNotice: string;
4
5
  viewDocs: string;
5
6
  downloadDocs: string;
6
7
  about: string;
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  help: '幫助',
3
3
  welcome: '歡迎頁',
4
+ versionNotice: '版本公告',
4
5
  viewDocs: '查看用戶手冊',
5
6
  downloadDocs: '下載用戶手冊',
6
7
  about: '關於',
@@ -9,7 +9,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
9
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
10
  import React, { isValidElement } from 'react';
11
11
  import { Tooltip, Space, Popover } from 'antd';
12
- import { ExclamationCircleFilled, InfoCircleFilled, InfoCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons';
12
+ import { ExclamationCircleFilled, InfoCircleFilled, InfoCircleOutlined, QuestionCircleOutlined } from '@oceanbase/icons';
13
13
  import classNames from 'classnames';
14
14
  import { getPrefix } from "../_util";
15
15
  import "./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/types/jsx-namespace").EmotionJSX.Element;
22
+ declare const InternalPickerPanel: (props: PickerPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
23
23
  export default InternalPickerPanel;
@@ -15,7 +15,7 @@ import useCSSVarCls from 'antd/es/config-provider/hooks/useCSSVarCls';
15
15
  import useStyle from 'antd/es/date-picker/style/index';
16
16
  import { PickerPanel } from 'rc-picker';
17
17
  import classNames from 'classnames';
18
- import { Alert, Button, Col, Divider, Form, Input, Row, Space, TimePicker } from '@oceanbase/design';
18
+ import { Alert, Button, Col, DatePicker, Divider, Form, Row, Space, TimePicker } from '@oceanbase/design';
19
19
  import { noop } from 'lodash';
20
20
  import moment from 'moment';
21
21
  import dayjs from 'dayjs';
@@ -24,6 +24,28 @@ import { DATE_TIME_MONTH_FORMAT, DATE_TIME_MONTH_FORMAT_CN } from "./constant";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
26
  var ALL_ERROR_TYPE_LIST = ['endDate', 'startDate', 'endTime', 'startTime'];
27
+ /**
28
+ * 点击交互/时间选择交互
29
+ * - 首次点击时,开始时间和结束时间都置为所点击的时间
30
+ * - 第二次点击时,根据点击的时间,判断是开始时间还是结束时间进行赋值
31
+ * - 新一轮交互开始...
32
+ */
33
+ var CLICK_STATE = {
34
+ START: 'START',
35
+ END: 'END'
36
+ };
37
+ var useClickFSA = function useClickFSA() {
38
+ var _useState = useState(CLICK_STATE.END),
39
+ _useState2 = _slicedToArray(_useState, 2),
40
+ state = _useState2[0],
41
+ setState = _useState2[1];
42
+ var next = function next() {
43
+ setState(function (ps) {
44
+ return ps === CLICK_STATE.START ? CLICK_STATE.END : CLICK_STATE.START;
45
+ });
46
+ };
47
+ return [state, next];
48
+ };
27
49
  var prefix = getPrefix('ranger-picker-panel');
28
50
  var prefixCls = 'ant-picker';
29
51
  var TIME_FORMAT = 'HH:mm:ss';
@@ -46,6 +68,10 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
46
68
  wrapCSSVar = _useStyle2[0],
47
69
  hashId = _useStyle2[1],
48
70
  cssVarCls = _useStyle2[2];
71
+ var _useClickFSA = useClickFSA(),
72
+ _useClickFSA2 = _slicedToArray(_useClickFSA, 2),
73
+ clickFSA = _useClickFSA2[0],
74
+ clickFSANext = _useClickFSA2[1];
49
75
  var _defaultValue = _slicedToArray(defaultValue, 2),
50
76
  defaultS = _defaultValue[0],
51
77
  defaultE = _defaultValue[1];
@@ -85,7 +111,7 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
85
111
  return clone;
86
112
  }
87
113
  var onPanelHover = function onPanelHover(date) {
88
- setInternalHoverValues(date ? fillCalendarValue(date, activeIndex) : null);
114
+ setInternalHoverValues(date && clickFSA === CLICK_STATE.START ? fillCalendarValue(date, activeIndex) : null);
89
115
  };
90
116
 
91
117
  // 对日期进行排序
@@ -102,8 +128,8 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
102
128
  _eDate = _formatValues[1];
103
129
  var setFormatDateToForm = function setFormatDateToForm() {
104
130
  form.setFieldsValue({
105
- startDate: _sDate,
106
- endDate: _eDate
131
+ startDate: getDateInstance(_sDate),
132
+ endDate: getDateInstance(_eDate)
107
133
  });
108
134
  };
109
135
  useEffect(function () {
@@ -112,111 +138,25 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
112
138
  var defaultTime = useMemo(function () {
113
139
  return getDateInstance();
114
140
  }, []);
115
- var _useState = useState(''),
116
- _useState2 = _slicedToArray(_useState, 2),
117
- errorMessage = _useState2[0],
118
- setErrorMessage = _useState2[1];
119
- var _useState3 = useState([]),
141
+ var _useState3 = useState(''),
120
142
  _useState4 = _slicedToArray(_useState3, 2),
121
- errorTypeList = _useState4[0],
122
- setErrorTypeList = _useState4[1];
143
+ errorMessage = _useState4[0],
144
+ setErrorMessage = _useState4[1];
145
+ var _useState5 = useState([]),
146
+ _useState6 = _slicedToArray(_useState5, 2),
147
+ errorTypeList = _useState6[0],
148
+ setErrorTypeList = _useState6[1];
123
149
  var errorTypeMap = errorTypeList.reduce(function (pre, errorKey) {
124
150
  pre[errorKey] = 'error';
125
151
  return pre;
126
152
  }, {});
127
- var validateInputDate = function validateInputDate(e) {
128
- var v = e.target.value;
153
+ var formatDate = function formatDate(v) {
129
154
  var date = getDateInstance(v, DATE_FORMAT, true);
130
155
  return date.isValid() ? date.format(DATE_FORMAT) : null;
131
156
  };
132
- var validateInputTime = function validateInputTime(e) {
133
- var _v$split;
157
+ var validateInputDate = function validateInputDate(e) {
134
158
  var v = e.target.value;
135
- var _ref = (_v$split = v === null || v === void 0 ? void 0 : v.split(':')) !== null && _v$split !== void 0 ? _v$split : [],
136
- _ref2 = _slicedToArray(_ref, 3),
137
- h = _ref2[0],
138
- m = _ref2[1],
139
- s = _ref2[2];
140
- if (!(h && m && s)) return null;
141
- if (!(h.length === 2 && m.length === 2 && s.length === 2)) return null;
142
- var date = getDateInstance(v, TIME_FORMAT, true);
143
- return date.isValid() ? date.format(TIME_FORMAT) : null;
144
- };
145
- var selectDateInputRange = function selectDateInputRange(inputDomRef) {
146
- if (!inputDomRef) return;
147
- // year
148
- if (inputDomRef.selectionStart >= 0 && inputDomRef.selectionStart <= 4) {
149
- inputDomRef.setSelectionRange(0, 4);
150
- }
151
- // month
152
- if (inputDomRef.selectionStart > 4 && inputDomRef.selectionStart <= 7) {
153
- inputDomRef.setSelectionRange(5, 7);
154
- }
155
- // day
156
- if (inputDomRef.selectionStart > 7 && inputDomRef.selectionStart <= 10) {
157
- inputDomRef.setSelectionRange(8, 10);
158
- }
159
- };
160
- var selectTimeInputRange = function selectTimeInputRange(inputDomRef) {
161
- if (!inputDomRef) return;
162
- // hour
163
- if (inputDomRef.selectionStart >= 0 && inputDomRef.selectionStart <= 2) {
164
- inputDomRef.setSelectionRange(0, 2);
165
- }
166
- // minute
167
- if (inputDomRef.selectionStart > 2 && inputDomRef.selectionStart <= 5) {
168
- inputDomRef.setSelectionRange(3, 5);
169
- }
170
- // second
171
- if (inputDomRef.selectionStart > 5 && inputDomRef.selectionStart <= 8) {
172
- inputDomRef.setSelectionRange(6, 8);
173
- }
174
- };
175
- var handleDateInputKeyDown = function handleDateInputKeyDown(inputDomRef, e) {
176
- if (!inputDomRef) return;
177
- if (e.key === 'Enter') {
178
- inputDomRef.blur();
179
- return;
180
- }
181
- if (e.key === 'ArrowLeft') {
182
- var curIndex = inputDomRef.selectionStart;
183
- inputDomRef.setSelectionRange(curIndex - 1, curIndex - 1);
184
- }
185
- if (e.key === 'ArrowRight') {
186
- var _curIndex = inputDomRef.selectionEnd;
187
- inputDomRef.setSelectionRange(_curIndex + 1, _curIndex + 1);
188
- }
189
- // NOTE: onKeyDown事件执行时,由于TimePicker需要执行受控逻辑,这会引起React rerender,
190
- // 导致onKeyDown事件中拿到的Event还未更新,将下述校验逻辑放入requestIdleCallback确保其跟在React fiber调用栈后执行,这可取到最新的Event对象。
191
- requestIdleCallback(function () {
192
- // 校验
193
- if (validateInputDate(e)) {
194
- selectDateInputRange(inputDomRef);
195
- }
196
- });
197
- };
198
- var handleTimeInputKeyDown = function handleTimeInputKeyDown(inputDomRef, e) {
199
- if (!inputDomRef) return;
200
- if (e.key === 'Enter') {
201
- inputDomRef.blur();
202
- return;
203
- }
204
- if (e.key === 'ArrowLeft') {
205
- var curIndex = inputDomRef.selectionStart;
206
- inputDomRef.setSelectionRange(curIndex - 1, curIndex - 1);
207
- }
208
- if (e.key === 'ArrowRight') {
209
- var _curIndex2 = inputDomRef.selectionEnd;
210
- inputDomRef.setSelectionRange(_curIndex2 + 1, _curIndex2 + 1);
211
- }
212
- // NOTE: onKeyDown事件执行时,由于TimePicker需要执行受控逻辑,这会引起React rerender,
213
- // 导致onKeyDown事件中拿到的Event还未更新,将下述校验逻辑放入requestIdleCallback确保其跟在React fiber调用栈后执行,这可取到最新的Event对象。
214
- requestIdleCallback(function () {
215
- // 校验
216
- if (validateInputTime(e)) {
217
- selectTimeInputRange(inputDomRef);
218
- }
219
- });
159
+ return formatDate(v);
220
160
  };
221
161
  return /*#__PURE__*/_jsxs("div", {
222
162
  className: classNames(prefix),
@@ -254,26 +194,29 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
254
194
  rules: [{
255
195
  required: true
256
196
  }],
257
- children: /*#__PURE__*/_jsx(Input, {
258
- size: "middle",
197
+ children: /*#__PURE__*/_jsx(DatePicker, {
198
+ format: {
199
+ format: 'YYYY-MM-DD',
200
+ type: 'mask'
201
+ },
202
+ style: {
203
+ width: 128
204
+ },
205
+ open: false,
206
+ suffixIcon: null,
207
+ allowClear: false,
259
208
  onBlur: function onBlur(e) {
260
209
  var v = validateInputDate(e);
261
210
  if (v) {
262
- form.setFieldValue('startDate', v);
263
- setCalendarValue(function (_ref3) {
264
- var _ref4 = _slicedToArray(_ref3, 2),
265
- eDate = _ref4[1];
211
+ form.setFieldValue('startDate', getDateInstance(v));
212
+ setCalendarValue(function (_ref) {
213
+ var _ref2 = _slicedToArray(_ref, 2),
214
+ eDate = _ref2[1];
266
215
  return [getDateInstance(v), eDate];
267
216
  });
268
217
  } else {
269
218
  setFormatDateToForm();
270
219
  }
271
- },
272
- onClick: function onClick() {
273
- selectDateInputRange(form.getFieldInstance('startDate').nativeElement);
274
- },
275
- onKeyDown: function onKeyDown(e) {
276
- handleDateInputKeyDown(form.getFieldInstance('startDate').nativeElement, e);
277
220
  }
278
221
  })
279
222
  })
@@ -303,11 +246,9 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
303
246
  style: {
304
247
  width: '100%'
305
248
  },
306
- onClick: function onClick() {
307
- selectTimeInputRange(form.getFieldInstance('startTime').nativeElement.querySelector('input'));
308
- },
309
- onKeyDown: function onKeyDown(e) {
310
- handleTimeInputKeyDown(form.getFieldInstance('startTime').nativeElement.querySelector('input'), e);
249
+ format: {
250
+ format: 'HH:mm:ss',
251
+ type: 'mask'
311
252
  }
312
253
  })
313
254
  })
@@ -329,25 +270,29 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
329
270
  rules: [{
330
271
  required: true
331
272
  }],
332
- children: /*#__PURE__*/_jsx(Input, {
273
+ children: /*#__PURE__*/_jsx(DatePicker, {
274
+ format: {
275
+ format: 'YYYY-MM-DD',
276
+ type: 'mask'
277
+ },
278
+ style: {
279
+ width: 128
280
+ },
281
+ open: false,
282
+ suffixIcon: null,
283
+ allowClear: false,
333
284
  onBlur: function onBlur(e) {
334
285
  var v = validateInputDate(e);
335
286
  if (v) {
336
- form.setFieldValue('endDate', v);
337
- setCalendarValue(function (_ref5) {
338
- var _ref6 = _slicedToArray(_ref5, 1),
339
- sDate = _ref6[0];
287
+ form.setFieldValue('endDate', getDateInstance(v));
288
+ setCalendarValue(function (_ref3) {
289
+ var _ref4 = _slicedToArray(_ref3, 1),
290
+ sDate = _ref4[0];
340
291
  return [sDate, getDateInstance(v)];
341
292
  });
342
293
  } else {
343
294
  setFormatDateToForm();
344
295
  }
345
- },
346
- onClick: function onClick() {
347
- selectDateInputRange(form.getFieldInstance('endDate').nativeElement);
348
- },
349
- onKeyDown: function onKeyDown(e) {
350
- handleDateInputKeyDown(form.getFieldInstance('endDate').nativeElement, e);
351
296
  }
352
297
  })
353
298
  })
@@ -377,11 +322,9 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
377
322
  style: {
378
323
  width: '100%'
379
324
  },
380
- onClick: function onClick() {
381
- selectTimeInputRange(form.getFieldInstance('endTime').nativeElement.querySelector('input'));
382
- },
383
- onKeyDown: function onKeyDown(e) {
384
- handleTimeInputKeyDown(form.getFieldInstance('endTime').nativeElement.querySelector('input'), e);
325
+ format: {
326
+ format: 'HH:mm:ss',
327
+ type: 'mask'
385
328
  }
386
329
  })
387
330
  })
@@ -407,7 +350,12 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
407
350
  onPanelHover(arguments.length <= 0 ? undefined : arguments[0]);
408
351
  },
409
352
  onSelect: function onSelect() {
410
- setCalendarValue(fillCalendarValue(arguments.length <= 0 ? undefined : arguments[0], activeIndex));
353
+ clickFSANext();
354
+ if (clickFSA === CLICK_STATE.END) {
355
+ setCalendarValue([arguments.length <= 0 ? undefined : arguments[0], arguments.length <= 0 ? undefined : arguments[0]]);
356
+ } else {
357
+ setCalendarValue(fillCalendarValue(arguments.length <= 0 ? undefined : arguments[0], activeIndex));
358
+ }
411
359
  setActiveIndex(function (index) {
412
360
  return index + 1 === 2 ? 0 : index + 1;
413
361
  });
@@ -463,14 +411,14 @@ var InternalPickerPanel = function InternalPickerPanel(props) {
463
411
  endDate = values.endDate,
464
412
  endTime = values.endTime;
465
413
  // 日期同一天时对时间进行排序,保证开始时间在结束时间之前
466
- var _ref7 = startDate === endDate ? [startTime, endTime].sort(function (a, b) {
414
+ var _ref5 = startDate.isSame(endDate) ? [startTime, endTime].sort(function (a, b) {
467
415
  return (a === null || a === void 0 ? void 0 : a.valueOf()) - (b === null || b === void 0 ? void 0 : b.valueOf());
468
416
  }) : [startTime, endTime],
469
- _ref8 = _slicedToArray(_ref7, 2),
470
- sTime = _ref8[0],
471
- eTime = _ref8[1];
472
- var start = "".concat(startDate, " ").concat(sTime.format(TIME_FORMAT));
473
- var end = "".concat(endDate, " ").concat(eTime.format(TIME_FORMAT));
417
+ _ref6 = _slicedToArray(_ref5, 2),
418
+ sTime = _ref6[0],
419
+ eTime = _ref6[1];
420
+ var start = "".concat(formatDate(startDate), " ").concat(sTime.format(TIME_FORMAT));
421
+ var end = "".concat(formatDate(endDate), " ").concat(eTime.format(TIME_FORMAT));
474
422
  var errorList = [];
475
423
  var message = '';
476
424
  rules === null || rules === void 0 || rules.some(function (item) {
@@ -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/types/jsx-namespace").EmotionJSX.Element;
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/types/jsx-namespace").EmotionJSX.Element;
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/types/jsx-namespace").EmotionJSX.Element;
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/types/jsx-namespace").EmotionJSX.Element;
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/types/jsx-namespace").EmotionJSX.Element;
6
+ declare const _default: ({ json, theme, style, className, height, onCopyChange, copyable, }: JsonViewProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  export default _default;
@@ -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/types/jsx-namespace").EmotionJSX.Element;
11
+ declare const IconFont: (props: IconFontProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
12
  export default IconFont;
@@ -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/types/jsx-namespace").EmotionJSX.Element;
18
+ declare const _default: (props: NavMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
19
19
  export default _default;
@@ -3,5 +3,5 @@ declare const _default: ({ route, params, routes, paths }: {
3
3
  params: any;
4
4
  routes: any;
5
5
  paths: any;
6
- }) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
6
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  export default _default;
@@ -10,6 +10,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
10
10
  import React, { useContext } from 'react';
11
11
  import { ProCard as AntProCard } from '@ant-design/pro-components';
12
12
  import { ConfigProvider } from '@oceanbase/design';
13
+ import { isHorizontalPaddingZero } from '@oceanbase/design/es/_util';
13
14
  import classNames from 'classnames';
14
15
  import useStyle from "./style";
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -28,10 +29,10 @@ var ProCard = function ProCard(_ref) {
28
29
  var prefixCls = getPrefixCls('pro-card', customizePrefixCls);
29
30
  var _useStyle = useStyle(prefixCls),
30
31
  wrapSSR = _useStyle.wrapSSR;
31
- var zeroPaddingList = [0, '0', '0px'];
32
- // ProCard body has no padding
33
- var noBodyPadding = zeroPaddingList.includes(bodyStyle === null || bodyStyle === void 0 ? void 0 : bodyStyle.padding) || ghost;
34
- var proCardCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-has-title"), !!title), "".concat(prefixCls, "-no-body-padding"), noBodyPadding), "".concat(prefixCls, "-no-divider"), !headerBordered), "".concat(prefixCls, "-contain-tabs"), !!tabs), className);
32
+
33
+ // ProCard body no horizontal padding
34
+ var noBodyHorizontalPadding = isHorizontalPaddingZero(bodyStyle === null || bodyStyle === void 0 ? void 0 : bodyStyle.padding) || ghost;
35
+ var proCardCls = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-has-title"), !!title), "".concat(prefixCls, "-no-body-horizontal-padding"), noBodyHorizontalPadding), "".concat(prefixCls, "-no-divider"), !headerBordered), "".concat(prefixCls, "-contain-tabs"), !!tabs), className);
35
36
  return wrapSSR( /*#__PURE__*/_jsx(AntProCard, _objectSpread({
36
37
  prefixCls: customizePrefixCls,
37
38
  ghost: ghost,
@@ -10,9 +10,10 @@ export var genProCardStyle = function genProCardStyle(token) {
10
10
  var componentCls = token.componentCls,
11
11
  antCls = token.antCls,
12
12
  prefixCls = token.prefixCls;
13
+ var tableComponentCls = "".concat(antCls, "-table");
13
14
  var tabsComponentCls = "".concat(antCls, "-tabs");
14
15
  var tabsPrefixCls = "".concat(prefixCls, "-tabs");
15
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "div".concat(componentCls), {
16
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "div".concat(componentCls), {
16
17
  borderRadius: token.borderRadiusLG
17
18
  }), "".concat(componentCls, ":not(").concat(componentCls, "-border):not(").concat(componentCls, "-ghost)"), {
18
19
  boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.03),0 1px 6px -1px rgba(0, 0, 0, 0.02),0 2px 4px 0 rgba(0, 0, 0, 0.02)'
@@ -25,9 +26,11 @@ export var genProCardStyle = function genProCardStyle(token) {
25
26
  }), "".concat(componentCls, "-body"), {
26
27
  paddingBlock: 0,
27
28
  paddingInline: 0
28
- })), "".concat(componentCls).concat(componentCls, "-no-body-padding:not(").concat(componentCls, "-contain-tabs)"), _objectSpread(_defineProperty({}, "".concat(componentCls, "-header"), {
29
+ })), "&".concat(componentCls, "-has-title").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), _defineProperty({}, "& > ".concat(tableComponentCls, "-wrapper ").concat(tableComponentCls, ":not(").concat(tableComponentCls, "-bordered):first-child"), {
30
+ marginTop: -token.marginSM
31
+ }))), "".concat(componentCls).concat(componentCls, "-no-body-horizontal-padding:not(").concat(componentCls, "-contain-tabs)"), _objectSpread(_defineProperty({}, "".concat(componentCls, "-header"), {
29
32
  paddingBlockEnd: token.padding
30
- }), Card.genTableStyle(token.paddingLG, token))), "".concat(componentCls).concat(componentCls, "-no-body-padding").concat(componentCls, "-size-small:not(").concat(componentCls, "-contain-tabs)"), _objectSpread(_defineProperty({}, "".concat(componentCls, "-header"), {
33
+ }), Card.genTableStyle(token.paddingLG, token))), "".concat(componentCls).concat(componentCls, "-no-body-horizontal-padding").concat(componentCls, "-size-small:not(").concat(componentCls, "-contain-tabs)"), _objectSpread(_defineProperty({}, "".concat(componentCls, "-header"), {
31
34
  paddingBlockEnd: token.paddingXS
32
35
  }), Card.genTableStyle(token.paddingSM, token))), "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tabs"), _objectSpread(_defineProperty({}, "".concat(tabsComponentCls, "-top, ").concat(tabsComponentCls, "-bottom"), _defineProperty({}, ">".concat(tabsComponentCls, "-nav ").concat(tabsComponentCls, "-nav-list"), {
33
36
  marginBlockStart: 0,