@king-design/vue 2.1.2 → 2.1.4

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 (522) hide show
  1. package/components/affix/index.d.ts +2 -2
  2. package/components/affix/index.js +0 -5
  3. package/components/affix/index.spec.js +84 -108
  4. package/components/affix/index.vdt.js +5 -8
  5. package/components/affix/useStyle.js +8 -19
  6. package/components/badge/index.js +0 -2
  7. package/components/badge/index.vdt.js +5 -9
  8. package/components/badge/styles.js +0 -2
  9. package/components/breadcrumb/index.js +0 -4
  10. package/components/breadcrumb/index.spec.js +6 -6
  11. package/components/breadcrumb/index.vdt.js +5 -14
  12. package/components/breadcrumb/item.js +0 -8
  13. package/components/breadcrumb/item.vdt.js +3 -6
  14. package/components/breadcrumb/styles.js +0 -3
  15. package/components/button/dynamicButton.d.ts +1 -1
  16. package/components/button/dynamicButton.js +2 -5
  17. package/components/button/group.js +2 -10
  18. package/components/button/group.vdt.js +4 -7
  19. package/components/button/index.js +3 -27
  20. package/components/button/index.spec.js +74 -96
  21. package/components/button/index.vdt.js +19 -29
  22. package/components/button/styles.d.ts +2 -2
  23. package/components/button/styles.js +4 -48
  24. package/components/card/column.js +0 -2
  25. package/components/card/column.vdt.js +5 -10
  26. package/components/card/index.js +0 -4
  27. package/components/card/index.vdt.js +4 -16
  28. package/components/carousel/index.js +1 -19
  29. package/components/carousel/index.spec.js +127 -163
  30. package/components/carousel/index.vdt.js +12 -15
  31. package/components/carousel/item.js +0 -2
  32. package/components/carousel/item.vdt.js +4 -7
  33. package/components/carousel/styles.js +0 -1
  34. package/components/carousel/useAutoplay.js +0 -4
  35. package/components/carousel/useItems.js +4 -20
  36. package/components/carousel/useSlide.js +57 -89
  37. package/components/cascader/index.js +3 -18
  38. package/components/cascader/index.spec.js +365 -379
  39. package/components/cascader/index.vdt.js +14 -31
  40. package/components/cascader/styles.js +0 -6
  41. package/components/cascader/useFields.js +1 -4
  42. package/components/cascader/useFilterable.js +2 -19
  43. package/components/cascader/useLabel.js +1 -9
  44. package/components/cascader/useLoad.js +22 -35
  45. package/components/cascader/useValue.d.ts +2 -2
  46. package/components/cascader/useValue.js +6 -27
  47. package/components/checkbox/index.js +5 -27
  48. package/components/checkbox/index.spec.js +129 -171
  49. package/components/checkbox/index.vdt.js +12 -16
  50. package/components/checkbox/styles.js +0 -10
  51. package/components/code/crossDomain.js +2 -9
  52. package/components/code/index.js +0 -9
  53. package/components/code/index.spec.js +46 -55
  54. package/components/code/index.vdt.js +6 -14
  55. package/components/code/styles.js +0 -1
  56. package/components/code/useEditor.js +5 -10
  57. package/components/collapse/index.d.ts +1 -1
  58. package/components/collapse/index.js +3 -14
  59. package/components/collapse/index.spec.js +47 -60
  60. package/components/collapse/index.vdt.js +4 -12
  61. package/components/collapse/item.js +0 -10
  62. package/components/collapse/item.vdt.js +7 -14
  63. package/components/collapse/styles.js +0 -1
  64. package/components/colorpicker/drag.js +0 -5
  65. package/components/colorpicker/index.js +0 -4
  66. package/components/colorpicker/index.spec.js +211 -259
  67. package/components/colorpicker/index.vdt.js +8 -11
  68. package/components/colorpicker/panel.js +0 -5
  69. package/components/colorpicker/panel.vdt.js +21 -26
  70. package/components/colorpicker/styles.js +2 -13
  71. package/components/colorpicker/useDrag.js +22 -26
  72. package/components/colorpicker/useInput.js +0 -16
  73. package/components/colorpicker/usePointer.js +15 -18
  74. package/components/colorpicker/useValue.js +2 -7
  75. package/components/context.d.ts +2 -2
  76. package/components/context.js +2 -19
  77. package/components/datepicker/basepicker.d.ts +8 -8
  78. package/components/datepicker/basepicker.js +20 -90
  79. package/components/datepicker/calendar.js +0 -11
  80. package/components/datepicker/calendar.vdt.js +11 -14
  81. package/components/datepicker/constants.js +0 -1
  82. package/components/datepicker/dayjs.js +1 -1
  83. package/components/datepicker/helpers.js +3 -15
  84. package/components/datepicker/index.js +6 -32
  85. package/components/datepicker/index.spec.js +1141 -1448
  86. package/components/datepicker/index.vdt.js +20 -34
  87. package/components/datepicker/shortcuts.d.ts +1 -1
  88. package/components/datepicker/shortcuts.js +0 -4
  89. package/components/datepicker/styles.js +0 -8
  90. package/components/datepicker/time.d.ts +1 -1
  91. package/components/datepicker/time.js +3 -23
  92. package/components/datepicker/time.vdt.js +4 -5
  93. package/components/datepicker/useDays.js +2 -9
  94. package/components/datepicker/useDisabled.js +6 -23
  95. package/components/datepicker/useFocusDate.js +0 -2
  96. package/components/datepicker/useFormats.js +6 -15
  97. package/components/datepicker/useKeyboards.js +20 -36
  98. package/components/datepicker/useMonths.js +0 -6
  99. package/components/datepicker/usePanel.js +0 -10
  100. package/components/datepicker/useShowDate.js +10 -37
  101. package/components/datepicker/useStatus.js +3 -15
  102. package/components/datepicker/useValue.js +22 -35
  103. package/components/datepicker/useYears.js +4 -15
  104. package/components/diagram/diagram.js +17 -43
  105. package/components/diagram/diagram.vdt.js +2 -5
  106. package/components/diagram/graph.js +6 -6
  107. package/components/diagram/index.d.ts +1 -1
  108. package/components/diagram/index.js +7 -7
  109. package/components/diagram/index.spec.js +369 -495
  110. package/components/diagram/layouts/circle.js +6 -14
  111. package/components/diagram/layouts/flow.js +7 -15
  112. package/components/diagram/layouts/layout.js +6 -28
  113. package/components/diagram/layouts/organic.js +3 -11
  114. package/components/diagram/layouts/partition.js +4 -12
  115. package/components/diagram/layouts/radial.js +6 -18
  116. package/components/diagram/layouts/stack.js +6 -14
  117. package/components/diagram/layouts/tree.js +11 -21
  118. package/components/diagram/mxgraph/handler/mxConnectionHandler.js +15 -22
  119. package/components/diagram/mxgraph/handler/mxConstraintHandler.js +4 -4
  120. package/components/diagram/mxgraph/handler/mxEdgeHandler.js +11 -15
  121. package/components/diagram/mxgraph/handler/mxGraphHandler.js +6 -9
  122. package/components/diagram/mxgraph/handler/mxRubberband.js +4 -4
  123. package/components/diagram/mxgraph/handler/mxVertexHandler.js +7 -10
  124. package/components/diagram/mxgraph/index.js +0 -2
  125. package/components/diagram/mxgraph/mx.js +3 -3
  126. package/components/diagram/mxgraph/shape/mxCloud.js +2 -2
  127. package/components/diagram/mxgraph/shape/mxCylinder.js +4 -9
  128. package/components/diagram/mxgraph/shape/mxEllipse.js +2 -2
  129. package/components/diagram/mxgraph/shape/mxHexagon.js +2 -2
  130. package/components/diagram/mxgraph/shape/mxLine.js +2 -2
  131. package/components/diagram/mxgraph/shape/mxRectangleShape.js +2 -2
  132. package/components/diagram/mxgraph/shape/mxRhombus.js +6 -12
  133. package/components/diagram/mxgraph/shape/mxShape.js +0 -1
  134. package/components/diagram/mxgraph/shape/mxTriangle.js +2 -2
  135. package/components/diagram/mxgraph/util/mxConstants.js +2 -2
  136. package/components/diagram/mxgraph/util/mxGuide.js +5 -7
  137. package/components/diagram/mxgraph/view/mxCellEditor.js +16 -29
  138. package/components/diagram/mxgraph/view/mxCellRenderer.js +0 -2
  139. package/components/diagram/mxgraph/view/mxGraph.js +14 -32
  140. package/components/diagram/shapes/base.d.ts +1 -1
  141. package/components/diagram/shapes/base.js +9 -39
  142. package/components/diagram/shapes/callout.js +10 -23
  143. package/components/diagram/shapes/circle.js +3 -10
  144. package/components/diagram/shapes/document.js +5 -16
  145. package/components/diagram/shapes/ellipse.js +0 -5
  146. package/components/diagram/shapes/generateShapes.d.ts +1 -1
  147. package/components/diagram/shapes/generateShapes.js +0 -9
  148. package/components/diagram/shapes/hexagon.js +9 -26
  149. package/components/diagram/shapes/image.js +1 -9
  150. package/components/diagram/shapes/line.d.ts +2 -2
  151. package/components/diagram/shapes/line.js +13 -48
  152. package/components/diagram/shapes/parallelogram.js +9 -26
  153. package/components/diagram/shapes/rectangle.js +1 -9
  154. package/components/diagram/shapes/shape.js +6 -35
  155. package/components/diagram/shapes/square.js +3 -11
  156. package/components/diagram/shapes/text.js +0 -5
  157. package/components/diagram/styles.js +0 -1
  158. package/components/dialog/alert.vdt.js +9 -19
  159. package/components/dialog/base.js +1 -29
  160. package/components/dialog/base.vdt.js +14 -29
  161. package/components/dialog/index.js +6 -31
  162. package/components/dialog/index.spec.js +416 -503
  163. package/components/dialog/staticMethods.d.ts +1 -1
  164. package/components/dialog/staticMethods.js +2 -13
  165. package/components/dialog/styles.js +0 -11
  166. package/components/dialog/useDraggable.js +0 -6
  167. package/components/dialog/useEscClosable.js +4 -12
  168. package/components/dialog/useFixBody.d.ts +1 -1
  169. package/components/dialog/useFixBody.js +0 -11
  170. package/components/dialog/usePosition.js +7 -5
  171. package/components/drawer/index.js +0 -5
  172. package/components/drawer/index.spec.js +126 -168
  173. package/components/drawer/index.vdt.js +3 -9
  174. package/components/drawer/styles.d.ts +2 -2
  175. package/components/drawer/styles.js +0 -4
  176. package/components/dropdown/dropdown.d.ts +2 -2
  177. package/components/dropdown/dropdown.js +33 -89
  178. package/components/dropdown/index.js +2 -6
  179. package/components/dropdown/index.spec.js +388 -496
  180. package/components/dropdown/item.js +4 -25
  181. package/components/dropdown/item.vdt.js +5 -8
  182. package/components/dropdown/menu.js +14 -29
  183. package/components/dropdown/menu.vdt.js +5 -13
  184. package/components/dropdown/styles.js +0 -9
  185. package/components/dropdown/useKeyboard.d.ts +2 -2
  186. package/components/dropdown/useKeyboard.js +8 -30
  187. package/components/dropdown/usePosition.d.ts +2 -1
  188. package/components/dropdown/usePosition.js +33 -28
  189. package/components/dropdown/useTransition.js +0 -8
  190. package/components/editable/index.d.ts +1 -1
  191. package/components/editable/index.js +4 -28
  192. package/components/editable/index.spec.js +152 -189
  193. package/components/editable/index.vdt.js +8 -11
  194. package/components/editable/styles.js +0 -1
  195. package/components/form/form.js +0 -18
  196. package/components/form/form.vdt.js +4 -7
  197. package/components/form/index.spec.js +1057 -1280
  198. package/components/form/item.d.ts +1 -1
  199. package/components/form/item.js +0 -12
  200. package/components/form/item.vdt.js +17 -31
  201. package/components/form/methods.d.ts +5 -5
  202. package/components/form/methods.js +2 -12
  203. package/components/form/styles.js +0 -8
  204. package/components/form/useDirty.js +2 -7
  205. package/components/form/useError.js +2 -10
  206. package/components/form/useValidate.d.ts +1 -1
  207. package/components/form/useValidate.js +8 -24
  208. package/components/grid/col.d.ts +3 -3
  209. package/components/grid/col.js +0 -7
  210. package/components/grid/col.vdt.js +8 -13
  211. package/components/grid/constants.d.ts +6 -6
  212. package/components/grid/row.js +0 -5
  213. package/components/grid/row.vdt.js +5 -8
  214. package/components/grid/styles.js +0 -7
  215. package/components/grid/useBreakpoints.js +0 -5
  216. package/components/grid/useGutter.js +5 -25
  217. package/components/icon/index.js +0 -10
  218. package/components/icon/index.vdt.js +7 -13
  219. package/components/icon/styles.js +0 -1
  220. package/components/input/index.d.ts +3 -3
  221. package/components/input/index.js +0 -14
  222. package/components/input/index.spec.js +185 -239
  223. package/components/input/index.vdt.js +39 -49
  224. package/components/input/search.js +0 -20
  225. package/components/input/search.vdt.js +6 -9
  226. package/components/input/styles.js +0 -26
  227. package/components/input/useAutoRows.js +6 -18
  228. package/components/input/useAutoWidth.js +0 -5
  229. package/components/input/useFrozen.js +0 -6
  230. package/components/input/useShowPassword.js +2 -5
  231. package/components/layout/aside.js +5 -17
  232. package/components/layout/aside.vdt.js +5 -9
  233. package/components/layout/body.js +5 -17
  234. package/components/layout/footer.js +1 -7
  235. package/components/layout/header.js +7 -21
  236. package/components/layout/layout.js +9 -24
  237. package/components/layout/styles.js +2 -13
  238. package/components/layout/template.vdt.js +2 -4
  239. package/components/layout/useParse.js +0 -7
  240. package/components/menu/index.spec.js +189 -242
  241. package/components/menu/item.js +3 -16
  242. package/components/menu/item.vdt.js +20 -32
  243. package/components/menu/menu.js +2 -11
  244. package/components/menu/menu.vdt.js +6 -12
  245. package/components/menu/styles.js +0 -18
  246. package/components/menu/useDropdown.js +4 -9
  247. package/components/menu/useExpanded.js +0 -14
  248. package/components/menu/useHighlight.js +26 -36
  249. package/components/message/index.spec.js +58 -73
  250. package/components/message/message.js +0 -19
  251. package/components/message/message.vdt.js +5 -8
  252. package/components/message/messages.js +0 -12
  253. package/components/message/messages.vdt.js +0 -1
  254. package/components/message/styles.js +0 -9
  255. package/components/pagination/index.d.ts +1 -1
  256. package/components/pagination/index.js +10 -46
  257. package/components/pagination/index.spec.js +133 -173
  258. package/components/pagination/index.vdt.js +14 -34
  259. package/components/pagination/styles.js +0 -4
  260. package/components/portal.d.ts +1 -1
  261. package/components/portal.js +13 -28
  262. package/components/position.d.ts +12 -12
  263. package/components/position.js +32 -88
  264. package/components/progress/index.d.ts +6 -6
  265. package/components/progress/index.js +0 -12
  266. package/components/progress/index.spec.js +143 -191
  267. package/components/progress/index.vdt.js +8 -11
  268. package/components/progress/styles.js +0 -6
  269. package/components/progress/useColor.js +2 -7
  270. package/components/progress/useStatus.d.ts +1 -1
  271. package/components/progress/useStatus.js +2 -5
  272. package/components/radio/index.js +3 -18
  273. package/components/radio/index.spec.js +111 -149
  274. package/components/radio/index.vdt.js +14 -17
  275. package/components/radio/styles.js +0 -10
  276. package/components/rate/index.js +0 -7
  277. package/components/rate/index.spec.js +64 -79
  278. package/components/rate/index.vdt.js +8 -21
  279. package/components/rate/styles.js +0 -3
  280. package/components/rate/useActiveValue.js +2 -7
  281. package/components/scrollSelect/index.d.ts +2 -2
  282. package/components/scrollSelect/index.js +0 -7
  283. package/components/scrollSelect/index.spec.js +100 -131
  284. package/components/scrollSelect/index.vdt.js +6 -11
  285. package/components/scrollSelect/styles.js +0 -7
  286. package/components/scrollSelect/useList.js +3 -17
  287. package/components/scrollSelect/useMouseEvents.js +31 -49
  288. package/components/scrollSelect/useTranslate.js +1 -11
  289. package/components/select/base.js +5 -35
  290. package/components/select/base.vdt.js +23 -38
  291. package/components/select/group.js +0 -5
  292. package/components/select/group.vdt.js +4 -10
  293. package/components/select/index.spec.js +361 -452
  294. package/components/select/menu.js +0 -5
  295. package/components/select/menu.vdt.js +18 -33
  296. package/components/select/option.js +2 -16
  297. package/components/select/option.vdt.js +7 -14
  298. package/components/select/select.js +3 -20
  299. package/components/select/select.vdt.js +9 -17
  300. package/components/select/styles.js +0 -33
  301. package/components/select/useBaseLabel.d.ts +1 -1
  302. package/components/select/useBaseLabel.js +4 -17
  303. package/components/select/useCard.js +0 -4
  304. package/components/select/useEqualWidth.js +0 -1
  305. package/components/select/useFilterable.js +5 -27
  306. package/components/select/useFocusout.d.ts +1 -1
  307. package/components/select/useFocusout.js +1 -9
  308. package/components/select/useInput.js +6 -10
  309. package/components/select/useLabel.js +3 -13
  310. package/components/select/useSearchable.js +0 -10
  311. package/components/skeleton/item.d.ts +1 -1
  312. package/components/skeleton/item.js +0 -4
  313. package/components/skeleton/item.vdt.js +1 -6
  314. package/components/skeleton/skeleton.js +0 -4
  315. package/components/skeleton/skeleton.vdt.js +6 -12
  316. package/components/skeleton/style.d.ts +1 -1
  317. package/components/skeleton/style.js +0 -1
  318. package/components/slider/index.d.ts +1 -1
  319. package/components/slider/index.js +0 -7
  320. package/components/slider/index.spec.js +467 -585
  321. package/components/slider/index.vdt.js +32 -45
  322. package/components/slider/styles.js +0 -14
  323. package/components/slider/useClick.js +2 -11
  324. package/components/slider/useDraggable.js +23 -34
  325. package/components/slider/useKeyboard.js +7 -18
  326. package/components/slider/useMarks.d.ts +5 -5
  327. package/components/slider/useMarks.js +5 -13
  328. package/components/slider/usePoints.d.ts +2 -2
  329. package/components/slider/usePoints.js +7 -21
  330. package/components/slider/useStyles.d.ts +1 -1
  331. package/components/slider/useStyles.js +5 -10
  332. package/components/slider/useTooltip.js +2 -10
  333. package/components/slider/useValue.d.ts +1 -1
  334. package/components/slider/useValue.js +7 -22
  335. package/components/spin/index.js +0 -4
  336. package/components/spin/index.vdt.js +4 -11
  337. package/components/spin/styles.js +0 -2
  338. package/components/spinner/index.d.ts +4 -4
  339. package/components/spinner/index.js +9 -24
  340. package/components/spinner/index.spec.js +359 -460
  341. package/components/spinner/index.vdt.js +10 -13
  342. package/components/spinner/styles.js +0 -3
  343. package/components/spinner/useChange.js +4 -16
  344. package/components/spinner/useFormatter.js +6 -16
  345. package/components/spinner/useStep.d.ts +3 -3
  346. package/components/spinner/useStep.js +2 -20
  347. package/components/spinner/useValue.js +11 -26
  348. package/components/split/index.js +0 -7
  349. package/components/split/index.spec.js +223 -267
  350. package/components/split/index.vdt.js +8 -17
  351. package/components/split/style.d.ts +1 -1
  352. package/components/split/style.js +0 -8
  353. package/components/split/useDraggable.js +11 -35
  354. package/components/split/useSize.js +2 -5
  355. package/components/steps/context.d.ts +2 -2
  356. package/components/steps/index.js +2 -10
  357. package/components/steps/index.spec.js +21 -27
  358. package/components/steps/index.vdt.js +8 -10
  359. package/components/steps/step.js +0 -2
  360. package/components/steps/step.vdt.js +8 -12
  361. package/components/steps/styles.js +0 -27
  362. package/components/switch/index.js +2 -23
  363. package/components/switch/index.spec.js +188 -224
  364. package/components/switch/index.vdt.js +16 -32
  365. package/components/switch/styles.js +3 -14
  366. package/components/switch/useDraggable.js +10 -18
  367. package/components/table/cell.js +0 -6
  368. package/components/table/cell.vdt.js +14 -21
  369. package/components/table/column.d.ts +1 -1
  370. package/components/table/column.js +0 -5
  371. package/components/table/column.vdt.js +19 -30
  372. package/components/table/exportTable.js +45 -56
  373. package/components/table/index.spec.js +780 -984
  374. package/components/table/row.d.ts +1 -1
  375. package/components/table/row.js +18 -40
  376. package/components/table/row.vdt.js +27 -39
  377. package/components/table/styles.js +0 -11
  378. package/components/table/table.d.ts +5 -5
  379. package/components/table/table.js +18 -50
  380. package/components/table/table.vdt.js +61 -85
  381. package/components/table/useChecked.d.ts +1 -1
  382. package/components/table/useChecked.js +20 -61
  383. package/components/table/useColumns.js +3 -16
  384. package/components/table/useDisableRow.js +2 -12
  385. package/components/table/useDraggable.js +4 -12
  386. package/components/table/useExpandable.js +2 -5
  387. package/components/table/useFixedColumns.d.ts +1 -1
  388. package/components/table/useFixedColumns.js +4 -23
  389. package/components/table/useGroup.d.ts +1 -1
  390. package/components/table/useGroup.js +7 -24
  391. package/components/table/useMerge.d.ts +4 -4
  392. package/components/table/useMerge.js +2 -14
  393. package/components/table/usePagination.js +4 -18
  394. package/components/table/useResizable.js +2 -10
  395. package/components/table/useRestRowStatus.js +2 -6
  396. package/components/table/useScroll.d.ts +1 -1
  397. package/components/table/useScroll.js +0 -3
  398. package/components/table/useSelected.js +2 -5
  399. package/components/table/useSortable.js +2 -8
  400. package/components/table/useStickyHeader.js +3 -7
  401. package/components/table/useStickyScrollbar.js +6 -16
  402. package/components/table/useTree.js +1 -12
  403. package/components/table/useWidth.js +14 -30
  404. package/components/tabs/index.js +29 -51
  405. package/components/tabs/index.spec.js +56 -74
  406. package/components/tabs/index.vdt.js +13 -16
  407. package/components/tabs/styles.js +0 -16
  408. package/components/tabs/tab.js +0 -10
  409. package/components/tabs/tab.vdt.js +6 -10
  410. package/components/tabs/useActiveBar.js +2 -11
  411. package/components/tabs/useScroll.js +4 -20
  412. package/components/tag/base.js +0 -8
  413. package/components/tag/index.js +2 -4
  414. package/components/tag/index.spec.js +19 -25
  415. package/components/tag/index.vdt.js +8 -15
  416. package/components/tag/styles.js +0 -9
  417. package/components/timeline/item.js +0 -4
  418. package/components/timeline/item.vdt.js +4 -9
  419. package/components/timeline/styles.d.ts +2 -2
  420. package/components/timeline/styles.js +0 -4
  421. package/components/timeline/timeline.js +0 -2
  422. package/components/timeline/timeline.vdt.js +2 -5
  423. package/components/timepicker/index.js +2 -7
  424. package/components/timepicker/index.spec.js +293 -368
  425. package/components/timepicker/panelPicker.js +2 -11
  426. package/components/timepicker/panelPicker.vdt.js +14 -24
  427. package/components/timepicker/selectPicker.js +0 -5
  428. package/components/timepicker/selectPicker.vdt.js +5 -10
  429. package/components/timepicker/styles.js +0 -1
  430. package/components/timepicker/useDisabled.js +2 -4
  431. package/components/timepicker/useFormats.js +4 -13
  432. package/components/timepicker/useStep.d.ts +1 -1
  433. package/components/timepicker/useStep.js +8 -17
  434. package/components/timepicker/useValue.js +16 -21
  435. package/components/tip/index.js +0 -2
  436. package/components/tip/index.vdt.js +5 -17
  437. package/components/tip/styles.js +0 -3
  438. package/components/tooltip/content.js +0 -28
  439. package/components/tooltip/content.vdt.js +15 -25
  440. package/components/tooltip/index.js +3 -7
  441. package/components/tooltip/index.spec.js +434 -572
  442. package/components/tooltip/styles.d.ts +1 -1
  443. package/components/tooltip/styles.js +2 -10
  444. package/components/tooltip/tooltip.js +2 -15
  445. package/components/tooltip/useArrow.js +11 -14
  446. package/components/transfer/index.d.ts +1 -1
  447. package/components/transfer/index.js +1 -13
  448. package/components/transfer/index.spec.js +159 -194
  449. package/components/transfer/index.vdt.js +16 -34
  450. package/components/transfer/styles.js +0 -10
  451. package/components/transfer/useCheck.d.ts +1 -1
  452. package/components/transfer/useCheck.js +1 -15
  453. package/components/transfer/useFilter.d.ts +1 -1
  454. package/components/transfer/useFilter.js +9 -30
  455. package/components/transfer/useTransfer.js +10 -26
  456. package/components/tree/index.d.ts +3 -3
  457. package/components/tree/index.js +4 -22
  458. package/components/tree/index.spec.js +285 -355
  459. package/components/tree/index.vdt.js +12 -23
  460. package/components/tree/styles.js +2 -16
  461. package/components/tree/useChecked.js +3 -26
  462. package/components/tree/useDraggable.js +12 -42
  463. package/components/tree/useExpanded.js +26 -43
  464. package/components/tree/useFilter.js +3 -10
  465. package/components/tree/useNodes.d.ts +1 -1
  466. package/components/tree/useNodes.js +0 -4
  467. package/components/tree/useSelected.js +21 -38
  468. package/components/tree/useTransitionEvent.js +3 -5
  469. package/components/treeSelect/index.js +9 -36
  470. package/components/treeSelect/index.spec.js +123 -160
  471. package/components/treeSelect/index.vdt.js +14 -20
  472. package/components/treeSelect/styles.js +0 -1
  473. package/components/treeSelect/useValue.js +0 -11
  474. package/components/types.d.ts +3 -3
  475. package/components/upload/ajaxUploader.d.ts +1 -1
  476. package/components/upload/ajaxUploader.js +0 -17
  477. package/components/upload/index.d.ts +4 -4
  478. package/components/upload/index.js +0 -14
  479. package/components/upload/index.spec.js +142 -249
  480. package/components/upload/index.vdt.js +12 -27
  481. package/components/upload/styles.js +0 -30
  482. package/components/upload/useAccept.js +2 -10
  483. package/components/upload/useDrag.js +0 -7
  484. package/components/upload/useFiles.js +103 -145
  485. package/components/upload/useShowImage.js +0 -3
  486. package/components/upload/useUpload.js +47 -69
  487. package/components/utils.d.ts +4 -3
  488. package/components/utils.js +24 -43
  489. package/components/virtual.js +14 -39
  490. package/components/wave/index.js +5 -31
  491. package/hooks/useDelayClose.js +2 -6
  492. package/hooks/useDocumentClick.js +8 -16
  493. package/hooks/useDraggable.d.ts +1 -1
  494. package/hooks/useDraggable.js +0 -9
  495. package/hooks/useKeyboard.d.ts +3 -3
  496. package/hooks/useKeyboard.js +0 -10
  497. package/hooks/useMouseOutsidable.js +0 -8
  498. package/hooks/useReceive.d.ts +1 -1
  499. package/hooks/useReceive.js +0 -4
  500. package/hooks/useRecordComponent.js +0 -6
  501. package/hooks/useRouter.js +7 -18
  502. package/hooks/useShowHideEvents.js +0 -3
  503. package/hooks/useState.d.ts +2 -2
  504. package/hooks/useState.js +2 -6
  505. package/i18n/en-US.js +0 -1
  506. package/i18n/index.d.ts +1 -1
  507. package/i18n/index.js +0 -7
  508. package/index.d.ts +2 -2
  509. package/index.js +2 -3
  510. package/package.json +2 -2
  511. package/styles/global.js +2 -3
  512. package/styles/keyframes.js +0 -1
  513. package/styles/theme.d.ts +1 -1
  514. package/styles/theme.js +4 -7
  515. package/styles/utils.d.ts +1 -1
  516. package/styles/utils.js +3 -17
  517. package/yarn-error.log +1013 -0
  518. package/components/cascader/index.d.ts +0 -45
  519. package/components/datepicker/index.d.ts +0 -63
  520. package/components/select/select.d.ts +0 -33
  521. package/components/timepicker/panelPicker.d.ts +0 -54
  522. package/components/treeSelect/index.d.ts +0 -27
