@data-fair/lib-vuetify 1.6.1 → 1.6.3
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/package.json +1 -1
- package/ui-notif-alert.vue +7 -3
- package/ui-notif-alert.vue.js +11 -5
- package/ui-notif.vue +9 -4
- package/ui-notif.vue.js +11 -6
package/package.json
CHANGED
package/ui-notif-alert.vue
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
class="ui-notif-alert"
|
|
5
5
|
v-bind="fullAlertProps"
|
|
6
6
|
>
|
|
7
|
-
<p>{{ notif.msg }}</p>
|
|
7
|
+
<p v-if="notif.msg">{{ notif.msg }}</p>
|
|
8
8
|
<p
|
|
9
9
|
v-if="notif.type === 'error'"
|
|
10
|
-
class="ml-3"
|
|
10
|
+
:class="notif.msg ? 'ml-3' : ''"
|
|
11
11
|
v-text="notif.errorMsg"
|
|
12
12
|
/>
|
|
13
13
|
</v-alert>
|
|
@@ -31,7 +31,11 @@ const {notif, alertProps} = defineProps({
|
|
|
31
31
|
const fullAlertProps = computed(() => {
|
|
32
32
|
const props = { ...alertProps }
|
|
33
33
|
if (!notif) return props
|
|
34
|
-
|
|
34
|
+
if (notif.type === 'error') {
|
|
35
|
+
props.type = notif.clientError ? 'warning' : 'error'
|
|
36
|
+
} else {
|
|
37
|
+
props.type = notif.type
|
|
38
|
+
}
|
|
35
39
|
return props
|
|
36
40
|
})
|
|
37
41
|
|
package/ui-notif-alert.vue.js
CHANGED
|
@@ -16,7 +16,12 @@ const fullAlertProps = computed(() => {
|
|
|
16
16
|
const props = { ...alertProps };
|
|
17
17
|
if (!notif)
|
|
18
18
|
return props;
|
|
19
|
-
|
|
19
|
+
if (notif.type === 'error') {
|
|
20
|
+
props.type = notif.clientError ? 'warning' : 'error';
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
props.type = notif.type;
|
|
24
|
+
}
|
|
20
25
|
return props;
|
|
21
26
|
});
|
|
22
27
|
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
@@ -56,17 +61,18 @@ function __VLS_template() {
|
|
|
56
61
|
// @ts-ignore
|
|
57
62
|
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ...{ class: ("ui-notif-alert") }, ...(__VLS_ctx.fullAlertProps), }));
|
|
58
63
|
const __VLS_2 = __VLS_1({ ...{ class: ("ui-notif-alert") }, ...(__VLS_ctx.fullAlertProps), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
if (__VLS_ctx.notif.msg) {
|
|
65
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
|
|
66
|
+
(__VLS_ctx.notif.msg);
|
|
67
|
+
}
|
|
61
68
|
if (__VLS_ctx.notif.type === 'error') {
|
|
62
|
-
__VLS_elementAsFunction(__VLS_intrinsicElements.p)({ ...{ class: (
|
|
69
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p)({ ...{ class: ((__VLS_ctx.notif.msg ? 'ml-3' : '')) }, });
|
|
63
70
|
__VLS_directiveAsFunction(__VLS_directives.vText)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.notif.errorMsg) }, null, null);
|
|
64
71
|
}
|
|
65
72
|
__VLS_nonNullable(__VLS_5.slots).default;
|
|
66
73
|
const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
|
|
67
74
|
}
|
|
68
75
|
__VLS_styleScopedClasses['ui-notif-alert'];
|
|
69
|
-
__VLS_styleScopedClasses['ml-3'];
|
|
70
76
|
var __VLS_slots;
|
|
71
77
|
var __VLS_inheritedAttrs;
|
|
72
78
|
const __VLS_refs = {};
|
package/ui-notif.vue
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
class="ui-notif"
|
|
7
7
|
v-bind="fullSnackbarProps"
|
|
8
8
|
>
|
|
9
|
-
<p>{{ notification.msg }}</p>
|
|
9
|
+
<p v-if="notification.msg">{{ notification.msg }}</p>
|
|
10
10
|
<p
|
|
11
11
|
v-if="notification.type === 'error'"
|
|
12
|
-
class="ml-3"
|
|
12
|
+
:class="notification.msg ? 'ml-3' : ''"
|
|
13
13
|
v-text="notification.errorMsg"
|
|
14
14
|
/>
|
|
15
15
|
|
|
@@ -55,8 +55,13 @@ const { snackbarProps } = defineProps({
|
|
|
55
55
|
const fullSnackbarProps = computed(() => {
|
|
56
56
|
const props = { ...snackbarProps }
|
|
57
57
|
if (!notification.value) return props
|
|
58
|
-
if (notification.value.type === 'error')
|
|
59
|
-
|
|
58
|
+
if (notification.value.type === 'error') {
|
|
59
|
+
props.timeout = -1
|
|
60
|
+
props.color = notification.value.clientError ? 'warning' : 'error'
|
|
61
|
+
} else {
|
|
62
|
+
props.color = notification.value.type
|
|
63
|
+
}
|
|
64
|
+
|
|
60
65
|
return props
|
|
61
66
|
})
|
|
62
67
|
|
package/ui-notif.vue.js
CHANGED
|
@@ -27,9 +27,13 @@ const fullSnackbarProps = computed(() => {
|
|
|
27
27
|
const props = { ...snackbarProps };
|
|
28
28
|
if (!notification.value)
|
|
29
29
|
return props;
|
|
30
|
-
if (notification.value.type === 'error')
|
|
30
|
+
if (notification.value.type === 'error') {
|
|
31
31
|
props.timeout = -1;
|
|
32
|
-
|
|
32
|
+
props.color = notification.value.clientError ? 'warning' : 'error';
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
props.color = notification.value.type;
|
|
36
|
+
}
|
|
33
37
|
return props;
|
|
34
38
|
});
|
|
35
39
|
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
@@ -70,10 +74,12 @@ function __VLS_template() {
|
|
|
70
74
|
// @ts-ignore navigation for `const notificationSnackbar = ref()`
|
|
71
75
|
__VLS_ctx.notificationSnackbar;
|
|
72
76
|
var __VLS_6 = {};
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
if (__VLS_ctx.notification.msg) {
|
|
78
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
|
|
79
|
+
(__VLS_ctx.notification.msg);
|
|
80
|
+
}
|
|
75
81
|
if (__VLS_ctx.notification.type === 'error') {
|
|
76
|
-
__VLS_elementAsFunction(__VLS_intrinsicElements.p)({ ...{ class: (
|
|
82
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p)({ ...{ class: ((__VLS_ctx.notification.msg ? 'ml-3' : '')) }, });
|
|
77
83
|
__VLS_directiveAsFunction(__VLS_directives.vText)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.notification.errorMsg) }, null, null);
|
|
78
84
|
}
|
|
79
85
|
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
@@ -105,7 +111,6 @@ function __VLS_template() {
|
|
|
105
111
|
const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
|
|
106
112
|
}
|
|
107
113
|
__VLS_styleScopedClasses['ui-notif'];
|
|
108
|
-
__VLS_styleScopedClasses['ml-3'];
|
|
109
114
|
var __VLS_slots;
|
|
110
115
|
var __VLS_inheritedAttrs;
|
|
111
116
|
const __VLS_refs = {
|