@apptegy/nuxt-navigation 0.1.105 → 0.1.106
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
|
@@ -10,8 +10,8 @@ export interface INotificationApiRecord {
|
|
|
10
10
|
source_record_type: string;
|
|
11
11
|
title: string;
|
|
12
12
|
summary?: string;
|
|
13
|
-
actors
|
|
14
|
-
detail_link?: string;
|
|
13
|
+
actors?: INotificationApiActor[] | null;
|
|
14
|
+
detail_link?: string | null;
|
|
15
15
|
notification_state: NotificationApiState | string;
|
|
16
16
|
created_at: string;
|
|
17
17
|
}
|
|
@@ -20,7 +20,8 @@ export const DEFAULT_NOTIFICATION_TABS = [
|
|
|
20
20
|
{ id: "all", label: "All" }
|
|
21
21
|
];
|
|
22
22
|
export function mapSourceRecordType(sourceRecordType) {
|
|
23
|
-
|
|
23
|
+
const normalizedSourceRecordType = sourceRecordType.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
24
|
+
return SOURCE_RECORD_TYPE_MAP[normalizedSourceRecordType] ?? "unknown";
|
|
24
25
|
}
|
|
25
26
|
export function mapNotificationApiActor(actor) {
|
|
26
27
|
const name = [actor.first_name, actor.last_name].filter(Boolean).join(" ").trim();
|
|
@@ -34,14 +35,14 @@ export function mapNotificationApiRecord(record, options) {
|
|
|
34
35
|
return {
|
|
35
36
|
id: String(record.id),
|
|
36
37
|
type: mapSourceRecordType(record.source_record_type),
|
|
37
|
-
actors: record.actors.map(mapNotificationApiActor),
|
|
38
|
+
actors: (record.actors ?? []).map(mapNotificationApiActor),
|
|
38
39
|
actionText: record.title,
|
|
39
40
|
timestampLabel: formatNotificationTimeAgo(record.created_at, {
|
|
40
41
|
locale: options.locale,
|
|
41
42
|
now: options.now,
|
|
42
43
|
labels: {
|
|
43
44
|
justNow: options.dateLabels.justNow,
|
|
44
|
-
|
|
45
|
+
yesterdayTimeAgo: options.dateLabels.yesterdayTimeAgo
|
|
45
46
|
}
|
|
46
47
|
}),
|
|
47
48
|
createdAt: record.created_at,
|
|
@@ -49,7 +50,7 @@ export function mapNotificationApiRecord(record, options) {
|
|
|
49
50
|
dismissed: state === "dismissed",
|
|
50
51
|
read: state === "read",
|
|
51
52
|
unread: state === "unread",
|
|
52
|
-
href: record.detail_link
|
|
53
|
+
href: record.detail_link ?? void 0
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
export function groupNotificationItems(items, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apptegy/nuxt-navigation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.106",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -35,19 +35,20 @@
|
|
|
35
35
|
"primevue": "^4.2.5"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@nuxt/devtools": "
|
|
39
|
-
"@nuxt/eslint-config": "
|
|
40
|
-
"@nuxt/module-builder": "
|
|
41
|
-
"@nuxt/schema": "
|
|
42
|
-
"@nuxt/test-utils": "
|
|
43
|
-
"@types/node": "
|
|
44
|
-
"eslint": "
|
|
45
|
-
"nuxt": "
|
|
38
|
+
"@nuxt/devtools": "^2.6.2",
|
|
39
|
+
"@nuxt/eslint-config": "^1.6.0",
|
|
40
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
41
|
+
"@nuxt/schema": "^3.17.0",
|
|
42
|
+
"@nuxt/test-utils": "^3.17.0",
|
|
43
|
+
"@types/node": "^22.0.0",
|
|
44
|
+
"eslint": "^9.31.0",
|
|
45
|
+
"nuxt": "^3.17.0",
|
|
46
46
|
"primevue": "^4.5.4",
|
|
47
|
-
"sass": "
|
|
48
|
-
"typescript": "
|
|
49
|
-
"vitest": "
|
|
50
|
-
"vue": "
|
|
51
|
-
"vue-tsc": "
|
|
52
|
-
}
|
|
47
|
+
"sass": "^1.89.2",
|
|
48
|
+
"typescript": "~5.8.0",
|
|
49
|
+
"vitest": "^3.2.4",
|
|
50
|
+
"vue": "^3.5.13",
|
|
51
|
+
"vue-tsc": "^3.0.3"
|
|
52
|
+
},
|
|
53
|
+
"gitHead": "4a69cd943d4e30d94b74f25311ea5b627a4fd568"
|
|
53
54
|
}
|