web-push-notifications 3.91.1 → 3.95.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/CHANGELOG.md +85 -0
- package/core/Pushwoosh.d.ts +13 -0
- package/core/__tests__/loadWebPopupsWidget.test.d.ts +1 -0
- package/core/__tests__/reportPushPermissionChange.test.d.ts +1 -0
- package/core/__tests__/settlesWithin.test.d.ts +1 -0
- package/core/constants.d.ts +3 -0
- package/core/events.types.d.ts +3 -0
- package/core/functions.d.ts +2 -0
- package/core/resolveInitParams.d.ts +9 -1
- package/modules/Api/Api.d.ts +10 -1
- package/modules/ApiClient/ApiClient.types.d.ts +8 -2
- package/modules/Data/Data.d.ts +5 -0
- package/modules/FeatureFlags/FeatureFlag.d.ts +12 -0
- package/modules/FeatureFlags/FeatureFlags.d.ts +57 -0
- package/modules/FeatureFlags/FeatureFlags.types.d.ts +19 -0
- package/modules/FeatureFlags/__tests__/FeatureFlags.test.d.ts +1 -0
- package/modules/FeatureFlags/featureFlagsUrl.d.ts +1 -0
- package/modules/InboxMessagesPublic.d.ts +3 -1
- package/npm.js +1 -1
- package/npm.js.map +1 -1
- package/package.json +1 -1
- package/service-worker.js +1 -1
- package/service-worker.js.map +1 -1
- package/services/PushService/__tests__/pushPermissionStatus.test.d.ts +1 -0
- package/services/PushService/pushPermissionStatus.d.ts +3 -0
- package/widget-inbox.js +1 -1
- package/widget-inbox.js.map +1 -1
- package/widget-subscription-button.js.map +1 -1
- package/widget-web-popups.js +1 -1
- package/widget-web-popups.js.map +1 -1
- package/widgets/WebPopups/WebPopupsWidget.d.ts +6 -2
- package/widgets/WebPopups/__tests__/WebPopupsWidget.test.d.ts +1 -0
- package/widgets/WebPopups/types.d.ts +2 -0
|
@@ -5,6 +5,8 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
|
|
|
5
5
|
private isRecurringVisitor;
|
|
6
6
|
/** Every popup the server returned, keyed by code. Never pruned. */
|
|
7
7
|
private readonly entries;
|
|
8
|
+
/** Contents shown by their own code, outside of any campaign; never auto-displayed. */
|
|
9
|
+
private readonly contentEntries;
|
|
8
10
|
/** Codes whose delay has elapsed, waiting for the display slot. */
|
|
9
11
|
private readonly queue;
|
|
10
12
|
/** The single popup on screen, if any. */
|
|
@@ -26,8 +28,8 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
|
|
|
26
28
|
* rules, device_type, visitors_type, frequency capping and trigger_type.
|
|
27
29
|
* An already visible popup is closed to make room.
|
|
28
30
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
+
* `code` is a campaign code or, failing that, a content code, which records no stats or frequency.
|
|
32
|
+
* Never rejects: resolves false and logs the reason on failure.
|
|
31
33
|
*/
|
|
32
34
|
show(code: string): Promise<boolean>;
|
|
33
35
|
/**
|
|
@@ -44,6 +46,8 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
|
|
|
44
46
|
getVisibleCode(): string | null;
|
|
45
47
|
getAvailableCodes(): Array<string>;
|
|
46
48
|
getState(): WebPopupsPublicState;
|
|
49
|
+
private createEntry;
|
|
50
|
+
private getContentEntry;
|
|
47
51
|
/**
|
|
48
52
|
* Resolve the entry's renderable content, fetching it at most once. A failed
|
|
49
53
|
* fetch clears the memo so a later show() can retry.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -46,6 +46,8 @@ export type WebPopup = {
|
|
|
46
46
|
export type WebPopupEntryState = 'idle' | 'waiting' | 'queued' | 'visible' | 'done';
|
|
47
47
|
/** Everything the widget knows about one popup, for the whole page load. */
|
|
48
48
|
export type WebPopupEntry = {
|
|
49
|
+
/** 'content': a bare popup content code opened via show(), e.g. from the inbox; no campaign behind it. */
|
|
50
|
+
kind: 'campaign' | 'content';
|
|
49
51
|
popup: WebPopup;
|
|
50
52
|
/** Index in the server response — the ordering tiebreaker after `delay`. */
|
|
51
53
|
order: number;
|