@apptegy/nuxt-navigation 0.1.125 → 0.2.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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=3.0.0"
5
5
  },
6
6
  "configKey": "@apptegy/nuxt-navigation",
7
- "version": "0.1.125",
7
+ "version": "0.2.0-alpha.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.1",
10
10
  "unbuild": "unknown"
@@ -1,7 +1,33 @@
1
1
  <template>
2
- <div class="avatar-container">
3
- <img v-if="src" :src="src" class="avatar-size" alt="">
4
- <span v-else class="avatar-size">
2
+ <PAvatar
3
+ v-if="isBeaconNavEnabled"
4
+ :image="src || void 0"
5
+ :label="!src ? initials : void 0"
6
+ class="beacon-avatar"
7
+ shape="square"
8
+ size="normal"
9
+ >
10
+ <template
11
+ v-if="!src && !initials"
12
+ #icon
13
+ >
14
+ <Icon name="lucide:user" />
15
+ </template>
16
+ </PAvatar>
17
+ <div
18
+ v-else
19
+ class="avatar-container"
20
+ >
21
+ <img
22
+ v-if="src"
23
+ :src="src"
24
+ class="avatar-size"
25
+ alt=""
26
+ />
27
+ <span
28
+ v-else
29
+ class="avatar-size"
30
+ >
5
31
  {{ initials }}
6
32
  </span>
7
33
  <svg
@@ -14,22 +40,39 @@
14
40
  xmlns="http://www.w3.org/2000/svg"
15
41
  aria-label="Impersonated user"
16
42
  >
