@data-fair/lib-vuetify 1.5.1 → 1.6.0
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/index.js +4 -6
- package/package.json +2 -2
- package/ui-notif-alert.vue +38 -0
- package/ui-notif-alert.vue.d.ts +17 -0
- package/ui-notif-alert.vue.js +103 -0
- package/ui-notif.vue +1 -1
- package/ui-notif.vue.js +3 -3
- package/auto-imports.js +0 -11
package/index.js
CHANGED
|
@@ -38,15 +38,13 @@ export function vuetifySessionOptions (session) {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
defaults: {
|
|
41
|
-
global: {
|
|
42
|
-
// the default density is way too low
|
|
43
|
-
density: 'comfortable'
|
|
44
|
-
},
|
|
45
41
|
VCard: {
|
|
46
42
|
// white card with light grey border by default
|
|
47
|
-
variant: '
|
|
48
|
-
elevation: 0,
|
|
43
|
+
variant: 'flat',
|
|
49
44
|
border: 'sm'
|
|
45
|
+
},
|
|
46
|
+
global: {
|
|
47
|
+
rounded: 'pill'
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@data-fair/lib-vuetify",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Components based on the Vuetify 3 UI lib for the data-fair stack.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"build": "cd .. && npm run build"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@data-fair/lib-vue": "^1.
|
|
19
|
+
"@data-fair/lib-vue": "^1.13.0",
|
|
20
20
|
"ofetch": "1",
|
|
21
21
|
"vue-i18n": "10",
|
|
22
22
|
"vuetify": "3"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-alert
|
|
3
|
+
v-if="notif"
|
|
4
|
+
class="ui-notif-alert"
|
|
5
|
+
v-bind="alertProps"
|
|
6
|
+
>
|
|
7
|
+
<p>{{ notif.msg }}</p>
|
|
8
|
+
<p
|
|
9
|
+
v-if="notif.type === 'error'"
|
|
10
|
+
class="ml-3"
|
|
11
|
+
v-text="notif.errorMsg"
|
|
12
|
+
/>
|
|
13
|
+
</v-alert>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { computed } from 'vue'
|
|
18
|
+
import { type UiNotif, useUiNotif } from '@data-fair/lib-vue/ui-notif.js'
|
|
19
|
+
|
|
20
|
+
const {notif, alertProps} = defineProps({
|
|
21
|
+
notif: Object as () => UiNotif,
|
|
22
|
+
alertProps: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default () { return {} }
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const fullAlertProps = computed(() => {
|
|
29
|
+
const props = { ...alertProps }
|
|
30
|
+
if (!notif) return props
|
|
31
|
+
props.type = notif.type
|
|
32
|
+
return props
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type UiNotif } from '@data-fair/lib-vue/ui-notif.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
notif: () => UiNotif;
|
|
4
|
+
alertProps: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default(): {};
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
notif: () => UiNotif;
|
|
10
|
+
alertProps: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default(): {};
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{}>, {
|
|
15
|
+
alertProps: Record<string, any>;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
|
4
|
+
const __VLS_props = defineProps({
|
|
5
|
+
notif: Object,
|
|
6
|
+
alertProps: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default() { return {}; }
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const { notif, alertProps } = __VLS_props;
|
|
12
|
+
const fullAlertProps = computed(() => {
|
|
13
|
+
const props = { ...alertProps };
|
|
14
|
+
if (!notif)
|
|
15
|
+
return props;
|
|
16
|
+
props.type = notif.type;
|
|
17
|
+
return props;
|
|
18
|
+
});
|
|
19
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
20
|
+
props: {
|
|
21
|
+
notif: Object,
|
|
22
|
+
alertProps: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default() { return {}; }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
;
|
|
29
|
+
let __VLS_functionalComponentProps;
|
|
30
|
+
function __VLS_template() {
|
|
31
|
+
const __VLS_ctx = {};
|
|
32
|
+
const __VLS_localComponents = {
|
|
33
|
+
...{},
|
|
34
|
+
...{},
|
|
35
|
+
...__VLS_ctx,
|
|
36
|
+
};
|
|
37
|
+
let __VLS_components;
|
|
38
|
+
const __VLS_localDirectives = {
|
|
39
|
+
...{},
|
|
40
|
+
...__VLS_ctx,
|
|
41
|
+
};
|
|
42
|
+
let __VLS_directives;
|
|
43
|
+
let __VLS_styleScopedClasses;
|
|
44
|
+
// CSS variable injection
|
|
45
|
+
// CSS variable injection end
|
|
46
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
|
47
|
+
if (__VLS_ctx.notif) {
|
|
48
|
+
const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VAlert;
|
|
49
|
+
/** @type { [typeof __VLS_components.VAlert, typeof __VLS_components.vAlert, typeof __VLS_components.VAlert, typeof __VLS_components.vAlert, ] } */
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ...{ class: ("ui-notif-alert") }, ...(__VLS_ctx.alertProps), }));
|
|
52
|
+
const __VLS_2 = __VLS_1({ ...{ class: ("ui-notif-alert") }, ...(__VLS_ctx.alertProps), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
53
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
|
|
54
|
+
(__VLS_ctx.notif.msg);
|
|
55
|
+
if (__VLS_ctx.notif.type === 'error') {
|
|
56
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p)({ ...{ class: ("ml-3") }, });
|
|
57
|
+
__VLS_directiveAsFunction(__VLS_directives.vText)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.notif.errorMsg) }, null, null);
|
|
58
|
+
}
|
|
59
|
+
__VLS_nonNullable(__VLS_5.slots).default;
|
|
60
|
+
const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
|
|
61
|
+
}
|
|
62
|
+
__VLS_styleScopedClasses['ui-notif-alert'];
|
|
63
|
+
__VLS_styleScopedClasses['ml-3'];
|
|
64
|
+
var __VLS_slots;
|
|
65
|
+
var __VLS_inheritedAttrs;
|
|
66
|
+
const __VLS_refs = {};
|
|
67
|
+
var $refs;
|
|
68
|
+
return {
|
|
69
|
+
slots: __VLS_slots,
|
|
70
|
+
refs: $refs,
|
|
71
|
+
attrs: {},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
;
|
|
75
|
+
const __VLS_self = (await import('vue')).defineComponent({
|
|
76
|
+
setup() {
|
|
77
|
+
return {
|
|
78
|
+
notif: notif,
|
|
79
|
+
alertProps: alertProps,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
props: {
|
|
83
|
+
notif: Object,
|
|
84
|
+
alertProps: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default() { return {}; }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
export default (await import('vue')).defineComponent({
|
|
91
|
+
setup() {
|
|
92
|
+
return {};
|
|
93
|
+
},
|
|
94
|
+
props: {
|
|
95
|
+
notif: Object,
|
|
96
|
+
alertProps: {
|
|
97
|
+
type: Object,
|
|
98
|
+
default() { return {}; }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
;
|
|
103
|
+
//# sourceMappingURL=ui-notif-alert.vue.js.map
|
package/ui-notif.vue
CHANGED
package/ui-notif.vue.js
CHANGED
|
@@ -65,8 +65,8 @@ function __VLS_template() {
|
|
|
65
65
|
const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VSnackbar;
|
|
66
66
|
/** @type { [typeof __VLS_components.VSnackbar, typeof __VLS_components.vSnackbar, typeof __VLS_components.VSnackbar, typeof __VLS_components.vSnackbar, ] } */
|
|
67
67
|
// @ts-ignore
|
|
68
|
-
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-
|
|
69
|
-
const __VLS_2 = __VLS_1({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-
|
|
68
|
+
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-notif") }, ...(__VLS_ctx.fullSnackbarProps), }));
|
|
69
|
+
const __VLS_2 = __VLS_1({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-notif") }, ...(__VLS_ctx.fullSnackbarProps), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
70
70
|
// @ts-ignore navigation for `const notificationSnackbar = ref()`
|
|
71
71
|
__VLS_ctx.notificationSnackbar;
|
|
72
72
|
var __VLS_6 = {};
|
|
@@ -104,7 +104,7 @@ function __VLS_template() {
|
|
|
104
104
|
}
|
|
105
105
|
const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
|
|
106
106
|
}
|
|
107
|
-
__VLS_styleScopedClasses['ui-
|
|
107
|
+
__VLS_styleScopedClasses['ui-notif'];
|
|
108
108
|
__VLS_styleScopedClasses['ml-3'];
|
|
109
109
|
var __VLS_slots;
|
|
110
110
|
var __VLS_inheritedAttrs;
|
package/auto-imports.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// made for https://github.com/unplugin/unplugin-auto-import
|
|
2
|
-
import vueAutoImports from '@data-fair/lib-vue/auto-imports.js'
|
|
3
|
-
export default [
|
|
4
|
-
...vueAutoImports,
|
|
5
|
-
{
|
|
6
|
-
'@data-fair/lib-vuetify/personal-menu.vue': [['default', 'dfPersonalMenu']],
|
|
7
|
-
'@data-fair/lib-vuetify/tutorial-alert.vue': [['default', 'dfTutorialAlert']],
|
|
8
|
-
'@data-fair/lib-vuetify/user-avatar.vue': [['default', 'dfUserAvatar']]
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
// # sourceMappingURL=auto-imports.js.map
|