@@ -17,625 +17,524 @@ describe('Slider', function () {
17
17
  });
18
18
  it('basic test', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
19
19
  var _mount, instance, element, _element$querySelecto, slider, handle, wrapper, width, bar;
20
-
21
20
  return _regeneratorRuntime.wrap(function _callee$(_context) {
22
- while (1) {
23
- switch (_context.prev = _context.next) {
24
- case 0:
25
- _mount = mount(BasicDemo), instance = _mount[0], element = _mount[1];
26
- _element$querySelecto = element.querySelectorAll('.k-slider'), slider = _element$querySelecto[1]; // drag
27
-
28
- handle = slider.querySelector('.k-slider-thumb');
29
- dispatchEvent(handle, 'mousedown', {
30
- which: 1
31
- });
32
- dispatchEvent(handle, 'focusin');
33
- dispatchEvent(document, 'mousemove', {
34
- clientX: 0
35
- });
36
- expect(instance.get('value2')).eql(50); // move to boundary
37
-
38
- dispatchEvent(document, 'mousemove', {
39
- clientX: -10
40
- });
41
- expect(instance.get('value2')).eql(50);
42
- dispatchEvent(document, 'mousemove', {
43
- clientX: 999999
44
- });
45
- expect(instance.get('value2')).eql(500);
46
- dispatchEvent(document, 'mouseup'); // click
47
-
48
- wrapper = slider.querySelector('.k-slider-track-wrapper');
49
- width = wrapper.getBoundingClientRect().width;
50
- dispatchEvent(wrapper, 'click', {
51
- clientX: width / 2
52
- });
53
- expect(instance.get('value2')).eql((500 + 50) / 2); // set value
54
-
55
- bar = slider.querySelector('.k-slider-bar');
56
- instance.set('value2', 135 + 50);
57
- _context.next = 20;
58
- return wait();
59
-
60
- case 20:
61
- expect(bar.style.width).eql('30%');
62
- instance.set('value2', -10);
63
- _context.next = 24;
64
- return wait();
65
-
66
- case 24:
67
- expect(bar.style.width).eql('0%');
68
- instance.set('value2', 1000);
69
- _context.next = 28;
70
- return wait();
71
-
72
- case 28:
73
- expect(bar.style.width).eql('100%');
74
-
75
- case 29:
76
- case "end":
77
- return _context.stop();
78
- }
21
+ while (1) switch (_context.prev = _context.next) {
22
+ case 0:
23
+ _mount = mount(BasicDemo), instance = _mount[0], element = _mount[1];
24
+ _element$querySelecto = element.querySelectorAll('.k-slider'), slider = _element$querySelecto[1]; // drag
25
+ handle = slider.querySelector('.k-slider-thumb');
26
+ dispatchEvent(handle, 'mousedown', {
27
+ which: 1
28
+ });
29
+ dispatchEvent(handle, 'focusin');
30
+ dispatchEvent(document, 'mousemove', {
31
+ clientX: 0
32
+ });
33
+ expect(instance.get('value2')).eql(50);
34
+ // move to boundary
35
+ dispatchEvent(document, 'mousemove', {
36
+ clientX: -10
37
+ });
38
+ expect(instance.get('value2')).eql(50);
39
+ dispatchEvent(document, 'mousemove', {
40
+ clientX: 999999
41
+ });
42
+ expect(instance.get('value2')).eql(500);
43
+ dispatchEvent(document, 'mouseup');
44
+ // click
45
+ wrapper = slider.querySelector('.k-slider-track-wrapper');
46
+ width = wrapper.getBoundingClientRect().width;
47
+ dispatchEvent(wrapper, 'click', {
48
+ clientX: width / 2
49
+ });
50
+ expect(instance.get('value2')).eql((500 + 50) / 2);
51
+ // set value
52
+ bar = slider.querySelector('.k-slider-bar');
53
+ instance.set('value2', 135 + 50);
54
+ _context.next = 20;
55
+ return wait();
56
+ case 20:
57
+ expect(bar.style.width).eql('30%');
58
+ instance.set('value2', -10);
59
+ _context.next = 24;
60
+ return wait();
61
+ case 24:
62
+ expect(bar.style.width).eql('0%');
63
+ instance.set('value2', 1000);
64
+ _context.next = 28;
65
+ return wait();
66
+ case 28:
67
+ expect(bar.style.width).eql('100%');
68
+ case 29:
69
+ case "end":
70
+ return _context.stop();
79
71
  }
80
72
  }, _callee);
81
73
  })));
