quasar 2.11.4 → 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.css +0 -4
- package/dist/quasar.esm.js +73 -24
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +0 -4
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +1 -3
- package/dist/quasar.umd.js +73 -24
- 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/dialog/QDialog.js +2 -1
- package/src/components/infinite-scroll/QInfiniteScroll.js +26 -4
- package/src/components/rating/QRating.js +3 -3
- package/src/components/virtual-scroll/use-virtual-scroll.js +5 -1
- package/src/css/core/visibility.sass +0 -2
- package/src/plugins/Loading.js +11 -6
- package/src/utils/copy-to-clipboard.js +8 -0
- package/src/utils/is.js +11 -6
- package/src/utils/prevent-scroll.js +9 -1
package/package.json
CHANGED
|
@@ -79,6 +79,7 @@ export default createComponent({
|
|
|
79
79
|
|
|
80
80
|
setup (props, { slots, emit, attrs }) {
|
|
81
81
|
const vm = getCurrentInstance()
|
|
82
|
+
const { proxy: { $q } } = vm
|
|
82
83
|
|
|
83
84
|
const innerRef = ref(null)
|
|
84
85
|
const showing = ref(false)
|
|
@@ -370,7 +371,7 @@ export default createComponent({
|
|
|
370
371
|
|
|
371
372
|
onBeforeUnmount(cleanup)
|
|
372
373
|
|
|
373
|
-
const backdropEvt =
|
|
374
|
+
const backdropEvt = $q.platform.is.ios === true || $q.platform.is.safari ? 'onClick' : 'onFocusin'
|
|
374
375
|
|
|
375
376
|
function renderPortalContent () {
|
|
376
377
|
return h('div', {
|
|
@@ -39,6 +39,7 @@ export default createComponent({
|
|
|
39
39
|
const isFetching = ref(false)
|
|
40
40
|
const isWorking = ref(true)
|
|
41
41
|
const rootRef = ref(null)
|
|
42
|
+
const loadingRef = ref(null)
|
|
42
43
|
|
|
43
44
|
let index = props.initialIndex || 0
|
|
44
45
|
let localScrollTarget, poll
|
|
@@ -170,12 +171,32 @@ export default createComponent({
|
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
function updateSvgAnimations (isRetry) {
|
|
175
|
+
if (renderLoadingSlot.value === true) {
|
|
176
|
+
if (loadingRef.value === null) {
|
|
177
|
+
isRetry !== true && nextTick(() => { updateSvgAnimations(true) })
|
|
178
|
+
return
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// we need to pause svg animations (if any) when hiding
|
|
182
|
+
// otherwise the browser will keep on recalculating the style
|
|
183
|
+
const action = `${ isFetching.value === true ? 'un' : '' }pauseAnimations`
|
|
184
|
+
Array.from(loadingRef.value.getElementsByTagName('svg')).forEach(el => {
|
|
185
|
+
el[ action ]()
|
|
186
|
+
})
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const renderLoadingSlot = computed(() => props.disable !== true && isWorking.value === true)
|
|
191
|
+
|
|
192
|
+
watch([ isFetching, renderLoadingSlot ], () => { updateSvgAnimations() })
|
|
193
|
+
|
|
173
194
|
watch(() => props.disable, val => {
|
|
174
195
|
if (val === true) { stop() }
|
|
175
196
|
else { resume() }
|
|
176
197
|
})
|
|
177
198
|
|
|
178
|
-
watch(() => props.reverse,
|
|
199
|
+
watch(() => props.reverse, () => {
|
|
179
200
|
if (isFetching.value === false && isWorking.value === true) {
|
|
180
201
|
immediatePoll()
|
|
181
202
|
}
|
|
@@ -206,8 +227,9 @@ export default createComponent({
|
|
|
206
227
|
|
|
207
228
|
onMounted(() => {
|
|
208
229
|
setDebounce(props.debounce)
|
|
209
|
-
|
|
210
230
|
updateScrollTarget()
|
|
231
|
+
|
|
232
|
+
isFetching.value === false && updateSvgAnimations()
|
|
211
233
|
})
|
|
212
234
|
|
|
213
235
|
// expose public methods
|
|
@@ -220,9 +242,9 @@ export default createComponent({
|
|
|
220
242
|
return () => {
|
|
221
243
|
const child = hUniqueSlot(slots.default, [])
|
|
222
244
|
|
|
223
|
-
if (
|
|
245
|
+
if (renderLoadingSlot.value === true) {
|
|
224
246
|
child[ props.reverse === false ? 'push' : 'unshift' ](
|
|
225
|
-
h('div', { class: classes.value }, hSlot(slots.loading))
|
|
247
|
+
h('div', { ref: loadingRef, class: classes.value }, hSlot(slots.loading))
|
|
226
248
|
)
|
|
227
249
|
}
|
|
228
250
|
|
|
@@ -216,13 +216,13 @@ export default createComponent({
|
|
|
216
216
|
case 37: // LEFT ARROW
|
|
217
217
|
case 40: // DOWN ARROW
|
|
218
218
|
if (iconRefs[ `rt${ i - 1 }` ]) {
|
|
219
|
-
iconRefs[ `rt${ i - 1 }` ]
|
|
219
|
+
iconRefs[ `rt${ i - 1 }` ].focus()
|
|
220
220
|
}
|
|
221
221
|
return stopAndPrevent(e)
|
|
222
222
|
case 39: // RIGHT ARROW
|
|
223
223
|
case 38: // UP ARROW
|
|
224
224
|
if (iconRefs[ `rt${ i + 1 }` ]) {
|
|
225
|
-
iconRefs[ `rt${ i + 1 }` ]
|
|
225
|
+
iconRefs[ `rt${ i + 1 }` ].focus()
|
|
226
226
|
}
|
|
227
227
|
return stopAndPrevent(e)
|
|
228
228
|
}
|
|
@@ -245,7 +245,7 @@ export default createComponent({
|
|
|
245
245
|
child.push(
|
|
246
246
|
h('div', {
|
|
247
247
|
key: i,
|
|
248
|
-
ref:
|
|
248
|
+
ref: el => { iconRefs[ `rt${ i }` ] = el },
|
|
249
249
|
class: 'q-rating__icon-container flex flex-center',
|
|
250
250
|
...attrs,
|
|
251
251
|
onClick () { set(i) },
|
|
@@ -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
|
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'
|
|
@@ -68,7 +69,7 @@ const Plugin = defineReactivePlugin({
|
|
|
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)
|
|
@@ -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
|
})
|
|
@@ -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/is.js
CHANGED
|
@@ -32,20 +32,23 @@ export function isDeepEqual (a, b) {
|
|
|
32
32
|
return false
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let iter = a.entries()
|
|
36
|
+
|
|
37
|
+
i = iter.next()
|
|
36
38
|
while (i.done !== true) {
|
|
37
39
|
if (b.has(i.value[ 0 ]) !== true) {
|
|
38
40
|
return false
|
|
39
41
|
}
|
|
40
|
-
i =
|
|
42
|
+
i = iter.next()
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
iter = a.entries()
|
|
46
|
+
i = iter.next()
|
|
44
47
|
while (i.done !== true) {
|
|
45
48
|
if (isDeepEqual(i.value[ 1 ], b.get(i.value[ 0 ])) !== true) {
|
|
46
49
|
return false
|
|
47
50
|
}
|
|
48
|
-
i =
|
|
51
|
+
i = iter.next()
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
return true
|
|
@@ -56,12 +59,14 @@ export function isDeepEqual (a, b) {
|
|
|
56
59
|
return false
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
const iter = a.entries()
|
|
63
|
+
|
|
64
|
+
i = iter.next()
|
|
60
65
|
while (i.done !== true) {
|
|
61
66
|
if (b.has(i.value[ 0 ]) !== true) {
|
|
62
67
|
return false
|
|
63
68
|
}
|
|
64
|
-
i =
|
|
69
|
+
i = iter.next()
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
return true
|
|
@@ -10,6 +10,7 @@ let
|
|
|
10
10
|
vpPendingUpdate = false,
|
|
11
11
|
bodyLeft,
|
|
12
12
|
bodyTop,
|
|
13
|
+
href,
|
|
13
14
|
closeTimer = null
|
|
14
15
|
|
|
15
16
|
function onWheel (e) {
|
|
@@ -96,6 +97,8 @@ function apply (action) {
|
|
|
96
97
|
bodyLeft = body.style.left
|
|
97
98
|
bodyTop = body.style.top
|
|
98
99
|
|
|
100
|
+
href = window.location.href
|
|
101
|
+
|
|
99
102
|
body.style.left = `-${ scrollPositionX }px`
|
|
100
103
|
body.style.top = `-${ scrollPositionY }px`
|
|
101
104
|
|
|
@@ -108,6 +111,7 @@ function apply (action) {
|
|
|
108
111
|
|
|
109
112
|
body.classList.add('q-body--prevent-scroll')
|
|
110
113
|
document.qScrollPrevented = true
|
|
114
|
+
|
|
111
115
|
if (client.is.ios === true) {
|
|
112
116
|
if (hasViewport === true) {
|
|
113
117
|
window.scrollTo(0, 0)
|
|
@@ -146,7 +150,11 @@ function apply (action) {
|
|
|
146
150
|
body.style.left = bodyLeft
|
|
147
151
|
body.style.top = bodyTop
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
// scroll back only if route has not changed
|
|
154
|
+
if (window.location.href === href) {
|
|
155
|
+
window.scrollTo(scrollPositionX, scrollPositionY)
|
|
156
|
+
}
|
|
157
|
+
|
|
150
158
|
maxScrollTop = void 0
|
|
151
159
|
}
|
|
152
160
|
}
|