doui-react 2.0.2 → 2.0.7

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 (43) hide show
  1. package/es/api/component/global-style.js +1 -1
  2. package/es/api/component/sort.d.ts +1 -1
  3. package/es/api/component/sort.js +4 -8
  4. package/es/form/component/utils.d.ts +11 -11
  5. package/es/grid/component/pagination.d.ts +10 -10
  6. package/es/icon/hook/index.d.ts +89 -89
  7. package/es/open-modal/component/modal.js +5 -15
  8. package/es/open-modal/style/index.js +1 -1
  9. package/es/open-modal/style/wrap.js +1 -1
  10. package/es/radio/component/abstract-box.d.ts +25 -25
  11. package/es/table/component/date-time.d.ts +3 -0
  12. package/es/table/component/date-time.js +27 -0
  13. package/es/table/component/filter.js +1 -1
  14. package/es/table/component/sort.js +1 -1
  15. package/es/table/component/table.js +8 -5
  16. package/es/table/component/utils.d.ts +3 -2
  17. package/es/table/component/utils.js +18 -6
  18. package/es/tabs/component/utils.d.ts +3 -3
  19. package/es/tooltip/component/index.d.ts +11 -12
  20. package/lib/api/component/global-style.js +1 -1
  21. package/lib/api/component/sort.d.ts +1 -1
  22. package/lib/api/component/sort.js +4 -8
  23. package/lib/form/component/utils.d.ts +11 -11
  24. package/lib/grid/component/pagination.d.ts +10 -10
  25. package/lib/icon/hook/index.d.ts +89 -89
  26. package/lib/open-modal/component/modal.js +3 -13
  27. package/lib/open-modal/style/index.js +1 -1
  28. package/lib/open-modal/style/wrap.js +1 -1
  29. package/lib/radio/component/abstract-box.d.ts +25 -25
  30. package/lib/table/component/date-time.d.ts +3 -0
  31. package/lib/table/component/date-time.js +35 -0
  32. package/lib/table/component/filter.js +1 -1
  33. package/lib/table/component/sort.js +1 -1
  34. package/lib/table/component/table.js +7 -4
  35. package/lib/table/component/utils.d.ts +3 -2
  36. package/lib/table/component/utils.js +18 -6
  37. package/lib/tabs/component/utils.d.ts +3 -3
  38. package/lib/tooltip/component/index.d.ts +11 -12
  39. package/package.json +2 -2
  40. package/es/table/component/time.d.ts +0 -2
  41. package/es/table/component/time.js +0 -12
  42. package/lib/table/component/time.d.ts +0 -2
  43. package/lib/table/component/time.js +0 -19
@@ -8,8 +8,8 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
8
8
  color?: string | undefined;
9
9
  title?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
10
10
  overlay?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
11
- styles?: Partial<Record<"body" | "root", import("react").CSSProperties>> | undefined;
12
- classNames?: Partial<Record<"body" | "root", string>> | undefined;
11
+ styles?: Partial<Record<"root" | "body", import("react").CSSProperties>> | undefined;
12
+ classNames?: Partial<Record<"root" | "body", string>> | undefined;
13
13
  style?: import("react").CSSProperties | undefined;
14
14
  className?: string | undefined;
15
15
  rootClassName?: string | undefined;
@@ -36,22 +36,22 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
36
36
  defaultVisible?: boolean | undefined;
37
37
  onVisibleChange?: ((visible: boolean) => void) | undefined;
38
38
  afterVisibleChange?: ((visible: boolean) => void) | undefined;
39
+ zIndex?: number | undefined;
39
40
  animation?: string | undefined;
41
+ motion?: import("rc-motion").CSSMotionProps | undefined;
40
42
  transitionName?: string | undefined;
41
43
  prefixCls?: string | undefined;
42
- zIndex?: number | undefined;
43
44
  forceRender?: boolean | undefined;
44
45
  id?: string | undefined;