82
74
  it('range test', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
83
75
  var _mount2, instance, element, windowWidth, _element$querySelecto2, first, second, wrapper;
84
-
85
76
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
86
- while (1) {
87
- switch (_context2.prev = _context2.next) {
88
- case 0:
89
- _mount2 = mount(RangeDemo), instance = _mount2[0], element = _mount2[1];
90
- windowWidth = 800; //document.documentElement.clientWidth;
91
-
92
- _element$querySelecto2 = element.querySelectorAll('.k-slider-thumb'), first = _element$querySelecto2[0], second = _element$querySelecto2[1]; // drag
93
-
94
- dispatchEvent(first, 'mousedown', {
95
- which: 1
96
- });
97
- dispatchEvent(first, 'focusin');
98
- dispatchEvent(first, 'mousemove', {
99
- clientX: windowWidth * 0.8
100
- });
101
- _context2.next = 8;
102
- return wait();
103
-
104
- case 8:
105
- expect(element.innerHTML).to.matchSnapshot();
106
- expect(instance.get('values')).eql([76, 80]);
107
- dispatchEvent(first, 'mouseup');
108
- dispatchEvent(second, 'mousedown', {
109
- which: 1
110
- });
111
- dispatchEvent(second, 'focusin');
112
- dispatchEvent(second, 'mousemove', {
113
- clientX: windowWidth * 0.6
114
- });
115
- _context2.next = 16;
116
- return wait();
117
-
118
- case 16:
119
- expect(element.innerHTML).to.matchSnapshot();
120
- expect(instance.get('values')).eql([60, 76]);
121
- dispatchEvent(first, 'mouseup'); // click
122
-
123
- wrapper = element.querySelector('.k-slider-track-wrapper');
124
- dispatchEvent(wrapper, 'click', {
125
- clientX: windowWidth * 0.5
126
- });
127
- _context2.next = 23;
128
- return wait();
129
-
130
- case 23:
131
- expect(element.innerHTML).to.matchSnapshot();
132
- expect(instance.get('values')).eql([50, 76]);
133
- dispatchEvent(wrapper, 'click', {
134
- clientX: windowWidth * 0.7
135
- });
136
- _context2.next = 28;
137
- return wait();
138
-
139
- case 28:
140
- expect(element.innerHTML).to.matchSnapshot();
141
- expect(instance.get('values')).eql([50, 70]); // set invalid value
142
-
143
- instance.set('values', 1);
144
- _context2.next = 33;
145
- return wait();
146
-
147
- case 33:
148
- expect(instance.get('values')).eql([1, 1]);
149
-
150
- case 34:
151
- case "end":
152
- return _context2.stop();
153
- }
77
+ while (1) switch (_context2.prev = _context2.next) {
78
+ case 0:
79
+ _mount2 = mount(RangeDemo), instance = _mount2[0], element = _mount2[1];
80
+ windowWidth = 800; //document.documentElement.clientWidth;
81
+ _element$querySelecto2 = element.querySelectorAll('.k-slider-thumb'), first = _element$querySelecto2[0], second = _element$querySelecto2[1]; // drag
82
+ dispatchEvent(first, 'mousedown', {
83
+ which: 1
84
+ });
85
+ dispatchEvent(first, 'focusin');
86
+ dispatchEvent(first, 'mousemove', {
87
+ clientX: windowWidth * 0.8
88
+ });
89
+ _context2.next = 8;
90
+ return wait();
91
+ case 8:
92
+ expect(element.innerHTML).to.matchSnapshot();
93
+ expect(instance.get('values')).eql([76, 80]);
94
+ dispatchEvent(first, 'mouseup');
95
+ dispatchEvent(second, 'mousedown', {
96
+ which: 1
97
+ });
98
+ dispatchEvent(second, 'focusin');
99
+ dispatchEvent(second, 'mousemove', {
100
+ clientX: windowWidth * 0.6
101
+ });
102
+ _context2.next = 16;
103
+ return wait();
104
+ case 16:
105
+ expect(element.innerHTML).to.matchSnapshot();
106
+ expect(instance.get('values')).eql([60, 76]);
107
+ dispatchEvent(first, 'mouseup');
108
+ // click
109
+ wrapper = element.querySelector('.k-slider-track-wrapper');
110
+ dispatchEvent(wrapper, 'click', {
111
+ clientX: windowWidth * 0.5
112
+ });
113
+ _context2.next = 23;
114
+ return wait();
115
+ case 23:
116
+ expect(element.innerHTML).to.matchSnapshot();
117
+ expect(instance.get('values')).eql([50, 76]);
118
+ dispatchEvent(wrapper, 'click', {
119
+ clientX: windowWidth * 0.7
120
+ });
121
+ _context2.next = 28;
122
+ return wait();
123
+ case 28:
124
+ expect(element.innerHTML).to.matchSnapshot();
125
+ expect(instance.get('values')).eql([50, 70]);
126
+ // set invalid value
127
+ instance.set('values', 1);
128
+ _context2.next = 33;
129
+ return wait();
130
+ case 33:
131
+ expect(instance.get('values')).eql([1, 1]);
132
+ case 34:
133
+ case "end":
134
+ return _context2.stop();
154
135
  }
155
136
  }, _callee2);
