@apptegy/nuxt-navigation 0.1.125 → 0.1.127

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.1.127",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.1",
10
10
  "unbuild": "unknown"
@@ -216,6 +216,9 @@ function patchNotifications(patch) {
216
216
  }
217
217
  emit("update:notifications", {
218
218
  ...props.notifications,
219
+ panelOpen: panelOpen.value,
220
+ activeTabId: activeTabId.value,
221
+ activeFilterId: activeFilterId.value,
219
222
  ...patch
220
223
  });
221
224
  }
@@ -12,4 +12,4 @@ export interface IUser {
12
12
  client: string;
13
13
  admin_email: string;
14
14
  }
15
- export type { NotificationType, NotificationApiState, INotificationApiActor, INotificationApiRoom, INotificationApiRecord, INotificationsPagination, INotificationsApiResponse, INotificationActor, INotificationItem, INotificationGroup, INotificationTab, INotificationFilter, INotificationsPanelData, INotificationsHeaderModel, } from './notifications.js';
15
+ export type { NotificationType, NotificationApiState, INotificationApiActor, INotificationApiDetailObject, INotificationApiRecord, INotificationsPagination, INotificationsApiResponse, INotificationActor, INotificationItem, INotificationGroup, INotificationTab, INotificationFilter, INotificationsPanelData, INotificationsHeaderModel, } from './notifications.js';
@@ -5,10 +5,14 @@ export interface INotificationApiActor {
5
5
  first_name: string;
6
6
  last_name: string;
7
7
  }
8
- export interface INotificationApiRoom {
9
- id?: string;
10
- sis_id?: string;
11
- name: string;
8
+ export interface INotificationApiDetailObject {
9
+ resource_type?: string | null;
10
+ resource_id?: string | null;
11
+ parent_type?: string | null;
12
+ parent_id?: string | null;
13
+ /** Parent display name (e.g. course/room); shown in the meta line. */
14
+ parent_name?: string | null;
15
+ ward_ids?: string[] | null;
12
16
  }
13
17
  export interface INotificationApiRecord {
14
18
  id: number | string;
@@ -26,8 +30,8 @@ export interface INotificationApiRecord {
26
30
  * When present, corresponding emojis are shown beside the summary.
27
31
  */
28
32
  reaction_counts?: Record<string, number> | null;
29
- /** Room associated with the notification; `name` is shown in the meta line. */
30
- room?: INotificationApiRoom | null;
33
+ /** Navigation/context payload; `parent_name` is shown in the meta line. */
34
+ detail_object?: INotificationApiDetailObject | null;
31
35
  actors?: INotificationApiActor[] | null;
32
36
  detail_link?: string | null;
33
37
  notification_state: NotificationApiState | string;
@@ -71,7 +75,7 @@ export interface INotificationItem {
71
75
  * Derived from API `last_activity_at`, falling back to `created_at`.
72
76
  */
73
77
  createdAt?: string;
74
- /** Room name shown after the relative timestamp (e.g. "Staff Lounge"). */
78
+ /** Parent name shown after the relative timestamp (e.g. "Algebra I"). */
75
79
  contextLabel?: string;
76
80
  /** Post/body preview shown in the card summary row. */
77
81
  summary?: string;
@@ -100,7 +100,7 @@ export function mapNotificationApiRecord(record, options) {
100
100
  }
101
101
  }),
102
102
  createdAt: activityAt,
103
- contextLabel: record.room?.name?.trim() || void 0,
103
+ contextLabel: record.detail_object?.parent_name?.trim() || void 0,
104
104
  summary,
105
105
  reactionEmojis: reactionEmojis.length > 0 ? reactionEmojis : void 0,
106
106
  dismissed: state === "dismissed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.125",
3
+ "version": "0.1.127",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {