quasar 2.14.5 → 2.14.6

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 (356) hide show
  1. package/dist/api/AddressbarColor.json +1 -22
  2. package/dist/api/AppFullscreen.json +1 -78
  3. package/dist/api/AppVisibility.json +1 -15
  4. package/dist/api/BottomSheet.json +1 -264
  5. package/dist/api/Brand.json +1 -49
  6. package/dist/api/ClosePopup.json +1 -21
  7. package/dist/api/Cookies.json +1 -190
  8. package/dist/api/Dark.json +1 -63
  9. package/dist/api/Dialog.json +1 -479
  10. package/dist/api/Intersection.json +1 -204
  11. package/dist/api/Lang.json +1 -18
  12. package/dist/api/Loading.json +1 -317
  13. package/dist/api/LoadingBar.json +1 -62
  14. package/dist/api/LocalStorage.json +1 -187
  15. package/dist/api/Meta.json +1 -6
  16. package/dist/api/Morph.json +1 -188
  17. package/dist/api/Mutation.json +1 -122
  18. package/dist/api/Notify.json +1 -697
  19. package/dist/api/Platform.json +1 -238
  20. package/dist/api/QAjaxBar.json +1 -117
  21. package/dist/api/QAvatar.json +1 -76
  22. package/dist/api/QBadge.json +1 -82
  23. package/dist/api/QBanner.json +1 -44
  24. package/dist/api/QBar.json +1 -28
  25. package/dist/api/QBreadcrumbs.json +1 -82
  26. package/dist/api/QBreadcrumbsEl.json +1 -162
  27. package/dist/api/QBtn.json +1 -354
  28. package/dist/api/QBtnDropdown.json +1 -560
  29. package/dist/api/QBtnGroup.json +1 -59
  30. package/dist/api/QBtnToggle.json +1 -263
  31. package/dist/api/QCard.json +1 -51
  32. package/dist/api/QCardActions.json +1 -34
  33. package/dist/api/QCardSection.json +1 -31
  34. package/dist/api/QCarousel.json +1 -421
  35. package/dist/api/QCarouselControl.json +1 -41
  36. package/dist/api/QCarouselSlide.json +1 -44
  37. package/dist/api/QChatMessage.json +1 -128
  38. package/dist/api/QCheckbox.json +1 -211
  39. package/dist/api/QChip.json +1 -232
  40. package/dist/api/QCircularProgress.json +1 -145
  41. package/dist/api/QColor.json +1 -150
  42. package/dist/api/QDate.json +1 -637
  43. package/dist/api/QDialog.json +1 -259
  44. package/dist/api/QDrawer.json +1 -272
  45. package/dist/api/QEditor.json +1 -485
  46. package/dist/api/QExpansionItem.json +1 -434
  47. package/dist/api/QFab.json +1 -352
  48. package/dist/api/QFabAction.json +1 -241
  49. package/dist/api/QField.json +1 -448
  50. package/dist/api/QFile.json +1 -643
  51. package/dist/api/QFooter.json +1 -60
  52. package/dist/api/QForm.json +1 -112
  53. package/dist/api/QFormChildMixin.json +1 -24
  54. package/dist/api/QHeader.json +1 -67
  55. package/dist/api/QIcon.json +1 -69
  56. package/dist/api/QImg.json +1 -279
  57. package/dist/api/QInfiniteScroll.json +1 -116
  58. package/dist/api/QInnerLoading.json +1 -117
  59. package/dist/api/QInput.json +1 -521
  60. package/dist/api/QIntersection.json +1 -112
  61. package/dist/api/QItem.json +1 -203
  62. package/dist/api/QItemLabel.json +1 -36
  63. package/dist/api/QItemSection.json +1 -38
  64. package/dist/api/QKnob.json +1 -197
  65. package/dist/api/QLayout.json +1 -100
  66. package/dist/api/QLinearProgress.json +1 -113
  67. package/dist/api/QList.json +1 -58
  68. package/dist/api/QMarkupTable.json +1 -64
  69. package/dist/api/QMenu.json +1 -337
  70. package/dist/api/QNoSsr.json +1 -38
  71. package/dist/api/QOptionGroup.json +1 -242
  72. package/dist/api/QPage.json +1 -42
  73. package/dist/api/QPageContainer.json +1 -11
  74. package/dist/api/QPageScroller.json +1 -68
  75. package/dist/api/QPageSticky.json +1 -44
  76. package/dist/api/QPagination.json +1 -376
  77. package/dist/api/QParallax.json +1 -74
  78. package/dist/api/QPopupEdit.json +1 -335
  79. package/dist/api/QPopupProxy.json +1 -168
  80. package/dist/api/QPullToRefresh.json +1 -91
  81. package/dist/api/QRadio.json +1 -163
  82. package/dist/api/QRange.json +1 -789
  83. package/dist/api/QRating.json +1 -186
  84. package/dist/api/QResizeObserver.json +1 -56
  85. package/dist/api/QResponsive.json +1 -26
  86. package/dist/api/QRouteTab.json +1 -225
  87. package/dist/api/QScrollArea.json +1 -354
  88. package/dist/api/QScrollObserver.json +1 -140
  89. package/dist/api/QSelect.json +1 -1387
  90. package/dist/api/QSeparator.json +1 -72
  91. package/dist/api/QSkeleton.json +1 -127
  92. package/dist/api/QSlideItem.json +1 -219
  93. package/dist/api/QSlideTransition.json +1 -33
  94. package/dist/api/QSlider.json +1 -687
  95. package/dist/api/QSpace.json +1 -6
  96. package/dist/api/QSpinner.json +1 -37
  97. package/dist/api/QSpinnerAudio.json +1 -30
  98. package/dist/api/QSpinnerBall.json +1 -30
  99. package/dist/api/QSpinnerBars.json +1 -30
  100. package/dist/api/QSpinnerBox.json +1 -30
  101. package/dist/api/QSpinnerClock.json +1 -30
  102. package/dist/api/QSpinnerComment.json +1 -30
  103. package/dist/api/QSpinnerCube.json +1 -30
  104. package/dist/api/QSpinnerDots.json +1 -30
  105. package/dist/api/QSpinnerFacebook.json +1 -30
  106. package/dist/api/QSpinnerGears.json +1 -30
  107. package/dist/api/QSpinnerGrid.json +1 -30
  108. package/dist/api/QSpinnerHearts.json +1 -30
  109. package/dist/api/QSpinnerHourglass.json +1 -30
  110. package/dist/api/QSpinnerInfinity.json +1 -30
  111. package/dist/api/QSpinnerIos.json +1 -30
  112. package/dist/api/QSpinnerOrbit.json +1 -30
  113. package/dist/api/QSpinnerOval.json +1 -30
  114. package/dist/api/QSpinnerPie.json +1 -30
  115. package/dist/api/QSpinnerPuff.json +1 -30
  116. package/dist/api/QSpinnerRadio.json +1 -30
  117. package/dist/api/QSpinnerRings.json +1 -30
  118. package/dist/api/QSpinnerTail.json +1 -30
  119. package/dist/api/QSplitter.json +1 -146
  120. package/dist/api/QStep.json +1 -167
  121. package/dist/api/QStepper.json +1 -340
  122. package/dist/api/QStepperNavigation.json +1 -11
  123. package/dist/api/QTab.json +1 -113
  124. package/dist/api/QTabPanel.json +1 -39
  125. package/dist/api/QTabPanels.json +1 -203
  126. package/dist/api/QTable.json +1 -2799
  127. package/dist/api/QTabs.json +1 -179
  128. package/dist/api/QTd.json +1 -31
  129. package/dist/api/QTh.json +1 -26
  130. package/dist/api/QTime.json +1 -317
  131. package/dist/api/QTimeline.json +1 -57
  132. package/dist/api/QTimelineEntry.json +1 -105
  133. package/dist/api/QToggle.json +1 -230
  134. package/dist/api/QToolbar.json +1 -18
  135. package/dist/api/QToolbarTitle.json +1 -18
  136. package/dist/api/QTooltip.json +1 -282
  137. package/dist/api/QTr.json +1 -26
  138. package/dist/api/QTree.json +1 -599
  139. package/dist/api/QUploader.json +1 -665
  140. package/dist/api/QUploaderAddTrigger.json +1 -6
  141. package/dist/api/QVideo.json +1 -83
  142. package/dist/api/QVirtualScroll.json +1 -260
  143. package/dist/api/Ripple.json +1 -115
  144. package/dist/api/Screen.json +1 -190
  145. package/dist/api/Scroll.json +1 -28
  146. package/dist/api/ScrollFire.json +1 -24
  147. package/dist/api/SessionStorage.json +1 -187
  148. package/dist/api/TouchHold.json +1 -81
  149. package/dist/api/TouchPan.json +1 -178
  150. package/dist/api/TouchRepeat.json +1 -142
  151. package/dist/api/TouchSwipe.json +1 -113
  152. package/dist/icon-set/bootstrap-icons.umd.prod.js +3 -2
  153. package/dist/icon-set/eva-icons.umd.prod.js +3 -2
  154. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +3 -2
  155. package/dist/icon-set/fontawesome-v5.umd.prod.js +3 -2
  156. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +3 -2
  157. package/dist/icon-set/fontawesome-v6.umd.prod.js +3 -2
  158. package/dist/icon-set/ionicons-v4.umd.prod.js +3 -2
  159. package/dist/icon-set/line-awesome.umd.prod.js +3 -2
  160. package/dist/icon-set/material-icons-outlined.umd.prod.js +3 -2
  161. package/dist/icon-set/material-icons-round.umd.prod.js +3 -2
  162. package/dist/icon-set/material-icons-sharp.umd.prod.js +3 -2
  163. package/dist/icon-set/material-icons.umd.prod.js +3 -2
  164. package/dist/icon-set/material-symbols-outlined.umd.prod.js +3 -2
  165. package/dist/icon-set/material-symbols-rounded.umd.prod.js +3 -2
  166. package/dist/icon-set/material-symbols-sharp.umd.prod.js +3 -2
  167. package/dist/icon-set/mdi-v3.umd.prod.js +3 -2
  168. package/dist/icon-set/mdi-v4.umd.prod.js +3 -2
  169. package/dist/icon-set/mdi-v5.umd.prod.js +3 -2
  170. package/dist/icon-set/mdi-v6.umd.prod.js +3 -2
  171. package/dist/icon-set/mdi-v7.umd.prod.js +3 -2
  172. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +3 -2
  173. package/dist/icon-set/svg-eva-icons.umd.prod.js +3 -2
  174. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +3 -2
  175. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +3 -2
  176. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +3 -2
  177. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +3 -2
  178. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +3 -2
  179. package/dist/icon-set/svg-line-awesome.umd.prod.js +3 -2
  180. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +3 -2
  181. package/dist/icon-set/svg-material-icons-round.umd.prod.js +3 -2
  182. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +3 -2
  183. package/dist/icon-set/svg-material-icons.umd.prod.js +3 -2
  184. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +3 -2
  185. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +3 -2
  186. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +3 -2
  187. package/dist/icon-set/svg-mdi-v6.umd.prod.js +3 -2
  188. package/dist/icon-set/svg-mdi-v7.umd.prod.js +3 -2
  189. package/dist/icon-set/svg-themify.umd.prod.js +3 -2
  190. package/dist/icon-set/themify.umd.prod.js +3 -2
  191. package/dist/lang/ar-TN.umd.prod.js +3 -2
  192. package/dist/lang/ar.umd.prod.js +3 -2
  193. package/dist/lang/az-Latn.umd.prod.js +3 -2
  194. package/dist/lang/bg.umd.prod.js +3 -2
  195. package/dist/lang/bn.umd.prod.js +3 -2
  196. package/dist/lang/ca.umd.prod.js +3 -2
  197. package/dist/lang/cs.umd.prod.js +3 -2
  198. package/dist/lang/da.umd.prod.js +3 -2
  199. package/dist/lang/de-CH.umd.prod.js +3 -2
  200. package/dist/lang/de-DE.umd.prod.js +3 -2
  201. package/dist/lang/de.umd.prod.js +3 -2
  202. package/dist/lang/el.umd.prod.js +3 -2
  203. package/dist/lang/en-GB.umd.prod.js +3 -2
  204. package/dist/lang/en-US.umd.prod.js +3 -2
  205. package/dist/lang/eo.umd.prod.js +3 -2
  206. package/dist/lang/es.umd.prod.js +3 -2
  207. package/dist/lang/et.umd.prod.js +3 -2
  208. package/dist/lang/eu.umd.prod.js +3 -2
  209. package/dist/lang/fa-IR.umd.prod.js +3 -2
  210. package/dist/lang/fa.umd.prod.js +3 -2
  211. package/dist/lang/fi.umd.prod.js +3 -2
  212. package/dist/lang/fr.umd.prod.js +3 -2
  213. package/dist/lang/gn.umd.prod.js +3 -2
  214. package/dist/lang/he.umd.prod.js +3 -2
  215. package/dist/lang/hi.umd.prod.js +3 -2
  216. package/dist/lang/hr.umd.prod.js +3 -2
  217. package/dist/lang/hu.umd.prod.js +3 -2
  218. package/dist/lang/id.umd.prod.js +3 -2
  219. package/dist/lang/is.umd.prod.js +3 -2
  220. package/dist/lang/it.umd.prod.js +3 -2
  221. package/dist/lang/ja.umd.prod.js +3 -2
  222. package/dist/lang/kk.umd.prod.js +3 -2
  223. package/dist/lang/km.umd.prod.js +3 -2
  224. package/dist/lang/ko-KR.umd.prod.js +3 -2
  225. package/dist/lang/kur-CKB.umd.prod.js +3 -2
  226. package/dist/lang/lt.umd.prod.js +3 -2
  227. package/dist/lang/lu.umd.prod.js +3 -2
  228. package/dist/lang/lv.umd.prod.js +3 -2
  229. package/dist/lang/mk.umd.prod.js +3 -2
  230. package/dist/lang/ml.umd.prod.js +3 -2
  231. package/dist/lang/mm.umd.prod.js +3 -2
  232. package/dist/lang/ms.umd.prod.js +3 -2
  233. package/dist/lang/my.umd.prod.js +3 -2
  234. package/dist/lang/nb-NO.umd.prod.js +3 -2
  235. package/dist/lang/nl.umd.prod.js +3 -2
  236. package/dist/lang/pl.umd.prod.js +3 -2
  237. package/dist/lang/pt-BR.umd.prod.js +3 -2
  238. package/dist/lang/pt.umd.prod.js +3 -2
  239. package/dist/lang/ro.umd.prod.js +3 -2
  240. package/dist/lang/ru.umd.prod.js +3 -2
  241. package/dist/lang/sk.umd.prod.js +3 -2
  242. package/dist/lang/sl.umd.prod.js +3 -2
  243. package/dist/lang/sm.umd.prod.js +3 -2
  244. package/dist/lang/sr-CYR.umd.prod.js +3 -2
  245. package/dist/lang/sr.umd.prod.js +3 -2
  246. package/dist/lang/sv.umd.prod.js +3 -2
  247. package/dist/lang/ta.umd.prod.js +3 -2
  248. package/dist/lang/th.umd.prod.js +3 -2
  249. package/dist/lang/tl.umd.prod.js +7 -0
  250. package/dist/lang/tr.umd.prod.js +3 -2
  251. package/dist/lang/ug.umd.prod.js +3 -2
  252. package/dist/lang/uk.umd.prod.js +3 -2
  253. package/dist/lang/uz-Cyrl.umd.prod.js +3 -2
  254. package/dist/lang/uz-Latn.umd.prod.js +3 -2
  255. package/dist/lang/vi.umd.prod.js +3 -2
  256. package/dist/lang/zh-CN.umd.prod.js +3 -2
  257. package/dist/lang/zh-TW.umd.prod.js +3 -2
  258. package/dist/quasar.addon.prod.css +1 -1
  259. package/dist/quasar.addon.rtl.prod.css +1 -1
  260. package/dist/quasar.cjs.prod.js +123 -2
  261. package/dist/quasar.esm.js +16928 -26277
  262. package/dist/quasar.esm.prod.js +123 -2
  263. package/dist/quasar.prod.css +1 -1
  264. package/dist/quasar.rtl.prod.css +1 -1
  265. package/dist/quasar.sass +1 -1
  266. package/dist/quasar.umd.js +16732 -26521
  267. package/dist/quasar.umd.prod.js +123 -2
  268. package/dist/transforms/api-list.json +1 -153
  269. package/dist/transforms/auto-import.json +1 -267
  270. package/dist/transforms/import-map.json +1 -181
  271. package/dist/transforms/loader-asset-urls.json +1 -60
  272. package/dist/types/api/dialog.d.ts +1 -1
  273. package/dist/types/api/qinput.d.ts +1 -1
  274. package/dist/types/api/qtable.d.ts +1 -1
  275. package/dist/types/api/qtree.d.ts +1 -1
  276. package/dist/types/api/quploader.d.ts +1 -1
  277. package/dist/types/api/validation.d.ts +1 -1
  278. package/dist/types/api/web-storage.d.ts +6 -6
  279. package/dist/types/feature-flag.d.ts +1 -1
  280. package/dist/types/globals.d.ts +22 -15
  281. package/dist/types/index.d.ts +45 -36
  282. package/dist/types/lang.d.ts +3 -3
  283. package/dist/types/plugin.d.ts +3 -1
  284. package/dist/types/ts-helpers.d.ts +3 -3
  285. package/dist/types/utils/colors.d.ts +1 -1
  286. package/dist/types/utils/date.d.ts +10 -10
  287. package/dist/types/utils/dom.d.ts +1 -1
  288. package/dist/types/utils/run-sequential-promises.d.ts +12 -12
  289. package/dist/types/utils/scroll.d.ts +5 -5
  290. package/dist/types/utils.d.ts +15 -13
  291. package/dist/vetur/quasar-attributes.json +1 -5890
  292. package/dist/vetur/quasar-tags.json +1 -2084
  293. package/dist/web-types/web-types.json +1 -19595
  294. package/lang/index.json +1 -266
  295. package/lang/tl.js +98 -0
  296. package/lang/tl.mjs +93 -0
  297. package/package.json +14 -18
  298. package/src/body.js +6 -14
  299. package/src/components/ajax-bar/QAjaxBar.js +1 -1
  300. package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
  301. package/src/components/btn/QBtn.js +6 -6
  302. package/src/components/btn-dropdown/QBtnDropdown.json +1 -1
  303. package/src/components/checkbox/use-checkbox.js +1 -1
  304. package/src/components/chip/QChip.js +1 -1
  305. package/src/components/color/QColor.js +4 -4
  306. package/src/components/date/QDate.js +1 -1
  307. package/src/components/dialog/__tests__/DialogWrapper.vue +33 -0
  308. package/src/components/dialog/__tests__/QDialog.cy.js +450 -36
  309. package/src/components/drawer/QDrawer.js +1 -1
  310. package/src/components/drawer/QDrawer.json +1 -1
  311. package/src/components/file/QFile.js +2 -2
  312. package/src/components/footer/QFooter.js +2 -2
  313. package/src/components/form/QForm.js +3 -3
  314. package/src/components/header/QHeader.js +1 -1
  315. package/src/components/img/QImg.js +47 -39
  316. package/src/components/img/QImg.json +9 -0
  317. package/src/components/input/use-mask.js +3 -3
  318. package/src/components/menu/QMenu.json +1 -1
  319. package/src/components/page-sticky/use-page-sticky.js +4 -4
  320. package/src/components/popup-edit/QPopupEdit.js +1 -1
  321. package/src/components/scroll-area/QScrollArea.js +1 -1
  322. package/src/components/select/QSelect.js +9 -9
  323. package/src/components/table/QTd.js +1 -1
  324. package/src/components/table/QTh.js +1 -1
  325. package/src/components/tabs/QTabs.js +3 -3
  326. package/src/components/time/QTime.js +3 -3
  327. package/src/components/tooltip/QTooltip.js +4 -2
  328. package/src/components/tooltip/QTooltip.json +6 -0
  329. package/src/components/tree/QTree.js +1 -1
  330. package/src/components/uploader/uploader-core.js +2 -2
  331. package/src/components/uploader/xhr-uploader-plugin.js +1 -1
  332. package/src/components/virtual-scroll/use-virtual-scroll.js +3 -3
  333. package/src/composables/private/__tests__/use-model-toggle.cy.js +43 -3
  334. package/src/composables/private/use-anchor.js +1 -1
  335. package/src/composables/private/use-key-composition.js +1 -1
  336. package/src/composables/private/use-panel.js +1 -1
  337. package/src/composables/private/use-portal.js +1 -1
  338. package/src/composables/private/use-router-link.js +1 -1
  339. package/src/directives/TouchPan.js +1 -1
  340. package/src/history.js +1 -1
  341. package/src/index.umd.js +5 -1
  342. package/src/lang.js +1 -1
  343. package/src/plugins/BottomSheet.json +1 -1
  344. package/src/plugins/Cookies.js +1 -1
  345. package/src/plugins/Dark.js +1 -1
  346. package/src/plugins/Loading.js +1 -1
  347. package/src/plugins/LoadingBar.js +1 -1
  348. package/src/plugins/Notify.js +4 -4
  349. package/src/plugins/Platform.js +111 -93
  350. package/src/plugins/Screen.js +1 -1
  351. package/src/utils/event.js +1 -1
  352. package/src/utils/frame-debounce.js +1 -1
  353. package/src/utils/morph.js +1 -1
  354. package/src/utils/private/click-outside.js +1 -1
  355. package/src/utils/private/escape-key.js +1 -1
  356. package/src/utils/private/focusout.js +1 -1