17
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6263 1.6087C13.0678 2.13532 13.3333 2.81151 13.3333 3.54897C13.3333 5.22916 11.9559 6.59105 10.2565 6.59105C10.1797 6.59105 10.1036 6.58826 10.0282 6.58278C10.1737 6.83855 10.2567 7.13375 10.2567 7.44821C10.2566 7.73741 10.1864 8.01033 10.0619 8.25129C11.0877 8.74406 11.795 9.78216 11.7952 10.9856C11.7952 11.5456 11.3356 12 10.7692 12H2.56467C1.99821 12 1.53867 11.5456 1.53867 10.9856C1.53881 9.78225 2.2461 8.74396 3.27171 8.25107C3.14726 8.01017 3.07705 7.73732 3.077 7.44821C3.077 7.13376 3.16002 6.83855 3.30555 6.58278C3.23004 6.58826 3.15377 6.59105 3.07683 6.59105C1.37761 6.59088 0 5.22905 0 3.54897C7.92599e-05 2.81135 0.265697 2.13503 0.707484 1.60836C0.585132 1.44137 0.513 1.23606 0.513 1.01408C0.513 0.454021 0.972207 0 1.53867 0H4.61567C5.18213 0 5.64133 0.454021 5.64133 1.01408C5.64133 1.2362 5.56911 1.44165 5.4466 1.6087C5.85423 2.09487 6.11177 2.70851 6.14899 3.38016H7.18434C7.22158 2.70836 7.47929 2.09458 7.88715 1.60836C7.7648 1.44137 7.69267 1.23605 7.69267 1.01408C7.69267 0.454021 8.15187 0 8.71833 0H11.7953C12.3618 0 12.821 0.454021 12.821 1.01408C12.821 1.2362 12.7488 1.44165 12.6263 1.6087ZM8.90015 2.02817C8.47434 2.39969 8.20577 2.94329 8.20567 3.54897C8.20567 4.66898 9.12373 5.57762 10.2565 5.57779C11.3894 5.57779 12.3085 4.66909 12.3085 3.54897C12.3084 2.94329 12.0396 2.39969 11.6136 2.02817H8.90015ZM5.64083 8.70988C5.64083 9.12681 6.24532 9.46433 6.66701 9.46433C7.0887 9.46433 7.69283 9.12681 7.69283 8.70988C7.69284 8.57344 7.74842 8.44248 7.84708 8.34709C7.94289 8.25457 8.07191 8.20267 8.20583 8.20267H8.46759C8.8892 8.20267 9.23051 7.86502 9.23067 7.44821C9.23067 7.03128 8.88929 6.6926 8.46759 6.6926H8.20583C7.96517 6.6926 7.75636 6.52752 7.70452 6.29516L7.28033 4.39457H6.05334L5.62915 6.29516C5.57734 6.52735 5.36945 6.69237 5.129 6.6926H4.86607C4.44452 6.69277 4.103 7.03138 4.103 7.44821C4.10316 7.86492 4.44462 8.2025 4.86607 8.20267H5.129L5.2295 8.21307C5.32786 8.23262 5.41926 8.28053 5.49126 8.35171C5.58728 8.44677 5.64082 8.57552 5.64083 8.70988ZM1.026 3.54897C1.0261 2.94329 1.29467 2.39969 1.72048 2.02817H4.43389C4.85992 2.39969 5.12874 2.94329 5.12883 3.54897C5.12883 4.66909 4.20975 5.57779 3.07683 5.57779C1.94407 5.57762 1.026 4.66898 1.026 3.54897Z" fill="black"/>
18
- <path d="M1.026 3.54897C1.0261 2.94329 1.29467 2.39969 1.72048 2.02817H4.43389C4.85992 2.39969 5.12874 2.94329 5.12883 3.54897C5.12883 4.66909 4.20975 5.57779 3.07683 5.57779C1.94407 5.57762 1.026 4.66898 1.026 3.54897Z" fill="#C8D5F0"/>
19
- <path d="M8.90015 2.02817C8.47434 2.39969 8.20577 2.94329 8.20567 3.54897C8.20567 4.66898 9.12373 5.57762 10.2565 5.57779C11.3894 5.57779 12.3085 4.66909 12.3085 3.54897C12.3084 2.94329 12.0396 2.39969 11.6136 2.02817H8.90015Z" fill="#C8D5F0"/>
20
- <path d="M5.64083 8.70988C5.64083 9.12681 6.24532 9.46433 6.66701 9.46433C7.0887 9.46433 7.69283 9.12681 7.69283 8.70988C7.69284 8.57344 7.74842 8.44248 7.84708 8.34709C7.94289 8.25457 8.07191 8.20267 8.20583 8.20267H8.46759C8.8892 8.20267 9.23051 7.86502 9.23067 7.44821C9.23067 7.03128 8.88929 6.6926 8.46759 6.6926H8.20583C7.96517 6.6926 7.75636 6.52752 7.70452 6.29516L7.28033 4.39457H6.05334L5.62915 6.29516C5.57734 6.52735 5.36945 6.69237 5.129 6.6926H4.86607C4.44452 6.69277 4.103 7.03138 4.103 7.44821C4.10316 7.86492 4.44462 8.2025 4.86607 8.20267H5.129L5.2295 8.21307C5.32786 8.23262 5.41926 8.28053 5.49126 8.35171C5.58728 8.44677 5.64082 8.57552 5.64083 8.70988Z" fill="#E4B7B7"/>
43
+ <path
44
+ fill-rule="evenodd"
45
+ clip-rule="evenodd"
46
+ d="M12.6263 1.6087C13.0678 2.13532 13.3333 2.81151 13.3333 3.54897C13.3333 5.22916 11.9559 6.59105 10.2565 6.59105C10.1797 6.59105 10.1036 6.58826 10.0282 6.58278C10.1737 6.83855 10.2567 7.13375 10.2567 7.44821C10.2566 7.73741 10.1864 8.01033 10.0619 8.25129C11.0877 8.74406 11.795 9.78216 11.7952 10.9856C11.7952 11.5456 11.3356 12 10.7692 12H2.56467C1.99821 12 1.53867 11.5456 1.53867 10.9856C1.53881 9.78225 2.2461 8.74396 3.27171 8.25107C3.14726 8.01017 3.07705 7.73732 3.077 7.44821C3.077 7.13376 3.16002 6.83855 3.30555 6.58278C3.23004 6.58826 3.15377 6.59105 3.07683 6.59105C1.37761 6.59088 0 5.22905 0 3.54897C7.92599e-05 2.81135 0.265697 2.13503 0.707484 1.60836C0.585132 1.44137 0.513 1.23606 0.513 1.01408C0.513 0.454021 0.972207 0 1.53867 0H4.61567C5.18213 0 5.64133 0.454021 5.64133 1.01408C5.64133 1.2362 5.56911 1.44165 5.4466 1.6087C5.85423 2.09487 6.11177 2.70851 6.14899 3.38016H7.18434C7.22158 2.70836 7.47929 2.09458 7.88715 1.60836C7.7648 1.44137 7.69267 1.23605 7.69267 1.01408C7.69267 0.454021 8.15187 0 8.71833 0H11.7953C12.3618 0 12.821 0.454021 12.821 1.01408C12.821 1.2362 12.7488 1.44165 12.6263 1.6087ZM8.90015 2.02817C8.47434 2.39969 8.20577 2.94329 8.20567 3.54897C8.20567 4.66898 9.12373 5.57762 10.2565 5.57779C11.3894 5.57779 12.3085 4.66909 12.3085 3.54897C12.3084 2.94329 12.0396 2.39969 11.6136 2.02817H8.90015ZM5.64083 8.70988C5.64083 9.12681 6.24532 9.46433 6.66701 9.46433C7.0887 9.46433 7.69283 9.12681 7.69283 8.70988C7.69284 8.57344 7.74842 8.44248 7.84708 8.34709C7.94289 8.25457 8.07191 8.20267 8.20583 8.20267H8.46759C8.8892 8.20267 9.23051 7.86502 9.23067 7.44821C9.23067 7.03128 8.88929 6.6926 8.46759 6.6926H8.20583C7.96517 6.6926 7.75636 6.52752 7.70452 6.29516L7.28033 4.39457H6.05334L5.62915 6.29516C5.57734 6.52735 5.36945 6.69237 5.129 6.6926H4.86607C4.44452 6.69277 4.103 7.03138 4.103 7.44821C4.10316 7.86492 4.44462 8.2025 4.86607 8.20267H5.129L5.2295 8.21307C5.32786 8.23262 5.41926 8.28053 5.49126 8.35171C5.58728 8.44677 5.64082 8.57552 5.64083 8.70988ZM1.026 3.54897C1.0261 2.94329 1.29467 2.39969 1.72048 2.02817H4.43389C4.85992 2.39969 5.12874 2.94329 5.12883 3.54897C5.12883 4.66909 4.20975 5.57779 3.07683 5.57779C1.94407 5.57762 1.026 4.66898 1.026 3.54897Z"
47
+ fill="black"
48
+ />
49
+ <path
50
+ d="M1.026 3.54897C1.0261 2.94329 1.29467 2.39969 1.72048 2.02817H4.43389C4.85992 2.39969 5.12874 2.94329 5.12883 3.54897C5.12883 4.66909 4.20975 5.57779 3.07683 5.57779C1.94407 5.57762 1.026 4.66898 1.026 3.54897Z"
51
+ fill="#C8D5F0"
52
+ />
53
+ <path
54
+ d="M8.90015 2.02817C8.47434 2.39969 8.20577 2.94329 8.20567 3.54897C8.20567 4.66898 9.12373 5.57762 10.2565 5.57779C11.3894 5.57779 12.3085 4.66909 12.3085 3.54897C12.3084 2.94329 12.0396 2.39969 11.6136 2.02817H8.90015Z"
55
+ fill="#C8D5F0"
56
+ />
57
+ <path
58
+ d="M5.64083 8.70988C5.64083 9.12681 6.24532 9.46433 6.66701 9.46433C7.0887 9.46433 7.69283 9.12681 7.69283 8.70988C7.69284 8.57344 7.74842 8.44248 7.84708 8.34709C7.94289 8.25457 8.07191 8.20267 8.20583 8.20267H8.46759C8.8892 8.20267 9.23051 7.86502 9.23067 7.44821C9.23067 7.03128 8.88929 6.6926 8.46759 6.6926H8.20583C7.96517 6.6926 7.75636 6.52752 7.70452 6.29516L7.28033 4.39457H6.05334L5.62915 6.29516C5.57734 6.52735 5.36945 6.69237 5.129 6.6926H4.86607C4.44452 6.69277 4.103 7.03138 4.103 7.44821C4.10316 7.86492 4.44462 8.2025 4.86607 8.20267H5.129L5.2295 8.21307C5.32786 8.23262 5.41926 8.28053 5.49126 8.35171C5.58728 8.44677 5.64082 8.57552 5.64083 8.70988Z"
59
+ fill="#E4B7B7"
60
+ />
21
61
  </svg>