45
46
  align?: import("@rc-component/trigger").AlignType | undefined;
46
- motion?: import("rc-motion").CSSMotionProps | undefined;
47
- mouseEnterDelay?: number | undefined;
48
- mouseLeaveDelay?: number | undefined;
49
47
  onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
50
- overlayClassName?: string | undefined;
51
- overlayStyle?: import("react").CSSProperties | undefined;
52
- trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
53
- popupVisible?: boolean | undefined;
54
48
  fresh?: boolean | undefined;
49
+ mouseLeaveDelay?: number | undefined;
50
+ mouseEnterDelay?: number | undefined;
51
+ popupVisible?: boolean | undefined;
52
+ trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
53
+ overlayStyle?: import("react").CSSProperties | undefined;
54
+ overlayClassName?: string | undefined;
55
55
  getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
56
56
  showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
57
57
  arrowContent?: import("react").ReactNode;
@@ -71,7 +71,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
71
71
  prefixCls?: string | undefined;
72
72
  rootClassName?: string | undefined;
73
73
  name?: string | undefined;
74
- disabled?: boolean | undefined;
75
74
  defaultChecked?: boolean | undefined;
76
75
  autoFocus?: boolean | undefined;
77
76
  id?: string | undefined;
@@ -81,14 +80,16 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
81
80
  onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
82
81
  onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
83
82
  onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
83
+ disabled?: boolean | undefined;
84
84
  type?: string | undefined;
85
85
  checked?: boolean | undefined;
86
+ required?: boolean | undefined;
86
87
  indeterminate?: boolean | undefined;
87
88
  skipGroup?: boolean | undefined;
88
- required?: boolean | undefined;
89
- slot?: string | undefined;
90
- dir?: string | undefined;
89
+ color?: string | undefined;
91
90
  content?: string | undefined;
91
+ direction?: import("antd/es/config-provider").DirectionType;
92
+ translate?: "yes" | "no" | undefined;
92
93
  onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
93
94
  defaultValue?: string | number | readonly string[] | undefined;
94
95
  suppressContentEditableWarning?: boolean | undefined;
@@ -97,13 +98,14 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
97
98
  autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
98
99
  contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
99
100
  contextMenu?: string | undefined;
101
+ dir?: string | undefined;
100
102
  draggable?: (boolean | "true" | "false") | undefined;
101
- enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
103
+ enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
102
104
  hidden?: boolean | undefined;
103
105
  lang?: string | undefined;
104
106
  nonce?: string | undefined;
107
+ slot?: string | undefined;
105
108
  spellCheck?: (boolean | "true" | "false") | undefined;
106
- translate?: "yes" | "no" | undefined;
107
109
  radioGroup?: string | undefined;
108
110
  role?: import("react").AriaRole | undefined;
109
111
  about?: string | undefined;
@@ -118,7 +120,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
118
120
  vocab?: string | undefined;
119
121
  autoCorrect?: string | undefined;
120
122
  autoSave?: string | undefined;
121
- color?: string | undefined;
122
123
  itemProp?: string | undefined;
123
124
  itemScope?: boolean | undefined;
124
125
  itemType?: string | undefined;
@@ -127,7 +128,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
127
128
  results?: number | undefined;
128
129
  security?: string | undefined;
129
130
  unselectable?: "off" | "on" | undefined;
130
- inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
131
+ inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
131
132
  is?: string | undefined;
132
133
  exportparts?: string | undefined;
133
134
  part?: string | undefined;
@@ -143,17 +144,17 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
143
144
  "aria-colindextext"?: string | undefined;
144
145
  "aria-colspan"?: number | undefined;
145
146
  "aria-controls"?: string | undefined;
146
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
147
+ "aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" | "time" | undefined;
147
148
  "aria-describedby"?: string | undefined;
148
149
  "aria-description"?: string | undefined;
149
150
  "aria-details"?: string | undefined;