@@ -162,7 +162,7 @@ export default function () {
162
162
  function goToPanelByOffset (direction, startIndex = panelIndex.value) {
163
163
  let index = startIndex + direction
164
164
 
165
- while (index > -1 && index < panels.length) {
165
+ while (index !== -1 && index < panels.length) {
166
166
  const opt = panels[ index ]
167
167
 
168
168
  if (
@@ -74,7 +74,7 @@ export default function (vm, innerRef, renderPortalContent, type) {
74
74
  function hidePortal (isReady) {
75
75
  portalIsAccessible.value = false
76
76
 
77
- if (isReady !== true) { return }
77
+ if (isReady !== true) return
78
78
 
79
79
  removeFocusWaitFlag(focusObj)
80
80
  portalIsActive.value = false
@@ -177,7 +177,7 @@ export default function ({ fallbackTag, useDisableForRouterLinkProps = true } =
177
177
  isSameRouteRecord.bind(null, routeMatched)
178
178
  )
179
179
 
180
- if (index > -1) {
180
+ if (index !== -1) {
181
181
  return index
182
182
  }
183
183
 
@@ -191,7 +191,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
191
191
  // account for UMD too where modifiers will be lowercased to work
192
192
  && (mouseEvent !== true || (ctx.modifiers.mouseAllDir !== true && ctx.modifiers.mousealldir !== true))
193
193
  ) {
194
- const clone = evt.type.indexOf('mouse') > -1
194
+ const clone = evt.type.indexOf('mouse') !== -1
195
195
  ? new MouseEvent(evt.type, evt)
196
196
  : new TouchEvent(evt.type, evt)
197
197
 
package/src/history.js CHANGED
@@ -43,7 +43,7 @@ export default {
43
43
  remove: noop,
44
44
 
45
45
  install ({ $q }) {
46
- if (__QUASAR_SSR_SERVER__ || this.__installed === true) { return }
46
+ if (__QUASAR_SSR_SERVER__ || this.__installed === true) return
47
47
 
48
48
  const { cordova, capacitor } = client.is
49
49
 
package/src/index.umd.js CHANGED
@@ -12,7 +12,11 @@ import * as plugins from './plugins.js'
12
12
  import * as utils from './utils.js'
13
13
  import * as composables from './composables.js'
14
14
 
15
- export default {
15
+ if (window.Vue === void 0) {
16
+ console.error('[ Quasar ] Vue is required to run. Please add a script tag for it before loading Quasar.')
17
+ }
18
+
19
+ window.Quasar = {
16
20
  version: __QUASAR_VERSION__,
17
21
  install (app, opts) {
18
22
  installQuasar(app, {
package/src/lang.js CHANGED
@@ -3,7 +3,7 @@ import defineReactivePlugin from './utils/private/define-reactive-plugin.js'
3
3
  import defaultLang from '../lang/en-US'
4
4
 
5
5
  function getLocale () {
6
- if (__QUASAR_SSR_SERVER__) { return }
6
+ if (__QUASAR_SSR_SERVER__) return
7
7
 
8
8
  const val = Array.isArray(navigator.languages) === true && navigator.languages.length !== 0
9
9
  ? navigator.languages[ 0 ]
@@ -100,7 +100,7 @@
100
100
 
101
101
  "persistent": {
102
102
  "type": "Boolean",
103
- "desc": "User cannot dismiss Bottom Sheet if clicking outside of it or hitting ESC key"
103
+ "desc": "User cannot dismiss Bottom Sheet if clicking outside of it or hitting ESC key; Also, an app route change won't dismiss it"
104
104
  }
105
105
  }
106
106
  }
@@ -32,7 +32,7 @@ function read (string) {
32
32
  string = parsed
33
33
  }
34
34
  }
35
- catch (e) {}
35
+ catch (_) {}
36
36
 
37
37
  return string
38
38
  }
@@ -7,7 +7,7 @@ const Plugin = defineReactivePlugin({
7
7
  __media: void 0,
8
8
 
9
9
  set (val) {
10
- if (__QUASAR_SSR_SERVER__) { return }
10
+ if (__QUASAR_SSR_SERVER__) return
11
11
 
12
12
  Plugin.mode = val
13
13
 
@@ -49,7 +49,7 @@ const Plugin = defineReactivePlugin({
49
49
  isActive: false
50
50
  }, {
51
51
  show (opts) {
52
- if (__QUASAR_SSR_SERVER__) { return }
52
+ if (__QUASAR_SSR_SERVER__) return
53
53
 
54
54
  props = registerProps(opts)
55
55
  const { group } = props
@@ -21,7 +21,7 @@ const Plugin = defineReactivePlugin({
21
21
  install ({ $q, parentApp }) {
22
22
  $q.loadingBar = this
23
23
 
24
- if (__QUASAR_SSR_SERVER__) { return }
24
+ if (__QUASAR_SSR_SERVER__) return
25
25
 
26
26
  if (this.__installed === true) {
27
27
  if ($q.config.loadingBar !== void 0) {
@@ -254,7 +254,7 @@ function addNotification (config, $q, originalApi) {
254
254
  )
255
255
  }
256
256
  else {
257
- const action = notif.position.indexOf('top') > -1 ? 'unshift' : 'push'
257
+ const action = notif.position.indexOf('top') !== -1 ? 'unshift' : 'push'
258
258
  notificationsList[ notif.position ].value[ action ](notif)
259
259
  }
260
260
 
@@ -276,7 +276,7 @@ function addNotification (config, $q, originalApi) {
276
276
  }
277
277
  }
278
278
  else {
279
- notif.badgePosition = `top-${ notif.position.indexOf('left') > -1 ? 'right' : 'left' }`
279
+ notif.badgePosition = `top-${ notif.position.indexOf('left') !== -1 ? 'right' : 'left' }`
280
280
  }
281
281
 
282
282
  notif.meta.uid = original.meta.uid
@@ -529,8 +529,8 @@ export default {
529
529
  notificationsList[ pos ] = ref([])
530
530
 
531
531
  const
532
- vert = [ 'left', 'center', 'right' ].includes(pos) === true ? 'center' : (pos.indexOf('top') > -1 ? 'top' : 'bottom'),
533
- align = pos.indexOf('left') > -1 ? 'start' : (pos.indexOf('right') > -1 ? 'end' : 'center'),
532
+ vert = [ 'left', 'center', 'right' ].includes(pos) === true ? 'center' : (pos.indexOf('top') !== -1 ? 'top' : 'bottom'),
533
+ align = pos.indexOf('left') !== -1 ? 'start' : (pos.indexOf('right') !== -1 ? 'end' : 'center'),
534
534
  classes = [ 'left', 'right' ].includes(pos) ? `items-${ pos === 'left' ? 'start' : 'end' } justify-center` : (pos === 'center' ? 'flex-center' : `items-${ align }`)
535
535
 
536
536
  positionClass[ pos ] = `q-notifications__list q-notifications__list--${ vert } fixed column no-wrap ${ classes }`
@@ -19,8 +19,7 @@ export const isRuntimeSsrPreHydration = __QUASAR_SSR_SERVER__
19
19
  )
20
20
  )
21
21
 
22
- export let iosEmulated = false
23
- export let iosCorrection
22
+ let preHydrationBrowser
24
23
 
25
24
  function getMatch (userAgent, platformMatch) {
26
25
  const match = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(userAgent)
@@ -66,24 +65,6 @@ const hasTouch = __QUASAR_SSR_SERVER__
66
65
  ? false
67
66
  : 'ontouchstart' in window || window.navigator.maxTouchPoints > 0
68
67
 
69
- function applyIosCorrection (is) {
70
- iosCorrection = { is: { ...is } }
71
-
72
- delete is.mac
73
- delete is.desktop
74
-
75
- const platform = Math.min(window.innerHeight, window.innerWidth) > 414
76
- ? 'ipad'
77
- : 'iphone'
78
-
79
- Object.assign(is, {
80
- mobile: true,
81
- ios: true,
82
- platform,
83
- [ platform ]: true
84
- })
85
- }
86
-
87
68
  function getPlatform (UA) {
88
69
  const
89
70
  userAgent = UA.toLowerCase(),
@@ -114,21 +95,11 @@ function getPlatform (UA) {
114
95
  || browser[ 'windows phone' ]
115
96
 
116
97
  // These are all considered mobile platforms, meaning they run a mobile browser
117
- if (knownMobiles === true || userAgent.indexOf('mobile') > -1) {
98
+ if (
99
+ knownMobiles === true
100
+ || userAgent.indexOf('mobile') !== -1
101
+ ) {
118
102
  browser.mobile = true
119
-
120
- if (browser.edga || browser.edgios) {
121
- browser.edge = true
122
- matched.browser = 'edge'
123
- }
124
- else if (browser.crios) {
125
- browser.chrome = true
126
- matched.browser = 'chrome'
127
- }
128
- else if (browser.fxios) {
129
- browser.firefox = true
130
- matched.browser = 'firefox'
131
- }
132
103
  }
133
104
  // If it's not mobile we should consider it's desktop platform, meaning it runs a desktop browser
134
105
  // It's a workaround for anonymized user agents
@@ -137,22 +108,38 @@ function getPlatform (UA) {
137
108
  browser.desktop = true
138
109
  }
139
110
 
111
+ if (browser[ 'windows phone' ]) {
112
+ browser.winphone = true
113
+ delete browser[ 'windows phone' ]
114
+ }
115
+
116
+ if (browser.edga || browser.edgios) {
117
+ browser.edge = true
118
+ matched.browser = 'edge'
119
+ }
120
+ else if (browser.crios) {
121
+ browser.chrome = true
122
+ matched.browser = 'chrome'
123
+ }
124
+ else if (browser.fxios) {
125
+ browser.firefox = true
126
+ matched.browser = 'firefox'
127
+ }
140
128
  // Set iOS if on iPod, iPad or iPhone
141
- if (browser.ipod || browser.ipad || browser.iphone) {
129
+ else if (browser.ipod || browser.ipad || browser.iphone) {
142
130
  browser.ios = true
143
131
  }
144
132
 
145
- if (browser[ 'windows phone' ]) {
146
- browser.winphone = true
147
- delete browser[ 'windows phone' ]
133
+ if (browser.vivaldi) {
134
+ matched.browser = 'vivaldi'
135
+ browser.vivaldi = true
148
136
  }
149
137
 
150
138
  // TODO: The assumption about WebKit based browsers below is not completely accurate.
151
139
  // Google released Blink(a fork of WebKit) engine on April 3, 2013, which is really different than WebKit today.
152
140
  // Today, one might want to check for WebKit to deal with its bugs, which is used on all browsers on iOS, and Safari browser on all platforms.
153
-
154
- // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
155
141
  if (
142
+ // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
156
143
  browser.chrome
157
144
  || browser.opr
158
145
  || browser.safari
@@ -167,52 +154,40 @@ function getPlatform (UA) {
167
154
  browser.webkit = true
168
155
  }
169
156
 
170
- // TODO: (Qv3) rename the terms 'edge' to 'edge legacy'(or remove it) then 'edge chromium' to 'edge' to match with the known up-to-date terms
157
+ // TODO: (Qv3) rename the terms 'edge' to 'edge legacy' (or remove it) then 'edge chromium' to 'edge' to match with the known up-to-date terms
171
158
  // Microsoft Edge is the new Chromium-based browser. Microsoft Edge Legacy is the old EdgeHTML-based browser (EOL: March 9, 2021).
172
159
  if (browser.edg) {
173
160
  matched.browser = 'edgechromium'
174
161
  browser.edgeChromium = true
175
162
  }
176
-
177
- // Blackberry browsers are marked as Safari on BlackBerry
178
- if ((browser.safari && browser.blackberry) || browser.bb) {
179
- matched.browser = 'blackberry'
180
- browser.blackberry = true
181
- }
182
-
183
- // Playbook browsers are marked as Safari on Playbook
184
- if (browser.safari && browser.playbook) {
185
- matched.browser = 'playbook'
186
- browser.playbook = true
187
- }
188
-
189
163
  // Opera 15+ are identified as opr
190
- if (browser.opr) {
164
+ else if (browser.opr) {
191
165
  matched.browser = 'opera'
192
166
  browser.opera = true
193
167
  }
194
168
 
195
- // Stock Android browsers are marked as Safari on Android.
196
- if (browser.safari && browser.android) {
197
- matched.browser = 'android'
198
- browser.android = true
199
- }
200
-
201
- // Kindle browsers are marked as Safari on Kindle
202
- if (browser.safari && browser.kindle) {
203
- matched.browser = 'kindle'
204
- browser.kindle = true
205
- }
206
-
207
- // Kindle Silk browsers are marked as Safari on Kindle
208
- if (browser.safari && browser.silk) {
209
- matched.browser = 'silk'
210
- browser.silk = true
211
- }
212
-
213
- if (browser.vivaldi) {
214
- matched.browser = 'vivaldi'
215
- browser.vivaldi = true
169
+ // Some browsers are marked as Safari but are not
170
+ if (browser.safari) {
171
+ if (browser.blackberry || browser.bb) {
172
+ matched.browser = 'blackberry'
173
+ browser.blackberry = true
174
+ }
175
+ else if (browser.playbook) {
176
+ matched.browser = 'playbook'
177
+ browser.playbook = true
178
+ }
179
+ else if (browser.android) {
180
+ matched.browser = 'android'
181
+ browser.android = true
182
+ }
183
+ else if (browser.kindle) {
184
+ matched.browser = 'kindle'
185
+ browser.kindle = true
186
+ }
187
+ else if (browser.silk) {
188
+ matched.browser = 'silk'
189
+ browser.silk = true
190
+ }
216
191
  }
217
192
 
218
193
  // Assign the name and platform variable
@@ -220,10 +195,10 @@ function getPlatform (UA) {
220
195
  browser.platform = matched.platform
221
196
 
222
197
  if (__QUASAR_SSR_SERVER__ !== true) {
223
- if (userAgent.indexOf('electron') > -1) {
198
+ if (userAgent.indexOf('electron') !== -1) {
224
199
  browser.electron = true
225
200
  }
226
- else if (document.location.href.indexOf('-extension://') > -1) {
201
+ else if (document.location.href.indexOf('-extension://') !== -1) {
227
202
  browser.bex = true
228
203
  }
229
204
  else {
@@ -238,6 +213,24 @@ function getPlatform (UA) {
238
213
  browser.nativeMobileWrapper = 'cordova'
239
214
  }
240
215
 
216
+ if (isRuntimeSsrPreHydration.value === true) {
217
+ /*
218
+ * We need to remember the current state as
219
+ * everything that follows can only be corrected client-side,
220
+ * but we don't want to brake the hydration.
221
+ *
222
+ * The "client" object is imported throughout the UI and should
223
+ * be as accurate as possible given all the knowledge that we posses
224
+ * because decisions are required to be made immediately, even
225
+ * before the hydration occurs.
226
+ */
227
+ preHydrationBrowser = { is: { ...browser } }
228
+ }
229
+
230
+ /*
231
+ * All the following should be client-side corrections only
232
+ */
233
+
241
234
  if (
242
235
  hasTouch === true
243
236
  && browser.mac === true
@@ -252,13 +245,40 @@ function getPlatform (UA) {
252
245
  )
253
246
  ) {
254
247
  /*
255
- * Correction needed for iOS since the default
256
- * setting on iPad is to request desktop view; if we have
257
- * touch support and the user agent says it's a
258
- * desktop, we infer that it's an iPhone/iPad with desktop view
259
- * so we must fix the false positives
260
- */
261
- applyIosCorrection(browser)
248
+ * Correction needed for iOS since the default
249
+ * setting on iPad is to request desktop view; if we have
250
+ * touch support and the user agent says it's a
251
+ * desktop, we infer that it's an iPhone/iPad with desktop view
252
+ * so we must fix the false positives
253
+ */
254
+
255
+ delete browser.mac
256
+ delete browser.desktop
257
+
258
+ const platform = Math.min(window.innerHeight, window.innerWidth) > 414
259
+ ? 'ipad'
260
+ : 'iphone'
261
+
262
+ Object.assign(browser, {
263
+ mobile: true,
264
+ ios: true,
265
+ platform,
266
+ [ platform ]: true
267
+ })
268
+ }
269
+
270
+ if (
271
+ browser.mobile !== true
272
+ && window.navigator.userAgentData
273
+ && window.navigator.userAgentData.mobile
274
+ ) {
275
+ /*
276
+ * Correction needed on client-side when
277
+ * we also have the navigator userAgentData
278
+ */
279
+
280
+ delete browser.desktop
281
+ browser.mobile = true
262
282
  }
263
283
  }
264
284
  }
@@ -310,7 +330,6 @@ const Platform = {
310
330
  opts.onSSRHydrated.push(() => {
311
331
  Object.assign($q.platform, client)
312
332
  isRuntimeSsrPreHydration.value = false
313
- iosCorrection = void 0
314
333
  })
315
334
 
316
335
  // we need to make platform reactive
@@ -350,23 +369,22 @@ else {
350
369
  return true
351
370
  }
352
371
  }
353
- catch (e) {}
372
+ catch (_) {}
354
373
 
355
374
  hasWebStorage = false
356
375
  return false
357
376
  })
358
377
 
359
- iosEmulated = client.is.ios === true
360
- && window.navigator.vendor.toLowerCase().indexOf('apple') === -1
378
+ Object.assign(Platform, client)
361
379
 
362
380
  if (isRuntimeSsrPreHydration.value === true) {
363
381
  // must match with server-side before
364
382
  // client taking over in order to prevent
365
383
  // hydration errors
366
- Object.assign(Platform, client, iosCorrection, ssrClient)
367
- }
368
- else {
369
- Object.assign(Platform, client)
384
+ Object.assign(Platform, preHydrationBrowser, ssrClient)
385
+
386
+ // free up memory
387
+ preHydrationBrowser = null
370
388
  }
371
389
  }
372
390
 
@@ -44,7 +44,7 @@ export default defineReactivePlugin({
44
44
  install ({ $q, onSSRHydrated }) {
45
45
  $q.screen = this
46
46
 
47
- if (__QUASAR_SSR_SERVER__) { return }
47
+ if (__QUASAR_SSR_SERVER__) return
48
48
 
49
49
  if (this.__installed === true) {
50
50
  if ($q.config.screen !== void 0) {
@@ -19,7 +19,7 @@ try {
19
19
  window.addEventListener('qtest', null, opts)
20
20
  window.removeEventListener('qtest', null, opts)
21
21
  }
22
- catch (e) {}
22
+ catch (_) {}
23
23
 
24
24
  export function noop () {}
25
25
 
@@ -3,7 +3,7 @@ export default function (fn) {
3
3
 
4
4
  function debounced (/* ...args */) {
5
5
  callArgs = arguments
6
- if (wait === true) { return }
6
+ if (wait === true) return
7
7
 
8
8
  wait = true
9
9
  frame = requestAnimationFrame(() => {
@@ -60,7 +60,7 @@ function getComputedStyle (el, props) {
60
60
 
61
61
  fixed[ prop ] = val
62
62
  }
63
- else if ([ 'borderWidth', 'borderStyle', 'borderColor' ].indexOf(prop) > -1) {
63
+ else if ([ 'borderWidth', 'borderStyle', 'borderColor' ].indexOf(prop) !== -1) {
64
64
  const suffix = prop.replace('border', '')
65
65
  let val = ''
66
66
  for (let j = 0; j < styleEdges.length; j++) {
@@ -86,7 +86,7 @@ export function addClickOutside (clickOutsideProps) {
86
86
  export function removeClickOutside (clickOutsideProps) {
87
87
  const index = registeredList.findIndex(h => h === clickOutsideProps)
88
88
 
89
- if (index > -1) {
89
+ if (index !== -1) {
90
90
  registeredList.splice(index, 1)
91
91
 
92
92
  if (registeredList.length === 0) {
@@ -43,7 +43,7 @@ export function addEscapeKey (fn) {
43
43
 
44
44
  export function removeEscapeKey (fn) {
45
45
  const index = handlers.indexOf(fn)
46
- if (index > -1) {
46
+ if (index !== -1) {
47
47
  handlers.splice(index, 1)
48
48
 
49
49
  if (handlers.length === 0) {
@@ -18,7 +18,7 @@ export function addFocusout (fn) {
18
18
 
19
19
  export function removeFocusout (fn) {
20
20
  const index = handlers.indexOf(fn)
21
- if (index > -1) {
21
+ if (index !== -1) {
22
22
  handlers.splice(index, 1)
23
23
 
24
24
  if (handlers.length === 0) {