22
62
  </div>
23
63
  </template>
24
64
 
25
65
  <script setup>
66
+ import PAvatar from "primevue/avatar";
26
67
  import { computed } from "vue";
27
68
  const props = defineProps({
28
69
  src: { type: String, required: false },
29
70
  name: { type: String, required: true },
30
- isImpersonated: { type: Boolean, required: false }
71
+ isImpersonated: { type: Boolean, required: false },
72
+ isBeaconNavEnabled: { type: Boolean, required: true }
31
73
  });
32
74
  const initials = computed(() => {
75
+ if (!props.name) return "";
33
76
  const initials2 = props.name.match(/\b\w/g) || [];
34
77
  return ((initials2.shift() || "") + (initials2.pop() || "")).toUpperCase();
35
78
  });
@@ -81,4 +124,17 @@ img {
81
124
  width: 14px;
82
125
  height: 14px;
83
126
  }
127
+
128
+ .beacon-avatar {
129
+ min-width: 28px;
130
+ min-height: 28px;
131
+ max-width: 28px;
132
+ max-height: 28px;
133
+ }
134
+ .beacon-avatar span {
135
+ width: 24px;
136
+ height: 24px;
137
+ background-color: #2d2d2d;
138
+ border-radius: 8px;
139
+ }
84
140
  </style>
