@economist/web-apple-pay 1.5.1 → 1.6.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/dist/index.js +962 -51
- package/dist/src/apple-pay-button.d.ts +13 -1
- package/dist/src/apple-pay-button.js +962 -51
- package/dist/src/apple-pay-button.stories.js +969 -67
- package/dist/src/apple-pay-modal.js +18 -1
- package/dist/src/apple-pay-modal.stories.js +962 -51
- package/dist/src/clients/payment-checkout/apple-session.d.ts +18 -0
- package/dist/src/clients/payment-checkout/apple-session.js +227 -0
- package/dist/src/clients/payment-checkout/billing-contact-details.d.ts +21 -0
- package/dist/src/clients/payment-checkout/billing-contact-details.js +109 -0
- package/dist/src/clients/payment-checkout/config.d.ts +1 -0
- package/dist/src/clients/payment-checkout/contact-validation.d.ts +21 -0
- package/dist/src/clients/payment-checkout/contact-validation.js +50 -0
- package/dist/src/clients/payment-checkout/index.d.ts +4 -0
- package/dist/src/clients/payment-checkout/index.js +25 -1
- package/dist/src/clients/payment-checkout/messages.d.ts +33 -0
- package/dist/src/clients/payment-checkout/messages.js +19 -0
- package/dist/src/clients/payment-checkout/payment-handler.d.ts +36 -0
- package/dist/src/clients/payment-checkout/payment-handler.js +375 -0
- package/dist/src/clients/payment-checkout/shipping-contact-details.d.ts +10 -0
- package/dist/src/clients/payment-checkout/shipping-contact-details.js +83 -0
- package/dist/src/clients/payment-checkout/types.d.ts +128 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +962 -51
- package/dist/src/utils/billing-countries.d.ts +19 -0
- package/dist/src/utils/billing-countries.js +263 -0
- package/dist/src/utils/expressCheckoutRedirect.d.ts +55 -0
- package/dist/src/utils/expressCheckoutRedirect.js +46 -0
- package/dist/src/utils/expressCheckoutTracking.d.ts +64 -0
- package/dist/src/utils/expressCheckoutTracking.js +84 -0
- package/dist/src/utils/recaptcha.d.ts +22 -0
- package/dist/src/utils/recaptcha.js +54 -0
- package/package.json +2 -1
|
@@ -7,11 +7,13 @@ export declare class ApplePayButton extends HTMLElement {
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates and configures an ApplePayButton if the feature flag is present.
|
|
9
9
|
*/
|
|
10
|
-
static createIfEnabled(offer: Offer | undefined, country: string): ApplePayButton | null;
|
|
10
|
+
static createIfEnabled(offer: Offer | undefined, country: string, entryPoint: string): ApplePayButton | null;
|
|
11
11
|
get offer(): Offer | null;
|
|
12
12
|
set offer(value: Offer | null);
|
|
13
13
|
get country(): string;
|
|
14
14
|
set country(value: string);
|
|
15
|
+
get entryPoint(): string;
|
|
16
|
+
set entryPoint(value: string);
|
|
15
17
|
/**
|
|
16
18
|
* Awaitable contract for the component's current render lifecycle.
|
|
17
19
|
*
|
|
@@ -30,4 +32,14 @@ export declare class ApplePayButton extends HTMLElement {
|
|
|
30
32
|
*/
|
|
31
33
|
whenReady(): Promise<void>;
|
|
32
34
|
connectedCallback(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Resets all render state when the element is removed from the DOM.
|
|
37
|
+
*
|
|
38
|
+
* A shared library component cannot assume it won't be moved in the DOM
|
|
39
|
+
* (e.g. lazy panels, SPA route changes). Resetting on disconnect means
|
|
40
|
+
* reattach always triggers a fresh `#run()` — new session check, new payment
|
|
41
|
+
* options fetch, fresh event listeners — preventing stale data from persisting
|
|
42
|
+
* and eliminating the implicit reliance on the DOM as a render-state flag.
|
|
43
|
+
*/
|
|
44
|
+
disconnectedCallback(): void;
|
|
33
45
|
}
|