@economist/web-apple-pay 1.11.2 → 1.12.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/README.md CHANGED
@@ -127,6 +127,7 @@ Consumers should listen for this event and continue payment orchestration.
127
127
  - `createIfEnabled(offer, country, entryPoint?)`: returns a configured button or `null`.
128
128
  - `DUAL_OFFER_BANNER` (or omitted): always-on after offer exclusions — no homepage/Safari gate at `createIfEnabled` (device gating via `isApplePayAvailable` on mount); no banners Amplitude experiment / `$exposure`.
129
129
  - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; wallet impression `entry_point` is `free_trial_banner`.
130
+ - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude `getVariant` / `$exposure`. Wallet impression `entry_point` is `free_trial_popup`.
130
131
  - `PAYWALL`: experiment-gated via `apple-pay-express-checkout-on-paywalls` (`treatment` or QA URL).
131
132
  - `REGWALL`: inert — always returns `null`.
132
133
  - `ApplePayModal`: modal component class.
@@ -147,7 +148,7 @@ Check:
147
148
  - `configureApplePay(...)` was called before rendering (with a valid `merchantId` and `walletApiBaseUrl`)
148
149
  - device/browser supports Apple Pay (Safari on Apple device required — enforced by `isApplePayAvailable` on mount)
149
150
  - for paywalls: Amplitude treatment (or `?FEATURE_APPLE_PAY_EXPRESS_CHECKOUT`) is satisfied, plus Safari/Apple placement eligibility
150
- - for banners: consumer kill switch off (no homepage/Safari gate at `createIfEnabled`)
151
+ - for banners / `FREE_TRIAL_POPUP`: consumer kill switch off (no homepage/Safari gate at `createIfEnabled`; not Amplitude-gated)
151
152
  - offer variant is not excluded (`bundle`, `insider_print`)
152
153
 
153
154
  ### Logged-in checkbox copy looks wrong
package/dist/index.js CHANGED
@@ -1311,6 +1311,7 @@ var ApplePayEntryPoint = /* @__PURE__ */ ((ApplePayEntryPoint2) => {
1311
1311
  ApplePayEntryPoint2["REGWALL"] = "article_regwall";
1312
1312
  ApplePayEntryPoint2["DUAL_OFFER_BANNER"] = "dual_offer_banner";
1313
1313
  ApplePayEntryPoint2["FREE_TRIAL_BANNER"] = "free_trial_banner";
1314
+ ApplePayEntryPoint2["FREE_TRIAL_POPUP"] = "free_trial_popup";
1314
1315
  return ApplePayEntryPoint2;
1315
1316
  })(ApplePayEntryPoint || {});
1316
1317
  var APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY = "apple-pay-express-checkout-on-paywalls";
@@ -2003,6 +2004,9 @@ var ENTRY_POINT_CONFIG = {
2003
2004
  ["article_regwall" /* REGWALL */]: {
2004
2005
  isEligible: () => true,
2005
2006
  enabled: false
2007
+ },
2008
+ ["free_trial_popup" /* FREE_TRIAL_POPUP */]: {
2009
+ isEligible: () => true
2006
2010
  }
2007
2011
  };
2008
2012
  var FEATURE_APPLE_PAY_EXPRESS_CHECKOUT = "FEATURE_APPLE_PAY_EXPRESS_CHECKOUT";
@@ -2028,6 +2032,8 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2028
2032
  * `$exposure`.
2029
2033
  * - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; distinct
2030
2034
  * TEDL `entry_point` string (`free_trial_banner`) for wallet impression attribution.
2035
+ * - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude
2036
+ * `getVariant` / `$exposure`. Distinct TEDL `entry_point` (`free_trial_popup`).
2031
2037
  * - `PAYWALL`: experiment-gated via {@link APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY}
2032
2038
  * (`treatment` or QA URL param). The host must set up
2033
2039
  * `window.experimentIntegration` before calling for this entry point.
