@apptegy/nuxt-navigation 0.1.111 → 1.0.0-alpha.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/dist/module.json +1 -1
- package/dist/module.mjs +3 -2
- package/dist/runtime/components/Nav/Header.vue +108 -321
- package/dist/runtime/components/Nav/Header.vue.d.ts +12 -39
- package/dist/runtime/components/Nav/OrgSelect.vue +8 -8
- package/dist/runtime/components/Nav/Sidebar.vue +118 -207
- package/dist/runtime/components/Nav/Sidebar.vue.d.ts +7 -15
- package/dist/runtime/components/Nav/SidebarItem.vue +19 -22
- package/dist/runtime/components/Nav/SidebarSection.vue +28 -35
- package/dist/runtime/components/Nav/SidebarSection.vue.d.ts +2 -2
- package/dist/runtime/components/Nav/SubMenuItem.vue +1 -1
- package/dist/runtime/types/index.d.ts +0 -1
- package/locale/en.json +1 -22
- package/package.json +6 -9
- package/dist/runtime/components/Nav/NotificationItem.vue +0 -337
- package/dist/runtime/components/Nav/NotificationItem.vue.d.ts +0 -12
- package/dist/runtime/components/Nav/NotificationsPanel.vue +0 -513
- package/dist/runtime/components/Nav/NotificationsPanel.vue.d.ts +0 -53
- package/dist/runtime/constants/notification-types.d.ts +0 -19
- package/dist/runtime/constants/notification-types.js +0 -48
- package/dist/runtime/types/notifications.d.ts +0 -79
- package/dist/runtime/types/notifications.js +0 -0
- package/dist/runtime/utils/notification-api.d.ts +0 -26
- package/dist/runtime/utils/notification-api.js +0 -84
- package/dist/runtime/utils/notification-dates.d.ts +0 -15
- package/dist/runtime/utils/notification-dates.js +0 -81
- package/dist/runtime/utils/notifications.d.ts +0 -21
- package/dist/runtime/utils/notifications.js +0 -117
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
1
|
+
import { defineNuxtModule, installModule, createResolver, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const module = defineNuxtModule({
|
|
4
4
|
meta: {
|
|
@@ -7,7 +7,8 @@ const module = defineNuxtModule({
|
|
|
7
7
|
nuxt: ">=3.0.0"
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
|
-
setup(_options, nuxt) {
|
|
10
|
+
async setup(_options, nuxt) {
|
|
11
|
+
await installModule("@nuxt/icon");
|
|
11
12
|
const resolver = createResolver(import.meta.url);
|
|
12
13
|
addComponentsDir({ path: resolver.resolve("runtime/components") });
|
|
13
14
|
addImportsDir(resolver.resolve("runtime/composables"));
|
|
@@ -4,102 +4,47 @@
|
|
|
4
4
|
:class="{ sticky }"
|
|
5
5
|
role="banner"
|
|
6
6
|
>
|
|
7
|
-
<div class="
|
|
8
|
-
<slot name="
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<div class="user-control-actions">
|
|
13
|
-
<div
|
|
14
|
-
v-if="showNotifications"
|
|
15
|
-
class="header__notifications"
|
|
16
|
-
>
|
|
17
|
-
<Button
|
|
18
|
-
type="button"
|
|
19
|
-
severity="secondary"
|
|
20
|
-
text
|
|
21
|
-
rounded
|
|
22
|
-
class="notification-bell"
|
|
23
|
-
:class="{ 'notification-bell--active': panelOpen }"
|
|
24
|
-
:aria-label="$t('navigation.notifications')"
|
|
25
|
-
:aria-expanded="panelOpen"
|
|
26
|
-
aria-haspopup="dialog"
|
|
27
|
-
@click="onBellClick"
|
|
7
|
+
<div class="header__logo">
|
|
8
|
+
<slot name="logo">
|
|
9
|
+
<NuxtLink
|
|
10
|
+
class="no-link-style"
|
|
11
|
+
:to="homepageUrl"
|
|
28
12
|
>
|
|
29
|
-
<
|
|
30
|
-
class="
|
|
31
|
-
:class="{ '
|
|
32
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
-
width="22"
|
|
34
|
-
height="22"
|
|
35
|
-
viewBox="0 0 24 24"
|
|
36
|
-
fill="none"
|
|
37
|
-
stroke="currentColor"
|
|
38
|
-
stroke-width="2"
|
|
39
|
-
stroke-linecap="round"
|
|
40
|
-
stroke-linejoin="round"
|
|
41
|
-
aria-hidden="true"
|
|
42
|
-
@animationend="onBellShakeEnd"
|
|
43
|
-
>
|
|
44
|
-
<path d="M10.268 21a2 2 0 0 0 3.464 0" />
|
|
45
|
-
<path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />
|
|
46
|
-
</svg>
|
|
47
|
-
<span
|
|
48
|
-
v-if="notificationCount > 0"
|
|
49
|
-
class="notification-bell__badge"
|
|
50
|
-
aria-hidden="true"
|
|
51
|
-
>
|
|
52
|
-
{{ formattedNotificationCount }}
|
|
53
|
-
</span>
|
|
54
|
-
</Button>
|
|
55
|
-
|
|
56
|
-
<slot name="notifications">
|
|
57
|
-
<Popover
|
|
58
|
-
v-if="!isMobilePanel"
|
|
59
|
-
ref="popoverRef"
|
|
60
|
-
append-to="body"
|
|
61
|
-
class="notifications-popover"
|
|
62
|
-
:pt="popoverPt"
|
|
63
|
-
@show="onPanelShow"
|
|
64
|
-
@hide="onPanelHide"
|
|
13
|
+
<div
|
|
14
|
+
class="header__logo-content"
|
|
15
|
+
:class="{ 'big-logo': _brandLogoWidth > 80 }"
|
|
65
16
|
>
|
|
66
|
-
<
|
|
67
|
-
v-if="
|
|
68
|
-
|
|
69
|
-
:
|
|
70
|
-
:
|
|
71
|
-
:active-tab-id="activeTabId"
|
|
72
|
-
:active-filter-id="activeFilterId"
|
|
73
|
-
@update:active-tab-id="handleTabChange"
|
|
74
|
-
@update:active-filter-id="handleFilterChange"
|
|
75
|
-
@clear-all="(payload) => $emit('notifications-clear-all', payload)"
|
|
76
|
-
@dismiss="(payload) => $emit('notifications-dismiss', payload)"
|
|
77
|
-
@select="handleNotificationSelect"
|
|
17
|
+
<img
|
|
18
|
+
v-if="brandLogo"
|
|
19
|
+
ref="brandLogoRef"
|
|
20
|
+
:src="brandLogo"
|
|
21
|
+
:alt="$t('navigation.brandLogoAlt')"
|
|
78
22
|
/>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
>
|
|
85
|
-
<NavNotificationsPanel
|
|
86
|
-
v-if="notificationsPanel && panelOpen"
|
|
87
|
-
embedded
|
|
88
|
-
mobile
|
|
89
|
-
:data="notificationsPanel"
|
|
90
|
-
:loading="notificationsLoading"
|
|
91
|
-
:active-tab-id="activeTabId"
|
|
92
|
-
:active-filter-id="activeFilterId"
|
|
93
|
-
@update:active-tab-id="handleTabChange"
|
|
94
|
-
@update:active-filter-id="handleFilterChange"
|
|
95
|
-
@clear-all="(payload) => $emit('notifications-clear-all', payload)"
|
|
96
|
-
@dismiss="(payload) => $emit('notifications-dismiss', payload)"
|
|
97
|
-
@select="handleNotificationSelect"
|
|
98
|
-
@close="closeNotificationsPanel"
|
|
23
|
+
<component
|
|
24
|
+
:is="ApptegyLogo"
|
|
25
|
+
v-else
|
|
26
|
+
:alt="$t('navigation.brandLogoAlt')"
|
|
27
|
+
:use-light-logo="isAdmin || Object.values(getBrandingStyles).length === 0"
|
|
99
28
|
/>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
29
|
+
<div v-if="!brand?.hide_school_name">
|
|
30
|
+
<div class="school-name">{{ brand?.school_name }}</div>
|
|
31
|
+
<div
|
|
32
|
+
v-if="brand?.school_tag_line"
|
|
33
|
+
class="school-tag"
|
|
34
|
+
>
|
|
35
|
+
{{ brand.school_tag_line }}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</NuxtLink>
|
|
40
|
+
</slot>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="header__breadcrumbs">
|
|
43
|
+
<slot name="breadcrumbs" />
|
|
44
|
+
</div>
|
|
45
|
+
<div class="user-control-actions">
|
|
46
|
+
<slot name="org-select" />
|
|
47
|
+
<slot name="user-controls" />
|
|
103
48
|
<NavUserDropdown
|
|
104
49
|
:user="user"
|
|
105
50
|
:user-dropdown-options="userDropdownOptions"
|
|
@@ -111,11 +56,11 @@
|
|
|
111
56
|
v-if="useLogoutEmit"
|
|
112
57
|
class="logout-impersonate-user"
|
|
113
58
|
:aria-label="$t('accountSettings.signOut')"
|
|
114
|
-
@click="$emit('user-logout')"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
59
|
+
@click="$emit('user-logout')"
|
|
60
|
+
>
|
|
61
|
+
<Icon
|
|
62
|
+
name="lucide:log-out"
|
|
63
|
+
size="20"
|
|
119
64
|
color="#662E80"
|
|
120
65
|
/>
|
|
121
66
|
</button>
|
|
@@ -124,10 +69,9 @@
|
|
|
124
69
|
class="logout-impersonate-user"
|
|
125
70
|
:to="'/logout'"
|
|
126
71
|
>
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
font-size="20px"
|
|
72
|
+
<Icon
|
|
73
|
+
name="lucide:log-out"
|
|
74
|
+
size="20"
|
|
131
75
|
color="#662E80"
|
|
132
76
|
/>
|
|
133
77
|
</NuxtLink>
|
|
@@ -137,154 +81,42 @@
|
|
|
137
81
|
</template>
|
|
138
82
|
|
|
139
83
|
<script setup>
|
|
140
|
-
import {
|
|
141
|
-
import
|
|
142
|
-
|
|
143
|
-
import Button from "primevue/button";
|
|
144
|
-
import Popover from "primevue/popover";
|
|
145
|
-
import {
|
|
146
|
-
getNotificationsTotalCount,
|
|
147
|
-
mapNotificationsApiResponse
|
|
148
|
-
} from "../../utils/notification-api";
|
|
84
|
+
import { useBranding, useNuxtApp, ref, computed, onMounted, onBeforeUnmount } from "#imports";
|
|
85
|
+
import ApptegyLogo from "./Icons/ApptegyLogo.vue";
|
|
86
|
+
const { $t } = useNuxtApp();
|
|
149
87
|
const props = defineProps({
|
|
150
88
|
sticky: { type: Boolean, required: false },
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
notificationPanelOpen: { type: Boolean, required: false, default: false },
|
|
155
|
-
activeTabId: { type: String, required: false, default: "" },
|
|
156
|
-
activeFilterId: { type: String, required: false, default: "" },
|
|
89
|
+
clientId: { type: Number, required: false },
|
|
90
|
+
homepageUrl: { type: String, required: false, default: "/" },
|
|
91
|
+
isAdmin: { type: Boolean, required: false, default: false },
|
|
157
92
|
user: { type: Object, required: true },
|
|
158
93
|
impersonatedUser: { type: Object, required: false },
|
|
159
94
|
useLogoutEmit: { type: Boolean, required: false },
|
|
160
95
|
userDropdownOptions: { type: Array, required: true }
|
|
161
96
|
});
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
content: {
|
|
180
|
-
class: "notifications-popover__content",
|
|
181
|
-
style: "padding: 0; border: none; box-shadow: none; background: transparent;"
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
const notificationDateLabels = computed(() => ({
|
|
185
|
-
today: nuxtApp.$t("navigation.notificationsPanel.dateGroups.today"),
|
|
186
|
-
yesterday: nuxtApp.$t("navigation.notificationsPanel.dateGroups.yesterday"),
|
|
187
|
-
yesterdayTimeAgo: nuxtApp.$t("navigation.notificationsPanel.yesterday"),
|
|
188
|
-
justNow: nuxtApp.$t("navigation.notificationsPanel.justNow")
|
|
189
|
-
}));
|
|
190
|
-
const notificationsPanel = computed(() => {
|
|
191
|
-
if (!props.notificationsResponse) {
|
|
192
|
-
return null;
|
|
193
|
-
}
|
|
194
|
-
return mapNotificationsApiResponse(props.notificationsResponse, {
|
|
195
|
-
locale: nuxtApp.$intl.locale,
|
|
196
|
-
dateLabels: notificationDateLabels.value,
|
|
197
|
-
retentionLabel: nuxtApp.$t("navigation.notificationsPanel.retentionLabel"),
|
|
198
|
-
tabs: [
|
|
199
|
-
{ id: "new", label: nuxtApp.$t("navigation.notificationsPanel.tabs.new"), unreadOnly: true },
|
|
200
|
-
{ id: "all", label: nuxtApp.$t("navigation.notificationsPanel.tabs.all") }
|
|
201
|
-
]
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
const notificationCount = computed(
|
|
205
|
-
() => getNotificationsTotalCount(props.notificationsResponse)
|
|
206
|
-
);
|
|
207
|
-
const activeTabId = ref(props.activeTabId || notificationsPanel.value?.tabs[0]?.id || "");
|
|
208
|
-
const activeFilterId = ref(props.activeFilterId || notificationsPanel.value?.filters?.[0]?.id || "all-types");
|
|
209
|
-
watch(
|
|
210
|
-
notificationCount,
|
|
211
|
-
(newCount, oldCount) => {
|
|
212
|
-
if (oldCount !== void 0 && newCount > oldCount) {
|
|
213
|
-
playBellShake();
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
async function playBellShake() {
|
|
218
|
-
isBellShaking.value = false;
|
|
219
|
-
await nextTick();
|
|
220
|
-
isBellShaking.value = true;
|
|
221
|
-
}
|
|
222
|
-
function onBellShakeEnd() {
|
|
223
|
-
isBellShaking.value = false;
|
|
224
|
-
}
|
|
225
|
-
watch(
|
|
226
|
-
() => props.notificationPanelOpen,
|
|
227
|
-
(value) => {
|
|
228
|
-
panelOpen.value = value;
|
|
229
|
-
}
|
|
230
|
-
);
|
|
231
|
-
watch(panelOpen, (value) => {
|
|
232
|
-
emit("update:notificationPanelOpen", value);
|
|
233
|
-
if (!value && !isMobilePanel.value) {
|
|
234
|
-
popoverRef.value?.hide();
|
|
97
|
+
defineEmits(["selected-option", "user-logout"]);
|
|
98
|
+
const { brand, getBrandingStyles } = await useBranding(props.clientId);
|
|
99
|
+
const brandLogo = ref(brand.value?.logo_light);
|
|
100
|
+
const brandLogoRef = ref(null);
|
|
101
|
+
const brandLogoWidthPx = ref(0);
|
|
102
|
+
let brandLogoResizeObserver = null;
|
|
103
|
+
const _brandLogoWidth = computed(() => brandLogoWidthPx.value);
|
|
104
|
+
function updateBrandLogoWidth() {
|
|
105
|
+
brandLogoWidthPx.value = brandLogoRef.value?.clientWidth ?? 0;
|
|
106
|
+
}
|
|
107
|
+
onMounted(() => {
|
|
108
|
+
updateBrandLogoWidth();
|
|
109
|
+
if (brandLogoRef.value) {
|
|
110
|
+
brandLogoResizeObserver = new ResizeObserver(() => {
|
|
111
|
+
updateBrandLogoWidth();
|
|
112
|
+
});
|
|
113
|
+
brandLogoResizeObserver.observe(brandLogoRef.value);
|
|
235
114
|
}
|
|
236
115
|
});
|
|
237
|
-
|
|
238
|
-
()
|
|
239
|
-
|
|
240
|
-
if (value) {
|
|
241
|
-
activeTabId.value = value;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
watch(
|
|
246
|
-
() => props.activeFilterId,
|
|
247
|
-
(value) => {
|
|
248
|
-
if (value) {
|
|
249
|
-
activeFilterId.value = value;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
);
|
|
253
|
-
const formattedNotificationCount = computed(() => {
|
|
254
|
-
if (notificationCount.value > 99) {
|
|
255
|
-
return "99+";
|
|
256
|
-
}
|
|
257
|
-
return notificationCount.value;
|
|
116
|
+
onBeforeUnmount(() => {
|
|
117
|
+
brandLogoResizeObserver?.disconnect();
|
|
118
|
+
brandLogoResizeObserver = null;
|
|
258
119
|
});
|
|
259
|
-
function onBellClick(event) {
|
|
260
|
-
if (isMobilePanel.value) {
|
|
261
|
-
panelOpen.value = !panelOpen.value;
|
|
262
|
-
} else {
|
|
263
|
-
popoverRef.value?.toggle(event);
|
|
264
|
-
}
|
|
265
|
-
emit("notification-click", panelOpen.value);
|
|
266
|
-
}
|
|
267
|
-
function onPanelShow() {
|
|
268
|
-
panelOpen.value = true;
|
|
269
|
-
}
|
|
270
|
-
function onPanelHide() {
|
|
271
|
-
panelOpen.value = false;
|
|
272
|
-
}
|
|
273
|
-
function closeNotificationsPanel() {
|
|
274
|
-
panelOpen.value = false;
|
|
275
|
-
}
|
|
276
|
-
function handleNotificationSelect(payload) {
|
|
277
|
-
closeNotificationsPanel();
|
|
278
|
-
emit("notifications-select", payload);
|
|
279
|
-
}
|
|
280
|
-
function handleTabChange(id) {
|
|
281
|
-
activeTabId.value = id;
|
|
282
|
-
emit("update:activeTabId", id);
|
|
283
|
-
}
|
|
284
|
-
function handleFilterChange(id) {
|
|
285
|
-
activeFilterId.value = id;
|
|
286
|
-
emit("update:activeFilterId", id);
|
|
287
|
-
}
|
|
288
120
|
</script>
|
|
289
121
|
|
|
290
122
|
<style scoped>
|
|
@@ -292,61 +124,57 @@ header.header {
|
|
|
292
124
|
position: relative;
|
|
293
125
|
grid-area: navheader;
|
|
294
126
|
display: grid;
|
|
295
|
-
grid-
|
|
296
|
-
grid-template-columns: 1fr auto;
|
|
127
|
+
grid-template-columns: auto 1fr auto;
|
|
297
128
|
gap: 16px;
|
|
298
129
|
align-items: center;
|
|
299
|
-
padding:
|
|
130
|
+
padding: 16px 32px;
|
|
300
131
|
width: 100%;
|
|
301
132
|
background-color: var(--primary-white);
|
|
302
133
|
font: var(--font-regular);
|
|
303
134
|
}
|
|
304
|
-
header.header .
|
|
135
|
+
header.header .header__logo {
|
|
305
136
|
display: flex;
|
|
306
137
|
align-items: center;
|
|
307
|
-
gap: 8px;
|
|
308
138
|
}
|
|
309
|
-
header.header .
|
|
310
|
-
|
|
139
|
+
header.header .header__logo .no-link-style {
|
|
140
|
+
text-decoration: none;
|
|
141
|
+
color: inherit;
|
|
142
|
+
}
|
|
143
|
+
header.header .header__logo .header__logo-content {
|
|
311
144
|
display: flex;
|
|
312
145
|
align-items: center;
|
|
146
|
+
gap: 8px;
|
|
313
147
|
}
|
|
314
|
-
header.header
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
148
|
+
header.header .header__logo .header__logo-content.big-logo {
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
align-items: flex-start;
|
|
151
|
+
}
|
|
152
|
+
header.header .header__logo .header__logo-content img {
|
|
153
|
+
display: inline;
|
|
154
|
+
max-height: 36px;
|
|
155
|
+
max-width: 180px;
|
|
320
156
|
}
|
|
321
|
-
header.header
|
|
322
|
-
|
|
157
|
+
header.header .header__logo .header__logo-content .school-name {
|
|
158
|
+
font-size: 16px;
|
|
159
|
+
font-weight: 700;
|
|
160
|
+
overflow-wrap: break-word;
|
|
161
|
+
word-break: break-word;
|
|
162
|
+
white-space: nowrap;
|
|
323
163
|
}
|
|
324
|
-
header.header .
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
height: 16px;
|
|
330
|
-
padding: 0 4px;
|
|
331
|
-
border: 2px solid var(--primary-white, #fff);
|
|
332
|
-
border-radius: 8px;
|
|
333
|
-
background: #c84b31;
|
|
334
|
-
color: var(--primary-white, #fff);
|
|
335
|
-
font-size: 10px;
|
|
336
|
-
font-weight: 800;
|
|
337
|
-
line-height: 12px;
|
|
338
|
-
text-align: center;
|
|
339
|
-
box-sizing: border-box;
|
|
340
|
-
pointer-events: none;
|
|
164
|
+
header.header .header__logo .header__logo-content .school-tag {
|
|
165
|
+
font-size: 14px;
|
|
166
|
+
font-weight: 400;
|
|
167
|
+
overflow-wrap: break-word;
|
|
168
|
+
word-break: break-word;
|
|
341
169
|
}
|
|
342
|
-
header.header .
|
|
343
|
-
|
|
344
|
-
flex-shrink: 0;
|
|
345
|
-
color: var(--grey-80, #374151);
|
|
346
|
-
transform-origin: 50% 20%;
|
|
170
|
+
header.header .header__breadcrumbs {
|
|
171
|
+
grid-column: 2;
|
|
347
172
|
}
|
|
348
|
-
header.header .
|
|
349
|
-
|
|
173
|
+
header.header .user-control-actions {
|
|
174
|
+
grid-column: 3;
|
|
175
|
+
display: flex;
|
|
176
|
+
justify-content: end;
|
|
177
|
+
gap: 8px;
|
|
350
178
|
}
|
|
351
179
|
header.header .logout-impersonate-user {
|
|
352
180
|
width: 32px;
|
|
@@ -364,52 +192,11 @@ header.header .logout-impersonate-user:hover {
|
|
|
364
192
|
}
|
|
365
193
|
@media only screen and (width <= 960px) {
|
|
366
194
|
header.header {
|
|
367
|
-
padding-left:
|
|
368
|
-
padding-right:
|
|
195
|
+
padding-left: 24px;
|
|
196
|
+
padding-right: 24px;
|
|
369
197
|
}
|
|
370
198
|
}
|
|
371
199
|
header.header.sticky {
|
|
372
200
|
position: sticky;
|
|
373
201
|
}
|
|
374
|
-
|
|
375
|
-
@keyframes bellShake {
|
|
376
|
-
0% {
|
|
377
|
-
transform: rotate(0deg);
|
|
378
|
-
}
|
|
379
|
-
15% {
|
|
380
|
-
transform: rotate(14deg);
|
|
381
|
-
}
|
|
382
|
-
30% {
|
|
383
|
-
transform: rotate(-12deg);
|
|
384
|
-
}
|
|
385
|
-
45% {
|
|
386
|
-
transform: rotate(10deg);
|
|
387
|
-
}
|
|
388
|
-
60% {
|
|
389
|
-
transform: rotate(-7deg);
|
|
390
|
-
}
|
|
391
|
-
75% {
|
|
392
|
-
transform: rotate(4deg);
|
|
393
|
-
}
|
|
394
|
-
100% {
|
|
395
|
-
transform: rotate(0deg);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
@media (prefers-reduced-motion: reduce) {
|
|
399
|
-
.notification-bell__icon--shaking {
|
|
400
|
-
animation: none !important;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
</style>
|
|
404
|
-
|
|
405
|
-
<style>
|
|
406
|
-
.p-popover.notifications-popover::before, .p-popover.notifications-popover::after {
|
|
407
|
-
display: none;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
.notifications-popover__content {
|
|
411
|
-
width: min(480px, 100vw - 32px);
|
|
412
|
-
max-height: calc(100vh - 130px);
|
|
413
|
-
overflow: hidden;
|
|
414
|
-
}
|
|
415
202
|
</style>
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IUser } from '../../types/index.js';
|
|
2
2
|
interface IHeaderProps {
|
|
3
3
|
sticky?: boolean;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
notificationPanelOpen?: boolean;
|
|
8
|
-
activeTabId?: string;
|
|
9
|
-
activeFilterId?: string;
|
|
4
|
+
clientId?: number;
|
|
5
|
+
homepageUrl?: string;
|
|
6
|
+
isAdmin?: boolean;
|
|
10
7
|
}
|
|
11
8
|
interface IUserDropdown {
|
|
12
9
|
user: {
|
|
@@ -19,43 +16,19 @@ interface IUserDropdown {
|
|
|
19
16
|
userDropdownOptions: Array<unknown>;
|
|
20
17
|
}
|
|
21
18
|
type __VLS_Props = IHeaderProps & IUserDropdown;
|
|
22
|
-
declare var __VLS_1: {},
|
|
19
|
+
declare var __VLS_1: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
|
|
23
20
|
type __VLS_Slots = {} & {
|
|
24
|
-
|
|
21
|
+
logo?: (props: typeof __VLS_1) => any;
|
|
25
22
|
} & {
|
|
26
|
-
|
|
23
|
+
breadcrumbs?: (props: typeof __VLS_13) => any;
|
|
27
24
|
} & {
|
|
28
|
-
'
|
|
25
|
+
'org-select'?: (props: typeof __VLS_15) => any;
|
|
29
26
|
} & {
|
|
30
|
-
|
|
27
|
+
'user-controls'?: (props: typeof __VLS_17) => any;
|
|
31
28
|
};
|
|
32
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"update:notificationPanelOpen": (...args: any[]) => void;
|
|
36
|
-
"update:activeTabId": (...args: any[]) => void;
|
|
37
|
-
"update:activeFilterId": (...args: any[]) => void;
|
|
38
|
-
"notifications-clear-all": (...args: any[]) => void;
|
|
39
|
-
"notifications-dismiss": (...args: any[]) => void;
|
|
40
|
-
"notifications-select": (...args: any[]) => void;
|
|
41
|
-
"notification-click": (...args: any[]) => void;
|
|
42
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
43
|
-
"onSelected-option"?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
"onUser-logout"?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
"onUpdate:notificationPanelOpen"?: ((...args: any[]) => any) | undefined;
|
|
46
|
-
"onUpdate:activeTabId"?: ((...args: any[]) => any) | undefined;
|
|
47
|
-
"onUpdate:activeFilterId"?: ((...args: any[]) => any) | undefined;
|
|
48
|
-
"onNotifications-clear-all"?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
"onNotifications-dismiss"?: ((...args: any[]) => any) | undefined;
|
|
50
|
-
"onNotifications-select"?: ((...args: any[]) => any) | undefined;
|
|
51
|
-
"onNotification-click"?: ((...args: any[]) => any) | undefined;
|
|
52
|
-
}>, {
|
|
53
|
-
showNotifications: boolean;
|
|
54
|
-
notificationsResponse: INotificationsApiResponse | null;
|
|
55
|
-
notificationsLoading: boolean;
|
|
56
|
-
notificationPanelOpen: boolean;
|
|
57
|
-
activeTabId: string;
|
|
58
|
-
activeFilterId: string;
|
|
29
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
30
|
+
homepageUrl: string;
|
|
31
|
+
isAdmin: boolean;
|
|
59
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
33
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
61
34
|
export default _default;
|
|
@@ -101,15 +101,15 @@ function handleSelectedOrg($event, orgId) {
|
|
|
101
101
|
@input="handleDropdownSearch"
|
|
102
102
|
>
|
|
103
103
|
<span v-if="selectedOrg?.intranet" class="badge selected">
|
|
104
|
-
<
|
|
104
|
+
<Icon name="lucide:lock" size="12" />
|
|
105
105
|
{{ $t("navigation.orgBadge") }}
|
|
106
106
|
</span>
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
<Icon
|
|
108
|
+
:name="active ? 'lucide:chevron-up' : 'lucide:chevron-down'"
|
|
109
|
+
size="16"
|
|
110
|
+
@keydown="keydownActionsOnTrigger"
|
|
111
|
+
@click.prevent="toggleDropdown"
|
|
112
|
+
/>
|
|
113
113
|
</div>
|
|
114
114
|
<div
|
|
115
115
|
v-show="active"
|
|
@@ -136,7 +136,7 @@ function handleSelectedOrg($event, orgId) {
|
|
|
136
136
|
<span :class="{ pinned: option.pinned, 'item-flex': true }"
|
|
137
137
|
>{{ option.name }}
|
|
138
138
|
<span v-if="option.intranet" class="badge selected">
|
|
139
|
-
<
|
|
139
|
+
<Icon name="lucide:lock" size="12" />
|
|
140
140
|
{{ $t("navigation.orgBadge") }}
|
|
141
141
|
</span>
|
|
142
142
|
</span>
|