@@ -11,6 +11,10 @@ interface IAvatarProps {
11
11
  * Indicates if the user is being impersonated.
12
12
  */
13
13
  isImpersonated?: boolean;
14
+ /**
15
+ * Indicates if the beacon nav is enabled.
16
+ */
17
+ isBeaconNavEnabled: boolean;
14
18
  }
15
19
  declare const _default: import("vue").DefineComponent<IAvatarProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IAvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
20
  export default _default;
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <header
3
- class="header"
4
- :class="{ sticky }"
3
+ :class="['header', isBeaconNavEnabled ? 'beacon' : 'classic', { sticky }]"
5
4
  role="banner"
6
5
  >
7
6
  <div class="header__breadcrumbs">
@@ -16,128 +15,131 @@
16
15
  v-if="showNotifications"
17
16
  class="header__notifications"
18
17
  >
19
- <Button
20
- type="button"
21
- severity="secondary"
22
- text
23
- rounded
24
- class="notification-bell"
25
- :class="{ 'notification-bell--active': panelOpen }"
26
- :aria-label="$t('navigation.notifications')"
27
- :aria-expanded="panelOpen"
28
- aria-haspopup="dialog"
29
- @click="onBellClick"
30
- >
31
- <svg
32
- class="notification-bell__icon"
33
- :class="{ 'notification-bell__icon--shaking': isBellShaking }"
34
- xmlns="http://www.w3.org/2000/svg"
35
- width="22"
36
- height="22"
37
- viewBox="0 0 24 24"
38
- fill="none"
39
- stroke="currentColor"
40
- stroke-width="2"
41
- stroke-linecap="round"
42
- stroke-linejoin="round"
43
- aria-hidden="true"
44
- @animationend="onBellShakeEnd"
45
- >
46
- <path d="M10.268 21a2 2 0 0 0 3.464 0" />
47
- <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" />
48
- </svg>
49
- <span
50
- v-if="notificationCount > 0"
51
- class="notification-bell__badge"
52
- aria-hidden="true"
18
+ <Button
19
+ type="button"
20
+ severity="secondary"
21
+ text
22
+ rounded
23
+ class="notification-bell"
24
+ :class="{ 'notification-bell--active': panelOpen }"
25
+ :aria-label="$t('navigation.notifications')"
26
+ :aria-expanded="panelOpen"
27
+ aria-haspopup="dialog"
28
+ @click="onBellClick"
53
29
  >
54
- {{ formattedNotificationCount }}
55
- </span>
56
- </Button>
30
+ <svg
31
+ class="notification-bell__icon"
32
+ :class="{ 'notification-bell__icon--shaking': isBellShaking }"
33
+ xmlns="http://www.w3.org/2000/svg"
34
+ width="22"
35
+ height="22"
36
+ viewBox="0 0 24 24"
37
+ fill="none"
38
+ stroke="currentColor"
39
+ stroke-width="2"
40
+ stroke-linecap="round"
41
+ stroke-linejoin="round"
42
+ aria-hidden="true"
43
+ @animationend="onBellShakeEnd"
44
+ >
45
+ <path d="M10.268 21a2 2 0 0 0 3.464 0" />
46
+ <path
47
+ 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"
48
+ />
49
+ </svg>
50
+ <span
51
+ v-if="notificationCount > 0"
52
+ class="notification-bell__badge"
53
+ aria-hidden="true"
54
+ >
55
+ {{ formattedNotificationCount }}
56
+ </span>
57
+ </Button>
58
+
59
+ <slot name="notifications">
60
+ <Popover
61
+ v-if="!isMobilePanel"
62
+ ref="popoverRef"
63
+ append-to="body"
64
+ class="notifications-popover"
65
+ :pt="popoverPt"
66
+ @show="onPanelShow"
67
+ @hide="onPanelHide"
68
+ >
69
+ <NavNotificationsPanel
70
+ v-if="notificationsPanel"
71
+ embedded
72
+ :data="notificationsPanel"
73
+ :loading="notificationsLoading"
74
+ :active-tab-id="activeTabId"
75
+ :active-filter-id="activeFilterId"
76
+ :filter-catalog="filterCatalog"
77
+ @update:active-tab-id="handleTabChange"
78
+ @update:active-filter-id="handleFilterChange"
79
+ @update:filter-catalog="filterCatalog = $event"
80
+ @clear-all="(payload) => $emit('notifications-clear-all', payload)"
81
+ @dismiss="(payload) => $emit('notifications-dismiss', payload)"
82
+ @select="handleNotificationSelect"
83
+ />
84
+ </Popover>
57
85
 
