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/treeSelect.js DELETED
@@ -1,4058 +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 = 123);
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
- /***/ 123:
543
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
544
-
545
- "use strict";
546
- // ESM COMPAT FLAG
547
- __webpack_require__.r(__webpack_exports__);
548
-
549
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/treeSelect/src/main.vue?vue&type=template&id=00ed5ada
550
- var render = function render() {
551
- var _vm = this,
552
- _c = _vm._self._c
553
- return _c(
554
- "div",
555
- { staticClass: "cy-tree-select" },
556
- [
557
- _c(
558
- "el-popover",
559
- {
560
- attrs: {
561
- placement: "bottom-start",
562
- width: "300",
563
- trigger: "click",
564
- "popper-class": _vm.popperClass,
565
- },
566
- on: {
567
- show: function ($event) {
568
- _vm.popoverOpen = true
569
- },
570
- hide: function ($event) {
571
- _vm.popoverOpen = false
572
- },
573
- },
574
- model: {
575
- value: _vm.popoverOpen,
576
- callback: function ($$v) {
577
- _vm.popoverOpen = $$v
578
- },
579
- expression: "popoverOpen",
580
- },
581
- },
582
- [
583
- _c("div", { staticClass: "cy-tree-select-select-con" }, [
584
- _vm.filterable
585
- ? _c(
586
- "div",
587
- { staticClass: "cy-tree-select-select-con-s" },
588
- [
589
- _c("el-input", {
590
- attrs: {
591
- placeholder: "搜索",
592
- "prefix-icon": "el-icon-search",
593
- clearable: "",
594
- size: "small",
595
- },
596
- model: {
597
- value: _vm.filterText,
598
- callback: function ($$v) {
599
- _vm.filterText = $$v
600
- },
601
- expression: "filterText",
602
- },
603
- }),
604
- ],
605
- 1
606
- )
607
- : _vm._e(),
608
- _vm.showCheckStrictly
609
- ? _c(
610
- "div",
611
- { staticClass: "cy-tree-select-select-con-t" },
612
- [
613
- _c(
614
- "el-checkbox",
615
- {
616
- model: {
617
- value: _vm.isCheckStrictly,
618
- callback: function ($$v) {
619
- _vm.isCheckStrictly = $$v
620
- },
621
- expression: "isCheckStrictly",
622
- },
623
- },
624
- [_vm._v("父子节点联动")]
625
- ),
626
- ],
627
- 1
628
- )
629
- : _vm._e(),
630
- _c(
631
- "div",
632
- { staticClass: "cy-tree-select-select-con-c" },
633
- [
634
- _c("el-tree", {
635
- ref: "tree",
636
- attrs: {
637
- data: _vm.treeOptions,
638
- "show-checkbox": _vm.multiple,
639
- "node-key": _vm.defaultOptions.id,
640
- "check-strictly": !_vm.isCheckStrictly,
641
- props: _vm.defaultOptions,
642
- "expand-on-click-node": false,
643
- "default-expand-all": _vm.defaultExpandAll,
644
- "filter-node-method": _vm.filterNode,
645
- },
646
- on: { check: _vm.treeCheck, "node-click": _vm.treeClick },
647
- }),
648
- ],
649
- 1
650
- ),
651
- ]),
652
- _c(
653
- "div",
654
- {
655
- staticClass: "cy-tree-select-select",
656
- class: _vm.size,
657
- style: _vm.vStyle,
658
- attrs: { slot: "reference" },
659
- slot: "reference",
660
- },
661
- [
662
- _c("div", { staticClass: "cy-tree-select-select-v" }, [
663
- _vm.checkedArr.length < 1
664
- ? _c(
665
- "span",
666
- { staticClass: "cy-tree-select-select-v-placeholder" },
667
- [_vm._v(_vm._s(_vm.placeholder))]
668
- )
669
- : _c("span", [
670
- _vm._v(
671
- _vm._s(
672
- _vm.checkedArr
673
- .map((item) => item[_vm.defaultOptions.label])
674
- .join()
675
- )
676
- ),
677
- ]),
678
- ]),
679
- _c(
680
- "div",
681
- {
682
- staticClass: "cy-tree-select-select-v-icon",
683
- on: {
684
- mouseenter: function ($event) {
685
- _vm.isClearIcon = true
686
- },
687
- mouseleave: function ($event) {
688
- _vm.isClearIcon = false
689
- },
690
- },
691
- },
692
- [
693
- _vm.isClearIcon && _vm.clearable
694
- ? _c("i", {
695
- staticClass: "el-icon-circle-close",
696
- on: {
697
- click: function ($event) {
698
- $event.stopPropagation()
699
- return _vm.handleClear.apply(null, arguments)
700
- },
701
- },
702
- })
703
- : _c("i", {
704
- staticClass:
705
- "el-icon-arrow-down cy-tree-select-select-v-arrow",
706
- class: {
707
- "cy-tree-select-select-v-arrow-show": _vm.popoverOpen,
708
- },
709
- }),
710
- ]
711
- ),
712
- ]
713
- ),
714
- ]
715
- ),
716
- ],
717
- 1
718
- )
719
- }
720
- var staticRenderFns = []
721
- render._withStripped = true
722
-
723
-
724
- // CONCATENATED MODULE: ./packages/treeSelect/src/main.vue?vue&type=template&id=00ed5ada
725
-
726
- // EXTERNAL MODULE: ./packages/checkbox/index.js + 5 modules
727
- var packages_checkbox = __webpack_require__(26);
728
-
729
- // EXTERNAL MODULE: ./packages/popover/index.js + 6 modules
730
- var popover = __webpack_require__(42);
731
-
732
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/treeSelect/src/main.vue?vue&type=script&lang=js
733
-
734
-
735
-
736
-
737
- /* harmony default export */ var mainvue_type_script_lang_js = ({
738
- name: 'CyTreeSelect',
739
- component: [packages_checkbox["default"], popover["default"]],
740
- model: {
741
- prop: 'value',
742
- event: 'change'
743
- },
744
- props: {
745
- value: {
746
- type: [String, Number, Array],
747
- default: ''
748
- },
749
-
750
- options: {
751
- type: Array,
752
- default: []
753
- },
754
-
755
- placeholder: {
756
- type: String,
757
- default: ''
758
- },
759
-
760
- // 尺寸
761
- size: {
762
- type: String
763
- },
764
-
765
- // 是否显示搜索框
766
- filterable: {
767
- type: Boolean,
768
- default: false
769
- },
770
-
771
- // 是否显示 父子节点是否联动 多选框
772
- showCheckStrictly: {
773
- type: Boolean,
774
- default: true
775
- },
776
-
777
- // 父子节点是否联动
778
- checkStrictly: {
779
- type: Boolean,
780
- default: true
781
- },
782
-
783
- // 是否显示清空按钮
784
- clearable: {
785
- type: Boolean,
786
- default: false
787
- },
788
-
789
- // 是否多选
790
- multiple: {
791
- type: Boolean,
792
- default: false
793
- },
794
-
795
- // 默认数据参数选项
796
- defaultOptions: {
797
- type: Object,
798
- default: function _default() {
799
- return {
800
- children: 'children',
801
- label: 'label',
802
- id: 'id'
803
- };
804
- }
805
- },
806
-
807
- // 显示的文本框样式
808
- vStyle: {
809
- type: [Array, String, Object],
810
- default: ''
811
- },
812
-
813
- // 树数据区域外层popover的class
814
- popperClass: {
815
- type: String,
816
- default: ''
817
- },
818
-
819
- // 是否默认展开所有节点
820
- defaultExpandAll: {
821
- type: Boolean,
822
- default: false
823
- }
824
- },
825
- data: function data() {
826
- return {
827
- isCheckStrictly: true, // 父子节点是否联动
828
- popoverOpen: false, // 显示状态
829
- isClearIcon: false, // 清空按钮显示状态
830
-
831
- treeOptions: [], // 部门树列表
832
- treeArr: [], // 部门列表
833
- filterText: '', // 搜索关键词
834
- matchedNodeIds: [] // 匹配的节点ID集合
835
- };
836
- },
837
-
838
- computed: {
839
- // 当前选中的数组
840
- checkedArr: function checkedArr() {
841
- var _this = this;
842
-
843
- if (this.multiple) {
844
- var arr = [];
845
- this.value && this.value.forEach(function (id) {
846
- var cItem = _this.treeArr.filter(function (tItem) {
847
- return tItem[_this.defaultOptions.id] === id;
848
- })[0];
849
- if (cItem) arr.push(cItem);
850
- });
851
- return arr;
852
- } else {
853
- var cItem = this.treeArr.filter(function (tItem) {
854
- return tItem[_this.defaultOptions.id] === Number(_this.value);
855
- })[0];
856
- return cItem ? [cItem] : [];
857
- }
858
- }
859
- },
860
- watch: {
861
- checkStrictly: {
862
- immediate: true,
863
- handler: function handler() {
864
- this.isCheckStrictly = this.checkStrictly;
865
- }
866
- },
867
-
868
- value: {
869
- immediate: true,
870
- deep: true,
871
- handler: function handler() {
872
- var _this2 = this;
873
-
874
- this.$nextTick(function () {
875
- _this2.init();
876
- });
877
- }
878
- },
879
-
880
- options: {
881
- deep: true,
882
- immediate: true,
883
- handler: function handler() {
884
- this.treeOptions = this.options;
885
- this.treeArr = this.turnFormatTreeData([], this.treeOptions, 0);
886
- }
887
- },
888
-
889
- filterText: function filterText(val) {
890
- var _this3 = this;
891
-
892
- if (val) {
893
- // 先找出所有匹配的节点及其子节点
894
- this.matchedNodeIds = this.findMatchedNodes(val, this.treeOptions);
895
- // 执行过滤
896
- this.$refs.tree.filter(val);
897
- // 展开所有匹配的节点
898
- this.$nextTick(function () {
899
- _this3.expandMatchedNodes();
900
- });
901
- } else {
902
- this.matchedNodeIds = [];
903
- this.$refs.tree.filter(val);
904
- }
905
- }
906
- },
907
- created: function created() {},
908
-
909
- methods: {
910
- /**
911
- * 树节点过滤
912
- */
913
- filterNode: function filterNode(value, data) {
914
- if (!value) return true;
915
- // 如果当前节点或其祖先节点匹配了,就显示
916
- return this.matchedNodeIds.includes(data[this.defaultOptions.id]);
917
- },
918
-
919
-
920
- /**
921
- * 查找所有匹配的节点及其子节点ID
922
- */
923
- findMatchedNodes: function findMatchedNodes(value, nodes) {
924
- var _this4 = this;
925
-
926
- var parentMatched = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
927
-
928
- var matchedIds = [];
929
-
930
- nodes.forEach(function (node) {
931
- var currentNodeMatched = node[_this4.defaultOptions.label].indexOf(value) !== -1;
932
- var shouldShow = currentNodeMatched || parentMatched;
933
-
934
- if (shouldShow) {
935
- matchedIds.push(node[_this4.defaultOptions.id]);
936
- }
937
-
938
- // 递归处理子节点,如果当前节点或其祖先匹配了,子节点也应该匹配
939
- if (node[_this4.defaultOptions.children] && node[_this4.defaultOptions.children].length > 0) {
940
- var childIds = _this4.findMatchedNodes(value, node[_this4.defaultOptions.children], shouldShow);
941
- matchedIds = matchedIds.concat(childIds);
942
- }
943
- });
944
-
945
- return matchedIds;
946
- },
947
-
948
-
949
- /**
950
- * 展开所有匹配的节点
951
- */
952
- expandMatchedNodes: function expandMatchedNodes() {
953
- var _this5 = this;
954
-
955
- this.matchedNodeIds.forEach(function (nodeId) {
956
- var treeNode = _this5.$refs.tree.store.nodesMap[nodeId];
957
- if (treeNode) {
958
- treeNode.expand();
959
- }
960
- });
961
- },
962
- init: function init() {
963
- var _this6 = this;
964
-
965
- // 初始化是根据value,设置已选中项
966
- var arr = [];
967
- if (this.multiple) {
968
- arr = this.value ? this.value : [];
969
- } else {
970
- arr = this.value ? [this.value] : [];
971
- }
972
- this.$nextTick(function () {
973
- _this6.$refs.tree.setCheckedKeys(arr);
974
- });
975
- },
976
-
977
-
978
- /**
979
- * 树复选框点击
980
- */
981
- treeCheck: function treeCheck(value, _ref) {
982
- var _this7 = this;
983
-
984
- var checkedKeys = _ref.checkedKeys,
985
- checkedNodes = _ref.checkedNodes;
986
-
987
- var arr = [];
988
- arr = checkedNodes;
989
- var idArr = arr.map(function (item) {
990
- return item[_this7.defaultOptions.id];
991
- });
992
- // 返回id数组
993
- this.$emit('change', this.multiple ? idArr : idArr[0], this.multiple ? arr : arr[0]);
994
- },
995
-
996
-
997
- /**
998
- * 树节点点击
999
- */
1000
- treeClick: function treeClick(value, node, event) {
1001
- if (this.multiple) return;
1002
-
1003
- this.$emit('change', value.id, value);
1004
- this.popoverOpen = false;
1005
- },
1006
-
1007
-
1008
- /**
1009
- * 清空
1010
- */
1011
- handleClear: function handleClear() {
1012
- this.$emit('change', this.multiple ? [] : '', this.multiple ? [] : null);
1013
- this.$refs.tree.setCheckedKeys([]);
1014
- },
1015
-
1016
-
1017
- /**
1018
- * 部门树 格式化为 单例数组
1019
- */
1020
- turnFormatTreeData: function turnFormatTreeData(arr, data, pId) {
1021
- var _this8 = this;
1022
-
1023
- data.forEach(function (item) {
1024
- var cItem = JSON.parse(JSON.stringify(item));
1025
- delete cItem[_this8.defaultOptions.children];
1026
- cItem.pId = pId;
1027
- arr.push(cItem);
1028
-
1029
- if (item[_this8.defaultOptions.children] && item[_this8.defaultOptions.children].length > 0) {
1030
- _this8.turnFormatTreeData(arr, item[_this8.defaultOptions.children], item[_this8.defaultOptions.id]);
1031
- }
1032
- });
1033
- return arr;
1034
- }
1035
- }
1036
- });
1037
- // CONCATENATED MODULE: ./packages/treeSelect/src/main.vue?vue&type=script&lang=js
1038
- /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
1039
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1040
- var componentNormalizer = __webpack_require__(2);
1041
-
1042
- // CONCATENATED MODULE: ./packages/treeSelect/src/main.vue
1043
-
1044
-
1045
-
1046
-
1047
-
1048
- /* normalize component */
1049
-
1050
- var component = Object(componentNormalizer["a" /* default */])(
1051
- src_mainvue_type_script_lang_js,
1052
- render,
1053
- staticRenderFns,
1054
- false,
1055
- null,
1056
- null,
1057
- null
1058
-
1059
- )
1060
-
1061
- /* harmony default export */ var main = (component.exports);
1062
- // CONCATENATED MODULE: ./packages/treeSelect/index.js
1063
-
1064
-
1065
- /* istanbul ignore next */
1066
- main.install = function (Vue) {
1067
- Vue.component(main.name, main);
1068
- };
1069
-
1070
- /* harmony default export */ var treeSelect = __webpack_exports__["default"] = (main);
1071
-
1072
- /***/ }),
1073
-
1074
- /***/ 2:
1075
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1076
-
1077
- "use strict";
1078
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
1079
- /* globals __VUE_SSR_CONTEXT__ */
1080
-
1081
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1082
- // This module is a runtime utility for cleaner component module output and will
1083
- // be included in the final webpack user bundle.
1084
-
1085
- function normalizeComponent(
1086
- scriptExports,
1087
- render,
1088
- staticRenderFns,
1089
- functionalTemplate,
1090
- injectStyles,
1091
- scopeId,
1092
- moduleIdentifier /* server only */,
1093
- shadowMode /* vue-cli only */
1094
- ) {
1095
- // Vue.extend constructor export interop
1096
- var options =
1097
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
1098
-
1099
- // render functions
1100
- if (render) {
1101
- options.render = render
1102
- options.staticRenderFns = staticRenderFns
1103
- options._compiled = true
1104
- }
1105
-
1106
- // functional template
1107
- if (functionalTemplate) {
1108
- options.functional = true
1109
- }
1110
-
1111
- // scopedId
1112
- if (scopeId) {
1113
- options._scopeId = 'data-v-' + scopeId
1114
- }
1115
-
1116
- var hook
1117
- if (moduleIdentifier) {
1118
- // server build
1119
- hook = function (context) {
1120
- // 2.3 injection
1121
- context =
1122
- context || // cached call
1123
- (this.$vnode && this.$vnode.ssrContext) || // stateful
1124
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1125
- // 2.2 with runInNewContext: true
1126
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1127
- context = __VUE_SSR_CONTEXT__
1128
- }
1129
- // inject component styles
1130
- if (injectStyles) {
1131
- injectStyles.call(this, context)
1132
- }
1133
- // register component module identifier for async chunk inferrence
1134
- if (context && context._registeredComponents) {
1135
- context._registeredComponents.add(moduleIdentifier)
1136
- }
1137
- }
1138
- // used by ssr in case component is cached and beforeCreate
1139
- // never gets called
1140
- options._ssrRegister = hook
1141
- } else if (injectStyles) {
1142
- hook = shadowMode
1143
- ? function () {
1144
- injectStyles.call(
1145
- this,
1146
- (options.functional ? this.parent : this).$root.$options.shadowRoot
1147
- )
1148
- }
1149
- : injectStyles
1150
- }
1151
-
1152
- if (hook) {
1153
- if (options.functional) {
1154
- // for template-only hot-reload because in that case the render fn doesn't
1155
- // go through the normalizer
1156
- options._injectStyles = hook
1157
- // register for functional component in vue file
1158
- var originalRender = options.render
1159
- options.render = function renderWithStyleInjection(h, context) {
1160
- hook.call(context)
1161
- return originalRender(h, context)
1162
- }
1163
- } else {
1164
- // inject component registration as beforeCreate hook
1165
- var existing = options.beforeCreate
1166
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1167
- }
1168
- }
1169
-
1170
- return {
1171
- exports: scriptExports,
1172
- options: options
1173
- }
1174
- }
1175
-
1176
-
1177
- /***/ }),
1178
-
1179
- /***/ 23:
1180
- /***/ (function(module, exports, __webpack_require__) {
1181
-
1182
- 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; };
1183
-
1184
- /**
1185
- * @fileOverview Kickass library to create and place poppers near their reference elements.
1186
- * @version {{version}}
1187
- * @license
1188
- * Copyright (c) 2016 Federico Zivolo and contributors
1189
- *
1190
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1191
- * of this software and associated documentation files (the "Software"), to deal
1192
- * in the Software without restriction, including without limitation the rights
1193
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1194
- * copies of the Software, and to permit persons to whom the Software is
1195
- * furnished to do so, subject to the following conditions:
1196
- *
1197
- * The above copyright notice and this permission notice shall be included in all
1198
- * copies or substantial portions of the Software.
1199
- *
1200
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1201
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1202
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1203
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1204
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1205
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1206
- * SOFTWARE.
1207
- */
1208
-
1209
- //
1210
- // Cross module loader
1211
- // Supported: Node, AMD, Browser globals
1212
- //
1213
- ;(function (root, factory) {
1214
- if (true) {
1215
- // AMD. Register as an anonymous module.
1216
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1217
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1218
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1219
- __WEBPACK_AMD_DEFINE_FACTORY__),
1220
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1221
- } else {}
1222
- })(this, function () {
1223
-
1224
- 'use strict';
1225
-
1226
- var root = window;
1227
-
1228
- // default options
1229
- var DEFAULTS = {
1230
- // placement of the popper
1231
- placement: 'bottom',
1232
-
1233
- gpuAcceleration: true,
1234
-
1235
- // shift popper from its origin by the given amount of pixels (can be negative)
1236
- offset: 0,
1237
-
1238
- // the element which will act as boundary of the popper
1239
- boundariesElement: 'viewport',
1240
-
1241
- // amount of pixel used to define a minimum distance between the boundaries and the popper
1242
- boundariesPadding: 5,
1243
-
1244
- // popper will try to prevent overflow following this order,
1245
- // by default, then, it could overflow on the left and on top of the boundariesElement
1246
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
1247
-
1248
- // the behavior used by flip to change the placement of the popper
1249
- flipBehavior: 'flip',
1250
-
1251
- arrowElement: '[x-arrow]',
1252
-
1253
- arrowOffset: 0,
1254
-
1255
- // list of functions used to modify the offsets before they are applied to the popper
1256
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
1257
-
1258
- modifiersIgnored: [],
1259
-
1260
- forceAbsolute: false
1261
- };
1262
-
1263
- /**
1264
- * Create a new Popper.js instance
1265
- * @constructor Popper
1266
- * @param {HTMLElement} reference - The reference element used to position the popper
1267
- * @param {HTMLElement|Object} popper
1268
- * The HTML element used as popper, or a configuration used to generate the popper.
1269
- * @param {String} [popper.tagName='div'] The tag name of the generated popper.
1270
- * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
1271
- * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
1272
- * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
1273
- * @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`.
1274
- * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
1275
- * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
1276
- * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
1277
- * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
1278
- * @param {Object} options
1279
- * @param {String} [options.placement=bottom]
1280
- * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
1281
- * left(-start, -end)`
1282
- *
1283
- * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
1284
- * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
1285
- * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
1286
- * reference element.
1287
- * By default, it will look for a child node of the popper with the `x-arrow` attribute.
1288
- *
1289
- * @param {Boolean} [options.gpuAcceleration=true]
1290
- * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
1291
- * browser to use the GPU to accelerate the rendering.
1292
- * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
1293
- *
1294
- * @param {Number} [options.offset=0]
1295
- * Amount of pixels the popper will be shifted (can be negative).
1296
- *
1297
- * @param {String|Element} [options.boundariesElement='viewport']
1298
- * The element which will define the boundaries of the popper position, the popper will never be placed outside
1299
- * of the defined boundaries (except if `keepTogether` is enabled)
1300
- *
1301
- * @param {Number} [options.boundariesPadding=5]
1302
- * Additional padding for the boundaries
1303
- *
1304
- * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
1305
- * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
1306
- * this means that the last ones will never overflow
1307
- *
1308
- * @param {String|Array} [options.flipBehavior='flip']
1309
- * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
1310
- * overlap its reference element. Defining `flip` as value, the placement will be flipped on
1311
- * its axis (`right - left`, `top - bottom`).
1312
- * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
1313
- * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
1314
- * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
1315
- *
1316
- * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
1317
- * List of functions used to modify the data before they are applied to the popper, add your custom functions
1318
- * to this array to edit the offsets and placement.
1319
- * The function should reflect the @params and @returns of preventOverflow
1320
- *
1321
- * @param {Array} [options.modifiersIgnored=[]]
1322
- * Put here any built-in modifier name you want to exclude from the modifiers list
1323
- * The function should reflect the @params and @returns of preventOverflow
1324
- *
1325
- * @param {Boolean} [options.removeOnDestroy=false]
1326
- * Set to true if you want to automatically remove the popper when you call the `destroy` method.
1327
- */
1328
- function Popper(reference, popper, options) {
1329
- this._reference = reference.jquery ? reference[0] : reference;
1330
- this.state = {};
1331
-
1332
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
1333
- // generate a default popper if is not defined
1334
- var isNotDefined = typeof popper === 'undefined' || popper === null;
1335
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
1336
- if (isNotDefined || isConfig) {
1337
- this._popper = this.parse(isConfig ? popper : {});
1338
- }
1339
- // otherwise, use the given HTMLElement as popper
1340
- else {
1341
- this._popper = popper.jquery ? popper[0] : popper;
1342
- }
1343
-
1344
- // with {} we create a new object with the options inside it
1345
- this._options = Object.assign({}, DEFAULTS, options);
1346
-
1347
- // refactoring modifiers' list
1348
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
1349
- // remove ignored modifiers
1350
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
1351
-
1352
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
1353
- // margins needs to be calculated to get the correct popper offsets
1354
- if (modifier === 'applyStyle') {
1355
- this._popper.setAttribute('x-placement', this._options.placement);
1356
- }
1357
-
1358
- // return predefined modifier identified by string or keep the custom one
1359
- return this.modifiers[modifier] || modifier;
1360
- }.bind(this));
1361
-
1362
- // make sure to apply the popper position before any computation
1363
- this.state.position = this._getPosition(this._popper, this._reference);
1364
- setStyle(this._popper, { position: this.state.position, top: 0 });
1365
-
1366
- // fire the first update to position the popper in the right place
1367
- this.update();
1368
-
1369
- // setup event listeners, they will take care of update the position in specific situations
1370
- this._setupEventListeners();
1371
- return this;
1372
- }
1373
-
1374
- //
1375
- // Methods
1376
- //
1377
- /**
1378
- * Destroy the popper
1379
- * @method
1380
- * @memberof Popper
1381
- */
1382
- Popper.prototype.destroy = function () {
1383
- this._popper.removeAttribute('x-placement');
1384
- this._popper.style.left = '';
1385
- this._popper.style.position = '';
1386
- this._popper.style.top = '';
1387
- this._popper.style[getSupportedPropertyName('transform')] = '';
1388
- this._removeEventListeners();
1389
-
1390
- // remove the popper if user explicity asked for the deletion on destroy
1391
- if (this._options.removeOnDestroy) {
1392
- this._popper.remove();
1393
- }
1394
- return this;
1395
- };
1396
-
1397
- /**
1398
- * Updates the position of the popper, computing the new offsets and applying the new style
1399
- * @method
1400
- * @memberof Popper
1401
- */
1402
- Popper.prototype.update = function () {
1403
- var data = { instance: this, styles: {} };
1404
-
1405
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
1406
- // and refer to _originalPlacement to know the original value
1407
- data.placement = this._options.placement;
1408
- data._originalPlacement = this._options.placement;
1409
-
1410
- // compute the popper and reference offsets and put them inside data.offsets
1411
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
1412
-
1413
- // get boundaries
1414
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
1415
-
1416
- data = this.runModifiers(data, this._options.modifiers);
1417
-
1418
- if (typeof this.state.updateCallback === 'function') {
1419
- this.state.updateCallback(data);
1420
- }
1421
- };
1422
-
1423
- /**
1424
- * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
1425
- * @method
1426
- * @memberof Popper
1427
- * @param {Function} callback
1428
- */
1429
- Popper.prototype.onCreate = function (callback) {
1430
- // the createCallbacks return as first argument the popper instance
1431
- callback(this);
1432
- return this;
1433
- };
1434
-
1435
- /**
1436
- * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
1437
- * used to style popper and its arrow.
1438
- * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
1439
- * @method
1440
- * @memberof Popper
1441
- * @param {Function} callback
1442
- */
1443
- Popper.prototype.onUpdate = function (callback) {
1444
- this.state.updateCallback = callback;
1445
- return this;
1446
- };
1447
-
1448
- /**
1449
- * Helper used to generate poppers from a configuration file
1450
- * @method
1451
- * @memberof Popper
1452
- * @param config {Object} configuration
1453
- * @returns {HTMLElement} popper
1454
- */
1455
- Popper.prototype.parse = function (config) {
1456
- var defaultConfig = {
1457
- tagName: 'div',
1458
- classNames: ['popper'],
1459
- attributes: [],
1460
- parent: root.document.body,
1461
- content: '',
1462
- contentType: 'text',
1463
- arrowTagName: 'div',
1464
- arrowClassNames: ['popper__arrow'],
1465
- arrowAttributes: ['x-arrow']
1466
- };
1467
- config = Object.assign({}, defaultConfig, config);
1468
-
1469
- var d = root.document;
1470
-
1471
- var popper = d.createElement(config.tagName);
1472
- addClassNames(popper, config.classNames);
1473
- addAttributes(popper, config.attributes);
1474
- if (config.contentType === 'node') {
1475
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
1476
- } else if (config.contentType === 'html') {
1477
- popper.innerHTML = config.content;
1478
- } else {
1479
- popper.textContent = config.content;
1480
- }
1481
-
1482
- if (config.arrowTagName) {
1483
- var arrow = d.createElement(config.arrowTagName);
1484
- addClassNames(arrow, config.arrowClassNames);
1485
- addAttributes(arrow, config.arrowAttributes);
1486
- popper.appendChild(arrow);
1487
- }
1488
-
1489
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
1490
-
1491
- // if the given parent is a string, use it to match an element
1492
- // if more than one element is matched, the first one will be used as parent
1493
- // if no elements are matched, the script will throw an error
1494
- if (typeof parent === 'string') {
1495
- parent = d.querySelectorAll(config.parent);
1496
- if (parent.length > 1) {
1497
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
1498
- }
1499
- if (parent.length === 0) {
1500
- throw 'ERROR: the given `parent` doesn\'t exists!';
1501
- }
1502
- parent = parent[0];
1503
- }
1504
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
1505
- // the first one will be used as parent
1506
- if (parent.length > 1 && parent instanceof Element === false) {
1507
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
1508
- parent = parent[0];
1509
- }
1510
-
1511
- // append the generated popper to its parent
1512
- parent.appendChild(popper);
1513
-
1514
- return popper;
1515
-
1516
- /**
1517
- * Adds class names to the given element
1518
- * @function
1519
- * @ignore
1520
- * @param {HTMLElement} target
1521
- * @param {Array} classes
1522
- */
1523
- function addClassNames(element, classNames) {
1524
- classNames.forEach(function (className) {
1525
- element.classList.add(className);
1526
- });
1527
- }
1528
-
1529
- /**
1530
- * Adds attributes to the given element
1531
- * @function
1532
- * @ignore
1533
- * @param {HTMLElement} target
1534
- * @param {Array} attributes
1535
- * @example
1536
- * addAttributes(element, [ 'data-info:foobar' ]);
1537
- */
1538
- function addAttributes(element, attributes) {
1539
- attributes.forEach(function (attribute) {
1540
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
1541
- });
1542
- }
1543
- };
1544
-
1545
- /**
1546
- * Helper used to get the position which will be applied to the popper
1547
- * @method
1548
- * @memberof Popper
1549
- * @param config {HTMLElement} popper element
1550
- * @param reference {HTMLElement} reference element
1551
- * @returns {String} position
1552
- */
1553
- Popper.prototype._getPosition = function (popper, reference) {
1554
- var container = getOffsetParent(reference);
1555
-
1556
- if (this._options.forceAbsolute) {
1557
- return 'absolute';
1558
- }
1559
-
1560
- // Decide if the popper will be fixed
1561
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
1562
- var isParentFixed = isFixed(reference, container);
1563
- return isParentFixed ? 'fixed' : 'absolute';
1564
- };
1565
-
1566
- /**
1567
- * Get offsets to the popper
1568
- * @method
1569
- * @memberof Popper
1570
- * @access private
1571
- * @param {Element} popper - the popper element
1572
- * @param {Element} reference - the reference element (the popper will be relative to this)
1573
- * @returns {Object} An object containing the offsets which will be applied to the popper
1574
- */
1575
- Popper.prototype._getOffsets = function (popper, reference, placement) {
1576
- placement = placement.split('-')[0];
1577
- var popperOffsets = {};
1578
-
1579
- popperOffsets.position = this.state.position;
1580
- var isParentFixed = popperOffsets.position === 'fixed';
1581
-
1582
- //
1583
- // Get reference element position
1584
- //
1585
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
1586
-
1587
- //
1588
- // Get popper sizes
1589
- //
1590
- var popperRect = getOuterSizes(popper);
1591
-
1592
- //
1593
- // Compute offsets of popper
1594
- //
1595
-
1596
- // depending by the popper placement we have to compute its offsets slightly differently
1597
- if (['right', 'left'].indexOf(placement) !== -1) {
1598
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
1599
- if (placement === 'left') {
1600
- popperOffsets.left = referenceOffsets.left - popperRect.width;
1601
- } else {
1602
- popperOffsets.left = referenceOffsets.right;
1603
- }
1604
- } else {
1605
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
1606
- if (placement === 'top') {
1607
- popperOffsets.top = referenceOffsets.top - popperRect.height;
1608
- } else {
1609
- popperOffsets.top = referenceOffsets.bottom;
1610
- }
1611
- }
1612
-
1613
- // Add width and height to our offsets object
1614
- popperOffsets.width = popperRect.width;
1615
- popperOffsets.height = popperRect.height;
1616
-
1617
- return {
1618
- popper: popperOffsets,
1619
- reference: referenceOffsets
1620
- };
1621
- };
1622
-
1623
- /**
1624
- * Setup needed event listeners used to update the popper position
1625
- * @method
1626
- * @memberof Popper
1627
- * @access private
1628
- */
1629
- Popper.prototype._setupEventListeners = function () {
1630
- // NOTE: 1 DOM access here
1631
- this.state.updateBound = this.update.bind(this);
1632
- root.addEventListener('resize', this.state.updateBound);
1633
- // if the boundariesElement is window we don't need to listen for the scroll event
1634
- if (this._options.boundariesElement !== 'window') {
1635
- var target = getScrollParent(this._reference);
1636
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
1637
- if (target === root.document.body || target === root.document.documentElement) {
1638
- target = root;
1639
- }
1640
- target.addEventListener('scroll', this.state.updateBound);
1641
- this.state.scrollTarget = target;
1642
- }
1643
- };
1644
-
1645
- /**
1646
- * Remove event listeners used to update the popper position
1647
- * @method
1648
- * @memberof Popper
1649
- * @access private
1650
- */
1651
- Popper.prototype._removeEventListeners = function () {
1652
- // NOTE: 1 DOM access here
1653
- root.removeEventListener('resize', this.state.updateBound);
1654
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
1655
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
1656
- this.state.scrollTarget = null;
1657
- }
1658
- this.state.updateBound = null;
1659
- };
1660
-
1661
- /**
1662
- * Computed the boundaries limits and return them
1663
- * @method
1664
- * @memberof Popper
1665
- * @access private
1666
- * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
1667
- * @param {Number} padding - Boundaries padding
1668
- * @param {Element} boundariesElement - Element used to define the boundaries
1669
- * @returns {Object} Coordinates of the boundaries
1670
- */
1671
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
1672
- // NOTE: 1 DOM access here
1673
- var boundaries = {};
1674
- var width, height;
1675
- if (boundariesElement === 'window') {
1676
- var body = root.document.body,
1677
- html = root.document.documentElement;
1678
-
1679
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
1680
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
1681
-
1682
- boundaries = {
1683
- top: 0,
1684
- right: width,
1685
- bottom: height,
1686
- left: 0
1687
- };
1688
- } else if (boundariesElement === 'viewport') {
1689
- var offsetParent = getOffsetParent(this._popper);
1690
- var scrollParent = getScrollParent(this._popper);
1691
- var offsetParentRect = getOffsetRect(offsetParent);
1692
-
1693
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
1694
- var getScrollTopValue = function getScrollTopValue(element) {
1695
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
1696
- };
1697
- var getScrollLeftValue = function getScrollLeftValue(element) {
1698
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
1699
- };
1700
-
1701
- // if the popper is fixed we don't have to substract scrolling from the boundaries
1702
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
1703
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
1704
-
1705
- boundaries = {
1706
- top: 0 - (offsetParentRect.top - scrollTop),
1707
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
1708
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
1709
- left: 0 - (offsetParentRect.left - scrollLeft)
1710
- };
1711
- } else {
1712
- if (getOffsetParent(this._popper) === boundariesElement) {
1713
- boundaries = {
1714
- top: 0,
1715
- left: 0,
1716
- right: boundariesElement.clientWidth,
1717
- bottom: boundariesElement.clientHeight
1718
- };
1719
- } else {
1720
- boundaries = getOffsetRect(boundariesElement);
1721
- }
1722
- }
1723
- boundaries.left += padding;
1724
- boundaries.right -= padding;
1725
- boundaries.top = boundaries.top + padding;
1726
- boundaries.bottom = boundaries.bottom - padding;
1727
- return boundaries;
1728
- };
1729
-
1730
- /**
1731
- * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
1732
- * @method
1733
- * @memberof Popper
1734
- * @access public
1735
- * @param {Object} data
1736
- * @param {Array} modifiers
1737
- * @param {Function} ends
1738
- */
1739
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
1740
- var modifiersToRun = modifiers.slice();
1741
- if (ends !== undefined) {
1742
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
1743
- }
1744
-
1745
- modifiersToRun.forEach(function (modifier) {
1746
- if (isFunction(modifier)) {
1747
- data = modifier.call(this, data);
1748
- }
1749
- }.bind(this));
1750
-
1751
- return data;
1752
- };
1753
-
1754
- /**
1755
- * Helper used to know if the given modifier depends from another one.
1756
- * @method
1757
- * @memberof Popper
1758
- * @param {String} requesting - name of requesting modifier
1759
- * @param {String} requested - name of requested modifier
1760
- * @returns {Boolean}
1761
- */
1762
- Popper.prototype.isModifierRequired = function (requesting, requested) {
1763
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
1764
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
1765
- return modifier === requested;
1766
- }).length;
1767
- };
1768
-
1769
- //
1770
- // Modifiers
1771
- //
1772
-
1773
- /**
1774
- * Modifiers list
1775
- * @namespace Popper.modifiers
1776
- * @memberof Popper
1777
- * @type {Object}
1778
- */
1779
- Popper.prototype.modifiers = {};
1780
-
1781
- /**
1782
- * Apply the computed styles to the popper element
1783
- * @method
1784
- * @memberof Popper.modifiers
1785
- * @argument {Object} data - The data object generated by `update` method
1786
- * @returns {Object} The same data object
1787
- */
1788
- Popper.prototype.modifiers.applyStyle = function (data) {
1789
- // apply the final offsets to the popper
1790
- // NOTE: 1 DOM access here
1791
- var styles = {
1792
- position: data.offsets.popper.position
1793
- };
1794
-
1795
- // round top and left to avoid blurry text
1796
- var left = Math.round(data.offsets.popper.left);
1797
- var top = Math.round(data.offsets.popper.top);
1798
-
1799
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
1800
- // we automatically use the supported prefixed version if needed
1801
- var prefixedProperty;
1802
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
1803
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
1804
- styles.top = 0;
1805
- styles.left = 0;
1806
- }
1807
- // othwerise, we use the standard `left` and `top` properties
1808
- else {
1809
- styles.left = left;
1810
- styles.top = top;
1811
- }
1812
-
1813
- // any property present in `data.styles` will be applied to the popper,
1814
- // in this way we can make the 3rd party modifiers add custom styles to it
1815
- // Be aware, modifiers could override the properties defined in the previous
1816
- // lines of this modifier!
1817
- Object.assign(styles, data.styles);
1818
-
1819
- setStyle(this._popper, styles);
1820
-
1821
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
1822
- // NOTE: 1 DOM access here
1823
- this._popper.setAttribute('x-placement', data.placement);
1824
-
1825
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
1826
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
1827
- setStyle(data.arrowElement, data.offsets.arrow);
1828
- }
1829
-
1830
- return data;
1831
- };
1832
-
1833
- /**
1834
- * Modifier used to shift the popper on the start or end of its reference element side
1835
- * @method
1836
- * @memberof Popper.modifiers
1837
- * @argument {Object} data - The data object generated by `update` method
1838
- * @returns {Object} The data object, properly modified
1839
- */
1840
- Popper.prototype.modifiers.shift = function (data) {
1841
- var placement = data.placement;
1842
- var basePlacement = placement.split('-')[0];
1843
- var shiftVariation = placement.split('-')[1];
1844
-
1845
- // if shift shiftVariation is specified, run the modifier
1846
- if (shiftVariation) {
1847
- var reference = data.offsets.reference;
1848
- var popper = getPopperClientRect(data.offsets.popper);
1849
-
1850
- var shiftOffsets = {
1851
- y: {
1852
- start: { top: reference.top },
1853
- end: { top: reference.top + reference.height - popper.height }
1854
- },
1855
- x: {
1856
- start: { left: reference.left },
1857
- end: { left: reference.left + reference.width - popper.width }
1858
- }
1859
- };
1860
-
1861
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
1862
-
1863
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
1864
- }
1865
-
1866
- return data;
1867
- };
1868
-
1869
- /**
1870
- * Modifier used to make sure the popper does not overflows from it's boundaries
1871
- * @method
1872
- * @memberof Popper.modifiers
1873
- * @argument {Object} data - The data object generated by `update` method
1874
- * @returns {Object} The data object, properly modified
1875
- */
1876
- Popper.prototype.modifiers.preventOverflow = function (data) {
1877
- var order = this._options.preventOverflowOrder;
1878
- var popper = getPopperClientRect(data.offsets.popper);
1879
-
1880
- var check = {
1881
- left: function left() {
1882
- var left = popper.left;
1883
- if (popper.left < data.boundaries.left) {
1884
- left = Math.max(popper.left, data.boundaries.left);
1885
- }
1886
- return { left: left };
1887
- },
1888
- right: function right() {
1889
- var left = popper.left;
1890
- if (popper.right > data.boundaries.right) {
1891
- left = Math.min(popper.left, data.boundaries.right - popper.width);
1892
- }
1893
- return { left: left };
1894
- },
1895
- top: function top() {
1896
- var top = popper.top;
1897
- if (popper.top < data.boundaries.top) {
1898
- top = Math.max(popper.top, data.boundaries.top);
1899
- }
1900
- return { top: top };
1901
- },
1902
- bottom: function bottom() {
1903
- var top = popper.top;
1904
- if (popper.bottom > data.boundaries.bottom) {
1905
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
1906
- }
1907
- return { top: top };
1908
- }
1909
- };
1910
-
1911
- order.forEach(function (direction) {
1912
- data.offsets.popper = Object.assign(popper, check[direction]());
1913
- });
1914
-
1915
- return data;
1916
- };
1917
-
1918
- /**
1919
- * Modifier used to make sure the popper is always near its reference
1920
- * @method
1921
- * @memberof Popper.modifiers
1922
- * @argument {Object} data - The data object generated by _update method
1923
- * @returns {Object} The data object, properly modified
1924
- */
1925
- Popper.prototype.modifiers.keepTogether = function (data) {
1926
- var popper = getPopperClientRect(data.offsets.popper);
1927
- var reference = data.offsets.reference;
1928
- var f = Math.floor;
1929
-
1930
- if (popper.right < f(reference.left)) {
1931
- data.offsets.popper.left = f(reference.left) - popper.width;
1932
- }
1933
- if (popper.left > f(reference.right)) {
1934
- data.offsets.popper.left = f(reference.right);
1935
- }
1936
- if (popper.bottom < f(reference.top)) {
1937
- data.offsets.popper.top = f(reference.top) - popper.height;
1938
- }
1939
- if (popper.top > f(reference.bottom)) {
1940
- data.offsets.popper.top = f(reference.bottom);
1941
- }
1942
-
1943
- return data;
1944
- };
1945
-
1946
- /**
1947
- * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
1948
- * Requires the `preventOverflow` modifier before it in order to work.
1949
- * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
1950
- * @method
1951
- * @memberof Popper.modifiers
1952
- * @argument {Object} data - The data object generated by _update method
1953
- * @returns {Object} The data object, properly modified
1954
- */
1955
- Popper.prototype.modifiers.flip = function (data) {
1956
- // check if preventOverflow is in the list of modifiers before the flip modifier.
1957
- // otherwise flip would not work as expected.
1958
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
1959
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
1960
- return data;
1961
- }
1962
-
1963
- if (data.flipped && data.placement === data._originalPlacement) {
1964
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
1965
- return data;
1966
- }
1967
-
1968
- var placement = data.placement.split('-')[0];
1969
- var placementOpposite = getOppositePlacement(placement);
1970
- var variation = data.placement.split('-')[1] || '';
1971
-
1972
- var flipOrder = [];
1973
- if (this._options.flipBehavior === 'flip') {
1974
- flipOrder = [placement, placementOpposite];
1975
- } else {
1976
- flipOrder = this._options.flipBehavior;
1977
- }
1978
-
1979
- flipOrder.forEach(function (step, index) {
1980
- if (placement !== step || flipOrder.length === index + 1) {
1981
- return;
1982
- }
1983
-
1984
- placement = data.placement.split('-')[0];
1985
- placementOpposite = getOppositePlacement(placement);
1986
-
1987
- var popperOffsets = getPopperClientRect(data.offsets.popper);
1988
-
1989
- // this boolean is used to distinguish right and bottom from top and left
1990
- // they need different computations to get flipped
1991
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
1992
-
1993
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
1994
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
1995
- // we'll use this boolean to detect any flip loop
1996
- data.flipped = true;
1997
- data.placement = flipOrder[index + 1];
1998
- if (variation) {
1999
- data.placement += '-' + variation;
2000
- }
2001
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
2002
-
2003
- data = this.runModifiers(data, this._options.modifiers, this._flip);
2004
- }
2005
- }.bind(this));
2006
- return data;
2007
- };
2008
-
2009
- /**
2010
- * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
2011
- * The offsets will shift the popper on the side of its reference element.
2012
- * @method
2013
- * @memberof Popper.modifiers
2014
- * @argument {Object} data - The data object generated by _update method
2015
- * @returns {Object} The data object, properly modified
2016
- */
2017
- Popper.prototype.modifiers.offset = function (data) {
2018
- var offset = this._options.offset;
2019
- var popper = data.offsets.popper;
2020
-
2021
- if (data.placement.indexOf('left') !== -1) {
2022
- popper.top -= offset;
2023
- } else if (data.placement.indexOf('right') !== -1) {
2024
- popper.top += offset;
2025
- } else if (data.placement.indexOf('top') !== -1) {
2026
- popper.left -= offset;
2027
- } else if (data.placement.indexOf('bottom') !== -1) {
2028
- popper.left += offset;
2029
- }
2030
- return data;
2031
- };
2032
-
2033
- /**
2034
- * 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
2035
- * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
2036
- * @method
2037
- * @memberof Popper.modifiers
2038
- * @argument {Object} data - The data object generated by _update method
2039
- * @returns {Object} The data object, properly modified
2040
- */
2041
- Popper.prototype.modifiers.arrow = function (data) {
2042
- var arrow = this._options.arrowElement;
2043
- var arrowOffset = this._options.arrowOffset;
2044
-
2045
- // if the arrowElement is a string, suppose it's a CSS selector
2046
- if (typeof arrow === 'string') {
2047
- arrow = this._popper.querySelector(arrow);
2048
- }
2049
-
2050
- // if arrow element is not found, don't run the modifier
2051
- if (!arrow) {
2052
- return data;
2053
- }
2054
-
2055
- // the arrow element must be child of its popper
2056
- if (!this._popper.contains(arrow)) {
2057
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
2058
- return data;
2059
- }
2060
-
2061
- // arrow depends on keepTogether in order to work
2062
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
2063
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
2064
- return data;
2065
- }
2066
-
2067
- var arrowStyle = {};
2068
- var placement = data.placement.split('-')[0];
2069
- var popper = getPopperClientRect(data.offsets.popper);
2070
- var reference = data.offsets.reference;
2071
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2072
-
2073
- var len = isVertical ? 'height' : 'width';
2074
- var side = isVertical ? 'top' : 'left';
2075
- var translate = isVertical ? 'translateY' : 'translateX';
2076
- var altSide = isVertical ? 'left' : 'top';
2077
- var opSide = isVertical ? 'bottom' : 'right';
2078
- var arrowSize = getOuterSizes(arrow)[len];
2079
-
2080
- //
2081
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
2082
- //
2083
-
2084
- // top/left side
2085
- if (reference[opSide] - arrowSize < popper[side]) {
2086
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
2087
- }
2088
- // bottom/right side
2089
- if (reference[side] + arrowSize > popper[opSide]) {
2090
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
2091
- }
2092
-
2093
- // compute center of the popper
2094
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
2095
-
2096
- var sideValue = center - popper[side];
2097
-
2098
- // prevent arrow from being placed not contiguously to its popper
2099
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
2100
- arrowStyle[side] = sideValue;
2101
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
2102
-
2103
- data.offsets.arrow = arrowStyle;
2104
- data.arrowElement = arrow;
2105
-
2106
- return data;
2107
- };
2108
-
2109
- //
2110
- // Helpers
2111
- //
2112
-
2113
- /**
2114
- * Get the outer sizes of the given element (offset size + margins)
2115
- * @function
2116
- * @ignore
2117
- * @argument {Element} element
2118
- * @returns {Object} object containing width and height properties
2119
- */
2120
- function getOuterSizes(element) {
2121
- // NOTE: 1 DOM access here
2122
- var _display = element.style.display,
2123
- _visibility = element.style.visibility;
2124
- element.style.display = 'block';element.style.visibility = 'hidden';
2125
- var calcWidthToForceRepaint = element.offsetWidth;
2126
-
2127
- // original method
2128
- var styles = root.getComputedStyle(element);
2129
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2130
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2131
- var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
2132
-
2133
- // reset element styles
2134
- element.style.display = _display;element.style.visibility = _visibility;
2135
- return result;
2136
- }
2137
-
2138
- /**
2139
- * Get the opposite placement of the given one/
2140
- * @function
2141
- * @ignore
2142
- * @argument {String} placement
2143
- * @returns {String} flipped placement
2144
- */
2145
- function getOppositePlacement(placement) {
2146
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2147
- return placement.replace(/left|right|bottom|top/g, function (matched) {
2148
- return hash[matched];
2149
- });
2150
- }
2151
-
2152
- /**
2153
- * Given the popper offsets, generate an output similar to getBoundingClientRect
2154
- * @function
2155
- * @ignore
2156
- * @argument {Object} popperOffsets
2157
- * @returns {Object} ClientRect like output
2158
- */
2159
- function getPopperClientRect(popperOffsets) {
2160
- var offsets = Object.assign({}, popperOffsets);
2161
- offsets.right = offsets.left + offsets.width;
2162
- offsets.bottom = offsets.top + offsets.height;
2163
- return offsets;
2164
- }
2165
-
2166
- /**
2167
- * Given an array and the key to find, returns its index
2168
- * @function
2169
- * @ignore
2170
- * @argument {Array} arr
2171
- * @argument keyToFind
2172
- * @returns index or null
2173
- */
2174
- function getArrayKeyIndex(arr, keyToFind) {
2175
- var i = 0,
2176
- key;
2177
- for (key in arr) {
2178
- if (arr[key] === keyToFind) {
2179
- return i;
2180
- }
2181
- i++;
2182
- }
2183
- return null;
2184
- }
2185
-
2186
- /**
2187
- * Get CSS computed property of the given element
2188
- * @function
2189
- * @ignore
2190
- * @argument {Eement} element
2191
- * @argument {String} property
2192
- */
2193
- function getStyleComputedProperty(element, property) {
2194
- // NOTE: 1 DOM access here
2195
- var css = root.getComputedStyle(element, null);
2196
- return css[property];
2197
- }
2198
-
2199
- /**
2200
- * Returns the offset parent of the given element
2201
- * @function
2202
- * @ignore
2203
- * @argument {Element} element
2204
- * @returns {Element} offset parent
2205
- */
2206
- function getOffsetParent(element) {
2207
- // NOTE: 1 DOM access here
2208
- var offsetParent = element.offsetParent;
2209
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
2210
- }
2211
-
2212
- /**
2213
- * Returns the scrolling parent of the given element
2214
- * @function
2215
- * @ignore
2216
- * @argument {Element} element
2217
- * @returns {Element} offset parent
2218
- */
2219
- function getScrollParent(element) {
2220
- var parent = element.parentNode;
2221
-
2222
- if (!parent) {
2223
- return element;
2224
- }
2225
-
2226
- if (parent === root.document) {
2227
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
2228
- // greater than 0 and return the proper element
2229
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
2230
- return root.document.body;
2231
- } else {
2232
- return root.document.documentElement;
2233
- }
2234
- }
2235
-
2236
- // Firefox want us to check `-x` and `-y` variations as well
2237
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
2238
- // If the detected scrollParent is body, we perform an additional check on its parentNode
2239
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
2240
- // fixes issue #65
2241
- return parent;
2242
- }
2243
- return getScrollParent(element.parentNode);
2244
- }
2245
-
2246
- /**
2247
- * Check if the given element is fixed or is inside a fixed parent
2248
- * @function
2249
- * @ignore
2250
- * @argument {Element} element
2251
- * @argument {Element} customContainer
2252
- * @returns {Boolean} answer to "isFixed?"
2253
- */
2254
- function isFixed(element) {
2255
- if (element === root.document.body) {
2256
- return false;
2257
- }
2258
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
2259
- return true;
2260
- }
2261
- return element.parentNode ? isFixed(element.parentNode) : element;
2262
- }
2263
-
2264
- /**
2265
- * Set the style to the given popper
2266
- * @function
2267
- * @ignore
2268
- * @argument {Element} element - Element to apply the style to
2269
- * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
2270
- */
2271
- function setStyle(element, styles) {
2272
- function is_numeric(n) {
2273
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2274
- }
2275
- Object.keys(styles).forEach(function (prop) {
2276
- var unit = '';
2277
- // add unit if the value is numeric and is one of the following
2278
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
2279
- unit = 'px';
2280
- }
2281
- element.style[prop] = styles[prop] + unit;
2282
- });
2283
- }
2284
-
2285
- /**
2286
- * Check if the given variable is a function
2287
- * @function
2288
- * @ignore
2289
- * @argument {*} functionToCheck - variable to check
2290
- * @returns {Boolean} answer to: is a function?
2291
- */
2292
- function isFunction(functionToCheck) {
2293
- var getType = {};
2294
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
2295
- }
2296
-
2297
- /**
2298
- * Get the position of the given element, relative to its offset parent
2299
- * @function
2300
- * @ignore
2301
- * @param {Element} element
2302
- * @return {Object} position - Coordinates of the element and its `scrollTop`
2303
- */
2304
- function getOffsetRect(element) {
2305
- var elementRect = {
2306
- width: element.offsetWidth,
2307
- height: element.offsetHeight,
2308
- left: element.offsetLeft,
2309
- top: element.offsetTop
2310
- };
2311
-
2312
- elementRect.right = elementRect.left + elementRect.width;
2313
- elementRect.bottom = elementRect.top + elementRect.height;
2314
-
2315
- // position
2316
- return elementRect;
2317
- }
2318
-
2319
- /**
2320
- * Get bounding client rect of given element
2321
- * @function
2322
- * @ignore
2323
- * @param {HTMLElement} element
2324
- * @return {Object} client rect
2325
- */
2326
- function getBoundingClientRect(element) {
2327
- var rect = element.getBoundingClientRect();
2328
-
2329
- // whether the IE version is lower than 11
2330
- var isIE = navigator.userAgent.indexOf("MSIE") != -1;
2331
-
2332
- // fix ie document bounding top always 0 bug
2333
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
2334
-
2335
- return {
2336
- left: rect.left,
2337
- top: rectTop,
2338
- right: rect.right,
2339
- bottom: rect.bottom,
2340
- width: rect.right - rect.left,
2341
- height: rect.bottom - rectTop
2342
- };
2343
- }
2344
-
2345
- /**
2346
- * Given an element and one of its parents, return the offset
2347
- * @function
2348
- * @ignore
2349
- * @param {HTMLElement} element
2350
- * @param {HTMLElement} parent
2351
- * @return {Object} rect
2352
- */
2353
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
2354
- var elementRect = getBoundingClientRect(element);
2355
- var parentRect = getBoundingClientRect(parent);
2356
-
2357
- if (fixed) {
2358
- var scrollParent = getScrollParent(parent);
2359
- parentRect.top += scrollParent.scrollTop;
2360
- parentRect.bottom += scrollParent.scrollTop;
2361
- parentRect.left += scrollParent.scrollLeft;
2362
- parentRect.right += scrollParent.scrollLeft;
2363
- }
2364
-
2365
- var rect = {
2366
- top: elementRect.top - parentRect.top,
2367
- left: elementRect.left - parentRect.left,
2368
- bottom: elementRect.top - parentRect.top + elementRect.height,
2369
- right: elementRect.left - parentRect.left + elementRect.width,
2370
- width: elementRect.width,
2371
- height: elementRect.height
2372
- };
2373
- return rect;
2374
- }
2375
-
2376
- /**
2377
- * Get the prefixed supported property name
2378
- * @function
2379
- * @ignore
2380
- * @argument {String} property (camelCase)
2381
- * @returns {String} prefixed property (camelCase)
2382
- */
2383
- function getSupportedPropertyName(property) {
2384
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
2385
-
2386
- for (var i = 0; i < prefixes.length; i++) {
2387
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
2388
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
2389
- return toCheck;
2390
- }
2391
- }
2392
- return null;
2393
- }
2394
-
2395
- /**
2396
- * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
2397
- * objects to a target object. It will return the target object.
2398
- * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
2399
- * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2400
- * @function
2401
- * @ignore
2402
- */
2403
- if (!Object.assign) {
2404
- Object.defineProperty(Object, 'assign', {
2405
- enumerable: false,
2406
- configurable: true,
2407
- writable: true,
2408
- value: function value(target) {
2409
- if (target === undefined || target === null) {
2410
- throw new TypeError('Cannot convert first argument to object');
2411
- }
2412
-
2413
- var to = Object(target);
2414
- for (var i = 1; i < arguments.length; i++) {
2415
- var nextSource = arguments[i];
2416
- if (nextSource === undefined || nextSource === null) {
2417
- continue;
2418
- }
2419
- nextSource = Object(nextSource);
2420
-
2421
- var keysArray = Object.keys(nextSource);
2422
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
2423
- var nextKey = keysArray[nextIndex];
2424
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
2425
- if (desc !== undefined && desc.enumerable) {
2426
- to[nextKey] = nextSource[nextKey];
2427
- }
2428
- }
2429
- }
2430
- return to;
2431
- }
2432
- });
2433
- }
2434
-
2435
- return Popper;
2436
- });
2437
-
2438
- /***/ }),
2439
-
2440
- /***/ 26:
2441
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2442
-
2443
- "use strict";
2444
- // ESM COMPAT FLAG
2445
- __webpack_require__.r(__webpack_exports__);
2446
-
2447
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=507ff861
2448
- var render = function render() {
2449
- var _vm = this,
2450
- _c = _vm._self._c
2451
- return _c(
2452
- "label",
2453
- {
2454
- staticClass: "el-checkbox",
2455
- class: [
2456
- _vm.border && _vm.checkboxSize
2457
- ? "el-checkbox--" + _vm.checkboxSize
2458
- : "",
2459
- { "is-disabled": _vm.isDisabled },
2460
- { "is-bordered": _vm.border },
2461
- { "is-checked": _vm.isChecked },
2462
- ],
2463
- attrs: { id: _vm.id },
2464
- },
2465
- [
2466
- _c(
2467
- "span",
2468
- {
2469
- staticClass: "el-checkbox__input",
2470
- class: {
2471
- "is-disabled": _vm.isDisabled,
2472
- "is-checked": _vm.isChecked,
2473
- "is-indeterminate": _vm.indeterminate,
2474
- "is-focus": _vm.focus,
2475
- },
2476
- attrs: {
2477
- tabindex: _vm.indeterminate ? 0 : false,
2478
- role: _vm.indeterminate ? "checkbox" : false,
2479
- "aria-checked": _vm.indeterminate ? "mixed" : false,
2480
- },
2481
- },
2482
- [
2483
- _c("span", { staticClass: "el-checkbox__inner" }),
2484
- _vm.trueLabel || _vm.falseLabel
2485
- ? _c("input", {
2486
- directives: [
2487
- {
2488
- name: "model",
2489
- rawName: "v-model",
2490
- value: _vm.model,
2491
- expression: "model",
2492
- },
2493
- ],
2494
- staticClass: "el-checkbox__original",
2495
- attrs: {
2496
- type: "checkbox",
2497
- "aria-hidden": _vm.indeterminate ? "true" : "false",
2498
- name: _vm.name,
2499
- disabled: _vm.isDisabled,
2500
- "true-value": _vm.trueLabel,
2501
- "false-value": _vm.falseLabel,
2502
- },
2503
- domProps: {
2504
- checked: Array.isArray(_vm.model)
2505
- ? _vm._i(_vm.model, null) > -1
2506
- : _vm._q(_vm.model, _vm.trueLabel),
2507
- },
2508
- on: {
2509
- change: [
2510
- function ($event) {
2511
- var $$a = _vm.model,
2512
- $$el = $event.target,
2513
- $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
2514
- if (Array.isArray($$a)) {
2515
- var $$v = null,
2516
- $$i = _vm._i($$a, $$v)
2517
- if ($$el.checked) {
2518
- $$i < 0 && (_vm.model = $$a.concat([$$v]))
2519
- } else {
2520
- $$i > -1 &&
2521
- (_vm.model = $$a
2522
- .slice(0, $$i)
2523
- .concat($$a.slice($$i + 1)))
2524
- }
2525
- } else {
2526
- _vm.model = $$c
2527
- }
2528
- },
2529
- _vm.handleChange,
2530
- ],
2531
- focus: function ($event) {
2532
- _vm.focus = true
2533
- },
2534
- blur: function ($event) {
2535
- _vm.focus = false
2536
- },
2537
- },
2538
- })
2539
- : _c("input", {
2540
- directives: [
2541
- {
2542
- name: "model",
2543
- rawName: "v-model",
2544
- value: _vm.model,
2545
- expression: "model",
2546
- },
2547
- ],
2548
- staticClass: "el-checkbox__original",
2549
- attrs: {
2550
- type: "checkbox",
2551
- "aria-hidden": _vm.indeterminate ? "true" : "false",
2552
- disabled: _vm.isDisabled,
2553
- name: _vm.name,
2554
- },
2555
- domProps: {
2556
- value: _vm.label,
2557
- checked: Array.isArray(_vm.model)
2558
- ? _vm._i(_vm.model, _vm.label) > -1
2559
- : _vm.model,
2560
- },
2561
- on: {
2562
- change: [
2563
- function ($event) {
2564
- var $$a = _vm.model,
2565
- $$el = $event.target,
2566
- $$c = $$el.checked ? true : false
2567
- if (Array.isArray($$a)) {
2568
- var $$v = _vm.label,
2569
- $$i = _vm._i($$a, $$v)
2570
- if ($$el.checked) {
2571
- $$i < 0 && (_vm.model = $$a.concat([$$v]))
2572
- } else {
2573
- $$i > -1 &&
2574
- (_vm.model = $$a
2575
- .slice(0, $$i)
2576
- .concat($$a.slice($$i + 1)))
2577
- }
2578
- } else {
2579
- _vm.model = $$c
2580
- }
2581
- },
2582
- _vm.handleChange,
2583
- ],
2584
- focus: function ($event) {
2585
- _vm.focus = true
2586
- },
2587
- blur: function ($event) {
2588
- _vm.focus = false
2589
- },
2590
- },
2591
- }),
2592
- ]
2593
- ),
2594
- _vm.$slots.default || _vm.label
2595
- ? _c(
2596
- "span",
2597
- { staticClass: "el-checkbox__label" },
2598
- [
2599
- _vm._t("default"),
2600
- !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e(),
2601
- ],
2602
- 2
2603
- )
2604
- : _vm._e(),
2605
- ]
2606
- )
2607
- }
2608
- var staticRenderFns = []
2609
- render._withStripped = true
2610
-
2611
-
2612
- // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=507ff861
2613
-
2614
- // EXTERNAL MODULE: ./src/mixins/emitter.js
2615
- var emitter = __webpack_require__(6);
2616
-
2617
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js
2618
-
2619
-
2620
-
2621
- /* harmony default export */ var checkboxvue_type_script_lang_js = ({
2622
- name: 'ElCheckbox',
2623
-
2624
- mixins: [emitter["a" /* default */]],
2625
-
2626
- inject: {
2627
- elForm: {
2628
- default: ''
2629
- },
2630
- elFormItem: {
2631
- default: ''
2632
- }
2633
- },
2634
-
2635
- componentName: 'ElCheckbox',
2636
-
2637
- data: function data() {
2638
- return {
2639
- selfModel: false,
2640
- focus: false,
2641
- isLimitExceeded: false
2642
- };
2643
- },
2644
-
2645
-
2646
- computed: {
2647
- model: {
2648
- get: function get() {
2649
- return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
2650
- },
2651
- set: function set(val) {
2652
- if (this.isGroup) {
2653
- this.isLimitExceeded = false;
2654
- this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
2655
-
2656
- this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
2657
-
2658
- this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
2659
- } else {
2660
- this.$emit('input', val);
2661
- this.selfModel = val;
2662
- }
2663
- }
2664
- },
2665
-
2666
- isChecked: function isChecked() {
2667
- if ({}.toString.call(this.model) === '[object Boolean]') {
2668
- return this.model;
2669
- } else if (Array.isArray(this.model)) {
2670
- return this.model.indexOf(this.label) > -1;
2671
- } else if (this.model !== null && this.model !== undefined) {
2672
- return this.model === this.trueLabel;
2673
- }
2674
- },
2675
- isGroup: function isGroup() {
2676
- var parent = this.$parent;
2677
- while (parent) {
2678
- if (parent.$options.componentName !== 'ElCheckboxGroup') {
2679
- parent = parent.$parent;
2680
- } else {
2681
- this._checkboxGroup = parent;
2682
- return true;
2683
- }
2684
- }
2685
- return false;
2686
- },
2687
- store: function store() {
2688
- return this._checkboxGroup ? this._checkboxGroup.value : this.value;
2689
- },
2690
-
2691
-
2692
- /* used to make the isDisabled judgment under max/min props */
2693
- isLimitDisabled: function isLimitDisabled() {
2694
- var _checkboxGroup = this._checkboxGroup,
2695
- max = _checkboxGroup.max,
2696
- min = _checkboxGroup.min;
2697
-
2698
- return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
2699
- },
2700
- isDisabled: function isDisabled() {
2701
- return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
2702
- },
2703
- _elFormItemSize: function _elFormItemSize() {
2704
- return (this.elFormItem || {}).elFormItemSize;
2705
- },
2706
- checkboxSize: function checkboxSize() {
2707
- var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2708
- return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
2709
- }
2710
- },
2711
-
2712
- props: {
2713
- value: {},
2714
- label: {},
2715
- indeterminate: Boolean,
2716
- disabled: Boolean,
2717
- checked: Boolean,
2718
- name: String,
2719
- trueLabel: [String, Number],
2720
- falseLabel: [String, Number],
2721
- id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
2722
- controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
2723
- border: Boolean,
2724
- size: String
2725
- },
2726
-
2727
- methods: {
2728
- addToStore: function addToStore() {
2729
- if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
2730
- this.model.push(this.label);
2731
- } else {
2732
- this.model = this.trueLabel || true;
2733
- }
2734
- },
2735
- handleChange: function handleChange(ev) {
2736
- var _this = this;
2737
-
2738
- if (this.isLimitExceeded) return;
2739
- var value = void 0;
2740
- if (ev.target.checked) {
2741
- value = this.trueLabel === undefined ? true : this.trueLabel;
2742
- } else {
2743
- value = this.falseLabel === undefined ? false : this.falseLabel;
2744
- }
2745
- this.$emit('change', value, ev);
2746
- this.$nextTick(function () {
2747
- if (_this.isGroup) {
2748
- _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
2749
- }
2750
- });
2751
- }
2752
- },
2753
-
2754
- created: function created() {
2755
- this.checked && this.addToStore();
2756
- },
2757
- mounted: function mounted() {
2758
- // 为indeterminate元素 添加aria-controls 属性
2759
- if (this.indeterminate) {
2760
- this.$el.setAttribute('aria-controls', this.controls);
2761
- }
2762
- },
2763
-
2764
-
2765
- watch: {
2766
- value: function value(_value) {
2767
- this.dispatch('ElFormItem', 'el.form.change', _value);
2768
- }
2769
- }
2770
- });
2771
- // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js
2772
- /* harmony default export */ var src_checkboxvue_type_script_lang_js = (checkboxvue_type_script_lang_js);
2773
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2774
- var componentNormalizer = __webpack_require__(2);
2775
-
2776
- // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
2777
-
2778
-
2779
-
2780
-
2781
-
2782
- /* normalize component */
2783
-
2784
- var component = Object(componentNormalizer["a" /* default */])(
2785
- src_checkboxvue_type_script_lang_js,
2786
- render,
2787
- staticRenderFns,
2788
- false,
2789
- null,
2790
- null,
2791
- null
2792
-
2793
- )
2794
-
2795
- /* harmony default export */ var src_checkbox = (component.exports);
2796
- // CONCATENATED MODULE: ./packages/checkbox/index.js
2797
-
2798
-
2799
- /* istanbul ignore next */
2800
- src_checkbox.install = function (Vue) {
2801
- Vue.component(src_checkbox.name, src_checkbox);
2802
- };
2803
-
2804
- /* harmony default export */ var packages_checkbox = __webpack_exports__["default"] = (src_checkbox);
2805
-
2806
- /***/ }),
2807
-
2808
- /***/ 3:
2809
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2810
-
2811
- "use strict";
2812
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
2813
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
2814
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
2815
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
2816
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
2817
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
2818
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
2819
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
2820
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
2821
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
2822
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
2823
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
2824
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
2825
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
2826
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
2827
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
2828
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
2829
- /* unused harmony export looseEqual */
2830
- /* unused harmony export arrayEquals */
2831
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
2832
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
2833
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
2834
- /* unused harmony export objToArray */
2835
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
2836
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2837
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2838
- /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
2839
- 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; };
2840
-
2841
-
2842
-
2843
-
2844
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2845
-
2846
- function noop() {};
2847
-
2848
- function hasOwn(obj, key) {
2849
- return hasOwnProperty.call(obj, key);
2850
- };
2851
-
2852
- function extend(to, _from) {
2853
- for (var key in _from) {
2854
- to[key] = _from[key];
2855
- }
2856
- return to;
2857
- };
2858
-
2859
- function toObject(arr) {
2860
- var res = {};
2861
- for (var i = 0; i < arr.length; i++) {
2862
- if (arr[i]) {
2863
- extend(res, arr[i]);
2864
- }
2865
- }
2866
- return res;
2867
- };
2868
-
2869
- var getValueByPath = function getValueByPath(object, prop) {
2870
- prop = prop || '';
2871
- var paths = prop.split('.');
2872
- var current = object;
2873
- var result = null;
2874
- for (var i = 0, j = paths.length; i < j; i++) {
2875
- var path = paths[i];
2876
- if (!current) break;
2877
-
2878
- if (i === j - 1) {
2879
- result = current[path];
2880
- break;
2881
- }
2882
- current = current[path];
2883
- }
2884
- return result;
2885
- };
2886
-
2887
- function getPropByPath(obj, path, strict) {
2888
- var tempObj = obj;
2889
- path = path.replace(/\[(\w+)\]/g, '.$1');
2890
- path = path.replace(/^\./, '');
2891
-
2892
- var keyArr = path.split('.');
2893
- var i = 0;
2894
- for (var len = keyArr.length; i < len - 1; ++i) {
2895
- if (!tempObj && !strict) break;
2896
- var key = keyArr[i];
2897
- if (key in tempObj) {
2898
- tempObj = tempObj[key];
2899
- } else {
2900
- if (strict) {
2901
- throw new Error('please transfer a valid prop path to form item!');
2902
- }
2903
- break;
2904
- }
2905
- }
2906
- return {
2907
- o: tempObj,
2908
- k: keyArr[i],
2909
- v: tempObj ? tempObj[keyArr[i]] : null
2910
- };
2911
- };
2912
-
2913
- var generateId = function generateId() {
2914
- return Math.floor(Math.random() * 10000);
2915
- };
2916
-
2917
- var valueEquals = function valueEquals(a, b) {
2918
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
2919
- if (a === b) return true;
2920
- if (!(a instanceof Array)) return false;
2921
- if (!(b instanceof Array)) return false;
2922
- if (a.length !== b.length) return false;
2923
- for (var i = 0; i !== a.length; ++i) {
2924
- if (a[i] !== b[i]) return false;
2925
- }
2926
- return true;
2927
- };
2928
-
2929
- var escapeRegexpString = function escapeRegexpString() {
2930
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
2931
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
2932
- };
2933
-
2934
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
2935
- var arrayFindIndex = function arrayFindIndex(arr, pred) {
2936
- for (var i = 0; i !== arr.length; ++i) {
2937
- if (pred(arr[i])) {
2938
- return i;
2939
- }
2940
- }
2941
- return -1;
2942
- };
2943
-
2944
- var arrayFind = function arrayFind(arr, pred) {
2945
- var idx = arrayFindIndex(arr, pred);
2946
- return idx !== -1 ? arr[idx] : undefined;
2947
- };
2948
-
2949
- // coerce truthy value to array
2950
- var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
2951
- if (Array.isArray(val)) {
2952
- return val;
2953
- } else if (val) {
2954
- return [val];
2955
- } else {
2956
- return [];
2957
- }
2958
- };
2959
-
2960
- var isIE = function isIE() {
2961
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
2962
- };
2963
-
2964
- var isEdge = function isEdge() {
2965
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
2966
- };
2967
-
2968
- var isFirefox = function isFirefox() {
2969
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
2970
- };
2971
-
2972
- var autoprefixer = function autoprefixer(style) {
2973
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
2974
- var rules = ['transform', 'transition', 'animation'];
2975
- var prefixes = ['ms-', 'webkit-'];
2976
- rules.forEach(function (rule) {
2977
- var value = style[rule];
2978
- if (rule && value) {
2979
- prefixes.forEach(function (prefix) {
2980
- style[prefix + rule] = value;
2981
- });
2982
- }
2983
- });
2984
- return style;
2985
- };
2986
-
2987
- var kebabCase = function kebabCase(str) {
2988
- var hyphenateRE = /([^-])([A-Z])/g;
2989
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
2990
- };
2991
-
2992
- var capitalize = function capitalize(str) {
2993
- if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
2994
- return str.charAt(0).toUpperCase() + str.slice(1);
2995
- };
2996
-
2997
- var looseEqual = function looseEqual(a, b) {
2998
- var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
2999
- var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
3000
- if (isObjectA && isObjectB) {
3001
- return JSON.stringify(a) === JSON.stringify(b);
3002
- } else if (!isObjectA && !isObjectB) {
3003
- return String(a) === String(b);
3004
- } else {
3005
- return false;
3006
- }
3007
- };
3008
-
3009
- var arrayEquals = function arrayEquals(arrayA, arrayB) {
3010
- arrayA = arrayA || [];
3011
- arrayB = arrayB || [];
3012
-
3013
- if (arrayA.length !== arrayB.length) {
3014
- return false;
3015
- }
3016
-
3017
- for (var i = 0; i < arrayA.length; i++) {
3018
- if (!looseEqual(arrayA[i], arrayB[i])) {
3019
- return false;
3020
- }
3021
- }
3022
-
3023
- return true;
3024
- };
3025
-
3026
- var isEqual = function isEqual(value1, value2) {
3027
- if (Array.isArray(value1) && Array.isArray(value2)) {
3028
- return arrayEquals(value1, value2);
3029
- }
3030
- return looseEqual(value1, value2);
3031
- };
3032
-
3033
- var isEmpty = function isEmpty(val) {
3034
- // null or undefined
3035
- if (val == null) return true;
3036
-
3037
- if (typeof val === 'boolean') return false;
3038
-
3039
- if (typeof val === 'number') return !val;
3040
-
3041
- if (val instanceof Error) return val.message === '';
3042
-
3043
- switch (Object.prototype.toString.call(val)) {
3044
- // String or Array
3045
- case '[object String]':
3046
- case '[object Array]':
3047
- return !val.length;
3048
-
3049
- // Map or Set or File
3050
- case '[object File]':
3051
- case '[object Map]':
3052
- case '[object Set]':
3053
- {
3054
- return !val.size;
3055
- }
3056
- // Plain Object
3057
- case '[object Object]':
3058
- {
3059
- return !Object.keys(val).length;
3060
- }
3061
- }
3062
-
3063
- return false;
3064
- };
3065
-
3066
- function rafThrottle(fn) {
3067
- var locked = false;
3068
- return function () {
3069
- var _this = this;
3070
-
3071
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
3072
- args[_key] = arguments[_key];
3073
- }
3074
-
3075
- if (locked) return;
3076
- locked = true;
3077
- window.requestAnimationFrame(function (_) {
3078
- fn.apply(_this, args);
3079
- locked = false;
3080
- });
3081
- };
3082
- }
3083
-
3084
- function objToArray(obj) {
3085
- if (Array.isArray(obj)) {
3086
- return obj;
3087
- }
3088
- return isEmpty(obj) ? [] : [obj];
3089
- }
3090
-
3091
- var isMac = function isMac() {
3092
- return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
3093
- };
3094
-
3095
- /***/ }),
3096
-
3097
- /***/ 42:
3098
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3099
-
3100
- "use strict";
3101
- // ESM COMPAT FLAG
3102
- __webpack_require__.r(__webpack_exports__);
3103
-
3104
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=25c86a59
3105
- var render = function render() {
3106
- var _vm = this,
3107
- _c = _vm._self._c
3108
- return _c(
3109
- "span",
3110
- [
3111
- _c(
3112
- "transition",
3113
- {
3114
- attrs: { name: _vm.transition },
3115
- on: {
3116
- "after-enter": _vm.handleAfterEnter,
3117
- "after-leave": _vm.handleAfterLeave,
3118
- },
3119
- },
3120
- [
3121
- _c(
3122
- "div",
3123
- {
3124
- directives: [
3125
- {
3126
- name: "show",
3127
- rawName: "v-show",
3128
- value: !_vm.disabled && _vm.showPopper,
3129
- expression: "!disabled && showPopper",
3130
- },
3131
- ],
3132
- ref: "popper",
3133
- staticClass: "el-popover el-popper",
3134
- class: [_vm.popperClass, _vm.content && "el-popover--plain"],
3135
- style: { width: _vm.width + "px" },
3136
- attrs: {
3137
- role: "tooltip",
3138
- id: _vm.tooltipId,
3139
- "aria-hidden":
3140
- _vm.disabled || !_vm.showPopper ? "true" : "false",
3141
- },
3142
- },
3143
- [
3144
- _vm.title
3145
- ? _c("div", {
3146
- staticClass: "el-popover__title",
3147
- domProps: { textContent: _vm._s(_vm.title) },
3148
- })
3149
- : _vm._e(),
3150
- _vm._t("default", function () {
3151
- return [_vm._v(_vm._s(_vm.content))]
3152
- }),
3153
- ],
3154
- 2
3155
- ),
3156
- ]
3157
- ),
3158
- _c(
3159
- "span",
3160
- { ref: "wrapper", staticClass: "el-popover__reference-wrapper" },
3161
- [_vm._t("reference")],
3162
- 2
3163
- ),
3164
- ],
3165
- 1
3166
- )
3167
- }
3168
- var staticRenderFns = []
3169
- render._withStripped = true
3170
-
3171
-
3172
- // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=25c86a59
3173
-
3174
- // EXTERNAL MODULE: ./src/utils/vue-popper.js
3175
- var vue_popper = __webpack_require__(10);
3176
-
3177
- // EXTERNAL MODULE: ./src/utils/dom.js
3178
- var dom = __webpack_require__(1);
3179
-
3180
- // EXTERNAL MODULE: ./src/utils/util.js
3181
- var util = __webpack_require__(3);
3182
-
3183
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js
3184
-
3185
-
3186
-
3187
-
3188
-
3189
-
3190
- /* harmony default export */ var mainvue_type_script_lang_js = ({
3191
- name: 'ElPopover',
3192
-
3193
- mixins: [vue_popper["a" /* default */]],
3194
-
3195
- props: {
3196
- trigger: {
3197
- type: String,
3198
- default: 'click',
3199
- validator: function validator(value) {
3200
- return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
3201
- }
3202
- },
3203
- openDelay: {
3204
- type: Number,
3205
- default: 0
3206
- },
3207
- closeDelay: {
3208
- type: Number,
3209
- default: 200
3210
- },
3211
- title: String,
3212
- disabled: Boolean,
3213
- content: String,
3214
- reference: {},
3215
- popperClass: String,
3216
- width: {},
3217
- visibleArrow: {
3218
- default: true
3219
- },
3220
- arrowOffset: {
3221
- type: Number,
3222
- default: 0
3223
- },
3224
- transition: {
3225
- type: String,
3226
- default: 'fade-in-linear'
3227
- },
3228
- tabindex: {
3229
- type: Number,
3230
- default: 0
3231
- }
3232
- },
3233
-
3234
- computed: {
3235
- tooltipId: function tooltipId() {
3236
- return 'el-popover-' + Object(util["g" /* generateId */])();
3237
- }
3238
- },
3239
- watch: {
3240
- showPopper: function showPopper(val) {
3241
- if (this.disabled) {
3242
- return;
3243
- }
3244
- val ? this.$emit('show') : this.$emit('hide');
3245
- }
3246
- },
3247
-
3248
- mounted: function mounted() {
3249
- var _this = this;
3250
-
3251
- var reference = this.referenceElm = this.reference || this.$refs.reference;
3252
- var popper = this.popper || this.$refs.popper;
3253
-
3254
- if (!reference && this.$refs.wrapper && this.$refs.wrapper.children) {
3255
- reference = this.referenceElm = this.$refs.wrapper.children[0];
3256
- }
3257
- // 可访问性
3258
- if (reference) {
3259
- Object(dom["a" /* addClass */])(reference, 'el-popover__reference');
3260
- reference.setAttribute('aria-describedby', this.tooltipId);
3261
- reference.setAttribute('tabindex', this.tabindex); // tab序列
3262
- popper.setAttribute('tabindex', 0);
3263
-
3264
- if (this.trigger !== 'click') {
3265
- Object(dom["g" /* on */])(reference, 'focusin', function () {
3266
- _this.handleFocus();
3267
- var instance = reference.__vue__;
3268
- if (instance && typeof instance.focus === 'function') {
3269
- instance.focus();
3270
- }
3271
- });
3272
- Object(dom["g" /* on */])(popper, 'focusin', this.handleFocus);
3273
- Object(dom["g" /* on */])(reference, 'focusout', this.handleBlur);
3274
- Object(dom["g" /* on */])(popper, 'focusout', this.handleBlur);
3275
- }
3276
- Object(dom["g" /* on */])(reference, 'keydown', this.handleKeydown);
3277
- Object(dom["g" /* on */])(reference, 'click', this.handleClick);
3278
- }
3279
- if (this.trigger === 'click') {
3280
- Object(dom["g" /* on */])(reference, 'click', this.doToggle);
3281
- Object(dom["g" /* on */])(document, 'click', this.handleDocumentClick);
3282
- } else if (this.trigger === 'hover') {
3283
- Object(dom["g" /* on */])(reference, 'mouseenter', this.handleMouseEnter);
3284
- Object(dom["g" /* on */])(popper, 'mouseenter', this.handleMouseEnter);
3285
- Object(dom["g" /* on */])(reference, 'mouseleave', this.handleMouseLeave);
3286
- Object(dom["g" /* on */])(popper, 'mouseleave', this.handleMouseLeave);
3287
- } else if (this.trigger === 'focus') {
3288
- if (this.tabindex < 0) {
3289
- console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
3290
- }
3291
- if (reference.querySelector('input, textarea')) {
3292
- Object(dom["g" /* on */])(reference, 'focusin', this.doShow);
3293
- Object(dom["g" /* on */])(reference, 'focusout', this.doClose);
3294
- } else {
3295
- Object(dom["g" /* on */])(reference, 'mousedown', this.doShow);
3296
- Object(dom["g" /* on */])(reference, 'mouseup', this.doClose);
3297
- }
3298
- }
3299
- },
3300
- beforeDestroy: function beforeDestroy() {
3301
- this.cleanup();
3302
- },
3303
- deactivated: function deactivated() {
3304
- this.cleanup();
3305
- },
3306
-
3307
-
3308
- methods: {
3309
- doToggle: function doToggle() {
3310
- this.showPopper = !this.showPopper;
3311
- },
3312
- doShow: function doShow() {
3313
- this.showPopper = true;
3314
- },
3315
- doClose: function doClose() {
3316
- this.showPopper = false;
3317
- },
3318
- handleFocus: function handleFocus() {
3319
- Object(dom["a" /* addClass */])(this.referenceElm, 'focusing');
3320
- if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
3321
- },
3322
- handleClick: function handleClick() {
3323
- Object(dom["i" /* removeClass */])(this.referenceElm, 'focusing');
3324
- },
3325
- handleBlur: function handleBlur() {
3326
- Object(dom["i" /* removeClass */])(this.referenceElm, 'focusing');
3327
- if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
3328
- },
3329
- handleMouseEnter: function handleMouseEnter() {
3330
- var _this2 = this;
3331
-
3332
- clearTimeout(this._timer);
3333
- if (this.openDelay) {
3334
- this._timer = setTimeout(function () {
3335
- _this2.showPopper = true;
3336
- }, this.openDelay);
3337
- } else {
3338
- this.showPopper = true;
3339
- }
3340
- },
3341
- handleKeydown: function handleKeydown(ev) {
3342
- if (ev.keyCode === 27 && this.trigger !== 'manual') {
3343
- // esc
3344
- this.doClose();
3345
- }
3346
- },
3347
- handleMouseLeave: function handleMouseLeave() {
3348
- var _this3 = this;
3349
-
3350
- clearTimeout(this._timer);
3351
- if (this.closeDelay) {
3352
- this._timer = setTimeout(function () {
3353
- _this3.showPopper = false;
3354
- }, this.closeDelay);
3355
- } else {
3356
- this.showPopper = false;
3357
- }
3358
- },
3359
- handleDocumentClick: function handleDocumentClick(e) {
3360
- var reference = this.reference || this.$refs.reference;
3361
- var popper = this.popper || this.$refs.popper;
3362
-
3363
- if (!reference && this.$refs.wrapper && this.$refs.wrapper.children) {
3364
- reference = this.referenceElm = this.$refs.wrapper.children[0];
3365
- }
3366
- if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
3367
- this.showPopper = false;
3368
- },
3369
- handleAfterEnter: function handleAfterEnter() {
3370
- this.$emit('after-enter');
3371
- },
3372
- handleAfterLeave: function handleAfterLeave() {
3373
- this.$emit('after-leave');
3374
- this.doDestroy();
3375
- },
3376
- cleanup: function cleanup() {
3377
- if (this.openDelay || this.closeDelay) {
3378
- clearTimeout(this._timer);
3379
- }
3380
- }
3381
- },
3382
-
3383
- destroyed: function destroyed() {
3384
- var reference = this.reference;
3385
-
3386
- Object(dom["f" /* off */])(reference, 'click', this.doToggle);
3387
- Object(dom["f" /* off */])(reference, 'mouseup', this.doClose);
3388
- Object(dom["f" /* off */])(reference, 'mousedown', this.doShow);
3389
- Object(dom["f" /* off */])(reference, 'focusin', this.doShow);
3390
- Object(dom["f" /* off */])(reference, 'focusout', this.doClose);
3391
- Object(dom["f" /* off */])(reference, 'mousedown', this.doShow);
3392
- Object(dom["f" /* off */])(reference, 'mouseup', this.doClose);
3393
- Object(dom["f" /* off */])(reference, 'mouseleave', this.handleMouseLeave);
3394
- Object(dom["f" /* off */])(reference, 'mouseenter', this.handleMouseEnter);
3395
- Object(dom["f" /* off */])(document, 'click', this.handleDocumentClick);
3396
- }
3397
- });
3398
- // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js
3399
- /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
3400
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3401
- var componentNormalizer = __webpack_require__(2);
3402
-
3403
- // CONCATENATED MODULE: ./packages/popover/src/main.vue
3404
-
3405
-
3406
-
3407
-
3408
-
3409
- /* normalize component */
3410
-
3411
- var component = Object(componentNormalizer["a" /* default */])(
3412
- src_mainvue_type_script_lang_js,
3413
- render,
3414
- staticRenderFns,
3415
- false,
3416
- null,
3417
- null,
3418
- null
3419
-
3420
- )
3421
-
3422
- /* harmony default export */ var main = (component.exports);
3423
- // CONCATENATED MODULE: ./packages/popover/src/directive.js
3424
- var getReference = function getReference(el, binding, vnode) {
3425
- var _ref = binding.expression ? binding.value : binding.arg;
3426
- var popper = vnode.context.$refs[_ref];
3427
- if (popper) {
3428
- if (Array.isArray(popper)) {
3429
- popper[0].$refs.reference = el;
3430
- } else {
3431
- popper.$refs.reference = el;
3432
- }
3433
- }
3434
- };
3435
-
3436
- /* harmony default export */ var directive = ({
3437
- bind: function bind(el, binding, vnode) {
3438
- getReference(el, binding, vnode);
3439
- },
3440
- inserted: function inserted(el, binding, vnode) {
3441
- getReference(el, binding, vnode);
3442
- }
3443
- });
3444
- // EXTERNAL MODULE: external "vue"
3445
- var external_vue_ = __webpack_require__(0);
3446
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
3447
-
3448
- // CONCATENATED MODULE: ./packages/popover/index.js
3449
-
3450
-
3451
-
3452
-
3453
- external_vue_default.a.directive('popover', directive);
3454
-
3455
- /* istanbul ignore next */
3456
- main.install = function (Vue) {
3457
- Vue.directive('popover', directive);
3458
- Vue.component(main.name, main);
3459
- };
3460
- main.directive = directive;
3461
-
3462
- /* harmony default export */ var popover = __webpack_exports__["default"] = (main);
3463
-
3464
- /***/ }),
3465
-
3466
- /***/ 5:
3467
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3468
-
3469
- "use strict";
3470
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
3471
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
3472
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
3473
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
3474
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
3475
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
3476
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3477
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3478
- 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; };
3479
-
3480
-
3481
-
3482
- function isString(obj) {
3483
- return Object.prototype.toString.call(obj) === '[object String]';
3484
- }
3485
-
3486
- function isObject(obj) {
3487
- return Object.prototype.toString.call(obj) === '[object Object]';
3488
- }
3489
-
3490
- function isHtmlElement(node) {
3491
- return node && node.nodeType === Node.ELEMENT_NODE;
3492
- }
3493
-
3494
- /**
3495
- * - Inspired:
3496
- * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
3497
- */
3498
- var isFunction = function isFunction(functionToCheck) {
3499
- var getType = {};
3500
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
3501
- };
3502
-
3503
- if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
3504
- isFunction = function isFunction(obj) {
3505
- return typeof obj === 'function' || false;
3506
- };
3507
- }
3508
-
3509
-
3510
-
3511
- var isUndefined = function isUndefined(val) {
3512
- return val === void 0;
3513
- };
3514
-
3515
- var isDefined = function isDefined(val) {
3516
- return val !== undefined && val !== null;
3517
- };
3518
-
3519
- /***/ }),
3520
-
3521
- /***/ 6:
3522
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3523
-
3524
- "use strict";
3525
- function _broadcast(componentName, eventName, params) {
3526
- this.$children.forEach(function (child) {
3527
- var name = child.$options.componentName;
3528
-
3529
- if (name === componentName) {
3530
- child.$emit.apply(child, [eventName].concat(params));
3531
- } else {
3532
- _broadcast.apply(child, [componentName, eventName].concat([params]));
3533
- }
3534
- });
3535
- }
3536
- /* harmony default export */ __webpack_exports__["a"] = ({
3537
- methods: {
3538
- dispatch: function dispatch(componentName, eventName, params) {
3539
- var parent = this.$parent || this.$root;
3540
- var name = parent.$options.componentName;
3541
-
3542
- while (parent && (!name || name !== componentName)) {
3543
- parent = parent.$parent;
3544
-
3545
- if (parent) {
3546
- name = parent.$options.componentName;
3547
- }
3548
- }
3549
- if (parent) {
3550
- parent.$emit.apply(parent, [eventName].concat(params));
3551
- }
3552
- },
3553
- broadcast: function broadcast(componentName, eventName, params) {
3554
- _broadcast.call(this, componentName, eventName, params);
3555
- }
3556
- }
3557
- });
3558
-
3559
- /***/ }),
3560
-
3561
- /***/ 7:
3562
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3563
-
3564
- "use strict";
3565
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
3566
- for (var i = 1, j = arguments.length; i < j; i++) {
3567
- var source = arguments[i] || {};
3568
- for (var prop in source) {
3569
- if (source.hasOwnProperty(prop)) {
3570
- var value = source[prop];
3571
- if (value !== undefined) {
3572
- target[prop] = value;
3573
- }
3574
- }
3575
- }
3576
- }
3577
-
3578
- return target;
3579
- });;
3580
-
3581
- /***/ }),
3582
-
3583
- /***/ 8:
3584
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3585
-
3586
- "use strict";
3587
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3588
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3589
-
3590
-
3591
- var scrollBarWidth = void 0;
3592
-
3593
- /* harmony default export */ __webpack_exports__["a"] = (function () {
3594
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
3595
- if (scrollBarWidth !== undefined) return scrollBarWidth;
3596
-
3597
- var outer = document.createElement('div');
3598
- outer.className = 'el-scrollbar__wrap';
3599
- outer.style.visibility = 'hidden';
3600
- outer.style.width = '100px';
3601
- outer.style.position = 'absolute';
3602
- outer.style.top = '-9999px';
3603
- document.body.appendChild(outer);
3604
-
3605
- var widthNoScroll = outer.offsetWidth;
3606
- outer.style.overflow = 'scroll';
3607
-
3608
- var inner = document.createElement('div');
3609
- inner.style.width = '100%';
3610
- outer.appendChild(inner);
3611
-
3612
- var widthWithScroll = inner.offsetWidth;
3613
- outer.parentNode.removeChild(outer);
3614
- scrollBarWidth = widthNoScroll - widthWithScroll;
3615
-
3616
- return scrollBarWidth;
3617
- });;
3618
-
3619
- /***/ }),
3620
-
3621
- /***/ 9:
3622
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3623
-
3624
- "use strict";
3625
-
3626
- // EXPORTS
3627
- __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
3628
-
3629
- // EXTERNAL MODULE: external "vue"
3630
- var external_vue_ = __webpack_require__(0);
3631
- var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
3632
-
3633
- // EXTERNAL MODULE: ./src/utils/merge.js
3634
- var merge = __webpack_require__(7);
3635
-
3636
- // EXTERNAL MODULE: ./src/utils/dom.js
3637
- var utils_dom = __webpack_require__(1);
3638
-
3639
- // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
3640
-
3641
-
3642
-
3643
- var hasModal = false;
3644
- var hasInitZIndex = false;
3645
- var popup_manager_zIndex = void 0;
3646
-
3647
- var popup_manager_getModal = function getModal() {
3648
- if (external_vue_default.a.prototype.$isServer) return;
3649
- var modalDom = PopupManager.modalDom;
3650
- if (modalDom) {
3651
- hasModal = true;
3652
- } else {
3653
- hasModal = false;
3654
- modalDom = document.createElement('div');
3655
- PopupManager.modalDom = modalDom;
3656
-
3657
- modalDom.addEventListener('touchmove', function (event) {
3658
- event.preventDefault();
3659
- event.stopPropagation();
3660
- });
3661
-
3662
- modalDom.addEventListener('click', function () {
3663
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
3664
- });
3665
- }
3666
-
3667
- return modalDom;
3668
- };
3669
-
3670
- var instances = {};
3671
-
3672
- var PopupManager = {
3673
- modalFade: true,
3674
-
3675
- getInstance: function getInstance(id) {
3676
- return instances[id];
3677
- },
3678
-
3679
- register: function register(id, instance) {
3680
- if (id && instance) {
3681
- instances[id] = instance;
3682
- }
3683
- },
3684
-
3685
- deregister: function deregister(id) {
3686
- if (id) {
3687
- instances[id] = null;
3688
- delete instances[id];
3689
- }
3690
- },
3691
-
3692
- nextZIndex: function nextZIndex() {
3693
- return PopupManager.zIndex++;
3694
- },
3695
-
3696
- modalStack: [],
3697
-
3698
- doOnModalClick: function doOnModalClick() {
3699
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
3700
- if (!topItem) return;
3701
-
3702
- var instance = PopupManager.getInstance(topItem.id);
3703
- if (instance && instance.closeOnClickModal) {
3704
- instance.close();
3705
- }
3706
- },
3707
-
3708
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
3709
- if (external_vue_default.a.prototype.$isServer) return;
3710
- if (!id || zIndex === undefined) return;
3711
- this.modalFade = modalFade;
3712
-
3713
- var modalStack = this.modalStack;
3714
-
3715
- for (var i = 0, j = modalStack.length; i < j; i++) {
3716
- var item = modalStack[i];
3717
- if (item.id === id) {
3718
- return;
3719
- }
3720
- }
3721
-
3722
- var modalDom = popup_manager_getModal();
3723
-
3724
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
3725
- if (this.modalFade && !hasModal) {
3726
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
3727
- }
3728
- if (modalClass) {
3729
- var classArr = modalClass.trim().split(/\s+/);
3730
- classArr.forEach(function (item) {
3731
- return Object(utils_dom["a" /* addClass */])(modalDom, item);
3732
- });
3733
- }
3734
- setTimeout(function () {
3735
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
3736
- }, 200);
3737
-
3738
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
3739
- dom.parentNode.appendChild(modalDom);
3740
- } else {
3741
- document.body.appendChild(modalDom);
3742
- }
3743
-
3744
- if (zIndex) {
3745
- modalDom.style.zIndex = zIndex;
3746
- }
3747
- modalDom.tabIndex = 0;
3748
- modalDom.style.display = '';
3749
-
3750
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
3751
- },
3752
-
3753
- closeModal: function closeModal(id) {
3754
- var modalStack = this.modalStack;
3755
- var modalDom = popup_manager_getModal();
3756
-
3757
- if (modalStack.length > 0) {
3758
- var topItem = modalStack[modalStack.length - 1];
3759
- if (topItem.id === id) {
3760
- if (topItem.modalClass) {
3761
- var classArr = topItem.modalClass.trim().split(/\s+/);
3762
- classArr.forEach(function (item) {
3763
- return Object(utils_dom["i" /* removeClass */])(modalDom, item);
3764
- });
3765
- }
3766
-
3767
- modalStack.pop();
3768
- if (modalStack.length > 0) {
3769
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
3770
- }
3771
- } else {
3772
- for (var i = modalStack.length - 1; i >= 0; i--) {
3773
- if (modalStack[i].id === id) {
3774
- modalStack.splice(i, 1);
3775
- break;
3776
- }
3777
- }
3778
- }
3779
- }
3780
-
3781
- if (modalStack.length === 0) {
3782
- if (this.modalFade) {
3783
- Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
3784
- }
3785
- setTimeout(function () {
3786
- if (modalStack.length === 0) {
3787
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
3788
- modalDom.style.display = 'none';
3789
- PopupManager.modalDom = undefined;
3790
- }
3791
- Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
3792
- }, 200);
3793
- }
3794
- }
3795
- };
3796
-
3797
- Object.defineProperty(PopupManager, 'zIndex', {
3798
- configurable: true,
3799
- get: function get() {
3800
- if (!hasInitZIndex) {
3801
- popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
3802
- hasInitZIndex = true;
3803
- }
3804
- return popup_manager_zIndex;
3805
- },
3806
- set: function set(value) {
3807
- popup_manager_zIndex = value;
3808
- }
3809
- });
3810
-
3811
- var popup_manager_getTopPopup = function getTopPopup() {
3812
- if (external_vue_default.a.prototype.$isServer) return;
3813
- if (PopupManager.modalStack.length > 0) {
3814
- var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
3815
- if (!topPopup) return;
3816
- var instance = PopupManager.getInstance(topPopup.id);
3817
-
3818
- return instance;
3819
- }
3820
- };
3821
-
3822
- if (!external_vue_default.a.prototype.$isServer) {
3823
- // handle `esc` key when the popup is shown
3824
- window.addEventListener('keydown', function (event) {
3825
- if (event.keyCode === 27) {
3826
- var topPopup = popup_manager_getTopPopup();
3827
-
3828
- if (topPopup && topPopup.closeOnPressEscape) {
3829
- topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
3830
- }
3831
- }
3832
- });
3833
- }
3834
-
3835
- /* harmony default export */ var popup_manager = (PopupManager);
3836
- // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
3837
- var scrollbar_width = __webpack_require__(8);
3838
-
3839
- // CONCATENATED MODULE: ./src/utils/popup/index.js
3840
-
3841
-
3842
-
3843
-
3844
-
3845
-
3846
- var idSeed = 1;
3847
-
3848
- var scrollBarWidth = void 0;
3849
-
3850
- /* harmony default export */ var popup = __webpack_exports__["b"] = ({
3851
- props: {
3852
- visible: {
3853
- type: Boolean,
3854
- default: false
3855
- },
3856
- openDelay: {},
3857
- closeDelay: {},
3858
- zIndex: {},
3859
- modal: {
3860
- type: Boolean,
3861
- default: false
3862
- },
3863
- modalFade: {
3864
- type: Boolean,
3865
- default: true
3866
- },
3867
- modalClass: {},
3868
- modalAppendToBody: {
3869
- type: Boolean,
3870
- default: false
3871
- },
3872
- lockScroll: {
3873
- type: Boolean,
3874
- default: true
3875
- },
3876
- closeOnPressEscape: {
3877
- type: Boolean,
3878
- default: false
3879
- },
3880
- closeOnClickModal: {
3881
- type: Boolean,
3882
- default: false
3883
- }
3884
- },
3885
-
3886
- beforeMount: function beforeMount() {
3887
- this._popupId = 'popup-' + idSeed++;
3888
- popup_manager.register(this._popupId, this);
3889
- },
3890
- beforeDestroy: function beforeDestroy() {
3891
- popup_manager.deregister(this._popupId);
3892
- popup_manager.closeModal(this._popupId);
3893
-
3894
- this.restoreBodyStyle();
3895
- },
3896
- data: function data() {
3897
- return {
3898
- opened: false,
3899
- bodyPaddingRight: null,
3900
- computedBodyPaddingRight: 0,
3901
- withoutHiddenClass: true,
3902
- rendered: false
3903
- };
3904
- },
3905
-
3906
-
3907
- watch: {
3908
- visible: function visible(val) {
3909
- var _this = this;
3910
-
3911
- if (val) {
3912
- if (this._opening) return;
3913
- if (!this.rendered) {
3914
- this.rendered = true;
3915
- external_vue_default.a.nextTick(function () {
3916
- _this.open();
3917
- });
3918
- } else {
3919
- this.open();
3920
- }
3921
- } else {
3922
- this.close();
3923
- }
3924
- }
3925
- },
3926
-
3927
- methods: {
3928
- open: function open(options) {
3929
- var _this2 = this;
3930
-
3931
- if (!this.rendered) {
3932
- this.rendered = true;
3933
- }
3934
-
3935
- var props = Object(merge["a" /* default */])({}, this.$props || this, options);
3936
-
3937
- if (this._closeTimer) {
3938
- clearTimeout(this._closeTimer);
3939
- this._closeTimer = null;
3940
- }
3941
- clearTimeout(this._openTimer);
3942
-
3943
- var openDelay = Number(props.openDelay);
3944
- if (openDelay > 0) {
3945
- this._openTimer = setTimeout(function () {
3946
- _this2._openTimer = null;
3947
- _this2.doOpen(props);
3948
- }, openDelay);
3949
- } else {
3950
- this.doOpen(props);
3951
- }
3952
- },
3953
- doOpen: function doOpen(props) {
3954
- if (this.$isServer) return;
3955
- if (this.willOpen && !this.willOpen()) return;
3956
- if (this.opened) return;
3957
-
3958
- this._opening = true;
3959
-
3960
- var dom = this.$el;
3961
-
3962
- var modal = props.modal;
3963
-
3964
- var zIndex = props.zIndex;
3965
- if (zIndex) {
3966
- popup_manager.zIndex = zIndex;
3967
- }
3968
-
3969
- if (modal) {
3970
- if (this._closing) {
3971
- popup_manager.closeModal(this._popupId);
3972
- this._closing = false;
3973
- }
3974
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
3975
- if (props.lockScroll) {
3976
- this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
3977
- if (this.withoutHiddenClass) {
3978
- this.bodyPaddingRight = document.body.style.paddingRight;
3979
- this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
3980
- }
3981
- scrollBarWidth = Object(scrollbar_width["a" /* default */])();
3982
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
3983
- var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
3984
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
3985
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
3986
- }
3987
- Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
3988
- }
3989
- }
3990
-
3991
- if (getComputedStyle(dom).position === 'static') {
3992
- dom.style.position = 'absolute';
3993
- }
3994
-
3995
- dom.style.zIndex = popup_manager.nextZIndex();
3996
- this.opened = true;
3997
-
3998
- this.onOpen && this.onOpen();
3999
-
4000
- this.doAfterOpen();
4001
- },
4002
- doAfterOpen: function doAfterOpen() {
4003
- this._opening = false;
4004
- },
4005
- close: function close() {
4006
- var _this3 = this;
4007
-
4008
- if (this.willClose && !this.willClose()) return;
4009
-
4010
- if (this._openTimer !== null) {
4011
- clearTimeout(this._openTimer);
4012
- this._openTimer = null;
4013
- }
4014
- clearTimeout(this._closeTimer);
4015
-
4016
- var closeDelay = Number(this.closeDelay);
4017
-
4018
- if (closeDelay > 0) {
4019
- this._closeTimer = setTimeout(function () {
4020
- _this3._closeTimer = null;
4021
- _this3.doClose();
4022
- }, closeDelay);
4023
- } else {
4024
- this.doClose();
4025
- }
4026
- },
4027
- doClose: function doClose() {
4028
- this._closing = true;
4029
-
4030
- this.onClose && this.onClose();
4031
-
4032
- if (this.lockScroll) {
4033
- setTimeout(this.restoreBodyStyle, 200);
4034
- }
4035
-
4036
- this.opened = false;
4037
-
4038
- this.doAfterClose();
4039
- },
4040
- doAfterClose: function doAfterClose() {
4041
- popup_manager.closeModal(this._popupId);
4042
- this._closing = false;
4043
- },
4044
- restoreBodyStyle: function restoreBodyStyle() {
4045
- if (this.modal && this.withoutHiddenClass) {
4046
- document.body.style.paddingRight = this.bodyPaddingRight;
4047
- Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
4048
- }
4049
- this.withoutHiddenClass = true;
4050
- }
4051
- }
4052
- });
4053
-
4054
-
4055
-
4056
- /***/ })
4057
-
4058
- /******/ });