quasar 2.5.1 → 2.5.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/api/BottomSheet.json +1 -1
- package/dist/api/Notify.json +205 -5
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +1 -1
- package/dist/api/QBtn.json +4 -4
- package/dist/api/QBtnDropdown.json +17 -17
- package/dist/api/QCarousel.json +4 -4
- package/dist/api/QCheckbox.json +1 -1
- package/dist/api/QChip.json +5 -5
- package/dist/api/QDialog.json +13 -13
- package/dist/api/QDrawer.json +16 -16
- package/dist/api/QExpansionItem.json +15 -15
- package/dist/api/QFab.json +15 -15
- package/dist/api/QFabAction.json +3 -3
- package/dist/api/QField.json +2 -2
- package/dist/api/QFile.json +1 -1
- package/dist/api/QForm.json +12 -3
- package/dist/api/QIcon.json +4 -2
- package/dist/api/QInput.json +2 -2
- package/dist/api/QKnob.json +18 -0
- package/dist/api/QMenu.json +13 -13
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QPopupEdit.json +6 -6
- package/dist/api/QPopupProxy.json +13 -13
- package/dist/api/QRadio.json +1 -1
- package/dist/api/QRange.json +1 -1
- package/dist/api/QRouteTab.json +2 -2
- package/dist/api/QSelect.json +19 -5
- package/dist/api/QSlider.json +1 -1
- package/dist/api/QStep.json +4 -4
- package/dist/api/QStepper.json +4 -4
- package/dist/api/QTab.json +1 -1
- package/dist/api/QTable.json +6 -6
- package/dist/api/QTimelineEntry.json +1 -1
- package/dist/api/QToggle.json +2 -2
- package/dist/api/QTooltip.json +13 -13
- package/dist/api/QTree.json +1 -1
- package/dist/api/QUploader.json +1 -1
- package/dist/api/TouchHold.json +1 -1
- package/dist/api/TouchPan.json +1 -1
- package/dist/api/TouchRepeat.json +1 -1
- package/dist/api/TouchSwipe.json +1 -1
- 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/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-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-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v5.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.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/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/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 +2 -2
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +2 -2
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +2 -1
- package/dist/quasar.umd.js +358 -343
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/index.d.ts +245 -135
- package/dist/vetur/quasar-attributes.json +46 -38
- package/dist/vetur/quasar-tags.json +2 -0
- package/dist/web-types/web-types.json +119 -93
- package/package.json +1 -1
- package/src/api-file-example.json +2 -2
- package/src/api.extends.json +22 -33
- package/src/components/btn/QBtn.json +3 -6
- package/src/components/carousel/QCarousel.json +2 -4
- package/src/components/checkbox/use-checkbox.json +2 -4
- package/src/components/chip/QChip.json +1 -3
- package/src/components/date/QDate.js +20 -19
- package/src/components/date/use-datetime.js +3 -1
- package/src/components/dialog-plugin/DialogPlugin.js +9 -8
- package/src/components/fab/QFabAction.json +1 -3
- package/src/components/field/QField.json +2 -6
- package/src/components/form/QForm.json +10 -7
- package/src/components/icon/QIcon.js +4 -1
- package/src/components/icon/QIcon.json +1 -3
- package/src/components/input/QInput.json +2 -6
- package/src/components/input/use-mask.js +2 -2
- package/src/components/knob/QKnob.js +46 -40
- package/src/components/knob/QKnob.json +16 -0
- package/src/components/radio/QRadio.json +2 -4
- package/src/components/select/QSelect.js +4 -3
- package/src/components/select/QSelect.json +17 -8
- package/src/components/slide-transition/QSlideTransition.js +4 -4
- package/src/components/slider/use-slider.js +4 -4
- package/src/components/slider/use-slider.json +1 -1
- package/src/components/stepper/QStep.json +3 -0
- package/src/components/stepper/QStepper.json +3 -0
- package/src/components/stepper/QStepper.sass +1 -0
- package/src/components/stepper/StepHeader.js +23 -8
- package/src/components/table/QTable.json +5 -13
- package/src/components/table/table-sort.js +2 -2
- package/src/components/tabs/QRouteTab.json +2 -3
- package/src/components/tabs/use-tab.js +11 -8
- package/src/components/time/QTime.js +5 -5
- package/src/components/tree/QTree.js +39 -41
- package/src/composables/private/use-file.json +1 -3
- package/src/composables/private/use-router-link.js +1 -1
- package/src/directives/TouchHold.json +2 -3
- package/src/directives/TouchPan.json +2 -3
- package/src/directives/TouchRepeat.json +2 -3
- package/src/directives/TouchSwipe.json +2 -3
- package/src/install-quasar.js +37 -36
- package/src/plugins/Loading.js +3 -2
- package/src/plugins/LoadingBar.js +2 -1
- package/src/plugins/Notify.js +11 -4
- package/src/plugins/Notify.json +102 -2
- package/src/plugins/Screen.js +9 -5
- package/src/utils/create-uploader-component.js +2 -1
- package/src/utils/extend.js +6 -34
- package/src/utils/morph.js +19 -17
- package/src/utils/private/is.js +2 -15
- package/src/utils/private/web-storage.js +3 -2
package/src/install-quasar.js
CHANGED
|
@@ -10,6 +10,7 @@ import IconSet from './icon-set.js'
|
|
|
10
10
|
|
|
11
11
|
import { quasarKey } from './utils/private/symbols.js'
|
|
12
12
|
import { globalConfig, globalConfigIsFrozen, freezeGlobalConfig } from './utils/private/global-config.js'
|
|
13
|
+
import { isPlainObject } from './utils/private/is.js'
|
|
13
14
|
|
|
14
15
|
const autoInstalledPlugins = [
|
|
15
16
|
Platform,
|
|
@@ -46,13 +47,13 @@ function prepareApp (app, uiOpts, pluginOpts) {
|
|
|
46
47
|
installPlugins(pluginOpts, autoInstalledPlugins)
|
|
47
48
|
|
|
48
49
|
uiOpts.components !== void 0 && Object.values(uiOpts.components).forEach(c => {
|
|
49
|
-
if (
|
|
50
|
+
if (isPlainObject(c) === true && c.name !== void 0) {
|
|
50
51
|
app.component(c.name, c)
|
|
51
52
|
}
|
|
52
53
|
})
|
|
53
54
|
|
|
54
55
|
uiOpts.directives !== void 0 && Object.values(uiOpts.directives).forEach(d => {
|
|
55
|
-
if (
|
|
56
|
+
if (isPlainObject(d) === true && d.name !== void 0) {
|
|
56
57
|
app.directive(d.name, d)
|
|
57
58
|
}
|
|
58
59
|
})
|
|
@@ -74,45 +75,45 @@ function prepareApp (app, uiOpts, pluginOpts) {
|
|
|
74
75
|
|
|
75
76
|
export default __QUASAR_SSR_SERVER__
|
|
76
77
|
? function (parentApp, opts = {}, ssrContext) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Object.assign(ssrContext, {
|
|
83
|
-
$q,
|
|
84
|
-
_meta: {
|
|
85
|
-
htmlAttrs: '',
|
|
86
|
-
headTags: '',
|
|
87
|
-
endingHeadTags: '',
|
|
88
|
-
bodyClasses: '',
|
|
89
|
-
bodyAttrs: 'data-server-rendered',
|
|
90
|
-
bodyTags: ''
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
if (ssrContext._modules === void 0) {
|
|
95
|
-
// not OK. means the SSR build is not using @quasar/ssr-helpers,
|
|
96
|
-
// but we shouldn't crash the app
|
|
97
|
-
ssrContext._modules = []
|
|
98
|
-
}
|
|
78
|
+
const $q = {
|
|
79
|
+
version: __QUASAR_VERSION__,
|
|
80
|
+
config: opts.config || {}
|
|
81
|
+
}
|
|
99
82
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
83
|
+
Object.assign(ssrContext, {
|
|
84
|
+
$q,
|
|
85
|
+
_meta: {
|
|
86
|
+
htmlAttrs: '',
|
|
87
|
+
headTags: '',
|
|
88
|
+
endingHeadTags: '',
|
|
89
|
+
bodyClasses: '',
|
|
90
|
+
bodyAttrs: 'data-server-rendered',
|
|
91
|
+
bodyTags: ''
|
|
104
92
|
}
|
|
93
|
+
})
|
|
105
94
|
|
|
106
|
-
|
|
95
|
+
if (ssrContext._modules === void 0) {
|
|
96
|
+
// not OK. means the SSR build is not using @quasar/ssr-helpers,
|
|
97
|
+
// but we shouldn't crash the app
|
|
98
|
+
ssrContext._modules = []
|
|
99
|
+
}
|
|
107
100
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
iconSet: opts.iconSet,
|
|
113
|
-
ssrContext
|
|
114
|
-
})
|
|
101
|
+
if (ssrContext.onRendered === void 0) {
|
|
102
|
+
// not OK. means the SSR build is not using @quasar/ssr-helpers,
|
|
103
|
+
// but we shouldn't crash the app
|
|
104
|
+
ssrContext.onRendered = () => {}
|
|
115
105
|
}
|
|
106
|
+
|
|
107
|
+
parentApp.config.globalProperties.ssrContext = ssrContext
|
|
108
|
+
|
|
109
|
+
prepareApp(parentApp, opts, {
|
|
110
|
+
parentApp,
|
|
111
|
+
$q,
|
|
112
|
+
lang: opts.lang,
|
|
113
|
+
iconSet: opts.iconSet,
|
|
114
|
+
ssrContext
|
|
115
|
+
})
|
|
116
|
+
}
|
|
116
117
|
: function (parentApp, opts = {}) {
|
|
117
118
|
const $q = { version: __QUASAR_VERSION__ }
|
|
118
119
|
|
package/src/plugins/Loading.js
CHANGED
|
@@ -5,6 +5,7 @@ import QSpinner from '../components/spinner/QSpinner.js'
|
|
|
5
5
|
import defineReactivePlugin from '../utils/private/define-reactive-plugin.js'
|
|
6
6
|
import { createGlobalNode, removeGlobalNode } from '../utils/private/global-nodes.js'
|
|
7
7
|
import preventScroll from '../utils/prevent-scroll.js'
|
|
8
|
+
import { isPlainObject } from '../utils/private/is.js'
|
|
8
9
|
|
|
9
10
|
let
|
|
10
11
|
app,
|
|
@@ -34,7 +35,7 @@ const Plugin = defineReactivePlugin({
|
|
|
34
35
|
show (opts) {
|
|
35
36
|
if (__QUASAR_SSR_SERVER__) { return }
|
|
36
37
|
|
|
37
|
-
props = opts ===
|
|
38
|
+
props = isPlainObject(opts) === true && opts.ignoreDefaults === true
|
|
38
39
|
? { ...originalDefaults, ...opts }
|
|
39
40
|
: { ...defaults, ...opts }
|
|
40
41
|
|
|
@@ -135,7 +136,7 @@ const Plugin = defineReactivePlugin({
|
|
|
135
136
|
|
|
136
137
|
setDefaults (opts) {
|
|
137
138
|
if (__QUASAR_SSR_SERVER__ !== true) {
|
|
138
|
-
opts ===
|
|
139
|
+
isPlainObject(opts) === true && Object.assign(defaults, opts)
|
|
139
140
|
}
|
|
140
141
|
},
|
|
141
142
|
|
|
@@ -6,6 +6,7 @@ import { createGlobalNode } from '../utils/private/global-nodes.js'
|
|
|
6
6
|
import { createChildApp } from '../install-quasar.js'
|
|
7
7
|
|
|
8
8
|
import QAjaxBar from '../components/ajax-bar/QAjaxBar.js'
|
|
9
|
+
import { isPlainObject } from '../utils/private/is.js'
|
|
9
10
|
|
|
10
11
|
const barRef = ref(null)
|
|
11
12
|
|
|
@@ -59,7 +60,7 @@ const Plugin = defineReactivePlugin({
|
|
|
59
60
|
barRef.value.increment.apply(null, arguments)
|
|
60
61
|
},
|
|
61
62
|
setDefaults (opts) {
|
|
62
|
-
if (opts ===
|
|
63
|
+
if (isPlainObject(opts) === true) {
|
|
63
64
|
Object.assign(props.value, opts)
|
|
64
65
|
}
|
|
65
66
|
}
|
package/src/plugins/Notify.js
CHANGED
|
@@ -9,6 +9,7 @@ import { createComponent } from '../utils/private/create.js'
|
|
|
9
9
|
import { noop } from '../utils/event.js'
|
|
10
10
|
import { createGlobalNode } from '../utils/private/global-nodes.js'
|
|
11
11
|
import { createChildApp } from '../install-quasar.js'
|
|
12
|
+
import { isPlainObject } from '../utils/private/is.js'
|
|
12
13
|
|
|
13
14
|
let uid = 0
|
|
14
15
|
|
|
@@ -72,7 +73,7 @@ function addNotification (config, $q, originalApi) {
|
|
|
72
73
|
Object.assign(notif, defaults)
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
if (
|
|
76
|
+
if (isPlainObject(config) === false) {
|
|
76
77
|
if (notif.type) {
|
|
77
78
|
Object.assign(notif, notifTypes[ notif.type ])
|
|
78
79
|
}
|
|
@@ -396,7 +397,11 @@ function getComponent () {
|
|
|
396
397
|
if (meta.hasMedia === true) {
|
|
397
398
|
if (notif.spinner !== false) {
|
|
398
399
|
mainChild.push(
|
|
399
|
-
h(notif.spinner, {
|
|
400
|
+
h(notif.spinner, {
|
|
401
|
+
class: 'q-notification__spinner q-notification__spinner--' + meta.leftClass,
|
|
402
|
+
color: notif.spinnerColor,
|
|
403
|
+
size: notif.spinnerSize
|
|
404
|
+
})
|
|
400
405
|
)
|
|
401
406
|
}
|
|
402
407
|
else if (notif.icon) {
|
|
@@ -404,6 +409,8 @@ function getComponent () {
|
|
|
404
409
|
h(QIcon, {
|
|
405
410
|
class: 'q-notification__icon q-notification__icon--' + meta.leftClass,
|
|
406
411
|
name: notif.icon,
|
|
412
|
+
color: notif.iconColor,
|
|
413
|
+
size: notif.iconSize,
|
|
407
414
|
role: 'img'
|
|
408
415
|
})
|
|
409
416
|
)
|
|
@@ -484,12 +491,12 @@ function getComponent () {
|
|
|
484
491
|
export default {
|
|
485
492
|
setDefaults (opts) {
|
|
486
493
|
if (__QUASAR_SSR_SERVER__ !== true) {
|
|
487
|
-
opts ===
|
|
494
|
+
isPlainObject(opts) === true && Object.assign(defaults, opts)
|
|
488
495
|
}
|
|
489
496
|
},
|
|
490
497
|
|
|
491
498
|
registerType (typeName, typeOpts) {
|
|
492
|
-
if (__QUASAR_SSR_SERVER__ !== true && typeOpts ===
|
|
499
|
+
if (__QUASAR_SSR_SERVER__ !== true && isPlainObject(typeOpts) === true) {
|
|
493
500
|
notifTypes[ typeName ] = typeOpts
|
|
494
501
|
}
|
|
495
502
|
},
|
package/src/plugins/Notify.json
CHANGED
|
@@ -43,6 +43,16 @@
|
|
|
43
43
|
"extends": "icon"
|
|
44
44
|
},
|
|
45
45
|
|
|
46
|
+
"iconColor": {
|
|
47
|
+
"extends": "color",
|
|
48
|
+
"addedIn": "v2.5.5"
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
"iconSize": {
|
|
52
|
+
"extends": "size",
|
|
53
|
+
"addedIn": "v2.5.5"
|
|
54
|
+
},
|
|
55
|
+
|
|
46
56
|
"avatar": {
|
|
47
57
|
"type": "String",
|
|
48
58
|
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
@@ -58,6 +68,16 @@
|
|
|
58
68
|
"desc": "Useful for notifications that are updated; Displays the default Quasar spinner instead of an avatar or icon"
|
|
59
69
|
},
|
|
60
70
|
|
|
71
|
+
"spinnerColor": {
|
|
72
|
+
"extends": "color",
|
|
73
|
+
"addedIn": "v2.5.5"
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
"spinnerSize": {
|
|
77
|
+
"extends": "size",
|
|
78
|
+
"addedIn": "v2.5.5"
|
|
79
|
+
},
|
|
80
|
+
|
|
61
81
|
"position": {
|
|
62
82
|
"type": "String",
|
|
63
83
|
"desc": "Window side/corner to stick to",
|
|
@@ -202,6 +222,16 @@
|
|
|
202
222
|
"extends": "icon"
|
|
203
223
|
},
|
|
204
224
|
|
|
225
|
+
"iconColor": {
|
|
226
|
+
"extends": "color",
|
|
227
|
+
"addedIn": "v2.5.5"
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
"iconSize": {
|
|
231
|
+
"extends": "size",
|
|
232
|
+
"addedIn": "v2.5.5"
|
|
233
|
+
},
|
|
234
|
+
|
|
205
235
|
"avatar": {
|
|
206
236
|
"type": "String",
|
|
207
237
|
"desc": "URL to an avatar/image; Suggestion: public folder",
|
|
@@ -218,6 +248,16 @@
|
|
|
218
248
|
"examples": [ true, "QSpinnerBars" ]
|
|
219
249
|
},
|
|
220
250
|
|
|
251
|
+
"spinnerColor": {
|
|
252
|
+
"extends": "color",
|
|
253
|
+
"addedIn": "v2.5.5"
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
"spinnerSize": {
|
|
257
|
+
"extends": "size",
|
|
258
|
+
"addedIn": "v2.5.5"
|
|
259
|
+
},
|
|
260
|
+
|
|
221
261
|
"position": {
|
|
222
262
|
"type": "String",
|
|
223
263
|
"desc": "Window side/corner to stick to",
|
|
@@ -388,6 +428,16 @@
|
|
|
388
428
|
"extends": "icon"
|
|
389
429
|
},
|
|
390
430
|
|
|
431
|
+
"iconColor": {
|
|
432
|
+
"extends": "color",
|
|
433
|
+
"addedIn": "v2.5.5"
|
|
434
|
+
},
|
|
435
|
+
|
|
436
|
+
"iconSize": {
|
|
437
|
+
"extends": "size",
|
|
438
|
+
"addedIn": "v2.5.5"
|
|
439
|
+
},
|
|
440
|
+
|
|
391
441
|
"avatar": {
|
|
392
442
|
"type": "String",
|
|
393
443
|
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
@@ -404,6 +454,16 @@
|
|
|
404
454
|
"__exemption": [ "examples" ]
|
|
405
455
|
},
|
|
406
456
|
|
|
457
|
+
"spinnerColor": {
|
|
458
|
+
"extends": "color",
|
|
459
|
+
"addedIn": "v2.5.5"
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
"spinnerSize": {
|
|
463
|
+
"extends": "size",
|
|
464
|
+
"addedIn": "v2.5.5"
|
|
465
|
+
},
|
|
466
|
+
|
|
407
467
|
"progress": {
|
|
408
468
|
"type": "Boolean",
|
|
409
469
|
"desc": "Show progress bar to detail when notification will disappear automatically (unless timeout is 0)"
|
|
@@ -523,6 +583,16 @@
|
|
|
523
583
|
"extends": "icon"
|
|
524
584
|
},
|
|
525
585
|
|
|
586
|
+
"iconColor": {
|
|
587
|
+
"extends": "color",
|
|
588
|
+
"addedIn": "v2.5.5"
|
|
589
|
+
},
|
|
590
|
+
|
|
591
|
+
"iconSize": {
|
|
592
|
+
"extends": "size",
|
|
593
|
+
"addedIn": "v2.5.5"
|
|
594
|
+
},
|
|
595
|
+
|
|
526
596
|
"avatar": {
|
|
527
597
|
"type": "String",
|
|
528
598
|
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
@@ -531,7 +601,7 @@
|
|
|
531
601
|
"(relative path format) require('./my_img.jpg')",
|
|
532
602
|
"(URL) https://some-site.net/some-img.gif"
|
|
533
603
|
]
|
|
534
|
-
|
|
604
|
+
},
|
|
535
605
|
|
|
536
606
|
"spinner": {
|
|
537
607
|
"type": [ "Boolean", "Component" ],
|
|
@@ -539,6 +609,16 @@
|
|
|
539
609
|
"__exemption": [ "examples" ]
|
|
540
610
|
},
|
|
541
611
|
|
|
612
|
+
"spinnerColor": {
|
|
613
|
+
"extends": "color",
|
|
614
|
+
"addedIn": "v2.5.5"
|
|
615
|
+
},
|
|
616
|
+
|
|
617
|
+
"spinnerSize": {
|
|
618
|
+
"extends": "size",
|
|
619
|
+
"addedIn": "v2.5.5"
|
|
620
|
+
},
|
|
621
|
+
|
|
542
622
|
"position": {
|
|
543
623
|
"type": "String",
|
|
544
624
|
"desc": "Window side/corner to stick to",
|
|
@@ -706,6 +786,16 @@
|
|
|
706
786
|
"extends": "icon"
|
|
707
787
|
},
|
|
708
788
|
|
|
789
|
+
"iconColor": {
|
|
790
|
+
"extends": "color",
|
|
791
|
+
"addedIn": "v2.5.5"
|
|
792
|
+
},
|
|
793
|
+
|
|
794
|
+
"iconSize": {
|
|
795
|
+
"extends": "size",
|
|
796
|
+
"addedIn": "v2.5.5"
|
|
797
|
+
},
|
|
798
|
+
|
|
709
799
|
"avatar": {
|
|
710
800
|
"type": "String",
|
|
711
801
|
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
@@ -714,7 +804,7 @@
|
|
|
714
804
|
"(relative path format) require('./my_img.jpg')",
|
|
715
805
|
"(URL) https://some-site.net/some-img.gif"
|
|
716
806
|
]
|
|
717
|
-
|
|
807
|
+
},
|
|
718
808
|
|
|
719
809
|
"spinner": {
|
|
720
810
|
"type": [ "Boolean", "Component" ],
|
|
@@ -722,6 +812,16 @@
|
|
|
722
812
|
"__exemption": [ "examples" ]
|
|
723
813
|
},
|
|
724
814
|
|
|
815
|
+
"spinnerColor": {
|
|
816
|
+
"extends": "color",
|
|
817
|
+
"addedIn": "v2.5.5"
|
|
818
|
+
},
|
|
819
|
+
|
|
820
|
+
"spinnerSize": {
|
|
821
|
+
"extends": "size",
|
|
822
|
+
"addedIn": "v2.5.5"
|
|
823
|
+
},
|
|
824
|
+
|
|
725
825
|
"position": {
|
|
726
826
|
"type": "String",
|
|
727
827
|
"desc": "Window side/corner to stick to",
|
package/src/plugins/Screen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isRuntimeSsrPreHydration } from './Platform.js'
|
|
1
|
+
import { isRuntimeSsrPreHydration, client } from './Platform.js'
|
|
2
2
|
|
|
3
3
|
import defineReactivePlugin from '../utils/private/define-reactive-plugin.js'
|
|
4
4
|
import { listenOpts, noop } from '../utils/event.js'
|
|
@@ -60,11 +60,15 @@ export default defineReactivePlugin({
|
|
|
60
60
|
|
|
61
61
|
const { visualViewport } = window
|
|
62
62
|
const target = visualViewport || window
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const scrollingElement = document.scrollingElement || document.documentElement
|
|
64
|
+
const getSize = visualViewport === void 0 || client.is.mobile === true
|
|
65
|
+
? () => [
|
|
66
|
+
Math.max(window.innerWidth, scrollingElement.clientWidth),
|
|
67
|
+
Math.max(window.innerHeight, scrollingElement.clientHeight)
|
|
68
|
+
]
|
|
65
69
|
: () => [
|
|
66
|
-
visualViewport.width * visualViewport.scale + window.innerWidth -
|
|
67
|
-
visualViewport.height * visualViewport.scale + window.innerHeight -
|
|
70
|
+
visualViewport.width * visualViewport.scale + window.innerWidth - scrollingElement.clientWidth,
|
|
71
|
+
visualViewport.height * visualViewport.scale + window.innerHeight - scrollingElement.clientHeight
|
|
68
72
|
]
|
|
69
73
|
|
|
70
74
|
const classes = $q.config.screen !== void 0 && $q.config.screen.bodyClasses === true
|
|
@@ -2,6 +2,7 @@ import { coreProps, coreEmits, getRenderer } from '../components/uploader/upload
|
|
|
2
2
|
|
|
3
3
|
import { createComponent } from './private/create.js'
|
|
4
4
|
import getEmitsObject from './private/get-emits-object.js'
|
|
5
|
+
import { isPlainObject } from './private/is.js'
|
|
5
6
|
|
|
6
7
|
const coreEmitsObject = getEmitsObject(coreEmits)
|
|
7
8
|
|
|
@@ -13,7 +14,7 @@ export default ({ name, props, emits, injectPlugin }) => createComponent({
|
|
|
13
14
|
...props
|
|
14
15
|
},
|
|
15
16
|
|
|
16
|
-
emits:
|
|
17
|
+
emits: isPlainObject(emits) === true
|
|
17
18
|
? { ...coreEmitsObject, ...emits }
|
|
18
19
|
: [ ...coreEmits, ...emits ],
|
|
19
20
|
|
package/src/utils/extend.js
CHANGED
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
toString = Object.prototype.toString,
|
|
3
|
-
hasOwn = Object.prototype.hasOwnProperty,
|
|
4
|
-
class2type = {}
|
|
5
|
-
|
|
6
|
-
'Boolean Number String Function Array Date RegExp Object'.split(' ').forEach(name => {
|
|
7
|
-
class2type[ '[object ' + name + ']' ] = name.toLowerCase()
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
function type (obj) {
|
|
11
|
-
return obj === null ? String(obj) : class2type[ toString.call(obj) ] || 'object'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function isPlainObject (obj) {
|
|
15
|
-
if (!obj || type(obj) !== 'object') {
|
|
16
|
-
return false
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (obj.constructor
|
|
20
|
-
&& !hasOwn.call(obj, 'constructor')
|
|
21
|
-
&& !hasOwn.call(obj.constructor.prototype, 'isPrototypeOf')) {
|
|
22
|
-
return false
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let key
|
|
26
|
-
for (key in obj) {} // eslint-disable-line
|
|
27
|
-
|
|
28
|
-
return key === undefined || hasOwn.call(obj, key)
|
|
29
|
-
}
|
|
1
|
+
import { isPlainObject } from './private/is'
|
|
30
2
|
|
|
31
3
|
export default function extend () {
|
|
32
4
|
let
|
|
@@ -42,7 +14,7 @@ export default function extend () {
|
|
|
42
14
|
i = 2
|
|
43
15
|
}
|
|
44
16
|
|
|
45
|
-
if (Object(target) !== target &&
|
|
17
|
+
if (Object(target) !== target && typeof target !== 'function') {
|
|
46
18
|
target = {}
|
|
47
19
|
}
|
|
48
20
|
|
|
@@ -61,18 +33,18 @@ export default function extend () {
|
|
|
61
33
|
continue
|
|
62
34
|
}
|
|
63
35
|
|
|
64
|
-
if (deep && copy && (isPlainObject(copy) || (copyIsArray =
|
|
36
|
+
if (deep && copy && (isPlainObject(copy) === true || (copyIsArray = Array.isArray(copy) === true))) {
|
|
65
37
|
if (copyIsArray) {
|
|
66
38
|
copyIsArray = false
|
|
67
|
-
clone = src &&
|
|
39
|
+
clone = src && Array.isArray(src) === true ? src : []
|
|
68
40
|
}
|
|
69
41
|
else {
|
|
70
|
-
clone = src && isPlainObject(src) ? src : {}
|
|
42
|
+
clone = src && isPlainObject(src) === true ? src : {}
|
|
71
43
|
}
|
|
72
44
|
|
|
73
45
|
target[ name ] = extend(deep, clone, copy)
|
|
74
46
|
}
|
|
75
|
-
else if (copy !==
|
|
47
|
+
else if (copy !== void 0) {
|
|
76
48
|
target[ name ] = copy
|
|
77
49
|
}
|
|
78
50
|
}
|
package/src/utils/morph.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isPlainObject } from './private/is'
|
|
2
|
+
|
|
1
3
|
let id = 0
|
|
2
4
|
let offsetBase = void 0
|
|
3
5
|
|
|
@@ -443,7 +445,7 @@ export default function morph (_options) {
|
|
|
443
445
|
if (typeof options.style === 'string') {
|
|
444
446
|
elTo.style.cssText += ' ' + options.style
|
|
445
447
|
}
|
|
446
|
-
else if (options.style ===
|
|
448
|
+
else if (isPlainObject(options.style) === true) {
|
|
447
449
|
for (const prop in options.style) {
|
|
448
450
|
elTo.style[ prop ] = options.style[ prop ]
|
|
449
451
|
}
|
|
@@ -880,8 +882,8 @@ export default function morph (_options) {
|
|
|
880
882
|
elToClone.style.animation = `${ options.duration }ms ${ options.easing } ${ options.delay }ms ${ animationDirection } ${ options.fill } ${ qAnimId }-to`
|
|
881
883
|
elTo.style.animation = `${ options.duration }ms ${ options.easing } ${ options.delay }ms ${ animationDirection } ${ options.fill } ${ qAnimId }`
|
|
882
884
|
|
|
883
|
-
const cleanup =
|
|
884
|
-
if (
|
|
885
|
+
const cleanup = evt => {
|
|
886
|
+
if (evt === Object(evt) && evt.animationName !== qAnimId) {
|
|
885
887
|
return
|
|
886
888
|
}
|
|
887
889
|
|
|
@@ -944,24 +946,24 @@ export default function morph (_options) {
|
|
|
944
946
|
: (
|
|
945
947
|
options.waitFor === 'transitionend'
|
|
946
948
|
? new Promise(resolve => {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
const endFn = ev => {
|
|
952
|
-
clearTimeout(timer)
|
|
949
|
+
const timer = setTimeout(() => {
|
|
950
|
+
endFn()
|
|
951
|
+
}, 400)
|
|
953
952
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
elTo.removeEventListener('transitioncancel', endFn)
|
|
957
|
-
}
|
|
953
|
+
const endFn = ev => {
|
|
954
|
+
clearTimeout(timer)
|
|
958
955
|
|
|
959
|
-
|
|
956
|
+
if (elTo) {
|
|
957
|
+
elTo.removeEventListener('transitionend', endFn)
|
|
958
|
+
elTo.removeEventListener('transitioncancel', endFn)
|
|
960
959
|
}
|
|
961
960
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
961
|
+
resolve()
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
elTo.addEventListener('transitionend', endFn)
|
|
965
|
+
elTo.addEventListener('transitioncancel', endFn)
|
|
966
|
+
})
|
|
965
967
|
: options.waitFor
|
|
966
968
|
)
|
|
967
969
|
|
package/src/utils/private/is.js
CHANGED
|
@@ -120,17 +120,8 @@ export function isDeepEqual (a, b) {
|
|
|
120
120
|
return a !== a && b !== b // eslint-disable-line no-self-compare
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export function
|
|
124
|
-
return (v
|
|
125
|
-
|| v === 32 || v === 13 // spacebar & return key(s) (if you want to allow carriage returns)
|
|
126
|
-
|| (v > 64 && v < 91) // letter keys
|
|
127
|
-
|| (v > 95 && v < 112) // numpad keys
|
|
128
|
-
|| (v > 185 && v < 193) // ;=,-./` (in order)
|
|
129
|
-
|| (v > 218 && v < 223)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function isObject (v) {
|
|
133
|
-
return Object(v) === v
|
|
123
|
+
export function isPlainObject (v) {
|
|
124
|
+
return Object.prototype.toString.call(v) === '[object Object]'
|
|
134
125
|
}
|
|
135
126
|
|
|
136
127
|
export function isDate (v) {
|
|
@@ -144,7 +135,3 @@ export function isRegexp (v) {
|
|
|
144
135
|
export function isNumber (v) {
|
|
145
136
|
return typeof v === 'number' && isFinite(v)
|
|
146
137
|
}
|
|
147
|
-
|
|
148
|
-
export function isString (v) {
|
|
149
|
-
return typeof v === 'string'
|
|
150
|
-
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { noop } from '../event.js'
|
|
2
|
+
import { isDate, isRegexp } from './is.js'
|
|
2
3
|
|
|
3
4
|
function encode (value) {
|
|
4
|
-
if (
|
|
5
|
+
if (isDate(value) === true) {
|
|
5
6
|
return '__q_date|' + value.toUTCString()
|
|
6
7
|
}
|
|
7
|
-
if (
|
|
8
|
+
if (isRegexp(value) === true) {
|
|
8
9
|
return '__q_expr|' + value.source
|
|
9
10
|
}
|
|
10
11
|
if (typeof value === 'number') {
|