156
137
  })));
157
138
  it('keyboard operation for basic', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
158
139
  var _mount3, instance, element, _element$querySelecto3, slider, handle;
159
-
160
140
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
161
- while (1) {
162
- switch (_context3.prev = _context3.next) {
163
- case 0:
164
- _mount3 = mount(BasicDemo), instance = _mount3[0], element = _mount3[1];
165
- _element$querySelecto3 = element.querySelectorAll('.k-slider'), slider = _element$querySelecto3[1];
166
- handle = slider.querySelector('.k-slider-thumb');
167
- dispatchEvent(handle, 'focusin');
168
- dispatchEvent(handle, 'keydown', {
169
- keyCode: 37
170
- });
171
- _context3.next = 7;
172
- return wait();
173
-
174
- case 7:
175
- expect(slider.innerHTML).to.matchSnapshot();
176
- expect(instance.get('value2')).to.eql(276);
177
- dispatchEvent(handle, 'keydown', {
178
- keyCode: 39
179
- });
180
- _context3.next = 12;
181
- return wait();
182
-
183
- case 12:
184
- expect(slider.innerHTML).to.matchSnapshot();
185
- expect(instance.get('value2')).to.eql(277);
186
- dispatchEvent(handle, 'focusout');
187
- _context3.next = 17;
188
- return wait();
189
-
190
- case 17:
191
- expect(slider.innerHTML).to.matchSnapshot();
192
-
193
- case 18:
194
- case "end":
195
- return _context3.stop();
196
- }
141
+ while (1) switch (_context3.prev = _context3.next) {
142
+ case 0:
143
+ _mount3 = mount(BasicDemo), instance = _mount3[0], element = _mount3[1];
144
+ _element$querySelecto3 = element.querySelectorAll('.k-slider'), slider = _element$querySelecto3[1];
145
+ handle = slider.querySelector('.k-slider-thumb');
146
+ dispatchEvent(handle, 'focusin');
147
+ dispatchEvent(handle, 'keydown', {
148
+ keyCode: 37
149
+ });
150
+ _context3.next = 7;
151
+ return wait();
152
+ case 7:
153
+ expect(slider.innerHTML).to.matchSnapshot();
154
+ expect(instance.get('value2')).to.eql(276);
155
+ dispatchEvent(handle, 'keydown', {
156
+ keyCode: 39
157
+ });
158
+ _context3.next = 12;
159
+ return wait();
160
+ case 12:
161
+ expect(slider.innerHTML).to.matchSnapshot();
162
+ expect(instance.get('value2')).to.eql(277);
163
+ dispatchEvent(handle, 'focusout');
164
+ _context3.next = 17;
165
+ return wait();
166
+ case 17:
167
+ expect(slider.innerHTML).to.matchSnapshot();
168
+ case 18:
169
+ case "end":
170
+ return _context3.stop();
197
171
  }
198
172
  }, _callee3);
