@trycourier/courier-ui-inbox 2.4.9 → 2.5.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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types/inbox-data-set.d.ts +5 -0
- package/package.json +2 -3
package/dist/index.mjs
CHANGED
|
@@ -324,7 +324,8 @@ class CourierInboxDataset {
|
|
|
324
324
|
this._filter = {
|
|
325
325
|
tags: filter.tags ? [...filter.tags] : void 0,
|
|
326
326
|
archived: filter.archived || false,
|
|
327
|
-
status: filter.status
|
|
327
|
+
status: filter.status,
|
|
328
|
+
from: filter.from
|
|
328
329
|
};
|
|
329
330
|
}
|
|
330
331
|
/** Get the current total unread count. */
|
|
@@ -355,7 +356,8 @@ class CourierInboxDataset {
|
|
|
355
356
|
return {
|
|
356
357
|
tags: this._filter.tags,
|
|
357
358
|
archived: this._filter.archived,
|
|
358
|
-
status: this._filter.status
|
|
359
|
+
status: this._filter.status,
|
|
360
|
+
from: this._filter.from
|
|
359
361
|
};
|
|
360
362
|
}
|
|
361
363
|
/**
|
|
@@ -586,6 +588,9 @@ class CourierInboxDataset {
|
|
|
586
588
|
if (message.read && this._filter.status === "unread" || !message.read && this._filter.status === "read") {
|
|
587
589
|
return false;
|
|
588
590
|
}
|
|
591
|
+
if (this._filter.from && message.created && new Date(message.created).getTime() < new Date(this._filter.from).getTime()) {
|
|
592
|
+
return false;
|
|
593
|
+
}
|
|
589
594
|
if (this._filter.tags && !message.tags) {
|
|
590
595
|
return false;
|
|
591
596
|
}
|
|
@@ -6128,7 +6133,7 @@ class CourierInboxDatastoreEvents {
|
|
|
6128
6133
|
}
|
|
6129
6134
|
}
|
|
6130
6135
|
Courier.shared.courierUserAgentName = "courier-ui-inbox";
|
|
6131
|
-
Courier.shared.courierUserAgentVersion = "2.
|
|
6136
|
+
Courier.shared.courierUserAgentVersion = "2.5.0";
|
|
6132
6137
|
export {
|
|
6133
6138
|
Courier2 as Courier,
|
|
6134
6139
|
CourierInbox,
|