quasar 2.6.5 → 2.7.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/QBreadcrumbsEl.json +1 -1
- package/dist/api/QBtn.json +1 -1
- package/dist/api/QBtnDropdown.json +2 -1
- 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/QEditor.json +3 -1
- package/dist/api/QExpansionItem.json +2 -1
- 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/QImg.json +23 -0
- package/dist/api/QInput.json +1 -0
- package/dist/api/QItem.json +4 -2
- package/dist/api/QKnob.json +1 -0
- package/dist/api/QOptionGroup.json +1 -0
- package/dist/api/QPagination.json +1 -0
- 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/QRouteTab.json +1 -1
- 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/api/QVideo.json +43 -0
- 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 +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +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 +1 -1
- 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/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 +11 -10
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +1237 -16
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +11 -10
- package/dist/quasar.umd.js +223 -135
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/types/api/quploader.d.ts +7 -7
- package/dist/types/api/validation.d.ts +1 -1
- package/dist/types/extras/icon-set.d.ts +6 -0
- package/dist/types/index.d.ts +298 -255
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils.d.ts +11 -0
- package/dist/vetur/quasar-attributes.json +16 -0
- package/dist/vetur/quasar-tags.json +5 -1
- package/dist/web-types/web-types.json +48 -8
- 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/es.js +1 -1
- package/lang/es.mjs +1 -1
- package/lang/index.json +4 -0
- package/lang/mm.js +96 -0
- package/lang/mm.mjs +91 -0
- package/package.json +9 -11
- 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/btn/use-btn.json +1 -1
- package/src/components/checkbox/use-checkbox.js +8 -7
- package/src/components/dialog/QDialog.js +4 -4
- package/src/components/dialog/QDialog.sass +2 -2
- package/src/components/editor/QEditor.js +21 -29
- package/src/components/icon/QIcon.js +25 -2
- package/src/components/icon/QIcon.sass +4 -1
- package/src/components/img/QImg.js +5 -0
- package/src/components/img/QImg.json +19 -1
- 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/QMenu.js +2 -1
- package/src/components/radio/QRadio.js +2 -2
- package/src/components/select/QSelect.js +2 -2
- package/src/components/slider/use-slider.js +1 -1
- package/src/components/table/QTable.js +1 -1
- package/src/components/table/QTable.json +3 -0
- package/src/components/tabs/QTabs.sass +0 -6
- package/src/components/tooltip/QTooltip.js +2 -1
- package/src/components/tree/QTree.sass +1 -1
- package/src/components/uploader/uploader-core.js +22 -18
- package/src/components/video/QVideo.js +17 -1
- package/src/components/video/QVideo.json +36 -0
- package/src/components/virtual-scroll/QVirtualScroll.sass +4 -1
- package/src/components/virtual-scroll/use-virtual-scroll.js +21 -23
- package/src/composables/private/__tests__/use-model-toggle.spec.js +2 -2
- package/src/composables/private/__tests__/use-size.spec.js +2 -2
- package/src/composables/private/__tests__/use-validate.spec.js +1 -1
- package/src/composables/private/use-field.js +1 -0
- package/src/composables/private/use-key-composition.js +15 -8
- package/src/composables/private/use-portal.js +15 -2
- package/src/composables/private/use-router-link.json +1 -1
- package/src/history.js +2 -2
- package/src/utils/copy-to-clipboard.js +1 -1
- package/src/utils/patterns.js +8 -0
- package/src/utils/private/date-persian.js +0 -9
- package/src/utils/private/global-dialog.js +22 -10
- package/src/utils/private/position-engine.js +0 -5
- package/src/utils/private/sort.js +0 -11
- package/src/utils/private/web-storage.js +1 -1
- package/src/utils/uid.js +1 -1
|
@@ -15,7 +15,20 @@ export default createComponent({
|
|
|
15
15
|
required: true
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
-
title: String
|
|
18
|
+
title: String,
|
|
19
|
+
|
|
20
|
+
fetchpriority: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'auto'
|
|
23
|
+
},
|
|
24
|
+
loading: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'eager'
|
|
27
|
+
},
|
|
28
|
+
referrerpolicy: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'strict-origin-when-cross-origin'
|
|
31
|
+
}
|
|
19
32
|
},
|
|
20
33
|
|
|
21
34
|
setup (props) {
|
|
@@ -33,6 +46,9 @@ export default createComponent({
|
|
|
33
46
|
h('iframe', {
|
|
34
47
|
src: props.src,
|
|
35
48
|
title: props.title,
|
|
49
|
+
fetchpriority: props.fetchpriority,
|
|
50
|
+
loading: props.loading,
|
|
51
|
+
referrerpolicy: props.referrerpolicy,
|
|
36
52
|
frameborder: '0',
|
|
37
53
|
allowfullscreen: true
|
|
38
54
|
})
|
|
@@ -25,6 +25,42 @@
|
|
|
25
25
|
],
|
|
26
26
|
"category": "accessibility",
|
|
27
27
|
"addedIn": "v2.4.3"
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"fetchpriority": {
|
|
31
|
+
"type": "String",
|
|
32
|
+
"desc": "Provides a hint of the relative priority to use when fetching the iframe document",
|
|
33
|
+
"default": "auto",
|
|
34
|
+
"values": [ "high", "low", "auto" ],
|
|
35
|
+
"category": "behavior",
|
|
36
|
+
"addedIn": "v2.6.6"
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"loading": {
|
|
40
|
+
"type": "String",
|
|
41
|
+
"desc": "Indicates how the browser should load the iframe",
|
|
42
|
+
"default": "eager",
|
|
43
|
+
"values": [ "eager", "lazy" ],
|
|
44
|
+
"category": "behavior",
|
|
45
|
+
"addedIn": "v2.6.6"
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
"referrerpolicy": {
|
|
49
|
+
"type": "String",
|
|
50
|
+
"desc": "Indicates which referrer to send when fetching the frame's resource",
|
|
51
|
+
"default": "strict-origin-when-cross-origin",
|
|
52
|
+
"values": [
|
|
53
|
+
"no-referrer",
|
|
54
|
+
"no-referrer-when-downgrade",
|
|
55
|
+
"origin",
|
|
56
|
+
"origin-when-cross-origin",
|
|
57
|
+
"same-origin",
|
|
58
|
+
"strict-origin",
|
|
59
|
+
"strict-origin-when-cross-origin",
|
|
60
|
+
"unsafe-url"
|
|
61
|
+
],
|
|
62
|
+
"category": "behavior",
|
|
63
|
+
"addedIn": "v2.6.6"
|
|
28
64
|
}
|
|
29
65
|
}
|
|
30
66
|
}
|
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
outline: none
|
|
7
7
|
contain: content
|
|
8
8
|
|
|
9
|
-
*
|
|
9
|
+
> *
|
|
10
10
|
overflow-anchor: none
|
|
11
11
|
|
|
12
|
+
> [data-q-vs-anchor]
|
|
13
|
+
overflow-anchor: auto
|
|
14
|
+
|
|
12
15
|
&__padding
|
|
13
16
|
background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0) 20%, rgba(128, 128, 128, .03) 20%, rgba(128, 128, 128, .08) 50%, rgba(128, 128, 128, .03) 80%, rgba(255,255,255,0) 80%, rgba(255,255,255,0)) #{"/* rtl:ignore */"}
|
|
14
17
|
background-size: var(--q-virtual-scroll-item-width, 100%) var(--q-virtual-scroll-item-height, 50px) #{"/* rtl:ignore */"}
|
|
@@ -15,27 +15,30 @@ const scrollToEdges = [
|
|
|
15
15
|
'end-force'
|
|
16
16
|
]
|
|
17
17
|
|
|
18
|
-
let id = 1
|
|
19
18
|
const filterProto = Array.prototype.filter
|
|
20
19
|
|
|
21
20
|
const setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.body).overflowAnchor === void 0
|
|
22
21
|
? noop
|
|
23
|
-
: function (
|
|
24
|
-
|
|
22
|
+
: function (contentEl, index) {
|
|
23
|
+
requestAnimationFrame(() => {
|
|
24
|
+
if (contentEl === null) {
|
|
25
|
+
return
|
|
26
|
+
}
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
const children = contentEl.children || []
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
30
|
+
filterProto
|
|
31
|
+
.call(children, el => el.dataset && el.dataset.qVsAnchor !== void 0)
|
|
32
|
+
.forEach(el => {
|
|
33
|
+
delete el.dataset.qVsAnchor
|
|
34
|
+
})
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const el = children[ index ]
|
|
37
|
+
|
|
38
|
+
if (el && el.dataset) {
|
|
39
|
+
el.dataset.qVsAnchor = ''
|
|
40
|
+
}
|
|
41
|
+
})
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
function sumFn (acc, h) {
|
|
@@ -231,8 +234,6 @@ export function useVirtualScroll ({
|
|
|
231
234
|
|
|
232
235
|
let prevScrollStart, prevToIndex, localScrollViewSize, virtualScrollSizesAgg = [], virtualScrollSizes
|
|
233
236
|
|
|
234
|
-
const vsId = 'qvs_' + id++
|
|
235
|
-
|
|
236
237
|
const virtualScrollPaddingBefore = ref(0)
|
|
237
238
|
const virtualScrollPaddingAfter = ref(0)
|
|
238
239
|
const virtualScrollSliceSizeComputed = ref({})
|
|
@@ -414,11 +415,11 @@ export function useVirtualScroll ({
|
|
|
414
415
|
contentEl.addEventListener('focusout', onBlurRefocusFn)
|
|
415
416
|
|
|
416
417
|
setTimeout(() => {
|
|
417
|
-
contentEl !==
|
|
418
|
+
contentEl !== null && contentEl.removeEventListener('focusout', onBlurRefocusFn)
|
|
418
419
|
})
|
|
419
420
|
}
|
|
420
421
|
|
|
421
|
-
setOverflowAnchor(
|
|
422
|
+
setOverflowAnchor(contentEl, toIndex - from)
|
|
422
423
|
|
|
423
424
|
const sizeBefore = alignEnd !== void 0 ? virtualScrollSizes.slice(from, toIndex).reduce(sumFn, 0) : 0
|
|
424
425
|
|
|
@@ -527,7 +528,7 @@ export function useVirtualScroll ({
|
|
|
527
528
|
}
|
|
528
529
|
|
|
529
530
|
function onBlurRefocusFn () {
|
|
530
|
-
contentRef.value !== void 0 && contentRef.value.focus()
|
|
531
|
+
contentRef.value !== null && contentRef.value !== void 0 && contentRef.value.focus()
|
|
531
532
|
}
|
|
532
533
|
|
|
533
534
|
function localResetVirtualScroll (toIndex, fullReset) {
|
|
@@ -644,7 +645,6 @@ export function useVirtualScroll ({
|
|
|
644
645
|
class: 'q-virtual-scroll__content',
|
|
645
646
|
key: 'content',
|
|
646
647
|
ref: contentRef,
|
|
647
|
-
id: vsId,
|
|
648
648
|
tabindex: -1
|
|
649
649
|
}, content.flat()),
|
|
650
650
|
|
|
@@ -718,9 +718,7 @@ export function useVirtualScroll ({
|
|
|
718
718
|
}
|
|
719
719
|
})
|
|
720
720
|
|
|
721
|
-
|
|
722
|
-
const styleSheet = document.getElementById(vsId + '_ss')
|
|
723
|
-
styleSheet !== null && styleSheet.remove()
|
|
721
|
+
__QUASAR_SSR__ || onBeforeUnmount(() => {
|
|
724
722
|
onVirtualScrollEvt.cancel()
|
|
725
723
|
})
|
|
726
724
|
|
|
@@ -255,7 +255,7 @@ describe('use-model-toggle API', () => {
|
|
|
255
255
|
|
|
256
256
|
describe('Methods', () => {
|
|
257
257
|
describe('(method): show', () => {
|
|
258
|
-
it('should
|
|
258
|
+
it('should trigger the menu to show', () => {
|
|
259
259
|
mount(WrapperOne)
|
|
260
260
|
|
|
261
261
|
cy.dataCy('wrapper')
|
|
@@ -267,7 +267,7 @@ describe('use-model-toggle API', () => {
|
|
|
267
267
|
})
|
|
268
268
|
|
|
269
269
|
describe('(method): hide', () => {
|
|
270
|
-
it('should
|
|
270
|
+
it('should trigger the menu to hide', () => {
|
|
271
271
|
mount(WrapperOne)
|
|
272
272
|
|
|
273
273
|
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', () => {
|
|
@@ -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
|
|
|
@@ -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))
|
|
@@ -1,26 +1,33 @@
|
|
|
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
15
|
else if (e.type === 'compositionupdate') {
|
|
13
16
|
if (
|
|
14
|
-
|
|
15
|
-
&&
|
|
16
|
-
&& isChinese.test(e.data) === false
|
|
17
|
-
&& isKorean.test(e.data) === false
|
|
17
|
+
e.target.qComposing !== true
|
|
18
|
+
&& typeof e.data === 'string'
|
|
18
19
|
) {
|
|
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
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
else {
|
|
23
|
-
e.target.
|
|
30
|
+
e.target.qComposing = true
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
33
|
}
|
|
@@ -26,11 +26,16 @@ function isOnGlobalDialog (vm) {
|
|
|
26
26
|
// You MUST specify "inheritAttrs: false" in your component
|
|
27
27
|
|
|
28
28
|
export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
29
|
+
// showing, including while in show/hide transition
|
|
29
30
|
const portalIsActive = ref(false)
|
|
30
31
|
|
|
32
|
+
// showing & not in any show/hide transition
|
|
33
|
+
const portalIsAccessible = ref(false)
|
|
34
|
+
|
|
31
35
|
if (__QUASAR_SSR_SERVER__) {
|
|
32
36
|
return {
|
|
33
37
|
portalIsActive,
|
|
38
|
+
portalIsAccessible,
|
|
34
39
|
|
|
35
40
|
showPortal: noop,
|
|
36
41
|
hidePortal: noop,
|
|
@@ -45,9 +50,12 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
45
50
|
function showPortal (isReady) {
|
|
46
51
|
if (isReady === true) {
|
|
47
52
|
removeFocusWaitFlag(focusObj)
|
|
53
|
+
portalIsAccessible.value = true
|
|
48
54
|
return
|
|
49
55
|
}
|
|
50
56
|
|
|
57
|
+
portalIsAccessible.value = false
|
|
58
|
+
|
|
51
59
|
if (portalIsActive.value === false) {
|
|
52
60
|
if (onGlobalDialog === false && portalEl === null) {
|
|
53
61
|
portalEl = createGlobalNode()
|
|
@@ -62,7 +70,11 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
|
|
65
|
-
function hidePortal () {
|
|
73
|
+
function hidePortal (isReady) {
|
|
74
|
+
portalIsAccessible.value = false
|
|
75
|
+
|
|
76
|
+
if (isReady !== true) { return }
|
|
77
|
+
|
|
66
78
|
removeFocusWaitFlag(focusObj)
|
|
67
79
|
portalIsActive.value = false
|
|
68
80
|
|
|
@@ -78,7 +90,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
92
|
|
|
81
|
-
onUnmounted(hidePortal)
|
|
93
|
+
onUnmounted(() => { hidePortal(true) })
|
|
82
94
|
|
|
83
95
|
// expose publicly needed stuff for portal utils
|
|
84
96
|
Object.assign(vm.proxy, { __qPortalInnerRef: innerRef })
|
|
@@ -88,6 +100,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
88
100
|
hidePortal,
|
|
89
101
|
|
|
90
102
|
portalIsActive,
|
|
103
|
+
portalIsAccessible,
|
|
91
104
|
|
|
92
105
|
renderPortal: () => (
|
|
93
106
|
onGlobalDialog === true
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"href": {
|
|
40
40
|
"type": "String",
|
|
41
41
|
"desc": "Native <a> link href attribute; Has priority over the 'to'/'exact'/'replace'/'active-class'/'exact-active-class' props",
|
|
42
|
-
"examples": [ "
|
|
42
|
+
"examples": [ "https://quasar.dev" ],
|
|
43
43
|
"category": "navigation",
|
|
44
44
|
"addedIn": "v2.4"
|
|
45
45
|
},
|
package/src/history.js
CHANGED
|
@@ -11,9 +11,9 @@ function filterInvalidPath (path) {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function normalizeExitPath (path) {
|
|
14
|
-
path.startsWith('#') === true && (path = path.
|
|
14
|
+
path.startsWith('#') === true && (path = path.substring(1))
|
|
15
15
|
path.startsWith('/') === false && (path = '/' + path)
|
|
16
|
-
path.endsWith('/') === true && (path = path.
|
|
16
|
+
path.endsWith('/') === true && (path = path.substring(0, path.length - 1))
|
|
17
17
|
return '#' + path
|
|
18
18
|
}
|
|
19
19
|
|
package/src/utils/patterns.js
CHANGED
|
@@ -14,6 +14,14 @@ export const testPattern = {
|
|
|
14
14
|
fulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(v),
|
|
15
15
|
timeOrFulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(v),
|
|
16
16
|
|
|
17
|
+
// -- RFC 5322 --
|
|
18
|
+
// -- Added in v2.6.6 --
|
|
19
|
+
// This is a basic helper validation.
|
|
20
|
+
// For something more complex (like RFC 822) you should write and use your own rule.
|
|
21
|
+
// We won't be accepting PRs to enhance the one below because of the reason above.
|
|
22
|
+
// eslint-disable-next-line
|
|
23
|
+
email: v => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(v),
|
|
24
|
+
|
|
17
25
|
hexColor: v => hex.test(v),
|
|
18
26
|
hexaColor: v => hexa.test(v),
|
|
19
27
|
hexOrHexaColor: v => hexOrHexa.test(v),
|
|
@@ -27,15 +27,6 @@ export function toGregorian (jy, jm, jd) {
|
|
|
27
27
|
return d2g(j2d(jy, jm, jd))
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/*
|
|
31
|
-
Checks whether a Jalaali date is valid or not.
|
|
32
|
-
*/
|
|
33
|
-
export function isValidJalaaliDate (jy, jm, jd) {
|
|
34
|
-
return jy >= -61 && jy <= 3177
|
|
35
|
-
&& jm >= 1 && jm <= 12
|
|
36
|
-
&& jd >= 1 && jd <= jalaaliMonthLength(jy, jm)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
30
|
/*
|
|
40
31
|
Is this a leap year or not?
|
|
41
32
|
*/
|
|
@@ -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
|
|
@@ -48,11 +48,6 @@ export function parsePosition (pos, rtl) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export function validateCover (val) {
|
|
52
|
-
if (val === true || val === false) { return true }
|
|
53
|
-
return validatePosition(val)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
51
|
export function getAnchorProps (el, offset) {
|
|
57
52
|
let { top, left, right, bottom, width, height } = el.getBoundingClientRect()
|
|
58
53
|
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
export function sortString (a, b) {
|
|
2
|
-
if (typeof a !== 'string') {
|
|
3
|
-
throw new TypeError('The value for sorting must be a String')
|
|
4
|
-
}
|
|
5
|
-
return a.localeCompare(b)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function sortNumber (a, b) {
|
|
9
|
-
return a - b
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
export function sortDate (a, b) {
|
|
13
2
|
return (new Date(a)) - (new Date(b))
|
|
14
3
|
}
|
package/src/utils/uid.js
CHANGED