@douyinfe/semi-ui 2.39.0 → 2.39.1

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 (207) hide show
  1. package/dist/umd/semi-ui.js +88 -419
  2. package/dist/umd/semi-ui.js.map +1 -1
  3. package/dist/umd/semi-ui.min.js +1 -1
  4. package/dist/umd/semi-ui.min.js.map +1 -1
  5. package/lib/cjs/_utils/index.js +0 -3
  6. package/lib/cjs/autoComplete/index.js +0 -2
  7. package/lib/cjs/autoComplete/option.js +0 -2
  8. package/lib/cjs/avatar/avatarGroup.js +0 -1
  9. package/lib/cjs/avatar/index.js +0 -1
  10. package/lib/cjs/backtop/index.js +0 -1
  11. package/lib/cjs/badge/index.js +0 -1
  12. package/lib/cjs/banner/index.js +0 -3
  13. package/lib/cjs/breadcrumb/index.js +0 -3
  14. package/lib/cjs/button/Button.js +8 -14
  15. package/lib/cjs/calendar/dayCalendar.js +4 -9
  16. package/lib/cjs/calendar/dayCol.js +1 -1
  17. package/lib/cjs/calendar/monthCalendar.js +5 -12
  18. package/lib/cjs/calendar/rangeCalendar.js +0 -2
  19. package/lib/cjs/carousel/index.js +0 -2
  20. package/lib/cjs/checkbox/checkbox.js +0 -2
  21. package/lib/cjs/checkbox/checkboxGroup.js +0 -3
  22. package/lib/cjs/checkbox/checkboxInner.js +0 -2
  23. package/lib/cjs/collapse/index.js +0 -1
  24. package/lib/cjs/datePicker/dateInput.js +0 -3
  25. package/lib/cjs/datePicker/datePicker.js +1 -3
  26. package/lib/cjs/datePicker/month.js +0 -4
  27. package/lib/cjs/datePicker/monthsGrid.js +1 -5
  28. package/lib/cjs/datePicker/yearAndMonth.js +0 -2
  29. package/lib/cjs/form/arrayField.js +0 -2
  30. package/lib/cjs/form/baseForm.js +0 -2
  31. package/lib/cjs/form/context.js +0 -2
  32. package/lib/cjs/form/errorMessage.js +0 -2
  33. package/lib/cjs/form/field.js +0 -2
  34. package/lib/cjs/form/group.js +0 -2
  35. package/lib/cjs/form/hoc/withField.js +2 -6
  36. package/lib/cjs/form/interface.js +0 -3
  37. package/lib/cjs/form/section.js +0 -2
  38. package/lib/cjs/form/slot.js +0 -3
  39. package/lib/cjs/iconButton/index.js +0 -2
  40. package/lib/cjs/image/image.js +25 -32
  41. package/lib/cjs/image/interface.d.ts +2 -1
  42. package/lib/cjs/image/previewInner.d.ts +2 -2
  43. package/lib/cjs/image/previewInner.js +0 -2
  44. package/lib/cjs/input/index.js +0 -2
  45. package/lib/cjs/input/inputGroup.js +0 -3
  46. package/lib/cjs/input/textarea.js +0 -2
  47. package/lib/cjs/inputNumber/index.js +1 -5
  48. package/lib/cjs/modal/ConfirmModal.js +0 -2
  49. package/lib/cjs/modal/Modal.js +0 -2
  50. package/lib/cjs/modal/ModalContent.js +0 -5
  51. package/lib/cjs/modal/confirm.js +0 -1
  52. package/lib/cjs/modal/useModal/HookModal.js +0 -1
  53. package/lib/cjs/modal/useModal/index.js +0 -2
  54. package/lib/cjs/navigation/Item.js +0 -3
  55. package/lib/cjs/navigation/SubNav.js +0 -3
  56. package/lib/cjs/navigation/index.js +0 -2
  57. package/lib/cjs/notification/notice.js +29 -35
  58. package/lib/cjs/notification/useNotification/index.js +1 -1
  59. package/lib/cjs/overflowList/index.js +0 -2
  60. package/lib/cjs/pagination/index.js +1 -1
  61. package/lib/cjs/popconfirm/index.js +0 -2
  62. package/lib/cjs/progress/index.js +0 -1
  63. package/lib/cjs/radio/radio.js +0 -2
  64. package/lib/cjs/rating/index.js +0 -1
  65. package/lib/cjs/resizeObserver/index.js +0 -1
  66. package/lib/cjs/scrollList/scrollItem.js +0 -3
  67. package/lib/cjs/select/index.js +0 -6
  68. package/lib/cjs/select/option.js +0 -2
  69. package/lib/cjs/select/utils.js +0 -2
  70. package/lib/cjs/sideSheet/index.js +0 -2
  71. package/lib/cjs/slider/index.js +0 -3
  72. package/lib/cjs/spin/icon.js +0 -2
  73. package/lib/cjs/switch/index.js +0 -2
  74. package/lib/cjs/table/Body/BaseRow.js +0 -2
  75. package/lib/cjs/table/Body/ExpandedRow.js +0 -3
  76. package/lib/cjs/table/Body/SectionRow.js +0 -3
  77. package/lib/cjs/table/Body/index.js +0 -8
  78. package/lib/cjs/table/ColGroup.js +0 -1
  79. package/lib/cjs/table/ColumnFilter.js +0 -3
  80. package/lib/cjs/table/ColumnSelection.js +0 -2
  81. package/lib/cjs/table/HeadTable.js +0 -2
  82. package/lib/cjs/table/ResizableTable.js +1 -4
  83. package/lib/cjs/table/Table.js +1 -10
  84. package/lib/cjs/table/TableCell.js +0 -4
  85. package/lib/cjs/table/TableHeader.js +0 -4
  86. package/lib/cjs/table/TableHeaderRow.js +0 -2
  87. package/lib/cjs/table/TablePagination.js +0 -2
  88. package/lib/cjs/table/table-context.js +0 -2
  89. package/lib/cjs/tabs/TabBar.js +0 -2
  90. package/lib/cjs/tag/index.js +1 -3
  91. package/lib/cjs/tagInput/index.js +0 -2
  92. package/lib/cjs/timePicker/Combobox.js +0 -4
  93. package/lib/cjs/timePicker/TimeInput.js +0 -2
  94. package/lib/cjs/timePicker/TimePicker.js +0 -2
  95. package/lib/cjs/toast/index.js +0 -2
  96. package/lib/cjs/toast/toast.js +0 -2
  97. package/lib/cjs/toast/useToast/index.js +0 -1
  98. package/lib/cjs/tooltip/index.js +0 -6
  99. package/lib/cjs/transfer/index.js +0 -3
  100. package/lib/cjs/tree/index.js +0 -3
  101. package/lib/cjs/tree/treeNode.js +0 -3
  102. package/lib/cjs/treeSelect/index.js +0 -7
  103. package/lib/cjs/trigger/index.js +0 -2
  104. package/lib/cjs/typography/util.js +1 -3
  105. package/lib/cjs/upload/index.js +0 -2
  106. package/lib/es/_utils/index.js +0 -2
  107. package/lib/es/autoComplete/index.js +0 -1
  108. package/lib/es/autoComplete/option.js +0 -1
  109. package/lib/es/avatar/avatarGroup.js +0 -1
  110. package/lib/es/avatar/index.js +0 -1
  111. package/lib/es/backtop/index.js +0 -1
  112. package/lib/es/badge/index.js +0 -1
  113. package/lib/es/banner/index.js +0 -2
  114. package/lib/es/breadcrumb/index.js +0 -2
  115. package/lib/es/button/Button.js +8 -13
  116. package/lib/es/calendar/dayCalendar.js +4 -9
  117. package/lib/es/calendar/dayCol.js +1 -1
  118. package/lib/es/calendar/monthCalendar.js +5 -11
  119. package/lib/es/calendar/rangeCalendar.js +0 -1
  120. package/lib/es/carousel/index.js +0 -1
  121. package/lib/es/checkbox/checkbox.js +0 -1
  122. package/lib/es/checkbox/checkboxGroup.js +0 -2
  123. package/lib/es/checkbox/checkboxInner.js +0 -1
  124. package/lib/es/collapse/index.js +0 -1
  125. package/lib/es/datePicker/dateInput.js +0 -3
  126. package/lib/es/datePicker/datePicker.js +0 -3
  127. package/lib/es/datePicker/month.js +0 -4
  128. package/lib/es/datePicker/monthsGrid.js +1 -5
  129. package/lib/es/datePicker/yearAndMonth.js +0 -1
  130. package/lib/es/form/arrayField.js +0 -1
  131. package/lib/es/form/baseForm.js +0 -1
  132. package/lib/es/form/context.js +0 -1
  133. package/lib/es/form/errorMessage.js +0 -1
  134. package/lib/es/form/field.js +0 -1
  135. package/lib/es/form/group.js +0 -1
  136. package/lib/es/form/hoc/withField.js +2 -6
  137. package/lib/es/form/interface.js +0 -2
  138. package/lib/es/form/section.js +0 -1
  139. package/lib/es/form/slot.js +0 -2
  140. package/lib/es/iconButton/index.js +0 -1
  141. package/lib/es/image/image.js +25 -32
  142. package/lib/es/image/interface.d.ts +2 -1
  143. package/lib/es/image/previewInner.d.ts +2 -2
  144. package/lib/es/image/previewInner.js +0 -1
  145. package/lib/es/input/index.js +0 -1
  146. package/lib/es/input/inputGroup.js +0 -2
  147. package/lib/es/input/textarea.js +0 -1
  148. package/lib/es/inputNumber/index.js +0 -5
  149. package/lib/es/modal/ConfirmModal.js +0 -2
  150. package/lib/es/modal/Modal.js +0 -1
  151. package/lib/es/modal/ModalContent.js +0 -3
  152. package/lib/es/modal/confirm.js +0 -1
  153. package/lib/es/modal/useModal/HookModal.js +0 -1
  154. package/lib/es/modal/useModal/index.js +0 -2
  155. package/lib/es/navigation/Item.js +0 -2
  156. package/lib/es/navigation/SubNav.js +0 -2
  157. package/lib/es/navigation/index.js +0 -1
  158. package/lib/es/notification/notice.js +29 -34
  159. package/lib/es/notification/useNotification/index.js +1 -1
  160. package/lib/es/overflowList/index.js +0 -1
  161. package/lib/es/pagination/index.js +0 -1
  162. package/lib/es/popconfirm/index.js +0 -1
  163. package/lib/es/progress/index.js +0 -1
  164. package/lib/es/radio/radio.js +0 -1
  165. package/lib/es/rating/index.js +0 -1
  166. package/lib/es/resizeObserver/index.js +0 -1
  167. package/lib/es/scrollList/scrollItem.js +0 -3
  168. package/lib/es/select/index.js +0 -6
  169. package/lib/es/select/option.js +0 -1
  170. package/lib/es/select/utils.js +0 -2
  171. package/lib/es/sideSheet/index.js +0 -1
  172. package/lib/es/slider/index.js +0 -3
  173. package/lib/es/spin/icon.js +0 -1
  174. package/lib/es/switch/index.js +0 -1
  175. package/lib/es/table/Body/BaseRow.js +0 -2
  176. package/lib/es/table/Body/ExpandedRow.js +0 -2
  177. package/lib/es/table/Body/SectionRow.js +0 -3
  178. package/lib/es/table/Body/index.js +0 -8
  179. package/lib/es/table/ColGroup.js +0 -1
  180. package/lib/es/table/ColumnFilter.js +0 -2
  181. package/lib/es/table/ColumnSelection.js +0 -1
  182. package/lib/es/table/HeadTable.js +0 -1
  183. package/lib/es/table/ResizableTable.js +0 -4
  184. package/lib/es/table/Table.js +0 -10
  185. package/lib/es/table/TableCell.js +0 -3
  186. package/lib/es/table/TableHeader.js +0 -3
  187. package/lib/es/table/TableHeaderRow.js +0 -1
  188. package/lib/es/table/TablePagination.js +0 -1
  189. package/lib/es/table/table-context.js +0 -1
  190. package/lib/es/tabs/TabBar.js +0 -2
  191. package/lib/es/tag/index.js +1 -2
  192. package/lib/es/tagInput/index.js +0 -2
  193. package/lib/es/timePicker/Combobox.js +0 -3
  194. package/lib/es/timePicker/TimeInput.js +0 -1
  195. package/lib/es/timePicker/TimePicker.js +0 -1
  196. package/lib/es/toast/index.js +0 -1
  197. package/lib/es/toast/toast.js +0 -1
  198. package/lib/es/toast/useToast/index.js +0 -1
  199. package/lib/es/tooltip/index.js +0 -5
  200. package/lib/es/transfer/index.js +0 -3
  201. package/lib/es/tree/index.js +0 -2
  202. package/lib/es/tree/treeNode.js +0 -3
  203. package/lib/es/treeSelect/index.js +0 -7
  204. package/lib/es/trigger/index.js +0 -2
  205. package/lib/es/typography/util.js +1 -3
  206. package/lib/es/upload/index.js +0 -1
  207. package/package.json +8 -8
