quasar 2.6.6 → 2.7.2
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 -0
- package/dist/api/QBtnToggle.json +1 -0
- package/dist/api/QCarousel.json +2 -1
- package/dist/api/QCheckbox.json +1 -0
- package/dist/api/QChip.json +3 -1
- package/dist/api/QColor.json +1 -0
- package/dist/api/QDate.json +1 -0
- package/dist/api/QDialog.json +6 -0
- package/dist/api/QEditor.json +3 -1
- package/dist/api/QExpansionItem.json +1 -0
- package/dist/api/QFab.json +1 -0
- package/dist/api/QFile.json +1 -0
- package/dist/api/QFooter.json +1 -0
- package/dist/api/QHeader.json +1 -0
- package/dist/api/QInput.json +1 -0
- package/dist/api/QItem.json +3 -1
- package/dist/api/QKnob.json +1 -0
- package/dist/api/QOptionGroup.json +1 -0
- package/dist/api/QPagination.json +2 -1
- package/dist/api/QPopupEdit.json +1 -0
- package/dist/api/QPopupProxy.json +1 -0
- package/dist/api/QRadio.json +1 -0
- package/dist/api/QRange.json +1 -0
- package/dist/api/QRating.json +1 -0
- package/dist/api/QSelect.json +1 -0
- package/dist/api/QSlider.json +1 -0
- package/dist/api/QSplitter.json +1 -0
- package/dist/api/QTable.json +5 -1
- package/dist/api/QTabs.json +1 -0
- package/dist/api/QTime.json +1 -0
- package/dist/api/QToggle.json +1 -0
- package/dist/api/QTree.json +6 -3
- 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 +6 -0
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +6 -0
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +6 -0
- 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-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 +6 -0
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +6 -0
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +6 -0
- 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-TN.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 +2 -2
- 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 +2 -2
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/eu.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 +2 -2
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/kz.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/mm.umd.prod.js +6 -0
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.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/sm.umd.prod.js +6 -0
- 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.addon.rtl.css +251 -0
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +9 -9
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +1229 -9
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +10 -9
- package/dist/quasar.umd.js +182 -126
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/types/api/quploader.d.ts +7 -7
- package/dist/types/extras/icon-set.d.ts +6 -0
- package/dist/types/index.d.ts +265 -255
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils.d.ts +11 -0
- package/dist/vetur/quasar-attributes.json +4 -0
- package/dist/vetur/quasar-tags.json +2 -1
- package/dist/web-types/web-types.json +12 -2
- package/icon-set/material-symbols-outlined.js +133 -0
- package/icon-set/material-symbols-outlined.mjs +128 -0
- package/icon-set/material-symbols-rounded.js +133 -0
- package/icon-set/material-symbols-rounded.mjs +128 -0
- package/icon-set/material-symbols-sharp.js +133 -0
- package/icon-set/material-symbols-sharp.mjs +128 -0
- package/icon-set/svg-material-symbols-outlined.js +201 -0
- package/icon-set/svg-material-symbols-outlined.mjs +201 -0
- package/icon-set/svg-material-symbols-rounded.js +201 -0
- package/icon-set/svg-material-symbols-rounded.mjs +201 -0
- package/icon-set/svg-material-symbols-sharp.js +201 -0
- package/icon-set/svg-material-symbols-sharp.mjs +201 -0
- package/lang/ca.js +31 -31
- package/lang/ca.mjs +31 -31
- package/lang/es.js +1 -1
- package/lang/es.mjs +1 -1
- package/lang/index.json +8 -0
- package/lang/ko-KR.js +21 -21
- package/lang/ko-KR.mjs +21 -21
- package/lang/mm.js +96 -0
- package/lang/mm.mjs +91 -0
- package/lang/sm.js +96 -0
- package/lang/sm.mjs +91 -0
- package/package.json +15 -15
- package/src/api.extends.json +1 -0
- package/src/components/avatar/__tests__/QAvatar.spec.js +1 -1
- package/src/components/badge/QBadge.js +2 -2
- package/src/components/badge/__tests__/QBadge.spec.js +1 -1
- package/src/components/btn/QBtn.js +2 -2
- package/src/components/checkbox/use-checkbox.js +8 -7
- package/src/components/dialog/QDialog.js +3 -1
- package/src/components/dialog/QDialog.json +7 -0
- package/src/components/editor/QEditor.js +11 -25
- package/src/components/file/QFile.js +6 -1
- package/src/components/icon/QIcon.js +24 -1
- package/src/components/icon/QIcon.sass +7 -3
- package/src/components/img/QImg.sass +1 -0
- package/src/components/infinite-scroll/QInfiniteScroll.js +10 -10
- package/src/components/input/QInput.js +6 -1
- package/src/components/item/QItem.js +5 -2
- package/src/components/item/QItem.json +2 -1
- package/src/components/layout/QLayout.js +2 -1
- package/src/components/menu/__tests__/QMenu.spec.js +23 -23
- package/src/components/pagination/QPagination.json +1 -1
- package/src/components/radio/QRadio.js +2 -2
- package/src/components/select/QSelect.js +28 -16
- package/src/components/select/__tests__/QSelect.spec.js +427 -451
- package/src/components/slider/use-slider.js +1 -1
- package/src/components/table/QTable.js +0 -1
- package/src/components/table/QTable.json +3 -0
- package/src/components/table/QTable.sass +1 -1
- package/src/components/tabs/QTabs.sass +0 -6
- package/src/components/uploader/uploader-core.js +23 -18
- package/src/components/virtual-scroll/use-virtual-scroll.js +9 -4
- package/src/composables/private/__tests__/use-anchor.spec.js +6 -6
- package/src/composables/private/__tests__/use-field.spec.js +7 -7
- package/src/composables/private/__tests__/use-model-toggle.spec.js +20 -19
- package/src/composables/private/__tests__/use-size.spec.js +2 -2
- package/src/composables/private/__tests__/use-transition.spec.js +5 -5
- package/src/composables/private/__tests__/use-validate.spec.js +5 -5
- package/src/composables/private/use-anchor.js +1 -1
- package/src/composables/private/use-field.js +2 -1
- package/src/composables/private/use-key-composition.js +16 -13
- package/src/directives/Ripple.js +2 -7
- package/src/utils/date.js +1 -1
- package/src/utils/private/global-dialog.js +22 -10
- package/src/components/select/__tests__/WrapperOne.vue +0 -28
|
@@ -129,7 +129,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
129
129
|
&& innerMin.value < innerMax.value
|
|
130
130
|
))
|
|
131
131
|
|
|
132
|
-
const decimals = computed(() => (String(props.step).trim(
|
|
132
|
+
const decimals = computed(() => (String(props.step).trim().split('.')[ 1 ] || '').length)
|
|
133
133
|
const step = computed(() => (props.step === 0 ? 1 : props.step))
|
|
134
134
|
const tabindex = computed(() => (editable.value === true ? props.tabindex || 0 : -1))
|
|
135
135
|
|
|
@@ -152,7 +152,6 @@ export default createComponent({
|
|
|
152
152
|
|
|
153
153
|
const __containerClass = computed(() =>
|
|
154
154
|
`q-table__container q-table--${ props.separator }-separator column no-wrap`
|
|
155
|
-
+ (props.loading === true ? ' q-table--loading' : '')
|
|
156
155
|
+ (props.grid === true ? ' q-table--grid' : cardDefaultClass.value)
|
|
157
156
|
+ (isDark.value === true ? ' q-table--dark' : '')
|
|
158
157
|
+ (props.dense === true ? ' q-table--dense' : '')
|
|
@@ -676,6 +676,7 @@
|
|
|
676
676
|
"examples": [ 100, 200 ]
|
|
677
677
|
}
|
|
678
678
|
},
|
|
679
|
+
"syncable": true,
|
|
679
680
|
"examples": [
|
|
680
681
|
":pagination=\"myInitialPagination\"",
|
|
681
682
|
"v-model:pagination=\"myPagination\""
|
|
@@ -706,6 +707,7 @@
|
|
|
706
707
|
"type": "Array",
|
|
707
708
|
"desc": "Keeps the user selection array",
|
|
708
709
|
"default": "[]",
|
|
710
|
+
"syncable": true,
|
|
709
711
|
"examples": [
|
|
710
712
|
"v-model:selected=\"selection\""
|
|
711
713
|
],
|
|
@@ -716,6 +718,7 @@
|
|
|
716
718
|
"type": "Array",
|
|
717
719
|
"desc": "Keeps the array with expanded rows keys",
|
|
718
720
|
"default": "[]",
|
|
721
|
+
"syncable": true,
|
|
719
722
|
"examples": [
|
|
720
723
|
"v-model:expanded=\"expanded\""
|
|
721
724
|
],
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
* Separators
|
|
184
184
|
*/
|
|
185
185
|
.q-table--horizontal-separator, .q-table--cell-separator
|
|
186
|
-
thead th, tbody tr:not(:last-child) td
|
|
186
|
+
thead th, tbody tr:not(:last-child) > td
|
|
187
187
|
border-bottom-width: 1px
|
|
188
188
|
|
|
189
189
|
.q-table--vertical-separator, .q-table--cell-separator
|
|
@@ -149,6 +149,7 @@ export function getRenderer (getPlugin) {
|
|
|
149
149
|
+ (props.square === true ? ' q-uploader--square no-border-radius' : '')
|
|
150
150
|
+ (props.flat === true ? ' q-uploader--flat no-shadow' : '')
|
|
151
151
|
+ (props.disable === true ? ' disabled q-uploader--disable' : '')
|
|
152
|
+
+ (dnd.value === true ? ' q-uploader--dnd' : '')
|
|
152
153
|
)
|
|
153
154
|
|
|
154
155
|
const colorClass = computed(() =>
|
|
@@ -339,28 +340,32 @@ export function getRenderer (getPlugin) {
|
|
|
339
340
|
|
|
340
341
|
return [
|
|
341
342
|
h('div', {
|
|
342
|
-
class: 'q-uploader__header-content
|
|
343
|
+
class: 'q-uploader__header-content column'
|
|
343
344
|
}, [
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
props.label !== void 0
|
|
353
|
-
? h('div', { class: 'q-uploader__title' }, [ props.label ])
|
|
345
|
+
h('div', {
|
|
346
|
+
class: 'flex flex-center no-wrap q-gutter-xs'
|
|
347
|
+
}, [
|
|
348
|
+
getBtn(state.queuedFiles.value.length > 0, 'removeQueue', removeQueuedFiles),
|
|
349
|
+
getBtn(state.uploadedFiles.value.length > 0, 'removeUploaded', removeUploadedFiles),
|
|
350
|
+
|
|
351
|
+
state.isUploading.value === true
|
|
352
|
+
? h(QSpinner, { class: 'q-uploader__spinner' })
|
|
354
353
|
: null,
|
|
355
354
|
|
|
356
|
-
h('div', { class: '
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
355
|
+
h('div', { class: 'col column justify-center' }, [
|
|
356
|
+
props.label !== void 0
|
|
357
|
+
? h('div', { class: 'q-uploader__title' }, [ props.label ])
|
|
358
|
+
: null,
|
|
359
|
+
|
|
360
|
+
h('div', { class: 'q-uploader__subtitle' }, [
|
|
361
|
+
uploadSizeLabel.value + ' / ' + uploadProgressLabel.value
|
|
362
|
+
])
|
|
363
|
+
]),
|
|
360
364
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
365
|
+
getBtn(canAddFiles.value, 'add'),
|
|
366
|
+
getBtn(props.hideUploadBtn === false && canUpload.value === true, 'upload', state.upload),
|
|
367
|
+
getBtn(state.isUploading.value, 'clear', state.abort)
|
|
368
|
+
])
|
|
364
369
|
])
|
|
365
370
|
]
|
|
366
371
|
}
|
|
@@ -20,8 +20,13 @@ const filterProto = Array.prototype.filter
|
|
|
20
20
|
const setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.body).overflowAnchor === void 0
|
|
21
21
|
? noop
|
|
22
22
|
: function (contentEl, index) {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (contentEl === null) {
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
cancelAnimationFrame(contentEl._qOverflowAnimationFrame)
|
|
28
|
+
contentEl._qOverflowAnimationFrame = requestAnimationFrame(() => {
|
|
29
|
+
if (contentEl === null) {
|
|
25
30
|
return
|
|
26
31
|
}
|
|
27
32
|
|
|
@@ -415,7 +420,7 @@ export function useVirtualScroll ({
|
|
|
415
420
|
contentEl.addEventListener('focusout', onBlurRefocusFn)
|
|
416
421
|
|
|
417
422
|
setTimeout(() => {
|
|
418
|
-
contentEl !==
|
|
423
|
+
contentEl !== null && contentEl.removeEventListener('focusout', onBlurRefocusFn)
|
|
419
424
|
})
|
|
420
425
|
}
|
|
421
426
|
|
|
@@ -528,7 +533,7 @@ export function useVirtualScroll ({
|
|
|
528
533
|
}
|
|
529
534
|
|
|
530
535
|
function onBlurRefocusFn () {
|
|
531
|
-
contentRef.value !== void 0 && contentRef.value.focus()
|
|
536
|
+
contentRef.value !== null && contentRef.value !== void 0 && contentRef.value.focus()
|
|
532
537
|
}
|
|
533
538
|
|
|
534
539
|
function localResetVirtualScroll (toIndex, fullReset) {
|
|
@@ -7,7 +7,7 @@ describe('use-anchor API', () => {
|
|
|
7
7
|
describe('(prop): target', () => {
|
|
8
8
|
it('should use another target using a CSS selector', () => {
|
|
9
9
|
mount(WrapperOne, {
|
|
10
|
-
|
|
10
|
+
props: {
|
|
11
11
|
target: '.other-target'
|
|
12
12
|
}
|
|
13
13
|
})
|
|
@@ -27,7 +27,7 @@ describe('use-anchor API', () => {
|
|
|
27
27
|
|
|
28
28
|
it('should not show when target is false', () => {
|
|
29
29
|
mount(WrapperOne, {
|
|
30
|
-
|
|
30
|
+
props: {
|
|
31
31
|
target: false
|
|
32
32
|
}
|
|
33
33
|
})
|
|
@@ -42,7 +42,7 @@ describe('use-anchor API', () => {
|
|
|
42
42
|
describe('(prop): no-parent-event', () => {
|
|
43
43
|
it('should not show when clicking parent with no-parent-event true', () => {
|
|
44
44
|
mount(WrapperOne, {
|
|
45
|
-
|
|
45
|
+
props: {
|
|
46
46
|
'no-parent-event': true
|
|
47
47
|
}
|
|
48
48
|
})
|
|
@@ -55,7 +55,7 @@ describe('use-anchor API', () => {
|
|
|
55
55
|
|
|
56
56
|
it('should show when clicking parent with no-parent-event false', () => {
|
|
57
57
|
mount(WrapperOne, {
|
|
58
|
-
|
|
58
|
+
props: {
|
|
59
59
|
'no-parent-event': false
|
|
60
60
|
}
|
|
61
61
|
})
|
|
@@ -70,7 +70,7 @@ describe('use-anchor API', () => {
|
|
|
70
70
|
describe('(prop): context-menu', () => {
|
|
71
71
|
it('should not show when left clicking parent', () => {
|
|
72
72
|
mount(WrapperOne, {
|
|
73
|
-
|
|
73
|
+
props: {
|
|
74
74
|
'context-menu': true
|
|
75
75
|
}
|
|
76
76
|
})
|
|
@@ -83,7 +83,7 @@ describe('use-anchor API', () => {
|
|
|
83
83
|
|
|
84
84
|
it('should show when right clicking parent', () => {
|
|
85
85
|
mount(WrapperOne, {
|
|
86
|
-
|
|
86
|
+
props: {
|
|
87
87
|
'context-menu': true
|
|
88
88
|
}
|
|
89
89
|
})
|
|
@@ -42,7 +42,7 @@ describe('use-field API', () => {
|
|
|
42
42
|
it('should show the label when supplied', () => {
|
|
43
43
|
const label = 'Select something'
|
|
44
44
|
mount(FieldWrapper, {
|
|
45
|
-
|
|
45
|
+
props: {
|
|
46
46
|
label
|
|
47
47
|
}
|
|
48
48
|
})
|
|
@@ -53,7 +53,7 @@ describe('use-field API', () => {
|
|
|
53
53
|
it('should show the label centered when not focused', () => {
|
|
54
54
|
const label = 'Select something'
|
|
55
55
|
mount(FieldWrapper, {
|
|
56
|
-
|
|
56
|
+
props: {
|
|
57
57
|
label
|
|
58
58
|
}
|
|
59
59
|
})
|
|
@@ -66,7 +66,7 @@ describe('use-field API', () => {
|
|
|
66
66
|
it('should show the label stacked when focused', () => {
|
|
67
67
|
const label = 'Select something'
|
|
68
68
|
mount(FieldWrapper, {
|
|
69
|
-
|
|
69
|
+
props: {
|
|
70
70
|
label
|
|
71
71
|
}
|
|
72
72
|
})
|
|
@@ -82,7 +82,7 @@ describe('use-field API', () => {
|
|
|
82
82
|
it('should show the label stacked', () => {
|
|
83
83
|
const label = 'Select something'
|
|
84
84
|
mount(FieldWrapper, {
|
|
85
|
-
|
|
85
|
+
props: {
|
|
86
86
|
label,
|
|
87
87
|
stackLabel: true
|
|
88
88
|
}
|
|
@@ -97,7 +97,7 @@ describe('use-field API', () => {
|
|
|
97
97
|
it('should show a hint text', () => {
|
|
98
98
|
const hint = 'Select something'
|
|
99
99
|
mount(FieldWrapper, {
|
|
100
|
-
|
|
100
|
+
props: {
|
|
101
101
|
hint
|
|
102
102
|
}
|
|
103
103
|
})
|
|
@@ -110,7 +110,7 @@ describe('use-field API', () => {
|
|
|
110
110
|
it('should not show a hint text when not focused', () => {
|
|
111
111
|
const hint = 'Select something'
|
|
112
112
|
mount(FieldWrapper, {
|
|
113
|
-
|
|
113
|
+
props: {
|
|
114
114
|
hint,
|
|
115
115
|
hideHint: true
|
|
116
116
|
}
|
|
@@ -121,7 +121,7 @@ describe('use-field API', () => {
|
|
|
121
121
|
it('should show a hint text when focused', () => {
|
|
122
122
|
const hint = 'Select something'
|
|
123
123
|
mount(FieldWrapper, {
|
|
124
|
-
|
|
124
|
+
props: {
|
|
125
125
|
hint,
|
|
126
126
|
hideHint: true
|
|
127
127
|
}
|
|
@@ -3,40 +3,41 @@ import { mount } from '@cypress/vue'
|
|
|
3
3
|
import WrapperOne from './../../../components/menu/__tests__/WrapperOne.vue'
|
|
4
4
|
import WrapperTwo from './../../../components/menu/__tests__/WrapperTwo.vue'
|
|
5
5
|
import { ref } from 'vue'
|
|
6
|
+
import { vModelAdapter } from '../../../../test/cypress/helpers/v-model-adapter'
|
|
6
7
|
|
|
7
8
|
describe('use-model-toggle API', () => {
|
|
8
9
|
describe('Props', () => {
|
|
9
10
|
describe('Category: model', () => {
|
|
10
11
|
describe('(prop): model-value', () => {
|
|
11
12
|
it('should open the dialog when modifying the model-value', () => {
|
|
12
|
-
const
|
|
13
|
+
const model = ref(false)
|
|
13
14
|
mount(WrapperOne, {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
props: {
|
|
16
|
+
...vModelAdapter(model)
|
|
16
17
|
}
|
|
17
18
|
})
|
|
18
19
|
cy.dataCy('wrapper')
|
|
19
20
|
cy.dataCy('menu')
|
|
20
21
|
.should('not.exist')
|
|
21
22
|
.then(() => {
|
|
22
|
-
|
|
23
|
+
model.value = true
|
|
23
24
|
cy.dataCy('menu')
|
|
24
25
|
.should('exist')
|
|
25
26
|
})
|
|
26
27
|
})
|
|
27
28
|
|
|
28
29
|
it('should close the dialog when modifying the model-value', () => {
|
|
29
|
-
const
|
|
30
|
+
const model = ref(true)
|
|
30
31
|
mount(WrapperOne, {
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
props: {
|
|
33
|
+
...vModelAdapter(model)
|
|
33
34
|
}
|
|
34
35
|
})
|
|
35
36
|
cy.dataCy('wrapper')
|
|
36
37
|
cy.dataCy('menu')
|
|
37
38
|
.should('exist')
|
|
38
39
|
.then(() => {
|
|
39
|
-
|
|
40
|
+
model.value = false
|
|
40
41
|
cy.dataCy('menu')
|
|
41
42
|
.should('not.exist')
|
|
42
43
|
})
|
|
@@ -50,7 +51,7 @@ describe('use-model-toggle API', () => {
|
|
|
50
51
|
it('should emit @update:model-value event when state changes', () => {
|
|
51
52
|
const fn = cy.stub()
|
|
52
53
|
mount(WrapperOne, {
|
|
53
|
-
|
|
54
|
+
props: {
|
|
54
55
|
'onUpdate:modelValue': fn
|
|
55
56
|
}
|
|
56
57
|
})
|
|
@@ -70,7 +71,7 @@ describe('use-model-toggle API', () => {
|
|
|
70
71
|
it('should emit @show event when menu is triggered by parent', () => {
|
|
71
72
|
const fn = cy.stub()
|
|
72
73
|
mount(WrapperOne, {
|
|
73
|
-
|
|
74
|
+
props: {
|
|
74
75
|
onShow: fn
|
|
75
76
|
}
|
|
76
77
|
})
|
|
@@ -89,7 +90,7 @@ describe('use-model-toggle API', () => {
|
|
|
89
90
|
it('should emit @show event when component is triggered with the show() method', () => {
|
|
90
91
|
const fn = cy.stub()
|
|
91
92
|
mount(WrapperOne, {
|
|
92
|
-
|
|
93
|
+
props: {
|
|
93
94
|
onShow: fn
|
|
94
95
|
}
|
|
95
96
|
})
|
|
@@ -111,7 +112,7 @@ describe('use-model-toggle API', () => {
|
|
|
111
112
|
it('should emit @before-show event when menu is triggered by parent', () => {
|
|
112
113
|
const fn = cy.stub()
|
|
113
114
|
mount(WrapperOne, {
|
|
114
|
-
|
|
115
|
+
props: {
|
|
115
116
|
onBeforeShow: fn
|
|
116
117
|
}
|
|
117
118
|
})
|
|
@@ -129,7 +130,7 @@ describe('use-model-toggle API', () => {
|
|
|
129
130
|
it('should emit @before-show event when component is triggered with the show() method', () => {
|
|
130
131
|
const fn = cy.stub()
|
|
131
132
|
mount(WrapperOne, {
|
|
132
|
-
|
|
133
|
+
props: {
|
|
133
134
|
onBeforeShow: fn
|
|
134
135
|
}
|
|
135
136
|
})
|
|
@@ -150,7 +151,7 @@ describe('use-model-toggle API', () => {
|
|
|
150
151
|
it('should emit @hide event when menu is triggered by parent', () => {
|
|
151
152
|
const fn = cy.stub()
|
|
152
153
|
mount(WrapperOne, {
|
|
153
|
-
|
|
154
|
+
props: {
|
|
154
155
|
onHide: fn
|
|
155
156
|
}
|
|
156
157
|
})
|
|
@@ -175,7 +176,7 @@ describe('use-model-toggle API', () => {
|
|
|
175
176
|
it('should emit @hide event when component is triggered with the show() method', () => {
|
|
176
177
|
const fn = cy.stub()
|
|
177
178
|
mount(WrapperOne, {
|
|
178
|
-
|
|
179
|
+
props: {
|
|
179
180
|
onHide: fn
|
|
180
181
|
}
|
|
181
182
|
})
|
|
@@ -203,7 +204,7 @@ describe('use-model-toggle API', () => {
|
|
|
203
204
|
it('should emit @before-hide event when menu is triggered by parent', () => {
|
|
204
205
|
const fn = cy.stub()
|
|
205
206
|
mount(WrapperOne, {
|
|
206
|
-
|
|
207
|
+
props: {
|
|
207
208
|
onBeforeHide: fn
|
|
208
209
|
}
|
|
209
210
|
})
|
|
@@ -228,7 +229,7 @@ describe('use-model-toggle API', () => {
|
|
|
228
229
|
it('should emit @before-hide event when component is triggered with the show() method', () => {
|
|
229
230
|
const fn = cy.stub()
|
|
230
231
|
mount(WrapperOne, {
|
|
231
|
-
|
|
232
|
+
props: {
|
|
232
233
|
onBeforeHide: fn
|
|
233
234
|
}
|
|
234
235
|
})
|
|
@@ -255,7 +256,7 @@ describe('use-model-toggle API', () => {
|
|
|
255
256
|
|
|
256
257
|
describe('Methods', () => {
|
|
257
258
|
describe('(method): show', () => {
|
|
258
|
-
it('should
|
|
259
|
+
it('should trigger the menu to show', () => {
|
|
259
260
|
mount(WrapperOne)
|
|
260
261
|
|
|
261
262
|
cy.dataCy('wrapper')
|
|
@@ -267,7 +268,7 @@ describe('use-model-toggle API', () => {
|
|
|
267
268
|
})
|
|
268
269
|
|
|
269
270
|
describe('(method): hide', () => {
|
|
270
|
-
it('should
|
|
271
|
+
it('should trigger the menu to hide', () => {
|
|
271
272
|
mount(WrapperOne)
|
|
272
273
|
|
|
273
274
|
cy.dataCy('wrapper')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import QAvatar from './../../../components/avatar/QAvatar'
|
|
1
|
+
import QAvatar from './../../../components/avatar/QAvatar.js'
|
|
2
2
|
import { mount } from '@cypress/vue'
|
|
3
|
-
import { useSizeDefaults } from './../use-size'
|
|
3
|
+
import { useSizeDefaults } from './../use-size.js'
|
|
4
4
|
|
|
5
5
|
describe('use-size API', () => {
|
|
6
6
|
describe('Props', () => {
|
|
@@ -16,7 +16,7 @@ describe('use-transition API', () => {
|
|
|
16
16
|
it('should use a different show transition if defined', () => {
|
|
17
17
|
const transition = 'scale'
|
|
18
18
|
mount(WrapperOne, {
|
|
19
|
-
|
|
19
|
+
props: {
|
|
20
20
|
transitionShow: transition
|
|
21
21
|
}
|
|
22
22
|
})
|
|
@@ -43,7 +43,7 @@ describe('use-transition API', () => {
|
|
|
43
43
|
it('should use a different hide transition if defined', () => {
|
|
44
44
|
const transition = 'scale'
|
|
45
45
|
mount(WrapperOne, {
|
|
46
|
-
|
|
46
|
+
props: {
|
|
47
47
|
transitionHide: transition
|
|
48
48
|
}
|
|
49
49
|
})
|
|
@@ -64,7 +64,7 @@ describe('use-transition API', () => {
|
|
|
64
64
|
cy.dataCy('wrapper')
|
|
65
65
|
.click()
|
|
66
66
|
.wait(300)
|
|
67
|
-
cy.dataCy('menu', { timeout:
|
|
67
|
+
cy.dataCy('menu', { timeout: 350 })
|
|
68
68
|
.should('not.have.class', 'q-transition--fade-enter-active')
|
|
69
69
|
})
|
|
70
70
|
|
|
@@ -79,7 +79,7 @@ describe('use-transition API', () => {
|
|
|
79
79
|
|
|
80
80
|
it('should be done after a custom 1000ms passed', () => {
|
|
81
81
|
mount(WrapperOne, {
|
|
82
|
-
|
|
82
|
+
props: {
|
|
83
83
|
transitionDuration: 1000
|
|
84
84
|
}
|
|
85
85
|
})
|
|
@@ -92,7 +92,7 @@ describe('use-transition API', () => {
|
|
|
92
92
|
|
|
93
93
|
it('should not be done before a custom 1000ms passed', () => {
|
|
94
94
|
mount(WrapperOne, {
|
|
95
|
-
|
|
95
|
+
props: {
|
|
96
96
|
transitionDuration: 1000
|
|
97
97
|
}
|
|
98
98
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mount } from '@cypress/vue'
|
|
2
2
|
import FieldWrapper from './FieldWrapper.vue'
|
|
3
|
-
import Icons from './../../../../icon-set/material-icons'
|
|
3
|
+
import Icons from './../../../../icon-set/material-icons.mjs'
|
|
4
4
|
|
|
5
5
|
// const snapshotOptions = { customSnapshotsDir: '../__tests__' }
|
|
6
6
|
|
|
@@ -37,7 +37,7 @@ describe('use-validate API', () => {
|
|
|
37
37
|
it('should show an error-message when error is true', () => {
|
|
38
38
|
const message = 'Please select something'
|
|
39
39
|
mount(FieldWrapper, {
|
|
40
|
-
|
|
40
|
+
props: {
|
|
41
41
|
error: true,
|
|
42
42
|
errorMessage: message
|
|
43
43
|
}
|
|
@@ -49,7 +49,7 @@ describe('use-validate API', () => {
|
|
|
49
49
|
it('should not show an error-message when error is false', () => {
|
|
50
50
|
const message = 'Please select something'
|
|
51
51
|
mount(FieldWrapper, {
|
|
52
|
-
|
|
52
|
+
props: {
|
|
53
53
|
error: false,
|
|
54
54
|
errorMessage: message
|
|
55
55
|
}
|
|
@@ -62,7 +62,7 @@ describe('use-validate API', () => {
|
|
|
62
62
|
describe('(prop): no-error-icon', () => {
|
|
63
63
|
it('should not show an error icon when error is true', () => {
|
|
64
64
|
mount(FieldWrapper, {
|
|
65
|
-
|
|
65
|
+
props: {
|
|
66
66
|
error: true,
|
|
67
67
|
noErrorIcon: true
|
|
68
68
|
}
|
|
@@ -74,7 +74,7 @@ describe('use-validate API', () => {
|
|
|
74
74
|
|
|
75
75
|
it('should show an error icon when error is true an no-error-icon is false', () => {
|
|
76
76
|
mount(FieldWrapper, {
|
|
77
|
-
|
|
77
|
+
props: {
|
|
78
78
|
error: true,
|
|
79
79
|
noErrorIcon: false
|
|
80
80
|
}
|
|
@@ -137,7 +137,7 @@ export default function ({
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
function pickAnchorEl () {
|
|
140
|
-
if (props.target === false || props.target === '') {
|
|
140
|
+
if (props.target === false || props.target === '' || proxy.$el.parentNode === null) {
|
|
141
141
|
anchorEl.value = null
|
|
142
142
|
}
|
|
143
143
|
else if (props.target === true) {
|
|
@@ -445,6 +445,7 @@ export default function (state) {
|
|
|
445
445
|
h('div', {
|
|
446
446
|
ref: state.targetRef,
|
|
447
447
|
class: 'q-field__native row',
|
|
448
|
+
tabindex: -1,
|
|
448
449
|
...state.splitAttrs.attributes.value,
|
|
449
450
|
'data-autofocus': props.autofocus === true || void 0
|
|
450
451
|
}, slots.control(controlSlotScope.value))
|
|
@@ -555,7 +556,7 @@ export default function (state) {
|
|
|
555
556
|
const labelAttrs = state.getControl === void 0 && slots.control === void 0
|
|
556
557
|
? {
|
|
557
558
|
...state.splitAttrs.attributes.value,
|
|
558
|
-
'data-autofocus': props.autofocus,
|
|
559
|
+
'data-autofocus': props.autofocus === true || void 0,
|
|
559
560
|
...attributes.value
|
|
560
561
|
}
|
|
561
562
|
: attributes.value
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
import { client } from '../../plugins/Platform.js'
|
|
2
|
+
|
|
1
3
|
const isJapanese = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/
|
|
2
4
|
const isChinese = /[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u
|
|
3
5
|
const isKorean = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/
|
|
6
|
+
const isPlainText = /[a-z0-9_ -]$/i
|
|
4
7
|
|
|
5
8
|
export default function (onInput) {
|
|
6
9
|
return function onComposition (e) {
|
|
7
10
|
if (e.type === 'compositionend' || e.type === 'change') {
|
|
8
|
-
if (e.target.
|
|
9
|
-
e.target.
|
|
11
|
+
if (e.target.qComposing !== true) { return }
|
|
12
|
+
e.target.qComposing = false
|
|
10
13
|
onInput(e)
|
|
11
14
|
}
|
|
12
|
-
else if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
e.
|
|
15
|
+
else if (
|
|
16
|
+
e.type === 'compositionupdate'
|
|
17
|
+
&& e.target.qComposing !== true
|
|
18
|
+
&& typeof e.data === 'string'
|
|
19
|
+
) {
|
|
20
|
+
const isComposing = client.is.firefox === true
|
|
21
|
+
? isPlainText.test(e.data) === false
|
|
22
|
+
: isJapanese.test(e.data) === true || isChinese.test(e.data) === true || isKorean.test(e.data) === true
|
|
23
|
+
|
|
24
|
+
if (isComposing === true) {
|
|
25
|
+
e.target.qComposing = true
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
|
-
else {
|
|
23
|
-
e.target.composing = true
|
|
24
|
-
}
|
|
25
28
|
}
|
|
26
29
|
}
|
package/src/directives/Ripple.js
CHANGED
|
@@ -87,11 +87,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
87
87
|
if (
|
|
88
88
|
ctx.enabled === true
|
|
89
89
|
&& evt.qSkipRipple !== true
|
|
90
|
-
&& (
|
|
91
|
-
ctx.modifiers.early === true
|
|
92
|
-
? [ 'mousedown', 'touchstart' ].includes(evt.type) === true
|
|
93
|
-
: evt.type === 'click'
|
|
94
|
-
)
|
|
90
|
+
&& evt.type === (ctx.modifiers.early === true ? 'pointerdown' : 'click')
|
|
95
91
|
) {
|
|
96
92
|
showRipple(evt, el, ctx, evt.qKeyEvent === true)
|
|
97
93
|
}
|
|
@@ -114,8 +110,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
114
110
|
el.__qripple = ctx
|
|
115
111
|
|
|
116
112
|
addEvt(ctx, 'main', [
|
|
117
|
-
[ el, '
|
|
118
|
-
[ el, 'touchstart', 'start', 'passive' ],
|
|
113
|
+
[ el, 'pointerdown', 'start', 'passive' ],
|
|
119
114
|
[ el, 'click', 'start', 'passive' ],
|
|
120
115
|
[ el, 'keydown', 'keystart', 'passive' ],
|
|
121
116
|
[ el, 'keyup', 'keystart', 'passive' ]
|
package/src/utils/date.js
CHANGED
|
@@ -59,19 +59,31 @@ export default function (DefaultComponent, supportsCustomComponent, parentApp) {
|
|
|
59
59
|
const applyState = cmd => {
|
|
60
60
|
if (dialogRef.value !== null && dialogRef.value[ cmd ] !== void 0) {
|
|
61
61
|
dialogRef.value[ cmd ]()
|
|
62
|
+
return
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
|
|
65
|
+
const target = vm.$.subTree
|
|
66
|
+
|
|
67
|
+
if (target && target.component) {
|
|
64
68
|
// account for "script setup" way of declaring component
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
if (target.component.proxy && target.component.proxy[ cmd ]) {
|
|
70
|
+
target.component.proxy[ cmd ]()
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// account for "script setup" + async component way of declaring component
|
|
75
|
+
if (
|
|
76
|
+
target.component.subTree &&
|
|
77
|
+
target.component.subTree.component &&
|
|
78
|
+
target.component.subTree.component.proxy &&
|
|
79
|
+
target.component.subTree.component.proxy[ cmd ]
|
|
80
|
+
) {
|
|
81
|
+
target.component.subTree.component.proxy[ cmd ]()
|
|
82
|
+
return
|
|
83
|
+
}
|
|
74
84
|
}
|
|
85
|
+
|
|
86
|
+
console.error('[Quasar] Incorrectly defined Dialog component')
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
const
|