quasar 2.6.3 → 2.6.6
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/Notify.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +1 -1
- package/dist/api/QBtn.json +1 -1
- package/dist/api/QBtnDropdown.json +1 -1
- package/dist/api/QDialog.json +12 -1
- package/dist/api/QExpansionItem.json +1 -1
- package/dist/api/QImg.json +23 -0
- package/dist/api/QItem.json +1 -1
- package/dist/api/QRouteTab.json +1 -1
- 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/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-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 +1 -1
- 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/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.cjs.prod.js +2 -2
- package/dist/quasar.css +7 -4
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +13 -10
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +7 -5
- package/dist/quasar.umd.js +100 -53
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/types/api/qnotify.d.ts +0 -1
- package/dist/types/api/validation.d.ts +1 -1
- package/dist/types/index.d.ts +43 -4
- 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/package.json +1 -3
- package/src/components/btn/use-btn.json +1 -1
- package/src/components/dialog/QDialog.js +7 -7
- package/src/components/dialog/QDialog.json +10 -1
- package/src/components/dialog/QDialog.sass +2 -2
- package/src/components/dialog-plugin/DialogPlugin.js +4 -4
- package/src/components/editor/QEditor.js +10 -4
- package/src/components/icon/QIcon.js +1 -1
- package/src/components/img/QImg.js +5 -0
- package/src/components/img/QImg.json +19 -1
- package/src/components/menu/QMenu.js +2 -1
- package/src/components/table/QTable.js +1 -1
- package/src/components/tooltip/QTooltip.js +2 -1
- package/src/components/tree/QTree.sass +1 -1
- 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 +19 -21
- 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/plugins/Notify.json +1 -1
- 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/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,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 === void 0) {
|
|
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({})
|
|
@@ -418,7 +419,7 @@ export function useVirtualScroll ({
|
|
|
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
|
|
|
@@ -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
|
|
|
@@ -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/plugins/Notify.json
CHANGED
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
|
|
358
358
|
"actions": {
|
|
359
359
|
"type": "Array",
|
|
360
|
-
"tsType": "
|
|
360
|
+
"tsType": "QNotifyAction",
|
|
361
361
|
"desc": "Notification actions (buttons); Unless 'noDismiss' is true, clicking/tapping on the button will close the notification; Also check 'closeBtn' convenience prop",
|
|
362
362
|
"definition": {
|
|
363
363
|
"handler": {
|
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
|
*/
|
|
@@ -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