@adyen/adyen-web 6.31.1 → 6.32.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/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +178 -152
- package/dist/es/components/ANCV/ANCV.js.map +1 -1
- package/dist/es/components/ANCV/components/ANCVInput.js.map +1 -1
- package/dist/es/components/Ach/Ach.js.map +1 -1
- package/dist/es/components/Ach/components/AccountTypeSelector.js.map +1 -1
- package/dist/es/components/Ach/components/AchComponent.js.map +1 -1
- package/dist/es/components/Address/Address.js.map +1 -1
- package/dist/es/components/Affirm/Affirm.js.map +1 -1
- package/dist/es/components/AfterPay/AfterPay.js.map +1 -1
- package/dist/es/components/AfterPay/AfterPayB2B.js.map +1 -1
- package/dist/es/components/AmazonPay/AmazonPay.js.map +1 -1
- package/dist/es/components/AmazonPay/components/AmazonPayButton.js.map +1 -1
- package/dist/es/components/AmazonPay/components/AmazonPayComponent.js.map +1 -1
- package/dist/es/components/AmazonPay/components/ChangePaymentDetailsButton.js.map +1 -1
- package/dist/es/components/AmazonPay/components/OrderButton.js.map +1 -1
- package/dist/es/components/AmazonPay/components/SignOutButton.js.map +1 -1
- package/dist/es/components/ApplePay/ApplePay.js.map +1 -1
- package/dist/es/components/ApplePay/components/ApplePayButton.js.map +1 -1
- package/dist/es/components/ApplePay/utils/payment-request.js +1 -1
- package/dist/es/components/Atome/Atome.js.map +1 -1
- package/dist/es/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es/components/BacsDD/components/BacsInput.js.map +1 -1
- package/dist/es/components/BankTransfer/BankTransfer.js.map +1 -1
- package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferResult.js.map +1 -1
- package/dist/es/components/BcmcMobile/BcmcMobile.js.map +1 -1
- package/dist/es/components/BillDesk/BillDeskOnline.js.map +1 -1
- package/dist/es/components/BillDesk/BillDeskWallet.js.map +1 -1
- package/dist/es/components/Blik/Blik.js.map +1 -1
- package/dist/es/components/Blik/components/BlikInput.js.map +1 -1
- package/dist/es/components/Boleto/Boleto.js.map +1 -1
- package/dist/es/components/Boleto/components/BoletoInput/BoletoInput.js.map +1 -1
- package/dist/es/components/Card/Bancontact.js.map +1 -1
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVCHint.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardFields.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardHolderName.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/DataSfSpan.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/Installments/Installments.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/Installments/Installments.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/KCPAuthentication.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/handlers.js +1 -1
- package/dist/es/components/Card/components/CardInput/handlers.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es/components/Card/components/ClickToPayHolder.js.map +1 -1
- package/dist/es/components/Card/components/ClickToPayWrapper.js.map +1 -1
- package/dist/es/components/Card/components/Fastlane/FastlaneSignup.js.map +1 -1
- package/dist/es/components/Card/components/Fastlane/InfoModal.js.map +1 -1
- package/dist/es/components/Card/components/Fastlane/USOnlyPhoneInput.js.map +1 -1
- package/dist/es/components/CashAppPay/CashAppPay.js.map +1 -1
- package/dist/es/components/CashAppPay/components/CashAppComponent.js.map +1 -1
- package/dist/es/components/ClickToPay/ClickToPay.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es/components/Doku/Doku.js.map +1 -1
- package/dist/es/components/Doku/components/DokuVoucherResult/DokuVoucherResult.js.map +1 -1
- package/dist/es/components/Donation/Donation.js.map +1 -1
- package/dist/es/components/Donation/components/CampaignContent.js.map +1 -1
- package/dist/es/components/Donation/components/CampaignInfo.js.map +1 -1
- package/dist/es/components/Donation/components/DonationComponent.js.map +1 -1
- package/dist/es/components/Donation/components/FixedAmounts.js.map +1 -1
- package/dist/es/components/Donation/components/Roundup.js.map +1 -1
- package/dist/es/components/Dotpay/index.js.map +1 -1
- package/dist/es/components/Dragonpay/Dragonpay.js.map +1 -1
- package/dist/es/components/Dragonpay/components/DragonpayInput/DragonpayInput.js.map +1 -1
- package/dist/es/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.js.map +1 -1
- package/dist/es/components/Dropin/Dropin.js.map +1 -1
- package/dist/es/components/Dropin/components/DropinSuccessState.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
- package/dist/es/components/DuitNow/DuitNow.js.map +1 -1
- package/dist/es/components/EPS/index.js.map +1 -1
- package/dist/es/components/Econtext/Econtext.js.map +1 -1
- package/dist/es/components/Econtext/components/EcontextVoucherResult/EcontextVoucherResult.js.map +1 -1
- package/dist/es/components/FacilyPay/FacilyPay10x.js.map +1 -1
- package/dist/es/components/FacilyPay/FacilyPay12x.js.map +1 -1
- package/dist/es/components/FacilyPay/FacilyPay3x.js.map +1 -1
- package/dist/es/components/FacilyPay/FacilyPay4x.js.map +1 -1
- package/dist/es/components/FacilyPay/FacilyPay6x.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardFields.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardNumberField.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardPinField.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardResult.js.map +1 -1
- package/dist/es/components/Giropay/Giropay.js.map +1 -1
- package/dist/es/components/GooglePay/GooglePay.js.map +1 -1
- package/dist/es/components/GooglePay/components/GooglePayButton.js.map +1 -1
- package/dist/es/components/GooglePay/requests.js +1 -1
- package/dist/es/components/GooglePay/requests.js.map +1 -1
- package/dist/es/components/GooglePay/utils.js +1 -1
- package/dist/es/components/GooglePay/utils.js.map +1 -1
- package/dist/es/components/Klarna/KlarnaPayments.js.map +1 -1
- package/dist/es/components/Klarna/components/KlarnaContainer/KlarnaContainer.js.map +1 -1
- package/dist/es/components/Klarna/components/KlarnaWidget/KlarnaWidget.js.map +1 -1
- package/dist/es/components/MBWay/MBWay.js.map +1 -1
- package/dist/es/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
- package/dist/es/components/MealVoucherFR/MealVoucherFR.js.map +1 -1
- package/dist/es/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
- package/dist/es/components/MealVoucherFR/components/MealVoucherFields.js.map +1 -1
- package/dist/es/components/MolPayEBanking/MolPayEBankingMY.js.map +1 -1
- package/dist/es/components/MolPayEBanking/MolPayEBankingTH.js.map +1 -1
- package/dist/es/components/MolPayEBanking/MolPayEBankingVN.js.map +1 -1
- package/dist/es/components/Multibanco/Multibanco.js.map +1 -1
- package/dist/es/components/Multibanco/components/MultibancoVoucherResult/MultibancoVoucherResult.js.map +1 -1
- package/dist/es/components/OnlineBankingCZ/index.js.map +1 -1
- package/dist/es/components/OnlineBankingFI/OnlineBankingFI.js.map +1 -1
- package/dist/es/components/OnlineBankingIN/index.js.map +1 -1
- package/dist/es/components/OnlineBankingPL/OnlineBankingPL.js.map +1 -1
- package/dist/es/components/OnlineBankingSK/index.js.map +1 -1
- package/dist/es/components/Oxxo/Oxxo.js.map +1 -1
- package/dist/es/components/Oxxo/components/OxxoVoucherResult/OxxoVoucherResult.js.map +1 -1
- package/dist/es/components/PayByBank/PayByBank.js.map +1 -1
- package/dist/es/components/PayByBankPix/components/Enrollment/Enrollment.js.map +1 -1
- package/dist/es/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.js.map +1 -1
- package/dist/es/components/PayByBankPix/components/StoredPayment/StoredPayment.js.map +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es/components/PayMe/PayMe.js.map +1 -1
- package/dist/es/components/PayNow/PayNow.js.map +1 -1
- package/dist/es/components/PayPal/Paypal.js.map +1 -1
- package/dist/es/components/PayPal/components/PaypalButtons.js.map +1 -1
- package/dist/es/components/PayPal/components/PaypalComponent.js.map +1 -1
- package/dist/es/components/PayPalFastlane/Fastlane.js.map +1 -1
- package/dist/es/components/PayPalFastlane/components/FaslaneCardBrandIcon.js.map +1 -1
- package/dist/es/components/PayPalFastlane/components/FastlaneComponent.js.map +1 -1
- package/dist/es/components/PayTo/PayTo.js.map +1 -1
- package/dist/es/components/PayTo/components/BSBInput.js.map +1 -1
- package/dist/es/components/PayTo/components/IdentifierSelector.js.map +1 -1
- package/dist/es/components/PayTo/components/MandateSummary.js.map +1 -1
- package/dist/es/components/PayTo/components/PayIDInput.js.map +1 -1
- package/dist/es/components/PayTo/components/PayToComponent.js.map +1 -1
- package/dist/es/components/PayTo/components/PayToNameFields.js.map +1 -1
- package/dist/es/components/PayTo/components/PayToPhone.js.map +1 -1
- package/dist/es/components/PayU/PayuCashcard.js.map +1 -1
- package/dist/es/components/PayU/PayuNetBanking.js.map +1 -1
- package/dist/es/components/Pix/Pix.js.map +1 -1
- package/dist/es/components/Pix/components/PixInput/PixInput.js.map +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
- package/dist/es/components/PromptPay/PromptPay.js.map +1 -1
- package/dist/es/components/RatePay/RatePay.js.map +1 -1
- package/dist/es/components/RatePay/RatePayDirectDebit.js.map +1 -1
- package/dist/es/components/Redirect/Redirect.js.map +1 -1
- package/dist/es/components/Redirect/components/RedirectShopper/RedirectShopper.js.map +1 -1
- package/dist/es/components/Riverty/Riverty.js.map +1 -1
- package/dist/es/components/Sepa/Sepa.js.map +1 -1
- package/dist/es/components/Swish/Swish.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Form/ThreeDS2Form.js.map +1 -1
- package/dist/es/components/Trustly/Trustly.js.map +1 -1
- package/dist/es/components/Twint/Twint.js.map +1 -1
- package/dist/es/components/UPI/UPI.js.map +1 -1
- package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js.map +1 -1
- package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js.map +1 -1
- package/dist/es/components/UPI/components/UPIMandate/UPIMandate.js.map +1 -1
- package/dist/es/components/Vipps/Vipps.js.map +1 -1
- package/dist/es/components/WalletIN/index.js.map +1 -1
- package/dist/es/components/WeChat/WeChat.js.map +1 -1
- package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
- package/dist/es/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
- package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
- package/dist/es/components/internal/Address/Address.js.map +1 -1
- package/dist/es/components/internal/Address/components/CountryField.js.map +1 -1
- package/dist/es/components/internal/Address/components/FieldContainer.js.map +1 -1
- package/dist/es/components/internal/Address/components/ReadOnlyAddress.js.map +1 -1
- package/dist/es/components/internal/Address/components/StateField.js.map +1 -1
- package/dist/es/components/internal/Alert/Alert.js.map +1 -1
- package/dist/es/components/internal/Await/Await.js.map +1 -1
- package/dist/es/components/internal/Await/components/AwaitFinalState.js.map +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es/components/internal/Brand/Brand.js.map +1 -1
- package/dist/es/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/context/ClickToPayProvider.js.map +1 -1
- package/dist/es/components/internal/ConsentCheckboxLabel/ConsentCheckboxLabel.js.map +1 -1
- package/dist/es/components/internal/ContentSeparator/ContentSeparator.js.map +1 -1
- package/dist/es/components/internal/Countdown/index.js.map +1 -1
- package/dist/es/components/internal/DisclaimerMessage/DisclaimerMessage.js.map +1 -1
- package/dist/es/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
- package/dist/es/components/internal/FormFields/Field/Field.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputDate/InputDate.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputEmail.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputText.js.map +1 -1
- package/dist/es/components/internal/FormFields/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioButtonIcon.js.map +1 -1
- package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
- package/dist/es/components/internal/IFrame/Iframe.js.map +1 -1
- package/dist/es/components/internal/IbanInput/IbanInput.js.map +1 -1
- package/dist/es/components/internal/Icon/Icon.js.map +1 -1
- package/dist/es/components/internal/Img/Img.js.map +1 -1
- package/dist/es/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.js.map +1 -1
- package/dist/es/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js.map +1 -1
- package/dist/es/components/internal/IssuerList/IssuerList.js.map +1 -1
- package/dist/es/components/internal/Link/Link.js.map +1 -1
- package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
- package/dist/es/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
- package/dist/es/components/internal/PayButton/PayButton.js.map +1 -1
- package/dist/es/components/internal/PhoneInput/PhoneInputFields.js.map +1 -1
- package/dist/es/components/internal/PhoneInput/PhoneInputForm.js.map +1 -1
- package/dist/es/components/internal/QRLoader/QRLoaderDetailsProvider.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRCodeCopyButton.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRCountdown.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRFinalState.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRImage.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRIntructions.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRProgressbar.js.map +1 -1
- package/dist/es/components/internal/RedirectButton/RedirectButton.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SFPUtils.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SFPUtils.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/utils/createIframe.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/utils/createIframe.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/utils.js +1 -1
- package/dist/es/components/internal/SecuredFields/utils.js.map +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControlRegion.js.map +1 -1
- package/dist/es/components/internal/Spinner/Spinner.js.map +1 -1
- package/dist/es/components/internal/StoreDetails/StoreDetails.js.map +1 -1
- package/dist/es/components/internal/Timeline/Timeline.js.map +1 -1
- package/dist/es/components/internal/Timeline/TimelineWrapper.js.map +1 -1
- package/dist/es/components/internal/Toggle/Toggle.js.map +1 -1
- package/dist/es/components/internal/Tooltip/SingletonTooltipProvider.js.map +1 -1
- package/dist/es/components/internal/Tooltip/Tooltip.js.map +1 -1
- package/dist/es/components/internal/Tooltip/TooltipController.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/core/Analytics/Analytics.js +1 -1
- package/dist/es/core/Analytics/Analytics.js.map +1 -1
- package/dist/es/core/Context/AmountProvider.js.map +1 -1
- package/dist/es/core/Context/CoreProvider.js.map +1 -1
- package/dist/es/core/Environment/Environment.js +1 -1
- package/dist/es/core/Environment/Environment.js.map +1 -1
- package/dist/es/core/Errors/AdyenCheckoutError.js.map +1 -1
- package/dist/es/core/Errors/SRMessages.js.map +1 -1
- package/dist/es/core/Errors/SRPanel.js.map +1 -1
- package/dist/es/core/Errors/SRPanelProvider.js.map +1 -1
- package/dist/es/core/Errors/utils.js +1 -1
- package/dist/es/core/ProcessResponse/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/es/core/ProcessResponse/PaymentMethods/PaymentMethods.js.map +1 -1
- package/dist/es/core/RiskModule/RiskModule.js.map +1 -1
- package/dist/es/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/core/core.js.map +1 -1
- package/dist/es/external/preact/compat/dist/compat.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es/hooks/usePaymentStatusTimer/usePaymentStatusTimer.js.map +1 -1
- package/dist/es/index.d.ts +178 -152
- package/dist/es/index.js +1 -1
- package/dist/es/utils/getOrigin.js +1 -1
- package/dist/es-legacy/components/ANCV/ANCV.js.map +1 -1
- package/dist/es-legacy/components/ANCV/components/ANCVInput.js.map +1 -1
- package/dist/es-legacy/components/Ach/Ach.js.map +1 -1
- package/dist/es-legacy/components/Ach/components/AccountTypeSelector.js.map +1 -1
- package/dist/es-legacy/components/Ach/components/AchComponent.js.map +1 -1
- package/dist/es-legacy/components/Address/Address.js.map +1 -1
- package/dist/es-legacy/components/Affirm/Affirm.js.map +1 -1
- package/dist/es-legacy/components/AfterPay/AfterPay.js.map +1 -1
- package/dist/es-legacy/components/AfterPay/AfterPayB2B.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/AmazonPay.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/components/AmazonPayButton.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/components/AmazonPayComponent.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/components/ChangePaymentDetailsButton.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/components/OrderButton.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/components/SignOutButton.js.map +1 -1
- package/dist/es-legacy/components/ApplePay/ApplePay.js.map +1 -1
- package/dist/es-legacy/components/ApplePay/components/ApplePayButton.js.map +1 -1
- package/dist/es-legacy/components/ApplePay/utils/payment-request.js +1 -1
- package/dist/es-legacy/components/Atome/Atome.js.map +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es-legacy/components/BacsDD/components/BacsInput.js.map +1 -1
- package/dist/es-legacy/components/BankTransfer/BankTransfer.js.map +1 -1
- package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferResult.js.map +1 -1
- package/dist/es-legacy/components/BcmcMobile/BcmcMobile.js.map +1 -1
- package/dist/es-legacy/components/BillDesk/BillDeskOnline.js.map +1 -1
- package/dist/es-legacy/components/BillDesk/BillDeskWallet.js.map +1 -1
- package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
- package/dist/es-legacy/components/Blik/components/BlikInput.js.map +1 -1
- package/dist/es-legacy/components/Boleto/Boleto.js.map +1 -1
- package/dist/es-legacy/components/Boleto/components/BoletoInput/BoletoInput.js.map +1 -1
- package/dist/es-legacy/components/Card/Bancontact.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVCHint.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardHolderName.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/DataSfSpan.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/Installments/Installments.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/Installments/Installments.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/KCPAuthentication.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/handlers.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/handlers.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es-legacy/components/Card/components/ClickToPayHolder.js.map +1 -1
- package/dist/es-legacy/components/Card/components/ClickToPayWrapper.js.map +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/FastlaneSignup.js.map +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/InfoModal.js.map +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/USOnlyPhoneInput.js.map +1 -1
- package/dist/es-legacy/components/CashAppPay/CashAppPay.js.map +1 -1
- package/dist/es-legacy/components/CashAppPay/components/CashAppComponent.js.map +1 -1
- package/dist/es-legacy/components/ClickToPay/ClickToPay.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es-legacy/components/Doku/Doku.js.map +1 -1
- package/dist/es-legacy/components/Doku/components/DokuVoucherResult/DokuVoucherResult.js.map +1 -1
- package/dist/es-legacy/components/Donation/Donation.js.map +1 -1
- package/dist/es-legacy/components/Donation/components/CampaignContent.js.map +1 -1
- package/dist/es-legacy/components/Donation/components/CampaignInfo.js.map +1 -1
- package/dist/es-legacy/components/Donation/components/DonationComponent.js.map +1 -1
- package/dist/es-legacy/components/Donation/components/FixedAmounts.js.map +1 -1
- package/dist/es-legacy/components/Donation/components/Roundup.js.map +1 -1
- package/dist/es-legacy/components/Dotpay/index.js.map +1 -1
- package/dist/es-legacy/components/Dragonpay/Dragonpay.js.map +1 -1
- package/dist/es-legacy/components/Dragonpay/components/DragonpayInput/DragonpayInput.js.map +1 -1
- package/dist/es-legacy/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.js.map +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/DropinSuccessState.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
- package/dist/es-legacy/components/DuitNow/DuitNow.js.map +1 -1
- package/dist/es-legacy/components/EPS/index.js.map +1 -1
- package/dist/es-legacy/components/Econtext/Econtext.js.map +1 -1
- package/dist/es-legacy/components/Econtext/components/EcontextVoucherResult/EcontextVoucherResult.js.map +1 -1
- package/dist/es-legacy/components/FacilyPay/FacilyPay10x.js.map +1 -1
- package/dist/es-legacy/components/FacilyPay/FacilyPay12x.js.map +1 -1
- package/dist/es-legacy/components/FacilyPay/FacilyPay3x.js.map +1 -1
- package/dist/es-legacy/components/FacilyPay/FacilyPay4x.js.map +1 -1
- package/dist/es-legacy/components/FacilyPay/FacilyPay6x.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardFields.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardNumberField.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardPinField.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardResult.js.map +1 -1
- package/dist/es-legacy/components/Giropay/Giropay.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePay.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/components/GooglePayButton.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/requests.js +1 -1
- package/dist/es-legacy/components/GooglePay/requests.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/utils.js +1 -1
- package/dist/es-legacy/components/GooglePay/utils.js.map +1 -1
- package/dist/es-legacy/components/Klarna/KlarnaPayments.js.map +1 -1
- package/dist/es-legacy/components/Klarna/components/KlarnaContainer/KlarnaContainer.js.map +1 -1
- package/dist/es-legacy/components/Klarna/components/KlarnaWidget/KlarnaWidget.js.map +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
- package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
- package/dist/es-legacy/components/MealVoucherFR/MealVoucherFR.js.map +1 -1
- package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
- package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherFields.js.map +1 -1
- package/dist/es-legacy/components/MolPayEBanking/MolPayEBankingMY.js.map +1 -1
- package/dist/es-legacy/components/MolPayEBanking/MolPayEBankingTH.js.map +1 -1
- package/dist/es-legacy/components/MolPayEBanking/MolPayEBankingVN.js.map +1 -1
- package/dist/es-legacy/components/Multibanco/Multibanco.js.map +1 -1
- package/dist/es-legacy/components/Multibanco/components/MultibancoVoucherResult/MultibancoVoucherResult.js.map +1 -1
- package/dist/es-legacy/components/OnlineBankingCZ/index.js.map +1 -1
- package/dist/es-legacy/components/OnlineBankingFI/OnlineBankingFI.js.map +1 -1
- package/dist/es-legacy/components/OnlineBankingIN/index.js.map +1 -1
- package/dist/es-legacy/components/OnlineBankingPL/OnlineBankingPL.js.map +1 -1
- package/dist/es-legacy/components/OnlineBankingSK/index.js.map +1 -1
- package/dist/es-legacy/components/Oxxo/Oxxo.js.map +1 -1
- package/dist/es-legacy/components/Oxxo/components/OxxoVoucherResult/OxxoVoucherResult.js.map +1 -1
- package/dist/es-legacy/components/PayByBank/PayByBank.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/Enrollment/Enrollment.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/StoredPayment/StoredPayment.js.map +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es-legacy/components/PayMe/PayMe.js.map +1 -1
- package/dist/es-legacy/components/PayNow/PayNow.js.map +1 -1
- package/dist/es-legacy/components/PayPal/Paypal.js.map +1 -1
- package/dist/es-legacy/components/PayPal/components/PaypalButtons.js.map +1 -1
- package/dist/es-legacy/components/PayPal/components/PaypalComponent.js.map +1 -1
- package/dist/es-legacy/components/PayPalFastlane/Fastlane.js.map +1 -1
- package/dist/es-legacy/components/PayPalFastlane/components/FaslaneCardBrandIcon.js.map +1 -1
- package/dist/es-legacy/components/PayPalFastlane/components/FastlaneComponent.js.map +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/BSBInput.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/MandateSummary.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayIDInput.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToComponent.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToNameFields.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToPhone.js.map +1 -1
- package/dist/es-legacy/components/PayU/PayuCashcard.js.map +1 -1
- package/dist/es-legacy/components/PayU/PayuNetBanking.js.map +1 -1
- package/dist/es-legacy/components/Pix/Pix.js.map +1 -1
- package/dist/es-legacy/components/Pix/components/PixInput/PixInput.js.map +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
- package/dist/es-legacy/components/PromptPay/PromptPay.js.map +1 -1
- package/dist/es-legacy/components/RatePay/RatePay.js.map +1 -1
- package/dist/es-legacy/components/RatePay/RatePayDirectDebit.js.map +1 -1
- package/dist/es-legacy/components/Redirect/Redirect.js.map +1 -1
- package/dist/es-legacy/components/Redirect/components/RedirectShopper/RedirectShopper.js.map +1 -1
- package/dist/es-legacy/components/Riverty/Riverty.js.map +1 -1
- package/dist/es-legacy/components/Sepa/Sepa.js.map +1 -1
- package/dist/es-legacy/components/Swish/Swish.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Form/ThreeDS2Form.js.map +1 -1
- package/dist/es-legacy/components/Trustly/Trustly.js.map +1 -1
- package/dist/es-legacy/components/Twint/Twint.js.map +1 -1
- package/dist/es-legacy/components/UPI/UPI.js.map +1 -1
- package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js.map +1 -1
- package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js.map +1 -1
- package/dist/es-legacy/components/UPI/components/UPIMandate/UPIMandate.js.map +1 -1
- package/dist/es-legacy/components/Vipps/Vipps.js.map +1 -1
- package/dist/es-legacy/components/WalletIN/index.js.map +1 -1
- package/dist/es-legacy/components/WeChat/WeChat.js.map +1 -1
- package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
- package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
- package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/Address.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/components/CountryField.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/components/FieldContainer.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/components/ReadOnlyAddress.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/components/StateField.js.map +1 -1
- package/dist/es-legacy/components/internal/Alert/Alert.js.map +1 -1
- package/dist/es-legacy/components/internal/Await/Await.js.map +1 -1
- package/dist/es-legacy/components/internal/Await/components/AwaitFinalState.js.map +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es-legacy/components/internal/Brand/Brand.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/context/ClickToPayProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/ConsentCheckboxLabel/ConsentCheckboxLabel.js.map +1 -1
- package/dist/es-legacy/components/internal/ContentSeparator/ContentSeparator.js.map +1 -1
- package/dist/es-legacy/components/internal/Countdown/index.js.map +1 -1
- package/dist/es-legacy/components/internal/DisclaimerMessage/DisclaimerMessage.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Field/Field.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputDate/InputDate.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputEmail.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputText.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioButtonIcon.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/components/SelectList.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
- package/dist/es-legacy/components/internal/IFrame/Iframe.js.map +1 -1
- package/dist/es-legacy/components/internal/IbanInput/IbanInput.js.map +1 -1
- package/dist/es-legacy/components/internal/Icon/Icon.js.map +1 -1
- package/dist/es-legacy/components/internal/Img/Img.js.map +1 -1
- package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.js.map +1 -1
- package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js.map +1 -1
- package/dist/es-legacy/components/internal/IssuerList/IssuerList.js.map +1 -1
- package/dist/es-legacy/components/internal/Link/Link.js.map +1 -1
- package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
- package/dist/es-legacy/components/internal/PayButton/PayButton.js.map +1 -1
- package/dist/es-legacy/components/internal/PhoneInput/PhoneInputFields.js.map +1 -1
- package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoaderDetailsProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRCodeCopyButton.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRCountdown.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRFinalState.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRImage.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRIntructions.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRProgressbar.js.map +1 -1
- package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SFPUtils.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SFPUtils.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/createIframe.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/createIframe.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/utils.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/utils.js.map +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControlRegion.js.map +1 -1
- package/dist/es-legacy/components/internal/Spinner/Spinner.js.map +1 -1
- package/dist/es-legacy/components/internal/StoreDetails/StoreDetails.js.map +1 -1
- package/dist/es-legacy/components/internal/Timeline/Timeline.js.map +1 -1
- package/dist/es-legacy/components/internal/Timeline/TimelineWrapper.js.map +1 -1
- package/dist/es-legacy/components/internal/Toggle/Toggle.js.map +1 -1
- package/dist/es-legacy/components/internal/Tooltip/SingletonTooltipProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/Tooltip/Tooltip.js.map +1 -1
- package/dist/es-legacy/components/internal/Tooltip/TooltipController.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/core/Analytics/Analytics.js +1 -1
- package/dist/es-legacy/core/Analytics/Analytics.js.map +1 -1
- package/dist/es-legacy/core/Context/AmountProvider.js.map +1 -1
- package/dist/es-legacy/core/Context/CoreProvider.js.map +1 -1
- package/dist/es-legacy/core/Environment/Environment.js +1 -1
- package/dist/es-legacy/core/Environment/Environment.js.map +1 -1
- package/dist/es-legacy/core/Errors/AdyenCheckoutError.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRMessages.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRPanel.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRPanelProvider.js.map +1 -1
- package/dist/es-legacy/core/Errors/utils.js +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentMethods/PaymentMethods.js.map +1 -1
- package/dist/es-legacy/core/RiskModule/RiskModule.js.map +1 -1
- package/dist/es-legacy/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/core/core.js +1 -1
- package/dist/es-legacy/core/core.js.map +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es-legacy/hooks/usePaymentStatusTimer/usePaymentStatusTimer.js.map +1 -1
- package/dist/es-legacy/index.js +1 -1
- package/dist/es-legacy/utils/getOrigin.js +1 -1
- package/package.json +18 -19
- package/dist/es/utils/getProp.js +0 -2
- package/dist/es/utils/getProp.js.map +0 -1
- package/dist/es-legacy/utils/getProp.js +0 -2
- package/dist/es-legacy/utils/getProp.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANCV.js","sources":["../../../../src/components/ANCV/ANCV.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n public static type = 'ancv';\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n paymentMethod: {\n type: ANCVElement.type,\n beneficiaryId: this.state.data?.beneficiaryId\n }\n };\n }\n\n private onOrderRequest = data => {\n if (this.props.onOrderRequest)\n return new Promise((resolve, reject) => {\n this.props.onOrderRequest(resolve, reject, data);\n });\n\n if (this.props.session) {\n return this.props.session.createOrder();\n }\n };\n\n /**\n * Check if order exists, if it does Resolve.\n * Otherwise createOrder and then Resolve.\n */\n public createOrder = (): Promise<void> => {\n this.setStatus('loading');\n\n // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n if (this.props.order) {\n return Promise.resolve();\n }\n\n return this.onOrderRequest(this.data)\n .then((order: { orderData: string; pspReference: string }) => {\n const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n this.setState(stateOrder);\n return Promise.resolve();\n })\n .catch(error => {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', error));\n }\n });\n };\n\n public submit() {\n if (!this.isValid) {\n this.showValidation();\n return false;\n }\n\n this.createOrder()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n // Reimplement payButton similar to GiftCard to allow to set onClick\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n return <PayButton {...props} />;\n };\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n get displayName(): string {\n return this.props.name;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.props.onError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n type={this.constructor['type']}\n messageText={this.props.i18n.get('ancv.confirmPayment')}\n awaitText={this.props.i18n.get('await.waitForConfirmation')}\n showCountdownTimer={config.showCountdownTimer}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return (\n <ANCVInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onSubmit={this.submit}\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n />\n );\n }\n}\n\nexport default ANCVElement;\n"],"names":["ANCVElement","UIElement","formatData","paymentMethod","type","beneficiaryId","this","state","data","submit","isValid","showValidation","createOrder","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","catch","handleFailedResult","displayName","props","name","componentToRender","paymentData","h","Await","clientKey","onError","onComplete","brandLogo","icon","constructor","messageText","i18n","get","awaitText","showCountdownTimer","config","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","ANCVInput","ref","componentRef","onSubmit","onChange","setState","payButton","showPayButton","super","args","_define_property","onOrderRequest","Promise","resolve","reject","session","setStatus","order","stateOrder","orderData","pspReference","error","AdyenCheckoutError","handleError","PayButton"],"mappings":"glBAWO,MAAMA,UAAoBC,EAM7BC,UAAAA,GACI,MAAO,CACHC,cAAe,CACXC,KAAMJ,EAAYI,KAClBC,cAAeC,KAAKC,MAAMC,MAAMH,eAG5C,CAwCOI,MAAAA,GACH,IAAKH,KAAKI,QAEN,OADAJ,KAAKK,kBACE,EAGXL,KAAKM,cACAC,KAAKP,KAAKQ,kBACVD,KAAKE,GACLF,KAAKG,GACLH,KAAKP,KAAKW,gBACVC,MAAMZ,KAAKa,mBACpB,CAOA,WAAIT,GACA,QAASJ,KAAKC,MAAMG,OACxB,CAEA,eAAIU,GACA,OAAOd,KAAKe,MAAMC,IACtB,CAEmBC,iBAAAA,GACf,OAAIjB,KAAKe,MAAMG,YAEPC,EAACC,EAAAA,CACGC,UAAWrB,KAAKe,MAAMM,UACtBH,YAAalB,KAAKe,MAAMG,YACxBI,QAAStB,KAAKe,MAAMO,QACpBC,WAAYvB,KAAKuB,WACjBC,UAAWxB,KAAKyB,KAChB3B,KAAME,KAAK0B,YAAY,KACvBC,YAAa3B,KAAKe,MAAMa,KAAKC,IAAI,uBACjCC,UAAW9B,KAAKe,MAAMa,KAAKC,IAAI,6BAC/BE,mBAAoBC,EAAOD,mBAC3BE,aAAcD,EAAOE,cACrBC,iBAAkBH,EAAOI,kBACzBC,gBAAiBrC,KAAKqC,kBAM9BlB,EAACmB,EAAAA,CACGC,IAAKA,IACDvC,KAAKwC,aAAeD,MAEpBvC,KAAKe,MACT0B,SAAUzC,KAAKG,OACfuC,SAAU1C,KAAK2C,SACfC,UAAW5C,KAAK4C,UAChBC,cAAe7C,KAAKe,MAAM8B,eAGtC,mBAhHGC,SAAAC,GAeHC,EAAAhD,KAAQiD,iBAAiB/C,GACjBF,KAAKe,MAAMkC,eACJ,IAAIC,QAAQ,CAACC,EAASC,KACzBpD,KAAKe,MAAMkC,eAAeE,EAASC,EAAQlD,KAG/CF,KAAKe,MAAMsC,QACJrD,KAAKe,MAAMsC,QAAQ/C,mBAD9B,GASJ0C,OAAO1C,cAAc,KACjBN,KAAKsD,UAAU,WAGXtD,KAAKe,MAAMwC,MACJL,QAAQC,UAGZnD,KAAKiD,eAAejD,KAAKE,MAC3BK,KAAMgD,IACH,MAAMC,EAAa,CAAED,MAAO,CAAEE,UAAWF,EAAME,UAAWC,aAAcH,EAAMG,eAE9E,OADA1D,KAAK2C,SAASa,GACPN,QAAQC,YAElBvC,MAAM+C,IACCA,aAAiBC,EACjB5D,KAAK6D,YAAYF,GAEjB3D,KAAK6D,YAAY,IAAID,EAAmB,QAASD,QAoBjEX,EAAAhD,KAAmB4C,YAAa7B,GACrBI,EAAC2C,EAAc/C,KApE1BiC,EADStD,
|
|
1
|
+
{"version":3,"file":"ANCV.js","sources":["../../../../src/components/ANCV/ANCV.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n public static readonly type = 'ancv';\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n paymentMethod: {\n type: ANCVElement.type,\n beneficiaryId: this.state.data?.beneficiaryId\n }\n };\n }\n\n private onOrderRequest = data => {\n if (this.props.onOrderRequest)\n return new Promise((resolve, reject) => {\n this.props.onOrderRequest(resolve, reject, data);\n });\n\n if (this.props.session) {\n return this.props.session.createOrder();\n }\n };\n\n /**\n * Check if order exists, if it does Resolve.\n * Otherwise createOrder and then Resolve.\n */\n public createOrder = (): Promise<void> => {\n this.setStatus('loading');\n\n // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n if (this.props.order) {\n return Promise.resolve();\n }\n\n return this.onOrderRequest(this.data)\n .then((order: { orderData: string; pspReference: string }) => {\n const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n this.setState(stateOrder);\n return Promise.resolve();\n })\n .catch(error => {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', error));\n }\n });\n };\n\n public submit() {\n if (!this.isValid) {\n this.showValidation();\n return false;\n }\n\n this.createOrder()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n // Reimplement payButton similar to GiftCard to allow to set onClick\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n return <PayButton {...props} />;\n };\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n get displayName(): string {\n return this.props.name;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.props.onError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n type={this.constructor['type']}\n messageText={this.props.i18n.get('ancv.confirmPayment')}\n awaitText={this.props.i18n.get('await.waitForConfirmation')}\n showCountdownTimer={config.showCountdownTimer}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return (\n <ANCVInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onSubmit={this.submit}\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n />\n );\n }\n}\n\nexport default ANCVElement;\n"],"names":["ANCVElement","UIElement","formatData","paymentMethod","type","beneficiaryId","this","state","data","submit","isValid","showValidation","createOrder","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","catch","handleFailedResult","displayName","props","name","componentToRender","paymentData","h","Await","clientKey","onError","onComplete","brandLogo","icon","constructor","messageText","i18n","get","awaitText","showCountdownTimer","config","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","ANCVInput","ref","componentRef","onSubmit","onChange","setState","payButton","showPayButton","super","args","_define_property","onOrderRequest","Promise","resolve","reject","session","setStatus","order","stateOrder","orderData","pspReference","error","AdyenCheckoutError","handleError","PayButton"],"mappings":"glBAWO,MAAMA,UAAoBC,EAM7BC,UAAAA,GACI,MAAO,CACHC,cAAe,CACXC,KAAMJ,EAAYI,KAClBC,cAAeC,KAAKC,MAAMC,MAAMH,eAG5C,CAwCOI,MAAAA,GACH,IAAKH,KAAKI,QAEN,OADAJ,KAAKK,kBACE,EAGXL,KAAKM,cACAC,KAAKP,KAAKQ,kBACVD,KAAKE,GACLF,KAAKG,GACLH,KAAKP,KAAKW,gBACVC,MAAMZ,KAAKa,mBACpB,CAOA,WAAIT,GACA,Q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QAASD,QAoBjEX,EAAAhD,KAAmB4C,YAAa7B,GACrBI,EAAC2C,EAAc/C,KApE1BiC,EADStD,EACcI,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANCVInput.js","sources":["../../../../../src/components/ANCV/components/ANCVInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport LoadingWrapper from '../../internal/LoadingWrapper';\nimport InputText from '../../internal/FormFields/InputText';\nimport Field from '../../internal/FormFields/Field';\nimport useForm from '../../../utils/useForm';\nimport { ancvValidationRules } from '../validate';\nimport { ANCVDataState } from '../types';\nimport { UIElementProps } from '../../internal/UIElement/types';\n\nexport interface ANCVInputProps extends UIElementProps {\n ref?: any;\n showPayButton: boolean;\n onSubmit: () => void;\n}\n\ntype ANCVInputDataState = ANCVDataState;\n\nfunction ANCVInput({ showPayButton, payButton, onChange, onSubmit }: ANCVInputProps) {\n const { i18n } = useCoreContext();\n\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<ANCVInputDataState>({\n schema: ['beneficiaryId'],\n rules: ancvValidationRules\n });\n\n useEffect(() => {\n // @ts-ignore TODO: Fix this. Preact component types should not inherit from UIElementProps.\n onChange({ data, errors, valid, isValid }, this);\n }, [data, valid, errors, isValid]);\n\n const [status, setStatus] = useState<string>('ready');\n\n this.setStatus = setStatus;\n this.showValidation = triggerValidation;\n\n return (\n <LoadingWrapper>\n <div className=\"adyen-checkout__ancv\">\n <p className=\"adyen-checkout-form-instruction\">{i18n.get('ancv.form.instruction')}</p>\n <Field\n errorMessage={!!errors.beneficiaryId && i18n.get(errors.beneficiaryId.errorMessage)}\n label={i18n.get('ancv.input.label')}\n isValid={valid.beneficiaryId}\n name={'beneficiaryId'}\n >\n <InputText\n value={data.beneficiaryId}\n name={'beneficiaryId'}\n spellcheck={true}\n required={true}\n onInput={handleChangeFor('beneficiaryId', 'input')}\n onBlur={handleChangeFor('beneficiaryId', 'blur')}\n />\n </Field>\n {showPayButton && payButton({ status, label: i18n.get('confirmPurchase'), onClick: onSubmit })}\n </div>\n </LoadingWrapper>\n );\n}\n\nANCVInput.defaultProps = {};\n\nexport default ANCVInput;\n"],"names":["ANCVInput","showPayButton","payButton","onChange","onSubmit","i18n","useCoreContext","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","ancvValidationRules","useEffect","this","status","setStatus","useState","showValidation","h","LoadingWrapper","div","className","p","get","Field","errorMessage","beneficiaryId","label","name","InputText","value","spellcheck","required","onInput","onBlur","onClick","defaultProps"],"mappings":"yfAmBA,SAASA,GAAUC,cAAEA,EAAaC,UAAEA,EAASC,SAAEA,EAAQC,SAAEA,IACrD,MAAMC,KAAEA,GAASC,KAEXC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA4B,CACrGC,OAAQ,CAAC,iBACTC,MAAOC,IAGXC,EAAU,KAENd,EAAS,CAAEM,OAAME,SAAQD,QAAOE,WAAWM,OAC5C,CAACT,EAAMC,EAAOC,EAAQC,IAEzB,MAAOO,EAAQC,GAAaC,EAAiB,SAK7C,OAHAH,KAAKE,UAAYA,EACjBF,KAAKI,eAAiBd,EAGlBe,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,wBACXH,EAACI,IAAAA,CAAED,UAAU,mCAAmCrB,EAAKuB,IAAI,0BACzDL,EAACM,EAAAA,CACGC,eAAgBnB,EAAOoB,eAAiB1B,EAAKuB,IAAIjB,EAAOoB,cAAcD,cACtEE,MAAO3B,EAAKuB,IAAI,oBAChBhB,QAASF,EAAMqB,cACfE,KAAM,iBAENV,EAACW,EAAAA,CACGC,MAAO1B,EAAKsB,cACZE,KAAM,gBACNG,YAAY,EACZC,UAAU,EACVC,QAAS/B,EAAgB,gBAAiB,SAC1CgC,OAAQhC,EAAgB,gBAAiB,WAGhDN,GAAiBC,EAAU,CAAEiB,SAAQa,MAAO3B,EAAKuB,IAAI,mBAAoBY,QAASpC,KAInG,CAEAJ,EAAUyC,aAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"ANCVInput.js","sources":["../../../../../src/components/ANCV/components/ANCVInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport LoadingWrapper from '../../internal/LoadingWrapper';\nimport InputText from '../../internal/FormFields/InputText';\nimport Field from '../../internal/FormFields/Field';\nimport useForm from '../../../utils/useForm';\nimport { ancvValidationRules } from '../validate';\nimport { ANCVDataState } from '../types';\nimport { UIElementProps } from '../../internal/UIElement/types';\n\nexport interface ANCVInputProps extends UIElementProps {\n ref?: any;\n showPayButton: boolean;\n onSubmit: () => void;\n}\n\ntype ANCVInputDataState = ANCVDataState;\n\nfunction ANCVInput({ showPayButton, payButton, onChange, onSubmit }: Readonly<ANCVInputProps>) {\n const { i18n } = useCoreContext();\n\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<ANCVInputDataState>({\n schema: ['beneficiaryId'],\n rules: ancvValidationRules\n });\n\n useEffect(() => {\n // @ts-ignore TODO: Fix this. Preact component types should not inherit from UIElementProps.\n onChange({ data, errors, valid, isValid }, this);\n }, [data, valid, errors, isValid]);\n\n const [status, setStatus] = useState<string>('ready');\n\n this.setStatus = setStatus;\n this.showValidation = triggerValidation;\n\n return (\n <LoadingWrapper>\n <div className=\"adyen-checkout__ancv\">\n <p className=\"adyen-checkout-form-instruction\">{i18n.get('ancv.form.instruction')}</p>\n <Field\n errorMessage={!!errors.beneficiaryId && i18n.get(errors.beneficiaryId.errorMessage)}\n label={i18n.get('ancv.input.label')}\n isValid={valid.beneficiaryId}\n name={'beneficiaryId'}\n >\n <InputText\n value={data.beneficiaryId}\n name={'beneficiaryId'}\n spellcheck={true}\n required={true}\n onInput={handleChangeFor('beneficiaryId', 'input')}\n onBlur={handleChangeFor('beneficiaryId', 'blur')}\n />\n </Field>\n {showPayButton && payButton({ status, label: i18n.get('confirmPurchase'), onClick: onSubmit })}\n </div>\n </LoadingWrapper>\n );\n}\n\nANCVInput.defaultProps = {};\n\nexport default ANCVInput;\n"],"names":["ANCVInput","showPayButton","payButton","onChange","onSubmit","i18n","useCoreContext","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","ancvValidationRules","useEffect","this","status","setStatus","useState","showValidation","h","LoadingWrapper","div","className","p","get","Field","errorMessage","beneficiaryId","label","name","InputText","value","spellcheck","required","onInput","onBlur","onClick","defaultProps"],"mappings":"yfAmBA,SAASA,GAAUC,cAAEA,EAAaC,UAAEA,EAASC,SAAEA,EAAQC,SAAEA,IACrD,MAAMC,KAAEA,GAASC,KAEXC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA4B,CACrGC,OAAQ,CAAC,iBACTC,MAAOC,IAGXC,EAAU,KAENd,EAAS,CAAEM,OAAME,SAAQD,QAAOE,WAAWM,OAC5C,CAACT,EAAMC,EAAOC,EAAQC,IAEzB,MAAOO,EAAQC,GAAaC,EAAiB,SAK7C,OAHAH,KAAKE,UAAYA,EACjBF,KAAKI,eAAiBd,EAGlBe,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,wBACXH,EAACI,IAAAA,CAAED,UAAU,mCAAmCrB,EAAKuB,IAAI,0BACzDL,EAACM,EAAAA,CACGC,eAAgBnB,EAAOoB,eAAiB1B,EAAKuB,IAAIjB,EAAOoB,cAAcD,cACtEE,MAAO3B,EAAKuB,IAAI,oBAChBhB,QAASF,EAAMqB,cACfE,KAAM,iBAENV,EAACW,EAAAA,CACGC,MAAO1B,EAAKsB,cACZE,KAAM,gBACNG,YAAY,EACZC,UAAU,EACVC,QAAS/B,EAAgB,gBAAiB,SAC1CgC,OAAQhC,EAAgB,gBAAiB,WAGhDN,GAAiBC,EAAU,CAAEiB,SAAQa,MAAO3B,EAAKuB,IAAI,mBAAoBY,QAASpC,KAInG,CAEAJ,EAAUyC,aAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ach.js","sources":["../../../../src/components/Ach/Ach.tsx"],"sourcesContent":["import { h, RefObject } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport AchComponent from './components/AchComponent';\nimport defaultProps from './defaultProps';\n\nimport type { AchConfiguration } from './types';\n\nexport class AchElement extends UIElement<AchConfiguration> {\n public static type = TxVariants.ach;\n\n protected static defaultProps = defaultProps;\n\n public override formatData() {\n const recurringPayment = !!this.props.storedPaymentMethodId;\n\n if (recurringPayment) {\n return {\n paymentMethod: {\n type: AchElement.type,\n storedPaymentMethodId: this.props.storedPaymentMethodId\n }\n };\n }\n\n return {\n paymentMethod: {\n type: AchElement.type,\n ownerName: this.state.data.ownerName,\n accountHolderType: this.state.data.selectedAccountType?.split('.')[0],\n bankAccountType: this.state.data.selectedAccountType?.split('.')[1],\n bankLocationId: this.state.data.routingNumber,\n bankAccountNumber: this.state.data.accountNumber\n },\n ...(this.state.storePaymentMethod && { storePaymentMethod: this.state.storePaymentMethod })\n };\n }\n\n public override get isValid(): boolean {\n if (this.props.storedPaymentMethodId) {\n return true;\n }\n\n return !!this.state.isValid;\n }\n\n public override get displayName(): string {\n if (this.props.storedPaymentMethodId && this.props.bankAccountNumber) {\n return `•••• ${this.props.bankAccountNumber.slice(-4)}`;\n }\n return this.props.name;\n }\n\n public override get additionalInfo(): string {\n return this.props.storedPaymentMethodId ? this.props.i18n.get('ach.savedBankAccount') : '';\n }\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={(ref: RefObject<typeof RedirectButton>) => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <AchComponent\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n hasHolderName={this.props.hasHolderName}\n placeholders={this.props.placeholders}\n data={this.props.data}\n setComponentRef={this.setComponentRef}\n enableStoreDetails={this.props.enableStoreDetails}\n />\n );\n }\n}\n\nexport default AchElement;\n"],"names":["AchElement","UIElement","formatData","this","props","storedPaymentMethodId","paymentMethod","type","ownerName","state","data","accountHolderType","selectedAccountType","split","bankAccountType","bankLocationId","routingNumber","bankAccountNumber","accountNumber","storePaymentMethod","isValid","displayName","slice","name","additionalInfo","i18n","get","componentToRender","h","RedirectButton","showPayButton","payButton","onSubmit","submit","ref","componentRef","AchComponent","onChange","setState","hasHolderName","placeholders","setComponentRef","enableStoreDetails","_define_property","TxVariants","ach","defaultProps"],"mappings":"obASO,MAAMA,UAAmBC,EAKZC,UAAAA,GAGZ,QAF2BC,KAAKC,MAAMC,sBAG3B,CACHC,cAAe,CACXC,KAAMP,EAAWO,KACjBF,sBAAuBF,KAAKC,MAAMC,wBAKvC,CACHC,cAAe,CACXC,KAAMP,EAAWO,KACjBC,UAAWL,KAAKM,MAAMC,KAAKF,UAC3BG,kBAAmBR,KAAKM,MAAMC,KAAKE,qBAAqBC,MAAM,KAAK,GACnEC,gBAAiBX,KAAKM,MAAMC,KAAKE,qBAAqBC,MAAM,KAAK,GACjEE,eAAgBZ,KAAKM,MAAMC,KAAKM,cAChCC,kBAAmBd,KAAKM,MAAMC,KAAKQ,kBAEnCf,KAAKM,MAAMU,oBAAsB,CAAEA,mBAAoBhB,KAAKM,MAAMU,oBAE9E,CAEA,WAAoBC,GAChB,QAAIjB,KAAKC,MAAMC,yBAINF,KAAKM,MAAMW,OACxB,CAEA,eAAoBC,GAChB,OAAIlB,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMa,kBACxC,QAAQd,KAAKC,MAAMa,kBAAkBK,OAAM,KAE/CnB,KAAKC,MAAMmB,IACtB,CAEA,kBAAoBC,GAChB,OAAOrB,KAAKC,MAAMC,sBAAwBF,KAAKC,MAAMqB,KAAKC,IAAI,wBAA0B,EAC5F,CAEmBC,iBAAAA,GACf,OAAOxB,KAAKC,MAAMC,sBACduB,EAACC,EAAAA,CACGC,cAAe3B,KAAKC,MAAM0B,cAC1BP,KAAMpB,KAAKkB,YACXU,UAAW5B,KAAK4B,UAChBC,SAAU7B,KAAK8B,OACfC,IAAMA,IACF/B,KAAKgC,aAAeD,KAI5BN,EAACQ,EAAAA,CACGC,SAAUlC,KAAKmC,SACfP,UAAW5B,KAAK4B,UAChBD,cAAe3B,KAAKC,MAAM0B,cAC1BS,cAAepC,KAAKC,MAAMmC,cAC1BC,aAAcrC,KAAKC,MAAMoC,aACzB9B,KAAMP,KAAKC,MAAMM,KACjB+B,gBAAiBtC,KAAKsC,gBACtBC,mBAAoBvC,KAAKC,MAAMsC,oBAG3C,EAvEAC,EADS3C,
|
|
1
|
+
{"version":3,"file":"Ach.js","sources":["../../../../src/components/Ach/Ach.tsx"],"sourcesContent":["import { h, RefObject } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport AchComponent from './components/AchComponent';\nimport defaultProps from './defaultProps';\n\nimport type { AchConfiguration } from './types';\n\nexport class AchElement extends UIElement<AchConfiguration> {\n public static readonly type = TxVariants.ach;\n\n protected static readonly defaultProps = defaultProps;\n\n public override formatData() {\n const recurringPayment = !!this.props.storedPaymentMethodId;\n\n if (recurringPayment) {\n return {\n paymentMethod: {\n type: AchElement.type,\n storedPaymentMethodId: this.props.storedPaymentMethodId\n }\n };\n }\n\n return {\n paymentMethod: {\n type: AchElement.type,\n ownerName: this.state.data.ownerName,\n accountHolderType: this.state.data.selectedAccountType?.split('.')[0],\n bankAccountType: this.state.data.selectedAccountType?.split('.')[1],\n bankLocationId: this.state.data.routingNumber,\n bankAccountNumber: this.state.data.accountNumber\n },\n ...(this.state.storePaymentMethod && { storePaymentMethod: this.state.storePaymentMethod })\n };\n }\n\n public override get isValid(): boolean {\n if (this.props.storedPaymentMethodId) {\n return true;\n }\n\n return !!this.state.isValid;\n }\n\n public override get displayName(): string {\n if (this.props.storedPaymentMethodId && this.props.bankAccountNumber) {\n return `•••• ${this.props.bankAccountNumber.slice(-4)}`;\n }\n return this.props.name;\n }\n\n public override get additionalInfo(): string {\n return this.props.storedPaymentMethodId ? this.props.i18n.get('ach.savedBankAccount') : '';\n }\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={(ref: RefObject<typeof RedirectButton>) => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <AchComponent\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n hasHolderName={this.props.hasHolderName}\n placeholders={this.props.placeholders}\n data={this.props.data}\n setComponentRef={this.setComponentRef}\n enableStoreDetails={this.props.enableStoreDetails}\n />\n );\n }\n}\n\nexport default AchElement;\n"],"names":["AchElement","UIElement","formatData","this","props","storedPaymentMethodId","paymentMethod","type","ownerName","state","data","accountHolderType","selectedAccountType","split","bankAccountType","bankLocationId","routingNumber","bankAccountNumber","accountNumber","storePaymentMethod","isValid","displayName","slice","name","additionalInfo","i18n","get","componentToRender","h","RedirectButton","showPayButton","payButton","onSubmit","submit","ref","componentRef","AchComponent","onChange","setState","hasHolderName","placeholders","setComponentRef","enableStoreDetails","_define_property","TxVariants","ach","defaultProps"],"mappings":"obASO,MAAMA,UAAmBC,EAKZC,UAAAA,GAGZ,QAF2BC,KAAKC,MAAMC,sBAG3B,CACHC,cAAe,CACXC,KAAMP,EAAWO,KACjBF,sBAAuBF,KAAKC,MAAMC,wBAKvC,CACHC,cAAe,CACXC,KAAMP,EAAWO,KACjBC,UAAWL,KAAKM,MAAMC,KAAKF,UAC3BG,kBAAmBR,KAAKM,MAAMC,KAAKE,qBAAqBC,MAAM,KAAK,GACnEC,gBAAiBX,KAAKM,MAAMC,KAAKE,qBAAqBC,MAAM,KAAK,GACjEE,eAAgBZ,KAAKM,MAAMC,KAAKM,cAChCC,kBAAmBd,KAAKM,MAAMC,KAAKQ,kBAEnCf,KAAKM,MAAMU,oBAAsB,CAAEA,mBAAoBhB,KAAKM,MAAMU,oBAE9E,CAEA,WAAoBC,GAChB,QAAIjB,KAAKC,MAAMC,yBAINF,KAAKM,MAAMW,OACxB,CAEA,eAAoBC,GAChB,OAAIlB,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMa,kBACxC,QAAQd,KAAKC,MAAMa,kBAAkBK,OAAM,KAE/CnB,KAAKC,MAAMmB,IACtB,CAEA,kBAAoBC,GAChB,OAAOrB,KAAKC,MAAMC,sBAAwBF,KAAKC,MAAMqB,KAAKC,IAAI,wBAA0B,EAC5F,CAEmBC,iBAAAA,GACf,OAAOxB,KAAKC,MAAMC,sBACduB,EAACC,EAAAA,CACGC,cAAe3B,KAAKC,MAAM0B,cAC1BP,KAAMpB,KAAKkB,YACXU,UAAW5B,KAAK4B,UAChBC,SAAU7B,KAAK8B,OACfC,IAAMA,IACF/B,KAAKgC,aAAeD,KAI5BN,EAACQ,EAAAA,CACGC,SAAUlC,KAAKmC,SACfP,UAAW5B,KAAK4B,UAChBD,cAAe3B,KAAKC,MAAM0B,cAC1BS,cAAepC,KAAKC,MAAMmC,cAC1BC,aAAcrC,KAAKC,MAAMoC,aACzB9B,KAAMP,KAAKC,MAAMM,KACjB+B,gBAAiBtC,KAAKsC,gBACtBC,mBAAoBvC,KAAKC,MAAMsC,oBAG3C,EAvEAC,EADS3C,EACcO,OAAOqC,EAAWC,KAEzCF,EAHS3C,EAGiB8C,eAAeA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountTypeSelector.js","sources":["../../../../../src/components/Ach/components/AccountTypeSelector.tsx"],"sourcesContent":["import Select from '../../internal/FormFields/Select';\nimport Field from '../../internal/FormFields/Field';\nimport { h } from 'preact';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SelectItem, SelectTargetObject } from '../../internal/FormFields/Select/types';\n\nconst SELECTOR_OPTIONS = [\n { id: 'personal.checking', nameKey: 'ach.bankAccount.option.personal-checking' },\n { id: 'personal.savings', nameKey: 'ach.bankAccount.option.personal-savings' },\n { id: 'business.checking', nameKey: 'ach.bankAccount.option.business-checking' },\n { id: 'business.savings', nameKey: 'ach.bankAccount.option.business-savings' }\n];\n\ninterface AccountTypeSelectorProps {\n selectedAccountType?: string;\n onSelect(value: string): void;\n disabled: boolean;\n errorMessage?: string;\n placeholder?: string;\n}\n\nconst AccountTypeSelector = ({ onSelect, selectedAccountType, errorMessage, placeholder, disabled }: AccountTypeSelectorProps) => {\n const { i18n } = useCoreContext();\n const options: SelectItem[] = useMemo(\n () =>\n SELECTOR_OPTIONS.map(option => ({\n id: option.id,\n name: i18n.get(option.nameKey)\n })),\n [i18n, SELECTOR_OPTIONS]\n );\n\n const onChange = useCallback(\n (event: { target: SelectTargetObject }) => {\n const value = event.target.value as string;\n onSelect(value);\n },\n [onSelect]\n );\n\n return (\n <Field\n name={'ach-bankaccount-type'}\n useLabelElement={true}\n showContextualElement={false}\n label={i18n.get('ach.bankAccount.label')}\n errorMessage={errorMessage}\n classNameModifiers={['selectedAccountType']}\n >\n <Select\n placeholder={placeholder || i18n.get('ach.bankAccount.placeholder')}\n filterable={false}\n items={options}\n selectedValue={selectedAccountType}\n onChange={onChange}\n name={'ach-bankaccount-type'}\n disabled={disabled}\n />\n </Field>\n );\n};\n\nexport { AccountTypeSelector };\n"],"names":["SELECTOR_OPTIONS","id","nameKey","AccountTypeSelector","onSelect","selectedAccountType","errorMessage","placeholder","disabled","i18n","useCoreContext","options","useMemo","map","option","name","get","onChange","useCallback","event","value","target","h","Field","useLabelElement","showContextualElement","label","classNameModifiers","Select","filterable","items","selectedValue"],"mappings":"yVAOA,MAAMA,EAAmB,CACrB,CAAEC,GAAI,oBAAqBC,QAAS,4CACpC,CAAED,GAAI,mBAAoBC,QAAS,2CACnC,CAAED,GAAI,oBAAqBC,QAAS,4CACpC,CAAED,GAAI,mBAAoBC,QAAS,4CAWjCC,EAAsB,EAAGC,WAAUC,sBAAqBC,eAAcC,cAAaC,eACrF,MAAMC,KAAEA,GAASC,IACXC,EAAwBC,EAC1B,IACIZ,EAAiBa,IAAIC,KACjBb,GAAIa,EAAOb,GACXc,KAAMN,EAAKO,IAAIF,EAAOZ,YAE9B,CAACO,EAAMT,IAGLiB,EAAWC,EACZC,IACG,MAAMC,EAAQD,EAAME,OAAOD,MAC3BhB,EAASgB,IAEb,CAAChB,IAGL,OACIkB,EAACC,EAAAA,CACGR,KAAM,uBACNS,iBAAiB,EACjBC,uBAAuB,EACvBC,MAAOjB,EAAKO,IAAI,yBAChBV,aAAcA,EACdqB,mBAAoB,CAAC,wBAErBL,EAACM,EAAAA,CACGrB,YAAaA,GAAeE,EAAKO,IAAI,+BACrCa,YAAY,EACZC,MAAOnB,EACPoB,cAAe1B,EACfY,SAAUA,EACVF,KAAM,uBACNP,SAAUA"}
|
|
1
|
+
{"version":3,"file":"AccountTypeSelector.js","sources":["../../../../../src/components/Ach/components/AccountTypeSelector.tsx"],"sourcesContent":["import Select from '../../internal/FormFields/Select';\nimport Field from '../../internal/FormFields/Field';\nimport { h } from 'preact';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SelectItem, SelectTargetObject } from '../../internal/FormFields/Select/types';\n\nconst SELECTOR_OPTIONS = [\n { id: 'personal.checking', nameKey: 'ach.bankAccount.option.personal-checking' },\n { id: 'personal.savings', nameKey: 'ach.bankAccount.option.personal-savings' },\n { id: 'business.checking', nameKey: 'ach.bankAccount.option.business-checking' },\n { id: 'business.savings', nameKey: 'ach.bankAccount.option.business-savings' }\n];\n\ninterface AccountTypeSelectorProps {\n selectedAccountType?: string;\n onSelect(value: string): void;\n disabled: boolean;\n errorMessage?: string;\n placeholder?: string;\n}\n\nconst AccountTypeSelector = ({ onSelect, selectedAccountType, errorMessage, placeholder, disabled }: Readonly<AccountTypeSelectorProps>) => {\n const { i18n } = useCoreContext();\n const options: SelectItem[] = useMemo(\n () =>\n SELECTOR_OPTIONS.map(option => ({\n id: option.id,\n name: i18n.get(option.nameKey)\n })),\n [i18n, SELECTOR_OPTIONS]\n );\n\n const onChange = useCallback(\n (event: { target: SelectTargetObject }) => {\n const value = event.target.value as string;\n onSelect(value);\n },\n [onSelect]\n );\n\n return (\n <Field\n name={'ach-bankaccount-type'}\n useLabelElement={true}\n showContextualElement={false}\n label={i18n.get('ach.bankAccount.label')}\n errorMessage={errorMessage}\n classNameModifiers={['selectedAccountType']}\n >\n <Select\n placeholder={placeholder || i18n.get('ach.bankAccount.placeholder')}\n filterable={false}\n items={options}\n selectedValue={selectedAccountType}\n onChange={onChange}\n name={'ach-bankaccount-type'}\n disabled={disabled}\n />\n </Field>\n );\n};\n\nexport { AccountTypeSelector };\n"],"names":["SELECTOR_OPTIONS","id","nameKey","AccountTypeSelector","onSelect","selectedAccountType","errorMessage","placeholder","disabled","i18n","useCoreContext","options","useMemo","map","option","name","get","onChange","useCallback","event","value","target","h","Field","useLabelElement","showContextualElement","label","classNameModifiers","Select","filterable","items","selectedValue"],"mappings":"yVAOA,MAAMA,EAAmB,CACrB,CAAEC,GAAI,oBAAqBC,QAAS,4CACpC,CAAED,GAAI,mBAAoBC,QAAS,2CACnC,CAAED,GAAI,oBAAqBC,QAAS,4CACpC,CAAED,GAAI,mBAAoBC,QAAS,4CAWjCC,EAAsB,EAAGC,WAAUC,sBAAqBC,eAAcC,cAAaC,eACrF,MAAMC,KAAEA,GAASC,IACXC,EAAwBC,EAC1B,IACIZ,EAAiBa,IAAIC,KACjBb,GAAIa,EAAOb,GACXc,KAAMN,EAAKO,IAAIF,EAAOZ,YAE9B,CAACO,EAAMT,IAGLiB,EAAWC,EACZC,IACG,MAAMC,EAAQD,EAAME,OAAOD,MAC3BhB,EAASgB,IAEb,CAAChB,IAGL,OACIkB,EAACC,EAAAA,CACGR,KAAM,uBACNS,iBAAiB,EACjBC,uBAAuB,EACvBC,MAAOjB,EAAKO,IAAI,yBAChBV,aAAcA,EACdqB,mBAAoB,CAAC,wBAErBL,EAACM,EAAAA,CACGrB,YAAaA,GAAeE,EAAKO,IAAI,+BACrCa,YAAY,EACZC,MAAOnB,EACPoB,cAAe1B,EACfY,SAAUA,EACVF,KAAM,uBACNP,SAAUA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AchComponent.js","sources":["../../../../../src/components/Ach/components/AchComponent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport FormInstruction from '../../internal/FormInstruction';\nimport { AccountTypeSelector } from './AccountTypeSelector';\nimport Fieldset from '../../internal/FormFields/Fieldset';\nimport useForm from '../../../utils/useForm';\nimport Field from '../../internal/FormFields/Field';\nimport InputText from '../../internal/FormFields/InputText';\nimport { achValidationRules, achFormatters } from './validate';\nimport StoreDetails from '../../internal/StoreDetails';\nimport useSRPanelForAchErrors from './useSRPanelForACHErrors';\nimport useImage from '../../../core/Context/useImage';\nimport { PREFIX } from '../../internal/Icon/constants';\n\nimport type { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport type { ComponentMethodsRef } from '../../internal/UIElement/types';\nimport type { AchPlaceholders } from '../types';\nimport type { AchStateErrors } from './useSRPanelForACHErrors';\n\ntype AchForm = {\n selectedAccountType: string;\n ownerName: string;\n routingNumber: string;\n accountNumber: string;\n accountNumberVerification: string;\n};\n\nexport type AchFormPrefillData = Partial<Pick<AchForm, 'ownerName'>>;\n\ninterface AchComponentProps {\n onChange({\n data,\n valid,\n errors,\n isValid,\n storePaymentMethod\n }: {\n data: AchForm;\n valid: { [key: string]: boolean };\n errors: { [key: string]: any };\n isValid: boolean;\n storePaymentMethod: boolean;\n }): void;\n payButton: (props: PayButtonProps) => h.JSX.Element;\n setComponentRef: (ref: ComponentMethodsRef) => void;\n hasHolderName: boolean;\n showPayButton: boolean;\n enableStoreDetails: boolean;\n placeholders?: AchPlaceholders;\n data?: AchFormPrefillData;\n}\n\nfunction AchComponent({\n onChange,\n payButton,\n showPayButton,\n placeholders,\n data: defaultData,\n hasHolderName,\n setComponentRef,\n enableStoreDetails\n}: AchComponentProps) {\n const getImage = useImage();\n const schema = useMemo(\n () => ['selectedAccountType', 'routingNumber', 'accountNumber', 'accountNumberVerification', ...(hasHolderName ? ['ownerName'] : [])],\n [hasHolderName]\n );\n const { i18n } = useCoreContext();\n const [status, setStatus] = useState('ready');\n const { handleChangeFor, triggerValidation, data, errors, valid, isValid } = useForm<AchForm>({\n schema,\n defaultData,\n rules: achValidationRules,\n formatters: achFormatters\n });\n const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n const isFormDisabled = status === 'loading';\n\n const isValidating = useRef(false);\n\n const achRef = useRef<ComponentMethodsRef>({\n setStatus: setStatus,\n showValidation: () => {\n isValidating.current = true;\n triggerValidation();\n }\n });\n\n useEffect(() => {\n setComponentRef(achRef.current);\n }, [setComponentRef, achRef.current]);\n\n useSRPanelForAchErrors({ errors: errors as AchStateErrors, data, isValidating });\n\n useEffect(() => {\n onChange({ data, valid, errors, isValid, storePaymentMethod });\n }, [onChange, data, valid, errors, isValid, storePaymentMethod]);\n\n /**\n * If the \"Verify account number\" field has errors, we want to trigger\n * its validation when there is any change done to the \"Account number\" field\n */\n const onAccountNumberInput = useCallback(\n (event: h.JSX.TargetedInputEvent<HTMLInputElement>) => {\n handleChangeFor('accountNumber', 'input')(event);\n\n const hasAccountVerificationError = !!errors.accountNumberVerification;\n if (hasAccountVerificationError) {\n triggerValidation(['accountNumberVerification']);\n }\n },\n [handleChangeFor, triggerValidation, data.accountNumberVerification, errors.accountNumberVerification]\n );\n\n return (\n <div className=\"adyen-checkout__ach\">\n <FormInstruction />\n\n <Fieldset classNameModifiers={[]} label={i18n.get('ach.bankAccount.title')}>\n <AccountTypeSelector\n placeholder={placeholders?.accountTypeSelector}\n onSelect={handleChangeFor('selectedAccountType')}\n selectedAccountType={data.selectedAccountType}\n disabled={isFormDisabled}\n errorMessage={!!errors.selectedAccountType && i18n.get(errors.selectedAccountType.errorMessage)}\n />\n\n {hasHolderName && (\n <Field\n label={i18n.get('ach.accountHolderNameField.title')}\n errorMessage={!!errors.ownerName && i18n.get(errors.ownerName.errorMessage)}\n isValid={!!valid.ownerName}\n name={'ownerName'}\n >\n <InputText\n disabled={isFormDisabled}\n name={'ownerName'}\n placeholder={placeholders?.ownerName}\n value={data.ownerName}\n onInput={handleChangeFor('ownerName', 'input')}\n onBlur={handleChangeFor('ownerName', 'blur')}\n required={true}\n />\n </Field>\n )}\n\n <Field\n label={i18n.get('ach.routingNumber.label')}\n classNameModifiers={['col-60']}\n errorMessage={!!errors.routingNumber && i18n.get(errors.routingNumber.errorMessage)}\n name={'routingNumber'}\n isValid={!!valid.routingNumber}\n >\n <InputText\n disabled={isFormDisabled}\n name={'routingNumber'}\n placeholder={placeholders?.routingNumber}\n value={data.routingNumber}\n onInput={handleChangeFor('routingNumber', 'input')}\n onBlur={handleChangeFor('routingNumber', 'blur')}\n required={true}\n maxlength={9}\n />\n </Field>\n\n <Field\n label={i18n.get('ach.bankAccountNumber.label')}\n classNameModifiers={['col-40']}\n errorMessage={!!errors.accountNumber && i18n.get(errors.accountNumber.errorMessage)}\n isValid={!!valid.accountNumber}\n name={'accountNumber'}\n >\n <InputText\n disabled={isFormDisabled}\n name={'accountNumber'}\n placeholder={placeholders?.accountNumber}\n value={data.accountNumber}\n onInput={onAccountNumberInput}\n onBlur={handleChangeFor('accountNumber', 'blur')}\n required={true}\n maxlength={17}\n />\n </Field>\n\n <Field\n label={i18n.get('ach.bankAccountNumberVerification.label')}\n errorMessage={!!errors.accountNumberVerification && i18n.get(errors.accountNumberVerification.errorMessage)}\n name={'accountNumberVerification'}\n isValid={!!valid.accountNumberVerification}\n >\n <InputText\n disabled={isFormDisabled}\n name={'accountNumberVerification'}\n placeholder={placeholders?.accountNumberVerification}\n value={data.accountNumberVerification}\n onInput={handleChangeFor('accountNumberVerification', 'input')}\n onBlur={handleChangeFor('accountNumberVerification', 'blur')}\n required={true}\n maxlength={17}\n />\n </Field>\n </Fieldset>\n\n {enableStoreDetails && <StoreDetails disabled={isFormDisabled} onChange={setStorePaymentMethod} />}\n\n {showPayButton && payButton({ status, icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`) })}\n </div>\n );\n}\n\nexport default AchComponent;\n"],"names":["AchComponent","onChange","payButton","showPayButton","placeholders","data","defaultData","hasHolderName","setComponentRef","enableStoreDetails","getImage","useImage","schema","useMemo","i18n","useCoreContext","status","setStatus","useState","handleChangeFor","triggerValidation","errors","valid","isValid","useForm","rules","achValidationRules","formatters","achFormatters","storePaymentMethod","setStorePaymentMethod","isFormDisabled","isValidating","useRef","achRef","showValidation","current","useEffect","useSRPanelForAchErrors","onAccountNumberInput","useCallback","event","accountNumberVerification","h","div","className","FormInstruction","Fieldset","classNameModifiers","label","get","AccountTypeSelector","placeholder","accountTypeSelector","onSelect","selectedAccountType","disabled","errorMessage","Field","ownerName","name","InputText","value","onInput","onBlur","required","routingNumber","maxlength","accountNumber","StoreDetails","icon","imageFolder","PREFIX"],"mappings":"o4BAqDA,SAASA,GAAaC,SAClBA,EAAQC,UACRA,EAASC,cACTA,EAAaC,aACbA,EACAC,KAAMC,EAAWC,cACjBA,EAAaC,gBACbA,EAAeC,mBACfA,IAEA,MAAMC,EAAWC,IACXC,EAASC,EACX,IAAM,CAAC,sBAAuB,gBAAiB,gBAAiB,+BAAiCN,EAAgB,CAAC,aAAe,IACjI,CAACA,KAECO,KAAEA,GAASC,KACVC,EAAQC,GAAaC,EAAS,UAC/BC,gBAAEA,EAAeC,kBAAEA,EAAiBf,KAAEA,EAAIgB,OAAEA,EAAM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sD,KAAM5D,EAAS,CAAE6D,YAAa,eAAxB7D,CAAyC,GAAG8D,WAGpG"}
|
|
1
|
+
{"version":3,"file":"AchComponent.js","sources":["../../../../../src/components/Ach/components/AchComponent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport FormInstruction from '../../internal/FormInstruction';\nimport { AccountTypeSelector } from './AccountTypeSelector';\nimport Fieldset from '../../internal/FormFields/Fieldset';\nimport useForm from '../../../utils/useForm';\nimport Field from '../../internal/FormFields/Field';\nimport InputText from '../../internal/FormFields/InputText';\nimport { achValidationRules, achFormatters } from './validate';\nimport StoreDetails from '../../internal/StoreDetails';\nimport useSRPanelForAchErrors from './useSRPanelForACHErrors';\nimport useImage from '../../../core/Context/useImage';\nimport { PREFIX } from '../../internal/Icon/constants';\n\nimport type { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport type { ComponentMethodsRef } from '../../internal/UIElement/types';\nimport type { AchPlaceholders } from '../types';\nimport type { AchStateErrors } from './useSRPanelForACHErrors';\n\ntype AchForm = {\n selectedAccountType: string;\n ownerName: string;\n routingNumber: string;\n accountNumber: string;\n accountNumberVerification: string;\n};\n\nexport type AchFormPrefillData = Partial<Pick<AchForm, 'ownerName'>>;\n\ninterface AchComponentProps {\n onChange({\n data,\n valid,\n errors,\n isValid,\n storePaymentMethod\n }: {\n data: AchForm;\n valid: { [key: string]: boolean };\n errors: { [key: string]: any };\n isValid: boolean;\n storePaymentMethod: boolean;\n }): void;\n payButton: (props: PayButtonProps) => h.JSX.Element;\n setComponentRef: (ref: ComponentMethodsRef) => void;\n hasHolderName: boolean;\n showPayButton: boolean;\n enableStoreDetails: boolean;\n placeholders?: AchPlaceholders;\n data?: AchFormPrefillData;\n}\n\nfunction AchComponent({\n onChange,\n payButton,\n showPayButton,\n placeholders,\n data: defaultData,\n hasHolderName,\n setComponentRef,\n enableStoreDetails\n}: Readonly<AchComponentProps>) {\n const getImage = useImage();\n const schema = useMemo(\n () => ['selectedAccountType', 'routingNumber', 'accountNumber', 'accountNumberVerification', ...(hasHolderName ? ['ownerName'] : [])],\n [hasHolderName]\n );\n const { i18n } = useCoreContext();\n const [status, setStatus] = useState('ready');\n const { handleChangeFor, triggerValidation, data, errors, valid, isValid } = useForm<AchForm>({\n schema,\n defaultData,\n rules: achValidationRules,\n formatters: achFormatters\n });\n const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n const isFormDisabled = status === 'loading';\n\n const isValidating = useRef(false);\n\n const achRef = useRef<ComponentMethodsRef>({\n setStatus: setStatus,\n showValidation: () => {\n isValidating.current = true;\n triggerValidation();\n }\n });\n\n useEffect(() => {\n setComponentRef(achRef.current);\n }, [setComponentRef, achRef.current]);\n\n useSRPanelForAchErrors({ errors: errors as AchStateErrors, data, isValidating });\n\n useEffect(() => {\n onChange({ data, valid, errors, isValid, storePaymentMethod });\n }, [onChange, data, valid, errors, isValid, storePaymentMethod]);\n\n /**\n * If the \"Verify account number\" field has errors, we want to trigger\n * its validation when there is any change done to the \"Account number\" field\n */\n const onAccountNumberInput = useCallback(\n (event: h.JSX.TargetedInputEvent<HTMLInputElement>) => {\n handleChangeFor('accountNumber', 'input')(event);\n\n const hasAccountVerificationError = !!errors.accountNumberVerification;\n if (hasAccountVerificationError) {\n triggerValidation(['accountNumberVerification']);\n }\n },\n [handleChangeFor, triggerValidation, data.accountNumberVerification, errors.accountNumberVerification]\n );\n\n return (\n <div className=\"adyen-checkout__ach\">\n <FormInstruction />\n\n <Fieldset classNameModifiers={[]} label={i18n.get('ach.bankAccount.title')}>\n <AccountTypeSelector\n placeholder={placeholders?.accountTypeSelector}\n onSelect={handleChangeFor('selectedAccountType')}\n selectedAccountType={data.selectedAccountType}\n disabled={isFormDisabled}\n errorMessage={!!errors.selectedAccountType && i18n.get(errors.selectedAccountType.errorMessage)}\n />\n\n {hasHolderName && (\n <Field\n label={i18n.get('ach.accountHolderNameField.title')}\n errorMessage={!!errors.ownerName && i18n.get(errors.ownerName.errorMessage)}\n isValid={!!valid.ownerName}\n name={'ownerName'}\n >\n <InputText\n disabled={isFormDisabled}\n name={'ownerName'}\n placeholder={placeholders?.ownerName}\n value={data.ownerName}\n onInput={handleChangeFor('ownerName', 'input')}\n onBlur={handleChangeFor('ownerName', 'blur')}\n required={true}\n />\n </Field>\n )}\n\n <Field\n label={i18n.get('ach.routingNumber.label')}\n classNameModifiers={['col-60']}\n errorMessage={!!errors.routingNumber && i18n.get(errors.routingNumber.errorMessage)}\n name={'routingNumber'}\n isValid={!!valid.routingNumber}\n >\n <InputText\n disabled={isFormDisabled}\n name={'routingNumber'}\n placeholder={placeholders?.routingNumber}\n value={data.routingNumber}\n onInput={handleChangeFor('routingNumber', 'input')}\n onBlur={handleChangeFor('routingNumber', 'blur')}\n required={true}\n maxlength={9}\n />\n </Field>\n\n <Field\n label={i18n.get('ach.bankAccountNumber.label')}\n classNameModifiers={['col-40']}\n errorMessage={!!errors.accountNumber && i18n.get(errors.accountNumber.errorMessage)}\n isValid={!!valid.accountNumber}\n name={'accountNumber'}\n >\n <InputText\n disabled={isFormDisabled}\n name={'accountNumber'}\n placeholder={placeholders?.accountNumber}\n value={data.accountNumber}\n onInput={onAccountNumberInput}\n onBlur={handleChangeFor('accountNumber', 'blur')}\n required={true}\n maxlength={17}\n />\n </Field>\n\n <Field\n label={i18n.get('ach.bankAccountNumberVerification.label')}\n errorMessage={!!errors.accountNumberVerification && i18n.get(errors.accountNumberVerification.errorMessage)}\n name={'accountNumberVerification'}\n isValid={!!valid.accountNumberVerification}\n >\n <InputText\n disabled={isFormDisabled}\n name={'accountNumberVerification'}\n placeholder={placeholders?.accountNumberVerification}\n value={data.accountNumberVerification}\n onInput={handleChangeFor('accountNumberVerification', 'input')}\n onBlur={handleChangeFor('accountNumberVerification', 'blur')}\n required={true}\n maxlength={17}\n />\n </Field>\n </Fieldset>\n\n {enableStoreDetails && <StoreDetails disabled={isFormDisabled} onChange={setStorePaymentMethod} />}\n\n {showPayButton && payButton({ status, icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`) })}\n </div>\n );\n}\n\nexport default AchComponent;\n"],"names":["AchComponent","onChange","payButton","showPayButton","placeholders","data","defaultData","hasHolderName","setComponentRef","enableStoreDetails","getImage","useImage","schema","useMemo","i18n","useCoreContext","status","setStatus","useState","handleChangeFor","triggerValidation","errors","valid","isValid","useForm","rules","achValidationRules","formatters","achFormatters","storePaymentMethod","setStorePaymentMethod","isFormDisabled","isValidating","useRef","achRef","showValidation","current","useEffect","useSRPanelForAchErrors","onAccountNumberInput","useCallback","event","accountNumberVerification","h","div","className","FormInstruction","Fieldset","classNameModifiers","label","get","AccountTypeSelector","placeholder","accountTypeSelector","onSelect","selectedAccountType","disabled","errorMessage","Field","ownerName","name","InputText","value","onInput","onBlur","required","routingNumber","maxlength","accountNumber","StoreDetails","icon","imageFolder","PREFIX"],"mappings":"o4BAqDA,SAASA,GAAaC,SAClBA,EAAQC,UACRA,EAASC,cACTA,EAAaC,aACbA,EACAC,KAAMC,EAAWC,cACjBA,EAAaC,gBACbA,EAAeC,mBACfA,IAEA,MAAMC,EAAWC,IACXC,EAASC,EACX,IAAM,CAAC,sBAAuB,gBAAiB,gBAAiB,+BAAiCN,EAAgB,CAAC,aAAe,IACjI,CAACA,KAECO,KAAEA,GAASC,KACVC,EAAQC,GAAaC,EAAS,UAC/BC,gBAAEA,EAAeC,kBAAEA,EAAiBf,KAAEA,EAAIgB,OAAEA,EAAMC,MAAEA,EAAKC,QAAEA,GAAYC,EAAiB,CAC1FZ,SACAN,cACAmB,MAAOC,EACPC,WAAYC,KAETC,EAAoBC,GAAyBZ,GAAS,GACvDa,EAA4B,YAAXf,EAEjBgB,EAAeC,GAAO,GAEtBC,EAASD,EAA4B,CACvChB,UAAWA,EACXkB,eAAgB,KACZH,EAAaI,SAAU,EACvBhB,OAIRiB,EAAU,KACN7B,EAAgB0B,EAAOE,UACxB,CAAC5B,EAAi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YAAahD,GAAc8D,cAC3BJ,MAAOzD,EAAK6D,cACZH,QAAS5C,EAAgB,gBAAiB,SAC1C6C,OAAQ7C,EAAgB,gBAAiB,QACzC8C,UAAU,EACVE,UAAW,KAInBxB,EAACe,EAAAA,CACGT,MAAOnC,EAAKoC,IAAI,+BAChBF,mBAAoB,CAAC,UACrBS,eAAgBpC,EAAO+C,eAAiBtD,EAAKoC,IAAI7B,EAAO+C,cAAcX,cACtElC,UAAWD,EAAM8C,cACjBR,KAAM,iBAENjB,EAACkB,EAAAA,CACGL,SAAUzB,EACV6B,KAAM,gBACNR,YAAahD,GAAcgE,cAC3BN,MAAOzD,EAAK+D,cACZL,QAASxB,EACTyB,OAAQ7C,EAAgB,gBAAiB,QACzC8C,UAAU,EACVE,UAAW,MAInBxB,EAACe,EAAAA,CACGT,MAAOnC,EAAKoC,IAAI,2CAChBO,eAAgBpC,EAAOqB,2BAA6B5B,EAAKoC,IAAI7B,EAAOqB,0BAA0Be,cAC9FG,KAAM,4BACNrC,UAAWD,EAAMoB,2BAEjBC,EAACkB,EAAAA,CACGL,SAAUzB,EACV6B,KAAM,4BACNR,YAAahD,GAAcsC,0BAC3BoB,MAAOzD,EAAKqC,0BACZqB,QAAS5C,EAAgB,4BAA6B,SACtD6C,OAAQ7C,EAAgB,4BAA6B,QACrD8C,UAAU,EACVE,UAAW,OAKtB1D,GAAsBkC,EAAC0B,EAAAA,CAAab,SAAUzB,EAAgB9B,SAAU6B,IAExE3B,GAAiBD,EAAU,CAAEc,SAAQsD,KAAM5D,EAAS,CAAE6D,YAAa,eAAxB7D,CAAyC,GAAG8D,WAGpG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.js","sources":["../../../../src/components/Address/Address.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport Address from '../internal/Address';\nimport { TxVariants } from '../tx-variants';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport { AddressProps } from '../internal/Address/types';\nimport { UIElementProps } from '../internal/UIElement/types';\n\nexport type AddressConfiguration = AddressProps & UIElementProps;\n\nexport class AddressElement extends UIElement<AddressConfiguration> {\n public static type = TxVariants.address;\n\n protected override beforeRender(configSetByMerchant?: AddressConfiguration): void {\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: configSetByMerchant\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n get data() {\n return this.state.data;\n }\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <Address\n setComponentRef={this.setComponentRef}\n {...this.props}\n onChange={this.setState}\n {...(process.env.NODE_ENV !== 'production' && { payButton: this.payButton })}\n />\n );\n }\n}\n\nexport default AddressElement;\n"],"names":["AddressElement","UIElement","beforeRender","configSetByMerchant","event","AnalyticsInfoEvent","type","InfoEventType","rendered","component","this","configData","analytics","sendAnalytics","data","state","isValid","componentToRender","h","Address","setComponentRef","props","onChange","setState","TxVariants","address"],"mappings":"2UAUO,MAAMA,UAAuBC,EAGbC,YAAAA,CAAaC,GAC5B,MAAMC,EAAQ,IAAIC,EAAmB,CACjCC,KAAMC,EAAcC,SACpBC,UAAWC,KAAKJ,KAChBK,WAAYR,IAGhBO,KAAKE,UAAUC,cAAcT,EACjC,CAEA,QAAIU,GACA,OAAOJ,KAAKK,MAAMD,IACtB,CAEA,WAAIE,GACA,QAASN,KAAKK,MAAMC,OACxB,CAEmBC,iBAAAA,GACf,OACIC,EAACC,EAAAA,CACGC,gBAAiBV,KAAKU,mBAClBV,KAAKW,MACTC,SAAUZ,KAAKa,UAI3B,cA9BSvB,
|
|
1
|
+
{"version":3,"file":"Address.js","sources":["../../../../src/components/Address/Address.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport Address from '../internal/Address';\nimport { TxVariants } from '../tx-variants';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport { AddressProps } from '../internal/Address/types';\nimport { UIElementProps } from '../internal/UIElement/types';\n\nexport type AddressConfiguration = AddressProps & UIElementProps;\n\nexport class AddressElement extends UIElement<AddressConfiguration> {\n public static readonly type = TxVariants.address;\n\n protected override beforeRender(configSetByMerchant?: AddressConfiguration): void {\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: configSetByMerchant\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n get data() {\n return this.state.data;\n }\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <Address\n setComponentRef={this.setComponentRef}\n {...this.props}\n onChange={this.setState}\n {...(process.env.NODE_ENV !== 'production' && { payButton: this.payButton })}\n />\n );\n }\n}\n\nexport default AddressElement;\n"],"names":["AddressElement","UIElement","beforeRender","configSetByMerchant","event","AnalyticsInfoEvent","type","InfoEventType","rendered","component","this","configData","analytics","sendAnalytics","data","state","isValid","componentToRender","h","Address","setComponentRef","props","onChange","setState","TxVariants","address"],"mappings":"2UAUO,MAAMA,UAAuBC,EAGbC,YAAAA,CAAaC,GAC5B,MAAMC,EAAQ,IAAIC,EAAmB,CACjCC,KAAMC,EAAcC,SACpBC,UAAWC,KAAKJ,KAChBK,WAAYR,IAGhBO,KAAKE,UAAUC,cAAcT,EACjC,CAEA,QAAIU,GACA,OAAOJ,KAAKK,MAAMD,IACtB,CAEA,WAAIE,GACA,QAASN,KAAKK,MAAMC,OACxB,CAEmBC,iBAAAA,GACf,OACIC,EAACC,EAAAA,CACGC,gBAAiBV,KAAKU,mBAClBV,KAAKW,MACTC,SAAUZ,KAAKa,UAI3B,cA9BSvB,IACcM,SAAOkB,EAAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Affirm.js","sources":["../../../../src/components/Affirm/Affirm.tsx"],"sourcesContent":["import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class Affirm extends OpenInvoiceContainer {\n public static type = TxVariants.affirm;\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps(props),\n allowedCountries: ALLOWED_COUNTRIES,\n personalDetailsRequiredFields: ['firstName', 'lastName', 'telephoneNumber', 'shopperEmail']\n };\n }\n}\n"],"names":["Affirm","OpenInvoiceContainer","formatProps","props","super","allowedCountries","ALLOWED_COUNTRIES","personalDetailsRequiredFields","type","TxVariants","affirm"],"mappings":"sKAKe,MAAMA,UAAeC,EAGhCC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAYC,GACrBE,iBAAkBC,EAClBC,8BAA+B,CAAC,YAAa,WAAY,kBAAmB,gBAEpF,cATiBP,
|
|
1
|
+
{"version":3,"file":"Affirm.js","sources":["../../../../src/components/Affirm/Affirm.tsx"],"sourcesContent":["import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class Affirm extends OpenInvoiceContainer {\n public static readonly type = TxVariants.affirm;\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps(props),\n allowedCountries: ALLOWED_COUNTRIES,\n personalDetailsRequiredFields: ['firstName', 'lastName', 'telephoneNumber', 'shopperEmail']\n };\n }\n}\n"],"names":["Affirm","OpenInvoiceContainer","formatProps","props","super","allowedCountries","ALLOWED_COUNTRIES","personalDetailsRequiredFields","type","TxVariants","affirm"],"mappings":"sKAKe,MAAMA,UAAeC,EAGhCC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAYC,GACrBE,iBAAkBC,EAClBC,8BAA+B,CAAC,YAAa,WAAY,kBAAmB,gBAEpF,cATiBP,IACMQ,SAAOC,EAAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AfterPay.js","sources":["../../../../src/components/AfterPay/AfterPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport ConsentCheckboxLabel from '../internal/ConsentCheckboxLabel';\nimport { ALLOWED_COUNTRIES, rivertyConsentUrlMap } from './config';\nimport { getConsentUrl } from '../../utils/getConsentUrl';\nimport { TxVariants } from '../tx-variants';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class AfterPay extends OpenInvoiceContainer {\n public static type = TxVariants.afterpay_default;\n public static txVariants = [TxVariants.afterpay_default, TxVariants.afterpay];\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps(props),\n allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES,\n consentCheckboxLabel: <ConsentCheckboxLabel url={getConsentUrl(props.countryCode, props.i18n?.locale, rivertyConsentUrlMap)} />\n };\n }\n}\n"],"names":["AfterPay","OpenInvoiceContainer","formatProps","props","super","allowedCountries","countryCode","ALLOWED_COUNTRIES","consentCheckboxLabel","h","ConsentCheckboxLabel","url","getConsentUrl","i18n","locale","rivertyConsentUrlMap","_define_property","type","TxVariants","afterpay_default","txVariants","afterpay"],"mappings":"kgBAQe,MAAMA,UAAiBC,EAIlCC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAYC,GACrBE,iBAAkBF,EAAMG,YAAc,CAACH,EAAMG,aAAeC,EAC5DC,qBAAsBC,EAACC,EAAAA,CAAqBC,IAAKC,EAAcT,EAAMG,YAAaH,EAAMU,MAAMC,OAAQC,KAE9G,EATAC,EADiBhB,
|
|
1
|
+
{"version":3,"file":"AfterPay.js","sources":["../../../../src/components/AfterPay/AfterPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport ConsentCheckboxLabel from '../internal/ConsentCheckboxLabel';\nimport { ALLOWED_COUNTRIES, rivertyConsentUrlMap } from './config';\nimport { getConsentUrl } from '../../utils/getConsentUrl';\nimport { TxVariants } from '../tx-variants';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class AfterPay extends OpenInvoiceContainer {\n public static readonly type = TxVariants.afterpay_default;\n public static readonly txVariants = [TxVariants.afterpay_default, TxVariants.afterpay];\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps(props),\n allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES,\n consentCheckboxLabel: <ConsentCheckboxLabel url={getConsentUrl(props.countryCode, props.i18n?.locale, rivertyConsentUrlMap)} />\n };\n }\n}\n"],"names":["AfterPay","OpenInvoiceContainer","formatProps","props","super","allowedCountries","countryCode","ALLOWED_COUNTRIES","consentCheckboxLabel","h","ConsentCheckboxLabel","url","getConsentUrl","i18n","locale","rivertyConsentUrlMap","_define_property","type","TxVariants","afterpay_default","txVariants","afterpay"],"mappings":"kgBAQe,MAAMA,UAAiBC,EAIlCC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAYC,GACrBE,iBAAkBF,EAAMG,YAAc,CAACH,EAAMG,aAAeC,EAC5DC,qBAAsBC,EAACC,EAAAA,CAAqBC,IAAKC,EAAcT,EAAMG,YAAaH,EAAMU,MAAMC,OAAQC,KAE9G,EATAC,EADiBhB,EACMiB,OAAOC,EAAWC,kBACzCH,EAFiBhB,EAEMoB,aAAa,CAACF,EAAWC,iBAAkBD,EAAWG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AfterPayB2B.js","sources":["../../../../src/components/AfterPay/AfterPayB2B.tsx"],"sourcesContent":["import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { TxVariants } from '../tx-variants';\nimport { ALLOWED_COUNTRIES } from './config';\nimport type { OpenInvoiceConfiguration } from '../helpers/OpenInvoiceContainer/types';\n\nexport default class AfterPayB2B extends OpenInvoiceContainer {\n public static type = TxVariants.afterpay_b2b;\n\n protected static defaultProps: Partial<OpenInvoiceConfiguration> = {\n onChange: () => {},\n data: { companyDetails: {}, personalDetails: {}, billingAddress: {}, deliveryAddress: {} },\n visibility: {\n companyDetails: 'editable',\n personalDetails: 'editable',\n billingAddress: 'editable',\n deliveryAddress: 'editable'\n }\n };\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps(props),\n allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n };\n }\n}\n"],"names":["AfterPayB2B","OpenInvoiceContainer","formatProps","props","super","allowedCountries","countryCode","ALLOWED_COUNTRIES","_define_property","type","TxVariants","afterpay_b2b","defaultProps","onChange","data","companyDetails","personalDetails","billingAddress","deliveryAddress","visibility"],"mappings":"8RAKe,MAAMA,UAAoBC,EAcrCC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAYC,GACrBE,iBAAkBF,EAAMG,YAAc,CAACH,EAAMG,aAAeC,EAEpE,EAlBAC,EADiBR,
|
|
1
|
+
{"version":3,"file":"AfterPayB2B.js","sources":["../../../../src/components/AfterPay/AfterPayB2B.tsx"],"sourcesContent":["import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { TxVariants } from '../tx-variants';\nimport { ALLOWED_COUNTRIES } from './config';\nimport type { OpenInvoiceConfiguration } from '../helpers/OpenInvoiceContainer/types';\n\nexport default class AfterPayB2B extends OpenInvoiceContainer {\n public static readonly type = TxVariants.afterpay_b2b;\n\n protected static readonly defaultProps: Partial<OpenInvoiceConfiguration> = {\n onChange: () => {},\n data: { companyDetails: {}, personalDetails: {}, billingAddress: {}, deliveryAddress: {} },\n visibility: {\n companyDetails: 'editable',\n personalDetails: 'editable',\n billingAddress: 'editable',\n deliveryAddress: 'editable'\n }\n };\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps(props),\n allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n };\n }\n}\n"],"names":["AfterPayB2B","OpenInvoiceContainer","formatProps","props","super","allowedCountries","countryCode","ALLOWED_COUNTRIES","_define_property","type","TxVariants","afterpay_b2b","defaultProps","onChange","data","companyDetails","personalDetails","billingAddress","deliveryAddress","visibility"],"mappings":"8RAKe,MAAMA,UAAoBC,EAcrCC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAYC,GACrBE,iBAAkBF,EAAMG,YAAc,CAACH,EAAMG,aAAeC,EAEpE,EAlBAC,EADiBR,EACMS,OAAOC,EAAWC,cAEzCH,EAHiBR,EAGSY,eAAkD,CACxEC,SAAU,OACVC,KAAM,CAAEC,eAAgB,CAAA,EAAIC,gBAAiB,CAAA,EAAIC,eAAgB,CAAA,EAAIC,gBAAiB,CAAA,GACtFC,WAAY,CACRJ,eAAgB,WAChBC,gBAAiB,WACjBC,eAAgB,WAChBC,gBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmazonPay.js","sources":["../../../../src/components/AmazonPay/AmazonPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport AmazonPayComponent from './components/AmazonPayComponent';\nimport { AmazonPayElementData, AmazonPayConfiguration, CheckoutDetailsRequest } from './types';\nimport defaultProps from './defaultProps';\nimport { getCheckoutDetails } from './services';\nimport './AmazonPay.scss';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class AmazonPayElement extends UIElement<AmazonPayConfiguration> {\n public static type = TxVariants.amazonpay;\n\n protected static defaultProps = defaultProps;\n\n formatProps(props) {\n return {\n ...props,\n checkoutMode: props.isDropin ? 'ProcessOrder' : props.checkoutMode,\n environment: props.environment.toUpperCase(),\n locale: props.locale.replace('-', '_'),\n productType: props.isDropin && !props.addressDetails ? 'PayOnly' : props.productType\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData(): AmazonPayElementData {\n const { amazonCheckoutSessionId: checkoutSessionId } = this.props;\n return {\n paymentMethod: {\n type: AmazonPayElement.type,\n ...(checkoutSessionId && { checkoutSessionId })\n },\n browserInfo: this.browserInfo\n };\n }\n\n protected override beforeRender(configSetByMerchant?: AmazonPayConfiguration) {\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n getShopperDetails() {\n const { amazonCheckoutSessionId, configuration = {}, loadingContext, clientKey } = this.props;\n if (!amazonCheckoutSessionId) return console.error('Could not shopper details. Missing checkoutSessionId.');\n\n const request: CheckoutDetailsRequest = {\n checkoutSessionId: amazonCheckoutSessionId,\n getDeliveryAddress: true,\n publicKeyId: configuration.publicKeyId,\n region: configuration.region\n };\n\n return getCheckoutDetails(loadingContext, clientKey, request);\n }\n\n public handleDeclineFlow() {\n const { amazonCheckoutSessionId, configuration = {}, loadingContext, clientKey } = this.props;\n if (!amazonCheckoutSessionId) return console.error('Could handle the decline flow. Missing checkoutSessionId.');\n\n const request: CheckoutDetailsRequest = {\n checkoutSessionId: amazonCheckoutSessionId,\n getDeclineFlowUrl: true,\n publicKeyId: configuration.publicKeyId,\n region: configuration.region\n };\n\n getCheckoutDetails(loadingContext, clientKey, request)\n .then((response = {}) => {\n if (!response?.declineFlowUrl) throw response;\n window.location.assign(response.declineFlowUrl);\n })\n .catch(error => {\n if (this.props.onError) this.props.onError(error, this.componentRef);\n });\n }\n\n get isValid() {\n return true;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n public submit(): void {\n const amazonComponentSubmit = this.componentRef && this.componentRef.getSubmitFunction();\n if (amazonComponentSubmit) {\n return amazonComponentSubmit();\n }\n this.makePaymentsCall().then(sanitizeResponse).then(verifyPaymentDidNotFail).then(this.handleResponse).catch(this.handleFailedResult);\n }\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <AmazonPayComponent\n ref={ref => {\n this.componentRef = ref;\n }}\n showPayButton={this.props.showPayButton}\n onClick={this.props.onClick}\n onError={this.props.onError}\n onSignOut={this.props.onSignOut}\n {...this.props}\n />\n );\n }\n}\n\nexport default AmazonPayElement;\n"],"names":["AmazonPayElement","UIElement","formatProps","props","checkoutMode","isDropin","environment","toUpperCase","locale","replace","productType","addressDetails","formatData","amazonCheckoutSessionId","checkoutSessionId","this","paymentMethod","type","browserInfo","beforeRender","configSetByMerchant","event","AnalyticsInfoEvent","InfoEventType","rendered","component","configData","showPayButton","isExpress","expressPage","analytics","sendAnalytics","getShopperDetails","configuration","loadingContext","clientKey","console","error","request","getDeliveryAddress","publicKeyId","region","getCheckoutDetails","handleDeclineFlow","getDeclineFlowUrl","then","response","declineFlowUrl","window","location","assign","catch","onError","componentRef","isValid","collectBrowserInfo","submit","amazonComponentSubmit","getSubmitFunction","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","handleFailedResult","componentToRender","h","AmazonPayComponent","ref","onClick","onSignOut","_define_property","TxVariants","amazonpay","defaultProps"],"mappings":"oqBAYO,MAAMA,UAAyBC,EAKlCC,WAAAA,CAAYC,GACR,MAAO,IACAA,EACHC,aAAcD,EAAME,SAAW,eAAiBF,EAAMC,aACtDE,YAAaH,EAAMG,YAAYC,cAC/BC,OAAQL,EAAMK,OAAOC,QAAQ,IAAK,KAClCC,YAAaP,EAAME,WAAaF,EAAMQ,eAAiB,UAAYR,EAAMO,YAEjF,CAKAE,UAAAA,GACI,MAAQC,wBAAyBC,GAAsBC,KAAKZ,MAC5D,MAAO,CACHa,cAAe,CACXC,KAAMjB,EAAiBiB,QACnBH,GAAqB,CAAEA,sBAE/BI,YAAaH,KAAKG,YAE1B,CAEmBC,YAAAA,CAAaC,GAC5B,MAAMC,EAAQ,IA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GAAyBhB,KAAK9B,KAAK+C,gBAAgBX,MAAMpC,KAAKgD,mBACtH,CAEmBC,iBAAAA,GACf,OACIC,EAACC,EAAAA,CACGC,IAAKA,IACDpD,KAAKsC,aAAec,GAExBxC,cAAeZ,KAAKZ,MAAMwB,cAC1ByC,QAASrD,KAAKZ,MAAMiE,QACpBhB,QAASrC,KAAKZ,MAAMiD,QACpBiB,UAAWtD,KAAKZ,MAAMkE,aAClBtD,KAAKZ,OAGrB,EAxGAmE,EADStE,
|
|
1
|
+
{"version":3,"file":"AmazonPay.js","sources":["../../../../src/components/AmazonPay/AmazonPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport AmazonPayComponent from './components/AmazonPayComponent';\nimport { AmazonPayElementData, AmazonPayConfiguration, CheckoutDetailsRequest } from './types';\nimport defaultProps from './defaultProps';\nimport { getCheckoutDetails } from './services';\nimport './AmazonPay.scss';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class AmazonPayElement extends UIElement<AmazonPayConfiguration> {\n public static readonly type = TxVariants.amazonpay;\n\n protected static readonly defaultProps = defaultProps;\n\n formatProps(props) {\n return {\n ...props,\n checkoutMode: props.isDropin ? 'ProcessOrder' : props.checkoutMode,\n environment: props.environment.toUpperCase(),\n locale: props.locale.replace('-', '_'),\n productType: props.isDropin && !props.addressDetails ? 'PayOnly' : props.productType\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData(): AmazonPayElementData {\n const { amazonCheckoutSessionId: checkoutSessionId } = this.props;\n return {\n paymentMethod: {\n type: AmazonPayElement.type,\n ...(checkoutSessionId && { checkoutSessionId })\n },\n browserInfo: this.browserInfo\n };\n }\n\n protected override beforeRender(configSetByMerchant?: AmazonPayConfiguration) {\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n getShopperDetails() {\n const { amazonCheckoutSessionId, configuration = {}, loadingContext, clientKey } = this.props;\n if (!amazonCheckoutSessionId) return console.error('Could not shopper details. Missing checkoutSessionId.');\n\n const request: CheckoutDetailsRequest = {\n checkoutSessionId: amazonCheckoutSessionId,\n getDeliveryAddress: true,\n publicKeyId: configuration.publicKeyId,\n region: configuration.region\n };\n\n return getCheckoutDetails(loadingContext, clientKey, request);\n }\n\n public handleDeclineFlow() {\n const { amazonCheckoutSessionId, configuration = {}, loadingContext, clientKey } = this.props;\n if (!amazonCheckoutSessionId) return console.error('Could handle the decline flow. Missing checkoutSessionId.');\n\n const request: CheckoutDetailsRequest = {\n checkoutSessionId: amazonCheckoutSessionId,\n getDeclineFlowUrl: true,\n publicKeyId: configuration.publicKeyId,\n region: configuration.region\n };\n\n getCheckoutDetails(loadingContext, clientKey, request)\n .then((response = {}) => {\n if (!response?.declineFlowUrl) throw response;\n window.location.assign(response.declineFlowUrl);\n })\n .catch(error => {\n if (this.props.onError) this.props.onError(error, this.componentRef);\n });\n }\n\n get isValid() {\n return true;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n public submit(): void {\n const amazonComponentSubmit = this.componentRef && this.componentRef.getSubmitFunction();\n if (amazonComponentSubmit) {\n return amazonComponentSubmit();\n }\n this.makePaymentsCall().then(sanitizeResponse).then(verifyPaymentDidNotFail).then(this.handleResponse).catch(this.handleFailedResult);\n }\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <AmazonPayComponent\n ref={ref => {\n this.componentRef = ref;\n }}\n showPayButton={this.props.showPayButton}\n onClick={this.props.onClick}\n onError={this.props.onError}\n onSignOut={this.props.onSignOut}\n {...this.props}\n />\n );\n }\n}\n\nexport default AmazonPayElement;\n"],"names":["AmazonPayElement","UIElement","formatProps","props","checkoutMode","isDropin","environment","toUpperCase","locale","replace","productType","addressDetails","formatData","amazonCheckoutSessionId","checkoutSessionId","this","paymentMethod","type","browserInfo","beforeRender","configSetByMerchant","event","AnalyticsInfoEvent","InfoEventType","rendered","component","configData","showPayButton","isExpress","expressPage","analytics","sendAnalytics","getShopperDetails","configuration","loadingContext","clientKey","console","error","request","getDeliveryAddress","publicKeyId","region","getCheckoutDetails","handleDeclineFlow","getDeclineFlowUrl","then","response","declineFlowUrl","window","location","assign","catch","onError","componentRef","isValid","collectBrowserInfo","submit","amazonComponentSubmit","getSubmitFunction","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","handleFailedResult","componentToRender","h","AmazonPayComponent","ref","onClick","onSignOut","_define_property","TxVariants","amazonpay","defaultProps"],"mappings":"oqBAYO,MAAMA,UAAyBC,EAKlCC,WAAAA,CAAYC,GACR,MAAO,IACAA,EACHC,aAAcD,EAAME,SAAW,eAAiBF,EAAMC,aACtDE,YAAaH,EAAMG,YAAYC,cAC/BC,OAAQL,EAAMK,OAAOC,QAAQ,IAAK,KAClCC,YAAaP,EAAME,WAAaF,EAAMQ,eAAiB,UAAYR,EAAMO,YAEjF,CAKAE,UAAAA,GACI,MAAQC,wBAAyBC,GAAsBC,KAAKZ,MAC5D,MAAO,CACHa,cAAe,CACXC,KAAMjB,EAAiBiB,QACnBH,GAAqB,CAAEA,sBAE/BI,YAAaH,KAAKG,YAE1B,CAEmBC,YAAAA,CAAaC,GAC5B,MAAMC,EAAQ,IAAIC,EAAmB,CACjCL,KAAMM,EAAcC,SACpBC,UAAWV,KAAKE,KAChBS,WAAY,IAAKN,EAAqBO,cAAeZ,KAAKZ,MAAMwB,kBAC5DP,GAAqBQ,WAAa,CAAEA,UAAWR,EAAoBQ,cACnER,GAAqBS,aAAe,CAAEA,YAAaT,EAAoBS,eAG/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BhB,QAASrC,KAAKZ,MAAMiD,QACpBiB,UAAWtD,KAAKZ,MAAMkE,aAClBtD,KAAKZ,OAGrB,EAxGAmE,EADStE,EACciB,OAAOsD,EAAWC,WAEzCF,EAHStE,EAGiByE,eAAeA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmazonPayButton.js","sources":["../../../../../src/components/AmazonPay/components/AmazonPayButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { getAmazonSignature } from '../services';\nimport { getAmazonPaySettings, getPayloadJSON } from '../utils';\nimport { AmazonPayButtonProps, CheckoutSessionConfig, PayloadJSON } from '../types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport default function AmazonPayButton(props: AmazonPayButtonProps) {\n const { amount } = useAmount();\n const { loadingContext } = useCoreContext();\n const { amazonRef, configuration = {} } = props;\n const [signature, setSignature] = useState<string>(null);\n const payloadJSON: PayloadJSON = getPayloadJSON(props, amount);\n const settings = getAmazonPaySettings(props, amount);\n\n const handleOnClick = () => {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n new Promise(props.onClick).then(this.initCheckout).catch(error => {\n if (props.onError) props.onError(error, this.componentRef);\n });\n };\n\n const renderAmazonPayButton = (): void => {\n const amazonPayButton = amazonRef.Pay.renderButton('#amazonPayButton', settings);\n amazonPayButton.onClick(handleOnClick);\n };\n\n this.initCheckout = () => {\n const checkoutSessionConfig: CheckoutSessionConfig = {\n payloadJSON: JSON.stringify(payloadJSON),\n publicKeyId: configuration.publicKeyId,\n signature\n };\n\n amazonRef.Pay.initCheckout({\n ...settings,\n createCheckoutSessionConfig: checkoutSessionConfig\n });\n };\n\n useEffect(() => {\n const { clientKey } = props;\n\n getAmazonSignature(loadingContext, clientKey, payloadJSON)\n .then(response => {\n if (!response?.signature) return console.error('Could not get AmazonPay signature');\n setSignature(response.signature);\n if (props.showPayButton) renderAmazonPayButton();\n })\n .catch(error => {\n console.error(error);\n if (props.onError) props.onError(error, this.componentRef);\n });\n }, []);\n\n if (!props.showPayButton) return null;\n return <div className=\"adyen-checkout__amazonpay__button\" id=\"amazonPayButton\" />;\n}\n"],"names":["AmazonPayButton","props","amount","useAmount","loadingContext","useCoreContext","amazonRef","configuration","signature","setSignature","useState","payloadJSON","getPayloadJSON","settings","getAmazonPaySettings","handleOnClick","Promise","onClick","then","this","initCheckout","catch","error","onError","componentRef","checkoutSessionConfig","JSON","stringify","publicKeyId","Pay","createCheckoutSessionConfig","useEffect","clientKey","getAmazonSignature","response","console","showPayButton","renderButton","h","div","className","id"],"mappings":"qaAQe,SAASA,EAAgBC,GACpC,MAAMC,OAAEA,GAAWC,KACbC,eAAEA,GAAmBC,KACrBC,UAAEA,EAASC,cAAEA,EAAgB,CAAA,GAAON,GACnCO,EAAWC,GAAgBC,EAAiB,MAC7CC,EAA2BC,EAAeX,EAAOC,GACjDW,EAAWC,EAAqBb,EAAOC,GAEvCa,EAAgB,KAElB,IAAIC,QAAQf,EAAMgB,SAASC,KAAKC,KAAKC,cAAcC,MAAMC,IACjDrB,EAAMsB,SAAStB,EAAMsB,QAAQD,EAAOH,KAAKK,iBAqCrD,OA5BAL,KAAKC,aAAe,KAChB,MAAMK,EAA+C,CACjDd,YAAae,KAAKC,UAAUhB,GAC5BiB,YAAarB,EAAcqB,YAC3BpB,aAGJF,EAAUuB,IAAIT,aAAa,IACpBP,EACHiB,4BAA6BL,KAIrCM,EAAU,KACN,MAAMC,UAAEA,GAAc/B,EAEtBgC,EAAmB7B,EAAgB4B,EAAWrB,GACzCO,KAAKgB,IACF,IAAKA,GAAU1B,UAAW,OAAO2B,QAAQb,MAAM,qCAC/Cb,EAAayB,EAAS1B,WAClBP,EAAMmC,eAxBM9B,EAAUuB,IAAIQ,aAAa,mBAAoBxB,GACvDI,QAAQF,KAyBnBM,MAAMC,IACHa,QAAQb,MAAMA,GACVrB,EAAMsB,SAAStB,EAAMsB,QAAQD,EAAOH,KAAKK,iBAEtD,IAEEvB,EAAMmC,cACJE,EAACC,MAAAA,CAAIC,UAAU,oCAAoCC,GAAG,oBAD5B,IAErC"}
|
|
1
|
+
{"version":3,"file":"AmazonPayButton.js","sources":["../../../../../src/components/AmazonPay/components/AmazonPayButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { getAmazonSignature } from '../services';\nimport { getAmazonPaySettings, getPayloadJSON } from '../utils';\nimport { AmazonPayButtonProps, CheckoutSessionConfig, PayloadJSON } from '../types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport default function AmazonPayButton(props: Readonly<AmazonPayButtonProps>) {\n const { amount } = useAmount();\n const { loadingContext } = useCoreContext();\n const { amazonRef, configuration = {} } = props;\n const [signature, setSignature] = useState<string>(null);\n const payloadJSON: PayloadJSON = getPayloadJSON(props, amount);\n const settings = getAmazonPaySettings(props, amount);\n\n const handleOnClick = () => {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n new Promise(props.onClick).then(this.initCheckout).catch(error => {\n if (props.onError) props.onError(error, this.componentRef);\n });\n };\n\n const renderAmazonPayButton = (): void => {\n const amazonPayButton = amazonRef.Pay.renderButton('#amazonPayButton', settings);\n amazonPayButton.onClick(handleOnClick);\n };\n\n this.initCheckout = () => {\n const checkoutSessionConfig: CheckoutSessionConfig = {\n payloadJSON: JSON.stringify(payloadJSON),\n publicKeyId: configuration.publicKeyId,\n signature\n };\n\n amazonRef.Pay.initCheckout({\n ...settings,\n createCheckoutSessionConfig: checkoutSessionConfig\n });\n };\n\n useEffect(() => {\n const { clientKey } = props;\n\n getAmazonSignature(loadingContext, clientKey, payloadJSON)\n .then(response => {\n if (!response?.signature) return console.error('Could not get AmazonPay signature');\n setSignature(response.signature);\n if (props.showPayButton) renderAmazonPayButton();\n })\n .catch(error => {\n console.error(error);\n if (props.onError) props.onError(error, this.componentRef);\n });\n }, []);\n\n if (!props.showPayButton) return null;\n return <div className=\"adyen-checkout__amazonpay__button\" id=\"amazonPayButton\" />;\n}\n"],"names":["AmazonPayButton","props","amount","useAmount","loadingContext","useCoreContext","amazonRef","configuration","signature","setSignature","useState","payloadJSON","getPayloadJSON","settings","getAmazonPaySettings","handleOnClick","Promise","onClick","then","this","initCheckout","catch","error","onError","componentRef","checkoutSessionConfig","JSON","stringify","publicKeyId","Pay","createCheckoutSessionConfig","useEffect","clientKey","getAmazonSignature","response","console","showPayButton","renderButton","h","div","className","id"],"mappings":"qaAQe,SAASA,EAAgBC,GACpC,MAAMC,OAAEA,GAAWC,KACbC,eAAEA,GAAmBC,KACrBC,UAAEA,EAASC,cAAEA,EAAgB,CAAA,GAAON,GACnCO,EAAWC,GAAgBC,EAAiB,MAC7CC,EAA2BC,EAAeX,EAAOC,GACjDW,EAAWC,EAAqBb,EAAOC,GAEvCa,EAAgB,KAElB,IAAIC,QAAQf,EAAMgB,SAASC,KAAKC,KAAKC,cAAcC,MAAMC,IACjDrB,EAAMsB,SAAStB,EAAMsB,QAAQD,EAAOH,KAAKK,iBAqCrD,OA5BAL,KAAKC,aAAe,KAChB,MAAMK,EAA+C,CACjDd,YAAae,KAAKC,UAAUhB,GAC5BiB,YAAarB,EAAcqB,YAC3BpB,aAGJF,EAAUuB,IAAIT,aAAa,IACpBP,EACHiB,4BAA6BL,KAIrCM,EAAU,KACN,MAAMC,UAAEA,GAAc/B,EAEtBgC,EAAmB7B,EAAgB4B,EAAWrB,GACzCO,KAAKgB,IACF,IAAKA,GAAU1B,UAAW,OAAO2B,QAAQb,MAAM,qCAC/Cb,EAAayB,EAAS1B,WAClBP,EAAMmC,eAxBM9B,EAAUuB,IAAIQ,aAAa,mBAAoBxB,GACvDI,QAAQF,KAyBnBM,MAAMC,IACHa,QAAQb,MAAMA,GACVrB,EAAMsB,SAAStB,EAAMsB,QAAQD,EAAOH,KAAKK,iBAEtD,IAEEvB,EAAMmC,cACJE,EAACC,MAAAA,CAAIC,UAAU,oCAAoCC,GAAG,oBAD5B,IAErC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmazonPayComponent.js","sources":["../../../../../src/components/AmazonPay/components/AmazonPayComponent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useEffect, useRef } from 'preact/hooks';\nimport Spinner from '../../internal/Spinner';\nimport { getAmazonPayUrl } from '../utils';\nimport { AmazonPayComponentProps } from '../types';\nimport AmazonPayButton from './AmazonPayButton';\nimport ChangePaymentDetailsButton from './ChangePaymentDetailsButton';\nimport OrderButton from './OrderButton';\nimport SignOutButton from './SignOutButton';\nimport Script from '../../../utils/Script';\nimport useAnalytics from '../../../core/Analytics/useAnalytics';\n\nexport default function AmazonPayComponent(props: AmazonPayComponentProps) {\n const [status, setStatus] = useState('pending');\n const amazonPayButtonRef = useRef(null);\n const orderButtonRef = useRef(null);\n const { analytics } = useAnalytics();\n\n const handleLoad = () => {\n setStatus('ready');\n };\n\n this.getSubmitFunction = () => {\n if (amazonPayButtonRef.current && amazonPayButtonRef.current.initCheckout) return () => amazonPayButtonRef.current.initCheckout();\n if (orderButtonRef.current && orderButtonRef.current.createOrder) return () => orderButtonRef.current.createOrder();\n };\n\n useEffect(() => {\n const src = getAmazonPayUrl(props.configuration.region);\n const script = new Script({\n src,\n component: 'amazonpay',\n analytics\n });\n\n if (window.amazon) {\n handleLoad();\n } else {\n void script.load().then(handleLoad);\n }\n\n return () => {\n script.remove();\n };\n }, [analytics]);\n\n if (status === 'pending') {\n return (\n <div className=\"adyen-checkout__amazonpay\">\n <div className=\"adyen-checkout__amazonpay__status adyen-checkout__amazonpay__status--pending\">\n <Spinner />\n </div>\n </div>\n );\n }\n\n if (props.showSignOutButton) {\n return (\n <div className=\"adyen-checkout__amazonpay\">\n <SignOutButton amazonRef={window.amazon} onSignOut={props.onSignOut} />\n </div>\n );\n }\n\n if (props.amazonCheckoutSessionId) {\n return (\n <div className=\"adyen-checkout__amazonpay\">\n {props.showOrderButton && (\n <OrderButton\n amazonCheckoutSessionId={props.amazonCheckoutSessionId}\n chargePermissionType={props.chargePermissionType}\n recurringMetadata={props.recurringMetadata}\n clientKey={props.clientKey}\n onError={props.onError}\n publicKeyId={props.configuration?.publicKeyId}\n region={props.configuration?.region}\n returnUrl={props.returnUrl}\n ref={orderButtonRef}\n />\n )}\n\n {props.showChangePaymentDetailsButton && (\n <ChangePaymentDetailsButton amazonCheckoutSessionId={props.amazonCheckoutSessionId} amazonRef={window.amazon} />\n )}\n </div>\n );\n }\n\n return (\n <div className=\"adyen-checkout__amazonpay\">\n <AmazonPayButton {...props} showPayButton={this.props.showPayButton} amazonRef={window.amazon} ref={amazonPayButtonRef} />\n </div>\n );\n}\n"],"names":["AmazonPayComponent","props","status","setStatus","useState","amazonPayButtonRef","useRef","orderButtonRef","analytics","useAnalytics","handleLoad","this","getSubmitFunction","current","initCheckout","createOrder","useEffect","src","getAmazonPayUrl","configuration","region","script","Script","component","window","amazon","load","then","remove","h","div","className","Spinner","showSignOutButton","SignOutButton","amazonRef","onSignOut","amazonCheckoutSessionId","showOrderButton","OrderButton","chargePermissionType","recurringMetadata","clientKey","onError","publicKeyId","returnUrl","ref","showChangePaymentDetailsButton","ChangePaymentDetailsButton","AmazonPayButton","showPayButton"],"mappings":"8fAYe,SAASA,EAAmBC,GACvC,MAAOC,EAAQC,GAAaC,EAAS,WAC/BC,EAAqBC,EAAO,MAC5BC,EAAiBD,EAAO,OACxBE,UAAEA,GAAcC,IAEhBC,EAAa,KACfP,EAAU,UA2Bd,OAxBAQ,KAAKC,kBAAoB,IACjBP,EAAmBQ,SAAWR,EAAmBQ,QAAQC,aAAqB,IAAMT,EAAmBQ,QAAQC,eAC/GP,EAAeM,SAAWN,EAAeM,QAAQE,YAAoB,IAAMR,EAAeM,QAAQE,mBAAtG,EAGJC,EAAU,KACN,MAAMC,EAAMC,EAAgBjB,EAAMkB,cAAcC,QAC1CC,EAAS,IAAIC,EAAO,CACtBL,MACAM,UAAW,YACXf,cASJ,OANIgB,OAAOC,OACPf,IAEKW,EAAOK,OAAOC,KAAKjB,GAGrB,KACHW,EAAOO,WAEZ,CAACpB,IAEW,YAAXN,EAEI2B,EAACC,MAAAA,CAAIC,UAAU,6BACXF,EAACC,MAAAA,CAAIC,UAAU,gFACXF,EAACG,EAAAA,QAMb/B,EAAMgC,kBAEFJ,EAACC,MAAAA,CAAIC,UAAU,6BACXF,EAACK,EAAAA,CAAcC,UAAWX,OAAOC,OAAQW,UAAWnC,EAAMmC,aAKlEnC,EAAMoC,wBAEFR,EAACC,MAAAA,CAAIC,UAAU,6BACV9B,EAAMqC,iBACHT,EAACU,EAAAA,CACGF,wBAAyBpC,EAAMoC,wBAC/BG,qBAAsBvC,EAAMuC,qBAC5BC,kBAAmBxC,EAAMwC,kBACzBC,UAAWzC,EAAMyC,UACjBC,QAAS1C,EAAM0C,QACfC,YAAa3C,EAAMkB,eAAeyB,YAClCxB,OAAQnB,EAAMkB,eAAeC,OAC7ByB,UAAW5C,EAAM4C,UACjBC,IAAKvC,IAIZN,EAAM8C,gCACHlB,EAACmB,EAAAA,CAA2BX,wBAAyBpC,EAAMoC,wBAAyBF,UAAWX,OAAOC,UAOlHI,EAACC,MAAAA,CAAIC,UAAU,6BACXF,EAACoB,EAAAA,IAAoBhD,EAAOiD,cAAevC,KAAKV,MAAMiD,cAAef,UAAWX,OAAOC,OAAQqB,IAAKzC,IAGhH"}
|
|
1
|
+
{"version":3,"file":"AmazonPayComponent.js","sources":["../../../../../src/components/AmazonPay/components/AmazonPayComponent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useEffect, useRef } from 'preact/hooks';\nimport Spinner from '../../internal/Spinner';\nimport { getAmazonPayUrl } from '../utils';\nimport { AmazonPayComponentProps } from '../types';\nimport AmazonPayButton from './AmazonPayButton';\nimport ChangePaymentDetailsButton from './ChangePaymentDetailsButton';\nimport OrderButton from './OrderButton';\nimport SignOutButton from './SignOutButton';\nimport Script from '../../../utils/Script';\nimport useAnalytics from '../../../core/Analytics/useAnalytics';\n\nexport default function AmazonPayComponent(props: Readonly<AmazonPayComponentProps>) {\n const [status, setStatus] = useState('pending');\n const amazonPayButtonRef = useRef(null);\n const orderButtonRef = useRef(null);\n const { analytics } = useAnalytics();\n\n const handleLoad = () => {\n setStatus('ready');\n };\n\n this.getSubmitFunction = () => {\n if (amazonPayButtonRef.current && amazonPayButtonRef.current.initCheckout) return () => amazonPayButtonRef.current.initCheckout();\n if (orderButtonRef.current && orderButtonRef.current.createOrder) return () => orderButtonRef.current.createOrder();\n };\n\n useEffect(() => {\n const src = getAmazonPayUrl(props.configuration.region);\n const script = new Script({\n src,\n component: 'amazonpay',\n analytics\n });\n\n if (window.amazon) {\n handleLoad();\n } else {\n void script.load().then(handleLoad);\n }\n\n return () => {\n script.remove();\n };\n }, [analytics]);\n\n if (status === 'pending') {\n return (\n <div className=\"adyen-checkout__amazonpay\">\n <div className=\"adyen-checkout__amazonpay__status adyen-checkout__amazonpay__status--pending\">\n <Spinner />\n </div>\n </div>\n );\n }\n\n if (props.showSignOutButton) {\n return (\n <div className=\"adyen-checkout__amazonpay\">\n <SignOutButton amazonRef={window.amazon} onSignOut={props.onSignOut} />\n </div>\n );\n }\n\n if (props.amazonCheckoutSessionId) {\n return (\n <div className=\"adyen-checkout__amazonpay\">\n {props.showOrderButton && (\n <OrderButton\n amazonCheckoutSessionId={props.amazonCheckoutSessionId}\n chargePermissionType={props.chargePermissionType}\n recurringMetadata={props.recurringMetadata}\n clientKey={props.clientKey}\n onError={props.onError}\n publicKeyId={props.configuration?.publicKeyId}\n region={props.configuration?.region}\n returnUrl={props.returnUrl}\n ref={orderButtonRef}\n />\n )}\n\n {props.showChangePaymentDetailsButton && (\n <ChangePaymentDetailsButton amazonCheckoutSessionId={props.amazonCheckoutSessionId} amazonRef={window.amazon} />\n )}\n </div>\n );\n }\n\n return (\n <div className=\"adyen-checkout__amazonpay\">\n <AmazonPayButton {...props} showPayButton={this.props.showPayButton} amazonRef={window.amazon} ref={amazonPayButtonRef} />\n </div>\n );\n}\n"],"names":["AmazonPayComponent","props","status","setStatus","useState","amazonPayButtonRef","useRef","orderButtonRef","analytics","useAnalytics","handleLoad","this","getSubmitFunction","current","initCheckout","createOrder","useEffect","src","getAmazonPayUrl","configuration","region","script","Script","component","window","amazon","load","then","remove","h","div","className","Spinner","showSignOutButton","SignOutButton","amazonRef","onSignOut","amazonCheckoutSessionId","showOrderButton","OrderButton","chargePermissionType","recurringMetadata","clientKey","onError","publicKeyId","returnUrl","ref","showChangePaymentDetailsButton","ChangePaymentDetailsButton","AmazonPayButton","showPayButton"],"mappings":"8fAYe,SAASA,EAAmBC,GACvC,MAAOC,EAAQC,GAAaC,EAAS,WAC/BC,EAAqBC,EAAO,MAC5BC,EAAiBD,EAAO,OACxBE,UAAEA,GAAcC,IAEhBC,EAAa,KACfP,EAAU,UA2Bd,OAxBAQ,KAAKC,kBAAoB,IACjBP,EAAmBQ,SAAWR,EAAmBQ,QAAQC,aAAqB,IAAMT,EAAmBQ,QAAQC,eAC/GP,EAAeM,SAAWN,EAAeM,QAAQE,YAAoB,IAAMR,EAAeM,QAAQE,mBAAtG,EAGJC,EAAU,KACN,MAAMC,EAAMC,EAAgBjB,EAAMkB,cAAcC,QAC1CC,EAAS,IAAIC,EAAO,CACtBL,MACAM,UAAW,YACXf,cASJ,OANIgB,OAAOC,OACPf,IAEKW,EAAOK,OAAOC,KAAKjB,GAGrB,KACHW,EAAOO,WAEZ,CAACpB,IAEW,YAAXN,EAEI2B,EAACC,MAAAA,CAAIC,UAAU,6BACXF,EAACC,MAAAA,CAAIC,UAAU,gFACXF,EAACG,EAAAA,QAMb/B,EAAMgC,kBAEFJ,EAACC,MAAAA,CAAIC,UAAU,6BACXF,EAACK,EAAAA,CAAcC,UAAWX,OAAOC,OAAQW,UAAWnC,EAAMmC,aAKlEnC,EAAMoC,wBAEFR,EAACC,MAAAA,CAAIC,UAAU,6BACV9B,EAAMqC,iBACHT,EAACU,EAAAA,CACGF,wBAAyBpC,EAAMoC,wBAC/BG,qBAAsBvC,EAAMuC,qBAC5BC,kBAAmBxC,EAAMwC,kBACzBC,UAAWzC,EAAMyC,UACjBC,QAAS1C,EAAM0C,QACfC,YAAa3C,EAAMkB,eAAeyB,YAClCxB,OAAQnB,EAAMkB,eAAeC,OAC7ByB,UAAW5C,EAAM4C,UACjBC,IAAKvC,IAIZN,EAAM8C,gCACHlB,EAACmB,EAAAA,CAA2BX,wBAAyBpC,EAAMoC,wBAAyBF,UAAWX,OAAOC,UAOlHI,EAACC,MAAAA,CAAIC,UAAU,6BACXF,EAACoB,EAAAA,IAAoBhD,EAAOiD,cAAevC,KAAKV,MAAMiD,cAAef,UAAWX,OAAOC,OAAQqB,IAAKzC,IAGhH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePaymentDetailsButton.js","sources":["../../../../../src/components/AmazonPay/components/ChangePaymentDetailsButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ChangeActionOptions, ChangePaymentDetailsButtonProps } from '../types';\n\nexport default function ChangePaymentDetailsButton(props: ChangePaymentDetailsButtonProps) {\n const { i18n } = useCoreContext();\n const { amazonRef, amazonCheckoutSessionId } = props;\n\n useEffect(() => {\n const changeActionOptions: ChangeActionOptions = {\n amazonCheckoutSessionId,\n changeAction: 'changeAddress'\n };\n\n amazonRef.Pay.bindChangeAction('.adyen-checkout__amazonpay__button--changeAddress', changeActionOptions);\n }, []);\n\n return (\n <button type=\"button\" className=\"adyen-checkout__button adyen-checkout__button--ghost adyen-checkout__amazonpay__button--changeAddress\">\n {i18n.get('amazonpay.changePaymentDetails')}\n </button>\n );\n}\n"],"names":["ChangePaymentDetailsButton","props","i18n","useCoreContext","amazonRef","amazonCheckoutSessionId","useEffect","changeActionOptions","changeAction","Pay","bindChangeAction","h","button","type","className","get"],"mappings":"wNAKe,SAASA,EAA2BC,GAC/C,MAAMC,KAAEA,GAASC,KACXC,UAAEA,EAASC,wBAAEA,GAA4BJ,EAW/C,OATAK,EAAU,KACN,MAAMC,EAA2C,CAC7CF,0BACAG,aAAc,iBAGlBJ,EAAUK,IAAIC,iBAAiB,oDAAqDH,IACrF,IAGCI,EAACC,SAAAA,CAAOC,KAAK,SAASC,UAAU,yGAC3BZ,EAAKa,IAAI,kCAGtB"}
|
|
1
|
+
{"version":3,"file":"ChangePaymentDetailsButton.js","sources":["../../../../../src/components/AmazonPay/components/ChangePaymentDetailsButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ChangeActionOptions, ChangePaymentDetailsButtonProps } from '../types';\n\nexport default function ChangePaymentDetailsButton(props: Readonly<ChangePaymentDetailsButtonProps>) {\n const { i18n } = useCoreContext();\n const { amazonRef, amazonCheckoutSessionId } = props;\n\n useEffect(() => {\n const changeActionOptions: ChangeActionOptions = {\n amazonCheckoutSessionId,\n changeAction: 'changeAddress'\n };\n\n amazonRef.Pay.bindChangeAction('.adyen-checkout__amazonpay__button--changeAddress', changeActionOptions);\n }, []);\n\n return (\n <button type=\"button\" className=\"adyen-checkout__button adyen-checkout__button--ghost adyen-checkout__amazonpay__button--changeAddress\">\n {i18n.get('amazonpay.changePaymentDetails')}\n </button>\n );\n}\n"],"names":["ChangePaymentDetailsButton","props","i18n","useCoreContext","amazonRef","amazonCheckoutSessionId","useEffect","changeActionOptions","changeAction","Pay","bindChangeAction","h","button","type","className","get"],"mappings":"wNAKe,SAASA,EAA2BC,GAC/C,MAAMC,KAAEA,GAASC,KACXC,UAAEA,EAASC,wBAAEA,GAA4BJ,EAW/C,OATAK,EAAU,KACN,MAAMC,EAA2C,CAC7CF,0BACAG,aAAc,iBAGlBJ,EAAUK,IAAIC,iBAAiB,oDAAqDH,IACrF,IAGCI,EAACC,SAAAA,CAAOC,KAAK,SAASC,UAAU,yGAC3BZ,EAAKa,IAAI,kCAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderButton.js","sources":["../../../../../src/components/AmazonPay/components/OrderButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Button from '../../internal/Button';\nimport { updateAmazonCheckoutSession } from '../services';\nimport { OrderButtonProps, UpdateAmazonCheckoutSessionRequest } from '../types';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport default function OrderButton(props: OrderButtonProps) {\n const { i18n, loadingContext } = useCoreContext();\n const { amount } = useAmount();\n\n this.createOrder = () => {\n const { amazonCheckoutSessionId, clientKey, chargePermissionType, publicKeyId, region, recurringMetadata, returnUrl } = props;\n\n const request: UpdateAmazonCheckoutSessionRequest = {\n amount,\n chargePermissionType,\n checkoutResultReturnUrl: returnUrl,\n checkoutSessionId: amazonCheckoutSessionId,\n publicKeyId,\n recurringMetadata,\n region\n };\n\n updateAmazonCheckoutSession(loadingContext, clientKey, request)\n .then(response => {\n if (!response?.action?.type) return console.error(response.errorMessage || 'Could not get the AmazonPay URL');\n if (response.action.type === 'redirect') window.location.assign(response.action.url);\n })\n .catch(error => {\n if (props.onError) props.onError(error, this.componentRef);\n });\n };\n\n return <Button classNameModifiers={['standalone', 'pay']} label={i18n.get('confirmPurchase')} onClick={this.createOrder} />;\n}\n"],"names":["OrderButton","props","i18n","loadingContext","useCoreContext","amount","useAmount","this","createOrder","amazonCheckoutSessionId","clientKey","chargePermissionType","publicKeyId","region","recurringMetadata","returnUrl","updateAmazonCheckoutSession","checkoutResultReturnUrl","checkoutSessionId","then","response","action","type","console","error","errorMessage","window","location","assign","url","catch","onError","componentRef","h","Button","classNameModifiers","label","get","onClick"],"mappings":"+TAOe,SAASA,EAAYC,GAChC,MAAMC,KAAEA,EAAIC,eAAEA,GAAmBC,KAC3BC,OAAEA,GAAWC,IAyBnB,OAvBAC,KAAKC,YAAc,KACf,MAAMC,wBAAEA,EAAuBC,UAAEA,EAASC,qBAAEA,EAAoBC,YAAEA,EAAWC,OAAEA,EAAMC,kBAAEA,EAAiBC,UAAEA,GAAcd,EAYxHe,EAA4Bb,EAAgBO,EAVQ,CAChDL,SACAM,uBACAM,wBAAyBF,EACzBG,kBAAmBT,EACnBG,cACAE,oBACAD,WAICM,KAAKC,IACF,IAAKA,GAAUC,QAAQC,KAAM,OAAOC,QAAQC,MAAMJ,EAASK,cAAgB,mCAC9C,aAAzBL,EAASC,OAAOC,MAAqBI,OAAOC,SAASC,OAAOR,EAASC,OAAOQ,OAEnFC,MAAMN,IACCvB,EAAM8B,SAAS9B,EAAM8B,QAAQP,EAAOjB,KAAKyB,iBAIlDC,EAACC,EAAAA,CAAOC,mBAAoB,CAAC,aAAc,OAAQC,MAAOlC,EAAKmC,IAAI,mBAAoBC,QAAS/B,KAAKC,aAChH"}
|
|
1
|
+
{"version":3,"file":"OrderButton.js","sources":["../../../../../src/components/AmazonPay/components/OrderButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Button from '../../internal/Button';\nimport { updateAmazonCheckoutSession } from '../services';\nimport { OrderButtonProps, UpdateAmazonCheckoutSessionRequest } from '../types';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport default function OrderButton(props: Readonly<OrderButtonProps>) {\n const { i18n, loadingContext } = useCoreContext();\n const { amount } = useAmount();\n\n this.createOrder = () => {\n const { amazonCheckoutSessionId, clientKey, chargePermissionType, publicKeyId, region, recurringMetadata, returnUrl } = props;\n\n const request: UpdateAmazonCheckoutSessionRequest = {\n amount,\n chargePermissionType,\n checkoutResultReturnUrl: returnUrl,\n checkoutSessionId: amazonCheckoutSessionId,\n publicKeyId,\n recurringMetadata,\n region\n };\n\n updateAmazonCheckoutSession(loadingContext, clientKey, request)\n .then(response => {\n if (!response?.action?.type) return console.error(response.errorMessage || 'Could not get the AmazonPay URL');\n if (response.action.type === 'redirect') window.location.assign(response.action.url);\n })\n .catch(error => {\n if (props.onError) props.onError(error, this.componentRef);\n });\n };\n\n return <Button classNameModifiers={['standalone', 'pay']} label={i18n.get('confirmPurchase')} onClick={this.createOrder} />;\n}\n"],"names":["OrderButton","props","i18n","loadingContext","useCoreContext","amount","useAmount","this","createOrder","amazonCheckoutSessionId","clientKey","chargePermissionType","publicKeyId","region","recurringMetadata","returnUrl","updateAmazonCheckoutSession","checkoutResultReturnUrl","checkoutSessionId","then","response","action","type","console","error","errorMessage","window","location","assign","url","catch","onError","componentRef","h","Button","classNameModifiers","label","get","onClick"],"mappings":"+TAOe,SAASA,EAAYC,GAChC,MAAMC,KAAEA,EAAIC,eAAEA,GAAmBC,KAC3BC,OAAEA,GAAWC,IAyBnB,OAvBAC,KAAKC,YAAc,KACf,MAAMC,wBAAEA,EAAuBC,UAAEA,EAASC,qBAAEA,EAAoBC,YAAEA,EAAWC,OAAEA,EAAMC,kBAAEA,EAAiBC,UAAEA,GAAcd,EAYxHe,EAA4Bb,EAAgBO,EAVQ,CAChDL,SACAM,uBACAM,wBAAyBF,EACzBG,kBAAmBT,EACnBG,cACAE,oBACAD,WAICM,KAAKC,IACF,IAAKA,GAAUC,QAAQC,KAAM,OAAOC,QAAQC,MAAMJ,EAASK,cAAgB,mCAC9C,aAAzBL,EAASC,OAAOC,MAAqBI,OAAOC,SAASC,OAAOR,EAASC,OAAOQ,OAEnFC,MAAMN,IACCvB,EAAM8B,SAAS9B,EAAM8B,QAAQP,EAAOjB,KAAKyB,iBAIlDC,EAACC,EAAAA,CAAOC,mBAAoB,CAAC,aAAc,OAAQC,MAAOlC,EAAKmC,IAAI,mBAAoBC,QAAS/B,KAAKC,aAChH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignOutButton.js","sources":["../../../../../src/components/AmazonPay/components/SignOutButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SignOutButtonProps } from '../types';\n\nexport default function SignOutButton(props: SignOutButtonProps) {\n const { i18n } = useCoreContext();\n\n const handleClick = () => {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n new Promise(props.onSignOut)\n .then(() => {\n props.amazonRef.Pay.signout();\n })\n .catch(console.error);\n };\n\n return (\n <button\n type=\"button\"\n className=\"adyen-checkout__button adyen-checkout__button--ghost adyen-checkout__amazonpay__button--signOut\"\n onClick={handleClick}\n >\n {i18n.get('amazonpay.signout')}\n </button>\n );\n}\n"],"names":["SignOutButton","props","i18n","useCoreContext","h","button","type","className","onClick","Promise","onSignOut","then","amazonRef","Pay","signout","catch","console","error","get"],"mappings":"+IAIe,SAASA,EAAcC,GAClC,MAAMC,KAAEA,GAASC,IAWjB,OACIC,EAACC,SAAAA,CACGC,KAAK,SACLC,UAAU,mGACVC,QAbY,KAEhB,IAAIC,QAAQR,EAAMS,WACbC,KAAK,KACFV,EAAMW,UAAUC,IAAIC,YAEvBC,MAAMC,QAAQC,SASdf,EAAKgB,IAAI,qBAGtB"}
|
|
1
|
+
{"version":3,"file":"SignOutButton.js","sources":["../../../../../src/components/AmazonPay/components/SignOutButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SignOutButtonProps } from '../types';\n\nexport default function SignOutButton(props: Readonly<SignOutButtonProps>) {\n const { i18n } = useCoreContext();\n\n const handleClick = () => {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n new Promise(props.onSignOut)\n .then(() => {\n props.amazonRef.Pay.signout();\n })\n .catch(console.error);\n };\n\n return (\n <button\n type=\"button\"\n className=\"adyen-checkout__button adyen-checkout__button--ghost adyen-checkout__amazonpay__button--signOut\"\n onClick={handleClick}\n >\n {i18n.get('amazonpay.signout')}\n </button>\n );\n}\n"],"names":["SignOutButton","props","i18n","useCoreContext","h","button","type","className","onClick","Promise","onSignOut","then","amazonRef","Pay","signout","catch","console","error","get"],"mappings":"+IAIe,SAASA,EAAcC,GAClC,MAAMC,KAAEA,GAASC,IAWjB,OACIC,EAACC,SAAAA,CACGC,KAAK,SACLC,UAAU,mGACVC,QAbY,KAEhB,IAAIC,QAAQR,EAAMS,WACbC,KAAK,KACFV,EAAMW,UAAUC,IAAIC,YAEvBC,MAAMC,QAAQC,SASdf,EAAKgB,IAAI,qBAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplePay.js","sources":["../../../../src/components/ApplePay/ApplePay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ApplePayButton from './components/ApplePayButton';\nimport ApplePayService from './services/ApplePayService';\nimport base64 from '../../utils/base64';\nimport defaultProps from './defaultProps';\nimport { httpPost } from '../../core/Services/http';\nimport { preparePaymentRequest } from './utils/payment-request';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { DecodeObject } from '../../types/global-types';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { resolveSupportedVersion } from './utils/resolve-supported-version';\nimport { formatApplePayContactToAdyenAddressFormat } from './utils/format-applepay-contact-to-adyen-format';\nimport { mapBrands } from './utils/map-adyen-brands-to-applepay-brands';\nimport ApplePaySdkLoader from './services/ApplePaySdkLoader';\nimport { detectInIframe } from '../../utils/detectInIframe';\nimport type { ApplePayConfiguration, ApplePayElementData, ApplePayPaymentOrderDetails, ApplePaySessionRequest } from './types';\nimport type { ICore } from '../../core/types';\nimport type { PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nconst LATEST_APPLE_PAY_VERSION = 14;\n\nclass ApplePayElement extends UIElement<ApplePayConfiguration> {\n public static type = TxVariants.applepay;\n\n protected static defaultProps = defaultProps;\n\n private sdkLoader: ApplePaySdkLoader;\n private applePayVersionNumber: number = undefined;\n\n constructor(checkout: ICore, props?: ApplePayConfiguration) {\n super(checkout, props);\n\n const { isExpress, onShippingContactSelected, onShippingMethodSelected } = this.props;\n\n if (isExpress === false && (onShippingContactSelected || onShippingMethodSelected)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'ApplePay - You must set \"isExpress\" flag to \"true\" in order to use \"onShippingContactSelected\" and/or \"onShippingMethodSelected\" callbacks'\n );\n }\n\n this.startSession = this.startSession.bind(this);\n this.submit = this.submit.bind(this);\n this.validateMerchant = this.validateMerchant.bind(this);\n this.collectOrderTrackingDetailsIfNeeded = this.collectOrderTrackingDetailsIfNeeded.bind(this);\n this.handleAuthorization = this.handleAuthorization.bind(this);\n this.defineApplePayVersionNumber = this.defineApplePayVersionNumber.bind(this);\n this.configureApplePayWebOptions = this.configureApplePayWebOptions.bind(this);\n\n this.sdkLoader = new ApplePaySdkLoader({ analytics: this.analytics });\n\n void this.sdkLoader\n .load()\n .then(this.defineApplePayVersionNumber)\n .then(this.configureApplePayWebOptions)\n .catch(error => {\n this.handleError(error);\n });\n }\n\n /**\n * Formats the component props\n */\n protected override formatProps(props: ApplePayConfiguration): ApplePayConfiguration {\n // @ts-ignore TODO: Fix brands prop\n const supportedNetworks = props.brands?.length ? mapBrands(props.brands) : props.supportedNetworks;\n\n return {\n ...props,\n configuration: props.configuration,\n supportedNetworks,\n buttonLocale: props.buttonLocale ?? props.i18n?.locale,\n totalPriceLabel: props.totalPriceLabel || props.configuration?.merchantName,\n renderApplePayCodeAs: props.renderApplePayCodeAs ?? (detectInIframe() ? 'window' : 'modal')\n };\n }\n\n /**\n * Formats the component data output\n */\n protected override formatData(): ApplePayElementData {\n const { applePayToken, billingAddress, deliveryAddress } = this.state;\n const { isExpress } = this.props;\n\n return {\n paymentMethod: {\n type: ApplePayElement.type,\n applePayToken,\n ...(isExpress && { subtype: 'express' })\n },\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n };\n }\n\n protected override beforeRender(configSetByMerchant?: ApplePayConfiguration) {\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n public override submit = (): void => {\n if (this.props.isInstantPayment) {\n const event = new AnalyticsInfoEvent({ component: this.type, type: InfoEventType.selected, target: UiTarget.instantPaymentButton });\n this.submitAnalytics(event);\n }\n void this.startSession();\n };\n\n public get isValid(): boolean {\n return true;\n }\n\n /**\n * This API is only intended for upstreaming or defaulting to Apple Pay, all other scenarios should continue to\n * use canMakePayments(). For Safari browsers, this API will indicate whether there is a card available to make\n * payments. For third-party browsers a new status of paymentCredentialStatusUnknown will be returned. This does\n * not mean there are no cards available, it means the status cannot be determined and as such defaulting\n * and upstreaming should still be considered.\n *\n * {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/4440085-applepaycapabilities}\n * @param merchantIdentifier\n */\n public async applePayCapabilities(merchantIdentifier?: string): Promise<ApplePayJS.PaymentCredentialStatusResponse> {\n const identifier = merchantIdentifier || this.props.configuration.merchantId;\n\n try {\n await this.sdkLoader.isSdkLoaded();\n return await ApplePaySession?.applePayCapabilities(identifier);\n } catch (error) {\n throw new AdyenCheckoutError('ERROR', 'Apple Pay: Error when requesting applePayCapabilities()', { cause: error });\n }\n }\n\n /**\n * Determines if Apple Pay component can be displayed or not\n */\n public override async isAvailable(): Promise<void> {\n if (window.location.protocol !== 'https:') {\n return Promise.reject(new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Trying to start an Apple Pay session from an insecure document'));\n }\n\n try {\n await this.sdkLoader.isSdkLoaded();\n\n if (ApplePaySession?.canMakePayments()) {\n return Promise.resolve();\n }\n\n return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay is not available on this device'));\n } catch (error) {\n return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay SDK failed to load', { cause: error }));\n }\n }\n\n /**\n * Sets the Apple Pay version available for the shopper.\n * This code needs to be executed once the Apple Pay SDK is fully loaded\n * @private\n */\n private defineApplePayVersionNumber() {\n if (window.location.protocol !== 'https:') return;\n this.applePayVersionNumber = this.props.version || resolveSupportedVersion(LATEST_APPLE_PAY_VERSION);\n }\n\n /**\n * Sets the configuration/callbacks that pertain to the Apple Pay code overlay/modal.\n * @private\n */\n private configureApplePayWebOptions() {\n if (window.ApplePayWebOptions) {\n const { renderApplePayCodeAs, onApplePayCodeClose } = this.props;\n\n window.ApplePayWebOptions.set({\n renderApplePayCodeAs,\n ...(onApplePayCodeClose && { onApplePayCodeClose })\n });\n }\n }\n\n private startSession() {\n const { onValidateMerchant, onPaymentMethodSelected, onShippingMethodSelected, onShippingContactSelected } = this.props;\n\n const paymentRequest = preparePaymentRequest({\n companyName: this.props.configuration.merchantName,\n countryCode: this.core.options.countryCode,\n ...this.props\n });\n\n const session = new ApplePayService(paymentRequest, {\n version: this.applePayVersionNumber,\n onError: (error: unknown) => {\n this.handleError(\n new AdyenCheckoutError('ERROR', 'ApplePay - Something went wrong on ApplePayService', {\n cause: error\n })\n );\n },\n onCancel: event => {\n this.handleError(new AdyenCheckoutError('CANCEL', 'ApplePay UI dismissed', { cause: event }));\n },\n onPaymentMethodSelected,\n onShippingMethodSelected,\n onShippingContactSelected,\n onValidateMerchant: onValidateMerchant || this.validateMerchant,\n onPaymentAuthorized: (resolve, reject, event) => {\n const billingAddress = formatApplePayContactToAdyenAddressFormat(event.payment.billingContact);\n const deliveryAddress = formatApplePayContactToAdyenAddressFormat(event.payment.shippingContact, true);\n\n this.setState({\n applePayToken: btoa(JSON.stringify(event.payment.token.paymentData)),\n authorizedEvent: event,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n });\n\n this.handleAuthorization()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.collectOrderTrackingDetailsIfNeeded)\n .then(({ paymentResponse, orderDetails }) => {\n resolve({\n status: ApplePaySession.STATUS_SUCCESS,\n ...(orderDetails && { orderDetails })\n });\n return paymentResponse;\n })\n .then(paymentResponse => {\n this.handleResponse(paymentResponse);\n })\n .catch((paymentResponse?: RawPaymentResponse) => {\n const errors = paymentResponse?.error?.applePayError;\n\n reject({\n status: ApplePaySession.STATUS_FAILURE,\n errors: errors ? (Array.isArray(errors) ? errors : [errors]) : undefined\n });\n\n const responseWithError: RawPaymentResponse = {\n ...paymentResponse,\n error: {\n applePayError: errors\n }\n };\n\n this.handleFailedResult(responseWithError);\n });\n }\n });\n\n return new Promise<void>((resolve, reject) => this.props.onClick(resolve, reject))\n .then(() => {\n session.begin();\n })\n .catch(() => ({\n // Swallow exception triggered by onClick reject\n }));\n }\n\n /**\n * Call the 'onAuthorized' callback if available.\n * Must be resolved/reject for the payment flow to continue\n *\n * @private\n */\n private async handleAuthorization(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (!this.props.onAuthorized) {\n resolve();\n }\n\n const { authorizedEvent, billingAddress, deliveryAddress } = this.state;\n\n this.props.onAuthorized(\n {\n authorizedEvent,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n },\n { resolve, reject }\n );\n }).catch((error?: ApplePayJS.ApplePayError) => {\n // Format error in a way that the 'catch' of the 'onPaymentAuthorize' block accepts it\n const data = { error: { applePayError: error } };\n return Promise.reject(data);\n });\n }\n\n /**\n * Verify if the 'onOrderTrackingRequest' is provided. If so, triggers the callback expecting an\n * Apple Pay order details back\n *\n * @private\n */\n private async collectOrderTrackingDetailsIfNeeded(\n paymentResponse: PaymentResponseData\n ): Promise<{ orderDetails?: ApplePayPaymentOrderDetails; paymentResponse: PaymentResponseData }> {\n return new Promise<ApplePayPaymentOrderDetails | void>((resolve, reject) => {\n if (!this.props.onOrderTrackingRequest) {\n return resolve();\n }\n\n this.props.onOrderTrackingRequest(resolve, reject);\n })\n .then(orderDetails => {\n return {\n paymentResponse,\n ...(orderDetails && { orderDetails })\n };\n })\n .catch(() => {\n return { paymentResponse };\n });\n }\n\n private async validateMerchant(resolve: (merchantSession: any) => void, reject: (error: string) => void) {\n const { hostname } = window.location;\n const { clientKey, configuration, loadingContext, initiative, domainName } = this.props;\n const { merchantName, merchantId } = configuration;\n const path = `v1/applePay/sessions?clientKey=${clientKey}`;\n const options = { loadingContext, path };\n const request: ApplePaySessionRequest = {\n displayName: merchantName,\n domainName: domainName || hostname,\n initiative,\n merchantIdentifier: merchantId\n };\n\n try {\n const response = await httpPost(options, request);\n const decodedData: DecodeObject = base64.decode(response.data);\n if (!decodedData.success) {\n reject('Could not decode Apple Pay session');\n } else {\n const session = JSON.parse(decodedData.data);\n resolve(session);\n }\n } catch (e) {\n reject('Could not get Apple Pay session');\n }\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (!this.props.showPayButton) {\n return null;\n }\n\n return (\n <ApplePayButton\n buttonStyle={this.props.buttonColor}\n buttonType={this.props.buttonType}\n buttonLocale={this.props.buttonLocale}\n onClick={this.submit}\n />\n );\n }\n}\n\nexport default ApplePayElement;\n"],"names":["ApplePayElement","UIElement","formatProps","props","supportedNetworks","brands","length","mapBrands","configuration","buttonLocale","i18n","locale","totalPriceLabel","merchantName","renderApplePayCodeAs","detectInIframe","formatData","applePayToken","billingAddress","deliveryAddress","this","state","isExpress","paymentMethod","type","subtype","beforeRender","configSetByMerchant","event","AnalyticsInfoEvent","InfoEventType","rendered","component","configData","showPayButton","expressPage","analytics","sendAnalytics","isValid","applePayCapabilities","merchantIdentifier","identifier","merchantId","sdkLoader","isSdkLoaded","ApplePaySession","error","AdyenCheckoutError","cause","isAvailable","window","location","protocol","Promise","reject","canMakePayments","resolve","defineApplePayVersionNumber","applePayVersionNumber","version","resolveSupportedVersion","configureApplePayWebOptions","ApplePayWebOptions","onApplePayCodeClose","set","startSession","onValidateMerchant","onPaymentMethodSelected","onShippingMethodSelected","onShippingContactSelected","paymentRequest","preparePaymentRequest","companyName","countryCode","core","options","session","ApplePayService","onError","handleError","onCancel","validateMerchant","onPaymentAuthorized","formatApplePayContactToAdyenAddressFormat","payment","billingContact","shippingContact","setState","btoa","JSON","stringify","token","paymentData","authorizedEvent","handleAuthorization","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","collectOrderTrackingDetailsIfNeeded","paymentResponse","orderDetails","status","STATUS_SUCCESS","handleResponse","catch","errors","applePayError","STATUS_FAILURE","Array","isArray","undefined","responseWithError","handleFailedResult","onClick","begin","onAuthorized","data","onOrderTrackingRequest","hostname","clientKey","loadingContext","initiative","domainName","path","request","displayName","response","httpPost","decodedData","base64","decode","success","parse","e","componentToRender","h","ApplePayButton","buttonStyle","buttonColor","buttonType","submit","constructor","checkout","super","_define_property","isInstantPayment","selected","target","UiTarget","instantPaymentButton","submitAnalytics","bind","ApplePaySdkLoader","load","TxVariants","applepay","defaultProps"],"mappings":"2sCAwBA,MAAMA,UAAwBC,EA0CPC,WAAAA,CAAYC,GAE3B,MAAMC,EAAoBD,EAAME,QAAQC,OAASC,EAAUJ,EAAME,QAAUF,EAAMC,kBAEjF,MAAO,IACAD,EACHK,cAAeL,EAAMK,cACrBJ,oBACAK,aAAcN,EAAMM,cAAgBN,EAAMO,MAAMC,OAChDC,gBAAiBT,EAAMS,iBAAmBT,EAAMK,eAAeK,aAC/DC,qBAAsBX,EAAMW,uBAAyBC,IAAmB,SAAW,SAE3F,CAKA,UAAAC,GACI,MAAMC,cAAEA,EAAaC,eAAEA,EAAcC,gBAAEA,GAAoBC,KAAKC,OAC1DC,UAAEA,GAAcF,KAAKjB,MAE3B,MAAO,CACHoB,cAAe,CACXC,KAAMxB,EAAgBwB,KACtBP,mBACIK,GAAa,CAAEG,QAAS,eAE5BP,GAAkB,CAAEA,qBACpBC,GAAmB,CAAEA,mBAEjC,CAEmBO,YAAAA,CAAaC,GAC5B,MAAMC,EAAQ,IAAIC,EAAmB,CACjCL,KAAMM,EAA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C,UAEhCX,EAHEjJ,EAGe6J,eAAeA"}
|
|
1
|
+
{"version":3,"file":"ApplePay.js","sources":["../../../../src/components/ApplePay/ApplePay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ApplePayButton from './components/ApplePayButton';\nimport ApplePayService from './services/ApplePayService';\nimport base64 from '../../utils/base64';\nimport defaultProps from './defaultProps';\nimport { httpPost } from '../../core/Services/http';\nimport { preparePaymentRequest } from './utils/payment-request';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { DecodeObject } from '../../types/global-types';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { resolveSupportedVersion } from './utils/resolve-supported-version';\nimport { formatApplePayContactToAdyenAddressFormat } from './utils/format-applepay-contact-to-adyen-format';\nimport { mapBrands } from './utils/map-adyen-brands-to-applepay-brands';\nimport ApplePaySdkLoader from './services/ApplePaySdkLoader';\nimport { detectInIframe } from '../../utils/detectInIframe';\nimport type { ApplePayConfiguration, ApplePayElementData, ApplePayPaymentOrderDetails, ApplePaySessionRequest } from './types';\nimport type { ICore } from '../../core/types';\nimport type { PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nconst LATEST_APPLE_PAY_VERSION = 14;\n\nclass ApplePayElement extends UIElement<ApplePayConfiguration> {\n public static readonly type = TxVariants.applepay;\n\n protected static readonly defaultProps = defaultProps;\n\n private sdkLoader: ApplePaySdkLoader;\n private applePayVersionNumber: number = undefined;\n\n constructor(checkout: ICore, props?: ApplePayConfiguration) {\n super(checkout, props);\n\n const { isExpress, onShippingContactSelected, onShippingMethodSelected } = this.props;\n\n if (isExpress === false && (onShippingContactSelected || onShippingMethodSelected)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'ApplePay - You must set \"isExpress\" flag to \"true\" in order to use \"onShippingContactSelected\" and/or \"onShippingMethodSelected\" callbacks'\n );\n }\n\n this.startSession = this.startSession.bind(this);\n this.submit = this.submit.bind(this);\n this.validateMerchant = this.validateMerchant.bind(this);\n this.collectOrderTrackingDetailsIfNeeded = this.collectOrderTrackingDetailsIfNeeded.bind(this);\n this.handleAuthorization = this.handleAuthorization.bind(this);\n this.defineApplePayVersionNumber = this.defineApplePayVersionNumber.bind(this);\n this.configureApplePayWebOptions = this.configureApplePayWebOptions.bind(this);\n\n this.sdkLoader = new ApplePaySdkLoader({ analytics: this.analytics });\n\n void this.sdkLoader\n .load()\n .then(this.defineApplePayVersionNumber)\n .then(this.configureApplePayWebOptions)\n .catch(error => {\n this.handleError(error);\n });\n }\n\n /**\n * Formats the component props\n */\n protected override formatProps(props: ApplePayConfiguration): ApplePayConfiguration {\n // @ts-ignore TODO: Fix brands prop\n const supportedNetworks = props.brands?.length ? mapBrands(props.brands) : props.supportedNetworks;\n\n return {\n ...props,\n configuration: props.configuration,\n supportedNetworks,\n buttonLocale: props.buttonLocale ?? props.i18n?.locale,\n totalPriceLabel: props.totalPriceLabel || props.configuration?.merchantName,\n renderApplePayCodeAs: props.renderApplePayCodeAs ?? (detectInIframe() ? 'window' : 'modal')\n };\n }\n\n /**\n * Formats the component data output\n */\n protected override formatData(): ApplePayElementData {\n const { applePayToken, billingAddress, deliveryAddress } = this.state;\n const { isExpress } = this.props;\n\n return {\n paymentMethod: {\n type: ApplePayElement.type,\n applePayToken,\n ...(isExpress && { subtype: 'express' })\n },\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n };\n }\n\n protected override beforeRender(configSetByMerchant?: ApplePayConfiguration) {\n const event = new AnalyticsInfoEvent({\n type: InfoEventType.rendered,\n component: this.type,\n configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n });\n\n this.analytics.sendAnalytics(event);\n }\n\n public override submit = (): void => {\n if (this.props.isInstantPayment) {\n const event = new AnalyticsInfoEvent({ component: this.type, type: InfoEventType.selected, target: UiTarget.instantPaymentButton });\n this.submitAnalytics(event);\n }\n void this.startSession();\n };\n\n public get isValid(): boolean {\n return true;\n }\n\n /**\n * This API is only intended for upstreaming or defaulting to Apple Pay, all other scenarios should continue to\n * use canMakePayments(). For Safari browsers, this API will indicate whether there is a card available to make\n * payments. For third-party browsers a new status of paymentCredentialStatusUnknown will be returned. This does\n * not mean there are no cards available, it means the status cannot be determined and as such defaulting\n * and upstreaming should still be considered.\n *\n * {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/4440085-applepaycapabilities}\n * @param merchantIdentifier\n */\n public async applePayCapabilities(merchantIdentifier?: string): Promise<ApplePayJS.PaymentCredentialStatusResponse> {\n const identifier = merchantIdentifier || this.props.configuration.merchantId;\n\n try {\n await this.sdkLoader.isSdkLoaded();\n return await ApplePaySession?.applePayCapabilities(identifier);\n } catch (error) {\n throw new AdyenCheckoutError('ERROR', 'Apple Pay: Error when requesting applePayCapabilities()', { cause: error });\n }\n }\n\n /**\n * Determines if Apple Pay component can be displayed or not\n */\n public override async isAvailable(): Promise<void> {\n if (window.location.protocol !== 'https:') {\n return Promise.reject(new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Trying to start an Apple Pay session from an insecure document'));\n }\n\n try {\n await this.sdkLoader.isSdkLoaded();\n\n if (ApplePaySession?.canMakePayments()) {\n return Promise.resolve();\n }\n\n return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay is not available on this device'));\n } catch (error) {\n return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay SDK failed to load', { cause: error }));\n }\n }\n\n /**\n * Sets the Apple Pay version available for the shopper.\n * This code needs to be executed once the Apple Pay SDK is fully loaded\n * @private\n */\n private defineApplePayVersionNumber() {\n if (window.location.protocol !== 'https:') return;\n this.applePayVersionNumber = this.props.version || resolveSupportedVersion(LATEST_APPLE_PAY_VERSION);\n }\n\n /**\n * Sets the configuration/callbacks that pertain to the Apple Pay code overlay/modal.\n * @private\n */\n private configureApplePayWebOptions() {\n if (window.ApplePayWebOptions) {\n const { renderApplePayCodeAs, onApplePayCodeClose } = this.props;\n\n window.ApplePayWebOptions.set({\n renderApplePayCodeAs,\n ...(onApplePayCodeClose && { onApplePayCodeClose })\n });\n }\n }\n\n private startSession() {\n const { onValidateMerchant, onPaymentMethodSelected, onShippingMethodSelected, onShippingContactSelected } = this.props;\n\n const paymentRequest = preparePaymentRequest({\n companyName: this.props.configuration.merchantName,\n countryCode: this.core.options.countryCode,\n ...this.props\n });\n\n const session = new ApplePayService(paymentRequest, {\n version: this.applePayVersionNumber,\n onError: (error: unknown) => {\n this.handleError(\n new AdyenCheckoutError('ERROR', 'ApplePay - Something went wrong on ApplePayService', {\n cause: error\n })\n );\n },\n onCancel: event => {\n this.handleError(new AdyenCheckoutError('CANCEL', 'ApplePay UI dismissed', { cause: event }));\n },\n onPaymentMethodSelected,\n onShippingMethodSelected,\n onShippingContactSelected,\n onValidateMerchant: onValidateMerchant || this.validateMerchant,\n onPaymentAuthorized: (resolve, reject, event) => {\n const billingAddress = formatApplePayContactToAdyenAddressFormat(event.payment.billingContact);\n const deliveryAddress = formatApplePayContactToAdyenAddressFormat(event.payment.shippingContact, true);\n\n this.setState({\n applePayToken: btoa(JSON.stringify(event.payment.token.paymentData)),\n authorizedEvent: event,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n });\n\n this.handleAuthorization()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.collectOrderTrackingDetailsIfNeeded)\n .then(({ paymentResponse, orderDetails }) => {\n resolve({\n status: ApplePaySession.STATUS_SUCCESS,\n ...(orderDetails && { orderDetails })\n });\n return paymentResponse;\n })\n .then(paymentResponse => {\n this.handleResponse(paymentResponse);\n })\n .catch((paymentResponse?: RawPaymentResponse) => {\n const errors = paymentResponse?.error?.applePayError;\n\n reject({\n status: ApplePaySession.STATUS_FAILURE,\n errors: errors ? (Array.isArray(errors) ? errors : [errors]) : undefined\n });\n\n const responseWithError: RawPaymentResponse = {\n ...paymentResponse,\n error: {\n applePayError: errors\n }\n };\n\n this.handleFailedResult(responseWithError);\n });\n }\n });\n\n return new Promise<void>((resolve, reject) => this.props.onClick(resolve, reject))\n .then(() => {\n session.begin();\n })\n .catch(() => ({\n // Swallow exception triggered by onClick reject\n }));\n }\n\n /**\n * Call the 'onAuthorized' callback if available.\n * Must be resolved/reject for the payment flow to continue\n *\n * @private\n */\n private async handleAuthorization(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (!this.props.onAuthorized) {\n resolve();\n }\n\n const { authorizedEvent, billingAddress, deliveryAddress } = this.state;\n\n this.props.onAuthorized(\n {\n authorizedEvent,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n },\n { resolve, reject }\n );\n }).catch((error?: ApplePayJS.ApplePayError) => {\n // Format error in a way that the 'catch' of the 'onPaymentAuthorize' block accepts it\n const data = { error: { applePayError: error } };\n return Promise.reject(data);\n });\n }\n\n /**\n * Verify if the 'onOrderTrackingRequest' is provided. If so, triggers the callback expecting an\n * Apple Pay order details back\n *\n * @private\n */\n private async collectOrderTrackingDetailsIfNeeded(\n paymentResponse: PaymentResponseData\n ): Promise<{ orderDetails?: ApplePayPaymentOrderDetails; paymentResponse: PaymentResponseData }> {\n return new Promise<ApplePayPaymentOrderDetails | void>((resolve, reject) => {\n if (!this.props.onOrderTrackingRequest) {\n return resolve();\n }\n\n this.props.onOrderTrackingRequest(resolve, reject);\n })\n .then(orderDetails => {\n return {\n paymentResponse,\n ...(orderDetails && { orderDetails })\n };\n })\n .catch(() => {\n return { paymentResponse };\n });\n }\n\n private async validateMerchant(resolve: (merchantSession: any) => void, reject: (error: string) => void) {\n const { hostname } = window.location;\n const { clientKey, configuration, loadingContext, initiative, domainName } = this.props;\n const { merchantName, merchantId } = configuration;\n const path = `v1/applePay/sessions?clientKey=${clientKey}`;\n const options = { loadingContext, path };\n const request: ApplePaySessionRequest = {\n displayName: merchantName,\n domainName: domainName || hostname,\n initiative,\n merchantIdentifier: merchantId\n };\n\n try {\n const response = await httpPost(options, request);\n const decodedData: DecodeObject = base64.decode(response.data);\n if (!decodedData.success) {\n reject('Could not decode Apple Pay session');\n } else {\n const session = JSON.parse(decodedData.data);\n resolve(session);\n }\n } catch (e) {\n reject('Could not get Apple Pay session');\n }\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (!this.props.showPayButton) {\n return null;\n }\n\n return (\n <ApplePayButton\n buttonStyle={this.props.buttonColor}\n buttonType={this.props.buttonType}\n buttonLocale={this.props.buttonLocale}\n onClick={this.submit}\n />\n );\n }\n}\n\nexport default ApplePayElement;\n"],"names":["ApplePayElement","UIElement","formatProps","props","supportedNetworks","brands","length","mapBrands","configuration","buttonLocale","i18n","locale","totalPriceLabel","merchantName","renderApplePayCodeAs","detectInIframe","formatData","applePayToken","billingAddress","deliveryAddress","this","state","isExpress","paymentMethod","type","subtype","beforeRender","configSetByMerchant","event","AnalyticsInfoEvent","InfoEventType","rendered","component","configData","showPayButton","expressPage","analytics","sendAnalytics","isValid","applePayCapabilities","merchantIdentifier","identifier","merchantId","sdkLoader","isSdkLoaded","ApplePaySession","error","AdyenCheckoutError","cause","isAvailable","window","location","protocol","Promise","reject","canMakePayments","resolve","defineApplePayVersionNumber","applePayVersionNumber","version","resolveSupportedVersion","configureApplePayWebOptions","ApplePayWebOptions","onApplePayCodeClose","set","startSession","onValidateMerchant","onPaymentMethodSelected","onShippingMethodSelected","onShippingContactSelected","paymentRequest","preparePaymentRequest","companyName","countryCode","core","options","session","ApplePayService","onError","handleError","onCancel","validateMerchant","onPaymentAuthorized","formatApplePayContactToAdyenAddressFormat","payment","billingContact","shippingContact","setState","btoa","JSON","stringify","token","paymentData","authorizedEvent","handleAuthorization","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","collectOrderTrackingDetailsIfNeeded","paymentResponse","orderDetails","status","STATUS_SUCCESS","handleResponse","catch","errors","applePayError","STATUS_FAILURE","Array","isArray","undefined","responseWithError","handleFailedResult","onClick","begin","onAuthorized","data","onOrderTrackingRequest","hostname","clientKey","loadingContext","initiative","domainName","path","request","displayName","response","httpPost","decodedData","base64","decode","success","parse","e","componentToRender","h","ApplePayButton","buttonStyle","buttonColor","buttonType","submit","constructor","checkout","super","_define_property","isInstantPayment","selected","target","UiTarget","instantPaymentButton","submitAnalytics","bind","ApplePaySdkLoader","load","TxVariants","applepay","defaultProps"],"mappings":"2sCAwBA,MAAMA,UAAwBC,EA0CPC,WAAAA,CAAYC,GAE3B,MAAMC,EAAoBD,EAAME,QAAQC,OAASC,EAAUJ,EAAME,QAAUF,EAAMC,kBAEjF,MAAO,IACAD,EACHK,cAAeL,EAAMK,cACrBJ,oBACAK,aAAcN,EAAMM,cAAgBN,EAAMO,MAAMC,OAChDC,gBAAiBT,EAAMS,iBAAmBT,EAAMK,eAAeK,aAC/DC,qBAAsBX,EAAMW,uBAAyBC,IAAmB,SAAW,SAE3F,CAKA,UAAAC,GACI,MAAMC,cAAEA,EAAaC,eAAEA,EAAcC,gBAAEA,GAAoBC,KAAKC,OAC1DC,UAAEA,GAAcF,KAAKjB,MAE3B,MAAO,CACHoB,cAAe,CACXC,KAAMxB,EAAgBwB,KACtBP,mBACIK,GAAa,CAAEG,QAAS,eAE5BP,GAAkB,CAAEA,qBACpBC,GAAmB,CAAEA,mBAEjC,CAEmBO,YAAAA,CAAaC,GAC5B,MAAMC,EAAQ,IAAIC,EAAmB,CACjCL,KAAMM,EAAcC,SACpBC,UAAWZ,KAAKI,KAChBS,WAAY,IAAKN,EAAqBO,cAAed,KAAKjB,MAAM+B,kBAC5DP,GAAqBL,WAAa,CAAEA,UAAWK,EAAoBL,cACnEK,GAAqBQ,aAAe,CAAEA,YAAaR,EAAoBQ,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ACzB6I,MAAMD,EAAU5I,GAJpB8I,EAAA7H,KAAQuB,iBAAR,GACAsG,EAAA7H,KAAQsC,6BAAgCqD,GAgFxCkC,EAAA7H,KAAgByH,SAAS,KACrB,GAAIzH,KAAKjB,MAAM+I,iBAAkB,CAC7B,MAAMtH,EAAQ,IAAIC,EAAmB,CAAEG,UAAWZ,KAAKI,KAAMA,KAAMM,EAAcqH,SAAUC,OAAQC,EAASC,uBAC5GlI,KAAKmI,gBAAgB3H,EACzB,CACKR,KAAK6C,iBAhFV,MAAM3C,UAAEA,EAAS+C,0BAAEA,EAAyBD,yBAAEA,GAA6BhD,KAAKjB,MAEhF,IAAkB,IAAdmB,IAAwB+C,GAA6BD,GACrD,MAAM,IAAIrB,EACN,uBACA,8IAIR3B,KAAK6C,aAAe7C,KAAK6C,aAAauF,KAAKpI,MAC3CA,KAAKyH,OAASzH,KAAKyH,OAAOW,KAAKpI,MAC/BA,KAAK6D,iBAAmB7D,KAAK6D,iBAAiBuE,KAAKpI,MACnDA,KAAK+E,oCAAsC/E,KAAK+E,oCAAoCqD,KAAKpI,MACzFA,KAAK0E,oBAAsB1E,KAAK0E,oBAAoB0D,KAAKpI,MACzDA,KAAKqC,4BAA8BrC,KAAKqC,4BAA4B+F,KAAKpI,MACzEA,KAAKyC,4BAA8BzC,KAAKyC,4BAA4B2F,KAAKpI,MAEzEA,KAAKuB,UAAY,IAAI8G,EAAkB,CAAErH,UAAWhB,KAAKgB,YAEpDhB,KAAKuB,UACL+G,OACA3D,KAAK3E,KAAKqC,6BACVsC,KAAK3E,KAAKyC,6BACV4C,MAAM3D,IACH1B,KAAK2D,YAAYjC,IAE7B,EApCAmG,EADEjJ,EACqBwB,OAAOmI,EAAWC,UAEzCX,EAHEjJ,EAGwB6J,eAAeA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplePayButton.js","sources":["../../../../../src/components/ApplePay/components/ApplePayButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport type { ApplePayButtonStyle, ApplePayButtonType } from '../types';\nimport './ApplePayButton.scss';\n\ninterface ApplePayButtonProps {\n buttonStyle: ApplePayButtonStyle;\n buttonType: ApplePayButtonType;\n buttonLocale: string;\n onClick(): void;\n}\n\nconst ApplePayButton = ({ buttonStyle, buttonType, buttonLocale, onClick }: ApplePayButtonProps) => {\n return <apple-pay-button data-testid=\"apple-pay-button\" buttonstyle={buttonStyle} type={buttonType} locale={buttonLocale} onclick={onClick} />;\n};\n\nexport default ApplePayButton;\n"],"names":["ApplePayButton","buttonStyle","buttonType","buttonLocale","onClick","h","apple-pay-button","data-testid","buttonstyle","type","locale","onclick"],"mappings":"wEAWA,MAAMA,EAAiB,EAAGC,cAAaC,aAAYC,eAAcC,aACtDC,EAACC,mBAAAA,CAAiBC,cAAY,mBAAmBC,YAAaP,EAAaQ,KAAMP,EAAYQ,OAAQP,EAAcQ,QAASP"}
|
|
1
|
+
{"version":3,"file":"ApplePayButton.js","sources":["../../../../../src/components/ApplePay/components/ApplePayButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport type { ApplePayButtonStyle, ApplePayButtonType } from '../types';\nimport './ApplePayButton.scss';\n\ninterface ApplePayButtonProps {\n buttonStyle: ApplePayButtonStyle;\n buttonType: ApplePayButtonType;\n buttonLocale: string;\n onClick(): void;\n}\n\nconst ApplePayButton = ({ buttonStyle, buttonType, buttonLocale, onClick }: Readonly<ApplePayButtonProps>) => {\n return <apple-pay-button data-testid=\"apple-pay-button\" buttonstyle={buttonStyle} type={buttonType} locale={buttonLocale} onclick={onClick} />;\n};\n\nexport default ApplePayButton;\n"],"names":["ApplePayButton","buttonStyle","buttonType","buttonLocale","onClick","h","apple-pay-button","data-testid","buttonstyle","type","locale","onclick"],"mappings":"wEAWA,MAAMA,EAAiB,EAAGC,cAAaC,aAAYC,eAAcC,aACtDC,EAACC,mBAAAA,CAAiBC,cAAY,mBAAmBC,YAAaP,EAAaQ,KAAMP,EAAYQ,OAAQP,EAAcQ,QAASP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getDecimalAmount as t}from"../../../utils/amount-util.js";const e=e=>{const{countryCode:i,companyName:n,amount:o,...r}=e,a=(e=>String(t(e.value,e.currency)))(o);return i||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:i,currencyCode:o.currency,total:{label:r.totalPriceLabel,amount:a,type:r.totalPriceStatus},lineItems:r.lineItems,shippingContactEditingMode:r.shippingContactEditingMode,shippingMethods:r.shippingMethods,shippingType:r.shippingType,recurringPaymentRequest:r.recurringPaymentRequest,merchantCapabilities:r.merchantCapabilities,supportedCountries:r.supportedCountries,supportedNetworks:r.supportedNetworks,requiredShippingContactFields:r.requiredShippingContactFields,requiredBillingContactFields:r.requiredBillingContactFields,billingContact:r.billingContact,shippingContact:r.shippingContact,applicationData:r.applicationData}};export{e as
|
|
1
|
+
import{getDecimalAmount as t}from"../../../utils/amount-util.js";const e=e=>{const{countryCode:i,companyName:n,amount:o,...r}=e,a=(e=>String(t(e.value,e.currency)))(o);return i||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:i,currencyCode:o.currency,total:{label:r.totalPriceLabel,amount:a,type:r.totalPriceStatus},lineItems:r.lineItems,shippingContactEditingMode:r.shippingContactEditingMode,shippingMethods:r.shippingMethods,shippingType:r.shippingType,recurringPaymentRequest:r.recurringPaymentRequest,merchantCapabilities:r.merchantCapabilities,supportedCountries:r.supportedCountries,supportedNetworks:r.supportedNetworks,requiredShippingContactFields:r.requiredShippingContactFields,requiredBillingContactFields:r.requiredBillingContactFields,billingContact:r.billingContact,shippingContact:r.shippingContact,applicationData:r.applicationData}};export{e as preparePaymentRequest};
|
|
2
2
|
//# sourceMappingURL=payment-request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Atome.js","sources":["../../../../src/components/Atome/Atome.tsx"],"sourcesContent":["import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ATOME_SUPPORTED_COUNTRIES, BILLING_ADDRESS_SPECIFICATION } from './config';\nimport { TxVariants } from '../tx-variants';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class Atome extends OpenInvoiceContainer {\n public static type = TxVariants.atome;\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps({ ...props, ...{ visibility: { deliveryAddress: 'hidden', companyDetails: 'hidden' } } }),\n allowedCountries: ATOME_SUPPORTED_COUNTRIES,\n personalDetailsRequiredFields: ['firstName', 'lastName', 'telephoneNumber'],\n billingAddressRequiredFields: ['country', 'street', 'postalCode'],\n billingAddressSpecification: BILLING_ADDRESS_SPECIFICATION\n };\n }\n}\n"],"names":["Atome","OpenInvoiceContainer","formatProps","props","super","visibility","deliveryAddress","companyDetails","allowedCountries","ATOME_SUPPORTED_COUNTRIES","personalDetailsRequiredFields","billingAddressRequiredFields","billingAddressSpecification","BILLING_ADDRESS_SPECIFICATION","type","TxVariants","atome"],"mappings":"iNAKe,MAAMA,UAAcC,EAG/BC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAY,IAAKC,EAAYE,WAAY,CAAEC,gBAAiB,SAAUC,eAAgB,YAC/FC,iBAAkBC,EAClBC,8BAA+B,CAAC,YAAa,WAAY,mBACzDC,6BAA8B,CAAC,UAAW,SAAU,cACpDC,4BAA6BC,EAErC,cAXiBb,
|
|
1
|
+
{"version":3,"file":"Atome.js","sources":["../../../../src/components/Atome/Atome.tsx"],"sourcesContent":["import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ATOME_SUPPORTED_COUNTRIES, BILLING_ADDRESS_SPECIFICATION } from './config';\nimport { TxVariants } from '../tx-variants';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class Atome extends OpenInvoiceContainer {\n public static readonly type = TxVariants.atome;\n\n formatProps(props: OpenInvoiceConfiguration) {\n return {\n ...super.formatProps({ ...props, ...{ visibility: { deliveryAddress: 'hidden', companyDetails: 'hidden' } } }),\n allowedCountries: ATOME_SUPPORTED_COUNTRIES,\n personalDetailsRequiredFields: ['firstName', 'lastName', 'telephoneNumber'],\n billingAddressRequiredFields: ['country', 'street', 'postalCode'],\n billingAddressSpecification: BILLING_ADDRESS_SPECIFICATION\n };\n }\n}\n"],"names":["Atome","OpenInvoiceContainer","formatProps","props","super","visibility","deliveryAddress","companyDetails","allowedCountries","ATOME_SUPPORTED_COUNTRIES","personalDetailsRequiredFields","billingAddressRequiredFields","billingAddressSpecification","BILLING_ADDRESS_SPECIFICATION","type","TxVariants","atome"],"mappings":"iNAKe,MAAMA,UAAcC,EAG/BC,WAAAA,CAAYC,GACR,MAAO,IACAC,MAAMF,YAAY,IAAKC,EAAYE,WAAY,CAAEC,gBAAiB,SAAUC,eAAgB,YAC/FC,iBAAkBC,EAClBC,8BAA+B,CAAC,YAAa,WAAY,mBACzDC,6BAA8B,CAAC,UAAW,SAAU,cACpDC,4BAA6BC,EAErC,cAXiBb,IACMc,SAAOC,EAAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BacsDD.js","sources":["../../../../src/components/BacsDD/BacsDD.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BacsInput from './components/BacsInput';\nimport BacsResult from './components/BacsResult';\nimport PayButton from '../internal/PayButton';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\nimport { BacsElementData } from './types';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nclass BacsElement extends UIElement<VoucherConfiguration> {\n public static type = TxVariants.directdebit_GB;\n\n formatData(): BacsElementData {\n return {\n paymentMethod: {\n type: BacsElement.type,\n ...(this.state.data?.holderName && { holderName: this.state.data.holderName }),\n ...(this.state.data?.bankAccountNumber && { bankAccountNumber: this.state.data.bankAccountNumber }),\n ...(this.state.data?.bankLocationId && { bankLocationId: this.state.data.bankLocationId })\n },\n ...(this.state.data?.shopperEmail && { shopperEmail: this.state.data.shopperEmail })\n };\n }\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n protected override payButton = (props: PayButtonProps) => {\n return <PayButton onClick={this.submit} {...props} />;\n };\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.url ? (\n <BacsResult\n ref={ref => {\n this.componentRef = ref;\n }}\n icon={this.icon}\n url={this.props.url}\n paymentMethodType={this.props.paymentMethodType}\n onActionHandled={this.onActionHandled}\n // originalAction={this.props.originalAction}\n />\n ) : (\n <BacsInput\n // @ts-ignore ref is internal from the Component\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onChange={this.setState}\n payButton={this.payButton}\n onSubmit={this.submit}\n />\n );\n }\n}\n\nexport default BacsElement;\n"],"names":["BacsElement","UIElement","formatData","paymentMethod","type","this","state","data","holderName","bankAccountNumber","bankLocationId","shopperEmail","isValid","componentToRender","props","url","h","BacsResult","ref","componentRef","icon","paymentMethodType","onActionHandled","BacsInput","onChange","setState","payButton","onSubmit","submit","super","args","_define_property","PayButton","onClick","TxVariants","directdebit_GB"],"mappings":"gbAUA,MAAMA,UAAoBC,EAGtBC,UAAAA,GACI,MAAO,CACHC,cAAe,CACXC,KAAMJ,EAAYI,QACdC,KAAKC,MAAMC,MAAMC,YAAc,CAAEA,WAAYH,KAAKC,MAAMC,KAAKC,eAC7DH,KAAKC,MAAMC,MAAME,mBAAqB,CAAEA,kBAAmBJ,KAAKC,MAAMC,KAAKE,sBAC3EJ,KAAKC,MAAMC,MAAMG,gBAAkB,CAAEA,eAAgBL,KAAKC,MAAMC,KAAKG,oBAEzEL,KAAKC,MAAMC,MAAMI,cAAgB,CAAEA,aAAcN,KAAKC,MAAMC,KAAKI,cAE7E,CAEA,WAAIC,GACA,QAASP,KAAKC,MAAMM,OACxB,CAMmBC,iBAAAA,GACf,OAAOR,KAAKS,MAAMC,IACdC,EAACC,EAAAA,CACGC,IAAKA,IACDb,KAAKc,aAAeD,GAExBE,KAAMf,KAAKe,KACXL,IAAKV,KAAKS,MAAMC,IAChBM,kBAAmBhB,KAAKS,MAAMO,kBAC9BC,gBAAiBjB,KAAKiB,kBAI1BN,EAACO,EAAAA,CAEGL,IAAKA,IACDb,KAAKc,aAAeD,MAEpBb,KAAKS,MACTU,SAAUnB,KAAKoB,SACfC,UAAWrB,KAAKqB,UAChBC,SAAUtB,KAAKuB,QAG3B,mBA/CJC,SAAAC,GAmBIC,EAAA1B,KAAmBqB,YAAaZ,GACrBE,EAACgB,EAAAA,CAAUC,QAAS5B,KAAKuB,UAAYd,MAnBhDiB,EADE/B,
|
|
1
|
+
{"version":3,"file":"BacsDD.js","sources":["../../../../src/components/BacsDD/BacsDD.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BacsInput from './components/BacsInput';\nimport BacsResult from './components/BacsResult';\nimport PayButton from '../internal/PayButton';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\nimport { BacsElementData } from './types';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nclass BacsElement extends UIElement<VoucherConfiguration> {\n public static readonly type = TxVariants.directdebit_GB;\n\n formatData(): BacsElementData {\n return {\n paymentMethod: {\n type: BacsElement.type,\n ...(this.state.data?.holderName && { holderName: this.state.data.holderName }),\n ...(this.state.data?.bankAccountNumber && { bankAccountNumber: this.state.data.bankAccountNumber }),\n ...(this.state.data?.bankLocationId && { bankLocationId: this.state.data.bankLocationId })\n },\n ...(this.state.data?.shopperEmail && { shopperEmail: this.state.data.shopperEmail })\n };\n }\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n protected override payButton = (props: PayButtonProps) => {\n return <PayButton onClick={this.submit} {...props} />;\n };\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.url ? (\n <BacsResult\n ref={ref => {\n this.componentRef = ref;\n }}\n icon={this.icon}\n url={this.props.url}\n paymentMethodType={this.props.paymentMethodType}\n onActionHandled={this.onActionHandled}\n // originalAction={this.props.originalAction}\n />\n ) : (\n <BacsInput\n // @ts-ignore ref is internal from the Component\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onChange={this.setState}\n payButton={this.payButton}\n onSubmit={this.submit}\n />\n );\n }\n}\n\nexport default BacsElement;\n"],"names":["BacsElement","UIElement","formatData","paymentMethod","type","this","state","data","holderName","bankAccountNumber","bankLocationId","shopperEmail","isValid","componentToRender","props","url","h","BacsResult","ref","componentRef","icon","paymentMethodType","onActionHandled","BacsInput","onChange","setState","payButton","onSubmit","submit","super","args","_define_property","PayButton","onClick","TxVariants","directdebit_GB"],"mappings":"gbAUA,MAAMA,UAAoBC,EAGtBC,UAAAA,GACI,MAAO,CACHC,cAAe,CACXC,KAAMJ,EAAYI,QACdC,KAAKC,MAAMC,MAAMC,YAAc,CAAEA,WAAYH,KAAKC,MAAMC,KAAKC,eAC7DH,KAAKC,MAAMC,MAAME,mBAAqB,CAAEA,kBAAmBJ,KAAKC,MAAMC,KAAKE,sBAC3EJ,KAAKC,MAAMC,MAAMG,gBAAkB,CAAEA,eAAgBL,KAAKC,MAAMC,KAAKG,oBAEzEL,KAAKC,MAAMC,MAAMI,cAAgB,CAAEA,aAAcN,KAAKC,MAAMC,KAAKI,cAE7E,CAEA,WAAIC,GACA,QAASP,KAAKC,MAAMM,OACxB,CAMmBC,iBAAAA,GACf,OAAOR,KAAKS,MAAMC,IACdC,EAACC,EAAAA,CACGC,IAAKA,IACDb,KAAKc,aAAeD,GAExBE,KAAMf,KAAKe,KACXL,IAAKV,KAAKS,MAAMC,IAChBM,kBAAmBhB,KAAKS,MAAMO,kBAC9BC,gBAAiBjB,KAAKiB,kBAI1BN,EAACO,EAAAA,CAEGL,IAAKA,IACDb,KAAKc,aAAeD,MAEpBb,KAAKS,MACTU,SAAUnB,KAAKoB,SACfC,UAAWrB,KAAKqB,UAChBC,SAAUtB,KAAKuB,QAG3B,mBA/CJC,SAAAC,GAmBIC,EAAA1B,KAAmBqB,YAAaZ,GACrBE,EAACgB,EAAAA,CAAUC,QAAS5B,KAAKuB,UAAYd,MAnBhDiB,EADE/B,EACqBI,OAAO8B,EAAWC"}
|