quasar 2.11.2 → 2.11.4
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 +2 -2
- 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.css +4 -0
- package/dist/quasar.esm.js +386 -179
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +4 -0
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +3 -1
- package/dist/quasar.umd.js +386 -179
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/web-types/web-types.json +1 -1
- package/package.json +8 -8
- 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/checkbox/use-checkbox.js +2 -0
- package/src/components/dialog/QDialog.js +8 -4
- package/src/components/drawer/QDrawer.js +8 -3
- package/src/components/img/QImg.js +25 -11
- 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/radio/QRadio.js +2 -0
- 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/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/css/core/visibility.sass +2 -0
- package/src/directives/TouchHold.js +9 -4
- package/src/directives/TouchRepeat.js +10 -3
- package/src/lang.js +17 -11
- package/src/plugins/Loading.js +5 -5
- package/src/plugins/Meta.js +4 -2
- package/src/plugins/Notify.js +13 -3
- package/src/utils/debounce.js +9 -6
- package/src/utils/morph.js +7 -6
- package/src/utils/prevent-scroll.js +5 -6
- 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
|
@@ -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
|
|
@@ -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/lang.js
CHANGED
|
@@ -40,25 +40,30 @@ const Plugin = defineReactivePlugin({
|
|
|
40
40
|
return
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const dir = lang.rtl === true ? 'rtl' : 'ltr'
|
|
44
|
-
const attrs = `lang=${ lang.isoName } dir=${ dir }`
|
|
45
|
-
|
|
46
43
|
lang.set = ssrContext.$q.lang.set
|
|
47
44
|
|
|
48
|
-
ssrContext.
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
if (ssrContext.$q.config.lang === void 0 || ssrContext.$q.config.lang.noHtmlAttrs !== true) {
|
|
46
|
+
const dir = lang.rtl === true ? 'rtl' : 'ltr'
|
|
47
|
+
const attrs = `lang=${ lang.isoName } dir=${ dir }`
|
|
48
|
+
|
|
49
|
+
ssrContext._meta.htmlAttrs = ssrContext.__qPrevLang !== void 0
|
|
50
|
+
? ssrContext._meta.htmlAttrs.replace(ssrContext.__qPrevLang, attrs)
|
|
51
|
+
: attrs
|
|
52
|
+
|
|
53
|
+
ssrContext.__qPrevLang = attrs
|
|
54
|
+
}
|
|
51
55
|
|
|
52
|
-
ssrContext.__qPrevLang = attrs
|
|
53
56
|
ssrContext.$q.lang = lang
|
|
54
57
|
}
|
|
55
58
|
else {
|
|
56
|
-
const el = document.documentElement
|
|
57
|
-
el.setAttribute('dir', lang.rtl === true ? 'rtl' : 'ltr')
|
|
58
|
-
el.setAttribute('lang', lang.isoName)
|
|
59
|
-
|
|
60
59
|
lang.set = Plugin.set
|
|
61
60
|
|
|
61
|
+
if (Plugin.__langConfig === void 0 || Plugin.__langConfig.noHtmlAttrs !== true) {
|
|
62
|
+
const el = document.documentElement
|
|
63
|
+
el.setAttribute('dir', lang.rtl === true ? 'rtl' : 'ltr')
|
|
64
|
+
el.setAttribute('lang', lang.isoName)
|
|
65
|
+
}
|
|
66
|
+
|
|
62
67
|
Object.assign(Plugin.__langPack, lang)
|
|
63
68
|
|
|
64
69
|
Plugin.props = lang
|
|
@@ -87,6 +92,7 @@ const Plugin = defineReactivePlugin({
|
|
|
87
92
|
}
|
|
88
93
|
else {
|
|
89
94
|
$q.lang = Plugin.__langPack
|
|
95
|
+
Plugin.__langConfig = $q.config.lang
|
|
90
96
|
|
|
91
97
|
if (this.__installed === true) {
|
|
92
98
|
lang !== void 0 && this.set(lang)
|
package/src/plugins/Loading.js
CHANGED
|
@@ -11,7 +11,7 @@ let
|
|
|
11
11
|
app,
|
|
12
12
|
vm,
|
|
13
13
|
uid = 0,
|
|
14
|
-
timeout,
|
|
14
|
+
timeout = null,
|
|
15
15
|
props = {},
|
|
16
16
|
activeGroups = {}
|
|
17
17
|
|
|
@@ -61,10 +61,10 @@ const Plugin = defineReactivePlugin({
|
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
props.uid = ++uid
|
|
64
|
-
clearTimeout(timeout)
|
|
64
|
+
timeout !== null && clearTimeout(timeout)
|
|
65
65
|
|
|
66
66
|
timeout = setTimeout(() => {
|
|
67
|
-
timeout =
|
|
67
|
+
timeout = null
|
|
68
68
|
|
|
69
69
|
const el = createGlobalNode('q-loading')
|
|
70
70
|
|
|
@@ -174,9 +174,9 @@ const Plugin = defineReactivePlugin({
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
if (timeout !==
|
|
177
|
+
if (timeout !== null) {
|
|
178
178
|
clearTimeout(timeout)
|
|
179
|
-
timeout =
|
|
179
|
+
timeout = null
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
Plugin.isActive = false
|
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) {
|
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
|
package/src/utils/morph.js
CHANGED
|
@@ -950,12 +950,11 @@ export default function morph (_options) {
|
|
|
950
950
|
: (
|
|
951
951
|
options.waitFor === 'transitionend'
|
|
952
952
|
? new Promise(resolve => {
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
clearTimeout(timer)
|
|
953
|
+
const endFn = () => {
|
|
954
|
+
if (timer !== null) {
|
|
955
|
+
clearTimeout(timer)
|
|
956
|
+
timer = null
|
|
957
|
+
}
|
|
959
958
|
|
|
960
959
|
if (elTo) {
|
|
961
960
|
elTo.removeEventListener('transitionend', endFn)
|
|
@@ -965,6 +964,8 @@ export default function morph (_options) {
|
|
|
965
964
|
resolve()
|
|
966
965
|
}
|
|
967
966
|
|
|
967
|
+
let timer = setTimeout(endFn, 400)
|
|
968
|
+
|
|
968
969
|
elTo.addEventListener('transitionend', endFn)
|
|
969
970
|
elTo.addEventListener('transitioncancel', endFn)
|
|
970
971
|
})
|
|
@@ -10,7 +10,7 @@ let
|
|
|
10
10
|
vpPendingUpdate = false,
|
|
11
11
|
bodyLeft,
|
|
12
12
|
bodyTop,
|
|
13
|
-
closeTimer
|
|
13
|
+
closeTimer = null
|
|
14
14
|
|
|
15
15
|
function onWheel (e) {
|
|
16
16
|
if (shouldPreventScroll(e)) {
|
|
@@ -157,9 +157,9 @@ export default function (state) {
|
|
|
157
157
|
if (state === true) {
|
|
158
158
|
registered++
|
|
159
159
|
|
|
160
|
-
if (closeTimer !==
|
|
160
|
+
if (closeTimer !== null) {
|
|
161
161
|
clearTimeout(closeTimer)
|
|
162
|
-
closeTimer =
|
|
162
|
+
closeTimer = null
|
|
163
163
|
return
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -181,11 +181,10 @@ export default function (state) {
|
|
|
181
181
|
action = 'remove'
|
|
182
182
|
|
|
183
183
|
if (client.is.ios === true && client.is.nativeMobile === true) {
|
|
184
|
-
clearTimeout(closeTimer)
|
|
185
|
-
|
|
184
|
+
closeTimer !== null && clearTimeout(closeTimer)
|
|
186
185
|
closeTimer = setTimeout(() => {
|
|
187
186
|
apply(action)
|
|
188
|
-
closeTimer =
|
|
187
|
+
closeTimer = null
|
|
189
188
|
}, 100)
|
|
190
189
|
return
|
|
191
190
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { listenOpts } from '../event.js'
|
|
2
2
|
import { portalProxyList } from '../private/portal.js'
|
|
3
3
|
|
|
4
|
-
let timer
|
|
4
|
+
let timer = null
|
|
5
5
|
|
|
6
6
|
const
|
|
7
7
|
{ notPassiveCapture } = listenOpts,
|
|
8
8
|
registeredList = []
|
|
9
9
|
|
|
10
10
|
function globalHandler (evt) {
|
|
11
|
-
|
|
11
|
+
if (timer !== null) {
|
|
12
|
+
clearTimeout(timer)
|
|
13
|
+
timer = null
|
|
14
|
+
}
|
|
12
15
|
|
|
13
16
|
const target = evt.target
|
|
14
17
|
|
|
@@ -81,7 +84,11 @@ export function removeClickOutside (clickOutsideProps) {
|
|
|
81
84
|
registeredList.splice(index, 1)
|
|
82
85
|
|
|
83
86
|
if (registeredList.length === 0) {
|
|
84
|
-
|
|
87
|
+
if (timer !== null) {
|
|
88
|
+
clearTimeout(timer)
|
|
89
|
+
timer = null
|
|
90
|
+
}
|
|
91
|
+
|
|
85
92
|
document.removeEventListener('mousedown', globalHandler, notPassiveCapture)
|
|
86
93
|
document.removeEventListener('touchstart', globalHandler, notPassiveCapture)
|
|
87
94
|
}
|
|
@@ -54,7 +54,7 @@ export default function (DefaultComponent, supportsCustomComponent, parentApp) {
|
|
|
54
54
|
|
|
55
55
|
let vm, emittedOK = false
|
|
56
56
|
const dialogRef = ref(null)
|
|
57
|
-
const el = createGlobalNode()
|
|
57
|
+
const el = createGlobalNode(false, 'dialog')
|
|
58
58
|
|
|
59
59
|
const applyState = cmd => {
|
|
60
60
|
if (dialogRef.value !== null && dialogRef.value[ cmd ] !== void 0) {
|