@trycourier/courier-ui-inbox 2.4.1 → 2.4.2
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/components/courier-inbox-popup-menu.d.ts +1 -0
- package/dist/datastore/inbox-datastore.d.ts +12 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +120 -25
- package/dist/index.mjs.map +1 -1
- package/dist/utils/extensions.d.ts +1 -1
- package/package.json +2 -2
|
@@ -38,6 +38,7 @@ export declare class CourierInboxPopupMenu extends CourierBaseElement implements
|
|
|
38
38
|
private _style?;
|
|
39
39
|
private _datastoreListener?;
|
|
40
40
|
private _totalUnreadCount;
|
|
41
|
+
private _feeds?;
|
|
41
42
|
private _popupMenuButtonFactory?;
|
|
42
43
|
static get observedAttributes(): string[];
|
|
43
44
|
constructor();
|
|
@@ -11,10 +11,14 @@ import { CourierInboxDataStoreListener } from './datastore-listener';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class CourierInboxDatastore {
|
|
13
13
|
private static readonly TAG;
|
|
14
|
+
private static readonly OPEN_BATCH_DELAY_MS;
|
|
15
|
+
private static readonly OPEN_BATCH_MAX_SIZE;
|
|
14
16
|
private static instance;
|
|
15
17
|
private _datasets;
|
|
16
18
|
private _listeners;
|
|
17
19
|
private _removeMessageEventListener?;
|
|
20
|
+
private _pendingOpenMessageIds;
|
|
21
|
+
private _openBatchTimer;
|
|
18
22
|
/**
|
|
19
23
|
* Global message store is a map of Message ID to Message for all messages
|
|
20
24
|
* that have been loaded.
|
|
@@ -83,11 +87,18 @@ export declare class CourierInboxDatastore {
|
|
|
83
87
|
}): Promise<void>;
|
|
84
88
|
/**
|
|
85
89
|
* Mark a message as opened.
|
|
90
|
+
*
|
|
91
|
+
* The local state is updated optimistically and the server call is
|
|
92
|
+
* batched: multiple opens arriving within a short window
|
|
93
|
+
* are collected and flushed as a single GraphQL request.
|
|
94
|
+
*
|
|
86
95
|
* @param message - The message to mark as opened
|
|
87
96
|
*/
|
|
88
97
|
openMessage({ message }: {
|
|
89
98
|
message: InboxMessage;
|
|
90
|
-
}):
|
|
99
|
+
}): void;
|
|
100
|
+
private scheduleBatchOpen;
|
|
101
|
+
private flushBatchOpen;
|
|
91
102
|
/**
|
|
92
103
|
* Unarchive a message.
|
|
93
104
|
* @param message - The message to unarchive
|