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
package/lib/submenu.js DELETED
@@ -1,3021 +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 = 128);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("vue");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
-
100
- "use strict";
101
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
- /* unused harmony export setStyle */
109
- /* unused harmony export isScroll */
110
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
113
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
114
- 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; };
115
-
116
- /* istanbul ignore next */
117
-
118
-
119
-
120
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
121
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
122
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
123
- var ieVersion = isServer ? 0 : Number(document.documentMode);
124
-
125
- /* istanbul ignore next */
126
- var trim = function trim(string) {
127
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
128
- };
129
- /* istanbul ignore next */
130
- var camelCase = function camelCase(name) {
131
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
132
- return offset ? letter.toUpperCase() : letter;
133
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
134
- };
135
-
136
- /* istanbul ignore next */
137
- var on = function () {
138
- if (!isServer && document.addEventListener) {
139
- return function (element, event, handler) {
140
- if (element && event && handler) {
141
- element.addEventListener(event, handler, false);
142
- }
143
- };
144
- } else {
145
- return function (element, event, handler) {
146
- if (element && event && handler) {
147
- element.attachEvent('on' + event, handler);
148
- }
149
- };
150
- }
151
- }();
152
-
153
- /* istanbul ignore next */
154
- var off = function () {
155
- if (!isServer && document.removeEventListener) {
156
- return function (element, event, handler) {
157
- if (element && event) {
158
- element.removeEventListener(event, handler, false);
159
- }
160
- };
161
- } else {
162
- return function (element, event, handler) {
163
- if (element && event) {
164
- element.detachEvent('on' + event, handler);
165
- }
166
- };
167
- }
168
- }();
169
-
170
- /* istanbul ignore next */
171
- var once = function once(el, event, fn) {
172
- var listener = function listener() {
173
- if (fn) {
174
- fn.apply(this, arguments);
175
- }
176
- off(el, event, listener);
177
- };
178
- on(el, event, listener);
179
- };
180
-
181
- /* istanbul ignore next */
182
- function hasClass(el, cls) {
183
- if (!el || !cls) return false;
184
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
185
- if (el.classList) {
186
- return el.classList.contains(cls);
187
- } else {
188
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
189
- }
190
- };
191
-
192
- /* istanbul ignore next */
193
- function addClass(el, cls) {
194
- if (!el) return;
195
- var curClass = el.className;
196
- var classes = (cls || '').split(' ');
197
-
198
- for (var i = 0, j = classes.length; i < j; i++) {
199
- var clsName = classes[i];
200
- if (!clsName) continue;
201
-
202
- if (el.classList) {
203
- el.classList.add(clsName);
204
- } else if (!hasClass(el, clsName)) {
205
- curClass += ' ' + clsName;
206
- }
207
- }
208
- if (!el.classList) {
209
- el.setAttribute('class', curClass);
210
- }
211
- };
212
-
213
- /* istanbul ignore next */
214
- function removeClass(el, cls) {
215
- if (!el || !cls) return;
216
- var classes = cls.split(' ');
217
- var curClass = ' ' + el.className + ' ';
218
-
219
- for (var i = 0, j = classes.length; i < j; i++) {
220
- var clsName = classes[i];
221
- if (!clsName) continue;
222
-
223
- if (el.classList) {
224
- el.classList.remove(clsName);
225
- } else if (hasClass(el, clsName)) {
226
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
227
- }
228
- }
229
- if (!el.classList) {
230
- el.setAttribute('class', trim(curClass));
231
- }
232
- };
233
-
234
- /* istanbul ignore next */
235
- var getStyle = ieVersion < 9 ? function (element, styleName) {
236
- if (isServer) return;
237
- if (!element || !styleName) return null;
238
- styleName = camelCase(styleName);
239
- if (styleName === 'float') {
240
- styleName = 'styleFloat';
241
- }
242
- try {
243
- switch (styleName) {
244
- case 'opacity':
245
- try {
246
- return element.filters.item('alpha').opacity / 100;
247
- } catch (e) {
248
- return 1.0;
249
- }
250
- default:
251
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
252
- }
253
- } catch (e) {
254
- return element.style[styleName];
255
- }
256
- } : function (element, styleName) {
257
- if (isServer) return;
258
- if (!element || !styleName) return null;
259
- styleName = camelCase(styleName);
260
- if (styleName === 'float') {
261
- styleName = 'cssFloat';
262
- }
263
- try {
264
- var computed = document.defaultView.getComputedStyle(element, '');
265
- return element.style[styleName] || computed ? computed[styleName] : null;
266
- } catch (e) {
267
- return element.style[styleName];
268
- }
269
- };
270
-
271
- /* istanbul ignore next */
272
- function setStyle(element, styleName, value) {
273
- if (!element || !styleName) return;
274
-
275
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
276
- for (var prop in styleName) {
277
- if (styleName.hasOwnProperty(prop)) {
278
- setStyle(element, prop, styleName[prop]);
279
- }
280
- }
281
- } else {
282
- styleName = camelCase(styleName);
283
- if (styleName === 'opacity' && ieVersion < 9) {
284
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
285
- } else {
286
- element.style[styleName] = value;
287
- }
288
- }
289
- };
290
-
291
- var isScroll = function isScroll(el, vertical) {
292
- if (isServer) return;
293
-
294
- var determinedDirection = vertical !== null && vertical !== undefined;
295
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
296
-
297
- return overflow.match(/(scroll|auto|overlay)/);
298
- };
299
-
300
- var getScrollContainer = function getScrollContainer(el, vertical) {
301
- if (isServer) return;
302
-
303
- var parent = el;
304
- while (parent) {
305
- if ([window, document, document.documentElement].includes(parent)) {
306
- return window;
307
- }
308
- if (isScroll(parent, vertical)) {
309
- return parent;
310
- }
311
- parent = parent.parentNode;
312
- }
313
-
314
- return parent;
315
- };
316
-
317
- var isInContainer = function isInContainer(el, container) {
318
- if (isServer || !el || !container) return false;
319
-
320
- var elRect = el.getBoundingClientRect();
321
- var containerRect = void 0;
322
-
323
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
324
- containerRect = {
325
- top: 0,
326
- right: window.innerWidth,
327
- bottom: window.innerHeight,
328
- left: 0
329
- };
330
- } else {
331
- containerRect = container.getBoundingClientRect();
332
- }
333
-
334
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
- };
336
-
337
- /***/ }),
338
-
339
- /***/ 10:
340
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
-
342
- "use strict";
343
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
344
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
345
- /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
346
-
347
-
348
-
349
- var PopperJS = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer ? function () {} : __webpack_require__(23);
350
- var stop = function stop(e) {
351
- return e.stopPropagation();
352
- };
353
-
354
- /**
355
- * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
356
- * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
357
- * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
358
- * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
359
- * @param {Boolean} [visible=false] Visibility of the popup element.
360
- * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
361
- */
362
- /* harmony default export */ __webpack_exports__["a"] = ({
363
- props: {
364
- transformOrigin: {
365
- type: [Boolean, String],
366
- default: true
367
- },
368
- placement: {
369
- type: String,
370
- default: 'bottom'
371
- },
372
- boundariesPadding: {
373
- type: Number,
374
- default: 5
375
- },
376
- reference: {},
377
- popper: {},
378
- offset: {
379
- default: 0
380
- },
381
- value: Boolean,
382
- visibleArrow: Boolean,
383
- arrowOffset: {
384
- type: Number,
385
- default: 35
386
- },
387
- appendToBody: {
388
- type: Boolean,
389
- default: true
390
- },
391
- popperOptions: {
392
- type: Object,
393
- default: function _default() {
394
- return {
395
- gpuAcceleration: false
396
- };
397
- }
398
- }
399
- },
400
-
401
- data: function data() {
402
- return {
403
- showPopper: false,
404
- currentPlacement: ''
405
- };
406
- },
407
-
408
-
409
- watch: {
410
- value: {
411
- immediate: true,
412
- handler: function handler(val) {
413
- this.showPopper = val;
414
- this.$emit('input', val);
415
- }
416
- },
417
-
418
- showPopper: function showPopper(val) {
419
- if (this.disabled) return;
420
- val ? this.updatePopper() : this.destroyPopper();
421
- this.$emit('input', val);
422
- }
423
- },
424
-
425
- methods: {
426
- createPopper: function createPopper() {
427
- var _this = this;
428
-
429
- if (this.$isServer) return;
430
- this.currentPlacement = this.currentPlacement || this.placement;
431
- if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
432
- return;
433
- }
434
-
435
- var options = this.popperOptions;
436
- var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
437
- var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
438
-
439
- if (!reference && this.$slots.reference && this.$slots.reference[0]) {
440
- reference = this.referenceElm = this.$slots.reference[0].elm;
441
- }
442
-
443
- if (!popper || !reference) return;
444
- if (this.visibleArrow) this.appendArrow(popper);
445
- if (this.appendToBody) document.body.appendChild(this.popperElm);
446
- if (this.popperJS && this.popperJS.destroy) {
447
- this.popperJS.destroy();
448
- }
449
-
450
- options.placement = this.currentPlacement;
451
- options.offset = this.offset;
452
- options.arrowOffset = this.arrowOffset;
453
- this.popperJS = new PopperJS(reference, popper, options);
454
- this.popperJS.onCreate(function (_) {
455
- _this.$emit('created', _this);
456
- _this.resetTransformOrigin();
457
- _this.$nextTick(_this.updatePopper);
458
- });
459
- if (typeof options.onUpdate === 'function') {
460
- this.popperJS.onUpdate(options.onUpdate);
461
- }
462
- this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
463
- this.popperElm.addEventListener('click', stop);
464
- },
465
- updatePopper: function updatePopper() {
466
- var popperJS = this.popperJS;
467
- if (popperJS) {
468
- popperJS.update();
469
- if (popperJS._popper) {
470
- popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
471
- }
472
- } else {
473
- this.createPopper();
474
- }
475
- },
476
- doDestroy: function doDestroy(forceDestroy) {
477
- /* istanbul ignore if */
478
- if (!this.popperJS || this.showPopper && !forceDestroy) return;
479
- this.popperJS.destroy();
480
- this.popperJS = null;
481
- },
482
- destroyPopper: function destroyPopper() {
483
- if (this.popperJS) {
484
- this.resetTransformOrigin();
485
- }
486
- },
487
- resetTransformOrigin: function resetTransformOrigin() {
488
- if (!this.transformOrigin) return;
489
- var placementMap = {
490
- top: 'bottom',
491
- bottom: 'top',
492
- left: 'right',
493
- right: 'left'
494
- };
495
- var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
496
- var origin = placementMap[placement];
497
- this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
498
- },
499
- appendArrow: function appendArrow(element) {
500
- var hash = void 0;
501
- if (this.appended) {
502
- return;
503
- }
504
-
505
- this.appended = true;
506
-
507
- for (var item in element.attributes) {
508
- if (/^_v-/.test(element.attributes[item].name)) {
509
- hash = element.attributes[item].name;
510
- break;
511
- }
512
- }
513
-
514
- var arrow = document.createElement('div');
515
-
516
- if (hash) {
517
- arrow.setAttribute(hash, '');
518
- }
519
- arrow.setAttribute('x-arrow', '');
520
- arrow.className = 'popper__arrow';
521
- element.appendChild(arrow);
522
- }
523
- },
524
-
525
- beforeDestroy: function beforeDestroy() {
526
- this.doDestroy(true);
527
- if (this.popperElm && this.popperElm.parentNode === document.body) {
528
- this.popperElm.removeEventListener('click', stop);
529
- document.body.removeChild(this.popperElm);
530
- }
531
- },
532
-
533
-
534
- // call destroy in keep-alive mode
535
- deactivated: function deactivated() {
536
- this.$options.beforeDestroy[0].call(this);
537
- }
538
- });
539
-
540
- /***/ }),
541
-
542
- /***/ 128:
543
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
544
-
545
- "use strict";
546
- // ESM COMPAT FLAG
547
- __webpack_require__.r(__webpack_exports__);
548
-
549
- // EXTERNAL MODULE: ./src/transitions/collapse-transition.js
550
- var collapse_transition = __webpack_require__(40);
551
-
552
- // EXTERNAL MODULE: ./packages/menu/src/menu-mixin.js
553
- var menu_mixin = __webpack_require__(48);
554
-
555
- // EXTERNAL MODULE: ./src/mixins/emitter.js
556
- var emitter = __webpack_require__(6);
557
-
558
- // EXTERNAL MODULE: ./src/utils/vue-popper.js
559
- var vue_popper = __webpack_require__(10);
560
-
561
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=script&lang=js
562
-
563
-
564
-
565
-
566
-
567
-
568
- var poperMixins = {
569
- props: {
570
- transformOrigin: {
571
- type: [Boolean, String],
572
- default: false
573
- },
574
- offset: vue_popper["a" /* default */].props.offset,
575
- boundariesPadding: vue_popper["a" /* default */].props.boundariesPadding,
576
- popperOptions: vue_popper["a" /* default */].props.popperOptions
577
- },
578
- data: vue_popper["a" /* default */].data,
579
- methods: vue_popper["a" /* default */].methods,
580
- beforeDestroy: vue_popper["a" /* default */].beforeDestroy,
581
- deactivated: vue_popper["a" /* default */].deactivated
582
- };
583
-
584
- /* harmony default export */ var submenuvue_type_script_lang_js = ({
585
- name: 'ElSubmenu',
586
-
587
- componentName: 'ElSubmenu',
588
-
589
- mixins: [menu_mixin["a" /* default */], emitter["a" /* default */], poperMixins],
590
-
591
- components: { ElCollapseTransition: collapse_transition["a" /* default */] },
592
-
593
- props: {
594
- index: {
595
- type: String,
596
- required: true
597
- },
598
- showTimeout: {
599
- type: Number,
600
- default: 300
601
- },
602
- hideTimeout: {
603
- type: Number,
604
- default: 300
605
- },
606
- popperClass: String,
607
- disabled: Boolean,
608
- popperAppendToBody: {
609
- type: Boolean,
610
- default: undefined
611
- }
612
- },
613
-
614
- data: function data() {
615
- return {
616
- popperJS: null,
617
- timeout: null,
618
- items: {},
619
- submenus: {},
620
- mouseInChild: false
621
- };
622
- },
623
-
624
- watch: {
625
- opened: function opened(val) {
626
- var _this = this;
627
-
628
- if (this.isMenuPopup) {
629
- this.$nextTick(function (_) {
630
- _this.updatePopper();
631
- });
632
- }
633
- }
634
- },
635
- computed: {
636
- // popper option
637
- appendToBody: function appendToBody() {
638
- return this.popperAppendToBody === undefined ? this.isFirstLevel : this.popperAppendToBody;
639
- },
640
- menuTransitionName: function menuTransitionName() {
641
- return this.rootMenu.collapse ? 'el-zoom-in-left' : 'el-zoom-in-top';
642
- },
643
- opened: function opened() {
644
- return this.rootMenu.openedMenus.indexOf(this.index) > -1;
645
- },
646
- active: function active() {
647
- var isActive = false;
648
- var submenus = this.submenus;
649
- var items = this.items;
650
-
651
- Object.keys(items).forEach(function (index) {
652
- if (items[index].active) {
653
- isActive = true;
654
- }
655
- });
656
-
657
- Object.keys(submenus).forEach(function (index) {
658
- if (submenus[index].active) {
659
- isActive = true;
660
- }
661
- });
662
-
663
- return isActive;
664
- },
665
- hoverBackground: function hoverBackground() {
666
- return this.rootMenu.hoverBackground;
667
- },
668
- backgroundColor: function backgroundColor() {
669
- return this.rootMenu.backgroundColor || '';
670
- },
671
- activeTextColor: function activeTextColor() {
672
- return this.rootMenu.activeTextColor || '';
673
- },
674
- textColor: function textColor() {
675
- return this.rootMenu.textColor || '';
676
- },
677
- mode: function mode() {
678
- return this.rootMenu.mode;
679
- },
680
- isMenuPopup: function isMenuPopup() {
681
- return this.rootMenu.isMenuPopup;
682
- },
683
- titleStyle: function titleStyle() {
684
- if (this.mode !== 'horizontal') {
685
- return {
686
- color: this.textColor
687
- };
688
- }
689
- return {
690
- borderBottomColor: this.active ? this.rootMenu.activeTextColor ? this.activeTextColor : '' : 'transparent',
691
- color: this.active ? this.activeTextColor : this.textColor
692
- };
693
- },
694
- isFirstLevel: function isFirstLevel() {
695
- var isFirstLevel = true;
696
- var parent = this.$parent;
697
- while (parent && parent !== this.rootMenu) {
698
- if (['ElSubmenu', 'ElMenuItemGroup'].indexOf(parent.$options.componentName) > -1) {
699
- isFirstLevel = false;
700
- break;
701
- } else {
702
- parent = parent.$parent;
703
- }
704
- }
705
- return isFirstLevel;
706
- }
707
- },
708
- methods: {
709
- handleCollapseToggle: function handleCollapseToggle(value) {
710
- if (value) {
711
- this.initPopper();
712
- } else {
713
- this.doDestroy();
714
- }
715
- },
716
- addItem: function addItem(item) {
717
- this.$set(this.items, item.index, item);
718
- },
719
- removeItem: function removeItem(item) {
720
- delete this.items[item.index];
721
- },
722
- addSubmenu: function addSubmenu(item) {
723
- this.$set(this.submenus, item.index, item);
724
- },
725
- removeSubmenu: function removeSubmenu(item) {
726
- delete this.submenus[item.index];
727
- },
728
- handleClick: function handleClick() {
729
- var rootMenu = this.rootMenu,
730
- disabled = this.disabled;
731
-
732
- if (rootMenu.menuTrigger === 'hover' && rootMenu.mode === 'horizontal' || rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
733
- return;
734
- }
735
- this.dispatch('ElMenu', 'submenu-click', this);
736
- },
737
- handleMouseenter: function handleMouseenter(event) {
738
- var _this2 = this;
739
-
740
- var showTimeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.showTimeout;
741
-
742
- if (!('ActiveXObject' in window) && event.type === 'focus' && !event.relatedTarget) {
743
- return;
744
- }
745
- var rootMenu = this.rootMenu,
746
- disabled = this.disabled;
747
-
748
- if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical' || disabled) {
749
- return;
750
- }
751
- this.dispatch('ElSubmenu', 'mouse-enter-child');
752
- clearTimeout(this.timeout);
753
- this.timeout = setTimeout(function () {
754
- _this2.rootMenu.openMenu(_this2.index, _this2.indexPath);
755
- }, showTimeout);
756
-
757
- if (this.appendToBody) {
758
- this.$parent.$el.dispatchEvent(new MouseEvent('mouseenter'));
759
- }
760
- },
761
- handleMouseleave: function handleMouseleave() {
762
- var _this3 = this;
763
-
764
- var deepDispatch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
765
- var rootMenu = this.rootMenu;
766
-
767
- if (rootMenu.menuTrigger === 'click' && rootMenu.mode === 'horizontal' || !rootMenu.collapse && rootMenu.mode === 'vertical') {
768
- return;
769
- }
770
- this.dispatch('ElSubmenu', 'mouse-leave-child');
771
- clearTimeout(this.timeout);
772
- this.timeout = setTimeout(function () {
773
- !_this3.mouseInChild && _this3.rootMenu.closeMenu(_this3.index);
774
- }, this.hideTimeout);
775
-
776
- if (this.appendToBody && deepDispatch) {
777
- if (this.$parent.$options.name === 'ElSubmenu') {
778
- this.$parent.handleMouseleave(true);
779
- }
780
- }
781
- },
782
- handleTitleMouseenter: function handleTitleMouseenter() {
783
- if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
784
- var title = this.$refs['submenu-title'];
785
- title && (title.style.backgroundColor = this.rootMenu.hoverBackground);
786
- },
787
- handleTitleMouseleave: function handleTitleMouseleave() {
788
- if (this.mode === 'horizontal' && !this.rootMenu.backgroundColor) return;
789
- var title = this.$refs['submenu-title'];
790
- title && (title.style.backgroundColor = this.rootMenu.backgroundColor || '');
791
- },
792
- updatePlacement: function updatePlacement() {
793
- this.currentPlacement = this.mode === 'horizontal' && this.isFirstLevel ? 'bottom-start' : 'right-start';
794
- },
795
- initPopper: function initPopper() {
796
- this.referenceElm = this.$el;
797
- this.popperElm = this.$refs.menu;
798
- this.updatePlacement();
799
- }
800
- },
801
- created: function created() {
802
- var _this4 = this;
803
-
804
- this.$on('toggle-collapse', this.handleCollapseToggle);
805
- this.$on('mouse-enter-child', function () {
806
- _this4.mouseInChild = true;
807
- clearTimeout(_this4.timeout);
808
- });
809
- this.$on('mouse-leave-child', function () {
810
- _this4.mouseInChild = false;
811
- clearTimeout(_this4.timeout);
812
- });
813
- },
814
- mounted: function mounted() {
815
- this.parentMenu.addSubmenu(this);
816
- this.rootMenu.addSubmenu(this);
817
- this.initPopper();
818
- },
819
- beforeDestroy: function beforeDestroy() {
820
- this.parentMenu.removeSubmenu(this);
821
- this.rootMenu.removeSubmenu(this);
822
- },
823
- render: function render(h) {
824
- var _this5 = this;
825
-
826
- var active = this.active,
827
- opened = this.opened,
828
- paddingStyle = this.paddingStyle,
829
- titleStyle = this.titleStyle,
830
- backgroundColor = this.backgroundColor,
831
- rootMenu = this.rootMenu,
832
- currentPlacement = this.currentPlacement,
833
- menuTransitionName = this.menuTransitionName,
834
- mode = this.mode,
835
- disabled = this.disabled,
836
- popperClass = this.popperClass,
837
- $slots = this.$slots,
838
- isFirstLevel = this.isFirstLevel;
839
-
840
-
841
- var popupMenu = h(
842
- 'transition',
843
- {
844
- attrs: { name: menuTransitionName }
845
- },
846
- [h(
847
- 'div',
848
- {
849
- ref: 'menu',
850
- directives: [{
851
- name: 'show',
852
- value: opened
853
- }],
854
-
855
- 'class': ['el-menu--' + mode, popperClass],
856
- on: {
857
- 'mouseenter': function mouseenter($event) {
858
- return _this5.handleMouseenter($event, 100);
859
- },
860
- 'mouseleave': function mouseleave() {
861
- return _this5.handleMouseleave(true);
862
- },
863
- 'focus': function focus($event) {
864
- return _this5.handleMouseenter($event, 100);
865
- }
866
- }
867
- },
868
- [h(
869
- 'ul',
870
- {
871
- attrs: {
872
- role: 'menu'
873
- },
874
- 'class': ['el-menu el-menu--popup', 'el-menu--popup-' + currentPlacement],
875
- style: { backgroundColor: rootMenu.backgroundColor || '' } },
876
- [$slots.default]
877
- )]
878
- )]
879
- );
880
-
881
- var inlineMenu = h('el-collapse-transition', [h(
882
- 'ul',
883
- {
884
- attrs: {
885
- role: 'menu'
886
- },
887
- 'class': 'el-menu el-menu--inline',
888
- directives: [{
889
- name: 'show',
890
- value: opened
891
- }],
892
-
893
- style: { backgroundColor: rootMenu.backgroundColor || '' } },
894
- [$slots.default]
895
- )]);
896
-
897
- var submenuTitleIcon = rootMenu.mode === 'horizontal' && isFirstLevel || rootMenu.mode === 'vertical' && !rootMenu.collapse ? 'el-icon-arrow-down' : 'el-icon-arrow-right';
898
-
899
- return h(
900
- 'li',
901
- {
902
- 'class': {
903
- 'el-submenu': true,
904
- 'is-active': active,
905
- 'is-opened': opened,
906
- 'is-disabled': disabled
907
- },
908
- attrs: { role: 'menuitem',
909
- 'aria-haspopup': 'true',
910
- 'aria-expanded': opened
911
- },
912
- on: {
913
- 'mouseenter': this.handleMouseenter,
914
- 'mouseleave': function mouseleave() {
915
- return _this5.handleMouseleave(false);
916
- },
917
- 'focus': this.handleMouseenter
918
- }
919
- },
920
- [h(
921
- 'div',
922
- {
923
- 'class': 'el-submenu__title',
924
- ref: 'submenu-title',
925
- on: {
926
- 'click': this.handleClick,
927
- 'mouseenter': this.handleTitleMouseenter,
928
- 'mouseleave': this.handleTitleMouseleave
929
- },
930
-
931
- style: [paddingStyle, titleStyle, { backgroundColor: backgroundColor }]
932
- },
933
- [$slots.title, h('i', { 'class': ['el-submenu__icon-arrow', submenuTitleIcon] })]
934
- ), this.isMenuPopup ? popupMenu : inlineMenu]
935
- );
936
- }
937
- });
938
- // CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=script&lang=js
939
- /* harmony default export */ var src_submenuvue_type_script_lang_js = (submenuvue_type_script_lang_js);
940
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
941
- var componentNormalizer = __webpack_require__(2);
942
-
943
- // CONCATENATED MODULE: ./packages/menu/src/submenu.vue
944
- var render, staticRenderFns
945
-
946
-
947
-
948
-
949
- /* normalize component */
950
-
951
- var component = Object(componentNormalizer["a" /* default */])(
952
- src_submenuvue_type_script_lang_js,
953
- render,
954
- staticRenderFns,
955
- false,
956
- null,
957
- null,
958
- null
959
-
960
- )
961
-
962
- /* harmony default export */ var submenu = (component.exports);
963
- // CONCATENATED MODULE: ./packages/submenu/index.js
964
-
965
-
966
- /* istanbul ignore next */
967
- submenu.install = function (Vue) {
968
- Vue.component(submenu.name, submenu);
969
- };
970
-
971
- /* harmony default export */ var packages_submenu = __webpack_exports__["default"] = (submenu);
972
-
973
- /***/ }),
974
-
975
- /***/ 2:
976
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
977
-
978
- "use strict";
979
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
980
- /* globals __VUE_SSR_CONTEXT__ */
981
-
982
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
983
- // This module is a runtime utility for cleaner component module output and will
984
- // be included in the final webpack user bundle.
985
-
986
- function normalizeComponent(
987
- scriptExports,
988
- render,
989
- staticRenderFns,
990
- functionalTemplate,
991
- injectStyles,
992
- scopeId,
993
- moduleIdentifier /* server only */,
994
- shadowMode /* vue-cli only */
995
- ) {
996
- // Vue.extend constructor export interop
997
- var options =
998
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
999
-
1000
- // render functions
1001
- if (render) {
1002
- options.render = render
1003
- options.staticRenderFns = staticRenderFns
1004
- options._compiled = true
1005
- }
1006
-
1007
- // functional template
1008
- if (functionalTemplate) {
1009
- options.functional = true
1010
- }
1011
-
1012
- // scopedId
1013
- if (scopeId) {
1014
- options._scopeId = 'data-v-' + scopeId
1015
- }
1016
-
1017
- var hook
1018
- if (moduleIdentifier) {
1019
- // server build
1020
- hook = function (context) {
1021
- // 2.3 injection
1022
- context =
1023
- context || // cached call
1024
- (this.$vnode && this.$vnode.ssrContext) || // stateful
1025
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1026
- // 2.2 with runInNewContext: true
1027
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1028
- context = __VUE_SSR_CONTEXT__
1029
- }
1030
- // inject component styles
1031
- if (injectStyles) {
1032
- injectStyles.call(this, context)
1033
- }
1034
- // register component module identifier for async chunk inferrence
1035
- if (context && context._registeredComponents) {
1036
- context._registeredComponents.add(moduleIdentifier)
1037
- }
1038
- }
1039
- // used by ssr in case component is cached and beforeCreate
1040
- // never gets called
1041
- options._ssrRegister = hook
1042
- } else if (injectStyles) {
1043
- hook = shadowMode
1044
- ? function () {
1045
- injectStyles.call(
1046
- this,
1047
- (options.functional ? this.parent : this).$root.$options.shadowRoot
1048
- )
1049
- }
1050
- : injectStyles
1051
- }
1052
-
1053
- if (hook) {
1054
- if (options.functional) {
1055
- // for template-only hot-reload because in that case the render fn doesn't
1056
- // go through the normalizer
1057
- options._injectStyles = hook
1058
- // register for functional component in vue file
1059
- var originalRender = options.render
1060
- options.render = function renderWithStyleInjection(h, context) {
1061
- hook.call(context)
1062
- return originalRender(h, context)
1063
- }
1064
- } else {
1065
- // inject component registration as beforeCreate hook
1066
- var existing = options.beforeCreate
1067
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1068
- }
1069
- }
1070
-
1071
- return {
1072
- exports: scriptExports,
1073
- options: options
1074
- }
1075
- }
1076
-
1077
-
1078
- /***/ }),
1079
-
1080
- /***/ 23:
1081
- /***/ (function(module, exports, __webpack_require__) {
1082
-
1083
- 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; };
1084
-
1085
- /**
1086
- * @fileOverview Kickass library to create and place poppers near their reference elements.
1087
- * @version {{version}}
1088
- * @license
1089
- * Copyright (c) 2016 Federico Zivolo and contributors
1090
- *
1091
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1092
- * of this software and associated documentation files (the "Software"), to deal
1093
- * in the Software without restriction, including without limitation the rights
1094
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1095
- * copies of the Software, and to permit persons to whom the Software is
1096
- * furnished to do so, subject to the following conditions:
1097
- *
1098
- * The above copyright notice and this permission notice shall be included in all
1099
- * copies or substantial portions of the Software.
1100
- *
1101
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1102
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1103
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1104
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1105
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1106
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1107
- * SOFTWARE.
1108
- */
1109
-
1110
- //
1111
- // Cross module loader
1112
- // Supported: Node, AMD, Browser globals
1113
- //
1114
- ;(function (root, factory) {
1115
- if (true) {
1116
- // AMD. Register as an anonymous module.
1117
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1118
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1119
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1120
- __WEBPACK_AMD_DEFINE_FACTORY__),
1121
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1122
- } else {}
1123
- })(this, function () {
1124
-
1125
- 'use strict';
1126
-
1127
- var root = window;
1128
-
1129
- // default options
1130
- var DEFAULTS = {
1131
- // placement of the popper
1132
- placement: 'bottom',
1133
-
1134
- gpuAcceleration: true,
1135
-
1136
- // shift popper from its origin by the given amount of pixels (can be negative)
1137
- offset: 0,
1138
-
1139
- // the element which will act as boundary of the popper
1140
- boundariesElement: 'viewport',
1141
-
1142
- // amount of pixel used to define a minimum distance between the boundaries and the popper
1143
- boundariesPadding: 5,
1144
-
1145
- // popper will try to prevent overflow following this order,
1146
- // by default, then, it could overflow on the left and on top of the boundariesElement
1147
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
1148
-
1149
- // the behavior used by flip to change the placement of the popper
1150
- flipBehavior: 'flip',
1151
-
1152
- arrowElement: '[x-arrow]',
1153
-
1154
- arrowOffset: 0,
1155
-
1156
- // list of functions used to modify the offsets before they are applied to the popper
1157
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
1158
-
1159
- modifiersIgnored: [],
1160
-
1161
- forceAbsolute: false
1162
- };
1163
-
1164
- /**
1165
- * Create a new Popper.js instance
1166
- * @constructor Popper
1167
- * @param {HTMLElement} reference - The reference element used to position the popper
1168
- * @param {HTMLElement|Object} popper
1169
- * The HTML element used as popper, or a configuration used to generate the popper.
1170
- * @param {String} [popper.tagName='div'] The tag name of the generated popper.
1171
- * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
1172
- * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
1173
- * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
1174
- * @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`.
1175
- * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
1176
- * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
1177
- * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
1178
- * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
1179
- * @param {Object} options
1180
- * @param {String} [options.placement=bottom]
1181
- * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
1182
- * left(-start, -end)`
1183
- *
1184
- * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
1185
- * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
1186
- * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
1187
- * reference element.
1188
- * By default, it will look for a child node of the popper with the `x-arrow` attribute.
1189
- *
1190
- * @param {Boolean} [options.gpuAcceleration=true]
1191
- * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
1192
- * browser to use the GPU to accelerate the rendering.
1193
- * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
1194
- *
1195
- * @param {Number} [options.offset=0]
1196
- * Amount of pixels the popper will be shifted (can be negative).
1197
- *
1198
- * @param {String|Element} [options.boundariesElement='viewport']
1199
- * The element which will define the boundaries of the popper position, the popper will never be placed outside
1200
- * of the defined boundaries (except if `keepTogether` is enabled)
1201
- *
1202
- * @param {Number} [options.boundariesPadding=5]
1203
- * Additional padding for the boundaries
1204
- *
1205
- * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
1206
- * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
1207
- * this means that the last ones will never overflow
1208
- *
1209
- * @param {String|Array} [options.flipBehavior='flip']
1210
- * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
1211
- * overlap its reference element. Defining `flip` as value, the placement will be flipped on
1212
- * its axis (`right - left`, `top - bottom`).
1213
- * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
1214
- * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
1215
- * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
1216
- *
1217
- * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
1218
- * List of functions used to modify the data before they are applied to the popper, add your custom functions
1219
- * to this array to edit the offsets and placement.
1220
- * The function should reflect the @params and @returns of preventOverflow
1221
- *
1222
- * @param {Array} [options.modifiersIgnored=[]]
1223
- * Put here any built-in modifier name you want to exclude from the modifiers list
1224
- * The function should reflect the @params and @returns of preventOverflow
1225
- *
1226
- * @param {Boolean} [options.removeOnDestroy=false]
1227
- * Set to true if you want to automatically remove the popper when you call the `destroy` method.
1228
- */
1229
- function Popper(reference, popper, options) {
1230
- this._reference = reference.jquery ? reference[0] : reference;
1231
- this.state = {};
1232
-
1233
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
1234
- // generate a default popper if is not defined
1235
- var isNotDefined = typeof popper === 'undefined' || popper === null;
1236
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
1237
- if (isNotDefined || isConfig) {
1238
- this._popper = this.parse(isConfig ? popper : {});
1239
- }
1240
- // otherwise, use the given HTMLElement as popper
1241
- else {
1242
- this._popper = popper.jquery ? popper[0] : popper;
1243
- }
1244
-
1245
- // with {} we create a new object with the options inside it
1246
- this._options = Object.assign({}, DEFAULTS, options);
1247
-
1248
- // refactoring modifiers' list
1249
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
1250
- // remove ignored modifiers
1251
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
1252
-
1253
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
1254
- // margins needs to be calculated to get the correct popper offsets
1255
- if (modifier === 'applyStyle') {
1256
- this._popper.setAttribute('x-placement', this._options.placement);
1257
- }
1258
-
1259
- // return predefined modifier identified by string or keep the custom one
1260
- return this.modifiers[modifier] || modifier;
1261
- }.bind(this));
1262
-
1263
- // make sure to apply the popper position before any computation
1264
- this.state.position = this._getPosition(this._popper, this._reference);
1265
- setStyle(this._popper, { position: this.state.position, top: 0 });
1266
-
1267
- // fire the first update to position the popper in the right place
1268
- this.update();
1269
-
1270
- // setup event listeners, they will take care of update the position in specific situations
1271
- this._setupEventListeners();
1272
- return this;
1273
- }
1274
-
1275
- //
1276
- // Methods
1277
- //
1278
- /**
1279
- * Destroy the popper
1280
- * @method
1281
- * @memberof Popper
1282
- */
1283
- Popper.prototype.destroy = function () {
1284
- this._popper.removeAttribute('x-placement');
1285
- this._popper.style.left = '';
1286
- this._popper.style.position = '';
1287
- this._popper.style.top = '';
1288
- this._popper.style[getSupportedPropertyName('transform')] = '';
1289
- this._removeEventListeners();
1290
-
1291
- // remove the popper if user explicity asked for the deletion on destroy
1292
- if (this._options.removeOnDestroy) {
1293
- this._popper.remove();
1294
- }
1295
- return this;
1296
- };
1297
-
1298
- /**
1299
- * Updates the position of the popper, computing the new offsets and applying the new style
1300
- * @method
1301
- * @memberof Popper
1302
- */
1303
- Popper.prototype.update = function () {
1304
- var data = { instance: this, styles: {} };
1305
-
1306
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
1307
- // and refer to _originalPlacement to know the original value
1308
- data.placement = this._options.placement;
1309
- data._originalPlacement = this._options.placement;
1310
-
1311
- // compute the popper and reference offsets and put them inside data.offsets
1312
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
1313
-
1314
- // get boundaries
1315
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
1316
-
1317
- data = this.runModifiers(data, this._options.modifiers);
1318
-
1319
- if (typeof this.state.updateCallback === 'function') {
1320
- this.state.updateCallback(data);
1321
- }
1322
- };
1323
-
1324
- /**
1325
- * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
1326
- * @method
1327
- * @memberof Popper
1328
- * @param {Function} callback
1329
- */
1330
- Popper.prototype.onCreate = function (callback) {
1331
- // the createCallbacks return as first argument the popper instance
1332
- callback(this);
1333
- return this;
1334
- };
1335
-
1336
- /**
1337
- * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
1338
- * used to style popper and its arrow.
1339
- * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
1340
- * @method
1341
- * @memberof Popper
1342
- * @param {Function} callback
1343
- */
1344
- Popper.prototype.onUpdate = function (callback) {
1345
- this.state.updateCallback = callback;
1346
- return this;
1347
- };
1348
-
1349
- /**
1350
- * Helper used to generate poppers from a configuration file
1351
- * @method
1352
- * @memberof Popper
1353
- * @param config {Object} configuration
1354
- * @returns {HTMLElement} popper
1355
- */
1356
- Popper.prototype.parse = function (config) {
1357
- var defaultConfig = {
1358
- tagName: 'div',
1359
- classNames: ['popper'],
1360
- attributes: [],
1361
- parent: root.document.body,
1362
- content: '',
1363
- contentType: 'text',
1364
- arrowTagName: 'div',
1365
- arrowClassNames: ['popper__arrow'],
1366
- arrowAttributes: ['x-arrow']
1367
- };
1368
- config = Object.assign({}, defaultConfig, config);
1369
-
1370
- var d = root.document;
1371
-
1372
- var popper = d.createElement(config.tagName);
1373
- addClassNames(popper, config.classNames);
1374
- addAttributes(popper, config.attributes);
1375
- if (config.contentType === 'node') {
1376
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
1377
- } else if (config.contentType === 'html') {
1378
- popper.innerHTML = config.content;
1379
- } else {
1380
- popper.textContent = config.content;
1381
- }
1382
-
1383
- if (config.arrowTagName) {
1384
- var arrow = d.createElement(config.arrowTagName);
1385
- addClassNames(arrow, config.arrowClassNames);
1386
- addAttributes(arrow, config.arrowAttributes);
1387
- popper.appendChild(arrow);
1388
- }
1389
-
1390
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
1391
-
1392
- // if the given parent is a string, use it to match an element
1393
- // if more than one element is matched, the first one will be used as parent
1394
- // if no elements are matched, the script will throw an error
1395
- if (typeof parent === 'string') {
1396
- parent = d.querySelectorAll(config.parent);
1397
- if (parent.length > 1) {
1398
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
1399
- }
1400
- if (parent.length === 0) {
1401
- throw 'ERROR: the given `parent` doesn\'t exists!';
1402
- }
1403
- parent = parent[0];
1404
- }
1405
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
1406
- // the first one will be used as parent
1407
- if (parent.length > 1 && parent instanceof Element === false) {
1408
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
1409
- parent = parent[0];
1410
- }
1411
-
1412
- // append the generated popper to its parent
1413
- parent.appendChild(popper);
1414
-
1415
- return popper;
1416
-
1417
- /**
1418
- * Adds class names to the given element
1419
- * @function
1420
- * @ignore
1421
- * @param {HTMLElement} target
1422
- * @param {Array} classes
1423
- */
1424
- function addClassNames(element, classNames) {
1425
- classNames.forEach(function (className) {
1426
- element.classList.add(className);
1427
- });
1428
- }
1429
-
1430
- /**
1431
- * Adds attributes to the given element
1432
- * @function
1433
- * @ignore
1434
- * @param {HTMLElement} target
1435
- * @param {Array} attributes
1436
- * @example
1437
- * addAttributes(element, [ 'data-info:foobar' ]);
1438
- */
1439
- function addAttributes(element, attributes) {
1440
- attributes.forEach(function (attribute) {
1441
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
1442
- });
1443
- }
1444
- };
1445
-
1446
- /**
1447
- * Helper used to get the position which will be applied to the popper
1448
- * @method
1449
- * @memberof Popper
1450
- * @param config {HTMLElement} popper element
1451
- * @param reference {HTMLElement} reference element
1452
- * @returns {String} position
1453
- */
1454
- Popper.prototype._getPosition = function (popper, reference) {
1455
- var container = getOffsetParent(reference);
1456
-
1457
- if (this._options.forceAbsolute) {
1458
- return 'absolute';
1459
- }
1460
-
1461
- // Decide if the popper will be fixed
1462
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
1463
- var isParentFixed = isFixed(reference, container);
1464
- return isParentFixed ? 'fixed' : 'absolute';
1465
- };
1466
-
1467
- /**
1468
- * Get offsets to the popper
1469
- * @method
1470
- * @memberof Popper
1471
- * @access private
1472
- * @param {Element} popper - the popper element
1473
- * @param {Element} reference - the reference element (the popper will be relative to this)
1474
- * @returns {Object} An object containing the offsets which will be applied to the popper
1475
- */
1476
- Popper.prototype._getOffsets = function (popper, reference, placement) {
1477
- placement = placement.split('-')[0];
1478
- var popperOffsets = {};
1479
-
1480
- popperOffsets.position = this.state.position;
1481
- var isParentFixed = popperOffsets.position === 'fixed';
1482
-
1483
- //
1484
- // Get reference element position
1485
- //
1486
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
1487
-
1488
- //
1489
- // Get popper sizes
1490
- //
1491
- var popperRect = getOuterSizes(popper);
1492
-
1493
- //
1494
- // Compute offsets of popper
1495
- //
1496
-
1497
- // depending by the popper placement we have to compute its offsets slightly differently
1498
- if (['right', 'left'].indexOf(placement) !== -1) {
1499
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
1500
- if (placement === 'left') {
1501
- popperOffsets.left = referenceOffsets.left - popperRect.width;
1502
- } else {
1503
- popperOffsets.left = referenceOffsets.right;
1504
- }
1505
- } else {
1506
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
1507
- if (placement === 'top') {
1508
- popperOffsets.top = referenceOffsets.top - popperRect.height;
1509
- } else {
1510
- popperOffsets.top = referenceOffsets.bottom;
1511
- }
1512
- }
1513
-
1514
- // Add width and height to our offsets object
1515
- popperOffsets.width = popperRect.width;
1516
- popperOffsets.height = popperRect.height;
1517
-
1518
- return {
1519
- popper: popperOffsets,
1520
- reference: referenceOffsets
1521
- };
1522
- };
1523
-
1524
- /**
1525
- * Setup needed event listeners used to update the popper position
1526
- * @method
1527
- * @memberof Popper
1528
- * @access private
1529
- */
1530
- Popper.prototype._setupEventListeners = function () {
1531
- // NOTE: 1 DOM access here
1532
- this.state.updateBound = this.update.bind(this);
1533
- root.addEventListener('resize', this.state.updateBound);
1534
- // if the boundariesElement is window we don't need to listen for the scroll event
1535
- if (this._options.boundariesElement !== 'window') {
1536
- var target = getScrollParent(this._reference);
1537
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
1538
- if (target === root.document.body || target === root.document.documentElement) {
1539
- target = root;
1540
- }
1541
- target.addEventListener('scroll', this.state.updateBound);
1542
- this.state.scrollTarget = target;
1543
- }
1544
- };
1545
-
1546
- /**
1547
- * Remove event listeners used to update the popper position
1548
- * @method
1549
- * @memberof Popper
1550
- * @access private
1551
- */
1552
- Popper.prototype._removeEventListeners = function () {
1553
- // NOTE: 1 DOM access here
1554
- root.removeEventListener('resize', this.state.updateBound);
1555
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
1556
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
1557
- this.state.scrollTarget = null;
1558
- }
1559
- this.state.updateBound = null;
1560
- };
1561
-
1562
- /**
1563
- * Computed the boundaries limits and return them
1564
- * @method
1565
- * @memberof Popper
1566
- * @access private
1567
- * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
1568
- * @param {Number} padding - Boundaries padding
1569
- * @param {Element} boundariesElement - Element used to define the boundaries
1570
- * @returns {Object} Coordinates of the boundaries
1571
- */
1572
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
1573
- // NOTE: 1 DOM access here
1574
- var boundaries = {};
1575
- var width, height;
1576
- if (boundariesElement === 'window') {
1577
- var body = root.document.body,
1578
- html = root.document.documentElement;
1579
-
1580
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
1581
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
1582
-
1583
- boundaries = {
1584
- top: 0,
1585
- right: width,
1586
- bottom: height,
1587
- left: 0
1588
- };
1589
- } else if (boundariesElement === 'viewport') {
1590
- var offsetParent = getOffsetParent(this._popper);
1591
- var scrollParent = getScrollParent(this._popper);
1592
- var offsetParentRect = getOffsetRect(offsetParent);
1593
-
1594
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
1595
- var getScrollTopValue = function getScrollTopValue(element) {
1596
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
1597
- };
1598
- var getScrollLeftValue = function getScrollLeftValue(element) {
1599
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
1600
- };
1601
-
1602
- // if the popper is fixed we don't have to substract scrolling from the boundaries
1603
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
1604
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
1605
-
1606
- boundaries = {
1607
- top: 0 - (offsetParentRect.top - scrollTop),
1608
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
1609
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
1610
- left: 0 - (offsetParentRect.left - scrollLeft)
1611
- };
1612
- } else {
1613
- if (getOffsetParent(this._popper) === boundariesElement) {
1614
- boundaries = {
1615
- top: 0,
1616
- left: 0,
1617
- right: boundariesElement.clientWidth,
1618
- bottom: boundariesElement.clientHeight
1619
- };
1620
- } else {
1621
- boundaries = getOffsetRect(boundariesElement);
1622
- }
1623
- }
1624
- boundaries.left += padding;
1625
- boundaries.right -= padding;
1626
- boundaries.top = boundaries.top + padding;
1627
- boundaries.bottom = boundaries.bottom - padding;
1628
- return boundaries;
1629
- };
1630
-
1631
- /**
1632
- * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
1633
- * @method
1634
- * @memberof Popper
1635
- * @access public
1636
- * @param {Object} data
1637
- * @param {Array} modifiers
1638
- * @param {Function} ends
1639
- */
1640
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
1641
- var modifiersToRun = modifiers.slice();
1642
- if (ends !== undefined) {
1643
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1644
- }
1645
-
1646
- modifiersToRun.forEach(function (modifier) {
1647
- if (isFunction(modifier)) {
1648
- data = modifier.call(this, data);
1649
- }
1650
- }.bind(this));
1651
-
1652
- return data;
1653
- };
1654
-
1655
- /**
1656
- * Helper used to know if the given modifier depends from another one.
1657
- * @method
1658
- * @memberof Popper
1659
- * @param {String} requesting - name of requesting modifier
1660
- * @param {String} requested - name of requested modifier
1661
- * @returns {Boolean}
1662
- */
1663
- Popper.prototype.isModifierRequired = function (requesting, requested) {
1664
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
1665
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
1666
- return modifier === requested;
1667
- }).length;
1668
- };
1669
-
1670
- //
1671
- // Modifiers
1672
- //
1673
-
1674
- /**
1675
- * Modifiers list
1676
- * @namespace Popper.modifiers
1677
- * @memberof Popper
1678
- * @type {Object}
1679
- */
1680
- Popper.prototype.modifiers = {};
1681
-
1682
- /**
1683
- * Apply the computed styles to the popper element
1684
- * @method
1685
- * @memberof Popper.modifiers
1686
- * @argument {Object} data - The data object generated by `update` method
1687
- * @returns {Object} The same data object
1688
- */
1689
- Popper.prototype.modifiers.applyStyle = function (data) {
1690
- // apply the final offsets to the popper
1691
- // NOTE: 1 DOM access here
1692
- var styles = {
1693
- position: data.offsets.popper.position
1694
- };
1695
-
1696
- // round top and left to avoid blurry text
1697
- var left = Math.round(data.offsets.popper.left);
1698
- var top = Math.round(data.offsets.popper.top);
1699
-
1700
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
1701
- // we automatically use the supported prefixed version if needed
1702
- var prefixedProperty;
1703
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
1704
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
1705
- styles.top = 0;
1706
- styles.left = 0;
1707
- }
1708
- // othwerise, we use the standard `left` and `top` properties
1709
- else {
1710
- styles.left = left;
1711
- styles.top = top;
1712
- }
1713
-
1714
- // any property present in `data.styles` will be applied to the popper,
1715
- // in this way we can make the 3rd party modifiers add custom styles to it
1716
- // Be aware, modifiers could override the properties defined in the previous
1717
- // lines of this modifier!
1718
- Object.assign(styles, data.styles);
1719
-
1720
- setStyle(this._popper, styles);
1721
-
1722
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
1723
- // NOTE: 1 DOM access here
1724
- this._popper.setAttribute('x-placement', data.placement);
1725
-
1726
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
1727
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
1728
- setStyle(data.arrowElement, data.offsets.arrow);
1729
- }
1730
-
1731
- return data;
1732
- };
1733
-
1734
- /**
1735
- * Modifier used to shift the popper on the start or end of its reference element side
1736
- * @method
1737
- * @memberof Popper.modifiers
1738
- * @argument {Object} data - The data object generated by `update` method
1739
- * @returns {Object} The data object, properly modified
1740
- */
1741
- Popper.prototype.modifiers.shift = function (data) {
1742
- var placement = data.placement;
1743
- var basePlacement = placement.split('-')[0];
1744
- var shiftVariation = placement.split('-')[1];
1745
-
1746
- // if shift shiftVariation is specified, run the modifier
1747
- if (shiftVariation) {
1748
- var reference = data.offsets.reference;
1749
- var popper = getPopperClientRect(data.offsets.popper);
1750
-
1751
- var shiftOffsets = {
1752
- y: {
1753
- start: { top: reference.top },
1754
- end: { top: reference.top + reference.height - popper.height }
1755
- },
1756
- x: {
1757
- start: { left: reference.left },
1758
- end: { left: reference.left + reference.width - popper.width }
1759
- }
1760
- };
1761
-
1762
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
1763
-
1764
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
1765
- }
1766
-
1767
- return data;
1768
- };
1769
-
1770
- /**
1771
- * Modifier used to make sure the popper does not overflows from it's boundaries
1772
- * @method
1773
- * @memberof Popper.modifiers
1774
- * @argument {Object} data - The data object generated by `update` method
1775
- * @returns {Object} The data object, properly modified
1776
- */
1777
- Popper.prototype.modifiers.preventOverflow = function (data) {
1778
- var order = this._options.preventOverflowOrder;
1779
- var popper = getPopperClientRect(data.offsets.popper);
1780
-
1781
- var check = {
1782
- left: function left() {
1783
- var left = popper.left;
1784
- if (popper.left < data.boundaries.left) {
1785
- left = Math.max(popper.left, data.boundaries.left);
1786
- }
1787
- return { left: left };
1788
- },
1789
- right: function right() {
1790
- var left = popper.left;
1791
- if (popper.right > data.boundaries.right) {
1792
- left = Math.min(popper.left, data.boundaries.right - popper.width);
1793
- }
1794
- return { left: left };
1795
- },
1796
- top: function top() {
1797
- var top = popper.top;
1798
- if (popper.top < data.boundaries.top) {
1799
- top = Math.max(popper.top, data.boundaries.top);
1800
- }
1801
- return { top: top };
1802
- },
1803
- bottom: function bottom() {
1804
- var top = popper.top;
1805
- if (popper.bottom > data.boundaries.bottom) {
1806
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
1807
- }
1808
- return { top: top };
1809
- }
1810
- };
1811
-
1812
- order.forEach(function (direction) {
1813
- data.offsets.popper = Object.assign(popper, check[direction]());
1814
- });
1815
-
1816
- return data;
1817
- };
1818
-
1819
- /**
1820
- * Modifier used to make sure the popper is always near its reference
1821
- * @method
1822
- * @memberof Popper.modifiers
1823
- * @argument {Object} data - The data object generated by _update method
1824
- * @returns {Object} The data object, properly modified
1825
- */
1826
- Popper.prototype.modifiers.keepTogether = function (data) {
1827
- var popper = getPopperClientRect(data.offsets.popper);
1828
- var reference = data.offsets.reference;
1829
- var f = Math.floor;
1830
-
1831
- if (popper.right < f(reference.left)) {
1832
- data.offsets.popper.left = f(reference.left) - popper.width;
1833
- }
1834
- if (popper.left > f(reference.right)) {
1835
- data.offsets.popper.left = f(reference.right);
1836
- }
1837
- if (popper.bottom < f(reference.top)) {
1838
- data.offsets.popper.top = f(reference.top) - popper.height;
1839
- }
1840
- if (popper.top > f(reference.bottom)) {
1841
- data.offsets.popper.top = f(reference.bottom);
1842
- }
1843
-
1844
- return data;
1845
- };
1846
-
1847
- /**
1848
- * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
1849
- * Requires the `preventOverflow` modifier before it in order to work.
1850
- * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
1851
- * @method
1852
- * @memberof Popper.modifiers
1853
- * @argument {Object} data - The data object generated by _update method
1854
- * @returns {Object} The data object, properly modified
1855
- */
1856
- Popper.prototype.modifiers.flip = function (data) {
1857
- // check if preventOverflow is in the list of modifiers before the flip modifier.
1858
- // otherwise flip would not work as expected.
1859
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
1860
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
1861
- return data;
1862
- }
1863
-
1864
- if (data.flipped && data.placement === data._originalPlacement) {
1865
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
1866
- return data;
1867
- }
1868
-
1869
- var placement = data.placement.split('-')[0];
1870
- var placementOpposite = getOppositePlacement(placement);
1871
- var variation = data.placement.split('-')[1] || '';
1872
-
1873
- var flipOrder = [];
1874
- if (this._options.flipBehavior === 'flip') {
1875
- flipOrder = [placement, placementOpposite];
1876
- } else {
1877
- flipOrder = this._options.flipBehavior;
1878
- }
1879
-
1880
- flipOrder.forEach(function (step, index) {
1881
- if (placement !== step || flipOrder.length === index + 1) {
1882
- return;
1883
- }
1884
-
1885
- placement = data.placement.split('-')[0];
1886
- placementOpposite = getOppositePlacement(placement);
1887
-
1888
- var popperOffsets = getPopperClientRect(data.offsets.popper);
1889
-
1890
- // this boolean is used to distinguish right and bottom from top and left
1891
- // they need different computations to get flipped
1892
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
1893
-
1894
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
1895
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
1896
- // we'll use this boolean to detect any flip loop
1897
- data.flipped = true;
1898
- data.placement = flipOrder[index + 1];
1899
- if (variation) {
1900
- data.placement += '-' + variation;
1901
- }
1902
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
1903
-
1904
- data = this.runModifiers(data, this._options.modifiers, this._flip);
1905
- }
1906
- }.bind(this));
1907
- return data;
1908
- };
1909
-
1910
- /**
1911
- * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
1912
- * The offsets will shift the popper on the side of its reference element.
1913
- * @method
1914
- * @memberof Popper.modifiers
1915
- * @argument {Object} data - The data object generated by _update method
1916
- * @returns {Object} The data object, properly modified
1917
- */
1918
- Popper.prototype.modifiers.offset = function (data) {
1919
- var offset = this._options.offset;
1920
- var popper = data.offsets.popper;
1921
-
1922
- if (data.placement.indexOf('left') !== -1) {
1923
- popper.top -= offset;
1924
- } else if (data.placement.indexOf('right') !== -1) {
1925
- popper.top += offset;
1926
- } else if (data.placement.indexOf('top') !== -1) {
1927
- popper.left -= offset;
1928
- } else if (data.placement.indexOf('bottom') !== -1) {
1929
- popper.left += offset;
1930
- }
1931
- return data;
1932
- };
1933
-
1934
- /**
1935
- * 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
1936
- * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
1937
- * @method
1938
- * @memberof Popper.modifiers
1939
- * @argument {Object} data - The data object generated by _update method
1940
- * @returns {Object} The data object, properly modified
1941
- */
1942
- Popper.prototype.modifiers.arrow = function (data) {
1943
- var arrow = this._options.arrowElement;
1944
- var arrowOffset = this._options.arrowOffset;
1945
-
1946
- // if the arrowElement is a string, suppose it's a CSS selector
1947
- if (typeof arrow === 'string') {
1948
- arrow = this._popper.querySelector(arrow);
1949
- }
1950
-
1951
- // if arrow element is not found, don't run the modifier
1952
- if (!arrow) {
1953
- return data;
1954
- }
1955
-
1956
- // the arrow element must be child of its popper
1957
- if (!this._popper.contains(arrow)) {
1958
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
1959
- return data;
1960
- }
1961
-
1962
- // arrow depends on keepTogether in order to work
1963
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
1964
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
1965
- return data;
1966
- }
1967
-
1968
- var arrowStyle = {};
1969
- var placement = data.placement.split('-')[0];
1970
- var popper = getPopperClientRect(data.offsets.popper);
1971
- var reference = data.offsets.reference;
1972
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
1973
-
1974
- var len = isVertical ? 'height' : 'width';
1975
- var side = isVertical ? 'top' : 'left';
1976
- var translate = isVertical ? 'translateY' : 'translateX';
1977
- var altSide = isVertical ? 'left' : 'top';
1978
- var opSide = isVertical ? 'bottom' : 'right';
1979
- var arrowSize = getOuterSizes(arrow)[len];
1980
-
1981
- //
1982
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
1983
- //
1984
-
1985
- // top/left side
1986
- if (reference[opSide] - arrowSize < popper[side]) {
1987
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
1988
- }
1989
- // bottom/right side
1990
- if (reference[side] + arrowSize > popper[opSide]) {
1991
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
1992
- }
1993
-
1994
- // compute center of the popper
1995
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
1996
-
1997
- var sideValue = center - popper[side];
1998
-
1999
- // prevent arrow from being placed not contiguously to its popper
2000
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
2001
- arrowStyle[side] = sideValue;
2002
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
2003
-
2004
- data.offsets.arrow = arrowStyle;
2005
- data.arrowElement = arrow;
2006
-
2007
- return data;
2008
- };
2009
-
2010
- //
2011
- // Helpers
2012
- //
2013
-
2014
- /**
2015
- * Get the outer sizes of the given element (offset size + margins)
2016
- * @function
2017
- * @ignore
2018
- * @argument {Element} element
2019
- * @returns {Object} object containing width and height properties
2020
- */
2021
- function getOuterSizes(element) {
2022
- // NOTE: 1 DOM access here
2023
- var _display = element.style.display,
2024
- _visibility = element.style.visibility;
2025
- element.style.display = 'block';element.style.visibility = 'hidden';
2026
- var calcWidthToForceRepaint = element.offsetWidth;
2027
-
2028
- // original method
2029
- var styles = root.getComputedStyle(element);
2030
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2031
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2032
- var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
2033
-
2034
- // reset element styles
2035
- element.style.display = _display;element.style.visibility = _visibility;
2036
- return result;
2037
- }
2038
-
2039
- /**
2040
- * Get the opposite placement of the given one/
2041
- * @function
2042
- * @ignore
2043
- * @argument {String} placement
2044
- * @returns {String} flipped placement
2045
- */
2046
- function getOppositePlacement(placement) {
2047
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2048
- return placement.replace(/left|right|bottom|top/g, function (matched) {
2049
- return hash[matched];
2050
- });
2051
- }
2052
-
2053
- /**
2054
- * Given the popper offsets, generate an output similar to getBoundingClientRect
2055
- * @function
2056
- * @ignore
2057
- * @argument {Object} popperOffsets
2058
- * @returns {Object} ClientRect like output
2059
- */
2060
- function getPopperClientRect(popperOffsets) {
2061
- var offsets = Object.assign({}, popperOffsets);
2062
- offsets.right = offsets.left + offsets.width;
2063
- offsets.bottom = offsets.top + offsets.height;
2064
- return offsets;
2065
- }
2066
-
2067
- /**
2068
- * Given an array and the key to find, returns its index
2069
- * @function
2070
- * @ignore
2071
- * @argument {Array} arr
2072
- * @argument keyToFind
2073
- * @returns index or null
2074
- */
2075
- function getArrayKeyIndex(arr, keyToFind) {
2076
- var i = 0,
2077
- key;
2078
- for (key in arr) {
2079
- if (arr[key] === keyToFind) {
2080
- return i;
2081
- }
2082
- i++;
2083
- }
2084
- return null;
2085
- }
2086
-
2087
- /**
2088
- * Get CSS computed property of the given element
2089
- * @function
2090
- * @ignore
2091
- * @argument {Eement} element
2092
- * @argument {String} property
2093
- */
2094
- function getStyleComputedProperty(element, property) {
2095
- // NOTE: 1 DOM access here
2096
- var css = root.getComputedStyle(element, null);
2097
- return css[property];
2098
- }
2099
-
2100
- /**
2101
- * Returns the offset parent of the given element
2102
- * @function
2103
- * @ignore
2104
- * @argument {Element} element
2105
- * @returns {Element} offset parent
2106
- */
2107
- function getOffsetParent(element) {
2108
- // NOTE: 1 DOM access here
2109
- var offsetParent = element.offsetParent;
2110
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
2111
- }
2112
-
2113
- /**
2114
- * Returns the scrolling parent of the given element
2115
- * @function
2116
- * @ignore
2117
- * @argument {Element} element
2118
- * @returns {Element} offset parent
2119
- */
2120
- function getScrollParent(element) {
2121
- var parent = element.parentNode;
2122
-
2123
- if (!parent) {
2124
- return element;
2125
- }
2126
-
2127
- if (parent === root.document) {
2128
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
2129
- // greater than 0 and return the proper element
2130
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
2131
- return root.document.body;
2132
- } else {
2133
- return root.document.documentElement;
2134
- }
2135
- }
2136
-
2137
- // Firefox want us to check `-x` and `-y` variations as well
2138
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
2139
- // If the detected scrollParent is body, we perform an additional check on its parentNode
2140
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
2141
- // fixes issue #65
2142
- return parent;
2143
- }
2144
- return getScrollParent(element.parentNode);
2145
- }
2146
-
2147
- /**
2148
- * Check if the given element is fixed or is inside a fixed parent
2149
- * @function
2150
- * @ignore
2151
- * @argument {Element} element
2152
- * @argument {Element} customContainer
2153
- * @returns {Boolean} answer to "isFixed?"
2154
- */
2155
- function isFixed(element) {
2156
- if (element === root.document.body) {
2157
- return false;
2158
- }
2159
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
2160
- return true;
2161
- }
2162
- return element.parentNode ? isFixed(element.parentNode) : element;
2163
- }
2164
-
2165
- /**
2166
- * Set the style to the given popper
2167
- * @function
2168
- * @ignore
2169
- * @argument {Element} element - Element to apply the style to
2170
- * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
2171
- */
2172
- function setStyle(element, styles) {
2173
- function is_numeric(n) {
2174
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2175
- }
2176
- Object.keys(styles).forEach(function (prop) {
2177
- var unit = '';
2178
- // add unit if the value is numeric and is one of the following
2179
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
2180
- unit = 'px';
2181
- }
2182
- element.style[prop] = styles[prop] + unit;
2183
- });
2184
- }
2185
-
2186
- /**
2187
- * Check if the given variable is a function
2188
- * @function
2189
- * @ignore
2190
- * @argument {*} functionToCheck - variable to check
2191
- * @returns {Boolean} answer to: is a function?
2192
- */
2193
- function isFunction(functionToCheck) {
2194
- var getType = {};
2195
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
2196
- }
2197
-
2198
- /**
2199
- * Get the position of the given element, relative to its offset parent
2200
- * @function
2201
- * @ignore
2202
- * @param {Element} element
2203
- * @return {Object} position - Coordinates of the element and its `scrollTop`
2204
- */
2205
- function getOffsetRect(element) {
2206
- var elementRect = {
2207
- width: element.offsetWidth,
2208
- height: element.offsetHeight,
2209
- left: element.offsetLeft,
2210
- top: element.offsetTop
2211
- };
2212
-
2213
- elementRect.right = elementRect.left + elementRect.width;
2214
- elementRect.bottom = elementRect.top + elementRect.height;
2215
-
2216
- // position
2217
- return elementRect;
2218
- }
2219
-
2220
- /**
2221
- * Get bounding client rect of given element
2222
- * @function
2223
- * @ignore
2224
- * @param {HTMLElement} element
2225
- * @return {Object} client rect
2226
- */
2227
- function getBoundingClientRect(element) {
2228
- var rect = element.getBoundingClientRect();
2229
-
2230
- // whether the IE version is lower than 11
2231
- var isIE = navigator.userAgent.indexOf("MSIE") != -1;
2232
-
2233
- // fix ie document bounding top always 0 bug
2234
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
2235
-
2236
- return {
2237
- left: rect.left,
2238
- top: rectTop,
2239
- right: rect.right,
2240
- bottom: rect.bottom,
2241
- width: rect.right - rect.left,
2242
- height: rect.bottom - rectTop
2243
- };
2244
- }
2245
-
2246
- /**
2247
- * Given an element and one of its parents, return the offset
2248
- * @function
2249
- * @ignore
2250
- * @param {HTMLElement} element
2251
- * @param {HTMLElement} parent
2252
- * @return {Object} rect
2253
- */
2254
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
2255
- var elementRect = getBoundingClientRect(element);
2256
- var parentRect = getBoundingClientRect(parent);
2257
-
2258
- if (fixed) {
2259
- var scrollParent = getScrollParent(parent);
2260
- parentRect.top += scrollParent.scrollTop;
2261
- parentRect.bottom += scrollParent.scrollTop;
2262
- parentRect.left += scrollParent.scrollLeft;
2263
- parentRect.right += scrollParent.scrollLeft;
2264
- }
2265
-
2266
- var rect = {
2267
- top: elementRect.top - parentRect.top,
2268
- left: elementRect.left - parentRect.left,
2269
- bottom: elementRect.top - parentRect.top + elementRect.height,
2270
- right: elementRect.left - parentRect.left + elementRect.width,
2271
- width: elementRect.width,
2272
- height: elementRect.height
2273
- };
2274
- return rect;
2275
- }
2276
-
2277
- /**
2278
- * Get the prefixed supported property name
2279
- * @function
2280
- * @ignore
2281
- * @argument {String} property (camelCase)
2282
- * @returns {String} prefixed property (camelCase)
2283
- */
2284
- function getSupportedPropertyName(property) {
2285
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
2286
-
2287
- for (var i = 0; i < prefixes.length; i++) {
2288
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
2289
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
2290
- return toCheck;
2291
- }
2292
- }
2293
- return null;
2294
- }
2295
-
2296
- /**
2297
- * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
2298
- * objects to a target object. It will return the target object.
2299
- * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
2300
- * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2301
- * @function
2302
- * @ignore
2303
- */
2304
- if (!Object.assign) {
2305
- Object.defineProperty(Object, 'assign', {
2306
- enumerable: false,
2307
- configurable: true,
2308
- writable: true,
2309
- value: function value(target) {
2310
- if (target === undefined || target === null) {
2311
- throw new TypeError('Cannot convert first argument to object');
2312
- }
2313
-
2314
- var to = Object(target);
2315
- for (var i = 1; i < arguments.length; i++) {
2316
- var nextSource = arguments[i];
2317
- if (nextSource === undefined || nextSource === null) {
2318
- continue;
2319
- }
2320
- nextSource = Object(nextSource);
2321
-
2322
- var keysArray = Object.keys(nextSource);
2323
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
2324
- var nextKey = keysArray[nextIndex];
2325
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
2326
- if (desc !== undefined && desc.enumerable) {
2327
- to[nextKey] = nextSource[nextKey];
2328
- }
2329
- }
2330
- }
2331
- return to;
2332
- }
2333
- });
2334
- }
2335
-
2336
- return Popper;
2337
- });
2338
-
2339
- /***/ }),
2340
-
2341
- /***/ 40:
2342
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2343
-
2344
- "use strict";
2345
- /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
2346
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2347
-
2348
-
2349
-
2350
- var Transition = function () {
2351
- function Transition() {
2352
- _classCallCheck(this, Transition);
2353
- }
2354
-
2355
- Transition.prototype.beforeEnter = function beforeEnter(el) {
2356
- Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* addClass */ "a"])(el, 'collapse-transition');
2357
- if (!el.dataset) el.dataset = {};
2358
-
2359
- el.dataset.oldPaddingTop = el.style.paddingTop;
2360
- el.dataset.oldPaddingBottom = el.style.paddingBottom;
2361
-
2362
- el.style.height = '0';
2363
- el.style.paddingTop = 0;
2364
- el.style.paddingBottom = 0;
2365
- };
2366
-
2367
- Transition.prototype.enter = function enter(el) {
2368
- el.dataset.oldOverflow = el.style.overflow;
2369
- if (el.scrollHeight !== 0) {
2370
- el.style.height = el.scrollHeight + 'px';
2371
- el.style.paddingTop = el.dataset.oldPaddingTop;
2372
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
2373
- } else {
2374
- el.style.height = '';
2375
- el.style.paddingTop = el.dataset.oldPaddingTop;
2376
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
2377
- }
2378
-
2379
- el.style.overflow = 'hidden';
2380
- };
2381
-
2382
- Transition.prototype.afterEnter = function afterEnter(el) {
2383
- // for safari: remove class then reset height is necessary
2384
- Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* removeClass */ "i"])(el, 'collapse-transition');
2385
- el.style.height = '';
2386
- el.style.overflow = el.dataset.oldOverflow;
2387
- };
2388
-
2389
- Transition.prototype.beforeLeave = function beforeLeave(el) {
2390
- if (!el.dataset) el.dataset = {};
2391
- el.dataset.oldPaddingTop = el.style.paddingTop;
2392
- el.dataset.oldPaddingBottom = el.style.paddingBottom;
2393
- el.dataset.oldOverflow = el.style.overflow;
2394
-
2395
- el.style.height = el.scrollHeight + 'px';
2396
- el.style.overflow = 'hidden';
2397
- };
2398
-
2399
- Transition.prototype.leave = function leave(el) {
2400
- if (el.scrollHeight !== 0) {
2401
- // for safari: add class after set height, or it will jump to zero height suddenly, weired
2402
- Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* addClass */ "a"])(el, 'collapse-transition');
2403
- el.style.height = 0;
2404
- el.style.paddingTop = 0;
2405
- el.style.paddingBottom = 0;
2406
- }
2407
- };
2408
-
2409
- Transition.prototype.afterLeave = function afterLeave(el) {
2410
- Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* removeClass */ "i"])(el, 'collapse-transition');
2411
- el.style.height = '';
2412
- el.style.overflow = el.dataset.oldOverflow;
2413
- el.style.paddingTop = el.dataset.oldPaddingTop;
2414
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
2415
- };
2416
-
2417
- return Transition;
2418
- }();
2419
-
2420
- /* harmony default export */ __webpack_exports__["a"] = ({
2421
- name: 'ElCollapseTransition',
2422
- functional: true,
2423
- render: function render(h, _ref) {
2424
- var children = _ref.children;
2425
-
2426
- var data = {
2427
- on: new Transition()
2428
- };
2429
-
2430
- return h('transition', data, children);
2431
- }
2432
- });
2433
-
2434
- /***/ }),
2435
-
2436
- /***/ 48:
2437
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2438
-
2439
- "use strict";
2440
- /* harmony default export */ __webpack_exports__["a"] = ({
2441
- inject: ['rootMenu'],
2442
- computed: {
2443
- indexPath: function indexPath() {
2444
- var path = [this.index];
2445
- var parent = this.$parent;
2446
- while (parent.$options.componentName !== 'ElMenu') {
2447
- if (parent.index) {
2448
- path.unshift(parent.index);
2449
- }
2450
- parent = parent.$parent;
2451
- }
2452
- return path;
2453
- },
2454
- parentMenu: function parentMenu() {
2455
- var parent = this.$parent;
2456
- while (parent && ['ElMenu', 'ElSubmenu'].indexOf(parent.$options.componentName) === -1) {
2457
- parent = parent.$parent;
2458
- }
2459
- return parent;
2460
- },
2461
- paddingStyle: function paddingStyle() {
2462
- if (this.rootMenu.mode !== 'vertical') return {};
2463
-
2464
- var padding = 20;
2465
- var parent = this.$parent;
2466
-
2467
- if (this.rootMenu.collapse) {
2468
- padding = 20;
2469
- } else {
2470
- while (parent && parent.$options.componentName !== 'ElMenu') {
2471
- if (parent.$options.componentName === 'ElSubmenu') {
2472
- padding += 20;
2473
- }
2474
- parent = parent.$parent;
2475
- }
2476
- }
2477
- return { paddingLeft: padding + 'px' };
2478
- }
2479
- }
2480
- });
2481
-
2482
- /***/ }),
2483
-
2484
- /***/ 6:
2485
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2486
-
2487
- "use strict";
2488
- function _broadcast(componentName, eventName, params) {
2489
- this.$children.forEach(function (child) {
2490
- var name = child.$options.componentName;
2491
-
2492
- if (name === componentName) {
2493
- child.$emit.apply(child, [eventName].concat(params));
2494
- } else {
2495
- _broadcast.apply(child, [componentName, eventName].concat([params]));
2496
- }
2497
- });
2498
- }
2499
- /* harmony default export */ __webpack_exports__["a"] = ({
2500
- methods: {
2501
- dispatch: function dispatch(componentName, eventName, params) {
2502
- var parent = this.$parent || this.$root;
2503
- var name = parent.$options.componentName;
2504
-
2505
- while (parent && (!name || name !== componentName)) {
2506
- parent = parent.$parent;
2507
-
2508
- if (parent) {
2509
- name = parent.$options.componentName;
2510
- }
2511
- }
2512
- if (parent) {
2513
- parent.$emit.apply(parent, [eventName].concat(params));
2514
- }
2515
- },
2516
- broadcast: function broadcast(componentName, eventName, params) {
2517
- _broadcast.call(this, componentName, eventName, params);
2518
- }
2519
- }
2520
- });
2521
-
2522
- /***/ }),
2523
-
2524
- /***/ 7:
2525
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2526
-
2527
- "use strict";
2528
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
2529
- for (var i = 1, j = arguments.length; i < j; i++) {
2530
- var source = arguments[i] || {};
2531
- for (var prop in source) {
2532
- if (source.hasOwnProperty(prop)) {
2533
- var value = source[prop];
2534
- if (value !== undefined) {
2535
- target[prop] = value;
2536
- }
2537
- }
2538
- }
2539
- }
2540
-
2541
- return target;
2542
- });;
2543
-
2544
- /***/ }),
2545
-
2546
- /***/ 8:
2547
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2548
-
2549
- "use strict";
2550
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2551
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2552
-
2553
-
2554
- var scrollBarWidth = void 0;
2555
-
2556
- /* harmony default export */ __webpack_exports__["a"] = (function () {
2557
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
2558
- if (scrollBarWidth !== undefined) return scrollBarWidth;
2559
-
2560
- var outer = document.createElement('div');
2561
- outer.className = 'el-scrollbar__wrap';
2562
- outer.style.visibility = 'hidden';
2563
- outer.style.width = '100px';
2564
- outer.style.position = 'absolute';
2565
- outer.style.top = '-9999px';
2566
- document.body.appendChild(outer);
2567
-
2568
- var widthNoScroll = outer.offsetWidth;
2569
- outer.style.overflow = 'scroll';
2570
-
2571
- var inner = document.createElement('div');
2572
- inner.style.width = '100%';
2573
- outer.appendChild(inner);
2574
-
2575
- var widthWithScroll = inner.offsetWidth;
2576
- outer.parentNode.removeChild(outer);
2577
- scrollBarWidth = widthNoScroll - widthWithScroll;
2578
-
2579
- return scrollBarWidth;
2580
- });;
2581
-
2582
- /***/ }),
2583
-
2584
- /***/ 9:
2585
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2586
-
2587
- "use strict";
2588
-
2589
- // EXPORTS
2590
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
2591
-
2592
- // EXTERNAL MODULE: external "vue"
2593
- var external_vue_ = __webpack_require__(0);
2594
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
2595
-
2596
- // EXTERNAL MODULE: ./src/utils/merge.js
2597
- var merge = __webpack_require__(7);
2598
-
2599
- // EXTERNAL MODULE: ./src/utils/dom.js
2600
- var utils_dom = __webpack_require__(1);
2601
-
2602
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
2603
-
2604
-
2605
-
2606
- var hasModal = false;
2607
- var hasInitZIndex = false;
2608
- var popup_manager_zIndex = void 0;
2609
-
2610
- var popup_manager_getModal = function getModal() {
2611
- if (external_vue_default.a.prototype.$isServer) return;
2612
- var modalDom = PopupManager.modalDom;
2613
- if (modalDom) {
2614
- hasModal = true;
2615
- } else {
2616
- hasModal = false;
2617
- modalDom = document.createElement('div');
2618
- PopupManager.modalDom = modalDom;
2619
-
2620
- modalDom.addEventListener('touchmove', function (event) {
2621
- event.preventDefault();
2622
- event.stopPropagation();
2623
- });
2624
-
2625
- modalDom.addEventListener('click', function () {
2626
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
2627
- });
2628
- }
2629
-
2630
- return modalDom;
2631
- };
2632
-
2633
- var instances = {};
2634
-
2635
- var PopupManager = {
2636
- modalFade: true,
2637
-
2638
- getInstance: function getInstance(id) {
2639
- return instances[id];
2640
- },
2641
-
2642
- register: function register(id, instance) {
2643
- if (id && instance) {
2644
- instances[id] = instance;
2645
- }
2646
- },
2647
-
2648
- deregister: function deregister(id) {
2649
- if (id) {
2650
- instances[id] = null;
2651
- delete instances[id];
2652
- }
2653
- },
2654
-
2655
- nextZIndex: function nextZIndex() {
2656
- return PopupManager.zIndex++;
2657
- },
2658
-
2659
- modalStack: [],
2660
-
2661
- doOnModalClick: function doOnModalClick() {
2662
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
2663
- if (!topItem) return;
2664
-
2665
- var instance = PopupManager.getInstance(topItem.id);
2666
- if (instance && instance.closeOnClickModal) {
2667
- instance.close();
2668
- }
2669
- },
2670
-
2671
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
2672
- if (external_vue_default.a.prototype.$isServer) return;
2673
- if (!id || zIndex === undefined) return;
2674
- this.modalFade = modalFade;
2675
-
2676
- var modalStack = this.modalStack;
2677
-
2678
- for (var i = 0, j = modalStack.length; i < j; i++) {
2679
- var item = modalStack[i];
2680
- if (item.id === id) {
2681
- return;
2682
- }
2683
- }
2684
-
2685
- var modalDom = popup_manager_getModal();
2686
-
2687
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
2688
- if (this.modalFade && !hasModal) {
2689
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
2690
- }
2691
- if (modalClass) {
2692
- var classArr = modalClass.trim().split(/\s+/);
2693
- classArr.forEach(function (item) {
2694
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
2695
- });
2696
- }
2697
- setTimeout(function () {
2698
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
2699
- }, 200);
2700
-
2701
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
2702
- dom.parentNode.appendChild(modalDom);
2703
- } else {
2704
- document.body.appendChild(modalDom);
2705
- }
2706
-
2707
- if (zIndex) {
2708
- modalDom.style.zIndex = zIndex;
2709
- }
2710
- modalDom.tabIndex = 0;
2711
- modalDom.style.display = '';
2712
-
2713
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
2714
- },
2715
-
2716
- closeModal: function closeModal(id) {
2717
- var modalStack = this.modalStack;
2718
- var modalDom = popup_manager_getModal();
2719
-
2720
- if (modalStack.length > 0) {
2721
- var topItem = modalStack[modalStack.length - 1];
2722
- if (topItem.id === id) {
2723
- if (topItem.modalClass) {
2724
- var classArr = topItem.modalClass.trim().split(/\s+/);
2725
- classArr.forEach(function (item) {
2726
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
2727
- });
2728
- }
2729
-
2730
- modalStack.pop();
2731
- if (modalStack.length > 0) {
2732
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
2733
- }
2734
- } else {
2735
- for (var i = modalStack.length - 1; i >= 0; i--) {
2736
- if (modalStack[i].id === id) {
2737
- modalStack.splice(i, 1);
2738
- break;
2739
- }
2740
- }
2741
- }
2742
- }
2743
-
2744
- if (modalStack.length === 0) {
2745
- if (this.modalFade) {
2746
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
2747
- }
2748
- setTimeout(function () {
2749
- if (modalStack.length === 0) {
2750
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
2751
- modalDom.style.display = 'none';
2752
- PopupManager.modalDom = undefined;
2753
- }
2754
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
2755
- }, 200);
2756
- }
2757
- }
2758
- };
2759
-
2760
- Object.defineProperty(PopupManager, 'zIndex', {
2761
- configurable: true,
2762
- get: function get() {
2763
- if (!hasInitZIndex) {
2764
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
2765
- hasInitZIndex = true;
2766
- }
2767
- return popup_manager_zIndex;
2768
- },
2769
- set: function set(value) {
2770
- popup_manager_zIndex = value;
2771
- }
2772
- });
2773
-
2774
- var popup_manager_getTopPopup = function getTopPopup() {
2775
- if (external_vue_default.a.prototype.$isServer) return;
2776
- if (PopupManager.modalStack.length > 0) {
2777
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
2778
- if (!topPopup) return;
2779
- var instance = PopupManager.getInstance(topPopup.id);
2780
-
2781
- return instance;
2782
- }
2783
- };
2784
-
2785
- if (!external_vue_default.a.prototype.$isServer) {
2786
- // handle `esc` key when the popup is shown
2787
- window.addEventListener('keydown', function (event) {
2788
- if (event.keyCode === 27) {
2789
- var topPopup = popup_manager_getTopPopup();
2790
-
2791
- if (topPopup && topPopup.closeOnPressEscape) {
2792
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
2793
- }
2794
- }
2795
- });
2796
- }
2797
-
2798
- /* harmony default export */ var popup_manager = (PopupManager);
2799
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
2800
- var scrollbar_width = __webpack_require__(8);
2801
-
2802
- // CONCATENATED MODULE: ./src/utils/popup/index.js
2803
-
2804
-
2805
-
2806
-
2807
-
2808
-
2809
- var idSeed = 1;
2810
-
2811
- var scrollBarWidth = void 0;
2812
-
2813
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
2814
- props: {
2815
- visible: {
2816
- type: Boolean,
2817
- default: false
2818
- },
2819
- openDelay: {},
2820
- closeDelay: {},
2821
- zIndex: {},
2822
- modal: {
2823
- type: Boolean,
2824
- default: false
2825
- },
2826
- modalFade: {
2827
- type: Boolean,
2828
- default: true
2829
- },
2830
- modalClass: {},
2831
- modalAppendToBody: {
2832
- type: Boolean,
2833
- default: false
2834
- },
2835
- lockScroll: {
2836
- type: Boolean,
2837
- default: true
2838
- },
2839
- closeOnPressEscape: {
2840
- type: Boolean,
2841
- default: false
2842
- },
2843
- closeOnClickModal: {
2844
- type: Boolean,
2845
- default: false
2846
- }
2847
- },
2848
-
2849
- beforeMount: function beforeMount() {
2850
- this._popupId = 'popup-' + idSeed++;
2851
- popup_manager.register(this._popupId, this);
2852
- },
2853
- beforeDestroy: function beforeDestroy() {
2854
- popup_manager.deregister(this._popupId);
2855
- popup_manager.closeModal(this._popupId);
2856
-
2857
- this.restoreBodyStyle();
2858
- },
2859
- data: function data() {
2860
- return {
2861
- opened: false,
2862
- bodyPaddingRight: null,
2863
- computedBodyPaddingRight: 0,
2864
- withoutHiddenClass: true,
2865
- rendered: false
2866
- };
2867
- },
2868
-
2869
-
2870
- watch: {
2871
- visible: function visible(val) {
2872
- var _this = this;
2873
-
2874
- if (val) {
2875
- if (this._opening) return;
2876
- if (!this.rendered) {
2877
- this.rendered = true;
2878
- external_vue_default.a.nextTick(function () {
2879
- _this.open();
2880
- });
2881
- } else {
2882
- this.open();
2883
- }
2884
- } else {
2885
- this.close();
2886
- }
2887
- }
2888
- },
2889
-
2890
- methods: {
2891
- open: function open(options) {
2892
- var _this2 = this;
2893
-
2894
- if (!this.rendered) {
2895
- this.rendered = true;
2896
- }
2897
-
2898
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
2899
-
2900
- if (this._closeTimer) {
2901
- clearTimeout(this._closeTimer);
2902
- this._closeTimer = null;
2903
- }
2904
- clearTimeout(this._openTimer);
2905
-
2906
- var openDelay = Number(props.openDelay);
2907
- if (openDelay > 0) {
2908
- this._openTimer = setTimeout(function () {
2909
- _this2._openTimer = null;
2910
- _this2.doOpen(props);
2911
- }, openDelay);
2912
- } else {
2913
- this.doOpen(props);
2914
- }
2915
- },
2916
- doOpen: function doOpen(props) {
2917
- if (this.$isServer) return;
2918
- if (this.willOpen && !this.willOpen()) return;
2919
- if (this.opened) return;
2920
-
2921
- this._opening = true;
2922
-
2923
- var dom = this.$el;
2924
-
2925
- var modal = props.modal;
2926
-
2927
- var zIndex = props.zIndex;
2928
- if (zIndex) {
2929
- popup_manager.zIndex = zIndex;
2930
- }
2931
-
2932
- if (modal) {
2933
- if (this._closing) {
2934
- popup_manager.closeModal(this._popupId);
2935
- this._closing = false;
2936
- }
2937
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
2938
- if (props.lockScroll) {
2939
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
2940
- if (this.withoutHiddenClass) {
2941
- this.bodyPaddingRight = document.body.style.paddingRight;
2942
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
2943
- }
2944
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
2945
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
2946
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
2947
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
2948
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
2949
- }
2950
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
2951
- }
2952
- }
2953
-
2954
- if (getComputedStyle(dom).position === 'static') {
2955
- dom.style.position = 'absolute';
2956
- }
2957
-
2958
- dom.style.zIndex = popup_manager.nextZIndex();
2959
- this.opened = true;
2960
-
2961
- this.onOpen && this.onOpen();
2962
-
2963
- this.doAfterOpen();
2964
- },
2965
- doAfterOpen: function doAfterOpen() {
2966
- this._opening = false;
2967
- },
2968
- close: function close() {
2969
- var _this3 = this;
2970
-
2971
- if (this.willClose && !this.willClose()) return;
2972
-
2973
- if (this._openTimer !== null) {
2974
- clearTimeout(this._openTimer);
2975
- this._openTimer = null;
2976
- }
2977
- clearTimeout(this._closeTimer);
2978
-
2979
- var closeDelay = Number(this.closeDelay);
2980
-
2981
- if (closeDelay > 0) {
2982
- this._closeTimer = setTimeout(function () {
2983
- _this3._closeTimer = null;
2984
- _this3.doClose();
2985
- }, closeDelay);
2986
- } else {
2987
- this.doClose();
2988
- }
2989
- },
2990
- doClose: function doClose() {
2991
- this._closing = true;
2992
-
2993
- this.onClose && this.onClose();
2994
-
2995
- if (this.lockScroll) {
2996
- setTimeout(this.restoreBodyStyle, 200);
2997
- }
2998
-
2999
- this.opened = false;
3000
-
3001
- this.doAfterClose();
3002
- },
3003
- doAfterClose: function doAfterClose() {
3004
- popup_manager.closeModal(this._popupId);
3005
- this._closing = false;
3006
- },
3007
- restoreBodyStyle: function restoreBodyStyle() {
3008
- if (this.modal && this.withoutHiddenClass) {
3009
- document.body.style.paddingRight = this.bodyPaddingRight;
3010
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
3011
- }
3012
- this.withoutHiddenClass = true;
3013
- }
3014
- }
3015
- });
3016
-
3017
-
3018
-
3019
- /***/ })
3020
-
3021
- /******/ });