199
173
  })));
200
174
  it('keyboard operation for range', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
201
175
  var _mount4, instance, element, _element$querySelecto4, first, second;
202
-
203
176
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
204
- while (1) {
205
- switch (_context4.prev = _context4.next) {
206
- case 0:
207
- _mount4 = mount(RangeDemo), instance = _mount4[0], element = _mount4[1];
208
- _element$querySelecto4 = element.querySelectorAll('.k-slider-thumb'), first = _element$querySelecto4[0], second = _element$querySelecto4[1];
209
- instance.set('values', [50, 51]);
210
- _context4.next = 5;
211
- return wait();
212
-
213
- case 5:
214
- dispatchEvent(first, 'focusin');
215
- dispatchEvent(first, 'keydown', {
216
- keyCode: 39
217
- });
218
- _context4.next = 9;
219
- return wait();
220
-
221
- case 9:
222
- expect(element.innerHTML).to.matchSnapshot();
223
- expect(instance.get('values')).to.eql([51, 51]);
224
- dispatchEvent(first, 'keydown', {
225
- keyCode: 39
226
- });
227
- _context4.next = 14;
228
- return wait();
229
-
230
- case 14:
231
- expect(element.innerHTML).to.matchSnapshot();
232
- expect(instance.get('values')).to.eql([51, 52]);
233
- dispatchEvent(second, 'keydown', {
234
- keyCode: 39
235
- });
236
- _context4.next = 19;
237
- return wait();
238
-
239
- case 19:
240
- expect(element.innerHTML).to.matchSnapshot();
241
- expect(instance.get('values')).to.eql([51, 53]);
242
- dispatchEvent(second, 'focusout');
243
- instance.set('values', [50, 51]);
244
- _context4.next = 25;
245
- return wait();
246
-
247
- case 25:
248
- dispatchEvent(second, 'focusin');
249
- dispatchEvent(second, 'keydown', {
250
- keyCode: 37
251
- });
252
- _context4.next = 29;
253
- return wait();
254
-
255
- case 29:
256
- expect(instance.get('values')).to.eql([50, 50]);
257
- expect(element.innerHTML).to.matchSnapshot();
258
- dispatchEvent(second, 'keydown', {
259
- keyCode: 37
260
- });
261
- _context4.next = 34;
262
- return wait();
263
-
264
- case 34:
265
- expect(instance.get('values')).to.eql([49, 50]);
266
- expect(element.innerHTML).to.matchSnapshot();
267
- dispatchEvent(first, 'keydown', {
268
- keyCode: 37
269
- });
270
- _context4.next = 39;
271
- return wait();
272
-
273
- case 39:
274
- expect(instance.get('values')).to.eql([48, 50]);
275
- expect(element.innerHTML).to.matchSnapshot();
276
- dispatchEvent(first, 'focusout');
277
-
278
- case 42:
279
- case "end":
280
- return _context4.stop();
281
- }
177
+ while (1) switch (_context4.prev = _context4.next) {
178
+ case 0:
179
+ _mount4 = mount(RangeDemo), instance = _mount4[0], element = _mount4[1];
180
+ _element$querySelecto4 = element.querySelectorAll('.k-slider-thumb'), first = _element$querySelecto4[0], second = _element$querySelecto4[1];
181
+ instance.set('values', [50, 51]);
182
+ _context4.next = 5;
183
+ return wait();
184
+ case 5:
185
+ dispatchEvent(first, 'focusin');
186
+ dispatchEvent(first, 'keydown', {
187
+ keyCode: 39
188
+ });
189
+ _context4.next = 9;
190
+ return wait();
191
+ case 9:
192
+ expect(element.innerHTML).to.matchSnapshot();
193
+ expect(instance.get('values')).to.eql([51, 51]);
194
+ dispatchEvent(first, 'keydown', {
195
+ keyCode: 39
196
+ });
197
+ _context4.next = 14;
198
+ return wait();
199
+ case 14:
200
+ expect(element.innerHTML).to.matchSnapshot();
201
+ expect(instance.get('values')).to.eql([51, 52]);
202
+ dispatchEvent(second, 'keydown', {
203
+ keyCode: 39
204
+ });
205
+ _context4.next = 19;
206
+ return wait();
207
+ case 19:
208
+ expect(element.innerHTML).to.matchSnapshot();
209
+ expect(instance.get('values')).to.eql([51, 53]);
210
+ dispatchEvent(second, 'focusout');
211
+ instance.set('values', [50, 51]);
212
+ _context4.next = 25;
213
+ return wait();
214
+ case 25:
215
+ dispatchEvent(second, 'focusin');
216
+ dispatchEvent(second, 'keydown', {
217
+ keyCode: 37
218
+ });
219
+ _context4.next = 29;
220
+ return wait();
221
+ case 29:
222
+ expect(instance.get('values')).to.eql([50, 50]);
223
+ expect(element.innerHTML).to.matchSnapshot();
224
+ dispatchEvent(second, 'keydown', {
225
+ keyCode: 37
226
+ });
227
+ _context4.next = 34;
228
+ return wait();
229
+ case 34:
230
+ expect(instance.get('values')).to.eql([49, 50]);
231
+ expect(element.innerHTML).to.matchSnapshot();
232
+ dispatchEvent(first, 'keydown', {
233
+ keyCode: 37
234
+ });
235
+ _context4.next = 39;
236
+ return wait();
237
+ case 39:
238
+ expect(instance.get('values')).to.eql([48, 50]);
239
+ expect(element.innerHTML).to.matchSnapshot();
240
+ dispatchEvent(first, 'focusout');
241
+ case 42:
242
+ case "end":
243
+ return _context4.stop();
282
244
  }
283
245
  }, _callee4);