150
151
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
151
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
152
+ "aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
152
153
  "aria-errormessage"?: string | undefined;
153
154
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
154
155
  "aria-flowto"?: string | undefined;
155
156
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
156
- "aria-haspopup"?: boolean | "dialog" | "menu" | "tree" | "true" | "false" | "grid" | "listbox" | undefined;
157
+ "aria-haspopup"?: boolean | "grid" | "true" | "false" | "dialog" | "listbox" | "menu" | "tree" | undefined;
157
158
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
158
159
  "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
159
160
  "aria-keyshortcuts"?: string | undefined;
@@ -164,13 +165,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
164
165
  "aria-modal"?: (boolean | "true" | "false") | undefined;
165
166
  "aria-multiline"?: (boolean | "true" | "false") | undefined;
166
167
  "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
167
- "aria-orientation"?: "horizontal" | "vertical" | undefined;
168
+ "aria-orientation"?: "vertical" | "horizontal" | undefined;
168
169
  "aria-owns"?: string | undefined;
169
170
  "aria-placeholder"?: string | undefined;
170
171
  "aria-posinset"?: number | undefined;
171
172
  "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
172
173
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
173
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
174
+ "aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
174
175
  "aria-required"?: (boolean | "true" | "false") | undefined;
175
176
  "aria-roledescription"?: string | undefined;
176
177
  "aria-rowcount"?: number | undefined;
@@ -336,9 +337,8 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
336
337
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
337
338
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
338
339
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
339
- direction?: import("antd/es/config-provider").DirectionType;
340
- rows?: number | false | undefined;
341
340
  tooltip?: import("react").ReactNode | import("antd").TooltipProps;
341
+ rows?: number | false | undefined;
342
342
  autoShowTooltip?: boolean | undefined;
343
343
  refs?: import("../../api").Refs | undefined;
344
344
  ref: import("../../api").Refs | undefined;
