@douyinfe/semi-ui 2.40.0-alpha.0 → 2.40.0

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 (243) hide show
  1. package/dist/css/semi.css +6 -40
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +280 -537
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/_portal/index.d.ts +3 -2
  8. package/lib/cjs/_portal/index.js +33 -26
  9. package/lib/cjs/_utils/index.js +0 -3
  10. package/lib/cjs/autoComplete/index.js +0 -2
  11. package/lib/cjs/autoComplete/option.js +0 -2
  12. package/lib/cjs/avatar/avatarGroup.js +0 -1
  13. package/lib/cjs/avatar/index.js +0 -1
  14. package/lib/cjs/backtop/index.js +0 -1
  15. package/lib/cjs/badge/index.js +0 -1
  16. package/lib/cjs/banner/index.js +0 -3
  17. package/lib/cjs/breadcrumb/index.js +0 -3
  18. package/lib/cjs/button/Button.js +8 -14
  19. package/lib/cjs/calendar/dayCalendar.js +4 -9
  20. package/lib/cjs/calendar/dayCol.js +1 -1
  21. package/lib/cjs/calendar/monthCalendar.js +5 -12
  22. package/lib/cjs/calendar/rangeCalendar.js +0 -2
  23. package/lib/cjs/carousel/index.js +0 -2
  24. package/lib/cjs/checkbox/checkbox.js +0 -2
  25. package/lib/cjs/checkbox/checkboxGroup.js +0 -3
  26. package/lib/cjs/checkbox/checkboxInner.js +0 -2
  27. package/lib/cjs/collapse/index.js +0 -1
  28. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  29. package/lib/cjs/datePicker/dateInput.js +0 -3
  30. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  31. package/lib/cjs/datePicker/datePicker.js +1 -3
  32. package/lib/cjs/datePicker/month.js +0 -4
  33. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  34. package/lib/cjs/datePicker/monthsGrid.js +1 -5
  35. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  36. package/lib/cjs/datePicker/yearAndMonth.js +0 -2
  37. package/lib/cjs/form/arrayField.js +0 -2
  38. package/lib/cjs/form/baseForm.d.ts +0 -1
  39. package/lib/cjs/form/baseForm.js +5 -7
  40. package/lib/cjs/form/context.js +0 -2
  41. package/lib/cjs/form/errorMessage.js +0 -2
  42. package/lib/cjs/form/field.d.ts +0 -1
  43. package/lib/cjs/form/field.js +0 -2
  44. package/lib/cjs/form/group.js +0 -2
  45. package/lib/cjs/form/hoc/withField.js +2 -6
  46. package/lib/cjs/form/interface.d.ts +4 -4
  47. package/lib/cjs/form/interface.js +0 -3
  48. package/lib/cjs/form/section.js +0 -2
  49. package/lib/cjs/form/slot.js +0 -3
  50. package/lib/cjs/iconButton/index.js +0 -2
  51. package/lib/cjs/image/image.js +29 -34
  52. package/lib/cjs/image/interface.d.ts +4 -1
  53. package/lib/cjs/image/preview.js +5 -3
  54. package/lib/cjs/image/previewContext.d.ts +1 -0
  55. package/lib/cjs/image/previewFooter.d.ts +5 -1
  56. package/lib/cjs/image/previewFooter.js +66 -38
  57. package/lib/cjs/image/previewInner.d.ts +2 -2
  58. package/lib/cjs/image/previewInner.js +4 -2
  59. package/lib/cjs/input/index.js +0 -2
  60. package/lib/cjs/input/inputGroup.js +0 -3
  61. package/lib/cjs/input/textarea.js +0 -2
  62. package/lib/cjs/inputNumber/index.js +1 -5
  63. package/lib/cjs/modal/ConfirmModal.js +0 -2
  64. package/lib/cjs/modal/Modal.js +0 -2
  65. package/lib/cjs/modal/ModalContent.js +0 -5
  66. package/lib/cjs/modal/confirm.d.ts +12 -12
  67. package/lib/cjs/modal/confirm.js +0 -1
  68. package/lib/cjs/modal/useModal/HookModal.js +0 -1
  69. package/lib/cjs/modal/useModal/index.js +0 -2
  70. package/lib/cjs/navigation/Item.js +0 -3
  71. package/lib/cjs/navigation/SubNav.js +0 -3
  72. package/lib/cjs/navigation/index.js +0 -2
  73. package/lib/cjs/notification/notice.js +29 -35
  74. package/lib/cjs/notification/useNotification/index.js +1 -1
  75. package/lib/cjs/overflowList/index.js +0 -2
  76. package/lib/cjs/pagination/index.d.ts +2 -0
  77. package/lib/cjs/pagination/index.js +29 -13
  78. package/lib/cjs/popconfirm/index.js +0 -2
  79. package/lib/cjs/progress/index.js +0 -1
  80. package/lib/cjs/radio/radio.js +0 -2
  81. package/lib/cjs/rating/index.js +0 -1
  82. package/lib/cjs/resizeObserver/index.js +0 -1
  83. package/lib/cjs/scrollList/scrollItem.js +0 -3
  84. package/lib/cjs/select/index.d.ts +0 -1
  85. package/lib/cjs/select/index.js +3 -12
  86. package/lib/cjs/select/option.js +0 -2
  87. package/lib/cjs/select/utils.js +0 -2
  88. package/lib/cjs/sideSheet/index.js +0 -2
  89. package/lib/cjs/slider/index.js +0 -3
  90. package/lib/cjs/spin/icon.js +0 -2
  91. package/lib/cjs/switch/index.js +0 -2
  92. package/lib/cjs/table/Body/BaseRow.js +0 -2
  93. package/lib/cjs/table/Body/ExpandedRow.js +0 -3
  94. package/lib/cjs/table/Body/SectionRow.js +0 -3
  95. package/lib/cjs/table/Body/index.js +0 -8
  96. package/lib/cjs/table/ColGroup.js +0 -1
  97. package/lib/cjs/table/ColumnFilter.js +0 -3
  98. package/lib/cjs/table/ColumnSelection.js +0 -2
  99. package/lib/cjs/table/HeadTable.js +0 -2
  100. package/lib/cjs/table/ResizableTable.js +1 -4
  101. package/lib/cjs/table/Table.js +1 -10
  102. package/lib/cjs/table/TableCell.js +0 -4
  103. package/lib/cjs/table/TableHeader.js +0 -4
  104. package/lib/cjs/table/TableHeaderRow.js +0 -2
  105. package/lib/cjs/table/TablePagination.js +0 -2
  106. package/lib/cjs/table/table-context.js +0 -2
  107. package/lib/cjs/tabs/TabBar.js +0 -2
  108. package/lib/cjs/tag/index.js +1 -3
  109. package/lib/cjs/tagInput/index.js +0 -2
  110. package/lib/cjs/timePicker/Combobox.js +0 -4
  111. package/lib/cjs/timePicker/TimeInput.js +0 -2
  112. package/lib/cjs/timePicker/TimePicker.js +0 -2
  113. package/lib/cjs/toast/index.js +0 -2
  114. package/lib/cjs/toast/toast.js +0 -2
  115. package/lib/cjs/toast/useToast/index.js +0 -1
  116. package/lib/cjs/tooltip/index.js +0 -6
  117. package/lib/cjs/transfer/index.js +0 -3
  118. package/lib/cjs/tree/index.d.ts +2 -1
  119. package/lib/cjs/tree/index.js +11 -14
  120. package/lib/cjs/tree/treeNode.js +0 -3
  121. package/lib/cjs/treeSelect/index.js +0 -7
  122. package/lib/cjs/trigger/index.js +0 -2
  123. package/lib/cjs/typography/util.js +1 -3
  124. package/lib/cjs/upload/index.js +1 -6
  125. package/lib/es/_portal/index.d.ts +3 -2
  126. package/lib/es/_portal/index.js +33 -26
  127. package/lib/es/_utils/index.js +0 -2
  128. package/lib/es/autoComplete/index.js +0 -1
  129. package/lib/es/autoComplete/option.js +0 -1
  130. package/lib/es/avatar/avatarGroup.js +0 -1
  131. package/lib/es/avatar/index.js +0 -1
  132. package/lib/es/backtop/index.js +0 -1
  133. package/lib/es/badge/index.js +0 -1
  134. package/lib/es/banner/index.js +0 -2
  135. package/lib/es/breadcrumb/index.js +0 -2
  136. package/lib/es/button/Button.js +8 -13
  137. package/lib/es/calendar/dayCalendar.js +4 -9
  138. package/lib/es/calendar/dayCol.js +1 -1
  139. package/lib/es/calendar/monthCalendar.js +5 -11
  140. package/lib/es/calendar/rangeCalendar.js +0 -1
  141. package/lib/es/carousel/index.js +0 -1
  142. package/lib/es/checkbox/checkbox.js +0 -1
  143. package/lib/es/checkbox/checkboxGroup.js +0 -2
  144. package/lib/es/checkbox/checkboxInner.js +0 -1
  145. package/lib/es/collapse/index.js +0 -1
  146. package/lib/es/datePicker/dateInput.d.ts +1 -1
  147. package/lib/es/datePicker/dateInput.js +0 -3
  148. package/lib/es/datePicker/datePicker.d.ts +1 -1
  149. package/lib/es/datePicker/datePicker.js +0 -3
  150. package/lib/es/datePicker/month.js +0 -4
  151. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  152. package/lib/es/datePicker/monthsGrid.js +1 -5
  153. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  154. package/lib/es/datePicker/yearAndMonth.js +0 -1
  155. package/lib/es/form/arrayField.js +0 -1
  156. package/lib/es/form/baseForm.d.ts +0 -1
  157. package/lib/es/form/baseForm.js +5 -6
  158. package/lib/es/form/context.js +0 -1
  159. package/lib/es/form/errorMessage.js +0 -1
  160. package/lib/es/form/field.d.ts +0 -1
  161. package/lib/es/form/field.js +0 -1
  162. package/lib/es/form/group.js +0 -1
  163. package/lib/es/form/hoc/withField.js +2 -6
  164. package/lib/es/form/interface.d.ts +4 -4
  165. package/lib/es/form/interface.js +0 -2
  166. package/lib/es/form/section.js +0 -1
  167. package/lib/es/form/slot.js +0 -2
  168. package/lib/es/iconButton/index.js +0 -1
  169. package/lib/es/image/image.js +29 -34
  170. package/lib/es/image/interface.d.ts +4 -1
  171. package/lib/es/image/preview.js +5 -3
  172. package/lib/es/image/previewContext.d.ts +1 -0
  173. package/lib/es/image/previewFooter.d.ts +5 -1
  174. package/lib/es/image/previewFooter.js +66 -38
  175. package/lib/es/image/previewInner.d.ts +2 -2
  176. package/lib/es/image/previewInner.js +4 -1
  177. package/lib/es/input/index.js +0 -1
  178. package/lib/es/input/inputGroup.js +0 -2
  179. package/lib/es/input/textarea.js +0 -1
  180. package/lib/es/inputNumber/index.js +0 -5
  181. package/lib/es/modal/ConfirmModal.js +0 -2
  182. package/lib/es/modal/Modal.js +0 -1
  183. package/lib/es/modal/ModalContent.js +0 -3
  184. package/lib/es/modal/confirm.d.ts +12 -12
  185. package/lib/es/modal/confirm.js +0 -1
  186. package/lib/es/modal/useModal/HookModal.js +0 -1
  187. package/lib/es/modal/useModal/index.js +0 -2
  188. package/lib/es/navigation/Item.js +0 -2
  189. package/lib/es/navigation/SubNav.js +0 -2
  190. package/lib/es/navigation/index.js +0 -1
  191. package/lib/es/notification/notice.js +29 -34
  192. package/lib/es/notification/useNotification/index.js +1 -1
  193. package/lib/es/overflowList/index.js +0 -1
  194. package/lib/es/pagination/index.d.ts +2 -0
  195. package/lib/es/pagination/index.js +28 -13
  196. package/lib/es/popconfirm/index.js +0 -1
  197. package/lib/es/progress/index.js +0 -1
  198. package/lib/es/radio/radio.js +0 -1
  199. package/lib/es/rating/index.js +0 -1
  200. package/lib/es/resizeObserver/index.js +0 -1
  201. package/lib/es/scrollList/scrollItem.js +0 -3
  202. package/lib/es/select/index.d.ts +0 -1
  203. package/lib/es/select/index.js +3 -12
  204. package/lib/es/select/option.js +0 -1
  205. package/lib/es/select/utils.js +0 -2
  206. package/lib/es/sideSheet/index.js +0 -1
  207. package/lib/es/slider/index.js +0 -3
  208. package/lib/es/spin/icon.js +0 -1
  209. package/lib/es/switch/index.js +0 -1
  210. package/lib/es/table/Body/BaseRow.js +0 -2
  211. package/lib/es/table/Body/ExpandedRow.js +0 -2
  212. package/lib/es/table/Body/SectionRow.js +0 -3
  213. package/lib/es/table/Body/index.js +0 -8
  214. package/lib/es/table/ColGroup.js +0 -1
  215. package/lib/es/table/ColumnFilter.js +0 -2
  216. package/lib/es/table/ColumnSelection.js +0 -1
  217. package/lib/es/table/HeadTable.js +0 -1
  218. package/lib/es/table/ResizableTable.js +0 -4
  219. package/lib/es/table/Table.js +0 -10
  220. package/lib/es/table/TableCell.js +0 -3
  221. package/lib/es/table/TableHeader.js +0 -3
  222. package/lib/es/table/TableHeaderRow.js +0 -1
  223. package/lib/es/table/TablePagination.js +0 -1
  224. package/lib/es/table/table-context.js +0 -1
  225. package/lib/es/tabs/TabBar.js +0 -2
  226. package/lib/es/tag/index.js +1 -2
  227. package/lib/es/tagInput/index.js +0 -2
  228. package/lib/es/timePicker/Combobox.js +0 -3
  229. package/lib/es/timePicker/TimeInput.js +0 -1
  230. package/lib/es/timePicker/TimePicker.js +0 -1
  231. package/lib/es/toast/index.js +0 -1
  232. package/lib/es/toast/toast.js +0 -1
  233. package/lib/es/toast/useToast/index.js +0 -1
  234. package/lib/es/tooltip/index.js +0 -5
  235. package/lib/es/transfer/index.js +0 -3
  236. package/lib/es/tree/index.d.ts +2 -1
  237. package/lib/es/tree/index.js +11 -13
  238. package/lib/es/tree/treeNode.js +0 -3
  239. package/lib/es/treeSelect/index.js +0 -7
  240. package/lib/es/trigger/index.js +0 -2
  241. package/lib/es/typography/util.js +1 -3
  242. package/lib/es/upload/index.js +1 -5
  243. package/package.json +8 -8
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable max-lines-per-function */
13
12
  import BaseComponent from '../_base/baseComponent';