284
246
  })));
285
247
  it('disabled', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
286
248
  var _mount5, instance, element, slider, sliderDom, handle, wrapper;
287
-
288
249
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
289
- while (1) {
290
- switch (_context5.prev = _context5.next) {
291
- case 0:
292
- _mount5 = mount(DisabledDemo), instance = _mount5[0], element = _mount5[1];
293
- slider = instance.refs.__test; // cannot drag
294
-
295
- sliderDom = element.querySelector('.k-slider');
296
- handle = sliderDom.querySelector('.k-slider-thumb');
297
- dispatchEvent(handle, 'mousedown', {
298
- which: 1
299
- });
300
- dispatchEvent(handle, 'focusin');
301
- dispatchEvent(document, 'mousemove', {
302
- clientX: 0
303
- });
304
- dispatchEvent(handle, 'mouseup', {
305
- clientX: 0
306
- });
307
- _context5.next = 10;
308
- return wait();
309
-
310
- case 10:
311
- expect(sliderDom.innerHTML).to.matchSnapshot();
312
- expect(slider.get('value')).to.eql(50); // keyboard
313
-
314
- dispatchEvent(handle, 'keydown', {
315
- keyCode: 37
316
- });
317
- dispatchEvent(handle, 'focusout');
318
- _context5.next = 16;
319
- return wait();
320
-
321
- case 16:
322
- expect(sliderDom.innerHTML).to.matchSnapshot();
323
- expect(slider.get('value')).to.eql(50); // click
324
-
325
- wrapper = sliderDom.querySelector('.k-slider-track-wrapper');
326
- dispatchEvent(wrapper, 'click', {
327
- clientX: 0
328
- });
329
- _context5.next = 22;
330
- return wait();
331
-
332
- case 22:
333
- expect(sliderDom.innerHTML).to.matchSnapshot();
334
- expect(slider.get('value')).to.eql(50);
335
-
336
- case 24:
337
- case "end":
338
- return _context5.stop();
339
- }
250
+ while (1) switch (_context5.prev = _context5.next) {
251
+ case 0:
252
+ _mount5 = mount(DisabledDemo), instance = _mount5[0], element = _mount5[1];
253
+ slider = instance.refs.__test; // cannot drag
254
+ sliderDom = element.querySelector('.k-slider');
255
+ handle = sliderDom.querySelector('.k-slider-thumb');
256
+ dispatchEvent(handle, 'mousedown', {
257
+ which: 1
258
+ });
259
+ dispatchEvent(handle, 'focusin');
260
+ dispatchEvent(document, 'mousemove', {
261
+ clientX: 0
262
+ });
263
+ dispatchEvent(handle, 'mouseup', {
264
+ clientX: 0
265
+ });
266
+ _context5.next = 10;
267
+ return wait();
268
+ case 10:
269
+ expect(sliderDom.innerHTML).to.matchSnapshot();
270
+ expect(slider.get('value')).to.eql(50);
271
+ // keyboard
272
+ dispatchEvent(handle, 'keydown', {
273
+ keyCode: 37
274
+ });
275
+ dispatchEvent(handle, 'focusout');
276
+ _context5.next = 16;
277
+ return wait();
278
+ case 16:
279
+ expect(sliderDom.innerHTML).to.matchSnapshot();
280
+ expect(slider.get('value')).to.eql(50);
281
+ // click
282
+ wrapper = sliderDom.querySelector('.k-slider-track-wrapper');
283
+ dispatchEvent(wrapper, 'click', {
284
+ clientX: 0
285
+ });
286
+ _context5.next = 22;
287
+ return wait();
288
+ case 22:
289
+ expect(sliderDom.innerHTML).to.matchSnapshot();
290
+ expect(slider.get('value')).to.eql(50);
291
+ case 24:
292
+ case "end":
293
+ return _context5.stop();
340
294
  }
341
295
  }, _callee5);
342
296
  })));
343
297
  it('min/max/step is undefined', function () {
344
298
  var Demo = /*#__PURE__*/function (_Component) {
345
299
  _inheritsLoose(Demo, _Component);
346
-
347
300
  function Demo() {
348
301
  var _context6;
349
-
350
302
  var _this;
351
-
352
303
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
353
304
  args[_key] = arguments[_key];
354
305
  }
355
-
356
306
  _this = _Component.call.apply(_Component, _concatInstanceProperty(_context6 = [this]).call(_context6, args)) || this;
357
307
  _this.Slider = Slider;
358
308
  return _this;
359
309
  }
360
-
361
310
  return Demo;
362
311
  }(Component);
363
-
364
312
  Demo.template = "const {Slider} = this; <Slider min={undefined}\n max={undefined}\n step={undefined}\n value={1}\n />";
365
-
366
313
  var _mount6 = mount(Demo),
367
- instance = _mount6[0],
368
- element = _mount6[1];
369
-
314
+ instance = _mount6[0],
315
+ element = _mount6[1];
370
316
  expect(element.innerHTML).to.matchSnapshot();
371
317
  });
372
318
  it('should log error when max < min', function () {
373
319
  var Demo = /*#__PURE__*/function (_Component2) {
374
320
  _inheritsLoose(Demo, _Component2);
375
-
376
321
  function Demo() {
377
322
  var _context7;
378
-
379
323
  var _this2;
380
-
381
324
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
382
325
  args[_key2] = arguments[_key2];
383
326
  }
384
-
385
327
  _this2 = _Component2.call.apply(_Component2, _concatInstanceProperty(_context7 = [this]).call(_context7, args)) || this;
386
328
  _this2.Slider = Slider;
387
329
  return _this2;
388
330
  }
389
-
390
331
  return Demo;
391
332
  }(Component);
392
-
393
333
  Demo.template = "const {Slider} = this; <Slider min={20}\n max={0}\n step={undefined}\n value={1}\n />";
394
334
  var error = fakeError();
395
-
396
335
  var _mount7 = mount(Demo),
397
- instance = _mount7[0],
398
- element = _mount7[1];
399
-
336
+ instance = _mount7[0],
337
+ element = _mount7[1];
400
338
  expect(element.innerHTML).to.matchSnapshot();
401
339
  error('[Slider] min must less than or equal to max, but got min: 20 max: 0');
402
340
  });
403
341
  it('should input any value even if it has step', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
404
342
  var _mount8, instance, element, input, slider;
405
-
406
343
  return _regeneratorRuntime.wrap(function _callee6$(_context8) {
407
- while (1) {
408
- switch (_context8.prev = _context8.next) {
409
- case 0:
410
- _mount8 = mount(StepDemo), instance = _mount8[0], element = _mount8[1];
411
- input = element.querySelector('input');
412
- input.value = '1';
413
- dispatchEvent(input, 'input');
414
- _context8.next = 6;
415
- return wait();
416
-
417
- case 6:
418
- expect(input.value).to.eql('1');
419
- input.value = '11';
420
- dispatchEvent(input, 'input');
421
- _context8.next = 11;
422
- return wait();
423
-
424
- case 11:
425
- expect(input.value).to.eql('11');
426
- expect(instance.get('value1')).to.eql(10);
427
- dispatchEvent(input, 'change');
428
- _context8.next = 16;
429
- return wait();
430
-
431
- case 16:
432
- expect(input.value).to.eql('10');
433
- instance.set('value1', 13);
434
- _context8.next = 20;
435
- return wait();
436
-
437
- case 20:
438
- expect(instance.get('value1')).to.eql(15); // disable forceStep
439
-
440
- slider = instance.refs.__test;
441
- slider.set('forceStep', false);
442
- instance.set('value1', 13);
443
- _context8.next = 26;
444
- return wait();
445
-
446
- case 26:
447
- expect(instance.get('value1')).to.eql(13);
448
-
449
- case 27:
450
- case "end":
451
- return _context8.stop();
452
- }
344
+ while (1) switch (_context8.prev = _context8.next) {
345
+ case 0:
346
+ _mount8 = mount(StepDemo), instance = _mount8[0], element = _mount8[1];
347
+ input = element.querySelector('input');
348
+ input.value = '1';
349
+ dispatchEvent(input, 'input');
350
+ _context8.next = 6;
351
+ return wait();
352
+ case 6:
353
+ expect(input.value).to.eql('1');
354
+ input.value = '11';
355
+ dispatchEvent(input, 'input');
356
+ _context8.next = 11;
357
+ return wait();
358
+ case 11:
359
+ expect(input.value).to.eql('11');
360
+ expect(instance.get('value1')).to.eql(10);
361
+ dispatchEvent(input, 'change');
362
+ _context8.next = 16;
363
+ return wait();
364
+ case 16:
365
+ expect(input.value).to.eql('10');
366
+ instance.set('value1', 13);
367
+ _context8.next = 20;
368
+ return wait();
369
+ case 20:
370
+ expect(instance.get('value1')).to.eql(15);
371
+ // disable forceStep
372
+ slider = instance.refs.__test;
373
+ slider.set('forceStep', false);
374
+ instance.set('value1', 13);
375
+ _context8.next = 26;
376
+ return wait();
377
+ case 26:
378
+ expect(instance.get('value1')).to.eql(13);
379
+ case 27:
380
+ case "end":
381
+ return _context8.stop();
453
382
  }
454
383
  }, _callee6);
455
384
  })));
