sprintify-ui 0.0.24 → 0.0.25
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/sprintify-ui.es.js +1008 -976
- package/dist/types/src/components/BaseLayoutNotificationDropdown.vue.d.ts +5 -2
- package/dist/types/src/components/BaseLayoutNotificationItem.vue.d.ts +4 -2
- package/dist/types/src/components/BaseLayoutSidebarConfigurable.vue.d.ts +17 -5
- package/dist/types/src/components/BaseLayoutStackedConfigurable.vue.d.ts +17 -5
- package/package.json +1 -1
- package/src/components/BaseLayoutNotificationDropdown.vue +13 -0
- package/src/components/BaseLayoutNotificationItem.vue +12 -1
- package/src/components/BaseLayoutSidebarConfigurable.vue +12 -0
- package/src/components/BaseLayoutStackedConfigurable.vue +12 -0
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
default: boolean;
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
};
|
|
12
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
12
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "open")[], "click" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
notificationsConfig: {
|
|
14
14
|
required: true;
|
|
15
15
|
type: PropType<NotificationsConfig>;
|
|
@@ -18,7 +18,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
default: boolean;
|
|
19
19
|
type: BooleanConstructor;
|
|
20
20
|
};
|
|
21
|
-
}
|
|
21
|
+
}>> & {
|
|
22
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
}, {
|
|
22
25
|
dark: boolean;
|
|
23
26
|
}>;
|
|
24
27
|
export default _default;
|
|
@@ -5,10 +5,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
required: true;
|
|
6
6
|
type: PropType<Notification>;
|
|
7
7
|
};
|
|
8
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
9
|
notification: {
|
|
10
10
|
required: true;
|
|
11
11
|
type: PropType<Notification>;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
}>> & {
|
|
14
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}, {}>;
|
|
14
16
|
export default _default;
|
|
@@ -39,7 +39,10 @@ declare const _default: {
|
|
|
39
39
|
default: boolean;
|
|
40
40
|
type: BooleanConstructor;
|
|
41
41
|
};
|
|
42
|
-
}>> &
|
|
42
|
+
}>> & {
|
|
43
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dark" | "notifications" | "appName" | "logoUrl">;
|
|
43
46
|
$attrs: {
|
|
44
47
|
[x: string]: unknown;
|
|
45
48
|
};
|
|
@@ -51,7 +54,7 @@ declare const _default: {
|
|
|
51
54
|
}>;
|
|
52
55
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
53
56
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
54
|
-
$emit: (event:
|
|
57
|
+
$emit: (event: "notification:click" | "notification:open", ...args: any[]) => void;
|
|
55
58
|
$el: any;
|
|
56
59
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
57
60
|
appName: {
|
|
@@ -82,7 +85,10 @@ declare const _default: {
|
|
|
82
85
|
default: boolean;
|
|
83
86
|
type: BooleanConstructor;
|
|
84
87
|
};
|
|
85
|
-
}
|
|
88
|
+
}>> & {
|
|
89
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notification:click" | "notification:open")[], string, {
|
|
86
92
|
dark: boolean;
|
|
87
93
|
notifications: NotificationsConfig;
|
|
88
94
|
appName: string;
|
|
@@ -136,7 +142,10 @@ declare const _default: {
|
|
|
136
142
|
default: boolean;
|
|
137
143
|
type: BooleanConstructor;
|
|
138
144
|
};
|
|
139
|
-
}>> &
|
|
145
|
+
}>> & {
|
|
146
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
147
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
140
149
|
__isFragment?: undefined;
|
|
141
150
|
__isTeleport?: undefined;
|
|
142
151
|
__isSuspense?: undefined;
|
|
@@ -169,7 +178,10 @@ declare const _default: {
|
|
|
169
178
|
default: boolean;
|
|
170
179
|
type: BooleanConstructor;
|
|
171
180
|
};
|
|
172
|
-
}
|
|
181
|
+
}>> & {
|
|
182
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
183
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
184
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notification:click" | "notification:open")[], "notification:click" | "notification:open", {
|
|
173
185
|
dark: boolean;
|
|
174
186
|
notifications: NotificationsConfig;
|
|
175
187
|
appName: string;
|
|
@@ -39,7 +39,10 @@ declare const _default: {
|
|
|
39
39
|
default: boolean;
|
|
40
40
|
type: BooleanConstructor;
|
|
41
41
|
};
|
|
42
|
-
}>> &
|
|
42
|
+
}>> & {
|
|
43
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "dark" | "notifications" | "appName" | "logoUrl">;
|
|
43
46
|
$attrs: {
|
|
44
47
|
[x: string]: unknown;
|
|
45
48
|
};
|
|
@@ -51,7 +54,7 @@ declare const _default: {
|
|
|
51
54
|
}>;
|
|
52
55
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
53
56
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
54
|
-
$emit: (event:
|
|
57
|
+
$emit: (event: "notification:click" | "notification:open", ...args: any[]) => void;
|
|
55
58
|
$el: any;
|
|
56
59
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
57
60
|
appName: {
|
|
@@ -82,7 +85,10 @@ declare const _default: {
|
|
|
82
85
|
default: boolean;
|
|
83
86
|
type: BooleanConstructor;
|
|
84
87
|
};
|
|
85
|
-
}
|
|
88
|
+
}>> & {
|
|
89
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notification:click" | "notification:open")[], string, {
|
|
86
92
|
dark: boolean;
|
|
87
93
|
notifications: NotificationsConfig;
|
|
88
94
|
appName: string;
|
|
@@ -136,7 +142,10 @@ declare const _default: {
|
|
|
136
142
|
default: boolean;
|
|
137
143
|
type: BooleanConstructor;
|
|
138
144
|
};
|
|
139
|
-
}>> &
|
|
145
|
+
}>> & {
|
|
146
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
147
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
140
149
|
__isFragment?: undefined;
|
|
141
150
|
__isTeleport?: undefined;
|
|
142
151
|
__isSuspense?: undefined;
|
|
@@ -169,7 +178,10 @@ declare const _default: {
|
|
|
169
178
|
default: boolean;
|
|
170
179
|
type: BooleanConstructor;
|
|
171
180
|
};
|
|
172
|
-
}
|
|
181
|
+
}>> & {
|
|
182
|
+
"onNotification:click"?: ((...args: any[]) => any) | undefined;
|
|
183
|
+
"onNotification:open"?: ((...args: any[]) => any) | undefined;
|
|
184
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("notification:click" | "notification:open")[], "notification:click" | "notification:open", {
|
|
173
185
|
dark: boolean;
|
|
174
186
|
notifications: NotificationsConfig;
|
|
175
187
|
appName: string;
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
class="inline-block"
|
|
4
4
|
:position="mobile ? 'custom' : 'bottom-left'"
|
|
5
5
|
:menu-class="['sm:w-[320px] w-[280px]', mobile ? 'right-4' : '']"
|
|
6
|
+
@click="onOpen"
|
|
6
7
|
>
|
|
7
8
|
<template #button="{ open }">
|
|
8
9
|
<div
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
>
|
|
30
31
|
<BaseLayoutNotificationItem
|
|
31
32
|
:notification="notification"
|
|
33
|
+
@click="onClick"
|
|
32
34
|
></BaseLayoutNotificationItem>
|
|
33
35
|
</template>
|
|
34
36
|
<div
|
|
@@ -81,6 +83,9 @@ import BaseMenu from './BaseMenu.vue';
|
|
|
81
83
|
import { useBreakpoints } from '@/composables/breakpoints';
|
|
82
84
|
import { NotificationsConfig } from '../types/types';
|
|
83
85
|
import { MenuItem } from '@headlessui/vue';
|
|
86
|
+
import { Notification } from '@/types/Notification';
|
|
87
|
+
|
|
88
|
+
const emit = defineEmits(['click', 'open']);
|
|
84
89
|
|
|
85
90
|
defineProps({
|
|
86
91
|
notificationsConfig: {
|
|
@@ -98,4 +103,12 @@ const breakpoints = useBreakpoints();
|
|
|
98
103
|
const mobile = computed((): boolean => {
|
|
99
104
|
return breakpoints.smaller('sm').value;
|
|
100
105
|
});
|
|
106
|
+
|
|
107
|
+
function onClick(notification: Notification) {
|
|
108
|
+
emit('click', notification);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function onOpen() {
|
|
112
|
+
emit('open');
|
|
113
|
+
}
|
|
101
114
|
</script>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<router-link v-slot="{ href, navigate }" custom :to="notification.to">
|
|
3
|
-
<MenuItem
|
|
3
|
+
<MenuItem
|
|
4
|
+
v-slot="{ active }"
|
|
5
|
+
as="a"
|
|
6
|
+
:href="href"
|
|
7
|
+
@click.prevent="onClick(navigate)"
|
|
8
|
+
>
|
|
4
9
|
<div class="px-3 py-2" :class="[active ? 'bg-slate-100' : '']">
|
|
5
10
|
<div
|
|
6
11
|
class="text-sm leading-tight text-slate-800"
|
|
@@ -22,6 +27,7 @@ import { PropType } from 'vue';
|
|
|
22
27
|
import humanizeDuration from 'humanize-duration';
|
|
23
28
|
|
|
24
29
|
const i18n = useI18n();
|
|
30
|
+
const emit = defineEmits(['click']);
|
|
25
31
|
|
|
26
32
|
const props = defineProps({
|
|
27
33
|
notification: {
|
|
@@ -55,4 +61,9 @@ const createdAt = computed(() => {
|
|
|
55
61
|
onBeforeUnmount(() => {
|
|
56
62
|
clearInterval(intervalId);
|
|
57
63
|
});
|
|
64
|
+
|
|
65
|
+
function onClick(navigate: () => void) {
|
|
66
|
+
emit('click', props.notification);
|
|
67
|
+
navigate();
|
|
68
|
+
}
|
|
58
69
|
</script>
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
v-if="notifications"
|
|
39
39
|
:notifications-config="notifications"
|
|
40
40
|
class="mr-1 sm:mr-2"
|
|
41
|
+
@click="onNotificationClick"
|
|
42
|
+
@open="onNotificationOpen"
|
|
41
43
|
></BaseLayoutNotificationDropdown>
|
|
42
44
|
|
|
43
45
|
<!-- Profile dropdown -->
|
|
@@ -70,6 +72,8 @@ import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
|
|
|
70
72
|
import BaseMenu from './BaseMenu.vue';
|
|
71
73
|
import BaseNavbarSideItem from './BaseNavbarSideItem.vue';
|
|
72
74
|
|
|
75
|
+
const emit = defineEmits(['notification:click', 'notification:open']);
|
|
76
|
+
|
|
73
77
|
const props = defineProps({
|
|
74
78
|
appName: {
|
|
75
79
|
default: '',
|
|
@@ -115,4 +119,12 @@ const actionSections = computed((): ActionSection[] => {
|
|
|
115
119
|
},
|
|
116
120
|
];
|
|
117
121
|
});
|
|
122
|
+
|
|
123
|
+
function onNotificationClick(notification: Notification) {
|
|
124
|
+
emit('notification:click', notification);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function onNotificationOpen() {
|
|
128
|
+
emit('notification:open');
|
|
129
|
+
}
|
|
118
130
|
</script>
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
class="mr-4 md:mr-5"
|
|
30
30
|
:dark="dark"
|
|
31
31
|
:notifications-config="notifications"
|
|
32
|
+
@click="onNotificationClick"
|
|
33
|
+
@open="onNotificationOpen"
|
|
32
34
|
></BaseLayoutNotificationDropdown>
|
|
33
35
|
|
|
34
36
|
<!-- Profile dropdown -->
|
|
@@ -96,6 +98,8 @@ import BaseNavbarItem from './BaseNavbarItem.vue';
|
|
|
96
98
|
import BaseNavbarSideItem from './BaseNavbarSideItem.vue';
|
|
97
99
|
import BaseLayoutNotificationDropdown from './BaseLayoutNotificationDropdown.vue';
|
|
98
100
|
|
|
101
|
+
const emit = defineEmits(['notification:click', 'notification:open']);
|
|
102
|
+
|
|
99
103
|
defineProps({
|
|
100
104
|
appName: {
|
|
101
105
|
default: '',
|
|
@@ -126,4 +130,12 @@ defineProps({
|
|
|
126
130
|
type: Boolean,
|
|
127
131
|
},
|
|
128
132
|
});
|
|
133
|
+
|
|
134
|
+
function onNotificationClick(notification: Notification) {
|
|
135
|
+
emit('notification:click', notification);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function onNotificationOpen() {
|
|
139
|
+
emit('notification:open');
|
|
140
|
+
}
|
|
129
141
|
</script>
|