@douyinfe/semi-foundation 2.19.0-alpha.8 → 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 (350) 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/popconfirm.css +1 -7
  116. package/lib/cjs/popconfirm/popconfirm.scss +1 -11
  117. package/lib/cjs/popconfirm/popconfirmFoundation.js +3 -6
  118. package/lib/cjs/popover/constants.js +2 -9
  119. package/lib/cjs/progress/constants.js +1 -4
  120. package/lib/cjs/radio/constants.js +1 -4
  121. package/lib/cjs/radio/radioFoundation.js +3 -6
  122. package/lib/cjs/radio/radioGroupFoundation.js +6 -11
  123. package/lib/cjs/radio/radioInnerFoundation.js +5 -10
  124. package/lib/cjs/rating/constants.js +1 -4
  125. package/lib/cjs/rating/foundation.js +7 -20
  126. package/lib/cjs/scrollList/constants.js +1 -4
  127. package/lib/cjs/scrollList/foundation.js +3 -6
  128. package/lib/cjs/scrollList/itemFoundation.js +8 -21
  129. package/lib/cjs/scrollList/scrollTo.js +1 -4
  130. package/lib/cjs/select/constants.js +1 -4
  131. package/lib/cjs/select/foundation.js +56 -98
  132. package/lib/cjs/select/optionFoundation.js +4 -9
  133. package/lib/cjs/sideSheet/constants.js +1 -4
  134. package/lib/cjs/sideSheet/sideSheet.css +1 -0
  135. package/lib/cjs/sideSheet/sideSheet.scss +1 -0
  136. package/lib/cjs/sideSheet/sideSheetFoundation.js +6 -15
  137. package/lib/cjs/skeleton/constants.js +1 -4
  138. package/lib/cjs/slider/constants.js +1 -4
  139. package/lib/cjs/slider/foundation.js +32 -33
  140. package/lib/cjs/space/constants.js +1 -4
  141. package/lib/cjs/spin/constants.js +1 -4
  142. package/lib/cjs/spin/foundation.js +5 -12
  143. package/lib/cjs/steps/constants.js +1 -4
  144. package/lib/cjs/switch/constants.js +1 -4
  145. package/lib/cjs/switch/foundation.js +4 -9
  146. package/lib/cjs/table/bodyFoundation.js +9 -22
  147. package/lib/cjs/table/cellFoundation.js +3 -6
  148. package/lib/cjs/table/constants.js +1 -4
  149. package/lib/cjs/table/foundation.js +76 -117
  150. package/lib/cjs/table/mixin.scss +2 -2
  151. package/lib/cjs/table/rtl.scss +8 -8
  152. package/lib/cjs/table/table.scss +16 -16
  153. package/lib/cjs/table/tableRowFoundation.js +3 -6
  154. package/lib/cjs/table/tableSelectionCellFoundation.js +3 -6
  155. package/lib/cjs/table/utils.js +42 -71
  156. package/lib/cjs/table/variables.scss +0 -3
  157. package/lib/cjs/tabs/constants.js +1 -4
  158. package/lib/cjs/tabs/foundation.js +8 -23
  159. package/lib/cjs/tag/constants.js +1 -4
  160. package/lib/cjs/tagInput/constants.js +1 -4
  161. package/lib/cjs/tagInput/foundation.js +12 -31
  162. package/lib/cjs/tagInput/utils/getSplitedArray.js +3 -6
  163. package/lib/cjs/timePicker/ComboxFoundation.js +10 -29
  164. package/lib/cjs/timePicker/constants.js +1 -4
  165. package/lib/cjs/timePicker/foundation.js +26 -45
  166. package/lib/cjs/timePicker/inputFoundation.js +4 -9
  167. package/lib/cjs/timePicker/utils/index.js +7 -14
  168. package/lib/cjs/timePicker/utils/localeDate.js +2 -9
  169. package/lib/cjs/timeline/constants.js +1 -4
  170. package/lib/cjs/toast/constants.js +1 -4
  171. package/lib/cjs/toast/toastFoundation.js +5 -12
  172. package/lib/cjs/toast/toastListFoundation.js +5 -12
  173. package/lib/cjs/tooltip/constants.js +1 -4
  174. package/lib/cjs/tooltip/foundation.js +29 -56
  175. package/lib/cjs/transfer/constants.js +1 -4
  176. package/lib/cjs/transfer/foundation.js +24 -47
  177. package/lib/cjs/transfer/transferUtils.js +16 -45
  178. package/lib/cjs/tree/constants.js +1 -4
  179. package/lib/cjs/tree/foundation.js +41 -76
  180. package/lib/cjs/tree/tree.css +3 -0
  181. package/lib/cjs/tree/tree.scss +4 -0
  182. package/lib/cjs/tree/treeUtil.d.ts +1 -1
  183. package/lib/cjs/tree/treeUtil.js +60 -107
  184. package/lib/cjs/treeSelect/constants.js +1 -4
  185. package/lib/cjs/treeSelect/foundation.js +49 -82
  186. package/lib/cjs/typography/constants.js +1 -4
  187. package/lib/cjs/upload/constants.d.ts +1 -1
  188. package/lib/cjs/upload/constants.js +1 -4
  189. package/lib/cjs/upload/foundation.js +56 -112
  190. package/lib/cjs/upload/utils.js +13 -32
  191. package/lib/cjs/utils/Event.js +9 -23
  192. package/lib/cjs/utils/FocusHandle.js +6 -15
  193. package/lib/cjs/utils/Logger.js +1 -4
  194. package/lib/cjs/utils/Store.js +5 -20
  195. package/lib/cjs/utils/a11y.js +8 -13
  196. package/lib/cjs/utils/array.js +6 -15
  197. package/lib/cjs/utils/arrayMove.js +3 -12
  198. package/lib/cjs/utils/classnames.js +6 -15
  199. package/lib/cjs/utils/date-fns-extra.js +7 -18
  200. package/lib/cjs/utils/dom.js +5 -12
  201. package/lib/cjs/utils/function.js +1 -4
  202. package/lib/cjs/utils/getDataAttr.js +2 -13
  203. package/lib/cjs/utils/getHighlight.js +7 -22
  204. package/lib/cjs/utils/getMotionObjFromProps.js +4 -9
  205. package/lib/cjs/utils/index.js +5 -15
  206. package/lib/cjs/utils/isBothNaN.js +1 -4
  207. package/lib/cjs/utils/isElement.js +1 -4
  208. package/lib/cjs/utils/isEnterPress.js +3 -6
  209. package/lib/cjs/utils/isEscPress.js +3 -6
  210. package/lib/cjs/utils/isNullOrUndefined.js +1 -4
  211. package/lib/cjs/utils/isNumber.js +1 -4
  212. package/lib/cjs/utils/isObject.js +1 -4
  213. package/lib/cjs/utils/isPromise.js +3 -6
  214. package/lib/cjs/utils/isString.js +1 -4
  215. package/lib/cjs/utils/keyCode.js +1 -4
  216. package/lib/cjs/utils/log.js +3 -6
  217. package/lib/cjs/utils/number.js +1 -4
  218. package/lib/cjs/utils/object.js +10 -27
  219. package/lib/cjs/utils/set.js +4 -9
  220. package/lib/cjs/utils/shallowEqualObjects.js +3 -10
  221. package/lib/cjs/utils/touchPolyfill.js +5 -12
  222. package/lib/cjs/utils/type.js +1 -3
  223. package/lib/cjs/utils/uuid.js +3 -14
  224. package/lib/cjs/utils/warning.js +1 -4
  225. package/lib/es/anchor/anchor.css +1 -10
  226. package/lib/es/anchor/anchor.scss +1 -8
  227. package/lib/es/anchor/foundation.js +2 -4
  228. package/lib/es/anchor/linkFoundation.js +1 -2
  229. package/lib/es/anchor/rtl.scss +0 -1
  230. package/lib/es/anchor/variables.scss +1 -0
  231. package/lib/es/autoComplete/foundation.js +11 -26
  232. package/lib/es/autoComplete/optionFoundation.js +1 -2
  233. package/lib/es/avatar/foundation.js +1 -2
  234. package/lib/es/backtop/foundation.js +1 -2
  235. package/lib/es/banner/foundation.js +1 -2
  236. package/lib/es/base/foundation.js +2 -3
  237. package/lib/es/breadcrumb/foundation.js +3 -6
  238. package/lib/es/breadcrumb/itemFoundation.js +1 -2
  239. package/lib/es/calendar/eventUtil.d.ts +3 -3
  240. package/lib/es/calendar/eventUtil.js +27 -56
  241. package/lib/es/calendar/foundation.js +60 -90
  242. package/lib/es/carousel/foundation.js +2 -4
  243. package/lib/es/cascader/foundation.js +49 -94
  244. package/lib/es/cascader/util.js +6 -21
  245. package/lib/es/checkbox/checkboxFoundation.js +3 -6
  246. package/lib/es/checkbox/checkboxGroupFoundation.js +6 -9
  247. package/lib/es/collapse/foundation.js +6 -10
  248. package/lib/es/datePicker/_utils/formatter.js +2 -5
  249. package/lib/es/datePicker/_utils/getDefaultPickerDate.js +2 -3
  250. package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -4
  251. package/lib/es/datePicker/_utils/getMonthTable.js +1 -5
  252. package/lib/es/datePicker/_utils/getMonthsInYear.js +2 -9
  253. package/lib/es/datePicker/_utils/getYears.js +1 -3
  254. package/lib/es/datePicker/constants.js +2 -7
  255. package/lib/es/datePicker/foundation.js +39 -70
  256. package/lib/es/datePicker/inputFoundation.js +4 -11
  257. package/lib/es/datePicker/monthFoundation.js +2 -4
  258. package/lib/es/datePicker/monthsGridFoundation.js +40 -55
  259. package/lib/es/datePicker/yearAndMonthFoundation.js +1 -2
  260. package/lib/es/dropdown/foundation.js +4 -7
  261. package/lib/es/dropdown/menuFoundation.js +8 -21
  262. package/lib/es/form/foundation.js +59 -91
  263. package/lib/es/form/utils.js +11 -19
  264. package/lib/es/input/foundation.js +4 -9
  265. package/lib/es/input/textareaFoundation.js +3 -5
  266. package/lib/es/input/util/calculateNodeHeight.js +2 -10
  267. package/lib/es/input/util/getSizingData.js +2 -5
  268. package/lib/es/inputNumber/constants.js +3 -8
  269. package/lib/es/inputNumber/foundation.js +8 -18
  270. package/lib/es/modal/modalContentFoundation.js +1 -2
  271. package/lib/es/modal/modalFoundation.js +1 -2
  272. package/lib/es/navigation/NavItem.js +5 -11
  273. package/lib/es/navigation/foundation.js +19 -25
  274. package/lib/es/navigation/itemFoundation.js +1 -3
  275. package/lib/es/navigation/subNavFoundation.js +7 -13
  276. package/lib/es/notification/notificationFoundation.js +2 -4
  277. package/lib/es/notification/notificationListFoundation.js +1 -3
  278. package/lib/es/overflowList/constants.js +2 -3
  279. package/lib/es/overflowList/foundation.js +9 -23
  280. package/lib/es/pagination/foundation.js +15 -28
  281. package/lib/es/popconfirm/popconfirm.css +1 -7
  282. package/lib/es/popconfirm/popconfirm.scss +1 -11
  283. package/lib/es/popover/constants.js +1 -2
  284. package/lib/es/radio/radioGroupFoundation.js +3 -4
  285. package/lib/es/radio/radioInnerFoundation.js +2 -3
  286. package/lib/es/rating/foundation.js +4 -13
  287. package/lib/es/scrollList/itemFoundation.js +5 -13
  288. package/lib/es/select/foundation.js +50 -88
  289. package/lib/es/select/optionFoundation.js +1 -2
  290. package/lib/es/sideSheet/sideSheet.css +1 -0
  291. package/lib/es/sideSheet/sideSheet.scss +1 -0
  292. package/lib/es/sideSheet/sideSheetFoundation.js +3 -7
  293. package/lib/es/slider/foundation.js +29 -25
  294. package/lib/es/spin/foundation.js +2 -4
  295. package/lib/es/switch/foundation.js +1 -2
  296. package/lib/es/table/bodyFoundation.js +6 -11
  297. package/lib/es/table/foundation.js +67 -93
  298. package/lib/es/table/mixin.scss +2 -2
  299. package/lib/es/table/rtl.scss +8 -8
  300. package/lib/es/table/table.scss +16 -16
  301. package/lib/es/table/utils.js +33 -51
  302. package/lib/es/table/variables.scss +0 -3
  303. package/lib/es/tabs/foundation.js +5 -18
  304. package/lib/es/tagInput/foundation.js +9 -21
  305. package/lib/es/timePicker/ComboxFoundation.js +7 -16
  306. package/lib/es/timePicker/foundation.js +23 -37
  307. package/lib/es/timePicker/inputFoundation.js +1 -2
  308. package/lib/es/timePicker/utils/index.js +4 -6
  309. package/lib/es/timePicker/utils/localeDate.js +1 -2
  310. package/lib/es/toast/toastFoundation.js +2 -4
  311. package/lib/es/toast/toastListFoundation.js +2 -4
  312. package/lib/es/tooltip/foundation.js +26 -46
  313. package/lib/es/transfer/foundation.js +21 -43
  314. package/lib/es/transfer/transferUtils.js +13 -33
  315. package/lib/es/tree/foundation.js +38 -70
  316. package/lib/es/tree/tree.css +3 -0
  317. package/lib/es/tree/tree.scss +4 -0
  318. package/lib/es/tree/treeUtil.d.ts +1 -1
  319. package/lib/es/tree/treeUtil.js +57 -109
  320. package/lib/es/treeSelect/foundation.js +45 -73
  321. package/lib/es/upload/constants.d.ts +1 -1
  322. package/lib/es/upload/foundation.js +52 -118
  323. package/lib/es/upload/utils.js +12 -25
  324. package/lib/es/utils/Event.js +5 -12
  325. package/lib/es/utils/FocusHandle.js +3 -7
  326. package/lib/es/utils/Store.js +4 -12
  327. package/lib/es/utils/a11y.js +5 -6
  328. package/lib/es/utils/array.js +3 -5
  329. package/lib/es/utils/arrayMove.js +2 -6
  330. package/lib/es/utils/classnames.js +3 -6
  331. package/lib/es/utils/date-fns-extra.js +6 -14
  332. package/lib/es/utils/dom.js +1 -2
  333. package/lib/es/utils/getDataAttr.js +1 -5
  334. package/lib/es/utils/getHighlight.js +4 -14
  335. package/lib/es/utils/getMotionObjFromProps.js +1 -2
  336. package/lib/es/utils/object.js +7 -15
  337. package/lib/es/utils/set.js +1 -2
  338. package/lib/es/utils/shallowEqualObjects.js +2 -5
  339. package/lib/es/utils/touchPolyfill.js +2 -6
  340. package/lib/es/utils/uuid.js +2 -7
  341. package/package.json +2 -4
  342. package/popconfirm/popconfirm.scss +1 -11
  343. package/select/foundation.ts +2 -2
  344. package/sideSheet/sideSheet.scss +1 -0
  345. package/slider/foundation.ts +15 -8
  346. package/table/mixin.scss +2 -2
  347. package/table/rtl.scss +8 -8
  348. package/table/table.scss +16 -16
  349. package/table/variables.scss +0 -3
  350. package/tree/tree.scss +4 -0
