web-push-notifications 3.62.7 → 3.62.8

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.
@@ -24,4 +24,5 @@ export declare class WebPopupsWidget {
24
24
  private markAsShown;
25
25
  private getSessionStorageKey;
26
26
  private addToQueue;
27
+ private renderSubscriptionForm;
27
28
  }
@@ -1,2 +1,4 @@
1
1
  export declare const WEB_POPUPS_WIDGET_NAMESPACE = "pushwoosh-web-popups";
2
2
  export declare const POPUP_HOST_Z_INDEX = 2147483647;
3
+ export declare const SUBSCRIPTION_FORMS_WIDGET_URL = "https://cdn.pushwoosh.com/subscription-forms/widget.js";
4
+ export declare const SUBSCRIPTION_FORMS_WIDGET_TAG = "pushwoosh-subscribe-widget";
@@ -0,0 +1,12 @@
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>;
@@ -3,7 +3,8 @@ export type IWebPopupsConfig = {
3
3
  };
4
4
  export type WebPopup = {
5
5
  code: string;
6
- popup_form_content_code: string;
6
+ popup_form_content_code?: string;
7
+ subscription_form_code?: string;
7
8
  device_type: 'ALL' | 'DESKTOP' | 'MOBILE';
8
9
  visitors_type: 'ALL' | 'NEW' | 'RECURRING';
9
10
  matching_pages: string[];