14
13
  import React, { Children } from 'react';
15
14
  import PropTypes from 'prop-types';
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable no-unreachable */
11
10
  import React from 'react';
12
11
  import cls from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -128,39 +127,35 @@ class Notice extends BaseComponent {
128
127
  [`${prefixCls}-rtl`]: direction === 'rtl'
129
128
  });
130
129
  const titleID = getUuidShort({});
131
- return (
132
- /*#__PURE__*/
133
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
134
- React.createElement("div", {
135
- className: wrapper,
136
- style: style,
137
- onMouseEnter: this.clearCloseTimer,
138
- onMouseLeave: this.startCloseTimer,
139
- onClick: this.notifyClick,
140
- "aria-labelledby": titleID,
141
- role: 'alert',
142
- onAnimationEnd: this.props.onAnimationEnd,
143
- onAnimationStart: this.props.onAnimationStart
144
- }, /*#__PURE__*/React.createElement("div", null, this.renderTypeIcon()), /*#__PURE__*/React.createElement("div", {
145
- className: `${prefixCls}-inner`
146
- }, /*#__PURE__*/React.createElement("div", {
147
- className: `${prefixCls}-content-wrapper`
148
- }, title ? /*#__PURE__*/React.createElement("div", {
149
- id: titleID,
150
- className: `${prefixCls}-title`,
151
- "x-semi-prop": "title"
152
- }, title) : '', content ? /*#__PURE__*/React.createElement("div", {
153
- className: `${prefixCls}-content`,
154
- "x-semi-prop": "content"
155
- }, content) : ''), showClose && /*#__PURE__*/React.createElement(Button, {
156
- className: `${prefixCls}-icon-close`,
157
- type: "tertiary",
158
- icon: /*#__PURE__*/React.createElement(IconClose, null),
159
- theme: "borderless",
160
- size: "small",
161
- onClick: this.close
162
- })))
163
- );
130
+ return /*#__PURE__*/React.createElement("div", {
131
+ className: wrapper,
132
+ style: style,
133
+ onMouseEnter: this.clearCloseTimer,
134
+ onMouseLeave: this.startCloseTimer,
135
+ onClick: this.notifyClick,
136
+ "aria-labelledby": titleID,
137
+ role: 'alert',
138
+ onAnimationEnd: this.props.onAnimationEnd,
139
+ onAnimationStart: this.props.onAnimationStart
140
+ }, /*#__PURE__*/React.createElement("div", null, this.renderTypeIcon()), /*#__PURE__*/React.createElement("div", {
141
+ className: `${prefixCls}-inner`
142
+ }, /*#__PURE__*/React.createElement("div", {
143
+ className: `${prefixCls}-content-wrapper`
144
+ }, title ? /*#__PURE__*/React.createElement("div", {
145
+ id: titleID,
146
+ className: `${prefixCls}-title`,
147
+ "x-semi-prop": "title"
148
+ }, title) : '', content ? /*#__PURE__*/React.createElement("div", {
149
+ className: `${prefixCls}-content`,
150
+ "x-semi-prop": "content"
151
+ }, content) : ''), showClose && /*#__PURE__*/React.createElement(Button, {
152
+ className: `${prefixCls}-icon-close`,
153
+ type: "tertiary",
154
+ icon: /*#__PURE__*/React.createElement(IconClose, null),
155
+ theme: "borderless",
156
+ size: "small",
157
+ onClick: this.close
158
+ })));
164
159
  }
