quasar 2.17.7 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/QBtnDropdown.json +1 -1
- package/dist/api/QDialog.json +1 -1
- package/dist/api/QMenu.json +1 -1
- package/dist/api/QSelect.json +1 -1
- package/dist/api/QTable.json +1 -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/fontawesome-v6-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6.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/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.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/mdi-v7.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-fontawesome-v6.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-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v7.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-TN.umd.prod.js +2 -2
- package/dist/lang/ar.umd.prod.js +2 -2
- package/dist/lang/az-Latn.umd.prod.js +2 -2
- package/dist/lang/bg.umd.prod.js +2 -2
- package/dist/lang/bn.umd.prod.js +2 -2
- package/dist/lang/bs-BA.umd.prod.js +2 -2
- package/dist/lang/ca.umd.prod.js +2 -2
- package/dist/lang/cs.umd.prod.js +2 -2
- package/dist/lang/da.umd.prod.js +2 -2
- package/dist/lang/de-CH.umd.prod.js +2 -2
- package/dist/lang/de-DE.umd.prod.js +2 -2
- package/dist/lang/de.umd.prod.js +2 -2
- package/dist/lang/el.umd.prod.js +2 -2
- package/dist/lang/en-GB.umd.prod.js +2 -2
- package/dist/lang/en-US.umd.prod.js +2 -2
- package/dist/lang/eo.umd.prod.js +2 -2
- package/dist/lang/es.umd.prod.js +2 -2
- package/dist/lang/et.umd.prod.js +2 -2
- package/dist/lang/eu.umd.prod.js +2 -2
- package/dist/lang/fa-IR.umd.prod.js +2 -2
- package/dist/lang/fa.umd.prod.js +2 -2
- package/dist/lang/fi.umd.prod.js +2 -2
- package/dist/lang/fr.umd.prod.js +2 -2
- package/dist/lang/gn.umd.prod.js +2 -2
- package/dist/lang/he.umd.prod.js +2 -2
- package/dist/lang/hi.umd.prod.js +2 -2
- package/dist/lang/hr.umd.prod.js +2 -2
- package/dist/lang/hu.umd.prod.js +2 -2
- package/dist/lang/id.umd.prod.js +2 -2
- package/dist/lang/is.umd.prod.js +2 -2
- package/dist/lang/it.umd.prod.js +2 -2
- package/dist/lang/ja.umd.prod.js +2 -2
- package/dist/lang/kk.umd.prod.js +2 -2
- package/dist/lang/km.umd.prod.js +2 -2
- package/dist/lang/ko-KR.umd.prod.js +2 -2
- package/dist/lang/kur-CKB.umd.prod.js +2 -2
- package/dist/lang/lt.umd.prod.js +2 -2
- package/dist/lang/lu.umd.prod.js +2 -2
- package/dist/lang/lv.umd.prod.js +2 -2
- package/dist/lang/mk.umd.prod.js +2 -2
- package/dist/lang/ml.umd.prod.js +2 -2
- package/dist/lang/mm.umd.prod.js +2 -2
- package/dist/lang/ms-MY.umd.prod.js +2 -2
- package/dist/lang/ms.umd.prod.js +2 -2
- package/dist/lang/my.umd.prod.js +2 -2
- package/dist/lang/nb-NO.umd.prod.js +2 -2
- package/dist/lang/nl.umd.prod.js +2 -2
- package/dist/lang/pl.umd.prod.js +2 -2
- package/dist/lang/pt-BR.umd.prod.js +2 -2
- package/dist/lang/pt.umd.prod.js +2 -2
- package/dist/lang/ro.umd.prod.js +2 -2
- package/dist/lang/ru.umd.prod.js +2 -2
- package/dist/lang/sk.umd.prod.js +2 -2
- package/dist/lang/sl.umd.prod.js +2 -2
- package/dist/lang/sm.umd.prod.js +2 -2
- package/dist/lang/sr-CYR.umd.prod.js +2 -2
- package/dist/lang/sr.umd.prod.js +2 -2
- package/dist/lang/sv.umd.prod.js +2 -2
- package/dist/lang/ta.umd.prod.js +2 -2
- package/dist/lang/th.umd.prod.js +2 -2
- package/dist/lang/tl.umd.prod.js +2 -2
- package/dist/lang/tr.umd.prod.js +2 -2
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +2 -2
- package/dist/lang/ur-PK.umd.prod.js +7 -0
- package/dist/lang/uz-Cyrl.umd.prod.js +2 -2
- package/dist/lang/uz-Latn.umd.prod.js +2 -2
- package/dist/lang/vi.umd.prod.js +2 -2
- package/dist/lang/zh-CN.umd.prod.js +2 -2
- package/dist/lang/zh-TW.umd.prod.js +2 -2
- package/dist/quasar.client.js +237 -174
- package/dist/quasar.css +1 -1
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +1 -1
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +2 -2
- package/dist/quasar.server.prod.cjs +15 -15
- package/dist/quasar.server.prod.js +8 -8
- package/dist/quasar.umd.js +237 -174
- package/dist/quasar.umd.prod.js +15 -15
- package/dist/types/index.d.ts +52 -3
- package/dist/vetur/quasar-attributes.json +1 -1
- package/dist/vetur/quasar-tags.json +1 -1
- package/dist/web-types/web-types.json +1 -1
- package/lang/ar-TN.js +6 -0
- package/lang/ar.js +6 -0
- package/lang/az-Latn.js +6 -0
- package/lang/bg.js +6 -0
- package/lang/bn.js +6 -0
- package/lang/bs-BA.js +6 -0
- package/lang/ca.js +6 -0
- package/lang/cs.js +6 -0
- package/lang/da.js +6 -0
- package/lang/de-CH.js +6 -0
- package/lang/de-DE.js +6 -0
- package/lang/de.js +6 -0
- package/lang/el.js +6 -0
- package/lang/en-GB.js +6 -0
- package/lang/en-US.js +6 -0
- package/lang/eo.js +6 -0
- package/lang/es.js +6 -0
- package/lang/et.js +6 -0
- package/lang/eu.js +6 -0
- package/lang/fa-IR.js +6 -0
- package/lang/fa.js +6 -0
- package/lang/fi.js +6 -0
- package/lang/fr.js +6 -0
- package/lang/gn.js +6 -0
- package/lang/he.js +6 -0
- package/lang/hi.js +6 -0
- package/lang/hr.js +6 -0
- package/lang/hu.js +6 -0
- package/lang/id.js +6 -0
- package/lang/index.json +1 -1
- package/lang/is.js +6 -0
- package/lang/it.js +6 -0
- package/lang/ja.js +6 -0
- package/lang/kk.js +6 -0
- package/lang/km.js +6 -0
- package/lang/ko-KR.js +6 -0
- package/lang/kur-CKB.js +6 -0
- package/lang/lt.js +6 -0
- package/lang/lu.js +6 -0
- package/lang/lv.js +6 -0
- package/lang/mk.js +6 -0
- package/lang/ml.js +6 -0
- package/lang/mm.js +6 -0
- package/lang/ms-MY.js +6 -0
- package/lang/ms.js +6 -0
- package/lang/my.js +6 -0
- package/lang/nb-NO.js +6 -0
- package/lang/nl.js +6 -0
- package/lang/pl.js +6 -0
- package/lang/pt-BR.js +6 -0
- package/lang/pt.js +6 -0
- package/lang/ro.js +6 -0
- package/lang/ru.js +6 -0
- package/lang/sk.js +6 -0
- package/lang/sl.js +6 -0
- package/lang/sm.js +6 -0
- package/lang/sr-CYR.js +6 -0
- package/lang/sr.js +6 -0
- package/lang/sv.js +6 -0
- package/lang/ta.js +6 -0
- package/lang/th.js +6 -0
- package/lang/tl.js +6 -0
- package/lang/tr.js +6 -0
- package/lang/uk.js +6 -0
- package/lang/ur-PK.js +111 -0
- package/lang/uz-Cyrl.js +6 -0
- package/lang/uz-Latn.js +6 -0
- package/lang/vi.js +6 -0
- package/lang/zh-CN.js +6 -0
- package/lang/zh-TW.js +6 -0
- package/package.json +3 -3
- package/src/components/breadcrumbs/QBreadcrumbs.js +2 -2
- package/src/components/btn/QBtn.js +7 -8
- package/src/components/btn-dropdown/QBtnDropdown.js +10 -4
- package/src/components/btn-dropdown/QBtnDropdown.json +21 -0
- package/src/components/color/QColor.js +1 -1
- package/src/components/date/QDate.js +1 -1
- package/src/components/dialog/QDialog.js +2 -2
- package/src/components/dialog/QDialog.json +1 -1
- package/src/components/drawer/QDrawer.js +3 -5
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/editor/editor-caret.js +1 -1
- package/src/components/editor/editor-utils.js +2 -2
- package/src/components/expansion-item/QExpansionItem.js +6 -3
- package/src/components/fab/QFab.js +2 -2
- package/src/components/form/QForm.js +2 -2
- package/src/components/form/QFormChildMixin.js +6 -4
- package/src/components/icon/QIcon.js +2 -2
- package/src/components/infinite-scroll/QInfiniteScroll.js +2 -4
- package/src/components/input/QInput.js +3 -3
- package/src/components/item/QItem.js +1 -1
- package/src/components/menu/QMenu.js +8 -5
- package/src/components/menu/QMenu.json +8 -1
- package/src/components/pagination/QPagination.js +8 -4
- package/src/components/parallax/QParallax.js +1 -1
- package/src/components/popup-edit/QPopupEdit.js +2 -2
- package/src/components/pull-to-refresh/QPullToRefresh.js +1 -1
- package/src/components/rating/QRating.sass +1 -1
- package/src/components/resize-observer/QResizeObserver.js +1 -1
- package/src/components/scroll-observer/QScrollObserver.js +2 -2
- package/src/components/select/QSelect.js +8 -6
- package/src/components/select/QSelect.json +1 -1
- package/src/components/slide-transition/QSlideTransition.js +2 -2
- package/src/components/stepper/StepHeader.js +1 -1
- package/src/components/table/QTable.js +77 -36
- package/src/components/table/QTable.json +98 -0
- package/src/components/table/QTr.js +4 -1
- package/src/components/table/table-sort.js +1 -1
- package/src/components/tabs/QTabs.js +2 -2
- package/src/components/tabs/use-tab.js +4 -4
- package/src/components/time/QTime.js +1 -1
- package/src/components/tree/QTree.js +2 -3
- package/src/components/virtual-scroll/use-virtual-scroll.js +3 -3
- package/src/composables/private.use-field/use-field.js +5 -5
- package/src/composables/private.use-file/use-file.js +6 -3
- package/src/composables/private.use-model-toggle/use-model-toggle.js +2 -2
- package/src/composables/private.use-refocus-target/use-refocus-target.js +6 -5
- package/src/composables/private.use-validate/use-validate.js +1 -1
- package/src/directives/intersection/Intersection.js +2 -2
- package/src/directives/morph/Morph.js +2 -2
- package/src/directives/mutation/Mutation.js +2 -2
- package/src/directives/touch-hold/TouchHold.js +2 -2
- package/src/directives/touch-pan/TouchPan.js +2 -2
- package/src/directives/touch-repeat/TouchRepeat.js +3 -3
- package/src/directives/touch-swipe/TouchSwipe.js +3 -3
- package/src/plugins/lang/Lang.test.js +12 -0
- package/src/plugins/loading/Loading.js +1 -1
- package/src/plugins/notify/Notify.js +1 -1
- package/src/plugins/private.body/Body.js +1 -1
- package/src/plugins/private.history/History.js +1 -1
- package/src/plugins/screen/Screen.js +1 -1
- package/src/utils/morph/morph.js +13 -10
- package/src/utils/open-url/open-url.js +3 -3
- package/src/utils/private.dialog/create-dialog.js +2 -2
- package/src/utils/private.portal/portal.js +1 -1
- package/src/components/date/__tests__/QDate.cy.js +0 -189
- package/src/components/date/__tests__/use-datetime.cy.js +0 -83
- package/src/components/editor/__tests__/QEditor.cy.js +0 -195
- package/src/components/field/__tests__/QField.cy.js +0 -156
- package/src/components/input/__tests__/QInput.cy.js +0 -786
- package/src/components/input/__tests__/use-mask.cy.js +0 -124
- package/src/components/menu/__tests__/QMenu.cy.js +0 -634
- package/src/components/menu/__tests__/WrapperOne.vue +0 -51
- package/src/components/menu/__tests__/WrapperTwo.vue +0 -38
- package/src/components/select/__tests__/QSelect.cy.js +0 -2018
- package/src/components/table/__tests__/QTable.cy.js +0 -635
- package/src/components/table/__tests__/QTd.cy.js +0 -35
- package/src/components/table/__tests__/QTh.cy.js +0 -27
- package/src/components/table/__tests__/QTr.cy.js +0 -27
- package/src/components/tabs/__tests__/QTab.cy.js +0 -79
- package/src/components/tabs/__tests__/QTabs.cy.js +0 -147
- package/src/components/uploader/__tests__/QUploader.cy.js +0 -191
- package/src/composables/__tests__/FieldWrapper.vue +0 -54
- package/src/composables/__tests__/use-anchor.cy.js +0 -98
- package/src/composables/__tests__/use-field.cy.js +0 -547
- package/src/composables/__tests__/use-file.cy.js +0 -69
- package/src/composables/__tests__/use-fullscreen.cy.js +0 -37
- package/src/composables/__tests__/use-model-toggle.cy.js +0 -350
- package/src/composables/__tests__/use-portal.cy.js +0 -4
- package/src/composables/__tests__/use-router-link.cy.js +0 -55
- package/src/composables/__tests__/use-validate.cy.js +0 -257
|
@@ -180,7 +180,7 @@ export default createComponent({
|
|
|
180
180
|
animating.value = true
|
|
181
181
|
|
|
182
182
|
if (props.noFocus !== true) {
|
|
183
|
-
document.activeElement
|
|
183
|
+
document.activeElement?.blur()
|
|
184
184
|
registerTick(focus)
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
@@ -230,7 +230,7 @@ export default createComponent({
|
|
|
230
230
|
hidePortal()
|
|
231
231
|
|
|
232
232
|
if (refocusTarget !== null) {
|
|
233
|
-
((evt
|
|
233
|
+
((evt?.type.indexOf('key') === 0
|
|
234
234
|
? refocusTarget.closest('[tabindex]:not([tabindex^="-"])')
|
|
235
235
|
: void 0
|
|
236
236
|
) || refocusTarget).focus()
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
},
|
|
135
135
|
|
|
136
136
|
"escape-key": {
|
|
137
|
-
"desc": "Emitted when ESC key is pressed; Does not get emitted if Dialog is 'persistent' or it has 'no-esc-
|
|
137
|
+
"desc": "Emitted when ESC key is pressed; Does not get emitted if Dialog is 'persistent' or it has 'no-esc-dismiss' set"
|
|
138
138
|
},
|
|
139
139
|
|
|
140
140
|
"click": { "internal": true }
|
|
@@ -120,7 +120,7 @@ export default createComponent({
|
|
|
120
120
|
|
|
121
121
|
if (belowBreakpoint.value === true) {
|
|
122
122
|
const otherInstance = $layout.instances[ otherSide.value ]
|
|
123
|
-
if (otherInstance
|
|
123
|
+
if (otherInstance?.belowBreakpoint === true) {
|
|
124
124
|
otherInstance.hide(false)
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -472,9 +472,7 @@ export default createComponent({
|
|
|
472
472
|
timerMini = setTimeout(() => {
|
|
473
473
|
timerMini = null
|
|
474
474
|
flagMiniAnimate.value = false
|
|
475
|
-
|
|
476
|
-
vm.proxy.$el.classList.remove('q-drawer--mini-animate')
|
|
477
|
-
}
|
|
475
|
+
vm?.proxy?.$el?.classList.remove('q-drawer--mini-animate')
|
|
478
476
|
}, 150)
|
|
479
477
|
}
|
|
480
478
|
|
|
@@ -622,7 +620,7 @@ export default createComponent({
|
|
|
622
620
|
})
|
|
623
621
|
|
|
624
622
|
onBeforeUnmount(() => {
|
|
625
|
-
layoutTotalWidthWatcher
|
|
623
|
+
layoutTotalWidthWatcher?.()
|
|
626
624
|
|
|
627
625
|
if (timerMini !== null) {
|
|
628
626
|
clearTimeout(timerMini)
|
|
@@ -54,7 +54,7 @@ function getBtn (eVm, btn, clickHandler, active = false) {
|
|
|
54
54
|
disable: btn.disable ? (typeof btn.disable === 'function' ? btn.disable(eVm) : true) : false,
|
|
55
55
|
size: 'sm',
|
|
56
56
|
onClick (e) {
|
|
57
|
-
clickHandler
|
|
57
|
+
clickHandler?.()
|
|
58
58
|
run(e, btn, eVm)
|
|
59
59
|
}
|
|
60
60
|
}, () => child)
|
|
@@ -120,7 +120,7 @@ function getDropdown (eVm, btn) {
|
|
|
120
120
|
dense: true,
|
|
121
121
|
onClick (e) {
|
|
122
122
|
closeDropdown()
|
|
123
|
-
|
|
123
|
+
e?.qAvoidFocus !== true && eVm.contentRef.value?.focus()
|
|
124
124
|
eVm.caret.restore()
|
|
125
125
|
run(e, btn, eVm)
|
|
126
126
|
}
|
|
@@ -150,7 +150,7 @@ export default createComponent({
|
|
|
150
150
|
})
|
|
151
151
|
|
|
152
152
|
watch(() => props.group, name => {
|
|
153
|
-
exitGroup
|
|
153
|
+
exitGroup?.()
|
|
154
154
|
name !== void 0 && enterGroup()
|
|
155
155
|
})
|
|
156
156
|
|
|
@@ -164,7 +164,10 @@ export default createComponent({
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
function toggleIcon (e, keyboard) {
|
|
167
|
-
keyboard !== true &&
|
|
167
|
+
if (keyboard !== true && e.qAvoidFocus !== true) {
|
|
168
|
+
blurTargetRef.value?.focus()
|
|
169
|
+
}
|
|
170
|
+
|
|
168
171
|
toggle(e)
|
|
169
172
|
stopAndPrevent(e)
|
|
170
173
|
}
|
|
@@ -360,7 +363,7 @@ export default createComponent({
|
|
|
360
363
|
props.group !== void 0 && enterGroup()
|
|
361
364
|
|
|
362
365
|
onBeforeUnmount(() => {
|
|
363
|
-
exitGroup
|
|
366
|
+
exitGroup?.()
|
|
364
367
|
})
|
|
365
368
|
|
|
366
369
|
return () => h('div', { class: classes.value }, [
|
|
@@ -114,7 +114,7 @@ export default createComponent({
|
|
|
114
114
|
if (props.onSubmit !== void 0) {
|
|
115
115
|
emit('submit', evt)
|
|
116
116
|
}
|
|
117
|
-
else if (evt
|
|
117
|
+
else if (evt?.target !== void 0 && typeof evt.target.submit === 'function') {
|
|
118
118
|
evt.target.submit()
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -143,7 +143,7 @@ export default createComponent({
|
|
|
143
143
|
|| rootRef.value.querySelector('[autofocus], [data-autofocus]')
|
|
144
144
|
|| Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex !== -1)
|
|
145
145
|
|
|
146
|
-
target
|
|
146
|
+
target?.focus({ preventScroll: true })
|
|
147
147
|
})
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -30,13 +30,15 @@ export default {
|
|
|
30
30
|
|
|
31
31
|
mounted () {
|
|
32
32
|
// register to parent QForm
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (this.disable !== true) {
|
|
34
|
+
this.$.provides[ formKey ]?.bindComponent(this)
|
|
35
|
+
}
|
|
35
36
|
},
|
|
36
37
|
|
|
37
38
|
beforeUnmount () {
|
|
38
39
|
// un-register from parent QForm
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
if (this.disable !== true) {
|
|
41
|
+
this.$.provides[ formKey ]?.unbindComponent(this)
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -20,7 +20,8 @@ const libMap = {
|
|
|
20
20
|
'ion-logo': ionFn,
|
|
21
21
|
'iconfont ': sameFn,
|
|
22
22
|
'ti-': i => `themify-icon ${ i }`,
|
|
23
|
-
'bi-': i => `bootstrap-icons ${ i }
|
|
23
|
+
'bi-': i => `bootstrap-icons ${ i }`,
|
|
24
|
+
'i-': sameFn // UnoCSS pure icons
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
const matMap = {
|
|
@@ -186,7 +187,6 @@ export default createComponent({
|
|
|
186
187
|
class: classes.value,
|
|
187
188
|
style: sizeStyle.value,
|
|
188
189
|
'aria-hidden': 'true',
|
|
189
|
-
role: 'presentation'
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
if (type.value.none === true) {
|
|
@@ -126,9 +126,7 @@ export default createComponent({
|
|
|
126
126
|
isWorking.value = false
|
|
127
127
|
isFetching.value = false
|
|
128
128
|
localScrollTarget.removeEventListener('scroll', poll, passive)
|
|
129
|
-
|
|
130
|
-
poll.cancel()
|
|
131
|
-
}
|
|
129
|
+
poll?.cancel?.()
|
|
132
130
|
}
|
|
133
131
|
}
|
|
134
132
|
|
|
@@ -240,7 +238,7 @@ export default createComponent({
|
|
|
240
238
|
// expose public methods
|
|
241
239
|
const vm = getCurrentInstance()
|
|
242
240
|
Object.assign(vm.proxy, {
|
|
243
|
-
poll: () => { poll
|
|
241
|
+
poll: () => { poll?.() },
|
|
244
242
|
trigger, stop, reset, resume, setIndex, updateScrollTarget
|
|
245
243
|
})
|
|
246
244
|
|
|
@@ -203,7 +203,7 @@ export default createComponent({
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
function select () {
|
|
206
|
-
inputRef.value
|
|
206
|
+
inputRef.value?.select()
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
function onPaste (e) {
|
|
@@ -340,7 +340,7 @@ export default createComponent({
|
|
|
340
340
|
emitTimer = null
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
emitValueFn
|
|
343
|
+
emitValueFn?.()
|
|
344
344
|
|
|
345
345
|
emit('change', e.target.value)
|
|
346
346
|
}
|
|
@@ -353,7 +353,7 @@ export default createComponent({
|
|
|
353
353
|
emitTimer = null
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
emitValueFn
|
|
356
|
+
emitValueFn?.()
|
|
357
357
|
|
|
358
358
|
typedNumber = false
|
|
359
359
|
stopValueWatcher = false
|
|
@@ -92,7 +92,7 @@ export default createComponent({
|
|
|
92
92
|
|
|
93
93
|
function onClick (e) {
|
|
94
94
|
if (isClickable.value === true) {
|
|
95
|
-
if (blurTargetRef.value !== null) {
|
|
95
|
+
if (blurTargetRef.value !== null && e.qAvoidFocus !== true) {
|
|
96
96
|
if (e.qKeyEvent !== true && document.activeElement === rootRef.value) {
|
|
97
97
|
blurTargetRef.value.focus()
|
|
98
98
|
}
|
|
@@ -38,7 +38,7 @@ export default createComponent({
|
|
|
38
38
|
persistent: Boolean,
|
|
39
39
|
autoClose: Boolean,
|
|
40
40
|
separateClosePopup: Boolean,
|
|
41
|
-
|
|
41
|
+
noEscDismiss: Boolean,
|
|
42
42
|
noRouteDismiss: Boolean,
|
|
43
43
|
noRefocus: Boolean,
|
|
44
44
|
noFocus: Boolean,
|
|
@@ -177,7 +177,7 @@ export default createComponent({
|
|
|
177
177
|
addFocusFn(() => {
|
|
178
178
|
let node = innerRef.value
|
|
179
179
|
|
|
180
|
-
if (node && node.contains(document.activeElement) !== true) {
|
|
180
|
+
if (node && (node.contains(document.activeElement) !== true)) {
|
|
181
181
|
node = node.querySelector('[autofocus][tabindex], [data-autofocus][tabindex]')
|
|
182
182
|
|| node.querySelector('[autofocus] [tabindex], [data-autofocus] [tabindex]')
|
|
183
183
|
|| node.querySelector('[autofocus], [data-autofocus]')
|
|
@@ -256,10 +256,11 @@ export default createComponent({
|
|
|
256
256
|
|| evt.qClickOutside !== true
|
|
257
257
|
)
|
|
258
258
|
) {
|
|
259
|
-
((evt
|
|
259
|
+
((evt?.type.indexOf('key') === 0
|
|
260
260
|
? refocusTarget.closest('[tabindex]:not([tabindex^="-"])')
|
|
261
261
|
: void 0
|
|
262
262
|
) || refocusTarget).focus()
|
|
263
|
+
|
|
263
264
|
refocusTarget = null
|
|
264
265
|
}
|
|
265
266
|
|
|
@@ -321,8 +322,10 @@ export default createComponent({
|
|
|
321
322
|
}
|
|
322
323
|
|
|
323
324
|
function onEscapeKey (evt) {
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
if (props.noEscDismiss !== true) {
|
|
326
|
+
emit('escapeKey')
|
|
327
|
+
hide(evt)
|
|
328
|
+
}
|
|
326
329
|
}
|
|
327
330
|
|
|
328
331
|
function updatePosition () {
|
|
@@ -67,6 +67,13 @@
|
|
|
67
67
|
"category": "behavior"
|
|
68
68
|
},
|
|
69
69
|
|
|
70
|
+
"no-esc-dismiss": {
|
|
71
|
+
"type": "Boolean",
|
|
72
|
+
"desc": "User cannot dismiss the popup by hitting ESC key; No need to set it if 'persistent' prop is also set",
|
|
73
|
+
"category": "behavior",
|
|
74
|
+
"addedIn": "v2.18"
|
|
75
|
+
},
|
|
76
|
+
|
|
70
77
|
"no-route-dismiss": {
|
|
71
78
|
"type": "Boolean",
|
|
72
79
|
"desc": "Changing route app won't dismiss the popup; No need to set it if 'persistent' prop is also set",
|
|
@@ -128,7 +135,7 @@
|
|
|
128
135
|
|
|
129
136
|
"events": {
|
|
130
137
|
"escape-key": {
|
|
131
|
-
"desc": "Emitted when ESC key is pressed; Does not get emitted if Menu is 'persistent'"
|
|
138
|
+
"desc": "Emitted when ESC key is pressed; Does not get emitted if Menu is 'persistent' or it has 'no-esc-dismiss' set"
|
|
132
139
|
},
|
|
133
140
|
|
|
134
141
|
"click": { "internal": true }
|
|
@@ -317,7 +317,8 @@ export default createComponent({
|
|
|
317
317
|
getBtn({
|
|
318
318
|
key: 'bls',
|
|
319
319
|
disable: props.disable || props.modelValue <= minProp.value,
|
|
320
|
-
icon: icons.value[ 0 ]
|
|
320
|
+
icon: icons.value[ 0 ],
|
|
321
|
+
'aria-label': $q.lang.pagination.first
|
|
321
322
|
}, minProp.value)
|
|
322
323
|
)
|
|
323
324
|
|
|
@@ -325,7 +326,8 @@ export default createComponent({
|
|
|
325
326
|
getBtn({
|
|
326
327
|
key: 'ble',
|
|
327
328
|
disable: props.disable || props.modelValue >= maxProp.value,
|
|
328
|
-
icon: icons.value[ 3 ]
|
|
329
|
+
icon: icons.value[ 3 ],
|
|
330
|
+
'aria-label': $q.lang.pagination.last
|
|
329
331
|
}, maxProp.value)
|
|
330
332
|
)
|
|
331
333
|
}
|
|
@@ -335,7 +337,8 @@ export default createComponent({
|
|
|
335
337
|
getBtn({
|
|
336
338
|
key: 'bdp',
|
|
337
339
|
disable: props.disable || props.modelValue <= minProp.value,
|
|
338
|
-
icon: icons.value[ 1 ]
|
|
340
|
+
icon: icons.value[ 1 ],
|
|
341
|
+
'aria-label': $q.lang.pagination.prev
|
|
339
342
|
}, props.modelValue - 1)
|
|
340
343
|
)
|
|
341
344
|
|
|
@@ -343,7 +346,8 @@ export default createComponent({
|
|
|
343
346
|
getBtn({
|
|
344
347
|
key: 'bdn',
|
|
345
348
|
disable: props.disable || props.modelValue >= maxProp.value,
|
|
346
|
-
icon: icons.value[ 2 ]
|
|
349
|
+
icon: icons.value[ 2 ],
|
|
350
|
+
'aria-label': $q.lang.pagination.next
|
|
347
351
|
}, props.modelValue + 1)
|
|
348
352
|
)
|
|
349
353
|
}
|
|
@@ -163,8 +163,8 @@ export default createComponent({
|
|
|
163
163
|
Object.assign(proxy, {
|
|
164
164
|
set,
|
|
165
165
|
cancel,
|
|
166
|
-
show (e) { menuRef.value
|
|
167
|
-
hide (e) { menuRef.value
|
|
166
|
+
show (e) { menuRef.value?.show(e) },
|
|
167
|
+
hide (e) { menuRef.value?.hide(e) },
|
|
168
168
|
updatePosition
|
|
169
169
|
})
|
|
170
170
|
|
|
@@ -117,7 +117,7 @@ export default createComponent({
|
|
|
117
117
|
function onObjLoad () {
|
|
118
118
|
cleanup()
|
|
119
119
|
|
|
120
|
-
if (targetEl
|
|
120
|
+
if (targetEl?.contentDocument) {
|
|
121
121
|
curDocView = targetEl.contentDocument.defaultView
|
|
122
122
|
curDocView.addEventListener('resize', trigger, listenOpts.passive)
|
|
123
123
|
emitEvent()
|
|
@@ -53,7 +53,7 @@ export default createComponent({
|
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
function emitEvent () {
|
|
56
|
-
clearTimer
|
|
56
|
+
clearTimer?.()
|
|
57
57
|
|
|
58
58
|
const top = Math.max(0, getVerticalScrollPosition(localScrollTarget))
|
|
59
59
|
const left = getHorizontalScrollPosition(localScrollTarget)
|
|
@@ -123,7 +123,7 @@ export default createComponent({
|
|
|
123
123
|
})
|
|
124
124
|
|
|
125
125
|
onBeforeUnmount(() => {
|
|
126
|
-
clearTimer
|
|
126
|
+
clearTimer?.()
|
|
127
127
|
unconfigureScrollTarget()
|
|
128
128
|
})
|
|
129
129
|
|
|
@@ -273,7 +273,7 @@ export default createComponent({
|
|
|
273
273
|
const needsHtmlFn = computed(() => (
|
|
274
274
|
props.optionsHtml === true
|
|
275
275
|
? () => true
|
|
276
|
-
: opt => opt
|
|
276
|
+
: opt => opt?.html === true
|
|
277
277
|
))
|
|
278
278
|
|
|
279
279
|
const valueAsHtml = computed(() => (
|
|
@@ -533,7 +533,7 @@ export default createComponent({
|
|
|
533
533
|
hidePopup()
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
targetRef.value
|
|
536
|
+
targetRef.value?.focus()
|
|
537
537
|
|
|
538
538
|
if (
|
|
539
539
|
innerValue.value.length === 0
|
|
@@ -545,7 +545,9 @@ export default createComponent({
|
|
|
545
545
|
return
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
(hasDialog !== true || dialogFieldFocused.value === true)
|
|
548
|
+
if (hasDialog !== true || dialogFieldFocused.value === true) {
|
|
549
|
+
state.focus()
|
|
550
|
+
}
|
|
549
551
|
|
|
550
552
|
selectInputText()
|
|
551
553
|
|
|
@@ -894,7 +896,7 @@ export default createComponent({
|
|
|
894
896
|
fn(val, mode === 'add-unique')
|
|
895
897
|
|
|
896
898
|
if (props.multiple !== true) {
|
|
897
|
-
targetRef.value
|
|
899
|
+
targetRef.value?.focus()
|
|
898
900
|
hidePopup()
|
|
899
901
|
}
|
|
900
902
|
}
|
|
@@ -1214,7 +1216,7 @@ export default createComponent({
|
|
|
1214
1216
|
|
|
1215
1217
|
function onDialogFieldFocus (e) {
|
|
1216
1218
|
stop(e)
|
|
1217
|
-
targetRef.value
|
|
1219
|
+
targetRef.value?.focus()
|
|
1218
1220
|
dialogFieldFocused.value = true
|
|
1219
1221
|
window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0)
|
|
1220
1222
|
}
|
|
@@ -1511,7 +1513,7 @@ export default createComponent({
|
|
|
1511
1513
|
|
|
1512
1514
|
if (hasDialog !== true && menu.value === true) {
|
|
1513
1515
|
closeMenu()
|
|
1514
|
-
targetRef.value
|
|
1516
|
+
targetRef.value?.focus()
|
|
1515
1517
|
return
|
|
1516
1518
|
}
|
|
1517
1519
|
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
|
|
261
261
|
"fill-input": {
|
|
262
262
|
"type": "Boolean",
|
|
263
|
-
"desc": "Fills the input with current value; Useful along with 'hide-selected'; Does NOT
|
|
263
|
+
"desc": "Fills the input with current value; Useful along with 'hide-selected'; Does NOT work along with 'multiple' selection",
|
|
264
264
|
"category": "behavior"
|
|
265
265
|
},
|
|
266
266
|
|
|
@@ -20,7 +20,7 @@ export default createComponent({
|
|
|
20
20
|
let timer = null, timerFallback = null, animListener, lastEvent
|
|
21
21
|
|
|
22
22
|
function cleanup () {
|
|
23
|
-
doneFn
|
|
23
|
+
doneFn?.()
|
|
24
24
|
doneFn = null
|
|
25
25
|
animating = false
|
|
26
26
|
|
|
@@ -34,7 +34,7 @@ export default createComponent({
|
|
|
34
34
|
timerFallback = null
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
element
|
|
37
|
+
element?.removeEventListener('transitionend', animListener)
|
|
38
38
|
animListener = null
|
|
39
39
|
}
|
|
40
40
|
|