quasar 1.16.3 → 1.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/BottomSheet.json +2 -2
- package/dist/api/Loading.json +0 -2
- package/dist/api/LoadingBar.json +1 -1
- package/dist/api/Notify.json +25 -25
- package/dist/api/QAjaxBar.json +23 -4
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +32 -11
- package/dist/api/QBtn.json +35 -14
- package/dist/api/QBtnDropdown.json +36 -15
- package/dist/api/QBtnToggle.json +1 -1
- package/dist/api/QCarousel.json +7 -7
- package/dist/api/QCarouselSlide.json +2 -2
- package/dist/api/QChatMessage.json +1 -5
- package/dist/api/QChip.json +4 -4
- package/dist/api/QColor.json +6 -0
- package/dist/api/QDialog.json +7 -1
- package/dist/api/QExpansionItem.json +34 -13
- package/dist/api/QFab.json +34 -2
- package/dist/api/QFabAction.json +9 -1
- package/dist/api/QField.json +80 -6
- package/dist/api/QFile.json +80 -6
- package/dist/api/QImg.json +2 -2
- package/dist/api/QInnerLoading.json +32 -0
- package/dist/api/QInput.json +82 -6
- package/dist/api/QItem.json +31 -10
- package/dist/api/QOptionGroup.json +58 -1
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QParallax.json +1 -1
- package/dist/api/QPopupEdit.json +14 -7
- package/dist/api/QPullToRefresh.json +1 -1
- package/dist/api/QRange.json +581 -96
- package/dist/api/QRating.json +3 -3
- package/dist/api/QRouteTab.json +32 -12
- package/dist/api/QScrollArea.json +188 -20
- package/dist/api/QSelect.json +82 -10
- package/dist/api/QSeparator.json +1 -1
- package/dist/api/QSlider.json +499 -34
- package/dist/api/QStep.json +4 -4
- package/dist/api/QStepper.json +4 -4
- package/dist/api/QTab.json +1 -1
- package/dist/api/QTable.json +4 -4
- package/dist/api/QTabs.json +9 -0
- package/dist/api/QTimelineEntry.json +2 -2
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTree.json +7 -1
- package/dist/api/QVideo.json +10 -0
- package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
- package/dist/icon-set/eva-icons.umd.min.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
- package/dist/icon-set/line-awesome.umd.min.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
- package/dist/icon-set/material-icons-round.umd.min.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
- package/dist/icon-set/material-icons.umd.min.js +1 -1
- package/dist/icon-set/mdi-v3.umd.min.js +1 -1
- package/dist/icon-set/mdi-v4.umd.min.js +1 -1
- package/dist/icon-set/mdi-v5.umd.min.js +1 -1
- package/dist/icon-set/mdi-v6.umd.min.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
- package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
- package/dist/icon-set/svg-themify.umd.min.js +1 -1
- package/dist/icon-set/themify.umd.min.js +1 -1
- package/dist/lang/ar.umd.min.js +2 -2
- package/dist/lang/az-latn.umd.min.js +1 -1
- package/dist/lang/bg.umd.min.js +1 -1
- package/dist/lang/ca.umd.min.js +1 -1
- package/dist/lang/cs.umd.min.js +1 -1
- package/dist/lang/da.umd.min.js +1 -1
- package/dist/lang/de.umd.min.js +1 -1
- package/dist/lang/el.umd.min.js +1 -1
- package/dist/lang/en-gb.umd.min.js +1 -1
- package/dist/lang/en-us.umd.min.js +1 -1
- package/dist/lang/eo.umd.min.js +1 -1
- package/dist/lang/es.umd.min.js +1 -1
- package/dist/lang/et.umd.min.js +1 -1
- package/dist/lang/fa-ir.umd.min.js +1 -1
- package/dist/lang/fa.umd.min.js +1 -1
- package/dist/lang/fi.umd.min.js +1 -1
- package/dist/lang/fr.umd.min.js +2 -2
- package/dist/lang/gn.umd.min.js +1 -1
- package/dist/lang/he.umd.min.js +1 -1
- package/dist/lang/hr.umd.min.js +1 -1
- package/dist/lang/hu.umd.min.js +1 -1
- package/dist/lang/id.umd.min.js +1 -1
- package/dist/lang/is.umd.min.js +1 -1
- package/dist/lang/it.umd.min.js +1 -1
- package/dist/lang/ja.umd.min.js +1 -1
- package/dist/lang/km.umd.min.js +1 -1
- package/dist/lang/ko-kr.umd.min.js +1 -1
- package/dist/lang/kur-ckb.umd.min.js +1 -1
- package/dist/lang/lu.umd.min.js +1 -1
- package/dist/lang/lv.umd.min.js +1 -1
- package/dist/lang/ml.umd.min.js +1 -1
- package/dist/lang/ms.umd.min.js +1 -1
- package/dist/lang/nb-no.umd.min.js +1 -1
- package/dist/lang/nl.umd.min.js +1 -1
- package/dist/lang/pl.umd.min.js +1 -1
- package/dist/lang/pt-br.umd.min.js +1 -1
- package/dist/lang/pt.umd.min.js +1 -1
- package/dist/lang/ro.umd.min.js +1 -1
- package/dist/lang/ru.umd.min.js +1 -1
- package/dist/lang/sk.umd.min.js +1 -1
- package/dist/lang/sl.umd.min.js +1 -1
- package/dist/lang/sr.umd.min.js +2 -2
- package/dist/lang/sv.umd.min.js +1 -1
- package/dist/lang/ta.umd.min.js +1 -1
- package/dist/lang/th.umd.min.js +1 -1
- package/dist/lang/tr.umd.min.js +1 -1
- package/dist/lang/ug.umd.min.js +2 -2
- package/dist/lang/uk.umd.min.js +1 -1
- package/dist/lang/vi.umd.min.js +1 -1
- package/dist/lang/zh-hans.umd.min.js +2 -2
- package/dist/lang/zh-hant.umd.min.js +2 -2
- package/dist/quasar.addon.css +1 -1
- package/dist/quasar.addon.rtl.css +1 -1
- package/dist/quasar.common.js +2 -2
- package/dist/quasar.css +380 -227
- package/dist/quasar.esm.js +2 -2
- package/dist/quasar.ie.polyfills.js +1 -1
- package/dist/quasar.ie.polyfills.umd.min.js +1 -1
- package/dist/quasar.min.css +1 -1
- package/dist/quasar.rtl.css +512 -303
- package/dist/quasar.rtl.min.css +1 -1
- package/dist/quasar.sass +328 -210
- package/dist/quasar.styl +328 -210
- package/dist/quasar.umd.js +3244 -1894
- package/dist/quasar.umd.min.js +2 -2
- package/dist/quasar.umd.modern.js +3199 -1875
- package/dist/quasar.umd.modern.min.js +2 -2
- package/dist/transform-asset-urls.json +20 -0
- package/dist/types/index.d.ts +427 -105
- package/dist/types/utils/scroll.d.ts +1 -0
- package/dist/vetur/quasar-attributes.json +320 -92
- package/dist/vetur/quasar-tags.json +76 -19
- package/dist/web-types/web-types.json +1296 -257
- package/icon-set/svg-ionicons-v6.js +225 -0
- package/lang/ar.js +1 -1
- package/lang/fa-ir.js +3 -1
- package/lang/fa.js +3 -1
- package/lang/fr.js +1 -1
- package/lang/index.json +1 -1
- package/lang/kur-ckb.js +2 -2
- package/lang/sr.js +4 -4
- package/lang/ug.js +48 -46
- package/lang/zh-hans.js +1 -1
- package/lang/zh-hant.js +18 -18
- package/package.json +1 -1
- package/src/api.extends.json +1 -2
- package/src/components/ajax-bar/QAjaxBar.js +48 -26
- package/src/components/ajax-bar/QAjaxBar.json +22 -4
- package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
- package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
- package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
- package/src/components/btn/QBtn.js +3 -3
- package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
- package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
- package/src/components/btn-toggle/QBtnToggle.js +4 -1
- package/src/components/carousel/QCarousel.js +6 -2
- package/src/components/carousel/QCarousel.json +9 -1
- package/src/components/carousel/QCarouselSlide.json +2 -2
- package/src/components/chat/QChatMessage.json +1 -1
- package/src/components/color/QColor.js +100 -85
- package/src/components/color/QColor.json +7 -0
- package/src/components/color/QColor.sass +14 -24
- package/src/components/color/QColor.styl +14 -24
- package/src/components/date/QDate.js +7 -1
- package/src/components/date/QDate.sass +2 -0
- package/src/components/date/QDate.styl +2 -0
- package/src/components/dialog/QDialog.js +8 -4
- package/src/components/dialog/QDialog.json +8 -1
- package/src/components/drawer/QDrawer.js +16 -15
- package/src/components/editor/QEditor.js +2 -2
- package/src/components/editor/QEditor.sass +13 -1
- package/src/components/editor/QEditor.styl +13 -1
- package/src/components/expansion-item/QExpansionItem.js +13 -11
- package/src/components/fab/QFab.js +20 -11
- package/src/components/fab/QFab.json +35 -0
- package/src/components/fab/QFabAction.js +16 -9
- package/src/components/fab/QFabAction.json +10 -0
- package/src/components/field/QField.js +28 -23
- package/src/components/field/__QField.json +72 -8
- package/src/components/file/QFile.js +12 -4
- package/src/components/file/QFile.sass +4 -3
- package/src/components/file/QFile.styl +4 -3
- package/src/components/footer/QFooter.js +1 -1
- package/src/components/form/QForm.js +1 -1
- package/src/components/header/QHeader.js +1 -1
- package/src/components/icon/QIcon.js +89 -75
- package/src/components/icon/QIcon.sass +2 -2
- package/src/components/icon/QIcon.styl +2 -2
- package/src/components/img/QImg.json +2 -2
- package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
- package/src/components/inner-loading/QInnerLoading.js +54 -22
- package/src/components/inner-loading/QInnerLoading.json +29 -0
- package/src/components/inner-loading/QInnerLoading.sass +3 -0
- package/src/components/inner-loading/QInnerLoading.styl +3 -0
- package/src/components/item/QItem.js +9 -15
- package/src/components/layout/QLayout.js +49 -0
- package/src/components/linear-progress/QLinearProgress.js +6 -2
- package/src/components/menu/QMenu.js +5 -1
- package/src/components/option-group/QOptionGroup.js +32 -22
- package/src/components/option-group/QOptionGroup.json +50 -1
- package/src/components/parallax/QParallax.js +3 -0
- package/src/components/parallax/QParallax.json +1 -1
- package/src/components/popup-edit/QPopupEdit.js +41 -16
- package/src/components/popup-edit/QPopupEdit.json +15 -8
- package/src/components/range/QRange.js +223 -278
- package/src/components/range/QRange.json +11 -122
- package/src/components/rating/QRating.js +56 -38
- package/src/components/rating/QRating.json +3 -3
- package/src/components/rating/QRating.sass +8 -6
- package/src/components/rating/QRating.styl +8 -6
- package/src/components/resize-observer/QResizeObserver.js +15 -10
- package/src/components/scroll-area/QScrollArea.js +342 -126
- package/src/components/scroll-area/QScrollArea.json +164 -20
- package/src/components/scroll-area/QScrollArea.sass +5 -0
- package/src/components/scroll-area/QScrollArea.styl +5 -0
- package/src/components/scroll-observer/QScrollObserver.js +12 -7
- package/src/components/select/QSelect.js +8 -2
- package/src/components/select/QSelect.json +1 -1
- package/src/components/separator/QSeparator.js +0 -1
- package/src/components/separator/QSeparator.json +1 -1
- package/src/components/slider/QSlider.js +97 -140
- package/src/components/slider/QSlider.json +1 -122
- package/src/components/slider/QSlider.sass +205 -139
- package/src/components/slider/QSlider.styl +205 -139
- package/src/components/slider/slider-utils.js +468 -123
- package/src/components/slider/slider-utils.json +546 -0
- package/src/components/stepper/QStepper.js +1 -1
- package/src/components/stepper/QStepper.sass +25 -26
- package/src/components/stepper/QStepper.styl +25 -26
- package/src/components/table/QTable.sass +3 -0
- package/src/components/table/QTable.styl +3 -0
- package/src/components/tabs/QRouteTab.js +13 -13
- package/src/components/tabs/QRouteTab.json +0 -7
- package/src/components/tabs/QTab.js +71 -20
- package/src/components/tabs/QTabs.js +237 -52
- package/src/components/tabs/QTabs.json +8 -0
- package/src/components/tabs/QTabs.sass +6 -6
- package/src/components/tabs/QTabs.styl +6 -6
- package/src/components/time/QTime.js +6 -2
- package/src/components/timeline/QTimeline.sass +1 -2
- package/src/components/timeline/QTimeline.styl +1 -2
- package/src/components/timeline/QTimelineEntry.json +1 -1
- package/src/components/tree/QTree.js +10 -6
- package/src/components/tree/QTree.json +5 -0
- package/src/components/tree/QTree.sass +58 -4
- package/src/components/tree/QTree.styl +58 -4
- package/src/components/uploader/QUploaderBase.js +15 -19
- package/src/components/video/QVideo.js +4 -1
- package/src/components/video/QVideo.json +11 -0
- package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
- package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
- package/src/css/core/helpers.sass +3 -0
- package/src/css/core/helpers.styl +3 -0
- package/src/css/core/positioning.sass +5 -0
- package/src/css/core/positioning.styl +5 -0
- package/src/css/variables.sass +4 -6
- package/src/css/variables.styl +4 -6
- package/src/directives/Scroll.js +2 -2
- package/src/directives/ScrollFire.js +1 -0
- package/src/ie-compat/ie.js +13 -13
- package/src/install.js +1 -1
- package/src/lang.js +7 -4
- package/src/mixins/anchor.js +3 -13
- package/src/mixins/btn.js +33 -38
- package/src/mixins/btn.json +26 -11
- package/src/mixins/file.js +27 -5
- package/src/mixins/fullscreen.js +16 -4
- package/src/mixins/portal.js +10 -10
- package/src/mixins/router-link.js +88 -14
- package/src/mixins/router-link.json +26 -10
- package/src/mixins/validate.js +33 -15
- package/src/mixins/virtual-scroll.js +40 -42
- package/src/plugins/AppFullscreen.js +41 -16
- package/src/plugins/BottomSheet.json +1 -1
- package/src/plugins/Cookies.js +1 -1
- package/src/plugins/Loading.js +8 -0
- package/src/plugins/LoadingBar.js +9 -0
- package/src/plugins/LoadingBar.json +1 -1
- package/src/plugins/Notify.js +351 -333
- package/src/plugins/Notify.json +20 -20
- package/src/plugins/Notify.sass +9 -3
- package/src/plugins/Notify.styl +9 -3
- package/src/utils/clone.js +53 -4
- package/src/utils/date.js +134 -69
- package/src/utils/dom.js +28 -9
- package/src/utils/extend.js +2 -2
- package/src/utils/focus-manager.js +8 -10
- package/src/utils/global-dialog.js +18 -1
- package/src/utils/is.js +2 -2
- package/src/utils/morph.js +2 -12
- package/src/utils/scroll.js +71 -35
package/src/mixins/btn.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AlignMixin from './align.js'
|
|
2
2
|
import RippleMixin from './ripple.js'
|
|
3
3
|
import ListenersMixin from './listeners.js'
|
|
4
|
+
import RouterLinkMixin from './router-link.js'
|
|
4
5
|
import { getSizeMixin } from './size.js'
|
|
5
6
|
|
|
6
7
|
const padding = {
|
|
@@ -12,10 +13,14 @@ const padding = {
|
|
|
12
13
|
xl: 32
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
const formTypes = [ 'button', 'submit', 'reset' ]
|
|
17
|
+
const mediaTypeRe = /[^\s]\/[^\s]/
|
|
18
|
+
|
|
15
19
|
export default {
|
|
16
20
|
mixins: [
|
|
17
21
|
ListenersMixin,
|
|
18
22
|
RippleMixin,
|
|
23
|
+
RouterLinkMixin,
|
|
19
24
|
AlignMixin,
|
|
20
25
|
getSizeMixin({
|
|
21
26
|
xs: 8,
|
|
@@ -27,7 +32,10 @@ export default {
|
|
|
27
32
|
],
|
|
28
33
|
|
|
29
34
|
props: {
|
|
30
|
-
type:
|
|
35
|
+
type: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'button'
|
|
38
|
+
},
|
|
31
39
|
|
|
32
40
|
to: [ Object, String ],
|
|
33
41
|
replace: Boolean,
|
|
@@ -87,14 +95,6 @@ export default {
|
|
|
87
95
|
return this.isActionable === true ? this.tabindex || 0 : -1
|
|
88
96
|
},
|
|
89
97
|
|
|
90
|
-
hasRouterLink () {
|
|
91
|
-
return this.disable !== true && this.to !== void 0 && this.to !== null && this.to !== ''
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
isLink () {
|
|
95
|
-
return this.type === 'a' || this.hasRouterLink === true
|
|
96
|
-
},
|
|
97
|
-
|
|
98
98
|
design () {
|
|
99
99
|
if (this.flat === true) return 'flat'
|
|
100
100
|
if (this.outline === true) return 'outline'
|
|
@@ -103,45 +103,40 @@ export default {
|
|
|
103
103
|
return 'standard'
|
|
104
104
|
},
|
|
105
105
|
|
|
106
|
-
currentLocation () {
|
|
107
|
-
if (this.hasRouterLink === true) {
|
|
108
|
-
// we protect from accessing this.$route without
|
|
109
|
-
// actually needing it so that we won't trigger
|
|
110
|
-
// unnecessary updates
|
|
111
|
-
return this.append === true
|
|
112
|
-
? this.$router.resolve(this.to, this.$route, true)
|
|
113
|
-
: this.$router.resolve(this.to)
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
|
|
117
106
|
attrs () {
|
|
118
|
-
const
|
|
107
|
+
const acc = { tabindex: this.computedTabIndex }
|
|
119
108
|
|
|
120
|
-
if (this.
|
|
121
|
-
|
|
109
|
+
if (this.hasLink === true) {
|
|
110
|
+
Object.assign(acc, this.linkProps.attrs)
|
|
111
|
+
}
|
|
112
|
+
else if (formTypes.includes(this.type) === true) {
|
|
113
|
+
acc.type = this.type
|
|
122
114
|
}
|
|
123
115
|
|
|
124
|
-
if (this.
|
|
125
|
-
|
|
126
|
-
|
|
116
|
+
if (this.hasLink === true || this.type === 'a') {
|
|
117
|
+
if (this.disable === true) {
|
|
118
|
+
acc['aria-disabled'] = 'true'
|
|
119
|
+
}
|
|
120
|
+
else if (acc.href === void 0) {
|
|
121
|
+
acc.role = 'button'
|
|
122
|
+
}
|
|
123
|
+
if (mediaTypeRe.test(this.type) === true) {
|
|
124
|
+
acc.type = this.type
|
|
125
|
+
}
|
|
127
126
|
}
|
|
128
|
-
else {
|
|
129
|
-
|
|
127
|
+
else if (this.disable === true) {
|
|
128
|
+
acc.disabled = ''
|
|
129
|
+
acc['aria-disabled'] = 'true'
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
if (this.loading === true && this.percentage !== void 0) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (this.disable === true) {
|
|
140
|
-
attrs.disabled = ''
|
|
141
|
-
attrs['aria-disabled'] = 'true'
|
|
133
|
+
acc.role = 'progressbar'
|
|
134
|
+
acc['aria-valuemin'] = 0
|
|
135
|
+
acc['aria-valuemax'] = 100
|
|
136
|
+
acc['aria-valuenow'] = this.percentage
|
|
142
137
|
}
|
|
143
138
|
|
|
144
|
-
return
|
|
139
|
+
return acc
|
|
145
140
|
},
|
|
146
141
|
|
|
147
142
|
classes () {
|
package/src/mixins/btn.json
CHANGED
|
@@ -4,40 +4,55 @@
|
|
|
4
4
|
"props": {
|
|
5
5
|
"type":{
|
|
6
6
|
"type": "String",
|
|
7
|
-
"desc": "Define the button
|
|
7
|
+
"desc": "1) Define the button native type attribute (submit, reset, button) or 2) render component with <a> tag so you can access events even if disable or 3) Use 'href' prop and specify 'type' as a media tag",
|
|
8
8
|
"default": "button",
|
|
9
|
-
"values": [
|
|
10
|
-
"a", "submit", "button", "reset"
|
|
11
|
-
],
|
|
12
9
|
"examples": [
|
|
13
|
-
"
|
|
10
|
+
"a", "submit", "button", "reset",
|
|
11
|
+
"image/png",
|
|
12
|
+
"href=\"https://some-site.net\" target=\"_blank\""
|
|
14
13
|
],
|
|
15
14
|
"category": "general"
|
|
16
15
|
},
|
|
17
16
|
|
|
18
17
|
"to": {
|
|
19
18
|
"type": [ "String", "Object" ],
|
|
20
|
-
"desc": "Equivalent to Vue Router <router-link> 'to' property",
|
|
19
|
+
"desc": "Equivalent to Vue Router <router-link> 'to' property; Superseeded by 'href' prop if used",
|
|
21
20
|
"examples": [
|
|
22
21
|
"/home/dashboard",
|
|
23
22
|
":to=\"{ name: 'my-route-name' }\""
|
|
24
23
|
],
|
|
25
|
-
"category": "
|
|
24
|
+
"category": "navigation"
|
|
26
25
|
},
|
|
27
26
|
|
|
28
27
|
"replace": {
|
|
29
28
|
"type": "Boolean",
|
|
30
|
-
"desc": "Equivalent to Vue Router <router-link> 'replace' property",
|
|
31
|
-
"category": "
|
|
29
|
+
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Superseeded by 'href' prop if used",
|
|
30
|
+
"category": "navigation"
|
|
32
31
|
},
|
|
33
32
|
|
|
34
33
|
"append": {
|
|
35
34
|
"type": "Boolean",
|
|
36
|
-
"desc": "Equivalent to Vue Router <router-link> 'append' property",
|
|
37
|
-
"category": "
|
|
35
|
+
"desc": "Equivalent to Vue Router <router-link> 'append' property; Superseeded by 'href' prop if used",
|
|
36
|
+
"category": "navigation",
|
|
38
37
|
"addedIn": "v1.13.0"
|
|
39
38
|
},
|
|
40
39
|
|
|
40
|
+
"href": {
|
|
41
|
+
"type": "String",
|
|
42
|
+
"desc": "Native <a> link href attribute; Has priority over the 'to' and 'replace' props",
|
|
43
|
+
"examples": [ "https://quasar.dev", "href=\"https://quasar.dev\" target=\"_blank\"" ],
|
|
44
|
+
"category": "navigation",
|
|
45
|
+
"addedIn": "v1.17"
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
"target": {
|
|
49
|
+
"type": "String",
|
|
50
|
+
"desc": "Native <a> link target attribute; Use it only with 'to' or 'href' props",
|
|
51
|
+
"examples": [ "_blank", "_self", "_parent", "_top" ],
|
|
52
|
+
"category": "navigation",
|
|
53
|
+
"addedIn": "v1.17"
|
|
54
|
+
},
|
|
55
|
+
|
|
41
56
|
"label":{
|
|
42
57
|
"type": [ "String", "Number" ],
|
|
43
58
|
"desc": "The text that will be shown on the button",
|
package/src/mixins/file.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stopAndPrevent } from '../utils/event.js'
|
|
1
|
+
import { stop, stopAndPrevent } from '../utils/event.js'
|
|
2
2
|
import cache from '../utils/cache.js'
|
|
3
3
|
|
|
4
4
|
function filterFiles (files, rejectedFiles, failedPropValidation, filterFn) {
|
|
@@ -58,10 +58,20 @@ export default {
|
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
methods: {
|
|
61
|
-
pickFiles (
|
|
62
|
-
if (this.editable) {
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
pickFiles (ev) {
|
|
62
|
+
if (this.editable === true) {
|
|
63
|
+
if (ev !== Object(ev)) {
|
|
64
|
+
ev = { target: null }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (ev.target !== null && ev.target.matches('input[type="file"]') === true) {
|
|
68
|
+
// stop propagation if it's not a real pointer event
|
|
69
|
+
ev.clientX === 0 && ev.clientY === 0 && stop(ev)
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const input = this.__getFileInput()
|
|
73
|
+
input && input !== ev.target && input.click(ev)
|
|
74
|
+
}
|
|
65
75
|
}
|
|
66
76
|
},
|
|
67
77
|
|
|
@@ -110,6 +120,18 @@ export default {
|
|
|
110
120
|
files = [ files[0] ]
|
|
111
121
|
}
|
|
112
122
|
|
|
123
|
+
files.forEach(file => {
|
|
124
|
+
file.__key = file.webkitRelativePath + file.lastModified + file.name + file.size
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// Avoid duplicate files
|
|
128
|
+
const filenameMap = currentFileList.map(entry => entry.__key)
|
|
129
|
+
files = filterFiles(files, rejectedFiles, 'duplicate', file => {
|
|
130
|
+
return filenameMap.includes(file.__key) === false
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
if (files.length === 0) { return done() }
|
|
134
|
+
|
|
113
135
|
if (this.maxTotalSize !== void 0) {
|
|
114
136
|
let size = append === true
|
|
115
137
|
? currentFileList.reduce((total, file) => total + file.size, 0)
|
package/src/mixins/fullscreen.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import History from '../history.js'
|
|
2
2
|
|
|
3
|
+
let fullscreenCounter = 0
|
|
4
|
+
|
|
3
5
|
export default {
|
|
4
6
|
props: {
|
|
5
7
|
fullscreen: Boolean,
|
|
@@ -48,7 +50,12 @@ export default {
|
|
|
48
50
|
this.container = this.$el.parentNode
|
|
49
51
|
this.container.replaceChild(this.fullscreenFillerNode, this.$el)
|
|
50
52
|
document.body.appendChild(this.$el)
|
|
51
|
-
|
|
53
|
+
|
|
54
|
+
fullscreenCounter++
|
|
55
|
+
|
|
56
|
+
if (fullscreenCounter === 1) {
|
|
57
|
+
document.body.classList.add('q-body--fullscreen-mixin')
|
|
58
|
+
}
|
|
52
59
|
|
|
53
60
|
this.__historyFullscreen = {
|
|
54
61
|
handler: this.exitFullscreen
|
|
@@ -66,11 +73,16 @@ export default {
|
|
|
66
73
|
this.__historyFullscreen = void 0
|
|
67
74
|
}
|
|
68
75
|
this.container.replaceChild(this.$el, this.fullscreenFillerNode)
|
|
69
|
-
document.body.classList.remove('q-body--fullscreen-mixin')
|
|
70
76
|
this.inFullscreen = false
|
|
71
77
|
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
fullscreenCounter = Math.max(0, fullscreenCounter - 1)
|
|
79
|
+
|
|
80
|
+
if (fullscreenCounter === 0) {
|
|
81
|
+
document.body.classList.remove('q-body--fullscreen-mixin')
|
|
82
|
+
|
|
83
|
+
if (this.$el.scrollIntoView !== void 0) {
|
|
84
|
+
setTimeout(() => { this.$el.scrollIntoView() })
|
|
85
|
+
}
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
88
|
},
|
package/src/mixins/portal.js
CHANGED
|
@@ -3,6 +3,7 @@ import Vue from 'vue'
|
|
|
3
3
|
import { isSSR } from '../plugins/Platform.js'
|
|
4
4
|
import { getBodyFullscreenElement } from '../utils/dom.js'
|
|
5
5
|
import { addFocusWaitFlag, removeFocusWaitFlag } from '../utils/focus-manager.js'
|
|
6
|
+
import debounce from '../utils/debounce.js'
|
|
6
7
|
|
|
7
8
|
export function closePortalMenus (vm, evt) {
|
|
8
9
|
do {
|
|
@@ -81,6 +82,9 @@ const Portal = {
|
|
|
81
82
|
return
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
if (this.__portalIsActive === true) { return }
|
|
86
|
+
this.__portalIsActive = true
|
|
87
|
+
|
|
84
88
|
if (this.focusObj === void 0) {
|
|
85
89
|
this.focusObj = {}
|
|
86
90
|
}
|
|
@@ -88,15 +92,12 @@ const Portal = {
|
|
|
88
92
|
addFocusWaitFlag(this.focusObj)
|
|
89
93
|
|
|
90
94
|
if (this.$q.fullscreen !== void 0 && this.$q.fullscreen.isCapable === true) {
|
|
91
|
-
const append =
|
|
95
|
+
const append = () => {
|
|
92
96
|
if (this.__portal === void 0) {
|
|
93
97
|
return
|
|
94
98
|
}
|
|
95
99
|
|
|
96
|
-
const newParent = getBodyFullscreenElement(
|
|
97
|
-
isFullscreen,
|
|
98
|
-
this.$q.fullscreen.activeEl
|
|
99
|
-
)
|
|
100
|
+
const newParent = getBodyFullscreenElement(this.$q.fullscreen.activeEl)
|
|
100
101
|
|
|
101
102
|
if (
|
|
102
103
|
this.__portal.$el.parentElement !== newParent &&
|
|
@@ -106,12 +107,10 @@ const Portal = {
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
this.unwatchFullscreen = this.$watch('$q.fullscreen.
|
|
110
|
-
|
|
111
|
-
const isActive = this.$q.fullscreen.isActive
|
|
110
|
+
this.unwatchFullscreen = this.$watch('$q.fullscreen.activeEl', debounce(append, 50))
|
|
112
111
|
|
|
113
|
-
if (this.__onGlobalDialog === false || isActive === true) {
|
|
114
|
-
append(
|
|
112
|
+
if (this.__onGlobalDialog === false || this.$q.fullscreen.isActive === true) {
|
|
113
|
+
append()
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
116
|
else if (this.__portal !== void 0 && this.__onGlobalDialog === false) {
|
|
@@ -120,6 +119,7 @@ const Portal = {
|
|
|
120
119
|
},
|
|
121
120
|
|
|
122
121
|
__hidePortal () {
|
|
122
|
+
this.__portalIsActive = false
|
|
123
123
|
removeFocusWaitFlag(this.focusObj)
|
|
124
124
|
|
|
125
125
|
if (this.__portal !== void 0) {
|
|
@@ -1,31 +1,105 @@
|
|
|
1
|
-
|
|
1
|
+
const routerLinkProps = {
|
|
2
|
+
// router-link
|
|
2
3
|
to: [String, Object],
|
|
3
4
|
exact: Boolean,
|
|
4
5
|
append: Boolean,
|
|
5
6
|
replace: Boolean,
|
|
6
|
-
activeClass:
|
|
7
|
-
|
|
7
|
+
activeClass: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'q-router-link--active'
|
|
10
|
+
},
|
|
11
|
+
exactActiveClass: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'q-router-link--exact-active'
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// regular <a> link
|
|
17
|
+
href: String,
|
|
18
|
+
target: String,
|
|
19
|
+
|
|
20
|
+
// state
|
|
8
21
|
disable: Boolean
|
|
9
22
|
}
|
|
10
23
|
|
|
11
|
-
|
|
24
|
+
// external props: type, tag
|
|
25
|
+
// external: fallbackTag
|
|
26
|
+
|
|
27
|
+
export default {
|
|
12
28
|
props: routerLinkProps,
|
|
13
29
|
|
|
14
30
|
computed: {
|
|
31
|
+
hasHrefLink () {
|
|
32
|
+
return this.disable !== true && this.href !== void 0
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
hasRouterLinkProps () {
|
|
36
|
+
return this.$router !== void 0 &&
|
|
37
|
+
this.disable !== true &&
|
|
38
|
+
this.hasHrefLink !== true &&
|
|
39
|
+
this.to !== void 0 && this.to !== null && this.to !== ''
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
linkRoute () {
|
|
43
|
+
if (this.hasRouterLinkProps === true) {
|
|
44
|
+
// we protect from accessing this.$route without
|
|
45
|
+
// actually needing it so that we won't trigger
|
|
46
|
+
// unnecessary updates
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
return this.append === true
|
|
50
|
+
? this.$router.resolve(this.to, this.$route, true)
|
|
51
|
+
: this.$router.resolve(this.to)
|
|
52
|
+
}
|
|
53
|
+
catch (err) {}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return null
|
|
57
|
+
},
|
|
58
|
+
|
|
15
59
|
hasRouterLink () {
|
|
16
|
-
return this.
|
|
60
|
+
return this.linkRoute !== null
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
hasLink () {
|
|
64
|
+
return this.hasHrefLink === true || this.hasRouterLink === true
|
|
17
65
|
},
|
|
18
66
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
exact: this.exact,
|
|
23
|
-
append: this.append,
|
|
24
|
-
replace: this.replace,
|
|
25
|
-
activeClass: this.activeClass || 'q-router-link--active',
|
|
26
|
-
exactActiveClass: this.exactActiveClass || 'q-router-link--exact-active',
|
|
27
|
-
event: this.disable === true ? [] : void 0
|
|
67
|
+
linkTag () {
|
|
68
|
+
if (this.hasRouterLink === true) {
|
|
69
|
+
return 'router-link'
|
|
28
70
|
}
|
|
71
|
+
|
|
72
|
+
return this.type === 'a' || this.hasLink === true
|
|
73
|
+
? 'a'
|
|
74
|
+
: (this.tag || this.fallbackTag || 'div')
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
linkProps () {
|
|
78
|
+
return this.hasHrefLink === true
|
|
79
|
+
? {
|
|
80
|
+
attrs: {
|
|
81
|
+
href: this.href,
|
|
82
|
+
target: this.target
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
: (
|
|
86
|
+
this.hasRouterLink === true
|
|
87
|
+
? {
|
|
88
|
+
props: {
|
|
89
|
+
to: this.to,
|
|
90
|
+
exact: this.exact,
|
|
91
|
+
append: this.append,
|
|
92
|
+
replace: this.replace,
|
|
93
|
+
activeClass: this.activeClass,
|
|
94
|
+
exactActiveClass: this.exactActiveClass
|
|
95
|
+
},
|
|
96
|
+
attrs: {
|
|
97
|
+
href: this.linkRoute.href,
|
|
98
|
+
target: this.target
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
: {}
|
|
102
|
+
)
|
|
29
103
|
}
|
|
30
104
|
}
|
|
31
105
|
}
|
|
@@ -2,44 +2,60 @@
|
|
|
2
2
|
"props": {
|
|
3
3
|
"to": {
|
|
4
4
|
"type": [ "String", "Object" ],
|
|
5
|
-
"desc": "Equivalent to Vue Router <router-link> 'to' property",
|
|
5
|
+
"desc": "Equivalent to Vue Router <router-link> 'to' property; Superseeded by 'href' prop if used",
|
|
6
6
|
"examples": [
|
|
7
7
|
"/home/dashboard",
|
|
8
8
|
":to=\"{ name: 'my-route-name' }\""
|
|
9
9
|
],
|
|
10
|
-
"category": "
|
|
10
|
+
"category": "navigation"
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
"exact": {
|
|
14
14
|
"type": "Boolean",
|
|
15
|
-
"desc": "Equivalent to Vue Router <router-link> 'exact' property",
|
|
16
|
-
"category": "
|
|
15
|
+
"desc": "Equivalent to Vue Router <router-link> 'exact' property; Superseeded by 'href' prop if used",
|
|
16
|
+
"category": "navigation"
|
|
17
17
|
},
|
|
18
18
|
|
|
19
19
|
"append": {
|
|
20
20
|
"type": "Boolean",
|
|
21
|
-
"desc": "Equivalent to Vue Router <router-link> 'append' property",
|
|
22
|
-
"category": "
|
|
21
|
+
"desc": "Equivalent to Vue Router <router-link> 'append' property; Superseeded by 'href' prop if used",
|
|
22
|
+
"category": "navigation"
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
"replace": {
|
|
26
26
|
"type": "Boolean",
|
|
27
|
-
"desc": "Equivalent to Vue Router <router-link> 'replace' property",
|
|
28
|
-
"category": "
|
|
27
|
+
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Superseeded by 'href' prop if used",
|
|
28
|
+
"category": "navigation"
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
"active-class": {
|
|
32
32
|
"type": "String",
|
|
33
33
|
"desc": "Equivalent to Vue Router <router-link> 'active-class' property",
|
|
34
34
|
"examples": [ "my-active-class" ],
|
|
35
|
-
"category": "
|
|
35
|
+
"category": "navigation"
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
"exact-active-class": {
|
|
39
39
|
"type": "String",
|
|
40
40
|
"desc": "Equivalent to Vue Router <router-link> 'active-class' property",
|
|
41
41
|
"examples": [ "my-exact-active-class" ],
|
|
42
|
-
"category": "
|
|
42
|
+
"category": "navigation"
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
"href": {
|
|
46
|
+
"type": "String",
|
|
47
|
+
"desc": "Native <a> link href attribute; Has priority over the 'to'/'exact'/'replace' props",
|
|
48
|
+
"examples": [ "http://quasar.dev" ],
|
|
49
|
+
"category": "navigation",
|
|
50
|
+
"addedIn": "v1.17"
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
"target": {
|
|
54
|
+
"type": "String",
|
|
55
|
+
"desc": "Native <a> link target attribute; Use it only along with 'href' prop; Has priority over the 'to'/'exact'/'replace' props",
|
|
56
|
+
"examples": [ "_blank", "_self", "_parent", "_top" ],
|
|
57
|
+
"category": "navigation",
|
|
58
|
+
"addedIn": "v1.17"
|
|
43
59
|
},
|
|
44
60
|
|
|
45
61
|
"disable": {
|
package/src/mixins/validate.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { testPattern } from '../utils/patterns.js'
|
|
2
|
+
import debounce from '../utils/debounce.js'
|
|
2
3
|
|
|
3
4
|
const lazyRulesValues = [ true, false, 'ondemand' ]
|
|
4
5
|
|
|
@@ -35,7 +36,12 @@ export default {
|
|
|
35
36
|
},
|
|
36
37
|
|
|
37
38
|
disable (val) {
|
|
38
|
-
val === true
|
|
39
|
+
if (val === true) {
|
|
40
|
+
this.__resetValidation()
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.__validateIfNeeded(true)
|
|
44
|
+
}
|
|
39
45
|
},
|
|
40
46
|
|
|
41
47
|
reactiveRules: {
|
|
@@ -56,15 +62,16 @@ export default {
|
|
|
56
62
|
},
|
|
57
63
|
|
|
58
64
|
focused (focused) {
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
this.isDirty = false
|
|
63
|
-
}
|
|
65
|
+
if (focused === true) {
|
|
66
|
+
if (this.isDirty === null) {
|
|
67
|
+
this.isDirty = false
|
|
64
68
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
}
|
|
70
|
+
else if (this.isDirty === false) {
|
|
71
|
+
this.isDirty = true
|
|
72
|
+
|
|
73
|
+
if (this.hasRules === true && this.lazyRules !== 'ondemand') {
|
|
74
|
+
this.debouncedValidate()
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
77
|
},
|
|
@@ -77,7 +84,8 @@ export default {
|
|
|
77
84
|
|
|
78
85
|
computed: {
|
|
79
86
|
hasRules () {
|
|
80
|
-
return this.
|
|
87
|
+
return this.disable !== true &&
|
|
88
|
+
this.rules !== void 0 &&
|
|
81
89
|
this.rules !== null &&
|
|
82
90
|
this.rules.length > 0
|
|
83
91
|
},
|
|
@@ -93,21 +101,23 @@ export default {
|
|
|
93
101
|
}
|
|
94
102
|
},
|
|
95
103
|
|
|
104
|
+
created () {
|
|
105
|
+
this.debouncedValidate = debounce(this.validate, 0)
|
|
106
|
+
},
|
|
107
|
+
|
|
96
108
|
mounted () {
|
|
97
109
|
this.validateIndex = 0
|
|
98
110
|
},
|
|
99
111
|
|
|
100
112
|
beforeDestroy () {
|
|
101
113
|
this.unwatchRules !== void 0 && this.unwatchRules()
|
|
114
|
+
this.debouncedValidate.cancel()
|
|
102
115
|
},
|
|
103
116
|
|
|
104
117
|
methods: {
|
|
105
118
|
resetValidation () {
|
|
106
|
-
this.validateIndex++
|
|
107
|
-
this.innerLoading = false
|
|
108
119
|
this.isDirty = null
|
|
109
|
-
this.
|
|
110
|
-
this.innerErrorMessage = void 0
|
|
120
|
+
this.__resetValidation()
|
|
111
121
|
},
|
|
112
122
|
|
|
113
123
|
/*
|
|
@@ -203,13 +213,21 @@ export default {
|
|
|
203
213
|
)
|
|
204
214
|
},
|
|
205
215
|
|
|
216
|
+
__resetValidation () {
|
|
217
|
+
this.debouncedValidate.cancel()
|
|
218
|
+
this.validateIndex++
|
|
219
|
+
this.innerLoading = false
|
|
220
|
+
this.innerError = false
|
|
221
|
+
this.innerErrorMessage = void 0
|
|
222
|
+
},
|
|
223
|
+
|
|
206
224
|
__validateIfNeeded (changedRules) {
|
|
207
225
|
if (
|
|
208
226
|
this.hasRules === true &&
|
|
209
227
|
this.lazyRules !== 'ondemand' &&
|
|
210
228
|
(this.isDirty === true || (this.lazyRules !== true && changedRules !== true))
|
|
211
229
|
) {
|
|
212
|
-
this.
|
|
230
|
+
this.debouncedValidate()
|
|
213
231
|
}
|
|
214
232
|
}
|
|
215
233
|
}
|