web-push-notifications 3.98.0 → 3.100.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.
@@ -4,7 +4,7 @@ export declare const isEmbeddedWebPopup: (popup: WebPopup) => boolean;
4
4
  /** What the blocks need from the widget: page rules, rendering and stats live there. */
5
5
  export type EmbeddedWebPopupsDeps = {
6
6
  matchesPage: (popup: WebPopup) => boolean;
7
- render: (container: HTMLElement, params: WebPopupParams) => void;
7
+ render: (container: HTMLElement, params: WebPopupParams, entry: WebPopupEntry) => void;
8
8
  unmount: (container: HTMLElement) => void;
9
9
  recordVisit: (entry: WebPopupEntry) => void;
10
10
  recordImpression: (code: string) => void;
@@ -86,6 +86,7 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
86
86
  private scheduleDrain;
87
87
  private cancelScheduledDrain;
88
88
  private present;
89
+ private handlersFor;
89
90
  private recordSubscriptionFormViews;
90
91
  private lockBodyScroll;
91
92
  private unlockBodyScroll;
@@ -1,5 +1,6 @@
1
- import { type WebPopupChoiceSubmitHandler, type WebPopupRatingSubmitHandler, type WebPopupSubscribeResult } from '@pushwoosh/websdk-common/web-popups';
1
+ import { type WebPopupChoiceSubmitHandler, type WebPopupFormValuesSubmitHandler, type WebPopupRatingSubmitHandler, type WebPopupSubscribeResult } from '@pushwoosh/websdk-common/web-popups';
2
2
  import { type Pushwoosh } from '../../core/Pushwoosh';
3
3
  export declare function createChoiceSubmitHandler(pw: Pushwoosh): WebPopupChoiceSubmitHandler;
4
4
  export declare function createRatingSubmitHandler(pw: Pushwoosh): WebPopupRatingSubmitHandler;
5
5
  export declare function createSubscribeHandler(pw: Pushwoosh): () => Promise<WebPopupSubscribeResult>;
6
+ export declare function createFormValuesSubmitHandler(pw: Pushwoosh, campaignCode: string): WebPopupFormValuesSubmitHandler;
@@ -1,10 +1,13 @@
1
- import { type WebPopupChoiceSubmitHandler, type WebPopupColorSchemePref, type WebPopupParams, type WebPopupRatingSubmitHandler, type WebPopupSubscribeResult } from '@pushwoosh/websdk-common/web-popups';
1
+ import { type WebPopupChoiceSubmitHandler, type WebPopupColorSchemePref, type WebPopupFormValuesSubmitHandler, type WebPopupParams, type WebPopupRatingSubmitHandler, type WebPopupSubscribeResult } from '@pushwoosh/websdk-common/web-popups';
2
2
  /** The device-API handlers, passed in rather than imported: this module renders, it doesn't know the core. */
3
- export type WebPopupSubmitHandlers = {
3
+ export type WebPopupDeviceHandlers = {
4
4
  onSubmitChoice: WebPopupChoiceSubmitHandler;
5
5
  onSubmitRating: WebPopupRatingSubmitHandler;
6
6
  onRequestSubscribe: () => Promise<WebPopupSubscribeResult>;
7
7
  };
8
+ export type WebPopupSubmitHandlers = WebPopupDeviceHandlers & {
9
+ onSubmitFormValues: WebPopupFormValuesSubmitHandler;
10
+ };
8
11
  /**
9
12
  * Parse stored popup json into the renderable model. Returns null for
10
13
  * anything that is not a supported {version: 1, params} popup with at least