quasar 2.18.7 → 2.19.1
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 +15 -28
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +14 -28
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +4 -25
- 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 +0 -8
- 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 +3 -16
- 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
|
@@ -12,24 +12,49 @@ import QBtn from '../btn/QBtn.js'
|
|
|
12
12
|
|
|
13
13
|
import getTableMiddle from './get-table-middle.js'
|
|
14
14
|
|
|
15
|
-
import useDark, {
|
|
15
|
+
import useDark, {
|
|
16
|
+
useDarkProps
|
|
17
|
+
} from '../../composables/private.use-dark/use-dark.js'
|
|
16
18
|
import { commonVirtScrollPropsList } from '../virtual-scroll/use-virtual-scroll.js'
|
|
17
|
-
import useFullscreen, {
|
|
19
|
+
import useFullscreen, {
|
|
20
|
+
useFullscreenProps,
|
|
21
|
+
useFullscreenEmits
|
|
22
|
+
} from '../../composables/private.use-fullscreen/use-fullscreen.js'
|
|
18
23
|
|
|
19
24
|
import { useTableSort, useTableSortProps } from './table-sort.js'
|
|
20
25
|
import { useTableFilter, useTableFilterProps } from './table-filter.js'
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
useTablePaginationState,
|
|
28
|
+
useTablePagination,
|
|
29
|
+
useTablePaginationProps
|
|
30
|
+
} from './table-pagination.js'
|
|
31
|
+
import {
|
|
32
|
+
useTableRowSelection,
|
|
33
|
+
useTableRowSelectionProps,
|
|
34
|
+
useTableRowSelectionEmits
|
|
35
|
+
} from './table-row-selection.js'
|
|
36
|
+
import {
|
|
37
|
+
useTableRowExpand,
|
|
38
|
+
useTableRowExpandProps,
|
|
39
|
+
useTableRowExpandEmits
|
|
40
|
+
} from './table-row-expand.js'
|
|
41
|
+
import {
|
|
42
|
+
useTableColumnSelection,
|
|
43
|
+
useTableColumnSelectionProps
|
|
44
|
+
} from './table-column-selection.js'
|
|
45
|
+
|
|
46
|
+
import {
|
|
47
|
+
injectProp,
|
|
48
|
+
injectMultipleProps
|
|
49
|
+
} from '../../utils/private.inject-obj-prop/inject-obj-prop.js'
|
|
27
50
|
import { createComponent } from '../../utils/private.create/create.js'
|
|
28
51
|
|
|
29
52
|
const bottomClass = 'q-table__bottom row items-center'
|
|
30
53
|
|
|
31
54
|
const virtScrollPassthroughProps = {}
|
|
32
|
-
commonVirtScrollPropsList.forEach(p => {
|
|
55
|
+
commonVirtScrollPropsList.forEach(p => {
|
|
56
|
+
virtScrollPassthroughProps[p] = {}
|
|
57
|
+
})
|
|
33
58
|
|
|
34
59
|
export default createComponent({
|
|
35
60
|
name: 'QTable',
|
|
@@ -40,7 +65,7 @@ export default createComponent({
|
|
|
40
65
|
required: true
|
|
41
66
|
},
|
|
42
67
|
rowKey: {
|
|
43
|
-
type: [
|
|
68
|
+
type: [String, Function],
|
|
44
69
|
default: 'id'
|
|
45
70
|
},
|
|
46
71
|
|
|
@@ -66,7 +91,7 @@ export default createComponent({
|
|
|
66
91
|
separator: {
|
|
67
92
|
type: String,
|
|
68
93
|
default: 'horizontal',
|
|
69
|
-
validator: v => [
|
|
94
|
+
validator: v => ['horizontal', 'vertical', 'cell', 'none'].includes(v)
|
|
70
95
|
},
|
|
71
96
|
wrapCells: Boolean,
|
|
72
97
|
|
|
@@ -86,17 +111,17 @@ export default createComponent({
|
|
|
86
111
|
default: 'grey-8'
|
|
87
112
|
},
|
|
88
113
|
|
|
89
|
-
titleClass: [
|
|
90
|
-
tableStyle: [
|
|
91
|
-
tableClass: [
|
|
92
|
-
tableHeaderStyle: [
|
|
93
|
-
tableHeaderClass: [
|
|
114
|
+
titleClass: [String, Array, Object],
|
|
115
|
+
tableStyle: [String, Array, Object],
|
|
116
|
+
tableClass: [String, Array, Object],
|
|
117
|
+
tableHeaderStyle: [String, Array, Object],
|
|
118
|
+
tableHeaderClass: [String, Array, Object],
|
|
94
119
|
tableRowStyleFn: Function,
|
|
95
120
|
tableRowClassFn: Function,
|
|
96
|
-
cardContainerClass: [
|
|
97
|
-
cardContainerStyle: [
|
|
98
|
-
cardStyle: [
|
|
99
|
-
cardClass: [
|
|
121
|
+
cardContainerClass: [String, Array, Object],
|
|
122
|
+
cardContainerStyle: [String, Array, Object],
|
|
123
|
+
cardStyle: [String, Array, Object],
|
|
124
|
+
cardClass: [String, Array, Object],
|
|
100
125
|
cardStyleFn: Function,
|
|
101
126
|
cardClassFn: Function,
|
|
102
127
|
|
|
@@ -121,53 +146,69 @@ export default createComponent({
|
|
|
121
146
|
},
|
|
122
147
|
|
|
123
148
|
emits: [
|
|
124
|
-
'request',
|
|
149
|
+
'request',
|
|
150
|
+
'virtualScroll',
|
|
125
151
|
...useFullscreenEmits,
|
|
126
152
|
...useTableRowExpandEmits,
|
|
127
153
|
...useTableRowSelectionEmits
|
|
128
154
|
],
|
|
129
155
|
|
|
130
|
-
setup
|
|
156
|
+
setup(props, { slots, emit }) {
|
|
131
157
|
const vm = getCurrentInstance()
|
|
132
|
-
const {
|
|
158
|
+
const {
|
|
159
|
+
proxy: { $q }
|
|
160
|
+
} = vm
|
|
133
161
|
|
|
134
162
|
const isDark = useDark(props, $q)
|
|
135
163
|
const { inFullscreen, toggleFullscreen } = useFullscreen()
|
|
136
164
|
|
|
137
|
-
const getRowKey = computed(() =>
|
|
165
|
+
const getRowKey = computed(() =>
|
|
138
166
|
typeof props.rowKey === 'function'
|
|
139
167
|
? props.rowKey
|
|
140
|
-
: row => row[
|
|
141
|
-
)
|
|
168
|
+
: row => row[props.rowKey]
|
|
169
|
+
)
|
|
142
170
|
|
|
143
171
|
const rootRef = ref(null)
|
|
144
172
|
const virtScrollRef = ref(null)
|
|
145
|
-
const hasVirtScroll = computed(
|
|
146
|
-
|
|
147
|
-
const cardDefaultClass = computed(() =>
|
|
148
|
-
' q-table__card'
|
|
149
|
-
+ (isDark.value === true ? ' q-table__card--dark q-dark' : '')
|
|
150
|
-
+ (props.square === true ? ' q-table--square' : '')
|
|
151
|
-
+ (props.flat === true ? ' q-table--flat' : '')
|
|
152
|
-
+ (props.bordered === true ? ' q-table--bordered' : '')
|
|
173
|
+
const hasVirtScroll = computed(
|
|
174
|
+
() => props.grid !== true && props.virtualScroll === true
|
|
153
175
|
)
|
|
154
176
|
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
177
|
+
const cardDefaultClass = computed(
|
|
178
|
+
() =>
|
|
179
|
+
' q-table__card' +
|
|
180
|
+
(isDark.value === true ? ' q-table__card--dark q-dark' : '') +
|
|
181
|
+
(props.square === true ? ' q-table--square' : '') +
|
|
182
|
+
(props.flat === true ? ' q-table--flat' : '') +
|
|
183
|
+
(props.bordered === true ? ' q-table--bordered' : '')
|
|
162
184
|
)
|
|
163
185
|
|
|
164
|
-
const
|
|
165
|
-
|
|
186
|
+
const containerClass = computed(
|
|
187
|
+
() =>
|
|
188
|
+
`q-table__container q-table--${props.separator}-separator column no-wrap` +
|
|
189
|
+
(props.grid === true ? ' q-table--grid' : cardDefaultClass.value) +
|
|
190
|
+
(isDark.value === true ? ' q-table--dark' : '') +
|
|
191
|
+
(props.dense === true ? ' q-table--dense' : '') +
|
|
192
|
+
(props.wrapCells === false ? ' q-table--no-wrap' : '') +
|
|
193
|
+
(inFullscreen.value === true ? ' fullscreen scroll' : '')
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
const rootContainerClass = computed(
|
|
197
|
+
() =>
|
|
198
|
+
containerClass.value +
|
|
199
|
+
(props.loading === true ? ' q-table--loading' : '')
|
|
166
200
|
)
|
|
167
201
|
|
|
168
202
|
watch(
|
|
169
|
-
() =>
|
|
170
|
-
|
|
203
|
+
() =>
|
|
204
|
+
props.tableStyle +
|
|
205
|
+
props.tableClass +
|
|
206
|
+
props.tableHeaderStyle +
|
|
207
|
+
props.tableHeaderClass +
|
|
208
|
+
containerClass.value,
|
|
209
|
+
() => {
|
|
210
|
+
if (hasVirtScroll.value === true) virtScrollRef.value?.reset()
|
|
211
|
+
}
|
|
171
212
|
)
|
|
172
213
|
|
|
173
214
|
const {
|
|
@@ -180,7 +221,10 @@ export default createComponent({
|
|
|
180
221
|
} = useTablePaginationState(vm, getCellValue)
|
|
181
222
|
|
|
182
223
|
const { computedFilterMethod } = useTableFilter(props, setPagination)
|
|
183
|
-
const { isRowExpanded, setExpanded, updateExpanded } = useTableRowExpand(
|
|
224
|
+
const { isRowExpanded, setExpanded, updateExpanded } = useTableRowExpand(
|
|
225
|
+
props,
|
|
226
|
+
emit
|
|
227
|
+
)
|
|
184
228
|
|
|
185
229
|
const filteredSortedRows = computed(() => {
|
|
186
230
|
let rows = props.rows
|
|
@@ -192,7 +236,12 @@ export default createComponent({
|
|
|
192
236
|
const { sortBy, descending } = computedPagination.value
|
|
193
237
|
|
|
194
238
|
if (props.filter) {
|
|
195
|
-
rows = computedFilterMethod.value(
|
|
239
|
+
rows = computedFilterMethod.value(
|
|
240
|
+
rows,
|
|
241
|
+
props.filter,
|
|
242
|
+
computedCols.value,
|
|
243
|
+
getCellValue
|
|
244
|
+
)
|
|
196
245
|
}
|
|
197
246
|
|
|
198
247
|
if (columnToSort.value !== null) {
|
|
@@ -206,7 +255,9 @@ export default createComponent({
|
|
|
206
255
|
return rows
|
|
207
256
|
})
|
|
208
257
|
|
|
209
|
-
const filteredSortedRowsNumber = computed(
|
|
258
|
+
const filteredSortedRowsNumber = computed(
|
|
259
|
+
() => filteredSortedRows.value.length
|
|
260
|
+
)
|
|
210
261
|
|
|
211
262
|
const computedRows = computed(() => {
|
|
212
263
|
let rows = filteredSortedRows.value
|
|
@@ -222,8 +273,7 @@ export default createComponent({
|
|
|
222
273
|
if (rows.length > lastRowIndex.value) {
|
|
223
274
|
rows = rows.slice(0, lastRowIndex.value)
|
|
224
275
|
}
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
276
|
+
} else {
|
|
227
277
|
rows = rows.slice(firstRowIndex.value, lastRowIndex.value)
|
|
228
278
|
}
|
|
229
279
|
}
|
|
@@ -244,9 +294,15 @@ export default createComponent({
|
|
|
244
294
|
updateSelection
|
|
245
295
|
} = useTableRowSelection(props, emit, computedRows, getRowKey)
|
|
246
296
|
|
|
247
|
-
const { colList, computedCols, computedColsMap, computedColspan } =
|
|
297
|
+
const { colList, computedCols, computedColsMap, computedColspan } =
|
|
298
|
+
useTableColumnSelection(props, computedPagination, hasSelectionMode)
|
|
248
299
|
|
|
249
|
-
const { columnToSort, computedSortMethod, sort } = useTableSort(
|
|
300
|
+
const { columnToSort, computedSortMethod, sort } = useTableSort(
|
|
301
|
+
props,
|
|
302
|
+
computedPagination,
|
|
303
|
+
colList,
|
|
304
|
+
setPagination
|
|
305
|
+
)
|
|
250
306
|
|
|
251
307
|
const {
|
|
252
308
|
firstRowIndex,
|
|
@@ -261,15 +317,23 @@ export default createComponent({
|
|
|
261
317
|
prevPage,
|
|
262
318
|
nextPage,
|
|
263
319
|
lastPage
|
|
264
|
-
} = useTablePagination(
|
|
320
|
+
} = useTablePagination(
|
|
321
|
+
vm,
|
|
322
|
+
innerPagination,
|
|
323
|
+
computedPagination,
|
|
324
|
+
isServerSide,
|
|
325
|
+
setPagination,
|
|
326
|
+
filteredSortedRowsNumber
|
|
327
|
+
)
|
|
265
328
|
|
|
266
329
|
const nothingToDisplay = computed(() => computedRows.value.length === 0)
|
|
267
330
|
|
|
268
331
|
const virtProps = computed(() => {
|
|
269
332
|
const acc = {}
|
|
270
333
|
|
|
271
|
-
commonVirtScrollPropsList
|
|
272
|
-
|
|
334
|
+
commonVirtScrollPropsList.forEach(p => {
|
|
335
|
+
acc[p] = props[p]
|
|
336
|
+
})
|
|
273
337
|
|
|
274
338
|
if (acc.virtualScrollItemSize === void 0) {
|
|
275
339
|
acc.virtualScrollItemSize = props.dense === true ? 28 : 48
|
|
@@ -278,11 +342,11 @@ export default createComponent({
|
|
|
278
342
|
return acc
|
|
279
343
|
})
|
|
280
344
|
|
|
281
|
-
function resetVirtualScroll
|
|
282
|
-
hasVirtScroll.value === true
|
|
345
|
+
function resetVirtualScroll() {
|
|
346
|
+
if (hasVirtScroll.value === true) virtScrollRef.value.reset()
|
|
283
347
|
}
|
|
284
348
|
|
|
285
|
-
function getBody
|
|
349
|
+
function getBody() {
|
|
286
350
|
if (props.grid === true) {
|
|
287
351
|
return getGridBody()
|
|
288
352
|
}
|
|
@@ -290,68 +354,80 @@ export default createComponent({
|
|
|
290
354
|
const header = props.hideHeader !== true ? getTHead : null
|
|
291
355
|
|
|
292
356
|
if (hasVirtScroll.value === true) {
|
|
293
|
-
const topRow = slots[
|
|
294
|
-
const bottomRow = slots[
|
|
357
|
+
const topRow = slots['top-row']
|
|
358
|
+
const bottomRow = slots['bottom-row']
|
|
295
359
|
|
|
296
360
|
const virtSlots = {
|
|
297
|
-
default:
|
|
361
|
+
default: slotProps =>
|
|
362
|
+
getTBodyTR(slotProps.item, slots.body, slotProps.index)
|
|
298
363
|
}
|
|
299
364
|
|
|
300
365
|
if (topRow !== void 0) {
|
|
301
366
|
const topContent = h('tbody', topRow({ cols: computedCols.value }))
|
|
302
367
|
|
|
303
|
-
virtSlots.before =
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
else if (header !== null) {
|
|
368
|
+
virtSlots.before =
|
|
369
|
+
header === null
|
|
370
|
+
? () => topContent
|
|
371
|
+
: () => [header()].concat(topContent)
|
|
372
|
+
} else if (header !== null) {
|
|
308
373
|
virtSlots.before = header
|
|
309
374
|
}
|
|
310
375
|
|
|
311
376
|
if (bottomRow !== void 0) {
|
|
312
|
-
virtSlots.after = () =>
|
|
377
|
+
virtSlots.after = () =>
|
|
378
|
+
h('tbody', bottomRow({ cols: computedCols.value }))
|
|
313
379
|
}
|
|
314
380
|
|
|
315
|
-
return h(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
381
|
+
return h(
|
|
382
|
+
QVirtualScroll,
|
|
383
|
+
{
|
|
384
|
+
ref: virtScrollRef,
|
|
385
|
+
class: props.tableClass,
|
|
386
|
+
style: props.tableStyle,
|
|
387
|
+
...virtProps.value,
|
|
388
|
+
scrollTarget: props.virtualScrollTarget,
|
|
389
|
+
items: computedRows.value,
|
|
390
|
+
type: '__qtable',
|
|
391
|
+
tableColspan: computedColspan.value,
|
|
392
|
+
onVirtualScroll: onVScroll
|
|
393
|
+
},
|
|
394
|
+
virtSlots
|
|
395
|
+
)
|
|
326
396
|
}
|
|
327
397
|
|
|
328
|
-
const child = [
|
|
329
|
-
getTBody()
|
|
330
|
-
]
|
|
398
|
+
const child = [getTBody()]
|
|
331
399
|
|
|
332
400
|
if (header !== null) {
|
|
333
401
|
child.unshift(header())
|
|
334
402
|
}
|
|
335
403
|
|
|
336
|
-
return getTableMiddle(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
404
|
+
return getTableMiddle(
|
|
405
|
+
{
|
|
406
|
+
class: ['q-table__middle scroll', props.tableClass],
|
|
407
|
+
style: props.tableStyle
|
|
408
|
+
},
|
|
409
|
+
child
|
|
410
|
+
)
|
|
340
411
|
}
|
|
341
412
|
|
|
342
|
-
function scrollTo
|
|
413
|
+
function scrollTo(toIndex, edge) {
|
|
343
414
|
if (virtScrollRef.value !== null) {
|
|
344
415
|
virtScrollRef.value.scrollTo(toIndex, edge)
|
|
345
416
|
return
|
|
346
417
|
}
|
|
347
418
|
|
|
348
419
|
toIndex = parseInt(toIndex, 10)
|
|
349
|
-
const rowEl = rootRef.value.querySelector(
|
|
420
|
+
const rowEl = rootRef.value.querySelector(
|
|
421
|
+
`tbody tr:nth-of-type(${toIndex + 1})`
|
|
422
|
+
)
|
|
350
423
|
|
|
351
424
|
if (rowEl !== null) {
|
|
352
|
-
const scrollTarget = rootRef.value.querySelector(
|
|
425
|
+
const scrollTarget = rootRef.value.querySelector(
|
|
426
|
+
'.q-table__middle.scroll'
|
|
427
|
+
)
|
|
353
428
|
const offsetTop = rowEl.offsetTop - props.virtualScrollStickySizeStart
|
|
354
|
-
const direction =
|
|
429
|
+
const direction =
|
|
430
|
+
offsetTop < scrollTarget.scrollTop ? 'decrease' : 'increase'
|
|
355
431
|
|
|
356
432
|
scrollTarget.scrollTop = offsetTop
|
|
357
433
|
|
|
@@ -364,11 +440,11 @@ export default createComponent({
|
|
|
364
440
|
}
|
|
365
441
|
}
|
|
366
442
|
|
|
367
|
-
function onVScroll
|
|
443
|
+
function onVScroll(info) {
|
|
368
444
|
emit('virtualScroll', info)
|
|
369
445
|
}
|
|
370
446
|
|
|
371
|
-
function getProgress
|
|
447
|
+
function getProgress() {
|
|
372
448
|
return [
|
|
373
449
|
h(QLinearProgress, {
|
|
374
450
|
class: 'q-table__linear-progress',
|
|
@@ -380,9 +456,8 @@ export default createComponent({
|
|
|
380
456
|
]
|
|
381
457
|
}
|
|
382
458
|
|
|
383
|
-
function getTBodyTR
|
|
384
|
-
const
|
|
385
|
-
key = getRowKey.value(row),
|
|
459
|
+
function getTBodyTR(row, bodySlot, pageIndex) {
|
|
460
|
+
const key = getRowKey.value(row),
|
|
386
461
|
selected = isRowSelected(key)
|
|
387
462
|
|
|
388
463
|
if (bodySlot !== void 0) {
|
|
@@ -400,69 +475,68 @@ export default createComponent({
|
|
|
400
475
|
if (props.tableRowClassFn !== void 0) {
|
|
401
476
|
const cls = props.tableRowClassFn(row)
|
|
402
477
|
if (cls) {
|
|
403
|
-
cfg.__trClass = `${
|
|
478
|
+
cfg.__trClass = `${cls} ${cfg.__trClass}`
|
|
404
479
|
}
|
|
405
480
|
}
|
|
406
481
|
|
|
407
|
-
return bodySlot(
|
|
408
|
-
getBodyScope(cfg)
|
|
409
|
-
)
|
|
482
|
+
return bodySlot(getBodyScope(cfg))
|
|
410
483
|
}
|
|
411
484
|
|
|
412
|
-
const
|
|
413
|
-
bodyCell = slots[ 'body-cell' ],
|
|
485
|
+
const bodyCell = slots['body-cell'],
|
|
414
486
|
child = computedCols.value.map(col => {
|
|
415
|
-
const
|
|
416
|
-
bodyCellCol = slots[ `body-cell-${ col.name }` ],
|
|
487
|
+
const bodyCellCol = slots[`body-cell-${col.name}`],
|
|
417
488
|
slot = bodyCellCol !== void 0 ? bodyCellCol : bodyCell
|
|
418
489
|
|
|
419
490
|
return slot !== void 0
|
|
420
491
|
? slot(getBodyCellScope({ key, row, pageIndex, col }))
|
|
421
|
-
: h(
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
492
|
+
: h(
|
|
493
|
+
'td',
|
|
494
|
+
{
|
|
495
|
+
class: col.__tdClass(row),
|
|
496
|
+
style: col.__tdStyle(row)
|
|
497
|
+
},
|
|
498
|
+
getCellValue(col, row)
|
|
499
|
+
)
|
|
425
500
|
})
|
|
426
501
|
|
|
427
502
|
if (hasSelectionMode.value === true) {
|
|
428
|
-
const slot = slots[
|
|
429
|
-
const content =
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
)
|
|
503
|
+
const slot = slots['body-selection']
|
|
504
|
+
const content =
|
|
505
|
+
slot !== void 0
|
|
506
|
+
? slot(getBodySelectionScope({ key, row, pageIndex }))
|
|
507
|
+
: [
|
|
508
|
+
h(QCheckbox, {
|
|
509
|
+
modelValue: selected,
|
|
510
|
+
color: props.color,
|
|
511
|
+
dark: isDark.value,
|
|
512
|
+
dense: props.dense,
|
|
513
|
+
'onUpdate:modelValue': (adding, evt) => {
|
|
514
|
+
updateSelection([key], [row], adding, evt)
|
|
515
|
+
}
|
|
516
|
+
})
|
|
517
|
+
]
|
|
518
|
+
|
|
519
|
+
child.unshift(h('td', { class: 'q-table--col-auto-width' }, content))
|
|
446
520
|
}
|
|
447
521
|
|
|
448
522
|
const data = { key, class: { selected } }
|
|
449
523
|
|
|
450
524
|
if (props.onRowClick !== void 0) {
|
|
451
|
-
data.class[
|
|
525
|
+
data.class['cursor-pointer'] = true
|
|
452
526
|
data.onClick = evt => {
|
|
453
527
|
emit('rowClick', evt, row, pageIndex)
|
|
454
528
|
}
|
|
455
529
|
}
|
|
456
530
|
|
|
457
531
|
if (props.onRowDblclick !== void 0) {
|
|
458
|
-
data.class[
|
|
532
|
+
data.class['cursor-pointer'] = true
|
|
459
533
|
data.onDblclick = evt => {
|
|
460
534
|
emit('rowDblclick', evt, row, pageIndex)
|
|
461
535
|
}
|
|
462
536
|
}
|
|
463
537
|
|
|
464
538
|
if (props.onRowContextmenu !== void 0) {
|
|
465
|
-
data.class[
|
|
539
|
+
data.class['cursor-pointer'] = true
|
|
466
540
|
data.onContextmenu = evt => {
|
|
467
541
|
emit('rowContextmenu', evt, row, pageIndex)
|
|
468
542
|
}
|
|
@@ -475,21 +549,20 @@ export default createComponent({
|
|
|
475
549
|
if (props.tableRowClassFn !== void 0) {
|
|
476
550
|
const cls = props.tableRowClassFn(row)
|
|
477
551
|
if (cls) {
|
|
478
|
-
data.class[
|
|
552
|
+
data.class[cls] = true
|
|
479
553
|
}
|
|
480
554
|
}
|
|
481
555
|
|
|
482
556
|
return h('tr', data, child)
|
|
483
557
|
}
|
|
484
558
|
|
|
485
|
-
function getTBody
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
bottomRow = slots[ 'bottom-row' ]
|
|
559
|
+
function getTBody() {
|
|
560
|
+
const body = slots.body,
|
|
561
|
+
topRow = slots['top-row'],
|
|
562
|
+
bottomRow = slots['bottom-row']
|
|
490
563
|
|
|
491
|
-
let child = computedRows.value.map(
|
|
492
|
-
|
|
564
|
+
let child = computedRows.value.map((row, pageIndex) =>
|
|
565
|
+
getTBodyTR(row, body, pageIndex)
|
|
493
566
|
)
|
|
494
567
|
|
|
495
568
|
if (topRow !== void 0) {
|
|
@@ -502,28 +575,28 @@ export default createComponent({
|
|
|
502
575
|
return h('tbody', child)
|
|
503
576
|
}
|
|
504
577
|
|
|
505
|
-
function getBodyScope
|
|
578
|
+
function getBodyScope(data) {
|
|
506
579
|
injectBodyCommonScope(data)
|
|
507
580
|
|
|
508
|
-
data.cols = data.cols.map(
|
|
509
|
-
|
|
581
|
+
data.cols = data.cols.map(col =>
|
|
582
|
+
injectProp({ ...col }, 'value', () => getCellValue(col, data.row))
|
|
510
583
|
)
|
|
511
584
|
|
|
512
585
|
return data
|
|
513
586
|
}
|
|
514
587
|
|
|
515
|
-
function getBodyCellScope
|
|
588
|
+
function getBodyCellScope(data) {
|
|
516
589
|
injectBodyCommonScope(data)
|
|
517
590
|
injectProp(data, 'value', () => getCellValue(data.col, data.row))
|
|
518
591
|
return data
|
|
519
592
|
}
|
|
520
593
|
|
|
521
|
-
function getBodySelectionScope
|
|
594
|
+
function getBodySelectionScope(data) {
|
|
522
595
|
injectBodyCommonScope(data)
|
|
523
596
|
return data
|
|
524
597
|
}
|
|
525
598
|
|
|
526
|
-
function injectBodyCommonScope
|
|
599
|
+
function injectBodyCommonScope(data) {
|
|
527
600
|
Object.assign(data, {
|
|
528
601
|
cols: computedCols.value,
|
|
529
602
|
colsMap: computedColsMap.value,
|
|
@@ -534,25 +607,30 @@ export default createComponent({
|
|
|
534
607
|
dense: props.dense
|
|
535
608
|
})
|
|
536
609
|
|
|
537
|
-
hasSelectionMode.value === true
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
610
|
+
if (hasSelectionMode.value === true) {
|
|
611
|
+
injectProp(
|
|
612
|
+
data,
|
|
613
|
+
'selected',
|
|
614
|
+
() => isRowSelected(data.key),
|
|
615
|
+
(adding, evt) => {
|
|
616
|
+
updateSelection([data.key], [data.row], adding, evt)
|
|
617
|
+
}
|
|
618
|
+
)
|
|
619
|
+
}
|
|
545
620
|
|
|
546
621
|
injectProp(
|
|
547
622
|
data,
|
|
548
623
|
'expand',
|
|
549
624
|
() => isRowExpanded(data.key),
|
|
550
|
-
adding => {
|
|
625
|
+
adding => {
|
|
626
|
+
updateExpanded(data.key, adding)
|
|
627
|
+
}
|
|
551
628
|
)
|
|
552
629
|
}
|
|
553
630
|
|
|
554
|
-
function getCellValue
|
|
555
|
-
const val =
|
|
631
|
+
function getCellValue(col, row) {
|
|
632
|
+
const val =
|
|
633
|
+
typeof col.field === 'function' ? col.field(row) : row[col.field]
|
|
556
634
|
return col.format !== void 0 ? col.format(val, row) : val
|
|
557
635
|
}
|
|
558
636
|
|
|
@@ -570,27 +648,26 @@ export default createComponent({
|
|
|
570
648
|
toggleFullscreen
|
|
571
649
|
}))
|
|
572
650
|
|
|
573
|
-
function getTopDiv
|
|
574
|
-
const
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
651
|
+
function getTopDiv() {
|
|
652
|
+
const top = slots.top,
|
|
653
|
+
topLeft = slots['top-left'],
|
|
654
|
+
topRight = slots['top-right'],
|
|
655
|
+
topSelection = slots['top-selection'],
|
|
656
|
+
hasSelection =
|
|
657
|
+
hasSelectionMode.value === true &&
|
|
658
|
+
topSelection !== void 0 &&
|
|
659
|
+
rowsSelectedNumber.value > 0,
|
|
582
660
|
topClass = 'q-table__top relative-position row items-center'
|
|
583
661
|
|
|
584
662
|
if (top !== void 0) {
|
|
585
|
-
return h('div', { class: topClass }, [
|
|
663
|
+
return h('div', { class: topClass }, [top(marginalsScope.value)])
|
|
586
664
|
}
|
|
587
665
|
|
|
588
666
|
let child
|
|
589
667
|
|
|
590
668
|
if (hasSelection === true) {
|
|
591
669
|
child = topSelection(marginalsScope.value).slice()
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
670
|
+
} else {
|
|
594
671
|
child = []
|
|
595
672
|
|
|
596
673
|
if (topLeft !== void 0) {
|
|
@@ -599,22 +676,23 @@ export default createComponent({
|
|
|
599
676
|
topLeft(marginalsScope.value)
|
|
600
677
|
])
|
|
601
678
|
)
|
|
602
|
-
}
|
|
603
|
-
else if (props.title) {
|
|
679
|
+
} else if (props.title) {
|
|
604
680
|
child.push(
|
|
605
681
|
h('div', { class: 'q-table__control' }, [
|
|
606
|
-
h(
|
|
607
|
-
|
|
608
|
-
|
|
682
|
+
h(
|
|
683
|
+
'div',
|
|
684
|
+
{
|
|
685
|
+
class: ['q-table__title', props.titleClass]
|
|
686
|
+
},
|
|
687
|
+
props.title
|
|
688
|
+
)
|
|
609
689
|
])
|
|
610
690
|
)
|
|
611
691
|
}
|
|
612
692
|
}
|
|
613
693
|
|
|
614
694
|
if (topRight !== void 0) {
|
|
615
|
-
child.push(
|
|
616
|
-
h('div', { class: 'q-table__separator col' })
|
|
617
|
-
)
|
|
695
|
+
child.push(h('div', { class: 'q-table__separator col' }))
|
|
618
696
|
child.push(
|
|
619
697
|
h('div', { class: 'q-table__control' }, [
|
|
620
698
|
topRight(marginalsScope.value)
|
|
@@ -626,22 +704,24 @@ export default createComponent({
|
|
|
626
704
|
return h('div', { class: topClass }, child)
|
|
627
705
|
}
|
|
628
706
|
|
|
629
|
-
const headerSelectedValue = computed(() =>
|
|
630
|
-
someRowsSelected.value === true
|
|
631
|
-
|
|
632
|
-
: allRowsSelected.value
|
|
633
|
-
))
|
|
707
|
+
const headerSelectedValue = computed(() =>
|
|
708
|
+
someRowsSelected.value === true ? null : allRowsSelected.value
|
|
709
|
+
)
|
|
634
710
|
|
|
635
|
-
function getTHead
|
|
711
|
+
function getTHead() {
|
|
636
712
|
const child = getTHeadTR()
|
|
637
713
|
|
|
638
714
|
if (props.loading === true && slots.loading === void 0) {
|
|
639
715
|
child.push(
|
|
640
716
|
h('tr', { class: 'q-table__progress' }, [
|
|
641
|
-
h(
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
717
|
+
h(
|
|
718
|
+
'th',
|
|
719
|
+
{
|
|
720
|
+
class: 'relative-position',
|
|
721
|
+
colspan: computedColspan.value
|
|
722
|
+
},
|
|
723
|
+
getProgress()
|
|
724
|
+
)
|
|
645
725
|
])
|
|
646
726
|
)
|
|
647
727
|
}
|
|
@@ -649,64 +729,64 @@ export default createComponent({
|
|
|
649
729
|
return h('thead', child)
|
|
650
730
|
}
|
|
651
731
|
|
|
652
|
-
function getTHeadTR
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
headerCell = slots[ 'header-cell' ]
|
|
732
|
+
function getTHeadTR() {
|
|
733
|
+
const header = slots.header,
|
|
734
|
+
headerCell = slots['header-cell']
|
|
656
735
|
|
|
657
736
|
if (header !== void 0) {
|
|
658
|
-
return header(
|
|
659
|
-
getHeaderScope({ header: true })
|
|
660
|
-
).slice()
|
|
737
|
+
return header(getHeaderScope({ header: true })).slice()
|
|
661
738
|
}
|
|
662
739
|
|
|
663
740
|
const child = computedCols.value.map(col => {
|
|
664
|
-
const
|
|
665
|
-
headerCellCol = slots[ `header-cell-${ col.name }` ],
|
|
741
|
+
const headerCellCol = slots[`header-cell-${col.name}`],
|
|
666
742
|
slot = headerCellCol !== void 0 ? headerCellCol : headerCell,
|
|
667
|
-
|
|
743
|
+
slotProps = getHeaderScope({ col })
|
|
668
744
|
|
|
669
745
|
return slot !== void 0
|
|
670
|
-
? slot(
|
|
671
|
-
: h(
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
746
|
+
? slot(slotProps)
|
|
747
|
+
: h(
|
|
748
|
+
QTh,
|
|
749
|
+
{
|
|
750
|
+
key: col.name,
|
|
751
|
+
props: slotProps
|
|
752
|
+
},
|
|
753
|
+
() => col.label
|
|
754
|
+
)
|
|
675
755
|
})
|
|
676
756
|
|
|
677
757
|
if (singleSelection.value === true && props.grid !== true) {
|
|
678
|
-
child.unshift(
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
child.unshift(
|
|
697
|
-
h('th', { class: 'q-table--col-auto-width' }, content)
|
|
698
|
-
)
|
|
758
|
+
child.unshift(h('th', { class: 'q-table--col-auto-width' }, ' '))
|
|
759
|
+
} else if (multipleSelection.value === true) {
|
|
760
|
+
const slot = slots['header-selection']
|
|
761
|
+
const content =
|
|
762
|
+
slot !== void 0
|
|
763
|
+
? slot(getHeaderScope({}))
|
|
764
|
+
: [
|
|
765
|
+
h(QCheckbox, {
|
|
766
|
+
color: props.color,
|
|
767
|
+
modelValue: headerSelectedValue.value,
|
|
768
|
+
dark: isDark.value,
|
|
769
|
+
dense: props.dense,
|
|
770
|
+
'onUpdate:modelValue': onMultipleSelectionSet
|
|
771
|
+
})
|
|
772
|
+
]
|
|
773
|
+
|
|
774
|
+
child.unshift(h('th', { class: 'q-table--col-auto-width' }, content))
|
|
699
775
|
}
|
|
700
776
|
|
|
701
777
|
return [
|
|
702
|
-
h(
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
778
|
+
h(
|
|
779
|
+
'tr',
|
|
780
|
+
{
|
|
781
|
+
class: props.tableHeaderClass,
|
|
782
|
+
style: props.tableHeaderStyle
|
|
783
|
+
},
|
|
784
|
+
child
|
|
785
|
+
)
|
|
706
786
|
]
|
|
707
787
|
}
|
|
708
788
|
|
|
709
|
-
function getHeaderScope
|
|
789
|
+
function getHeaderScope(data) {
|
|
710
790
|
Object.assign(data, {
|
|
711
791
|
cols: computedCols.value,
|
|
712
792
|
sort,
|
|
@@ -728,7 +808,7 @@ export default createComponent({
|
|
|
728
808
|
return data
|
|
729
809
|
}
|
|
730
810
|
|
|
731
|
-
function onMultipleSelectionSet
|
|
811
|
+
function onMultipleSelectionSet(val) {
|
|
732
812
|
if (someRowsSelected.value === true) {
|
|
733
813
|
val = false
|
|
734
814
|
}
|
|
@@ -750,50 +830,73 @@ export default createComponent({
|
|
|
750
830
|
return $q.lang.rtl === true ? ico.reverse() : ico
|
|
751
831
|
})
|
|
752
832
|
|
|
753
|
-
function getBottomDiv
|
|
833
|
+
function getBottomDiv() {
|
|
754
834
|
if (props.hideBottom === true) return
|
|
755
835
|
|
|
756
836
|
if (nothingToDisplay.value === true) {
|
|
757
837
|
if (props.hideNoData === true) return
|
|
758
838
|
|
|
759
|
-
const message =
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
839
|
+
const message =
|
|
840
|
+
props.loading === true
|
|
841
|
+
? props.loadingLabel || $q.lang.table.loading
|
|
842
|
+
: props.filter
|
|
843
|
+
? props.noResultsLabel || $q.lang.table.noResults
|
|
844
|
+
: props.noDataLabel || $q.lang.table.noData
|
|
845
|
+
|
|
846
|
+
const noData = slots['no-data']
|
|
847
|
+
const children =
|
|
848
|
+
noData !== void 0
|
|
849
|
+
? [
|
|
850
|
+
noData({
|
|
851
|
+
message,
|
|
852
|
+
icon: $q.iconSet.table.warning,
|
|
853
|
+
filter: props.filter
|
|
854
|
+
})
|
|
855
|
+
]
|
|
856
|
+
: [
|
|
857
|
+
h(QIcon, {
|
|
858
|
+
class: 'q-table__bottom-nodata-icon',
|
|
859
|
+
name: $q.iconSet.table.warning
|
|
860
|
+
}),
|
|
861
|
+
message
|
|
862
|
+
]
|
|
863
|
+
|
|
864
|
+
return h(
|
|
865
|
+
'div',
|
|
866
|
+
{ class: bottomClass + ' q-table__bottom--nodata' },
|
|
867
|
+
children
|
|
868
|
+
)
|
|
775
869
|
}
|
|
776
870
|
|
|
777
871
|
const bottom = slots.bottom
|
|
778
872
|
|
|
779
873
|
if (bottom !== void 0) {
|
|
780
|
-
return h('div', { class: bottomClass }, [
|
|
874
|
+
return h('div', { class: bottomClass }, [bottom(marginalsScope.value)])
|
|
781
875
|
}
|
|
782
876
|
|
|
783
|
-
const child =
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
877
|
+
const child =
|
|
878
|
+
props.hideSelectedBanner !== true &&
|
|
879
|
+
hasSelectionMode.value === true &&
|
|
880
|
+
rowsSelectedNumber.value > 0
|
|
881
|
+
? [
|
|
882
|
+
h('div', { class: 'q-table__control' }, [
|
|
883
|
+
h('div', [
|
|
884
|
+
(props.selectedRowsLabel || $q.lang.table.selectedRecords)(
|
|
885
|
+
rowsSelectedNumber.value
|
|
886
|
+
)
|
|
887
|
+
])
|
|
788
888
|
])
|
|
789
|
-
]
|
|
790
|
-
]
|
|
791
|
-
: []
|
|
889
|
+
]
|
|
890
|
+
: []
|
|
792
891
|
|
|
793
892
|
if (props.hidePagination !== true) {
|
|
794
|
-
return h(
|
|
795
|
-
|
|
796
|
-
|
|
893
|
+
return h(
|
|
894
|
+
'div',
|
|
895
|
+
{
|
|
896
|
+
class: bottomClass + ' justify-end'
|
|
897
|
+
},
|
|
898
|
+
getPaginationDiv(child)
|
|
899
|
+
)
|
|
797
900
|
}
|
|
798
901
|
|
|
799
902
|
if (child.length !== 0) {
|
|
@@ -801,58 +904,67 @@ export default createComponent({
|
|
|
801
904
|
}
|
|
802
905
|
}
|
|
803
906
|
|
|
804
|
-
function onPagSelection
|
|
907
|
+
function onPagSelection(pag) {
|
|
805
908
|
setPagination({
|
|
806
909
|
page: 1,
|
|
807
910
|
rowsPerPage: pag.value
|
|
808
911
|
})
|
|
809
912
|
}
|
|
810
913
|
|
|
811
|
-
function getPaginationDiv
|
|
914
|
+
function getPaginationDiv(child) {
|
|
812
915
|
let control
|
|
813
|
-
const
|
|
814
|
-
{ rowsPerPage } = computedPagination.value,
|
|
916
|
+
const { rowsPerPage } = computedPagination.value,
|
|
815
917
|
paginationLabel = props.paginationLabel || $q.lang.table.pagination,
|
|
816
918
|
paginationSlot = slots.pagination,
|
|
817
919
|
hasOpts = props.rowsPerPageOptions.length > 1
|
|
818
920
|
|
|
819
|
-
child.push(
|
|
820
|
-
h('div', { class: 'q-table__separator col' })
|
|
821
|
-
)
|
|
921
|
+
child.push(h('div', { class: 'q-table__separator col' }))
|
|
822
922
|
|
|
823
|
-
hasOpts === true
|
|
824
|
-
|
|
825
|
-
h('
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
923
|
+
if (hasOpts === true) {
|
|
924
|
+
child.push(
|
|
925
|
+
h('div', { class: 'q-table__control' }, [
|
|
926
|
+
h('span', { class: 'q-table__bottom-item' }, [
|
|
927
|
+
props.rowsPerPageLabel || $q.lang.table.recordsPerPage
|
|
928
|
+
]),
|
|
929
|
+
h(QSelect, {
|
|
930
|
+
class: 'q-table__select inline q-table__bottom-item',
|
|
931
|
+
color: props.color,
|
|
932
|
+
modelValue: rowsPerPage,
|
|
933
|
+
options: computedRowsPerPageOptions.value,
|
|
934
|
+
displayValue:
|
|
935
|
+
rowsPerPage === 0 ? $q.lang.table.allRows : rowsPerPage,
|
|
936
|
+
dark: isDark.value,
|
|
937
|
+
borderless: true,
|
|
938
|
+
dense: true,
|
|
939
|
+
optionsDense: true,
|
|
940
|
+
optionsCover: true,
|
|
941
|
+
'onUpdate:modelValue': onPagSelection
|
|
942
|
+
})
|
|
943
|
+
])
|
|
944
|
+
)
|
|
945
|
+
}
|
|
845
946
|
|
|
846
947
|
if (paginationSlot !== void 0) {
|
|
847
948
|
control = paginationSlot(marginalsScope.value)
|
|
848
|
-
}
|
|
849
|
-
else {
|
|
949
|
+
} else {
|
|
850
950
|
control = [
|
|
851
|
-
h(
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
951
|
+
h(
|
|
952
|
+
'span',
|
|
953
|
+
rowsPerPage !== 0 ? { class: 'q-table__bottom-item' } : {},
|
|
954
|
+
[
|
|
955
|
+
rowsPerPage
|
|
956
|
+
? paginationLabel(
|
|
957
|
+
firstRowIndex.value + 1,
|
|
958
|
+
Math.min(lastRowIndex.value, computedRowsNumber.value),
|
|
959
|
+
computedRowsNumber.value
|
|
960
|
+
)
|
|
961
|
+
: paginationLabel(
|
|
962
|
+
1,
|
|
963
|
+
filteredSortedRowsNumber.value,
|
|
964
|
+
computedRowsNumber.value
|
|
965
|
+
)
|
|
966
|
+
]
|
|
967
|
+
)
|
|
856
968
|
]
|
|
857
969
|
|
|
858
970
|
if (rowsPerPage !== 0 && pagesNumber.value > 1) {
|
|
@@ -867,22 +979,24 @@ export default createComponent({
|
|
|
867
979
|
btnProps.size = 'sm'
|
|
868
980
|
}
|
|
869
981
|
|
|
870
|
-
pagesNumber.value > 2
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
982
|
+
if (pagesNumber.value > 2) {
|
|
983
|
+
control.push(
|
|
984
|
+
h(QBtn, {
|
|
985
|
+
key: 'pgFirst',
|
|
986
|
+
...btnProps,
|
|
987
|
+
icon: navIcon.value[0],
|
|
988
|
+
disable: isFirstPage.value,
|
|
989
|
+
'aria-label': $q.lang.pagination.first,
|
|
990
|
+
onClick: firstPage
|
|
991
|
+
})
|
|
992
|
+
)
|
|
993
|
+
}
|
|
880
994
|
|
|
881
995
|
control.push(
|
|
882
996
|
h(QBtn, {
|
|
883
997
|
key: 'pgPrev',
|
|
884
998
|
...btnProps,
|
|
885
|
-
icon: navIcon.value[
|
|
999
|
+
icon: navIcon.value[1],
|
|
886
1000
|
disable: isFirstPage.value,
|
|
887
1001
|
'aria-label': $q.lang.pagination.prev,
|
|
888
1002
|
onClick: prevPage
|
|
@@ -891,148 +1005,158 @@ export default createComponent({
|
|
|
891
1005
|
h(QBtn, {
|
|
892
1006
|
key: 'pgNext',
|
|
893
1007
|
...btnProps,
|
|
894
|
-
icon: navIcon.value[
|
|
1008
|
+
icon: navIcon.value[2],
|
|
895
1009
|
disable: isLastPage.value,
|
|
896
1010
|
'aria-label': $q.lang.pagination.next,
|
|
897
1011
|
onClick: nextPage
|
|
898
1012
|
})
|
|
899
1013
|
)
|
|
900
1014
|
|
|
901
|
-
pagesNumber.value > 2
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
1015
|
+
if (pagesNumber.value > 2) {
|
|
1016
|
+
control.push(
|
|
1017
|
+
h(QBtn, {
|
|
1018
|
+
key: 'pgLast',
|
|
1019
|
+
...btnProps,
|
|
1020
|
+
icon: navIcon.value[3],
|
|
1021
|
+
disable: isLastPage.value,
|
|
1022
|
+
'aria-label': $q.lang.pagination.last,
|
|
1023
|
+
onClick: lastPage
|
|
1024
|
+
})
|
|
1025
|
+
)
|
|
1026
|
+
}
|
|
911
1027
|
}
|
|
912
1028
|
}
|
|
913
1029
|
|
|
914
|
-
child.push(
|
|
915
|
-
h('div', { class: 'q-table__control' }, control)
|
|
916
|
-
)
|
|
1030
|
+
child.push(h('div', { class: 'q-table__control' }, control))
|
|
917
1031
|
|
|
918
1032
|
return child
|
|
919
1033
|
}
|
|
920
1034
|
|
|
921
|
-
function getGridHeader
|
|
922
|
-
const child =
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
: (
|
|
929
|
-
props.loading === true && slots.loading === void 0
|
|
930
|
-
? getProgress(h)
|
|
931
|
-
: void 0
|
|
932
|
-
)
|
|
1035
|
+
function getGridHeader() {
|
|
1036
|
+
const child =
|
|
1037
|
+
props.gridHeader === true
|
|
1038
|
+
? [h('table', { class: 'q-table' }, [getTHead(h)])]
|
|
1039
|
+
: props.loading === true && slots.loading === void 0
|
|
1040
|
+
? getProgress(h)
|
|
1041
|
+
: void 0
|
|
933
1042
|
|
|
934
1043
|
return h('div', { class: 'q-table__middle' }, child)
|
|
935
1044
|
}
|
|
936
1045
|
|
|
937
|
-
function getGridBody
|
|
938
|
-
const item =
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1046
|
+
function getGridBody() {
|
|
1047
|
+
const item =
|
|
1048
|
+
slots.item !== void 0
|
|
1049
|
+
? slots.item
|
|
1050
|
+
: scope => {
|
|
1051
|
+
const child = scope.cols.map(col =>
|
|
1052
|
+
h('div', { class: 'q-table__grid-item-row' }, [
|
|
1053
|
+
h('div', { class: 'q-table__grid-item-title' }, [col.label]),
|
|
1054
|
+
h('div', { class: 'q-table__grid-item-value' }, [col.value])
|
|
1055
|
+
])
|
|
1056
|
+
)
|
|
1057
|
+
|
|
1058
|
+
if (hasSelectionMode.value === true) {
|
|
1059
|
+
const slot = slots['body-selection']
|
|
1060
|
+
const content =
|
|
1061
|
+
slot !== void 0
|
|
1062
|
+
? slot(scope)
|
|
1063
|
+
: [
|
|
1064
|
+
h(QCheckbox, {
|
|
1065
|
+
modelValue: scope.selected,
|
|
1066
|
+
color: props.color,
|
|
1067
|
+
dark: isDark.value,
|
|
1068
|
+
dense: props.dense,
|
|
1069
|
+
'onUpdate:modelValue': (adding, evt) => {
|
|
1070
|
+
updateSelection(
|
|
1071
|
+
[scope.key],
|
|
1072
|
+
[scope.row],
|
|
1073
|
+
adding,
|
|
1074
|
+
evt
|
|
1075
|
+
)
|
|
1076
|
+
}
|
|
1077
|
+
})
|
|
1078
|
+
]
|
|
1079
|
+
|
|
1080
|
+
child.unshift(
|
|
1081
|
+
h('div', { class: 'q-table__grid-item-row' }, content),
|
|
1082
|
+
h(QSeparator, { dark: isDark.value })
|
|
1083
|
+
)
|
|
1084
|
+
}
|
|
969
1085
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1086
|
+
const data = {
|
|
1087
|
+
class: [
|
|
1088
|
+
'q-table__grid-item-card' + cardDefaultClass.value,
|
|
1089
|
+
props.cardClass
|
|
1090
|
+
],
|
|
1091
|
+
style: props.cardStyle
|
|
1092
|
+
}
|
|
977
1093
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1094
|
+
if (props.cardStyleFn !== void 0) {
|
|
1095
|
+
data.style = [data.style, props.cardStyleFn(scope.row)]
|
|
1096
|
+
}
|
|
981
1097
|
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1098
|
+
if (props.cardClassFn !== void 0) {
|
|
1099
|
+
const cls = props.cardClassFn(scope.row)
|
|
1100
|
+
if (cls) {
|
|
1101
|
+
data.class[0] += ` ${cls}`
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
988
1104
|
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1105
|
+
if (
|
|
1106
|
+
props.onRowClick !== void 0 ||
|
|
1107
|
+
props.onRowDblclick !== void 0 ||
|
|
1108
|
+
props.onRowContextmenu !== void 0
|
|
1109
|
+
) {
|
|
1110
|
+
data.class[0] += ' cursor-pointer'
|
|
1111
|
+
|
|
1112
|
+
if (props.onRowClick !== void 0) {
|
|
1113
|
+
data.onClick = evt => {
|
|
1114
|
+
emit('RowClick', evt, scope.row, scope.pageIndex)
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
995
1117
|
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1118
|
+
if (props.onRowDblclick !== void 0) {
|
|
1119
|
+
data.onDblclick = evt => {
|
|
1120
|
+
emit('RowDblclick', evt, scope.row, scope.pageIndex)
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1001
1123
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1124
|
+
if (props.onRowContextmenu !== void 0) {
|
|
1125
|
+
data.onContextmenu = evt => {
|
|
1126
|
+
emit('rowContextmenu', evt, scope.row, scope.pageIndex)
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1005
1129
|
}
|
|
1006
|
-
}
|
|
1007
1130
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1131
|
+
return h(
|
|
1132
|
+
'div',
|
|
1133
|
+
{
|
|
1134
|
+
class:
|
|
1135
|
+
'q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3' +
|
|
1136
|
+
(scope.selected === true
|
|
1137
|
+
? ' q-table__grid-item--selected'
|
|
1138
|
+
: '')
|
|
1139
|
+
},
|
|
1140
|
+
[h('div', data, child)]
|
|
1141
|
+
)
|
|
1012
1142
|
}
|
|
1013
|
-
}
|
|
1014
1143
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
key: getRowKey.value(row),
|
|
1032
|
-
row,
|
|
1033
|
-
pageIndex
|
|
1034
|
-
}))
|
|
1035
|
-
}))
|
|
1144
|
+
return h(
|
|
1145
|
+
'div',
|
|
1146
|
+
{
|
|
1147
|
+
class: ['q-table__grid-content row', props.cardContainerClass],
|
|
1148
|
+
style: props.cardContainerStyle
|
|
1149
|
+
},
|
|
1150
|
+
computedRows.value.map((row, pageIndex) =>
|
|
1151
|
+
item(
|
|
1152
|
+
getBodyScope({
|
|
1153
|
+
key: getRowKey.value(row),
|
|
1154
|
+
row,
|
|
1155
|
+
pageIndex
|
|
1156
|
+
})
|
|
1157
|
+
)
|
|
1158
|
+
)
|
|
1159
|
+
)
|
|
1036
1160
|
}
|
|
1037
1161
|
|
|
1038
1162
|
// expose public methods and needed computed props
|
|
@@ -1060,28 +1184,22 @@ export default createComponent({
|
|
|
1060
1184
|
})
|
|
1061
1185
|
|
|
1062
1186
|
return () => {
|
|
1063
|
-
const child = [
|
|
1187
|
+
const child = [getTopDiv()]
|
|
1064
1188
|
const data = { ref: rootRef, class: rootContainerClass.value }
|
|
1065
1189
|
|
|
1066
1190
|
if (props.grid === true) {
|
|
1067
1191
|
child.push(getGridHeader())
|
|
1068
|
-
}
|
|
1069
|
-
else {
|
|
1192
|
+
} else {
|
|
1070
1193
|
Object.assign(data, {
|
|
1071
|
-
class: [
|
|
1194
|
+
class: [data.class, props.cardClass],
|
|
1072
1195
|
style: props.cardStyle
|
|
1073
1196
|
})
|
|
1074
1197
|
}
|
|
1075
1198
|
|
|
1076
|
-
child.push(
|
|
1077
|
-
getBody(),
|
|
1078
|
-
getBottomDiv()
|
|
1079
|
-
)
|
|
1199
|
+
child.push(getBody(), getBottomDiv())
|
|
1080
1200
|
|
|
1081
1201
|
if (props.loading === true && slots.loading !== void 0) {
|
|
1082
|
-
child.push(
|
|
1083
|
-
slots.loading()
|
|
1084
|
-
)
|
|
1202
|
+
child.push(slots.loading())
|
|
1085
1203
|
}
|
|
1086
1204
|
|
|
1087
1205
|
return h('div', data, child)
|