quasar 1.16.3 → 1.17.3

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 (308) hide show
  1. package/dist/api/BottomSheet.json +2 -2
  2. package/dist/api/Loading.json +0 -2
  3. package/dist/api/LoadingBar.json +1 -1
  4. package/dist/api/Notify.json +25 -25
  5. package/dist/api/QAjaxBar.json +23 -4
  6. package/dist/api/QAvatar.json +1 -1
  7. package/dist/api/QBreadcrumbsEl.json +32 -11
  8. package/dist/api/QBtn.json +35 -14
  9. package/dist/api/QBtnDropdown.json +36 -15
  10. package/dist/api/QBtnToggle.json +1 -1
  11. package/dist/api/QCarousel.json +7 -7
  12. package/dist/api/QCarouselSlide.json +2 -2
  13. package/dist/api/QChatMessage.json +1 -5
  14. package/dist/api/QChip.json +4 -4
  15. package/dist/api/QColor.json +6 -0
  16. package/dist/api/QDialog.json +7 -1
  17. package/dist/api/QExpansionItem.json +34 -13
  18. package/dist/api/QFab.json +34 -2
  19. package/dist/api/QFabAction.json +9 -1
  20. package/dist/api/QField.json +80 -6
  21. package/dist/api/QFile.json +80 -6
  22. package/dist/api/QImg.json +2 -2
  23. package/dist/api/QInnerLoading.json +32 -0
  24. package/dist/api/QInput.json +82 -6
  25. package/dist/api/QItem.json +31 -10
  26. package/dist/api/QOptionGroup.json +58 -1
  27. package/dist/api/QPagination.json +4 -4
  28. package/dist/api/QParallax.json +1 -1
  29. package/dist/api/QPopupEdit.json +14 -7
  30. package/dist/api/QPullToRefresh.json +1 -1
  31. package/dist/api/QRange.json +581 -96
  32. package/dist/api/QRating.json +3 -3
  33. package/dist/api/QRouteTab.json +32 -12
  34. package/dist/api/QScrollArea.json +188 -20
  35. package/dist/api/QSelect.json +82 -10
  36. package/dist/api/QSeparator.json +1 -1
  37. package/dist/api/QSlider.json +499 -34
  38. package/dist/api/QStep.json +4 -4
  39. package/dist/api/QStepper.json +4 -4
  40. package/dist/api/QTab.json +1 -1
  41. package/dist/api/QTable.json +4 -4
  42. package/dist/api/QTabs.json +9 -0
  43. package/dist/api/QTimelineEntry.json +2 -2
  44. package/dist/api/QToggle.json +1 -1
  45. package/dist/api/QTree.json +7 -1
  46. package/dist/api/QVideo.json +10 -0
  47. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  48. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  49. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  50. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  51. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  52. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  53. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  54. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  55. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  56. package/dist/icon-set/material-icons.umd.min.js +1 -1
  57. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  58. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  59. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  60. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  61. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  62. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  63. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  64. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  65. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  66. package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
  67. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  68. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  69. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  70. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  71. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  72. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  73. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  74. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  75. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  76. package/dist/icon-set/themify.umd.min.js +1 -1
  77. package/dist/lang/ar.umd.min.js +2 -2
  78. package/dist/lang/az-latn.umd.min.js +1 -1
  79. package/dist/lang/bg.umd.min.js +1 -1
  80. package/dist/lang/ca.umd.min.js +1 -1
  81. package/dist/lang/cs.umd.min.js +1 -1
  82. package/dist/lang/da.umd.min.js +1 -1
  83. package/dist/lang/de.umd.min.js +1 -1
  84. package/dist/lang/el.umd.min.js +1 -1
  85. package/dist/lang/en-gb.umd.min.js +1 -1
  86. package/dist/lang/en-us.umd.min.js +1 -1
  87. package/dist/lang/eo.umd.min.js +1 -1
  88. package/dist/lang/es.umd.min.js +1 -1
  89. package/dist/lang/et.umd.min.js +1 -1
  90. package/dist/lang/fa-ir.umd.min.js +1 -1
  91. package/dist/lang/fa.umd.min.js +1 -1
  92. package/dist/lang/fi.umd.min.js +1 -1
  93. package/dist/lang/fr.umd.min.js +2 -2
  94. package/dist/lang/gn.umd.min.js +1 -1
  95. package/dist/lang/he.umd.min.js +1 -1
  96. package/dist/lang/hr.umd.min.js +1 -1
  97. package/dist/lang/hu.umd.min.js +1 -1
  98. package/dist/lang/id.umd.min.js +1 -1
  99. package/dist/lang/is.umd.min.js +1 -1
  100. package/dist/lang/it.umd.min.js +1 -1
  101. package/dist/lang/ja.umd.min.js +1 -1
  102. package/dist/lang/km.umd.min.js +1 -1
  103. package/dist/lang/ko-kr.umd.min.js +1 -1
  104. package/dist/lang/kur-ckb.umd.min.js +1 -1
  105. package/dist/lang/lu.umd.min.js +1 -1
  106. package/dist/lang/lv.umd.min.js +1 -1
  107. package/dist/lang/ml.umd.min.js +1 -1
  108. package/dist/lang/ms.umd.min.js +1 -1
  109. package/dist/lang/nb-no.umd.min.js +1 -1
  110. package/dist/lang/nl.umd.min.js +1 -1
  111. package/dist/lang/pl.umd.min.js +1 -1
  112. package/dist/lang/pt-br.umd.min.js +1 -1
  113. package/dist/lang/pt.umd.min.js +1 -1
  114. package/dist/lang/ro.umd.min.js +1 -1
  115. package/dist/lang/ru.umd.min.js +1 -1
  116. package/dist/lang/sk.umd.min.js +1 -1
  117. package/dist/lang/sl.umd.min.js +1 -1
  118. package/dist/lang/sr.umd.min.js +2 -2
  119. package/dist/lang/sv.umd.min.js +1 -1
  120. package/dist/lang/ta.umd.min.js +1 -1
  121. package/dist/lang/th.umd.min.js +1 -1
  122. package/dist/lang/tr.umd.min.js +1 -1
  123. package/dist/lang/ug.umd.min.js +2 -2
  124. package/dist/lang/uk.umd.min.js +1 -1
  125. package/dist/lang/vi.umd.min.js +1 -1
  126. package/dist/lang/zh-hans.umd.min.js +2 -2
  127. package/dist/lang/zh-hant.umd.min.js +2 -2
  128. package/dist/quasar.addon.css +1 -1
  129. package/dist/quasar.addon.rtl.css +1 -1
  130. package/dist/quasar.common.js +2 -2
  131. package/dist/quasar.css +380 -227
  132. package/dist/quasar.esm.js +2 -2
  133. package/dist/quasar.ie.polyfills.js +1 -1
  134. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  135. package/dist/quasar.min.css +1 -1
  136. package/dist/quasar.rtl.css +512 -303
  137. package/dist/quasar.rtl.min.css +1 -1
  138. package/dist/quasar.sass +328 -210
  139. package/dist/quasar.styl +328 -210
  140. package/dist/quasar.umd.js +3244 -1894
  141. package/dist/quasar.umd.min.js +2 -2
  142. package/dist/quasar.umd.modern.js +3199 -1875
  143. package/dist/quasar.umd.modern.min.js +2 -2
  144. package/dist/transform-asset-urls.json +20 -0
  145. package/dist/types/index.d.ts +427 -105
  146. package/dist/types/utils/scroll.d.ts +1 -0
  147. package/dist/vetur/quasar-attributes.json +320 -92
  148. package/dist/vetur/quasar-tags.json +76 -19
  149. package/dist/web-types/web-types.json +1296 -257
  150. package/icon-set/svg-ionicons-v6.js +225 -0
  151. package/lang/ar.js +1 -1
  152. package/lang/fa-ir.js +3 -1
  153. package/lang/fa.js +3 -1
  154. package/lang/fr.js +1 -1
  155. package/lang/index.json +1 -1
  156. package/lang/kur-ckb.js +2 -2
  157. package/lang/sr.js +4 -4
  158. package/lang/ug.js +48 -46
  159. package/lang/zh-hans.js +1 -1
  160. package/lang/zh-hant.js +18 -18
  161. package/package.json +1 -1
  162. package/src/api.extends.json +1 -2
  163. package/src/components/ajax-bar/QAjaxBar.js +48 -26
  164. package/src/components/ajax-bar/QAjaxBar.json +22 -4
  165. package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
  166. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  167. package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
  168. package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
  169. package/src/components/btn/QBtn.js +3 -3
  170. package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
  171. package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
  172. package/src/components/btn-toggle/QBtnToggle.js +4 -1
  173. package/src/components/carousel/QCarousel.js +6 -2
  174. package/src/components/carousel/QCarousel.json +9 -1
  175. package/src/components/carousel/QCarouselSlide.json +2 -2
  176. package/src/components/chat/QChatMessage.json +1 -1
  177. package/src/components/color/QColor.js +100 -85
  178. package/src/components/color/QColor.json +7 -0
  179. package/src/components/color/QColor.sass +14 -24
  180. package/src/components/color/QColor.styl +14 -24
  181. package/src/components/date/QDate.js +7 -1
  182. package/src/components/date/QDate.sass +2 -0
  183. package/src/components/date/QDate.styl +2 -0
  184. package/src/components/dialog/QDialog.js +8 -4
  185. package/src/components/dialog/QDialog.json +8 -1
  186. package/src/components/drawer/QDrawer.js +16 -15
  187. package/src/components/editor/QEditor.js +2 -2
  188. package/src/components/editor/QEditor.sass +13 -1
  189. package/src/components/editor/QEditor.styl +13 -1
  190. package/src/components/expansion-item/QExpansionItem.js +13 -11
  191. package/src/components/fab/QFab.js +20 -11
  192. package/src/components/fab/QFab.json +35 -0
  193. package/src/components/fab/QFabAction.js +16 -9
  194. package/src/components/fab/QFabAction.json +10 -0
  195. package/src/components/field/QField.js +28 -23
  196. package/src/components/field/__QField.json +72 -8
  197. package/src/components/file/QFile.js +12 -4
  198. package/src/components/file/QFile.sass +4 -3
  199. package/src/components/file/QFile.styl +4 -3
  200. package/src/components/footer/QFooter.js +1 -1
  201. package/src/components/form/QForm.js +1 -1
  202. package/src/components/header/QHeader.js +1 -1
  203. package/src/components/icon/QIcon.js +89 -75
  204. package/src/components/icon/QIcon.sass +2 -2
  205. package/src/components/icon/QIcon.styl +2 -2
  206. package/src/components/img/QImg.json +2 -2
  207. package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
  208. package/src/components/inner-loading/QInnerLoading.js +54 -22
  209. package/src/components/inner-loading/QInnerLoading.json +29 -0
  210. package/src/components/inner-loading/QInnerLoading.sass +3 -0
  211. package/src/components/inner-loading/QInnerLoading.styl +3 -0
  212. package/src/components/item/QItem.js +9 -15
  213. package/src/components/layout/QLayout.js +49 -0
  214. package/src/components/linear-progress/QLinearProgress.js +6 -2
  215. package/src/components/menu/QMenu.js +5 -1
  216. package/src/components/option-group/QOptionGroup.js +32 -22
  217. package/src/components/option-group/QOptionGroup.json +50 -1
  218. package/src/components/parallax/QParallax.js +3 -0
  219. package/src/components/parallax/QParallax.json +1 -1
  220. package/src/components/popup-edit/QPopupEdit.js +41 -16
  221. package/src/components/popup-edit/QPopupEdit.json +15 -8
  222. package/src/components/range/QRange.js +223 -278
  223. package/src/components/range/QRange.json +11 -122
  224. package/src/components/rating/QRating.js +56 -38
  225. package/src/components/rating/QRating.json +3 -3
  226. package/src/components/rating/QRating.sass +8 -6
  227. package/src/components/rating/QRating.styl +8 -6
  228. package/src/components/resize-observer/QResizeObserver.js +15 -10
  229. package/src/components/scroll-area/QScrollArea.js +342 -126
  230. package/src/components/scroll-area/QScrollArea.json +164 -20
  231. package/src/components/scroll-area/QScrollArea.sass +5 -0
  232. package/src/components/scroll-area/QScrollArea.styl +5 -0
  233. package/src/components/scroll-observer/QScrollObserver.js +12 -7
  234. package/src/components/select/QSelect.js +8 -2
  235. package/src/components/select/QSelect.json +1 -1
  236. package/src/components/separator/QSeparator.js +0 -1
  237. package/src/components/separator/QSeparator.json +1 -1
  238. package/src/components/slider/QSlider.js +97 -140
  239. package/src/components/slider/QSlider.json +1 -122
  240. package/src/components/slider/QSlider.sass +205 -139
  241. package/src/components/slider/QSlider.styl +205 -139
  242. package/src/components/slider/slider-utils.js +468 -123
  243. package/src/components/slider/slider-utils.json +546 -0
  244. package/src/components/stepper/QStepper.js +1 -1
  245. package/src/components/stepper/QStepper.sass +25 -26
  246. package/src/components/stepper/QStepper.styl +25 -26
  247. package/src/components/table/QTable.sass +3 -0
  248. package/src/components/table/QTable.styl +3 -0
  249. package/src/components/tabs/QRouteTab.js +13 -13
  250. package/src/components/tabs/QRouteTab.json +0 -7
  251. package/src/components/tabs/QTab.js +71 -20
  252. package/src/components/tabs/QTabs.js +237 -52
  253. package/src/components/tabs/QTabs.json +8 -0
  254. package/src/components/tabs/QTabs.sass +6 -6
  255. package/src/components/tabs/QTabs.styl +6 -6
  256. package/src/components/time/QTime.js +6 -2
  257. package/src/components/timeline/QTimeline.sass +1 -2
  258. package/src/components/timeline/QTimeline.styl +1 -2
  259. package/src/components/timeline/QTimelineEntry.json +1 -1
  260. package/src/components/tree/QTree.js +10 -6
  261. package/src/components/tree/QTree.json +5 -0
  262. package/src/components/tree/QTree.sass +58 -4
  263. package/src/components/tree/QTree.styl +58 -4
  264. package/src/components/uploader/QUploaderBase.js +15 -19
  265. package/src/components/video/QVideo.js +4 -1
  266. package/src/components/video/QVideo.json +11 -0
  267. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  268. package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
  269. package/src/css/core/helpers.sass +3 -0
  270. package/src/css/core/helpers.styl +3 -0
  271. package/src/css/core/positioning.sass +5 -0
  272. package/src/css/core/positioning.styl +5 -0
  273. package/src/css/variables.sass +4 -6
  274. package/src/css/variables.styl +4 -6
  275. package/src/directives/Scroll.js +2 -2
  276. package/src/directives/ScrollFire.js +1 -0
  277. package/src/ie-compat/ie.js +13 -13
  278. package/src/install.js +1 -1
  279. package/src/lang.js +7 -4
  280. package/src/mixins/anchor.js +3 -13
  281. package/src/mixins/btn.js +33 -38
  282. package/src/mixins/btn.json +26 -11
  283. package/src/mixins/file.js +27 -5
  284. package/src/mixins/fullscreen.js +16 -4
  285. package/src/mixins/portal.js +10 -10
  286. package/src/mixins/router-link.js +88 -14
  287. package/src/mixins/router-link.json +26 -10
  288. package/src/mixins/validate.js +33 -15
  289. package/src/mixins/virtual-scroll.js +40 -42
  290. package/src/plugins/AppFullscreen.js +41 -16
  291. package/src/plugins/BottomSheet.json +1 -1
  292. package/src/plugins/Cookies.js +1 -1
  293. package/src/plugins/Loading.js +8 -0
  294. package/src/plugins/LoadingBar.js +9 -0
  295. package/src/plugins/LoadingBar.json +1 -1
  296. package/src/plugins/Notify.js +351 -333
  297. package/src/plugins/Notify.json +20 -20
  298. package/src/plugins/Notify.sass +9 -3
  299. package/src/plugins/Notify.styl +9 -3
  300. package/src/utils/clone.js +53 -4
  301. package/src/utils/date.js +134 -69
  302. package/src/utils/dom.js +28 -9
  303. package/src/utils/extend.js +2 -2
  304. package/src/utils/focus-manager.js +8 -10
  305. package/src/utils/global-dialog.js +18 -1
  306. package/src/utils/is.js +2 -2
  307. package/src/utils/morph.js +2 -12
  308. package/src/utils/scroll.js +71 -35
