quasar 2.5.4 → 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 +2 -2
- package/dist/api/QBtnDropdown.json +3 -3
- package/dist/api/QCarousel.json +3 -3
- package/dist/api/QChip.json +4 -4
- package/dist/api/QExpansionItem.json +2 -2
- package/dist/api/QFab.json +2 -2
- package/dist/api/QFabAction.json +1 -1
- package/dist/api/QForm.json +4 -1
- package/dist/api/QIcon.json +4 -2
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QRouteTab.json +1 -1
- package/dist/api/QSelect.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/QTimelineEntry.json +1 -1
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTree.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 +252 -248
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/index.d.ts +143 -47
- package/dist/vetur/quasar-attributes.json +38 -38
- package/dist/web-types/web-types.json +40 -40
- package/package.json +1 -1
- package/src/api.extends.json +1 -1
- 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/form/QForm.json +3 -2
- package/src/components/icon/QIcon.js +4 -1
- package/src/components/icon/QIcon.json +1 -3
- package/src/components/select/QSelect.js +2 -2
- package/src/components/slide-transition/QSlideTransition.js +4 -4
- package/src/components/slider/use-slider.js +4 -4
- 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/table-sort.js +2 -2
- package/src/components/time/QTime.js +5 -5
- 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/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
|
@@ -7,7 +7,7 @@ import { useFormProps, useFormInject } from '../../composables/private/use-form.
|
|
|
7
7
|
|
|
8
8
|
import { between } from '../../utils/format.js'
|
|
9
9
|
import { position } from '../../utils/event.js'
|
|
10
|
-
import { isNumber } from '../../utils/private/is.js'
|
|
10
|
+
import { isNumber, isPlainObject } from '../../utils/private/is.js'
|
|
11
11
|
import { hDir } from '../../utils/private/render.js'
|
|
12
12
|
|
|
13
13
|
const markerPrefixClass = 'q-slider__marker-labels'
|
|
@@ -340,7 +340,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
340
340
|
if (typeof def === 'function') {
|
|
341
341
|
return markerTicks.value.map(value => {
|
|
342
342
|
const item = def(value)
|
|
343
|
-
return
|
|
343
|
+
return isPlainObject(item) === true ? { ...item, value } : { value, label: item }
|
|
344
344
|
})
|
|
345
345
|
}
|
|
346
346
|
|
|
@@ -348,14 +348,14 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
348
348
|
|
|
349
349
|
if (Array.isArray(def) === true) {
|
|
350
350
|
return def
|
|
351
|
-
.map(item => (
|
|
351
|
+
.map(item => (isPlainObject(item) === true ? item : { value: item }))
|
|
352
352
|
.filter(filterFn)
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
return Object.keys(def).map(key => {
|
|
356
356
|
const item = def[ key ]
|
|
357
357
|
const value = Number(key)
|
|
358
|
-
return
|
|
358
|
+
return isPlainObject(item) === true ? { ...item, value } : { value, label: item }
|
|
359
359
|
}).filter(filterFn)
|
|
360
360
|
}
|
|
361
361
|
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
"done-icon": {
|
|
47
47
|
"extends": "icon",
|
|
48
|
+
"desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
48
49
|
"category": "header"
|
|
49
50
|
},
|
|
50
51
|
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
|
|
56
57
|
"active-icon": {
|
|
57
58
|
"extends": "icon",
|
|
59
|
+
"desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
58
60
|
"category": "header"
|
|
59
61
|
},
|
|
60
62
|
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
|
|
66
68
|
"error-icon": {
|
|
67
69
|
"extends": "icon",
|
|
70
|
+
"desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
68
71
|
"category": "header"
|
|
69
72
|
},
|
|
70
73
|
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
"done-icon": {
|
|
56
56
|
"extends": "icon",
|
|
57
|
+
"desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
57
58
|
"category": "header"
|
|
58
59
|
},
|
|
59
60
|
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
|
|
65
66
|
"active-icon": {
|
|
66
67
|
"extends": "icon",
|
|
68
|
+
"desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
67
69
|
"category": "header"
|
|
68
70
|
},
|
|
69
71
|
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
|
|
75
77
|
"error-icon": {
|
|
76
78
|
"extends": "icon",
|
|
79
|
+
"desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
77
80
|
"category": "header"
|
|
78
81
|
},
|
|
79
82
|
|
|
@@ -47,23 +47,36 @@ export default createComponent({
|
|
|
47
47
|
|
|
48
48
|
const hasPrefix = computed(() => {
|
|
49
49
|
return props.step.prefix
|
|
50
|
-
&& isActive.value === false
|
|
51
|
-
&& isError.value === false
|
|
52
|
-
&& isDone.value === false
|
|
50
|
+
&& (isActive.value === false || props.stepper.activeIcon === 'none')
|
|
51
|
+
&& (isError.value === false || props.stepper.errorIcon === 'none')
|
|
52
|
+
&& (isDone.value === false || props.stepper.doneIcon === 'none')
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
const icon = computed(() => {
|
|
56
|
+
const defaultIcon = props.step.icon || props.stepper.inactiveIcon
|
|
57
|
+
|
|
56
58
|
if (isActive.value === true) {
|
|
57
|
-
|
|
59
|
+
const icon = props.step.activeIcon || props.stepper.activeIcon
|
|
60
|
+
return icon === 'none'
|
|
61
|
+
? defaultIcon
|
|
62
|
+
: icon || $q.iconSet.stepper.active
|
|
58
63
|
}
|
|
64
|
+
|
|
59
65
|
if (isError.value === true) {
|
|
60
|
-
|
|
66
|
+
const icon = props.step.errorIcon || props.stepper.errorIcon
|
|
67
|
+
return icon === 'none'
|
|
68
|
+
? defaultIcon
|
|
69
|
+
: icon || $q.iconSet.stepper.error
|
|
61
70
|
}
|
|
71
|
+
|
|
62
72
|
if (isDisable.value === false && isDone.value === true) {
|
|
63
|
-
|
|
73
|
+
const icon = props.step.doneIcon || props.stepper.doneIcon
|
|
74
|
+
return icon === 'none'
|
|
75
|
+
? defaultIcon
|
|
76
|
+
: icon || $q.iconSet.stepper.done
|
|
64
77
|
}
|
|
65
78
|
|
|
66
|
-
return
|
|
79
|
+
return defaultIcon
|
|
67
80
|
})
|
|
68
81
|
|
|
69
82
|
const color = computed(() => {
|
|
@@ -90,7 +103,9 @@ export default createComponent({
|
|
|
90
103
|
const classes = computed(() => {
|
|
91
104
|
return 'q-stepper__tab col-grow flex items-center no-wrap relative-position'
|
|
92
105
|
+ (color.value !== void 0 ? ` text-${ color.value }` : '')
|
|
93
|
-
+ (isError.value === true
|
|
106
|
+
+ (isError.value === true
|
|
107
|
+
? ' q-stepper__tab--error q-stepper__tab--error-with-' + (hasPrefix.value === true ? 'prefix' : 'icon')
|
|
108
|
+
: '')
|
|
94
109
|
+ (isActive.value === true ? ' q-stepper__tab--active' : '')
|
|
95
110
|
+ (isDone.value === true ? ' q-stepper__tab--done' : '')
|
|
96
111
|
+ (headerNav.value === true ? ' q-stepper__tab--navigation q-focusable q-hoverable' : '')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed } from 'vue'
|
|
2
2
|
|
|
3
3
|
import { sortDate } from '../../utils/private/sort.js'
|
|
4
|
-
import { isNumber, isDate } from '../../utils/private/is.js'
|
|
4
|
+
import { isNumber, isDate, isPlainObject } from '../../utils/private/is.js'
|
|
5
5
|
|
|
6
6
|
export const useTableSortProps = {
|
|
7
7
|
sortMethod: Function,
|
|
@@ -73,7 +73,7 @@ export function useTableSort (props, computedPagination, colList, setPagination)
|
|
|
73
73
|
function sort (col /* String(col name) or Object(col definition) */) {
|
|
74
74
|
let sortOrder = props.columnSortOrder
|
|
75
75
|
|
|
76
|
-
if (col ===
|
|
76
|
+
if (isPlainObject(col) === true) {
|
|
77
77
|
if (col.sortOrder) {
|
|
78
78
|
sortOrder = col.sortOrder
|
|
79
79
|
}
|
|
@@ -86,12 +86,14 @@ export default createComponent({
|
|
|
86
86
|
const mask = computed(() => getMask())
|
|
87
87
|
const locale = computed(() => getLocale())
|
|
88
88
|
|
|
89
|
+
const defaultDateModel = computed(() => getDefaultDateModel())
|
|
90
|
+
|
|
89
91
|
const model = __splitDate(
|
|
90
92
|
props.modelValue,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
mask.value, // initial mask
|
|
94
|
+
locale.value, // initial locale
|
|
93
95
|
props.calendar,
|
|
94
|
-
|
|
96
|
+
defaultDateModel.value
|
|
95
97
|
)
|
|
96
98
|
|
|
97
99
|
const view = ref(getViewByModel(model))
|
|
@@ -131,8 +133,6 @@ export default createComponent({
|
|
|
131
133
|
}
|
|
132
134
|
})
|
|
133
135
|
|
|
134
|
-
const defaultDateModel = computed(() => getDefaultDateModel())
|
|
135
|
-
|
|
136
136
|
const computedFormat24h = computed(() => (
|
|
137
137
|
props.format24h !== null
|
|
138
138
|
? props.format24h
|
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",
|
|
@@ -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
|
}
|