58
- <slot name="notifications">
59
- <Popover
60
- v-if="!isMobilePanel"
61
- ref="popoverRef"
62
- append-to="body"
63
- class="notifications-popover"
64
- :pt="popoverPt"
65
- @show="onPanelShow"
66
- @hide="onPanelHide"
86
+ <Teleport
87
+ v-else
88
+ to="body"
89
+ >
90
+ <NavNotificationsPanel
91
+ v-if="notificationsPanel && panelOpen"
92
+ embedded
93
+ mobile
94
+ :data="notificationsPanel"
95
+ :loading="notificationsLoading"
96
+ :active-tab-id="activeTabId"
97
+ :active-filter-id="activeFilterId"
98
+ :filter-catalog="filterCatalog"
99
+ @update:active-tab-id="handleTabChange"
100
+ @update:active-filter-id="handleFilterChange"
101
+ @update:filter-catalog="filterCatalog = $event"
102
+ @clear-all="(payload) => $emit('notifications-clear-all', payload)"
103
+ @dismiss="(payload) => $emit('notifications-dismiss', payload)"
104
+ @select="handleNotificationSelect"
105
+ @close="closeNotificationsPanel"
106
+ />
107
+ </Teleport>
108
+ </slot>
109
+ </div>
110
+ <NavUserDropdown
111
+ :user="user"
112
+ :user-dropdown-options="userDropdownOptions"
113
+ :impersonated-user="impersonatedUser"
114
+ @select-option="(index) => $emit('selected-option', index)"
115
+ />
116
+ <template v-if="impersonatedUser?.show">
117
+ <button
118
+ v-if="useLogoutEmit"
119
+ class="logout-impersonate-user"
120
+ :aria-label="$t('accountSettings.signOut')"
121
+ @click="$emit('user-logout')"
67
122
  >
68
- <NavNotificationsPanel
69
- v-if="notificationsPanel"
70
- embedded
71
- :data="notificationsPanel"
72
- :loading="notificationsLoading"
73
- :active-tab-id="activeTabId"
74
- :active-filter-id="activeFilterId"
75
- :filter-catalog="filterCatalog"
76
- @update:active-tab-id="handleTabChange"
77
- @update:active-filter-id="handleFilterChange"
78
- @update:filter-catalog="filterCatalog = $event"
79
- @clear-all="(payload) => $emit('notifications-clear-all', payload)"
80
- @dismiss="(payload) => $emit('notifications-dismiss', payload)"
81
- @select="handleNotificationSelect"
123
+ <a-icon
124
+ class="icon"
125
+ :icon="'16:logout'"
126
+ font-size="20px"
127
+ color="#662E80"
82
128
  />
83
- </Popover>
84
-
85
- <Teleport
129
+ </button>
130
+ <NuxtLink
86
131
  v-else
87
- to="body"
132
+ class="logout-impersonate-user"
133
+ :to="'/logout'"
88
134
  >
89
- <NavNotificationsPanel
90
- v-if="notificationsPanel && panelOpen"
91
- embedded
92
- mobile
93
- :data="notificationsPanel"
94
- :loading="notificationsLoading"
95
- :active-tab-id="activeTabId"
96
- :active-filter-id="activeFilterId"
97
- :filter-catalog="filterCatalog"
98
- @update:active-tab-id="handleTabChange"
99
- @update:active-filter-id="handleFilterChange"
100
- @update:filter-catalog="filterCatalog = $event"
101
- @clear-all="(payload) => $emit('notifications-clear-all', payload)"
102
- @dismiss="(payload) => $emit('notifications-dismiss', payload)"
103
- @select="handleNotificationSelect"
104
- @close="closeNotificationsPanel"
135
+ <a-icon
136
+ class="icon"
137
+ :icon="'16:logout'"
138
+ font-size="20px"
139
+ color="#662E80"
105
140
  />