456
385
  it('should show tooltip', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
457
386
  var _mount9, instance, element, content;
458
-
459
387
  return _regeneratorRuntime.wrap(function _callee7$(_context9) {
460
- while (1) {
461
- switch (_context9.prev = _context9.next) {
462
- case 0:
463
- _mount9 = mount(TooltipDemo), instance = _mount9[0], element = _mount9[1];
464
- instance.set('value2', 11);
465
- _context9.next = 4;
466
- return wait();
467
-
468
- case 4:
469
- content = getElements('.k-tooltip-content')[0];
470
- expect(content.textContent).to.eql('满2年,优惠4个月');
471
- instance.set('value2', 5);
472
- _context9.next = 9;
473
- return wait();
474
-
475
- case 9:
476
- expect(content.textContent).to.eql('');
477
-
478
- case 10:
479
- case "end":
480
- return _context9.stop();
481
- }
388
+ while (1) switch (_context9.prev = _context9.next) {
389
+ case 0:
390
+ _mount9 = mount(TooltipDemo), instance = _mount9[0], element = _mount9[1];
391
+ instance.set('value2', 11);
392
+ _context9.next = 4;
393
+ return wait();
394
+ case 4:
395
+ content = getElements('.k-tooltip-content')[0];
396
+ expect(content.textContent).to.eql('满2年,优惠4个月');
397
+ instance.set('value2', 5);
398
+ _context9.next = 9;
399
+ return wait();
400
+ case 9:
401
+ expect(content.textContent).to.eql('');
402
+ case 10:
403
+ case "end":
404
+ return _context9.stop();
482
405
  }
483
406
  }, _callee7);
484
407
  })));
485
408
  it('should locate at the end if start value is equal to end value', function () {
486
409
  var Demo = /*#__PURE__*/function (_Component3) {
487
410
  _inheritsLoose(Demo, _Component3);
488
-
489
411
  function Demo() {
490
412
  var _context10;
491
-
492
413
  var _this3;
493
-
494
414
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
495
415
  args[_key3] = arguments[_key3];
496
416
  }
497
-
498
417
  _this3 = _Component3.call.apply(_Component3, _concatInstanceProperty(_context10 = [this]).call(_context10, args)) || this;
499
418
  _this3.Slider = Slider;
500
419
  return _this3;
501
420
  }
502
-
503
421
  return Demo;
504
422
  }(Component);
505
-
506
423
  Demo.template = "const {Slider} = this; <div>\n <Slider min={1} max={1} value={1} />\n <Slider min={1} max={1} range />\n </div>";
507
-
508
424
  var _mount10 = mount(Demo),
509
- instance = _mount10[0],
510
- element = _mount10[1];
511
-
425
+ instance = _mount10[0],
426
+ element = _mount10[1];
512
427
  expect(element.innerHTML).to.matchSnapshot();
513
428
  });
514
429
  it('should trigger change event correctly', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
515
430
  var spy, Demo, _mount11, instance, element, handle, bar, width, start, input, btn;
516
-
517
431
  return _regeneratorRuntime.wrap(function _callee8$(_context12) {
518
- while (1) {
519
- switch (_context12.prev = _context12.next) {
520
- case 0:
521
- spy = sinon.spy();
522
-
523
- Demo = /*#__PURE__*/function (_Component4) {
524
- _inheritsLoose(Demo, _Component4);
525
-
526
- function Demo() {
527
- var _context11;
528
-
529
- var _this4;
530
-
531
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
532
- args[_key4] = arguments[_key4];
533
- }
534
-
535
- _this4 = _Component4.call.apply(_Component4, _concatInstanceProperty(_context11 = [this]).call(_context11, args)) || this;
536
- _this4.Slider = Slider;
537
- return _this4;
432
+ while (1) switch (_context12.prev = _context12.next) {
433
+ case 0:
434
+ spy = sinon.spy();
435
+ Demo = /*#__PURE__*/function (_Component4) {
436
+ _inheritsLoose(Demo, _Component4);
437
+ function Demo() {
438
+ var _context11;
439
+ var _this4;
440
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
441
+ args[_key4] = arguments[_key4];
538
442
  }
539
-
540
- Demo.defaults = function defaults() {
541
- return {
542
- value: 0
543
- };
544
- };
545
-
546
- var _proto = Demo.prototype;
547
-
548
- _proto._onChange = function _onChange(v) {
549
- console.log('change', v);
550
- spy(v);
443
+ _this4 = _Component4.call.apply(_Component4, _concatInstanceProperty(_context11 = [this]).call(_context11, args)) || this;
444
+ _this4.Slider = Slider;
445
+ return _this4;
446
+ }
447
+ Demo.defaults = function defaults() {
448
+ return {
449
+ value: 0
551
450
  };
552
-
553
- return Demo;
554
- }(Component);
555
-
556
- Demo.template = "const Slider = this.Slider; <Slider ev-change={this._onChange} v-model=\"value\" />";
557
- _mount11 = mount(Demo), instance = _mount11[0], element = _mount11[1];
558
- handle = element.querySelector('.k-slider-thumb');
559
- bar = element.querySelector('.k-slider-track-wrapper'); // keyboard
560
-
561
- dispatchEvent(handle, 'focusin');
562
- dispatchEvent(handle, 'keydown', {
563
- keyCode: 39
564
- });
565
- expect(spy.callCount).to.eql(0);
566
- dispatchEvent(handle, 'keydown', {
567
- keyCode: 39
568
- });
569
- expect(spy.callCount).to.eql(0);
570
- dispatchEvent(handle, 'keyup', {
571
- keyCode: 13
572
- });
573
- expect(spy.callCount).to.eql(0);
574
- dispatchEvent(handle, 'keyup', {
575
- keyCode: 39
576
- });
577
- expect(spy.callCount).to.eql(1);
578
- expect(spy.calledWith(2)).to.be.true;
579
- dispatchEvent(handle, 'keydown', {
580
- keyCode: 39
581
- });
582
- expect(spy.callCount).to.eql(1);
583
- dispatchEvent(handle, 'keyup', {
584
- keyCode: 39
585
- });
586
- expect(spy.callCount).to.eql(2);
587
- expect(spy.calledWith(3)).to.be.true; // drag
588
-
589
- width = bar.getBoundingClientRect().width;
590
- dispatchEvent(handle, 'mousedown', {
591
- which: 1
592
- });
593
- dispatchEvent(document, 'mousemove', {
594
- clientX: 0.1 * width
595
- });
596
- expect(spy.callCount).to.eql(2);
597
- dispatchEvent(document, 'mouseup', {
598
- clientX: 0.1 * width
599
- });
600
- expect(spy.callCount).to.eql(3);
601
- expect(spy.calledWith(10)).to.be.true; // click
602
-
603
- dispatchEvent(bar, 'click', {
604
- clientX: 0.2 * width
605
- });
606
- expect(spy.callCount).to.eql(4);
607
- expect(spy.calledWith(20)).to.be.true; // click end
608
-
609
- start = element.querySelector('.k-slider-ends span');
610
- start.click();
611
- expect(spy.callCount).to.eql(5);
612
- expect(spy.calledWith(0)).to.be.true; // spinner
613
-
614
- input = element.querySelector('input');
615
- input.value = '1';
616
- dispatchEvent(input, 'input');
617
- _context12.next = 40;
618
- return wait();
619
-
620
- case 40:
621
- expect(spy.callCount).to.eql(6);
622
- expect(spy.calledWith(1)).to.be.true;
623
- btn = element.querySelector('.k-btn');
624
- btn.click();
625
- _context12.next = 46;
626
- return wait();
627
-
628
- case 46:
629
- expect(spy.callCount).to.eql(7);
630
- expect(spy.calledWith(0)).to.be.true;
631
-
632
- case 48:
633
- case "end":
634
- return _context12.stop();
635
- }
451
+ };
452
+ var _proto = Demo.prototype;
453
+ _proto._onChange = function _onChange(v) {
454
+ console.log('change', v);
455
+ spy(v);
456
+ };
457
+ return Demo;
458
+ }(Component);
459
+ Demo.template = "const Slider = this.Slider; <Slider ev-change={this._onChange} v-model=\"value\" />";
460
+ _mount11 = mount(Demo), instance = _mount11[0], element = _mount11[1];
461
+ handle = element.querySelector('.k-slider-thumb');
462
+ bar = element.querySelector('.k-slider-track-wrapper'); // keyboard
463
+ dispatchEvent(handle, 'focusin');
464
+ dispatchEvent(handle, 'keydown', {
465
+ keyCode: 39
466
+ });
467
+ expect(spy.callCount).to.eql(0);
468
+ dispatchEvent(handle, 'keydown', {
469
+ keyCode: 39
470
+ });
471
+ expect(spy.callCount).to.eql(0);
472
+ dispatchEvent(handle, 'keyup', {
473
+ keyCode: 13
474
+ });
475
+ expect(spy.callCount).to.eql(0);
476
+ dispatchEvent(handle, 'keyup', {
477
+ keyCode: 39
478
+ });
479
+ expect(spy.callCount).to.eql(1);
480
+ expect(spy.calledWith(2)).to.be.true;
481
+ dispatchEvent(handle, 'keydown', {
482
+ keyCode: 39
483
+ });
484
+ expect(spy.callCount).to.eql(1);
485
+ dispatchEvent(handle, 'keyup', {
486
+ keyCode: 39
487
+ });
488
+ expect(spy.callCount).to.eql(2);
489
+ expect(spy.calledWith(3)).to.be.true;
490
+ // drag
491
+ width = bar.getBoundingClientRect().width;
492
+ dispatchEvent(handle, 'mousedown', {
493
+ which: 1
494
+ });
495
+ dispatchEvent(document, 'mousemove', {
496
+ clientX: 0.1 * width
497
+ });
498
+ expect(spy.callCount).to.eql(2);
499
+ dispatchEvent(document, 'mouseup', {
500
+ clientX: 0.1 * width
501
+ });
502
+ expect(spy.callCount).to.eql(3);
503
+ expect(spy.calledWith(10)).to.be.true;
504
+ // click
505
+ dispatchEvent(bar, 'click', {
506
+ clientX: 0.2 * width
507
+ });
508
+ expect(spy.callCount).to.eql(4);
509
+ expect(spy.calledWith(20)).to.be.true;
510
+ // click end
511
+ start = element.querySelector('.k-slider-ends span');
512
+ start.click();
513
+ expect(spy.callCount).to.eql(5);
514
+ expect(spy.calledWith(0)).to.be.true;
515
+ // spinner
516
+ input = element.querySelector('input');
517
+ input.value = '1';
518
+ dispatchEvent(input, 'input');
519
+ _context12.next = 40;
520
+ return wait();
521
+ case 40:
522
+ expect(spy.callCount).to.eql(6);
523
+ expect(spy.calledWith(1)).to.be.true;
524
+ btn = element.querySelector('.k-btn');
525
+ btn.click();
526
+ _context12.next = 46;
527
+ return wait();
528
+ case 46:
529
+ expect(spy.callCount).to.eql(7);
530
+ expect(spy.calledWith(0)).to.be.true;
531
+ case 48:
532
+ case "end":
533
+ return _context12.stop();
636
534
  }
637
535
  }, _callee8);
638
- }))); // it('should set init value to min value', async () => {
536
+ })));
537
+ // it('should set init value to min value', async () => {
639
538
  // class Demo extends Component<{a: number, b: number}> {
