@paynext/sdk 0.0.88 → 0.0.90
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.es.js +5 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4884,8 +4884,7 @@ class vl {
|
|
|
4884
4884
|
});
|
|
4885
4885
|
});
|
|
4886
4886
|
}
|
|
4887
|
-
|
|
4888
|
-
waitForElementVisible(t, e = 2e3) {
|
|
4887
|
+
waitForElementVisible(t, e = 150) {
|
|
4889
4888
|
return !t || !(t instanceof HTMLElement) ? Promise.resolve() : new Promise((r) => {
|
|
4890
4889
|
const a = performance.now(), i = () => {
|
|
4891
4890
|
const s = t.getBoundingClientRect();
|
|
@@ -4932,7 +4931,7 @@ class vl {
|
|
|
4932
4931
|
yield Promise.all(c), this.handleReady();
|
|
4933
4932
|
});
|
|
4934
4933
|
}
|
|
4935
|
-
//
|
|
4934
|
+
// initialize button instances only for active payment methods
|
|
4936
4935
|
initializeButtonInstances(t) {
|
|
4937
4936
|
const e = t.map(({ type: r }) => r);
|
|
4938
4937
|
e.includes(q.APPLE_PAY) && !this.applePay && (this.applePay = new Zc(this.config)), e.includes(q.GOOGLE_PAY) && !this.googlePay && (this.googlePay = new nl(this.config)), e.includes(q.PAYPAL) && !this.paypal && (this.paypal = new al(this.config), this.paypal.addEventListener("onPaymentAttempt", (r) => this.events.onPaymentAttempt.emit(r))), e.includes(q.VENMO) && !this.braintree && (this.braintree = new ml(this.config), this.braintree.addEventListener("onPaymentAttempt", (r) => this.events.onPaymentAttempt.emit(r))), e.includes(q.CARD) && !this.card && (this.card = new cl(this.config), this.card.addEventListener(() => {
|
|
@@ -5759,8 +5758,6 @@ class gd {
|
|
|
5759
5758
|
C(this, "name");
|
|
5760
5759
|
C(this, "cardSecurity");
|
|
5761
5760
|
C(this, "onPaymentAttempt");
|
|
5762
|
-
// keep translate in constructor for child components; no direct member needed
|
|
5763
|
-
// private readonly translate: TranslateState
|
|
5764
5761
|
C(this, "isBackVisible", !0);
|
|
5765
5762
|
C(this, "events", {
|
|
5766
5763
|
submit: new oe(),
|
|
@@ -5780,15 +5777,15 @@ class gd {
|
|
|
5780
5777
|
this.element.style.setProperty("--input-focus-shadow-color", d);
|
|
5781
5778
|
}), this.back.addEventListener(() => this.events.close.emit()), this.number.addEventListener("change", ({ cardType: c }) => this.cardSecurity.updateCardType(c || null)), this.submit.addEventListener((c) => {
|
|
5782
5779
|
var p;
|
|
5783
|
-
c.preventDefault()
|
|
5780
|
+
c.preventDefault();
|
|
5784
5781
|
const { cvc: l, expiry: d } = this.cardSecurity.value(), { value: u, cardType: h } = this.number.value();
|
|
5785
|
-
this.touchSubmit(), this.validate() && this.events.submit.emit({
|
|
5782
|
+
this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod: q.CARD }), this.events.submit.emit({
|
|
5786
5783
|
number: u,
|
|
5787
5784
|
expiry: d,
|
|
5788
5785
|
cvc: l,
|
|
5789
5786
|
name: this.name.value(),
|
|
5790
5787
|
cardBrand: h
|
|
5791
|
-
});
|
|
5788
|
+
}));
|
|
5792
5789
|
});
|
|
5793
5790
|
}
|
|
5794
5791
|
addEventListener(t, e) {
|