@@ -0,0 +1,3 @@
1
+ import { ComponentProps } from './wrapper';
2
+ export declare function Date(props: ComponentProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export declare function DateTime(props: ComponentProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import dayjs from 'dayjs';
3
+ import _ from 'lodash';
4
+ import { Fragment as _Fragment, jsx as _jsx } from "@emotion/react/jsx-runtime";
5
+ function BaseComponent(_ref) {
6
+ var column = _ref.column,
7
+ children = _ref.children;
8
+ var timeFormat = column.timeFormat;
9
+ return _jsx(_Fragment, {
10
+ children: dayjs(children).format(timeFormat)
11
+ });
12
+ }
13
+ function mergerTimeFormat(props, timeFormat) {
14
+ return _.merge({
15
+ column: {
16
+ timeFormat: timeFormat
17
+ }
18
+ }, props);
19
+ }
20
+ export function Date(props) {
21
+ var params = mergerTimeFormat(props, 'YYYY-MM-DD');
22
+ return _jsx(BaseComponent, _objectSpread({}, params));
23
+ }
24
+ export function DateTime(props) {
25
+ var params = mergerTimeFormat(props, 'YYYY-MM-DD hh:mm:ss');
26
+ return _jsx(BaseComponent, _objectSpread({}, params));
27
+ }
@@ -38,7 +38,7 @@ function filter(column, search, record) {
38
38
  var _column$dataIndex = column.dataIndex,
39
39
  dataIndex = _column$dataIndex === void 0 ? '' : _column$dataIndex,
40
40
  filterBy = column.filterBy;
41
- var current = record[dataIndex];
41
+ var current = _.get(record, dataIndex);
42
42
  if (_.isFunction(filterBy)) {
43
43
  return filterBy({
44
44
  record: record,
@@ -11,7 +11,7 @@ export function getSortColumn(_ref) {
11
11
  }
12
12
  return {
13
13
  sorter: function sorter(a, b) {
14
- return _sorter(a[dataIndex], b[dataIndex]);
14
+ return _sorter(_.get(a, dataIndex), _.get(b, dataIndex));
15
15
  }
16
16
  };
17
17
  }
@@ -7,11 +7,12 @@ var _excluded = ["rowKey", "loading", "columns", "dataSource", "editorValueKey"]
7
7
  _excluded2 = ["onlyLoading"],
8
8
  _excluded3 = ["onRowClick", "width", "emptyText"],
9
9
  _excluded4 = ["useFormWrapper", "context", "maxHeight"];
10
- import { executeFunction, includesNonStrictMode } from "../../api";
10
+ import { executeFunction, getClassName, includesNonStrictMode } from "../../api";
11
11
  import { Empty } from "../../empty";
12
12
  import { Form, useFormContext } from "../../form";
13
13
  import { useListOperation } from "../../hooks";
14
14
  import { TableProvider, useSearchColumn } from "./..";
15
+ import { cx } from '@emotion/css';
15
16
  import _ from 'lodash';
16
17
  import { useEffect, useState } from 'react';
17
18
  import { useSetState } from 'react-use';
@@ -106,10 +107,12 @@ function useInit(_ref2) {
106
107
  editorValueKey: editorValueKey
107
108
  });
108
109
  function updateSelectedStatus(keys) {
109
- _.forEach(dataSource, function (item) {
110
- var checked = includesNonStrictMode(keys, item[rowKey]);
111
- _.set(item, '__selected__', checked);
110
+ var data = _.map(dataSource, function (item) {
111
+ return _objectSpread(_objectSpread({}, item), {}, {
112
+ __selected__: includesNonStrictMode(keys, item[rowKey])
113
+ });
112
114
  });
115
+ setDataSource(data);
113
116
  }
114
117
  function refresh() {
115
118
  return _refresh.apply(this, arguments);
@@ -231,7 +234,7 @@ export function Table(props) {
231
234
  }
232
235
  return _jsx("div", {
233
236
  css: styles.wrapper(maxHeight),
234
- className: formProps.className,
237
+ className: cx(getClassName('table-wrapper'), formProps.className),
235
238
  style: formProps.style,
236
239
  children: _jsx(TableBody, _objectSpread({}, restProps))
237
240
  });
@@ -3,15 +3,16 @@ import type { ColumnType } from 'antd/es/table';
3
3
  import type { TableRowSelection } from 'antd/es/table/interface';
4
4
  import { Column, DataSource, GetSearchColumn, TableContext, TableProps } from '../type';
5
5
  import { Actions } from './actions';
6
+ import { Date, DateTime } from './date-time';
6
7
  import { Editor } from './editor';
7
8
  import { Link } from './link';
8
9
  import { Switch } from './switch';
9
- import { Time } from './time';
10
10
  interface GenerateColumnsProps extends TableProps {
11
11
  getSearchColumn: GetSearchColumn;
12
12
  }
13
13
  export declare const componentMap: {
14
- time: typeof Time;
14
+ date: typeof Date;
15
+ dateTime: typeof DateTime;
15
16
  link: typeof Link;
16
17
  switch: typeof Switch;
17
18
  actions: typeof Actions;
@@ -1,21 +1,23 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
- var _excluded = ["type", "disabled", "onClick"];
4
+ var _excluded = ["type", "disabled", "onClick", "fixed", "width"];
5
5
  import { executeFunction } from "../../api";
6
+ import { transformNameToPath } from "../../form/component/utils";
6
7
  import _ from 'lodash';
7
8
  import { Actions } from "./actions";
8
9
  import { formPropsKeysInTable } from "./constant";
10
+ import { Date, DateTime } from "./date-time";
9
11
  import { Editor } from "./editor";
10
12
  import { getFilterColumn } from "./filter";
11
13
  import { Link } from "./link";
12
14
  import { getSortColumn } from "./sort";
13
15
  import { Switch } from "./switch";
14
- import { Time } from "./time";
15
16
  import { Wrapper } from "./wrapper";
16
17
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
17
18
  export var componentMap = {
18
- time: Time,
19
+ date: Date,
20
+ dateTime: DateTime,
19
21
  link: Link,
20
22
  switch: Switch,
21
23
  actions: Actions,
@@ -30,10 +32,13 @@ export function generateColumns(_ref) {
30
32
  getSearchColumn = _ref.getSearchColumn;
31
33
  return _.map(columns, function (column) {
32
34
  var newColumn = _.clone(column);
33
- var search = newColumn.search,
35
+ var dataIndex = newColumn.dataIndex,
36
+ search = newColumn.search,
34
37
  sort = newColumn.sort,
35
38
  filters = newColumn.filters,
36
- originRender = newColumn.render;
39
+ originRender = newColumn.render,
40
+ _newColumn$align = newColumn.align,
41
+ align = _newColumn$align === void 0 ? 'center' : _newColumn$align;
37
42
  _.assign(newColumn, getColumnWidth(newColumn));
38
43
  if (search) {
39
44
  _.assign(newColumn, getSearchColumn(column));
@@ -78,6 +83,8 @@ export function generateColumns(_ref) {
78
83
  return component;
79
84
  };
80
85
  return _objectSpread(_objectSpread({}, newColumn), {}, {
86
+ dataIndex: transformNameToPath(dataIndex),
87
+ align: align,
81
88
  render: render
82
89
  });
83
90
  });
@@ -140,8 +147,13 @@ export function getRowSelection(_ref3) {
140
147
  var type = column.type,
141
148
  disabled = column.disabled,
142
149
  onClick = column.onClick,
150
+ _column$fixed = column.fixed,
151
+ fixed = _column$fixed === void 0 ? 'left' : _column$fixed,
152
+ width = column.width,
143
153
  rest = _objectWithoutProperties(column, _excluded);
144
154
  return _objectSpread({
155
+ fixed: fixed,
156
+ columnWidth: width,
145
157
  selectedRowKeys: selectedRowKeys,
146
158
  getCheckboxProps: function getCheckboxProps(record) {
147
159
  return {
@@ -209,7 +221,7 @@ export function getTableFormInitialValues(_ref5) {
209
221
  return;
210
222
  }
211
223
  return _.map(dataSource, function (item) {
212
- return _.pick(item, [rowKey].concat(_toConsumableArray(keys)));
224
+ return _.pick(item, [rowKey, '__selected__'].concat(_toConsumableArray(keys)));
213
225
  });
214
226
  }
215
227
  export function updateDataSourceByFormValues(formValues, dataSource) {
@@ -6,17 +6,17 @@ export declare function getRenderTabBar({ type, items, size, tabBarGutter, tabBa
6
6
  export declare function generateTabItems({ items }: TabsProps): {
7
7
  label: import("@emotion/react/jsx-runtime").JSX.Element;
8
8
  key: string;
9
+ children?: import("react").ReactNode;
9
10
  className?: string | undefined;
10
11
  style?: import("react").CSSProperties | undefined;
11
- children?: import("react").ReactNode;
12
12
  closable?: boolean | undefined;
13
13
  prefixCls?: string | undefined;
14
14
  closeIcon?: import("react").ReactNode;
15
15
  forceRender?: boolean | undefined;
16
- disabled?: boolean | undefined;
17
16
  id?: string | undefined;
18
- active?: boolean | undefined;
17
+ disabled?: boolean | undefined;
19
18
  icon?: import("react").ReactNode;
19
+ active?: boolean | undefined;
20
20
  destroyInactiveTabPane?: boolean | undefined;
21
21
  animated?: boolean | undefined;
22
22
  tabKey?: string | undefined;
@@ -1,13 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { getPopupContainer } from "../../api";
3
2
  import { TooltipProps } from "..";
4
3
  export declare const tooltipOverlayClassName: string;
5
4
  export declare function getTooltipProps(props: TooltipProps): {
6
5
  color?: string | undefined;
7
6
  title?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
8
7
  overlay?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
9
- styles?: Partial<Record<"body" | "root", import("react").CSSProperties>> | undefined;
10
- classNames: Partial<Record<"body" | "root", string>>;
8
+ styles?: Partial<Record<"root" | "body", import("react").CSSProperties>> | undefined;
9
+ classNames: Partial<Record<"root" | "body", string>>;
11
10
  style?: import("react").CSSProperties | undefined;
12
11
  className?: string | undefined;
13
12
  rootClassName?: string | undefined;
@@ -20,7 +19,7 @@ export declare function getTooltipProps(props: TooltipProps): {
20
19
  pointAtCenter?: boolean | undefined;
21
20
  };
22
21
  autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
23
- getPopupContainer: typeof getPopupContainer;
22
+ getPopupContainer: (triggerNode: HTMLElement) => HTMLElement;
24
23
  children?: import("react").ReactNode;
25
24
  destroyTooltipOnHide?: boolean | {
26
25
  keepParent?: boolean | undefined;
@@ -34,22 +33,22 @@ export declare function getTooltipProps(props: TooltipProps): {
34
33
  defaultVisible?: boolean | undefined;
35
34
  onVisibleChange?: ((visible: boolean) => void) | undefined;
36
35
  afterVisibleChange?: ((visible: boolean) => void) | undefined;
36
+ zIndex?: number | undefined;
37
37
  animation?: string | undefined;
38
+ motion?: import("rc-motion").CSSMotionProps | undefined;
38
39
  transitionName?: string | undefined;
39
40
  prefixCls?: string | undefined;
40
- zIndex?: number | undefined;
41
41
  forceRender?: boolean | undefined;
42
42
  id?: string | undefined;
43
43
  align?: import("@rc-component/trigger").AlignType | undefined;
44
- motion?: import("rc-motion").CSSMotionProps | undefined;
45
- mouseEnterDelay?: number | undefined;
46
- mouseLeaveDelay?: number | undefined;
47
44
  onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
48
- overlayClassName?: string | undefined;
49
- overlayStyle?: import("react").CSSProperties | undefined;
50
- trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
51
- popupVisible?: boolean | undefined;
52
45
  fresh?: boolean | undefined;
46
+ mouseLeaveDelay?: number | undefined;
47
+ mouseEnterDelay?: number | undefined;
48
+ popupVisible?: boolean | undefined;
49
+ trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
50
+ overlayStyle?: import("react").CSSProperties | undefined;
51
+ overlayClassName?: string | undefined;
53
52
  getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
54
53
  showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
55
54
  arrowContent?: import("react").ReactNode;
@@ -11,7 +11,7 @@ var _css = require("@emotion/css");
11
11
  var _react = require("@emotion/react");
12
12
  var _templateObject, _templateObject2, _templateObject3;
13
13
  var commonStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.do-hide-scroll {\n overflow: hidden !important;\n }\n"])));
14
- (0, _css.injectGlobal)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n body {\n ", "\n }\n"])), commonStyle);
14
+ (0, _css.injectGlobal)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n body {\n ", "\n }\n\n [class*='do-'] {\n * {\n box-sizing: border-box;\n }\n }\n"])), commonStyle);
15
15
  var flexStyle = exports.flexStyle = function flexStyle(_ref) {
16
16
  var vertical = _ref.vertical,
17
17
  _ref$gap = _ref.gap,
@@ -1,2 +1,2 @@
1
- export declare function sorter(a: any, b: any): any;
1
+ export declare function sorter(a?: any, b?: any): any;
2
2
  export declare function sortBy(data: any[] | undefined, key: string): any[];
@@ -7,22 +7,18 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.sortBy = sortBy;
8
8
  exports.sorter = sorter;
9
9
  var _lodash = _interopRequireDefault(require("lodash"));
10
- function sorter(a, b) {
10
+ function sorter() {
11
+ var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
12
+ var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
11
13
  if (_lodash.default.isNumber(a)) {
12
14
  return a - b;
13
15
  }
14
- if (_lodash.default.isNil(a) && _lodash.default.isNil(b)) {
15
- return 0;
16
- }
17
- if (_lodash.default.isNil(a)) {
18
- return -1;
19
- }
20
16
  return a.localeCompare(b);
21
17
  }
22
18
  function sortBy() {
23
19
  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
24
20
  var key = arguments.length > 1 ? arguments[1] : undefined;
25
21
  return data.sort(function (a, b) {
26
- return sorter(a[key], b[key]);
22
+ return sorter(_lodash.default.get(a, key), _lodash.default.get(b, key));
27
23
  });
28
24
  }
@@ -12,8 +12,8 @@ export declare function getFormItemProps(props: any): {
12
12
  color?: string | undefined;
13
13
  title?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
14
14
  overlay?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
15
- styles?: Partial<Record<"body" | "root", import("react").CSSProperties>> | undefined;
16
- classNames: Partial<Record<"body" | "root", string>>;
15
+ styles?: Partial<Record<"root" | "body", import("react").CSSProperties>> | undefined;
16
+ classNames: Partial<Record<"root" | "body", string>>;
17
17
  rootClassName?: string | undefined;
18
18
  placement?: import("antd/es/tooltip").TooltipPlacement | undefined;
19
19
  builtinPlacements?: import("@rc-component/trigger").BuildInPlacements | undefined;
@@ -24,7 +24,7 @@ export declare function getFormItemProps(props: any): {
24
24
  pointAtCenter?: boolean | undefined;
25
25
  };
26
26
  autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
27
- getPopupContainer: typeof import("../../api").getPopupContainer;
27
+ getPopupContainer: (triggerNode: HTMLElement) => HTMLElement;
28
28
  children?: import("react").ReactNode;
29
29
  destroyTooltipOnHide?: boolean | {
30
30
  keepParent?: boolean | undefined;
@@ -38,22 +38,22 @@ export declare function getFormItemProps(props: any): {
38
38
  defaultVisible?: boolean | undefined;
39
39
  onVisibleChange?: ((visible: boolean) => void) | undefined;
40
40
  afterVisibleChange?: ((visible: boolean) => void) | undefined;
41
+ zIndex?: number | undefined;
41
42
  animation?: string | undefined;
43
+ motion?: import("rc-motion").CSSMotionProps | undefined;
42
44
  transitionName?: string | undefined;
43
45
  prefixCls?: string | undefined;
44
- zIndex?: number | undefined;
45
46
  forceRender?: boolean | undefined;
46
47
  id?: string | undefined;
47
48
  align?: import("@rc-component/trigger").AlignType | undefined;
48
- motion?: import("rc-motion").CSSMotionProps | undefined;
49
- mouseEnterDelay?: number | undefined;
50
- mouseLeaveDelay?: number | undefined;
51
49
  onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
52
- overlayClassName?: string | undefined;
53
- overlayStyle?: import("react").CSSProperties | undefined;
54
- trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
55
- popupVisible?: boolean | undefined;
56
50
  fresh?: boolean | undefined;
51
+ mouseLeaveDelay?: number | undefined;
52
+ mouseEnterDelay?: number | undefined;
53
+ popupVisible?: boolean | undefined;
54
+ trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
55
+ overlayStyle?: import("react").CSSProperties | undefined;
56
+ overlayClassName?: string | undefined;
57
57
  getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
58
58
  showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
59
59
  arrowContent?: import("react").ReactNode;
@@ -11,7 +11,7 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
11
11
  current: number;
12
12
  total: number;
13
13
  onChange: import("react").Dispatch<import("react").SetStateAction<number>>;
14
- position?: ("none" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter")[] | undefined;
14
+ position?: ("none" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter")[] | undefined;
15
15
  showQuickJumper?: boolean | {
16
16
  goButton?: import("react").ReactNode;
17
17
  } | undefined;
@@ -26,7 +26,6 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
26
26
  className?: string | undefined;
27
27
  style?: import("react").CSSProperties | undefined;
28
28
  prefixCls?: string | undefined;
29
- disabled?: boolean | undefined;
30
29
  "aria-activedescendant"?: string | undefined;
31
30
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
32
31
  "aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
@@ -39,17 +38,17 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
39
38
  "aria-colindextext"?: string | undefined;
40
39
  "aria-colspan"?: number | undefined;
41
40
  "aria-controls"?: string | undefined;
42
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
41
+ "aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" | "time" | undefined;
43
42
  "aria-describedby"?: string | undefined;
44
43
  "aria-description"?: string | undefined;
45
44
  "aria-details"?: string | undefined;
46
45
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
47
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
46
+ "aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
48
47
  "aria-errormessage"?: string | undefined;
49
48
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
50
49
  "aria-flowto"?: string | undefined;
51
50
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
52
- "aria-haspopup"?: boolean | "dialog" | "menu" | "tree" | "true" | "false" | "grid" | "listbox" | undefined;
51
+ "aria-haspopup"?: boolean | "grid" | "true" | "false" | "dialog" | "listbox" | "menu" | "tree" | undefined;
53
52
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
54
53
  "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
55
54
  "aria-keyshortcuts"?: string | undefined;
@@ -60,13 +59,13 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
60
59
  "aria-modal"?: (boolean | "true" | "false") | undefined;
61
60
  "aria-multiline"?: (boolean | "true" | "false") | undefined;
62
61
  "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
63
- "aria-orientation"?: "horizontal" | "vertical" | undefined;
62
+ "aria-orientation"?: "vertical" | "horizontal" | undefined;
64
63
  "aria-owns"?: string | undefined;
65
64
  "aria-placeholder"?: string | undefined;
66
65
  "aria-posinset"?: number | undefined;
67
66
  "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
68
67
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
69
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
68
+ "aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
70
69
  "aria-required"?: (boolean | "true" | "false") | undefined;
71
70
  "aria-roledescription"?: string | undefined;
72
71
  "aria-rowcount"?: number | undefined;
@@ -80,8 +79,9 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
80
79
  "aria-valuemin"?: number | undefined;
81
80
  "aria-valuenow"?: number | undefined;
82
81
  "aria-valuetext"?: string | undefined;
82
+ disabled?: boolean | undefined;
83
+ align?: "start" | "end" | "center" | undefined;
83
84
  locale?: import("rc-pagination").PaginationLocale | undefined;
84
- align?: "center" | "start" | "end" | undefined;
85
85
  prevIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
86
86
  nextIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
87
87
  selectPrefixCls?: string | undefined;
@@ -98,9 +98,9 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
98
98
  jumpPrevIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
99
99
  jumpNextIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
100
100
  onShowSizeChange?: ((current: number, size: number) => void) | undefined;
101
- itemRender?: ((page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: import("react").ReactNode) => import("react").ReactNode) | undefined;
101
+ itemRender?: ((page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: import("react").ReactNode) => import("react").ReactNode) | undefined;
102
102
  showTotal?: ((total: number, range: [number, number]) => import("react").ReactNode) | undefined;
103
- justify?: "center" | "left" | "right" | "between" | undefined;
103
+ justify?: "left" | "right" | "center" | "between" | undefined;
104
104
  };
105
105
  export type PaginationProps = TablePaginationConfig & Pick<HStackProps, 'justify'>;
106
106
  export declare function Pagination({ justify, className, style, ...props }: PaginationProps): import("@emotion/react/jsx-runtime").JSX.Element;