web-push-notifications 3.63.0 → 3.65.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.
@@ -72,7 +72,6 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
72
72
  private scheduleDrain;
73
73
  private cancelScheduledDrain;
74
74
  private present;
75
- private renderSubscriptionForm;
76
75
  private lockBodyScroll;
77
76
  private unlockBodyScroll;
78
77
  private subscribeToNavigation;
@@ -2,6 +2,4 @@ export declare const WEB_POPUPS_WIDGET_NAMESPACE = "pushwoosh-web-popups";
2
2
  export declare const WEB_POPUPS_LOG_PREFIX = "[WebPopups]";
3
3
  export declare const POPUP_HOST_Z_INDEX = 2147483647;
4
4
  export declare const QUEUE_GAP_MS = 400;
5
- export declare const SUBSCRIPTION_FORMS_WIDGET_URL = "https://cdn.pushwoosh.com/subscription-forms/widget.js";
6
- export declare const SUBSCRIPTION_FORMS_WIDGET_TAG = "pushwoosh-subscribe-widget";
7
5
  export declare const SUBSCRIPTION_FORMS_API_URL = "https://subscription-form.svc-nue.pushwoosh.com/api/v1";
@@ -19,8 +19,7 @@ export type PageRule = {
19
19
  export type WebPopupTriggerType = 'PAGE_LOAD' | 'API' | (string & {});
20
20
  export type WebPopup = {
21
21
  code: string;
22
- popup_form_content_code?: string;
23
- subscription_form_code?: string;
22
+ popup_form_content_code: string;
24
23
  device_type: 'ALL' | 'DESKTOP' | 'MOBILE';
25
24
  visitors_type: 'ALL' | 'NEW' | 'RECURRING';
26
25
  matching_pages: string[];
@@ -30,19 +29,6 @@ export type WebPopup = {
30
29
  frequency: 'ONCE' | 'ONCE_PER_SESSION' | 'EVERY_VISIT';
31
30
  trigger_type?: WebPopupTriggerType;
32
31
  };
33
- export type WebPopupContent = {
34
- code: string;
35
- json: string;
36
- html: string | null;
37
- };
38
- /** Renderable popup payload: either parsed content or a hosted form code. */
39
- export type WebPopupContentBundle = {
40
- kind: 'content';
41
- parsed: WebPopupParams;
42
- } | {
43
- kind: 'subscription-form';
44
- formCode: string;
45
- };
46
32
  /**
47
33
  * Where a popup is in the automatic display pipeline for the current page load.
48
34
  *
@@ -57,10 +43,10 @@ export type WebPopupEntry = {
57
43
  /** Index in the server response — the ordering tiebreaker after `delay`. */
58
44
  order: number;
59
45
  state: WebPopupEntryState;
60
- /** Renderable content; null until fetched, or if the fetch/parse failed. */
61
- content: WebPopupContentBundle | null;
46
+ /** Parsed content; null until fetched, or if the fetch/parse failed. */
47
+ content: WebPopupParams | null;
62
48
  /** In-flight fetch, memoised so run() and show() never duplicate a request. */
63
- loading: Promise<WebPopupContentBundle | null> | null;
49
+ loading: Promise<WebPopupParams | null> | null;
64
50
  /** device_type + visitors_type + frequency, evaluated exactly once in run(). */
65
51
  passedStrongConditions: boolean;
66
52
  /** Armed delay timer while state === 'waiting'. */
@@ -1,12 +0,0 @@
1
- /**
2
- * Loads the subscription forms widget (an ES module that registers the
3
- * <pushwoosh-subscribe-widget> custom element) exactly once per page.
4
- * Resolves when the custom element is defined.
5
- *
6
- * The wait is bounded by a timeout: a script that loads but throws during
7
- * evaluation never registers the element and never fires the script `error`
8
- * event, so `customElements.whenDefined()` alone would hang forever (and with
9
- * it the whole web popups pipeline). On failure the memoized promise is reset
10
- * so the next popup can retry.
11
- */
12
- export declare function ensureSubscriptionFormsWidgetLoaded(): Promise<void>;