web-push-notifications 3.65.0 → 3.67.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/modules/Api/Api.d.ts +3 -1
- package/npm.js +1 -1
- package/npm.js.map +1 -1
- package/package.json +2 -2
- package/service-worker.js +1 -1
- package/service-worker.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 +3 -0
- package/widgets/WebPopups/deviceSubmitApi.d.ts +4 -0
- package/widgets/WebPopups/renderer.d.ts +7 -9
- package/pushwoosh-web-notifications.d.ts +0 -1
- package/pushwoosh-widget-inbox.d.ts +0 -1
- package/pushwoosh-widget-subscribe-popup.d.ts +0 -1
- package/pushwoosh-widget-subscription-button.d.ts +0 -1
- package/pushwoosh-widget-subscription-prompt.d.ts +0 -1
- package/pushwoosh-widget-web-popups.d.ts +0 -1
|
@@ -14,6 +14,8 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
|
|
|
14
14
|
private isNavigationSubscribed;
|
|
15
15
|
private openPopupsCount;
|
|
16
16
|
private bodyOverflowBeforeLock;
|
|
17
|
+
/** Built once from `pw`: the device-API side of the choice/rating slots. */
|
|
18
|
+
private readonly submitHandlers;
|
|
17
19
|
private readyResolve;
|
|
18
20
|
private readonly readyPromise;
|
|
19
21
|
constructor(pw: Pushwoosh);
|
|
@@ -77,6 +79,7 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
|
|
|
77
79
|
private subscribeToNavigation;
|
|
78
80
|
private checkStrongCondition;
|
|
79
81
|
private checkSoftCondition;
|
|
82
|
+
private checkNotExpired;
|
|
80
83
|
private checkCanBeShownByDeviceTypeCondition;
|
|
81
84
|
private checkCanBeShownByFrequencyCondition;
|
|
82
85
|
private checkCanBeShownByMatchingPagesCondition;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type WebPopupChoiceSubmitHandler, type WebPopupRatingSubmitHandler } from 'smart-blocks-utils';
|
|
2
|
+
import { type Pushwoosh } from '../../core/Pushwoosh';
|
|
3
|
+
export declare function createChoiceSubmitHandler(pw: Pushwoosh): WebPopupChoiceSubmitHandler;
|
|
4
|
+
export declare function createRatingSubmitHandler(pw: Pushwoosh): WebPopupRatingSubmitHandler;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { type WebPopupParams } from 'smart-blocks-utils';
|
|
1
|
+
import { type WebPopupChoiceSubmitHandler, type WebPopupParams, type WebPopupRatingSubmitHandler } from 'smart-blocks-utils';
|
|
2
|
+
/** The device-API handlers, passed in rather than imported: this module renders, it doesn't know the core. */
|
|
3
|
+
export type WebPopupSubmitHandlers = {
|
|
4
|
+
onSubmitChoice: WebPopupChoiceSubmitHandler;
|
|
5
|
+
onSubmitRating: WebPopupRatingSubmitHandler;
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
8
|
* Parse stored popup json into the renderable model. Returns null for
|
|
4
9
|
* anything that is not a supported {version: 1, params} popup with at least
|
|
@@ -6,14 +11,7 @@ import { type WebPopupParams } from 'smart-blocks-utils';
|
|
|
6
11
|
* field), which is deliberately unrenderable.
|
|
7
12
|
*/
|
|
8
13
|
export declare const parseWebPopupContent: (json: string) => WebPopupParams | null;
|
|
9
|
-
|
|
10
|
-
* Mount the popup into the shadow-root container. The reader draws the whole
|
|
11
|
-
* chrome itself: page-dim overlay (click closes), fixed viewport placement,
|
|
12
|
-
* enter animation, the close button — and owns page switching for multi-page
|
|
13
|
-
* popups (buttons with a `page` action). Email-subscription-form slots
|
|
14
|
-
* submit through the subscription-form service.
|
|
15
|
-
*/
|
|
16
|
-
export declare const renderWebPopup: (container: HTMLElement, params: WebPopupParams, onRequestClose: () => void) => void;
|
|
14
|
+
export declare const renderWebPopup: (container: HTMLElement, params: WebPopupParams, onRequestClose: () => void, handlers: WebPopupSubmitHandlers) => void;
|
|
17
15
|
/**
|
|
18
16
|
* Unmount a popup rendered by `renderWebPopup`. Dropping the host element alone
|
|
19
17
|
* leaves the tree mounted on a detached node, so component cleanup never runs —
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|