stripe-pwa-elements 3.2.0 → 4.0.1
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/cjs/app-globals-V2Kpy_OQ.js +0 -3
- package/dist/cjs/error-FFC4kSs5.js +0 -3
- package/dist/cjs/{factory-CbbbSvkg.js → factory-Cd2VI_N2.js} +216 -77
- package/dist/cjs/{index-Ba1pBePA.js → index-CYbA1N_k.js} +24 -6
- package/dist/cjs/index-Dkb0SxZc.js +4694 -0
- package/dist/cjs/index.cjs.js +0 -1
- package/dist/cjs/ion-icon.cjs.entry.js +22 -13
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/stripe-address-element.cjs.entry.js +41 -26
- package/dist/cjs/stripe-card-element-modal.cjs.entry.js +6 -7
- package/dist/cjs/stripe-card-element_2.cjs.entry.js +129 -72
- package/dist/cjs/stripe-currency-selector.cjs.entry.js +20 -10
- package/dist/cjs/stripe-elements.cjs.js +31 -5
- package/dist/cjs/stripe-express-checkout-element.cjs.entry.js +32 -22
- package/dist/cjs/stripe-link-authentication-element.cjs.entry.js +20 -10
- package/dist/cjs/stripe-payment-element.cjs.entry.js +283 -167
- package/dist/cjs/stripe-payment-request-button.cjs.entry.js +30 -18
- package/dist/collection/collection-manifest.json +6 -5
- package/dist/collection/components/stripe-address-element/stripe-address-element.js +36 -21
- package/dist/collection/components/stripe-card-element/stripe-card-element.helpers.js +57 -0
- package/dist/collection/components/stripe-card-element/stripe-card-element.js +62 -68
- package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js +15 -11
- package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js +17 -6
- package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js +35 -20
- package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js +19 -7
- package/dist/collection/components/stripe-modal/stripe-modal.js +18 -7
- package/dist/collection/components/stripe-payment-element/stripe-payment-element.helpers.js +114 -0
- package/dist/collection/components/stripe-payment-element/stripe-payment-element.js +162 -162
- package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js +48 -19
- package/dist/collection/index.js +0 -1
- package/dist/collection/interfaces.js +0 -1
- package/dist/collection/services/address-element-manager.js +3 -4
- package/dist/collection/services/card-element-manager.js +3 -4
- package/dist/collection/services/currency-selector-element-manager.js +3 -4
- package/dist/collection/services/express-checkout-element-manager.js +9 -10
- package/dist/collection/services/factory.js +0 -1
- package/dist/collection/services/interfaces.js +0 -1
- package/dist/collection/services/link-authentication-element-manager.js +3 -4
- package/dist/collection/services/payment-element-manager.js +4 -5
- package/dist/collection/services/stripe-service.js +27 -10
- package/dist/collection/utils/element-finder.js +2 -3
- package/dist/collection/utils/error.js +0 -1
- package/dist/collection/utils/i18n.js +0 -1
- package/dist/collection/utils/platform.js +0 -1
- package/dist/collection/utils/test-setup.js +0 -1
- package/dist/collection/utils/utils.js +2 -3
- package/dist/components/error.js +1 -16
- package/dist/components/factory.js +1 -3736
- package/dist/components/icon.js +1 -459
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -4
- package/dist/components/index2.js +1 -192
- package/dist/components/ion-icon.js +1 -9
- package/dist/components/stripe-address-element.js +1 -327
- package/dist/components/stripe-card-element-modal.js +1 -174
- package/dist/components/stripe-card-element.js +1 -9
- package/dist/components/stripe-card-element2.js +1 -440
- package/dist/components/stripe-currency-selector.js +1 -218
- package/dist/components/stripe-express-checkout-element.js +1 -332
- package/dist/components/stripe-link-authentication-element.js +1 -256
- package/dist/components/stripe-modal.js +1 -9
- package/dist/components/stripe-modal2.js +1 -112
- package/dist/components/stripe-payment-element.js +1 -510
- package/dist/components/stripe-payment-request-button.js +1 -9
- package/dist/components/stripe-payment-request-button2.js +1 -224
- package/dist/components/utils.js +1 -89
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/error-XRfh5Wrs.js +0 -3
- package/dist/esm/{factory-Drde6-y7.js → factory-VTa1Gc94.js} +216 -77
- package/dist/esm/index-C6bbmyga.js +4677 -0
- package/dist/esm/{index-BHDCxQOb.js → index-CBXaOfXU.js} +24 -6
- package/dist/esm/index.js +0 -1
- package/dist/esm/ion-icon.entry.js +22 -13
- package/dist/esm/loader.js +3 -4
- package/dist/esm/stripe-address-element.entry.js +41 -26
- package/dist/esm/stripe-card-element-modal.entry.js +6 -7
- package/dist/esm/stripe-card-element_2.entry.js +129 -72
- package/dist/esm/stripe-currency-selector.entry.js +20 -10
- package/dist/esm/stripe-elements.js +32 -6
- package/dist/esm/stripe-express-checkout-element.entry.js +32 -22
- package/dist/esm/stripe-link-authentication-element.entry.js +20 -10
- package/dist/esm/stripe-payment-element.entry.js +283 -167
- package/dist/esm/stripe-payment-request-button.entry.js +27 -15
- package/dist/stripe-elements/index.esm.js +0 -2
- package/dist/stripe-elements/p-1bd46766.entry.js +1 -0
- package/dist/stripe-elements/p-1c6e0a45.entry.js +1 -0
- package/dist/stripe-elements/p-3f42ca0c.entry.js +1 -0
- package/dist/stripe-elements/p-5cf62945.entry.js +1 -0
- package/dist/stripe-elements/p-74de1556.entry.js +1 -0
- package/dist/stripe-elements/p-76e57d78.entry.js +1 -0
- package/dist/stripe-elements/p-840d499f.entry.js +1 -0
- package/dist/stripe-elements/p-C6bbmyga.js +2 -0
- package/dist/stripe-elements/p-CBXaOfXU.js +1 -0
- package/dist/stripe-elements/p-CrjrbGJ3.js +1 -0
- package/dist/stripe-elements/p-DQuL1Twl.js +1 -2
- package/dist/stripe-elements/p-XRfh5Wrs.js +1 -2
- package/dist/stripe-elements/p-ae0c336e.entry.js +1 -0
- package/dist/stripe-elements/p-cfd8e081.entry.js +1 -0
- package/dist/stripe-elements/stripe-elements.esm.js +1 -2
- package/dist/stripe-elements/svg/.gitignore +4 -0
- package/dist/types/components/stripe-address-element/stripe-address-element.d.ts +6 -0
- package/dist/types/components/stripe-card-element/stripe-card-element.d.ts +11 -1
- package/dist/types/components/stripe-card-element/stripe-card-element.helpers.d.ts +29 -0
- package/dist/types/components/stripe-card-element-modal/stripe-card-element-modal.d.ts +4 -4
- package/dist/types/components/stripe-currency-selector/stripe-currency-selector.d.ts +6 -0
- package/dist/types/components/stripe-express-checkout-element/stripe-express-checkout-element.d.ts +6 -0
- package/dist/types/components/stripe-link-authentication-element/stripe-link-authentication-element.d.ts +6 -0
- package/dist/types/components/stripe-modal/stripe-modal.d.ts +1 -0
- package/dist/types/components/stripe-payment-element/stripe-payment-element.d.ts +20 -2
- package/dist/types/components/stripe-payment-element/stripe-payment-element.helpers.d.ts +54 -0
- package/dist/types/components/stripe-payment-request-button/stripe-payment-request-button.d.ts +14 -1
- package/dist/types/components.d.ts +139 -29
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/interfaces.d.ts +4 -3
- package/dist/types/services/stripe-service.d.ts +8 -4
- package/dist/types/stencil-public-runtime.d.ts +110 -5
- package/package.json +50 -30
- package/readme.md +386 -133
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
- package/dist/cjs/error-FFC4kSs5.js.map +0 -1
- package/dist/cjs/factory-CbbbSvkg.js.map +0 -1
- package/dist/cjs/index-BXVW_rzh.js +0 -1932
- package/dist/cjs/index-BXVW_rzh.js.map +0 -1
- package/dist/cjs/index-Ba1pBePA.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/ion-icon.entry.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/stripe-address-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-card-element-modal.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-card-element.stripe-modal.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-currency-selector.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-elements.cjs.js.map +0 -1
- package/dist/cjs/stripe-express-checkout-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-link-authentication-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-payment-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-payment-request-button.entry.cjs.js.map +0 -1
- package/dist/collection/components/stripe-address-element/stripe-address-element.js.map +0 -1
- package/dist/collection/components/stripe-card-element/stripe-card-element.js.map +0 -1
- package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js.map +0 -1
- package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js.map +0 -1
- package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js.map +0 -1
- package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js.map +0 -1
- package/dist/collection/components/stripe-modal/stripe-modal.js.map +0 -1
- package/dist/collection/components/stripe-payment-element/stripe-payment-element.js.map +0 -1
- package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/interfaces.js.map +0 -1
- package/dist/collection/services/address-element-manager.js.map +0 -1
- package/dist/collection/services/card-element-manager.js.map +0 -1
- package/dist/collection/services/currency-selector-element-manager.js.map +0 -1
- package/dist/collection/services/express-checkout-element-manager.js.map +0 -1
- package/dist/collection/services/factory.js.map +0 -1
- package/dist/collection/services/interfaces.js.map +0 -1
- package/dist/collection/services/link-authentication-element-manager.js.map +0 -1
- package/dist/collection/services/payment-element-manager.js.map +0 -1
- package/dist/collection/services/stripe-service.js.map +0 -1
- package/dist/collection/utils/element-finder.js.map +0 -1
- package/dist/collection/utils/error.js.map +0 -1
- package/dist/collection/utils/i18n.js.map +0 -1
- package/dist/collection/utils/platform.js.map +0 -1
- package/dist/collection/utils/test-setup.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/error.js.map +0 -1
- package/dist/components/factory.js.map +0 -1
- package/dist/components/icon.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js.map +0 -1
- package/dist/components/ion-icon.js.map +0 -1
- package/dist/components/stripe-address-element.js.map +0 -1
- package/dist/components/stripe-card-element-modal.js.map +0 -1
- package/dist/components/stripe-card-element.js.map +0 -1
- package/dist/components/stripe-card-element2.js.map +0 -1
- package/dist/components/stripe-currency-selector.js.map +0 -1
- package/dist/components/stripe-express-checkout-element.js.map +0 -1
- package/dist/components/stripe-link-authentication-element.js.map +0 -1
- package/dist/components/stripe-modal.js.map +0 -1
- package/dist/components/stripe-modal2.js.map +0 -1
- package/dist/components/stripe-payment-element.js.map +0 -1
- package/dist/components/stripe-payment-request-button.js.map +0 -1
- package/dist/components/stripe-payment-request-button2.js.map +0 -1
- package/dist/components/utils.js.map +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
- package/dist/esm/error-XRfh5Wrs.js.map +0 -1
- package/dist/esm/factory-Drde6-y7.js.map +0 -1
- package/dist/esm/index-BHDCxQOb.js.map +0 -1
- package/dist/esm/index-DJwTOfxZ.js +0 -1920
- package/dist/esm/index-DJwTOfxZ.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/ion-icon.entry.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/stripe-address-element.entry.js.map +0 -1
- package/dist/esm/stripe-card-element-modal.entry.js.map +0 -1
- package/dist/esm/stripe-card-element.stripe-modal.entry.js.map +0 -1
- package/dist/esm/stripe-currency-selector.entry.js.map +0 -1
- package/dist/esm/stripe-elements.js.map +0 -1
- package/dist/esm/stripe-express-checkout-element.entry.js.map +0 -1
- package/dist/esm/stripe-link-authentication-element.entry.js.map +0 -1
- package/dist/esm/stripe-payment-element.entry.js.map +0 -1
- package/dist/esm/stripe-payment-request-button.entry.js.map +0 -1
- package/dist/stripe-elements/index.esm.js.map +0 -1
- package/dist/stripe-elements/ion-icon.entry.esm.js.map +0 -1
- package/dist/stripe-elements/loader.esm.js.map +0 -1
- package/dist/stripe-elements/p-02f6e421.entry.js +0 -2
- package/dist/stripe-elements/p-02f6e421.entry.js.map +0 -1
- package/dist/stripe-elements/p-19888fa6.entry.js +0 -2
- package/dist/stripe-elements/p-19888fa6.entry.js.map +0 -1
- package/dist/stripe-elements/p-4d505729.entry.js +0 -2
- package/dist/stripe-elements/p-4d505729.entry.js.map +0 -1
- package/dist/stripe-elements/p-7e7ad92a.entry.js +0 -2
- package/dist/stripe-elements/p-7e7ad92a.entry.js.map +0 -1
- package/dist/stripe-elements/p-8bb4212c.entry.js +0 -2
- package/dist/stripe-elements/p-8bb4212c.entry.js.map +0 -1
- package/dist/stripe-elements/p-9aee2b6b.entry.js +0 -2
- package/dist/stripe-elements/p-9aee2b6b.entry.js.map +0 -1
- package/dist/stripe-elements/p-BHDCxQOb.js +0 -2
- package/dist/stripe-elements/p-BHDCxQOb.js.map +0 -1
- package/dist/stripe-elements/p-DI2vmGaI.js +0 -2
- package/dist/stripe-elements/p-DI2vmGaI.js.map +0 -1
- package/dist/stripe-elements/p-DJwTOfxZ.js +0 -3
- package/dist/stripe-elements/p-DJwTOfxZ.js.map +0 -1
- package/dist/stripe-elements/p-DQuL1Twl.js.map +0 -1
- package/dist/stripe-elements/p-XRfh5Wrs.js.map +0 -1
- package/dist/stripe-elements/p-ba251393.entry.js +0 -2
- package/dist/stripe-elements/p-ba251393.entry.js.map +0 -1
- package/dist/stripe-elements/p-c649edfc.entry.js +0 -2
- package/dist/stripe-elements/p-c649edfc.entry.js.map +0 -1
- package/dist/stripe-elements/p-e8bb43ae.entry.js +0 -2
- package/dist/stripe-elements/p-e8bb43ae.entry.js.map +0 -1
- package/dist/stripe-elements/stripe-address-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-card-element-modal.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-card-element.stripe-modal.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-currency-selector.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-elements.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-express-checkout-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-link-authentication-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-payment-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-payment-request-button.entry.esm.js.map +0 -1
package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { loadStripe } from "@stripe/stripe-js";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated `stripe-payment-request-button` is deprecated and will be removed in a future release.
|
|
5
|
+
* `stripe.paymentRequest()` is being removed in Stripe.js 9.x (deprecated as of 2025-09-30 / 2026-03-25).
|
|
6
|
+
* Please migrate to `<stripe-express-checkout-element>` which supports Apple Pay, Google Pay, Link, PayPal,
|
|
7
|
+
* and more via the modern Express Checkout Element API.
|
|
8
|
+
* Migration guide: https://hideokamoto.github.io/stripe-pwa-elements/guides/migrate-payment-request-button-to-express-checkout/
|
|
9
|
+
*/
|
|
3
10
|
export class StripePaymentRequestButton {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.loadStripeStatus = '';
|
|
13
|
+
/**
|
|
14
|
+
* Overwrite the application name that registered
|
|
15
|
+
* For wrapper library (like Capacitor)
|
|
16
|
+
*/
|
|
17
|
+
this.applicationName = 'stripe-pwa-elements';
|
|
18
|
+
}
|
|
4
19
|
/**
|
|
5
20
|
* Check isAvailable ApplePay or GooglePay.
|
|
6
21
|
* If you run this method, you should run before initStripe.
|
|
@@ -53,13 +68,12 @@ export class StripePaymentRequestButton {
|
|
|
53
68
|
}
|
|
54
69
|
this.stripeLoaded.emit(event);
|
|
55
70
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.applicationName = 'stripe-pwa-elements';
|
|
71
|
+
/**
|
|
72
|
+
* Props are not yet populated inside the constructor when the component is registered via
|
|
73
|
+
* the custom-elements build (`dist/components/*`), so initialization that depends on them
|
|
74
|
+
* must run in `componentWillLoad`, where both the lazy and custom-elements builds have them set.
|
|
75
|
+
*/
|
|
76
|
+
componentWillLoad() {
|
|
63
77
|
if (this.publishableKey !== undefined && this.paymentRequestOption !== undefined) {
|
|
64
78
|
this.initStripe(this.publishableKey, {
|
|
65
79
|
stripeAccount: this.stripeAccount,
|
|
@@ -69,6 +83,12 @@ export class StripePaymentRequestButton {
|
|
|
69
83
|
this.loadStripeStatus = 'failure';
|
|
70
84
|
}
|
|
71
85
|
}
|
|
86
|
+
connectedCallback() {
|
|
87
|
+
console.warn('[stripe-pwa-elements] <stripe-payment-request-button> is deprecated. ' +
|
|
88
|
+
'stripe.paymentRequest() is being removed in Stripe.js 9.x (deprecated 2025-09-30 / removed 2026-03-25). ' +
|
|
89
|
+
'Please migrate to <stripe-express-checkout-element>, which supports Apple Pay, Google Pay, Link, PayPal, and more. ' +
|
|
90
|
+
'Migration guide: https://hideokamoto.github.io/stripe-pwa-elements/guides/migrate-payment-request-button-to-express-checkout/');
|
|
91
|
+
}
|
|
72
92
|
/**
|
|
73
93
|
* @param option
|
|
74
94
|
* @private
|
|
@@ -174,7 +194,7 @@ export class StripePaymentRequestButton {
|
|
|
174
194
|
this.stripe = undefined;
|
|
175
195
|
}
|
|
176
196
|
render() {
|
|
177
|
-
return (h(Host, { key: '
|
|
197
|
+
return (h(Host, { key: 'dd3ae348f9e9c798acdeca095ad9c157afd4734f' }, h("div", { key: 'f2e13b6980318ede1812d4f54223b7aeb9cfc51b', id: "payment-request" }, h("div", { key: 'ff6c1218924044d1ffc11354909f25c1745ef254', id: "payment-request-button" })), h("slot", { key: 'ec2131a0503baa15cdcf3571040e9ce6040da708' })));
|
|
178
198
|
}
|
|
179
199
|
static get is() { return "stripe-payment-request-button"; }
|
|
180
200
|
static get originalStyleUrls() {
|
|
@@ -199,7 +219,8 @@ export class StripePaymentRequestButton {
|
|
|
199
219
|
"PaymentRequestPaymentMethodEventHandler": {
|
|
200
220
|
"location": "import",
|
|
201
221
|
"path": "../../interfaces",
|
|
202
|
-
"id": "src/interfaces.ts::PaymentRequestPaymentMethodEventHandler"
|
|
222
|
+
"id": "src/interfaces.ts::PaymentRequestPaymentMethodEventHandler",
|
|
223
|
+
"referenceLocation": "PaymentRequestPaymentMethodEventHandler"
|
|
203
224
|
}
|
|
204
225
|
}
|
|
205
226
|
},
|
|
@@ -225,7 +246,8 @@ export class StripePaymentRequestButton {
|
|
|
225
246
|
"PaymentRequestShippingOptionEventHandler": {
|
|
226
247
|
"location": "import",
|
|
227
248
|
"path": "../../interfaces",
|
|
228
|
-
"id": "src/interfaces.ts::PaymentRequestShippingOptionEventHandler"
|
|
249
|
+
"id": "src/interfaces.ts::PaymentRequestShippingOptionEventHandler",
|
|
250
|
+
"referenceLocation": "PaymentRequestShippingOptionEventHandler"
|
|
229
251
|
}
|
|
230
252
|
}
|
|
231
253
|
},
|
|
@@ -251,7 +273,8 @@ export class StripePaymentRequestButton {
|
|
|
251
273
|
"PaymentRequestShippingAddressEventHandler": {
|
|
252
274
|
"location": "import",
|
|
253
275
|
"path": "../../interfaces",
|
|
254
|
-
"id": "src/interfaces.ts::PaymentRequestShippingAddressEventHandler"
|
|
276
|
+
"id": "src/interfaces.ts::PaymentRequestShippingAddressEventHandler",
|
|
277
|
+
"referenceLocation": "PaymentRequestShippingAddressEventHandler"
|
|
255
278
|
}
|
|
256
279
|
}
|
|
257
280
|
},
|
|
@@ -338,7 +361,8 @@ export class StripePaymentRequestButton {
|
|
|
338
361
|
"StripeDidLoadedHandler": {
|
|
339
362
|
"location": "import",
|
|
340
363
|
"path": "../../interfaces",
|
|
341
|
-
"id": "src/interfaces.ts::StripeDidLoadedHandler"
|
|
364
|
+
"id": "src/interfaces.ts::StripeDidLoadedHandler",
|
|
365
|
+
"referenceLocation": "StripeDidLoadedHandler"
|
|
342
366
|
}
|
|
343
367
|
}
|
|
344
368
|
},
|
|
@@ -381,7 +405,8 @@ export class StripePaymentRequestButton {
|
|
|
381
405
|
"StripeLoadedEvent": {
|
|
382
406
|
"location": "import",
|
|
383
407
|
"path": "../../interfaces",
|
|
384
|
-
"id": "src/interfaces.ts::StripeLoadedEvent"
|
|
408
|
+
"id": "src/interfaces.ts::StripeLoadedEvent",
|
|
409
|
+
"referenceLocation": "StripeLoadedEvent"
|
|
385
410
|
}
|
|
386
411
|
}
|
|
387
412
|
}
|
|
@@ -405,7 +430,8 @@ export class StripePaymentRequestButton {
|
|
|
405
430
|
"PaymentRequestWallet": {
|
|
406
431
|
"location": "import",
|
|
407
432
|
"path": "@stripe/stripe-js",
|
|
408
|
-
"id": "node_modules::PaymentRequestWallet"
|
|
433
|
+
"id": "node_modules::PaymentRequestWallet",
|
|
434
|
+
"referenceLocation": "PaymentRequestWallet"
|
|
409
435
|
}
|
|
410
436
|
},
|
|
411
437
|
"return": "Promise<void>"
|
|
@@ -431,7 +457,8 @@ export class StripePaymentRequestButton {
|
|
|
431
457
|
"PaymentRequestPaymentMethodEventHandler": {
|
|
432
458
|
"location": "import",
|
|
433
459
|
"path": "../../interfaces",
|
|
434
|
-
"id": "src/interfaces.ts::PaymentRequestPaymentMethodEventHandler"
|
|
460
|
+
"id": "src/interfaces.ts::PaymentRequestPaymentMethodEventHandler",
|
|
461
|
+
"referenceLocation": "PaymentRequestPaymentMethodEventHandler"
|
|
435
462
|
}
|
|
436
463
|
},
|
|
437
464
|
"return": "Promise<void>"
|
|
@@ -457,7 +484,8 @@ export class StripePaymentRequestButton {
|
|
|
457
484
|
"PaymentRequestShippingOptionEventHandler": {
|
|
458
485
|
"location": "import",
|
|
459
486
|
"path": "../../interfaces",
|
|
460
|
-
"id": "src/interfaces.ts::PaymentRequestShippingOptionEventHandler"
|
|
487
|
+
"id": "src/interfaces.ts::PaymentRequestShippingOptionEventHandler",
|
|
488
|
+
"referenceLocation": "PaymentRequestShippingOptionEventHandler"
|
|
461
489
|
}
|
|
462
490
|
},
|
|
463
491
|
"return": "Promise<void>"
|
|
@@ -483,7 +511,8 @@ export class StripePaymentRequestButton {
|
|
|
483
511
|
"PaymentRequestShippingAddressEventHandler": {
|
|
484
512
|
"location": "import",
|
|
485
513
|
"path": "../../interfaces",
|
|
486
|
-
"id": "src/interfaces.ts::PaymentRequestShippingAddressEventHandler"
|
|
514
|
+
"id": "src/interfaces.ts::PaymentRequestShippingAddressEventHandler",
|
|
515
|
+
"referenceLocation": "PaymentRequestShippingAddressEventHandler"
|
|
487
516
|
}
|
|
488
517
|
},
|
|
489
518
|
"return": "Promise<void>"
|
|
@@ -509,7 +538,8 @@ export class StripePaymentRequestButton {
|
|
|
509
538
|
"PaymentRequestOptions": {
|
|
510
539
|
"location": "import",
|
|
511
540
|
"path": "@stripe/stripe-js",
|
|
512
|
-
"id": "node_modules::PaymentRequestOptions"
|
|
541
|
+
"id": "node_modules::PaymentRequestOptions",
|
|
542
|
+
"referenceLocation": "PaymentRequestOptions"
|
|
513
543
|
}
|
|
514
544
|
},
|
|
515
545
|
"return": "Promise<this>"
|
|
@@ -560,4 +590,3 @@ export class StripePaymentRequestButton {
|
|
|
560
590
|
}
|
|
561
591
|
static get elementRef() { return "el"; }
|
|
562
592
|
}
|
|
563
|
-
//# sourceMappingURL=stripe-payment-request-button.js.map
|
package/dist/collection/index.js
CHANGED
|
@@ -31,11 +31,11 @@ export class AddressElementManager {
|
|
|
31
31
|
*/
|
|
32
32
|
async initialize(containerElement, options) {
|
|
33
33
|
const elements = this.stripeService.getElements();
|
|
34
|
-
if (
|
|
34
|
+
if (elements == null) {
|
|
35
35
|
throw new Error('StripeService not initialized. Call StripeService.initialize() first.');
|
|
36
36
|
}
|
|
37
37
|
// Unmount if already initialized
|
|
38
|
-
if (this.addressElement) {
|
|
38
|
+
if (this.addressElement != null) {
|
|
39
39
|
this.unmount();
|
|
40
40
|
}
|
|
41
41
|
// Create and mount address element
|
|
@@ -73,11 +73,10 @@ export class AddressElementManager {
|
|
|
73
73
|
* Unmount address element
|
|
74
74
|
*/
|
|
75
75
|
unmount() {
|
|
76
|
-
if (
|
|
76
|
+
if (this.addressElement == null) {
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
this.addressElement.unmount();
|
|
80
80
|
this.addressElement = undefined;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
//# sourceMappingURL=address-element-manager.js.map
|
|
@@ -31,11 +31,11 @@ export class CardElementManager {
|
|
|
31
31
|
*/
|
|
32
32
|
async initialize(containerElement) {
|
|
33
33
|
const elements = this.stripeService.getElements();
|
|
34
|
-
if (
|
|
34
|
+
if (elements == null) {
|
|
35
35
|
throw new Error('StripeService not initialized. Call StripeService.initialize() first.');
|
|
36
36
|
}
|
|
37
37
|
// Unmount if already initialized
|
|
38
|
-
if (this.cardElements) {
|
|
38
|
+
if (this.cardElements != null) {
|
|
39
39
|
this.unmount();
|
|
40
40
|
}
|
|
41
41
|
// Create and mount card number element
|
|
@@ -86,7 +86,7 @@ export class CardElementManager {
|
|
|
86
86
|
*/
|
|
87
87
|
unmount() {
|
|
88
88
|
var _a, _b, _c;
|
|
89
|
-
if (
|
|
89
|
+
if (this.cardElements == null) {
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
(_a = this.cardElements.cardNumber) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
@@ -114,4 +114,3 @@ export class CardElementManager {
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
//# sourceMappingURL=card-element-manager.js.map
|
|
@@ -32,11 +32,11 @@ export class CurrencySelectorElementManager {
|
|
|
32
32
|
*/
|
|
33
33
|
async initialize(containerElement, options) {
|
|
34
34
|
const elements = this.stripeService.getElements();
|
|
35
|
-
if (
|
|
35
|
+
if (elements == null) {
|
|
36
36
|
throw new Error('StripeService not initialized. Call StripeService.initialize() first.');
|
|
37
37
|
}
|
|
38
38
|
// Unmount if already initialized
|
|
39
|
-
if (this.currencySelectorElement) {
|
|
39
|
+
if (this.currencySelectorElement != null) {
|
|
40
40
|
this.unmount();
|
|
41
41
|
}
|
|
42
42
|
// Find mount point first to avoid element leak if findElement throws
|
|
@@ -82,11 +82,10 @@ export class CurrencySelectorElementManager {
|
|
|
82
82
|
* Unmount currency selector element
|
|
83
83
|
*/
|
|
84
84
|
unmount() {
|
|
85
|
-
if (
|
|
85
|
+
if (this.currencySelectorElement == null) {
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
this.currencySelectorElement.unmount();
|
|
89
89
|
this.currencySelectorElement = undefined;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
//# sourceMappingURL=currency-selector-element-manager.js.map
|
|
@@ -32,11 +32,11 @@ export class ExpressCheckoutElementManager {
|
|
|
32
32
|
*/
|
|
33
33
|
async initialize(containerElement, options, eventHandlers) {
|
|
34
34
|
const elements = this.stripeService.getElements();
|
|
35
|
-
if (
|
|
35
|
+
if (elements == null) {
|
|
36
36
|
throw new Error('StripeService not initialized. Call StripeService.initialize() first.');
|
|
37
37
|
}
|
|
38
38
|
// Unmount if already initialized
|
|
39
|
-
if (this.expressCheckoutElement) {
|
|
39
|
+
if (this.expressCheckoutElement != null) {
|
|
40
40
|
this.unmount();
|
|
41
41
|
}
|
|
42
42
|
// Convert buttonHeight from string to number if present
|
|
@@ -54,19 +54,19 @@ export class ExpressCheckoutElementManager {
|
|
|
54
54
|
// Find the mount point
|
|
55
55
|
const mountPoint = await findElement(containerElement, '#express-checkout-element');
|
|
56
56
|
// Set up event handlers before mounting
|
|
57
|
-
if (eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onConfirm) {
|
|
57
|
+
if ((eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onConfirm) != null) {
|
|
58
58
|
expressCheckout.on('confirm', eventHandlers.onConfirm);
|
|
59
59
|
}
|
|
60
|
-
if (eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onClick) {
|
|
60
|
+
if ((eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onClick) != null) {
|
|
61
61
|
expressCheckout.on('click', eventHandlers.onClick);
|
|
62
62
|
}
|
|
63
|
-
if (eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onCancel) {
|
|
63
|
+
if ((eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onCancel) != null) {
|
|
64
64
|
expressCheckout.on('cancel', eventHandlers.onCancel);
|
|
65
65
|
}
|
|
66
|
-
if (eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onShippingAddressChange) {
|
|
66
|
+
if ((eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onShippingAddressChange) != null) {
|
|
67
67
|
expressCheckout.on('shippingaddresschange', eventHandlers.onShippingAddressChange);
|
|
68
68
|
}
|
|
69
|
-
if (eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onShippingRateChange) {
|
|
69
|
+
if ((eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.onShippingRateChange) != null) {
|
|
70
70
|
expressCheckout.on('shippingratechange', eventHandlers.onShippingRateChange);
|
|
71
71
|
}
|
|
72
72
|
// Add ready event handler
|
|
@@ -89,7 +89,7 @@ export class ExpressCheckoutElementManager {
|
|
|
89
89
|
* @param options - Partial options to update
|
|
90
90
|
*/
|
|
91
91
|
update(options) {
|
|
92
|
-
if (
|
|
92
|
+
if (this.expressCheckoutElement == null) {
|
|
93
93
|
console.warn('Express Checkout Element not initialized. Cannot update options.');
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
@@ -120,7 +120,7 @@ export class ExpressCheckoutElementManager {
|
|
|
120
120
|
* Unmount express checkout element
|
|
121
121
|
*/
|
|
122
122
|
unmount() {
|
|
123
|
-
if (
|
|
123
|
+
if (this.expressCheckoutElement == null) {
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
this.expressCheckoutElement.unmount();
|
|
@@ -128,4 +128,3 @@ export class ExpressCheckoutElementManager {
|
|
|
128
128
|
this.store.set('isReady', false);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
//# sourceMappingURL=express-checkout-element-manager.js.map
|
|
@@ -40,11 +40,11 @@ export class LinkAuthenticationElementManager {
|
|
|
40
40
|
*/
|
|
41
41
|
async initialize(containerElement, options) {
|
|
42
42
|
const elements = this.stripeService.getElements();
|
|
43
|
-
if (
|
|
43
|
+
if (elements == null) {
|
|
44
44
|
throw new Error('StripeService not initialized. Call StripeService.initialize() first.');
|
|
45
45
|
}
|
|
46
46
|
// Unmount if already initialized
|
|
47
|
-
if (this.linkAuthenticationElement) {
|
|
47
|
+
if (this.linkAuthenticationElement != null) {
|
|
48
48
|
this.unmount();
|
|
49
49
|
}
|
|
50
50
|
// Create link authentication element
|
|
@@ -83,11 +83,10 @@ export class LinkAuthenticationElementManager {
|
|
|
83
83
|
* Unmount link authentication element
|
|
84
84
|
*/
|
|
85
85
|
unmount() {
|
|
86
|
-
if (
|
|
86
|
+
if (this.linkAuthenticationElement == null) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
this.linkAuthenticationElement.unmount();
|
|
90
90
|
this.linkAuthenticationElement = undefined;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
//# sourceMappingURL=link-authentication-element-manager.js.map
|
|
@@ -33,13 +33,13 @@ export class PaymentElementManager {
|
|
|
33
33
|
async initialize(containerElement, options) {
|
|
34
34
|
const isCheckoutSession = this.stripeService.state.isCheckoutSession;
|
|
35
35
|
// Unmount if already initialized
|
|
36
|
-
if (this.paymentElement) {
|
|
36
|
+
if (this.paymentElement != null) {
|
|
37
37
|
this.unmount();
|
|
38
38
|
}
|
|
39
39
|
if (isCheckoutSession) {
|
|
40
40
|
// Checkout Session mode: use checkout.createPaymentElement()
|
|
41
41
|
const checkout = this.stripeService.getCheckout();
|
|
42
|
-
if (
|
|
42
|
+
if (checkout == null) {
|
|
43
43
|
throw new Error('StripeService not initialized with Checkout Session. Call StripeService.initializeWithCheckoutSession() first.');
|
|
44
44
|
}
|
|
45
45
|
// Create payment element using Checkout instance
|
|
@@ -48,7 +48,7 @@ export class PaymentElementManager {
|
|
|
48
48
|
else {
|
|
49
49
|
// Payment Intent mode: use elements.create('payment')
|
|
50
50
|
const elements = this.stripeService.getElements();
|
|
51
|
-
if (
|
|
51
|
+
if (elements == null) {
|
|
52
52
|
throw new Error('StripeService not initialized. Call StripeService.initialize() first.');
|
|
53
53
|
}
|
|
54
54
|
// Create payment element with options
|
|
@@ -85,11 +85,10 @@ export class PaymentElementManager {
|
|
|
85
85
|
* Unmount payment element
|
|
86
86
|
*/
|
|
87
87
|
unmount() {
|
|
88
|
-
if (
|
|
88
|
+
if (this.paymentElement == null) {
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
this.paymentElement.unmount();
|
|
92
92
|
this.paymentElement = undefined;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
//# sourceMappingURL=payment-element-manager.js.map
|
|
@@ -12,6 +12,8 @@ class StripeServiceClass {
|
|
|
12
12
|
applicationName: 'stripe-pwa-elements',
|
|
13
13
|
isCheckoutSession: false,
|
|
14
14
|
});
|
|
15
|
+
/** Incremented on every init so that a slower, older call cannot overwrite newer state */
|
|
16
|
+
this.initGeneration = 0;
|
|
15
17
|
this.changeListeners = new Map();
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
@@ -39,20 +41,28 @@ class StripeServiceClass {
|
|
|
39
41
|
/**
|
|
40
42
|
* Initialize Stripe.js client with Payment Intent mode
|
|
41
43
|
* @param publishableKey - Your Stripe publishable API key
|
|
42
|
-
* @param options - Optional configuration
|
|
44
|
+
* @param options - Optional configuration (`clientSecret` is the PaymentIntent / SetupIntent client secret)
|
|
43
45
|
*/
|
|
44
46
|
async initialize(publishableKey, options) {
|
|
47
|
+
const generation = ++this.initGeneration;
|
|
48
|
+
// Capture the previous config before overwriting it, so we can detect real changes
|
|
49
|
+
const isUpToDate = this.store.state.stripe != null &&
|
|
50
|
+
!this.store.state.isCheckoutSession &&
|
|
51
|
+
this.store.state.publishableKey === publishableKey &&
|
|
52
|
+
this.store.state.stripeAccount === (options === null || options === void 0 ? void 0 : options.stripeAccount) &&
|
|
53
|
+
this.intentClientSecret === (options === null || options === void 0 ? void 0 : options.clientSecret);
|
|
45
54
|
// Update configuration
|
|
46
55
|
this.store.state.publishableKey = publishableKey;
|
|
47
56
|
this.store.state.isCheckoutSession = false;
|
|
48
|
-
|
|
57
|
+
this.intentClientSecret = options === null || options === void 0 ? void 0 : options.clientSecret;
|
|
58
|
+
if ((options === null || options === void 0 ? void 0 : options.stripeAccount) != null && (options === null || options === void 0 ? void 0 : options.stripeAccount) !== '') {
|
|
49
59
|
this.store.state.stripeAccount = options.stripeAccount;
|
|
50
60
|
}
|
|
51
|
-
if (options === null || options === void 0 ? void 0 : options.applicationName) {
|
|
61
|
+
if ((options === null || options === void 0 ? void 0 : options.applicationName) != null && (options === null || options === void 0 ? void 0 : options.applicationName) !== '') {
|
|
52
62
|
this.store.state.applicationName = options.applicationName;
|
|
53
63
|
}
|
|
54
64
|
// If Stripe.js already loaded with same config, do nothing
|
|
55
|
-
if (
|
|
65
|
+
if (isUpToDate) {
|
|
56
66
|
return;
|
|
57
67
|
}
|
|
58
68
|
this.store.state.loadStripeStatus = 'loading';
|
|
@@ -60,12 +70,16 @@ class StripeServiceClass {
|
|
|
60
70
|
const stripe = await loadStripe(publishableKey, {
|
|
61
71
|
stripeAccount: options === null || options === void 0 ? void 0 : options.stripeAccount,
|
|
62
72
|
});
|
|
73
|
+
if (generation !== this.initGeneration) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
63
76
|
// Register app info
|
|
64
77
|
stripe.registerAppInfo({
|
|
65
78
|
name: this.store.state.applicationName,
|
|
66
79
|
});
|
|
67
80
|
this.store.state.stripe = stripe;
|
|
68
|
-
|
|
81
|
+
// Payment Element requires the client secret at Elements creation time
|
|
82
|
+
this.store.state.elements = (options === null || options === void 0 ? void 0 : options.clientSecret) != null && options.clientSecret !== '' ? stripe.elements({ clientSecret: options.clientSecret }) : stripe.elements();
|
|
69
83
|
this.store.state.checkout = undefined;
|
|
70
84
|
this.store.state.loadStripeStatus = 'success';
|
|
71
85
|
}
|
|
@@ -78,16 +92,17 @@ class StripeServiceClass {
|
|
|
78
92
|
* Initialize Stripe.js client with Checkout Session mode
|
|
79
93
|
* @param publishableKey - Your Stripe publishable API key
|
|
80
94
|
* @param checkoutSessionClientSecret - The client secret from Checkout Session
|
|
81
|
-
* @param options - Optional configuration
|
|
95
|
+
* @param options - Optional configuration (`clientSecret` is the PaymentIntent / SetupIntent client secret)
|
|
82
96
|
*/
|
|
83
97
|
async initializeWithCheckoutSession(publishableKey, checkoutSessionClientSecret, options) {
|
|
98
|
+
const generation = ++this.initGeneration;
|
|
84
99
|
// Update configuration
|
|
85
100
|
this.store.state.publishableKey = publishableKey;
|
|
86
101
|
this.store.state.isCheckoutSession = true;
|
|
87
|
-
if (options === null || options === void 0 ? void 0 : options.stripeAccount) {
|
|
102
|
+
if ((options === null || options === void 0 ? void 0 : options.stripeAccount) != null && (options === null || options === void 0 ? void 0 : options.stripeAccount) !== '') {
|
|
88
103
|
this.store.state.stripeAccount = options.stripeAccount;
|
|
89
104
|
}
|
|
90
|
-
if (options === null || options === void 0 ? void 0 : options.applicationName) {
|
|
105
|
+
if ((options === null || options === void 0 ? void 0 : options.applicationName) != null && (options === null || options === void 0 ? void 0 : options.applicationName) !== '') {
|
|
91
106
|
this.store.state.applicationName = options.applicationName;
|
|
92
107
|
}
|
|
93
108
|
this.store.state.loadStripeStatus = 'loading';
|
|
@@ -95,13 +110,16 @@ class StripeServiceClass {
|
|
|
95
110
|
const stripe = await loadStripe(publishableKey, {
|
|
96
111
|
stripeAccount: options === null || options === void 0 ? void 0 : options.stripeAccount,
|
|
97
112
|
});
|
|
113
|
+
if (generation !== this.initGeneration) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
98
116
|
// Register app info
|
|
99
117
|
stripe.registerAppInfo({
|
|
100
118
|
name: this.store.state.applicationName,
|
|
101
119
|
});
|
|
102
120
|
this.store.state.stripe = stripe;
|
|
103
121
|
// Initialize Checkout instance instead of Elements
|
|
104
|
-
const checkout = stripe.
|
|
122
|
+
const checkout = stripe.initCheckoutElementsSdk({
|
|
105
123
|
clientSecret: checkoutSessionClientSecret,
|
|
106
124
|
elementsOptions: options === null || options === void 0 ? void 0 : options.elementsOptions,
|
|
107
125
|
});
|
|
@@ -164,4 +182,3 @@ export const StripeService = new StripeServiceClass();
|
|
|
164
182
|
* Export class for DI usage
|
|
165
183
|
*/
|
|
166
184
|
export { StripeServiceClass };
|
|
167
|
-
//# sourceMappingURL=stripe-service.js.map
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
export function findElement(containerElement, selector, timeout = 5000) {
|
|
9
9
|
return new Promise((resolve, reject) => {
|
|
10
10
|
const elem = containerElement.querySelector(selector);
|
|
11
|
-
if (elem) {
|
|
11
|
+
if (elem != null) {
|
|
12
12
|
return resolve(elem);
|
|
13
13
|
}
|
|
14
14
|
const timeoutId = setTimeout(() => {
|
|
@@ -17,7 +17,7 @@ export function findElement(containerElement, selector, timeout = 5000) {
|
|
|
17
17
|
}, timeout);
|
|
18
18
|
const observer = new MutationObserver(() => {
|
|
19
19
|
const elem = containerElement.querySelector(selector);
|
|
20
|
-
if (elem) {
|
|
20
|
+
if (elem != null) {
|
|
21
21
|
clearTimeout(timeoutId);
|
|
22
22
|
observer.disconnect();
|
|
23
23
|
resolve(elem);
|
|
@@ -29,4 +29,3 @@ export function findElement(containerElement, selector, timeout = 5000) {
|
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
//# sourceMappingURL=element-finder.js.map
|
|
@@ -10,11 +10,11 @@ export const checkPlatform = () => {
|
|
|
10
10
|
};
|
|
11
11
|
export const waitForElm = (el, selector) => {
|
|
12
12
|
return new Promise(resolve => {
|
|
13
|
-
if (el.querySelector(selector)) {
|
|
13
|
+
if (el.querySelector(selector) != null) {
|
|
14
14
|
return resolve(el.querySelector(selector));
|
|
15
15
|
}
|
|
16
16
|
const observer = new MutationObserver(() => {
|
|
17
|
-
if (el.querySelector(selector)) {
|
|
17
|
+
if (el.querySelector(selector) != null) {
|
|
18
18
|
resolve(el.querySelector(selector));
|
|
19
19
|
observer.disconnect();
|
|
20
20
|
}
|
|
@@ -25,4 +25,3 @@ export const waitForElm = (el, selector) => {
|
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/components/error.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
class
|
|
2
|
-
constructor(error) {
|
|
3
|
-
super(error.message);
|
|
4
|
-
this.code = error.code;
|
|
5
|
-
this.docUrl = error.doc_url;
|
|
6
|
-
this.message = error.message;
|
|
7
|
-
this.param = error.param;
|
|
8
|
-
this.requestLogUrl = error.request_log_url;
|
|
9
|
-
this.type = error.type;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { StripeAPIError as S };
|
|
14
|
-
//# sourceMappingURL=error.js.map
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=error.js.map
|
|
1
|
+
class s extends Error{constructor(s){super(s.message),this.code=s.code,this.docUrl=s.doc_url,this.message=s.message,this.param=s.param,this.requestLogUrl=s.request_log_url,this.type=s.type}}export{s as S}
|