640
539
  // static template = `const {Slider} = this; <div>
641
540
  // <Slider min={-1} max={1} v-model="a"/>
@@ -647,88 +546,71 @@ describe('Slider', function () {
647
546
  // expect(instance.get('a')).to.eql(-1);
648
547
  // expect(instance.get('b')).to.eql([-1, -1]);
649
548
  // });
650
-
651
549
  it('should set value by `min + step * n`', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
652
550
  var Demo, _mount12, instance, element;
653
-
654
551
  return _regeneratorRuntime.wrap(function _callee9$(_context14) {
655
- while (1) {
656
- switch (_context14.prev = _context14.next) {
657
- case 0:
658
- Demo = /*#__PURE__*/function (_Component5) {
659
- _inheritsLoose(Demo, _Component5);
660
-
661
- function Demo() {
662
- var _context13;
663
-
664
- var _this5;
665
-
666
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
667
- args[_key5] = arguments[_key5];
668
- }
669
-
670
- _this5 = _Component5.call.apply(_Component5, _concatInstanceProperty(_context13 = [this]).call(_context13, args)) || this;
671
- _this5.Slider = Slider;
672
- return _this5;
552
+ while (1) switch (_context14.prev = _context14.next) {
553
+ case 0:
554
+ Demo = /*#__PURE__*/function (_Component5) {
555
+ _inheritsLoose(Demo, _Component5);
556
+ function Demo() {
557
+ var _context13;
558
+ var _this5;
559
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
560
+ args[_key5] = arguments[_key5];
673
561
  }
674
-
675
- return Demo;
676
- }(Component);
677
-
678
- Demo.template = "const {Slider} = this; <div>\n <Slider min={-6} max={20} v-model=\"value\" step={5} points />\n </div>";
679
- _mount12 = mount(Demo), instance = _mount12[0], element = _mount12[1];
680
- instance.set('value', 0);
681
- _context14.next = 6;
682
- return wait();
683
-
684
- case 6:
685
- expect(instance.get('value')).to.eql(-1);
686
-
687
- case 7:
688
- case "end":
689
- return _context14.stop();
690
- }
562
+ _this5 = _Component5.call.apply(_Component5, _concatInstanceProperty(_context13 = [this]).call(_context13, args)) || this;
563
+ _this5.Slider = Slider;
564
+ return _this5;
565
+ }
566
+ return Demo;
567
+ }(Component);
568
+ Demo.template = "const {Slider} = this; <div>\n <Slider min={-6} max={20} v-model=\"value\" step={5} points />\n </div>";
569
+ _mount12 = mount(Demo), instance = _mount12[0], element = _mount12[1];
570
+ instance.set('value', 0);
571
+ _context14.next = 6;
572
+ return wait();
573
+ case 6:
574
+ expect(instance.get('value')).to.eql(-1);
575
+ case 7:
576
+ case "end":
577
+ return _context14.stop();
691
578
  }
692
579
  }, _callee9);
693
580
  })));
694
581
  it('dynamic step', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
695
582
  var _mount13, instance, element, handle, model;
696
-
697
583
  return _regeneratorRuntime.wrap(function _callee10$(_context15) {
698
- while (1) {
699
- switch (_context15.prev = _context15.next) {
700
- case 0:
701
- _mount13 = mount(DynamicStepDemo), instance = _mount13[0], element = _mount13[1];
702
- handle = element.querySelector('.k-slider-thumb');
703
- model = "value1";
704
- instance.set(model, 100);
705
- _context15.next = 6;
706
- return wait();
707
-
708
- case 6:
709
- dispatchEvent(handle, 'focusin');
710
- dispatchEvent(handle, 'keydown', {
711
- keyCode: 37
712
- });
713
- expect(instance.get(model)).to.eql(90);
714
- dispatchEvent(handle, 'keydown', {
715
- keyCode: 39
716
- });
717
- expect(instance.get(model)).to.eql(100);
718
- dispatchEvent(handle, 'keydown', {
719
- keyCode: 39
720
- });
721
- expect(instance.get(model)).to.eql(150);
722
- dispatchEvent(handle, 'keydown', {
723
- keyCode: 37
724
- });
725
- expect(instance.get(model)).to.eql(100);
726
- dispatchEvent(handle, 'focusout');
727
-
728
- case 16:
729
- case "end":
730
- return _context15.stop();
731
- }
584
+ while (1) switch (_context15.prev = _context15.next) {
585
+ case 0:
586
+ _mount13 = mount(DynamicStepDemo), instance = _mount13[0], element = _mount13[1];
587
+ handle = element.querySelector('.k-slider-thumb');
588
+ model = "value1";
589
+ instance.set(model, 100);
590
+ _context15.next = 6;
591
+ return wait();
592
+ case 6:
593
+ dispatchEvent(handle, 'focusin');
594
+ dispatchEvent(handle, 'keydown', {
595
+ keyCode: 37
596
+ });
597
+ expect(instance.get(model)).to.eql(90);
598
+ dispatchEvent(handle, 'keydown', {
599
+ keyCode: 39
600
+ });
601
+ expect(instance.get(model)).to.eql(100);
602
+ dispatchEvent(handle, 'keydown', {
603
+ keyCode: 39
604
+ });
605
+ expect(instance.get(model)).to.eql(150);
606
+ dispatchEvent(handle, 'keydown', {
607
+ keyCode: 37
608
+ });
609
+ expect(instance.get(model)).to.eql(100);
610
+ dispatchEvent(handle, 'focusout');
611
+ case 16:
612
+ case "end":
613
+ return _context15.stop();
732
614
  }
733
615
  }, _callee10);
734
616
  })));