@@ -2035,14 +2041,14 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2035
2041
  *
2036
2042
  * **PAYWALL only — transition period:** the legacy
2037
2043
  * `FEATURE_APPLE_PAY_EXPRESS_CHECKOUT` URL param can show the button without
2038
- * treatment (and without inflating `$exposure`). For banners there is no
2044
+ * treatment (and without inflating `$exposure`). For banners / popup there is no
2039
2045
  * experiment gate; `BYPASS_APPLE_PAY_CHECKS` only skips device checks in
2040
2046
  * `isApplePayAvailable()` on mount.
2041
2047
  *
2042
2048
  * **Eligibility:**
2043
- * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` (or omitted): always eligible at
2044
- * this gate (homepage placement is host-owned; Safari/Apple is enforced
2045
- * later by `isApplePayAvailable()` on mount)
2049
+ * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` / `FREE_TRIAL_POPUP` (or omitted):
2050
+ * always eligible at this gate (homepage placement is host-owned; Safari/Apple
2051
+ * is enforced later by `isApplePayAvailable()` on mount)
2046
2052
  * - `PAYWALL`: Safari/Apple device only (no homepage) — article paywalls
2047
2053
  *
2048
2054
  * @param offer - The offer to display in the Apple Pay flow.
@@ -13,6 +13,8 @@ export declare class ApplePayButton extends HTMLElement {
13
13
  * `$exposure`.
14
14
  * - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; distinct
15
15
  * TEDL `entry_point` string (`free_trial_banner`) for wallet impression attribution.
16
+ * - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude
17
+ * `getVariant` / `$exposure`. Distinct TEDL `entry_point` (`free_trial_popup`).
16
18
  * - `PAYWALL`: experiment-gated via {@link APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY}
17
19
  * (`treatment` or QA URL param). The host must set up
18
20
  * `window.experimentIntegration` before calling for this entry point.
@@ -20,14 +22,14 @@ export declare class ApplePayButton extends HTMLElement {
20
22
  *
21
23
  * **PAYWALL only — transition period:** the legacy
22
24
  * `FEATURE_APPLE_PAY_EXPRESS_CHECKOUT` URL param can show the button without
23
- * treatment (and without inflating `$exposure`). For banners there is no
25
+ * treatment (and without inflating `$exposure`). For banners / popup there is no
24
26
  * experiment gate; `BYPASS_APPLE_PAY_CHECKS` only skips device checks in
25
27
  * `isApplePayAvailable()` on mount.
26
28
  *
27
29
  * **Eligibility:**
28
- * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` (or omitted): always eligible at
29
- * this gate (homepage placement is host-owned; Safari/Apple is enforced
30
- * later by `isApplePayAvailable()` on mount)
30
+ * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` / `FREE_TRIAL_POPUP` (or omitted):
31
+ * always eligible at this gate (homepage placement is host-owned; Safari/Apple
32
+ * is enforced later by `isApplePayAvailable()` on mount)
31
33
  * - `PAYWALL`: Safari/Apple device only (no homepage) — article paywalls
32
34
  *
33
35
  * @param offer - The offer to display in the Apple Pay flow.
@@ -1991,6 +1991,9 @@ var ENTRY_POINT_CONFIG = {
1991
1991
  ["article_regwall" /* REGWALL */]: {
1992
1992
  isEligible: () => true,
1993
1993
  enabled: false
1994
+ },
1995
+ ["free_trial_popup" /* FREE_TRIAL_POPUP */]: {
1996
+ isEligible: () => true
1994
1997
  }
1995
1998
  };
1996
1999
  var FEATURE_APPLE_PAY_EXPRESS_CHECKOUT = "FEATURE_APPLE_PAY_EXPRESS_CHECKOUT";
@@ -2016,6 +2019,8 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2016
2019
  * `$exposure`.
2017
2020
  * - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; distinct
2018
2021
  * TEDL `entry_point` string (`free_trial_banner`) for wallet impression attribution.
2022
+ * - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude
2023
+ * `getVariant` / `$exposure`. Distinct TEDL `entry_point` (`free_trial_popup`).
2019
2024
  * - `PAYWALL`: experiment-gated via {@link APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY}
2020
2025
  * (`treatment` or QA URL param). The host must set up
2021
2026
  * `window.experimentIntegration` before calling for this entry point.
@@ -2023,14 +2028,14 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2023
2028
  *
2024
2029
  * **PAYWALL only — transition period:** the legacy
2025
2030
  * `FEATURE_APPLE_PAY_EXPRESS_CHECKOUT` URL param can show the button without
2026
- * treatment (and without inflating `$exposure`). For banners there is no
2031
+ * treatment (and without inflating `$exposure`). For banners / popup there is no
2027
2032
  * experiment gate; `BYPASS_APPLE_PAY_CHECKS` only skips device checks in
2028
2033
  * `isApplePayAvailable()` on mount.
2029
2034
  *
2030
2035
  * **Eligibility:**
2031
- * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` (or omitted): always eligible at
2032
- * this gate (homepage placement is host-owned; Safari/Apple is enforced
2033
- * later by `isApplePayAvailable()` on mount)
2036
+ * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` / `FREE_TRIAL_POPUP` (or omitted):
2037
+ * always eligible at this gate (homepage placement is host-owned; Safari/Apple
2038
+ * is enforced later by `isApplePayAvailable()` on mount)
2034
2039
  * - `PAYWALL`: Safari/Apple device only (no homepage) — article paywalls
2035
2040
  *
2036
2041
  * @param offer - The offer to display in the Apple Pay flow.
@@ -1999,6 +1999,9 @@ var ENTRY_POINT_CONFIG = {
1999
1999
  ["article_regwall" /* REGWALL */]: {
2000
2000
  isEligible: () => true,
2001
2001
  enabled: false
2002
+ },
2003
+ ["free_trial_popup" /* FREE_TRIAL_POPUP */]: {
2004
+ isEligible: () => true
2002
2005
  }
2003
2006
  };
2004
2007
  var FEATURE_APPLE_PAY_EXPRESS_CHECKOUT = "FEATURE_APPLE_PAY_EXPRESS_CHECKOUT";
@@ -2024,6 +2027,8 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2024
2027
  * `$exposure`.
2025
2028
  * - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; distinct
2026
2029
  * TEDL `entry_point` string (`free_trial_banner`) for wallet impression attribution.
2030
+ * - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude
2031
+ * `getVariant` / `$exposure`. Distinct TEDL `entry_point` (`free_trial_popup`).
2027
2032
  * - `PAYWALL`: experiment-gated via {@link APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY}
2028
2033
  * (`treatment` or QA URL param). The host must set up
2029
2034
  * `window.experimentIntegration` before calling for this entry point.
@@ -2031,14 +2036,14 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2031
2036
  *
2032
2037
  * **PAYWALL only — transition period:** the legacy
2033
2038
  * `FEATURE_APPLE_PAY_EXPRESS_CHECKOUT` URL param can show the button without
2034
- * treatment (and without inflating `$exposure`). For banners there is no
2039
+ * treatment (and without inflating `$exposure`). For banners / popup there is no
2035
2040
  * experiment gate; `BYPASS_APPLE_PAY_CHECKS` only skips device checks in
2036
2041
  * `isApplePayAvailable()` on mount.
2037
2042
  *
2038
2043
  * **Eligibility:**
2039
- * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` (or omitted): always eligible at
2040
- * this gate (homepage placement is host-owned; Safari/Apple is enforced
2041
- * later by `isApplePayAvailable()` on mount)
2044
+ * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` / `FREE_TRIAL_POPUP` (or omitted):
2045
+ * always eligible at this gate (homepage placement is host-owned; Safari/Apple
2046
+ * is enforced later by `isApplePayAvailable()` on mount)
2042
2047
  * - `PAYWALL`: Safari/Apple device only (no homepage) — article paywalls
2043
2048
  *
2044
2049
  * @param offer - The offer to display in the Apple Pay flow.
@@ -1991,6 +1991,9 @@ var ENTRY_POINT_CONFIG = {
1991
1991
  ["article_regwall" /* REGWALL */]: {
1992
1992
  isEligible: () => true,
1993
1993
  enabled: false
1994
+ },
1995
+ ["free_trial_popup" /* FREE_TRIAL_POPUP */]: {
1996
+ isEligible: () => true
1994
1997
  }
1995
1998
  };
1996
1999
  var FEATURE_APPLE_PAY_EXPRESS_CHECKOUT = "FEATURE_APPLE_PAY_EXPRESS_CHECKOUT";
@@ -2016,6 +2019,8 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2016
2019
  * `$exposure`.
2017
2020
  * - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; distinct
2018
2021
  * TEDL `entry_point` string (`free_trial_banner`) for wallet impression attribution.
2022
+ * - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude
2023
+ * `getVariant` / `$exposure`. Distinct TEDL `entry_point` (`free_trial_popup`).
2019
2024
  * - `PAYWALL`: experiment-gated via {@link APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY}
2020
2025
  * (`treatment` or QA URL param). The host must set up
2021
2026
  * `window.experimentIntegration` before calling for this entry point.
@@ -2023,14 +2028,14 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2023
2028
  *
2024
2029
  * **PAYWALL only — transition period:** the legacy
2025
2030
  * `FEATURE_APPLE_PAY_EXPRESS_CHECKOUT` URL param can show the button without
2026
- * treatment (and without inflating `$exposure`). For banners there is no
2031
+ * treatment (and without inflating `$exposure`). For banners / popup there is no
2027
2032
  * experiment gate; `BYPASS_APPLE_PAY_CHECKS` only skips device checks in
2028
2033
  * `isApplePayAvailable()` on mount.
2029
2034
  *
2030
2035
  * **Eligibility:**
2031
- * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` (or omitted): always eligible at
2032
- * this gate (homepage placement is host-owned; Safari/Apple is enforced
2033
- * later by `isApplePayAvailable()` on mount)
2036
+ * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` / `FREE_TRIAL_POPUP` (or omitted):
2037
+ * always eligible at this gate (homepage placement is host-owned; Safari/Apple
2038
+ * is enforced later by `isApplePayAvailable()` on mount)
2034
2039
  * - `PAYWALL`: Safari/Apple device only (no homepage) — article paywalls
2035
2040
  *
2036
2041
  * @param offer - The offer to display in the Apple Pay flow.
@@ -2,7 +2,9 @@ export declare enum ApplePayEntryPoint {
2
2
  PAYWALL = "article_paywall",
3
3
  REGWALL = "article_regwall",
4
4
  DUAL_OFFER_BANNER = "dual_offer_banner",
5
- FREE_TRIAL_BANNER = "free_trial_banner"
5
+ FREE_TRIAL_BANNER = "free_trial_banner",
6
+ /** Post-registration free-trial popup. Not Amplitude-gated. */
7
+ FREE_TRIAL_POPUP = "free_trial_popup"
6
8
  }
7
9
  /**
8
10
  * Amplitude experiment key for Apple Pay Express Checkout on article paywalls
@@ -4,6 +4,7 @@ var ApplePayEntryPoint = /* @__PURE__ */ ((ApplePayEntryPoint2) => {
4
4
  ApplePayEntryPoint2["REGWALL"] = "article_regwall";
5
5
  ApplePayEntryPoint2["DUAL_OFFER_BANNER"] = "dual_offer_banner";
6
6
  ApplePayEntryPoint2["FREE_TRIAL_BANNER"] = "free_trial_banner";
7
+ ApplePayEntryPoint2["FREE_TRIAL_POPUP"] = "free_trial_popup";
7
8
  return ApplePayEntryPoint2;
8
9
  })(ApplePayEntryPoint || {});
9
10
  var APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY = "apple-pay-express-checkout-on-paywalls";
package/dist/src/index.js CHANGED
@@ -1311,6 +1311,7 @@ var ApplePayEntryPoint = /* @__PURE__ */ ((ApplePayEntryPoint2) => {
1311
1311
  ApplePayEntryPoint2["REGWALL"] = "article_regwall";
1312
1312
  ApplePayEntryPoint2["DUAL_OFFER_BANNER"] = "dual_offer_banner";
1313
1313
  ApplePayEntryPoint2["FREE_TRIAL_BANNER"] = "free_trial_banner";
1314
+ ApplePayEntryPoint2["FREE_TRIAL_POPUP"] = "free_trial_popup";
1314
1315
  return ApplePayEntryPoint2;
1315
1316
  })(ApplePayEntryPoint || {});
1316
1317
  var APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY = "apple-pay-express-checkout-on-paywalls";
@@ -2003,6 +2004,9 @@ var ENTRY_POINT_CONFIG = {
2003
2004
  ["article_regwall" /* REGWALL */]: {
2004
2005
  isEligible: () => true,
2005
2006
  enabled: false
2007
+ },
2008
+ ["free_trial_popup" /* FREE_TRIAL_POPUP */]: {
2009
+ isEligible: () => true
2006
2010
  }
2007
2011
  };
2008
2012
  var FEATURE_APPLE_PAY_EXPRESS_CHECKOUT = "FEATURE_APPLE_PAY_EXPRESS_CHECKOUT";
@@ -2028,6 +2032,8 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2028
2032
  * `$exposure`.
2029
2033
  * - `FREE_TRIAL_BANNER`: same always-on-after-exclusions gate as Dual; distinct
2030
2034
  * TEDL `entry_point` string (`free_trial_banner`) for wallet impression attribution.
2035
+ * - `FREE_TRIAL_POPUP`: same always-on-after-exclusions gate; no Amplitude
2036
+ * `getVariant` / `$exposure`. Distinct TEDL `entry_point` (`free_trial_popup`).
2031
2037
  * - `PAYWALL`: experiment-gated via {@link APPLE_PAY_EXPRESS_PAYWALLS_EXPERIMENT_KEY}
2032
2038
  * (`treatment` or QA URL param). The host must set up
2033
2039
  * `window.experimentIntegration` before calling for this entry point.
@@ -2035,14 +2041,14 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
2035
2041
  *
2036
2042
  * **PAYWALL only — transition period:** the legacy
2037
2043
  * `FEATURE_APPLE_PAY_EXPRESS_CHECKOUT` URL param can show the button without
2038
- * treatment (and without inflating `$exposure`). For banners there is no
2044
+ * treatment (and without inflating `$exposure`). For banners / popup there is no
2039
2045
  * experiment gate; `BYPASS_APPLE_PAY_CHECKS` only skips device checks in
2040
2046
  * `isApplePayAvailable()` on mount.
2041
2047
  *
2042
2048
  * **Eligibility:**
2043
- * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` (or omitted): always eligible at
2044
- * this gate (homepage placement is host-owned; Safari/Apple is enforced
2045
- * later by `isApplePayAvailable()` on mount)
2049
+ * - `DUAL_OFFER_BANNER` / `FREE_TRIAL_BANNER` / `FREE_TRIAL_POPUP` (or omitted):
2050
+ * always eligible at this gate (homepage placement is host-owned; Safari/Apple
2051
+ * is enforced later by `isApplePayAvailable()` on mount)
2046
2052
  * - `PAYWALL`: Safari/Apple device only (no homepage) — article paywalls
2047
2053
  *
2048
2054
  * @param offer - The offer to display in the Apple Pay flow.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@economist/web-apple-pay",
3
3
  "description": "Web component package for Apple Pay checkout UI",
4
- "version": "1.11.2",
4
+ "version": "1.12.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",