quasar 2.3.2 → 2.4.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/dist/api/AppFullscreen.json +15 -8
- package/dist/api/BottomSheet.json +6 -0
- package/dist/api/Cookies.json +4 -3
- package/dist/api/Dialog.json +24 -10
- package/dist/api/Loading.json +0 -2
- package/dist/api/LoadingBar.json +8 -3
- package/dist/api/Morph.json +14 -7
- package/dist/api/Mutation.json +1 -1
- package/dist/api/Notify.json +41 -27
- package/dist/api/QAjaxBar.json +6 -3
- package/dist/api/QBreadcrumbs.json +8 -4
- package/dist/api/QBreadcrumbsEl.json +35 -12
- package/dist/api/QBtn.json +36 -17
- package/dist/api/QBtnDropdown.json +41 -20
- package/dist/api/QBtnToggle.json +7 -2
- package/dist/api/QCard.json +2 -1
- package/dist/api/QCardActions.json +2 -1
- package/dist/api/QCardSection.json +2 -1
- package/dist/api/QCarousel.json +10 -5
- package/dist/api/QCarouselControl.json +4 -2
- package/dist/api/QChatMessage.json +0 -4
- package/dist/api/QCheckbox.json +8 -4
- package/dist/api/QChip.json +2 -1
- package/dist/api/QCircularProgress.json +14 -7
- package/dist/api/QColor.json +6 -3
- package/dist/api/QDate.json +33 -5
- package/dist/api/QDialog.json +8 -4
- package/dist/api/QDrawer.json +10 -5
- package/dist/api/QEditor.json +10 -5
- package/dist/api/QExpansionItem.json +36 -13
- package/dist/api/QFab.json +41 -6
- package/dist/api/QFabAction.json +12 -2
- package/dist/api/QField.json +3 -1
- package/dist/api/QFile.json +8 -2
- package/dist/api/QFooter.json +2 -1
- package/dist/api/QForm.json +1 -1
- package/dist/api/QHeader.json +4 -2
- package/dist/api/QIcon.json +2 -1
- package/dist/api/QImg.json +8 -4
- package/dist/api/QInfiniteScroll.json +6 -3
- package/dist/api/QInnerLoading.json +8 -4
- package/dist/api/QInput.json +3 -1
- package/dist/api/QIntersection.json +4 -2
- package/dist/api/QItem.json +33 -11
- package/dist/api/QKnob.json +8 -4
- package/dist/api/QLayout.json +9 -1
- package/dist/api/QLinearProgress.json +4 -2
- package/dist/api/QMarkupTable.json +2 -1
- package/dist/api/QMenu.json +8 -4
- package/dist/api/QNoSsr.json +2 -1
- package/dist/api/QOptionGroup.json +76 -5
- package/dist/api/QPage.json +2 -1
- package/dist/api/QPageScroller.json +8 -4
- package/dist/api/QPageSticky.json +2 -1
- package/dist/api/QPagination.json +10 -6
- package/dist/api/QParallax.json +2 -1
- package/dist/api/QPopupEdit.json +5 -2
- package/dist/api/QPopupProxy.json +7 -4
- package/dist/api/QRange.json +600 -111
- package/dist/api/QRating.json +5 -2
- package/dist/api/QResizeObserver.json +4 -1
- package/dist/api/QRouteTab.json +35 -13
- package/dist/api/QScrollArea.json +29 -6
- package/dist/api/QScrollObserver.json +13 -1
- package/dist/api/QSelect.json +76 -47
- package/dist/api/QSeparator.json +2 -1
- package/dist/api/QSkeleton.json +8 -4
- package/dist/api/QSlideItem.json +9 -0
- package/dist/api/QSlideTransition.json +2 -1
- package/dist/api/QSlider.json +512 -43
- package/dist/api/QSpinner.json +2 -1
- package/dist/api/QSplitter.json +4 -2
- package/dist/api/QStep.json +2 -1
- package/dist/api/QStepper.json +6 -3
- package/dist/api/QTab.json +4 -2
- package/dist/api/QTabPanels.json +6 -3
- package/dist/api/QTable.json +154 -88
- package/dist/api/QTabs.json +4 -2
- package/dist/api/QTime.json +16 -4
- package/dist/api/QTimeline.json +4 -2
- package/dist/api/QTimelineEntry.json +4 -2
- package/dist/api/QToggle.json +8 -4
- package/dist/api/QTooltip.json +18 -9
- package/dist/api/QTree.json +34 -19
- package/dist/api/QUploader.json +28 -6
- package/dist/api/QVirtualScroll.json +26 -11
- package/dist/api/ScrollFire.json +1 -1
- package/dist/api/TouchHold.json +2 -1
- package/dist/api/TouchRepeat.json +2 -1
- package/dist/api/TouchSwipe.json +2 -1
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +268 -184
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +340 -263
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +272 -212
- package/dist/quasar.umd.js +16522 -16213
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/transforms/loader-asset-urls.json +20 -0
- package/dist/types/api/cookies.d.ts +1 -1
- package/dist/types/api/slider.d.ts +46 -0
- package/dist/types/api/validation.d.ts +4 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/composables.d.ts +3 -3
- package/dist/types/index.d.ts +759 -177
- package/dist/vetur/quasar-attributes.json +251 -83
- package/dist/vetur/quasar-tags.json +59 -17
- package/dist/web-types/web-types.json +587 -155
- package/package.json +1 -1
- package/src/api.extends.json +0 -1
- package/src/components/breadcrumbs/QBreadcrumbs.js +7 -2
- package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +14 -8
- package/src/components/btn/QBtn.js +6 -5
- package/src/components/btn/use-btn.js +21 -21
- package/src/components/btn/use-btn.json +22 -13
- package/src/components/btn-dropdown/QBtnDropdown.json +1 -0
- package/src/components/btn-toggle/QBtnToggle.json +3 -0
- package/src/components/checkbox/use-checkbox.js +1 -1
- package/src/components/chip/QChip.json +1 -2
- package/src/components/color/QColor.js +32 -26
- package/src/components/color/QColor.sass +10 -23
- package/src/components/date/QDate.json +25 -1
- package/src/components/date/QDate.sass +2 -0
- package/src/components/drawer/QDrawer.js +18 -15
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/editor/QEditor.sass +10 -1
- package/src/components/expansion-item/QExpansionItem.js +4 -1
- package/src/components/expansion-item/QExpansionItem.json +2 -1
- package/src/components/fab/QFab.js +18 -12
- package/src/components/fab/QFab.json +36 -1
- package/src/components/fab/QFab.sass +1 -1
- package/src/components/fab/QFabAction.js +14 -7
- package/src/components/fab/QFabAction.json +10 -0
- package/src/components/field/QField.json +3 -3
- package/src/components/file/QFile.js +12 -5
- package/src/components/file/QFile.json +9 -6
- package/src/components/file/QFile.sass +4 -2
- package/src/components/footer/QFooter.js +1 -1
- package/src/components/form/QForm.json +2 -3
- package/src/components/header/QHeader.js +1 -1
- package/src/components/icon/QIcon.js +2 -2
- package/src/components/infinite-scroll/QInfiniteScroll.js +4 -5
- package/src/components/item/QItem.js +2 -3
- package/src/components/layout/QLayout.json +8 -1
- package/src/components/linear-progress/QLinearProgress.js +3 -2
- package/src/components/linear-progress/QLinearProgress.sass +1 -1
- package/src/components/option-group/QOptionGroup.js +3 -0
- package/src/components/option-group/QOptionGroup.json +48 -2
- package/src/components/pagination/QPagination.json +0 -1
- package/src/components/parallax/QParallax.js +4 -2
- package/src/components/popup-edit/QPopupEdit.js +2 -5
- package/src/components/popup-edit/QPopupEdit.json +1 -0
- package/src/components/popup-proxy/QPopupProxy.json +2 -1
- package/src/components/radio/QRadio.js +2 -7
- package/src/components/range/QRange.js +103 -222
- package/src/components/range/QRange.json +11 -121
- package/src/components/rating/QRating.json +1 -1
- package/src/components/resize-observer/QResizeObserver.json +2 -0
- package/src/components/scroll-area/QScrollArea.js +10 -13
- package/src/components/scroll-area/QScrollArea.json +29 -9
- package/src/components/scroll-observer/QScrollObserver.json +11 -0
- package/src/components/select/QSelect.json +41 -15
- package/src/components/slide-item/QSlideItem.json +9 -0
- package/src/components/slider/QSlider.js +46 -132
- package/src/components/slider/QSlider.json +1 -121
- package/src/components/slider/QSlider.sass +198 -132
- package/src/components/slider/use-slider.js +453 -109
- package/src/components/slider/use-slider.json +546 -0
- package/src/components/stepper/QStepper.js +3 -3
- package/src/components/stepper/QStepper.sass +24 -26
- package/src/components/table/QTable.js +27 -47
- package/src/components/table/QTable.json +104 -55
- package/src/components/table/table-pagination.js +4 -0
- package/src/components/tabs/QRouteTab.js +1 -2
- package/src/components/tabs/QRouteTab.json +0 -7
- package/src/components/tabs/QTabs.js +71 -20
- package/src/components/tabs/use-tab.js +26 -13
- package/src/components/time/QTime.json +8 -0
- package/src/components/tree/QTree.js +14 -12
- package/src/components/tree/QTree.json +26 -21
- package/src/components/tree/QTree.sass +45 -41
- package/src/components/uploader/QUploader.json +14 -2
- package/src/components/uploader/uploader-core.js +16 -9
- package/src/components/uploader/xhr-uploader-plugin.json +8 -3
- package/src/components/virtual-scroll/QVirtualScroll.json +15 -0
- package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
- package/src/components/virtual-scroll/use-virtual-scroll.js +30 -17
- package/src/components/virtual-scroll/use-virtual-scroll.json +7 -5
- package/src/composables/private/use-field.js +5 -5
- package/src/composables/private/use-file.js +20 -5
- package/src/composables/private/use-form.js +2 -3
- package/src/composables/private/use-fullscreen.js +15 -4
- package/src/composables/private/use-router-link.js +44 -23
- package/src/composables/private/use-router-link.json +26 -10
- package/src/composables/private/use-split-attrs.js +7 -10
- package/src/composables/private/use-validate.js +21 -15
- package/src/composables/private/use-validate.json +1 -0
- package/src/css/core/helpers.sass +3 -0
- package/src/css/core/positioning.sass +5 -0
- package/src/directives/Mutation.json +2 -3
- package/src/directives/ScrollFire.js +1 -0
- package/src/directives/ScrollFire.json +2 -3
- package/src/icon-set.js +2 -4
- package/src/plugins/AppFullscreen.js +70 -53
- package/src/plugins/AppFullscreen.json +8 -8
- package/src/plugins/AppVisibility.js +2 -3
- package/src/plugins/BottomSheet.js +3 -5
- package/src/plugins/Cookies.json +2 -2
- package/src/plugins/Dialog.js +3 -5
- package/src/plugins/Dialog.json +6 -5
- package/src/plugins/LoadingBar.js +17 -18
- package/src/plugins/LoadingBar.json +4 -3
- package/src/plugins/Notify.js +296 -295
- package/src/plugins/Notify.json +13 -19
- package/src/plugins/Platform.js +14 -14
- package/src/utils/date.js +4 -4
- package/src/utils/dom.js +2 -2
- package/src/utils/open-url.js +2 -2
- package/src/utils/patterns.js +1 -0
- package/src/utils/private/define-reactive-plugin.js +10 -8
- package/src/utils/private/global-dialog.js +6 -8
- package/src/utils/private/global-dialog.json +6 -0
- package/src/utils/private/inject-obj-prop.js +13 -0
- package/src/utils/private/is.js +2 -2
|
@@ -64,6 +64,10 @@ export function useTablePaginationState (vm, getCellValue) {
|
|
|
64
64
|
nextTick(() => {
|
|
65
65
|
emit('request', {
|
|
66
66
|
pagination: prop.pagination || computedPagination.value,
|
|
67
|
+
// FIXME: 'props.filter' is string/object, but 'prop.filter' can be controlled by the user, and the docs are suggesting 'prop.filter' is a function
|
|
68
|
+
// So, value of 'filter' becomes function/string/object, which makes a lot of things unpredictable and can break things
|
|
69
|
+
// Either update the docs to say 'prop.filter' should be a string/object, or use 'prop.filter || props.filterMethod' or maybe get 'computedFilterFunction' here and use that instead of 'props.filterMethod'
|
|
70
|
+
// The examples on our docs are using 'filter' as a string in onRequest handler, but the JSON API is saying 'filter' is a function
|
|
67
71
|
filter: prop.filter || props.filter,
|
|
68
72
|
getCellValue
|
|
69
73
|
})
|
|
@@ -87,6 +87,7 @@ export default createComponent({
|
|
|
87
87
|
)
|
|
88
88
|
|
|
89
89
|
const tabList = []
|
|
90
|
+
const hasFocus = ref(false)
|
|
90
91
|
|
|
91
92
|
let localFromRoute = false, animateTimer, scrollTimer, unwatchRoute
|
|
92
93
|
let localUpdateArrows = arrowsEnabled.value === true
|
|
@@ -126,7 +127,7 @@ export default createComponent({
|
|
|
126
127
|
)
|
|
127
128
|
|
|
128
129
|
const innerClass = computed(() =>
|
|
129
|
-
'q-tabs__content row no-wrap items-center self-stretch hide-scrollbar '
|
|
130
|
+
'q-tabs__content row no-wrap items-center self-stretch hide-scrollbar relative-position '
|
|
130
131
|
+ alignClass.value
|
|
131
132
|
+ (props.contentClass !== void 0 ? ` ${ props.contentClass }` : '')
|
|
132
133
|
+ ($q.platform.is.mobile === true ? ' scroll' : '')
|
|
@@ -201,7 +202,7 @@ export default createComponent({
|
|
|
201
202
|
contentRef.value[ domProps.value.scroll ],
|
|
202
203
|
Array.prototype.reduce.call(
|
|
203
204
|
contentRef.value.children,
|
|
204
|
-
(acc, el) => acc + el[ domProps.value.content ],
|
|
205
|
+
(acc, el) => acc + (el[ domProps.value.content ] || 0),
|
|
205
206
|
0
|
|
206
207
|
)
|
|
207
208
|
),
|
|
@@ -260,23 +261,27 @@ export default createComponent({
|
|
|
260
261
|
}
|
|
261
262
|
|
|
262
263
|
if (newTab && scrollable.value === true) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
scrollToTabEl(newTab.rootRef.value)
|
|
265
|
+
}
|
|
266
|
+
}
|
|
266
267
|
|
|
267
|
-
|
|
268
|
+
function scrollToTabEl (el) {
|
|
269
|
+
const
|
|
270
|
+
{ left, width, top, height } = contentRef.value.getBoundingClientRect(),
|
|
271
|
+
newPos = el.getBoundingClientRect()
|
|
268
272
|
|
|
269
|
-
|
|
270
|
-
contentRef.value[ props.vertical === true ? 'scrollTop' : 'scrollLeft' ] += Math.floor(offset)
|
|
271
|
-
localUpdateArrows()
|
|
272
|
-
return
|
|
273
|
-
}
|
|
273
|
+
let offset = props.vertical === true ? newPos.top - top : newPos.left - left
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
if (offset < 0) {
|
|
276
|
+
contentRef.value[ props.vertical === true ? 'scrollTop' : 'scrollLeft' ] += Math.floor(offset)
|
|
277
|
+
localUpdateArrows()
|
|
278
|
+
return
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
offset += props.vertical === true ? newPos.height - height : newPos.width - width
|
|
282
|
+
if (offset > 0) {
|
|
283
|
+
contentRef.value[ props.vertical === true ? 'scrollTop' : 'scrollLeft' ] += Math.ceil(offset)
|
|
284
|
+
localUpdateArrows()
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
287
|
|
|
@@ -312,17 +317,56 @@ export default createComponent({
|
|
|
312
317
|
}
|
|
313
318
|
|
|
314
319
|
function scrollToStart () {
|
|
315
|
-
animScrollTo(rtlPosCorrection.value === true ?
|
|
320
|
+
animScrollTo(rtlPosCorrection.value === true ? Number.MAX_SAFE_INTEGER : 0)
|
|
316
321
|
}
|
|
317
322
|
|
|
318
323
|
function scrollToEnd () {
|
|
319
|
-
animScrollTo(rtlPosCorrection.value === true ? 0 :
|
|
324
|
+
animScrollTo(rtlPosCorrection.value === true ? 0 : Number.MAX_SAFE_INTEGER)
|
|
320
325
|
}
|
|
321
326
|
|
|
322
327
|
function stopAnimScroll () {
|
|
323
328
|
clearInterval(scrollTimer)
|
|
324
329
|
}
|
|
325
330
|
|
|
331
|
+
function onKbdNavigate (keyCode, fromEl) {
|
|
332
|
+
const tabs = Array.prototype.filter.call(
|
|
333
|
+
contentRef.value.children,
|
|
334
|
+
el => el === fromEl || (el.matches && el.matches('.q-tab.q-focusable') === true)
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
const len = tabs.length
|
|
338
|
+
if (len === 0) { return }
|
|
339
|
+
|
|
340
|
+
if (keyCode === 36) { // Home
|
|
341
|
+
scrollToTabEl(tabs[ 0 ])
|
|
342
|
+
return true
|
|
343
|
+
}
|
|
344
|
+
if (keyCode === 35) { // End
|
|
345
|
+
scrollToTabEl(tabs[ len - 1 ])
|
|
346
|
+
return true
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const dirPrev = (props.vertical === true && keyCode === 38 /* ArrowUp */)
|
|
350
|
+
|| (props.vertical !== true && keyCode === 37 /* ArrowLeft */)
|
|
351
|
+
|
|
352
|
+
const dirNext = (props.vertical === true && keyCode === 40 /* ArrowDown */)
|
|
353
|
+
|| (props.vertical !== true && keyCode === 39 /* ArrowRight */)
|
|
354
|
+
|
|
355
|
+
const dir = dirPrev === true ? -1 : (dirNext === true ? 1 : void 0)
|
|
356
|
+
|
|
357
|
+
if (dir !== void 0) {
|
|
358
|
+
const rtlDir = isRTL.value === true ? -1 : 1
|
|
359
|
+
const index = tabs.indexOf(fromEl) + dir * rtlDir
|
|
360
|
+
|
|
361
|
+
if (index >= 0 && index < len) {
|
|
362
|
+
scrollToTabEl(tabs[ index ])
|
|
363
|
+
tabs[ index ].focus({ preventScroll: true })
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
return true
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
326
370
|
// let's speed up execution of time-sensitive scrollTowards()
|
|
327
371
|
// with a computed variable by directly applying the minimal
|
|
328
372
|
// number of instructions on get/set functions
|
|
@@ -368,7 +412,7 @@ export default createComponent({
|
|
|
368
412
|
}
|
|
369
413
|
|
|
370
414
|
function getRouteList () {
|
|
371
|
-
return tabList.filter(tab => tab.routerProps !== void 0 && tab.routerProps.
|
|
415
|
+
return tabList.filter(tab => tab.routerProps !== void 0 && tab.routerProps.hasRouterLink.value === true)
|
|
372
416
|
}
|
|
373
417
|
|
|
374
418
|
// do not use directly; use verifyRouteModel() instead
|
|
@@ -440,6 +484,9 @@ export default createComponent({
|
|
|
440
484
|
}
|
|
441
485
|
}
|
|
442
486
|
|
|
487
|
+
function onFocusin () { hasFocus.value = true }
|
|
488
|
+
function onFocusout () { hasFocus.value = false }
|
|
489
|
+
|
|
443
490
|
function verifyRouteModel () {
|
|
444
491
|
if ($tabs.avoidRouteWatcher !== true) {
|
|
445
492
|
registerTimeout(updateActiveRoute)
|
|
@@ -485,6 +532,7 @@ export default createComponent({
|
|
|
485
532
|
const $tabs = {
|
|
486
533
|
currentModel,
|
|
487
534
|
tabProps,
|
|
535
|
+
hasFocus,
|
|
488
536
|
|
|
489
537
|
registerTab,
|
|
490
538
|
unregisterTab,
|
|
@@ -492,6 +540,7 @@ export default createComponent({
|
|
|
492
540
|
verifyRouteModel,
|
|
493
541
|
updateModel,
|
|
494
542
|
recalculateScroll,
|
|
543
|
+
onKbdNavigate,
|
|
495
544
|
|
|
496
545
|
avoidRouteWatcher: false
|
|
497
546
|
}
|
|
@@ -543,7 +592,9 @@ export default createComponent({
|
|
|
543
592
|
return h('div', {
|
|
544
593
|
ref: rootRef,
|
|
545
594
|
class: classes.value,
|
|
546
|
-
role: 'tablist'
|
|
595
|
+
role: 'tablist',
|
|
596
|
+
onFocusin,
|
|
597
|
+
onFocusout
|
|
547
598
|
}, child)
|
|
548
599
|
}
|
|
549
600
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { h, ref, computed, inject, onBeforeUnmount, onMounted, withDirectives } from 'vue'
|
|
1
|
+
import { h, ref, computed, inject, onBeforeUnmount, onMounted, withDirectives, getCurrentInstance } from 'vue'
|
|
2
2
|
|
|
3
3
|
import QIcon from '../icon/QIcon.js'
|
|
4
4
|
|
|
5
5
|
import Ripple from '../../directives/Ripple.js'
|
|
6
6
|
|
|
7
7
|
import { hMergeSlot } from '../../utils/private/render.js'
|
|
8
|
-
import { isKeyCode } from '../../utils/private/key-composition.js'
|
|
8
|
+
import { isKeyCode, shouldIgnoreKey } from '../../utils/private/key-composition.js'
|
|
9
9
|
import { tabsKey } from '../../utils/private/symbols.js'
|
|
10
|
+
import { stopAndPrevent } from '../../utils/event.js'
|
|
10
11
|
|
|
11
12
|
let uid = 0
|
|
12
13
|
|
|
13
|
-
export const useTabEmits = [ 'click', '
|
|
14
|
+
export const useTabEmits = [ 'click', 'keydown' ]
|
|
14
15
|
|
|
15
16
|
export const useTabProps = {
|
|
16
17
|
icon: String,
|
|
@@ -42,14 +43,19 @@ export default function (props, slots, emit, routerProps) {
|
|
|
42
43
|
console.error('QTab/QRouteTab component needs to be child of QTabs')
|
|
43
44
|
})
|
|
44
45
|
|
|
46
|
+
const { proxy } = getCurrentInstance()
|
|
47
|
+
|
|
45
48
|
const blurTargetRef = ref(null)
|
|
46
49
|
const rootRef = ref(null)
|
|
47
50
|
const tabIndicatorRef = ref(null)
|
|
48
51
|
|
|
49
52
|
const ripple = computed(() => (
|
|
50
|
-
props.disable === true
|
|
53
|
+
props.disable === true || props.ripple === false
|
|
51
54
|
? false
|
|
52
|
-
:
|
|
55
|
+
: Object.assign(
|
|
56
|
+
{ keyCodes: [ 13, 32 ], early: true },
|
|
57
|
+
props.ripple === true ? {} : props.ripple
|
|
58
|
+
)
|
|
53
59
|
))
|
|
54
60
|
|
|
55
61
|
const isActive = computed(() => $tabs.currentModel.value === props.name)
|
|
@@ -79,7 +85,9 @@ export default function (props, slots, emit, routerProps) {
|
|
|
79
85
|
)
|
|
80
86
|
|
|
81
87
|
const tabIndex = computed(() => (
|
|
82
|
-
props.disable === true ||
|
|
88
|
+
props.disable === true || $tabs.hasFocus.value === true
|
|
89
|
+
? -1
|
|
90
|
+
: props.tabindex || 0
|
|
83
91
|
))
|
|
84
92
|
|
|
85
93
|
function onClick (e, keyboard) {
|
|
@@ -89,12 +97,12 @@ export default function (props, slots, emit, routerProps) {
|
|
|
89
97
|
let go
|
|
90
98
|
|
|
91
99
|
if (routerProps !== void 0) {
|
|
92
|
-
if (routerProps.
|
|
100
|
+
if (routerProps.hasRouterLink.value === true) {
|
|
93
101
|
go = () => {
|
|
94
102
|
e.__qNavigate = true
|
|
95
103
|
$tabs.avoidRouteWatcher = true
|
|
96
104
|
|
|
97
|
-
const res = routerProps.
|
|
105
|
+
const res = routerProps.navigateToRouterLink(e)
|
|
98
106
|
|
|
99
107
|
if (res === false) {
|
|
100
108
|
$tabs.avoidRouteWatcher = false
|
|
@@ -123,9 +131,14 @@ export default function (props, slots, emit, routerProps) {
|
|
|
123
131
|
}
|
|
124
132
|
}
|
|
125
133
|
|
|
126
|
-
function
|
|
127
|
-
isKeyCode(e, 13
|
|
128
|
-
|
|
134
|
+
function onKeydown (e) {
|
|
135
|
+
if (isKeyCode(e, [ 13, 32 ])) {
|
|
136
|
+
onClick(e, true)
|
|
137
|
+
}
|
|
138
|
+
else if (shouldIgnoreKey(e) !== true && e.keyCode >= 35 && e.keyCode <= 40) {
|
|
139
|
+
$tabs.onKbdNavigate(e.keyCode, proxy.$el) === true && stopAndPrevent(e)
|
|
140
|
+
}
|
|
141
|
+
emit('keydown', e)
|
|
129
142
|
}
|
|
130
143
|
|
|
131
144
|
function getContent () {
|
|
@@ -201,10 +214,10 @@ export default function (props, slots, emit, routerProps) {
|
|
|
201
214
|
class: classes.value,
|
|
202
215
|
tabindex: tabIndex.value,
|
|
203
216
|
role: 'tab',
|
|
204
|
-
'aria-selected': isActive.value,
|
|
217
|
+
'aria-selected': isActive.value === true ? 'true' : 'false',
|
|
205
218
|
'aria-disabled': props.disable === true ? 'true' : void 0,
|
|
206
219
|
onClick,
|
|
207
|
-
|
|
220
|
+
onKeydown,
|
|
208
221
|
...customData
|
|
209
222
|
}
|
|
210
223
|
|
|
@@ -123,41 +123,49 @@
|
|
|
123
123
|
"definition": {
|
|
124
124
|
"year": {
|
|
125
125
|
"type": "Number",
|
|
126
|
+
"required": true,
|
|
126
127
|
"desc": "The year",
|
|
127
128
|
"__exemption": [ "examples" ]
|
|
128
129
|
},
|
|
129
130
|
"month": {
|
|
130
131
|
"type": "Number",
|
|
132
|
+
"required": true,
|
|
131
133
|
"desc": "The month",
|
|
132
134
|
"__exemption": [ "examples" ]
|
|
133
135
|
},
|
|
134
136
|
"day": {
|
|
135
137
|
"type": "Number",
|
|
138
|
+
"required": true,
|
|
136
139
|
"desc": "The day of the month",
|
|
137
140
|
"__exemption": [ "examples" ]
|
|
138
141
|
},
|
|
139
142
|
"hour": {
|
|
140
143
|
"type": "Number",
|
|
144
|
+
"required": true,
|
|
141
145
|
"desc": "The hour",
|
|
142
146
|
"__exemption": [ "examples" ]
|
|
143
147
|
},
|
|
144
148
|
"minute": {
|
|
145
149
|
"type": "Number",
|
|
150
|
+
"required": true,
|
|
146
151
|
"desc": "The minute",
|
|
147
152
|
"__exemption": [ "examples" ]
|
|
148
153
|
},
|
|
149
154
|
"second": {
|
|
150
155
|
"type": "Number",
|
|
156
|
+
"required": true,
|
|
151
157
|
"desc": "The second",
|
|
152
158
|
"__exemption": [ "examples" ]
|
|
153
159
|
},
|
|
154
160
|
"millisecond": {
|
|
155
161
|
"type": "Number",
|
|
162
|
+
"required": true,
|
|
156
163
|
"desc": "The millisecond",
|
|
157
164
|
"__exemption": [ "examples" ]
|
|
158
165
|
},
|
|
159
166
|
"changed": {
|
|
160
167
|
"type": "Boolean",
|
|
168
|
+
"required": true,
|
|
161
169
|
"desc": "Did the model change?"
|
|
162
170
|
}
|
|
163
171
|
}
|
|
@@ -13,6 +13,7 @@ import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
|
|
|
13
13
|
import { createComponent } from '../../utils/private/create.js'
|
|
14
14
|
import { stopAndPrevent } from '../../utils/event.js'
|
|
15
15
|
import { shouldIgnoreKey } from '../../utils/private/key-composition.js'
|
|
16
|
+
import { injectProp } from '../../utils/private/inject-obj-prop.js'
|
|
16
17
|
|
|
17
18
|
const tickStrategyOptions = [ 'none', 'strict', 'leaf', 'leaf-filtered' ]
|
|
18
19
|
|
|
@@ -431,18 +432,19 @@ export default createComponent({
|
|
|
431
432
|
function getSlotScope (node, meta, key) {
|
|
432
433
|
const scope = { tree: proxy, node, key, color: props.color, dark: isDark.value }
|
|
433
434
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
435
|
+
injectProp(
|
|
436
|
+
scope,
|
|
437
|
+
'expanded',
|
|
438
|
+
() => { return meta.expanded },
|
|
439
|
+
val => { val !== meta.expanded && setExpanded(key, val) }
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
injectProp(
|
|
443
|
+
scope,
|
|
444
|
+
'ticked',
|
|
445
|
+
() => { return meta.ticked },
|
|
446
|
+
val => { val !== meta.ticked && setTicked([ key ], val) }
|
|
447
|
+
)
|
|
446
448
|
|
|
447
449
|
return scope
|
|
448
450
|
}
|
|
@@ -186,9 +186,9 @@
|
|
|
186
186
|
"reactive": true
|
|
187
187
|
},
|
|
188
188
|
"tree": {
|
|
189
|
-
"type": "
|
|
190
|
-
"
|
|
191
|
-
"
|
|
189
|
+
"type": "Component",
|
|
190
|
+
"tsType": "QTree",
|
|
191
|
+
"desc": "QTree instance"
|
|
192
192
|
},
|
|
193
193
|
"node": {
|
|
194
194
|
"type": "Object",
|
|
@@ -226,9 +226,9 @@
|
|
|
226
226
|
"reactive": true
|
|
227
227
|
},
|
|
228
228
|
"tree": {
|
|
229
|
-
"type": "
|
|
230
|
-
"
|
|
231
|
-
"
|
|
229
|
+
"type": "Component",
|
|
230
|
+
"tsType": "QTree",
|
|
231
|
+
"desc": "QTree instance"
|
|
232
232
|
},
|
|
233
233
|
"node": {
|
|
234
234
|
"type": "Object",
|
|
@@ -266,9 +266,9 @@
|
|
|
266
266
|
"reactive": true
|
|
267
267
|
},
|
|
268
268
|
"tree": {
|
|
269
|
-
"type": "
|
|
270
|
-
"
|
|
271
|
-
"
|
|
269
|
+
"type": "Component",
|
|
270
|
+
"tsType": "QTree",
|
|
271
|
+
"desc": "QTree instance"
|
|
272
272
|
},
|
|
273
273
|
"node": {
|
|
274
274
|
"type": "Object",
|
|
@@ -306,9 +306,9 @@
|
|
|
306
306
|
"reactive": true
|
|
307
307
|
},
|
|
308
308
|
"tree": {
|
|
309
|
-
"type": "
|
|
310
|
-
"
|
|
311
|
-
"
|
|
309
|
+
"type": "Component",
|
|
310
|
+
"tsType": "QTree",
|
|
311
|
+
"desc": "QTree instance"
|
|
312
312
|
},
|
|
313
313
|
"node": {
|
|
314
314
|
"type": "Object",
|
|
@@ -354,21 +354,25 @@
|
|
|
354
354
|
"definition": {
|
|
355
355
|
"node": {
|
|
356
356
|
"type": "Object",
|
|
357
|
+
"required": true,
|
|
357
358
|
"desc": "The node to which the new nodes (the children) will be appended",
|
|
358
359
|
"__exemption": [ "examples" ]
|
|
359
360
|
},
|
|
360
361
|
"key": {
|
|
361
362
|
"type": "String",
|
|
363
|
+
"required": true,
|
|
362
364
|
"desc": "The key of the node getting the newly loaded child nodes",
|
|
363
365
|
"examples": [ "New Node" ]
|
|
364
366
|
},
|
|
365
367
|
"done": {
|
|
366
368
|
"type": "Function",
|
|
369
|
+
"required": true,
|
|
367
370
|
"desc": "The callback to be carried out when the loading is successful",
|
|
368
371
|
"params": {
|
|
369
372
|
"children": {
|
|
370
373
|
"type": "Array",
|
|
371
374
|
"desc": "Array of nodes",
|
|
375
|
+
"default": "[]",
|
|
372
376
|
"__exemption": [ "examples" ]
|
|
373
377
|
}
|
|
374
378
|
},
|
|
@@ -376,6 +380,7 @@
|
|
|
376
380
|
},
|
|
377
381
|
"fail": {
|
|
378
382
|
"type": "Function",
|
|
383
|
+
"required": true,
|
|
379
384
|
"desc": "The callback to be carried out should the loading fails",
|
|
380
385
|
"params": null,
|
|
381
386
|
"returns": null
|
|
@@ -422,8 +427,8 @@
|
|
|
422
427
|
"params": {
|
|
423
428
|
"key": {
|
|
424
429
|
"type": "Any",
|
|
425
|
-
"desc": "The key of a node",
|
|
426
430
|
"required": true,
|
|
431
|
+
"desc": "The key of a node",
|
|
427
432
|
"examples": [ "Node 1" ]
|
|
428
433
|
}
|
|
429
434
|
},
|
|
@@ -457,8 +462,8 @@
|
|
|
457
462
|
"params": {
|
|
458
463
|
"key": {
|
|
459
464
|
"type": "Any",
|
|
460
|
-
"desc": "The key of a node",
|
|
461
465
|
"required": true,
|
|
466
|
+
"desc": "The key of a node",
|
|
462
467
|
"examples": [ "Node 1" ]
|
|
463
468
|
}
|
|
464
469
|
},
|
|
@@ -481,14 +486,14 @@
|
|
|
481
486
|
"params": {
|
|
482
487
|
"key": {
|
|
483
488
|
"type": "Any",
|
|
484
|
-
"desc": "The key of a node",
|
|
485
489
|
"required": true,
|
|
490
|
+
"desc": "The key of a node",
|
|
486
491
|
"examples": [ "Node 1" ]
|
|
487
492
|
},
|
|
488
493
|
"state": {
|
|
489
494
|
"type": "Boolean",
|
|
490
|
-
"
|
|
491
|
-
"
|
|
495
|
+
"required": true,
|
|
496
|
+
"desc": "Set to 'true' to expand the branch of the tree, otherwise 'false' collapses it"
|
|
492
497
|
}
|
|
493
498
|
}
|
|
494
499
|
},
|
|
@@ -498,8 +503,8 @@
|
|
|
498
503
|
"params": {
|
|
499
504
|
"key": {
|
|
500
505
|
"type": "Any",
|
|
501
|
-
"desc": "The key of a node",
|
|
502
506
|
"required": true,
|
|
507
|
+
"desc": "The key of a node",
|
|
503
508
|
"examples": [ "Node 1" ]
|
|
504
509
|
}
|
|
505
510
|
},
|
|
@@ -514,14 +519,14 @@
|
|
|
514
519
|
"params": {
|
|
515
520
|
"keys": {
|
|
516
521
|
"type": "Array",
|
|
517
|
-
"desc": "The keys of nodes to tick/untick",
|
|
518
522
|
"required": true,
|
|
523
|
+
"desc": "The keys of nodes to tick/untick",
|
|
519
524
|
"examples": [ "[ 'Node 1', 'Node 2' ]" ]
|
|
520
525
|
},
|
|
521
526
|
"state": {
|
|
522
527
|
"type": "Boolean",
|
|
523
|
-
"
|
|
524
|
-
"
|
|
528
|
+
"required": true,
|
|
529
|
+
"desc": "Set to 'true' to tick the checkbox of nodes, otherwise 'false' unticks them"
|
|
525
530
|
}
|
|
526
531
|
}
|
|
527
532
|
}
|
|
@@ -130,47 +130,51 @@
|
|
|
130
130
|
.q-tree__node-body:after
|
|
131
131
|
display: none !important
|
|
132
132
|
|
|
133
|
-
&--dense
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
133
|
+
&--dense
|
|
134
|
+
> .q-tree__node--child > .q-tree__node-header
|
|
135
|
+
padding-left: 1px
|
|
136
|
+
|
|
137
|
+
.q-tree
|
|
138
|
+
&__arrow,
|
|
139
|
+
&__spinner
|
|
140
|
+
margin-right: 1px
|
|
141
|
+
|
|
142
|
+
&__img
|
|
143
|
+
height: 32px
|
|
144
|
+
|
|
145
|
+
&__tickbox
|
|
146
|
+
margin-right: 3px
|
|
147
|
+
|
|
148
|
+
&__node
|
|
149
|
+
padding: 0
|
|
150
|
+
&:after
|
|
151
|
+
top: 0
|
|
152
|
+
left: -8px
|
|
153
|
+
|
|
154
|
+
&__node-header
|
|
155
|
+
margin-top: 0
|
|
156
|
+
padding: 1px
|
|
157
|
+
&:before
|
|
158
|
+
top: 0
|
|
159
|
+
left: -8px
|
|
160
|
+
width: 8px
|
|
161
|
+
|
|
162
|
+
&__node--child
|
|
163
|
+
padding-left: 17px
|
|
164
|
+
> .q-tree__node-header:before
|
|
165
|
+
left: -25px
|
|
166
|
+
width: 21px
|
|
167
|
+
|
|
168
|
+
&__node-body
|
|
169
|
+
padding: 0 0 2px
|
|
170
|
+
|
|
171
|
+
&__node--parent > .q-tree__node-collapsible > .q-tree__node-body
|
|
172
|
+
padding: 0 0 2px 20px
|
|
173
|
+
&:after
|
|
174
|
+
left: 8px
|
|
175
|
+
|
|
176
|
+
&__children
|
|
177
|
+
padding-left: 16px
|
|
174
178
|
|
|
175
179
|
[dir=rtl]
|
|
176
180
|
.q-tree__arrow
|
|
@@ -67,12 +67,24 @@
|
|
|
67
67
|
"slots": {
|
|
68
68
|
"header": {
|
|
69
69
|
"desc": "Slot for custom header; Scope is the QUploader instance itself",
|
|
70
|
-
"
|
|
70
|
+
"scope": {
|
|
71
|
+
"...self": {
|
|
72
|
+
"type": "Component",
|
|
73
|
+
"tsType": "QUploader",
|
|
74
|
+
"desc": "QUploader instance"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
71
77
|
},
|
|
72
78
|
|
|
73
79
|
"list": {
|
|
74
80
|
"desc": "Slot for custom list; Scope is the QUploader instance itself",
|
|
75
|
-
"
|
|
81
|
+
"scope": {
|
|
82
|
+
"...self": {
|
|
83
|
+
"type": "Component",
|
|
84
|
+
"tsType": "QUploader",
|
|
85
|
+
"desc": "QUploader instance"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
76
88
|
}
|
|
77
89
|
},
|
|
78
90
|
|