@@ -52,15 +52,8 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
52
52
  }
53
53
  return t;
54
54
  };
55
- /* eslint-disable no-nested-ternary */
56
- /* eslint-disable prefer-const */
57
- /* eslint-disable prefer-destructuring */
58
- /* eslint-disable no-shadow */
59
- /* eslint-disable no-param-reassign */
60
- /* eslint-disable max-len */
61
55
  /* eslint-disable react/no-did-update-set-state */
62
- /* eslint-disable eqeqeq */
63
- /* eslint-disable max-lines-per-function */
56
+
64
57
  class Table extends _baseComponent.default {
65
58
  get adapter() {
66
59
  var _this = this;
@@ -870,7 +863,6 @@ class Table extends _baseComponent.default {
870
863
  } = this.props;
871
864
  const childrenColumnName = 'children';
872
865
  let columns = (0, _utils2.cloneDeep)(cachedColumns);
873
- // eslint-disable-next-line @typescript-eslint/no-shadow
874
866
  const addFns = function () {
875
867
  let columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
876
868
  if (Array.isArray(columns) && columns.length) {
@@ -1147,7 +1139,6 @@ class Table extends _baseComponent.default {
1147
1139
  }
1148
1140
  if (Object.keys(states).length) {
1149
1141
  const {
1150
- // eslint-disable-next-line @typescript-eslint/no-shadow
1151
1142
  pagination: mergedStatePagination = null,
1152
1143
  queries: stateQueries = null,
1153
1144
  dataSource: stateDataSource = null
@@ -22,9 +22,6 @@ var _utils2 = require("./utils");
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
- /* eslint-disable prefer-destructuring */
26
- /* eslint-disable eqeqeq */
27
-
28
25
  function isInvalidRenderCellText(text) {
29
26
  return text && ! /*#__PURE__*/_react.default.isValidElement(text) && Object.prototype.toString.call(text) === '[object Object]';
30
27
  }
@@ -199,7 +196,6 @@ class TableCell extends _baseComponent.default {
199
196
  }
200
197
  text = render(text, record, index, renderOptions);
201
198
  if (isInvalidRenderCellText(text)) {
202
- // eslint-disable-next-line no-param-reassign
203
199
  tdProps = text.props ? (0, _merge2.default)(tdProps, text.props) : tdProps;
204
200
  colSpan = tdProps.colSpan;
205
201
  rowSpan = tdProps.rowSpan;
@@ -13,11 +13,8 @@ var _constants = require("@douyinfe/semi-foundation/lib/cjs/table/constants");
13
13
  var _utils = require("@douyinfe/semi-foundation/lib/cjs/table/utils");
14
14
  var _TableHeaderRow = _interopRequireDefault(require("./TableHeaderRow"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- /* eslint-disable max-len */
17
-
18
16
  function parseHeaderRows(columns) {
19
17
  const rows = [];
20
- // eslint-disable-next-line @typescript-eslint/no-shadow
21
18
  function fillRowCells(columns, colIndex) {
22
19
  let parents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
23
20
  let rowIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
@@ -85,7 +82,6 @@ function parseHeaderRows(columns) {
85
82
  for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
86
83
  rows[rowIndex].forEach(cell => {
87
84
  if (!('rowSpan' in cell) && !cell.hasSubColumns) {
88
- // eslint-disable-next-line no-param-reassign
89
85
  cell.rowSpan = rowCount - rowIndex;
90
86
  }
91
87
  });
@@ -26,8 +26,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
26
26
  }
27
27
  return t;
28
28
  };
29
- /* eslint-disable eqeqeq */
30
-
31
29
  class TableHeaderRow extends _baseComponent.default {
32
30
  get adapter() {
33
31
  return Object.assign({}, super.adapter);
@@ -13,8 +13,6 @@ var _pagination = _interopRequireDefault(require("../pagination"));
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- /* eslint-disable max-len */
17
-
18
16
  class TablePagination extends _react.PureComponent {
19
17
  render() {
20
18
  const {
@@ -7,8 +7,6 @@ exports.default = void 0;
7
7
  var _noop2 = _interopRequireDefault(require("lodash/noop"));
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- /* eslint-disable max-len */
11
-
12
10
  const TableContext = /*#__PURE__*/_react.default.createContext({
13
11
  headWidths: [],
14
12
  setHeadWidths: _noop2.default,
@@ -33,7 +33,6 @@ class TabBar extends _react.default.Component {
33
33
  this.props.onTabClick(itemKey, e);
34
34
  if (this.props.collapsible) {
35
35
  const key = this._getItemKey(itemKey);
36
- // eslint-disable-next-line max-len
37
36
  const tabItem = document.querySelector(`[data-uuid="${this.state.uuid}"] .${_constants.cssClasses.TABS_TAB}[data-scrollkey="${key}"]`);
38
37
  tabItem.scrollIntoView({
39
38
  behavior: 'smooth',
@@ -72,7 +71,6 @@ class TabBar extends _react.default.Component {
72
71
  return;
73
72
  }
74
73
  const key = this._getItemKey(lastItem.itemKey);
75
- // eslint-disable-next-line max-len
76
74
  const tabItem = document.querySelector(`[data-uuid="${this.state.uuid}"] .${_constants.cssClasses.TABS_TAB}[data-scrollkey="${key}"]`);
77
75
  tabItem.scrollIntoView({
78
76
  behavior: 'smooth',
@@ -37,8 +37,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
37
37
  }
38
38
  return t;
39
39
  };
40
- /* eslint-disable jsx-a11y/no-static-element-interactions */
41
-
42
40
  const prefixCls = _constants.cssClasses.PREFIX;
43
41
  const tagColors = _constants.strings.TAG_COLOR;
44
42
  const tagSize = _constants.strings.TAG_SIZE;
@@ -165,7 +163,7 @@ class Tag extends _react.Component {
165
163
  const wrapProps = clickable ? Object.assign(Object.assign({}, baseProps), a11yProps) : baseProps;
166
164
  const closeIcon = closable ?
167
165
  /*#__PURE__*/
168
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events
166
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
169
167
  _react.default.createElement("div", {
170
168
  className: `${prefixCls}-close`,
171
169
  onClick: e => this.close(e, children, tagKey)
@@ -333,7 +333,6 @@ class TagInput extends _baseComponent.default {
333
333
  const prefixWrapperCls = (0, _classnames.default)(`${prefixCls}-prefix`, {
334
334
  [`${prefixCls}-inset-label`]: insetLabel,
335
335
  [`${prefixCls}-prefix-text`]: labelNode && (0, _isString2.default)(labelNode),
336
- // eslint-disable-next-line max-len
337
336
  [`${prefixCls}-prefix-icon`]: (0, _utils.isSemiIcon)(labelNode)
338
337
  });
339
338
  return (
@@ -357,7 +356,6 @@ class TagInput extends _baseComponent.default {
357
356
  }
358
357
  const suffixWrapperCls = (0, _classnames.default)(`${prefixCls}-suffix`, {
359
358
  [`${prefixCls}-suffix-text`]: suffix && (0, _isString2.default)(suffix),
360
- // eslint-disable-next-line max-len
361
359
  [`${prefixCls}-suffix-icon`]: (0, _utils.isSemiIcon)(suffix)
362
360
  });
363
361
  return (
@@ -17,9 +17,6 @@ var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer")
17
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- /* eslint-disable max-len */
21
- /* eslint-disable react/no-did-update-set-state */
22
-
23
20
  class Combobox extends _baseComponent.default {
24
21
  constructor(props) {
25
22
  super(props);
@@ -43,7 +40,6 @@ class Combobox extends _baseComponent.default {
43
40
  value,
44
41
  disabled
45
42
  } = _ref;
46
- // eslint-disable-next-line prefer-const
47
43
  let {
48
44
  onChange,
49
45
  use12Hours,
@@ -22,8 +22,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
22
22
  }
23
23
  return t;
24
24
  };
25
- /* eslint-disable no-unused-vars */
26
-
27
25
  class TimeInput extends _baseComponent.default {
28
26
  constructor(props) {
29
27
  super(props);
@@ -31,8 +31,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
31
31
  }
32
32
  return t;
33
33
  };
34
- /* eslint-disable no-unused-vars */
35
-
36
34
  class TimePicker extends _baseComponent.default {
37
35
  constructor(props) {
38
36
  var _this;
@@ -17,8 +17,6 @@ var _useToast = _interopRequireDefault(require("./useToast"));
17
17
  var _cssAnimation = _interopRequireDefault(require("../_cssAnimation"));
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- /* eslint-disable no-param-reassign */
21
-
22
20
  const createBaseToast = () => {
23
21
  var _a;
24
22
  return _a = class ToastList extends _baseComponent.default {
@@ -16,8 +16,6 @@ var _index = _interopRequireDefault(require("../iconButton/index"));
16
16
  var _semiIcons = require("@douyinfe/semi-icons");
17
17
  var _utils = require("../_utils");
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
- /* eslint-disable max-len */
20
-
21
19
  const prefixCls = _constants.cssClasses.PREFIX;
22
20
  class Toast extends _baseComponent.default {
23
21
  constructor(props) {
@@ -44,7 +44,6 @@ function useToast() {
44
44
  const mergeConfig = Object.assign(Object.assign({}, config), {
45
45
  id
46
46
  });
47
- // eslint-disable-next-line prefer-const
48
47
  let closeFunc;
49
48
  const toast = /*#__PURE__*/_react.default.createElement(_HookToast.default, Object.assign({}, mergeConfig, {
50
49
  key: id,
@@ -44,8 +44,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
44
44
  }
45
45
  return t;
46
46
  };
47
- /* eslint-disable prefer-destructuring, max-lines-per-function, react/no-find-dom-node, max-len, @typescript-eslint/no-empty-function */
48
-
49
47
  const prefix = _constants2.cssClasses.PREFIX;
50
48
  const positionSet = _constants2.strings.POSITION_SET;
51
49
  const triggerSet = _constants2.strings.TRIGGER_SET;
@@ -302,12 +300,10 @@ class Tooltip extends _baseComponent.default {
302
300
  get adapter() {
303
301
  var _this = this;
304
302
  return Object.assign(Object.assign({}, super.adapter), {
305
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
306
303
  // @ts-ignore
307
304
  on: function () {
308
305
  return _this.eventManager.on(...arguments);
309
306
  },
310
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
311
307
  // @ts-ignore
312
308
  off: function () {
313
309
  return _this.eventManager.off(...arguments);
@@ -355,7 +351,6 @@ class Tooltip extends _baseComponent.default {
355
351
  });
356
352
  },
357
353
  getTriggerBounding: () => {
358
- // eslint-disable-next-line
359
354
  // It may be a React component or an html element
360
355
  // There is no guarantee that triggerE l.current can get the real dom, so call findDOMNode to ensure that you can get the real dom
361
356
  const triggerDOM = this.adapter.getTriggerNode();
@@ -609,7 +604,6 @@ class Tooltip extends _baseComponent.default {
609
604
  this.isWrapped = true;
610
605
  }
611
606
  }
612
- // eslint-disable-next-line prefer-const
613
607
  let ariaAttribute = {};
614
608
  // Take effect when used by Popover component
615
609
  if (role === 'dialog') {
@@ -53,7 +53,6 @@ const SortableList = (0, _reactSortableHoc.SortableContainer)(_ref => {
53
53
  index: index,
54
54
  item: item
55
55
  })))
56
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
57
56
  // @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
58
57
  ;
59
58
  }, {
@@ -76,12 +75,10 @@ class Transfer extends _baseComponent.default {
76
75
  inputValue: ''
77
76
  };
78
77
  if (Boolean(dataSource) && (0, _isArray2.default)(dataSource)) {
79
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
80
78
  // @ts-ignore Avoid reporting errors this.state.xxx is read-only
81
79
  this.state.data = (0, _transferUtils._generateDataByType)(dataSource, type);
82
80
  }
83
81
  if (Boolean(defaultValue) && (0, _isArray2.default)(defaultValue)) {
84
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
85
82
  // @ts-ignore Avoid reporting errors this.state.xxx is read-only
86
83
  this.state.selectedItems = (0, _transferUtils._generateSelectedItems)(defaultValue, this.state.data);
87
84
  }
@@ -49,8 +49,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
49
49
  }
50
50
  return t;
51
51
  };
52
- /* eslint-disable max-lines-per-function */
53
-
54
52
  const prefixcls = _constants.cssClasses.PREFIX;
55
53
  class Tree extends _baseComponent.default {
56
54
  constructor(props) {
@@ -248,7 +246,6 @@ class Tree extends _baseComponent.default {
248
246
  };
249
247
  // Update the data of tree in state
250
248
  if (needUpdate('treeData') || props.draggable && needUpdateData()) {
251
- // eslint-disable-next-line prefer-destructuring
252
249
  treeData = props.treeData;
253
250
  newState.treeData = treeData;
254
251
  const entitiesMap = (0, _treeUtil.convertDataToEntities)(treeData);
@@ -303,7 +303,6 @@ class TreeNode extends _react.PureComponent {
303
303
  className: `${prefixcls}-item-icon`
304
304
  });
305
305
  } else {
306
- // eslint-disable-next-line max-len
307
306
  itemIcon = expanded ? /*#__PURE__*/_react.default.createElement(_semiIcons.IconFolderOpen, {
308
307
  className: `${prefixcls}-item-icon`
309
308
  }) : /*#__PURE__*/_react.default.createElement(_semiIcons.IconFolder, {
@@ -328,7 +327,6 @@ class TreeNode extends _react.PureComponent {
328
327
  "x-semi-prop": "emptyContent"
329
328
  }, emptyContent));
330
329
  }
331
- // eslint-disable-next-line max-lines-per-function
332
330
  render() {
333
331
  const _a = this.props,
334
332
  {
@@ -343,7 +341,6 @@ class TreeNode extends _react.PureComponent {
343
341
  empty,
344
342
  filtered,
345
343
  treeNodeFilterProp,
346
- // eslint-disable-next-line no-unused-vars
347
344
  display,
348
345
  style
349
346
  } = _a,
@@ -185,7 +185,6 @@ class TreeSelect extends _baseComponent.default {
185
185
  renderKeys = [...realCheckedKeys];
186
186
  }
187
187
  const tagList = [];
188
- // eslint-disable-next-line @typescript-eslint/no-shadow
189
188
  renderKeys.forEach((key, index) => {
190
189
  const item = keyEntities[key] && keyEntities[key].data.key === key ? keyEntities[key].data : this.getDataForKeyNotInKeyEntities(key);
191
190
  const onClose = (tagContent, e) => {
@@ -404,7 +403,6 @@ class TreeSelect extends _baseComponent.default {
404
403
  const triggerRenderKeys = multiple ? (0, _treeUtil.normalizeKeyList)([...checkedKeys], keyEntities, leafOnly, true) : selectedKeys;
405
404
  const inner = useCustomTrigger ? /*#__PURE__*/_react.default.createElement(_trigger.default, {
406
405
  inputValue: inputValue,
407
- // eslint-disable-next-line @typescript-eslint/no-shadow
408
406
  value: triggerRenderKeys.map(key => (0, _get2.default)(keyEntities, [key, 'data'])),
409
407
  disabled: disabled,
410
408
  placeholder: placeholder,
@@ -451,7 +449,6 @@ class TreeSelect extends _baseComponent.default {
451
449
  "aria-required": this.props['aria-required']
452
450
  }, mouseEvent, this.getDataAttr(rest)), inner);
453
451
  };
454
- // eslint-disable-next-line @typescript-eslint/no-shadow
455
452
  this.renderTagItem = (key, idx) => {
456
453
  const {
457
454
  keyEntities,
@@ -675,7 +672,6 @@ class TreeSelect extends _baseComponent.default {
675
672
  const {
676
673
  data
677
674
  } = treeNode;
678
- // eslint-disable-next-line @typescript-eslint/no-shadow
679
675
  const {
680
676
  key
681
677
  } = data;
@@ -699,7 +695,6 @@ class TreeSelect extends _baseComponent.default {
699
695
  const {
700
696
  data
701
697
  } = treeNode;
702
- // eslint-disable-next-line @typescript-eslint/no-shadow
703
698
  const {
704
699
  key
705
700
  } = data;
@@ -887,7 +882,6 @@ class TreeSelect extends _baseComponent.default {
887
882
  this.adapter.rePositionDropdown();
888
883
  };
889
884
  }
890
- // eslint-disable-next-line max-lines-per-function
891
885
  static getDerivedStateFromProps(props, prevState) {
892
886
  const {
893
887
  prevProps,
@@ -1016,7 +1010,6 @@ class TreeSelect extends _baseComponent.default {
1016
1010
  const clickOutsideHandler = e => {
1017
1011
  const optionInstance = this.optionsRef && this.optionsRef.current;
1018
1012
  const triggerDom = this.triggerRef && this.triggerRef.current;
1019
- // eslint-disable-next-line
1020
1013
  const optionsDom = _reactDom.default.findDOMNode(optionInstance);
1021
1014
  const target = e.target;
1022
1015
  if (optionsDom && (!optionsDom.contains(target) || !optionsDom.contains(target.parentNode)) && triggerDom && !triggerDom.contains(target)) {
@@ -7,7 +7,6 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- /* eslint-disable @typescript-eslint/ban-types */
11
10
  var __rest = void 0 && (void 0).__rest || function (s, e) {
12
11
  var t = {};
13
12
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -21,7 +20,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
21
20
  */
22
21
  class Trigger extends _react.default.PureComponent {
23
22
  render() {
24
- // eslint-disable-next-line no-unused-vars
25
23
  const _a = this.props,
26
24
  {
27
25
  triggerRender,
@@ -34,9 +34,7 @@ const getRenderText = function (originEle, rows) {
34
34
  let fixedContent = arguments.length > 3 ? arguments[3] : undefined;
35
35
  let ellipsisStr = arguments.length > 4 ? arguments[4] : undefined;
36
36
  let suffix = arguments.length > 5 ? arguments[5] : undefined;
37
- let ellipsisPos
38
- // eslint-disable-next-line max-params
39
- = arguments.length > 6 ? arguments[6] : undefined;
37
+ let ellipsisPos = arguments.length > 6 ? arguments[6] : undefined;
40
38
  if (content.length === 0) {
41
39
  return '';
42
40
  }
@@ -25,8 +25,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
25
25
  }
26
26
  return t;
27
27
  };
28
- /* eslint-disable max-len */
29
-
30
28
  const prefixCls = _constants.cssClasses.PREFIX;
31
29
  class Upload extends _baseComponent.default {
32
30
  constructor(props) {
@@ -1,8 +1,6 @@
1
1
  import _get from "lodash/get";
2
2
  import _set from "lodash/set";
3
3
  import _cloneDeepWith from "lodash/cloneDeepWith";
4
- /* eslint-disable max-len */
5
- /* argus-disable unPkgSensitiveInfo */
6
4
  import React from 'react';
7
5
  import warning from '@douyinfe/semi-foundation/lib/es/utils/warning';
8
6
  import { findAll } from '@douyinfe/semi-foundation/lib/es/utils/getHighlight';
@@ -1,6 +1,5 @@
1
1
  import _noop from "lodash/noop";
2
2
  import _isEqual from "lodash/isEqual";
3
- /* eslint-disable @typescript-eslint/ban-types, max-len */
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
6
5
  import cls from 'classnames';
@@ -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';
@@ -73,7 +73,6 @@ export default class AvatarGroup extends PureComponent {
73
73
  return moreAvatar;
74
74
  }
75
75
  render() {
76
- // eslint-disable-next-line no-unused-vars
77
76
  const _a = this.props,
78
77
  {
79
78
  children,
@@ -187,7 +187,6 @@ export default class Avatar extends BaseComponent {
187
187
  }
188
188
  }
189
189
  render() {
190
- // eslint-disable-next-line max-len, no-unused-vars
191
190
  const _a = this.props,
192
191
  {
193
192
  shape,
@@ -63,7 +63,6 @@ export default class BackTop extends BaseComponent {
63
63
  });
64
64
  }
65
65
  render() {
66
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
66
  const _a = this.props,
68
67
  {
69
68
  children,
@@ -23,7 +23,6 @@ export default class Badge extends PureComponent {
23
23
  } = this.context;
24
24
  // DefaultPosition here, static can't get this
25
25
  const defaultPosition = direction === 'rtl' ? 'leftTop' : 'rightTop';
26
- // eslint-disable-next-line max-len
27
26
  const _a = this.props,
28
27
  {
29
28
  count,
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-len */
2
1
  import React from 'react';
3
2
  import cls from 'classnames';
4
3
  import PropTypes from 'prop-types';
@@ -169,7 +168,6 @@ Banner.propTypes = {
169
168
  bordered: PropTypes.bool
170
169
  };
171
170
  Banner.defaultProps = {
172
- // eslint-disable-next-line @typescript-eslint/no-empty-function
173
171
  onClose: () => {},
174
172
  type: 'info',
175
173
  fullMode: true
@@ -1,5 +1,4 @@
1
1
  import _isFunction from "lodash/isFunction";
2
- /* eslint-disable max-len */
3
2
  import React from 'react';
4
3
  import cls from 'classnames';
5
4
  import propTypes from 'prop-types';
@@ -59,7 +58,6 @@ class Breadcrumb extends BaseComponent {
59
58
  key: key,
60
59
  active: idx === items.length - 1,
61
60
  route: route._origin,
62
- // eslint-disable-next-line max-len
63
61
  shouldRenderSeparator: !(shouldCollapse && (hasRenderMore || moreTypeIsPopover) && inCollapseArea)
64
62
  }), renderItem ? renderItem(route._origin) : route.name);
65
63
  });
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable react/destructuring-assignment */
11
10
  import React, { PureComponent } from 'react';
12
11
  import classNames from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -60,18 +59,14 @@ export default class Button extends PureComponent {
60
59
  if (!(className && className.includes('-with-icon'))) {
61
60
  xSemiProps['x-semi-prop'] = this.props['x-semi-children-alias'] || 'children';
62
61
  }
63
- return (
64
- /*#__PURE__*/
65
- // eslint-disable-next-line react/button-has-type
66
- React.createElement("button", Object.assign({}, baseProps, {
67
- onClick: this.props.onClick,
68
- onMouseDown: this.props.onMouseDown,
69
- style: style
70
- }), /*#__PURE__*/React.createElement("span", Object.assign({
71
- className: `${prefixCls}-content`,
72
- onClick: e => disabled && e.stopPropagation()
73
- }, xSemiProps), children))
74
- );
62
+ return /*#__PURE__*/React.createElement("button", Object.assign({}, baseProps, {
63
+ onClick: this.props.onClick,
64
+ onMouseDown: this.props.onMouseDown,
65
+ style: style
66
+ }), /*#__PURE__*/React.createElement("span", Object.assign({
67
+ className: `${prefixCls}-content`,
68
+ onClick: e => disabled && e.stopPropagation()
69
+ }, xSemiProps), children));
75
70
  }
76
71
  }
77
72
  Button.defaultProps = {
@@ -24,14 +24,10 @@ export default class DayCalendar extends BaseComponent {
24
24
  children,
25
25
  key
26
26
  } = event;
27
- return (
28
- /*#__PURE__*/
29
- // eslint-disable-next-line max-len
30
- React.createElement("li", {
31
- className: `${cssClasses.PREFIX}-event-item ${cssClasses.PREFIX}-event-allday`,
32
- key: key || `allDay-${ind}`
33
- }, children)
34
- );
27
+ return /*#__PURE__*/React.createElement("li", {
28
+ className: `${cssClasses.PREFIX}-event-item ${cssClasses.PREFIX}-event-allday`,
29
+ key: key || `allDay-${ind}`
30
+ }, children);
35
31
  });
36
32
  return list;
37
33
  };
@@ -112,7 +108,6 @@ export default class DayCalendar extends BaseComponent {
112
108
  this.foundation.destroy();
113
109
  }
114
110
  render() {
115
- // eslint-disable-next-line max-len
116
111
  const {
117
112
  dateGridRender,
118
113
  displayValue,
@@ -1,4 +1,4 @@
1
- /* eslint-disable max-len */
1
+ /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
2
2
  import React from 'react';
3
3
  import cls from 'classnames';
4
4
  import PropTypes from 'prop-types';
@@ -5,7 +5,6 @@ import ReactDOM from 'react-dom';
5
5
  import cls from 'classnames';
6
6
  import PropTypes from 'prop-types';
7
7
  import { IconClose } from '@douyinfe/semi-icons';
8
- // eslint-disable-next-line max-len
9
8
  import CalendarFoundation from '@douyinfe/semi-foundation/lib/es/calendar/foundation';
10
9
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/calendar/constants';
11
10
  import LocaleConsumer from '../locale/localeConsumer';
@@ -180,15 +179,11 @@ export default class monthCalendar extends BaseComponent {
180
179
  className: `${cssClasses.PREFIX}-today-date`
181
180
  }, "\u00A0", date), locale.datestring));
182
181
  }
183
- return (
184
- /*#__PURE__*/
185
- // eslint-disable-next-line max-len
186
- React.createElement("span", {
187
- className: `${prefixCls}-date`
188
- }, /*#__PURE__*/React.createElement("span", {
189
- className: `${cssClasses.PREFIX}-today-date`
190
- }, date))
191
- );
182
+ return /*#__PURE__*/React.createElement("span", {
183
+ className: `${prefixCls}-date`
184
+ }, /*#__PURE__*/React.createElement("span", {
185
+ className: `${cssClasses.PREFIX}-today-date`
186
+ }, date));
192
187
  };
193
188
  this.renderCusDateGrid = date => {
194
189
  const {
@@ -279,7 +274,6 @@ export default class monthCalendar extends BaseComponent {
279
274
  registerClickOutsideHandler: (key, cb) => {
280
275
  const clickOutsideHandler = e => {
281
276
  const cardInstance = this.cardRef && this.cardRef.get(key);
282
- // eslint-disable-next-line react/no-find-dom-node
283
277
  const cardDom = ReactDOM.findDOMNode(cardInstance);
284
278
  if (cardDom && !cardDom.contains(e.target)) {
285
279
  cb();
@@ -2,7 +2,6 @@ import _isEqual from "lodash/isEqual";
2
2
  import React, { Fragment } from 'react';
3
3
  import cls from 'classnames';
4
4
  import PropTypes from 'prop-types';
5
- // eslint-disable-next-line max-len
6
5
  import CalendarFoundation from '@douyinfe/semi-foundation/lib/es/calendar/foundation';
7
6
  import LocaleConsumer from '../locale/localeConsumer';
8
7
  import localeContext from '../locale/context';
@@ -1,6 +1,5 @@
1
1
  import _isEqual from "lodash/isEqual";
2
2
  import _debounce from "lodash/debounce";
3
- /* eslint-disable jsx-a11y/no-static-element-interactions */
4
3
  import React, { Children, isValidElement } from 'react';
5
4
  import cls from 'classnames';
6
5
  import PropTypes from 'prop-types';