@@ -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
 
@@ -1,6 +1,4 @@
1
1
  import _toNumber from "lodash/toNumber";
2
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
3
- import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
4
2
 
5
3
  /* eslint-disable max-len */
6
4
  import { format, parse } from 'date-fns';
@@ -64,7 +62,7 @@ export const hourIsDisabled = (disabledHours, hour) => {
64
62
  if (typeof disabledHours === 'function') {
65
63
  const disabledOptions = disabledHours();
66
64
 
67
- if (_Array$isArray(disabledOptions) && !isNullOrUndefined(hour) && _someInstanceProperty(disabledOptions).call(disabledOptions, v => _toNumber(v) === _toNumber(hour))) {
65
+ if (Array.isArray(disabledOptions) && !isNullOrUndefined(hour) && disabledOptions.some(v => _toNumber(v) === _toNumber(hour))) {
68
66
  return true;
69
67
  }
70
68
  }
@@ -75,7 +73,7 @@ export const minuteIsDisabled = (disabledMinutes, hour, minute) => {
75
73
  if (typeof disabledMinutes === 'function') {
76
74
  const disabledOptions = disabledMinutes(hour);
77
75
 
78
- if (_Array$isArray(disabledOptions) && !isNullOrUndefined(hour) && !isNullOrUndefined(minute) && _someInstanceProperty(disabledOptions).call(disabledOptions, v => _toNumber(v) === _toNumber(minute))) {
76
+ if (Array.isArray(disabledOptions) && !isNullOrUndefined(hour) && !isNullOrUndefined(minute) && disabledOptions.some(v => _toNumber(v) === _toNumber(minute))) {
79
77
  return true;
80
78
  }
81
79
  }
@@ -86,7 +84,7 @@ export const secondIsDisabled = (disabledSeconds, hour, minute, second) => {
86
84
  if (typeof disabledSeconds === 'function') {
87
85
  const disabledOptions = disabledSeconds(hour, minute);
88
86
 
89
- if (_Array$isArray(disabledOptions) && !isNullOrUndefined(hour) && !isNullOrUndefined(minute) && !isNullOrUndefined(second) && _someInstanceProperty(disabledOptions).call(disabledOptions, v => _toNumber(v) === _toNumber(second))) {
87
+ if (Array.isArray(disabledOptions) && !isNullOrUndefined(hour) && !isNullOrUndefined(minute) && !isNullOrUndefined(second) && disabledOptions.some(v => _toNumber(v) === _toNumber(second))) {
90
88
  return true;
91
89
  }
92
90
  }
@@ -94,7 +92,7 @@ export const secondIsDisabled = (disabledSeconds, hour, minute, second) => {
94
92
  return false;
95
93
  };
96
94
  export const transformToArray = value => {
97
- if (!_Array$isArray(value)) {
95
+ if (!Array.isArray(value)) {
98
96
  return [];
99
97
  } else {
100
98
  return [...value];
@@ -1,11 +1,10 @@
1
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
1
  import { format as dateFnsFormat, parse as dateFnsParse } from 'date-fns';
3
2
  /* istanbul ignore next */
4
3
 
5
4
  const replace = function replace(str, replacements) {
6
5
  let _str = str;
7
6
 
8
- for (const key of _Object$keys(replacements)) {
7
+ for (const key of Object.keys(replacements)) {
9
8
  if (typeof replacements[key] === 'string') {
10
9
  _str = _str.replace(key, replacements[key]);
11
10
  }
@@ -1,10 +1,8 @@
1
1
  import _isNumber from "lodash/isNumber";
2
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
3
- import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
4
2
  import BaseFoundation from '../base/foundation';
5
3
  export default class ToastFoundation extends BaseFoundation {
6
4
  constructor(adapter) {
7
- super(_Object$assign(_Object$assign({}, ToastFoundation.defaultAdapter), adapter));
5
+ super(Object.assign(Object.assign({}, ToastFoundation.defaultAdapter), adapter));
8
6
  this._timer = null;
9
7
  this._id = null; // cache id
10
8
  }
@@ -23,7 +21,7 @@ export default class ToastFoundation extends BaseFoundation {
23
21
  const duration = this._adapter.getProp('duration');
24
22
 
25
23
  if (duration && _isNumber(duration)) {
26
- this._timer = _setTimeout(() => {
24
+ this._timer = setTimeout(() => {
27
25
  this.close(); // call parent to remove itself
28
26
  }, duration * 1000);
29
27
  }
@@ -1,9 +1,7 @@
1
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
2
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
3
1
  import BaseFoundation from '../base/foundation';
4
2
  export default class ToastListFoundation extends BaseFoundation {
5
3
  constructor(adapter) {
6
- super(_Object$assign(_Object$assign({}, ToastListFoundation.defaultAdapter), adapter));
4
+ super(Object.assign(Object.assign({}, ToastListFoundation.defaultAdapter), adapter));
7
5
  }
8
6
 
9
7
  addToast(toastOpts) {
@@ -22,7 +20,7 @@ export default class ToastListFoundation extends BaseFoundation {
22
20
  let toastList = this._adapter.getState('list');
23
21
 
24
22
  const removedItems = [];
25
- toastList = _filterInstanceProperty(toastList).call(toastList, toastOpts => {
23
+ toastList = toastList.filter(toastOpts => {
26
24
  if (toastOpts.id === id) {
27
25
  removedItems.push(toastOpts);
28
26
  return false;
@@ -1,11 +1,5 @@
1
1
  import _isEmpty from "lodash/isEmpty";
2
2
  import _get from "lodash/get";
3
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
4
- import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
5
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
6
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
7
- import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
8
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
9
3
  import BaseFoundation from '../base/foundation';
10
4
  import { handlePrevent } from '../utils/a11y';
11
5
  const REGS = {
@@ -26,7 +20,7 @@ export default class Tooltip extends BaseFoundation {
26
20
  constructor(adapter) {
27
21
  var _this;
28
22
 
29
- super(_Object$assign({}, adapter));
23
+ super(Object.assign({}, adapter));
30
24
  _this = this;
31
25
 
32
26
  this.onResize = () => {
@@ -40,7 +34,7 @@ export default class Tooltip extends BaseFoundation {
40
34
  this.clearDelayTimer();
41
35
 
42
36
  if (mouseEnterDelay > 0) {
43
- this._timer = _setTimeout(() => {
37
+ this._timer = setTimeout(() => {
44
38
  this.show();
45
39
  this.clearDelayTimer();
46
40
  }, mouseEnterDelay);
@@ -112,9 +106,9 @@ export default class Tooltip extends BaseFoundation {
112
106
 
113
107
  this.calcPosition = function (triggerRect, wrapperRect, containerRect) {
114
108
  let shouldUpdatePos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
115
- triggerRect = (_isEmpty(triggerRect) ? _this._adapter.getTriggerBounding() : triggerRect) || _Object$assign({}, defaultRect);
116
- containerRect = (_isEmpty(containerRect) ? _this._adapter.getPopupContainerRect() : containerRect) || _Object$assign({}, defaultRect);
117
- wrapperRect = (_isEmpty(wrapperRect) ? _this._adapter.getWrapperBounding() : wrapperRect) || _Object$assign({}, defaultRect); // console.log('containerRect: ', containerRect, 'triggerRect: ', triggerRect, 'wrapperRect: ', wrapperRect);
109
+ triggerRect = (_isEmpty(triggerRect) ? _this._adapter.getTriggerBounding() : triggerRect) || Object.assign({}, defaultRect);
110
+ containerRect = (_isEmpty(containerRect) ? _this._adapter.getPopupContainerRect() : containerRect) || Object.assign({}, defaultRect);
111
+ wrapperRect = (_isEmpty(wrapperRect) ? _this._adapter.getWrapperBounding() : wrapperRect) || Object.assign({}, defaultRect); // console.log('containerRect: ', containerRect, 'triggerRect: ', triggerRect, 'wrapperRect: ', wrapperRect);
118
112
 
119
113
  let style = _this.calcPosStyle(triggerRect, wrapperRect, containerRect);
120
114
 
@@ -132,7 +126,7 @@ export default class Tooltip extends BaseFoundation {
132
126
 
133
127
  if (shouldUpdatePos && _this._mounted) {
134
128
  // this._adapter.updatePlacementAttr(style.position);
135
- _this._adapter.setPosition(_Object$assign(_Object$assign({}, style), {
129
+ _this._adapter.setPosition(Object.assign(Object.assign({}, style), {
136
130
  position
137
131
  }));
138
132
  }
@@ -145,7 +139,7 @@ export default class Tooltip extends BaseFoundation {
145
139
  this.clearDelayTimer();
146
140
 
147
141
  if (mouseLeaveDelay > 0) {
148
- this._timer = _setTimeout(() => {
142
+ this._timer = setTimeout(() => {
149
143
  // console.log('delayHide for ', mouseLeaveDelay, ' ms, ', ...args);
150
144
  this.hide();
151
145
  this.clearDelayTimer();
@@ -374,7 +368,7 @@ export default class Tooltip extends BaseFoundation {
374
368
  !disableFocusListener && this.delayHide();
375
369
  };
376
370
 
377
- portalEventSet = _Object$assign({}, triggerEventSet);
371
+ portalEventSet = Object.assign({}, triggerEventSet);
378
372
 
379
373
  if (this.getProp('clickToHide')) {
380
374
  portalEventSet[eventNames.click] = () => {
@@ -442,46 +436,34 @@ export default class Tooltip extends BaseFoundation {
442
436
  calcTransformOrigin(position, triggerRect, translateX, translateY) {
443
437
  // eslint-disable-next-line
444
438
  if (position && triggerRect && translateX != null && translateY != null) {
445
- var _context9;
446
-
447
439
  if (this.getProp('transformFromCenter')) {
448
- var _context, _context3, _context5, _context7;
449
-
450
- if (_includesInstanceProperty(_context = ['topLeft', 'bottomLeft']).call(_context, position)) {
451
- var _context2;
452
-
453
- return _concatInstanceProperty(_context2 = "".concat(this._roundPixel(triggerRect.width / 2), "px ")).call(_context2, -translateY * 100, "%");
440
+ if (['topLeft', 'bottomLeft'].includes(position)) {
441
+ return "".concat(this._roundPixel(triggerRect.width / 2), "px ").concat(-translateY * 100, "%");
454
442
  }
455
443
 
456
- if (_includesInstanceProperty(_context3 = ['topRight', 'bottomRight']).call(_context3, position)) {
457
- var _context4;
458
-
459
- return _concatInstanceProperty(_context4 = "calc(100% - ".concat(this._roundPixel(triggerRect.width / 2), "px) ")).call(_context4, -translateY * 100, "%");
444
+ if (['topRight', 'bottomRight'].includes(position)) {
445
+ return "calc(100% - ".concat(this._roundPixel(triggerRect.width / 2), "px) ").concat(-translateY * 100, "%");
460
446
  }
461
447
 
462
- if (_includesInstanceProperty(_context5 = ['leftTop', 'rightTop']).call(_context5, position)) {
463
- var _context6;
464
-
465
- return _concatInstanceProperty(_context6 = "".concat(-translateX * 100, "% ")).call(_context6, this._roundPixel(triggerRect.height / 2), "px");
448
+ if (['leftTop', 'rightTop'].includes(position)) {
449
+ return "".concat(-translateX * 100, "% ").concat(this._roundPixel(triggerRect.height / 2), "px");
466
450
  }
467
451
 
468
- if (_includesInstanceProperty(_context7 = ['leftBottom', 'rightBottom']).call(_context7, position)) {
469
- var _context8;
470
-
471
- return _concatInstanceProperty(_context8 = "".concat(-translateX * 100, "% calc(100% - ")).call(_context8, this._roundPixel(triggerRect.height / 2), "px)");
452
+ if (['leftBottom', 'rightBottom'].includes(position)) {
453
+ return "".concat(-translateX * 100, "% calc(100% - ").concat(this._roundPixel(triggerRect.height / 2), "px)");
472
454
  }
473
455
  }
474
456
 
475
- return _concatInstanceProperty(_context9 = "".concat(-translateX * 100, "% ")).call(_context9, -translateY * 100, "%");
457
+ return "".concat(-translateX * 100, "% ").concat(-translateY * 100, "%");
476
458
  }
477
459
 
478
460
  return null;
479
461
  }
480
462
 
481
463
  calcPosStyle(triggerRect, wrapperRect, containerRect, position, spacing) {
482
- triggerRect = (_isEmpty(triggerRect) ? triggerRect : this._adapter.getTriggerBounding()) || _Object$assign({}, defaultRect);
483
- containerRect = (_isEmpty(containerRect) ? containerRect : this._adapter.getPopupContainerRect()) || _Object$assign({}, defaultRect);
484
- wrapperRect = (_isEmpty(wrapperRect) ? wrapperRect : this._adapter.getWrapperBounding()) || _Object$assign({}, defaultRect); // eslint-disable-next-line
464
+ triggerRect = (_isEmpty(triggerRect) ? triggerRect : this._adapter.getTriggerBounding()) || Object.assign({}, defaultRect);
465
+ containerRect = (_isEmpty(containerRect) ? containerRect : this._adapter.getPopupContainerRect()) || Object.assign({}, defaultRect);
466
+ wrapperRect = (_isEmpty(wrapperRect) ? wrapperRect : this._adapter.getWrapperBounding()) || Object.assign({}, defaultRect); // eslint-disable-next-line
485
467
 
486
468
  position = position != null ? position : this.getProp('position'); // eslint-disable-next-line
487
469
 
@@ -649,8 +631,8 @@ export default class Tooltip extends BaseFoundation {
649
631
  if (this.getProp('showArrow') && !arrowPointAtCenter && triggerHeight <= (verticalArrowHeight / 2 + arrowOffsetY) * 2) {
650
632
  const offsetY = triggerHeight / 2 - (arrowOffsetY + verticalArrowHeight / 2);
651
633
 
652
- if ((_includesInstanceProperty(position).call(position, 'Top') || _includesInstanceProperty(position).call(position, 'Bottom')) && !_includesInstanceProperty(position).call(position, 'Over')) {
653
- top = _includesInstanceProperty(position).call(position, 'Top') ? top + offsetY : top - offsetY;
634
+ if ((position.includes('Top') || position.includes('Bottom')) && !position.includes('Over')) {
635
+ top = position.includes('Top') ? top + offsetY : top - offsetY;
654
636
  }
655
637
  } // The left/top value here must be rounded, otherwise it will cause the small triangle to shake
656
638
 
@@ -663,8 +645,7 @@ export default class Tooltip extends BaseFoundation {
663
645
 
664
646
  if (translateX != null) {
665
647
  transform += "translateX(".concat(translateX * 100, "%) ");
666
-
667
- _Object$defineProperty(style, 'translateX', {
648
+ Object.defineProperty(style, 'translateX', {
668
649
  enumerable: false,
669
650
  value: translateX
670
651
  });
@@ -673,8 +654,7 @@ export default class Tooltip extends BaseFoundation {
673
654
 
674
655
  if (translateY != null) {
675
656
  transform += "translateY(".concat(translateY * 100, "%) ");
676
-
677
- _Object$defineProperty(style, 'translateY', {
657
+ Object.defineProperty(style, 'translateY', {
678
658
  enumerable: false,
679
659
  value: translateY
680
660
  });
@@ -694,12 +674,12 @@ export default class Tooltip extends BaseFoundation {
694
674
 
695
675
  isLR() {
696
676
  let position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
697
- return _indexOfInstanceProperty(position).call(position, 'left') === 0 || _indexOfInstanceProperty(position).call(position, 'right') === 0;
677
+ return position.indexOf('left') === 0 || position.indexOf('right') === 0;
698
678
  }
699
679
 
700
680
  isTB() {
701
681
  let position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
702
- return _indexOfInstanceProperty(position).call(position, 'top') === 0 || _indexOfInstanceProperty(position).call(position, 'bottom') === 0;
682
+ return position.indexOf('top') === 0 || position.indexOf('bottom') === 0;
703
683
  } // place the dom correctly
704
684
 
705
685
 
@@ -1,12 +1,4 @@
1
1
  import _omit from "lodash/omit";
2
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
3
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
4
- import _Set from "@babel/runtime-corejs3/core-js-stable/set";
5
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
6
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
7
- import _Map from "@babel/runtime-corejs3/core-js-stable/map";
8
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
9
- import _valuesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/values";
10
2
  import BaseFoundation from '../base/foundation';
11
3
  import { strings } from './constants';
12
4
  import { _generateGroupedData, _generateTreeData } from './transferUtils';
@@ -14,7 +6,7 @@ import arrayMove from '../utils/arrayMove'; // eslint-disable-next-line max-len
14
6
 
15
7
  export default class TransferFoundation extends BaseFoundation {
16
8
  constructor(adapter) {
17
- super(_Object$assign({}, adapter));
9
+ super(Object.assign({}, adapter));
18
10
  }
19
11
 
20
12
  _generateGroupedData(dataSource) {
@@ -29,7 +21,7 @@ export default class TransferFoundation extends BaseFoundation {
29
21
  const {
30
22
  path = []
31
23
  } = item;
32
- return _mapInstanceProperty(path).call(path, p => p.label).join(' > ');
24
+ return path.map(p => p.label).join(' > ');
33
25
  }
34
26
 
35
27
  handleInputChange(inputVal) {
@@ -42,7 +34,7 @@ export default class TransferFoundation extends BaseFoundation {
42
34
  } = this.getProps();
43
35
 
44
36
  if (type === strings.TYPE_TREE_TO_LIST) {
45
- const searchResult = new _Set(_mapInstanceProperty(data).call(data, item => item.key));
37
+ const searchResult = new Set(data.map(item => item.key));
46
38
 
47
39
  this._adapter.searchTree(inputVal);
48
40
 
@@ -55,15 +47,9 @@ export default class TransferFoundation extends BaseFoundation {
55
47
  return;
56
48
  }
57
49
 
58
- const filterFunc = typeof filter === 'function' ? item => filter(inputVal, item) : item => {
59
- var _context;
60
-
61
- return typeof item.label === 'string' && _includesInstanceProperty(_context = item.label).call(_context, inputVal);
62
- };
63
-
64
- const searchData = _filterInstanceProperty(data).call(data, filterFunc);
65
-
66
- const searchResult = new _Set(_mapInstanceProperty(searchData).call(searchData, item => item.key));
50
+ const filterFunc = typeof filter === 'function' ? item => filter(inputVal, item) : item => typeof item.label === 'string' && item.label.includes(inputVal);
51
+ const searchData = data.filter(filterFunc);
52
+ const searchResult = new Set(searchData.map(item => item.key));
67
53
 
68
54
  this._adapter.notifySearch(inputVal);
69
55
 
@@ -91,27 +77,24 @@ export default class TransferFoundation extends BaseFoundation {
91
77
 
92
78
  const inSearchMode = inputValue !== '';
93
79
  let operateData = [];
94
- operateData = inSearchMode ? _filterInstanceProperty(data).call(data, item => searchResult.has(item.key)) : data;
80
+ operateData = inSearchMode ? data.filter(item => searchResult.has(item.key)) : data;
95
81
  operateData = type === strings.TYPE_TREE_TO_LIST ? data : operateData;
96
- let newSelectedItems = new _Map();
82
+ let newSelectedItems = new Map();
97
83
 
98
84
  switch (true) {
99
85
  case !wantAllChecked:
100
- newSelectedItems = new _Map(selectedItems);
101
-
102
- _forEachInstanceProperty(operateData).call(operateData, item => {
86
+ newSelectedItems = new Map(selectedItems);
87
+ operateData.forEach(item => {
103
88
  // If the item is disabled, keep it
104
89
  if (!item.disabled) {
105
90
  newSelectedItems.delete(item.key);
106
91
  }
107
92
  });
108
-
109
93
  break;
110
94
 
111
95
  case wantAllChecked:
112
- newSelectedItems = new _Map(selectedItems);
113
-
114
- _forEachInstanceProperty(operateData).call(operateData, item => {
96
+ newSelectedItems = new Map(selectedItems);
97
+ operateData.forEach(item => {
115
98
  if (item.disabled) {
116
99
  // The disabled item, judge whether it is selected, if it is selected, still need to add the selection
117
100
  if (selectedItems.has(item.key)) {
@@ -123,7 +106,6 @@ export default class TransferFoundation extends BaseFoundation {
123
106
 
124
107
  newSelectedItems.set(item.key, item);
125
108
  });
126
-
127
109
  break;
128
110
 
129
111
  default:
@@ -150,9 +132,8 @@ export default class TransferFoundation extends BaseFoundation {
150
132
  return;
151
133
  }
152
134
 
153
- const newSelectedItems = new _Map(selectedItems);
154
-
155
- _forEachInstanceProperty(data).call(data, item => {
135
+ const newSelectedItems = new Map(selectedItems);
136
+ data.forEach(item => {
156
137
  // If the item is disabled, keep it
157
138
  if (!item.disabled) {
158
139
  newSelectedItems.delete(item.key);
@@ -204,17 +185,15 @@ export default class TransferFoundation extends BaseFoundation {
204
185
  const {
205
186
  data
206
187
  } = this.getStates();
207
-
208
- const dataItems = _mapInstanceProperty(data).call(data, d => [d.value, d]);
209
-
210
- const allItemsMap = new _Map(dataItems);
211
- const nextSelectedItemsMap = new _Map();
188
+ const dataItems = data.map(d => [d.value, d]);
189
+ const allItemsMap = new Map(dataItems);
190
+ const nextSelectedItemsMap = new Map();
212
191
 
213
192
  if (disabled) {
214
193
  return;
215
194
  }
216
195
 
217
- _forEachInstanceProperty(values).call(values, value => {
196
+ values.forEach(value => {
218
197
  const node = allItemsMap.get(value); // The value passed in is an array of the value used, but the internal selectedItems stores a map of keys
219
198
 
220
199
  if (selectedItems.has(node.key)) {
@@ -273,11 +252,10 @@ export default class TransferFoundation extends BaseFoundation {
273
252
 
274
253
  const selectedItems = this._adapter.getSelected();
275
254
 
276
- let selectedArr = [..._valuesInstanceProperty(selectedItems).call(selectedItems)];
255
+ let selectedArr = [...selectedItems.values()];
277
256
  selectedArr = arrayMove(selectedArr, oldIndex, newIndex);
278
- let newSelectedItems = new _Map();
279
-
280
- _forEachInstanceProperty(selectedArr).call(selectedArr, option => {
257
+ let newSelectedItems = new Map();
258
+ selectedArr.forEach(option => {
281
259
  newSelectedItems = newSelectedItems.set(option.key, option);
282
260
  });
283
261