@douyinfe/semi-foundation 2.19.0-beta.0 → 2.19.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 (318) hide show
  1. package/anchor/anchor.scss +1 -8
  2. package/anchor/rtl.scss +0 -1
  3. package/anchor/variables.scss +1 -0
  4. package/calendar/eventUtil.ts +8 -7
  5. package/calendar/foundation.ts +14 -14
  6. package/datePicker/monthsGridFoundation.ts +10 -3
  7. package/dropdown/foundation.ts +2 -1
  8. package/dropdown/menuFoundation.ts +2 -1
  9. package/getBabelConfig.js +0 -12
  10. package/lib/cjs/anchor/anchor.css +1 -10
  11. package/lib/cjs/anchor/anchor.scss +1 -8
  12. package/lib/cjs/anchor/constants.js +1 -4
  13. package/lib/cjs/anchor/foundation.js +5 -12
  14. package/lib/cjs/anchor/linkFoundation.js +4 -9
  15. package/lib/cjs/anchor/rtl.scss +0 -1
  16. package/lib/cjs/anchor/variables.scss +1 -0
  17. package/lib/cjs/autoComplete/constants.js +1 -4
  18. package/lib/cjs/autoComplete/foundation.js +14 -33
  19. package/lib/cjs/autoComplete/optionFoundation.js +4 -9
  20. package/lib/cjs/avatar/constants.js +1 -4
  21. package/lib/cjs/avatar/foundation.js +4 -9
  22. package/lib/cjs/backtop/constants.js +1 -4
  23. package/lib/cjs/backtop/foundation.js +4 -9
  24. package/lib/cjs/badge/constants.js +1 -4
  25. package/lib/cjs/banner/constants.js +1 -4
  26. package/lib/cjs/banner/foundation.js +4 -9
  27. package/lib/cjs/base/constants.js +2 -6
  28. package/lib/cjs/base/env.js +1 -4
  29. package/lib/cjs/base/foundation.js +5 -10
  30. package/lib/cjs/base/index.js +3 -6
  31. package/lib/cjs/breadcrumb/constants.js +1 -4
  32. package/lib/cjs/breadcrumb/foundation.js +6 -13
  33. package/lib/cjs/breadcrumb/itemFoundation.js +4 -9
  34. package/lib/cjs/button/constants.js +1 -4
  35. package/lib/cjs/calendar/constants.js +1 -4
  36. package/lib/cjs/calendar/eventUtil.d.ts +3 -3
  37. package/lib/cjs/calendar/eventUtil.js +28 -53
  38. package/lib/cjs/calendar/foundation.js +63 -85
  39. package/lib/cjs/card/constants.js +1 -4
  40. package/lib/cjs/carousel/constants.js +1 -4
  41. package/lib/cjs/carousel/foundation.js +5 -12
  42. package/lib/cjs/cascader/constants.js +1 -4
  43. package/lib/cjs/cascader/foundation.js +55 -100
  44. package/lib/cjs/cascader/util.js +9 -30
  45. package/lib/cjs/checkbox/checkboxFoundation.js +6 -13
  46. package/lib/cjs/checkbox/checkboxGroupFoundation.js +9 -18
  47. package/lib/cjs/checkbox/constants.js +1 -4
  48. package/lib/cjs/collapse/constants.js +1 -4
  49. package/lib/cjs/collapse/foundation.js +9 -20
  50. package/lib/cjs/collapsible/constants.js +1 -4
  51. package/lib/cjs/datePicker/_utils/formatter.js +3 -12
  52. package/lib/cjs/datePicker/_utils/getDayOfWeek.js +1 -4
  53. package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +1 -4
  54. package/lib/cjs/datePicker/_utils/getDefaultPickerDate.js +5 -10
  55. package/lib/cjs/datePicker/_utils/getFullDateOffset.js +3 -6
  56. package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +2 -11
  57. package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +1 -4
  58. package/lib/cjs/datePicker/_utils/getMonthTable.js +2 -11
  59. package/lib/cjs/datePicker/_utils/getMonthsInYear.js +3 -16
  60. package/lib/cjs/datePicker/_utils/getYears.js +2 -9
  61. package/lib/cjs/datePicker/_utils/index.js +16 -30
  62. package/lib/cjs/datePicker/_utils/isAfter.js +3 -6
  63. package/lib/cjs/datePicker/_utils/isBefore.js +3 -6
  64. package/lib/cjs/datePicker/_utils/isBetween.js +3 -6
  65. package/lib/cjs/datePicker/_utils/isDate.js +1 -4
  66. package/lib/cjs/datePicker/_utils/isSameDay.js +3 -6
  67. package/lib/cjs/datePicker/_utils/isTimestamp.js +3 -6
  68. package/lib/cjs/datePicker/_utils/isUnixTimestamp.js +3 -6
  69. package/lib/cjs/datePicker/_utils/isValidDate.js +1 -4
  70. package/lib/cjs/datePicker/_utils/isWithinInterval.js +3 -6
  71. package/lib/cjs/datePicker/_utils/parser.js +1 -4
  72. package/lib/cjs/datePicker/constants.js +3 -10
  73. package/lib/cjs/datePicker/foundation.js +42 -85
  74. package/lib/cjs/datePicker/inputFoundation.js +7 -20
  75. package/lib/cjs/datePicker/monthFoundation.js +5 -12
  76. package/lib/cjs/datePicker/monthsGridFoundation.js +47 -68
  77. package/lib/cjs/datePicker/yearAndMonthFoundation.js +4 -9
  78. package/lib/cjs/descriptions/constants.js +1 -4
  79. package/lib/cjs/divider/constants.js +1 -4
  80. package/lib/cjs/dropdown/constants.js +1 -4
  81. package/lib/cjs/dropdown/foundation.js +7 -15
  82. package/lib/cjs/dropdown/menuFoundation.js +11 -31
  83. package/lib/cjs/empty/constants.js +1 -4
  84. package/lib/cjs/form/constants.js +1 -4
  85. package/lib/cjs/form/foundation.js +64 -104
  86. package/lib/cjs/form/interface.js +1 -3
  87. package/lib/cjs/form/utils.js +14 -29
  88. package/lib/cjs/grid/constants.js +1 -4
  89. package/lib/cjs/icons/constants.js +1 -4
  90. package/lib/cjs/input/constants.js +1 -4
  91. package/lib/cjs/input/foundation.js +7 -18
  92. package/lib/cjs/input/textareaFoundation.js +6 -13
  93. package/lib/cjs/input/util/calculateNodeHeight.js +3 -17
  94. package/lib/cjs/input/util/getSizingData.js +5 -10
  95. package/lib/cjs/inputNumber/constants.js +4 -11
  96. package/lib/cjs/inputNumber/foundation.js +11 -30
  97. package/lib/cjs/layout/constants.js +1 -4
  98. package/lib/cjs/list/constants.js +1 -4
  99. package/lib/cjs/modal/constants.js +1 -4
  100. package/lib/cjs/modal/modalContentFoundation.js +4 -9
  101. package/lib/cjs/modal/modalFoundation.js +4 -9
  102. package/lib/cjs/navigation/NavItem.js +6 -21
  103. package/lib/cjs/navigation/constants.js +1 -4
  104. package/lib/cjs/navigation/foundation.js +22 -37
  105. package/lib/cjs/navigation/itemFoundation.js +4 -9
  106. package/lib/cjs/navigation/subNavFoundation.js +10 -21
  107. package/lib/cjs/notification/constants.js +1 -4
  108. package/lib/cjs/notification/notificationFoundation.js +5 -12
  109. package/lib/cjs/notification/notificationListFoundation.js +4 -9
  110. package/lib/cjs/overflowList/constants.js +3 -10
  111. package/lib/cjs/overflowList/foundation.js +12 -29
  112. package/lib/cjs/pagination/constants.js +1 -4
  113. package/lib/cjs/pagination/foundation.js +18 -37
  114. package/lib/cjs/popconfirm/constants.js +1 -4
  115. package/lib/cjs/popconfirm/popconfirmFoundation.js +3 -6
  116. package/lib/cjs/popover/constants.js +2 -9
  117. package/lib/cjs/progress/constants.js +1 -4
  118. package/lib/cjs/radio/constants.js +1 -4
  119. package/lib/cjs/radio/radioFoundation.js +3 -6
  120. package/lib/cjs/radio/radioGroupFoundation.js +6 -11
  121. package/lib/cjs/radio/radioInnerFoundation.js +5 -10
  122. package/lib/cjs/rating/constants.js +1 -4
  123. package/lib/cjs/rating/foundation.js +7 -20
  124. package/lib/cjs/scrollList/constants.js +1 -4
  125. package/lib/cjs/scrollList/foundation.js +3 -6
  126. package/lib/cjs/scrollList/itemFoundation.js +8 -21
  127. package/lib/cjs/scrollList/scrollTo.js +1 -4
  128. package/lib/cjs/select/constants.js +1 -4
  129. package/lib/cjs/select/foundation.js +56 -98
  130. package/lib/cjs/select/optionFoundation.js +4 -9
  131. package/lib/cjs/sideSheet/constants.js +1 -4
  132. package/lib/cjs/sideSheet/sideSheetFoundation.js +6 -15
  133. package/lib/cjs/skeleton/constants.js +1 -4
  134. package/lib/cjs/slider/constants.js +1 -4
  135. package/lib/cjs/slider/foundation.js +13 -24
  136. package/lib/cjs/space/constants.js +1 -4
  137. package/lib/cjs/spin/constants.js +1 -4
  138. package/lib/cjs/spin/foundation.js +5 -12
  139. package/lib/cjs/steps/constants.js +1 -4
  140. package/lib/cjs/switch/constants.js +1 -4
  141. package/lib/cjs/switch/foundation.js +4 -9
  142. package/lib/cjs/table/bodyFoundation.js +9 -22
  143. package/lib/cjs/table/cellFoundation.js +3 -6
  144. package/lib/cjs/table/constants.js +1 -4
  145. package/lib/cjs/table/foundation.js +76 -117
  146. package/lib/cjs/table/tableRowFoundation.js +3 -6
  147. package/lib/cjs/table/tableSelectionCellFoundation.js +3 -6
  148. package/lib/cjs/table/utils.js +42 -71
  149. package/lib/cjs/tabs/constants.js +1 -4
  150. package/lib/cjs/tabs/foundation.js +8 -23
  151. package/lib/cjs/tag/constants.js +1 -4
  152. package/lib/cjs/tagInput/constants.js +1 -4
  153. package/lib/cjs/tagInput/foundation.js +12 -31
  154. package/lib/cjs/tagInput/utils/getSplitedArray.js +3 -6
  155. package/lib/cjs/timePicker/ComboxFoundation.js +10 -29
  156. package/lib/cjs/timePicker/constants.js +1 -4
  157. package/lib/cjs/timePicker/foundation.js +26 -45
  158. package/lib/cjs/timePicker/inputFoundation.js +4 -9
  159. package/lib/cjs/timePicker/utils/index.js +7 -14
  160. package/lib/cjs/timePicker/utils/localeDate.js +2 -9
  161. package/lib/cjs/timeline/constants.js +1 -4
  162. package/lib/cjs/toast/constants.js +1 -4
  163. package/lib/cjs/toast/toastFoundation.js +5 -12
  164. package/lib/cjs/toast/toastListFoundation.js +5 -12
  165. package/lib/cjs/tooltip/constants.js +1 -4
  166. package/lib/cjs/tooltip/foundation.js +29 -56
  167. package/lib/cjs/transfer/constants.js +1 -4
  168. package/lib/cjs/transfer/foundation.js +24 -47
  169. package/lib/cjs/transfer/transferUtils.js +16 -45
  170. package/lib/cjs/tree/constants.js +1 -4
  171. package/lib/cjs/tree/foundation.js +41 -76
  172. package/lib/cjs/tree/treeUtil.js +60 -107
  173. package/lib/cjs/treeSelect/constants.js +1 -4
  174. package/lib/cjs/treeSelect/foundation.js +49 -82
  175. package/lib/cjs/typography/constants.js +1 -4
  176. package/lib/cjs/upload/constants.js +1 -4
  177. package/lib/cjs/upload/foundation.js +56 -112
  178. package/lib/cjs/upload/utils.js +13 -32
  179. package/lib/cjs/utils/Event.js +9 -23
  180. package/lib/cjs/utils/FocusHandle.js +6 -15
  181. package/lib/cjs/utils/Logger.js +1 -4
  182. package/lib/cjs/utils/Store.js +5 -20
  183. package/lib/cjs/utils/a11y.js +8 -13
  184. package/lib/cjs/utils/array.js +6 -15
  185. package/lib/cjs/utils/arrayMove.js +3 -12
  186. package/lib/cjs/utils/classnames.js +6 -15
  187. package/lib/cjs/utils/date-fns-extra.js +7 -18
  188. package/lib/cjs/utils/dom.js +5 -12
  189. package/lib/cjs/utils/function.js +1 -4
  190. package/lib/cjs/utils/getDataAttr.js +2 -13
  191. package/lib/cjs/utils/getHighlight.js +7 -22
  192. package/lib/cjs/utils/getMotionObjFromProps.js +4 -9
  193. package/lib/cjs/utils/index.js +5 -15
  194. package/lib/cjs/utils/isBothNaN.js +1 -4
  195. package/lib/cjs/utils/isElement.js +1 -4
  196. package/lib/cjs/utils/isEnterPress.js +3 -6
  197. package/lib/cjs/utils/isEscPress.js +3 -6
  198. package/lib/cjs/utils/isNullOrUndefined.js +1 -4
  199. package/lib/cjs/utils/isNumber.js +1 -4
  200. package/lib/cjs/utils/isObject.js +1 -4
  201. package/lib/cjs/utils/isPromise.js +3 -6
  202. package/lib/cjs/utils/isString.js +1 -4
  203. package/lib/cjs/utils/keyCode.js +1 -4
  204. package/lib/cjs/utils/log.js +3 -6
  205. package/lib/cjs/utils/number.js +1 -4
  206. package/lib/cjs/utils/object.js +10 -27
  207. package/lib/cjs/utils/set.js +4 -9
  208. package/lib/cjs/utils/shallowEqualObjects.js +3 -10
  209. package/lib/cjs/utils/touchPolyfill.js +5 -12
  210. package/lib/cjs/utils/type.js +1 -3
  211. package/lib/cjs/utils/uuid.js +3 -14
  212. package/lib/cjs/utils/warning.js +1 -4
  213. package/lib/es/anchor/anchor.css +1 -10
  214. package/lib/es/anchor/anchor.scss +1 -8
  215. package/lib/es/anchor/foundation.js +2 -4
  216. package/lib/es/anchor/linkFoundation.js +1 -2
  217. package/lib/es/anchor/rtl.scss +0 -1
  218. package/lib/es/anchor/variables.scss +1 -0
  219. package/lib/es/autoComplete/foundation.js +11 -26
  220. package/lib/es/autoComplete/optionFoundation.js +1 -2
  221. package/lib/es/avatar/foundation.js +1 -2
  222. package/lib/es/backtop/foundation.js +1 -2
  223. package/lib/es/banner/foundation.js +1 -2
  224. package/lib/es/base/foundation.js +2 -3
  225. package/lib/es/breadcrumb/foundation.js +3 -6
  226. package/lib/es/breadcrumb/itemFoundation.js +1 -2
  227. package/lib/es/calendar/eventUtil.d.ts +3 -3
  228. package/lib/es/calendar/eventUtil.js +27 -56
  229. package/lib/es/calendar/foundation.js +60 -90
  230. package/lib/es/carousel/foundation.js +2 -4
  231. package/lib/es/cascader/foundation.js +49 -94
  232. package/lib/es/cascader/util.js +6 -21
  233. package/lib/es/checkbox/checkboxFoundation.js +3 -6
  234. package/lib/es/checkbox/checkboxGroupFoundation.js +6 -9
  235. package/lib/es/collapse/foundation.js +6 -10
  236. package/lib/es/datePicker/_utils/formatter.js +2 -5
  237. package/lib/es/datePicker/_utils/getDefaultPickerDate.js +2 -3
  238. package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -4
  239. package/lib/es/datePicker/_utils/getMonthTable.js +1 -5
  240. package/lib/es/datePicker/_utils/getMonthsInYear.js +2 -9
  241. package/lib/es/datePicker/_utils/getYears.js +1 -3
  242. package/lib/es/datePicker/constants.js +2 -7
  243. package/lib/es/datePicker/foundation.js +39 -70
  244. package/lib/es/datePicker/inputFoundation.js +4 -11
  245. package/lib/es/datePicker/monthFoundation.js +2 -4
  246. package/lib/es/datePicker/monthsGridFoundation.js +40 -55
  247. package/lib/es/datePicker/yearAndMonthFoundation.js +1 -2
  248. package/lib/es/dropdown/foundation.js +4 -7
  249. package/lib/es/dropdown/menuFoundation.js +8 -21
  250. package/lib/es/form/foundation.js +59 -91
  251. package/lib/es/form/utils.js +11 -19
  252. package/lib/es/input/foundation.js +4 -9
  253. package/lib/es/input/textareaFoundation.js +3 -5
  254. package/lib/es/input/util/calculateNodeHeight.js +2 -10
  255. package/lib/es/input/util/getSizingData.js +2 -5
  256. package/lib/es/inputNumber/constants.js +3 -8
  257. package/lib/es/inputNumber/foundation.js +8 -18
  258. package/lib/es/modal/modalContentFoundation.js +1 -2
  259. package/lib/es/modal/modalFoundation.js +1 -2
  260. package/lib/es/navigation/NavItem.js +5 -11
  261. package/lib/es/navigation/foundation.js +19 -25
  262. package/lib/es/navigation/itemFoundation.js +1 -3
  263. package/lib/es/navigation/subNavFoundation.js +7 -13
  264. package/lib/es/notification/notificationFoundation.js +2 -4
  265. package/lib/es/notification/notificationListFoundation.js +1 -3
  266. package/lib/es/overflowList/constants.js +2 -3
  267. package/lib/es/overflowList/foundation.js +9 -23
  268. package/lib/es/pagination/foundation.js +15 -28
  269. package/lib/es/popover/constants.js +1 -2
  270. package/lib/es/radio/radioGroupFoundation.js +3 -4
  271. package/lib/es/radio/radioInnerFoundation.js +2 -3
  272. package/lib/es/rating/foundation.js +4 -13
  273. package/lib/es/scrollList/itemFoundation.js +5 -13
  274. package/lib/es/select/foundation.js +50 -88
  275. package/lib/es/select/optionFoundation.js +1 -2
  276. package/lib/es/sideSheet/sideSheetFoundation.js +3 -7
  277. package/lib/es/slider/foundation.js +10 -16
  278. package/lib/es/spin/foundation.js +2 -4
  279. package/lib/es/switch/foundation.js +1 -2
  280. package/lib/es/table/bodyFoundation.js +6 -11
  281. package/lib/es/table/foundation.js +67 -93
  282. package/lib/es/table/utils.js +33 -51
  283. package/lib/es/tabs/foundation.js +5 -18
  284. package/lib/es/tagInput/foundation.js +9 -21
  285. package/lib/es/timePicker/ComboxFoundation.js +7 -16
  286. package/lib/es/timePicker/foundation.js +23 -37
  287. package/lib/es/timePicker/inputFoundation.js +1 -2
  288. package/lib/es/timePicker/utils/index.js +4 -6
  289. package/lib/es/timePicker/utils/localeDate.js +1 -2
  290. package/lib/es/toast/toastFoundation.js +2 -4
  291. package/lib/es/toast/toastListFoundation.js +2 -4
  292. package/lib/es/tooltip/foundation.js +26 -46
  293. package/lib/es/transfer/foundation.js +21 -43
  294. package/lib/es/transfer/transferUtils.js +13 -33
  295. package/lib/es/tree/foundation.js +38 -70
  296. package/lib/es/tree/treeUtil.js +57 -109
  297. package/lib/es/treeSelect/foundation.js +45 -73
  298. package/lib/es/upload/foundation.js +52 -118
  299. package/lib/es/upload/utils.js +12 -25
  300. package/lib/es/utils/Event.js +5 -12
  301. package/lib/es/utils/FocusHandle.js +3 -7
  302. package/lib/es/utils/Store.js +4 -12
  303. package/lib/es/utils/a11y.js +5 -6
  304. package/lib/es/utils/array.js +3 -5
  305. package/lib/es/utils/arrayMove.js +2 -6
  306. package/lib/es/utils/classnames.js +3 -6
  307. package/lib/es/utils/date-fns-extra.js +6 -14
  308. package/lib/es/utils/dom.js +1 -2
  309. package/lib/es/utils/getDataAttr.js +1 -5
  310. package/lib/es/utils/getHighlight.js +4 -14
  311. package/lib/es/utils/getMotionObjFromProps.js +1 -2
  312. package/lib/es/utils/object.js +7 -15
  313. package/lib/es/utils/set.js +1 -2
  314. package/lib/es/utils/shallowEqualObjects.js +2 -5
  315. package/lib/es/utils/touchPolyfill.js +2 -6
  316. package/lib/es/utils/uuid.js +2 -7
  317. package/package.json +2 -4
  318. package/select/foundation.ts +2 -2
