@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
@@ -11,15 +11,6 @@ import _filter from "lodash/filter";
11
11
  import _get from "lodash/get";
12
12
  import _isEqualWith from "lodash/isEqualWith";
13
13
  import _cloneDeepWith from "lodash/cloneDeepWith";
14
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
15
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
16
- import _everyInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/every";
17
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
18
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
19
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
20
- import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
21
- import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
22
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
23
14
  import { strings, numbers } from './constants';
24
15
  import isNullOrUndefined from '../utils/isNullOrUndefined';
25
16
  import Logger from '../utils/Logger';
@@ -53,7 +44,7 @@ export function equalWith(value, other, customizer) {
53
44
  });
54
45
  }
55
46
  export function getColumnKey(column, keyPropNames) {
56
- keyPropNames = _Array$isArray(keyPropNames) ? keyPropNames : ['key', 'dataIndex'];
47
+ keyPropNames = Array.isArray(keyPropNames) ? keyPropNames : ['key', 'dataIndex'];
57
48
  let key = null;
58
49
 
59
50
  _each(keyPropNames, propName => {
@@ -77,13 +68,13 @@ export function mergeColumns() {
77
68
  const clone = deep ? cloneDeep : _clone;
78
69
 
79
70
  _map(newColumns, newColumn => {
80
- newColumn = _Object$assign({}, newColumn);
71
+ newColumn = Object.assign({}, newColumn);
81
72
  const key = getColumnKey(newColumn, keyPropNames);
82
73
 
83
74
  const oldColumn = key != null && _find(oldColumns, item => getColumnKey(item, keyPropNames) === key);
84
75
 
85
76
  if (oldColumn) {
86
- finalColumns.push(clone(_Object$assign(_Object$assign({}, oldColumn), newColumn)));
77
+ finalColumns.push(clone(Object.assign(Object.assign({}, oldColumn), newColumn)));
87
78
  } else {
88
79
  finalColumns.push(clone(newColumn));
89
80
  }
@@ -120,7 +111,7 @@ export function isLastLeftFixed(columns, column) {
120
111
 
121
112
  const leftFixedColumns = _filter(columns, col => col.fixed === true || col.fixed === 'left');
122
113
 
123
- const index = _findIndex(leftFixedColumns, col => _everyInstanceProperty(checkKeys).call(checkKeys, key => col[key] != null && col[key] === column[key]));
114
+ const index = _findIndex(leftFixedColumns, col => checkKeys.every(key => col[key] != null && col[key] === column[key]));
124
115
 
125
116
  return leftFixedColumns.length > 0 && index === leftFixedColumns.length - 1;
126
117
  }
@@ -129,7 +120,7 @@ export function isFirstFixedRight(columns, column) {
129
120
 
130
121
  const rightFixedColumns = _filter(columns, col => col.fixed === 'right');
131
122
 
132
- const index = _findIndex(rightFixedColumns, col => _everyInstanceProperty(checkKeys).call(checkKeys, key => col[key] != null && col[key] === column[key]));
123
+ const index = _findIndex(rightFixedColumns, col => checkKeys.every(key => col[key] != null && col[key] === column[key]));
133
124
 
134
125
  return rightFixedColumns.length > 0 && index === 0;
135
126
  }
@@ -140,28 +131,22 @@ export function isAnyFixed(columns) {
140
131
  fixedSet = [fixedSet];
141
132
  }
142
133
 
143
- return fixedSet.length > 0 && _some(columns, col => _includesInstanceProperty(fixedSet).call(fixedSet, col.fixed));
134
+ return fixedSet.length > 0 && _some(columns, col => fixedSet.includes(col.fixed));
144
135
  }
145
136
  export function isAnyFixedRight(columns) {
146
137
  return _some(columns, col => col.fixed === 'right');
147
138
  }
148
139
  export function isFixedLeft(column) {
149
- var _context;
150
-
151
- return _includesInstanceProperty(_context = ['left', true]).call(_context, _get(column, 'fixed'));
140
+ return ['left', true].includes(_get(column, 'fixed'));
152
141
  }
153
142
  export function isFixedRight(column) {
154
- var _context2;
155
-
156
- return _includesInstanceProperty(_context2 = ['right']).call(_context2, _get(column, 'fixed'));
143
+ return ['right'].includes(_get(column, 'fixed'));
157
144
  }
158
145
  export function isFixed(column) {
159
146
  return isFixedLeft(column) || isFixedRight(column);
160
147
  }
161
148
  export function isInnerColumnKey(key) {
162
- var _context3;
163
-
164
- return _includesInstanceProperty(_context3 = [strings.DEFAULT_KEY_COLUMN_EXPAND, strings.DEFAULT_KEY_COLUMN_SCROLLBAR, strings.DEFAULT_KEY_COLUMN_SELECTION]).call(_context3, key);
149
+ return [strings.DEFAULT_KEY_COLUMN_EXPAND, strings.DEFAULT_KEY_COLUMN_SCROLLBAR, strings.DEFAULT_KEY_COLUMN_SELECTION].includes(key);
165
150
  }
166
151
  export function isExpandedColumn(column) {
167
152
  return _get(column, 'key') === strings.DEFAULT_KEY_COLUMN_EXPAND;
@@ -174,7 +159,7 @@ export function isSelectionColumn(column) {
174
159
  }
175
160
  export function filterColumns(columns) {
176
161
  let ignoreKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [strings.DEFAULT_KEY_COLUMN_SCROLLBAR];
177
- return _filter(columns, col => !_includesInstanceProperty(ignoreKeys).call(ignoreKeys, col.key));
162
+ return _filter(columns, col => !ignoreKeys.includes(col.key));
178
163
  }
179
164
  /**
180
165
  * get width of scroll bar
@@ -274,9 +259,9 @@ export function flattenColumns(cols) {
274
259
  let childrenColumnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
275
260
  const list = [];
276
261
 
277
- if (_Array$isArray(cols) && cols.length) {
262
+ if (Array.isArray(cols) && cols.length) {
278
263
  for (const col of cols) {
279
- if (_Array$isArray(col[childrenColumnName]) && col[childrenColumnName].length) {
264
+ if (Array.isArray(col[childrenColumnName]) && col[childrenColumnName].length) {
280
265
  list.push(...flattenColumns(col[childrenColumnName], childrenColumnName));
281
266
  } else {
282
267
  warnIfNoDataIndex(col);
@@ -294,15 +279,13 @@ export function assignColumnKeys(columns) {
294
279
 
295
280
  _each(columns, (column, index) => {
296
281
  if (column.key == null) {
297
- var _context4;
298
-
299
282
  // if user give column a dataIndex, use it for backup
300
283
  const _index = column.dataIndex || index;
301
284
 
302
- column.key = _concatInstanceProperty(_context4 = "".concat(level, "-")).call(_context4, _index);
285
+ column.key = "".concat(level, "-").concat(_index);
303
286
  }
304
287
 
305
- if (_Array$isArray(column[childrenColumnName]) && column[childrenColumnName].length) {
288
+ if (Array.isArray(column[childrenColumnName]) && column[childrenColumnName].length) {
306
289
  sameLevelCols.push(...column[childrenColumnName]);
307
290
  }
308
291
  });
@@ -319,11 +302,11 @@ export function sliceColumnsByLevel(columns) {
319
302
  let currentLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
320
303
  const slicedColumns = [];
321
304
 
322
- if (_Array$isArray(columns) && columns.length && currentLevel <= targetLevel) {
323
- _forEachInstanceProperty(columns).call(columns, column => {
305
+ if (Array.isArray(columns) && columns.length && currentLevel <= targetLevel) {
306
+ columns.forEach(column => {
324
307
  const children = column[childrenColumnName];
325
308
 
326
- if (_Array$isArray(children) && children.length && currentLevel < targetLevel) {
309
+ if (Array.isArray(children) && children.length && currentLevel < targetLevel) {
327
310
  slicedColumns.push(...sliceColumnsByLevel(children, targetLevel, childrenColumnName, currentLevel + 1));
328
311
  } else {
329
312
  slicedColumns.push(column);
@@ -339,11 +322,11 @@ export function getColumnsByLevel(columns) {
339
322
  let currentLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
340
323
  let childrenColumnName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'children';
341
324
 
342
- if (_Array$isArray(columns) && columns.length) {
325
+ if (Array.isArray(columns) && columns.length) {
343
326
  if (targetLevel === currentLevel) {
344
327
  targetColumns.push(...columns);
345
328
  } else {
346
- _forEachInstanceProperty(columns).call(columns, column => {
329
+ columns.forEach(column => {
347
330
  getColumnsByLevel(column[childrenColumnName], targetLevel, targetColumns, currentLevel + 1, childrenColumnName);
348
331
  });
349
332
  }
@@ -355,14 +338,13 @@ export function getAllLevelColumns(columns) {
355
338
  let childrenColumnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
356
339
  const all = [];
357
340
 
358
- if (_Array$isArray(columns) && columns.length) {
341
+ if (Array.isArray(columns) && columns.length) {
359
342
  all.push([...columns]);
360
343
  const sameLevelColumns = [];
361
-
362
- _forEachInstanceProperty(columns).call(columns, column => {
344
+ columns.forEach(column => {
363
345
  const children = column[childrenColumnName];
364
346
 
365
- if (_Array$isArray(children) && children.length) {
347
+ if (Array.isArray(children) && children.length) {
366
348
  sameLevelColumns.push(...children);
367
349
  }
368
350
  });
@@ -391,7 +373,7 @@ export function findColumn(columns, column) {
391
373
  }
392
374
  }
393
375
 
394
- if (item && _Array$isArray(item[childrenColumnName]) && !found) {
376
+ if (item && Array.isArray(item[childrenColumnName]) && !found) {
395
377
  found = findColumn(item[childrenColumnName], column, childrenColumnName);
396
378
  }
397
379
 
@@ -413,10 +395,10 @@ export function expandBtnShouldInRow(props) {
413
395
  rowExpandable
414
396
  } = props;
415
397
  const hasExpandedRowRender = typeof expandedRowRender === 'function';
416
- return hideExpandedColumn && hasExpandedRowRender || !hasExpandedRowRender && _someInstanceProperty(dataSource).call(dataSource, record => {
398
+ return hideExpandedColumn && hasExpandedRowRender || !hasExpandedRowRender && dataSource.some(record => {
417
399
  const children = _get(record, childrenRecordName);
418
400
 
419
- if (_Array$isArray(children) && children.length || rowExpandable(record)) {
401
+ if (Array.isArray(children) && children.length || rowExpandable(record)) {
420
402
  return true;
421
403
  } else {
422
404
  return false;
@@ -434,9 +416,9 @@ export function mergeQueries(query) {
434
416
 
435
417
  let _mergedQuery;
436
418
 
437
- const idx = _findIndexInstanceProperty(queries).call(queries, item => {
419
+ const idx = queries.findIndex(item => {
438
420
  if (query.dataIndex === item.dataIndex) {
439
- _mergedQuery = _Object$assign(_Object$assign({}, item), query);
421
+ _mergedQuery = Object.assign(Object.assign({}, item), query);
440
422
  return true;
441
423
  }
442
424
 
@@ -444,7 +426,7 @@ export function mergeQueries(query) {
444
426
  });
445
427
 
446
428
  if (idx > -1) {
447
- _spliceInstanceProperty(queries).call(queries, idx, 1, _mergedQuery);
429
+ queries.splice(idx, 1, _mergedQuery);
448
430
  } else {
449
431
  queries.push(_mergedQuery);
450
432
  }
@@ -488,7 +470,7 @@ export function getAllDisabledRowKeys(_ref) {
488
470
  } = _ref;
489
471
  const disabledRowKeys = [];
490
472
 
491
- if (_Array$isArray(dataSource) && dataSource.length && typeof getCheckboxProps === 'function') {
473
+ if (Array.isArray(dataSource) && dataSource.length && typeof getCheckboxProps === 'function') {
492
474
  for (const record of dataSource) {
493
475
  const props = getCheckboxProps(record);
494
476
  const recordKey = typeof rowKey === 'function' ? rowKey(record) : _get(record, rowKey);
@@ -499,7 +481,7 @@ export function getAllDisabledRowKeys(_ref) {
499
481
 
500
482
  const children = _get(record, childrenRecordName);
501
483
 
502
- if (_Array$isArray(children) && children.length) {
484
+ if (Array.isArray(children) && children.length) {
503
485
  const keys = getAllDisabledRowKeys({
504
486
  dataSource: children,
505
487
  getCheckboxProps
@@ -520,7 +502,7 @@ export function warnIfNoDataIndex(column) {
520
502
  } = column;
521
503
  const logger = new Logger('[@douyinfe/semi-ui Table]');
522
504
 
523
- if ((_Array$isArray(filters) || _isFunction(sorter)) && isNullOrUndefined(dataIndex)) {
505
+ if ((Array.isArray(filters) || _isFunction(sorter)) && isNullOrUndefined(dataIndex)) {
524
506
  logger.warn("The column with sorter or filter must pass the 'dataIndex' prop");
525
507
  }
526
508
  }
@@ -536,11 +518,11 @@ export function isTreeTable(_ref2) {
536
518
  } = _ref2;
537
519
  let flag = false;
538
520
 
539
- if (_Array$isArray(dataSource)) {
521
+ if (Array.isArray(dataSource)) {
540
522
  for (const data of dataSource) {
541
523
  const children = _get(data, childrenRecordName);
542
524
 
543
- if (_Array$isArray(children) && children.length) {
525
+ if (Array.isArray(children) && children.length) {
544
526
  flag = true;
545
527
  break;
546
528
  }
@@ -1,14 +1,10 @@
1
1
  import _noop from "lodash/noop";
2
2
  import _get from "lodash/get";
3
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
4
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
5
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
6
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
7
3
  import BaseFoundation from '../base/foundation';
8
4
 
9
5
  class TabsFoundation extends BaseFoundation {
10
6
  constructor(adapter) {
11
- super(_Object$assign({}, adapter));
7
+ super(Object.assign({}, adapter));
12
8
  this.destroy = _noop;
13
9
 
14
10
  this.handlePrevent = event => {
@@ -17,16 +13,11 @@ class TabsFoundation extends BaseFoundation {
17
13
  };
18
14
 
19
15
  this.handleKeyDown = (event, itemKey, closable) => {
20
- var _context;
21
-
22
16
  const {
23
17
  preventScroll
24
18
  } = this.getProps();
25
-
26
- const tabs = _filterInstanceProperty(_context = [...event.target.parentNode.childNodes]).call(_context, item => {
27
- var _context2;
28
-
29
- return _includesInstanceProperty(_context2 = _get(item, 'attributes.data-tabkey.value', '')).call(_context2, 'semiTab') && _get(item, 'attributes.aria-disabled.value', '') !== "true";
19
+ const tabs = [...event.target.parentNode.childNodes].filter(item => {
20
+ return _get(item, 'attributes.data-tabkey.value', '').includes('semiTab') && _get(item, 'attributes.aria-disabled.value', '') !== "true";
30
21
  });
31
22
 
32
23
  switch (event.key) {
@@ -160,11 +151,9 @@ class TabsFoundation extends BaseFoundation {
160
151
 
161
152
  if (closable) {
162
153
  this.handleTabDelete(itemKey);
163
-
164
- const index = _indexOfInstanceProperty(tabs).call(tabs, event.target); // Move focus to next element after deletion
154
+ const index = tabs.indexOf(event.target); // Move focus to next element after deletion
165
155
  // If the element is the last removable tab, focus to its previous tab
166
156
 
167
-
168
157
  if (tabs.length !== 1) {
169
158
  tabs[index + 1 >= tabs.length ? index - 1 : index + 1].focus({
170
159
  preventScroll
@@ -177,9 +166,7 @@ class TabsFoundation extends BaseFoundation {
177
166
  const {
178
167
  preventScroll
179
168
  } = this.getProps();
180
-
181
- const index = _indexOfInstanceProperty(tabs).call(tabs, event.target);
182
-
169
+ const index = tabs.indexOf(event.target);
183
170
  const direction = {
184
171
  "ArrowLeft": -1,
185
172
  "ArrowUp": -1,
@@ -2,14 +2,6 @@ import _isUndefined from "lodash/isUndefined";
2
2
  import _isFunction from "lodash/isFunction";
3
3
  import _isNumber from "lodash/isNumber";
4
4
  import _isString from "lodash/isString";
5
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
6
- import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
7
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
8
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
9
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
10
- import _trimInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/trim";
11
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
12
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
13
5
  import BaseFoundation from '../base/foundation';
14
6
  import keyCode from '../utils/keyCode';
15
7
  import getSplitedArray from './utils/getSplitedArray';
@@ -18,7 +10,7 @@ import arrayMove from '../utils/arrayMove';
18
10
 
19
11
  class TagInputFoundation extends BaseFoundation {
20
12
  constructor(adapter) {
21
- super(_Object$assign({}, adapter));
13
+ super(Object.assign({}, adapter));
22
14
  /**
23
15
  * handler of input change
24
16
  */
@@ -96,8 +88,7 @@ class TagInputFoundation extends BaseFoundation {
96
88
  } = tagsArray;
97
89
 
98
90
  if (code === keyCode.BACKSPACE && inputValue === '' && length > 0) {
99
- const newTagList = _sliceInstanceProperty(tagsArray).call(tagsArray, 0, length - 1);
100
-
91
+ const newTagList = tagsArray.slice(0, length - 1);
101
92
  const removedTag = tagsArray[length - 1];
102
93
 
103
94
  this._onRemove(newTagList, removedTag, length - 1);
@@ -121,24 +112,23 @@ class TagInputFoundation extends BaseFoundation {
121
112
  } = this._adapter.getStates();
122
113
 
123
114
  let addTags = getSplitedArray(inputValue, separator);
124
- addTags = _filterInstanceProperty(addTags).call(addTags, (item, idx) => {
115
+ addTags = addTags.filter((item, idx) => {
125
116
  // If allowDuplicates is false, then filter duplicates
126
117
  if (!allowDuplicates) {
127
- if (_includesInstanceProperty(tagsArray).call(tagsArray, item) || _indexOfInstanceProperty(addTags).call(addTags, item) !== idx) {
118
+ if (tagsArray.includes(item) || addTags.indexOf(item) !== idx) {
128
119
  return false;
129
120
  }
130
121
  } // Filter empty strings and pure space strings in new items
131
122
 
132
123
 
133
- return _isString(item) && _trimInstanceProperty(item).call(item) !== '';
124
+ return _isString(item) && item.trim() !== '';
134
125
  });
135
-
136
- let newTagList = _concatInstanceProperty(tagsArray).call(tagsArray, addTags);
126
+ let newTagList = tagsArray.concat(addTags);
137
127
 
138
128
  if (_isNumber(max) && newTagList.length > max) {
139
129
  _isFunction(onExceed) && onExceed(newTagList);
140
- newTagList = _sliceInstanceProperty(newTagList).call(newTagList, 0, max);
141
- addTags = _sliceInstanceProperty(addTags).call(addTags, 0, max - tagsArray.length);
130
+ newTagList = newTagList.slice(0, max);
131
+ addTags = addTags.slice(0, max - tagsArray.length);
142
132
  }
143
133
 
144
134
  if (addTags.length > 0) {
@@ -206,9 +196,7 @@ class TagInputFoundation extends BaseFoundation {
206
196
  } = this._adapter.getStates();
207
197
 
208
198
  const newTagList = [...tagsArray];
209
-
210
- _spliceInstanceProperty(newTagList).call(newTagList, index, 1);
211
-
199
+ newTagList.splice(index, 1);
212
200
  const removedTag = tagsArray[index];
213
201
 
214
202
  this._onRemove(newTagList, removedTag, index);
@@ -1,10 +1,3 @@
1
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
2
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
3
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
4
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
5
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
- import _parseInt from "@babel/runtime-corejs3/core-js-stable/parse-int";
7
- import _Date$now from "@babel/runtime-corejs3/core-js-stable/date/now";
8
1
  import { strings } from './constants';
9
2
  import BaseFoundation from '../base/foundation';
10
3
  import { isValidDate } from '../datePicker/_utils/index';
@@ -21,7 +14,7 @@ export const formatOption = (option, disabledOptions) => {
21
14
 
22
15
  let disabled = false;
23
16
 
24
- if (disabledOptions && _indexOfInstanceProperty(disabledOptions).call(disabledOptions, option) >= 0) {
17
+ if (disabledOptions && disabledOptions.indexOf(option) >= 0) {
25
18
  disabled = true;
26
19
  }
27
20
 
@@ -36,7 +29,7 @@ function generateOptions(length, disabledOptions, hideDisabledOptions) {
36
29
  const arr = [];
37
30
 
38
31
  for (let value = 0; value < length; value += step) {
39
- if (!disabledOptions || _indexOfInstanceProperty(disabledOptions).call(disabledOptions, value) < 0 || !hideDisabledOptions) {
32
+ if (!disabledOptions || disabledOptions.indexOf(value) < 0 || !hideDisabledOptions) {
40
33
  arr.push(value);
41
34
  }
42
35
  }
@@ -46,7 +39,7 @@ function generateOptions(length, disabledOptions, hideDisabledOptions) {
46
39
 
47
40
  class ComboboxFoundation extends BaseFoundation {
48
41
  constructor(adapter) {
49
- super(_Object$assign({}, adapter));
42
+ super(Object.assign({}, adapter));
50
43
  }
51
44
 
52
45
  isAM() {
@@ -104,13 +97,11 @@ class ComboboxFoundation extends BaseFoundation {
104
97
  } = this.getProps();
105
98
  let disabledOptions = disabledHours && disabledHours();
106
99
 
107
- if (use12Hours && _Array$isArray(disabledOptions)) {
100
+ if (use12Hours && Array.isArray(disabledOptions)) {
108
101
  if (this.isAM()) {
109
- var _context;
110
-
111
- disabledOptions = _mapInstanceProperty(_context = _filterInstanceProperty(disabledOptions).call(disabledOptions, h => h < 12)).call(_context, h => h === 0 ? 12 : h);
102
+ disabledOptions = disabledOptions.filter(h => h < 12).map(h => h === 0 ? 12 : h);
112
103
  } else {
113
- disabledOptions = _mapInstanceProperty(disabledOptions).call(disabledOptions, h => h === 12 ? 12 : h - 12);
104
+ disabledOptions = disabledOptions.map(h => h === 12 ? 12 : h - 12);
114
105
  }
115
106
  }
116
107
 
@@ -157,7 +148,7 @@ class ComboboxFoundation extends BaseFoundation {
157
148
 
158
149
 
159
150
  createDateDefault() {
160
- return new Date(_parseInt(String(_Date$now() / DAY), 10) * DAY - 8 * HOUR);
151
+ return new Date(parseInt(String(Date.now() / DAY), 10) * DAY - 8 * HOUR);
161
152
  }
162
153
 
163
154
  }
@@ -1,10 +1,4 @@
1
1
  import _split from "lodash/split";
2
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
3
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
4
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
5
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
7
- import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
8
2
 
9
3
  /* eslint-disable max-len */
10
4
  import { strings } from './constants';
@@ -16,7 +10,7 @@ import isNullOrUndefined from '../utils/isNullOrUndefined'; // TODO: split, time
16
10
 
17
11
  class TimePickerFoundation extends BaseFoundation {
18
12
  constructor(adapter) {
19
- super(_Object$assign({}, adapter));
13
+ super(Object.assign({}, adapter));
20
14
  }
21
15
 
22
16
  init() {
@@ -55,11 +49,9 @@ class TimePickerFoundation extends BaseFoundation {
55
49
  }
56
50
 
57
51
  isValidTimeZone(timeZone) {
58
- var _context;
59
-
60
52
  const _timeZone = timeZone === undefined ? this.getProp('timeZone') : timeZone;
61
53
 
62
- return _includesInstanceProperty(_context = ['string', 'number']).call(_context, typeof _timeZone) && _timeZone !== '';
54
+ return ['string', 'number'].includes(typeof _timeZone) && _timeZone !== '';
63
55
  }
64
56
 
65
57
  getDefaultFormatIfNeed() {
@@ -87,24 +79,21 @@ class TimePickerFoundation extends BaseFoundation {
87
79
  } = this.getProps();
88
80
  value = value || defaultValue;
89
81
 
90
- if (!_Array$isArray(value)) {
82
+ if (!Array.isArray(value)) {
91
83
  value = value ? [value] : [];
92
84
  }
93
85
 
94
86
  const parsedValues = [];
95
87
  let invalid = false;
96
-
97
- _forEachInstanceProperty(value).call(value, v => {
88
+ value.forEach(v => {
98
89
  const pv = parseToDate(v, formatToken, dateFnsLocale);
99
90
 
100
91
  if (!isNaN(pv.getTime())) {
101
92
  parsedValues.push(this.isValidTimeZone() ? utcToZonedTime(pv, timeZone) : pv);
102
93
  }
103
94
  });
104
-
105
95
  const isAM = [true, false];
106
-
107
- _mapInstanceProperty(parsedValues).call(parsedValues, (item, idx) => {
96
+ parsedValues.map((item, idx) => {
108
97
  isAM[idx] = getHours(item) < 12;
109
98
  });
110
99
 
@@ -121,7 +110,7 @@ class TimePickerFoundation extends BaseFoundation {
121
110
  let inputValue = '';
122
111
 
123
112
  if (!invalid) {
124
- inputValue = _mapInstanceProperty(value).call(value, v => formatToString(v, formatToken, dateFnsLocale)).join(rangeSeparator);
113
+ inputValue = value.map(v => formatToString(v, formatToken, dateFnsLocale)).join(rangeSeparator);
125
114
  }
126
115
 
127
116
  this.setState({
@@ -197,7 +186,7 @@ class TimePickerFoundation extends BaseFoundation {
197
186
 
198
187
  if (!invalid) {
199
188
  if (this.isValidTimeZone(timeZone)) {
200
- dates = _mapInstanceProperty(dates).call(dates, date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
189
+ dates = dates.map(date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
201
190
  }
202
191
 
203
192
  const inputValue = this.formatValue(dates);
@@ -275,7 +264,7 @@ class TimePickerFoundation extends BaseFoundation {
275
264
  * -when emptying, the input is "', at this time you need to skip isTimeFormatLike judgment
276
265
  */
277
266
 
278
- if (input !== '' && _someInstanceProperty(inputValues).call(inputValues, time => !isTimeFormatLike(time, formatToken))) {
267
+ if (input !== '' && inputValues.some(time => !isTimeFormatLike(time, formatToken))) {
279
268
  return;
280
269
  }
281
270
 
@@ -306,7 +295,7 @@ class TimePickerFoundation extends BaseFoundation {
306
295
  doValidate(args) {
307
296
  if (typeof args === 'string') {
308
297
  return this.validateStr(args);
309
- } else if (_Array$isArray(args)) {
298
+ } else if (Array.isArray(args)) {
310
299
  return this.validateDates(args);
311
300
  }
312
301
 
@@ -321,11 +310,10 @@ class TimePickerFoundation extends BaseFoundation {
321
310
 
322
311
  validateDates() {
323
312
  let dates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
324
-
325
- let invalid = _someInstanceProperty(dates).call(dates, d => isNaN(Number(d)));
313
+ let invalid = dates.some(d => isNaN(Number(d)));
326
314
 
327
315
  if (!invalid) {
328
- invalid = _someInstanceProperty(dates).call(dates, d => this.isDisabledHMS({
316
+ invalid = dates.some(d => this.isDisabledHMS({
329
317
  hours: d.getHours(),
330
318
  minutes: d.getMinutes(),
331
319
  seconds: d.getSeconds()
@@ -366,12 +354,12 @@ class TimePickerFoundation extends BaseFoundation {
366
354
  const dateFnsLocale = this.getProp('dateFnsLocale');
367
355
  let _dates = dates;
368
356
 
369
- if (_dates && !_Array$isArray(_dates)) {
357
+ if (_dates && !Array.isArray(_dates)) {
370
358
  _dates = _dates[_dates];
371
359
  }
372
360
 
373
- if (_dates && _Array$isArray(_dates)) {
374
- return _mapInstanceProperty(_dates).call(_dates, date => formatToString(date, validFormat, dateFnsLocale)).join(rangeSeparator);
361
+ if (_dates && Array.isArray(_dates)) {
362
+ return _dates.map(date => formatToString(date, validFormat, dateFnsLocale)).join(rangeSeparator);
375
363
  }
376
364
 
377
365
  return undefined;
@@ -383,9 +371,7 @@ class TimePickerFoundation extends BaseFoundation {
383
371
  const dateFnsLocale = this.getProp('dateFnsLocale');
384
372
 
385
373
  if (str && typeof str === 'string') {
386
- var _context2;
387
-
388
- return _mapInstanceProperty(_context2 = _split(str, rangeSeparator)).call(_context2, v => parseToDate(v, validFormat, dateFnsLocale));
374
+ return _split(str, rangeSeparator).map(v => parseToDate(v, validFormat, dateFnsLocale));
389
375
  }
390
376
 
391
377
  return [];
@@ -397,12 +383,12 @@ class TimePickerFoundation extends BaseFoundation {
397
383
  const dateFnsLocale = this.getProp('dateFnsLocale');
398
384
  let _value = value;
399
385
 
400
- if (!_Array$isArray(_value)) {
386
+ if (!Array.isArray(_value)) {
401
387
  _value = _value ? [_value] : [];
402
388
  }
403
389
 
404
- if (_Array$isArray(_value)) {
405
- return _mapInstanceProperty(_value).call(_value, v => parseToDate(v, formatToken, dateFnsLocale));
390
+ if (Array.isArray(_value)) {
391
+ return _value.map(v => parseToDate(v, formatToken, dateFnsLocale));
406
392
  }
407
393
 
408
394
  return [];
@@ -417,15 +403,15 @@ class TimePickerFoundation extends BaseFoundation {
417
403
  const rangeSeparator = this.getProp('rangeSeparator');
418
404
  str = _split(inputValue, rangeSeparator);
419
405
  } else {
420
- _value = _Array$isArray(_value) ? _value[0] : _value;
406
+ _value = Array.isArray(_value) ? _value[0] : _value;
421
407
  }
422
408
 
423
409
  if (this.isValidTimeZone() && _value) {
424
410
  const formatToken = this.getValidFormat();
425
411
 
426
- if (_Array$isArray(_value)) {
427
- _value = _mapInstanceProperty(_value).call(_value, v => zonedTimeToUtc(v, timeZone));
428
- str = _mapInstanceProperty(_value).call(_value, v => format(v, formatToken));
412
+ if (Array.isArray(_value)) {
413
+ _value = _value.map(v => zonedTimeToUtc(v, timeZone));
414
+ str = _value.map(v => format(v, formatToken));
429
415
  } else {
430
416
  _value = zonedTimeToUtc(_value, timeZone);
431
417
  str = format(_value, formatToken);
@@ -446,7 +432,7 @@ class TimePickerFoundation extends BaseFoundation {
446
432
  let oldDates = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
447
433
  const formatToken = this.getValidFormat();
448
434
  const dateFnsLocale = this.getProp('dateFnsLocale');
449
- return dates.length !== oldDates.length || _someInstanceProperty(dates).call(dates, (date, index) => {
435
+ return dates.length !== oldDates.length || dates.some((date, index) => {
450
436
  const oldDate = oldDates[index];
451
437
 
452
438
  if (isValid(date) && isValid(oldDate) && formatToString(date, formatToken, dateFnsLocale) === formatToString(oldDate, formatToken, dateFnsLocale)) {
@@ -1,10 +1,9 @@
1
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
2
1
  import BaseFoundation from '../base/foundation';
3
2
  import isNullOrUndefined from '../utils/isNullOrUndefined';
4
3
 
5
4
  class TimePickerFoundation extends BaseFoundation {
6
5
  constructor(adapter) {
7
- super(_Object$assign({}, adapter));
6
+ super(Object.assign({}, adapter));
8
7
  } // eslint-disable-next-line @typescript-eslint/no-empty-function
9
8
 
10
9