cy-element-ui 1.0.87 → 1.1.2

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 (1037) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +148 -172
  3. package/lib/index.js +1 -58539
  4. package/lib/theme-chalk/alert.css +1 -0
  5. package/lib/theme-chalk/aside.css +1 -0
  6. package/lib/theme-chalk/autocomplete.css +1 -0
  7. package/lib/theme-chalk/avatar.css +1 -0
  8. package/lib/theme-chalk/backtop.css +1 -0
  9. package/lib/theme-chalk/badge.css +1 -0
  10. package/lib/theme-chalk/base.css +1 -1
  11. package/lib/theme-chalk/breadcrumb.css +1 -0
  12. package/lib/theme-chalk/button.css +1 -0
  13. package/lib/theme-chalk/calendar.css +1 -0
  14. package/lib/theme-chalk/card.css +1 -0
  15. package/lib/theme-chalk/carousel-item.css +1 -0
  16. package/lib/theme-chalk/carousel.css +1 -0
  17. package/lib/theme-chalk/cascader-panel.css +1 -0
  18. package/lib/theme-chalk/cascader.css +1 -0
  19. package/lib/theme-chalk/checkbox.css +1 -0
  20. package/lib/theme-chalk/col.css +1 -0
  21. package/lib/theme-chalk/collapse.css +1 -0
  22. package/lib/theme-chalk/color-picker.css +1 -0
  23. package/lib/theme-chalk/container.css +1 -0
  24. package/lib/theme-chalk/date-picker.css +1 -0
  25. package/lib/theme-chalk/descriptions-item.css +1 -0
  26. package/lib/theme-chalk/descriptions.css +1 -0
  27. package/lib/theme-chalk/dialog.css +1 -0
  28. package/lib/theme-chalk/display.css +1 -0
  29. package/lib/theme-chalk/divider.css +1 -0
  30. package/lib/theme-chalk/drawer.css +1 -0
  31. package/lib/theme-chalk/dropdown.css +1 -0
  32. package/lib/theme-chalk/empty.css +1 -0
  33. package/lib/theme-chalk/footer.css +1 -0
  34. package/lib/theme-chalk/form.css +1 -0
  35. package/lib/theme-chalk/header.css +1 -0
  36. package/lib/theme-chalk/icon.css +1 -0
  37. package/lib/theme-chalk/image.css +1 -0
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/input-number.css +1 -0
  40. package/lib/theme-chalk/input.css +1 -0
  41. package/lib/theme-chalk/link.css +1 -0
  42. package/lib/theme-chalk/loading.css +1 -0
  43. package/lib/theme-chalk/main.css +1 -0
  44. package/lib/theme-chalk/menu.css +1 -0
  45. package/lib/theme-chalk/message-box.css +1 -0
  46. package/lib/theme-chalk/message.css +1 -0
  47. package/lib/theme-chalk/notification.css +1 -0
  48. package/lib/theme-chalk/option-group.css +1 -0
  49. package/lib/theme-chalk/option.css +1 -0
  50. package/lib/theme-chalk/page-header.css +1 -0
  51. package/lib/theme-chalk/pagination.css +1 -0
  52. package/lib/theme-chalk/popconfirm.css +1 -0
  53. package/lib/theme-chalk/popover.css +1 -0
  54. package/lib/theme-chalk/popper.css +1 -0
  55. package/lib/theme-chalk/progress.css +1 -0
  56. package/lib/theme-chalk/radio-button.css +1 -0
  57. package/lib/theme-chalk/radio-group.css +1 -0
  58. package/lib/theme-chalk/radio.css +1 -0
  59. package/lib/theme-chalk/rate.css +1 -0
  60. package/lib/theme-chalk/reset.css +1 -0
  61. package/lib/theme-chalk/result.css +1 -0
  62. package/lib/theme-chalk/row.css +1 -0
  63. package/lib/theme-chalk/scrollbar.css +1 -0
  64. package/lib/theme-chalk/select-dropdown.css +1 -0
  65. package/lib/theme-chalk/select.css +1 -0
  66. package/lib/theme-chalk/skeleton-item.css +1 -0
  67. package/lib/theme-chalk/skeleton.css +1 -0
  68. package/lib/theme-chalk/slider.css +1 -0
  69. package/lib/theme-chalk/spinner.css +1 -0
  70. package/lib/theme-chalk/statistic.css +1 -0
  71. package/lib/theme-chalk/step.css +1 -0
  72. package/lib/theme-chalk/steps.css +1 -0
  73. package/lib/theme-chalk/switch.css +1 -0
  74. package/lib/theme-chalk/table-column.css +1 -0
  75. package/lib/theme-chalk/table.css +1 -0
  76. package/lib/theme-chalk/tabs.css +1 -0
  77. package/lib/theme-chalk/tag.css +1 -0
  78. package/lib/theme-chalk/time-picker.css +1 -0
  79. package/lib/theme-chalk/time-select.css +1 -0
  80. package/lib/theme-chalk/timeline-item.css +1 -0
  81. package/lib/theme-chalk/timeline.css +1 -0
  82. package/lib/theme-chalk/tooltip.css +1 -0
  83. package/lib/theme-chalk/transfer.css +1 -0
  84. package/lib/theme-chalk/tree.css +1 -0
  85. package/lib/theme-chalk/upload.css +1 -0
  86. package/package.json +150 -159
  87. package/packages/alert/index.js +8 -8
  88. package/packages/alert/src/main.vue +94 -94
  89. package/packages/aside/index.js +8 -8
  90. package/packages/aside/src/main.vue +20 -20
  91. package/packages/autocomplete/index.js +8 -8
  92. package/packages/autocomplete/src/autocomplete-suggestions.vue +76 -76
  93. package/packages/autocomplete/src/autocomplete.vue +285 -285
  94. package/packages/avatar/index.js +8 -8
  95. package/packages/avatar/src/main.vue +107 -107
  96. package/packages/backtop/index.js +8 -8
  97. package/packages/backtop/src/main.vue +110 -110
  98. package/packages/badge/index.js +8 -8
  99. package/packages/badge/src/main.vue +53 -53
  100. package/packages/breadcrumb/index.js +8 -8
  101. package/packages/breadcrumb/src/breadcrumb-item.vue +41 -41
  102. package/packages/breadcrumb/src/breadcrumb.vue +34 -34
  103. package/packages/breadcrumb-item/index.js +8 -8
  104. package/packages/button/index.js +8 -8
  105. package/packages/button/src/button-group.vue +10 -10
  106. package/packages/button/src/button.vue +78 -78
  107. package/packages/button-group/index.js +8 -8
  108. package/packages/calendar/index.js +8 -8
  109. package/packages/calendar/src/date-table.vue +200 -200
  110. package/packages/calendar/src/main.vue +280 -280
  111. package/packages/card/index.js +8 -8
  112. package/packages/card/src/main.vue +23 -23
  113. package/packages/carousel/index.js +8 -8
  114. package/packages/carousel/src/item.vue +138 -138
  115. package/packages/carousel/src/main.vue +315 -315
  116. package/packages/carousel-item/index.js +8 -8
  117. package/packages/cascader/index.js +8 -8
  118. package/packages/cascader/src/cascader.vue +663 -663
  119. package/packages/cascader-panel/index.js +8 -8
  120. package/packages/cascader-panel/src/cascader-menu.vue +138 -138
  121. package/packages/cascader-panel/src/cascader-node.vue +246 -246
  122. package/packages/cascader-panel/src/cascader-panel.vue +391 -391
  123. package/packages/cascader-panel/src/node.js +166 -165
  124. package/packages/cascader-panel/src/store.js +58 -57
  125. package/packages/checkbox/index.js +8 -8
  126. package/packages/checkbox/src/checkbox-button.vue +199 -199
  127. package/packages/checkbox/src/checkbox-group.vue +48 -48
  128. package/packages/checkbox/src/checkbox.vue +222 -222
  129. package/packages/checkbox-button/index.js +8 -8
  130. package/packages/checkbox-group/index.js +8 -8
  131. package/packages/col/index.js +9 -9
  132. package/packages/col/src/col.js +71 -71
  133. package/packages/collapse/index.js +9 -9
  134. package/packages/collapse/src/collapse-item.vue +114 -114
  135. package/packages/collapse/src/collapse.vue +73 -73
  136. package/packages/collapse-item/index.js +8 -8
  137. package/packages/color-picker/index.js +8 -8
  138. package/packages/color-picker/src/color.js +317 -317
  139. package/packages/color-picker/src/components/alpha-slider.vue +132 -132
  140. package/packages/color-picker/src/components/hue-slider.vue +123 -123
  141. package/packages/color-picker/src/components/picker-dropdown.vue +121 -121
  142. package/packages/color-picker/src/components/predefine.vue +61 -61
  143. package/packages/color-picker/src/components/sv-panel.vue +100 -100
  144. package/packages/color-picker/src/draggable.js +36 -36
  145. package/packages/color-picker/src/main.vue +188 -188
  146. package/packages/container/index.js +8 -8
  147. package/packages/container/src/main.vue +33 -33
  148. package/packages/date-picker/index.js +8 -8
  149. package/packages/date-picker/src/basic/date-table.vue +441 -441
  150. package/packages/date-picker/src/basic/month-table.vue +269 -268
  151. package/packages/date-picker/src/basic/time-spinner.vue +304 -304
  152. package/packages/date-picker/src/basic/year-table.vue +111 -111
  153. package/packages/date-picker/src/panel/date-range.vue +680 -680
  154. package/packages/date-picker/src/panel/date.vue +609 -609
  155. package/packages/date-picker/src/panel/month-range.vue +289 -289
  156. package/packages/date-picker/src/panel/time-range.vue +248 -248
  157. package/packages/date-picker/src/panel/time-select.vue +178 -178
  158. package/packages/date-picker/src/panel/time.vue +186 -186
  159. package/packages/date-picker/src/picker/date-picker.js +43 -43
  160. package/packages/date-picker/src/picker/time-picker.js +39 -39
  161. package/packages/date-picker/src/picker/time-select.js +21 -21
  162. package/packages/date-picker/src/picker.vue +932 -390
  163. package/packages/descriptions/index.js +8 -8
  164. package/packages/descriptions/src/descriptions-item.js +30 -30
  165. package/packages/descriptions/src/descriptions-row.js +116 -116
  166. package/packages/descriptions/src/index.js +180 -180
  167. package/packages/descriptions-item/index.js +8 -8
  168. package/packages/dialog/index.js +8 -8
  169. package/packages/dialog/src/component.vue +212 -212
  170. package/packages/divider/index.js +8 -8
  171. package/packages/divider/src/main.vue +37 -37
  172. package/packages/drawer/index.js +8 -8
  173. package/packages/drawer/src/main.vue +205 -205
  174. package/packages/dropdown/index.js +8 -8
  175. package/packages/dropdown/src/dropdown-item.vue +37 -37
  176. package/packages/dropdown/src/dropdown-menu.vue +63 -63
  177. package/packages/dropdown/src/dropdown.vue +293 -293
  178. package/packages/dropdown-item/index.js +8 -8
  179. package/packages/dropdown-menu/index.js +8 -8
  180. package/packages/empty/index.js +7 -7
  181. package/packages/empty/src/img-empty.vue +132 -132
  182. package/packages/empty/src/index.vue +50 -50
  183. package/packages/footer/index.js +8 -8
  184. package/packages/footer/src/main.vue +20 -20
  185. package/packages/form/index.js +8 -8
  186. package/packages/form/src/form-item.vue +294 -334
  187. package/packages/form/src/form.vue +182 -182
  188. package/packages/form/src/label-wrap.vue +78 -0
  189. package/packages/form-item/index.js +8 -8
  190. package/packages/header/index.js +8 -8
  191. package/packages/header/src/main.vue +20 -20
  192. package/packages/icon/index.js +8 -8
  193. package/packages/icon/src/icon.vue +13 -13
  194. package/packages/image/index.js +8 -8
  195. package/packages/image/src/image-viewer.vue +330 -330
  196. package/packages/image/src/main.vue +249 -249
  197. package/packages/infinite-scroll/index.js +8 -8
  198. package/packages/infinite-scroll/src/main.js +150 -149
  199. package/packages/input/index.js +8 -8
  200. package/packages/input/src/calcTextareaHeight.js +104 -104
  201. package/packages/input/src/input.vue +440 -440
  202. package/packages/input-number/index.js +8 -8
  203. package/packages/input-number/src/input-number.vue +286 -286
  204. package/packages/link/index.js +8 -8
  205. package/packages/link/src/main.vue +53 -53
  206. package/packages/loading/index.js +11 -11
  207. package/packages/loading/src/directive.js +133 -133
  208. package/packages/loading/src/index.js +106 -106
  209. package/packages/loading/src/loading.vue +41 -41
  210. package/packages/main/index.js +8 -8
  211. package/packages/main/src/main.vue +12 -12
  212. package/packages/menu/index.js +8 -8
  213. package/packages/menu/src/menu-item-group.vue +45 -45
  214. package/packages/menu/src/menu-item.vue +112 -112
  215. package/packages/menu/src/menu-mixin.js +44 -44
  216. package/packages/menu/src/menu.vue +325 -325
  217. package/packages/menu/src/submenu.vue +349 -348
  218. package/packages/menu-item/index.js +8 -8
  219. package/packages/menu-item-group/index.js +8 -8
  220. package/packages/message/index.js +2 -2
  221. package/packages/message/src/main.js +91 -91
  222. package/packages/message/src/main.vue +117 -117
  223. package/packages/message-box/index.js +2 -2
  224. package/packages/message-box/src/main.js +216 -216
  225. package/packages/message-box/src/main.vue +332 -332
  226. package/packages/notification/index.js +2 -2
  227. package/packages/notification/src/main.js +94 -94
  228. package/packages/notification/src/main.vue +152 -152
  229. package/packages/option/index.js +8 -8
  230. package/packages/option-group/index.js +8 -8
  231. package/packages/page-header/index.js +8 -8
  232. package/packages/page-header/src/main.vue +30 -30
  233. package/packages/pagination/index.js +8 -8
  234. package/packages/pagination/src/pager.vue +163 -163
  235. package/packages/pagination/src/pagination.js +386 -386
  236. package/packages/popconfirm/index.js +8 -8
  237. package/packages/popconfirm/src/main.vue +104 -104
  238. package/packages/popover/index.js +14 -14
  239. package/packages/popover/src/directive.js +20 -20
  240. package/packages/popover/src/main.vue +237 -237
  241. package/packages/progress/index.js +8 -8
  242. package/packages/progress/src/progress.vue +235 -235
  243. package/packages/radio/index.js +8 -8
  244. package/packages/radio/src/radio-button.vue +115 -115
  245. package/packages/radio/src/radio-group.vue +113 -113
  246. package/packages/radio/src/radio.vue +134 -134
  247. package/packages/radio-button/index.js +8 -8
  248. package/packages/radio-group/index.js +8 -8
  249. package/packages/rate/index.js +8 -8
  250. package/packages/rate/src/main.vue +348 -348
  251. package/packages/result/index.js +8 -8
  252. package/packages/result/src/icon-error.vue +13 -13
  253. package/packages/result/src/icon-info.vue +13 -13
  254. package/packages/result/src/icon-success.vue +13 -13
  255. package/packages/result/src/icon-warning.vue +13 -13
  256. package/packages/result/src/index.vue +65 -65
  257. package/packages/row/index.js +9 -9
  258. package/packages/row/src/row.js +44 -44
  259. package/packages/scrollbar/index.js +8 -8
  260. package/packages/scrollbar/src/bar.js +92 -92
  261. package/packages/scrollbar/src/main.js +130 -130
  262. package/packages/scrollbar/src/util.js +34 -34
  263. package/packages/select/index.js +8 -8
  264. package/packages/select/src/navigation-mixin.js +54 -54
  265. package/packages/select/src/option-group.vue +60 -60
  266. package/packages/select/src/option.vue +168 -168
  267. package/packages/select/src/select-dropdown.vue +74 -74
  268. package/packages/select/src/select.vue +900 -900
  269. package/packages/skeleton/index.js +8 -8
  270. package/packages/skeleton/src/img-placeholder.vue +16 -16
  271. package/packages/skeleton/src/index.vue +76 -76
  272. package/packages/skeleton/src/item.vue +22 -22
  273. package/packages/skeleton-item/index.js +8 -8
  274. package/packages/slider/index.js +8 -8
  275. package/packages/slider/src/button.vue +238 -238
  276. package/packages/slider/src/main.vue +427 -427
  277. package/packages/slider/src/marker.js +18 -18
  278. package/packages/spinner/index.js +8 -8
  279. package/packages/spinner/src/spinner.vue +27 -27
  280. package/packages/statistic/index.js +8 -8
  281. package/packages/statistic/src/main.vue +204 -203
  282. package/packages/step/index.js +8 -8
  283. package/packages/steps/README.md +69 -69
  284. package/packages/steps/index.js +8 -8
  285. package/packages/steps/src/step.vue +184 -184
  286. package/packages/steps/src/steps.vue +68 -68
  287. package/packages/submenu/index.js +8 -8
  288. package/packages/switch/index.js +9 -9
  289. package/packages/switch/src/component.vue +174 -174
  290. package/packages/tab-pane/index.js +8 -8
  291. package/packages/table/index.js +8 -8
  292. package/packages/table/src/config.js +124 -124
  293. package/packages/table/src/dropdown.js +28 -28
  294. package/packages/table/src/filter-panel.vue +194 -194
  295. package/packages/table/src/layout-observer.js +68 -68
  296. package/packages/table/src/store/current.js +76 -76
  297. package/packages/table/src/store/expand.js +65 -65
  298. package/packages/table/src/store/helper.js +41 -41
  299. package/packages/table/src/store/index.js +147 -147
  300. package/packages/table/src/store/tree.js +209 -209
  301. package/packages/table/src/store/watcher.js +381 -381
  302. package/packages/table/src/table-body.js +469 -469
  303. package/packages/table/src/table-column.js +319 -319
  304. package/packages/table/src/table-footer.js +153 -153
  305. package/packages/table/src/table-header.js +511 -511
  306. package/packages/table/src/table-layout.js +249 -249
  307. package/packages/table/src/table-row.js +101 -101
  308. package/packages/table/src/table.vue +712 -718
  309. package/packages/table/src/util.js +273 -273
  310. package/packages/table-column/index.js +8 -8
  311. package/packages/tabs/index.js +8 -8
  312. package/packages/tabs/src/tab-bar.vue +57 -57
  313. package/packages/tabs/src/tab-nav.vue +294 -294
  314. package/packages/tabs/src/tab-pane.vue +56 -56
  315. package/packages/tabs/src/tabs.vue +191 -191
  316. package/packages/tag/index.js +8 -8
  317. package/packages/tag/src/tag.vue +58 -58
  318. package/packages/theme-chalk/README.md +33 -33
  319. package/packages/theme-chalk/gulpfile.js +25 -27
  320. package/packages/theme-chalk/package.json +35 -35
  321. package/packages/theme-chalk/src/alert.scss +147 -147
  322. package/packages/theme-chalk/src/aside.scss +7 -7
  323. package/packages/theme-chalk/src/autocomplete.scss +80 -80
  324. package/packages/theme-chalk/src/avatar.scss +51 -51
  325. package/packages/theme-chalk/src/backtop.scss +22 -22
  326. package/packages/theme-chalk/src/badge.scss +57 -57
  327. package/packages/theme-chalk/src/base.scss +2 -2
  328. package/packages/theme-chalk/src/breadcrumb.scss +55 -55
  329. package/packages/theme-chalk/src/button.scss +262 -262
  330. package/packages/theme-chalk/src/calendar.scss +79 -79
  331. package/packages/theme-chalk/src/card.scss +32 -32
  332. package/packages/theme-chalk/src/carousel-item.scss +50 -50
  333. package/packages/theme-chalk/src/carousel.scss +161 -161
  334. package/packages/theme-chalk/src/cascader-panel.scss +120 -120
  335. package/packages/theme-chalk/src/cascader.scss +182 -182
  336. package/packages/theme-chalk/src/checkbox.scss +359 -359
  337. package/packages/theme-chalk/src/col.scss +156 -156
  338. package/packages/theme-chalk/src/collapse.scss +63 -63
  339. package/packages/theme-chalk/src/color-picker.scss +384 -384
  340. package/packages/theme-chalk/src/common/popup.scss +42 -42
  341. package/packages/theme-chalk/src/common/transition.scss +99 -99
  342. package/packages/theme-chalk/src/common/var.scss +1028 -1028
  343. package/packages/theme-chalk/src/container.scss +14 -14
  344. package/packages/theme-chalk/src/date-picker/date-picker.scss +97 -97
  345. package/packages/theme-chalk/src/date-picker/date-range-picker.scss +101 -101
  346. package/packages/theme-chalk/src/date-picker/date-table.scss +151 -151
  347. package/packages/theme-chalk/src/date-picker/month-table.scss +82 -82
  348. package/packages/theme-chalk/src/date-picker/picker-panel.scss +117 -117
  349. package/packages/theme-chalk/src/date-picker/picker.scss +197 -197
  350. package/packages/theme-chalk/src/date-picker/time-picker.scss +85 -85
  351. package/packages/theme-chalk/src/date-picker/time-range-picker.scss +31 -31
  352. package/packages/theme-chalk/src/date-picker/time-spinner.scss +110 -110
  353. package/packages/theme-chalk/src/date-picker/year-table.scss +51 -51
  354. package/packages/theme-chalk/src/date-picker.scss +11 -11
  355. package/packages/theme-chalk/src/descriptions-item.scss +42 -42
  356. package/packages/theme-chalk/src/descriptions.scss +111 -111
  357. package/packages/theme-chalk/src/dialog.scss +123 -123
  358. package/packages/theme-chalk/src/display.scss +12 -12
  359. package/packages/theme-chalk/src/divider.scss +47 -47
  360. package/packages/theme-chalk/src/drawer.scss +219 -219
  361. package/packages/theme-chalk/src/dropdown.scss +182 -182
  362. package/packages/theme-chalk/src/empty.scss +45 -45
  363. package/packages/theme-chalk/src/footer.scss +8 -8
  364. package/packages/theme-chalk/src/form.scss +167 -167
  365. package/packages/theme-chalk/src/header.scss +8 -8
  366. package/packages/theme-chalk/src/icon.scss +1167 -1167
  367. package/packages/theme-chalk/src/image.scss +179 -179
  368. package/packages/theme-chalk/src/index.scss +87 -87
  369. package/packages/theme-chalk/src/input-number.scss +261 -180
  370. package/packages/theme-chalk/src/input.scss +360 -360
  371. package/packages/theme-chalk/src/link.scss +81 -81
  372. package/packages/theme-chalk/src/loading.scss +96 -96
  373. package/packages/theme-chalk/src/main.scss +12 -12
  374. package/packages/theme-chalk/src/menu.scss +289 -289
  375. package/packages/theme-chalk/src/message-box.scss +226 -226
  376. package/packages/theme-chalk/src/message.scss +120 -120
  377. package/packages/theme-chalk/src/mixins/_button.scss +81 -81
  378. package/packages/theme-chalk/src/mixins/config.scss +4 -4
  379. package/packages/theme-chalk/src/mixins/function.scss +44 -44
  380. package/packages/theme-chalk/src/mixins/mixins.scss +191 -196
  381. package/packages/theme-chalk/src/mixins/utils.scss +39 -39
  382. package/packages/theme-chalk/src/notification.scss +99 -99
  383. package/packages/theme-chalk/src/option-group.scss +42 -42
  384. package/packages/theme-chalk/src/option.scss +36 -36
  385. package/packages/theme-chalk/src/page-header.scss +41 -41
  386. package/packages/theme-chalk/src/pagination.scss +295 -295
  387. package/packages/theme-chalk/src/popconfirm.scss +16 -16
  388. package/packages/theme-chalk/src/popover.scss +40 -40
  389. package/packages/theme-chalk/src/popper.scss +101 -101
  390. package/packages/theme-chalk/src/progress.scss +141 -141
  391. package/packages/theme-chalk/src/radio-button.scss +113 -113
  392. package/packages/theme-chalk/src/radio-group.scss +9 -9
  393. package/packages/theme-chalk/src/radio.scss +199 -199
  394. package/packages/theme-chalk/src/rate.scss +49 -49
  395. package/packages/theme-chalk/src/reset.scss +79 -79
  396. package/packages/theme-chalk/src/result.scss +61 -61
  397. package/packages/theme-chalk/src/row.scss +43 -43
  398. package/packages/theme-chalk/src/scrollbar.scss +72 -72
  399. package/packages/theme-chalk/src/select-dropdown.scss +62 -62
  400. package/packages/theme-chalk/src/select.scss +152 -152
  401. package/packages/theme-chalk/src/skeleton-item.scss +84 -84
  402. package/packages/theme-chalk/src/skeleton.scss +40 -40
  403. package/packages/theme-chalk/src/slider.scss +250 -250
  404. package/packages/theme-chalk/src/spinner.scss +44 -44
  405. package/packages/theme-chalk/src/statistic.scss +38 -38
  406. package/packages/theme-chalk/src/step.scss +317 -317
  407. package/packages/theme-chalk/src/steps.scss +20 -20
  408. package/packages/theme-chalk/src/switch.scss +116 -116
  409. package/packages/theme-chalk/src/table-column.scss +97 -97
  410. package/packages/theme-chalk/src/table.scss +564 -564
  411. package/packages/theme-chalk/src/tabs.scss +602 -602
  412. package/packages/theme-chalk/src/tag.scss +163 -163
  413. package/packages/theme-chalk/src/time-picker.scss +8 -8
  414. package/packages/theme-chalk/src/time-select.scss +37 -37
  415. package/packages/theme-chalk/src/timeline-item.scss +86 -86
  416. package/packages/theme-chalk/src/timeline.scss +14 -14
  417. package/packages/theme-chalk/src/tooltip.scss +141 -141
  418. package/packages/theme-chalk/src/transfer.scss +227 -227
  419. package/packages/theme-chalk/src/tree.scss +123 -123
  420. package/packages/theme-chalk/src/upload.scss +603 -603
  421. package/packages/time-picker/index.js +8 -8
  422. package/packages/time-select/index.js +8 -8
  423. package/packages/timeline/index.js +8 -8
  424. package/packages/timeline/src/item.vue +73 -73
  425. package/packages/timeline/src/main.vue +33 -33
  426. package/packages/timeline-item/index.js +8 -8
  427. package/packages/tooltip/index.js +8 -8
  428. package/packages/tooltip/src/main.js +242 -242
  429. package/packages/transfer/index.js +8 -8
  430. package/packages/transfer/src/main.vue +231 -231
  431. package/packages/transfer/src/transfer-panel.vue +251 -251
  432. package/packages/tree/index.js +8 -8
  433. package/packages/tree/src/model/node.js +484 -484
  434. package/packages/tree/src/model/tree-store.js +340 -340
  435. package/packages/tree/src/model/util.js +27 -27
  436. package/packages/tree/src/tree-node.vue +279 -279
  437. package/packages/tree/src/tree.vue +496 -496
  438. package/packages/upload/index.js +8 -8
  439. package/packages/upload/src/ajax.js +85 -85
  440. package/packages/upload/src/index.vue +338 -338
  441. package/packages/upload/src/upload-dragger.vue +70 -70
  442. package/packages/upload/src/upload-list.vue +105 -105
  443. package/packages/upload/src/upload.vue +211 -211
  444. package/src/directives/mousewheel.js +18 -18
  445. package/src/directives/repeat-click.js +26 -26
  446. package/src/index.js +202 -216
  447. package/src/locale/format.js +46 -45
  448. package/src/locale/index.js +48 -48
  449. package/src/locale/lang/en.js +123 -123
  450. package/src/locale/lang/zh-CN.js +123 -123
  451. package/src/locale/lang/zh-TW.js +123 -123
  452. package/src/mixins/emitter.js +33 -33
  453. package/src/mixins/focus.js +9 -9
  454. package/src/mixins/locale.js +9 -9
  455. package/src/mixins/migrating.js +54 -54
  456. package/src/transitions/collapse-transition.js +77 -77
  457. package/src/utils/after-leave.js +27 -27
  458. package/src/utils/aria-dialog.js +90 -90
  459. package/src/utils/aria-utils.js +122 -122
  460. package/src/utils/clickoutside.js +76 -76
  461. package/src/utils/date-util.js +282 -282
  462. package/src/utils/date.js +368 -368
  463. package/src/utils/dom.js +227 -227
  464. package/src/utils/lodash.js +18075 -18075
  465. package/src/utils/menu/aria-menubar.js +14 -14
  466. package/src/utils/menu/aria-menuitem.js +49 -49
  467. package/src/utils/menu/aria-submenu.js +59 -59
  468. package/src/utils/merge.js +15 -15
  469. package/src/utils/popper.js +1276 -1276
  470. package/src/utils/popup/index.js +218 -218
  471. package/src/utils/popup/popup-manager.js +194 -194
  472. package/src/utils/resize-event.js +36 -36
  473. package/src/utils/scroll-into-view.js +27 -27
  474. package/src/utils/scrollbar-width.js +29 -29
  475. package/src/utils/shared.js +7 -7
  476. package/src/utils/types.js +40 -40
  477. package/src/utils/util.js +245 -245
  478. package/src/utils/vdom.js +5 -5
  479. package/src/utils/vue-popper.js +198 -198
  480. package/types/alert.d.ts +31 -31
  481. package/types/aside.d.ts +7 -7
  482. package/types/autocomplete.d.ts +78 -78
  483. package/types/avatar.d.ts +20 -20
  484. package/types/backtop.d.ts +16 -16
  485. package/types/badge.d.ts +16 -16
  486. package/types/breadcrumb-item.d.ts +10 -10
  487. package/types/breadcrumb.d.ts +10 -10
  488. package/types/button-group.d.ts +4 -4
  489. package/types/button.d.ts +37 -37
  490. package/types/calendar.d.ts +15 -15
  491. package/types/card.d.ts +26 -26
  492. package/types/carousel-item.d.ts +10 -10
  493. package/types/carousel.d.ts +57 -57
  494. package/types/cascader-panel.d.ts +72 -72
  495. package/types/cascader.d.ts +65 -65
  496. package/types/checkbox-button.d.ts +22 -22
  497. package/types/checkbox-group.d.ts +22 -22
  498. package/types/checkbox.d.ts +34 -34
  499. package/types/col.d.ts +46 -46
  500. package/types/collapse-item.d.ts +26 -26
  501. package/types/collapse.d.ts +10 -10
  502. package/types/color-picker.d.ts +21 -21
  503. package/types/component.d.ts +13 -13
  504. package/types/container.d.ts +7 -7
  505. package/types/date-picker.d.ts +124 -124
  506. package/types/descriptions-item.d.ts +37 -37
  507. package/types/descriptions.d.ts +52 -52
  508. package/types/dialog.d.ts +62 -62
  509. package/types/divider.d.ts +12 -12
  510. package/types/drawer.d.ts +63 -63
  511. package/types/dropdown-item.d.ts +16 -16
  512. package/types/dropdown-menu.d.ts +4 -4
  513. package/types/dropdown.d.ts +38 -38
  514. package/types/element-ui.d.ts +1 -22
  515. package/types/empty.d.ts +31 -31
  516. package/types/footer.d.ts +7 -7
  517. package/types/form-item.d.ts +37 -37
  518. package/types/form.d.ts +82 -82
  519. package/types/header.d.ts +7 -7
  520. package/types/icon.d.ts +7 -7
  521. package/types/image.d.ts +43 -43
  522. package/types/index.d.ts +4 -4
  523. package/types/infinite-scroll.d.ts +5 -5
  524. package/types/input-number.d.ts +47 -47
  525. package/types/input.d.ts +107 -107
  526. package/types/link.d.ts +25 -25
  527. package/types/loading.d.ts +62 -62
  528. package/types/main.d.ts +4 -4
  529. package/types/menu-item-group.d.ts +7 -7
  530. package/types/menu-item.d.ts +10 -10
  531. package/types/menu.d.ts +46 -46
  532. package/types/message-box.d.ts +176 -176
  533. package/types/message.d.ts +90 -90
  534. package/types/notification.d.ts +84 -84
  535. package/types/option-group.d.ts +10 -10
  536. package/types/option.d.ts +13 -13
  537. package/types/page-header.d.ts +10 -10
  538. package/types/pagination.d.ts +43 -43
  539. package/types/popconfirm.d.ts +29 -29
  540. package/types/popover.d.ts +71 -71
  541. package/types/progress.d.ts +37 -37
  542. package/types/radio-button.d.ts +16 -16
  543. package/types/radio-group.d.ts +18 -18
  544. package/types/radio.d.ts +19 -19
  545. package/types/rate.d.ts +64 -64
  546. package/types/result.d.ts +33 -33
  547. package/types/row.d.ts +25 -25
  548. package/types/select.d.ts +90 -90
  549. package/types/skeleton-item.d.ts +7 -7
  550. package/types/skeleton.d.ts +33 -33
  551. package/types/slider.d.ts +68 -68
  552. package/types/spinner.d.ts +16 -16
  553. package/types/statistic.d.ts +37 -37
  554. package/types/step.d.ts +34 -34
  555. package/types/steps.d.ts +28 -28
  556. package/types/submenu.d.ts +22 -22
  557. package/types/switch.d.ts +43 -43
  558. package/types/tab-pane.d.ts +19 -19
  559. package/types/table-column.d.ts +117 -117
  560. package/types/table.d.ts +177 -177
  561. package/types/tabs.d.ts +31 -31
  562. package/types/tag.d.ts +28 -28
  563. package/types/time-picker.d.ts +63 -63
  564. package/types/time-select.d.ts +56 -56
  565. package/types/timeline-item.d.ts +20 -20
  566. package/types/timeline.d.ts +6 -6
  567. package/types/tooltip.d.ts +52 -52
  568. package/types/transfer.d.ts +73 -73
  569. package/types/tree.d.ts +266 -266
  570. package/types/upload.d.ts +124 -124
  571. package/web-types.json +4195 -4195
  572. package/lib/alert.js +0 -402
  573. package/lib/aside.js +0 -270
  574. package/lib/autocomplete.js +0 -4651
  575. package/lib/avatar.js +0 -363
  576. package/lib/backtop.js +0 -386
  577. package/lib/badge.js +0 -313
  578. package/lib/breadcrumb-item.js +0 -309
  579. package/lib/breadcrumb.js +0 -287
  580. package/lib/button-group.js +0 -256
  581. package/lib/button.js +0 -332
  582. package/lib/calendar.js +0 -2373
  583. package/lib/card.js +0 -289
  584. package/lib/carousel-item.js +0 -755
  585. package/lib/carousel.js +0 -719
  586. package/lib/cascader-panel.js +0 -3623
  587. package/lib/cascader.js +0 -7498
  588. package/lib/checkbox-button.js +0 -573
  589. package/lib/checkbox-group.js +0 -344
  590. package/lib/checkbox.js +0 -603
  591. package/lib/col.js +0 -177
  592. package/lib/collapse-item.js +0 -1156
  593. package/lib/collapse.js +0 -323
  594. package/lib/color-picker.js +0 -5600
  595. package/lib/container.js +0 -281
  596. package/lib/date-picker.js +0 -9871
  597. package/lib/descriptions-item.js +0 -140
  598. package/lib/descriptions.js +0 -512
  599. package/lib/dialog.js +0 -1736
  600. package/lib/directives/mousewheel.js +0 -26
  601. package/lib/directives/repeat-click.js +0 -33
  602. package/lib/divider.js +0 -297
  603. package/lib/drawer.js +0 -1316
  604. package/lib/dropdown-item.js +0 -332
  605. package/lib/dropdown-menu.js +0 -2545
  606. package/lib/dropdown.js +0 -1579
  607. package/lib/element-ui.common.js +0 -54072
  608. package/lib/empty.js +0 -1186
  609. package/lib/fileUpload.js +0 -3276
  610. package/lib/footer.js +0 -270
  611. package/lib/form-item.js +0 -1129
  612. package/lib/form.js +0 -471
  613. package/lib/header.js +0 -270
  614. package/lib/icon.js +0 -260
  615. package/lib/image.js +0 -2386
  616. package/lib/infinite-scroll.js +0 -591
  617. package/lib/input-number.js +0 -2093
  618. package/lib/input.js +0 -1358
  619. package/lib/link.js +0 -308
  620. package/lib/loading.js +0 -1349
  621. package/lib/locale/format.js +0 -55
  622. package/lib/locale/index.js +0 -63
  623. package/lib/locale/lang/af-ZA.js +0 -126
  624. package/lib/locale/lang/ar.js +0 -125
  625. package/lib/locale/lang/az.js +0 -126
  626. package/lib/locale/lang/bg.js +0 -126
  627. package/lib/locale/lang/bn.js +0 -126
  628. package/lib/locale/lang/ca.js +0 -125
  629. package/lib/locale/lang/cs-CZ.js +0 -128
  630. package/lib/locale/lang/da.js +0 -125
  631. package/lib/locale/lang/de.js +0 -127
  632. package/lib/locale/lang/ee.js +0 -126
  633. package/lib/locale/lang/el.js +0 -126
  634. package/lib/locale/lang/en.js +0 -126
  635. package/lib/locale/lang/eo.js +0 -126
  636. package/lib/locale/lang/es.js +0 -125
  637. package/lib/locale/lang/eu.js +0 -126
  638. package/lib/locale/lang/fa.js +0 -126
  639. package/lib/locale/lang/fi.js +0 -126
  640. package/lib/locale/lang/fr.js +0 -125
  641. package/lib/locale/lang/he.js +0 -126
  642. package/lib/locale/lang/hr.js +0 -126
  643. package/lib/locale/lang/hu.js +0 -125
  644. package/lib/locale/lang/hy-AM.js +0 -126
  645. package/lib/locale/lang/id.js +0 -126
  646. package/lib/locale/lang/is.js +0 -126
  647. package/lib/locale/lang/it.js +0 -125
  648. package/lib/locale/lang/ja.js +0 -126
  649. package/lib/locale/lang/kg.js +0 -126
  650. package/lib/locale/lang/km.js +0 -126
  651. package/lib/locale/lang/ko.js +0 -126
  652. package/lib/locale/lang/ku.js +0 -126
  653. package/lib/locale/lang/kz.js +0 -126
  654. package/lib/locale/lang/lo-LA.js +0 -126
  655. package/lib/locale/lang/lt.js +0 -126
  656. package/lib/locale/lang/lv.js +0 -126
  657. package/lib/locale/lang/mn.js +0 -126
  658. package/lib/locale/lang/ms.js +0 -125
  659. package/lib/locale/lang/nb-NO.js +0 -125
  660. package/lib/locale/lang/nl.js +0 -126
  661. package/lib/locale/lang/pl.js +0 -126
  662. package/lib/locale/lang/pt-br.js +0 -126
  663. package/lib/locale/lang/pt.js +0 -126
  664. package/lib/locale/lang/ro.js +0 -126
  665. package/lib/locale/lang/ru-RU.js +0 -126
  666. package/lib/locale/lang/si.js +0 -126
  667. package/lib/locale/lang/sk.js +0 -128
  668. package/lib/locale/lang/sl.js +0 -126
  669. package/lib/locale/lang/sr-Latn.js +0 -126
  670. package/lib/locale/lang/sr.js +0 -126
  671. package/lib/locale/lang/sv-SE.js +0 -126
  672. package/lib/locale/lang/sw.js +0 -126
  673. package/lib/locale/lang/ta.js +0 -125
  674. package/lib/locale/lang/th.js +0 -126
  675. package/lib/locale/lang/tk.js +0 -126
  676. package/lib/locale/lang/tr-TR.js +0 -126
  677. package/lib/locale/lang/ua.js +0 -126
  678. package/lib/locale/lang/ug-CN.js +0 -126
  679. package/lib/locale/lang/uz-UZ.js +0 -126
  680. package/lib/locale/lang/vi.js +0 -126
  681. package/lib/locale/lang/zh-CN.js +0 -126
  682. package/lib/locale/lang/zh-TW.js +0 -126
  683. package/lib/main.js +0 -257
  684. package/lib/menu-item-group.js +0 -296
  685. package/lib/menu-item.js +0 -3344
  686. package/lib/menu.js +0 -1556
  687. package/lib/message-box.js +0 -3564
  688. package/lib/message.js +0 -1601
  689. package/lib/mixins/emitter.js +0 -36
  690. package/lib/mixins/focus.js +0 -15
  691. package/lib/mixins/locale.js +0 -17
  692. package/lib/mixins/migrating.js +0 -69
  693. package/lib/notification.js +0 -1662
  694. package/lib/option-group.js +0 -364
  695. package/lib/option.js +0 -835
  696. package/lib/page-header.js +0 -908
  697. package/lib/pagination.js +0 -6855
  698. package/lib/popconfirm.js +0 -3708
  699. package/lib/popover.js +0 -3118
  700. package/lib/progress.js +0 -542
  701. package/lib/radio-button.js +0 -456
  702. package/lib/radio-group.js +0 -412
  703. package/lib/radio.js +0 -482
  704. package/lib/rate.js +0 -1278
  705. package/lib/result.js +0 -528
  706. package/lib/row.js +0 -149
  707. package/lib/scrollbar.js +0 -1108
  708. package/lib/select.js +0 -6134
  709. package/lib/selectDisplayInput.js +0 -355
  710. package/lib/skeleton-item.js +0 -322
  711. package/lib/skeleton.js +0 -345
  712. package/lib/slider.js +0 -5231
  713. package/lib/spinner.js +0 -293
  714. package/lib/statistic.js +0 -9999
  715. package/lib/step.js +0 -476
  716. package/lib/steps.js +0 -745
  717. package/lib/subTitle.js +0 -284
  718. package/lib/submenu.js +0 -3021
  719. package/lib/switch.js +0 -970
  720. package/lib/tab-pane.js +0 -318
  721. package/lib/tabDialog.js +0 -2264
  722. package/lib/table-column.js +0 -1800
  723. package/lib/table.js +0 -8803
  724. package/lib/tabs.js +0 -1329
  725. package/lib/tag.js +0 -304
  726. package/lib/theme-chalk/README.md +0 -33
  727. package/lib/theme-chalk/element.css +0 -1
  728. package/lib/theme-chalk/fileUpload.css +0 -1
  729. package/lib/theme-chalk/gulpfile.js +0 -27
  730. package/lib/theme-chalk/package.json +0 -35
  731. package/lib/theme-chalk/selectDisplayInput.css +0 -1
  732. package/lib/theme-chalk/src/alert.scss +0 -147
  733. package/lib/theme-chalk/src/aside.scss +0 -7
  734. package/lib/theme-chalk/src/autocomplete.scss +0 -80
  735. package/lib/theme-chalk/src/avatar.scss +0 -51
  736. package/lib/theme-chalk/src/backtop.scss +0 -22
  737. package/lib/theme-chalk/src/badge.scss +0 -57
  738. package/lib/theme-chalk/src/base.scss +0 -2
  739. package/lib/theme-chalk/src/breadcrumb.scss +0 -55
  740. package/lib/theme-chalk/src/button.scss +0 -262
  741. package/lib/theme-chalk/src/calendar.scss +0 -79
  742. package/lib/theme-chalk/src/card.scss +0 -32
  743. package/lib/theme-chalk/src/carousel-item.scss +0 -50
  744. package/lib/theme-chalk/src/carousel.scss +0 -161
  745. package/lib/theme-chalk/src/cascader-panel.scss +0 -120
  746. package/lib/theme-chalk/src/cascader.scss +0 -182
  747. package/lib/theme-chalk/src/checkbox.scss +0 -359
  748. package/lib/theme-chalk/src/col.scss +0 -156
  749. package/lib/theme-chalk/src/collapse.scss +0 -63
  750. package/lib/theme-chalk/src/color-picker.scss +0 -384
  751. package/lib/theme-chalk/src/common/popup.scss +0 -42
  752. package/lib/theme-chalk/src/common/transition.scss +0 -99
  753. package/lib/theme-chalk/src/common/var.scss +0 -1028
  754. package/lib/theme-chalk/src/container.scss +0 -14
  755. package/lib/theme-chalk/src/date-picker/date-picker.scss +0 -97
  756. package/lib/theme-chalk/src/date-picker/date-range-picker.scss +0 -101
  757. package/lib/theme-chalk/src/date-picker/date-table.scss +0 -151
  758. package/lib/theme-chalk/src/date-picker/month-table.scss +0 -82
  759. package/lib/theme-chalk/src/date-picker/picker-panel.scss +0 -117
  760. package/lib/theme-chalk/src/date-picker/picker.scss +0 -197
  761. package/lib/theme-chalk/src/date-picker/time-picker.scss +0 -85
  762. package/lib/theme-chalk/src/date-picker/time-range-picker.scss +0 -31
  763. package/lib/theme-chalk/src/date-picker/time-spinner.scss +0 -110
  764. package/lib/theme-chalk/src/date-picker/year-table.scss +0 -51
  765. package/lib/theme-chalk/src/date-picker.scss +0 -12
  766. package/lib/theme-chalk/src/descriptions-item.scss +0 -42
  767. package/lib/theme-chalk/src/descriptions.scss +0 -111
  768. package/lib/theme-chalk/src/dialog.scss +0 -123
  769. package/lib/theme-chalk/src/display.scss +0 -12
  770. package/lib/theme-chalk/src/divider.scss +0 -47
  771. package/lib/theme-chalk/src/drawer.scss +0 -219
  772. package/lib/theme-chalk/src/dropdown.scss +0 -182
  773. package/lib/theme-chalk/src/empty.scss +0 -45
  774. package/lib/theme-chalk/src/fonts/element-icons.ttf +0 -0
  775. package/lib/theme-chalk/src/fonts/element-icons.woff +0 -0
  776. package/lib/theme-chalk/src/footer.scss +0 -8
  777. package/lib/theme-chalk/src/form.scss +0 -167
  778. package/lib/theme-chalk/src/header.scss +0 -8
  779. package/lib/theme-chalk/src/icon.scss +0 -1167
  780. package/lib/theme-chalk/src/image.scss +0 -179
  781. package/lib/theme-chalk/src/index.scss +0 -87
  782. package/lib/theme-chalk/src/input-number.scss +0 -180
  783. package/lib/theme-chalk/src/input.scss +0 -360
  784. package/lib/theme-chalk/src/link.scss +0 -81
  785. package/lib/theme-chalk/src/loading.scss +0 -96
  786. package/lib/theme-chalk/src/main.scss +0 -12
  787. package/lib/theme-chalk/src/menu.scss +0 -289
  788. package/lib/theme-chalk/src/message-box.scss +0 -226
  789. package/lib/theme-chalk/src/message.scss +0 -120
  790. package/lib/theme-chalk/src/mixins/_button.scss +0 -81
  791. package/lib/theme-chalk/src/mixins/config.scss +0 -4
  792. package/lib/theme-chalk/src/mixins/function.scss +0 -44
  793. package/lib/theme-chalk/src/mixins/mixins.scss +0 -196
  794. package/lib/theme-chalk/src/mixins/utils.scss +0 -39
  795. package/lib/theme-chalk/src/notification.scss +0 -99
  796. package/lib/theme-chalk/src/option-group.scss +0 -42
  797. package/lib/theme-chalk/src/option.scss +0 -36
  798. package/lib/theme-chalk/src/page-header.scss +0 -41
  799. package/lib/theme-chalk/src/pagination.scss +0 -295
  800. package/lib/theme-chalk/src/popconfirm.scss +0 -16
  801. package/lib/theme-chalk/src/popover.scss +0 -40
  802. package/lib/theme-chalk/src/popper.scss +0 -101
  803. package/lib/theme-chalk/src/progress.scss +0 -141
  804. package/lib/theme-chalk/src/radio-button.scss +0 -113
  805. package/lib/theme-chalk/src/radio-group.scss +0 -9
  806. package/lib/theme-chalk/src/radio.scss +0 -199
  807. package/lib/theme-chalk/src/rate.scss +0 -49
  808. package/lib/theme-chalk/src/reset.scss +0 -79
  809. package/lib/theme-chalk/src/result.scss +0 -61
  810. package/lib/theme-chalk/src/row.scss +0 -43
  811. package/lib/theme-chalk/src/scrollbar.scss +0 -72
  812. package/lib/theme-chalk/src/select-dropdown.scss +0 -62
  813. package/lib/theme-chalk/src/select.scss +0 -152
  814. package/lib/theme-chalk/src/skeleton-item.scss +0 -84
  815. package/lib/theme-chalk/src/skeleton.scss +0 -40
  816. package/lib/theme-chalk/src/slider.scss +0 -250
  817. package/lib/theme-chalk/src/spinner.scss +0 -44
  818. package/lib/theme-chalk/src/statistic.scss +0 -38
  819. package/lib/theme-chalk/src/step.scss +0 -317
  820. package/lib/theme-chalk/src/steps.scss +0 -20
  821. package/lib/theme-chalk/src/switch.scss +0 -116
  822. package/lib/theme-chalk/src/table-column.scss +0 -97
  823. package/lib/theme-chalk/src/table.scss +0 -564
  824. package/lib/theme-chalk/src/tabs.scss +0 -602
  825. package/lib/theme-chalk/src/tag.scss +0 -163
  826. package/lib/theme-chalk/src/time-picker.scss +0 -8
  827. package/lib/theme-chalk/src/time-select.scss +0 -37
  828. package/lib/theme-chalk/src/timeline-item.scss +0 -86
  829. package/lib/theme-chalk/src/timeline.scss +0 -14
  830. package/lib/theme-chalk/src/tooltip.scss +0 -141
  831. package/lib/theme-chalk/src/transfer.scss +0 -227
  832. package/lib/theme-chalk/src/tree.scss +0 -123
  833. package/lib/theme-chalk/src/upload.scss +0 -603
  834. package/lib/theme-chalk/subTitle.css +0 -1
  835. package/lib/theme-chalk/tabDialog.css +0 -1
  836. package/lib/theme-chalk/treeSelect.css +0 -1
  837. package/lib/theme-cy/base.css +0 -1
  838. package/lib/theme-cy/element.css +0 -1
  839. package/lib/theme-cy/fileUpload.css +0 -1
  840. package/lib/theme-cy/index.css +0 -1
  841. package/lib/theme-cy/selectDisplayInput.css +0 -1
  842. package/lib/theme-cy/subTitle.css +0 -1
  843. package/lib/theme-cy/tabDialog.css +0 -1
  844. package/lib/theme-cy/treeSelect.css +0 -1
  845. package/lib/time-picker.js +0 -6881
  846. package/lib/time-select.js +0 -5892
  847. package/lib/timeline-item.js +0 -329
  848. package/lib/timeline.js +0 -275
  849. package/lib/tooltip.js +0 -2950
  850. package/lib/transfer.js +0 -2998
  851. package/lib/transitions/collapse-transition.js +0 -91
  852. package/lib/tree.js +0 -3470
  853. package/lib/treeSelect.js +0 -4058
  854. package/lib/umd/locale/af-ZA.js +0 -142
  855. package/lib/umd/locale/ar.js +0 -141
  856. package/lib/umd/locale/az.js +0 -141
  857. package/lib/umd/locale/bg.js +0 -142
  858. package/lib/umd/locale/bn.js +0 -141
  859. package/lib/umd/locale/ca.js +0 -141
  860. package/lib/umd/locale/cs-CZ.js +0 -144
  861. package/lib/umd/locale/da.js +0 -141
  862. package/lib/umd/locale/de.js +0 -143
  863. package/lib/umd/locale/ee.js +0 -142
  864. package/lib/umd/locale/el.js +0 -142
  865. package/lib/umd/locale/en.js +0 -142
  866. package/lib/umd/locale/eo.js +0 -142
  867. package/lib/umd/locale/es.js +0 -141
  868. package/lib/umd/locale/eu.js +0 -142
  869. package/lib/umd/locale/fa.js +0 -142
  870. package/lib/umd/locale/fi.js +0 -142
  871. package/lib/umd/locale/fr.js +0 -141
  872. package/lib/umd/locale/he.js +0 -142
  873. package/lib/umd/locale/hr.js +0 -142
  874. package/lib/umd/locale/hu.js +0 -141
  875. package/lib/umd/locale/hy-AM.js +0 -142
  876. package/lib/umd/locale/id.js +0 -142
  877. package/lib/umd/locale/is.js +0 -142
  878. package/lib/umd/locale/it.js +0 -141
  879. package/lib/umd/locale/ja.js +0 -142
  880. package/lib/umd/locale/kg.js +0 -142
  881. package/lib/umd/locale/km.js +0 -142
  882. package/lib/umd/locale/ko.js +0 -142
  883. package/lib/umd/locale/ku.js +0 -142
  884. package/lib/umd/locale/kz.js +0 -142
  885. package/lib/umd/locale/lo-LA.js +0 -141
  886. package/lib/umd/locale/lt.js +0 -142
  887. package/lib/umd/locale/lv.js +0 -142
  888. package/lib/umd/locale/mn.js +0 -142
  889. package/lib/umd/locale/ms.js +0 -141
  890. package/lib/umd/locale/nb-NO.js +0 -141
  891. package/lib/umd/locale/nl.js +0 -142
  892. package/lib/umd/locale/pl.js +0 -142
  893. package/lib/umd/locale/pt-br.js +0 -142
  894. package/lib/umd/locale/pt.js +0 -142
  895. package/lib/umd/locale/ro.js +0 -142
  896. package/lib/umd/locale/ru-RU.js +0 -142
  897. package/lib/umd/locale/si.js +0 -142
  898. package/lib/umd/locale/sk.js +0 -144
  899. package/lib/umd/locale/sl.js +0 -142
  900. package/lib/umd/locale/sr-Latn.js +0 -142
  901. package/lib/umd/locale/sr.js +0 -142
  902. package/lib/umd/locale/sv-SE.js +0 -142
  903. package/lib/umd/locale/sw.js +0 -142
  904. package/lib/umd/locale/ta.js +0 -141
  905. package/lib/umd/locale/th.js +0 -142
  906. package/lib/umd/locale/tk.js +0 -142
  907. package/lib/umd/locale/tr-TR.js +0 -142
  908. package/lib/umd/locale/ua.js +0 -142
  909. package/lib/umd/locale/ug-CN.js +0 -142
  910. package/lib/umd/locale/uz-UZ.js +0 -142
  911. package/lib/umd/locale/vi.js +0 -142
  912. package/lib/umd/locale/zh-CN.js +0 -142
  913. package/lib/umd/locale/zh-TW.js +0 -142
  914. package/lib/upload.js +0 -2337
  915. package/lib/utils/after-leave.js +0 -35
  916. package/lib/utils/aria-dialog.js +0 -104
  917. package/lib/utils/aria-utils.js +0 -126
  918. package/lib/utils/clickoutside.js +0 -79
  919. package/lib/utils/date-util.js +0 -310
  920. package/lib/utils/date.js +0 -369
  921. package/lib/utils/dom.js +0 -234
  922. package/lib/utils/lodash.js +0 -9421
  923. package/lib/utils/menu/aria-menubar.js +0 -24
  924. package/lib/utils/menu/aria-menuitem.js +0 -62
  925. package/lib/utils/menu/aria-submenu.js +0 -69
  926. package/lib/utils/merge.js +0 -21
  927. package/lib/utils/popper.js +0 -1261
  928. package/lib/utils/popup/index.js +0 -233
  929. package/lib/utils/popup/popup-manager.js +0 -205
  930. package/lib/utils/resize-event.js +0 -59
  931. package/lib/utils/scroll-into-view.js +0 -38
  932. package/lib/utils/scrollbar-width.js +0 -39
  933. package/lib/utils/shared.js +0 -12
  934. package/lib/utils/types.js +0 -52
  935. package/lib/utils/util.js +0 -272
  936. package/lib/utils/vdom.js +0 -13
  937. package/lib/utils/vue-popper.js +0 -202
  938. package/packages/fileUpload/index.js +0 -8
  939. package/packages/fileUpload/src/main.vue +0 -430
  940. package/packages/selectDisplayInput/index.js +0 -8
  941. package/packages/selectDisplayInput/src/main.vue +0 -75
  942. package/packages/subTitle/index.js +0 -8
  943. package/packages/subTitle/src/main.vue +0 -33
  944. package/packages/tabDialog/index.js +0 -23
  945. package/packages/tabDialog/src/dialog/drag.js +0 -63
  946. package/packages/tabDialog/src/dialog/dragHeight.js +0 -34
  947. package/packages/tabDialog/src/dialog/dragWidth.js +0 -30
  948. package/packages/tabDialog/src/main.vue +0 -277
  949. package/packages/theme-cy/README.md +0 -38
  950. package/packages/theme-cy/gulpfile.js +0 -27
  951. package/packages/theme-cy/package.json +0 -35
  952. package/packages/theme-cy/src/base.scss +0 -3
  953. package/packages/theme-cy/src/element.scss +0 -45
  954. package/packages/theme-cy/src/fileUpload.scss +0 -30
  955. package/packages/theme-cy/src/index.scss +0 -7
  956. package/packages/theme-cy/src/selectDisplayInput.scss +0 -76
  957. package/packages/theme-cy/src/subTitle.scss +0 -26
  958. package/packages/theme-cy/src/tabDialog.scss +0 -43
  959. package/packages/theme-cy/src/treeSelect.scss +0 -98
  960. package/packages/treeSelect/index.js +0 -8
  961. package/packages/treeSelect/src/main.vue +0 -325
  962. package/src/locale/lang/af-ZA.js +0 -123
  963. package/src/locale/lang/ar.js +0 -122
  964. package/src/locale/lang/az.js +0 -126
  965. package/src/locale/lang/bg.js +0 -123
  966. package/src/locale/lang/bn.js +0 -126
  967. package/src/locale/lang/ca.js +0 -122
  968. package/src/locale/lang/cs-CZ.js +0 -125
  969. package/src/locale/lang/da.js +0 -122
  970. package/src/locale/lang/de.js +0 -124
  971. package/src/locale/lang/ee.js +0 -123
  972. package/src/locale/lang/el.js +0 -123
  973. package/src/locale/lang/eo.js +0 -123
  974. package/src/locale/lang/es.js +0 -122
  975. package/src/locale/lang/eu.js +0 -123
  976. package/src/locale/lang/fa.js +0 -123
  977. package/src/locale/lang/fi.js +0 -123
  978. package/src/locale/lang/fr.js +0 -122
  979. package/src/locale/lang/he.js +0 -123
  980. package/src/locale/lang/hr.js +0 -123
  981. package/src/locale/lang/hu.js +0 -122
  982. package/src/locale/lang/hy-AM.js +0 -123
  983. package/src/locale/lang/id.js +0 -123
  984. package/src/locale/lang/is.js +0 -124
  985. package/src/locale/lang/it.js +0 -122
  986. package/src/locale/lang/ja.js +0 -123
  987. package/src/locale/lang/kg.js +0 -123
  988. package/src/locale/lang/km.js +0 -123
  989. package/src/locale/lang/ko.js +0 -123
  990. package/src/locale/lang/ku.js +0 -123
  991. package/src/locale/lang/kz.js +0 -123
  992. package/src/locale/lang/lo-LA.js +0 -126
  993. package/src/locale/lang/lt.js +0 -123
  994. package/src/locale/lang/lv.js +0 -123
  995. package/src/locale/lang/mn.js +0 -123
  996. package/src/locale/lang/ms.js +0 -122
  997. package/src/locale/lang/nb-NO.js +0 -122
  998. package/src/locale/lang/nl.js +0 -123
  999. package/src/locale/lang/pl.js +0 -123
  1000. package/src/locale/lang/pt-br.js +0 -123
  1001. package/src/locale/lang/pt.js +0 -123
  1002. package/src/locale/lang/ro.js +0 -123
  1003. package/src/locale/lang/ru-RU.js +0 -123
  1004. package/src/locale/lang/si.js +0 -123
  1005. package/src/locale/lang/sk.js +0 -125
  1006. package/src/locale/lang/sl.js +0 -123
  1007. package/src/locale/lang/sr-Latn.js +0 -123
  1008. package/src/locale/lang/sr.js +0 -123
  1009. package/src/locale/lang/sv-SE.js +0 -123
  1010. package/src/locale/lang/sw.js +0 -123
  1011. package/src/locale/lang/ta.js +0 -122
  1012. package/src/locale/lang/th.js +0 -123
  1013. package/src/locale/lang/tk.js +0 -123
  1014. package/src/locale/lang/tr-TR.js +0 -123
  1015. package/src/locale/lang/ua.js +0 -123
  1016. package/src/locale/lang/ug-CN.js +0 -123
  1017. package/src/locale/lang/uz-UZ.js +0 -123
  1018. package/src/locale/lang/vi.js +0 -123
  1019. package/types/fileUpload.d.ts +0 -5
  1020. package/types/selectDisplayInput.d.ts +0 -5
  1021. package/types/subTitle.d.ts +0 -5
  1022. package/types/tabDialog.d.ts +0 -5
  1023. package/types/treeSelect.d.ts +0 -5
  1024. /package/lib/theme-chalk/{src/breadcrumb-item.scss → breadcrumb-item.css} +0 -0
  1025. /package/lib/theme-chalk/{src/button-group.scss → button-group.css} +0 -0
  1026. /package/lib/theme-chalk/{src/checkbox-button.scss → checkbox-button.css} +0 -0
  1027. /package/lib/theme-chalk/{src/checkbox-group.scss → checkbox-group.css} +0 -0
  1028. /package/lib/theme-chalk/{src/collapse-item.scss → collapse-item.css} +0 -0
  1029. /package/lib/theme-chalk/{src/dropdown-item.scss → dropdown-item.css} +0 -0
  1030. /package/lib/theme-chalk/{src/dropdown-menu.scss → dropdown-menu.css} +0 -0
  1031. /package/lib/theme-chalk/{src/form-item.scss → form-item.css} +0 -0
  1032. /package/lib/theme-chalk/{src/infinite-scroll.scss → infinite-scroll.css} +0 -0
  1033. /package/lib/theme-chalk/{src/infiniteScroll.scss → infiniteScroll.css} +0 -0
  1034. /package/lib/theme-chalk/{src/menu-item-group.scss → menu-item-group.css} +0 -0
  1035. /package/lib/theme-chalk/{src/menu-item.scss → menu-item.css} +0 -0
  1036. /package/lib/theme-chalk/{src/submenu.scss → submenu.css} +0 -0
  1037. /package/lib/theme-chalk/{src/tab-pane.scss → tab-pane.css} +0 -0
