quasar 2.18.6 → 2.19.0
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.
- package/README.md +2 -0
- package/dist/api/BottomSheet.json +1 -1
- package/dist/api/Dialog.json +1 -1
- package/dist/api/Intersection.json +1 -1
- package/dist/api/Lang.json +1 -1
- package/dist/api/LocalStorage.json +1 -1
- package/dist/api/Notify.json +1 -1
- package/dist/api/QBtnDropdown.json +1 -1
- package/dist/api/QBtnToggle.json +1 -1
- package/dist/api/QCarousel.json +1 -1
- package/dist/api/QCarouselControl.json +1 -1
- package/dist/api/QChatMessage.json +1 -1
- package/dist/api/QCheckbox.json +1 -1
- package/dist/api/QColor.json +1 -1
- package/dist/api/QDate.json +1 -1
- package/dist/api/QEditor.json +1 -1
- package/dist/api/QField.json +1 -1
- package/dist/api/QFile.json +1 -1
- package/dist/api/QInput.json +1 -1
- package/dist/api/QIntersection.json +1 -1
- package/dist/api/QMenu.json +1 -1
- package/dist/api/QOptionGroup.json +1 -1
- package/dist/api/QPageScroller.json +1 -1
- package/dist/api/QPageSticky.json +1 -1
- package/dist/api/QPopupEdit.json +1 -1
- package/dist/api/QRange.json +1 -1
- package/dist/api/QRating.json +1 -1
- package/dist/api/QScrollArea.json +1 -1
- package/dist/api/QSelect.json +1 -1
- package/dist/api/QSlider.json +1 -1
- package/dist/api/QSplitter.json +1 -1
- package/dist/api/QStepper.json +1 -1
- package/dist/api/QTabPanels.json +1 -1
- package/dist/api/QTable.json +1 -1
- package/dist/api/QTime.json +1 -1
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTooltip.json +1 -1
- package/dist/api/QTree.json +1 -1
- package/dist/api/QUploader.json +1 -1
- package/dist/api/QVirtualScroll.json +1 -1
- package/dist/api/Ripple.json +1 -1
- package/dist/api/SessionStorage.json +1 -1
- package/dist/icon-set/bootstrap-icons.umd.prod.js +5 -6
- package/dist/icon-set/eva-icons.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v5.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +5 -6
- package/dist/icon-set/fontawesome-v6.umd.prod.js +5 -6
- package/dist/icon-set/ionicons-v4.umd.prod.js +5 -6
- package/dist/icon-set/line-awesome.umd.prod.js +5 -6
- package/dist/icon-set/material-icons-outlined.umd.prod.js +5 -6
- package/dist/icon-set/material-icons-round.umd.prod.js +5 -6
- package/dist/icon-set/material-icons-sharp.umd.prod.js +5 -6
- package/dist/icon-set/material-icons.umd.prod.js +5 -6
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +5 -6
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +5 -6
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v3.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v4.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v5.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v6.umd.prod.js +5 -6
- package/dist/icon-set/mdi-v7.umd.prod.js +5 -6
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +5 -6
- package/dist/icon-set/svg-eva-icons.umd.prod.js +5 -6
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +5 -6
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +5 -6
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +5 -6
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +5 -6
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +5 -6
- package/dist/icon-set/svg-line-awesome.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-icons.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +5 -6
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +5 -6
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +5 -6
- package/dist/icon-set/svg-mdi-v7.umd.prod.js +5 -6
- package/dist/icon-set/svg-themify.umd.prod.js +5 -6
- package/dist/icon-set/themify.umd.prod.js +5 -6
- package/dist/lang/ar-TN.umd.prod.js +5 -6
- package/dist/lang/ar.umd.prod.js +5 -6
- package/dist/lang/az-Latn.umd.prod.js +5 -6
- package/dist/lang/bg.umd.prod.js +5 -6
- package/dist/lang/bn.umd.prod.js +5 -6
- package/dist/lang/bs-BA.umd.prod.js +5 -6
- package/dist/lang/ca.umd.prod.js +5 -6
- package/dist/lang/cs.umd.prod.js +5 -6
- package/dist/lang/da.umd.prod.js +5 -6
- package/dist/lang/de-CH.umd.prod.js +5 -6
- package/dist/lang/de-DE.umd.prod.js +5 -6
- package/dist/lang/de.umd.prod.js +5 -6
- package/dist/lang/el.umd.prod.js +5 -6
- package/dist/lang/en-GB.umd.prod.js +5 -6
- package/dist/lang/en-US.umd.prod.js +5 -6
- package/dist/lang/eo.umd.prod.js +5 -6
- package/dist/lang/es.umd.prod.js +5 -6
- package/dist/lang/et.umd.prod.js +5 -6
- package/dist/lang/eu.umd.prod.js +5 -6
- package/dist/lang/fa-IR.umd.prod.js +5 -6
- package/dist/lang/fa.umd.prod.js +5 -6
- package/dist/lang/fi.umd.prod.js +5 -6
- package/dist/lang/fr.umd.prod.js +5 -6
- package/dist/lang/gn.umd.prod.js +5 -6
- package/dist/lang/he.umd.prod.js +5 -6
- package/dist/lang/hi.umd.prod.js +5 -6
- package/dist/lang/hr.umd.prod.js +5 -6
- package/dist/lang/hu.umd.prod.js +5 -6
- package/dist/lang/id.umd.prod.js +5 -6
- package/dist/lang/is.umd.prod.js +5 -6
- package/dist/lang/it.umd.prod.js +5 -6
- package/dist/lang/ja.umd.prod.js +5 -6
- package/dist/lang/kk.umd.prod.js +5 -6
- package/dist/lang/km.umd.prod.js +5 -6
- package/dist/lang/ko-KR.umd.prod.js +5 -6
- package/dist/lang/kur-CKB.umd.prod.js +5 -6
- package/dist/lang/lt.umd.prod.js +5 -6
- package/dist/lang/lu.umd.prod.js +5 -6
- package/dist/lang/lv.umd.prod.js +5 -6
- package/dist/lang/mk.umd.prod.js +5 -6
- package/dist/lang/ml.umd.prod.js +5 -6
- package/dist/lang/mm.umd.prod.js +5 -6
- package/dist/lang/ms-MY.umd.prod.js +5 -6
- package/dist/lang/ms.umd.prod.js +5 -6
- package/dist/lang/my.umd.prod.js +5 -6
- package/dist/lang/nb-NO.umd.prod.js +5 -6
- package/dist/lang/nl.umd.prod.js +5 -6
- package/dist/lang/pl.umd.prod.js +5 -6
- package/dist/lang/pt-BR.umd.prod.js +5 -6
- package/dist/lang/pt.umd.prod.js +5 -6
- package/dist/lang/ro.umd.prod.js +5 -6
- package/dist/lang/ru.umd.prod.js +5 -6
- package/dist/lang/sk.umd.prod.js +5 -6
- package/dist/lang/sl.umd.prod.js +5 -6
- package/dist/lang/sm.umd.prod.js +5 -6
- package/dist/lang/sq.umd.prod.js +5 -6
- package/dist/lang/sr-CYR.umd.prod.js +5 -6
- package/dist/lang/sr.umd.prod.js +5 -6
- package/dist/lang/sv.umd.prod.js +5 -6
- package/dist/lang/ta.umd.prod.js +5 -6
- package/dist/lang/th.umd.prod.js +5 -6
- package/dist/lang/tl.umd.prod.js +5 -6
- package/dist/lang/tr.umd.prod.js +5 -6
- package/dist/lang/ug.umd.prod.js +5 -6
- package/dist/lang/uk.umd.prod.js +5 -6
- package/dist/lang/ur-PK.umd.prod.js +5 -6
- package/dist/lang/uz-Cyrl.umd.prod.js +5 -6
- package/dist/lang/uz-Latn.umd.prod.js +5 -6
- package/dist/lang/vi.umd.prod.js +5 -6
- package/dist/lang/zh-CN.umd.prod.js +5 -6
- package/dist/lang/zh-TW.umd.prod.js +5 -6
- package/dist/quasar.addon.prod.css +1 -1
- package/dist/quasar.addon.rtl.prod.css +1 -1
- package/dist/quasar.client.js +24830 -29218
- package/dist/quasar.css +24 -30
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +25 -30
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +7 -16
- package/dist/quasar.server.prod.cjs +78 -79
- package/dist/quasar.server.prod.js +78 -79
- package/dist/quasar.umd.js +25876 -29789
- package/dist/quasar.umd.prod.js +78 -79
- package/dist/types/api/dialog.d.ts +1 -1
- package/dist/types/api/qinput.d.ts +1 -1
- package/dist/types/api/qtable.d.ts +1 -1
- package/dist/types/api/qtree.d.ts +1 -1
- package/dist/types/api/quploader.d.ts +1 -1
- package/dist/types/api/slider.d.ts +2 -4
- package/dist/types/api/validation.d.ts +1 -1
- package/dist/types/api/web-storage.d.ts +6 -6
- package/dist/types/feature-flag.d.ts +1 -1
- package/dist/types/globals.d.ts +7 -4
- package/dist/types/index.d.ts +127 -415
- package/dist/types/lang.d.ts +3 -3
- package/dist/types/ts-helpers.d.ts +4 -9
- package/dist/types/utils/colors.d.ts +1 -1
- package/dist/types/utils/date.d.ts +8 -8
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/run-sequential-promises.d.ts +12 -12
- package/dist/types/utils/scroll.d.ts +5 -5
- package/dist/types/utils.d.ts +16 -19
- package/dist/vetur/quasar-attributes.json +1 -1
- package/dist/web-types/web-types.json +1 -1
- package/icon-set/bootstrap-icons.js +1 -4
- package/icon-set/svg-bootstrap-icons.js +1 -4
- package/icon-set/svg-fontawesome-v5.js +0 -1
- package/icon-set/svg-ionicons-v5.js +2 -2
- package/lang/ar-TN.js +10 -8
- package/lang/ar.js +10 -8
- package/lang/az-Latn.js +13 -9
- package/lang/bg.js +10 -8
- package/lang/bn.js +14 -9
- package/lang/bs-BA.js +13 -9
- package/lang/ca.js +18 -14
- package/lang/cs.js +9 -7
- package/lang/da.js +10 -8
- package/lang/de-CH.js +13 -9
- package/lang/de-DE.js +13 -9
- package/lang/de.js +13 -9
- package/lang/el.js +10 -8
- package/lang/en-GB.js +10 -8
- package/lang/en-US.js +10 -8
- package/lang/eo.js +14 -9
- package/lang/es.js +10 -8
- package/lang/et.js +15 -12
- package/lang/eu.js +15 -12
- package/lang/fa-IR.js +16 -8
- package/lang/fa.js +16 -8
- package/lang/fi.js +17 -8
- package/lang/fr.js +21 -13
- package/lang/gn.js +14 -12
- package/lang/he.js +15 -10
- package/lang/hi.js +8 -8
- package/lang/hr.js +13 -9
- package/lang/hu.js +10 -8
- package/lang/id.js +11 -9
- package/lang/is.js +13 -9
- package/lang/it.js +14 -9
- package/lang/ja.js +13 -8
- package/lang/kk.js +22 -11
- package/lang/km.js +9 -8
- package/lang/ko-KR.js +9 -10
- package/lang/kur-CKB.js +16 -17
- package/lang/lt.js +26 -19
- package/lang/lu.js +13 -9
- package/lang/lv.js +13 -9
- package/lang/mk.js +10 -8
- package/lang/ml.js +15 -14
- package/lang/mm.js +16 -13
- package/lang/ms-MY.js +16 -11
- package/lang/ms.js +10 -8
- package/lang/my.js +15 -8
- package/lang/nb-NO.js +10 -8
- package/lang/nl.js +13 -9
- package/lang/pl.js +13 -9
- package/lang/pt-BR.js +17 -10
- package/lang/pt.js +17 -10
- package/lang/ro.js +10 -8
- package/lang/ru.js +25 -12
- package/lang/sk.js +18 -9
- package/lang/sl.js +12 -8
- package/lang/sm.js +51 -47
- package/lang/sq.js +13 -9
- package/lang/sr-CYR.js +10 -8
- package/lang/sr.js +10 -8
- package/lang/sv.js +10 -8
- package/lang/ta.js +10 -8
- package/lang/th.js +12 -11
- package/lang/tl.js +10 -8
- package/lang/tr.js +8 -5
- package/lang/ug.js +16 -8
- package/lang/uk.js +22 -11
- package/lang/ur-PK.js +13 -11
- package/lang/uz-Cyrl.js +5 -5
- package/lang/uz-Latn.js +24 -24
- package/lang/vi.js +13 -9
- package/lang/zh-CN.js +18 -9
- package/lang/zh-TW.js +20 -10
- package/package.json +52 -66
- package/src/api.extends.json +15 -12
- package/src/components/ajax-bar/QAjaxBar.js +91 -65
- package/src/components/ajax-bar/QAjaxBar.json +2 -2
- package/src/components/ajax-bar/index.js +1 -3
- package/src/components/avatar/QAvatar.js +36 -28
- package/src/components/avatar/QAvatar.json +2 -2
- package/src/components/avatar/QAvatar.test.js +29 -78
- package/src/components/avatar/index.js +1 -3
- package/src/components/badge/QBadge.js +33 -26
- package/src/components/badge/QBadge.json +3 -3
- package/src/components/badge/QBadge.test.js +40 -95
- package/src/components/badge/index.js +1 -3
- package/src/components/banner/QBanner.js +46 -25
- package/src/components/banner/QBanner.test.js +14 -35
- package/src/components/banner/index.js +1 -3
- package/src/components/bar/QBar.js +21 -11
- package/src/components/bar/QBar.test.js +6 -17
- package/src/components/bar/index.js +1 -3
- package/src/components/breadcrumbs/QBreadcrumbs.js +44 -32
- package/src/components/breadcrumbs/QBreadcrumbs.json +10 -3
- package/src/components/breadcrumbs/QBreadcrumbs.test.js +56 -69
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +28 -22
- package/src/components/breadcrumbs/QBreadcrumbsEl.json +5 -8
- package/src/components/breadcrumbs/QBreadcrumbsEl.test.js +60 -134
- package/src/components/breadcrumbs/index.js +1 -4
- package/src/components/btn/QBtn.js +159 -103
- package/src/components/btn/QBtn.json +3 -6
- package/src/components/btn/QBtn.test.js +269 -496
- package/src/components/btn/index.js +1 -3
- package/src/components/btn/use-btn.js +82 -70
- package/src/components/btn/use-btn.json +33 -16
- package/src/components/btn/use-btn.test.js +30 -47
- package/src/components/btn-dropdown/QBtnDropdown.js +143 -104
- package/src/components/btn-dropdown/QBtnDropdown.json +42 -17
- package/src/components/btn-dropdown/index.js +1 -3
- package/src/components/btn-group/QBtnGroup.js +18 -6
- package/src/components/btn-group/index.js +1 -3
- package/src/components/btn-toggle/QBtnToggle.js +80 -61
- package/src/components/btn-toggle/QBtnToggle.json +16 -9
- package/src/components/btn-toggle/index.js +1 -3
- package/src/components/card/QCard.js +14 -9
- package/src/components/card/QCard.json +1 -1
- package/src/components/card/QCardActions.js +8 -5
- package/src/components/card/QCardActions.json +9 -1
- package/src/components/card/QCardSection.js +5 -4
- package/src/components/card/QCardSection.json +1 -1
- package/src/components/card/index.js +1 -5
- package/src/components/carousel/QCarousel.js +194 -125
- package/src/components/carousel/QCarousel.json +10 -11
- package/src/components/carousel/QCarouselControl.js +26 -13
- package/src/components/carousel/QCarouselControl.json +10 -5
- package/src/components/carousel/QCarouselSlide.js +13 -10
- package/src/components/carousel/QCarouselSlide.json +1 -1
- package/src/components/carousel/index.js +1 -5
- package/src/components/chat/QChatMessage.js +62 -57
- package/src/components/chat/QChatMessage.json +8 -5
- package/src/components/chat/index.js +1 -3
- package/src/components/checkbox/QCheckbox.js +56 -41
- package/src/components/checkbox/QCheckbox.json +1 -1
- package/src/components/checkbox/index.js +1 -3
- package/src/components/checkbox/use-checkbox.js +112 -83
- package/src/components/checkbox/use-checkbox.json +15 -12
- package/src/components/chip/QChip.js +101 -73
- package/src/components/chip/QChip.json +6 -6
- package/src/components/chip/QChip.test.js +72 -180
- package/src/components/chip/index.js +1 -3
- package/src/components/circular-progress/QCircularProgress.js +92 -57
- package/src/components/circular-progress/QCircularProgress.json +2 -2
- package/src/components/circular-progress/index.js +1 -3
- package/src/components/color/QColor.js +550 -367
- package/src/components/color/QColor.json +8 -8
- package/src/components/color/index.js +1 -3
- package/src/components/date/QDate.js +902 -607
- package/src/components/date/QDate.json +32 -23
- package/src/components/date/index.js +1 -3
- package/src/components/date/use-datetime.js +12 -14
- package/src/components/date/use-datetime.json +7 -7
- package/src/components/dialog/QDialog.js +178 -139
- package/src/components/dialog/QDialog.json +8 -4
- package/src/components/dialog/QDialog.test.js +123 -228
- package/src/components/dialog/index.js +1 -3
- package/src/components/drawer/QDrawer.js +306 -242
- package/src/components/drawer/QDrawer.json +4 -4
- package/src/components/drawer/index.js +1 -3
- package/src/components/editor/QEditor.js +409 -190
- package/src/components/editor/QEditor.json +33 -32
- package/src/components/editor/editor-caret.js +78 -83
- package/src/components/editor/editor-utils.js +176 -130
- package/src/components/editor/index.js +1 -3
- package/src/components/expansion-item/QExpansionItem.js +149 -103
- package/src/components/expansion-item/QExpansionItem.json +21 -24
- package/src/components/expansion-item/index.js +1 -3
- package/src/components/fab/QFab.js +86 -54
- package/src/components/fab/QFab.json +6 -3
- package/src/components/fab/QFabAction.js +34 -29
- package/src/components/fab/QFabAction.json +4 -7
- package/src/components/fab/index.js +1 -4
- package/src/components/fab/use-fab.js +20 -20
- package/src/components/fab/use-fab.json +10 -13
- package/src/components/field/QField.js +7 -5
- package/src/components/field/QField.json +6 -6
- package/src/components/field/QField.sass +5 -6
- package/src/components/field/index.js +1 -3
- package/src/components/file/QFile.js +95 -74
- package/src/components/file/QFile.json +17 -14
- package/src/components/file/index.js +1 -3
- package/src/components/footer/QFooter.js +110 -67
- package/src/components/footer/QFooter.json +2 -2
- package/src/components/footer/index.js +1 -3
- package/src/components/form/QForm.js +93 -58
- package/src/components/form/QForm.json +2 -2
- package/src/components/form/QFormChildMixin.js +10 -11
- package/src/components/form/QFormChildMixin.json +2 -2
- package/src/components/form/index.js +1 -4
- package/src/components/header/QHeader.js +93 -56
- package/src/components/header/QHeader.json +2 -2
- package/src/components/header/index.js +1 -3
- package/src/components/icon/QIcon.js +70 -57
- package/src/components/icon/QIcon.json +2 -2
- package/src/components/icon/index.js +1 -3
- package/src/components/img/QImg.js +104 -98
- package/src/components/img/QImg.json +20 -18
- package/src/components/img/index.js +1 -3
- package/src/components/infinite-scroll/QInfiniteScroll.js +123 -64
- package/src/components/infinite-scroll/QInfiniteScroll.json +1 -1
- package/src/components/infinite-scroll/index.js +1 -3
- package/src/components/inner-loading/QInnerLoading.js +31 -23
- package/src/components/inner-loading/QInnerLoading.json +9 -9
- package/src/components/inner-loading/index.js +1 -3
- package/src/components/input/QInput.js +179 -137
- package/src/components/input/QInput.json +25 -15
- package/src/components/input/index.js +1 -3
- package/src/components/input/use-mask.js +328 -243
- package/src/components/input/use-mask.json +16 -8
- package/src/components/intersection/QIntersection.js +45 -28
- package/src/components/intersection/QIntersection.json +7 -10
- package/src/components/intersection/index.js +1 -3
- package/src/components/item/QItem.js +60 -52
- package/src/components/item/QItem.json +6 -9
- package/src/components/item/QItemLabel.js +23 -15
- package/src/components/item/QItemLabel.json +1 -1
- package/src/components/item/QItemSection.js +11 -8
- package/src/components/item/QList.js +21 -13
- package/src/components/item/QList.json +1 -1
- package/src/components/item/QList.test.js +7 -11
- package/src/components/item/index.js +1 -7
- package/src/components/knob/QKnob.js +86 -76
- package/src/components/knob/QKnob.json +6 -3
- package/src/components/knob/index.js +1 -3
- package/src/components/layout/QLayout.js +98 -69
- package/src/components/layout/QLayout.json +2 -2
- package/src/components/layout/index.js +1 -3
- package/src/components/linear-progress/QLinearProgress.js +78 -47
- package/src/components/linear-progress/QLinearProgress.json +3 -3
- package/src/components/linear-progress/index.js +1 -3
- package/src/components/markup-table/QMarkupTable.js +25 -17
- package/src/components/markup-table/QMarkupTable.json +2 -2
- package/src/components/markup-table/index.js +1 -3
- package/src/components/menu/QMenu.js +144 -100
- package/src/components/menu/QMenu.json +39 -10
- package/src/components/menu/index.js +1 -3
- package/src/components/no-ssr/QNoSsr.js +5 -5
- package/src/components/no-ssr/QNoSsr.json +2 -2
- package/src/components/no-ssr/index.js +1 -3
- package/src/components/option-group/QOptionGroup.js +84 -66
- package/src/components/option-group/QOptionGroup.json +35 -21
- package/src/components/option-group/index.js +1 -3
- package/src/components/page/QPage.js +35 -22
- package/src/components/page/QPage.json +1 -1
- package/src/components/page/QPageContainer.js +24 -11
- package/src/components/page/index.js +1 -4
- package/src/components/page-scroller/QPageScroller.js +49 -32
- package/src/components/page-scroller/QPageScroller.json +2 -2
- package/src/components/page-scroller/index.js +1 -3
- package/src/components/page-sticky/QPageSticky.js +1 -1
- package/src/components/page-sticky/QPageSticky.json +9 -4
- package/src/components/page-sticky/index.js +1 -3
- package/src/components/page-sticky/use-page-sticky.js +47 -36
- package/src/components/pagination/QPagination.js +210 -146
- package/src/components/pagination/QPagination.json +35 -21
- package/src/components/pagination/index.js +1 -3
- package/src/components/parallax/QParallax.js +81 -56
- package/src/components/parallax/index.js +1 -3
- package/src/components/popup-edit/QPopupEdit.js +88 -59
- package/src/components/popup-edit/QPopupEdit.json +40 -16
- package/src/components/popup-edit/index.js +1 -3
- package/src/components/popup-proxy/QPopupProxy.js +30 -19
- package/src/components/popup-proxy/QPopupProxy.json +3 -3
- package/src/components/popup-proxy/index.js +1 -3
- package/src/components/pull-to-refresh/QPullToRefresh.js +71 -49
- package/src/components/pull-to-refresh/index.js +1 -3
- package/src/components/radio/QRadio.js +133 -95
- package/src/components/radio/QRadio.json +11 -8
- package/src/components/radio/index.js +1 -3
- package/src/components/range/QRange.js +151 -104
- package/src/components/range/QRange.json +9 -9
- package/src/components/range/index.js +1 -3
- package/src/components/rating/QRating.js +171 -112
- package/src/components/rating/QRating.json +19 -12
- package/src/components/rating/index.js +1 -3
- package/src/components/resize-observer/QResizeObserver.js +52 -30
- package/src/components/resize-observer/QResizeObserver.json +2 -2
- package/src/components/resize-observer/index.js +1 -3
- package/src/components/responsive/QResponsive.js +27 -14
- package/src/components/responsive/QResponsive.json +1 -1
- package/src/components/responsive/index.js +1 -3
- package/src/components/scroll-area/QScrollArea.js +279 -192
- package/src/components/scroll-area/QScrollArea.json +31 -21
- package/src/components/scroll-area/ScrollAreaControls.js +6 -11
- package/src/components/scroll-area/index.js +1 -3
- package/src/components/scroll-observer/QScrollObserver.js +46 -26
- package/src/components/scroll-observer/QScrollObserver.json +4 -4
- package/src/components/scroll-observer/index.js +1 -3
- package/src/components/select/QSelect.js +710 -519
- package/src/components/select/QSelect.json +70 -45
- package/src/components/select/index.js +1 -3
- package/src/components/separator/QSeparator.js +34 -30
- package/src/components/separator/QSeparator.json +4 -4
- package/src/components/separator/index.js +1 -3
- package/src/components/skeleton/QSkeleton.js +49 -23
- package/src/components/skeleton/QSkeleton.json +26 -9
- package/src/components/skeleton/index.js +1 -3
- package/src/components/slide-item/QSlideItem.js +121 -94
- package/src/components/slide-item/QSlideItem.json +2 -2
- package/src/components/slide-item/index.js +1 -3
- package/src/components/slide-transition/QSlideTransition.js +34 -26
- package/src/components/slide-transition/index.js +1 -3
- package/src/components/slider/QSlider.js +64 -43
- package/src/components/slider/QSlider.json +6 -6
- package/src/components/slider/index.js +1 -3
- package/src/components/slider/use-slider.js +327 -220
- package/src/components/slider/use-slider.json +32 -32
- package/src/components/space/QSpace.js +1 -1
- package/src/components/space/QSpace.test.js +1 -4
- package/src/components/space/index.js +1 -3
- package/src/components/spinner/QSpinner.js +23 -18
- package/src/components/spinner/QSpinner.json +1 -1
- package/src/components/spinner/QSpinner.test.js +11 -27
- package/src/components/spinner/QSpinnerAudio.js +13 -11
- package/src/components/spinner/QSpinnerAudio.json +1 -1
- package/src/components/spinner/QSpinnerAudio.test.js +9 -21
- package/src/components/spinner/QSpinnerBall.js +13 -11
- package/src/components/spinner/QSpinnerBall.json +1 -1
- package/src/components/spinner/QSpinnerBall.test.js +9 -21
- package/src/components/spinner/QSpinnerBars.js +13 -11
- package/src/components/spinner/QSpinnerBars.json +1 -1
- package/src/components/spinner/QSpinnerBars.test.js +9 -21
- package/src/components/spinner/QSpinnerBox.js +13 -11
- package/src/components/spinner/QSpinnerBox.json +1 -1
- package/src/components/spinner/QSpinnerBox.test.js +9 -21
- package/src/components/spinner/QSpinnerClock.js +13 -11
- package/src/components/spinner/QSpinnerClock.json +1 -1
- package/src/components/spinner/QSpinnerClock.test.js +9 -21
- package/src/components/spinner/QSpinnerComment.js +13 -11
- package/src/components/spinner/QSpinnerComment.json +1 -1
- package/src/components/spinner/QSpinnerComment.test.js +9 -21
- package/src/components/spinner/QSpinnerCube.js +13 -11
- package/src/components/spinner/QSpinnerCube.json +1 -1
- package/src/components/spinner/QSpinnerCube.test.js +9 -21
- package/src/components/spinner/QSpinnerDots.js +13 -11
- package/src/components/spinner/QSpinnerDots.json +1 -1
- package/src/components/spinner/QSpinnerDots.test.js +9 -21
- package/src/components/spinner/QSpinnerFacebook.js +13 -11
- package/src/components/spinner/QSpinnerFacebook.json +1 -1
- package/src/components/spinner/QSpinnerFacebook.test.js +9 -21
- package/src/components/spinner/QSpinnerGears.js +13 -11
- package/src/components/spinner/QSpinnerGears.json +1 -1
- package/src/components/spinner/QSpinnerGears.test.js +9 -21
- package/src/components/spinner/QSpinnerGrid.js +13 -11
- package/src/components/spinner/QSpinnerGrid.json +1 -1
- package/src/components/spinner/QSpinnerGrid.test.js +9 -21
- package/src/components/spinner/QSpinnerHearts.js +13 -11
- package/src/components/spinner/QSpinnerHearts.json +1 -1
- package/src/components/spinner/QSpinnerHearts.test.js +9 -21
- package/src/components/spinner/QSpinnerHourglass.js +13 -11
- package/src/components/spinner/QSpinnerHourglass.json +1 -1
- package/src/components/spinner/QSpinnerHourglass.test.js +9 -21
- package/src/components/spinner/QSpinnerInfinity.js +12 -10
- package/src/components/spinner/QSpinnerInfinity.json +1 -1
- package/src/components/spinner/QSpinnerInfinity.test.js +9 -21
- package/src/components/spinner/QSpinnerIos.js +13 -11
- package/src/components/spinner/QSpinnerIos.json +1 -1
- package/src/components/spinner/QSpinnerIos.test.js +9 -21
- package/src/components/spinner/QSpinnerOrbit.js +13 -11
- package/src/components/spinner/QSpinnerOrbit.json +1 -1
- package/src/components/spinner/QSpinnerOrbit.test.js +9 -21
- package/src/components/spinner/QSpinnerOval.js +13 -11
- package/src/components/spinner/QSpinnerOval.json +1 -1
- package/src/components/spinner/QSpinnerOval.test.js +9 -21
- package/src/components/spinner/QSpinnerPie.js +13 -11
- package/src/components/spinner/QSpinnerPie.json +1 -1
- package/src/components/spinner/QSpinnerPie.test.js +9 -21
- package/src/components/spinner/QSpinnerPuff.js +13 -11
- package/src/components/spinner/QSpinnerPuff.json +1 -1
- package/src/components/spinner/QSpinnerPuff.test.js +9 -21
- package/src/components/spinner/QSpinnerRadio.js +13 -11
- package/src/components/spinner/QSpinnerRadio.json +1 -1
- package/src/components/spinner/QSpinnerRadio.test.js +9 -21
- package/src/components/spinner/QSpinnerRings.js +13 -11
- package/src/components/spinner/QSpinnerRings.json +1 -1
- package/src/components/spinner/QSpinnerRings.test.js +9 -21
- package/src/components/spinner/QSpinnerTail.js +12 -10
- package/src/components/spinner/QSpinnerTail.json +1 -1
- package/src/components/spinner/QSpinnerTail.test.js +9 -21
- package/src/components/spinner/index.js +0 -1
- package/src/components/spinner/spinner.json +2 -2
- package/src/components/spinner/use-spinner.js +7 -7
- package/src/components/spinner/use-spinner.test.js +1 -1
- package/src/components/splitter/QSplitter.js +133 -94
- package/src/components/splitter/QSplitter.json +10 -19
- package/src/components/splitter/index.js +1 -3
- package/src/components/stepper/QStep.js +65 -42
- package/src/components/stepper/QStep.json +5 -5
- package/src/components/stepper/QStepper.js +62 -39
- package/src/components/stepper/QStepper.json +2 -2
- package/src/components/stepper/QStepperNavigation.js +1 -1
- package/src/components/stepper/StepHeader.js +87 -67
- package/src/components/stepper/index.js +1 -5
- package/src/components/tab-panels/QTabPanel.js +3 -2
- package/src/components/tab-panels/QTabPanel.json +1 -1
- package/src/components/tab-panels/QTabPanels.js +12 -6
- package/src/components/tab-panels/QTabPanels.json +1 -1
- package/src/components/tab-panels/index.js +1 -4
- package/src/components/table/QTable.js +544 -426
- package/src/components/table/QTable.json +168 -165
- package/src/components/table/QTd.js +18 -13
- package/src/components/table/QTd.json +1 -1
- package/src/components/table/QTh.js +25 -20
- package/src/components/table/QTh.json +1 -1
- package/src/components/table/QTr.js +17 -9
- package/src/components/table/QTr.json +1 -1
- package/src/components/table/get-table-middle.js +2 -4
- package/src/components/table/index.js +1 -6
- package/src/components/table/table-column-selection.js +45 -35
- package/src/components/table/table-filter.js +9 -8
- package/src/components/table/table-pagination.js +75 -52
- package/src/components/table/table-row-expand.js +15 -16
- package/src/components/table/table-row-selection.js +31 -31
- package/src/components/table/table-sort.js +26 -29
- package/src/components/tabs/QRouteTab.js +10 -12
- package/src/components/tabs/QRouteTab.json +6 -6
- package/src/components/tabs/QTab.js +1 -1
- package/src/components/tabs/QTab.json +1 -1
- package/src/components/tabs/QTabs.js +283 -205
- package/src/components/tabs/QTabs.json +9 -9
- package/src/components/tabs/index.js +1 -5
- package/src/components/tabs/use-tab.js +127 -103
- package/src/components/tabs/use-tab.json +8 -8
- package/src/components/time/QTime.js +502 -383
- package/src/components/time/QTime.json +19 -15
- package/src/components/time/index.js +1 -3
- package/src/components/timeline/QTimeline.js +10 -7
- package/src/components/timeline/QTimeline.json +2 -2
- package/src/components/timeline/QTimelineEntry.js +44 -27
- package/src/components/timeline/QTimelineEntry.json +7 -5
- package/src/components/timeline/index.js +1 -4
- package/src/components/toggle/QToggle.js +29 -19
- package/src/components/toggle/QToggle.json +1 -1
- package/src/components/toggle/index.js +1 -3
- package/src/components/toolbar/QToolbar.js +7 -5
- package/src/components/toolbar/QToolbar.test.js +2 -6
- package/src/components/toolbar/QToolbarTitle.js +5 -4
- package/src/components/toolbar/QToolbarTitle.test.js +2 -6
- package/src/components/toolbar/index.js +1 -4
- package/src/components/tooltip/QTooltip.js +125 -72
- package/src/components/tooltip/QTooltip.json +34 -10
- package/src/components/tooltip/index.js +1 -3
- package/src/components/tree/QTree.js +417 -297
- package/src/components/tree/QTree.json +27 -25
- package/src/components/tree/index.js +1 -3
- package/src/components/uploader/QUploader.json +9 -6
- package/src/components/uploader/QUploaderAddTrigger.js +5 -2
- package/src/components/uploader/index.js +1 -4
- package/src/components/uploader/uploader-core.js +262 -178
- package/src/components/uploader/xhr-uploader-plugin.js +96 -89
- package/src/components/uploader/xhr-uploader-plugin.json +29 -29
- package/src/components/video/QVideo.js +25 -19
- package/src/components/video/QVideo.json +5 -5
- package/src/components/video/QVideo.test.js +55 -85
- package/src/components/video/index.js +1 -3
- package/src/components/virtual-scroll/QVirtualScroll.js +89 -37
- package/src/components/virtual-scroll/QVirtualScroll.json +6 -6
- package/src/components/virtual-scroll/index.js +1 -3
- package/src/components/virtual-scroll/use-virtual-scroll.js +421 -240
- package/src/components/virtual-scroll/use-virtual-scroll.json +20 -13
- package/src/composables/private.use-align/use-align.js +8 -5
- package/src/composables/private.use-align/use-align.test.js +9 -17
- package/src/composables/private.use-anchor/use-anchor-static.json +2 -7
- package/src/composables/private.use-anchor/use-anchor.js +79 -62
- package/src/composables/private.use-anchor/use-anchor.json +1 -1
- package/src/composables/private.use-dark/use-dark.js +2 -6
- package/src/composables/private.use-dark/use-dark.test.js +7 -21
- package/src/composables/private.use-field/use-field.js +384 -251
- package/src/composables/private.use-field/use-field.json +10 -10
- package/src/composables/private.use-file/use-file-dom-props.js +11 -15
- package/src/composables/private.use-file/use-file.js +86 -67
- package/src/composables/private.use-file/use-file.json +8 -8
- package/src/composables/private.use-fullscreen/use-fullscreen.js +35 -17
- package/src/composables/private.use-fullscreen/use-fullscreen.json +1 -1
- package/src/composables/private.use-history/use-history.js +4 -4
- package/src/composables/private.use-history/use-history.test.js +9 -21
- package/src/composables/private.use-key-composition/use-key-composition.js +16 -12
- package/src/composables/private.use-model-toggle/use-model-toggle.js +44 -35
- package/src/composables/private.use-model-toggle/use-model-toggle.json +2 -2
- package/src/composables/private.use-panel/use-panel.child.json +1 -1
- package/src/composables/private.use-panel/use-panel.js +131 -91
- package/src/composables/private.use-panel/use-panel.json +18 -18
- package/src/composables/private.use-portal/use-portal.js +20 -15
- package/src/composables/private.use-prevent-scroll/use-prevent-scroll.js +4 -4
- package/src/composables/private.use-ratio/use-ratio.js +3 -3
- package/src/composables/private.use-ratio/use-ratio.json +2 -7
- package/src/composables/private.use-refocus-target/use-refocus-target.js +7 -8
- package/src/composables/private.use-router-link/use-router-link.js +111 -110
- package/src/composables/private.use-router-link/use-router-link.json +6 -9
- package/src/composables/private.use-scroll-target/use-scroll-target.js +14 -11
- package/src/composables/private.use-size/use-size.js +6 -4
- package/src/composables/private.use-size/use-size.json +1 -1
- package/src/composables/private.use-size/use-size.test.js +1 -1
- package/src/composables/private.use-transition/use-transition.js +17 -11
- package/src/composables/private.use-transition/use-transition.json +1 -1
- package/src/composables/private.use-transition/use-transition.test.js +7 -21
- package/src/composables/private.use-validate/use-validate.js +78 -67
- package/src/composables/private.use-validate/use-validate.json +9 -12
- package/src/composables/use-dialog-plugin-component/use-dialog-plugin-component.js +12 -6
- package/src/composables/use-form/private.use-form.js +4 -4
- package/src/composables/use-form/private.use-form.json +1 -1
- package/src/composables/use-form/private.use-form.test.js +17 -15
- package/src/composables/use-form/use-form-child.js +25 -14
- package/src/composables/use-hydration/use-hydration.js +1 -1
- package/src/composables/use-hydration/use-hydration.test.js +2 -4
- package/src/composables/use-id/use-id.js +10 -12
- package/src/composables/use-id/use-id.test.js +1 -1
- package/src/composables/use-interval/use-interval.js +3 -3
- package/src/composables/use-interval/use-interval.test.js +6 -9
- package/src/composables/use-meta/use-meta.js +13 -10
- package/src/composables/use-quasar/use-quasar.js +1 -1
- package/src/composables/use-quasar/use-quasar.test.js +4 -10
- package/src/composables/use-render-cache/use-render-cache.js +16 -24
- package/src/composables/use-split-attrs/use-split-attrs.js +9 -5
- package/src/composables/use-split-attrs/use-split-attrs.test.js +17 -15
- package/src/composables/use-tick/use-tick.js +10 -5
- package/src/composables/use-tick/use-tick.test.js +5 -8
- package/src/composables/use-timeout/use-timeout.js +3 -3
- package/src/composables/use-timeout/use-timeout.test.js +6 -9
- package/src/composables.js +0 -1
- package/src/css/core/helpers.sass +4 -9
- package/src/directives/close-popup/ClosePopup.js +41 -35
- package/src/directives/close-popup/ClosePopup.json +1 -1
- package/src/directives/intersection/Intersection.js +25 -28
- package/src/directives/intersection/Intersection.json +6 -6
- package/src/directives/morph/Morph.js +87 -87
- package/src/directives/morph/Morph.json +15 -13
- package/src/directives/mutation/Mutation.js +23 -24
- package/src/directives/mutation/Mutation.json +11 -11
- package/src/directives/ripple/Ripple.js +88 -79
- package/src/directives/ripple/Ripple.json +10 -10
- package/src/directives/ripple/Ripple.test.js +31 -87
- package/src/directives/scroll/Scroll.js +43 -30
- package/src/directives/scroll/Scroll.json +4 -2
- package/src/directives/scroll-fire/ScrollFire.js +43 -38
- package/src/directives/scroll-fire/ScrollFire.json +1 -1
- package/src/directives/touch-hold/TouchHold.js +155 -139
- package/src/directives/touch-hold/TouchHold.json +2 -2
- package/src/directives/touch-pan/TouchPan.js +311 -278
- package/src/directives/touch-pan/TouchPan.json +6 -4
- package/src/directives/touch-repeat/TouchRepeat.js +222 -188
- package/src/directives/touch-repeat/TouchRepeat.json +5 -3
- package/src/directives/touch-swipe/TouchSwipe.js +235 -214
- package/src/directives/touch-swipe/TouchSwipe.json +5 -3
- package/src/flags.dev.js +10 -17
- package/src/index.dev.js +2 -0
- package/src/index.ssr.js +2 -6
- package/src/index.umd.js +4 -2
- package/src/install-quasar.js +92 -76
- package/src/plugins/addressbar/AddressbarColor.js +28 -25
- package/src/plugins/addressbar/AddressbarColor.json +1 -1
- package/src/plugins/addressbar/AddressbarColor.test.js +10 -9
- package/src/plugins/app-fullscreen/AppFullscreen.js +50 -51
- package/src/plugins/app-fullscreen/AppFullscreen.json +6 -10
- package/src/plugins/app-fullscreen/AppFullscreen.test.js +11 -26
- package/src/plugins/app-fullscreen/test/mock-fullscreen.js +7 -5
- package/src/plugins/app-visibility/AppVisibility.js +21 -17
- package/src/plugins/app-visibility/AppVisibility.test.js +3 -1
- package/src/plugins/bottom-sheet/BottomSheet.js +1 -1
- package/src/plugins/bottom-sheet/BottomSheet.json +9 -9
- package/src/plugins/bottom-sheet/component/BottomSheetComponent.js +132 -95
- package/src/plugins/cookies/Cookies.js +50 -58
- package/src/plugins/cookies/Cookies.json +24 -16
- package/src/plugins/dark/Dark.js +61 -55
- package/src/plugins/dark/Dark.json +6 -6
- package/src/plugins/dark/Dark.test.js +26 -44
- package/src/plugins/dialog/Dialog.js +1 -1
- package/src/plugins/dialog/Dialog.json +29 -21
- package/src/plugins/dialog/component/DialogPluginComponent.js +122 -121
- package/src/plugins/icon-set/IconSet.js +63 -56
- package/src/plugins/icon-set/IconSet.json +421 -419
- package/src/plugins/icon-set/IconSet.test.js +8 -7
- package/src/plugins/lang/Lang.js +115 -96
- package/src/plugins/lang/Lang.json +201 -175
- package/src/plugins/lang/Lang.test.js +52 -20
- package/src/plugins/loading/Loading.js +175 -143
- package/src/plugins/loading/Loading.json +15 -15
- package/src/plugins/loading-bar/LoadingBar.js +61 -56
- package/src/plugins/loading-bar/LoadingBar.json +2 -2
- package/src/plugins/meta/Meta.js +91 -81
- package/src/plugins/notify/Notify.js +275 -221
- package/src/plugins/notify/Notify.json +79 -71
- package/src/plugins/platform/Platform.js +105 -112
- package/src/plugins/platform/Platform.json +12 -8
- package/src/plugins/platform/Platform.test.js +4 -7
- package/src/plugins/private.body/Body.js +19 -23
- package/src/plugins/private.body/Body.test.js +4 -6
- package/src/plugins/private.history/History.js +27 -30
- package/src/plugins/screen/Screen.js +160 -147
- package/src/plugins/screen/Screen.json +6 -6
- package/src/plugins/screen/Screen.test.js +6 -12
- package/src/plugins/storage/LocalStorage.js +5 -4
- package/src/plugins/storage/LocalStorage.json +1 -1
- package/src/plugins/storage/LocalStorage.test.js +56 -62
- package/src/plugins/storage/SessionStorage.js +5 -4
- package/src/plugins/storage/SessionStorage.json +1 -1
- package/src/plugins/storage/SessionStorage.test.js +56 -62
- package/src/plugins/storage/engine/web-storage.js +24 -26
- package/src/plugins/storage/engine/web-storage.json +45 -15
- package/src/utils/EventBus/EventBus.js +12 -13
- package/src/utils/clone/clone.js +27 -28
- package/src/utils/clone/clone.test.js +27 -52
- package/src/utils/colors/colors.js +69 -63
- package/src/utils/colors/colors.test.js +360 -270
- package/src/utils/copy-to-clipboard/copy-to-clipboard.js +9 -10
- package/src/utils/create-meta-mixin/create-meta-mixin.js +17 -19
- package/src/utils/create-uploader-component/create-uploader-component.js +20 -14
- package/src/utils/css-var/get-css-var.js +4 -2
- package/src/utils/css-var/get-css-var.test.js +4 -11
- package/src/utils/css-var/set-css-var.js +2 -2
- package/src/utils/css-var/set-css-var.test.js +6 -12
- package/src/utils/date/date.js +251 -243
- package/src/utils/date/private.persian.js +54 -44
- package/src/utils/debounce/debounce.js +5 -5
- package/src/utils/debounce/debounce.test.js +3 -10
- package/src/utils/dom/dom.js +21 -22
- package/src/utils/dom/dom.test.js +19 -39
- package/src/utils/event/event.js +53 -49
- package/src/utils/export-file/export-file.js +11 -12
- package/src/utils/extend/extend.js +30 -26
- package/src/utils/extend/extend.test.js +36 -42
- package/src/utils/format/format.js +11 -13
- package/src/utils/format/format.test.js +50 -61
- package/src/utils/frame-debounce/frame-debounce.js +5 -3
- package/src/utils/frame-debounce/frame-debounce.test.js +3 -10
- package/src/utils/is/is.js +27 -23
- package/src/utils/is/is.test.js +100 -84
- package/src/utils/morph/morph.js +470 -377
- package/src/utils/open-url/open-url.js +18 -21
- package/src/utils/patterns/patterns.js +11 -7
- package/src/utils/patterns/patterns.test.js +2 -0
- package/src/utils/private.click-outside/click-outside.js +28 -26
- package/src/utils/private.config/instance-config.js +1 -1
- package/src/utils/private.config/instance-config.test.js +11 -7
- package/src/utils/private.config/nodes.js +14 -14
- package/src/utils/private.config/nodes.test.js +32 -38
- package/src/utils/private.create/create.js +10 -4
- package/src/utils/private.create/create.test.js +11 -7
- package/src/utils/private.dialog/create-dialog.js +70 -59
- package/src/utils/private.dialog/create-dialog.json +13 -6
- package/src/utils/private.focus/focus-manager.js +7 -8
- package/src/utils/private.focus/focus-manager.test.js +13 -18
- package/src/utils/private.focus/focusout.js +4 -4
- package/src/utils/private.focus/focusout.test.js +10 -22
- package/src/utils/private.get-emits-object/get-emits-object.js +2 -2
- package/src/utils/private.get-emits-object/get-emits-object.test.js +4 -10
- package/src/utils/private.inject-obj-prop/inject-obj-prop.js +3 -3
- package/src/utils/private.inject-obj-prop/inject-obj-prop.test.js +20 -49
- package/src/utils/private.keyboard/escape-key.js +10 -10
- package/src/utils/private.keyboard/escape-key.test.js +10 -22
- package/src/utils/private.keyboard/key-composition.js +9 -7
- package/src/utils/private.portal/portal.js +7 -10
- package/src/utils/private.position-engine/position-engine.js +127 -75
- package/src/utils/private.render/render.js +9 -24
- package/src/utils/private.render/render.test.js +40 -55
- package/src/utils/private.rtl/rtl.js +1 -3
- package/src/utils/private.selection/selection.js +6 -6
- package/src/utils/private.selection/selection.test.js +7 -13
- package/src/utils/private.sort/sort.js +4 -6
- package/src/utils/private.symbols/symbols.js +1 -1
- package/src/utils/private.touch/touch.js +16 -16
- package/src/utils/private.touch/touch.test.js +56 -16
- package/src/utils/private.vm/vm.js +6 -7
- package/src/utils/private.vm/vm.test.js +32 -32
- package/src/utils/run-sequential-promises/run-sequential-promises.js +57 -51
- package/src/utils/scroll/prevent-scroll.js +75 -47
- package/src/utils/scroll/scroll.js +51 -44
- package/src/utils/throttle/throttle.js +7 -4
- package/src/utils/throttle/throttle.test.js +2 -7
- package/src/utils/uid/uid.js +34 -22
- package/wrappers/index.cjs +17 -15
- package/wrappers/index.js +15 -15
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
h,
|
|
3
|
+
ref,
|
|
4
|
+
computed,
|
|
5
|
+
watch,
|
|
6
|
+
onMounted,
|
|
7
|
+
onBeforeUnmount,
|
|
8
|
+
nextTick,
|
|
9
|
+
getCurrentInstance
|
|
10
|
+
} from 'vue'
|
|
2
11
|
|
|
3
12
|
import Caret from './editor-caret.js'
|
|
4
13
|
import { getToolbar, getFonts, getLinkEditor } from './editor-utils.js'
|
|
5
14
|
|
|
6
|
-
import useDark, {
|
|
7
|
-
|
|
15
|
+
import useDark, {
|
|
16
|
+
useDarkProps
|
|
17
|
+
} from '../../composables/private.use-dark/use-dark.js'
|
|
18
|
+
import useFullscreen, {
|
|
19
|
+
useFullscreenProps,
|
|
20
|
+
useFullscreenEmits
|
|
21
|
+
} from '../../composables/private.use-fullscreen/use-fullscreen.js'
|
|
8
22
|
import useSplitAttrs from '../../composables/use-split-attrs/use-split-attrs.js'
|
|
9
23
|
|
|
10
24
|
import { createComponent } from '../../utils/private.create/create.js'
|
|
@@ -40,7 +54,8 @@ export default createComponent({
|
|
|
40
54
|
type: Array,
|
|
41
55
|
validator: v => v.length === 0 || v.every(group => group.length),
|
|
42
56
|
// long line on purpose for API validation purposes:
|
|
43
|
-
|
|
57
|
+
// oxfmt-ignore
|
|
58
|
+
default: () => [['left', 'center', 'right', 'justify'], ['bold', 'italic', 'underline', 'strike'], ['undo', 'redo']]
|
|
44
59
|
},
|
|
45
60
|
toolbarColor: String,
|
|
46
61
|
toolbarBg: String,
|
|
@@ -55,12 +70,12 @@ export default createComponent({
|
|
|
55
70
|
|
|
56
71
|
paragraphTag: {
|
|
57
72
|
type: String,
|
|
58
|
-
validator: v => [
|
|
73
|
+
validator: v => ['div', 'p'].includes(v),
|
|
59
74
|
default: 'div'
|
|
60
75
|
},
|
|
61
76
|
|
|
62
77
|
contentStyle: Object,
|
|
63
|
-
contentClass: [
|
|
78
|
+
contentClass: [Object, Array, String],
|
|
64
79
|
|
|
65
80
|
square: Boolean,
|
|
66
81
|
flat: Boolean,
|
|
@@ -70,8 +85,10 @@ export default createComponent({
|
|
|
70
85
|
emits: [
|
|
71
86
|
...useFullscreenEmits,
|
|
72
87
|
'update:modelValue',
|
|
73
|
-
'keydown',
|
|
74
|
-
'
|
|
88
|
+
'keydown',
|
|
89
|
+
'click',
|
|
90
|
+
'focus',
|
|
91
|
+
'blur',
|
|
75
92
|
'dropdownShow',
|
|
76
93
|
'dropdownHide',
|
|
77
94
|
'dropdownBeforeShow',
|
|
@@ -80,7 +97,7 @@ export default createComponent({
|
|
|
80
97
|
'linkHide'
|
|
81
98
|
],
|
|
82
99
|
|
|
83
|
-
setup
|
|
100
|
+
setup(props, { slots, emit }) {
|
|
84
101
|
const { proxy } = getCurrentInstance()
|
|
85
102
|
const { $q } = proxy
|
|
86
103
|
|
|
@@ -100,17 +117,20 @@ export default createComponent({
|
|
|
100
117
|
let lastEmit = props.modelValue
|
|
101
118
|
|
|
102
119
|
if (__QUASAR_SSR_SERVER__ !== true) {
|
|
103
|
-
document.execCommand(
|
|
120
|
+
document.execCommand(
|
|
121
|
+
'defaultParagraphSeparator',
|
|
122
|
+
false,
|
|
123
|
+
props.paragraphTag
|
|
124
|
+
)
|
|
104
125
|
defaultFont = window.getComputedStyle(document.body).fontFamily
|
|
105
126
|
}
|
|
106
127
|
|
|
107
|
-
const toolbarBackgroundClass = computed(() =>
|
|
108
|
-
props.toolbarBg ? ` bg-${
|
|
109
|
-
)
|
|
128
|
+
const toolbarBackgroundClass = computed(() =>
|
|
129
|
+
props.toolbarBg ? ` bg-${props.toolbarBg}` : ''
|
|
130
|
+
)
|
|
110
131
|
|
|
111
132
|
const buttonProps = computed(() => {
|
|
112
|
-
const flat = props.toolbarOutline !== true
|
|
113
|
-
&& props.toolbarPush !== true
|
|
133
|
+
const flat = props.toolbarOutline !== true && props.toolbarPush !== true
|
|
114
134
|
|
|
115
135
|
return {
|
|
116
136
|
type: 'a',
|
|
@@ -127,75 +147,252 @@ export default createComponent({
|
|
|
127
147
|
})
|
|
128
148
|
|
|
129
149
|
const buttonDef = computed(() => {
|
|
130
|
-
const
|
|
131
|
-
e = $q.lang.editor,
|
|
150
|
+
const e = $q.lang.editor,
|
|
132
151
|
i = $q.iconSet.editor
|
|
133
152
|
|
|
134
153
|
return {
|
|
135
154
|
bold: { cmd: 'bold', icon: i.bold, tip: e.bold, key: 66 },
|
|
136
155
|
italic: { cmd: 'italic', icon: i.italic, tip: e.italic, key: 73 },
|
|
137
|
-
strike: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
156
|
+
strike: {
|
|
157
|
+
cmd: 'strikeThrough',
|
|
158
|
+
icon: i.strikethrough,
|
|
159
|
+
tip: e.strikethrough,
|
|
160
|
+
key: 83
|
|
161
|
+
},
|
|
162
|
+
underline: {
|
|
163
|
+
cmd: 'underline',
|
|
164
|
+
icon: i.underline,
|
|
165
|
+
tip: e.underline,
|
|
166
|
+
key: 85
|
|
167
|
+
},
|
|
168
|
+
unordered: {
|
|
169
|
+
cmd: 'insertUnorderedList',
|
|
170
|
+
icon: i.unorderedList,
|
|
171
|
+
tip: e.unorderedList
|
|
172
|
+
},
|
|
173
|
+
ordered: {
|
|
174
|
+
cmd: 'insertOrderedList',
|
|
175
|
+
icon: i.orderedList,
|
|
176
|
+
tip: e.orderedList
|
|
177
|
+
},
|
|
178
|
+
subscript: {
|
|
179
|
+
cmd: 'subscript',
|
|
180
|
+
icon: i.subscript,
|
|
181
|
+
tip: e.subscript,
|
|
182
|
+
htmlTip: 'x<subscript>2</subscript>'
|
|
183
|
+
},
|
|
184
|
+
superscript: {
|
|
185
|
+
cmd: 'superscript',
|
|
186
|
+
icon: i.superscript,
|
|
187
|
+
tip: e.superscript,
|
|
188
|
+
htmlTip: 'x<superscript>2</superscript>'
|
|
189
|
+
},
|
|
190
|
+
link: {
|
|
191
|
+
cmd: 'link',
|
|
192
|
+
disable: eVm => eVm.caret && !eVm.caret.can('link'),
|
|
193
|
+
icon: i.hyperlink,
|
|
194
|
+
tip: e.hyperlink,
|
|
195
|
+
key: 76
|
|
196
|
+
},
|
|
197
|
+
fullscreen: {
|
|
198
|
+
cmd: 'fullscreen',
|
|
199
|
+
icon: i.toggleFullscreen,
|
|
200
|
+
tip: e.toggleFullscreen,
|
|
201
|
+
key: 70
|
|
202
|
+
},
|
|
203
|
+
viewsource: {
|
|
204
|
+
cmd: 'viewsource',
|
|
205
|
+
icon: i.viewSource,
|
|
206
|
+
tip: e.viewSource
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
quote: {
|
|
210
|
+
cmd: 'formatBlock',
|
|
211
|
+
param: 'BLOCKQUOTE',
|
|
212
|
+
icon: i.quote,
|
|
213
|
+
tip: e.quote,
|
|
214
|
+
key: 81
|
|
215
|
+
},
|
|
148
216
|
left: { cmd: 'justifyLeft', icon: i.left, tip: e.left },
|
|
149
217
|
center: { cmd: 'justifyCenter', icon: i.center, tip: e.center },
|
|
150
218
|
right: { cmd: 'justifyRight', icon: i.right, tip: e.right },
|
|
151
219
|
justify: { cmd: 'justifyFull', icon: i.justify, tip: e.justify },
|
|
152
220
|
|
|
153
|
-
print: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
221
|
+
print: {
|
|
222
|
+
type: 'no-state',
|
|
223
|
+
cmd: 'print',
|
|
224
|
+
icon: i.print,
|
|
225
|
+
tip: e.print,
|
|
226
|
+
key: 80
|
|
227
|
+
},
|
|
228
|
+
outdent: {
|
|
229
|
+
type: 'no-state',
|
|
230
|
+
disable: eVm => eVm.caret && !eVm.caret.can('outdent'),
|
|
231
|
+
cmd: 'outdent',
|
|
232
|
+
icon: i.outdent,
|
|
233
|
+
tip: e.outdent
|
|
234
|
+
},
|
|
235
|
+
indent: {
|
|
236
|
+
type: 'no-state',
|
|
237
|
+
disable: eVm => eVm.caret && !eVm.caret.can('indent'),
|
|
238
|
+
cmd: 'indent',
|
|
239
|
+
icon: i.indent,
|
|
240
|
+
tip: e.indent
|
|
241
|
+
},
|
|
242
|
+
removeFormat: {
|
|
243
|
+
type: 'no-state',
|
|
244
|
+
cmd: 'removeFormat',
|
|
245
|
+
icon: i.removeFormat,
|
|
246
|
+
tip: e.removeFormat
|
|
247
|
+
},
|
|
248
|
+
hr: {
|
|
249
|
+
type: 'no-state',
|
|
250
|
+
cmd: 'insertHorizontalRule',
|
|
251
|
+
icon: i.hr,
|
|
252
|
+
tip: e.hr
|
|
253
|
+
},
|
|
254
|
+
undo: {
|
|
255
|
+
type: 'no-state',
|
|
256
|
+
cmd: 'undo',
|
|
257
|
+
icon: i.undo,
|
|
258
|
+
tip: e.undo,
|
|
259
|
+
key: 90
|
|
260
|
+
},
|
|
261
|
+
redo: {
|
|
262
|
+
type: 'no-state',
|
|
263
|
+
cmd: 'redo',
|
|
264
|
+
icon: i.redo,
|
|
265
|
+
tip: e.redo,
|
|
266
|
+
key: 89
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
h1: {
|
|
270
|
+
cmd: 'formatBlock',
|
|
271
|
+
param: 'H1',
|
|
272
|
+
icon: i.heading1 || i.heading,
|
|
273
|
+
tip: e.heading1,
|
|
274
|
+
htmlTip: `<h1 class="q-ma-none">${e.heading1}</h1>`
|
|
275
|
+
},
|
|
276
|
+
h2: {
|
|
277
|
+
cmd: 'formatBlock',
|
|
278
|
+
param: 'H2',
|
|
279
|
+
icon: i.heading2 || i.heading,
|
|
280
|
+
tip: e.heading2,
|
|
281
|
+
htmlTip: `<h2 class="q-ma-none">${e.heading2}</h2>`
|
|
282
|
+
},
|
|
283
|
+
h3: {
|
|
284
|
+
cmd: 'formatBlock',
|
|
285
|
+
param: 'H3',
|
|
286
|
+
icon: i.heading3 || i.heading,
|
|
287
|
+
tip: e.heading3,
|
|
288
|
+
htmlTip: `<h3 class="q-ma-none">${e.heading3}</h3>`
|
|
289
|
+
},
|
|
290
|
+
h4: {
|
|
291
|
+
cmd: 'formatBlock',
|
|
292
|
+
param: 'H4',
|
|
293
|
+
icon: i.heading4 || i.heading,
|
|
294
|
+
tip: e.heading4,
|
|
295
|
+
htmlTip: `<h4 class="q-ma-none">${e.heading4}</h4>`
|
|
296
|
+
},
|
|
297
|
+
h5: {
|
|
298
|
+
cmd: 'formatBlock',
|
|
299
|
+
param: 'H5',
|
|
300
|
+
icon: i.heading5 || i.heading,
|
|
301
|
+
tip: e.heading5,
|
|
302
|
+
htmlTip: `<h5 class="q-ma-none">${e.heading5}</h5>`
|
|
303
|
+
},
|
|
304
|
+
h6: {
|
|
305
|
+
cmd: 'formatBlock',
|
|
306
|
+
param: 'H6',
|
|
307
|
+
icon: i.heading6 || i.heading,
|
|
308
|
+
tip: e.heading6,
|
|
309
|
+
htmlTip: `<h6 class="q-ma-none">${e.heading6}</h6>`
|
|
310
|
+
},
|
|
311
|
+
p: {
|
|
312
|
+
cmd: 'formatBlock',
|
|
313
|
+
param: props.paragraphTag,
|
|
314
|
+
icon: i.heading,
|
|
315
|
+
tip: e.paragraph
|
|
316
|
+
},
|
|
317
|
+
code: {
|
|
318
|
+
cmd: 'formatBlock',
|
|
319
|
+
param: 'PRE',
|
|
320
|
+
icon: i.code,
|
|
321
|
+
htmlTip: `<code>${e.code}</code>`
|
|
322
|
+
},
|
|
323
|
+
|
|
324
|
+
'size-1': {
|
|
325
|
+
cmd: 'fontSize',
|
|
326
|
+
param: '1',
|
|
327
|
+
icon: i.size1 || i.size,
|
|
328
|
+
tip: e.size1,
|
|
329
|
+
htmlTip: `<font size="1">${e.size1}</font>`
|
|
330
|
+
},
|
|
331
|
+
'size-2': {
|
|
332
|
+
cmd: 'fontSize',
|
|
333
|
+
param: '2',
|
|
334
|
+
icon: i.size2 || i.size,
|
|
335
|
+
tip: e.size2,
|
|
336
|
+
htmlTip: `<font size="2">${e.size2}</font>`
|
|
337
|
+
},
|
|
338
|
+
'size-3': {
|
|
339
|
+
cmd: 'fontSize',
|
|
340
|
+
param: '3',
|
|
341
|
+
icon: i.size3 || i.size,
|
|
342
|
+
tip: e.size3,
|
|
343
|
+
htmlTip: `<font size="3">${e.size3}</font>`
|
|
344
|
+
},
|
|
345
|
+
'size-4': {
|
|
346
|
+
cmd: 'fontSize',
|
|
347
|
+
param: '4',
|
|
348
|
+
icon: i.size4 || i.size,
|
|
349
|
+
tip: e.size4,
|
|
350
|
+
htmlTip: `<font size="4">${e.size4}</font>`
|
|
351
|
+
},
|
|
352
|
+
'size-5': {
|
|
353
|
+
cmd: 'fontSize',
|
|
354
|
+
param: '5',
|
|
355
|
+
icon: i.size5 || i.size,
|
|
356
|
+
tip: e.size5,
|
|
357
|
+
htmlTip: `<font size="5">${e.size5}</font>`
|
|
358
|
+
},
|
|
359
|
+
'size-6': {
|
|
360
|
+
cmd: 'fontSize',
|
|
361
|
+
param: '6',
|
|
362
|
+
icon: i.size6 || i.size,
|
|
363
|
+
tip: e.size6,
|
|
364
|
+
htmlTip: `<font size="6">${e.size6}</font>`
|
|
365
|
+
},
|
|
366
|
+
'size-7': {
|
|
367
|
+
cmd: 'fontSize',
|
|
368
|
+
param: '7',
|
|
369
|
+
icon: i.size7 || i.size,
|
|
370
|
+
tip: e.size7,
|
|
371
|
+
htmlTip: `<font size="7">${e.size7}</font>`
|
|
372
|
+
}
|
|
177
373
|
}
|
|
178
374
|
})
|
|
179
375
|
|
|
180
376
|
const buttons = computed(() => {
|
|
181
377
|
const userDef = props.definitions || {}
|
|
182
|
-
const def =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
378
|
+
const def =
|
|
379
|
+
props.definitions || props.fonts
|
|
380
|
+
? extend(
|
|
381
|
+
true,
|
|
382
|
+
{},
|
|
383
|
+
buttonDef.value,
|
|
384
|
+
userDef,
|
|
385
|
+
getFonts(
|
|
386
|
+
defaultFont,
|
|
387
|
+
$q.lang.editor.defaultFont,
|
|
388
|
+
$q.iconSet.editor.font,
|
|
389
|
+
props.fonts
|
|
390
|
+
)
|
|
391
|
+
)
|
|
392
|
+
: buttonDef.value
|
|
393
|
+
|
|
394
|
+
return props.toolbar.map(group =>
|
|
395
|
+
group.map(token => {
|
|
199
396
|
if (token.options) {
|
|
200
397
|
return {
|
|
201
398
|
type: 'dropdown',
|
|
@@ -207,20 +404,21 @@ export default createComponent({
|
|
|
207
404
|
fixedIcon: token.fixedIcon,
|
|
208
405
|
highlight: token.highlight,
|
|
209
406
|
list: token.list,
|
|
210
|
-
options: token.options.map(item => def[
|
|
407
|
+
options: token.options.map(item => def[item])
|
|
211
408
|
}
|
|
212
409
|
}
|
|
213
410
|
|
|
214
|
-
const obj = def[
|
|
411
|
+
const obj = def[token]
|
|
215
412
|
|
|
216
413
|
if (obj) {
|
|
217
|
-
return obj.type === 'no-state' ||
|
|
218
|
-
|
|
219
|
-
|
|
414
|
+
return obj.type === 'no-state' ||
|
|
415
|
+
(userDef[token] &&
|
|
416
|
+
(obj.cmd === void 0 ||
|
|
417
|
+
(buttonDef.value[obj.cmd] &&
|
|
418
|
+
buttonDef.value[obj.cmd].type === 'no-state')))
|
|
220
419
|
? obj
|
|
221
420
|
: Object.assign({ type: 'toggle' }, obj)
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
421
|
+
} else {
|
|
224
422
|
return {
|
|
225
423
|
type: 'slot',
|
|
226
424
|
slot: token
|
|
@@ -248,25 +446,29 @@ export default createComponent({
|
|
|
248
446
|
setContent
|
|
249
447
|
}
|
|
250
448
|
|
|
251
|
-
watch(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
449
|
+
watch(
|
|
450
|
+
() => props.modelValue,
|
|
451
|
+
v => {
|
|
452
|
+
if (lastEmit !== v) {
|
|
453
|
+
lastEmit = v
|
|
454
|
+
setContent(v, true)
|
|
455
|
+
}
|
|
255
456
|
}
|
|
256
|
-
|
|
457
|
+
)
|
|
257
458
|
|
|
258
459
|
watch(editLinkUrl, v => {
|
|
259
|
-
emit(`link${
|
|
460
|
+
emit(`link${v ? 'Show' : 'Hide'}`)
|
|
260
461
|
})
|
|
261
462
|
|
|
262
|
-
const hasToolbar = computed(
|
|
463
|
+
const hasToolbar = computed(
|
|
464
|
+
() => props.toolbar && props.toolbar.length !== 0
|
|
465
|
+
)
|
|
263
466
|
|
|
264
467
|
const keys = computed(() => {
|
|
265
|
-
const
|
|
266
|
-
k = {},
|
|
468
|
+
const k = {},
|
|
267
469
|
add = btn => {
|
|
268
470
|
if (btn.key) {
|
|
269
|
-
k[
|
|
471
|
+
k[btn.key] = {
|
|
270
472
|
cmd: btn.cmd,
|
|
271
473
|
param: btn.param
|
|
272
474
|
}
|
|
@@ -277,8 +479,7 @@ export default createComponent({
|
|
|
277
479
|
group.forEach(token => {
|
|
278
480
|
if (token.options) {
|
|
279
481
|
token.options.forEach(add)
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
482
|
+
} else {
|
|
282
483
|
add(token)
|
|
283
484
|
}
|
|
284
485
|
})
|
|
@@ -286,7 +487,7 @@ export default createComponent({
|
|
|
286
487
|
return k
|
|
287
488
|
})
|
|
288
489
|
|
|
289
|
-
const innerStyle = computed(() =>
|
|
490
|
+
const innerStyle = computed(() =>
|
|
290
491
|
inFullscreen.value
|
|
291
492
|
? props.contentStyle
|
|
292
493
|
: [
|
|
@@ -297,34 +498,36 @@ export default createComponent({
|
|
|
297
498
|
},
|
|
298
499
|
props.contentStyle
|
|
299
500
|
]
|
|
300
|
-
))
|
|
301
|
-
|
|
302
|
-
const classes = computed(() =>
|
|
303
|
-
`q-editor q-editor--${ isViewingSource.value === true ? 'source' : 'default' }`
|
|
304
|
-
+ (props.disable === true ? ' disabled' : '')
|
|
305
|
-
+ (inFullscreen.value === true ? ' fullscreen column' : '')
|
|
306
|
-
+ (props.square === true ? ' q-editor--square no-border-radius' : '')
|
|
307
|
-
+ (props.flat === true ? ' q-editor--flat' : '')
|
|
308
|
-
+ (props.dense === true ? ' q-editor--dense' : '')
|
|
309
|
-
+ (isDark.value === true ? ' q-editor--dark q-dark' : '')
|
|
310
501
|
)
|
|
311
502
|
|
|
312
|
-
const
|
|
503
|
+
const classes = computed(
|
|
504
|
+
() =>
|
|
505
|
+
`q-editor q-editor--${isViewingSource.value === true ? 'source' : 'default'}` +
|
|
506
|
+
(props.disable === true ? ' disabled' : '') +
|
|
507
|
+
(inFullscreen.value === true ? ' fullscreen column' : '') +
|
|
508
|
+
(props.square === true ? ' q-editor--square no-border-radius' : '') +
|
|
509
|
+
(props.flat === true ? ' q-editor--flat' : '') +
|
|
510
|
+
(props.dense === true ? ' q-editor--dense' : '') +
|
|
511
|
+
(isDark.value === true ? ' q-editor--dark q-dark' : '')
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
const innerClass = computed(() => [
|
|
313
515
|
props.contentClass,
|
|
314
516
|
'q-editor__content',
|
|
315
|
-
{
|
|
316
|
-
|
|
517
|
+
{
|
|
518
|
+
col: inFullscreen.value,
|
|
519
|
+
'overflow-auto': inFullscreen.value || props.maxHeight
|
|
520
|
+
}
|
|
521
|
+
])
|
|
317
522
|
|
|
318
|
-
const attributes = computed(() =>
|
|
319
|
-
props.disable === true
|
|
320
|
-
|
|
321
|
-
: {}
|
|
322
|
-
))
|
|
523
|
+
const attributes = computed(() =>
|
|
524
|
+
props.disable === true ? { 'aria-disabled': 'true' } : {}
|
|
525
|
+
)
|
|
323
526
|
|
|
324
|
-
function onInput
|
|
527
|
+
function onInput() {
|
|
325
528
|
if (contentRef.value !== null) {
|
|
326
|
-
const prop = `inner${
|
|
327
|
-
const val = contentRef.value[
|
|
529
|
+
const prop = `inner${isViewingSource.value === true ? 'Text' : 'HTML'}`
|
|
530
|
+
const val = contentRef.value[prop]
|
|
328
531
|
|
|
329
532
|
if (val !== props.modelValue) {
|
|
330
533
|
lastEmit = val
|
|
@@ -333,7 +536,7 @@ export default createComponent({
|
|
|
333
536
|
}
|
|
334
537
|
}
|
|
335
538
|
|
|
336
|
-
function onKeydown
|
|
539
|
+
function onKeydown(e) {
|
|
337
540
|
emit('keydown', e)
|
|
338
541
|
|
|
339
542
|
if (e.ctrlKey !== true || shouldIgnoreKey(e) === true) {
|
|
@@ -342,7 +545,7 @@ export default createComponent({
|
|
|
342
545
|
}
|
|
343
546
|
|
|
344
547
|
const key = e.keyCode
|
|
345
|
-
const target = keys.value[
|
|
548
|
+
const target = keys.value[key]
|
|
346
549
|
if (target !== void 0) {
|
|
347
550
|
const { cmd, param } = target
|
|
348
551
|
stopAndPrevent(e)
|
|
@@ -350,12 +553,12 @@ export default createComponent({
|
|
|
350
553
|
}
|
|
351
554
|
}
|
|
352
555
|
|
|
353
|
-
function onClick
|
|
556
|
+
function onClick(e) {
|
|
354
557
|
refreshToolbar()
|
|
355
558
|
emit('click', e)
|
|
356
559
|
}
|
|
357
560
|
|
|
358
|
-
function onBlur
|
|
561
|
+
function onBlur(e) {
|
|
359
562
|
if (contentRef.value !== null) {
|
|
360
563
|
const { scrollTop, scrollHeight } = contentRef.value
|
|
361
564
|
offsetBottom = scrollHeight - scrollTop
|
|
@@ -364,73 +567,68 @@ export default createComponent({
|
|
|
364
567
|
emit('blur', e)
|
|
365
568
|
}
|
|
366
569
|
|
|
367
|
-
function onFocus
|
|
570
|
+
function onFocus(e) {
|
|
368
571
|
nextTick(() => {
|
|
369
572
|
if (contentRef.value !== null && offsetBottom !== void 0) {
|
|
370
|
-
contentRef.value.scrollTop =
|
|
573
|
+
contentRef.value.scrollTop =
|
|
574
|
+
contentRef.value.scrollHeight - offsetBottom
|
|
371
575
|
}
|
|
372
576
|
})
|
|
373
577
|
emit('focus', e)
|
|
374
578
|
}
|
|
375
579
|
|
|
376
|
-
function onFocusin
|
|
580
|
+
function onFocusin(e) {
|
|
377
581
|
const root = rootRef.value
|
|
378
582
|
|
|
379
583
|
if (
|
|
380
|
-
root !== null
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
e.relatedTarget === null
|
|
384
|
-
|| root.contains(e.relatedTarget) !== true
|
|
385
|
-
)
|
|
584
|
+
root !== null &&
|
|
585
|
+
root.contains(e.target) === true &&
|
|
586
|
+
(e.relatedTarget === null || root.contains(e.relatedTarget) !== true)
|
|
386
587
|
) {
|
|
387
|
-
const prop = `inner${
|
|
388
|
-
eVm.caret.restorePosition(contentRef.value[
|
|
588
|
+
const prop = `inner${isViewingSource.value === true ? 'Text' : 'HTML'}`
|
|
589
|
+
eVm.caret.restorePosition(contentRef.value[prop].length)
|
|
389
590
|
refreshToolbar()
|
|
390
591
|
}
|
|
391
592
|
}
|
|
392
593
|
|
|
393
|
-
function onFocusout
|
|
594
|
+
function onFocusout(e) {
|
|
394
595
|
const root = rootRef.value
|
|
395
596
|
|
|
396
597
|
if (
|
|
397
|
-
root !== null
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
e.relatedTarget === null
|
|
401
|
-
|| root.contains(e.relatedTarget) !== true
|
|
402
|
-
)
|
|
598
|
+
root !== null &&
|
|
599
|
+
root.contains(e.target) === true &&
|
|
600
|
+
(e.relatedTarget === null || root.contains(e.relatedTarget) !== true)
|
|
403
601
|
) {
|
|
404
602
|
eVm.caret.savePosition()
|
|
405
603
|
refreshToolbar()
|
|
406
604
|
}
|
|
407
605
|
}
|
|
408
606
|
|
|
409
|
-
function onPointerStart
|
|
607
|
+
function onPointerStart() {
|
|
410
608
|
offsetBottom = void 0
|
|
411
609
|
}
|
|
412
610
|
|
|
413
|
-
function onSelectionchange
|
|
611
|
+
function onSelectionchange() {
|
|
414
612
|
eVm.caret.save()
|
|
415
613
|
}
|
|
416
614
|
|
|
417
|
-
function setContent
|
|
615
|
+
function setContent(v, restorePosition) {
|
|
418
616
|
if (contentRef.value !== null) {
|
|
419
617
|
if (restorePosition === true) {
|
|
420
618
|
eVm.caret.savePosition()
|
|
421
619
|
}
|
|
422
620
|
|
|
423
|
-
const prop = `inner${
|
|
424
|
-
contentRef.value[
|
|
621
|
+
const prop = `inner${isViewingSource.value === true ? 'Text' : 'HTML'}`
|
|
622
|
+
contentRef.value[prop] = v
|
|
425
623
|
|
|
426
624
|
if (restorePosition === true) {
|
|
427
|
-
eVm.caret.restorePosition(contentRef.value[
|
|
625
|
+
eVm.caret.restorePosition(contentRef.value[prop].length)
|
|
428
626
|
refreshToolbar()
|
|
429
627
|
}
|
|
430
628
|
}
|
|
431
629
|
}
|
|
432
630
|
|
|
433
|
-
function runCmd
|
|
631
|
+
function runCmd(cmd, param, update = true) {
|
|
434
632
|
focus()
|
|
435
633
|
eVm.caret.restore()
|
|
436
634
|
eVm.caret.apply(cmd, param, () => {
|
|
@@ -442,20 +640,20 @@ export default createComponent({
|
|
|
442
640
|
})
|
|
443
641
|
}
|
|
444
642
|
|
|
445
|
-
function refreshToolbar
|
|
643
|
+
function refreshToolbar() {
|
|
446
644
|
setTimeout(() => {
|
|
447
645
|
editLinkUrl.value = null
|
|
448
646
|
proxy.$forceUpdate()
|
|
449
647
|
}, 1)
|
|
450
648
|
}
|
|
451
649
|
|
|
452
|
-
function focus
|
|
650
|
+
function focus() {
|
|
453
651
|
addFocusFn(() => {
|
|
454
652
|
contentRef.value?.focus({ preventScroll: true })
|
|
455
653
|
})
|
|
456
654
|
}
|
|
457
655
|
|
|
458
|
-
function getContentEl
|
|
656
|
+
function getContentEl() {
|
|
459
657
|
return contentRef.value
|
|
460
658
|
}
|
|
461
659
|
|
|
@@ -473,7 +671,10 @@ export default createComponent({
|
|
|
473
671
|
|
|
474
672
|
// expose public methods
|
|
475
673
|
Object.assign(proxy, {
|
|
476
|
-
runCmd,
|
|
674
|
+
runCmd,
|
|
675
|
+
refreshToolbar,
|
|
676
|
+
focus,
|
|
677
|
+
getContentEl
|
|
477
678
|
})
|
|
478
679
|
|
|
479
680
|
return () => {
|
|
@@ -481,58 +682,76 @@ export default createComponent({
|
|
|
481
682
|
|
|
482
683
|
if (hasToolbar.value) {
|
|
483
684
|
const bars = [
|
|
484
|
-
h(
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
685
|
+
h(
|
|
686
|
+
'div',
|
|
687
|
+
{
|
|
688
|
+
key: 'qedt_top',
|
|
689
|
+
class:
|
|
690
|
+
'q-editor__toolbar row no-wrap scroll-x' +
|
|
691
|
+
toolbarBackgroundClass.value
|
|
692
|
+
},
|
|
693
|
+
getToolbar(eVm)
|
|
694
|
+
)
|
|
489
695
|
]
|
|
490
696
|
|
|
491
|
-
editLinkUrl.value !== null
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
697
|
+
if (editLinkUrl.value !== null) {
|
|
698
|
+
bars.push(
|
|
699
|
+
h(
|
|
700
|
+
'div',
|
|
701
|
+
{
|
|
702
|
+
key: 'qedt_btm',
|
|
703
|
+
class:
|
|
704
|
+
'q-editor__toolbar row no-wrap items-center scroll-x' +
|
|
705
|
+
toolbarBackgroundClass.value
|
|
706
|
+
},
|
|
707
|
+
getLinkEditor(eVm)
|
|
708
|
+
)
|
|
709
|
+
)
|
|
710
|
+
}
|
|
498
711
|
|
|
499
|
-
toolbars = h(
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
712
|
+
toolbars = h(
|
|
713
|
+
'div',
|
|
714
|
+
{
|
|
715
|
+
key: 'toolbar_ctainer',
|
|
716
|
+
class: 'q-editor__toolbars-container'
|
|
717
|
+
},
|
|
718
|
+
bars
|
|
719
|
+
)
|
|
503
720
|
}
|
|
504
721
|
|
|
505
|
-
return h(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
:
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
722
|
+
return h(
|
|
723
|
+
'div',
|
|
724
|
+
{
|
|
725
|
+
ref: rootRef,
|
|
726
|
+
class: classes.value,
|
|
727
|
+
style: { height: inFullscreen.value === true ? '100%' : null },
|
|
728
|
+
...attributes.value,
|
|
729
|
+
onFocusin,
|
|
730
|
+
onFocusout
|
|
731
|
+
},
|
|
732
|
+
[
|
|
733
|
+
toolbars,
|
|
734
|
+
|
|
735
|
+
h('div', {
|
|
736
|
+
ref: contentRef,
|
|
737
|
+
style: innerStyle.value,
|
|
738
|
+
class: innerClass.value,
|
|
739
|
+
contenteditable: editable.value,
|
|
740
|
+
placeholder: props.placeholder,
|
|
741
|
+
...(__QUASAR_SSR_SERVER__ ? { innerHTML: props.modelValue } : {}),
|
|
742
|
+
...splitAttrs.listeners.value,
|
|
743
|
+
onInput,
|
|
744
|
+
onKeydown,
|
|
745
|
+
onClick,
|
|
746
|
+
onBlur,
|
|
747
|
+
onFocus,
|
|
748
|
+
|
|
749
|
+
// clean saved scroll position
|
|
750
|
+
onMousedown: onPointerStart,
|
|
751
|
+
onTouchstartPassive: onPointerStart
|
|
752
|
+
})
|
|
753
|
+
]
|
|
754
|
+
)
|
|
536
755
|
}
|
|
537
756
|
}
|
|
538
757
|
})
|