quasar 2.11.3 → 2.11.5
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/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 +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/kk.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/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 +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/sm.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/uz-Cyrl.umd.prod.js +1 -1
- package/dist/lang/uz-Latn.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.esm.js +445 -196
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.sass +1 -1
- package/dist/quasar.umd.js +445 -196
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/web-types/web-types.json +1 -1
- package/package.json +1 -1
- package/src/components/ajax-bar/QAjaxBar.js +13 -5
- package/src/components/btn/QBtn.js +3 -2
- package/src/components/carousel/QCarousel.js +17 -10
- package/src/components/dialog/QDialog.js +10 -5
- package/src/components/drawer/QDrawer.js +8 -3
- package/src/components/img/QImg.js +25 -11
- package/src/components/infinite-scroll/QInfiniteScroll.js +26 -4
- package/src/components/input/QInput.js +14 -4
- package/src/components/layout/QLayout.js +5 -5
- package/src/components/menu/QMenu.js +1 -1
- package/src/components/pull-to-refresh/QPullToRefresh.js +5 -4
- package/src/components/rating/QRating.js +3 -3
- package/src/components/resize-observer/QResizeObserver.js +9 -4
- package/src/components/scroll-area/QScrollArea.js +8 -8
- package/src/components/select/QSelect.js +19 -8
- package/src/components/slide-item/QSlideItem.js +4 -2
- package/src/components/slide-transition/QSlideTransition.js +17 -3
- package/src/components/tabs/QTabs.js +12 -5
- package/src/components/tooltip/QTooltip.js +1 -1
- package/src/components/virtual-scroll/use-virtual-scroll.js +5 -1
- package/src/composables/private/use-anchor.js +8 -3
- package/src/composables/private/use-field.js +10 -4
- package/src/composables/private/use-portal.js +3 -3
- package/src/composables/private/use-timeout.js +6 -3
- package/src/directives/TouchHold.js +9 -4
- package/src/directives/TouchRepeat.js +10 -3
- package/src/plugins/Loading.js +16 -11
- package/src/plugins/Meta.js +4 -2
- package/src/plugins/Notify.js +13 -3
- package/src/utils/copy-to-clipboard.js +8 -0
- package/src/utils/debounce.js +9 -6
- package/src/utils/is.js +11 -6
- package/src/utils/morph.js +7 -6
- package/src/utils/prevent-scroll.js +14 -7
- package/src/utils/private/click-outside.js +10 -3
- package/src/utils/private/global-dialog.js +1 -1
- package/src/utils/private/global-nodes.js +44 -13
- package/src/utils/private/position-engine.js +67 -25
|
@@ -143,8 +143,8 @@ export default createComponent({
|
|
|
143
143
|
const dialogFieldFocused = ref(false)
|
|
144
144
|
const innerLoadingIndicator = ref(false)
|
|
145
145
|
|
|
146
|
-
let inputTimer, innerValueCache,
|
|
147
|
-
hasDialog, userInputValue, filterId, defaultInputValue,
|
|
146
|
+
let inputTimer = null, innerValueCache,
|
|
147
|
+
hasDialog, userInputValue, filterId = null, defaultInputValue,
|
|
148
148
|
transitionShowComputed, searchBuffer, searchBufferExp
|
|
149
149
|
|
|
150
150
|
const inputRef = ref(null)
|
|
@@ -650,7 +650,12 @@ export default createComponent({
|
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
e.target.value = ''
|
|
653
|
-
|
|
653
|
+
|
|
654
|
+
if (inputTimer !== null) {
|
|
655
|
+
clearTimeout(inputTimer)
|
|
656
|
+
inputTimer = null
|
|
657
|
+
}
|
|
658
|
+
|
|
654
659
|
resetInputValue()
|
|
655
660
|
|
|
656
661
|
if (typeof value === 'string' && value.length > 0) {
|
|
@@ -1015,7 +1020,10 @@ export default createComponent({
|
|
|
1015
1020
|
}
|
|
1016
1021
|
|
|
1017
1022
|
function onInput (e) {
|
|
1018
|
-
|
|
1023
|
+
if (inputTimer !== null) {
|
|
1024
|
+
clearTimeout(inputTimer)
|
|
1025
|
+
inputTimer = null
|
|
1026
|
+
}
|
|
1019
1027
|
|
|
1020
1028
|
if (e && e.target && e.target.qComposing === true) {
|
|
1021
1029
|
return
|
|
@@ -1036,6 +1044,7 @@ export default createComponent({
|
|
|
1036
1044
|
|
|
1037
1045
|
if (props.onFilter !== void 0) {
|
|
1038
1046
|
inputTimer = setTimeout(() => {
|
|
1047
|
+
inputTimer = null
|
|
1039
1048
|
filter(inputValue.value)
|
|
1040
1049
|
}, props.inputDebounce)
|
|
1041
1050
|
}
|
|
@@ -1089,7 +1098,7 @@ export default createComponent({
|
|
|
1089
1098
|
menu.value === true && (menu.value = false)
|
|
1090
1099
|
}, 10)
|
|
1091
1100
|
|
|
1092
|
-
clearTimeout(filterId)
|
|
1101
|
+
filterId !== null && clearTimeout(filterId)
|
|
1093
1102
|
filterId = localFilterId
|
|
1094
1103
|
|
|
1095
1104
|
emit(
|
|
@@ -1281,8 +1290,10 @@ export default createComponent({
|
|
|
1281
1290
|
}
|
|
1282
1291
|
|
|
1283
1292
|
if (state.focused.value === false) {
|
|
1284
|
-
|
|
1285
|
-
|
|
1293
|
+
if (filterId !== null) {
|
|
1294
|
+
clearTimeout(filterId)
|
|
1295
|
+
filterId = null
|
|
1296
|
+
}
|
|
1286
1297
|
|
|
1287
1298
|
if (state.innerLoading.value === true) {
|
|
1288
1299
|
emit('filterAbort')
|
|
@@ -1403,7 +1414,7 @@ export default createComponent({
|
|
|
1403
1414
|
updatePreState()
|
|
1404
1415
|
|
|
1405
1416
|
onBeforeUnmount(() => {
|
|
1406
|
-
clearTimeout(inputTimer)
|
|
1417
|
+
inputTimer !== null && clearTimeout(inputTimer)
|
|
1407
1418
|
})
|
|
1408
1419
|
|
|
1409
1420
|
// expose public methods
|
|
@@ -40,7 +40,7 @@ export default createComponent({
|
|
|
40
40
|
|
|
41
41
|
const contentRef = ref(null)
|
|
42
42
|
|
|
43
|
-
let timer, pan = {}, dirRefs = {}, dirContentRefs = {}
|
|
43
|
+
let timer = null, pan = {}, dirRefs = {}, dirContentRefs = {}
|
|
44
44
|
|
|
45
45
|
const langDir = computed(() => (
|
|
46
46
|
$q.lang.rtl === true
|
|
@@ -91,7 +91,9 @@ export default createComponent({
|
|
|
91
91
|
if (pan.scale === 1) {
|
|
92
92
|
node.style.transform = `translate${ pan.axis }(${ pan.dir * 100 }%)`
|
|
93
93
|
|
|
94
|
+
timer !== null && clearTimeout(timer)
|
|
94
95
|
timer = setTimeout(() => {
|
|
96
|
+
timer = null
|
|
95
97
|
emit(pan.showing, { reset })
|
|
96
98
|
emit('action', { side: pan.showing, reset })
|
|
97
99
|
}, 230)
|
|
@@ -162,7 +164,7 @@ export default createComponent({
|
|
|
162
164
|
})
|
|
163
165
|
|
|
164
166
|
onBeforeUnmount(() => {
|
|
165
|
-
clearTimeout(timer)
|
|
167
|
+
timer !== null && clearTimeout(timer)
|
|
166
168
|
})
|
|
167
169
|
|
|
168
170
|
// expose public methods
|
|
@@ -17,15 +17,23 @@ export default createComponent({
|
|
|
17
17
|
|
|
18
18
|
setup (props, { slots, emit }) {
|
|
19
19
|
let animating = false, doneFn, element
|
|
20
|
-
let timer, timerFallback, animListener, lastEvent
|
|
20
|
+
let timer = null, timerFallback = null, animListener, lastEvent
|
|
21
21
|
|
|
22
22
|
function cleanup () {
|
|
23
23
|
doneFn && doneFn()
|
|
24
24
|
doneFn = null
|
|
25
25
|
animating = false
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if (timer !== null) {
|
|
28
|
+
clearTimeout(timer)
|
|
29
|
+
timer = null
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (timerFallback !== null) {
|
|
33
|
+
clearTimeout(timerFallback)
|
|
34
|
+
timerFallback = null
|
|
35
|
+
}
|
|
36
|
+
|
|
29
37
|
element !== void 0 && element.removeEventListener('transitionend', animListener)
|
|
30
38
|
animListener = null
|
|
31
39
|
}
|
|
@@ -64,8 +72,11 @@ export default createComponent({
|
|
|
64
72
|
begin(el, pos, done)
|
|
65
73
|
|
|
66
74
|
timer = setTimeout(() => {
|
|
75
|
+
timer = null
|
|
67
76
|
el.style.height = `${ el.scrollHeight }px`
|
|
68
77
|
animListener = evt => {
|
|
78
|
+
timerFallback = null
|
|
79
|
+
|
|
69
80
|
if (Object(evt) !== evt || evt.target === el) {
|
|
70
81
|
end(el, 'show')
|
|
71
82
|
}
|
|
@@ -90,8 +101,11 @@ export default createComponent({
|
|
|
90
101
|
begin(el, pos, done)
|
|
91
102
|
|
|
92
103
|
timer = setTimeout(() => {
|
|
104
|
+
timer = null
|
|
93
105
|
el.style.height = 0
|
|
94
106
|
animListener = evt => {
|
|
107
|
+
timerFallback = null
|
|
108
|
+
|
|
95
109
|
if (Object(evt) !== evt || evt.target === el) {
|
|
96
110
|
end(el, 'hide')
|
|
97
111
|
}
|
|
@@ -88,7 +88,7 @@ export default createComponent({
|
|
|
88
88
|
const tabDataListLen = ref(0)
|
|
89
89
|
const hasFocus = ref(false)
|
|
90
90
|
|
|
91
|
-
let animateTimer, scrollTimer, unwatchRoute
|
|
91
|
+
let animateTimer = null, scrollTimer = null, unwatchRoute
|
|
92
92
|
|
|
93
93
|
const tabProps = computed(() => ({
|
|
94
94
|
activeClass: props.activeClass,
|
|
@@ -224,7 +224,10 @@ export default createComponent({
|
|
|
224
224
|
oldEl = oldTab.tabIndicatorRef.value,
|
|
225
225
|
newEl = newTab.tabIndicatorRef.value
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
if (animateTimer !== null) {
|
|
228
|
+
clearTimeout(animateTimer)
|
|
229
|
+
animateTimer = null
|
|
230
|
+
}
|
|
228
231
|
|
|
229
232
|
oldEl.style.transition = 'none'
|
|
230
233
|
oldEl.style.transform = 'none'
|
|
@@ -242,6 +245,7 @@ export default createComponent({
|
|
|
242
245
|
// allow scope updates to kick in (QRouteTab needs more time)
|
|
243
246
|
registerAnimateTick(() => {
|
|
244
247
|
animateTimer = setTimeout(() => {
|
|
248
|
+
animateTimer = null
|
|
245
249
|
newEl.style.transition = 'transform .25s cubic-bezier(.4, 0, .2, 1)'
|
|
246
250
|
newEl.style.transform = 'none'
|
|
247
251
|
}, 70)
|
|
@@ -294,7 +298,7 @@ export default createComponent({
|
|
|
294
298
|
}
|
|
295
299
|
|
|
296
300
|
function animScrollTo (value) {
|
|
297
|
-
|
|
301
|
+
scrollTimer !== null && clearInterval(scrollTimer)
|
|
298
302
|
scrollTimer = setInterval(() => {
|
|
299
303
|
if (scrollTowards(value) === true) {
|
|
300
304
|
stopAnimScroll()
|
|
@@ -311,7 +315,10 @@ export default createComponent({
|
|
|
311
315
|
}
|
|
312
316
|
|
|
313
317
|
function stopAnimScroll () {
|
|
314
|
-
|
|
318
|
+
if (scrollTimer !== null) {
|
|
319
|
+
clearInterval(scrollTimer)
|
|
320
|
+
scrollTimer = null
|
|
321
|
+
}
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
function onKbdNavigate (keyCode, fromEl) {
|
|
@@ -615,7 +622,7 @@ export default createComponent({
|
|
|
615
622
|
provide(tabsKey, $tabs)
|
|
616
623
|
|
|
617
624
|
function cleanup () {
|
|
618
|
-
clearTimeout(animateTimer)
|
|
625
|
+
animateTimer !== null && clearTimeout(animateTimer)
|
|
619
626
|
stopAnimScroll()
|
|
620
627
|
unwatchRoute !== void 0 && unwatchRoute()
|
|
621
628
|
}
|
|
@@ -107,7 +107,7 @@ export default createComponent({
|
|
|
107
107
|
|
|
108
108
|
Object.assign(anchorEvents, { delayShow, delayHide })
|
|
109
109
|
|
|
110
|
-
const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent)
|
|
110
|
+
const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, 'tooltip')
|
|
111
111
|
|
|
112
112
|
// if we're on mobile, let's improve the experience
|
|
113
113
|
// by closing it when user taps outside of it
|
|
@@ -24,12 +24,16 @@ const setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.bod
|
|
|
24
24
|
return
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
if (contentEl._qOverflowAnimationFrame !== void 0) {
|
|
28
|
+
cancelAnimationFrame(contentEl._qOverflowAnimationFrame)
|
|
29
|
+
}
|
|
30
|
+
|
|
28
31
|
contentEl._qOverflowAnimationFrame = requestAnimationFrame(() => {
|
|
29
32
|
if (contentEl === null) {
|
|
30
33
|
return
|
|
31
34
|
}
|
|
32
35
|
|
|
36
|
+
contentEl._qOverflowAnimationFrame = void 0
|
|
33
37
|
const children = contentEl.children || []
|
|
34
38
|
|
|
35
39
|
filterProto
|
|
@@ -21,7 +21,7 @@ export default function ({
|
|
|
21
21
|
|
|
22
22
|
const anchorEl = ref(null)
|
|
23
23
|
|
|
24
|
-
let touchTimer
|
|
24
|
+
let touchTimer = null
|
|
25
25
|
|
|
26
26
|
function canShow (evt) {
|
|
27
27
|
// abort with no parent configured or on multi-touch
|
|
@@ -80,6 +80,7 @@ export default function ({
|
|
|
80
80
|
])
|
|
81
81
|
|
|
82
82
|
touchTimer = setTimeout(() => {
|
|
83
|
+
touchTimer = null
|
|
83
84
|
proxy.show(evt)
|
|
84
85
|
evt.qAnchorHandled = true
|
|
85
86
|
}, 300)
|
|
@@ -87,7 +88,11 @@ export default function ({
|
|
|
87
88
|
|
|
88
89
|
mobileCleanup (evt) {
|
|
89
90
|
anchorEl.value.classList.remove('non-selectable')
|
|
90
|
-
|
|
91
|
+
|
|
92
|
+
if (touchTimer !== null) {
|
|
93
|
+
clearTimeout(touchTimer)
|
|
94
|
+
touchTimer = null
|
|
95
|
+
}
|
|
91
96
|
|
|
92
97
|
if (showing.value === true && evt !== void 0) {
|
|
93
98
|
clearSelection()
|
|
@@ -201,7 +206,7 @@ export default function ({
|
|
|
201
206
|
})
|
|
202
207
|
|
|
203
208
|
onBeforeUnmount(() => {
|
|
204
|
-
clearTimeout(touchTimer)
|
|
209
|
+
touchTimer !== null && clearTimeout(touchTimer)
|
|
205
210
|
unconfigureAnchorEl()
|
|
206
211
|
})
|
|
207
212
|
|
|
@@ -122,7 +122,7 @@ export default function (state) {
|
|
|
122
122
|
const { props, emit, slots, attrs, proxy } = getCurrentInstance()
|
|
123
123
|
const { $q } = proxy
|
|
124
124
|
|
|
125
|
-
let focusoutTimer
|
|
125
|
+
let focusoutTimer = null
|
|
126
126
|
|
|
127
127
|
if (state.hasValue === void 0) {
|
|
128
128
|
state.hasValue = computed(() => fieldValueIsFilled(props.modelValue))
|
|
@@ -288,7 +288,11 @@ export default function (state) {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
function onControlFocusin (e) {
|
|
291
|
-
|
|
291
|
+
if (focusoutTimer !== null) {
|
|
292
|
+
clearTimeout(focusoutTimer)
|
|
293
|
+
focusoutTimer = null
|
|
294
|
+
}
|
|
295
|
+
|
|
292
296
|
if (state.editable.value === true && state.focused.value === false) {
|
|
293
297
|
state.focused.value = true
|
|
294
298
|
emit('focus', e)
|
|
@@ -296,8 +300,10 @@ export default function (state) {
|
|
|
296
300
|
}
|
|
297
301
|
|
|
298
302
|
function onControlFocusout (e, then) {
|
|
299
|
-
clearTimeout(focusoutTimer)
|
|
303
|
+
focusoutTimer !== null && clearTimeout(focusoutTimer)
|
|
300
304
|
focusoutTimer = setTimeout(() => {
|
|
305
|
+
focusoutTimer = null
|
|
306
|
+
|
|
301
307
|
if (
|
|
302
308
|
document.hasFocus() === true && (
|
|
303
309
|
state.hasPopupOpen === true
|
|
@@ -547,7 +553,7 @@ export default function (state) {
|
|
|
547
553
|
})
|
|
548
554
|
|
|
549
555
|
onBeforeUnmount(() => {
|
|
550
|
-
clearTimeout(focusoutTimer)
|
|
556
|
+
focusoutTimer !== null && clearTimeout(focusoutTimer)
|
|
551
557
|
})
|
|
552
558
|
|
|
553
559
|
// expose public methods
|
|
@@ -26,7 +26,7 @@ function isOnGlobalDialog (vm) {
|
|
|
26
26
|
// Warning!
|
|
27
27
|
// You MUST specify "inheritAttrs: false" in your component
|
|
28
28
|
|
|
29
|
-
export default function (vm, innerRef, renderPortalContent,
|
|
29
|
+
export default function (vm, innerRef, renderPortalContent, type) {
|
|
30
30
|
// showing, including while in show/hide transition
|
|
31
31
|
const portalIsActive = ref(false)
|
|
32
32
|
|
|
@@ -46,7 +46,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
46
46
|
|
|
47
47
|
let portalEl = null
|
|
48
48
|
const focusObj = {}
|
|
49
|
-
const onGlobalDialog =
|
|
49
|
+
const onGlobalDialog = type === 'dialog' && isOnGlobalDialog(vm)
|
|
50
50
|
|
|
51
51
|
function showPortal (isReady) {
|
|
52
52
|
if (isReady === true) {
|
|
@@ -59,7 +59,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
59
59
|
|
|
60
60
|
if (portalIsActive.value === false) {
|
|
61
61
|
if (onGlobalDialog === false && portalEl === null) {
|
|
62
|
-
portalEl = createGlobalNode()
|
|
62
|
+
portalEl = createGlobalNode(false, type)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
portalIsActive.value = true
|
|
@@ -9,11 +9,14 @@ import { vmIsDestroyed } from '../../utils/private/vm'
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export default function () {
|
|
12
|
-
let timer
|
|
12
|
+
let timer = null
|
|
13
13
|
const vm = getCurrentInstance()
|
|
14
14
|
|
|
15
15
|
function removeTimeout () {
|
|
16
|
-
|
|
16
|
+
if (timer !== null) {
|
|
17
|
+
clearTimeout(timer)
|
|
18
|
+
timer = null
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
onDeactivated(removeTimeout)
|
|
@@ -23,7 +26,7 @@ export default function () {
|
|
|
23
26
|
removeTimeout,
|
|
24
27
|
|
|
25
28
|
registerTimeout (fn, delay) {
|
|
26
|
-
|
|
29
|
+
removeTimeout(timer)
|
|
27
30
|
|
|
28
31
|
if (vmIsDestroyed(vm) === false) {
|
|
29
32
|
timer = setTimeout(fn, delay)
|
|
@@ -74,6 +74,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
74
74
|
: ctx.touchSensitivity
|
|
75
75
|
|
|
76
76
|
ctx.timer = setTimeout(() => {
|
|
77
|
+
ctx.timer = void 0
|
|
77
78
|
clearSelection()
|
|
78
79
|
ctx.triggered = true
|
|
79
80
|
|
|
@@ -90,10 +91,13 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
90
91
|
move (evt) {
|
|
91
92
|
const { top, left } = position(evt)
|
|
92
93
|
if (
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
ctx.timer !== void 0 && (
|
|
95
|
+
Math.abs(left - ctx.origin.left) >= ctx.sensitivity
|
|
96
|
+
|| Math.abs(top - ctx.origin.top) >= ctx.sensitivity
|
|
97
|
+
)
|
|
95
98
|
) {
|
|
96
99
|
clearTimeout(ctx.timer)
|
|
100
|
+
ctx.timer = void 0
|
|
97
101
|
}
|
|
98
102
|
},
|
|
99
103
|
|
|
@@ -106,8 +110,9 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
106
110
|
if (ctx.triggered === true) {
|
|
107
111
|
evt !== void 0 && stopAndPrevent(evt)
|
|
108
112
|
}
|
|
109
|
-
else {
|
|
113
|
+
else if (ctx.timer !== void 0) {
|
|
110
114
|
clearTimeout(ctx.timer)
|
|
115
|
+
ctx.timer = void 0
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
}
|
|
@@ -159,7 +164,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
159
164
|
cleanEvt(ctx, 'main')
|
|
160
165
|
cleanEvt(ctx, 'temp')
|
|
161
166
|
|
|
162
|
-
clearTimeout(ctx.timer)
|
|
167
|
+
ctx.timer !== void 0 && clearTimeout(ctx.timer)
|
|
163
168
|
ctx.styleCleanup !== void 0 && ctx.styleCleanup()
|
|
164
169
|
|
|
165
170
|
delete el.__qtouchhold
|
|
@@ -138,6 +138,8 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
const fn = () => {
|
|
141
|
+
ctx.timer = void 0
|
|
142
|
+
|
|
141
143
|
if (ctx.event === void 0) {
|
|
142
144
|
return
|
|
143
145
|
}
|
|
@@ -181,8 +183,9 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
181
183
|
},
|
|
182
184
|
|
|
183
185
|
move (evt) {
|
|
184
|
-
if (ctx.event !== void 0 && shouldEnd(evt, ctx.origin) === true) {
|
|
186
|
+
if (ctx.event !== void 0 && ctx.timer !== void 0 && shouldEnd(evt, ctx.origin) === true) {
|
|
185
187
|
clearTimeout(ctx.timer)
|
|
188
|
+
ctx.timer = void 0
|
|
186
189
|
}
|
|
187
190
|
},
|
|
188
191
|
|
|
@@ -195,7 +198,11 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
195
198
|
evt !== void 0 && ctx.event.repeatCount > 0 && stopAndPrevent(evt)
|
|
196
199
|
|
|
197
200
|
cleanEvt(ctx, 'temp')
|
|
198
|
-
|
|
201
|
+
|
|
202
|
+
if (ctx.timer !== void 0) {
|
|
203
|
+
clearTimeout(ctx.timer)
|
|
204
|
+
ctx.timer = void 0
|
|
205
|
+
}
|
|
199
206
|
|
|
200
207
|
ctx.event = void 0
|
|
201
208
|
}
|
|
@@ -244,7 +251,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
244
251
|
const ctx = el.__qtouchrepeat
|
|
245
252
|
|
|
246
253
|
if (ctx !== void 0) {
|
|
247
|
-
clearTimeout(ctx.timer)
|
|
254
|
+
ctx.timer !== void 0 && clearTimeout(ctx.timer)
|
|
248
255
|
|
|
249
256
|
cleanEvt(ctx, 'main')
|
|
250
257
|
cleanEvt(ctx, 'temp')
|
package/src/plugins/Loading.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { h,
|
|
1
|
+
import { h, Transition, onMounted } from 'vue'
|
|
2
2
|
|
|
3
3
|
import QSpinner from '../components/spinner/QSpinner.js'
|
|
4
4
|
|
|
5
|
+
import { createChildApp } from '../install-quasar.js'
|
|
5
6
|
import defineReactivePlugin from '../utils/private/define-reactive-plugin.js'
|
|
6
7
|
import { createGlobalNode, removeGlobalNode } from '../utils/private/global-nodes.js'
|
|
7
8
|
import preventScroll from '../utils/prevent-scroll.js'
|
|
@@ -11,7 +12,7 @@ let
|
|
|
11
12
|
app,
|
|
12
13
|
vm,
|
|
13
14
|
uid = 0,
|
|
14
|
-
timeout,
|
|
15
|
+
timeout = null,
|
|
15
16
|
props = {},
|
|
16
17
|
activeGroups = {}
|
|
17
18
|
|
|
@@ -61,14 +62,14 @@ const Plugin = defineReactivePlugin({
|
|
|
61
62
|
}
|
|
62
63
|
else {
|
|
63
64
|
props.uid = ++uid
|
|
64
|
-
clearTimeout(timeout)
|
|
65
|
+
timeout !== null && clearTimeout(timeout)
|
|
65
66
|
|
|
66
67
|
timeout = setTimeout(() => {
|
|
67
|
-
timeout =
|
|
68
|
+
timeout = null
|
|
68
69
|
|
|
69
70
|
const el = createGlobalNode('q-loading')
|
|
70
71
|
|
|
71
|
-
app =
|
|
72
|
+
app = createChildApp({
|
|
72
73
|
name: 'QLoading',
|
|
73
74
|
|
|
74
75
|
setup () {
|
|
@@ -130,7 +131,7 @@ const Plugin = defineReactivePlugin({
|
|
|
130
131
|
onAfterLeave
|
|
131
132
|
}, getContent)
|
|
132
133
|
}
|
|
133
|
-
})
|
|
134
|
+
}, Plugin.__parentApp)
|
|
134
135
|
|
|
135
136
|
vm = app.mount(el)
|
|
136
137
|
}, props.delay)
|
|
@@ -174,9 +175,9 @@ const Plugin = defineReactivePlugin({
|
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
if (timeout !==
|
|
178
|
+
if (timeout !== null) {
|
|
178
179
|
clearTimeout(timeout)
|
|
179
|
-
timeout =
|
|
180
|
+
timeout = null
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
Plugin.isActive = false
|
|
@@ -189,11 +190,15 @@ const Plugin = defineReactivePlugin({
|
|
|
189
190
|
}
|
|
190
191
|
},
|
|
191
192
|
|
|
192
|
-
install ({ $q }) {
|
|
193
|
+
install ({ $q, parentApp }) {
|
|
193
194
|
$q.loading = this
|
|
194
195
|
|
|
195
|
-
if (__QUASAR_SSR_SERVER__ !== true
|
|
196
|
-
|
|
196
|
+
if (__QUASAR_SSR_SERVER__ !== true) {
|
|
197
|
+
Plugin.__parentApp = parentApp
|
|
198
|
+
|
|
199
|
+
if ($q.config.loading !== void 0) {
|
|
200
|
+
this.setDefaults($q.config.loading)
|
|
201
|
+
}
|
|
197
202
|
}
|
|
198
203
|
}
|
|
199
204
|
})
|
package/src/plugins/Meta.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isRuntimeSsrPreHydration } from './Platform.js'
|
|
2
2
|
import extend from '../utils/extend.js'
|
|
3
3
|
|
|
4
|
-
let updateId, currentClientMeta
|
|
4
|
+
let updateId = null, currentClientMeta
|
|
5
5
|
export const clientList = []
|
|
6
6
|
|
|
7
7
|
function normalize (meta) {
|
|
@@ -218,6 +218,8 @@ function injectServerMeta (ssrContext) {
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
function updateClientMeta () {
|
|
221
|
+
updateId = null
|
|
222
|
+
|
|
221
223
|
const data = {
|
|
222
224
|
title: '',
|
|
223
225
|
titleTemplate: null,
|
|
@@ -243,7 +245,7 @@ function updateClientMeta () {
|
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
export function planClientUpdate () {
|
|
246
|
-
clearTimeout(updateId)
|
|
248
|
+
updateId !== null && clearTimeout(updateId)
|
|
247
249
|
updateId = setTimeout(updateClientMeta, 50)
|
|
248
250
|
}
|
|
249
251
|
|
package/src/plugins/Notify.js
CHANGED
|
@@ -225,7 +225,10 @@ function addNotification (config, $q, originalApi) {
|
|
|
225
225
|
|
|
226
226
|
if (originalApi !== void 0) {
|
|
227
227
|
// reset timeout if any
|
|
228
|
-
|
|
228
|
+
if (originalApi.notif.meta.timer) {
|
|
229
|
+
clearTimeout(originalApi.notif.meta.timer)
|
|
230
|
+
originalApi.notif.meta.timer = void 0
|
|
231
|
+
}
|
|
229
232
|
|
|
230
233
|
// retain uid
|
|
231
234
|
notif.meta.uid = originalApi.notif.meta.uid
|
|
@@ -261,7 +264,10 @@ function addNotification (config, $q, originalApi) {
|
|
|
261
264
|
// ok, so it's NOT a new one
|
|
262
265
|
else {
|
|
263
266
|
// reset timeout if any
|
|
264
|
-
|
|
267
|
+
if (original.meta.timer) {
|
|
268
|
+
clearTimeout(original.meta.timer)
|
|
269
|
+
original.meta.timer = void 0
|
|
270
|
+
}
|
|
265
271
|
|
|
266
272
|
if (notif.badgePosition !== void 0) {
|
|
267
273
|
if (badgePositions.includes(notif.badgePosition) === false) {
|
|
@@ -291,6 +297,7 @@ function addNotification (config, $q, originalApi) {
|
|
|
291
297
|
|
|
292
298
|
if (notif.timeout > 0) {
|
|
293
299
|
notif.meta.timer = setTimeout(() => {
|
|
300
|
+
notif.meta.timer = void 0
|
|
294
301
|
dismiss()
|
|
295
302
|
}, notif.timeout + /* show duration */ 1000)
|
|
296
303
|
}
|
|
@@ -339,7 +346,10 @@ function addNotification (config, $q, originalApi) {
|
|
|
339
346
|
}
|
|
340
347
|
|
|
341
348
|
function removeNotification (notif) {
|
|
342
|
-
|
|
349
|
+
if (notif.meta.timer) {
|
|
350
|
+
clearTimeout(notif.meta.timer)
|
|
351
|
+
notif.meta.timer = void 0
|
|
352
|
+
}
|
|
343
353
|
|
|
344
354
|
const index = notificationsList[ notif.position ].value.indexOf(notif)
|
|
345
355
|
if (index !== -1) {
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import { addFocusout, removeFocusout } from './private/focusout.js'
|
|
3
|
+
|
|
1
4
|
function fallback (text) {
|
|
2
5
|
const area = document.createElement('textarea')
|
|
3
6
|
area.value = text
|
|
4
7
|
area.contentEditable = 'true'
|
|
5
8
|
area.style.position = 'fixed' // avoid scrolling to bottom
|
|
6
9
|
|
|
10
|
+
const fn = () => {}
|
|
11
|
+
addFocusout(fn)
|
|
12
|
+
|
|
7
13
|
document.body.appendChild(area)
|
|
8
14
|
area.focus()
|
|
9
15
|
area.select()
|
|
@@ -11,6 +17,8 @@ function fallback (text) {
|
|
|
11
17
|
const res = document.execCommand('copy')
|
|
12
18
|
|
|
13
19
|
area.remove()
|
|
20
|
+
removeFocusout(fn)
|
|
21
|
+
|
|
14
22
|
return res
|
|
15
23
|
}
|
|
16
24
|
|
package/src/utils/debounce.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
export default function (fn, wait = 250, immediate) {
|
|
2
|
-
let
|
|
2
|
+
let timer = null
|
|
3
3
|
|
|
4
4
|
function debounced (/* ...args */) {
|
|
5
5
|
const args = arguments
|
|
6
6
|
|
|
7
7
|
const later = () => {
|
|
8
|
-
|
|
8
|
+
timer = null
|
|
9
9
|
if (immediate !== true) {
|
|
10
10
|
fn.apply(this, args)
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
if (timer !== null) {
|
|
15
|
+
clearTimeout(timer)
|
|
16
|
+
}
|
|
17
|
+
else if (immediate === true) {
|
|
16
18
|
fn.apply(this, args)
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
|
|
21
|
+
timer = setTimeout(later, wait)
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
debounced.cancel = () => {
|
|
22
|
-
clearTimeout(
|
|
25
|
+
timer !== null && clearTimeout(timer)
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
return debounced
|