quasar 2.17.7 → 2.18.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/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 +2 -2
- 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 +251 -175
- package/dist/quasar.css +8 -5
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +14 -6
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +8 -5
- package/dist/quasar.server.prod.cjs +15 -15
- package/dist/quasar.server.prod.js +10 -10
- package/dist/quasar.umd.js +251 -175
- package/dist/quasar.umd.prod.js +17 -17
- 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 +14 -1
- package/lang/ar.js +14 -1
- package/lang/az-Latn.js +14 -1
- package/lang/bg.js +14 -1
- package/lang/bn.js +14 -1
- package/lang/bs-BA.js +14 -1
- package/lang/ca.js +14 -1
- package/lang/cs.js +14 -1
- package/lang/da.js +14 -1
- package/lang/de-CH.js +14 -1
- package/lang/de-DE.js +14 -1
- package/lang/de.js +14 -1
- package/lang/el.js +14 -1
- package/lang/en-GB.js +14 -1
- package/lang/en-US.js +14 -1
- package/lang/eo.js +14 -1
- package/lang/es.js +14 -1
- package/lang/et.js +14 -1
- package/lang/eu.js +14 -1
- package/lang/fa-IR.js +14 -1
- package/lang/fa.js +14 -1
- package/lang/fi.js +14 -1
- package/lang/fr.js +14 -1
- package/lang/gn.js +14 -1
- package/lang/he.js +14 -1
- package/lang/hi.js +14 -1
- package/lang/hr.js +14 -1
- package/lang/hu.js +14 -1
- package/lang/id.js +14 -1
- package/lang/index.json +1 -1
- package/lang/is.js +14 -1
- package/lang/it.js +14 -1
- package/lang/ja.js +14 -1
- package/lang/kk.js +14 -1
- package/lang/km.js +14 -1
- package/lang/ko-KR.js +14 -1
- package/lang/kur-CKB.js +14 -1
- package/lang/lt.js +14 -1
- package/lang/lu.js +14 -1
- package/lang/lv.js +14 -1
- package/lang/mk.js +14 -1
- package/lang/ml.js +14 -1
- package/lang/mm.js +14 -1
- package/lang/ms-MY.js +14 -1
- package/lang/ms.js +14 -1
- package/lang/my.js +14 -1
- package/lang/nb-NO.js +14 -1
- package/lang/nl.js +14 -1
- package/lang/pl.js +14 -1
- package/lang/pt-BR.js +14 -1
- package/lang/pt.js +14 -1
- package/lang/ro.js +14 -1
- package/lang/ru.js +14 -1
- package/lang/sk.js +14 -1
- package/lang/sl.js +14 -1
- package/lang/sm.js +14 -1
- package/lang/sr-CYR.js +14 -1
- package/lang/sr.js +14 -1
- package/lang/sv.js +14 -1
- package/lang/ta.js +14 -1
- package/lang/th.js +14 -1
- package/lang/tl.js +14 -1
- package/lang/tr.js +14 -1
- package/lang/ug.js +8 -1
- package/lang/uk.js +14 -1
- package/lang/ur-PK.js +118 -0
- package/lang/uz-Cyrl.js +14 -1
- package/lang/uz-Latn.js +14 -1
- package/lang/vi.js +14 -1
- package/lang/zh-CN.js +14 -1
- package/lang/zh-TW.js +14 -1
- package/package.json +4 -4
- 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/chip/QChip.sass +8 -4
- package/src/components/color/QColor.js +1 -1
- package/src/components/date/QDate.js +6 -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 +9 -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 +28 -2
- 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
|
@@ -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
|
}
|
|
@@ -960,6 +962,7 @@ export default createComponent({
|
|
|
960
962
|
|
|
961
963
|
return [
|
|
962
964
|
h('span', {
|
|
965
|
+
class: 'ellipsis',
|
|
963
966
|
[ valueAsHtml.value === true ? 'innerHTML' : 'textContent' ]: ariaCurrentValue.value
|
|
964
967
|
})
|
|
965
968
|
]
|
|
@@ -1214,7 +1217,7 @@ export default createComponent({
|
|
|
1214
1217
|
|
|
1215
1218
|
function onDialogFieldFocus (e) {
|
|
1216
1219
|
stop(e)
|
|
1217
|
-
targetRef.value
|
|
1220
|
+
targetRef.value?.focus()
|
|
1218
1221
|
dialogFieldFocused.value = true
|
|
1219
1222
|
window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0)
|
|
1220
1223
|
}
|
|
@@ -1511,7 +1514,7 @@ export default createComponent({
|
|
|
1511
1514
|
|
|
1512
1515
|
if (hasDialog !== true && menu.value === true) {
|
|
1513
1516
|
closeMenu()
|
|
1514
|
-
targetRef.value
|
|
1517
|
+
targetRef.value?.focus()
|
|
1515
1518
|
return
|
|
1516
1519
|
}
|
|
1517
1520
|
|
|
@@ -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
|
|
|
@@ -91,10 +91,14 @@ export default createComponent({
|
|
|
91
91
|
tableClass: [ String, Array, Object ],
|
|
92
92
|
tableHeaderStyle: [ String, Array, Object ],
|
|
93
93
|
tableHeaderClass: [ String, Array, Object ],
|
|
94
|
+
tableRowStyleFn: Function,
|
|
95
|
+
tableRowClassFn: Function,
|
|
94
96
|
cardContainerClass: [ String, Array, Object ],
|
|
95
97
|
cardContainerStyle: [ String, Array, Object ],
|
|
96
98
|
cardStyle: [ String, Array, Object ],
|
|
97
99
|
cardClass: [ String, Array, Object ],
|
|
100
|
+
cardStyleFn: Function,
|
|
101
|
+
cardClassFn: Function,
|
|
98
102
|
|
|
99
103
|
hideBottom: Boolean,
|
|
100
104
|
hideSelectedBanner: Boolean,
|
|
@@ -148,7 +152,7 @@ export default createComponent({
|
|
|
148
152
|
+ (props.bordered === true ? ' q-table--bordered' : '')
|
|
149
153
|
)
|
|
150
154
|
|
|
151
|
-
const
|
|
155
|
+
const containerClass = computed(() =>
|
|
152
156
|
`q-table__container q-table--${ props.separator }-separator column no-wrap`
|
|
153
157
|
+ (props.grid === true ? ' q-table--grid' : cardDefaultClass.value)
|
|
154
158
|
+ (isDark.value === true ? ' q-table--dark' : '')
|
|
@@ -157,13 +161,13 @@ export default createComponent({
|
|
|
157
161
|
+ (inFullscreen.value === true ? ' fullscreen scroll' : '')
|
|
158
162
|
)
|
|
159
163
|
|
|
160
|
-
const
|
|
161
|
-
|
|
164
|
+
const rootContainerClass = computed(() =>
|
|
165
|
+
containerClass.value + (props.loading === true ? ' q-table--loading' : '')
|
|
162
166
|
)
|
|
163
167
|
|
|
164
168
|
watch(
|
|
165
|
-
() => props.tableStyle + props.tableClass + props.tableHeaderStyle + props.tableHeaderClass +
|
|
166
|
-
() => { hasVirtScroll.value === true && virtScrollRef.value
|
|
169
|
+
() => props.tableStyle + props.tableClass + props.tableHeaderStyle + props.tableHeaderClass + containerClass.value,
|
|
170
|
+
() => { hasVirtScroll.value === true && virtScrollRef.value?.reset() }
|
|
167
171
|
)
|
|
168
172
|
|
|
169
173
|
const {
|
|
@@ -382,13 +386,26 @@ export default createComponent({
|
|
|
382
386
|
selected = isRowSelected(key)
|
|
383
387
|
|
|
384
388
|
if (bodySlot !== void 0) {
|
|
389
|
+
const cfg = {
|
|
390
|
+
key,
|
|
391
|
+
row,
|
|
392
|
+
pageIndex,
|
|
393
|
+
__trClass: selected ? 'selected' : ''
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
if (props.tableRowStyleFn !== void 0) {
|
|
397
|
+
cfg.__trStyle = props.tableRowStyleFn(row)
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (props.tableRowClassFn !== void 0) {
|
|
401
|
+
const cls = props.tableRowClassFn(row)
|
|
402
|
+
if (cls) {
|
|
403
|
+
cfg.__trClass = `${ cls } ${ cfg.__trClass }`
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
385
407
|
return bodySlot(
|
|
386
|
-
getBodyScope(
|
|
387
|
-
key,
|
|
388
|
-
row,
|
|
389
|
-
pageIndex,
|
|
390
|
-
__trClass: selected ? 'selected' : ''
|
|
391
|
-
})
|
|
408
|
+
getBodyScope(cfg)
|
|
392
409
|
)
|
|
393
410
|
}
|
|
394
411
|
|
|
@@ -451,6 +468,17 @@ export default createComponent({
|
|
|
451
468
|
}
|
|
452
469
|
}
|
|
453
470
|
|
|
471
|
+
if (props.tableRowStyleFn !== void 0) {
|
|
472
|
+
data.style = props.tableRowStyleFn(row)
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (props.tableRowClassFn !== void 0) {
|
|
476
|
+
const cls = props.tableRowClassFn(row)
|
|
477
|
+
if (cls) {
|
|
478
|
+
data.class[ cls ] = true
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
454
482
|
return h('tr', data, child)
|
|
455
483
|
}
|
|
456
484
|
|
|
@@ -792,30 +820,28 @@ export default createComponent({
|
|
|
792
820
|
h('div', { class: 'q-table__separator col' })
|
|
793
821
|
)
|
|
794
822
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
h('
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
)
|
|
818
|
-
}
|
|
823
|
+
hasOpts === true && child.push(
|
|
824
|
+
h('div', { class: 'q-table__control' }, [
|
|
825
|
+
h('span', { class: 'q-table__bottom-item' }, [
|
|
826
|
+
props.rowsPerPageLabel || $q.lang.table.recordsPerPage
|
|
827
|
+
]),
|
|
828
|
+
h(QSelect, {
|
|
829
|
+
class: 'q-table__select inline q-table__bottom-item',
|
|
830
|
+
color: props.color,
|
|
831
|
+
modelValue: rowsPerPage,
|
|
832
|
+
options: computedRowsPerPageOptions.value,
|
|
833
|
+
displayValue: rowsPerPage === 0
|
|
834
|
+
? $q.lang.table.allRows
|
|
835
|
+
: rowsPerPage,
|
|
836
|
+
dark: isDark.value,
|
|
837
|
+
borderless: true,
|
|
838
|
+
dense: true,
|
|
839
|
+
optionsDense: true,
|
|
840
|
+
optionsCover: true,
|
|
841
|
+
'onUpdate:modelValue': onPagSelection
|
|
842
|
+
})
|
|
843
|
+
])
|
|
844
|
+
)
|
|
819
845
|
|
|
820
846
|
if (paginationSlot !== void 0) {
|
|
821
847
|
control = paginationSlot(marginalsScope.value)
|
|
@@ -847,6 +873,7 @@ export default createComponent({
|
|
|
847
873
|
...btnProps,
|
|
848
874
|
icon: navIcon.value[ 0 ],
|
|
849
875
|
disable: isFirstPage.value,
|
|
876
|
+
ariaLabel: $q.lang.pagination.first,
|
|
850
877
|
onClick: firstPage
|
|
851
878
|
})
|
|
852
879
|
)
|
|
@@ -857,6 +884,7 @@ export default createComponent({
|
|
|
857
884
|
...btnProps,
|
|
858
885
|
icon: navIcon.value[ 1 ],
|
|
859
886
|
disable: isFirstPage.value,
|
|
887
|
+
ariaLabel: $q.lang.pagination.prev,
|
|
860
888
|
onClick: prevPage
|
|
861
889
|
}),
|
|
862
890
|
|
|
@@ -865,6 +893,7 @@ export default createComponent({
|
|
|
865
893
|
...btnProps,
|
|
866
894
|
icon: navIcon.value[ 2 ],
|
|
867
895
|
disable: isLastPage.value,
|
|
896
|
+
ariaLabel: $q.lang.pagination.next,
|
|
868
897
|
onClick: nextPage
|
|
869
898
|
})
|
|
870
899
|
)
|
|
@@ -875,6 +904,7 @@ export default createComponent({
|
|
|
875
904
|
...btnProps,
|
|
876
905
|
icon: navIcon.value[ 3 ],
|
|
877
906
|
disable: isLastPage.value,
|
|
907
|
+
ariaLabel: $q.lang.pagination.last,
|
|
878
908
|
onClick: lastPage
|
|
879
909
|
})
|
|
880
910
|
)
|
|
@@ -945,6 +975,17 @@ export default createComponent({
|
|
|
945
975
|
style: props.cardStyle
|
|
946
976
|
}
|
|
947
977
|
|
|
978
|
+
if (props.cardStyleFn !== void 0) {
|
|
979
|
+
data.style = [ data.style, props.cardStyleFn(scope.row) ]
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
if (props.cardClassFn !== void 0) {
|
|
983
|
+
const cls = props.cardClassFn(scope.row)
|
|
984
|
+
if (cls) {
|
|
985
|
+
data.class[ 0 ] += ` ${ cls }`
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
948
989
|
if (
|
|
949
990
|
props.onRowClick !== void 0
|
|
950
991
|
|| props.onRowDblclick !== void 0
|
|
@@ -1020,7 +1061,7 @@ export default createComponent({
|
|
|
1020
1061
|
|
|
1021
1062
|
return () => {
|
|
1022
1063
|
const child = [ getTopDiv() ]
|
|
1023
|
-
const data = { ref: rootRef, class:
|
|
1064
|
+
const data = { ref: rootRef, class: rootContainerClass.value }
|
|
1024
1065
|
|
|
1025
1066
|
if (props.grid === true) {
|
|
1026
1067
|
child.push(getGridHeader())
|