165
160
  }
166
161
  Notice.contextType = ConfigContext;
@@ -52,6 +52,7 @@ function usePatchElement() {
52
52
  const pos = obj[0];
53
53
  const notices = obj[1];
54
54
  // @ts-ignore
55
+ // eslint-disable-next-line react/no-unknown-property
55
56
  return Array.isArray(notices) && notices.length ? /*#__PURE__*/React.createElement("div", {
56
57
  key: pos,
57
58
  className: cls(cssClasses.LIST),
@@ -69,7 +70,6 @@ export default function useNotification() {
69
70
  const mergeConfig = Object.assign(Object.assign({}, config), {
70
71
  id
71
72
  });
72
- // eslint-disable-next-line prefer-const
73
73
  let closeFunc;
74
74
  const ref = ele => {
75
75
  noticeRef.set(id, ele);
@@ -1,7 +1,6 @@
1
1
  import _get from "lodash/get";
2
2
  import _isFunction from "lodash/isFunction";
3
3
  import _isEqual from "lodash/isEqual";
4
- /* eslint-disable arrow-body-style */
5
4
  import React from 'react';
6
5
  import cls from 'classnames';
7
6
  import BaseComponent from '../_base/baseComponent';
@@ -40,6 +40,7 @@ export interface PaginationState {
40
40
  nextDisabled: boolean;
41
41
  restLeftPageList: number[];
42
42
  restRightPageList: number[];
43
+ allPageNumbers: number[];
43
44
  }
44
45
  export type PaginationLocale = Locale['Pagination'];
45
46
  export type PopoverPosition = Position;
@@ -98,6 +99,7 @@ export default class Pagination extends BaseComponent<PaginationProps, Paginatio
98
99
  renderQuickJump(locale: PaginationLocale): JSX.Element;
99
100
  renderPageList(): JSX.Element[];
100
101
  renderRestPageList(restList: ('...' | number)[]): JSX.Element;
102
+ renderSmallPageSelect(content: React.ReactNode): JSX.Element;
101
103
  renderSmallPage(locale: PaginationLocale): JSX.Element;
102
104
  renderDefaultPage(locale: PaginationLocale): JSX.Element;
103
105
  render(): JSX.Element;
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable max-len */
11
10
  /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
12
11
  import React from 'react';
13
12
  import classNames from 'classnames';
@@ -32,18 +31,25 @@ const {
32
31
  export default class Pagination extends BaseComponent {
33
32
  constructor(props) {
34
33
  super(props);
34
+ const total = props.total;
35
+ const pageSize = props.pageSize || props.pageSizeOpts[0] || numbers.DEFAULT_PAGE_SIZE; // Use pageSize first, use the first of pageSizeOpts when not, use the default value when none
36
+ const shouldFillAllNumber = props.size === 'small' && props.hoverShowPageSelect && !props.disabled;
35
37
  this.state = {
36
- total: props.total,
38
+ total,
37
39
  showTotal: props.showTotal,
38
40
  currentPage: props.currentPage || props.defaultCurrentPage,
39
- pageSize: props.pageSize || props.pageSizeOpts[0] || numbers.DEFAULT_PAGE_SIZE,
41
+ pageSize,
40
42
  pageList: [],
41
43
  prevDisabled: false,
42
44
  nextDisabled: false,
43
45
  restLeftPageList: [],
44
46
  restRightPageList: [],
45
- quickJumpPage: ''
47
+ quickJumpPage: '',
48
+ allPageNumbers: shouldFillAllNumber ? Array.from({
49
+ length: Math.ceil(total / pageSize)
50
+ }, (v, i) => i + 1) : [] // only need to count in smallPage mode, when props.size = small
46
51
  };
52
+
47
53
  this.foundation = new PaginationFoundation(this.adapter);
48
54
  this.renderDefaultPage = this.renderDefaultPage.bind(this);
49
55
  this.renderSmallPage = this.renderSmallPage.bind(this);
@@ -78,7 +84,9 @@ export default class Pagination extends BaseComponent {
78
84
  updateQuickJumpPage: quickJumpPage => this.setState({
79
85
  quickJumpPage
80
86
  }),
81
- // updateRestPageList: () => {},
87
+ updateAllPageNumbers: allPageNumbers => this.setState({
88
+ allPageNumbers
89
+ }),
82
90
  setCurrentPage: pageIndex => {
83
91
  this.setState({
84
92
  currentPage: pageIndex
@@ -114,6 +122,7 @@ export default class Pagination extends BaseComponent {
114
122
  pageSize: this.props.pageSize
115
123
  };
116
124
  let pagerHasChanged = false;
125
+ let allPageNumberNeedUpdate = false;
117
126
  if (prevProps.currentPage !== this.props.currentPage) {
118
127
  pagerHasChanged = true;
119
128
  // this.foundation.updatePage(this.props.currentPage);
@@ -121,13 +130,18 @@ export default class Pagination extends BaseComponent {
121
130
 
122
131
  if (prevProps.total !== this.props.total) {
123
132
  pagerHasChanged = true;
133
+ allPageNumberNeedUpdate = true;
124
134
  }
125
135
  if (prevProps.pageSize !== this.props.pageSize) {
126
136
  pagerHasChanged = true;
137
+ allPageNumberNeedUpdate = true;
127
138
  }
128
139
  if (pagerHasChanged) {
129
140
  this.foundation.updatePage(pagerProps.currentPage, pagerProps.total, pagerProps.pageSize);
130
141
  }
142
+ if (allPageNumberNeedUpdate) {
143
+ this.foundation.updateAllPageNumbers(pagerProps.total, pagerProps.pageSize);
144
+ }
131
145
  }
132
146
  renderPrevBtn() {
133
147
  const {
@@ -330,6 +344,13 @@ export default class Pagination extends BaseComponent {
330
344
  }, row)
331
345
  );
332
346
  }
347
+ renderSmallPageSelect(content) {
348
+ const allPageNumbers = this.state.allPageNumbers;
349
+ const pageList = this.renderRestPageList(allPageNumbers);
350
+ return /*#__PURE__*/React.createElement(Popover, {
351
+ content: pageList
352
+ }, content);
353
+ }
333
354
  renderSmallPage(locale) {
334
355
  const _a = this.props,
335
356
  {
@@ -353,24 +374,18 @@ export default class Pagination extends BaseComponent {
353
374
  if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
354
375
  return null;
355
376
  }
356
- const pageNumbers = Array.from({
357
- length: Math.ceil(total / pageSize)
358
- }, (v, i) => i + 1);
359
- const pageList = this.renderRestPageList(pageNumbers);
360
377
  const pageCls = classNames({
361
378
  [`${prefixCls}-item`]: true,
362
379
  [`${prefixCls}-item-small`]: true,
363
380
  [`${prefixCls}-item-all-disabled`]: disabled
364
381
  });
365
- const page = /*#__PURE__*/React.createElement("div", {
382
+ const content = /*#__PURE__*/React.createElement("div", {
366
383
  className: pageCls
367
384
  }, currentPage, "/", totalPageNum, " ");
368
385
  return /*#__PURE__*/React.createElement("div", Object.assign({
369
386
  className: paginationCls,
370
387
  style: style
371
- }, this.getDataAttr(rest)), this.renderPrevBtn(), hoverShowPageSelect && !disabled ? /*#__PURE__*/React.createElement(Popover, {
372
- content: pageList
373
- }, page) : page, this.renderNextBtn(), this.renderQuickJump(locale));
388
+ }, this.getDataAttr(rest)), this.renderPrevBtn(), hoverShowPageSelect && !disabled ? this.renderSmallPageSelect(content) : content, this.renderNextBtn(), this.renderQuickJump(locale));
374
389
  }
375
390
  renderDefaultPage(locale) {
376
391
  const {
@@ -10,7 +10,6 @@ var __rest = this && this.__rest || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- /* eslint-disable max-len */
14
13
  import React from 'react';
15
14
  import cls from 'classnames';
16
15
  import PropTypes from 'prop-types';
@@ -32,7 +32,6 @@ class Progress extends Component {
32
32
  }
33
33
  if (prevProps.percent !== this.props.percent) {
34
34
  if (!this.props.motion) {
35
- // eslint-disable-next-line
36
35
  this.setState({
37
36
  percentNumber: this.props.percent
38
37
  });
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable prefer-destructuring */
13
12
  import React from 'react';
14
13
  import PropTypes from 'prop-types';
15
14
  import cls from 'classnames';
@@ -172,7 +172,6 @@ export default class Rating extends BaseComponent {
172
172
  },
173
173
  getStarDOM: index => {
174
174
  const instance = this.stars && this.stars[index];
175
- // eslint-disable-next-line react/no-find-dom-node
176
175
  return ReactDOM.findDOMNode(instance);
177
176
  },
178
177
  notifyHoverChange: (hoverValue, clearedValue) => {
@@ -11,7 +11,6 @@ export default class ReactResizeObserver extends BaseComponent {
11
11
  // using findDOMNode for two reasons:
12
12
  // 1. cloning to insert a ref is unwieldy and not performant.
13
13
  // 2. ensure that we resolve to an actual DOM node (instead of any JSX ref instance).
14
- // eslint-disable-next-line
15
14
  return findDOMNode(this.childNode || this);
16
15
  } catch (error) {
17
16
  // swallow error if findDOMNode is run on unmounted component.
@@ -119,7 +119,6 @@ export default class ScrollItem extends BaseComponent {
119
119
  this.scrollToIndex = (selectedIndex, duration) => {
120
120
  // move to selected item
121
121
  duration = typeof duration === 'number' ? duration : numbers.DEFAULT_SCROLL_DURATION;
122
- // eslint-disable-next-line
123
122
  selectedIndex = selectedIndex == null ? this.props.selectedIndex : selectedIndex;
124
123
  // this.isWheelMode() && this.addClassToNode();
125
124
  this.scrollToNode(this.selectedNode, duration);
@@ -225,11 +224,9 @@ export default class ScrollItem extends BaseComponent {
225
224
  if (typeof transform === 'function') {
226
225
  text = transform(item.value, item.text);
227
226
  } else {
228
- // eslint-disable-next-line
229
227
  text = item.text == null ? item.value : item.text;
230
228
  }
231
229
  } else {
232
- // eslint-disable-next-line
233
230
  text = item.text == null ? item.value : item.text;
234
231
  }
235
232
  const events = {};
@@ -85,7 +85,6 @@ export type SelectProps = {
85
85
  autoClearSearchValue?: boolean;
86
86
  arrowIcon?: React.ReactNode;
87
87
  borderless?: boolean;
88
- showArrowInBorderless?: boolean;
89
88
  clearIcon?: React.ReactNode;
90
89
  defaultValue?: string | number | any[] | Record<string, any>;
91
90
  value?: string | number | any[] | Record<string, any>;
@@ -12,8 +12,6 @@ var __rest = this && this.__rest || function (s, e) {
12
12
  }
13
13
  return t;
14
14
  };
15
- /* eslint-disable max-len */
16
- /* eslint-disable max-lines-per-function */
17
15
  import React, { Fragment } from 'react';
18
16
  import ReactDOM from 'react-dom';
19
17
  import cls from 'classnames';
@@ -155,7 +153,6 @@ class Select extends BaseComponent {
155
153
  focusIndex
156
154
  });
157
155
  },
158
- // eslint-disable-next-line @typescript-eslint/no-empty-function
159
156
  scrollToFocusOption: () => {}
160
157
  };
161
158
  const filterAdapter = {
@@ -189,7 +186,6 @@ class Select extends BaseComponent {
189
186
  const clickOutsideHandler = e => {
190
187
  const optionInstance = this.optionsRef && this.optionsRef.current;
191
188
  const triggerDom = this.triggerRef && this.triggerRef.current;
192
- // eslint-disable-next-line react/no-find-dom-node
193
189
  const optionsDom = ReactDOM.findDOMNode(optionInstance);
194
190
  // let isInPanel = optionsDom && optionsDom.contains(e.target);
195
191
  // let isInTrigger = triggerDom && triggerDom.contains(e.target);
@@ -362,14 +358,12 @@ class Select extends BaseComponent {
362
358
  return this.state.isFocusInContainer;
363
359
  },
364
360
  updateScrollTop: index => {
365
- // eslint-disable-next-line max-len
366
361
  let optionClassName = `.${prefixcls}-option-selected`;
367
362
  if (index !== undefined) {
368
363
  optionClassName = `.${prefixcls}-option:nth-child(${index})`;
369
364
  }
370
365
  let destNode = document.querySelector(`#${prefixcls}-${this.selectOptionListID} ${optionClassName}`);
371
366
  if (Array.isArray(destNode)) {
372
- // eslint-disable-next-line prefer-destructuring
373
367
  destNode = destNode[0];
374
368
  }
375
369
  if (destNode) {
@@ -1047,10 +1041,9 @@ class Select extends BaseComponent {
1047
1041
  triggerRender,
1048
1042
  arrowIcon,
1049
1043
  clearIcon,
1050
- borderless,
1051
- showArrowInBorderless
1044
+ borderless
1052
1045
  } = _a,
1053
- rest = __rest(_a, ["disabled", "multiple", "filter", "style", "id", "size", "className", "validateStatus", "showArrow", "suffix", "prefix", "insetLabel", "placeholder", "triggerRender", "arrowIcon", "clearIcon", "borderless", "showArrowInBorderless"]);
1046
+ rest = __rest(_a, ["disabled", "multiple", "filter", "style", "id", "size", "className", "validateStatus", "showArrow", "suffix", "prefix", "insetLabel", "placeholder", "triggerRender", "arrowIcon", "clearIcon", "borderless"]);
1054
1047
  const {
1055
1048
  selections,
1056
1049
  isOpen,
@@ -1065,7 +1058,6 @@ class Select extends BaseComponent {
1065
1058
  const filterable = Boolean(filter); // filter(boolean || function)
1066
1059
  const selectionCls = useCustomTrigger ? cls(className) : cls(prefixcls, className, {
1067
1060
  [`${prefixcls}-borderless`]: borderless,
1068
- [`${prefixcls}-borderless-arrow`]: showArrowInBorderless,
1069
1061
  [`${prefixcls}-open`]: isOpen,
1070
1062
  [`${prefixcls}-focus`]: isFocus,
1071
1063
  [`${prefixcls}-disabled`]: disabled,
@@ -1332,8 +1324,7 @@ Select.defaultProps = {
1332
1324
  showRestTagsPopover: false,
1333
1325
  restTagsPopoverProps: {},
1334
1326
  expandRestTagsOnClick: false,
1335
- ellipsisTrigger: false,
1336
- showArrowInBorderless: false
1327
+ ellipsisTrigger: false
1337
1328
  // Radio selection is different from the default renderSelectedItem for multiple selection, so it is not declared here
1338
1329
  // renderSelectedItem: (optionNode) => optionNode.label,
1339
1330
  // The default creator rendering is related to i18, so it is not declared here
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable max-len */
11
10
  import React, { PureComponent } from 'react';
12
11
  import classNames from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -34,7 +34,6 @@ const getOptionsFromGroup = selectChildren => {
34
34
  _show: false
35
35
  };
36
36
  // avoid null
37
- // eslint-disable-next-line max-len
38
37
  let childNodes = React.Children.toArray(selectChildren);
39
38
  childNodes = childNodes.filter(childNode => childNode && childNode.props);
40
39
  let type = '';
@@ -49,7 +48,6 @@ const getOptionsFromGroup = selectChildren => {
49
48
  } else if (child.type.isSelectOptionGroup) {
50
49
  type = 'group';
51
50
  // Avoid saving children (reactNode) by... removing other props from the group except children, causing performance problems
52
- // eslint-disable-next-line prefer-const
53
51
  let _a = child.props,
54
52
  {
55
53
  children
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable no-nested-ternary */
11
10
  import React from 'react';
12
11
  import BaseComponent from '../_base/baseComponent';
13
12
  import PropTypes from 'prop-types';
@@ -8,8 +8,6 @@ var __rest = this && this.__rest || function (s, e) {
8
8
  }
9
9
  return t;
10
10
  };
11
- /* eslint-disable max-lines-per-function */
12
- /* eslint-disable react/no-find-dom-node */
13
11
  import React from 'react';
14
12
  import ReactDOM from 'react-dom';
15
13
  import PropTypes from 'prop-types';
@@ -330,7 +328,6 @@ export default class Slider extends BaseComponent {
330
328
  value = this.props.defaultValue;
331
329
  }
332
330
  this.state = {
333
- // eslint-disable-next-line no-nested-ternary
334
331
  currentValue: value ? value : this.props.range ? [0, 0] : 0,
335
332
  min: this.props.min || 0,
336
333
  max: this.props.max || 0,
@@ -6,7 +6,6 @@ var __rest = this && this.__rest || function (s, e) {
6
6
  }
7
7
  return t;
8
8
  };
9
- /* eslint-disable no-unused-vars */
10
9
  import React from 'react';
11
10
  import isNullOrUndefined from '@douyinfe/semi-foundation/lib/es/utils/isNullOrUndefined';
12
11
  let _id = -1;
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable max-len */
11
10
  import React from 'react';
12
11
  import cls from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -13,8 +13,6 @@ var __rest = this && this.__rest || function (s, e) {
13
13
  }
14
14
  return t;
15
15
  };
16
- /* eslint-disable max-len */
17
- /* eslint-disable eqeqeq */
18
16
  import React, { createRef } from 'react';
19
17
  import classnames from 'classnames';
20
18
  import PropTypes from 'prop-types';
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable max-len */
13
12
  import React, { PureComponent, isValidElement } from 'react';
14
13
  import PropTypes from 'prop-types';
15
14
  import classnames from 'classnames';
@@ -53,7 +52,6 @@ export default class TableExpandedRow extends PureComponent {
53
52
  } else if ( /*#__PURE__*/isValidElement(cell)) {
54
53
  children = cell;
55
54
  } else if (cell && Object.prototype.toString.call(cell) === '[object Object]') {
56
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
57
55
  const _a = cell,
58
56
  {
59
57
  children: cellChildren,
@@ -8,9 +8,6 @@ var __rest = this && this.__rest || function (s, e) {
8
8
  }
9
9
  return t;
10
10
  };
11
- /* eslint-disable max-len */
12
- /* eslint-disable @typescript-eslint/ban-types */
13
- /* eslint-disable eqeqeq */
14
11
  import React, { PureComponent, isValidElement } from 'react';
15
12
  import PropTypes from 'prop-types';
16
13
  import classnames from 'classnames';
@@ -14,9 +14,6 @@ var __rest = this && this.__rest || function (s, e) {
14
14
  }
15
15
  return t;
16
16
  };
17
- /* eslint-disable eqeqeq */
18
- /* eslint-disable @typescript-eslint/member-ordering */
19
- /* eslint-disable max-len */
20
17
  import React from 'react';
21
18
  import PropTypes from 'prop-types';
22
19
  import classnames from 'classnames';
@@ -130,7 +127,6 @@ class Body extends BaseComponent {
130
127
  flattenedColumns
131
128
  } = this.context;
132
129
  const virtualizedItem = _get(virtualizedData, [index], {});
133
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
134
130
  const {
135
131
  key,
136
132
  parentKeys,
@@ -149,7 +145,6 @@ class Body extends BaseComponent {
149
145
  index,
150
146
  expandBtnShouldInRow
151
147
  });
152
- // eslint-disable-next-line no-nested-ternary
153
148
  return sectionRow ? this.renderSectionRow(props) : expandedRow ? this.renderExpandedRow(props) : this.renderBaseRow(props);
154
149
  };
155
150
  // virtualized List innerElementType
@@ -174,14 +169,12 @@ class Body extends BaseComponent {
174
169
  children
175
170
  } = props,
176
171
  rest = __rest(props, ["children"]);
177
- // eslint-disable-next-line react/no-this-in-sfc
178
172
  const {
179
173
  handleWheel,
180
174
  prefixCls,
181
175
  emptySlot,
182
176
  dataSource
183
177
  } = this.props;
184
- // eslint-disable-next-line react/no-this-in-sfc
185
178
  const tableWidth = this.getVirtualizedRowWidth();
186
179
  const tableCls = classnames(`${prefixCls}`, `${prefixCls}-fixed`);
187
180
  return /*#__PURE__*/React.createElement("div", Object.assign({}, rest, {
@@ -195,7 +188,6 @@ class Body extends BaseComponent {
195
188
  }
196
189
  },
197
190
  onScroll: function () {
198
- // eslint-disable-next-line react/no-this-in-sfc
199
191
  _this.handleVirtualizedBodyScroll(...arguments);
200
192
  if (rest.onScroll) {
201
193
  rest.onScroll(...arguments);
@@ -13,7 +13,6 @@ export default class ColGroup extends React.PureComponent {
13
13
  prefixCls,
14
14
  components
15
15
  } = this.props;
16
- // eslint-disable-next-line @typescript-eslint/no-shadow
17
16
  const ColGroup = _get(components, 'colgroup.wrapper', 'colgroup');
18
17
  const Col = _get(components, 'colgroup.col', 'col');
19
18
  const cols = flattenColumns(columns).map((column, idx) => {
@@ -1,6 +1,4 @@
1
1
  import _noop from "lodash/noop";
2
- /* eslint-disable no-nested-ternary */
3
- /* eslint-disable eqeqeq */
4
2
  import React, { isValidElement } from 'react';
5
3
  import cls from 'classnames';
6
4
  import { IconFilter } from '@douyinfe/semi-icons';
@@ -1,5 +1,4 @@
1
1
  import _noop from "lodash/noop";
2
- /* eslint-disable max-len */
3
2
  import React from 'react';
4
3
  import BaseComponent from '../_base/baseComponent';
5
4
  import classnames from 'classnames';
@@ -1,6 +1,5 @@
1
1
  import _noop from "lodash/noop";
2
2
  import _get from "lodash/get";
3
- /* eslint-disable max-len */
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
6
5
  import classnames from 'classnames';
@@ -10,11 +10,7 @@ var __rest = this && this.__rest || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- /* eslint-disable max-len */
14
- /* eslint-disable @typescript-eslint/no-shadow */
15
13
  /* eslint-disable react-hooks/exhaustive-deps */
16
- /* eslint-disable react/destructuring-assignment */
17
- /* eslint-disable max-lines-per-function */
18
14
  import React, { useState, useEffect, useMemo } from 'react';
19
15
  import { addClass, removeClass } from '@douyinfe/semi-foundation/lib/es/utils/classnames';
20
16
  import { strings, numbers } from '@douyinfe/semi-foundation/lib/es/table/constants';
@@ -20,15 +20,7 @@ var __rest = this && this.__rest || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- /* eslint-disable no-nested-ternary */
24
- /* eslint-disable prefer-const */
25
- /* eslint-disable prefer-destructuring */
26
- /* eslint-disable no-shadow */
27
- /* eslint-disable no-param-reassign */
28
- /* eslint-disable max-len */
29
23
  /* eslint-disable react/no-did-update-set-state */
30
- /* eslint-disable eqeqeq */
31
- /* eslint-disable max-lines-per-function */
32
24
  import React, { createRef, isValidElement } from 'react';
33
25
  import PropTypes from 'prop-types';
34
26
  import classnames from 'classnames';
@@ -861,7 +853,6 @@ class Table extends BaseComponent {
861
853
  } = this.props;
862
854
  const childrenColumnName = 'children';
863
855
  let columns = cloneDeep(cachedColumns);
864
- // eslint-disable-next-line @typescript-eslint/no-shadow
865
856
  const addFns = function () {
866
857
  let columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
867
858
  if (Array.isArray(columns) && columns.length) {
@@ -1138,7 +1129,6 @@ class Table extends BaseComponent {
1138
1129
  }
1139
1130
  if (Object.keys(states).length) {
1140
1131
  const {
1141
- // eslint-disable-next-line @typescript-eslint/no-shadow
1142
1132
  pagination: mergedStatePagination = null,
1143
1133
  queries: stateQueries = null,
1144
1134
  dataSource: stateDataSource = null
@@ -4,8 +4,6 @@ import _omit from "lodash/omit";
4
4
  import _set from "lodash/set";
5
5
  import _noop from "lodash/noop";
6
6
  import _get from "lodash/get";
7
- /* eslint-disable prefer-destructuring */
8
- /* eslint-disable eqeqeq */
9
7
  import React, { createRef, Fragment } from 'react';
10
8
  import classnames from 'classnames';
11
9
  import PropTypes from 'prop-types';
@@ -189,7 +187,6 @@ export default class TableCell extends BaseComponent {
189
187
  }
190
188
  text = render(text, record, index, renderOptions);
191
189
  if (isInvalidRenderCellText(text)) {
192
- // eslint-disable-next-line no-param-reassign
193
190
  tdProps = text.props ? _merge(tdProps, text.props) : tdProps;
194
191
  colSpan = tdProps.colSpan;
195
192
  rowSpan = tdProps.rowSpan;