quasar 2.18.7 → 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 -29220
- 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 -29791
- 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 +126 -414
- 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/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 +50 -64
- 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 +41 -16
- 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 +10 -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 +56 -50
- 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,11 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
h,
|
|
3
|
+
ref,
|
|
4
|
+
computed,
|
|
5
|
+
watch,
|
|
6
|
+
withDirectives,
|
|
7
|
+
Transition,
|
|
8
|
+
nextTick,
|
|
9
|
+
getCurrentInstance
|
|
10
|
+
} from 'vue'
|
|
2
11
|
|
|
3
12
|
import QBtn from '../btn/QBtn.js'
|
|
4
13
|
import TouchPan from '../../directives/touch-pan/TouchPan.js'
|
|
5
14
|
|
|
6
|
-
import useDark, {
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
import useDark, {
|
|
16
|
+
useDarkProps
|
|
17
|
+
} from '../../composables/private.use-dark/use-dark.js'
|
|
18
|
+
import {
|
|
19
|
+
useFormProps,
|
|
20
|
+
useFormAttrs,
|
|
21
|
+
useFormInject
|
|
22
|
+
} from '../../composables/use-form/private.use-form.js'
|
|
23
|
+
import useDatetime, {
|
|
24
|
+
useDatetimeProps,
|
|
25
|
+
useDatetimeEmits,
|
|
26
|
+
getDayHash
|
|
27
|
+
} from '../date/use-datetime.js'
|
|
9
28
|
|
|
10
29
|
import { createComponent } from '../../utils/private.create/create.js'
|
|
11
30
|
import { hSlot } from '../../utils/private.render/render.js'
|
|
@@ -14,12 +33,11 @@ import { position } from '../../utils/event/event.js'
|
|
|
14
33
|
import { pad } from '../../utils/format/format.js'
|
|
15
34
|
import { vmIsDestroyed } from '../../utils/private.vm/vm.js'
|
|
16
35
|
|
|
17
|
-
function getViewByModel
|
|
36
|
+
function getViewByModel(model, withSeconds) {
|
|
18
37
|
if (model.hour !== null) {
|
|
19
38
|
if (model.minute === null) {
|
|
20
39
|
return 'minute'
|
|
21
|
-
}
|
|
22
|
-
else if (withSeconds === true && model.second === null) {
|
|
40
|
+
} else if (withSeconds === true && model.second === null) {
|
|
23
41
|
return 'second'
|
|
24
42
|
}
|
|
25
43
|
}
|
|
@@ -27,7 +45,7 @@ function getViewByModel (model, withSeconds) {
|
|
|
27
45
|
return 'hour'
|
|
28
46
|
}
|
|
29
47
|
|
|
30
|
-
function getCurrentTime
|
|
48
|
+
function getCurrentTime() {
|
|
31
49
|
const d = new Date()
|
|
32
50
|
|
|
33
51
|
return {
|
|
@@ -48,7 +66,7 @@ export default createComponent({
|
|
|
48
66
|
|
|
49
67
|
modelValue: {
|
|
50
68
|
required: true,
|
|
51
|
-
validator: val =>
|
|
69
|
+
validator: val => typeof val === 'string' || val === null
|
|
52
70
|
},
|
|
53
71
|
|
|
54
72
|
mask: {
|
|
@@ -77,12 +95,15 @@ export default createComponent({
|
|
|
77
95
|
|
|
78
96
|
emits: useDatetimeEmits,
|
|
79
97
|
|
|
80
|
-
setup
|
|
98
|
+
setup(props, { slots, emit }) {
|
|
81
99
|
const vm = getCurrentInstance()
|
|
82
100
|
const { $q } = vm.proxy
|
|
83
101
|
|
|
84
102
|
const isDark = useDark(props, $q)
|
|
85
|
-
const { tabindex, headerClass, getLocale, getCurrentDate } = useDatetime(
|
|
103
|
+
const { tabindex, headerClass, getLocale, getCurrentDate } = useDatetime(
|
|
104
|
+
props,
|
|
105
|
+
$q
|
|
106
|
+
)
|
|
86
107
|
|
|
87
108
|
const formAttrs = useFormAttrs(props)
|
|
88
109
|
const injectFormInput = useFormInject(formAttrs)
|
|
@@ -108,58 +129,59 @@ export default createComponent({
|
|
|
108
129
|
const innerModel = ref(model)
|
|
109
130
|
const isAM = ref(model.hour === null || model.hour < 12)
|
|
110
131
|
|
|
111
|
-
const classes = computed(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
132
|
+
const classes = computed(
|
|
133
|
+
() =>
|
|
134
|
+
`q-time q-time--${props.landscape === true ? 'landscape' : 'portrait'}` +
|
|
135
|
+
(isDark.value === true ? ' q-time--dark q-dark' : '') +
|
|
136
|
+
(props.disable === true
|
|
137
|
+
? ' disabled'
|
|
138
|
+
: props.readonly === true
|
|
139
|
+
? ' q-time--readonly'
|
|
140
|
+
: '') +
|
|
141
|
+
(props.bordered === true ? ' q-time--bordered' : '') +
|
|
142
|
+
(props.square === true ? ' q-time--square no-border-radius' : '') +
|
|
143
|
+
(props.flat === true ? ' q-time--flat no-shadow' : '')
|
|
118
144
|
)
|
|
119
145
|
|
|
120
146
|
const stringModel = computed(() => {
|
|
121
147
|
const time = innerModel.value
|
|
122
148
|
|
|
123
149
|
return {
|
|
124
|
-
hour:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
150
|
+
hour:
|
|
151
|
+
time.hour === null
|
|
152
|
+
? '--'
|
|
153
|
+
: computedFormat24h.value === true
|
|
154
|
+
? pad(time.hour)
|
|
155
|
+
: String(
|
|
130
156
|
isAM.value === true
|
|
131
|
-
?
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
: pad(time.second)
|
|
157
|
+
? time.hour === 0
|
|
158
|
+
? 12
|
|
159
|
+
: time.hour
|
|
160
|
+
: time.hour > 12
|
|
161
|
+
? time.hour - 12
|
|
162
|
+
: time.hour
|
|
163
|
+
),
|
|
164
|
+
minute: time.minute === null ? '--' : pad(time.minute),
|
|
165
|
+
second: time.second === null ? '--' : pad(time.second)
|
|
141
166
|
}
|
|
142
167
|
})
|
|
143
168
|
|
|
144
|
-
const computedFormat24h = computed(() =>
|
|
145
|
-
props.format24h !== null
|
|
146
|
-
|
|
147
|
-
: $q.lang.date.format24h
|
|
148
|
-
))
|
|
169
|
+
const computedFormat24h = computed(() =>
|
|
170
|
+
props.format24h !== null ? props.format24h : $q.lang.date.format24h
|
|
171
|
+
)
|
|
149
172
|
|
|
150
173
|
const pointerStyle = computed(() => {
|
|
151
|
-
const
|
|
152
|
-
forHour = view.value === 'hour',
|
|
174
|
+
const forHour = view.value === 'hour',
|
|
153
175
|
divider = forHour === true ? 12 : 60,
|
|
154
|
-
amount = innerModel.value[
|
|
176
|
+
amount = innerModel.value[view.value],
|
|
155
177
|
degrees = Math.round(amount * (360 / divider)) - 180
|
|
156
178
|
|
|
157
|
-
let transform = `rotate(${
|
|
179
|
+
let transform = `rotate(${degrees}deg) translateX(-50%)`
|
|
158
180
|
|
|
159
181
|
if (
|
|
160
|
-
forHour === true
|
|
161
|
-
|
|
162
|
-
|
|
182
|
+
forHour === true &&
|
|
183
|
+
computedFormat24h.value === true &&
|
|
184
|
+
innerModel.value.hour >= 12
|
|
163
185
|
) {
|
|
164
186
|
transform += ' scale(.7)'
|
|
165
187
|
}
|
|
@@ -168,37 +190,34 @@ export default createComponent({
|
|
|
168
190
|
})
|
|
169
191
|
|
|
170
192
|
const minLink = computed(() => innerModel.value.hour !== null)
|
|
171
|
-
const secLink = computed(
|
|
193
|
+
const secLink = computed(
|
|
194
|
+
() => minLink.value === true && innerModel.value.minute !== null
|
|
195
|
+
)
|
|
172
196
|
|
|
173
|
-
const hourInSelection = computed(() =>
|
|
197
|
+
const hourInSelection = computed(() =>
|
|
174
198
|
props.hourOptions !== void 0
|
|
175
199
|
? val => props.hourOptions.includes(val)
|
|
176
|
-
:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
)
|
|
181
|
-
))
|
|
200
|
+
: props.options !== void 0
|
|
201
|
+
? val => props.options(val, null, null)
|
|
202
|
+
: null
|
|
203
|
+
)
|
|
182
204
|
|
|
183
|
-
const minuteInSelection = computed(() =>
|
|
205
|
+
const minuteInSelection = computed(() =>
|
|
184
206
|
props.minuteOptions !== void 0
|
|
185
207
|
? val => props.minuteOptions.includes(val)
|
|
186
|
-
:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
)
|
|
191
|
-
))
|
|
208
|
+
: props.options !== void 0
|
|
209
|
+
? val => props.options(innerModel.value.hour, val, null)
|
|
210
|
+
: null
|
|
211
|
+
)
|
|
192
212
|
|
|
193
|
-
const secondInSelection = computed(() =>
|
|
213
|
+
const secondInSelection = computed(() =>
|
|
194
214
|
props.secondOptions !== void 0
|
|
195
215
|
? val => props.secondOptions.includes(val)
|
|
196
|
-
:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
))
|
|
216
|
+
: props.options !== void 0
|
|
217
|
+
? val =>
|
|
218
|
+
props.options(innerModel.value.hour, innerModel.value.minute, val)
|
|
219
|
+
: null
|
|
220
|
+
)
|
|
202
221
|
|
|
203
222
|
const validHours = computed(() => {
|
|
204
223
|
if (hourInSelection.value === null) {
|
|
@@ -210,17 +229,17 @@ export default createComponent({
|
|
|
210
229
|
return { am, pm, values: am.values.concat(pm.values) }
|
|
211
230
|
})
|
|
212
231
|
|
|
213
|
-
const validMinutes = computed(() =>
|
|
232
|
+
const validMinutes = computed(() =>
|
|
214
233
|
minuteInSelection.value !== null
|
|
215
234
|
? getValidValues(0, 59, minuteInSelection.value)
|
|
216
235
|
: null
|
|
217
|
-
)
|
|
236
|
+
)
|
|
218
237
|
|
|
219
|
-
const validSeconds = computed(() =>
|
|
238
|
+
const validSeconds = computed(() =>
|
|
220
239
|
secondInSelection.value !== null
|
|
221
240
|
? getValidValues(0, 59, secondInSelection.value)
|
|
222
241
|
: null
|
|
223
|
-
)
|
|
242
|
+
)
|
|
224
243
|
|
|
225
244
|
const viewValidOptions = computed(() => {
|
|
226
245
|
switch (view.value) {
|
|
@@ -234,17 +253,18 @@ export default createComponent({
|
|
|
234
253
|
})
|
|
235
254
|
|
|
236
255
|
const positions = computed(() => {
|
|
237
|
-
let start,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
256
|
+
let start,
|
|
257
|
+
end,
|
|
258
|
+
offset = 0,
|
|
259
|
+
step = 1
|
|
260
|
+
const values =
|
|
261
|
+
viewValidOptions.value !== null ? viewValidOptions.value.values : void 0
|
|
241
262
|
|
|
242
263
|
if (view.value === 'hour') {
|
|
243
264
|
if (computedFormat24h.value === true) {
|
|
244
265
|
start = 0
|
|
245
266
|
end = 23
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
267
|
+
} else {
|
|
248
268
|
start = 0
|
|
249
269
|
end = 11
|
|
250
270
|
|
|
@@ -252,8 +272,7 @@ export default createComponent({
|
|
|
252
272
|
offset = 12
|
|
253
273
|
}
|
|
254
274
|
}
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
275
|
+
} else {
|
|
257
276
|
start = 0
|
|
258
277
|
end = 55
|
|
259
278
|
step = 5
|
|
@@ -262,12 +281,14 @@ export default createComponent({
|
|
|
262
281
|
const pos = []
|
|
263
282
|
|
|
264
283
|
for (let val = start, index = start; val <= end; val += step, index++) {
|
|
265
|
-
const
|
|
266
|
-
actualVal = val + offset,
|
|
284
|
+
const actualVal = val + offset,
|
|
267
285
|
disable = values?.includes(actualVal) === false,
|
|
268
|
-
label =
|
|
269
|
-
|
|
270
|
-
|
|
286
|
+
label =
|
|
287
|
+
view.value === 'hour' && val === 0
|
|
288
|
+
? computedFormat24h.value === true
|
|
289
|
+
? '00'
|
|
290
|
+
: '12'
|
|
291
|
+
: val
|
|
271
292
|
|
|
272
293
|
pos.push({ val: actualVal, index, disable, label })
|
|
273
294
|
}
|
|
@@ -275,8 +296,8 @@ export default createComponent({
|
|
|
275
296
|
return pos
|
|
276
297
|
})
|
|
277
298
|
|
|
278
|
-
const clockDirectives = computed(() =>
|
|
279
|
-
|
|
299
|
+
const clockDirectives = computed(() => [
|
|
300
|
+
[
|
|
280
301
|
TouchPan,
|
|
281
302
|
onPan,
|
|
282
303
|
void 0,
|
|
@@ -285,40 +306,42 @@ export default createComponent({
|
|
|
285
306
|
prevent: true,
|
|
286
307
|
mouse: true
|
|
287
308
|
}
|
|
288
|
-
]
|
|
289
|
-
|
|
309
|
+
]
|
|
310
|
+
])
|
|
290
311
|
|
|
291
|
-
watch(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
312
|
+
watch(
|
|
313
|
+
() => props.modelValue,
|
|
314
|
+
v => {
|
|
315
|
+
const val = __splitDate(
|
|
316
|
+
v,
|
|
317
|
+
mask.value,
|
|
318
|
+
locale.value,
|
|
319
|
+
props.calendar,
|
|
320
|
+
defaultDateModel.value
|
|
321
|
+
)
|
|
299
322
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
323
|
+
if (
|
|
324
|
+
val.dateHash !== innerModel.value.dateHash ||
|
|
325
|
+
val.timeHash !== innerModel.value.timeHash
|
|
326
|
+
) {
|
|
327
|
+
innerModel.value = val
|
|
305
328
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
329
|
+
if (val.hour === null) {
|
|
330
|
+
view.value = 'hour'
|
|
331
|
+
} else {
|
|
332
|
+
isAM.value = val.hour < 12
|
|
333
|
+
}
|
|
311
334
|
}
|
|
312
335
|
}
|
|
313
|
-
|
|
336
|
+
)
|
|
314
337
|
|
|
315
|
-
watch([
|
|
338
|
+
watch([mask, locale], () => {
|
|
316
339
|
nextTick(() => {
|
|
317
340
|
updateValue()
|
|
318
341
|
})
|
|
319
342
|
})
|
|
320
343
|
|
|
321
|
-
function setNow
|
|
344
|
+
function setNow() {
|
|
322
345
|
const date = {
|
|
323
346
|
...getCurrentDate(),
|
|
324
347
|
...getCurrentTime()
|
|
@@ -330,7 +353,7 @@ export default createComponent({
|
|
|
330
353
|
view.value = 'hour'
|
|
331
354
|
}
|
|
332
355
|
|
|
333
|
-
function getValidValues
|
|
356
|
+
function getValidValues(start, count, testFn) {
|
|
334
357
|
const values = Array.apply(null, { length: count + 1 })
|
|
335
358
|
.map((_, index) => {
|
|
336
359
|
const i = index + start
|
|
@@ -343,73 +366,73 @@ export default createComponent({
|
|
|
343
366
|
.map(v => v.index)
|
|
344
367
|
|
|
345
368
|
return {
|
|
346
|
-
min: values[
|
|
347
|
-
max: values[
|
|
369
|
+
min: values[0],
|
|
370
|
+
max: values[values.length - 1],
|
|
348
371
|
values,
|
|
349
372
|
threshold: count + 1
|
|
350
373
|
}
|
|
351
374
|
}
|
|
352
375
|
|
|
353
|
-
function getWheelDist
|
|
376
|
+
function getWheelDist(a, b, threshold) {
|
|
354
377
|
const diff = Math.abs(a - b)
|
|
355
378
|
return Math.min(diff, threshold - diff)
|
|
356
379
|
}
|
|
357
380
|
|
|
358
|
-
function getNormalizedClockValue
|
|
381
|
+
function getNormalizedClockValue(val, { min, max, values, threshold }) {
|
|
359
382
|
if (val === min) {
|
|
360
383
|
return min
|
|
361
384
|
}
|
|
362
385
|
|
|
363
386
|
if (val < min || val > max) {
|
|
364
|
-
return getWheelDist(val, min, threshold) <=
|
|
387
|
+
return getWheelDist(val, min, threshold) <=
|
|
388
|
+
getWheelDist(val, max, threshold)
|
|
365
389
|
? min
|
|
366
390
|
: max
|
|
367
391
|
}
|
|
368
392
|
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
after = values[ index ]
|
|
393
|
+
const index = values.findIndex(v => val <= v),
|
|
394
|
+
before = values[index - 1],
|
|
395
|
+
after = values[index]
|
|
373
396
|
|
|
374
|
-
return val - before <= after - val
|
|
375
|
-
? before
|
|
376
|
-
: after
|
|
397
|
+
return val - before <= after - val ? before : after
|
|
377
398
|
}
|
|
378
399
|
|
|
379
|
-
function getMask
|
|
400
|
+
function getMask() {
|
|
380
401
|
return props.calendar !== 'persian' && props.mask !== null
|
|
381
402
|
? props.mask
|
|
382
|
-
: `HH:mm${
|
|
403
|
+
: `HH:mm${props.withSeconds === true ? ':ss' : ''}`
|
|
383
404
|
}
|
|
384
405
|
|
|
385
|
-
function getDefaultDateModel
|
|
406
|
+
function getDefaultDateModel() {
|
|
386
407
|
if (typeof props.defaultDate !== 'string') {
|
|
387
408
|
const date = getCurrentDate(true)
|
|
388
409
|
date.dateHash = getDayHash(date)
|
|
389
410
|
return date
|
|
390
411
|
}
|
|
391
412
|
|
|
392
|
-
return __splitDate(
|
|
413
|
+
return __splitDate(
|
|
414
|
+
props.defaultDate,
|
|
415
|
+
'YYYY/MM/DD',
|
|
416
|
+
void 0,
|
|
417
|
+
props.calendar
|
|
418
|
+
)
|
|
393
419
|
}
|
|
394
420
|
|
|
395
|
-
function shouldAbortInteraction
|
|
396
|
-
return
|
|
421
|
+
function shouldAbortInteraction() {
|
|
422
|
+
return (
|
|
423
|
+
vmIsDestroyed(vm) === true ||
|
|
397
424
|
// if we have limited options, can we actually set any?
|
|
398
|
-
|
|
399
|
-
viewValidOptions.value
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
)
|
|
406
|
-
)
|
|
407
|
-
)
|
|
425
|
+
(viewValidOptions.value !== null &&
|
|
426
|
+
(viewValidOptions.value.values.length === 0 ||
|
|
427
|
+
(view.value === 'hour' &&
|
|
428
|
+
computedFormat24h.value !== true &&
|
|
429
|
+
validHours.value[isAM.value === true ? 'am' : 'pm'].values
|
|
430
|
+
.length === 0)))
|
|
431
|
+
)
|
|
408
432
|
}
|
|
409
433
|
|
|
410
|
-
function getClockRect
|
|
411
|
-
const
|
|
412
|
-
clock = clockRef.value,
|
|
434
|
+
function getClockRect() {
|
|
435
|
+
const clock = clockRef.value,
|
|
413
436
|
{ top, left, width } = clock.getBoundingClientRect(),
|
|
414
437
|
dist = width / 2
|
|
415
438
|
|
|
@@ -420,7 +443,7 @@ export default createComponent({
|
|
|
420
443
|
}
|
|
421
444
|
}
|
|
422
445
|
|
|
423
|
-
function onPan
|
|
446
|
+
function onPan(event) {
|
|
424
447
|
if (shouldAbortInteraction() === true) return
|
|
425
448
|
|
|
426
449
|
if (event.isFirst === true) {
|
|
@@ -438,32 +461,28 @@ export default createComponent({
|
|
|
438
461
|
}
|
|
439
462
|
}
|
|
440
463
|
|
|
441
|
-
function goToNextView
|
|
464
|
+
function goToNextView() {
|
|
442
465
|
if (view.value === 'hour') {
|
|
443
466
|
view.value = 'minute'
|
|
444
|
-
}
|
|
445
|
-
else if (props.withSeconds && view.value === 'minute') {
|
|
467
|
+
} else if (props.withSeconds && view.value === 'minute') {
|
|
446
468
|
view.value = 'second'
|
|
447
469
|
}
|
|
448
470
|
}
|
|
449
471
|
|
|
450
|
-
function updateClock
|
|
451
|
-
const
|
|
452
|
-
pos = position(evt),
|
|
472
|
+
function updateClock(evt, clockRect, cacheVal) {
|
|
473
|
+
const pos = position(evt),
|
|
453
474
|
height = Math.abs(pos.top - clockRect.top),
|
|
454
475
|
distance = Math.sqrt(
|
|
455
|
-
Math.
|
|
456
|
-
|
|
476
|
+
Math.abs(pos.top - clockRect.top) ** 2 +
|
|
477
|
+
Math.abs(pos.left - clockRect.left) ** 2
|
|
457
478
|
)
|
|
458
479
|
|
|
459
|
-
let
|
|
460
|
-
val,
|
|
480
|
+
let val,
|
|
461
481
|
angle = Math.asin(height / distance) * (180 / Math.PI)
|
|
462
482
|
|
|
463
483
|
if (pos.top < clockRect.top) {
|
|
464
484
|
angle = clockRect.left < pos.left ? 90 - angle : 270 + angle
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
485
|
+
} else {
|
|
467
486
|
angle = clockRect.left < pos.left ? angle + 90 : 270 - angle
|
|
468
487
|
}
|
|
469
488
|
|
|
@@ -471,20 +490,19 @@ export default createComponent({
|
|
|
471
490
|
val = angle / 30
|
|
472
491
|
|
|
473
492
|
if (validHours.value !== null) {
|
|
474
|
-
const am =
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
493
|
+
const am =
|
|
494
|
+
computedFormat24h.value !== true
|
|
495
|
+
? isAM.value === true
|
|
496
|
+
: validHours.value.am.values.length !== 0 &&
|
|
497
|
+
validHours.value.pm.values.length !== 0
|
|
498
|
+
? distance >= clockRect.dist
|
|
499
|
+
: validHours.value.am.values.length !== 0
|
|
481
500
|
|
|
482
501
|
val = getNormalizedClockValue(
|
|
483
502
|
val + (am === true ? 0 : 12),
|
|
484
|
-
validHours.value[
|
|
503
|
+
validHours.value[am === true ? 'am' : 'pm']
|
|
485
504
|
)
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
505
|
+
} else {
|
|
488
506
|
val = Math.round(val)
|
|
489
507
|
|
|
490
508
|
if (computedFormat24h.value === true) {
|
|
@@ -492,15 +510,12 @@ export default createComponent({
|
|
|
492
510
|
if (val < 12) {
|
|
493
511
|
val += 12
|
|
494
512
|
}
|
|
495
|
-
}
|
|
496
|
-
else if (val === 12) {
|
|
513
|
+
} else if (val === 12) {
|
|
497
514
|
val = 0
|
|
498
515
|
}
|
|
499
|
-
}
|
|
500
|
-
else if (isAM.value === true && val === 12) {
|
|
516
|
+
} else if (isAM.value === true && val === 12) {
|
|
501
517
|
val = 0
|
|
502
|
-
}
|
|
503
|
-
else if (isAM.value === false && val !== 12) {
|
|
518
|
+
} else if (isAM.value === false && val !== 12) {
|
|
504
519
|
val += 12
|
|
505
520
|
}
|
|
506
521
|
}
|
|
@@ -508,40 +523,44 @@ export default createComponent({
|
|
|
508
523
|
if (computedFormat24h.value === true) {
|
|
509
524
|
isAM.value = val < 12
|
|
510
525
|
}
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
526
|
+
} else {
|
|
513
527
|
val = Math.round(angle / 6) % 60
|
|
514
528
|
|
|
515
529
|
if (view.value === 'minute' && validMinutes.value !== null) {
|
|
516
530
|
val = getNormalizedClockValue(val, validMinutes.value)
|
|
517
|
-
}
|
|
518
|
-
else if (view.value === 'second' && validSeconds.value !== null) {
|
|
531
|
+
} else if (view.value === 'second' && validSeconds.value !== null) {
|
|
519
532
|
val = getNormalizedClockValue(val, validSeconds.value)
|
|
520
533
|
}
|
|
521
534
|
}
|
|
522
535
|
|
|
523
536
|
if (cacheVal !== val) {
|
|
524
|
-
setModel[
|
|
537
|
+
setModel[view.value](val)
|
|
525
538
|
}
|
|
526
539
|
|
|
527
540
|
return val
|
|
528
541
|
}
|
|
529
542
|
|
|
530
543
|
const setView = {
|
|
531
|
-
hour
|
|
532
|
-
|
|
533
|
-
|
|
544
|
+
hour() {
|
|
545
|
+
view.value = 'hour'
|
|
546
|
+
},
|
|
547
|
+
minute() {
|
|
548
|
+
view.value = 'minute'
|
|
549
|
+
},
|
|
550
|
+
second() {
|
|
551
|
+
view.value = 'second'
|
|
552
|
+
}
|
|
534
553
|
}
|
|
535
554
|
|
|
536
|
-
function setAmOnKey
|
|
537
|
-
e.keyCode === 13
|
|
555
|
+
function setAmOnKey(e) {
|
|
556
|
+
if (e.keyCode === 13) setAm()
|
|
538
557
|
}
|
|
539
558
|
|
|
540
|
-
function setPmOnKey
|
|
541
|
-
e.keyCode === 13
|
|
559
|
+
function setPmOnKey(e) {
|
|
560
|
+
if (e.keyCode === 13) setPm()
|
|
542
561
|
}
|
|
543
562
|
|
|
544
|
-
function onClick
|
|
563
|
+
function onClick(evt) {
|
|
545
564
|
if (shouldAbortInteraction() !== true) {
|
|
546
565
|
// onMousedown() has already updated the offset
|
|
547
566
|
// (on desktop only, through mousedown event)
|
|
@@ -553,55 +572,55 @@ export default createComponent({
|
|
|
553
572
|
}
|
|
554
573
|
}
|
|
555
574
|
|
|
556
|
-
function onMousedown
|
|
575
|
+
function onMousedown(evt) {
|
|
557
576
|
if (shouldAbortInteraction() !== true) {
|
|
558
577
|
updateClock(evt, getClockRect())
|
|
559
578
|
}
|
|
560
579
|
}
|
|
561
580
|
|
|
562
|
-
function onKeyupHour
|
|
563
|
-
if (e.keyCode === 13) {
|
|
581
|
+
function onKeyupHour(e) {
|
|
582
|
+
if (e.keyCode === 13) {
|
|
583
|
+
// ENTER
|
|
564
584
|
view.value = 'hour'
|
|
565
|
-
}
|
|
566
|
-
else if ([ 37, 39 ].includes(e.keyCode)) {
|
|
585
|
+
} else if ([37, 39].includes(e.keyCode)) {
|
|
567
586
|
const payload = e.keyCode === 37 ? -1 : 1
|
|
568
587
|
|
|
569
588
|
if (validHours.value !== null) {
|
|
570
|
-
const values =
|
|
571
|
-
|
|
572
|
-
|
|
589
|
+
const values =
|
|
590
|
+
computedFormat24h.value === true
|
|
591
|
+
? validHours.value.values
|
|
592
|
+
: validHours.value[isAM.value === true ? 'am' : 'pm'].values
|
|
573
593
|
|
|
574
594
|
if (values.length === 0) return
|
|
575
595
|
|
|
576
596
|
if (innerModel.value.hour === null) {
|
|
577
|
-
setHour(values[
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
|
|
597
|
+
setHour(values[0])
|
|
598
|
+
} else {
|
|
599
|
+
const index =
|
|
600
|
+
(values.length +
|
|
601
|
+
values.indexOf(innerModel.value.hour) +
|
|
602
|
+
payload) %
|
|
581
603
|
values.length
|
|
582
|
-
+ values.indexOf(innerModel.value.hour)
|
|
583
|
-
+ payload
|
|
584
|
-
) % values.length
|
|
585
604
|
|
|
586
|
-
setHour(values[
|
|
605
|
+
setHour(values[index])
|
|
587
606
|
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
setHour(offset + (24 + val + payload) % wrap)
|
|
607
|
+
} else {
|
|
608
|
+
const wrap = computedFormat24h.value === true ? 24 : 12,
|
|
609
|
+
offset =
|
|
610
|
+
computedFormat24h.value !== true && isAM.value === false ? 12 : 0,
|
|
611
|
+
val =
|
|
612
|
+
innerModel.value.hour === null ? -payload : innerModel.value.hour
|
|
613
|
+
|
|
614
|
+
setHour(offset + ((24 + val + payload) % wrap))
|
|
596
615
|
}
|
|
597
616
|
}
|
|
598
617
|
}
|
|
599
618
|
|
|
600
|
-
function onKeyupMinute
|
|
601
|
-
if (e.keyCode === 13) {
|
|
619
|
+
function onKeyupMinute(e) {
|
|
620
|
+
if (e.keyCode === 13) {
|
|
621
|
+
// ENTER
|
|
602
622
|
view.value = 'minute'
|
|
603
|
-
}
|
|
604
|
-
else if ([ 37, 39 ].includes(e.keyCode)) {
|
|
623
|
+
} else if ([37, 39].includes(e.keyCode)) {
|
|
605
624
|
const payload = e.keyCode === 37 ? -1 : 1
|
|
606
625
|
|
|
607
626
|
if (validMinutes.value !== null) {
|
|
@@ -610,30 +629,31 @@ export default createComponent({
|
|
|
610
629
|
if (values.length === 0) return
|
|
611
630
|
|
|
612
631
|
if (innerModel.value.minute === null) {
|
|
613
|
-
setMinute(values[
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
|
|
632
|
+
setMinute(values[0])
|
|
633
|
+
} else {
|
|
634
|
+
const index =
|
|
635
|
+
(values.length +
|
|
636
|
+
values.indexOf(innerModel.value.minute) +
|
|
637
|
+
payload) %
|
|
617
638
|
values.length
|
|
618
|
-
+ values.indexOf(innerModel.value.minute)
|
|
619
|
-
+ payload
|
|
620
|
-
) % values.length
|
|
621
639
|
|
|
622
|
-
setMinute(values[
|
|
640
|
+
setMinute(values[index])
|
|
623
641
|
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
642
|
+
} else {
|
|
643
|
+
const val =
|
|
644
|
+
innerModel.value.minute === null
|
|
645
|
+
? -payload
|
|
646
|
+
: innerModel.value.minute
|
|
627
647
|
setMinute((60 + val + payload) % 60)
|
|
628
648
|
}
|
|
629
649
|
}
|
|
630
650
|
}
|
|
631
651
|
|
|
632
|
-
function onKeyupSecond
|
|
633
|
-
if (e.keyCode === 13) {
|
|
652
|
+
function onKeyupSecond(e) {
|
|
653
|
+
if (e.keyCode === 13) {
|
|
654
|
+
// ENTER
|
|
634
655
|
view.value = 'second'
|
|
635
|
-
}
|
|
636
|
-
else if ([ 37, 39 ].includes(e.keyCode)) {
|
|
656
|
+
} else if ([37, 39].includes(e.keyCode)) {
|
|
637
657
|
const payload = e.keyCode === 37 ? -1 : 1
|
|
638
658
|
|
|
639
659
|
if (validSeconds.value !== null) {
|
|
@@ -642,40 +662,41 @@ export default createComponent({
|
|
|
642
662
|
if (values.length === 0) return
|
|
643
663
|
|
|
644
664
|
if (innerModel.value.seconds === null) {
|
|
645
|
-
setSecond(values[
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
|
|
665
|
+
setSecond(values[0])
|
|
666
|
+
} else {
|
|
667
|
+
const index =
|
|
668
|
+
(values.length +
|
|
669
|
+
values.indexOf(innerModel.value.second) +
|
|
670
|
+
payload) %
|
|
649
671
|
values.length
|
|
650
|
-
+ values.indexOf(innerModel.value.second)
|
|
651
|
-
+ payload
|
|
652
|
-
) % values.length
|
|
653
672
|
|
|
654
|
-
setSecond(values[
|
|
673
|
+
setSecond(values[index])
|
|
655
674
|
}
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
|
|
675
|
+
} else {
|
|
676
|
+
const val =
|
|
677
|
+
innerModel.value.second === null
|
|
678
|
+
? -payload
|
|
679
|
+
: innerModel.value.second
|
|
659
680
|
setSecond((60 + val + payload) % 60)
|
|
660
681
|
}
|
|
661
682
|
}
|
|
662
683
|
}
|
|
663
684
|
|
|
664
|
-
function setHour
|
|
685
|
+
function setHour(hour) {
|
|
665
686
|
if (innerModel.value.hour !== hour) {
|
|
666
687
|
innerModel.value.hour = hour
|
|
667
688
|
verifyAndUpdate()
|
|
668
689
|
}
|
|
669
690
|
}
|
|
670
691
|
|
|
671
|
-
function setMinute
|
|
692
|
+
function setMinute(minute) {
|
|
672
693
|
if (innerModel.value.minute !== minute) {
|
|
673
694
|
innerModel.value.minute = minute
|
|
674
695
|
verifyAndUpdate()
|
|
675
696
|
}
|
|
676
697
|
}
|
|
677
698
|
|
|
678
|
-
function setSecond
|
|
699
|
+
function setSecond(second) {
|
|
679
700
|
if (innerModel.value.second !== second) {
|
|
680
701
|
innerModel.value.second = second
|
|
681
702
|
verifyAndUpdate()
|
|
@@ -688,7 +709,7 @@ export default createComponent({
|
|
|
688
709
|
second: setSecond
|
|
689
710
|
}
|
|
690
711
|
|
|
691
|
-
function setAm
|
|
712
|
+
function setAm() {
|
|
692
713
|
if (isAM.value === false) {
|
|
693
714
|
isAM.value = true
|
|
694
715
|
|
|
@@ -699,7 +720,7 @@ export default createComponent({
|
|
|
699
720
|
}
|
|
700
721
|
}
|
|
701
722
|
|
|
702
|
-
function setPm
|
|
723
|
+
function setPm() {
|
|
703
724
|
if (isAM.value === true) {
|
|
704
725
|
isAM.value = false
|
|
705
726
|
|
|
@@ -710,84 +731,105 @@ export default createComponent({
|
|
|
710
731
|
}
|
|
711
732
|
}
|
|
712
733
|
|
|
713
|
-
function goToViewWhenHasModel
|
|
714
|
-
const
|
|
734
|
+
function goToViewWhenHasModel(newView) {
|
|
735
|
+
const val = props.modelValue
|
|
715
736
|
if (
|
|
716
|
-
view.value !== newView
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
737
|
+
view.value !== newView &&
|
|
738
|
+
val !== void 0 &&
|
|
739
|
+
val !== null &&
|
|
740
|
+
val !== '' &&
|
|
741
|
+
typeof val !== 'string'
|
|
721
742
|
) {
|
|
722
743
|
view.value = newView
|
|
723
744
|
}
|
|
724
745
|
}
|
|
725
746
|
|
|
726
|
-
function verifyAndUpdate
|
|
727
|
-
if (
|
|
747
|
+
function verifyAndUpdate() {
|
|
748
|
+
if (
|
|
749
|
+
hourInSelection.value !== null &&
|
|
750
|
+
hourInSelection.value(innerModel.value.hour) !== true
|
|
751
|
+
) {
|
|
728
752
|
innerModel.value = __splitDate()
|
|
729
753
|
goToViewWhenHasModel('hour')
|
|
730
754
|
return
|
|
731
755
|
}
|
|
732
756
|
|
|
733
|
-
if (
|
|
757
|
+
if (
|
|
758
|
+
minuteInSelection.value !== null &&
|
|
759
|
+
minuteInSelection.value(innerModel.value.minute) !== true
|
|
760
|
+
) {
|
|
734
761
|
innerModel.value.minute = null
|
|
735
762
|
innerModel.value.second = null
|
|
736
763
|
goToViewWhenHasModel('minute')
|
|
737
764
|
return
|
|
738
765
|
}
|
|
739
766
|
|
|
740
|
-
if (
|
|
767
|
+
if (
|
|
768
|
+
props.withSeconds === true &&
|
|
769
|
+
secondInSelection.value !== null &&
|
|
770
|
+
secondInSelection.value(innerModel.value.second) !== true
|
|
771
|
+
) {
|
|
741
772
|
innerModel.value.second = null
|
|
742
773
|
goToViewWhenHasModel('second')
|
|
743
774
|
return
|
|
744
775
|
}
|
|
745
776
|
|
|
746
777
|
if (
|
|
747
|
-
innerModel.value.hour === null
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
)
|
|
778
|
+
innerModel.value.hour === null ||
|
|
779
|
+
innerModel.value.minute === null ||
|
|
780
|
+
(props.withSeconds === true && innerModel.value.second === null)
|
|
781
|
+
) {
|
|
782
|
+
return
|
|
783
|
+
}
|
|
751
784
|
|
|
752
785
|
updateValue()
|
|
753
786
|
}
|
|
754
787
|
|
|
755
|
-
function updateValue
|
|
788
|
+
function updateValue(obj) {
|
|
756
789
|
const date = Object.assign({ ...innerModel.value }, obj)
|
|
757
790
|
|
|
758
|
-
const val =
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
791
|
+
const val =
|
|
792
|
+
props.calendar === 'persian'
|
|
793
|
+
? pad(date.hour) +
|
|
794
|
+
':' +
|
|
795
|
+
pad(date.minute) +
|
|
796
|
+
(props.withSeconds === true ? ':' + pad(date.second) : '')
|
|
797
|
+
: formatDate(
|
|
798
|
+
new Date(
|
|
799
|
+
date.year,
|
|
800
|
+
date.month === null ? null : date.month - 1,
|
|
801
|
+
date.day,
|
|
802
|
+
date.hour,
|
|
803
|
+
date.minute,
|
|
804
|
+
date.second,
|
|
805
|
+
date.millisecond
|
|
806
|
+
),
|
|
807
|
+
mask.value,
|
|
808
|
+
locale.value,
|
|
809
|
+
date.year,
|
|
810
|
+
date.timezoneOffset
|
|
811
|
+
)
|
|
777
812
|
|
|
778
813
|
date.changed = val !== props.modelValue
|
|
779
814
|
emit('update:modelValue', val, date)
|
|
780
815
|
}
|
|
781
816
|
|
|
782
|
-
function getHeader
|
|
817
|
+
function getHeader() {
|
|
783
818
|
const label = [
|
|
784
|
-
h(
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
819
|
+
h(
|
|
820
|
+
'div',
|
|
821
|
+
{
|
|
822
|
+
class:
|
|
823
|
+
'q-time__link ' +
|
|
824
|
+
(view.value === 'hour'
|
|
825
|
+
? 'q-time__link--active'
|
|
826
|
+
: 'cursor-pointer'),
|
|
827
|
+
tabindex: tabindex.value,
|
|
828
|
+
onClick: setView.hour,
|
|
829
|
+
onKeyup: onKeyupHour
|
|
830
|
+
},
|
|
831
|
+
stringModel.value.hour
|
|
832
|
+
),
|
|
791
833
|
|
|
792
834
|
h('div', ':'),
|
|
793
835
|
|
|
@@ -795,8 +837,11 @@ export default createComponent({
|
|
|
795
837
|
'div',
|
|
796
838
|
minLink.value === true
|
|
797
839
|
? {
|
|
798
|
-
class:
|
|
799
|
-
|
|
840
|
+
class:
|
|
841
|
+
'q-time__link ' +
|
|
842
|
+
(view.value === 'minute'
|
|
843
|
+
? 'q-time__link--active'
|
|
844
|
+
: 'cursor-pointer'),
|
|
800
845
|
tabindex: tabindex.value,
|
|
801
846
|
onKeyup: onKeyupMinute,
|
|
802
847
|
onClick: setView.minute
|
|
@@ -814,8 +859,11 @@ export default createComponent({
|
|
|
814
859
|
'div',
|
|
815
860
|
secLink.value === true
|
|
816
861
|
? {
|
|
817
|
-
class:
|
|
818
|
-
|
|
862
|
+
class:
|
|
863
|
+
'q-time__link ' +
|
|
864
|
+
(view.value === 'second'
|
|
865
|
+
? 'q-time__link--active'
|
|
866
|
+
: 'cursor-pointer'),
|
|
819
867
|
tabindex: tabindex.value,
|
|
820
868
|
onKeyup: onKeyupSecond,
|
|
821
869
|
onClick: setView.second
|
|
@@ -827,117 +875,188 @@ export default createComponent({
|
|
|
827
875
|
}
|
|
828
876
|
|
|
829
877
|
const child = [
|
|
830
|
-
h(
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
878
|
+
h(
|
|
879
|
+
'div',
|
|
880
|
+
{
|
|
881
|
+
class: 'q-time__header-label row items-center no-wrap',
|
|
882
|
+
dir: 'ltr'
|
|
883
|
+
},
|
|
884
|
+
label
|
|
885
|
+
)
|
|
834
886
|
]
|
|
835
887
|
|
|
836
|
-
computedFormat24h.value === false
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
888
|
+
if (computedFormat24h.value === false) {
|
|
889
|
+
child.push(
|
|
890
|
+
h(
|
|
891
|
+
'div',
|
|
892
|
+
{
|
|
893
|
+
class: 'q-time__header-ampm column items-between no-wrap'
|
|
894
|
+
},
|
|
895
|
+
[
|
|
896
|
+
h(
|
|
897
|
+
'div',
|
|
898
|
+
{
|
|
899
|
+
class:
|
|
900
|
+
'q-time__link ' +
|
|
901
|
+
(isAM.value === true
|
|
902
|
+
? 'q-time__link--active'
|
|
903
|
+
: 'cursor-pointer'),
|
|
904
|
+
tabindex: tabindex.value,
|
|
905
|
+
onClick: setAm,
|
|
906
|
+
onKeyup: setAmOnKey
|
|
907
|
+
},
|
|
908
|
+
'AM'
|
|
909
|
+
),
|
|
910
|
+
|
|
911
|
+
h(
|
|
912
|
+
'div',
|
|
913
|
+
{
|
|
914
|
+
class:
|
|
915
|
+
'q-time__link ' +
|
|
916
|
+
(isAM.value !== true
|
|
917
|
+
? 'q-time__link--active'
|
|
918
|
+
: 'cursor-pointer'),
|
|
919
|
+
tabindex: tabindex.value,
|
|
920
|
+
onClick: setPm,
|
|
921
|
+
onKeyup: setPmOnKey
|
|
922
|
+
},
|
|
923
|
+
'PM'
|
|
924
|
+
)
|
|
925
|
+
]
|
|
926
|
+
)
|
|
927
|
+
)
|
|
928
|
+
}
|
|
847
929
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}, 'PM')
|
|
855
|
-
])
|
|
930
|
+
return h(
|
|
931
|
+
'div',
|
|
932
|
+
{
|
|
933
|
+
class: 'q-time__header flex flex-center no-wrap ' + headerClass.value
|
|
934
|
+
},
|
|
935
|
+
child
|
|
856
936
|
)
|
|
937
|
+
}
|
|
857
938
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
939
|
+
function getClock() {
|
|
940
|
+
const current = innerModel.value[view.value]
|
|
941
|
+
|
|
942
|
+
return h(
|
|
943
|
+
'div',
|
|
944
|
+
{
|
|
945
|
+
class: 'q-time__content col relative-position'
|
|
946
|
+
},
|
|
947
|
+
[
|
|
948
|
+
h(
|
|
949
|
+
Transition,
|
|
950
|
+
{
|
|
951
|
+
name: 'q-transition--scale'
|
|
952
|
+
},
|
|
953
|
+
() =>
|
|
954
|
+
h(
|
|
955
|
+
'div',
|
|
956
|
+
{
|
|
957
|
+
key: 'clock' + view.value,
|
|
958
|
+
class: 'q-time__container-parent absolute-full'
|
|
959
|
+
},
|
|
960
|
+
[
|
|
961
|
+
h(
|
|
962
|
+
'div',
|
|
963
|
+
{
|
|
964
|
+
ref: clockRef,
|
|
965
|
+
class: 'q-time__container-child fit overflow-hidden'
|
|
966
|
+
},
|
|
967
|
+
[
|
|
968
|
+
withDirectives(
|
|
969
|
+
h(
|
|
970
|
+
'div',
|
|
971
|
+
{
|
|
972
|
+
class:
|
|
973
|
+
'q-time__clock cursor-pointer non-selectable',
|
|
974
|
+
onClick,
|
|
975
|
+
onMousedown
|
|
976
|
+
},
|
|
977
|
+
[
|
|
978
|
+
h('div', { class: 'q-time__clock-circle fit' }, [
|
|
979
|
+
h('div', {
|
|
980
|
+
class:
|
|
981
|
+
'q-time__clock-pointer' +
|
|
982
|
+
(innerModel.value[view.value] === null
|
|
983
|
+
? ' hidden'
|
|
984
|
+
: props.color !== void 0
|
|
985
|
+
? ` text-${props.color}`
|
|
986
|
+
: ''),
|
|
987
|
+
style: pointerStyle.value
|
|
988
|
+
}),
|
|
989
|
+
|
|
990
|
+
positions.value.map(pos =>
|
|
991
|
+
h(
|
|
992
|
+
'div',
|
|
993
|
+
{
|
|
994
|
+
class:
|
|
995
|
+
`q-time__clock-position row flex-center q-time__clock-pos-${pos.index}` +
|
|
996
|
+
(pos.val === current
|
|
997
|
+
? ' q-time__clock-position--active ' +
|
|
998
|
+
headerClass.value
|
|
999
|
+
: pos.disable === true
|
|
1000
|
+
? ' q-time__clock-position--disable'
|
|
1001
|
+
: '')
|
|
1002
|
+
},
|
|
1003
|
+
[h('span', pos.label)]
|
|
1004
|
+
)
|
|
1005
|
+
)
|
|
1006
|
+
])
|
|
1007
|
+
]
|
|
1008
|
+
),
|
|
1009
|
+
clockDirectives.value
|
|
1010
|
+
)
|
|
1011
|
+
]
|
|
1012
|
+
)
|
|
1013
|
+
]
|
|
1014
|
+
)
|
|
1015
|
+
),
|
|
1016
|
+
|
|
1017
|
+
props.nowBtn === true
|
|
1018
|
+
? h(QBtn, {
|
|
1019
|
+
class: 'q-time__now-button absolute',
|
|
1020
|
+
icon: $q.iconSet.datetime.now,
|
|
1021
|
+
unelevated: true,
|
|
1022
|
+
size: 'sm',
|
|
1023
|
+
round: true,
|
|
1024
|
+
color: props.color,
|
|
1025
|
+
textColor: props.textColor,
|
|
1026
|
+
tabindex: tabindex.value,
|
|
1027
|
+
onClick: setNow
|
|
1028
|
+
})
|
|
1029
|
+
: null
|
|
1030
|
+
]
|
|
1031
|
+
)
|
|
917
1032
|
}
|
|
918
1033
|
|
|
919
1034
|
// expose public method
|
|
920
1035
|
vm.proxy.setNow = setNow
|
|
921
1036
|
|
|
922
1037
|
return () => {
|
|
923
|
-
const child = [
|
|
1038
|
+
const child = [getClock()]
|
|
924
1039
|
|
|
925
1040
|
const def = hSlot(slots.default)
|
|
926
|
-
def !== void 0
|
|
927
|
-
h('div', { class: 'q-time__actions' }, def)
|
|
928
|
-
|
|
1041
|
+
if (def !== void 0) {
|
|
1042
|
+
child.push(h('div', { class: 'q-time__actions' }, def))
|
|
1043
|
+
}
|
|
929
1044
|
|
|
930
1045
|
if (props.name !== void 0 && props.disable !== true) {
|
|
931
1046
|
injectFormInput(child, 'push')
|
|
932
1047
|
}
|
|
933
1048
|
|
|
934
|
-
return h(
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1049
|
+
return h(
|
|
1050
|
+
'div',
|
|
1051
|
+
{
|
|
1052
|
+
class: classes.value,
|
|
1053
|
+
tabindex: -1
|
|
1054
|
+
},
|
|
1055
|
+
[
|
|
1056
|
+
getHeader(),
|
|
1057
|
+
h('div', { class: 'q-time__main col overflow-auto' }, child)
|
|
1058
|
+
]
|
|
1059
|
+
)
|
|
941
1060
|
}
|
|
942
1061
|
}
|
|
943
1062
|
})
|