@@ -1,4651 +0,0 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "/dist/";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 68);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ([
89
- /* 0 */
90
- /***/ (function(module, exports) {
91
-
92
- module.exports = require("vue");
93
-
94
- /***/ }),
95
- /* 1 */
96
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
97
-
98
- "use strict";
99
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
100
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
101
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
102
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
103
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
104
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
106
- /* unused harmony export setStyle */
107
- /* unused harmony export isScroll */
108
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
109
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
110
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
111
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
112
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
113
-
114
- /* istanbul ignore next */
115
-
116
-
117
-
118
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
119
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
120
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
121
- var ieVersion = isServer ? 0 : Number(document.documentMode);
122
-
123
- /* istanbul ignore next */
124
- var trim = function trim(string) {
125
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
126
- };
127
- /* istanbul ignore next */
128
- var camelCase = function camelCase(name) {
129
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
130
- return offset ? letter.toUpperCase() : letter;
131
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
132
- };
133
-
134
- /* istanbul ignore next */
135
- var on = function () {
136
- if (!isServer && document.addEventListener) {
137
- return function (element, event, handler) {
138
- if (element && event && handler) {
139
- element.addEventListener(event, handler, false);
140
- }
141
- };
142
- } else {
143
- return function (element, event, handler) {
144
- if (element && event && handler) {
145
- element.attachEvent('on' + event, handler);
146
- }
147
- };
148
- }
149
- }();
150
-
151
- /* istanbul ignore next */
152
- var off = function () {
153
- if (!isServer && document.removeEventListener) {
154
- return function (element, event, handler) {
155
- if (element && event) {
156
- element.removeEventListener(event, handler, false);
157
- }
158
- };
159
- } else {
160
- return function (element, event, handler) {
161
- if (element && event) {
162
- element.detachEvent('on' + event, handler);
163
- }
164
- };
165
- }
166
- }();
167
-
168
- /* istanbul ignore next */
169
- var once = function once(el, event, fn) {
170
- var listener = function listener() {
171
- if (fn) {
172
- fn.apply(this, arguments);
173
- }
174
- off(el, event, listener);
175
- };
176
- on(el, event, listener);
177
- };
178
-
179
- /* istanbul ignore next */
180
- function hasClass(el, cls) {
181
- if (!el || !cls) return false;
182
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
183
- if (el.classList) {
184
- return el.classList.contains(cls);
185
- } else {
186
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
187
- }
188
- };
189
-
190
- /* istanbul ignore next */
191
- function addClass(el, cls) {
192
- if (!el) return;
193
- var curClass = el.className;
194
- var classes = (cls || '').split(' ');
195
-
196
- for (var i = 0, j = classes.length; i < j; i++) {
197
- var clsName = classes[i];
198
- if (!clsName) continue;
199
-
200
- if (el.classList) {
201
- el.classList.add(clsName);
202
- } else if (!hasClass(el, clsName)) {
203
- curClass += ' ' + clsName;
204
- }
205
- }
206
- if (!el.classList) {
207
- el.setAttribute('class', curClass);
208
- }
209
- };
210
-
211
- /* istanbul ignore next */
212
- function removeClass(el, cls) {
213
- if (!el || !cls) return;
214
- var classes = cls.split(' ');
215
- var curClass = ' ' + el.className + ' ';
216
-
217
- for (var i = 0, j = classes.length; i < j; i++) {
218
- var clsName = classes[i];
219
- if (!clsName) continue;
220
-
221
- if (el.classList) {
222
- el.classList.remove(clsName);
223
- } else if (hasClass(el, clsName)) {
224
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
225
- }
226
- }
227
- if (!el.classList) {
228
- el.setAttribute('class', trim(curClass));
229
- }
230
- };
231
-
232
- /* istanbul ignore next */
233
- var getStyle = ieVersion < 9 ? function (element, styleName) {
234
- if (isServer) return;
235
- if (!element || !styleName) return null;
236
- styleName = camelCase(styleName);
237
- if (styleName === 'float') {
238
- styleName = 'styleFloat';
239
- }
240
- try {
241
- switch (styleName) {
242
- case 'opacity':
243
- try {
244
- return element.filters.item('alpha').opacity / 100;
245
- } catch (e) {
246
- return 1.0;
247
- }
248
- default:
249
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
250
- }
251
- } catch (e) {
252
- return element.style[styleName];
253
- }
254
- } : function (element, styleName) {
255
- if (isServer) return;
256
- if (!element || !styleName) return null;
257
- styleName = camelCase(styleName);
258
- if (styleName === 'float') {
259
- styleName = 'cssFloat';
260
- }
261
- try {
262
- var computed = document.defaultView.getComputedStyle(element, '');
263
- return element.style[styleName] || computed ? computed[styleName] : null;
264
- } catch (e) {
265
- return element.style[styleName];
266
- }
267
- };
268
-
269
- /* istanbul ignore next */
270
- function setStyle(element, styleName, value) {
271
- if (!element || !styleName) return;
272
-
273
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
274
- for (var prop in styleName) {
275
- if (styleName.hasOwnProperty(prop)) {
276
- setStyle(element, prop, styleName[prop]);
277
- }
278
- }
279
- } else {
280
- styleName = camelCase(styleName);
281
- if (styleName === 'opacity' && ieVersion < 9) {
282
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
283
- } else {
284
- element.style[styleName] = value;
285
- }
286
- }
287
- };
288
-
289
- var isScroll = function isScroll(el, vertical) {
290
- if (isServer) return;
291
-
292
- var determinedDirection = vertical !== null && vertical !== undefined;
293
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
294
-
295
- return overflow.match(/(scroll|auto|overlay)/);
296
- };
297
-
298
- var getScrollContainer = function getScrollContainer(el, vertical) {
299
- if (isServer) return;
300
-
301
- var parent = el;
302
- while (parent) {
303
- if ([window, document, document.documentElement].includes(parent)) {
304
- return window;
305
- }
306
- if (isScroll(parent, vertical)) {
307
- return parent;
308
- }
309
- parent = parent.parentNode;
310
- }
311
-
312
- return parent;
313
- };
314
-
315
- var isInContainer = function isInContainer(el, container) {
316
- if (isServer || !el || !container) return false;
317
-
318
- var elRect = el.getBoundingClientRect();
319
- var containerRect = void 0;
320
-
321
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
322
- containerRect = {
323
- top: 0,
324
- right: window.innerWidth,
325
- bottom: window.innerHeight,
326
- left: 0
327
- };
328
- } else {
329
- containerRect = container.getBoundingClientRect();
330
- }
331
-
332
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
333
- };
334
-
335
- /***/ }),
336
- /* 2 */
337
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
338
-
339
- "use strict";
340
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
341
- /* globals __VUE_SSR_CONTEXT__ */
342
-
343
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
344
- // This module is a runtime utility for cleaner component module output and will
345
- // be included in the final webpack user bundle.
346
-
347
- function normalizeComponent(
348
- scriptExports,
349
- render,
350
- staticRenderFns,
351
- functionalTemplate,
352
- injectStyles,
353
- scopeId,
354
- moduleIdentifier /* server only */,
355
- shadowMode /* vue-cli only */
356
- ) {
357
- // Vue.extend constructor export interop
358
- var options =
359
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
360
-
361
- // render functions
362
- if (render) {
363
- options.render = render
364
- options.staticRenderFns = staticRenderFns
365
- options._compiled = true
366
- }
367
-
368
- // functional template
369
- if (functionalTemplate) {
370
- options.functional = true
371
- }
372
-
373
- // scopedId
374
- if (scopeId) {
375
- options._scopeId = 'data-v-' + scopeId
376
- }
377
-
378
- var hook
379
- if (moduleIdentifier) {
380
- // server build
381
- hook = function (context) {
382
- // 2.3 injection
383
- context =
384
- context || // cached call
385
- (this.$vnode && this.$vnode.ssrContext) || // stateful
386
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
387
- // 2.2 with runInNewContext: true
388
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
389
- context = __VUE_SSR_CONTEXT__
390
- }
391
- // inject component styles
392
- if (injectStyles) {
393
- injectStyles.call(this, context)
394
- }
395
- // register component module identifier for async chunk inferrence
396
- if (context && context._registeredComponents) {
397
- context._registeredComponents.add(moduleIdentifier)
398
- }
399
- }
400
- // used by ssr in case component is cached and beforeCreate
401
- // never gets called
402
- options._ssrRegister = hook
403
- } else if (injectStyles) {
404
- hook = shadowMode
405
- ? function () {
406
- injectStyles.call(
407
- this,
408
- (options.functional ? this.parent : this).$root.$options.shadowRoot
409
- )
410
- }
411
- : injectStyles
412
- }
413
-
414
- if (hook) {
415
- if (options.functional) {
416
- // for template-only hot-reload because in that case the render fn doesn't
417
- // go through the normalizer
418
- options._injectStyles = hook
419
- // register for functional component in vue file
420
- var originalRender = options.render
421
- options.render = function renderWithStyleInjection(h, context) {
422
- hook.call(context)
423
- return originalRender(h, context)
424
- }
425
- } else {
426
- // inject component registration as beforeCreate hook
427
- var existing = options.beforeCreate
428
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
429
- }
430
- }
431
-
432
- return {
433
- exports: scriptExports,
434
- options: options
435
- }
436
- }
437
-
438
-
439
- /***/ }),
440
- /* 3 */
441
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
442
-
443
- "use strict";
444
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
445
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
446
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
447
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
448
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
449
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
450
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
451
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
452
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
453
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
454
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
455
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
456
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
457
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
458
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
459
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
460
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
461
- /* unused harmony export looseEqual */
462
- /* unused harmony export arrayEquals */
463
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
464
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
465
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
466
- /* unused harmony export objToArray */
467
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
468
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
469
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
470
- /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
471
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
472
-
473
-
474
-
475
-
476
- var hasOwnProperty = Object.prototype.hasOwnProperty;
477
-
478
- function noop() {};
479
-
480
- function hasOwn(obj, key) {
481
- return hasOwnProperty.call(obj, key);
482
- };
483
-
484
- function extend(to, _from) {
485
- for (var key in _from) {
486
- to[key] = _from[key];
487
- }
488
- return to;
489
- };
490
-
491
- function toObject(arr) {
492
- var res = {};
493
- for (var i = 0; i < arr.length; i++) {
494
- if (arr[i]) {
495
- extend(res, arr[i]);
496
- }
497
- }
498
- return res;
499
- };
500
-
501
- var getValueByPath = function getValueByPath(object, prop) {
502
- prop = prop || '';
503
- var paths = prop.split('.');
504
- var current = object;
505
- var result = null;
506
- for (var i = 0, j = paths.length; i < j; i++) {
507
- var path = paths[i];
508
- if (!current) break;
509
-
510
- if (i === j - 1) {
511
- result = current[path];
512
- break;
513
- }
514
- current = current[path];
515
- }
516
- return result;
517
- };
518
-
519
- function getPropByPath(obj, path, strict) {
520
- var tempObj = obj;
521
- path = path.replace(/\[(\w+)\]/g, '.$1');
522
- path = path.replace(/^\./, '');
523
-
524
- var keyArr = path.split('.');
525
- var i = 0;
526
- for (var len = keyArr.length; i < len - 1; ++i) {
527
- if (!tempObj && !strict) break;
528
- var key = keyArr[i];
529
- if (key in tempObj) {
530
- tempObj = tempObj[key];
531
- } else {
532
- if (strict) {
533
- throw new Error('please transfer a valid prop path to form item!');
534
- }
535
- break;
536
- }
537
- }
538
- return {
539
- o: tempObj,
540
- k: keyArr[i],
541
- v: tempObj ? tempObj[keyArr[i]] : null
542
- };
543
- };
544
-
545
- var generateId = function generateId() {
546
- return Math.floor(Math.random() * 10000);
547
- };
548
-
549
- var valueEquals = function valueEquals(a, b) {
550
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
551
- if (a === b) return true;
552
- if (!(a instanceof Array)) return false;
553
- if (!(b instanceof Array)) return false;
554
- if (a.length !== b.length) return false;
555
- for (var i = 0; i !== a.length; ++i) {
556
- if (a[i] !== b[i]) return false;
557
- }
558
- return true;
559
- };
560
-
561
- var escapeRegexpString = function escapeRegexpString() {
562
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
563
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
564
- };
565
-
566
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
567
- var arrayFindIndex = function arrayFindIndex(arr, pred) {
568
- for (var i = 0; i !== arr.length; ++i) {
569
- if (pred(arr[i])) {
570
- return i;
571
- }
572
- }
573
- return -1;
574
- };
575
-
576
- var arrayFind = function arrayFind(arr, pred) {
577
- var idx = arrayFindIndex(arr, pred);
578
- return idx !== -1 ? arr[idx] : undefined;
579
- };
580
-
581
- // coerce truthy value to array
582
- var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
583
- if (Array.isArray(val)) {
584
- return val;
585
- } else if (val) {
586
- return [val];
587
- } else {
588
- return [];
589
- }
590
- };
591
-
592
- var isIE = function isIE() {
593
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
594
- };
595
-
596
- var isEdge = function isEdge() {
597
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
598
- };
599
-
600
- var isFirefox = function isFirefox() {
601
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
602
- };
603
-
604
- var autoprefixer = function autoprefixer(style) {
605
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
606
- var rules = ['transform', 'transition', 'animation'];
607
- var prefixes = ['ms-', 'webkit-'];
608
- rules.forEach(function (rule) {
609
- var value = style[rule];
610
- if (rule && value) {
611
- prefixes.forEach(function (prefix) {
612
- style[prefix + rule] = value;
613
- });
614
- }
615
- });
616
- return style;
617
- };
618
-
619
- var kebabCase = function kebabCase(str) {
620
- var hyphenateRE = /([^-])([A-Z])/g;
621
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
622
- };
623
-
624
- var capitalize = function capitalize(str) {
625
- if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
626
- return str.charAt(0).toUpperCase() + str.slice(1);
627
- };
628
-
629
- var looseEqual = function looseEqual(a, b) {
630
- var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
631
- var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
632
- if (isObjectA && isObjectB) {
633
- return JSON.stringify(a) === JSON.stringify(b);
634
- } else if (!isObjectA && !isObjectB) {
635
- return String(a) === String(b);
636
- } else {
637
- return false;
638
- }
639
- };
640
-
641
- var arrayEquals = function arrayEquals(arrayA, arrayB) {
642
- arrayA = arrayA || [];
643
- arrayB = arrayB || [];
644
-
645
- if (arrayA.length !== arrayB.length) {
646
- return false;
647
- }
648
-
649
- for (var i = 0; i < arrayA.length; i++) {
650
- if (!looseEqual(arrayA[i], arrayB[i])) {
651
- return false;
652
- }
653
- }
654
-
655
- return true;
656
- };
657
-
658
- var isEqual = function isEqual(value1, value2) {
659
- if (Array.isArray(value1) && Array.isArray(value2)) {
660
- return arrayEquals(value1, value2);
661
- }
662
- return looseEqual(value1, value2);
663
- };
664
-
665
- var isEmpty = function isEmpty(val) {
666
- // null or undefined
667
- if (val == null) return true;
668
-
669
- if (typeof val === 'boolean') return false;
670
-
671
- if (typeof val === 'number') return !val;
672
-
673
- if (val instanceof Error) return val.message === '';
674
-
675
- switch (Object.prototype.toString.call(val)) {
676
- // String or Array
677
- case '[object String]':
678
- case '[object Array]':
679
- return !val.length;
680
-
681
- // Map or Set or File
682
- case '[object File]':
683
- case '[object Map]':
684
- case '[object Set]':
685
- {
686
- return !val.size;
687
- }
688
- // Plain Object
689
- case '[object Object]':
690
- {
691
- return !Object.keys(val).length;
692
- }
693
- }
694
-
695
- return false;
696
- };
697
-
698
- function rafThrottle(fn) {
699
- var locked = false;
700
- return function () {
701
- var _this = this;
702
-
703
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
704
- args[_key] = arguments[_key];
705
- }
706
-
707
- if (locked) return;
708
- locked = true;
709
- window.requestAnimationFrame(function (_) {
710
- fn.apply(_this, args);
711
- locked = false;
712
- });
713
- };
714
- }
715
-
716
- function objToArray(obj) {
717
- if (Array.isArray(obj)) {
718
- return obj;
719
- }
720
- return isEmpty(obj) ? [] : [obj];
721
- }
722
-
723
- var isMac = function isMac() {
724
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
725
- };
726
-
727
- /***/ }),
728
- /* 4 */,
729
- /* 5 */
730
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
731
-
732
- "use strict";
733
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
734
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
735
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
736
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
737
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
738
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
739
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
740
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
741
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
742
-
743
-
744
-
745
- function isString(obj) {
746
- return Object.prototype.toString.call(obj) === '[object String]';
747
- }
748
-
749
- function isObject(obj) {
750
- return Object.prototype.toString.call(obj) === '[object Object]';
751
- }
752
-
753
- function isHtmlElement(node) {
754
- return node && node.nodeType === Node.ELEMENT_NODE;
755
- }
756
-
757
- /**
758
- * - Inspired:
759
- * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
760
- */
761
- var isFunction = function isFunction(functionToCheck) {
762
- var getType = {};
763
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
764
- };
765
-
766
- if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
767
- isFunction = function isFunction(obj) {
768
- return typeof obj === 'function' || false;
769
- };
770
- }
771
-
772
-
773
-
774
- var isUndefined = function isUndefined(val) {
775
- return val === void 0;
776
- };
777
-
778
- var isDefined = function isDefined(val) {
779
- return val !== undefined && val !== null;
780
- };
781
-
782
- /***/ }),
783
- /* 6 */
784
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
785
-
786
- "use strict";
787
- function _broadcast(componentName, eventName, params) {
788
- this.$children.forEach(function (child) {
789
- var name = child.$options.componentName;
790
-
791
- if (name === componentName) {
792
- child.$emit.apply(child, [eventName].concat(params));
793
- } else {
794
- _broadcast.apply(child, [componentName, eventName].concat([params]));
795
- }
796
- });
797
- }
798
- /* harmony default export */ __webpack_exports__["a"] = ({
799
- methods: {
800
- dispatch: function dispatch(componentName, eventName, params) {
801
- var parent = this.$parent || this.$root;
802
- var name = parent.$options.componentName;
803
-
804
- while (parent && (!name || name !== componentName)) {
805
- parent = parent.$parent;
806
-
807
- if (parent) {
808
- name = parent.$options.componentName;
809
- }
810
- }
811
- if (parent) {
812
- parent.$emit.apply(parent, [eventName].concat(params));
813
- }
814
- },
815
- broadcast: function broadcast(componentName, eventName, params) {
816
- _broadcast.call(this, componentName, eventName, params);
817
- }
818
- }
819
- });
820
-
821
- /***/ }),
822
- /* 7 */
823
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
824
-
825
- "use strict";
826
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
827
- for (var i = 1, j = arguments.length; i < j; i++) {
828
- var source = arguments[i] || {};
829
- for (var prop in source) {
830
- if (source.hasOwnProperty(prop)) {
831
- var value = source[prop];
832
- if (value !== undefined) {
833
- target[prop] = value;
834
- }
835
- }
836
- }
837
- }
838
-
839
- return target;
840
- });;
841
-
842
- /***/ }),
843
- /* 8 */
844
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
845
-
846
- "use strict";
847
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
848
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
849
-
850
-
851
- var scrollBarWidth = void 0;
852
-
853
- /* harmony default export */ __webpack_exports__["a"] = (function () {
854
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
855
- if (scrollBarWidth !== undefined) return scrollBarWidth;
856
-
857
- var outer = document.createElement('div');
858
- outer.className = 'el-scrollbar__wrap';
859
- outer.style.visibility = 'hidden';
860
- outer.style.width = '100px';
861
- outer.style.position = 'absolute';
862
- outer.style.top = '-9999px';
863
- document.body.appendChild(outer);
864
-
865
- var widthNoScroll = outer.offsetWidth;
866
- outer.style.overflow = 'scroll';
867
-
868
- var inner = document.createElement('div');
869
- inner.style.width = '100%';
870
- outer.appendChild(inner);
871
-
872
- var widthWithScroll = inner.offsetWidth;
873
- outer.parentNode.removeChild(outer);
874
- scrollBarWidth = widthNoScroll - widthWithScroll;
875
-
876
- return scrollBarWidth;
877
- });;
878
-
879
- /***/ }),
880
- /* 9 */
881
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
882
-
883
- "use strict";
884
-
885
- // EXPORTS
886
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
887
-
888
- // EXTERNAL MODULE: external "vue"
889
- var external_vue_ = __webpack_require__(0);
890
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
891
-
892
- // EXTERNAL MODULE: ./src/utils/merge.js
893
- var merge = __webpack_require__(7);
894
-
895
- // EXTERNAL MODULE: ./src/utils/dom.js
896
- var utils_dom = __webpack_require__(1);
897
-
898
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
899
-
900
-
901
-
902
- var hasModal = false;
903
- var hasInitZIndex = false;
904
- var popup_manager_zIndex = void 0;
905
-
906
- var popup_manager_getModal = function getModal() {
907
- if (external_vue_default.a.prototype.$isServer) return;
908
- var modalDom = PopupManager.modalDom;
909
- if (modalDom) {
910
- hasModal = true;
911
- } else {
912
- hasModal = false;
913
- modalDom = document.createElement('div');
914
- PopupManager.modalDom = modalDom;
915
-
916
- modalDom.addEventListener('touchmove', function (event) {
917
- event.preventDefault();
918
- event.stopPropagation();
919
- });
920
-
921
- modalDom.addEventListener('click', function () {
922
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
923
- });
924
- }
925
-
926
- return modalDom;
927
- };
928
-
929
- var instances = {};
930
-
931
- var PopupManager = {
932
- modalFade: true,
933
-
934
- getInstance: function getInstance(id) {
935
- return instances[id];
936
- },
937
-
938
- register: function register(id, instance) {
939
- if (id && instance) {
940
- instances[id] = instance;
941
- }
942
- },
943
-
944
- deregister: function deregister(id) {
945
- if (id) {
946
- instances[id] = null;
947
- delete instances[id];
948
- }
949
- },
950
-
951
- nextZIndex: function nextZIndex() {
952
- return PopupManager.zIndex++;
953
- },
954
-
955
- modalStack: [],
956
-
957
- doOnModalClick: function doOnModalClick() {
958
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
959
- if (!topItem) return;
960
-
961
- var instance = PopupManager.getInstance(topItem.id);
962
- if (instance && instance.closeOnClickModal) {
963
- instance.close();
964
- }
965
- },
966
-
967
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
968
- if (external_vue_default.a.prototype.$isServer) return;
969
- if (!id || zIndex === undefined) return;
970
- this.modalFade = modalFade;
971
-
972
- var modalStack = this.modalStack;
973
-
974
- for (var i = 0, j = modalStack.length; i < j; i++) {
975
- var item = modalStack[i];
976
- if (item.id === id) {
977
- return;
978
- }
979
- }
980
-
981
- var modalDom = popup_manager_getModal();
982
-
983
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
984
- if (this.modalFade && !hasModal) {
985
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
986
- }
987
- if (modalClass) {
988
- var classArr = modalClass.trim().split(/\s+/);
989
- classArr.forEach(function (item) {
990
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
991
- });
992
- }
993
- setTimeout(function () {
994
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
995
- }, 200);
996
-
997
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
998
- dom.parentNode.appendChild(modalDom);
999
- } else {
1000
- document.body.appendChild(modalDom);
1001
- }
1002
-
1003
- if (zIndex) {
1004
- modalDom.style.zIndex = zIndex;
1005
- }
1006
- modalDom.tabIndex = 0;
1007
- modalDom.style.display = '';
1008
-
1009
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1010
- },
1011
-
1012
- closeModal: function closeModal(id) {
1013
- var modalStack = this.modalStack;
1014
- var modalDom = popup_manager_getModal();
1015
-
1016
- if (modalStack.length > 0) {
1017
- var topItem = modalStack[modalStack.length - 1];
1018
- if (topItem.id === id) {
1019
- if (topItem.modalClass) {
1020
- var classArr = topItem.modalClass.trim().split(/\s+/);
1021
- classArr.forEach(function (item) {
1022
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1023
- });
1024
- }
1025
-
1026
- modalStack.pop();
1027
- if (modalStack.length > 0) {
1028
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1029
- }
1030
- } else {
1031
- for (var i = modalStack.length - 1; i >= 0; i--) {
1032
- if (modalStack[i].id === id) {
1033
- modalStack.splice(i, 1);
1034
- break;
1035
- }
1036
- }
1037
- }
1038
- }
1039
-
1040
- if (modalStack.length === 0) {
1041
- if (this.modalFade) {
1042
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1043
- }
1044
- setTimeout(function () {
1045
- if (modalStack.length === 0) {
1046
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1047
- modalDom.style.display = 'none';
1048
- PopupManager.modalDom = undefined;
1049
- }
1050
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1051
- }, 200);
1052
- }
1053
- }
1054
- };
1055
-
1056
- Object.defineProperty(PopupManager, 'zIndex', {
1057
- configurable: true,
1058
- get: function get() {
1059
- if (!hasInitZIndex) {
1060
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1061
- hasInitZIndex = true;
1062
- }
1063
- return popup_manager_zIndex;
1064
- },
1065
- set: function set(value) {
1066
- popup_manager_zIndex = value;
1067
- }
1068
- });
1069
-
1070
- var popup_manager_getTopPopup = function getTopPopup() {
1071
- if (external_vue_default.a.prototype.$isServer) return;
1072
- if (PopupManager.modalStack.length > 0) {
1073
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1074
- if (!topPopup) return;
1075
- var instance = PopupManager.getInstance(topPopup.id);
1076
-
1077
- return instance;
1078
- }
1079
- };
1080
-
1081
- if (!external_vue_default.a.prototype.$isServer) {
1082
- // handle `esc` key when the popup is shown
1083
- window.addEventListener('keydown', function (event) {
1084
- if (event.keyCode === 27) {
1085
- var topPopup = popup_manager_getTopPopup();
1086
-
1087
- if (topPopup && topPopup.closeOnPressEscape) {
1088
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1089
- }
1090
- }
1091
- });
1092
- }
1093
-
1094
- /* harmony default export */ var popup_manager = (PopupManager);
1095
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1096
- var scrollbar_width = __webpack_require__(8);
1097
-
1098
- // CONCATENATED MODULE: ./src/utils/popup/index.js
1099
-
1100
-
1101
-
1102
-
1103
-
1104
-
1105
- var idSeed = 1;
1106
-
1107
- var scrollBarWidth = void 0;
1108
-
1109
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1110
- props: {
1111
- visible: {
1112
- type: Boolean,
1113
- default: false
1114
- },
1115
- openDelay: {},
1116
- closeDelay: {},
1117
- zIndex: {},
1118
- modal: {
1119
- type: Boolean,
1120
- default: false
1121
- },
1122
- modalFade: {
1123
- type: Boolean,
1124
- default: true
1125
- },
1126
- modalClass: {},
1127
- modalAppendToBody: {
1128
- type: Boolean,
1129
- default: false
1130
- },
1131
- lockScroll: {
1132
- type: Boolean,
1133
- default: true
1134
- },
1135
- closeOnPressEscape: {
1136
- type: Boolean,
1137
- default: false
1138
- },
1139
- closeOnClickModal: {
1140
- type: Boolean,
1141
- default: false
1142
- }
1143
- },
1144
-
1145
- beforeMount: function beforeMount() {
1146
- this._popupId = 'popup-' + idSeed++;
1147
- popup_manager.register(this._popupId, this);
1148
- },
1149
- beforeDestroy: function beforeDestroy() {
1150
- popup_manager.deregister(this._popupId);
1151
- popup_manager.closeModal(this._popupId);
1152
-
1153
- this.restoreBodyStyle();
1154
- },
1155
- data: function data() {
1156
- return {
1157
- opened: false,
1158
- bodyPaddingRight: null,
1159
- computedBodyPaddingRight: 0,
1160
- withoutHiddenClass: true,
1161
- rendered: false
1162
- };
1163
- },
1164
-
1165
-
1166
- watch: {
1167
- visible: function visible(val) {
1168
- var _this = this;
1169
-
1170
- if (val) {
1171
- if (this._opening) return;
1172
- if (!this.rendered) {
1173
- this.rendered = true;
1174
- external_vue_default.a.nextTick(function () {
1175
- _this.open();
1176
- });
1177
- } else {
1178
- this.open();
1179
- }
1180
- } else {
1181
- this.close();
1182
- }
1183
- }
1184
- },
1185
-
1186
- methods: {
1187
- open: function open(options) {
1188
- var _this2 = this;
1189
-
1190
- if (!this.rendered) {
1191
- this.rendered = true;
1192
- }
1193
-
1194
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1195
-
1196
- if (this._closeTimer) {
1197
- clearTimeout(this._closeTimer);
1198
- this._closeTimer = null;
1199
- }
1200
- clearTimeout(this._openTimer);
1201
-
1202
- var openDelay = Number(props.openDelay);
1203
- if (openDelay > 0) {
1204
- this._openTimer = setTimeout(function () {
1205
- _this2._openTimer = null;
1206
- _this2.doOpen(props);
1207
- }, openDelay);
1208
- } else {
1209
- this.doOpen(props);
1210
- }
1211
- },
1212
- doOpen: function doOpen(props) {
1213
- if (this.$isServer) return;
1214
- if (this.willOpen && !this.willOpen()) return;
1215
- if (this.opened) return;
1216
-
1217
- this._opening = true;
1218
-
1219
- var dom = this.$el;
1220
-
1221
- var modal = props.modal;
1222
-
1223
- var zIndex = props.zIndex;
1224
- if (zIndex) {
1225
- popup_manager.zIndex = zIndex;
1226
- }
1227
-
1228
- if (modal) {
1229
- if (this._closing) {
1230
- popup_manager.closeModal(this._popupId);
1231
- this._closing = false;
1232
- }
1233
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1234
- if (props.lockScroll) {
1235
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1236
- if (this.withoutHiddenClass) {
1237
- this.bodyPaddingRight = document.body.style.paddingRight;
1238
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1239
- }
1240
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1241
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1242
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1243
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1244
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1245
- }
1246
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1247
- }
1248
- }
1249
-
1250
- if (getComputedStyle(dom).position === 'static') {
1251
- dom.style.position = 'absolute';
1252
- }
1253
-
1254
- dom.style.zIndex = popup_manager.nextZIndex();
1255
- this.opened = true;
1256
-
1257
- this.onOpen && this.onOpen();
1258
-
1259
- this.doAfterOpen();
1260
- },
1261
- doAfterOpen: function doAfterOpen() {
1262
- this._opening = false;
1263
- },
1264
- close: function close() {
1265
- var _this3 = this;
1266
-
1267
- if (this.willClose && !this.willClose()) return;
1268
-
1269
- if (this._openTimer !== null) {
1270
- clearTimeout(this._openTimer);
1271
- this._openTimer = null;
1272
- }
1273
- clearTimeout(this._closeTimer);
1274
-
1275
- var closeDelay = Number(this.closeDelay);
1276
-
1277
- if (closeDelay > 0) {
1278
- this._closeTimer = setTimeout(function () {
1279
- _this3._closeTimer = null;
1280
- _this3.doClose();
1281
- }, closeDelay);
1282
- } else {
1283
- this.doClose();
1284
- }
1285
- },
1286
- doClose: function doClose() {
1287
- this._closing = true;
1288
-
1289
- this.onClose && this.onClose();
1290
-
1291
- if (this.lockScroll) {
1292
- setTimeout(this.restoreBodyStyle, 200);
1293
- }
1294
-
1295
- this.opened = false;
1296
-
1297
- this.doAfterClose();
1298
- },
1299
- doAfterClose: function doAfterClose() {
1300
- popup_manager.closeModal(this._popupId);
1301
- this._closing = false;
1302
- },
1303
- restoreBodyStyle: function restoreBodyStyle() {
1304
- if (this.modal && this.withoutHiddenClass) {
1305
- document.body.style.paddingRight = this.bodyPaddingRight;
1306
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1307
- }
1308
- this.withoutHiddenClass = true;
1309
- }
1310
- }
1311
- });
1312
-
1313
-
1314
-
1315
- /***/ }),
1316
- /* 10 */
1317
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1318
-
1319
- "use strict";
1320
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1321
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1322
- /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
1323
-
1324
-
1325
-
1326
- var PopperJS = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer ? function () {} : __webpack_require__(23);
1327
- var stop = function stop(e) {
1328
- return e.stopPropagation();
1329
- };
1330
-
1331
- /**
1332
- * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
1333
- * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
1334
- * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
1335
- * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
1336
- * @param {Boolean} [visible=false] Visibility of the popup element.
1337
- * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
1338
- */
1339
- /* harmony default export */ __webpack_exports__["a"] = ({
1340
- props: {
1341
- transformOrigin: {
1342
- type: [Boolean, String],
1343
- default: true
1344
- },
1345
- placement: {
1346
- type: String,
1347
- default: 'bottom'
1348
- },
1349
- boundariesPadding: {
1350
- type: Number,
1351
- default: 5
1352
- },
1353
- reference: {},
1354
- popper: {},
1355
- offset: {
1356
- default: 0
1357
- },
1358
- value: Boolean,
1359
- visibleArrow: Boolean,
1360
- arrowOffset: {
1361
- type: Number,
1362
- default: 35
1363
- },
1364
- appendToBody: {
1365
- type: Boolean,
1366
- default: true
1367
- },
1368
- popperOptions: {
1369
- type: Object,
1370
- default: function _default() {
1371
- return {
1372
- gpuAcceleration: false
1373
- };
1374
- }
1375
- }
1376
- },
1377
-
1378
- data: function data() {
1379
- return {
1380
- showPopper: false,
1381
- currentPlacement: ''
1382
- };
1383
- },
1384
-
1385
-
1386
- watch: {
1387
- value: {
1388
- immediate: true,
1389
- handler: function handler(val) {
1390
- this.showPopper = val;
1391
- this.$emit('input', val);
1392
- }
1393
- },
1394
-
1395
- showPopper: function showPopper(val) {
1396
- if (this.disabled) return;
1397
- val ? this.updatePopper() : this.destroyPopper();
1398
- this.$emit('input', val);
1399
- }
1400
- },
1401
-
1402
- methods: {
1403
- createPopper: function createPopper() {
1404
- var _this = this;
1405
-
1406
- if (this.$isServer) return;
1407
- this.currentPlacement = this.currentPlacement || this.placement;
1408
- if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
1409
- return;
1410
- }
1411
-
1412
- var options = this.popperOptions;
1413
- var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
1414
- var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
1415
-
1416
- if (!reference && this.$slots.reference && this.$slots.reference[0]) {
1417
- reference = this.referenceElm = this.$slots.reference[0].elm;
1418
- }
1419
-
1420
- if (!popper || !reference) return;
1421
- if (this.visibleArrow) this.appendArrow(popper);
1422
- if (this.appendToBody) document.body.appendChild(this.popperElm);
1423
- if (this.popperJS && this.popperJS.destroy) {
1424
- this.popperJS.destroy();
1425
- }
1426
-
1427
- options.placement = this.currentPlacement;
1428
- options.offset = this.offset;
1429
- options.arrowOffset = this.arrowOffset;
1430
- this.popperJS = new PopperJS(reference, popper, options);
1431
- this.popperJS.onCreate(function (_) {
1432
- _this.$emit('created', _this);
1433
- _this.resetTransformOrigin();
1434
- _this.$nextTick(_this.updatePopper);
1435
- });
1436
- if (typeof options.onUpdate === 'function') {
1437
- this.popperJS.onUpdate(options.onUpdate);
1438
- }
1439
- this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1440
- this.popperElm.addEventListener('click', stop);
1441
- },
1442
- updatePopper: function updatePopper() {
1443
- var popperJS = this.popperJS;
1444
- if (popperJS) {
1445
- popperJS.update();
1446
- if (popperJS._popper) {
1447
- popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1448
- }
1449
- } else {
1450
- this.createPopper();
1451
- }
1452
- },
1453
- doDestroy: function doDestroy(forceDestroy) {
1454
- /* istanbul ignore if */
1455
- if (!this.popperJS || this.showPopper && !forceDestroy) return;
1456
- this.popperJS.destroy();
1457
- this.popperJS = null;
1458
- },
1459
- destroyPopper: function destroyPopper() {
1460
- if (this.popperJS) {
1461
- this.resetTransformOrigin();
1462
- }
1463
- },
1464
- resetTransformOrigin: function resetTransformOrigin() {
1465
- if (!this.transformOrigin) return;
1466
- var placementMap = {
1467
- top: 'bottom',
1468
- bottom: 'top',
1469
- left: 'right',
1470
- right: 'left'
1471
- };
1472
- var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
1473
- var origin = placementMap[placement];
1474
- this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
1475
- },
1476
- appendArrow: function appendArrow(element) {
1477
- var hash = void 0;
1478
- if (this.appended) {
1479
- return;
1480
- }
1481
-
1482
- this.appended = true;
1483
-
1484
- for (var item in element.attributes) {
1485
- if (/^_v-/.test(element.attributes[item].name)) {
1486
- hash = element.attributes[item].name;
1487
- break;
1488
- }
1489
- }
1490
-
1491
- var arrow = document.createElement('div');
1492
-
1493
- if (hash) {
1494
- arrow.setAttribute(hash, '');
1495
- }
1496
- arrow.setAttribute('x-arrow', '');
1497
- arrow.className = 'popper__arrow';
1498
- element.appendChild(arrow);
1499
- }
1500
- },
1501
-
1502
- beforeDestroy: function beforeDestroy() {
1503
- this.doDestroy(true);
1504
- if (this.popperElm && this.popperElm.parentNode === document.body) {
1505
- this.popperElm.removeEventListener('click', stop);
1506
- document.body.removeChild(this.popperElm);
1507
- }
1508
- },
1509
-
1510
-
1511
- // call destroy in keep-alive mode
1512
- deactivated: function deactivated() {
1513
- this.$options.beforeDestroy[0].call(this);
1514
- }
1515
- });
1516
-
1517
- /***/ }),
1518
- /* 11 */,
1519
- /* 12 */
1520
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1521
-
1522
- "use strict";
1523
- /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
1524
-
1525
- /**
1526
- * Show migrating guide in browser console.
1527
- *
1528
- * Usage:
1529
- * import Migrating from 'src/mixins/migrating';
1530
- *
1531
- * mixins: [Migrating]
1532
- *
1533
- * add getMigratingConfig method for your component.
1534
- * getMigratingConfig() {
1535
- * return {
1536
- * props: {
1537
- * 'allow-no-selection': 'allow-no-selection is removed.',
1538
- * 'selection-mode': 'selection-mode is removed.'
1539
- * },
1540
- * events: {
1541
- * selectionchange: 'selectionchange is renamed to selection-change.'
1542
- * }
1543
- * };
1544
- * },
1545
- */
1546
- /* harmony default export */ __webpack_exports__["a"] = ({
1547
- mounted: function mounted() {
1548
- if (true) return;
1549
- if (!this.$vnode) return;
1550
-
1551
- var _getMigratingConfig = this.getMigratingConfig(),
1552
- _getMigratingConfig$p = _getMigratingConfig.props,
1553
- props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
1554
- _getMigratingConfig$e = _getMigratingConfig.events,
1555
- events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
1556
-
1557
- var _$vnode = this.$vnode,
1558
- data = _$vnode.data,
1559
- componentOptions = _$vnode.componentOptions;
1560
-
1561
- var definedProps = data.attrs || {};
1562
- var definedEvents = componentOptions.listeners || {};
1563
-
1564
- for (var propName in definedProps) {
1565
- propName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
1566
- if (props[propName]) {
1567
- console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
1568
- }
1569
- }
1570
-
1571
- for (var eventName in definedEvents) {
1572
- eventName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
1573
- if (events[eventName]) {
1574
- console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
1575
- }
1576
- }
1577
- },
1578
-
1579
- methods: {
1580
- getMigratingConfig: function getMigratingConfig() {
1581
- return {
1582
- props: {},
1583
- events: {}
1584
- };
1585
- }
1586
- }
1587
- });
1588
-
1589
- /***/ }),
1590
- /* 13 */,
1591
- /* 14 */
1592
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1593
-
1594
- "use strict";
1595
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addResizeListener; });
1596
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeResizeListener; });
1597
- /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
1598
- /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0__);
1599
- /* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
1600
- /* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(throttle_debounce__WEBPACK_IMPORTED_MODULE_1__);
1601
-
1602
-
1603
-
1604
- var isServer = typeof window === 'undefined';
1605
-
1606
- /* istanbul ignore next */
1607
- var resizeHandler = function resizeHandler(entries) {
1608
- for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
1609
- var _ref;
1610
-
1611
- if (_isArray) {
1612
- if (_i >= _iterator.length) break;
1613
- _ref = _iterator[_i++];
1614
- } else {
1615
- _i = _iterator.next();
1616
- if (_i.done) break;
1617
- _ref = _i.value;
1618
- }
1619
-
1620
- var entry = _ref;
1621
-
1622
- var listeners = entry.target.__resizeListeners__ || [];
1623
- if (listeners.length) {
1624
- listeners.forEach(function (fn) {
1625
- fn();
1626
- });
1627
- }
1628
- }
1629
- };
1630
-
1631
- /* istanbul ignore next */
1632
- var addResizeListener = function addResizeListener(element, fn) {
1633
- if (isServer) return;
1634
- if (!element.__resizeListeners__) {
1635
- element.__resizeListeners__ = [];
1636
- element.__ro__ = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_0___default.a(Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_1__["debounce"])(16, resizeHandler));
1637
- element.__ro__.observe(element);
1638
- }
1639
- element.__resizeListeners__.push(fn);
1640
- };
1641
-
1642
- /* istanbul ignore next */
1643
- var removeResizeListener = function removeResizeListener(element, fn) {
1644
- if (!element || !element.__resizeListeners__) return;
1645
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
1646
- if (!element.__resizeListeners__.length) {
1647
- element.__ro__.disconnect();
1648
- }
1649
- };
1650
-
1651
- /***/ }),
1652
- /* 15 */,
1653
- /* 16 */
1654
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1655
-
1656
- "use strict";
1657
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDef; });
1658
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isKorean; });
1659
- function isDef(val) {
1660
- return val !== undefined && val !== null;
1661
- }
1662
- function isKorean(text) {
1663
- var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
1664
- return reg.test(text);
1665
- }
1666
-
1667
- /***/ }),
1668
- /* 17 */,
1669
- /* 18 */
1670
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1671
-
1672
- "use strict";
1673
- // ESM COMPAT FLAG
1674
- __webpack_require__.r(__webpack_exports__);
1675
-
1676
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=d8ebd7ac
1677
- var render = function render() {
1678
- var _vm = this,
1679
- _c = _vm._self._c
1680
- return _c(
1681
- "div",
1682
- {
1683
- class: [
1684
- _vm.type === "textarea" ? "el-textarea" : "el-input",
1685
- _vm.inputSize ? "el-input--" + _vm.inputSize : "",
1686
- {
1687
- "is-disabled": _vm.inputDisabled,
1688
- "is-exceed": _vm.inputExceed,
1689
- "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
1690
- "el-input-group--append": _vm.$slots.append,
1691
- "el-input-group--prepend": _vm.$slots.prepend,
1692
- "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
1693
- "el-input--suffix":
1694
- _vm.$slots.suffix ||
1695
- _vm.suffixIcon ||
1696
- _vm.clearable ||
1697
- _vm.showPassword,
1698
- },
1699
- ],
1700
- on: {
1701
- mouseenter: function ($event) {
1702
- _vm.hovering = true
1703
- },
1704
- mouseleave: function ($event) {
1705
- _vm.hovering = false
1706
- },
1707
- },
1708
- },
1709
- [
1710
- _vm.type !== "textarea"
1711
- ? [
1712
- _vm.$slots.prepend
1713
- ? _c(
1714
- "div",
1715
- { staticClass: "el-input-group__prepend" },
1716
- [_vm._t("prepend")],
1717
- 2
1718
- )
1719
- : _vm._e(),
1720
- _vm.type !== "textarea"
1721
- ? _c(
1722
- "input",
1723
- _vm._b(
1724
- {
1725
- ref: "input",
1726
- staticClass: "el-input__inner",
1727
- attrs: {
1728
- tabindex: _vm.tabindex,
1729
- type: _vm.showPassword
1730
- ? _vm.passwordVisible
1731
- ? "text"
1732
- : "password"
1733
- : _vm.type,
1734
- disabled: _vm.inputDisabled,
1735
- readonly: _vm.readonly,
1736
- autocomplete: _vm.autoComplete || _vm.autocomplete,
1737
- "aria-label": _vm.label,
1738
- },
1739
- on: {
1740
- compositionstart: _vm.handleCompositionStart,
1741
- compositionupdate: _vm.handleCompositionUpdate,
1742
- compositionend: _vm.handleCompositionEnd,
1743
- input: _vm.handleInput,
1744
- focus: _vm.handleFocus,
1745
- blur: _vm.handleBlur,
1746
- change: _vm.handleChange,
1747
- },
1748
- },
1749
- "input",
1750
- _vm.$attrs,
1751
- false
1752
- )
1753
- )
1754
- : _vm._e(),
1755
- _vm.$slots.prefix || _vm.prefixIcon
1756
- ? _c(
1757
- "span",
1758
- { staticClass: "el-input__prefix" },
1759
- [
1760
- _vm._t("prefix"),
1761
- _vm.prefixIcon
1762
- ? _c("i", {
1763
- staticClass: "el-input__icon",
1764
- class: _vm.prefixIcon,
1765
- })
1766
- : _vm._e(),
1767
- ],
1768
- 2
1769
- )
1770
- : _vm._e(),
1771
- _vm.getSuffixVisible()
1772
- ? _c("span", { staticClass: "el-input__suffix" }, [
1773
- _c(
1774
- "span",
1775
- { staticClass: "el-input__suffix-inner" },
1776
- [
1777
- !_vm.showClear ||
1778
- !_vm.showPwdVisible ||
1779
- !_vm.isWordLimitVisible
1780
- ? [
1781
- _vm._t("suffix"),
1782
- _vm.suffixIcon
1783
- ? _c("i", {
1784
- staticClass: "el-input__icon",
1785
- class: _vm.suffixIcon,
1786
- })
1787
- : _vm._e(),
1788
- ]
1789
- : _vm._e(),
1790
- _vm.showClear
1791
- ? _c("i", {
1792
- staticClass:
1793
- "el-input__icon el-icon-circle-close el-input__clear",
1794
- on: {
1795
- mousedown: function ($event) {
1796
- $event.preventDefault()
1797
- },
1798
- click: _vm.clear,
1799
- },
1800
- })
1801
- : _vm._e(),
1802
- _vm.showPwdVisible
1803
- ? _c("i", {
1804
- staticClass:
1805
- "el-input__icon el-icon-view el-input__clear",
1806
- on: { click: _vm.handlePasswordVisible },
1807
- })
1808
- : _vm._e(),
1809
- _vm.isWordLimitVisible
1810
- ? _c("span", { staticClass: "el-input__count" }, [
1811
- _c(
1812
- "span",
1813
- { staticClass: "el-input__count-inner" },
1814
- [
1815
- _vm._v(
1816
- "\n\t\t\t\t\t\t" +
1817
- _vm._s(_vm.textLength) +
1818
- "/" +
1819
- _vm._s(_vm.upperLimit) +
1820
- "\n\t\t\t\t\t"
1821
- ),
1822
- ]
1823
- ),
1824
- ])
1825
- : _vm._e(),
1826
- ],
1827
- 2
1828
- ),
1829
- _vm.validateState
1830
- ? _c("i", {
1831
- staticClass: "el-input__icon",
1832
- class: ["el-input__validateIcon", _vm.validateIcon],
1833
- })
1834
- : _vm._e(),
1835
- ])
1836
- : _vm._e(),
1837
- _vm.$slots.append
1838
- ? _c(
1839
- "div",
1840
- { staticClass: "el-input-group__append" },
1841
- [_vm._t("append")],
1842
- 2
1843
- )
1844
- : _vm._e(),
1845
- ]
1846
- : _c(
1847
- "textarea",
1848
- _vm._b(
1849
- {
1850
- ref: "textarea",
1851
- staticClass: "el-textarea__inner",
1852
- style: _vm.textareaStyle,
1853
- attrs: {
1854
- tabindex: _vm.tabindex,
1855
- disabled: _vm.inputDisabled,
1856
- readonly: _vm.readonly,
1857
- autocomplete: _vm.autoComplete || _vm.autocomplete,
1858
- "aria-label": _vm.label,
1859
- },
1860
- on: {
1861
- compositionstart: _vm.handleCompositionStart,
1862
- compositionupdate: _vm.handleCompositionUpdate,
1863
- compositionend: _vm.handleCompositionEnd,
1864
- input: _vm.handleInput,
1865
- focus: _vm.handleFocus,
1866
- blur: _vm.handleBlur,
1867
- change: _vm.handleChange,
1868
- },
1869
- },
1870
- "textarea",
1871
- _vm.$attrs,
1872
- false
1873
- )
1874
- ),
1875
- _vm.isWordLimitVisible && _vm.type === "textarea"
1876
- ? _c("span", { staticClass: "el-input__count" }, [
1877
- _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
1878
- ])
1879
- : _vm._e(),
1880
- ],
1881
- 2
1882
- )
1883
- }
1884
- var staticRenderFns = []
1885
- render._withStripped = true
1886
-
1887
-
1888
- // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=d8ebd7ac
1889
-
1890
- // EXTERNAL MODULE: ./src/mixins/emitter.js
1891
- var emitter = __webpack_require__(6);
1892
-
1893
- // EXTERNAL MODULE: ./src/mixins/migrating.js
1894
- var migrating = __webpack_require__(12);
1895
-
1896
- // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
1897
- var hiddenTextarea = void 0;
1898
-
1899
- var HIDDEN_STYLE = '\n\theight:0 !important;\n\tvisibility:hidden !important;\n\toverflow:hidden !important;\n\tposition:absolute !important;\n\tz-index:-1000 !important;\n\ttop:0 !important;\n\tright:0 !important\n';
1900
-
1901
- var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
1902
-
1903
- function calculateNodeStyling(targetElement) {
1904
- var style = window.getComputedStyle(targetElement);
1905
-
1906
- var boxSizing = style.getPropertyValue('box-sizing');
1907
-
1908
- var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
1909
-
1910
- var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
1911
-
1912
- var contextStyle = CONTEXT_STYLE.map(function (name) {
1913
- return name + ':' + style.getPropertyValue(name);
1914
- }).join(';');
1915
-
1916
- return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
1917
- }
1918
-
1919
- function calcTextareaHeight(targetElement) {
1920
- var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
1921
- var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
1922
-
1923
- if (!hiddenTextarea) {
1924
- hiddenTextarea = document.createElement('textarea');
1925
- document.body.appendChild(hiddenTextarea);
1926
- }
1927
-
1928
- var _calculateNodeStyling = calculateNodeStyling(targetElement),
1929
- paddingSize = _calculateNodeStyling.paddingSize,
1930
- borderSize = _calculateNodeStyling.borderSize,
1931
- boxSizing = _calculateNodeStyling.boxSizing,
1932
- contextStyle = _calculateNodeStyling.contextStyle;
1933
-
1934
- hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
1935
- hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
1936
-
1937
- var height = hiddenTextarea.scrollHeight;
1938
- var result = {};
1939
-
1940
- if (boxSizing === 'border-box') {
1941
- height = height + borderSize;
1942
- } else if (boxSizing === 'content-box') {
1943
- height = height - paddingSize;
1944
- }
1945
-
1946
- hiddenTextarea.value = '';
1947
- var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
1948
-
1949
- if (minRows !== null) {
1950
- var minHeight = singleRowHeight * minRows;
1951
- if (boxSizing === 'border-box') {
1952
- minHeight = minHeight + paddingSize + borderSize;
1953
- }
1954
- height = Math.max(minHeight, height);
1955
- result.minHeight = minHeight + 'px';
1956
- }
1957
- if (maxRows !== null) {
1958
- var maxHeight = singleRowHeight * maxRows;
1959
- if (boxSizing === 'border-box') {
1960
- maxHeight = maxHeight + paddingSize + borderSize;
1961
- }
1962
- height = Math.min(maxHeight, height);
1963
- }
1964
- result.height = height + 'px';
1965
- hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
1966
- hiddenTextarea = null;
1967
- return result;
1968
- };
1969
- // EXTERNAL MODULE: ./src/utils/merge.js
1970
- var merge = __webpack_require__(7);
1971
-
1972
- // EXTERNAL MODULE: ./src/utils/shared.js
1973
- var shared = __webpack_require__(16);
1974
-
1975
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
1976
-
1977
-
1978
-
1979
-
1980
-
1981
-
1982
-
1983
- /* harmony default export */ var inputvue_type_script_lang_js = ({
1984
- name: 'ElInput',
1985
-
1986
- componentName: 'ElInput',
1987
-
1988
- mixins: [emitter["a" /* default */], migrating["a" /* default */]],
1989
-
1990
- inheritAttrs: false,
1991
-
1992
- inject: {
1993
- elForm: {
1994
- default: ''
1995
- },
1996
- elFormItem: {
1997
- default: ''
1998
- }
1999
- },
2000
-
2001
- data: function data() {
2002
- return {
2003
- textareaCalcStyle: {},
2004
- hovering: false,
2005
- focused: false,
2006
- isComposing: false,
2007
- passwordVisible: false
2008
- };
2009
- },
2010
-
2011
-
2012
- props: {
2013
- value: [String, Number],
2014
- size: String,
2015
- resize: String,
2016
- form: String,
2017
- disabled: Boolean,
2018
- readonly: Boolean,
2019
- type: {
2020
- type: String,
2021
- default: 'text'
2022
- },
2023
- autosize: {
2024
- type: [Boolean, Object],
2025
- default: false
2026
- },
2027
- autocomplete: {
2028
- type: String,
2029
- default: 'off'
2030
- },
2031
- /** @Deprecated in next major version */
2032
- autoComplete: {
2033
- type: String,
2034
- validator: function validator(val) {
2035
- false && false;
2036
- return true;
2037
- }
2038
- },
2039
- validateEvent: {
2040
- type: Boolean,
2041
- default: true
2042
- },
2043
- suffixIcon: String,
2044
- prefixIcon: String,
2045
- label: String,
2046
- clearable: {
2047
- type: Boolean,
2048
- default: false
2049
- },
2050
- showPassword: {
2051
- type: Boolean,
2052
- default: false
2053
- },
2054
- showWordLimit: {
2055
- type: Boolean,
2056
- default: false
2057
- },
2058
- tabindex: String
2059
- },
2060
-
2061
- computed: {
2062
- _elFormItemSize: function _elFormItemSize() {
2063
- return (this.elFormItem || {}).elFormItemSize;
2064
- },
2065
- validateState: function validateState() {
2066
- return this.elFormItem ? this.elFormItem.validateState : '';
2067
- },
2068
- needStatusIcon: function needStatusIcon() {
2069
- return this.elForm ? this.elForm.statusIcon : false;
2070
- },
2071
- validateIcon: function validateIcon() {
2072
- return {
2073
- validating: 'el-icon-loading',
2074
- success: 'el-icon-circle-check',
2075
- error: 'el-icon-circle-close'
2076
- }[this.validateState];
2077
- },
2078
- textareaStyle: function textareaStyle() {
2079
- return Object(merge["a" /* default */])({}, this.textareaCalcStyle, { resize: this.resize });
2080
- },
2081
- inputSize: function inputSize() {
2082
- return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2083
- },
2084
- inputDisabled: function inputDisabled() {
2085
- return this.disabled || (this.elForm || {}).disabled;
2086
- },
2087
- nativeInputValue: function nativeInputValue() {
2088
- return this.value === null || this.value === undefined ? '' : String(this.value);
2089
- },
2090
- showClear: function showClear() {
2091
- return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
2092
- },
2093
- showPwdVisible: function showPwdVisible() {
2094
- return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
2095
- },
2096
- isWordLimitVisible: function isWordLimitVisible() {
2097
- return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
2098
- },
2099
- upperLimit: function upperLimit() {
2100
- return this.$attrs.maxlength;
2101
- },
2102
- textLength: function textLength() {
2103
- if (typeof this.value === 'number') {
2104
- return String(this.value).length;
2105
- }
2106
-
2107
- return (this.value || '').length;
2108
- },
2109
- inputExceed: function inputExceed() {
2110
- // show exceed style if length of initial value greater then maxlength
2111
- return this.isWordLimitVisible && this.textLength > this.upperLimit;
2112
- }
2113
- },
2114
-
2115
- watch: {
2116
- value: function value(val) {
2117
- this.$nextTick(this.resizeTextarea);
2118
- if (this.validateEvent) {
2119
- this.dispatch('ElFormItem', 'el.form.change', [val]);
2120
- }
2121
- },
2122
-
2123
- // native input value is set explicitly
2124
- // do not use v-model / :value in template
2125
- // see: https://github.com/ElemeFE/element/issues/14521
2126
- nativeInputValue: function nativeInputValue() {
2127
- this.setNativeInputValue();
2128
- },
2129
-
2130
- // when change between <input> and <textarea>,
2131
- // update DOM dependent value and styles
2132
- // https://github.com/ElemeFE/element/issues/14857
2133
- type: function type() {
2134
- var _this = this;
2135
-
2136
- this.$nextTick(function () {
2137
- _this.setNativeInputValue();
2138
- _this.resizeTextarea();
2139
- _this.updateIconOffset();
2140
- });
2141
- }
2142
- },
2143
-
2144
- methods: {
2145
- focus: function focus() {
2146
- this.getInput().focus();
2147
- },
2148
- blur: function blur() {
2149
- this.getInput().blur();
2150
- },
2151
- getMigratingConfig: function getMigratingConfig() {
2152
- return {
2153
- props: {
2154
- 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
2155
- 'on-icon-click': 'on-icon-click is removed.'
2156
- },
2157
- events: {
2158
- 'click': 'click is removed.'
2159
- }
2160
- };
2161
- },
2162
- handleBlur: function handleBlur(event) {
2163
- this.focused = false;
2164
- this.$emit('blur', event);
2165
- if (this.validateEvent) {
2166
- this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
2167
- }
2168
- },
2169
- select: function select() {
2170
- this.getInput().select();
2171
- },
2172
- resizeTextarea: function resizeTextarea() {
2173
- if (this.$isServer) return;
2174
- var autosize = this.autosize,
2175
- type = this.type;
2176
-
2177
- if (type !== 'textarea') return;
2178
- if (!autosize) {
2179
- this.textareaCalcStyle = {
2180
- minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
2181
- };
2182
- return;
2183
- }
2184
- var minRows = autosize.minRows;
2185
- var maxRows = autosize.maxRows;
2186
-
2187
- this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
2188
- },
2189
- setNativeInputValue: function setNativeInputValue() {
2190
- var input = this.getInput();
2191
- if (!input) return;
2192
- if (input.value === this.nativeInputValue) return;
2193
- input.value = this.nativeInputValue;
2194
- },
2195
- handleFocus: function handleFocus(event) {
2196
- this.focused = true;
2197
- this.$emit('focus', event);
2198
- },
2199
- handleCompositionStart: function handleCompositionStart(event) {
2200
- this.$emit('compositionstart', event);
2201
- this.isComposing = true;
2202
- },
2203
- handleCompositionUpdate: function handleCompositionUpdate(event) {
2204
- this.$emit('compositionupdate', event);
2205
- var text = event.target.value;
2206
- var lastCharacter = text[text.length - 1] || '';
2207
- this.isComposing = !Object(shared["b" /* isKorean */])(lastCharacter);
2208
- },
2209
- handleCompositionEnd: function handleCompositionEnd(event) {
2210
- this.$emit('compositionend', event);
2211
- if (this.isComposing) {
2212
- this.isComposing = false;
2213
- this.handleInput(event);
2214
- }
2215
- },
2216
- handleInput: function handleInput(event) {
2217
- // should not emit input during composition
2218
- // see: https://github.com/ElemeFE/element/issues/10516
2219
- if (this.isComposing) return;
2220
-
2221
- // hack for https://github.com/ElemeFE/element/issues/8548
2222
- // should remove the following line when we don't support IE
2223
- if (event.target.value === this.nativeInputValue) return;
2224
-
2225
- this.$emit('input', event.target.value);
2226
-
2227
- // ensure native input value is controlled
2228
- // see: https://github.com/ElemeFE/element/issues/12850
2229
- this.$nextTick(this.setNativeInputValue);
2230
- },
2231
- handleChange: function handleChange(event) {
2232
- this.$emit('change', event.target.value);
2233
- },
2234
- calcIconOffset: function calcIconOffset(place) {
2235
- var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
2236
- if (!elList.length) return;
2237
- var el = null;
2238
- for (var i = 0; i < elList.length; i++) {
2239
- if (elList[i].parentNode === this.$el) {
2240
- el = elList[i];
2241
- break;
2242
- }
2243
- }
2244
- if (!el) return;
2245
- var pendantMap = {
2246
- suffix: 'append',
2247
- prefix: 'prepend'
2248
- };
2249
-
2250
- var pendant = pendantMap[place];
2251
- if (this.$slots[pendant]) {
2252
- el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
2253
- } else {
2254
- el.removeAttribute('style');
2255
- }
2256
- },
2257
- updateIconOffset: function updateIconOffset() {
2258
- this.calcIconOffset('prefix');
2259
- this.calcIconOffset('suffix');
2260
- },
2261
- clear: function clear() {
2262
- this.$emit('input', '');
2263
- this.$emit('change', '');
2264
- this.$emit('clear');
2265
- },
2266
- handlePasswordVisible: function handlePasswordVisible() {
2267
- var _this2 = this;
2268
-
2269
- this.passwordVisible = !this.passwordVisible;
2270
- this.$nextTick(function () {
2271
- _this2.focus();
2272
- });
2273
- },
2274
- getInput: function getInput() {
2275
- return this.$refs.input || this.$refs.textarea;
2276
- },
2277
- getSuffixVisible: function getSuffixVisible() {
2278
- return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
2279
- }
2280
- },
2281
-
2282
- created: function created() {
2283
- this.$on('inputSelect', this.select);
2284
- },
2285
- mounted: function mounted() {
2286
- this.setNativeInputValue();
2287
- this.resizeTextarea();
2288
- this.updateIconOffset();
2289
- },
2290
- updated: function updated() {
2291
- this.$nextTick(this.updateIconOffset);
2292
- }
2293
- });
2294
- // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
2295
- /* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
2296
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2297
- var componentNormalizer = __webpack_require__(2);
2298
-
2299
- // CONCATENATED MODULE: ./packages/input/src/input.vue
2300
-
2301
-
2302
-
2303
-
2304
-
2305
- /* normalize component */
2306
-
2307
- var component = Object(componentNormalizer["a" /* default */])(
2308
- src_inputvue_type_script_lang_js,
2309
- render,
2310
- staticRenderFns,
2311
- false,
2312
- null,
2313
- null,
2314
- null
2315
-
2316
- )
2317
-
2318
- /* harmony default export */ var input = (component.exports);
2319
- // CONCATENATED MODULE: ./packages/input/index.js
2320
-
2321
-
2322
- /* istanbul ignore next */
2323
- input.install = function (Vue) {
2324
- Vue.component(input.name, input);
2325
- };
2326
-
2327
- /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
2328
-
2329
- /***/ }),
2330
- /* 19 */
2331
- /***/ (function(module, exports) {
2332
-
2333
- module.exports = require("throttle-debounce");
2334
-
2335
- /***/ }),
2336
- /* 20 */
2337
- /***/ (function(module, exports) {
2338
-
2339
- module.exports = require("resize-observer-polyfill");
2340
-
2341
- /***/ }),
2342
- /* 21 */
2343
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2344
-
2345
- "use strict";
2346
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2347
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2348
- /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
2349
-
2350
-
2351
-
2352
- var nodeList = [];
2353
- var ctx = '@@clickoutsideContext';
2354
-
2355
- var startClick = void 0;
2356
- var seed = 0;
2357
-
2358
- !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mousedown', function (e) {
2359
- return startClick = e;
2360
- });
2361
-
2362
- !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mouseup', function (e) {
2363
- nodeList.forEach(function (node) {
2364
- return node[ctx].documentHandler(e, startClick);
2365
- });
2366
- });
2367
-
2368
- function createDocumentHandler(el, binding, vnode) {
2369
- return function () {
2370
- var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2371
- var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2372
-
2373
- if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;
2374
-
2375
- if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
2376
- vnode.context[el[ctx].methodName]();
2377
- } else {
2378
- el[ctx].bindingFn && el[ctx].bindingFn();
2379
- }
2380
- };
2381
- }
2382
-
2383
- /**
2384
- * v-clickoutside
2385
- * @desc 点击元素外面才会触发的事件
2386
- * @example
2387
- * ```vue
2388
- * <div v-element-clickoutside="handleClose">
2389
- * ```
2390
- */
2391
- /* harmony default export */ __webpack_exports__["a"] = ({
2392
- bind: function bind(el, binding, vnode) {
2393
- nodeList.push(el);
2394
- var id = seed++;
2395
- el[ctx] = {
2396
- id: id,
2397
- documentHandler: createDocumentHandler(el, binding, vnode),
2398
- methodName: binding.expression,
2399
- bindingFn: binding.value
2400
- };
2401
- },
2402
- update: function update(el, binding, vnode) {
2403
- el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
2404
- el[ctx].methodName = binding.expression;
2405
- el[ctx].bindingFn = binding.value;
2406
- },
2407
- unbind: function unbind(el) {
2408
- var len = nodeList.length;
2409
-
2410
- for (var i = 0; i < len; i++) {
2411
- if (nodeList[i][ctx].id === el[ctx].id) {
2412
- nodeList.splice(i, 1);
2413
- break;
2414
- }
2415
- }
2416
- delete el[ctx];
2417
- }
2418
- });
2419
-
2420
- /***/ }),
2421
- /* 22 */
2422
- /***/ (function(module, exports) {
2423
-
2424
- module.exports = require("throttle-debounce/debounce");
2425
-
2426
- /***/ }),
2427
- /* 23 */
2428
- /***/ (function(module, exports, __webpack_require__) {
2429
-
2430
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2431
-
2432
- /**
2433
- * @fileOverview Kickass library to create and place poppers near their reference elements.
2434
- * @version {{version}}
2435
- * @license
2436
- * Copyright (c) 2016 Federico Zivolo and contributors
2437
- *
2438
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2439
- * of this software and associated documentation files (the "Software"), to deal
2440
- * in the Software without restriction, including without limitation the rights
2441
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2442
- * copies of the Software, and to permit persons to whom the Software is
2443
- * furnished to do so, subject to the following conditions:
2444
- *
2445
- * The above copyright notice and this permission notice shall be included in all
2446
- * copies or substantial portions of the Software.
2447
- *
2448
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2449
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2450
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2451
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2452
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2453
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2454
- * SOFTWARE.
2455
- */
2456
-
2457
- //
2458
- // Cross module loader
2459
- // Supported: Node, AMD, Browser globals
2460
- //
2461
- ;(function (root, factory) {
2462
- if (true) {
2463
- // AMD. Register as an anonymous module.
2464
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2465
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2466
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2467
- __WEBPACK_AMD_DEFINE_FACTORY__),
2468
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2469
- } else {}
2470
- })(this, function () {
2471
-
2472
- 'use strict';
2473
-
2474
- var root = window;
2475
-
2476
- // default options
2477
- var DEFAULTS = {
2478
- // placement of the popper
2479
- placement: 'bottom',
2480
-
2481
- gpuAcceleration: true,
2482
-
2483
- // shift popper from its origin by the given amount of pixels (can be negative)
2484
- offset: 0,
2485
-
2486
- // the element which will act as boundary of the popper
2487
- boundariesElement: 'viewport',
2488
-
2489
- // amount of pixel used to define a minimum distance between the boundaries and the popper
2490
- boundariesPadding: 5,
2491
-
2492
- // popper will try to prevent overflow following this order,
2493
- // by default, then, it could overflow on the left and on top of the boundariesElement
2494
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
2495
-
2496
- // the behavior used by flip to change the placement of the popper
2497
- flipBehavior: 'flip',
2498
-
2499
- arrowElement: '[x-arrow]',
2500
-
2501
- arrowOffset: 0,
2502
-
2503
- // list of functions used to modify the offsets before they are applied to the popper
2504
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
2505
-
2506
- modifiersIgnored: [],
2507
-
2508
- forceAbsolute: false
2509
- };
2510
-
2511
- /**
2512
- * Create a new Popper.js instance
2513
- * @constructor Popper
2514
- * @param {HTMLElement} reference - The reference element used to position the popper
2515
- * @param {HTMLElement|Object} popper
2516
- * The HTML element used as popper, or a configuration used to generate the popper.
2517
- * @param {String} [popper.tagName='div'] The tag name of the generated popper.
2518
- * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
2519
- * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
2520
- * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
2521
- * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
2522
- * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
2523
- * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
2524
- * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
2525
- * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
2526
- * @param {Object} options
2527
- * @param {String} [options.placement=bottom]
2528
- * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
2529
- * left(-start, -end)`
2530
- *
2531
- * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
2532
- * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
2533
- * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
2534
- * reference element.
2535
- * By default, it will look for a child node of the popper with the `x-arrow` attribute.
2536
- *
2537
- * @param {Boolean} [options.gpuAcceleration=true]
2538
- * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
2539
- * browser to use the GPU to accelerate the rendering.
2540
- * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
2541
- *
2542
- * @param {Number} [options.offset=0]
2543
- * Amount of pixels the popper will be shifted (can be negative).
2544
- *
2545
- * @param {String|Element} [options.boundariesElement='viewport']
2546
- * The element which will define the boundaries of the popper position, the popper will never be placed outside
2547
- * of the defined boundaries (except if `keepTogether` is enabled)
2548
- *
2549
- * @param {Number} [options.boundariesPadding=5]
2550
- * Additional padding for the boundaries
2551
- *
2552
- * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
2553
- * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
2554
- * this means that the last ones will never overflow
2555
- *
2556
- * @param {String|Array} [options.flipBehavior='flip']
2557
- * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
2558
- * overlap its reference element. Defining `flip` as value, the placement will be flipped on
2559
- * its axis (`right - left`, `top - bottom`).
2560
- * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
2561
- * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
2562
- * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
2563
- *
2564
- * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
2565
- * List of functions used to modify the data before they are applied to the popper, add your custom functions
2566
- * to this array to edit the offsets and placement.
2567
- * The function should reflect the @params and @returns of preventOverflow
2568
- *
2569
- * @param {Array} [options.modifiersIgnored=[]]
2570
- * Put here any built-in modifier name you want to exclude from the modifiers list
2571
- * The function should reflect the @params and @returns of preventOverflow
2572
- *
2573
- * @param {Boolean} [options.removeOnDestroy=false]
2574
- * Set to true if you want to automatically remove the popper when you call the `destroy` method.
2575
- */
2576
- function Popper(reference, popper, options) {
2577
- this._reference = reference.jquery ? reference[0] : reference;
2578
- this.state = {};
2579
-
2580
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
2581
- // generate a default popper if is not defined
2582
- var isNotDefined = typeof popper === 'undefined' || popper === null;
2583
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
2584
- if (isNotDefined || isConfig) {
2585
- this._popper = this.parse(isConfig ? popper : {});
2586
- }
2587
- // otherwise, use the given HTMLElement as popper
2588
- else {
2589
- this._popper = popper.jquery ? popper[0] : popper;
2590
- }
2591
-
2592
- // with {} we create a new object with the options inside it
2593
- this._options = Object.assign({}, DEFAULTS, options);
2594
-
2595
- // refactoring modifiers' list
2596
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
2597
- // remove ignored modifiers
2598
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
2599
-
2600
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
2601
- // margins needs to be calculated to get the correct popper offsets
2602
- if (modifier === 'applyStyle') {
2603
- this._popper.setAttribute('x-placement', this._options.placement);
2604
- }
2605
-
2606
- // return predefined modifier identified by string or keep the custom one
2607
- return this.modifiers[modifier] || modifier;
2608
- }.bind(this));
2609
-
2610
- // make sure to apply the popper position before any computation
2611
- this.state.position = this._getPosition(this._popper, this._reference);
2612
- setStyle(this._popper, { position: this.state.position, top: 0 });
2613
-
2614
- // fire the first update to position the popper in the right place
2615
- this.update();
2616
-
2617
- // setup event listeners, they will take care of update the position in specific situations
2618
- this._setupEventListeners();
2619
- return this;
2620
- }
2621
-
2622
- //
2623
- // Methods
2624
- //
2625
- /**
2626
- * Destroy the popper
2627
- * @method
2628
- * @memberof Popper
2629
- */
2630
- Popper.prototype.destroy = function () {
2631
- this._popper.removeAttribute('x-placement');
2632
- this._popper.style.left = '';
2633
- this._popper.style.position = '';
2634
- this._popper.style.top = '';
2635
- this._popper.style[getSupportedPropertyName('transform')] = '';
2636
- this._removeEventListeners();
2637
-
2638
- // remove the popper if user explicity asked for the deletion on destroy
2639
- if (this._options.removeOnDestroy) {
2640
- this._popper.remove();
2641
- }
2642
- return this;
2643
- };
2644
-
2645
- /**
2646
- * Updates the position of the popper, computing the new offsets and applying the new style
2647
- * @method
2648
- * @memberof Popper
2649
- */
2650
- Popper.prototype.update = function () {
2651
- var data = { instance: this, styles: {} };
2652
-
2653
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
2654
- // and refer to _originalPlacement to know the original value
2655
- data.placement = this._options.placement;
2656
- data._originalPlacement = this._options.placement;
2657
-
2658
- // compute the popper and reference offsets and put them inside data.offsets
2659
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
2660
-
2661
- // get boundaries
2662
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
2663
-
2664
- data = this.runModifiers(data, this._options.modifiers);
2665
-
2666
- if (typeof this.state.updateCallback === 'function') {
2667
- this.state.updateCallback(data);
2668
- }
2669
- };
2670
-
2671
- /**
2672
- * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
2673
- * @method
2674
- * @memberof Popper
2675
- * @param {Function} callback
2676
- */
2677
- Popper.prototype.onCreate = function (callback) {
2678
- // the createCallbacks return as first argument the popper instance
2679
- callback(this);
2680
- return this;
2681
- };
2682
-
2683
- /**
2684
- * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
2685
- * used to style popper and its arrow.
2686
- * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
2687
- * @method
2688
- * @memberof Popper
2689
- * @param {Function} callback
2690
- */
2691
- Popper.prototype.onUpdate = function (callback) {
2692
- this.state.updateCallback = callback;
2693
- return this;
2694
- };
2695
-
2696
- /**
2697
- * Helper used to generate poppers from a configuration file
2698
- * @method
2699
- * @memberof Popper
2700
- * @param config {Object} configuration
2701
- * @returns {HTMLElement} popper
2702
- */
2703
- Popper.prototype.parse = function (config) {
2704
- var defaultConfig = {
2705
- tagName: 'div',
2706
- classNames: ['popper'],
2707
- attributes: [],
2708
- parent: root.document.body,
2709
- content: '',
2710
- contentType: 'text',
2711
- arrowTagName: 'div',
2712
- arrowClassNames: ['popper__arrow'],
2713
- arrowAttributes: ['x-arrow']
2714
- };
2715
- config = Object.assign({}, defaultConfig, config);
2716
-
2717
- var d = root.document;
2718
-
2719
- var popper = d.createElement(config.tagName);
2720
- addClassNames(popper, config.classNames);
2721
- addAttributes(popper, config.attributes);
2722
- if (config.contentType === 'node') {
2723
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
2724
- } else if (config.contentType === 'html') {
2725
- popper.innerHTML = config.content;
2726
- } else {
2727
- popper.textContent = config.content;
2728
- }
2729
-
2730
- if (config.arrowTagName) {
2731
- var arrow = d.createElement(config.arrowTagName);
2732
- addClassNames(arrow, config.arrowClassNames);
2733
- addAttributes(arrow, config.arrowAttributes);
2734
- popper.appendChild(arrow);
2735
- }
2736
-
2737
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
2738
-
2739
- // if the given parent is a string, use it to match an element
2740
- // if more than one element is matched, the first one will be used as parent
2741
- // if no elements are matched, the script will throw an error
2742
- if (typeof parent === 'string') {
2743
- parent = d.querySelectorAll(config.parent);
2744
- if (parent.length > 1) {
2745
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
2746
- }
2747
- if (parent.length === 0) {
2748
- throw 'ERROR: the given `parent` doesn\'t exists!';
2749
- }
2750
- parent = parent[0];
2751
- }
2752
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
2753
- // the first one will be used as parent
2754
- if (parent.length > 1 && parent instanceof Element === false) {
2755
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
2756
- parent = parent[0];
2757
- }
2758
-
2759
- // append the generated popper to its parent
2760
- parent.appendChild(popper);
2761
-
2762
- return popper;
2763
-
2764
- /**
2765
- * Adds class names to the given element
2766
- * @function
2767
- * @ignore
2768
- * @param {HTMLElement} target
2769
- * @param {Array} classes
2770
- */
2771
- function addClassNames(element, classNames) {
2772
- classNames.forEach(function (className) {
2773
- element.classList.add(className);
2774
- });
2775
- }
2776
-
2777
- /**
2778
- * Adds attributes to the given element
2779
- * @function
2780
- * @ignore
2781
- * @param {HTMLElement} target
2782
- * @param {Array} attributes
2783
- * @example
2784
- * addAttributes(element, [ 'data-info:foobar' ]);
2785
- */
2786
- function addAttributes(element, attributes) {
2787
- attributes.forEach(function (attribute) {
2788
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
2789
- });
2790
- }
2791
- };
2792
-
2793
- /**
2794
- * Helper used to get the position which will be applied to the popper
2795
- * @method
2796
- * @memberof Popper
2797
- * @param config {HTMLElement} popper element
2798
- * @param reference {HTMLElement} reference element
2799
- * @returns {String} position
2800
- */
2801
- Popper.prototype._getPosition = function (popper, reference) {
2802
- var container = getOffsetParent(reference);
2803
-
2804
- if (this._options.forceAbsolute) {
2805
- return 'absolute';
2806
- }
2807
-
2808
- // Decide if the popper will be fixed
2809
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
2810
- var isParentFixed = isFixed(reference, container);
2811
- return isParentFixed ? 'fixed' : 'absolute';
2812
- };
2813
-
2814
- /**
2815
- * Get offsets to the popper
2816
- * @method
2817
- * @memberof Popper
2818
- * @access private
2819
- * @param {Element} popper - the popper element
2820
- * @param {Element} reference - the reference element (the popper will be relative to this)
2821
- * @returns {Object} An object containing the offsets which will be applied to the popper
2822
- */
2823
- Popper.prototype._getOffsets = function (popper, reference, placement) {
2824
- placement = placement.split('-')[0];
2825
- var popperOffsets = {};
2826
-
2827
- popperOffsets.position = this.state.position;
2828
- var isParentFixed = popperOffsets.position === 'fixed';
2829
-
2830
- //
2831
- // Get reference element position
2832
- //
2833
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
2834
-
2835
- //
2836
- // Get popper sizes
2837
- //
2838
- var popperRect = getOuterSizes(popper);
2839
-
2840
- //
2841
- // Compute offsets of popper
2842
- //
2843
-
2844
- // depending by the popper placement we have to compute its offsets slightly differently
2845
- if (['right', 'left'].indexOf(placement) !== -1) {
2846
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
2847
- if (placement === 'left') {
2848
- popperOffsets.left = referenceOffsets.left - popperRect.width;
2849
- } else {
2850
- popperOffsets.left = referenceOffsets.right;
2851
- }
2852
- } else {
2853
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
2854
- if (placement === 'top') {
2855
- popperOffsets.top = referenceOffsets.top - popperRect.height;
2856
- } else {
2857
- popperOffsets.top = referenceOffsets.bottom;
2858
- }
2859
- }
2860
-
2861
- // Add width and height to our offsets object
2862
- popperOffsets.width = popperRect.width;
2863
- popperOffsets.height = popperRect.height;
2864
-
2865
- return {
2866
- popper: popperOffsets,
2867
- reference: referenceOffsets
2868
- };
2869
- };
2870
-
2871
- /**
2872
- * Setup needed event listeners used to update the popper position
2873
- * @method
2874
- * @memberof Popper
2875
- * @access private
2876
- */
2877
- Popper.prototype._setupEventListeners = function () {
2878
- // NOTE: 1 DOM access here
2879
- this.state.updateBound = this.update.bind(this);
2880
- root.addEventListener('resize', this.state.updateBound);
2881
- // if the boundariesElement is window we don't need to listen for the scroll event
2882
- if (this._options.boundariesElement !== 'window') {
2883
- var target = getScrollParent(this._reference);
2884
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
2885
- if (target === root.document.body || target === root.document.documentElement) {
2886
- target = root;
2887
- }
2888
- target.addEventListener('scroll', this.state.updateBound);
2889
- this.state.scrollTarget = target;
2890
- }
2891
- };
2892
-
2893
- /**
2894
- * Remove event listeners used to update the popper position
2895
- * @method
2896
- * @memberof Popper
2897
- * @access private
2898
- */
2899
- Popper.prototype._removeEventListeners = function () {
2900
- // NOTE: 1 DOM access here
2901
- root.removeEventListener('resize', this.state.updateBound);
2902
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
2903
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
2904
- this.state.scrollTarget = null;
2905
- }
2906
- this.state.updateBound = null;
2907
- };
2908
-
2909
- /**
2910
- * Computed the boundaries limits and return them
2911
- * @method
2912
- * @memberof Popper
2913
- * @access private
2914
- * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
2915
- * @param {Number} padding - Boundaries padding
2916
- * @param {Element} boundariesElement - Element used to define the boundaries
2917
- * @returns {Object} Coordinates of the boundaries
2918
- */
2919
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
2920
- // NOTE: 1 DOM access here
2921
- var boundaries = {};
2922
- var width, height;
2923
- if (boundariesElement === 'window') {
2924
- var body = root.document.body,
2925
- html = root.document.documentElement;
2926
-
2927
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
2928
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
2929
-
2930
- boundaries = {
2931
- top: 0,
2932
- right: width,
2933
- bottom: height,
2934
- left: 0
2935
- };
2936
- } else if (boundariesElement === 'viewport') {
2937
- var offsetParent = getOffsetParent(this._popper);
2938
- var scrollParent = getScrollParent(this._popper);
2939
- var offsetParentRect = getOffsetRect(offsetParent);
2940
-
2941
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
2942
- var getScrollTopValue = function getScrollTopValue(element) {
2943
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
2944
- };
2945
- var getScrollLeftValue = function getScrollLeftValue(element) {
2946
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
2947
- };
2948
-
2949
- // if the popper is fixed we don't have to substract scrolling from the boundaries
2950
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
2951
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
2952
-
2953
- boundaries = {
2954
- top: 0 - (offsetParentRect.top - scrollTop),
2955
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
2956
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
2957
- left: 0 - (offsetParentRect.left - scrollLeft)
2958
- };
2959
- } else {
2960
- if (getOffsetParent(this._popper) === boundariesElement) {
2961
- boundaries = {
2962
- top: 0,
2963
- left: 0,
2964
- right: boundariesElement.clientWidth,
2965
- bottom: boundariesElement.clientHeight
2966
- };
2967
- } else {
2968
- boundaries = getOffsetRect(boundariesElement);
2969
- }
2970
- }
2971
- boundaries.left += padding;
2972
- boundaries.right -= padding;
2973
- boundaries.top = boundaries.top + padding;
2974
- boundaries.bottom = boundaries.bottom - padding;
2975
- return boundaries;
2976
- };
2977
-
2978
- /**
2979
- * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
2980
- * @method
2981
- * @memberof Popper
2982
- * @access public
2983
- * @param {Object} data
2984
- * @param {Array} modifiers
2985
- * @param {Function} ends
2986
- */
2987
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
2988
- var modifiersToRun = modifiers.slice();
2989
- if (ends !== undefined) {
2990
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
2991
- }
2992
-
2993
- modifiersToRun.forEach(function (modifier) {
2994
- if (isFunction(modifier)) {
2995
- data = modifier.call(this, data);
2996
- }
2997
- }.bind(this));
2998
-
2999
- return data;
3000
- };
3001
-
3002
- /**
3003
- * Helper used to know if the given modifier depends from another one.
3004
- * @method
3005
- * @memberof Popper
3006
- * @param {String} requesting - name of requesting modifier
3007
- * @param {String} requested - name of requested modifier
3008
- * @returns {Boolean}
3009
- */
3010
- Popper.prototype.isModifierRequired = function (requesting, requested) {
3011
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
3012
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
3013
- return modifier === requested;
3014
- }).length;
3015
- };
3016
-
3017
- //
3018
- // Modifiers
3019
- //
3020
-
3021
- /**
3022
- * Modifiers list
3023
- * @namespace Popper.modifiers
3024
- * @memberof Popper
3025
- * @type {Object}
3026
- */
3027
- Popper.prototype.modifiers = {};
3028
-
3029
- /**
3030
- * Apply the computed styles to the popper element
3031
- * @method
3032
- * @memberof Popper.modifiers
3033
- * @argument {Object} data - The data object generated by `update` method
3034
- * @returns {Object} The same data object
3035
- */
3036
- Popper.prototype.modifiers.applyStyle = function (data) {
3037
- // apply the final offsets to the popper
3038
- // NOTE: 1 DOM access here
3039
- var styles = {
3040
- position: data.offsets.popper.position
3041
- };
3042
-
3043
- // round top and left to avoid blurry text
3044
- var left = Math.round(data.offsets.popper.left);
3045
- var top = Math.round(data.offsets.popper.top);
3046
-
3047
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
3048
- // we automatically use the supported prefixed version if needed
3049
- var prefixedProperty;
3050
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
3051
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
3052
- styles.top = 0;
3053
- styles.left = 0;
3054
- }
3055
- // othwerise, we use the standard `left` and `top` properties
3056
- else {
3057
- styles.left = left;
3058
- styles.top = top;
3059
- }
3060
-
3061
- // any property present in `data.styles` will be applied to the popper,
3062
- // in this way we can make the 3rd party modifiers add custom styles to it
3063
- // Be aware, modifiers could override the properties defined in the previous
3064
- // lines of this modifier!
3065
- Object.assign(styles, data.styles);
3066
-
3067
- setStyle(this._popper, styles);
3068
-
3069
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
3070
- // NOTE: 1 DOM access here
3071
- this._popper.setAttribute('x-placement', data.placement);
3072
-
3073
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
3074
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
3075
- setStyle(data.arrowElement, data.offsets.arrow);
3076
- }
3077
-
3078
- return data;
3079
- };
3080
-
3081
- /**
3082
- * Modifier used to shift the popper on the start or end of its reference element side
3083
- * @method
3084
- * @memberof Popper.modifiers
3085
- * @argument {Object} data - The data object generated by `update` method
3086
- * @returns {Object} The data object, properly modified
3087
- */
3088
- Popper.prototype.modifiers.shift = function (data) {
3089
- var placement = data.placement;
3090
- var basePlacement = placement.split('-')[0];
3091
- var shiftVariation = placement.split('-')[1];
3092
-
3093
- // if shift shiftVariation is specified, run the modifier
3094
- if (shiftVariation) {
3095
- var reference = data.offsets.reference;
3096
- var popper = getPopperClientRect(data.offsets.popper);
3097
-
3098
- var shiftOffsets = {
3099
- y: {
3100
- start: { top: reference.top },
3101
- end: { top: reference.top + reference.height - popper.height }
3102
- },
3103
- x: {
3104
- start: { left: reference.left },
3105
- end: { left: reference.left + reference.width - popper.width }
3106
- }
3107
- };
3108
-
3109
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
3110
-
3111
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
3112
- }
3113
-
3114
- return data;
3115
- };
3116
-
3117
- /**
3118
- * Modifier used to make sure the popper does not overflows from it's boundaries
3119
- * @method
3120
- * @memberof Popper.modifiers
3121
- * @argument {Object} data - The data object generated by `update` method
3122
- * @returns {Object} The data object, properly modified
3123
- */
3124
- Popper.prototype.modifiers.preventOverflow = function (data) {
3125
- var order = this._options.preventOverflowOrder;
3126
- var popper = getPopperClientRect(data.offsets.popper);
3127
-
3128
- var check = {
3129
- left: function left() {
3130
- var left = popper.left;
3131
- if (popper.left < data.boundaries.left) {
3132
- left = Math.max(popper.left, data.boundaries.left);
3133
- }
3134
- return { left: left };
3135
- },
3136
- right: function right() {
3137
- var left = popper.left;
3138
- if (popper.right > data.boundaries.right) {
3139
- left = Math.min(popper.left, data.boundaries.right - popper.width);
3140
- }
3141
- return { left: left };
3142
- },
3143
- top: function top() {
3144
- var top = popper.top;
3145
- if (popper.top < data.boundaries.top) {
3146
- top = Math.max(popper.top, data.boundaries.top);
3147
- }
3148
- return { top: top };
3149
- },
3150
- bottom: function bottom() {
3151
- var top = popper.top;
3152
- if (popper.bottom > data.boundaries.bottom) {
3153
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
3154
- }
3155
- return { top: top };
3156
- }
3157
- };
3158
-
3159
- order.forEach(function (direction) {
3160
- data.offsets.popper = Object.assign(popper, check[direction]());
3161
- });
3162
-
3163
- return data;
3164
- };
3165
-
3166
- /**
3167
- * Modifier used to make sure the popper is always near its reference
3168
- * @method
3169
- * @memberof Popper.modifiers
3170
- * @argument {Object} data - The data object generated by _update method
3171
- * @returns {Object} The data object, properly modified
3172
- */
3173
- Popper.prototype.modifiers.keepTogether = function (data) {
3174
- var popper = getPopperClientRect(data.offsets.popper);
3175
- var reference = data.offsets.reference;
3176
- var f = Math.floor;
3177
-
3178
- if (popper.right < f(reference.left)) {
3179
- data.offsets.popper.left = f(reference.left) - popper.width;
3180
- }
3181
- if (popper.left > f(reference.right)) {
3182
- data.offsets.popper.left = f(reference.right);
3183
- }
3184
- if (popper.bottom < f(reference.top)) {
3185
- data.offsets.popper.top = f(reference.top) - popper.height;
3186
- }
3187
- if (popper.top > f(reference.bottom)) {
3188
- data.offsets.popper.top = f(reference.bottom);
3189
- }
3190
-
3191
- return data;
3192
- };
3193
-
3194
- /**
3195
- * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
3196
- * Requires the `preventOverflow` modifier before it in order to work.
3197
- * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
3198
- * @method
3199
- * @memberof Popper.modifiers
3200
- * @argument {Object} data - The data object generated by _update method
3201
- * @returns {Object} The data object, properly modified
3202
- */
3203
- Popper.prototype.modifiers.flip = function (data) {
3204
- // check if preventOverflow is in the list of modifiers before the flip modifier.
3205
- // otherwise flip would not work as expected.
3206
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
3207
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
3208
- return data;
3209
- }
3210
-
3211
- if (data.flipped && data.placement === data._originalPlacement) {
3212
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
3213
- return data;
3214
- }
3215
-
3216
- var placement = data.placement.split('-')[0];
3217
- var placementOpposite = getOppositePlacement(placement);
3218
- var variation = data.placement.split('-')[1] || '';
3219
-
3220
- var flipOrder = [];
3221
- if (this._options.flipBehavior === 'flip') {
3222
- flipOrder = [placement, placementOpposite];
3223
- } else {
3224
- flipOrder = this._options.flipBehavior;
3225
- }
3226
-
3227
- flipOrder.forEach(function (step, index) {
3228
- if (placement !== step || flipOrder.length === index + 1) {
3229
- return;
3230
- }
3231
-
3232
- placement = data.placement.split('-')[0];
3233
- placementOpposite = getOppositePlacement(placement);
3234
-
3235
- var popperOffsets = getPopperClientRect(data.offsets.popper);
3236
-
3237
- // this boolean is used to distinguish right and bottom from top and left
3238
- // they need different computations to get flipped
3239
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
3240
-
3241
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
3242
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
3243
- // we'll use this boolean to detect any flip loop
3244
- data.flipped = true;
3245
- data.placement = flipOrder[index + 1];
3246
- if (variation) {
3247
- data.placement += '-' + variation;
3248
- }
3249
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
3250
-
3251
- data = this.runModifiers(data, this._options.modifiers, this._flip);
3252
- }
3253
- }.bind(this));
3254
- return data;
3255
- };
3256
-
3257
- /**
3258
- * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
3259
- * The offsets will shift the popper on the side of its reference element.
3260
- * @method
3261
- * @memberof Popper.modifiers
3262
- * @argument {Object} data - The data object generated by _update method
3263
- * @returns {Object} The data object, properly modified
3264
- */
3265
- Popper.prototype.modifiers.offset = function (data) {
3266
- var offset = this._options.offset;
3267
- var popper = data.offsets.popper;
3268
-
3269
- if (data.placement.indexOf('left') !== -1) {
3270
- popper.top -= offset;
3271
- } else if (data.placement.indexOf('right') !== -1) {
3272
- popper.top += offset;
3273
- } else if (data.placement.indexOf('top') !== -1) {
3274
- popper.left -= offset;
3275
- } else if (data.placement.indexOf('bottom') !== -1) {
3276
- popper.left += offset;
3277
- }
3278
- return data;
3279
- };
3280
-
3281
- /**
3282
- * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
3283
- * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
3284
- * @method
3285
- * @memberof Popper.modifiers
3286
- * @argument {Object} data - The data object generated by _update method
3287
- * @returns {Object} The data object, properly modified
3288
- */
3289
- Popper.prototype.modifiers.arrow = function (data) {
3290
- var arrow = this._options.arrowElement;
3291
- var arrowOffset = this._options.arrowOffset;
3292
-
3293
- // if the arrowElement is a string, suppose it's a CSS selector
3294
- if (typeof arrow === 'string') {
3295
- arrow = this._popper.querySelector(arrow);
3296
- }
3297
-
3298
- // if arrow element is not found, don't run the modifier
3299
- if (!arrow) {
3300
- return data;
3301
- }
3302
-
3303
- // the arrow element must be child of its popper
3304
- if (!this._popper.contains(arrow)) {
3305
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
3306
- return data;
3307
- }
3308
-
3309
- // arrow depends on keepTogether in order to work
3310
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
3311
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
3312
- return data;
3313
- }
3314
-
3315
- var arrowStyle = {};
3316
- var placement = data.placement.split('-')[0];
3317
- var popper = getPopperClientRect(data.offsets.popper);
3318
- var reference = data.offsets.reference;
3319
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
3320
-
3321
- var len = isVertical ? 'height' : 'width';
3322
- var side = isVertical ? 'top' : 'left';
3323
- var translate = isVertical ? 'translateY' : 'translateX';
3324
- var altSide = isVertical ? 'left' : 'top';
3325
- var opSide = isVertical ? 'bottom' : 'right';
3326
- var arrowSize = getOuterSizes(arrow)[len];
3327
-
3328
- //
3329
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
3330
- //
3331
-
3332
- // top/left side
3333
- if (reference[opSide] - arrowSize < popper[side]) {
3334
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
3335
- }
3336
- // bottom/right side
3337
- if (reference[side] + arrowSize > popper[opSide]) {
3338
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
3339
- }
3340
-
3341
- // compute center of the popper
3342
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
3343
-
3344
- var sideValue = center - popper[side];
3345
-
3346
- // prevent arrow from being placed not contiguously to its popper
3347
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
3348
- arrowStyle[side] = sideValue;
3349
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
3350
-
3351
- data.offsets.arrow = arrowStyle;
3352
- data.arrowElement = arrow;
3353
-
3354
- return data;
3355
- };
3356
-
3357
- //
3358
- // Helpers
3359
- //
3360
-
3361
- /**
3362
- * Get the outer sizes of the given element (offset size + margins)
3363
- * @function
3364
- * @ignore
3365
- * @argument {Element} element
3366
- * @returns {Object} object containing width and height properties
3367
- */
3368
- function getOuterSizes(element) {
3369
- // NOTE: 1 DOM access here
3370
- var _display = element.style.display,
3371
- _visibility = element.style.visibility;
3372
- element.style.display = 'block';element.style.visibility = 'hidden';
3373
- var calcWidthToForceRepaint = element.offsetWidth;
3374
-
3375
- // original method
3376
- var styles = root.getComputedStyle(element);
3377
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
3378
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
3379
- var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
3380
-
3381
- // reset element styles
3382
- element.style.display = _display;element.style.visibility = _visibility;
3383
- return result;
3384
- }
3385
-
3386
- /**
3387
- * Get the opposite placement of the given one/
3388
- * @function
3389
- * @ignore
3390
- * @argument {String} placement
3391
- * @returns {String} flipped placement
3392
- */
3393
- function getOppositePlacement(placement) {
3394
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
3395
- return placement.replace(/left|right|bottom|top/g, function (matched) {
3396
- return hash[matched];
3397
- });
3398
- }
3399
-
3400
- /**
3401
- * Given the popper offsets, generate an output similar to getBoundingClientRect
3402
- * @function
3403
- * @ignore
3404
- * @argument {Object} popperOffsets
3405
- * @returns {Object} ClientRect like output
3406
- */
3407
- function getPopperClientRect(popperOffsets) {
3408
- var offsets = Object.assign({}, popperOffsets);
3409
- offsets.right = offsets.left + offsets.width;
3410
- offsets.bottom = offsets.top + offsets.height;
3411
- return offsets;
3412
- }
3413
-
3414
- /**
3415
- * Given an array and the key to find, returns its index
3416
- * @function
3417
- * @ignore
3418
- * @argument {Array} arr
3419
- * @argument keyToFind
3420
- * @returns index or null
3421
- */
3422
- function getArrayKeyIndex(arr, keyToFind) {
3423
- var i = 0,
3424
- key;
3425
- for (key in arr) {
3426
- if (arr[key] === keyToFind) {
3427
- return i;
3428
- }
3429
- i++;
3430
- }
3431
- return null;
3432
- }
3433
-
3434
- /**
3435
- * Get CSS computed property of the given element
3436
- * @function
3437
- * @ignore
3438
- * @argument {Eement} element
3439
- * @argument {String} property
3440
- */
3441
- function getStyleComputedProperty(element, property) {
3442
- // NOTE: 1 DOM access here
3443
- var css = root.getComputedStyle(element, null);
3444
- return css[property];
3445
- }
3446
-
3447
- /**
3448
- * Returns the offset parent of the given element
3449
- * @function
3450
- * @ignore
3451
- * @argument {Element} element
3452
- * @returns {Element} offset parent
3453
- */
3454
- function getOffsetParent(element) {
3455
- // NOTE: 1 DOM access here
3456
- var offsetParent = element.offsetParent;
3457
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
3458
- }
3459
-
3460
- /**
3461
- * Returns the scrolling parent of the given element
3462
- * @function
3463
- * @ignore
3464
- * @argument {Element} element
3465
- * @returns {Element} offset parent
3466
- */
3467
- function getScrollParent(element) {
3468
- var parent = element.parentNode;
3469
-
3470
- if (!parent) {
3471
- return element;
3472
- }
3473
-
3474
- if (parent === root.document) {
3475
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
3476
- // greater than 0 and return the proper element
3477
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
3478
- return root.document.body;
3479
- } else {
3480
- return root.document.documentElement;
3481
- }
3482
- }
3483
-
3484
- // Firefox want us to check `-x` and `-y` variations as well
3485
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
3486
- // If the detected scrollParent is body, we perform an additional check on its parentNode
3487
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
3488
- // fixes issue #65
3489
- return parent;
3490
- }
3491
- return getScrollParent(element.parentNode);
3492
- }
3493
-
3494
- /**
3495
- * Check if the given element is fixed or is inside a fixed parent
3496
- * @function
3497
- * @ignore
3498
- * @argument {Element} element
3499
- * @argument {Element} customContainer
3500
- * @returns {Boolean} answer to "isFixed?"
3501
- */
3502
- function isFixed(element) {
3503
- if (element === root.document.body) {
3504
- return false;
3505
- }
3506
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
3507
- return true;
3508
- }
3509
- return element.parentNode ? isFixed(element.parentNode) : element;
3510
- }
3511
-
3512
- /**
3513
- * Set the style to the given popper
3514
- * @function
3515
- * @ignore
3516
- * @argument {Element} element - Element to apply the style to
3517
- * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
3518
- */
3519
- function setStyle(element, styles) {
3520
- function is_numeric(n) {
3521
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
3522
- }
3523
- Object.keys(styles).forEach(function (prop) {
3524
- var unit = '';
3525
- // add unit if the value is numeric and is one of the following
3526
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
3527
- unit = 'px';
3528
- }
3529
- element.style[prop] = styles[prop] + unit;
3530
- });
3531
- }
3532
-
3533
- /**
3534
- * Check if the given variable is a function
3535
- * @function
3536
- * @ignore
3537
- * @argument {*} functionToCheck - variable to check
3538
- * @returns {Boolean} answer to: is a function?
3539
- */
3540
- function isFunction(functionToCheck) {
3541
- var getType = {};
3542
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
3543
- }
3544
-
3545
- /**
3546
- * Get the position of the given element, relative to its offset parent
3547
- * @function
3548
- * @ignore
3549
- * @param {Element} element
3550
- * @return {Object} position - Coordinates of the element and its `scrollTop`
3551
- */
3552
- function getOffsetRect(element) {
3553
- var elementRect = {
3554
- width: element.offsetWidth,
3555
- height: element.offsetHeight,
3556
- left: element.offsetLeft,
3557
- top: element.offsetTop
3558
- };
3559
-
3560
- elementRect.right = elementRect.left + elementRect.width;
3561
- elementRect.bottom = elementRect.top + elementRect.height;
3562
-
3563
- // position
3564
- return elementRect;
3565
- }
3566
-
3567
- /**
3568
- * Get bounding client rect of given element
3569
- * @function
3570
- * @ignore
3571
- * @param {HTMLElement} element
3572
- * @return {Object} client rect
3573
- */
3574
- function getBoundingClientRect(element) {
3575
- var rect = element.getBoundingClientRect();
3576
-
3577
- // whether the IE version is lower than 11
3578
- var isIE = navigator.userAgent.indexOf("MSIE") != -1;
3579
-
3580
- // fix ie document bounding top always 0 bug
3581
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
3582
-
3583
- return {
3584
- left: rect.left,
3585
- top: rectTop,
3586
- right: rect.right,
3587
- bottom: rect.bottom,
3588
- width: rect.right - rect.left,
3589
- height: rect.bottom - rectTop
3590
- };
3591
- }
3592
-
3593
- /**
3594
- * Given an element and one of its parents, return the offset
3595
- * @function
3596
- * @ignore
3597
- * @param {HTMLElement} element
3598
- * @param {HTMLElement} parent
3599
- * @return {Object} rect
3600
- */
3601
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
3602
- var elementRect = getBoundingClientRect(element);
3603
- var parentRect = getBoundingClientRect(parent);
3604
-
3605
- if (fixed) {
3606
- var scrollParent = getScrollParent(parent);
3607
- parentRect.top += scrollParent.scrollTop;
3608
- parentRect.bottom += scrollParent.scrollTop;
3609
- parentRect.left += scrollParent.scrollLeft;
3610
- parentRect.right += scrollParent.scrollLeft;
3611
- }
3612
-
3613
- var rect = {
3614
- top: elementRect.top - parentRect.top,
3615
- left: elementRect.left - parentRect.left,
3616
- bottom: elementRect.top - parentRect.top + elementRect.height,
3617
- right: elementRect.left - parentRect.left + elementRect.width,
3618
- width: elementRect.width,
3619
- height: elementRect.height
3620
- };
3621
- return rect;
3622
- }
3623
-
3624
- /**
3625
- * Get the prefixed supported property name
3626
- * @function
3627
- * @ignore
3628
- * @argument {String} property (camelCase)
3629
- * @returns {String} prefixed property (camelCase)
3630
- */
3631
- function getSupportedPropertyName(property) {
3632
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
3633
-
3634
- for (var i = 0; i < prefixes.length; i++) {
3635
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
3636
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
3637
- return toCheck;
3638
- }
3639
- }
3640
- return null;
3641
- }
3642
-
3643
- /**
3644
- * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
3645
- * objects to a target object. It will return the target object.
3646
- * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
3647
- * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
3648
- * @function
3649
- * @ignore
3650
- */
3651
- if (!Object.assign) {
3652
- Object.defineProperty(Object, 'assign', {
3653
- enumerable: false,
3654
- configurable: true,
3655
- writable: true,
3656
- value: function value(target) {
3657
- if (target === undefined || target === null) {
3658
- throw new TypeError('Cannot convert first argument to object');
3659
- }
3660
-
3661
- var to = Object(target);
3662
- for (var i = 1; i < arguments.length; i++) {
3663
- var nextSource = arguments[i];
3664
- if (nextSource === undefined || nextSource === null) {
3665
- continue;
3666
- }
3667
- nextSource = Object(nextSource);
3668
-
3669
- var keysArray = Object.keys(nextSource);
3670
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
3671
- var nextKey = keysArray[nextIndex];
3672
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
3673
- if (desc !== undefined && desc.enumerable) {
3674
- to[nextKey] = nextSource[nextKey];
3675
- }
3676
- }
3677
- }
3678
- return to;
3679
- }
3680
- });
3681
- }
3682
-
3683
- return Popper;
3684
- });
3685
-
3686
- /***/ }),
3687
- /* 24 */,
3688
- /* 25 */
3689
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3690
-
3691
- "use strict";
3692
- // ESM COMPAT FLAG
3693
- __webpack_require__.r(__webpack_exports__);
3694
-
3695
- // EXTERNAL MODULE: ./src/utils/resize-event.js
3696
- var resize_event = __webpack_require__(14);
3697
-
3698
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
3699
- var scrollbar_width = __webpack_require__(8);
3700
-
3701
- // EXTERNAL MODULE: ./src/utils/util.js
3702
- var util = __webpack_require__(3);
3703
-
3704
- // EXTERNAL MODULE: ./src/utils/dom.js
3705
- var dom = __webpack_require__(1);
3706
-
3707
- // CONCATENATED MODULE: ./packages/scrollbar/src/util.js
3708
- var BAR_MAP = {
3709
- vertical: {
3710
- offset: 'offsetHeight',
3711
- scroll: 'scrollTop',
3712
- scrollSize: 'scrollHeight',
3713
- size: 'height',
3714
- key: 'vertical',
3715
- axis: 'Y',
3716
- client: 'clientY',
3717
- direction: 'top'
3718
- },
3719
- horizontal: {
3720
- offset: 'offsetWidth',
3721
- scroll: 'scrollLeft',
3722
- scrollSize: 'scrollWidth',
3723
- size: 'width',
3724
- key: 'horizontal',
3725
- axis: 'X',
3726
- client: 'clientX',
3727
- direction: 'left'
3728
- }
3729
- };
3730
-
3731
- function renderThumbStyle(_ref) {
3732
- var move = _ref.move,
3733
- size = _ref.size,
3734
- bar = _ref.bar;
3735
-
3736
- var style = {};
3737
- var translate = 'translate' + bar.axis + '(' + move + '%)';
3738
-
3739
- style[bar.size] = size;
3740
- style.transform = translate;
3741
- style.msTransform = translate;
3742
- style.webkitTransform = translate;
3743
-
3744
- return style;
3745
- };
3746
- // CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
3747
-
3748
-
3749
-
3750
- /* istanbul ignore next */
3751
- /* harmony default export */ var src_bar = ({
3752
- name: 'Bar',
3753
-
3754
- props: {
3755
- vertical: Boolean,
3756
- size: String,
3757
- move: Number
3758
- },
3759
-
3760
- computed: {
3761
- bar: function bar() {
3762
- return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
3763
- },
3764
- wrap: function wrap() {
3765
- return this.$parent.wrap;
3766
- }
3767
- },
3768
-
3769
- render: function render(h) {
3770
- var size = this.size,
3771
- move = this.move,
3772
- bar = this.bar;
3773
-
3774
-
3775
- return h(
3776
- 'div',
3777
- {
3778
- 'class': ['el-scrollbar__bar', 'is-' + bar.key],
3779
- on: {
3780
- 'mousedown': this.clickTrackHandler
3781
- }
3782
- },
3783
- [h('div', {
3784
- ref: 'thumb',
3785
- 'class': 'el-scrollbar__thumb',
3786
- on: {
3787
- 'mousedown': this.clickThumbHandler
3788
- },
3789
-
3790
- style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
3791
- );
3792
- },
3793
-
3794
-
3795
- methods: {
3796
- clickThumbHandler: function clickThumbHandler(e) {
3797
- // prevent click event of right button
3798
- if (e.ctrlKey || e.button === 2) {
3799
- return;
3800
- }
3801
- this.startDrag(e);
3802
- this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
3803
- },
3804
- clickTrackHandler: function clickTrackHandler(e) {
3805
- var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
3806
- var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
3807
- var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
3808
-
3809
- this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
3810
- },
3811
- startDrag: function startDrag(e) {
3812
- e.stopImmediatePropagation();
3813
- this.cursorDown = true;
3814
-
3815
- Object(dom["g" /* on */])(document, 'mousemove', this.mouseMoveDocumentHandler);
3816
- Object(dom["g" /* on */])(document, 'mouseup', this.mouseUpDocumentHandler);
3817
- document.onselectstart = function () {
3818
- return false;
3819
- };
3820
- },
3821
- mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
3822
- if (this.cursorDown === false) return;
3823
- var prevPage = this[this.bar.axis];
3824
-
3825
- if (!prevPage) return;
3826
-
3827
- var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
3828
- var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
3829
- var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
3830
-
3831
- this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
3832
- },
3833
- mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
3834
- this.cursorDown = false;
3835
- this[this.bar.axis] = 0;
3836
- Object(dom["f" /* off */])(document, 'mousemove', this.mouseMoveDocumentHandler);
3837
- document.onselectstart = null;
3838
- }
3839
- },
3840
-
3841
- destroyed: function destroyed() {
3842
- Object(dom["f" /* off */])(document, 'mouseup', this.mouseUpDocumentHandler);
3843
- }
3844
- });
3845
- // CONCATENATED MODULE: ./packages/scrollbar/src/main.js
3846
- // reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
3847
-
3848
-
3849
-
3850
-
3851
-
3852
-
3853
- /* istanbul ignore next */
3854
- /* harmony default export */ var main = ({
3855
- name: 'ElScrollbar',
3856
-
3857
- components: { Bar: src_bar },
3858
-
3859
- props: {
3860
- native: Boolean,
3861
- wrapStyle: {},
3862
- wrapClass: {},
3863
- viewClass: {},
3864
- viewStyle: {},
3865
- noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
3866
- tag: {
3867
- type: String,
3868
- default: 'div'
3869
- }
3870
- },
3871
-
3872
- data: function data() {
3873
- return {
3874
- sizeWidth: '0',
3875
- sizeHeight: '0',
3876
- moveX: 0,
3877
- moveY: 0
3878
- };
3879
- },
3880
-
3881
-
3882
- computed: {
3883
- wrap: function wrap() {
3884
- return this.$refs.wrap;
3885
- }
3886
- },
3887
-
3888
- render: function render(h) {
3889
- var gutter = Object(scrollbar_width["a" /* default */])();
3890
- var style = this.wrapStyle;
3891
-
3892
- if (gutter) {
3893
- var gutterWith = '-' + gutter + 'px';
3894
- var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
3895
-
3896
- if (Array.isArray(this.wrapStyle)) {
3897
- style = Object(util["t" /* toObject */])(this.wrapStyle);
3898
- style.marginRight = style.marginBottom = gutterWith;
3899
- } else if (typeof this.wrapStyle === 'string') {
3900
- style += gutterStyle;
3901
- } else {
3902
- style = gutterStyle;
3903
- }
3904
- }
3905
- var view = h(this.tag, {
3906
- class: ['el-scrollbar__view', this.viewClass],
3907
- style: this.viewStyle,
3908
- ref: 'resize'
3909
- }, this.$slots.default);
3910
- var wrap = h(
3911
- 'div',
3912
- {
3913
- ref: 'wrap',
3914
- style: style,
3915
- on: {
3916
- 'scroll': this.handleScroll
3917
- },
3918
-
3919
- 'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
3920
- [[view]]
3921
- );
3922
- var nodes = void 0;
3923
-
3924
- if (!this.native) {
3925
- nodes = [wrap, h(src_bar, {
3926
- attrs: {
3927
- move: this.moveX,
3928
- size: this.sizeWidth }
3929
- }), h(src_bar, {
3930
- attrs: {
3931
- vertical: true,
3932
- move: this.moveY,
3933
- size: this.sizeHeight }
3934
- })];
3935
- } else {
3936
- nodes = [h(
3937
- 'div',
3938
- {
3939
- ref: 'wrap',
3940
- 'class': [this.wrapClass, 'el-scrollbar__wrap'],
3941
- style: style },
3942
- [[view]]
3943
- )];
3944
- }
3945
- return h('div', { class: 'el-scrollbar' }, nodes);
3946
- },
3947
-
3948
-
3949
- methods: {
3950
- handleScroll: function handleScroll() {
3951
- var wrap = this.wrap;
3952
-
3953
- this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
3954
- this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
3955
- },
3956
- update: function update() {
3957
- var heightPercentage = void 0,
3958
- widthPercentage = void 0;
3959
- var wrap = this.wrap;
3960
- if (!wrap) return;
3961
-
3962
- heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
3963
- widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
3964
-
3965
- this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
3966
- this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
3967
- }
3968
- },
3969
-
3970
- mounted: function mounted() {
3971
- if (this.native) return;
3972
- this.$nextTick(this.update);
3973
- !this.noresize && Object(resize_event["a" /* addResizeListener */])(this.$refs.resize, this.update);
3974
- },
3975
- beforeDestroy: function beforeDestroy() {
3976
- if (this.native) return;
3977
- !this.noresize && Object(resize_event["b" /* removeResizeListener */])(this.$refs.resize, this.update);
3978
- }
3979
- });
3980
- // CONCATENATED MODULE: ./packages/scrollbar/index.js
3981
-
3982
-
3983
- /* istanbul ignore next */
3984
- main.install = function (Vue) {
3985
- Vue.component(main.name, main);
3986
- };
3987
-
3988
- /* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
3989
-
3990
- /***/ }),
3991
- /* 26 */,
3992
- /* 27 */,
3993
- /* 28 */,
3994
- /* 29 */,
3995
- /* 30 */
3996
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3997
-
3998
- "use strict";
3999
- /* harmony default export */ __webpack_exports__["a"] = (function (ref) {
4000
- return {
4001
- methods: {
4002
- focus: function focus() {
4003
- this.$refs[ref].focus();
4004
- }
4005
- }
4006
- };
4007
- });;
4008
-
4009
- /***/ }),
4010
- /* 31 */,
4011
- /* 32 */,
4012
- /* 33 */,
4013
- /* 34 */,
4014
- /* 35 */,
4015
- /* 36 */,
4016
- /* 37 */,
4017
- /* 38 */,
4018
- /* 39 */,
4019
- /* 40 */,
4020
- /* 41 */,
4021
- /* 42 */,
4022
- /* 43 */,
4023
- /* 44 */,
4024
- /* 45 */,
4025
- /* 46 */,
4026
- /* 47 */,
4027
- /* 48 */,
4028
- /* 49 */,
4029
- /* 50 */,
4030
- /* 51 */,
4031
- /* 52 */,
4032
- /* 53 */,
4033
- /* 54 */,
4034
- /* 55 */,
4035
- /* 56 */,
4036
- /* 57 */,
4037
- /* 58 */,
4038
- /* 59 */,
4039
- /* 60 */,
4040
- /* 61 */,
4041
- /* 62 */,
4042
- /* 63 */,
4043
- /* 64 */,
4044
- /* 65 */,
4045
- /* 66 */,
4046
- /* 67 */,
4047
- /* 68 */
4048
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4049
-
4050
- "use strict";
4051
- // ESM COMPAT FLAG
4052
- __webpack_require__.r(__webpack_exports__);
4053
-
4054
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete.vue?vue&type=template&id=5d885a3c
4055
- var render = function render() {
4056
- var _vm = this,
4057
- _c = _vm._self._c
4058
- return _c(
4059
- "div",
4060
- {
4061
- directives: [
4062
- {
4063
- name: "clickoutside",
4064
- rawName: "v-clickoutside",
4065
- value: _vm.close,
4066
- expression: "close",
4067
- },
4068
- ],
4069
- staticClass: "el-autocomplete",
4070
- attrs: {
4071
- "aria-haspopup": "listbox",
4072
- role: "combobox",
4073
- "aria-expanded": _vm.suggestionVisible,
4074
- "aria-owns": _vm.id,
4075
- },
4076
- },
4077
- [
4078
- _c(
4079
- "el-input",
4080
- _vm._b(
4081
- {
4082
- ref: "input",
4083
- on: {
4084
- input: _vm.handleInput,
4085
- change: _vm.handleChange,
4086
- focus: _vm.handleFocus,
4087
- blur: _vm.handleBlur,
4088
- clear: _vm.handleClear,
4089
- },
4090
- nativeOn: {
4091
- keydown: [
4092
- function ($event) {
4093
- if (
4094
- !$event.type.indexOf("key") &&
4095
- _vm._k($event.keyCode, "up", 38, $event.key, [
4096
- "Up",
4097
- "ArrowUp",
4098
- ])
4099
- )
4100
- return null
4101
- $event.preventDefault()
4102
- return _vm.highlight(_vm.highlightedIndex - 1)
4103
- },
4104
- function ($event) {
4105
- if (
4106
- !$event.type.indexOf("key") &&
4107
- _vm._k($event.keyCode, "down", 40, $event.key, [
4108
- "Down",
4109
- "ArrowDown",
4110
- ])
4111
- )
4112
- return null
4113
- $event.preventDefault()
4114
- return _vm.highlight(_vm.highlightedIndex + 1)
4115
- },
4116
- function ($event) {
4117
- if (
4118
- !$event.type.indexOf("key") &&
4119
- _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
4120
- )
4121
- return null
4122
- return _vm.handleKeyEnter.apply(null, arguments)
4123
- },
4124
- function ($event) {
4125
- if (
4126
- !$event.type.indexOf("key") &&
4127
- _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")
4128
- )
4129
- return null
4130
- return _vm.close.apply(null, arguments)
4131
- },
4132
- ],
4133
- },
4134
- },
4135
- "el-input",
4136
- [_vm.$props, _vm.$attrs],
4137
- false
4138
- ),
4139
- [
4140
- _vm.$slots.prepend
4141
- ? _c("template", { slot: "prepend" }, [_vm._t("prepend")], 2)
4142
- : _vm._e(),
4143
- _vm.$slots.append
4144
- ? _c("template", { slot: "append" }, [_vm._t("append")], 2)
4145
- : _vm._e(),
4146
- _vm.$slots.prefix
4147
- ? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
4148
- : _vm._e(),
4149
- _vm.$slots.suffix
4150
- ? _c("template", { slot: "suffix" }, [_vm._t("suffix")], 2)
4151
- : _vm._e(),
4152
- ],
4153
- 2
4154
- ),
4155
- _c(
4156
- "el-autocomplete-suggestions",
4157
- {
4158
- ref: "suggestions",
4159
- class: [_vm.popperClass ? _vm.popperClass : ""],
4160
- attrs: {
4161
- "visible-arrow": "",
4162
- "popper-options": _vm.popperOptions,
4163
- "append-to-body": _vm.popperAppendToBody,
4164
- placement: _vm.placement,
4165
- id: _vm.id,
4166
- },
4167
- },
4168
- _vm._l(_vm.suggestions, function (item, index) {
4169
- return _c(
4170
- "li",
4171
- {
4172
- key: index,
4173
- class: { highlighted: _vm.highlightedIndex === index },
4174
- attrs: {
4175
- id: `${_vm.id}-item-${index}`,
4176
- role: "option",
4177
- "aria-selected": _vm.highlightedIndex === index,
4178
- },
4179
- on: {
4180
- click: function ($event) {
4181
- return _vm.select(item)
4182
- },
4183
- },
4184
- },
4185
- [
4186
- _vm._t(
4187
- "default",
4188
- function () {
4189
- return [
4190
- _vm._v(
4191
- "\n\t\t\t\t" + _vm._s(item[_vm.valueKey]) + "\n\t\t\t"
4192
- ),
4193
- ]
4194
- },
4195
- { item: item }
4196
- ),
4197
- ],
4198
- 2
4199
- )
4200
- }),
4201
- 0
4202
- ),
4203
- ],
4204
- 1
4205
- )
4206
- }
4207
- var staticRenderFns = []
4208
- render._withStripped = true
4209
-
4210
-
4211
- // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue?vue&type=template&id=5d885a3c
4212
-
4213
- // EXTERNAL MODULE: external "throttle-debounce/debounce"
4214
- var debounce_ = __webpack_require__(22);
4215
- var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
4216
-
4217
- // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
4218
- var input = __webpack_require__(18);
4219
-
4220
- // EXTERNAL MODULE: ./src/utils/clickoutside.js
4221
- var clickoutside = __webpack_require__(21);
4222
-
4223
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=223a5110
4224
- var autocomplete_suggestionsvue_type_template_id_223a5110_render = function render() {
4225
- var _vm = this,
4226
- _c = _vm._self._c
4227
- return _c(
4228
- "transition",
4229
- { attrs: { name: "el-zoom-in-top" }, on: { "after-leave": _vm.doDestroy } },
4230
- [
4231
- _c(
4232
- "div",
4233
- {
4234
- directives: [
4235
- {
4236
- name: "show",
4237
- rawName: "v-show",
4238
- value: _vm.showPopper,
4239
- expression: "showPopper",
4240
- },
4241
- ],
4242
- staticClass: "el-autocomplete-suggestion el-popper",
4243
- class: {
4244
- "is-loading": !_vm.parent.hideLoading && _vm.parent.loading,
4245
- },
4246
- style: { width: _vm.dropdownWidth },
4247
- attrs: { role: "region" },
4248
- },
4249
- [
4250
- _c(
4251
- "el-scrollbar",
4252
- {
4253
- attrs: {
4254
- tag: "ul",
4255
- "wrap-class": "el-autocomplete-suggestion__wrap",
4256
- "view-class": "el-autocomplete-suggestion__list",
4257
- },
4258
- },
4259
- [
4260
- !_vm.parent.hideLoading && _vm.parent.loading
4261
- ? _c("li", [_c("i", { staticClass: "el-icon-loading" })])
4262
- : _vm._t("default"),
4263
- ],
4264
- 2
4265
- ),
4266
- ],
4267
- 1
4268
- ),
4269
- ]
4270
- )
4271
- }
4272
- var autocomplete_suggestionsvue_type_template_id_223a5110_staticRenderFns = []
4273
- autocomplete_suggestionsvue_type_template_id_223a5110_render._withStripped = true
4274
-
4275
-
4276
- // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=223a5110
4277
-
4278
- // EXTERNAL MODULE: ./src/utils/vue-popper.js
4279
- var vue_popper = __webpack_require__(10);
4280
-
4281
- // EXTERNAL MODULE: ./src/mixins/emitter.js
4282
- var emitter = __webpack_require__(6);
4283
-
4284
- // EXTERNAL MODULE: ./packages/scrollbar/index.js + 3 modules
4285
- var scrollbar = __webpack_require__(25);
4286
-
4287
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=script&lang=js
4288
-
4289
-
4290
-
4291
-
4292
-
4293
- /* harmony default export */ var autocomplete_suggestionsvue_type_script_lang_js = ({
4294
- components: { ElScrollbar: scrollbar["default"] },
4295
- mixins: [vue_popper["a" /* default */], emitter["a" /* default */]],
4296
-
4297
- componentName: 'ElAutocompleteSuggestions',
4298
-
4299
- data: function data() {
4300
- return {
4301
- parent: this.$parent,
4302
- dropdownWidth: ''
4303
- };
4304
- },
4305
-
4306
-
4307
- props: {
4308
- options: {
4309
- default: function _default() {
4310
- return {
4311
- gpuAcceleration: false
4312
- };
4313
- }
4314
- },
4315
- id: String
4316
- },
4317
-
4318
- methods: {
4319
- select: function select(item) {
4320
- this.dispatch('ElAutocomplete', 'item-click', item);
4321
- }
4322
- },
4323
-
4324
- updated: function updated() {
4325
- var _this = this;
4326
-
4327
- this.$nextTick(function (_) {
4328
- _this.popperJS && _this.updatePopper();
4329
- });
4330
- },
4331
- mounted: function mounted() {
4332
- this.$parent.popperElm = this.popperElm = this.$el;
4333
- this.referenceElm = this.$parent.$refs.input.$refs.input || this.$parent.$refs.input.$refs.textarea;
4334
- this.referenceList = this.$el.querySelector('.el-autocomplete-suggestion__list');
4335
- this.referenceList.setAttribute('role', 'listbox');
4336
- this.referenceList.setAttribute('id', this.id);
4337
- },
4338
- created: function created() {
4339
- var _this2 = this;
4340
-
4341
- this.$on('visible', function (val, inputWidth) {
4342
- _this2.dropdownWidth = inputWidth + 'px';
4343
- _this2.showPopper = val;
4344
- });
4345
- }
4346
- });
4347
- // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=script&lang=js
4348
- /* harmony default export */ var src_autocomplete_suggestionsvue_type_script_lang_js = (autocomplete_suggestionsvue_type_script_lang_js);
4349
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
4350
- var componentNormalizer = __webpack_require__(2);
4351
-
4352
- // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue
4353
-
4354
-
4355
-
4356
-
4357
-
4358
- /* normalize component */
4359
-
4360
- var component = Object(componentNormalizer["a" /* default */])(
4361
- src_autocomplete_suggestionsvue_type_script_lang_js,
4362
- autocomplete_suggestionsvue_type_template_id_223a5110_render,
4363
- autocomplete_suggestionsvue_type_template_id_223a5110_staticRenderFns,
4364
- false,
4365
- null,
4366
- null,
4367
- null
4368
-
4369
- )
4370
-
4371
- /* harmony default export */ var autocomplete_suggestions = (component.exports);
4372
- // EXTERNAL MODULE: ./src/mixins/migrating.js
4373
- var migrating = __webpack_require__(12);
4374
-
4375
- // EXTERNAL MODULE: ./src/utils/util.js
4376
- var util = __webpack_require__(3);
4377
-
4378
- // EXTERNAL MODULE: ./src/mixins/focus.js
4379
- var mixins_focus = __webpack_require__(30);
4380
-
4381
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete.vue?vue&type=script&lang=js
4382
-
4383
-
4384
-
4385
-
4386
-
4387
-
4388
-
4389
-
4390
-
4391
-
4392
- /* harmony default export */ var autocompletevue_type_script_lang_js = ({
4393
- name: 'ElAutocomplete',
4394
-
4395
- mixins: [emitter["a" /* default */], Object(mixins_focus["a" /* default */])('input'), migrating["a" /* default */]],
4396
-
4397
- inheritAttrs: false,
4398
-
4399
- componentName: 'ElAutocomplete',
4400
-
4401
- components: {
4402
- ElInput: input["default"],
4403
- ElAutocompleteSuggestions: autocomplete_suggestions
4404
- },
4405
-
4406
- directives: { Clickoutside: clickoutside["a" /* default */] },
4407
-
4408
- props: {
4409
- valueKey: {
4410
- type: String,
4411
- default: 'value'
4412
- },
4413
- popperClass: String,
4414
- popperOptions: Object,
4415
- placeholder: String,
4416
- clearable: {
4417
- type: Boolean,
4418
- default: false
4419
- },
4420
- disabled: Boolean,
4421
- name: String,
4422
- size: String,
4423
- value: String,
4424
- maxlength: Number,
4425
- minlength: Number,
4426
- autofocus: Boolean,
4427
- fetchSuggestions: Function,
4428
- triggerOnFocus: {
4429
- type: Boolean,
4430
- default: true
4431
- },
4432
- customItem: String,
4433
- selectWhenUnmatched: {
4434
- type: Boolean,
4435
- default: false
4436
- },
4437
- prefixIcon: String,
4438
- suffixIcon: String,
4439
- label: String,
4440
- debounce: {
4441
- type: Number,
4442
- default: 300
4443
- },
4444
- placement: {
4445
- type: String,
4446
- default: 'bottom-start'
4447
- },
4448
- hideLoading: Boolean,
4449
- popperAppendToBody: {
4450
- type: Boolean,
4451
- default: true
4452
- },
4453
- highlightFirstItem: {
4454
- type: Boolean,
4455
- default: false
4456
- }
4457
- },
4458
- data: function data() {
4459
- return {
4460
- activated: false,
4461
- suggestions: [],
4462
- loading: false,
4463
- highlightedIndex: -1,
4464
- suggestionDisabled: false
4465
- };
4466
- },
4467
-
4468
- computed: {
4469
- suggestionVisible: function suggestionVisible() {
4470
- var suggestions = this.suggestions;
4471
- var isValidData = Array.isArray(suggestions) && suggestions.length > 0;
4472
- return (isValidData || this.loading) && this.activated;
4473
- },
4474
- id: function id() {
4475
- return 'el-autocomplete-' + Object(util["g" /* generateId */])();
4476
- }
4477
- },
4478
- watch: {
4479
- suggestionVisible: function suggestionVisible(val) {
4480
- var $input = this.getInput();
4481
- if ($input) {
4482
- this.broadcast('ElAutocompleteSuggestions', 'visible', [val, $input.offsetWidth]);
4483
- }
4484
- }
4485
- },
4486
- methods: {
4487
- getMigratingConfig: function getMigratingConfig() {
4488
- return {
4489
- props: {
4490
- 'custom-item': 'custom-item is removed, use scoped slot instead.',
4491
- 'props': 'props is removed, use value-key instead.'
4492
- }
4493
- };
4494
- },
4495
- getData: function getData(queryString) {
4496
- var _this = this;
4497
-
4498
- if (this.suggestionDisabled) {
4499
- return;
4500
- }
4501
- this.loading = true;
4502
- this.fetchSuggestions(queryString, function (suggestions) {
4503
- _this.loading = false;
4504
- if (_this.suggestionDisabled) {
4505
- return;
4506
- }
4507
- if (Array.isArray(suggestions)) {
4508
- _this.suggestions = suggestions;
4509
- _this.highlightedIndex = _this.highlightFirstItem ? 0 : -1;
4510
- } else {
4511
- console.error('[Element Error][Autocomplete]autocomplete suggestions must be an array');
4512
- }
4513
- });
4514
- },
4515
- handleInput: function handleInput(value) {
4516
- this.$emit('input', value);
4517
- this.suggestionDisabled = false;
4518
- if (!this.triggerOnFocus && !value) {
4519
- this.suggestionDisabled = true;
4520
- this.suggestions = [];
4521
- return;
4522
- }
4523
- this.debouncedGetData(value);
4524
- },
4525
- handleChange: function handleChange(value) {
4526
- this.$emit('change', value);
4527
- },
4528
- handleFocus: function handleFocus(event) {
4529
- this.activated = true;
4530
- this.$emit('focus', event);
4531
- if (this.triggerOnFocus) {
4532
- this.debouncedGetData(this.value);
4533
- }
4534
- },
4535
- handleBlur: function handleBlur(event) {
4536
- this.$emit('blur', event);
4537
- },
4538
- handleClear: function handleClear() {
4539
- this.activated = false;
4540
- this.$emit('clear');
4541
- },
4542
- close: function close(e) {
4543
- this.activated = false;
4544
- },
4545
- handleKeyEnter: function handleKeyEnter(e) {
4546
- var _this2 = this;
4547
-
4548
- if (this.suggestionVisible && this.highlightedIndex >= 0 && this.highlightedIndex < this.suggestions.length) {
4549
- e.preventDefault();
4550
- this.select(this.suggestions[this.highlightedIndex]);
4551
- } else if (this.selectWhenUnmatched) {
4552
- this.$emit('select', { value: this.value });
4553
- this.$nextTick(function (_) {
4554
- _this2.suggestions = [];
4555
- _this2.highlightedIndex = -1;
4556
- });
4557
- }
4558
- },
4559
- select: function select(item) {
4560
- var _this3 = this;
4561
-
4562
- this.$emit('input', item[this.valueKey]);
4563
- this.$emit('select', item);
4564
- this.$nextTick(function (_) {
4565
- _this3.suggestions = [];
4566
- _this3.highlightedIndex = -1;
4567
- });
4568
- },
4569
- highlight: function highlight(index) {
4570
- if (!this.suggestionVisible || this.loading) {
4571
- return;
4572
- }
4573
- if (index < 0) {
4574
- this.highlightedIndex = -1;
4575
- return;
4576
- }
4577
- if (index >= this.suggestions.length) {
4578
- index = this.suggestions.length - 1;
4579
- }
4580
- var suggestion = this.$refs.suggestions.$el.querySelector('.el-autocomplete-suggestion__wrap');
4581
- var suggestionList = suggestion.querySelectorAll('.el-autocomplete-suggestion__list li');
4582
-
4583
- var highlightItem = suggestionList[index];
4584
- var scrollTop = suggestion.scrollTop;
4585
- var offsetTop = highlightItem.offsetTop;
4586
-
4587
- if (offsetTop + highlightItem.scrollHeight > scrollTop + suggestion.clientHeight) {
4588
- suggestion.scrollTop += highlightItem.scrollHeight;
4589
- }
4590
- if (offsetTop < scrollTop) {
4591
- suggestion.scrollTop -= highlightItem.scrollHeight;
4592
- }
4593
- this.highlightedIndex = index;
4594
- var $input = this.getInput();
4595
- $input.setAttribute('aria-activedescendant', this.id + '-item-' + this.highlightedIndex);
4596
- },
4597
- getInput: function getInput() {
4598
- return this.$refs.input.getInput();
4599
- }
4600
- },
4601
- mounted: function mounted() {
4602
- var _this4 = this;
4603
-
4604
- this.debouncedGetData = debounce_default()(this.debounce, this.getData);
4605
- this.$on('item-click', function (item) {
4606
- _this4.select(item);
4607
- });
4608
- var $input = this.getInput();
4609
- $input.setAttribute('role', 'textbox');
4610
- $input.setAttribute('aria-autocomplete', 'list');
4611
- $input.setAttribute('aria-controls', 'id');
4612
- $input.setAttribute('aria-activedescendant', this.id + '-item-' + this.highlightedIndex);
4613
- },
4614
- beforeDestroy: function beforeDestroy() {
4615
- this.$refs.suggestions.$destroy();
4616
- }
4617
- });
4618
- // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue?vue&type=script&lang=js
4619
- /* harmony default export */ var src_autocompletevue_type_script_lang_js = (autocompletevue_type_script_lang_js);
4620
- // CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue
4621
-
4622
-
4623
-
4624
-
4625
-
4626
- /* normalize component */
4627
-
4628
- var autocomplete_component = Object(componentNormalizer["a" /* default */])(
4629
- src_autocompletevue_type_script_lang_js,
4630
- render,
4631
- staticRenderFns,
4632
- false,
4633
- null,
4634
- null,
4635
- null
4636
-
4637
- )
4638
-
4639
- /* harmony default export */ var autocomplete = (autocomplete_component.exports);
4640
- // CONCATENATED MODULE: ./packages/autocomplete/index.js
4641
-
4642
-
4643
- /* istanbul ignore next */
4644
- autocomplete.install = function (Vue) {
4645
- Vue.component(autocomplete.name, autocomplete);
4646
- };
4647
-
4648
- /* harmony default export */ var packages_autocomplete = __webpack_exports__["default"] = (autocomplete);
4649
-
4650
- /***/ })
4651
- /******/ ]);