@ttt-productions/notification-core 0.13.0 → 0.14.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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/react/components/NotificationHistoryList.d.ts +9 -0
- package/dist/react/components/NotificationHistoryList.d.ts.map +1 -0
- package/dist/react/components/NotificationHistoryList.js +41 -0
- package/dist/react/components/NotificationHistoryList.js.map +1 -0
- package/dist/react/components/index.d.ts +1 -0
- package/dist/react/components/index.d.ts.map +1 -1
- package/dist/react/components/index.js +1 -0
- package/dist/react/components/index.js.map +1 -1
- package/dist/react/hooks/index.d.ts +1 -0
- package/dist/react/hooks/index.d.ts.map +1 -1
- package/dist/react/hooks/index.js +1 -0
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/hooks/useNotificationHistory.d.ts +17 -0
- package/dist/react/hooks/useNotificationHistory.d.ts.map +1 -0
- package/dist/react/hooks/useNotificationHistory.js +46 -0
- package/dist/react/hooks/useNotificationHistory.js.map +1 -0
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -2
- package/dist/react/index.js.map +1 -1
- package/dist/types.d.ts +36 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { NotificationDoc, PendingNotification, NotificationCategoryConfig, NotificationTypeConfig, NotificationSystemConfig, UseActiveNotificationsOptions, UseUnreadCountOptions, UseArchiveNotificationOptions, UseArchiveAllNotificationsOptions, ArchiveAllJobStatus, EnqueueArchiveAllResult, ArchiveAllJobSnapshot, ArchiveAllPollResult, NotificationListProps, NotificationEmptyStateProps, NotificationUnreadBadgeProps, } from './types.js';
|
|
1
|
+
export type { NotificationDoc, PendingNotification, NotificationCategoryConfig, NotificationTypeConfig, NotificationSystemConfig, UseActiveNotificationsOptions, UseNotificationHistoryOptions, NotificationHistoryItem, UseUnreadCountOptions, UseArchiveNotificationOptions, UseArchiveAllNotificationsOptions, ArchiveAllJobStatus, EnqueueArchiveAllResult, ArchiveAllJobSnapshot, ArchiveAllPollResult, NotificationListProps, NotificationHistoryListProps, NotificationEmptyStateProps, NotificationUnreadBadgeProps, } from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationHistoryListProps } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Read-only, paginated list of ARCHIVED notifications (the history tier). Rows do
|
|
4
|
+
* not mutate state on click — archive is one-way; there is no re-archive. When
|
|
5
|
+
* `onNotificationClick` is supplied, rows are interactive (e.g. navigate to
|
|
6
|
+
* `targetPath`); otherwise they render non-interactive.
|
|
7
|
+
*/
|
|
8
|
+
export declare function NotificationHistoryList({ config, userId, category, onNotificationClick, pageSize, staleTime, emptyText, }: NotificationHistoryListProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=NotificationHistoryList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationHistoryList.d.ts","sourceRoot":"","sources":["../../../src/react/components/NotificationHistoryList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAA2B,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAE5F;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,SAAS,GACV,EAAE,4BAA4B,+BA8E9B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { Badge, Button } from '@ttt-productions/ui-core/react';
|
|
5
|
+
import { useNotificationHistory } from '../hooks/useNotificationHistory.js';
|
|
6
|
+
import { NotificationEmptyState } from './NotificationEmptyState.js';
|
|
7
|
+
import { formatRelativeTime } from './relative-time.js';
|
|
8
|
+
/**
|
|
9
|
+
* Read-only, paginated list of ARCHIVED notifications (the history tier). Rows do
|
|
10
|
+
* not mutate state on click — archive is one-way; there is no re-archive. When
|
|
11
|
+
* `onNotificationClick` is supplied, rows are interactive (e.g. navigate to
|
|
12
|
+
* `targetPath`); otherwise they render non-interactive.
|
|
13
|
+
*/
|
|
14
|
+
export function NotificationHistoryList({ config, userId, category, onNotificationClick, pageSize, staleTime, emptyText, }) {
|
|
15
|
+
const { data: notifications, isLoading, hasNextPage, nextPage, } = useNotificationHistory({
|
|
16
|
+
config,
|
|
17
|
+
userId,
|
|
18
|
+
category,
|
|
19
|
+
pageSize,
|
|
20
|
+
staleTime,
|
|
21
|
+
});
|
|
22
|
+
const getTypeIcon = useCallback((type) => config.types[type]?.icon ?? '🔔', [config]);
|
|
23
|
+
const interactive = typeof onNotificationClick === 'function';
|
|
24
|
+
return (_jsx("div", { className: "ntf-list ntf-list-history", children: _jsx("div", { className: "ntf-list-body", children: isLoading ? (_jsx("div", { className: "ntf-loading", children: "Loading..." })) : !notifications || notifications.length === 0 ? (_jsx(NotificationEmptyState, { text: emptyText })) : (_jsxs(_Fragment, { children: [notifications.map((notification) => {
|
|
25
|
+
const interactiveProps = interactive
|
|
26
|
+
? {
|
|
27
|
+
role: 'button',
|
|
28
|
+
tabIndex: 0,
|
|
29
|
+
onClick: () => onNotificationClick?.(notification),
|
|
30
|
+
onKeyDown: (e) => {
|
|
31
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
onNotificationClick?.(notification);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
: {};
|
|
38
|
+
return (_jsxs("div", { className: "ntf-item ntf-item-archived", ...interactiveProps, children: [_jsx("div", { className: "ntf-item-icon", children: getTypeIcon(notification.type) }), _jsxs("div", { className: "ntf-item-content", children: [_jsx("div", { className: "ntf-item-title", children: notification.title }), _jsx("div", { className: "ntf-item-message", children: notification.message }), _jsx("div", { className: "ntf-item-timestamp", children: formatRelativeTime(notification.archivedAt) })] }), notification.count > 1 && (_jsx("div", { className: "ntf-item-count", children: _jsxs(Badge, { variant: "secondary", children: ["\u00D7", notification.count] }) }))] }, notification.archiveOccurrenceId));
|
|
39
|
+
}), hasNextPage && (_jsx("div", { className: "ntf-list-footer", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: nextPage, children: "Load more" }) }))] })) }) }));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=NotificationHistoryList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationHistoryList.js","sourceRoot":"","sources":["../../../src/react/components/NotificationHistoryList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,SAAS,GACoB;IAC7B,MAAM,EACJ,IAAI,EAAE,aAAa,EACnB,SAAS,EACT,WAAW,EACX,QAAQ,GACT,GAAG,sBAAsB,CAAC;QACzB,MAAM;QACN,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,SAAS;KACV,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,IAAI,EAClD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,WAAW,GAAG,OAAO,mBAAmB,KAAK,UAAU,CAAC;IAE9D,OAAO,CACL,cAAK,SAAS,EAAC,2BAA2B,YACxC,cAAK,SAAS,EAAC,eAAe,YAC3B,SAAS,CAAC,CAAC,CAAC,CACX,cAAK,SAAS,EAAC,aAAa,2BAAiB,CAC9C,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACjD,KAAC,sBAAsB,IAAC,IAAI,EAAE,SAAS,GAAI,CAC5C,CAAC,CAAC,CAAC,CACF,8BACG,aAAa,CA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,EAAE,QAAQ,0BAE1C,GACL,CACP,IACA,CACJ,GACG,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { NotificationList } from './NotificationList.js';
|
|
2
|
+
export { NotificationHistoryList } from './NotificationHistoryList.js';
|
|
2
3
|
export { NotificationEmptyState } from './NotificationEmptyState.js';
|
|
3
4
|
export { NotificationUnreadBadge } from './NotificationUnreadBadge.js';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { NotificationList } from './NotificationList.js';
|
|
2
|
+
export { NotificationHistoryList } from './NotificationHistoryList.js';
|
|
2
3
|
export { NotificationEmptyState } from './NotificationEmptyState.js';
|
|
3
4
|
export { NotificationUnreadBadge } from './NotificationUnreadBadge.js';
|
|
4
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { useActiveNotifications } from './useActiveNotifications.js';
|
|
2
|
+
export { useNotificationHistory } from './useNotificationHistory.js';
|
|
2
3
|
export { useUnreadCount } from './useUnreadCount.js';
|
|
3
4
|
export { useArchiveNotification } from './useArchiveNotification.js';
|
|
4
5
|
export { useArchiveAllNotifications } from './useArchiveAllNotifications.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { useActiveNotifications } from './useActiveNotifications.js';
|
|
2
|
+
export { useNotificationHistory } from './useNotificationHistory.js';
|
|
2
3
|
export { useUnreadCount } from './useUnreadCount.js';
|
|
3
4
|
export { useArchiveNotification } from './useArchiveNotification.js';
|
|
4
5
|
export { useArchiveAllNotifications } from './useArchiveAllNotifications.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NotificationHistoryItem, UseNotificationHistoryOptions } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Paginated read of ARCHIVED notification history (the two-tier system's history
|
|
4
|
+
* tier). Personal history lives under a per-user path
|
|
5
|
+
* (`userProfiles/{uid}/notificationHistory`) and shared/admin history under a
|
|
6
|
+
* top-level collection (`adminNotificationHistory`) — both resolved from the
|
|
7
|
+
* category's `historyPath`, so no `where` clause is needed either way. Rows are
|
|
8
|
+
* immutable and ordered newest-first by `archivedAt`.
|
|
9
|
+
*
|
|
10
|
+
* Each history doc is a wrapper (`archivedSnapshot` + archive metadata + a
|
|
11
|
+
* native-TTL `expireAt`); the `select` mapper flattens it into a
|
|
12
|
+
* {@link NotificationHistoryItem} so the read surface renders like the active
|
|
13
|
+
* list. Owner-only (user) / admin-only (admin) reads are enforced by Firestore
|
|
14
|
+
* rules — this hook performs no writes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useNotificationHistory({ config, userId, category, enabled, pageSize, staleTime, }: UseNotificationHistoryOptions): import("@ttt-productions/query-core/react").UseFirestorePaginatedResult<NotificationHistoryItem>;
|
|
17
|
+
//# sourceMappingURL=useNotificationHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNotificationHistory.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/useNotificationHistory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,gBAAgB,CAAC;AAKxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAc,EACd,QAA4B,EAC5B,SAA8B,GAC/B,EAAE,6BAA6B,oGA4B/B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useFirestorePaginated } from '@ttt-productions/query-core/react';
|
|
3
|
+
import { orderBy } from 'firebase/firestore';
|
|
4
|
+
const DEFAULT_PAGE_SIZE = 20;
|
|
5
|
+
const DEFAULT_STALE_TIME = 60_000;
|
|
6
|
+
/**
|
|
7
|
+
* Paginated read of ARCHIVED notification history (the two-tier system's history
|
|
8
|
+
* tier). Personal history lives under a per-user path
|
|
9
|
+
* (`userProfiles/{uid}/notificationHistory`) and shared/admin history under a
|
|
10
|
+
* top-level collection (`adminNotificationHistory`) — both resolved from the
|
|
11
|
+
* category's `historyPath`, so no `where` clause is needed either way. Rows are
|
|
12
|
+
* immutable and ordered newest-first by `archivedAt`.
|
|
13
|
+
*
|
|
14
|
+
* Each history doc is a wrapper (`archivedSnapshot` + archive metadata + a
|
|
15
|
+
* native-TTL `expireAt`); the `select` mapper flattens it into a
|
|
16
|
+
* {@link NotificationHistoryItem} so the read surface renders like the active
|
|
17
|
+
* list. Owner-only (user) / admin-only (admin) reads are enforced by Firestore
|
|
18
|
+
* rules — this hook performs no writes.
|
|
19
|
+
*/
|
|
20
|
+
export function useNotificationHistory({ config, userId, category, enabled = true, pageSize = DEFAULT_PAGE_SIZE, staleTime = DEFAULT_STALE_TIME, }) {
|
|
21
|
+
const categoryConfig = config.categories[category];
|
|
22
|
+
if (!categoryConfig) {
|
|
23
|
+
throw new Error(`[notification-core] Unknown category: ${category}`);
|
|
24
|
+
}
|
|
25
|
+
const collectionPath = categoryConfig.historyPath(userId);
|
|
26
|
+
const constraints = [orderBy('archivedAt', 'desc')];
|
|
27
|
+
return useFirestorePaginated({
|
|
28
|
+
collectionPath,
|
|
29
|
+
queryKey: ['notifications', 'history', category, userId, { pageSize }],
|
|
30
|
+
constraints,
|
|
31
|
+
pageSize,
|
|
32
|
+
enabled: enabled && !!userId,
|
|
33
|
+
staleTime,
|
|
34
|
+
select: (data) => {
|
|
35
|
+
const snapshot = (data.archivedSnapshot ?? {});
|
|
36
|
+
return {
|
|
37
|
+
...snapshot,
|
|
38
|
+
// The archive occurrence id is the stable history-doc key; expose
|
|
39
|
+
// archivedAt for ordering/display.
|
|
40
|
+
archiveOccurrenceId: data.id,
|
|
41
|
+
archivedAt: data.archivedAt ?? snapshot.updatedAt ?? 0,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=useNotificationHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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5B,UAAU,EAAG,IAAI,CAAC,UAAiC,IAAI,QAAQ,CAAC,SAAS,IAAI,CAAC;aAC/E,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { useActiveNotifications, useUnreadCount, useArchiveNotification, useArchiveAllNotifications, } from './hooks/index.js';
|
|
2
|
-
export { NotificationList, NotificationEmptyState, NotificationUnreadBadge, } from './components/index.js';
|
|
1
|
+
export { useActiveNotifications, useNotificationHistory, useUnreadCount, useArchiveNotification, useArchiveAllNotifications, } from './hooks/index.js';
|
|
2
|
+
export { NotificationList, NotificationHistoryList, NotificationEmptyState, NotificationUnreadBadge, } from './components/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
// Hooks
|
|
3
|
-
export { useActiveNotifications, useUnreadCount, useArchiveNotification, useArchiveAllNotifications, } from './hooks/index.js';
|
|
3
|
+
export { useActiveNotifications, useNotificationHistory, useUnreadCount, useArchiveNotification, useArchiveAllNotifications, } from './hooks/index.js';
|
|
4
4
|
// Components
|
|
5
|
-
export { NotificationList, NotificationEmptyState, NotificationUnreadBadge, } from './components/index.js';
|
|
5
|
+
export { NotificationList, NotificationHistoryList, NotificationEmptyState, NotificationUnreadBadge, } from './components/index.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,QAAQ;AACR,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,aAAa;AACb,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,QAAQ;AACR,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,aAAa;AACb,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -147,6 +147,28 @@ export interface UseActiveNotificationsOptions {
|
|
|
147
147
|
pageSize?: number;
|
|
148
148
|
refetchInterval?: number;
|
|
149
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* A flattened archived-history item for the read surface. The history doc is a
|
|
152
|
+
* wrapper (`archivedSnapshot` + archive metadata + TTL); this shape lifts the
|
|
153
|
+
* snapshot's display fields to the top level so the history list renders exactly
|
|
154
|
+
* like the active list, plus `archivedAt` for ordering/display and
|
|
155
|
+
* `archiveOccurrenceId` as the stable React key.
|
|
156
|
+
*/
|
|
157
|
+
export interface NotificationHistoryItem extends NotificationDoc {
|
|
158
|
+
/** The history doc id (stable key — the `archiveOccurrenceId`). */
|
|
159
|
+
archiveOccurrenceId: string;
|
|
160
|
+
/** Epoch ms the notification was archived (history docs order by this). */
|
|
161
|
+
archivedAt: number;
|
|
162
|
+
}
|
|
163
|
+
export interface UseNotificationHistoryOptions {
|
|
164
|
+
config: NotificationSystemConfig;
|
|
165
|
+
userId: string;
|
|
166
|
+
category: string;
|
|
167
|
+
enabled?: boolean;
|
|
168
|
+
pageSize?: number;
|
|
169
|
+
/** Read-freshness stale time in ms (archived rows are immutable; default 60s). */
|
|
170
|
+
staleTime?: number;
|
|
171
|
+
}
|
|
150
172
|
export interface UseUnreadCountOptions {
|
|
151
173
|
config: NotificationSystemConfig;
|
|
152
174
|
userId: string;
|
|
@@ -269,6 +291,20 @@ export interface NotificationListProps {
|
|
|
269
291
|
refetchInterval?: number;
|
|
270
292
|
emptyText?: string;
|
|
271
293
|
}
|
|
294
|
+
export interface NotificationHistoryListProps {
|
|
295
|
+
config: NotificationSystemConfig;
|
|
296
|
+
userId: string;
|
|
297
|
+
category: string;
|
|
298
|
+
/**
|
|
299
|
+
* Optional click handler for an archived row (e.g. navigate to `targetPath`).
|
|
300
|
+
* Archived rows are read-only — there is no re-archive; the row does not mutate
|
|
301
|
+
* state on click. Omit to render non-interactive rows.
|
|
302
|
+
*/
|
|
303
|
+
onNotificationClick?: (notification: NotificationHistoryItem) => void;
|
|
304
|
+
pageSize?: number;
|
|
305
|
+
staleTime?: number;
|
|
306
|
+
emptyText?: string;
|
|
307
|
+
}
|
|
272
308
|
export interface NotificationEmptyStateProps {
|
|
273
309
|
text?: string;
|
|
274
310
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA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AC,uBAAuB,CAAC,CAAC;IAC5E;;;;OAIG;IACH,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACzE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,wBAAwB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,wBAAwB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttt-productions/notification-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Shared notification system for TTT Productions apps — active/history two-tier architecture with dedup, batch processing, and themed UI components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|