106
- </Teleport>
107
- </slot>
108
- </div>
109
- <NavUserDropdown
110
- :user="user"
111
- :user-dropdown-options="userDropdownOptions"
112
- :impersonated-user="impersonatedUser"
113
- @select-option="(index) => $emit('selected-option', index)"
114
- />
115
- <template v-if="impersonatedUser?.show">
116
- <button
117
- v-if="useLogoutEmit"
118
- class="logout-impersonate-user"
119
- :aria-label="$t('accountSettings.signOut')"
120
- @click="$emit('user-logout')">
121
- <a-icon
122
- class="icon"
123
- :icon="'16:logout'"
124
- font-size="20px"
125
- color="#662E80"
126
- />
127
- </button>
128
- <NuxtLink
129
- v-else
130
- class="logout-impersonate-user"
131
- :to="'/logout'"
132
- >
133
- <a-icon
134
- class="icon"
135
- :icon="'16:logout'"
136
- font-size="20px"
137
- color="#662E80"
138
- />
139
- </NuxtLink>
140
- </template>
141
+ </NuxtLink>
142
+ </template>
141
143
  </div>
142
144
  </div>
143
145
  </header>
@@ -146,13 +148,10 @@
146
148
  <script setup>
147
149
  import { computed, nextTick, ref, watch } from "vue";
148
150
  import { useMediaQuery } from "@vueuse/core";
149
- import { useNuxtApp } from "#app";
151
+ import { useNuxtApp } from "#imports";
150
152
  import Button from "primevue/button";
151
153
  import Popover from "primevue/popover";