@@ -7,10 +7,16 @@ import QSpinner from '../components/spinner/QSpinner.js'
7
7
 
8
8
  import { noop } from '../utils/event.js'
9
9
  import { getBodyFullscreenElement } from '../utils/dom.js'
10
+ import debounce from '../utils/debounce.js'
10
11
  import { isSSR } from './Platform.js'
11
12
 
12
- let uid = 0
13
+ let uid = 0, vm
14
+
13
15
  const defaults = {}
16
+ const groups = {}
17
+ const notificationsList = {}
18
+ const positionClass = {}
19
+ const emptyRE = /^\s*$/
14
20
 
15
21
  const positionList = [
16
22
  'top-left', 'top-right',
@@ -25,23 +31,23 @@ const badgePositions = [
25
31
 
26
32
  const notifTypes = {
27
33
  positive: {
28
- icon () { return this.$q.iconSet.type.positive },
34
+ icon: $q => $q.iconSet.type.positive,
29
35
  color: 'positive'
30
36
  },
31
37
 
32
38
  negative: {
33
- icon () { return this.$q.iconSet.type.negative },
39
+ icon: $q => $q.iconSet.type.negative,
34
40
  color: 'negative'
35
41
  },
36
42
 
37
43
  warning: {
38
- icon () { return this.$q.iconSet.type.warning },
44
+ icon: $q => $q.iconSet.type.warning,
39
45
  color: 'warning',
40
46
  textColor: 'dark'
41
47
  },
42
48
 
43
49
  info: {
44
- icon () { return this.$q.iconSet.type.info },
50
+ icon: $q => $q.iconSet.type.info,
45
51
  color: 'info'
46
52
  },
47
53
 
@@ -53,329 +59,334 @@ const notifTypes = {
53
59
  }
54
60
  }
55
61
 
56
- const groups = {}
57
- const positionClass = {}
58
-
59
- function logError (error, config) {
60
- console.error(`Notify: ${error}`, config)
61
- return false
62
- }
63
-
64
- const Notifications = {
65
- name: 'QNotifications',
62
+ function addNotification (config, vm, originalApi) {
63
+ if (!config) {
64
+ return logError('parameter required')
65
+ }
66
66
 
67
- created () {
68
- this.notifs = {}
67
+ let Api
68
+ const notif = { textColor: 'white' }
69
69
 
70
- positionList.forEach(pos => {
71
- this.notifs[pos] = []
70
+ if (config.ignoreDefaults !== true) {
71
+ Object.assign(notif, defaults)
72
+ }
72
73
 
73
- const
74
- vert = ['left', 'center', 'right'].includes(pos) === true ? 'center' : (pos.indexOf('top') > -1 ? 'top' : 'bottom'),
75
- align = pos.indexOf('left') > -1 ? 'start' : (pos.indexOf('right') > -1 ? 'end' : 'center'),
76
- classes = ['left', 'right'].includes(pos) ? `items-${pos === 'left' ? 'start' : 'end'} justify-center` : (pos === 'center' ? 'flex-center' : `items-${align}`)
74
+ if (Object(config) !== config) {
75
+ if (notif.type) {
76
+ Object.assign(notif, notifTypes[notif.type])
77
+ }
77
78
 
78
- positionClass[pos] = `q-notifications__list q-notifications__list--${vert} fixed column no-wrap ${classes}`
79
- })
80
- },
79
+ config = { message: config }
80
+ }
81
81
 
82
- methods: {
83
- add (config, originalApi) {
84
- if (!config) {
85
- return logError('parameter required')
86
- }
82
+ Object.assign(notif, notifTypes[config.type || notif.type], config)
87
83
 
88
- let Api
89
- const notif = { textColor: 'white' }
84
+ if (typeof notif.icon === 'function') {
85
+ notif.icon = notif.icon(vm.$q)
86
+ }
90
87
 
91
- if (config.ignoreDefaults !== true) {
92
- Object.assign(notif, defaults)
93
- }
88
+ if (!notif.spinner) {
89
+ notif.spinner = false
90
+ }
91
+ else if (notif.spinner === true) {
92
+ notif.spinner = QSpinner
93
+ }
94
94
 
95
- if (Object(config) !== config) {
96
- if (notif.type) {
97
- Object.assign(notif, notifTypes[notif.type])
98
- }
95
+ notif.meta = {
96
+ hasMedia: Boolean(notif.spinner !== false || notif.icon || notif.avatar),
97
+ hasText: hasContent(notif.message) || hasContent(notif.caption)
98
+ }
99
99
 
100
- config = { message: config }
101
- }
100
+ if (notif.position) {
101
+ if (positionList.includes(notif.position) === false) {
102
+ return logError('wrong position', config)
103
+ }
104
+ }
105
+ else {
106
+ notif.position = 'bottom'
107
+ }
102
108
 
103
- Object.assign(notif, notifTypes[config.type || notif.type], config)
109
+ if (notif.timeout === void 0) {
110
+ notif.timeout = 5000
111
+ }
112
+ else {
113
+ const t = parseInt(notif.timeout, 10)
114
+ if (isNaN(t) || t < 0) {
115
+ return logError('wrong timeout', config)
116
+ }
117
+ notif.timeout = t
118
+ }
104
119
 
105
- if (typeof notif.icon === 'function') {
106
- notif.icon = notif.icon.call(this)
107
- }
120
+ if (notif.timeout === 0) {
121
+ notif.progress = false
122
+ }
123
+ else if (notif.progress === true) {
124
+ notif.meta.progressClass = 'q-notification__progress' + (
125
+ notif.progressClass
126
+ ? ` ${notif.progressClass}`
127
+ : ''
128
+ )
129
+
130
+ notif.meta.progressStyle = {
131
+ animationDuration: `${notif.timeout + 1000}ms`
132
+ }
133
+ }
108
134
 
109
- if (notif.spinner === void 0) {
110
- notif.spinner = false
111
- }
112
- else if (notif.spinner === true) {
113
- notif.spinner = QSpinner
114
- }
135
+ const actions = (
136
+ Array.isArray(config.actions) === true
137
+ ? config.actions
138
+ : []
139
+ ).concat(
140
+ config.ignoreDefaults !== true && Array.isArray(defaults.actions) === true
141
+ ? defaults.actions
142
+ : []
143
+ ).concat(
144
+ notifTypes[config.type] !== void 0 && Array.isArray(notifTypes[config.type].actions) === true
145
+ ? notifTypes[config.type].actions
146
+ : []
147
+ )
148
+
149
+ const { closeBtn } = notif
150
+ closeBtn && actions.push({
151
+ label: typeof closeBtn === 'string'
152
+ ? closeBtn
153
+ : this.$q.lang.label.close
154
+ })
155
+
156
+ notif.actions = actions.map(({ handler, noDismiss, style, class: klass, attrs, ...props }) => ({
157
+ staticClass: klass,
158
+ style,
159
+ props: { flat: true, ...props },
160
+ attrs,
161
+ on: {
162
+ click: typeof handler === 'function'
163
+ ? () => {
164
+ handler()
165
+ noDismiss !== true && dismiss()
166
+ }
167
+ : () => { dismiss() }
168
+ }
169
+ }))
115
170
 
116
- notif.meta = {
117
- hasMedia: Boolean(notif.spinner !== false || notif.icon || notif.avatar)
118
- }
171
+ if (notif.multiLine === void 0) {
172
+ notif.multiLine = notif.actions.length > 1
173
+ }
119
174
 
120
- if (notif.position) {
121
- if (positionList.includes(notif.position) === false) {
122
- return logError('wrong position', config)
123
- }
124
- }
125
- else {
126
- notif.position = 'bottom'
127
- }
175
+ Object.assign(notif.meta, {
176
+ staticClass: 'q-notification row items-stretch' +
177
+ ` q-notification--${notif.multiLine === true ? 'multi-line' : 'standard'}` +
178
+ (notif.color !== void 0 ? ` bg-${notif.color}` : '') +
179
+ (notif.textColor !== void 0 ? ` text-${notif.textColor}` : '') +
180
+ (notif.classes !== void 0 ? ` ${notif.classes}` : ''),
128
181
 
129
- if (notif.timeout === void 0) {
130
- notif.timeout = 5000
131
- }
132
- else {
133
- const t = parseInt(notif.timeout, 10)
134
- if (isNaN(t) || t < 0) {
135
- return logError('wrong timeout', config)
136
- }
137
- notif.timeout = t
138
- }
182
+ wrapperClass: 'q-notification__wrapper col relative-position border-radius-inherit ' +
183
+ (notif.multiLine === true ? 'column no-wrap justify-center' : 'row items-center'),
139
184
 
140
- if (notif.timeout === 0) {
141
- notif.progress = false
142
- }
143
- else if (notif.progress === true) {
144
- notif.meta.progressStyle = {
145
- animationDuration: `${notif.timeout + 1000}ms`
146
- }
147
- }
185
+ contentClass: 'q-notification__content row items-center' +
186
+ (notif.multiLine === true ? '' : ' col'),
148
187
 
149
- const actions = (
150
- Array.isArray(config.actions) === true
151
- ? config.actions
152
- : []
153
- ).concat(
154
- config.ignoreDefaults !== true && Array.isArray(defaults.actions) === true
155
- ? defaults.actions
156
- : []
157
- ).concat(
158
- notifTypes[config.type] !== void 0 && Array.isArray(notifTypes[config.type].actions) === true
159
- ? notifTypes[config.type].actions
160
- : []
161
- )
162
-
163
- notif.closeBtn && actions.push({
164
- label: typeof notif.closeBtn === 'string'
165
- ? notif.closeBtn
166
- : this.$q.lang.label.close
167
- })
188
+ leftClass: notif.meta.hasText === true ? 'additional' : 'single',
168
189
 
169
- notif.actions = actions.map(({ handler, noDismiss, style, class: klass, attrs, ...props }) => ({
170
- staticClass: klass,
171
- style,
172
- props: { flat: true, ...props },
173
- attrs,
174
- on: {
175
- click: typeof handler === 'function'
176
- ? () => {
177
- handler()
178
- noDismiss !== true && dismiss()
179
- }
180
- : () => { dismiss() }
181
- }
182
- }))
190
+ attrs: {
191
+ role: 'alert',
192
+ ...notif.attrs
193
+ }
194
+ })
183
195
 
184
- if (notif.multiLine === void 0) {
185
- notif.multiLine = notif.actions.length > 1
186
- }
196
+ if (notif.group === false) {
197
+ notif.group = void 0
198
+ notif.meta.group = void 0
199
+ }
200
+ else {
201
+ if (notif.group === void 0 || notif.group === true) {
202
+ // do not replace notifications with different buttons
203
+ notif.group = [
204
+ notif.message,
205
+ notif.caption,
206
+ notif.multiline
207
+ ].concat(
208
+ notif.actions.map(({ props }) => `${props.label}*${props.icon}`)
209
+ ).join('|')
210
+ }
187
211
 
188
- Object.assign(notif.meta, {
189
- staticClass: `q-notification row items-stretch` +
190
- ` q-notification--${notif.multiLine === true ? 'multi-line' : 'standard'}` +
191
- (notif.color !== void 0 ? ` bg-${notif.color}` : '') +
192
- (notif.textColor !== void 0 ? ` text-${notif.textColor}` : '') +
193
- (notif.classes !== void 0 ? ` ${notif.classes}` : ''),
212
+ notif.meta.group = notif.group + '|' + notif.position
213
+ }
194
214
 
195
- wrapperClass: 'q-notification__wrapper col relative-position border-radius-inherit ' +
196
- (notif.multiLine === true ? 'column no-wrap justify-center' : 'row items-center'),
215
+ if (notif.actions.length === 0) {
216
+ notif.actions = void 0
217
+ }
218
+ else {
219
+ notif.meta.actionsClass = 'q-notification__actions row items-center ' +
220
+ (notif.multiLine === true ? 'justify-end' : 'col-auto') +
221
+ (notif.meta.hasMedia === true ? ' q-notification__actions--with-media' : '')
222
+ }
197
223
 
198
- contentClass: 'q-notification__content row items-center' +
199
- (notif.multiLine === true ? '' : ' col'),
224
+ if (originalApi !== void 0) {
225
+ // reset timeout if any
226
+ clearTimeout(originalApi.notif.meta.timer)
200
227
 
201
- attrs: {
202
- role: 'alert',
203
- ...notif.attrs
204
- }
205
- })
228
+ // retain uid
229
+ notif.meta.uid = originalApi.notif.meta.uid
206
230
 
207
- if (notif.group === false) {
208
- notif.group = void 0
209
- notif.meta.group = void 0
231
+ // replace notif
232
+ const index = notificationsList[notif.position].indexOf(originalApi.notif)
233
+ notificationsList[notif.position][index] = notif
234
+ }
235
+ else {
236
+ const original = groups[notif.meta.group]
237
+
238
+ // woohoo, it's a new notification
239
+ if (original === void 0) {
240
+ notif.meta.uid = uid++
241
+ notif.meta.badge = 1
242
+
243
+ if (['left', 'right', 'center'].indexOf(notif.position) !== -1) {
244
+ notificationsList[notif.position].splice(
245
+ Math.floor(notificationsList[notif.position].length / 2),
246
+ 0,
247
+ notif
248
+ )
210
249
  }
211
250
  else {
212
- if (notif.group === void 0 || notif.group === true) {
213
- // do not replace notifications with different buttons
214
- notif.group = [
215
- notif.message,
216
- notif.caption,
217
- notif.multiline
218
- ].concat(
219
- notif.actions.map(a => `${a.props.label}*${a.props.icon}`)
220
- ).join('|')
221
- }
222
-
223
- notif.meta.group = notif.group + '|' + notif.position
251
+ const action = notif.position.indexOf('top') > -1 ? 'unshift' : 'push'
252
+ notificationsList[notif.position][action](notif)
224
253
  }
225
254
 
226
- if (notif.actions.length === 0) {
227
- notif.actions = void 0
255
+ if (notif.group !== void 0) {
256
+ groups[notif.meta.group] = notif
257
+ }
258
+ }
259
+ // ok, so it's NOT a new one
260
+ else {
261
+ // reset timeout if any
262
+ clearTimeout(original.meta.timer)
263
+
264
+ if (notif.badgePosition !== void 0) {
265
+ if (badgePositions.includes(notif.badgePosition) === false) {
266
+ return logError('wrong badgePosition', config)
267
+ }
228
268
  }
229
269
  else {
230
- notif.meta.actionsClass = 'q-notification__actions row items-center ' +
231
- (notif.multiLine === true ? 'justify-end' : 'col-auto') +
232
- (notif.meta.hasMedia === true ? ' q-notification__actions--with-media' : '')
270
+ notif.badgePosition = `top-${notif.position.indexOf('left') > -1 ? 'right' : 'left'}`
233
271
  }
234
272
 
235
- if (originalApi !== void 0) {
236
- // reset timeout if any
237
- clearTimeout(originalApi.notif.meta.timer)
273
+ notif.meta.uid = original.meta.uid
274
+ notif.meta.badge = original.meta.badge + 1
275
+ notif.meta.badgeClass = `q-notification__badge q-notification__badge--${notif.badgePosition}` +
276
+ (notif.badgeColor !== void 0 ? ` bg-${notif.badgeColor}` : '') +
277
+ (notif.badgeTextColor !== void 0 ? ` text-${notif.badgeTextColor}` : '') +
278
+ (notif.badgeClass ? ` ${notif.badgeClass}` : '')
238
279
 
239
- // retain uid
240
- notif.meta.uid = originalApi.notif.meta.uid
280
+ const index = notificationsList[notif.position].indexOf(original)
281
+ notificationsList[notif.position][index] = groups[notif.meta.group] = notif
282
+ }
283
+ }
241
284
 
242
- // replace notif
243
- const index = this.notifs[notif.position].indexOf(originalApi.notif)
244
- this.notifs[notif.position][index] = notif
245
- }
246
- else {
247
- const original = groups[notif.meta.group]
248
-
249
- // woohoo, it's a new notification
250
- if (original === void 0) {
251
- notif.meta.uid = uid++
252
- notif.meta.badge = 1
253
-
254
- if (['left', 'right', 'center'].indexOf(notif.position) !== -1) {
255
- this.notifs[notif.position].splice(
256
- Math.floor(this.notifs[notif.position].length / 2),
257
- 0,
258
- notif
259
- )
260
- }
261
- else {
262
- const action = notif.position.indexOf('top') > -1 ? 'unshift' : 'push'
263
- this.notifs[notif.position][action](notif)
264
- }
285
+ const dismiss = () => {
286
+ removeNotification(notif, vm)
287
+ Api = void 0
288
+ }
265
289
 
266
- if (notif.group !== void 0) {
267
- groups[notif.meta.group] = notif
268
- }
269
- }
270
- // ok, so it's NOT a new one
271
- else {
272
- // reset timeout if any
273
- clearTimeout(original.meta.timer)
274
-
275
- if (notif.badgePosition !== void 0) {
276
- if (badgePositions.includes(notif.badgePosition) === false) {
277
- return logError('wrong badgePosition', config)
278
- }
279
- }
280
- else {
281
- notif.badgePosition = `top-${notif.position.indexOf('left') > -1 ? 'right' : 'left'}`
282
- }
290
+ vm.$forceUpdate()
283
291
 
284
- notif.meta.uid = original.meta.uid
285
- notif.meta.badge = original.meta.badge + 1
286
- notif.meta.badgeStaticClass = `q-notification__badge q-notification__badge--${notif.badgePosition}` +
287
- (notif.badgeColor !== void 0 ? ` bg-${notif.badgeColor}` : '') +
288
- (notif.badgeTextColor !== void 0 ? ` text-${notif.badgeTextColor}` : '')
292
+ if (notif.timeout > 0) {
293
+ notif.meta.timer = setTimeout(() => {
294
+ dismiss()
295
+ }, notif.timeout + /* show duration */ 1000)
296
+ }
289
297
 
290
- const index = this.notifs[notif.position].indexOf(original)
291
- this.notifs[notif.position][index] = groups[notif.meta.group] = notif
292
- }
298
+ // only non-groupable can be updated
299
+ if (notif.group !== void 0) {
300
+ return props => {
301
+ if (props !== void 0) {
302
+ logError('trying to update a grouped one which is forbidden', config)
293
303
  }
294
-
295
- const dismiss = () => {
296
- this.remove(notif)
297
- Api = void 0
304
+ else {
305
+ dismiss()
298
306
  }
307
+ }
308
+ }
299
309
 
300
- this.$forceUpdate()
310
+ Api = {
311
+ dismiss,
312
+ config,
313
+ notif
314
+ }
301
315
 
302
- if (notif.timeout > 0) {
303
- notif.meta.timer = setTimeout(() => {
304
- dismiss()
305
- }, notif.timeout + /* show duration */ 1000)
306
- }
316
+ if (originalApi !== void 0) {
317
+ Object.assign(originalApi, Api)
318
+ return
319
+ }
307
320
 
308
- // only non-groupable can be updated
309
- if (notif.group !== void 0) {
310
- return props => {
311
- if (props !== void 0) {
312
- logError('trying to update a grouped one which is forbidden', config)
313
- }
314
- else {
315
- dismiss()
316
- }
317
- }
321
+ return props => {
322
+ // if notification wasn't previously dismissed
323
+ if (Api !== void 0) {
324
+ // if no params, then we must dismiss the notification
325
+ if (props === void 0) {
326
+ Api.dismiss()
318
327
  }
328
+ // otherwise we're updating it
329
+ else {
330
+ const newNotif = Object.assign({}, Api.config, props, {
331
+ group: false,
332
+ position: notif.position
333
+ })
319
334
 
320
- Api = {
321
- dismiss,
322
- config,
323
- notif
335
+ addNotification(newNotif, vm, Api)
324
336
  }
337
+ }
338
+ }
339
+ }
325
340
 
326
- if (originalApi !== void 0) {
327
- Object.assign(originalApi, Api)
328
- return
329
- }
341
+ function removeNotification (notif, vm) {
342
+ clearTimeout(notif.meta.timer)
330
343
 
331
- return props => {
332
- // if notification wasn't previously dismissed
333
- if (Api !== void 0) {
334
- // if no params, then we must dismiss the notification
335
- if (props === void 0) {
336
- Api.dismiss()
337
- }
338
- // otherwise we're updating it
339
- else {
340
- const newNotif = Object.assign({}, Api.config, props, {
341
- group: false,
342
- position: notif.position
343
- })
344
+ const index = notificationsList[notif.position].indexOf(notif)
345
+ if (index !== -1) {
346
+ if (notif.group !== void 0) {
347
+ delete groups[notif.meta.group]
348
+ }
344
349
 
345
- this.add(newNotif, Api)
346
- }
347
- }
348
- }
349
- },
350
+ const el = vm.$refs['' + notif.meta.uid]
350
351
 
351
- remove (notif) {
352
- clearTimeout(notif.meta.timer)
352
+ if (el) {
353
+ const { width, height } = getComputedStyle(el)
353
354
 
354
- const index = this.notifs[notif.position].indexOf(notif)
355
- if (index !== -1) {
356
- if (notif.group !== void 0) {
357
- delete groups[notif.meta.group]
358
- }
355
+ el.style.left = `${el.offsetLeft}px`
356
+ el.style.width = width
357
+ el.style.height = height
358
+ }
359
359
 
360
- const el = this.$refs[`notif_${notif.meta.uid}`]
360
+ notificationsList[notif.position].splice(index, 1)
361
361
 
362
- if (el) {
363
- const { width, height } = getComputedStyle(el)
362
+ vm.$forceUpdate()
364
363
 
365
- el.style.left = `${el.offsetLeft}px`
366
- el.style.width = width
367
- el.style.height = height
368
- }
364
+ if (typeof notif.onDismiss === 'function') {
365
+ notif.onDismiss()
366
+ }
367
+ }
368
+ }
369
369
 
370
- this.notifs[notif.position].splice(index, 1)
370
+ function hasContent (str) {
371
+ return str !== void 0 &&
372
+ str !== null &&
373
+ emptyRE.test(str) !== true
374
+ }
371
375
 
372
- this.$forceUpdate()
376
+ function logError (error, config) {
377
+ console.error(`Notify: ${error}`, config)
378
+ return false
379
+ }
373
380
 
374
- if (typeof notif.onDismiss === 'function') {
375
- notif.onDismiss()
376
- }
377
- }
378
- }
381
+ const Notifications = {
382
+ name: 'QNotifications',
383
+
384
+ // hide App from Vue devtools
385
+ devtools: { hide: true },
386
+
387
+ beforeCreate () {
388
+ // prevent error in Vue devtools
389
+ this._routerRoot === void 0 && (this._routerRoot = {})
379
390
  },
380
391
 
381
392
  render (h) {
@@ -388,43 +399,22 @@ const Notifications = {
388
399
  name: `q-notification--${pos}`,
389
400
  mode: 'out-in'
390
401
  }
391
- }, this.notifs[pos].map(notif => {
392
- let msgChild
393
-
394
- const meta = notif.meta
395
- const msgData = { staticClass: 'q-notification__message col' }
396
-
397
- if (notif.html === true) {
398
- msgData.domProps = {
399
- innerHTML: notif.caption
400
- ? `<div>${notif.message}</div><div class="q-notification__caption">${notif.caption}</div>`
401
- : notif.message
402
- }
403
- }
404
- else {
405
- const msgNode = [ notif.message ]
406
- msgChild = notif.caption
407
- ? [
408
- h('div', msgNode),
409
- h('div', { staticClass: 'q-notification__caption' }, [ notif.caption ])
410
- ]
411
- : msgNode
412
- }
413
-
402
+ }, notificationsList[pos].map(notif => {
403
+ const { meta } = notif
414
404
  const mainChild = []
415
405
 
416
406
  if (meta.hasMedia === true) {
417
407
  if (notif.spinner !== false) {
418
408
  mainChild.push(
419
409
  h(notif.spinner, {
420
- staticClass: 'q-notification__spinner'
410
+ staticClass: 'q-notification__spinner q-notification__spinner--' + meta.leftClass
421
411
  })
422
412
  )
423
413
  }
424
414
  else if (notif.icon) {
425
415
  mainChild.push(
426
416
  h(QIcon, {
427
- staticClass: 'q-notification__icon',
417
+ staticClass: 'q-notification__icon q-notification__icon--' + meta.leftClass,
428
418
  attrs: { role: 'img' },
429
419
  props: { name: notif.icon }
430
420
  })
@@ -432,16 +422,38 @@ const Notifications = {
432
422
  }
433
423
  else if (notif.avatar) {
434
424
  mainChild.push(
435
- h(QAvatar, { staticClass: 'q-notification__avatar' }, [
425
+ h(QAvatar, { staticClass: 'q-notification__avatar q-notification__avatar--' + meta.leftClass }, [
436
426
  h('img', { attrs: { src: notif.avatar, 'aria-hidden': 'true' } })
437
427
  ])
438
428
  )
439
429
  }
440
430
  }
441
431
 
442
- mainChild.push(
443
- h('div', msgData, msgChild)
444
- )
432
+ if (meta.hasText === true) {
433
+ let msgChild
434
+ const msgData = { staticClass: 'q-notification__message col' }
435
+
436
+ if (notif.html === true) {
437
+ msgData.domProps = {
438
+ innerHTML: notif.caption
439
+ ? `<div>${notif.message}</div><div class="q-notification__caption">${notif.caption}</div>`
440
+ : notif.message
441
+ }
442
+ }
443
+ else {
444
+ const msgNode = [ notif.message ]
445
+ msgChild = notif.caption
446
+ ? [
447
+ h('div', msgNode),
448
+ h('div', { staticClass: 'q-notification__caption' }, [notif.caption])
449
+ ]
450
+ : msgNode
451
+ }
452
+
453
+ mainChild.push(
454
+ h('div', msgData, msgChild)
455
+ )
456
+ }
445
457
 
446
458
  const child = [
447
459
  h('div', { staticClass: meta.contentClass }, mainChild)
@@ -450,9 +462,8 @@ const Notifications = {
450
462
  notif.progress === true && child.push(
451
463
  h('div', {
452
464
  key: `${meta.uid}|p|${meta.badge}`,
453
- staticClass: 'q-notification__progress',
454
- style: meta.progressStyle,
455
- class: notif.progressClass
465
+ staticClass: meta.progressClass,
466
+ style: meta.progressStyle
456
467
  })
457
468
  )
458
469
 
@@ -465,14 +476,13 @@ const Notifications = {
465
476
  meta.badge > 1 && child.push(
466
477
  h('div', {
467
478
  key: `${meta.uid}|${meta.badge}`,
468
- staticClass: meta.badgeStaticClass,
469
- style: notif.badgeStyle,
470
- class: notif.badgeClass
479
+ staticClass: meta.badgeClass,
480
+ style: notif.badgeStyle
471
481
  }, [ meta.badge ])
472
482
  )
473
483
 
474
484
  return h('div', {
475
- ref: `notif_${meta.uid}`,
485
+ ref: '' + meta.uid,
476
486
  key: meta.uid,
477
487
  staticClass: meta.staticClass,
478
488
  attrs: meta.attrs
@@ -485,21 +495,18 @@ const Notifications = {
485
495
 
486
496
  mounted () {
487
497
  if (this.$q.fullscreen !== void 0 && this.$q.fullscreen.isCapable === true) {
488
- const append = isFullscreen => {
489
- const newParent = getBodyFullscreenElement(
490
- isFullscreen,
491
- this.$q.fullscreen.activeEl
492
- )
498
+ const append = () => {
499
+ const newParent = getBodyFullscreenElement(this.$q.fullscreen.activeEl)
493
500
 
494
501
  if (this.$el.parentElement !== newParent) {
495
502
  newParent.appendChild(this.$el)
496
503
  }
497
504
  }
498
505
 
499
- this.unwatchFullscreen = this.$watch('$q.fullscreen.isActive', append)
506
+ this.unwatchFullscreen = this.$watch('$q.fullscreen.activeEl', debounce(append, 50))
500
507
 
501
508
  if (this.$q.fullscreen.isActive === true) {
502
- append(true)
509
+ append()
503
510
  }
504
511
  }
505
512
  },
@@ -510,36 +517,47 @@ const Notifications = {
510
517
  }
511
518
 
512
519
  export default {
513
- create (opts) {
514
- if (isSSR === true) { return noop }
515
- return this.__vm.add(opts)
516
- },
517
520
  setDefaults (opts) {
518
- opts === Object(opts) && Object.assign(defaults, opts)
521
+ if (isSSR !== true && opts === Object(opts)) {
522
+ Object.assign(defaults, opts)
523
+ }
519
524
  },
525
+
520
526
  registerType (typeName, typeOpts) {
521
527
  if (isSSR !== true && typeOpts === Object(typeOpts)) {
522
528
  notifTypes[typeName] = typeOpts
523
529
  }
524
530
  },
525
531
 
526
- install ({ cfg, $q }) {
527
- if (isSSR === true) {
528
- $q.notify = noop
529
- $q.notify.setDefaults = noop
530
- return
531
- }
532
-
533
- this.setDefaults(cfg.notify)
532
+ install ({ $q }) {
533
+ $q.notify = this.create = isSSR === true
534
+ ? noop
535
+ : opts => addNotification(opts, vm)
534
536
 
535
- $q.notify = this.create.bind(this)
536
537
  $q.notify.setDefaults = this.setDefaults
537
538
  $q.notify.registerType = this.registerType
538
539
 
539
- const node = document.createElement('div')
540
- document.body.appendChild(node)
540
+ if ($q.config.notify !== void 0) {
541
+ this.setDefaults($q.config.notify)
542
+ }
543
+
544
+ if (isSSR !== true) {
545
+ positionList.forEach(pos => {
546
+ notificationsList[pos] = []
547
+
548
+ const
549
+ vert = ['left', 'center', 'right'].includes(pos) === true ? 'center' : (pos.indexOf('top') > -1 ? 'top' : 'bottom'),
550
+ align = pos.indexOf('left') > -1 ? 'start' : (pos.indexOf('right') > -1 ? 'end' : 'center'),
551
+ classes = ['left', 'right'].includes(pos) ? `items-${pos === 'left' ? 'start' : 'end'} justify-center` : (pos === 'center' ? 'flex-center' : `items-${align}`)
541
552
 
542
- this.__vm = new Vue(Notifications)
543
- this.__vm.$mount(node)
553
+ positionClass[pos] = `q-notifications__list q-notifications__list--${vert} fixed column no-wrap ${classes}`
554
+ })
555
+
556
+ const node = document.createElement('div')
557
+ document.body.appendChild(node)
558
+
559
+ vm = new Vue(Notifications)
560
+ vm.$mount(node)
561
+ }
544
562
  }
545
563
  }