@@ -1,29 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
-
7
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
8
4
  value: true
9
5
  });
10
-
11
6
  exports.default = exports.RatingItemFoundation = void 0;
12
7
 
13
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
14
-
15
- var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
16
-
17
- var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
18
-
19
8
  var _foundation = _interopRequireDefault(require("../base/foundation"));
20
9
 
21
10
  var _warning = _interopRequireDefault(require("../utils/warning"));
22
11
 
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
23
14
  /* eslint-disable no-param-reassign */
24
15
  class RatingFoundation extends _foundation.default {
25
16
  constructor(adapter) {
26
- super((0, _assign.default)((0, _assign.default)({}, RatingFoundation.defaultAdapter), adapter));
17
+ super(Object.assign(Object.assign({}, RatingFoundation.defaultAdapter), adapter));
27
18
 
28
19
  this.handleStarFocusVisible = event => {
29
20
  const {
@@ -180,8 +171,6 @@ class RatingFoundation extends _foundation.default {
180
171
  }
181
172
 
182
173
  handleKeyDown(event, value) {
183
- var _context;
184
-
185
174
  const {
186
175
  key
187
176
  } = event;
@@ -211,7 +200,7 @@ class RatingFoundation extends _foundation.default {
211
200
  newValue = tempValue;
212
201
  }
213
202
 
214
- if ((0, _includes.default)(_context = ['ArrowRight', 'ArrowUp', 'ArrowLeft', 'ArrowDown']).call(_context, key)) {
203
+ if (['ArrowRight', 'ArrowUp', 'ArrowLeft', 'ArrowDown'].includes(key)) {
215
204
  this._adapter.notifyKeyDown(event);
216
205
 
217
206
  this._adapter.updateValue(newValue);
@@ -224,15 +213,13 @@ class RatingFoundation extends _foundation.default {
224
213
  }
225
214
 
226
215
  changeFocusStar(value, event) {
227
- var _context2;
228
-
229
216
  const {
230
217
  count,
231
218
  allowHalf,
232
219
  preventScroll
233
220
  } = this.getProps();
234
221
  const index = Math.ceil(value) - 1;
235
- const starElement = (0, _map.default)(_context2 = [...event.currentTarget.childNodes]).call(_context2, item => item.childNodes[0].childNodes);
222
+ const starElement = [...event.currentTarget.childNodes].map(item => item.childNodes[0].childNodes);
236
223
 
237
224
  if (index < 0) {
238
225
  starElement[count][0].focus({
@@ -251,7 +238,7 @@ exports.default = RatingFoundation;
251
238
 
252
239
  class RatingItemFoundation extends _foundation.default {
253
240
  constructor(adapter) {
254
- super((0, _assign.default)((0, _assign.default)({}, RatingItemFoundation.defaultAdapter), adapter));
241
+ super(Object.assign(Object.assign({}, RatingItemFoundation.defaultAdapter), adapter));
255
242
 
256
243
  this.handleFocusVisible = (event, star) => {
257
244
  const {
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
-
9
6
  exports.strings = exports.numbers = exports.cssClasses = void 0;
10
7
 
11
8
  var _constants = require("../base/constants");
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
-
7
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
8
4
  value: true
9
5
  });
10
-
11
6
  exports.default = void 0;
12
7
 
13
8
  var _foundation = _interopRequireDefault(require("../base/foundation"));
14
9
 
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
15
12
  class ScrollListFoundation extends _foundation.default {}
16
13
 
17
14
  exports.default = ScrollListFoundation;
@@ -1,23 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
-
7
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
8
4
  value: true
9
5
  });
10
-
11
6
  exports.default = void 0;
12
7
 
13
- var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
14
-
15
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
16
-
17
- var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
18
-
19
- var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
20
-
21
8
  var _findIndex2 = _interopRequireDefault(require("lodash/findIndex"));
22
9
 
23
10
  var _find2 = _interopRequireDefault(require("lodash/find"));
@@ -30,6 +17,8 @@ var _isElement = _interopRequireDefault(require("../utils/isElement"));
30
17
 
31
18
  var _dom = require("../utils/dom");
32
19
 
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
33
22
  class ItemFoundation extends _foundation.default {
34
23
  constructor() {
35
24
  super(...arguments);
@@ -42,14 +31,14 @@ class ItemFoundation extends _foundation.default {
42
31
  list
43
32
  } = this.getProps();
44
33
 
45
- if (index > -1 && (0, _isArray.default)(list) && list.length && (0, _isElement.default)(listWrapper)) {
34
+ if (index > -1 && Array.isArray(list) && list.length && (0, _isElement.default)(listWrapper)) {
46
35
  const indexInData = index % list.length;
47
36
  const item = list[indexInData];
48
37
  const node = listWrapper.children[index];
49
38
 
50
39
  this._adapter.setSelectedNode(node);
51
40
 
52
- this._adapter.notifySelectItem((0, _assign.default)((0, _assign.default)({}, item), {
41
+ this._adapter.notifySelectItem(Object.assign(Object.assign({}, item), {
53
42
  value: item.value,
54
43
  type,
55
44
  index: indexInData
@@ -81,7 +70,7 @@ class ItemFoundation extends _foundation.default {
81
70
  this._cachedSelectedNode = node;
82
71
 
83
72
  if (cachedIndexData !== indexInData) {
84
- this._adapter.notifySelectItem((0, _assign.default)((0, _assign.default)({}, item), {
73
+ this._adapter.notifySelectItem(Object.assign(Object.assign({}, item), {
85
74
  value: item.value,
86
75
  type,
87
76
  index: indexInData
@@ -241,15 +230,13 @@ class ItemFoundation extends _foundation.default {
241
230
 
242
231
  getNearestNodeInfo(listWrapper, selector) {
243
232
  if ((0, _isElement.default)(listWrapper) && (0, _isElement.default)(selector)) {
244
- var _context;
245
-
246
233
  const selectorRect = selector.getBoundingClientRect();
247
234
  const selectorTop = selectorRect.top;
248
235
  const itemNodes = listWrapper.querySelectorAll('li');
249
236
  let nearestNode = null;
250
237
  let nearestIndex = -1;
251
238
  let nearestDistance = Infinity;
252
- (0, _map.default)(_context = (0, _from.default)(itemNodes)).call(_context, (node, index) => {
239
+ Array.from(itemNodes).map((node, index) => {
253
240
  const rect = node.getBoundingClientRect();
254
241
  const rectTop = rect.top;
255
242
  const absDistance = Math.abs(rectTop - selectorTop);
@@ -282,7 +269,7 @@ class ItemFoundation extends _foundation.default {
282
269
  const currentTarget = e.target;
283
270
  const itemNodes = listWrapper.querySelectorAll(targetTagName);
284
271
  const list = this.getProp('list');
285
- const length = (0, _isArray.default)(list) ? list.length : 0;
272
+ const length = Array.isArray(list) ? list.length : 0;
286
273
  let targetIndex = -1;
287
274
  let indexInList = -1;
288
275
  let infoInList = null;
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
-
9
6
  exports.default = void 0;
10
7
 
11
8
  var _semiAnimation = require("@douyinfe/semi-animation");
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
-
9
6
  exports.strings = exports.numbers = exports.cssClasses = void 0;
10
7
 
11
8
  var _constants = require("../base/constants");
@@ -1,45 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
4
-
5
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
-
7
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
8
-
9
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
10
-
11
- _Object$defineProperty(exports, "__esModule", {
3
+ Object.defineProperty(exports, "__esModule", {
12
4
  value: true
13
5
  });
14
-
15
6
  exports.default = void 0;
16
7
 
17
- var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
18
-
19
- var _getOwnPropertySymbols = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"));
20
-
21
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
22
-
23
- var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
24
-
25
- var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
26
-
27
- var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
28
-
29
- var _map2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/map"));
30
-
31
- var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
32
-
33
- var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
34
-
35
- var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
36
-
37
- var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/keys"));
38
-
39
- var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/values"));
40
-
41
- var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/entries"));
42
-
43
8
  var _omit2 = _interopRequireDefault(require("lodash/omit"));
44
9
 
45
10
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
@@ -60,17 +25,19 @@ var _isEnterPress = _interopRequireDefault(require("../utils/isEnterPress"));
60
25
 
61
26
  var _a11y = require("../utils/a11y");
62
27
 
63
- 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); }
28
+ 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); }
29
+
30
+ 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; }
64
31
 
65
- 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; }
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66
33
 
67
34
  var __rest = void 0 && (void 0).__rest || function (s, e) {
68
35
  var t = {};
69
36
 
70
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && (0, _indexOf.default)(e).call(e, p) < 0) t[p] = s[p];
37
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
71
38
 
72
- if (s != null && typeof _getOwnPropertySymbols.default === "function") for (var i = 0, p = (0, _getOwnPropertySymbols.default)(s); i < p.length; i++) {
73
- if ((0, _indexOf.default)(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
74
41
  }
75
42
  return t;
76
43
  };
@@ -81,7 +48,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
81
48
 
82
49
  class SelectFoundation extends _foundation.default {
83
50
  constructor(adapter) {
84
- super((0, _assign.default)({}, adapter)); // keyboard event listner
51
+ super(Object.assign({}, adapter)); // keyboard event listner
85
52
  // eslint-disable-next-line @typescript-eslint/member-ordering
86
53
 
87
54
  this._keydownHandler = null;
@@ -146,11 +113,9 @@ class SelectFoundation extends _foundation.default {
146
113
  let width;
147
114
 
148
115
  if (dropdownMatchSelectWidth) {
149
- var _context;
150
-
151
116
  if (style && (0, _isNumber2.default)(style.width)) {
152
117
  width = style.width;
153
- } else if (style && (0, _isString2.default)(style.width) && !(0, _includes.default)(_context = style.width).call(_context, '%')) {
118
+ } else if (style && (0, _isString2.default)(style.width) && !style.width.includes('%')) {
154
119
  width = style.width;
155
120
  } else {
156
121
  width = this._adapter.getTriggerWidth();
@@ -219,9 +184,7 @@ class SelectFoundation extends _foundation.default {
219
184
  switch (true) {
220
185
  case isMultiple && Boolean(selections.size):
221
186
  try {
222
- var _context2;
223
-
224
- value = (0, _map.default)(_context2 = [...selections]).call(_context2, item => // At this point item1 is directly the object
187
+ value = [...selections].map(item => // At this point item1 is directly the object
225
188
  onChangeWithObject ? item[1] : item[1].value);
226
189
  } catch (error) {
227
190
  value = [];
@@ -261,7 +224,7 @@ class SelectFoundation extends _foundation.default {
261
224
 
262
225
  if (allowCreate && this._isControlledComponent()) {
263
226
  originalOptions = this.getState('options');
264
- (0, _forEach.default)(originalOptions).call(originalOptions, item => item._show = true);
227
+ originalOptions.forEach(item => item._show = true);
265
228
  } else {
266
229
  // originalOptions = this.getState('options');
267
230
  // The options in state cannot be used directly here, because it is possible to update the optionList and props.value at the same time, and the options in state are still old at this time
@@ -294,18 +257,18 @@ class SelectFoundation extends _foundation.default {
294
257
 
295
258
 
296
259
  _updateSingle(propValue, originalOptions) {
297
- const selections = new _map2.default();
260
+ const selections = new Map();
298
261
  const {
299
262
  onChangeWithObject
300
263
  } = this.getProps(); // When onChangeWithObject is true, the defaultValue or Value passed by the props should be the object, which corresponds to the result returned by onChange, so the value of the object needs to be taken as a judgment comparison
301
264
 
302
265
  const selectedValue = onChangeWithObject && typeof propValue !== 'undefined' ? propValue.value : propValue;
303
- const selectedOptions = (0, _filter.default)(originalOptions).call(originalOptions, option => option.value === selectedValue);
266
+ const selectedOptions = originalOptions.filter(option => option.value === selectedValue);
304
267
  const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined'; // If the current value, there is a matching option in the optionList
305
268
 
306
269
  if (selectedOptions.length) {
307
270
  const selectedOption = selectedOptions[0];
308
- const optionExist = (0, _assign.default)({}, selectedOption); // if (onChangeWithObject) {
271
+ const optionExist = Object.assign({}, selectedOption); // if (onChangeWithObject) {
309
272
  // OptionExist = {... propValue }; // value is the object with the'value 'Key
310
273
  // }
311
274
 
@@ -320,7 +283,7 @@ class SelectFoundation extends _foundation.default {
320
283
  };
321
284
 
322
285
  if (onChangeWithObject) {
323
- optionNotExist = (0, _assign.default)((0, _assign.default)({}, propValue), {
286
+ optionNotExist = Object.assign(Object.assign({}, propValue), {
324
287
  _notExist: true,
325
288
  _scrollIndex: -1
326
289
  });
@@ -337,35 +300,33 @@ class SelectFoundation extends _foundation.default {
337
300
  const nowSelections = this.getState('selections');
338
301
  let selectedOptionList = []; // Multiple selection is to determine whether it is an array to avoid the problem of defaultValue/value incoming string error
339
302
 
340
- const propValueIsArray = (0, _isArray.default)(propValue);
303
+ const propValueIsArray = Array.isArray(propValue);
341
304
  this.checkMultipleProps(); // If N values are currently selected, the corresponding option data is retrieved from the current selections for retrieval. Because these selected options may not exist in the new optionList
342
305
 
343
306
  if (nowSelections.size) {
344
- var _context3;
345
-
346
- selectedOptionList = (0, _map.default)(_context3 = [...nowSelections]).call(_context3, item => item[1]);
307
+ selectedOptionList = [...nowSelections].map(item => item[1]);
347
308
  }
348
309
 
349
- const selections = new _map2.default();
310
+ const selections = new Map();
350
311
  let selectedValues = propValue;
351
312
  const {
352
313
  onChangeWithObject
353
314
  } = this.getProps(); // When onChangeWithObject is true
354
315
 
355
316
  if (onChangeWithObject && propValueIsArray) {
356
- selectedValues = (0, _map.default)(propValue).call(propValue, item => item.value);
317
+ selectedValues = propValue.map(item => item.value);
357
318
  }
358
319
 
359
320
  if (propValueIsArray && selectedValues.length) {
360
- (0, _forEach.default)(selectedValues).call(selectedValues, (selectedValue, i) => {
321
+ selectedValues.forEach((selectedValue, i) => {
361
322
  // The current value exists in the current optionList
362
- const index = (0, _findIndex.default)(originalOptions).call(originalOptions, option => option.value === selectedValue);
323
+ const index = originalOptions.findIndex(option => option.value === selectedValue);
363
324
 
364
325
  if (index !== -1) {
365
326
  selections.set(originalOptions[index].label, originalOptions[index]);
366
327
  } else {
367
328
  // The current value exists in the optionList that has been selected before the change, and does not exist in the current optionList, then directly take the corresponding value from the selections, no need to construct a new option
368
- const indexInSelectedList = (0, _findIndex.default)(selectedOptionList).call(selectedOptionList, option => option.value === selectedValue);
329
+ const indexInSelectedList = selectedOptionList.findIndex(option => option.value === selectedValue);
369
330
 
370
331
  if (indexInSelectedList !== -1) {
371
332
  const option = selectedOptionList[indexInSelectedList];
@@ -377,10 +338,10 @@ class SelectFoundation extends _foundation.default {
377
338
  label: selectedValue,
378
339
  _notExist: true
379
340
  };
380
- onChangeWithObject ? optionNotExist = (0, _assign.default)((0, _assign.default)({}, propValue[i]), {
341
+ onChangeWithObject ? optionNotExist = Object.assign(Object.assign({}, propValue[i]), {
381
342
  _notExist: true
382
343
  }) : null;
383
- selections.set(optionNotExist.label, (0, _assign.default)((0, _assign.default)({}, optionNotExist), {
344
+ selections.set(optionNotExist.label, Object.assign(Object.assign({}, optionNotExist), {
384
345
  _scrollIndex: -1
385
346
  }));
386
347
  }
@@ -432,12 +393,11 @@ class SelectFoundation extends _foundation.default {
432
393
  const options = originalOptions || this.getState('options'); // When searchable, when the drop-down box expands
433
394
 
434
395
  if (isFilterable) {
435
- var _context4;
436
-
437
396
  // Also clears the options filter to show all candidates
438
397
  // Options created dynamically but not selected are also filtered out
439
398
  const sugInput = '';
440
- const newOptions = (0, _filter.default)(_context4 = this._filterOption(options, sugInput)).call(_context4, item => !item._inputCreateOnly);
399
+
400
+ const newOptions = this._filterOption(options, sugInput).filter(item => !item._inputCreateOnly);
441
401
 
442
402
  this._adapter.updateOptions(newOptions);
443
403
 
@@ -524,12 +484,12 @@ class SelectFoundation extends _foundation.default {
524
484
  } = _a,
525
485
  rest = __rest(_a, ["value", "label"]);
526
486
 
527
- const selections = new _map2.default().set(label, (0, _assign.default)({
487
+ const selections = new Map().set(label, Object.assign({
528
488
  value,
529
489
  label
530
490
  }, rest)); // First trigger onSelect, then trigger onChange
531
491
 
532
- this._notifySelect(value, (0, _assign.default)({
492
+ this._notifySelect(value, Object.assign({
533
493
  value,
534
494
  label
535
495
  }, rest)); // If it is a controlled component, directly notify
@@ -567,26 +527,26 @@ class SelectFoundation extends _foundation.default {
567
527
  } = this.getProps();
568
528
 
569
529
  if (selections.has(label)) {
570
- this._notifyDeselect(value, (0, _assign.default)({
530
+ this._notifyDeselect(value, Object.assign({
571
531
  value,
572
532
  label
573
533
  }, rest));
574
534
 
575
535
  selections.delete(label);
576
536
  } else if (maxLimit && selections.size === maxLimit) {
577
- this._adapter.notifyMaxLimit((0, _assign.default)({
537
+ this._adapter.notifyMaxLimit(Object.assign({
578
538
  value,
579
539
  label
580
540
  }, (0, _omit2.default)(rest, '_scrollIndex')));
581
541
 
582
542
  return;
583
543
  } else {
584
- this._notifySelect(value, (0, _assign.default)({
544
+ this._notifySelect(value, Object.assign({
585
545
  value,
586
546
  label
587
547
  }, rest));
588
548
 
589
- selections.set(label, (0, _assign.default)({
549
+ selections.set(label, Object.assign({
590
550
  value,
591
551
  label
592
552
  }, rest));
@@ -633,7 +593,7 @@ class SelectFoundation extends _foundation.default {
633
593
  }
634
594
 
635
595
  clearSelected() {
636
- const selections = new _map2.default();
596
+ const selections = new Map();
637
597
 
638
598
  if (this._isControlledComponent()) {
639
599
  this._notifyChange(selections);
@@ -665,7 +625,7 @@ class SelectFoundation extends _foundation.default {
665
625
  const {
666
626
  allowCreate
667
627
  } = this.getProps();
668
- const newOptions = (0, _map.default)(options).call(options, option => {
628
+ const newOptions = options.map(option => {
669
629
  if (selections.has(option.label)) {
670
630
  option._selected = true;
671
631
 
@@ -778,13 +738,11 @@ class SelectFoundation extends _foundation.default {
778
738
  } else if (typeof filter === 'boolean' && filter) {
779
739
  // 2. When true, the default filter is used
780
740
  const input = sugInput.toLowerCase();
781
- return (0, _map.default)(originalOptions).call(originalOptions, option => {
782
- var _context5;
783
-
741
+ return originalOptions.map(option => {
784
742
  const label = option.label.toString().toLowerCase();
785
743
  const groupLabel = option._parentGroup && option._parentGroup.label;
786
- const matchOption = (0, _includes.default)(label).call(label, input);
787
- const matchGroup = (0, _isString2.default)(groupLabel) && (0, _includes.default)(_context5 = groupLabel.toLowerCase()).call(_context5, input);
744
+ const matchOption = label.includes(input);
745
+ const matchGroup = (0, _isString2.default)(groupLabel) && groupLabel.toLowerCase().includes(input);
788
746
 
789
747
  if (matchOption || matchGroup) {
790
748
  option._show = true;
@@ -796,7 +754,7 @@ class SelectFoundation extends _foundation.default {
796
754
  });
797
755
  } else if (typeof filter === 'function') {
798
756
  // 3. When passing in a custom function, use a custom function for filtering
799
- return (0, _map.default)(originalOptions).call(originalOptions, option => {
757
+ return originalOptions.map(option => {
800
758
  filter(sugInput, option) ? option._show = true : option._show = false;
801
759
  return option;
802
760
  });
@@ -819,7 +777,7 @@ class SelectFoundation extends _foundation.default {
819
777
  };
820
778
  let createOptionIndex = -1;
821
779
  let matchOptionIndex = -1;
822
- (0, _forEach.default)(optionsAfterFilter).call(optionsAfterFilter, (option, index) => {
780
+ optionsAfterFilter.forEach((option, index) => {
823
781
  if (!option._show && !option._inputCreateOnly) {
824
782
  return;
825
783
  } // The matching algorithm is not necessarily through labels?
@@ -842,11 +800,11 @@ class SelectFoundation extends _foundation.default {
842
800
  }
843
801
 
844
802
  if (matchOptionIndex !== -1) {
845
- optionsAfterFilter = (0, _filter.default)(optionsAfterFilter).call(optionsAfterFilter, item => !item._inputCreateOnly);
803
+ optionsAfterFilter = optionsAfterFilter.filter(item => !item._inputCreateOnly);
846
804
  }
847
805
  } else {
848
806
  // Delete input unselected items
849
- optionsAfterFilter = (0, _filter.default)(optionsAfterFilter).call(optionsAfterFilter, item => !item._inputCreateOnly);
807
+ optionsAfterFilter = optionsAfterFilter.filter(item => !item._inputCreateOnly);
850
808
  }
851
809
  } // TODO Promise supports asynchronous creation
852
810
 
@@ -955,7 +913,7 @@ class SelectFoundation extends _foundation.default {
955
913
  focusIndex,
956
914
  options
957
915
  } = this.getStates();
958
- const visibleOptions = (0, _filter.default)(options).call(options, item => item._show); // let visibleOptions = options;
916
+ const visibleOptions = options.filter(item => item._show); // let visibleOptions = options;
959
917
 
960
918
  const optionsLength = visibleOptions.length;
961
919
  let index = focusIndex + offset;
@@ -1101,7 +1059,7 @@ class SelectFoundation extends _foundation.default {
1101
1059
  this.open();
1102
1060
  } else {
1103
1061
  if (focusIndex !== -1) {
1104
- const visibleOptions = (0, _filter.default)(options).call(options, item => item._show);
1062
+ const visibleOptions = options.filter(item => item._show);
1105
1063
  const {
1106
1064
  length
1107
1065
  } = visibleOptions; // fix issue 1201
@@ -1135,7 +1093,7 @@ class SelectFoundation extends _foundation.default {
1135
1093
  const length = selections.size;
1136
1094
 
1137
1095
  if (length && !inputValue) {
1138
- const keys = [...(0, _keys.default)(selections).call(selections)];
1096
+ const keys = [...selections.keys()];
1139
1097
  let index = length - 1;
1140
1098
  let targetLabel = keys[index];
1141
1099
  let targetItem = selections.get(targetLabel);
@@ -1168,7 +1126,7 @@ class SelectFoundation extends _foundation.default {
1168
1126
  } = this.getProps();
1169
1127
  const stateSelections = this.getState('selections');
1170
1128
  let notifyVal;
1171
- const selectionsProps = [...(0, _values.default)(selections).call(selections)];
1129
+ const selectionsProps = [...selections.values()];
1172
1130
 
1173
1131
  const isMultiple = this._isMultiple();
1174
1132
 
@@ -1192,7 +1150,7 @@ class SelectFoundation extends _foundation.default {
1192
1150
  break;
1193
1151
 
1194
1152
  case !onChangeWithObject && isMultiple:
1195
- notifyVal = selectionsProps.length ? (0, _map.default)(selectionsProps).call(selectionsProps, props => props.value) : [];
1153
+ notifyVal = selectionsProps.length ? selectionsProps.map(props => props.value) : [];
1196
1154
 
1197
1155
  this._adapter.notifyChange(notifyVal);
1198
1156
 
@@ -1205,7 +1163,7 @@ class SelectFoundation extends _foundation.default {
1205
1163
 
1206
1164
  _removeInternalKey(option) {
1207
1165
  // eslint-disable-next-line
1208
- let newOption = (0, _assign.default)({}, option);
1166
+ let newOption = Object.assign({}, option);
1209
1167
  delete newOption._parentGroup;
1210
1168
  delete newOption._show;
1211
1169
  delete newOption._selected;
@@ -1235,8 +1193,8 @@ class SelectFoundation extends _foundation.default {
1235
1193
  let diff = true;
1236
1194
 
1237
1195
  if (!isMultiple) {
1238
- const selectionProps = [...(0, _values.default)(selections).call(selections)];
1239
- const oldSelectionProps = [...(0, _values.default)(oldSelections).call(oldSelections)];
1196
+ const selectionProps = [...selections.values()];
1197
+ const oldSelectionProps = [...oldSelections.values()];
1240
1198
  const optionLabel = selectionProps[0] ? selectionProps[0].label : selectionProps[0];
1241
1199
  const oldOptionLabel = oldSelectionProps[0] ? oldSelectionProps[0].label : oldSelectionProps[0];
1242
1200
  diff = !(0, _isEqual2.default)(optionLabel, oldOptionLabel);
@@ -1251,8 +1209,8 @@ class SelectFoundation extends _foundation.default {
1251
1209
  const stateSelections = this.getState('selections');
1252
1210
  const values = [];
1253
1211
 
1254
- for (const item of (0, _entries.default)(selections).call(selections)) {
1255
- let val = (0, _assign.default)({
1212
+ for (const item of selections.entries()) {
1213
+ let val = Object.assign({
1256
1214
  label: item[0]
1257
1215
  }, item[1]);
1258
1216
  val = this._removeInternalKey(val);
@@ -1348,9 +1306,9 @@ class SelectFoundation extends _foundation.default {
1348
1306
  isOpen,
1349
1307
  isFocus
1350
1308
  } = this.getStates(); // Under normal circumstances, blur will be accompanied by clickOutsideHandler, so the notify of blur can be called uniformly in clickOutsideHandler
1351
- // But when autoFocus, because clickOutsideHandler is not register, you need to listen for the trigger's blur and trigger the notify callback
1309
+ // But when autoFocus or the panel is close, because clickOutsideHandler is not register or unregister, you need to listen for the trigger's blur and trigger the notify callback
1352
1310
 
1353
- if (autoFocus && isFocus && !isOpen) {
1311
+ if (isFocus && !isOpen) {
1354
1312
  this._notifyBlur(e);
1355
1313
  }
1356
1314
  }
@@ -1388,7 +1346,7 @@ class SelectFoundation extends _foundation.default {
1388
1346
  if (onChangeWithObject) {
1389
1347
  selectedValues = options;
1390
1348
  } else {
1391
- selectedValues = (0, _map.default)(options).call(options, option => option.value);
1349
+ selectedValues = options.map(option => option.value);
1392
1350
  }
1393
1351
 
1394
1352
  this.handleValueChange(selectedValues);
@@ -1411,7 +1369,7 @@ class SelectFoundation extends _foundation.default {
1411
1369
  } = currentProps;
1412
1370
  const selectedValues = value || defaultValue;
1413
1371
 
1414
- if (!(0, _isNullOrUndefined.default)(selectedValues) && !(0, _isArray.default)(selectedValues)) {
1372
+ if (!(0, _isNullOrUndefined.default)(selectedValues) && !Array.isArray(selectedValues)) {
1415
1373
  /* istanbul ignore next */
1416
1374
  (0, _warning.default)(true, '[Semi Select] defaultValue/value should be array type in multiple mode');
1417
1375
  }