152
- import {
153
- getNotificationsTotalCount,
154
- mapNotificationsApiResponse
155
- } from "../../utils/notification-api";
154
+ import { getNotificationsTotalCount, mapNotificationsApiResponse } from "../../utils/notification-api";
156
155
  const props = defineProps({
157
156
  sticky: { type: Boolean, required: false },
158
157
  notifications: { type: [Object, null], required: false, default: null },
@@ -161,7 +160,7 @@ const props = defineProps({
161
160
  useLogoutEmit: { type: Boolean, required: false },
162
161
  userDropdownOptions: { type: Array, required: true }
163
162
  });
164
- const nuxtApp = useNuxtApp();
163
+ const { $t, $intl, $ld } = useNuxtApp();
165
164
  const emit = defineEmits([
166
165
  "selected-option",
167
166
  "user-logout",
@@ -187,11 +186,14 @@ const popoverPt = {
187
186
  style: "padding: 0; border: none; box-shadow: none; background: transparent;"
188
187
  }
189
188
  };
189
+ const isBeaconNavEnabled = computed(() => {
190
+ return Boolean($ld?.flags?.beaconNavEnabled);
191
+ });
190
192
  const notificationDateLabels = computed(() => ({
191
- today: nuxtApp.$t("navigation.notificationsPanel.dateGroups.today"),
192
- yesterday: nuxtApp.$t("navigation.notificationsPanel.dateGroups.yesterday"),
193
- yesterdayTimeAgo: nuxtApp.$t("navigation.notificationsPanel.yesterday"),
194
- justNow: nuxtApp.$t("navigation.notificationsPanel.justNow")
193
+ today: $t("navigation.notificationsPanel.dateGroups.today"),
194
+ yesterday: $t("navigation.notificationsPanel.dateGroups.yesterday"),
195
+ yesterdayTimeAgo: $t("navigation.notificationsPanel.yesterday"),
196
+ justNow: $t("navigation.notificationsPanel.justNow")
195
197
  }));
196
198
  const notificationsPanel = computed(() => {
197
199
  if (!notificationsResponse.value) {
@@ -200,16 +202,14 @@ const notificationsPanel = computed(() => {
200
202
  return mapNotificationsApiResponse(notificationsResponse.value, {
201
203
  locale: nuxtApp.$intl.locale,
202
204
  dateLabels: notificationDateLabels.value,
203
- retentionLabel: nuxtApp.$t("navigation.notificationsPanel.retentionLabel"),
205
+ retentionLabel: $t("navigation.notificationsPanel.retentionLabel"),
204
206
  tabs: [
205
- { id: "new", label: nuxtApp.$t("navigation.notificationsPanel.tabs.new"), unreadOnly: true },
206
- { id: "all", label: nuxtApp.$t("navigation.notificationsPanel.tabs.all") }
207
+ { id: "new", label: $t("navigation.notificationsPanel.tabs.new"), unreadOnly: true },
208
+ { id: "all", label: $t("navigation.notificationsPanel.tabs.all") }
207
209
  ]
208
210
  });
209
211
  });
210
- const notificationCount = computed(
211
- () => getNotificationsTotalCount(notificationsResponse.value)
212
- );
212
+ const notificationCount = computed(() => getNotificationsTotalCount(notificationsResponse.value));
213
213
  function patchNotifications(patch) {
214
214
  if (!props.notifications) {
215
215
  return;
@@ -219,14 +219,11 @@ function patchNotifications(patch) {
219
219
  ...patch
220
220
  });
221
221
  }
222
- watch(
223
- notificationCount,
224
- (newCount, oldCount) => {
225
- if (oldCount !== void 0 && newCount > oldCount) {
226
- playBellShake();
227
- }
222
+ watch(notificationCount, (newCount, oldCount) => {
223
+ if (oldCount !== void 0 && newCount > oldCount) {
224
+ playBellShake();
228
225
  }
229
- );
226
+ });
230
227
  async function playBellShake() {
231
228
  isBellShaking.value = false;
232
229
  await nextTick();
@@ -303,7 +300,7 @@ function handleFilterChange(id) {
303
300
  </script>
304
301
 
305
302
  <style scoped>
306
- header.header {
303
+ header.header.classic {
307
304
  position: relative;
308
305
  grid-area: navheader;
309
306
  display: grid;
@@ -316,35 +313,119 @@ header.header {
316
313
  background-color: var(--primary-white);
317
314
  font: var(--font-regular);
318
315
  }
319
- header.header .header__end {
316
+ header.header.classic .header__end {
320
317
  display: flex;
321
318
  align-items: center;
322
319
  justify-content: flex-end;
323
320
  gap: 24px;
324
321
  min-width: 0;
325
322
  }
326
- header.header .user-control-actions {
323
+ header.header.classic .user-control-actions {
327
324
  display: flex;
328
325
  align-items: center;
329
326
  gap: 8px;
330
327
  flex-shrink: 0;
331
328
  }
332
- header.header .header__notifications {
329
+ header.header.classic .header__notifications {
330
+ position: relative;
331
+ display: flex;
332
+ align-items: center;
333
+ }
334
+ header.header.classic :deep(.notification-bell) {
335
+ position: relative;
336
+ width: 32px;
337
+ height: 32px;
338
+ padding: 0;
339
+ overflow: visible;
340
+ }
341
+ header.header.classic :deep(.notification-bell).notification-bell--active {
342
+ background: var(--grey-10, #f3f4f6);
343
+ }
344
+ header.header.classic .notification-bell__badge {
345
+ position: absolute;
346
+ top: 2px;
347
+ right: -4px;
348
+ min-width: 16px;
349
+ height: 16px;
350
+ padding: 0 4px;
351
+ border: 2px solid var(--primary-white, #fff);
352
+ border-radius: 8px;
353
+ background: #c84b31;
354
+ color: var(--primary-white, #fff);
355
+ font-size: 10px;
356
+ font-weight: 800;
357
+ line-height: 12px;
358
+ text-align: center;
359
+ box-sizing: border-box;
360
+ pointer-events: none;
361
+ }
362
+ header.header.classic .notification-bell__icon {
363
+ display: block;
364
+ flex-shrink: 0;
365
+ color: var(--grey-80, #374151);
366
+ transform-origin: 50% 20%;
367
+ }
368
+ header.header.classic .notification-bell__icon--shaking {
369
+ animation: bellShake 600ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
370
+ }
371
+ header.header.classic .logout-impersonate-user {
372
+ width: 32px;
373
+ height: 32px;
374
+ border-radius: 16px;
375
+ background: var(--purple-20);
376
+ display: flex;
377
+ align-items: center;
378
+ justify-content: center;
379
+ border: none;
380
+ cursor: pointer;
381
+ }
382
+ header.header.classic .logout-impersonate-user:hover {
383
+ background: var(--purple-30);
384
+ }
385
+ @media only screen and (width <= 960px) {
386
+ header.header.classic {
387
+ padding-left: 32px;
388
+ padding-right: 32px;
389
+ }
390
+ }
391
+ header.header.classic.sticky {
392
+ position: sticky;
393
+ }
394
+ header.header.beacon {
395
+ grid-area: navheader;
396
+ display: grid;
397
+ grid-auto-flow: column;
398
+ grid-template-columns: 1fr auto;
399
+ gap: 24px;
400
+ align-items: center;
401
+ padding: 12px 16px;
402
+ width: 100%;
403
+ background-color: #f7f7f7;
404
+ font: var(--font-regular);
405
+ border-bottom: 1px solid var(--grey-20, #e9e9e9);
406
+ }
407
+ header.header.beacon .user-control-actions {
408
+ display: flex;
409
+ align-items: center;
410
+ gap: 16px;
411
+ position: relative;
412
+ }
413
+ header.header.beacon .header__notifications {
333
414
  position: relative;
334
415
  display: flex;
335
416
  align-items: center;
336
417
  }
337
- header.header :deep(.notification-bell) {
418
+ header.header.beacon :deep(.notification-bell) {
338
419
  position: relative;
339
420
  width: 32px;
340
421
  height: 32px;
341
422
  padding: 0;
342
423
  overflow: visible;
343
424
  }
344
- header.header :deep(.notification-bell).notification-bell--active {
425
+ header.header.beacon :deep(.notification-bell).notification-bell--active {
345
426
  background: var(--grey-10, #f3f4f6);
346
427
  }
347
- header.header .notification-bell__badge {
428
+ header.header.beacon .notification-bell__badge {
348
429
  position: absolute;
349
430
  top: 2px;
350
431
  right: -4px;
@@ -362,16 +443,16 @@ header.header .notification-bell__badge {
362
443
  box-sizing: border-box;
363
444
  pointer-events: none;
364
445
  }
365
- header.header .notification-bell__icon {
446
+ header.header.beacon .notification-bell__icon {
366
447
  display: block;
367
448
  flex-shrink: 0;
368
449
  color: var(--grey-80, #374151);
369
450
  transform-origin: 50% 20%;
370
451
  }
371
- header.header .notification-bell__icon--shaking {
452
+ header.header.beacon .notification-bell__icon--shaking {
372
453
  animation: bellShake 600ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
373
454
  }
374
- header.header .logout-impersonate-user {
455
+ header.header.beacon .logout-impersonate-user {
375
456
  width: 32px;
376
457
  height: 32px;
377
458
  border-radius: 16px;
@@ -382,16 +463,16 @@ header.header .logout-impersonate-user {
382
463
  border: none;
383
464
  cursor: pointer;
384
465
  }
385
- header.header .logout-impersonate-user:hover {
466
+ header.header.beacon .logout-impersonate-user:hover {
386
467
  background: var(--purple-30);
387
468
  }
388
469
  @media only screen and (width <= 960px) {
389
- header.header {
470
+ header.header.beacon {
390
471
  padding-left: 32px;
391
472
  padding-right: 32px;
392
473
  }
393
474
  }
394
- header.header.sticky {
475
+ header.header.beacon.sticky {
395
476
  position: sticky;
396
477
  }
397
478
 
@@ -29,23 +29,7 @@ type __VLS_Slots = {} & {
29
29
  } & {
30
30
  notifications?: (props: typeof __VLS_17) => any;
31
31
  };
32
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
- "selected-option": (...args: any[]) => void;
34
- "user-logout": (...args: any[]) => void;
35
- "update:notifications": (...args: any[]) => void;
36
- "notifications-clear-all": (...args: any[]) => void;
37
- "notifications-dismiss": (...args: any[]) => void;
38
- "notifications-select": (...args: any[]) => void;
39
- "notification-click": (...args: any[]) => void;
40
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
41
- "onSelected-option"?: ((...args: any[]) => any) | undefined;
42
- "onUser-logout"?: ((...args: any[]) => any) | undefined;
43
- "onUpdate:notifications"?: ((...args: any[]) => any) | undefined;
44
- "onNotifications-clear-all"?: ((...args: any[]) => any) | undefined;
45
- "onNotifications-dismiss"?: ((...args: any[]) => any) | undefined;
46
- "onNotifications-select"?: ((...args: any[]) => any) | undefined;
47
- "onNotification-click"?: ((...args: any[]) => any) | undefined;
48
- }>, {
32
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
49
33
  notifications: INotificationsHeaderModel | null;
50
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
35
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;