@adyen/adyen-web 6.31.0 → 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/README.md +1 -1
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +265 -224
- 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/types.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.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 +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/Giftcard/components/useSRPanelForGiftcardErrors.js +1 -1
- package/dist/es/components/Giftcard/components/useSRPanelForGiftcardErrors.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 +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es/components/ThreeDS2/callSubmit3DS2Fingerprint.js +1 -1
- package/dist/es/components/ThreeDS2/callSubmit3DS2Fingerprint.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +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 +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/CSF/utils/userAgent.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/utils/userAgent.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.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/Analytics/events/AnalyticsErrorEvent.js +1 -1
- package/dist/es/core/Analytics/events/AnalyticsErrorEvent.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 +265 -224
- package/dist/es/index.js +1 -1
- package/dist/es/utils/getOrigin.js +1 -1
- package/dist/es/utils/setFocus.js +1 -1
- package/dist/es/utils/setFocus.js.map +1 -1
- package/dist/es/utils/windowScrollTo.js +2 -0
- package/dist/es/utils/windowScrollTo.js.map +1 -0
- 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/types.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.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 +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/Giftcard/components/useSRPanelForGiftcardErrors.js +1 -1
- package/dist/es-legacy/components/Giftcard/components/useSRPanelForGiftcardErrors.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 +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/callSubmit3DS2Fingerprint.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/callSubmit3DS2Fingerprint.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +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 +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/CSF/utils/userAgent.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/userAgent.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.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/Analytics/events/AnalyticsErrorEvent.js +1 -1
- package/dist/es-legacy/core/Analytics/events/AnalyticsErrorEvent.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/dist/es-legacy/utils/setFocus.js +1 -1
- package/dist/es-legacy/utils/setFocus.js.map +1 -1
- package/dist/es-legacy/utils/windowScrollTo.js +2 -0
- package/dist/es-legacy/utils/windowScrollTo.js.map +1 -0
- 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":"InfoModal.js","sources":["../../../../../../src/components/Card/components/Fastlane/InfoModal.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useRef } from 'preact/hooks';\nimport useImage from '../../../../core/Context/useImage';\nimport { Modal } from '../../../internal/Modal';\nimport Img from '../../../internal/Img';\nimport Button from '../../../internal/Button';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport uuid from '../../../../utils/uuid';\n\nimport './InfoModal.scss';\n\ninterface InfoModalProps {\n isOpen: boolean;\n focusAfterClose: HTMLElement;\n onClose(): void;\n}\n\nconst FASTLANE_BENEFITS = [\n {\n headerKey: 'card.fastlane.modal.benefit1.header',\n labelById: `adyen-fastlane-modal-label-${uuid()}`,\n descriptionTextKey: 'card.fastlane.modal.benefit1.text',\n describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n image: 'fastlane_autofill',\n altImage: ''\n },\n {\n headerKey: 'card.fastlane.modal.benefit2.header',\n labelById: `adyen-fastlane-modal-label-${uuid()}`,\n descriptionTextKey: 'card.fastlane.modal.benefit2.text',\n describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n image: 'fastlane_protection',\n altImage: ''\n },\n {\n headerKey: 'card.fastlane.modal.benefit3.header',\n labelById: `adyen-fastlane-modal-label-${uuid()}`,\n descriptionTextKey: 'card.fastlane.modal.benefit3.text',\n describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n image: 'fastlane_ubiquity',\n altImage: ''\n }\n];\n\nconst InfoModal = ({ isOpen, onClose, focusAfterClose }: InfoModalProps) => {\n const { i18n } = useCoreContext();\n const focusFirstElement = useRef<HTMLParagraphElement>();\n const getImage = useImage();\n\n const labelledBy = FASTLANE_BENEFITS.map(benefit => benefit.labelById).join(' ');\n const describedBy = FASTLANE_BENEFITS.map(benefit => benefit.describedById).join(' ');\n\n return (\n <Modal\n onClose={onClose}\n isOpen={isOpen}\n labelledBy={labelledBy}\n describedBy={describedBy}\n focusFirst={focusFirstElement.current}\n focusAfterClose={focusAfterClose}\n >\n {({ onCloseModal }) => (\n <div className=\"adyen-checkout-card-fastlane__modal\">\n <div className=\"adyen-checkout-card-fastlane__modal-button-container\">\n <Button\n onClick={onCloseModal}\n inline\n variant=\"link\"\n ariaLabel={i18n.get('card.fastlane.a11y.closeDialog')}\n label={\n <Img height=\"10\" width=\"10\" src={getImage({ imageFolder: 'components/' })('cross_black')} aria-hidden={true} alt=\"\" />\n }\n />\n </div>\n\n {FASTLANE_BENEFITS.map(benefit => (\n <div key={benefit.labelById} className=\"adyen-checkout-card-fastlane__modal-section\">\n <Img\n className=\"adyen-checkout-card-fastlane__modal-section-image\"\n src={getImage({ imageFolder: 'components/' })(benefit.image)}\n alt={benefit.altImage}\n />\n <h1 id={benefit.labelById} className=\"adyen-checkout-card-fastlane__modal-section-header\">\n {i18n.get(benefit.headerKey)}\n </h1>\n <div id={benefit.describedById} className=\"adyen-checkout-card-fastlane__modal-section-text\">\n {i18n.get(benefit.descriptionTextKey)}\n </div>\n </div>\n ))}\n\n <Img\n className=\"adyen-checkout-card-fastlane__modal-brand\"\n src={getImage({ imageFolder: 'components/' })(`paypal_fastlane_black`)}\n alt={i18n.get('card.fastlane.a11y.logo')}\n />\n </div>\n )}\n </Modal>\n );\n};\n\nexport { InfoModal };\n"],"names":["FASTLANE_BENEFITS","headerKey","labelById","uuid","descriptionTextKey","describedById","image","altImage","InfoModal","isOpen","onClose","focusAfterClose","i18n","useCoreContext","focusFirstElement","useRef","getImage","useImage","labelledBy","map","benefit","join","describedBy","h","Modal","focusFirst","current","onCloseModal","div","className","Button","onClick","inline","variant","ariaLabel","get","label","Img","height","width","src","imageFolder","aria-hidden","alt","key","h1","id"],"mappings":"kdAiBA,MAAMA,EAAoB,CACtB,CACIC,UAAW,sCACXC,UAAW,8BAA8BC,MACzCC,mBAAoB,oCACpBC,cAAe,oCAAoCF,MACnDG,MAAO,oBACPC,SAAU,IAEd,CACIN,UAAW,sCACXC,UAAW,8BAA8BC,MACzCC,mBAAoB,oCACpBC,cAAe,oCAAoCF,MACnDG,MAAO,sBACPC,SAAU,IAEd,CACIN,UAAW,sCACXC,UAAW,8BAA8BC,MACzCC,mBAAoB,oCACpBC,cAAe,oCAAoCF,MACnDG,MAAO,oBACPC,SAAU,KAIZC,EAAY,EAAGC,SAAQC,UAASC,sBAClC,MAAMC,KAAEA,GAASC,IACXC,EAAoBC,IACpBC,EAAWC,IAEXC,EAAalB,EAAkBmB,IAAIC,GAAWA,EAAQlB,WAAWmB,KAAK,KACtEC,EAActB,EAAkBmB,IAAIC,GAAWA,EAAQf,eAAegB,KAAK,KAEjF,OACIE,EAACC,EAAAA,CACGd,QAASA,EACTD,OAAQA,EACRS,WAAYA,EACZI,YAAaA,EACbG,WAAYX,EAAkBY,QAC9Bf,gBAAiBA,GAEhB,EAAGgB,kBACAJ,EAACK,MAAAA,CAAIC,UAAU,uCACXN,EAACK,MAAAA,CAAIC,UAAU,wDACXN,EAACO,EAAAA,CACGC,QAASJ,EACTK,QAAAA,EACAC,QAAQ,OACRC,UAAWtB,EAAKuB,IAAI,kCACpBC,MACIb,EAACc,EAAAA,CAAIC,OAAO,KAAKC,MAAM,KAAKC,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,eAAgB0B,eAAa,EAAMC,IAAI,QAK5H3C,EAAkBmB,IAAIC,GACnBG,EAACK,MAAAA,CAAIgB,IAAKxB,EAAQlB,UAAW2B,UAAU,+CACnCN,EAACc,EAAAA,CACGR,UAAU,oDACVW,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyCI,EAAQd,OACtDqC,IAAKvB,EAAQb,WAEjBgB,EAACsB,KAAAA,CAAGC,GAAI1B,EAAQlB,UAAW2B,UAAU,sDAChCjB,EAAKuB,IAAIf,EAAQnB,YAEtBsB,EAACK,MAAAA,CAAIkB,GAAI1B,EAAQf,cAAewB,UAAU,oDACrCjB,EAAKuB,IAAIf,EAAQhB,uBAK9BmB,EAACc,EAAAA,CACGR,UAAU,4CACVW,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,yBAC9C2B,IAAK/B,EAAKuB,IAAI"}
|
|
1
|
+
{"version":3,"file":"InfoModal.js","sources":["../../../../../../src/components/Card/components/Fastlane/InfoModal.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useRef } from 'preact/hooks';\nimport useImage from '../../../../core/Context/useImage';\nimport { Modal } from '../../../internal/Modal';\nimport Img from '../../../internal/Img';\nimport Button from '../../../internal/Button';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport uuid from '../../../../utils/uuid';\n\nimport './InfoModal.scss';\n\ninterface InfoModalProps {\n isOpen: boolean;\n focusAfterClose: HTMLElement;\n onClose(): void;\n}\n\nconst FASTLANE_BENEFITS = [\n {\n headerKey: 'card.fastlane.modal.benefit1.header',\n labelById: `adyen-fastlane-modal-label-${uuid()}`,\n descriptionTextKey: 'card.fastlane.modal.benefit1.text',\n describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n image: 'fastlane_autofill',\n altImage: ''\n },\n {\n headerKey: 'card.fastlane.modal.benefit2.header',\n labelById: `adyen-fastlane-modal-label-${uuid()}`,\n descriptionTextKey: 'card.fastlane.modal.benefit2.text',\n describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n image: 'fastlane_protection',\n altImage: ''\n },\n {\n headerKey: 'card.fastlane.modal.benefit3.header',\n labelById: `adyen-fastlane-modal-label-${uuid()}`,\n descriptionTextKey: 'card.fastlane.modal.benefit3.text',\n describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n image: 'fastlane_ubiquity',\n altImage: ''\n }\n];\n\nconst InfoModal = ({ isOpen, onClose, focusAfterClose }: Readonly<InfoModalProps>) => {\n const { i18n } = useCoreContext();\n const focusFirstElement = useRef<HTMLParagraphElement>();\n const getImage = useImage();\n\n const labelledBy = FASTLANE_BENEFITS.map(benefit => benefit.labelById).join(' ');\n const describedBy = FASTLANE_BENEFITS.map(benefit => benefit.describedById).join(' ');\n\n return (\n <Modal\n onClose={onClose}\n isOpen={isOpen}\n labelledBy={labelledBy}\n describedBy={describedBy}\n focusFirst={focusFirstElement.current}\n focusAfterClose={focusAfterClose}\n >\n {({ onCloseModal }) => (\n <div className=\"adyen-checkout-card-fastlane__modal\">\n <div className=\"adyen-checkout-card-fastlane__modal-button-container\">\n <Button\n onClick={onCloseModal}\n inline\n variant=\"link\"\n ariaLabel={i18n.get('card.fastlane.a11y.closeDialog')}\n label={\n <Img height=\"10\" width=\"10\" src={getImage({ imageFolder: 'components/' })('cross_black')} aria-hidden={true} alt=\"\" />\n }\n />\n </div>\n\n {FASTLANE_BENEFITS.map(benefit => (\n <div key={benefit.labelById} className=\"adyen-checkout-card-fastlane__modal-section\">\n <Img\n className=\"adyen-checkout-card-fastlane__modal-section-image\"\n src={getImage({ imageFolder: 'components/' })(benefit.image)}\n alt={benefit.altImage}\n />\n <h1 id={benefit.labelById} className=\"adyen-checkout-card-fastlane__modal-section-header\">\n {i18n.get(benefit.headerKey)}\n </h1>\n <div id={benefit.describedById} className=\"adyen-checkout-card-fastlane__modal-section-text\">\n {i18n.get(benefit.descriptionTextKey)}\n </div>\n </div>\n ))}\n\n <Img\n className=\"adyen-checkout-card-fastlane__modal-brand\"\n src={getImage({ imageFolder: 'components/' })(`paypal_fastlane_black`)}\n alt={i18n.get('card.fastlane.a11y.logo')}\n />\n </div>\n )}\n </Modal>\n );\n};\n\nexport { InfoModal };\n"],"names":["FASTLANE_BENEFITS","headerKey","labelById","uuid","descriptionTextKey","describedById","image","altImage","InfoModal","isOpen","onClose","focusAfterClose","i18n","useCoreContext","focusFirstElement","useRef","getImage","useImage","labelledBy","map","benefit","join","describedBy","h","Modal","focusFirst","current","onCloseModal","div","className","Button","onClick","inline","variant","ariaLabel","get","label","Img","height","width","src","imageFolder","aria-hidden","alt","key","h1","id"],"mappings":"kdAiBA,MAAMA,EAAoB,CACtB,CACIC,UAAW,sCACXC,UAAW,8BAA8BC,MACzCC,mBAAoB,oCACpBC,cAAe,oCAAoCF,MACnDG,MAAO,oBACPC,SAAU,IAEd,CACIN,UAAW,sCACXC,UAAW,8BAA8BC,MACzCC,mBAAoB,oCACpBC,cAAe,oCAAoCF,MACnDG,MAAO,sBACPC,SAAU,IAEd,CACIN,UAAW,sCACXC,UAAW,8BAA8BC,MACzCC,mBAAoB,oCACpBC,cAAe,oCAAoCF,MACnDG,MAAO,oBACPC,SAAU,KAIZC,EAAY,EAAGC,SAAQC,UAASC,sBAClC,MAAMC,KAAEA,GAASC,IACXC,EAAoBC,IACpBC,EAAWC,IAEXC,EAAalB,EAAkBmB,IAAIC,GAAWA,EAAQlB,WAAWmB,KAAK,KACtEC,EAActB,EAAkBmB,IAAIC,GAAWA,EAAQf,eAAegB,KAAK,KAEjF,OACIE,EAACC,EAAAA,CACGd,QAASA,EACTD,OAAQA,EACRS,WAAYA,EACZI,YAAaA,EACbG,WAAYX,EAAkBY,QAC9Bf,gBAAiBA,GAEhB,EAAGgB,kBACAJ,EAACK,MAAAA,CAAIC,UAAU,uCACXN,EAACK,MAAAA,CAAIC,UAAU,wDACXN,EAACO,EAAAA,CACGC,QAASJ,EACTK,QAAAA,EACAC,QAAQ,OACRC,UAAWtB,EAAKuB,IAAI,kCACpBC,MACIb,EAACc,EAAAA,CAAIC,OAAO,KAAKC,MAAM,KAAKC,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,eAAgB0B,eAAa,EAAMC,IAAI,QAK5H3C,EAAkBmB,IAAIC,GACnBG,EAACK,MAAAA,CAAIgB,IAAKxB,EAAQlB,UAAW2B,UAAU,+CACnCN,EAACc,EAAAA,CACGR,UAAU,oDACVW,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyCI,EAAQd,OACtDqC,IAAKvB,EAAQb,WAEjBgB,EAACsB,KAAAA,CAAGC,GAAI1B,EAAQlB,UAAW2B,UAAU,sDAChCjB,EAAKuB,IAAIf,EAAQnB,YAEtBsB,EAACK,MAAAA,CAAIkB,GAAI1B,EAAQf,cAAewB,UAAU,oDACrCjB,EAAKuB,IAAIf,EAAQhB,uBAK9BmB,EAACc,EAAAA,CACGR,UAAU,4CACVW,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,yBAC9C2B,IAAK/B,EAAKuB,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"USOnlyPhoneInput.js","sources":["../../../../../../src/components/Card/components/Fastlane/USOnlyPhoneInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useEffect, useRef } from 'preact/hooks';\nimport Field from '../../../internal/FormFields/Field';\nimport useForm from '../../../../utils/useForm';\nimport InputTelephone from '../../../internal/FormFields/InputTelephone';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport mobileNumberFormatter from './utils/mobile-number-formatter';\n\ninterface USOnlyPhoneInputStateData {\n mobileNumber?: string;\n}\n\ninterface USOnlyPhoneInputProps {\n onChange(mobileNumber: string): void;\n initialValue?: string;\n}\n\nconst USOnlyPhoneInput = ({ initialValue, onChange }: USOnlyPhoneInputProps) => {\n const { i18n } = useCoreContext();\n const formSchema = ['mobileNumber'];\n const { handleChangeFor, data } = useForm<USOnlyPhoneInputStateData>({\n schema: formSchema,\n defaultData: {\n mobileNumber: initialValue\n },\n formatters: {\n mobileNumber: mobileNumberFormatter\n }\n });\n const inputRef = useRef<HTMLInputElement>(null);\n\n const focusInput = useCallback(() => {\n inputRef.current?.focus();\n }, [inputRef.current]);\n\n useEffect(() => {\n onChange(data.mobileNumber?.replaceAll(' ', ''));\n }, [data.mobileNumber, onChange]);\n\n return (\n <Field name=\"mobile-number\" label={i18n.get('card.fastlane.mobileInputLabel')} staticValue=\"+1\" onInputContainerClick={focusInput}>\n <InputTelephone\n name={'mobile-number'}\n autocorrect={'off'}\n spellcheck={false}\n maxlength={12}\n value={data.mobileNumber}\n onInput={handleChangeFor('mobileNumber', 'input')}\n onBlur={handleChangeFor('mobileNumber', 'blur')}\n setRef={inputRef}\n />\n </Field>\n );\n};\n\nexport default USOnlyPhoneInput;\n"],"names":["USOnlyPhoneInput","initialValue","onChange","i18n","useCoreContext","handleChangeFor","data","useForm","schema","defaultData","mobileNumber","formatters","mobileNumberFormatter","inputRef","useRef","focusInput","useCallback","current","focus","useEffect","replaceAll","h","Field","name","label","get","staticValue","onInputContainerClick","InputTelephone","autocorrect","spellcheck","maxlength","value","onInput","onBlur","setRef"],"mappings":"6dAiBA,MAAMA,EAAmB,EAAGC,eAAcC,eACtC,MAAMC,KAAEA,GAASC,KAEXC,gBAAEA,EAAeC,KAAEA,GAASC,EAAmC,CACjEC,OAFe,CAAC,gBAGhBC,YAAa,CACTC,aAAcT,GAElBU,WAAY,CACRD,aAAcE,KAGhBC,EAAWC,EAAyB,MAEpCC,EAAaC,EAAY,KAC3BH,IAAAA,EAAgB,QAAhBA,EAAAA,EAASI,mBAATJ,GAAAA,EAAkBK,SACnB,CAACL,EAASI,UAMb,OAJAE,EAAU,KACGb,IAAAA,EAATJ,EAA0B,QAAjBI,EAAAA,EAAKI,wBAALJ,SAAAA,EAAmBc,WAAW,IAAK,MAC7C,CAACd,EAAKI,aAAcR,IAGnBmB,EAACC,EAAAA,CAAMC,KAAK,gBAAgBC,MAAOrB,EAAKsB,IAAI,kCAAmCC,YAAY,KAAKC,sBAAuBZ,GACnHM,EAACO,EAAAA,CACGL,KAAM,gBACNM,YAAa,MACbC,YAAY,EACZC,UAAW,GACXC,MAAO1B,EAAKI,aACZuB,QAAS5B,EAAgB,eAAgB,SACzC6B,OAAQ7B,EAAgB,eAAgB,QACxC8B,OAAQtB"}
|
|
1
|
+
{"version":3,"file":"USOnlyPhoneInput.js","sources":["../../../../../../src/components/Card/components/Fastlane/USOnlyPhoneInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useEffect, useRef } from 'preact/hooks';\nimport Field from '../../../internal/FormFields/Field';\nimport useForm from '../../../../utils/useForm';\nimport InputTelephone from '../../../internal/FormFields/InputTelephone';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport mobileNumberFormatter from './utils/mobile-number-formatter';\n\ninterface USOnlyPhoneInputStateData {\n mobileNumber?: string;\n}\n\ninterface USOnlyPhoneInputProps {\n onChange(mobileNumber: string): void;\n initialValue?: string;\n}\n\nconst USOnlyPhoneInput = ({ initialValue, onChange }: Readonly<USOnlyPhoneInputProps>) => {\n const { i18n } = useCoreContext();\n const formSchema = ['mobileNumber'];\n const { handleChangeFor, data } = useForm<USOnlyPhoneInputStateData>({\n schema: formSchema,\n defaultData: {\n mobileNumber: initialValue\n },\n formatters: {\n mobileNumber: mobileNumberFormatter\n }\n });\n const inputRef = useRef<HTMLInputElement>(null);\n\n const focusInput = useCallback(() => {\n inputRef.current?.focus();\n }, [inputRef.current]);\n\n useEffect(() => {\n onChange(data.mobileNumber?.replaceAll(' ', ''));\n }, [data.mobileNumber, onChange]);\n\n return (\n <Field name=\"mobile-number\" label={i18n.get('card.fastlane.mobileInputLabel')} staticValue=\"+1\" onInputContainerClick={focusInput}>\n <InputTelephone\n name={'mobile-number'}\n autocorrect={'off'}\n spellcheck={false}\n maxlength={12}\n value={data.mobileNumber}\n onInput={handleChangeFor('mobileNumber', 'input')}\n onBlur={handleChangeFor('mobileNumber', 'blur')}\n setRef={inputRef}\n />\n </Field>\n );\n};\n\nexport default USOnlyPhoneInput;\n"],"names":["USOnlyPhoneInput","initialValue","onChange","i18n","useCoreContext","handleChangeFor","data","useForm","schema","defaultData","mobileNumber","formatters","mobileNumberFormatter","inputRef","useRef","focusInput","useCallback","current","focus","useEffect","replaceAll","h","Field","name","label","get","staticValue","onInputContainerClick","InputTelephone","autocorrect","spellcheck","maxlength","value","onInput","onBlur","setRef"],"mappings":"6dAiBA,MAAMA,EAAmB,EAAGC,eAAcC,eACtC,MAAMC,KAAEA,GAASC,KAEXC,gBAAEA,EAAeC,KAAEA,GAASC,EAAmC,CACjEC,OAFe,CAAC,gBAGhBC,YAAa,CACTC,aAAcT,GAElBU,WAAY,CACRD,aAAcE,KAGhBC,EAAWC,EAAyB,MAEpCC,EAAaC,EAAY,KAC3BH,IAAAA,EAAgB,QAAhBA,EAAAA,EAASI,mBAATJ,GAAAA,EAAkBK,SACnB,CAACL,EAASI,UAMb,OAJAE,EAAU,KACGb,IAAAA,EAATJ,EAA0B,QAAjBI,EAAAA,EAAKI,wBAALJ,SAAAA,EAAmBc,WAAW,IAAK,MAC7C,CAACd,EAAKI,aAAcR,IAGnBmB,EAACC,EAAAA,CAAMC,KAAK,gBAAgBC,MAAOrB,EAAKsB,IAAI,kCAAmCC,YAAY,KAAKC,sBAAuBZ,GACnHM,EAACO,EAAAA,CACGL,KAAM,gBACNM,YAAa,MACbC,YAAY,EACZC,UAAW,GACXC,MAAO1B,EAAKI,aACZuB,QAAS5B,EAAgB,eAAgB,SACzC6B,OAAQ7B,EAAgB,eAAgB,QACxC8B,OAAQtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CashAppPay.js","sources":["../../../../src/components/CashAppPay/CashAppPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CashAppComponent } from './components/CashAppComponent';\nimport CashAppService from './services/CashAppService';\nimport { CashAppSdkLoader } from './services/CashAppSdkLoader';\nimport { CashAppPayElementData, CashAppPayConfiguration, CashAppPayEventData } from './types';\nimport { ICashAppService } from './services/types';\nimport defaultProps from './defaultProps';\nimport RedirectButton from '../internal/RedirectButton';\nimport { payAmountLabel } from '../internal/PayButton/utils';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\nimport { PREFIX } from '../internal/Icon/constants';\n\nexport class CashAppPay extends UIElement<CashAppPayConfiguration> {\n public static type = TxVariants.cashapp;\n\n private readonly cashAppService: ICashAppService | undefined;\n\n protected static defaultProps = defaultProps;\n\n constructor(checkout: ICore, props?: CashAppPayConfiguration) {\n super(checkout, props);\n\n if (this.props.enableStoreDetails && this.props.storePaymentMethod) {\n console.warn(\n 'CashAppPay: enableStoreDetails AND storePaymentMethod configuration properties should not be used together. That can lead to undesired behavior.'\n );\n }\n\n if (this.props.storedPaymentMethodId) {\n return;\n }\n\n const sdkLoader = new CashAppSdkLoader({\n environment: this.props.environment,\n analytics: this.analytics\n });\n\n this.cashAppService = new CashAppService(sdkLoader, {\n storePaymentMethod: this.props.storePaymentMethod,\n useCashAppButtonUi: this.props.showPayButton,\n environment: this.props.environment,\n redirectURL: this.props.redirectURL,\n clientId: this.props.configuration?.clientId,\n scopeId: this.props.configuration?.scopeId,\n button: this.props.button,\n referenceId: this.props.referenceId\n });\n }\n\n public formatProps(props: CashAppPayConfiguration) {\n return {\n ...props,\n enableStoreDetails: props.session?.configuration?.enableStoreDetails || props.enableStoreDetails\n };\n }\n\n public formatData(): CashAppPayElementData {\n const { shopperWantsToStore, grantId, onFileGrantId, cashTag, customerId } = this.state.data || {};\n const { storePaymentMethod: storePaymentMethodSetByMerchant, storedPaymentMethodId } = this.props;\n\n /**\n * We include 'storePaymentMethod' flag if we either Display the Checkbox OR if it is non-sessions flow AND the merchant wants to store the payment method\n */\n const includeStorePaymentMethod = this.props.enableStoreDetails || (!this.props.session && storePaymentMethodSetByMerchant);\n\n if (storedPaymentMethodId) {\n return {\n paymentMethod: {\n type: CashAppPay.type,\n storedPaymentMethodId\n }\n };\n }\n\n const shouldAddOnFileProperties = onFileGrantId && cashTag;\n\n return {\n paymentMethod: {\n type: CashAppPay.type,\n ...(grantId && { grantId }),\n ...(customerId && { customerId }),\n ...(shouldAddOnFileProperties && { onFileGrantId, cashtag: cashTag })\n },\n ...(includeStorePaymentMethod && { storePaymentMethod: storePaymentMethodSetByMerchant || shopperWantsToStore })\n };\n }\n\n get displayName() {\n if (this.props.storedPaymentMethodId && this.props.cashtag) {\n return this.props.cashtag;\n }\n return this.props.name;\n }\n\n get additionalInfo() {\n return this.props.storedPaymentMethodId ? 'Cash App Pay' : '';\n }\n\n public submit = () => {\n const { onClick, storedPaymentMethodId } = this.props;\n\n if (storedPaymentMethodId) {\n super.submit();\n return;\n }\n\n let onClickPromiseRejected = false;\n\n new Promise<void>((resolve, reject) => onClick({ resolve, reject }))\n .catch(() => {\n onClickPromiseRejected = true;\n throw Error('onClick rejected');\n })\n .then(() => {\n return this.cashAppService.createCustomerRequest(this.props.amount);\n })\n .then(() => {\n this.cashAppService.begin();\n })\n .catch(error => {\n if (onClickPromiseRejected) {\n // Swallow exception triggered by onClick reject\n return;\n }\n this.handleError(error);\n });\n };\n\n public get isValid(): boolean {\n return true;\n }\n\n private handleOnChangeStoreDetails = (storePayment: boolean) => {\n const data = { ...this.state.data, shopperWantsToStore: storePayment };\n this.setState({ data });\n };\n\n private handleAuthorize = (cashAppPaymentData: CashAppPayEventData): void => {\n const data = { ...this.state.data, ...cashAppPaymentData };\n this.setState({ data, valid: {}, errors: {}, isValid: true });\n super.submit();\n };\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n label={payAmountLabel(this.props.i18n, this.props.amount)}\n icon={this.resources?.getImage({ imageFolder: 'components/' })(`${PREFIX}lock`)}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <CashAppComponent\n ref={ref => {\n this.componentRef = ref;\n }}\n enableStoreDetails={this.props.enableStoreDetails}\n cashAppService={this.cashAppService}\n onChangeStoreDetails={this.handleOnChangeStoreDetails}\n onError={this.handleError}\n onClick={this.submit}\n onAuthorize={this.handleAuthorize}\n />\n );\n }\n}\n\nexport default CashAppPay;\n"],"names":["CashAppPay","UIElement","formatProps","props","_object_spread_props","_object_spread","enableStoreDetails","session","configuration","formatData","shopperWantsToStore","grantId","onFileGrantId","cashTag","customerId","this","state","data","storePaymentMethod","storePaymentMethodSetByMerchant","storedPaymentMethodId","includeStorePaymentMethod","paymentMethod","type","cashtag","displayName","name","additionalInfo","isValid","componentToRender","_this_resources","h","RedirectButton","showPayButton","label","payAmountLabel","i18n","amount","icon","resources","getImage","imageFolder","PREFIX","payButton","onSubmit","submit","ref","componentRef","CashAppComponent","cashAppService","onChangeStoreDetails","handleOnChangeStoreDetails","onError","handleError","onClick","onAuthorize","handleAuthorize","constructor","checkout","_this_props_configuration","_this_props_configuration1","super","_define_property","onClickPromiseRejected","Promise","resolve","reject","catch","Error","then","createCustomerRequest","begin","error","storePayment","setState","cashAppPaymentData","valid","errors","console","warn","sdkLoader","CashAppSdkLoader","environment","analytics","CashAppService","useCashAppButtonUi","redirectURL","clientId","scopeId","button","referenceId","TxVariants","cashapp","defaultProps"],"mappings":"k2CAcO,MAAMA,UAAmBC,EAqCrBC,WAAAA,CAAYC,OAGSA,EAAAA,EAFxB,OAAOC,EAAAC,EAAA,CAAA,EACAF,GAAAA,CACHG,4BAAoBH,EAAAA,EAAMI,eAANJ,IAAAA,WAAAA,EAAAA,EAAeK,qBAAfL,IAAAA,SAAAA,EAA8BG,qBAAsBH,EAAMG,oBAEtF,CAEOG,UAAAA,GACH,MAAMC,oBAAEA,EAAmBC,QAAE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E,KAAKZ,MAAM8B,cAC/BiD,YAAanE,KAAKZ,MAAM+E,YACxBI,YAAavE,KAAKZ,MAAMmF,YACxBC,SAAkC,QAAxB5B,EAAA5C,KAAKZ,MAAMK,qBAAX,IAAAmD,OAAA,EAAAA,EAA0B4B,SACpCC,QAAiC,QAAxB5B,EAAA7C,KAAKZ,MAAMK,qBAAX,IAAAoD,OAAA,EAAAA,EAA0B4B,QACnCC,OAAQ1E,KAAKZ,MAAMsF,OACnBC,YAAa3E,KAAKZ,MAAMuF,aAEhC,EAlCA5B,EADS9D,EACKuB,OAAOoE,EAAWC,SAIhC9B,EALS9D,EAKQ6F,eAAeA"}
|
|
1
|
+
{"version":3,"file":"CashAppPay.js","sources":["../../../../src/components/CashAppPay/CashAppPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CashAppComponent } from './components/CashAppComponent';\nimport CashAppService from './services/CashAppService';\nimport { CashAppSdkLoader } from './services/CashAppSdkLoader';\nimport { CashAppPayElementData, CashAppPayConfiguration, CashAppPayEventData } from './types';\nimport { ICashAppService } from './services/types';\nimport defaultProps from './defaultProps';\nimport RedirectButton from '../internal/RedirectButton';\nimport { payAmountLabel } from '../internal/PayButton/utils';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\nimport { PREFIX } from '../internal/Icon/constants';\n\nexport class CashAppPay extends UIElement<CashAppPayConfiguration> {\n public static readonly type = TxVariants.cashapp;\n\n private readonly cashAppService: ICashAppService | undefined;\n\n protected static readonly defaultProps = defaultProps;\n\n constructor(checkout: ICore, props?: CashAppPayConfiguration) {\n super(checkout, props);\n\n if (this.props.enableStoreDetails && this.props.storePaymentMethod) {\n console.warn(\n 'CashAppPay: enableStoreDetails AND storePaymentMethod configuration properties should not be used together. That can lead to undesired behavior.'\n );\n }\n\n if (this.props.storedPaymentMethodId) {\n return;\n }\n\n const sdkLoader = new CashAppSdkLoader({\n environment: this.props.environment,\n analytics: this.analytics\n });\n\n this.cashAppService = new CashAppService(sdkLoader, {\n storePaymentMethod: this.props.storePaymentMethod,\n useCashAppButtonUi: this.props.showPayButton,\n environment: this.props.environment,\n redirectURL: this.props.redirectURL,\n clientId: this.props.configuration?.clientId,\n scopeId: this.props.configuration?.scopeId,\n button: this.props.button,\n referenceId: this.props.referenceId\n });\n }\n\n public formatProps(props: CashAppPayConfiguration) {\n return {\n ...props,\n enableStoreDetails: props.session?.configuration?.enableStoreDetails || props.enableStoreDetails\n };\n }\n\n public formatData(): CashAppPayElementData {\n const { shopperWantsToStore, grantId, onFileGrantId, cashTag, customerId } = this.state.data || {};\n const { storePaymentMethod: storePaymentMethodSetByMerchant, storedPaymentMethodId } = this.props;\n\n /**\n * We include 'storePaymentMethod' flag if we either Display the Checkbox OR if it is non-sessions flow AND the merchant wants to store the payment method\n */\n const includeStorePaymentMethod = this.props.enableStoreDetails || (!this.props.session && storePaymentMethodSetByMerchant);\n\n if (storedPaymentMethodId) {\n return {\n paymentMethod: {\n type: CashAppPay.type,\n storedPaymentMethodId\n }\n };\n }\n\n const shouldAddOnFileProperties = onFileGrantId && cashTag;\n\n return {\n paymentMethod: {\n type: CashAppPay.type,\n ...(grantId && { grantId }),\n ...(customerId && { customerId }),\n ...(shouldAddOnFileProperties && { onFileGrantId, cashtag: cashTag })\n },\n ...(includeStorePaymentMethod && { storePaymentMethod: storePaymentMethodSetByMerchant || shopperWantsToStore })\n };\n }\n\n get displayName() {\n if (this.props.storedPaymentMethodId && this.props.cashtag) {\n return this.props.cashtag;\n }\n return this.props.name;\n }\n\n get additionalInfo() {\n return this.props.storedPaymentMethodId ? 'Cash App Pay' : '';\n }\n\n public submit = () => {\n const { onClick, storedPaymentMethodId } = this.props;\n\n if (storedPaymentMethodId) {\n super.submit();\n return;\n }\n\n let onClickPromiseRejected = false;\n\n new Promise<void>((resolve, reject) => onClick({ resolve, reject }))\n .catch(() => {\n onClickPromiseRejected = true;\n throw Error('onClick rejected');\n })\n .then(() => {\n return this.cashAppService.createCustomerRequest(this.props.amount);\n })\n .then(() => {\n this.cashAppService.begin();\n })\n .catch(error => {\n if (onClickPromiseRejected) {\n // Swallow exception triggered by onClick reject\n return;\n }\n this.handleError(error);\n });\n };\n\n public get isValid(): boolean {\n return true;\n }\n\n private handleOnChangeStoreDetails = (storePayment: boolean) => {\n const data = { ...this.state.data, shopperWantsToStore: storePayment };\n this.setState({ data });\n };\n\n private handleAuthorize = (cashAppPaymentData: CashAppPayEventData): void => {\n const data = { ...this.state.data, ...cashAppPaymentData };\n this.setState({ data, valid: {}, errors: {}, isValid: true });\n super.submit();\n };\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n label={payAmountLabel(this.props.i18n, this.props.amount)}\n icon={this.resources?.getImage({ imageFolder: 'components/' })(`${PREFIX}lock`)}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <CashAppComponent\n ref={ref => {\n this.componentRef = ref;\n }}\n enableStoreDetails={this.props.enableStoreDetails}\n cashAppService={this.cashAppService}\n onChangeStoreDetails={this.handleOnChangeStoreDetails}\n onError={this.handleError}\n onClick={this.submit}\n onAuthorize={this.handleAuthorize}\n />\n );\n }\n}\n\nexport default CashAppPay;\n"],"names":["CashAppPay","UIElement","formatProps","props","_object_spread_props","_object_spread","enableStoreDetails","session","configuration","formatData","shopperWantsToStore","grantId","onFileGrantId","cashTag","customerId","this","state","data","storePaymentMethod","storePaymentMethodSetByMerchant","storedPaymentMethodId","includeStorePaymentMethod","paymentMethod","type","cashtag","displayName","name","additionalInfo","isValid","componentToRender","_this_resources","h","RedirectButton","showPayButton","label","payAmountLabel","i18n","amount","icon","resources","getImage","imageFolder","PREFIX","payButton","onSubmit","submit","ref","componentRef","CashAppComponent","cashAppService","onChangeStoreDetails","handleOnChangeStoreDetails","onError","handleError","onClick","onAuthorize","handleAuthorize","constructor","checkout","_this_props_configuration","_this_props_configuration1","super","_define_property","onClickPromiseRejected","Promise","resolve","reject","catch","Error","then","createCustomerRequest","begin","error","storePayment","setState","cashAppPaymentData","valid","errors","console","warn","sdkLoader","CashAppSdkLoader","environment","analytics","CashAppService","useCashAppButtonUi","redirectURL","clientId","scopeId","button","referenceId","TxVariants","cashapp","defaultProps"],"mappings":"k2CAcO,MAAMA,UAAmBC,EAqCrBC,WAAAA,CAAYC,OAGSA,EAAAA,EAFxB,OAAOC,EAAAC,EAAA,CAAA,EACAF,GAAAA,CACHG,4BAAoBH,EAAAA,EAAMI,eAANJ,IAAAA,WAAAA,EAAAA,EAAeK,qBAAfL,IAAAA,SAAAA,EAA8BG,qBAAsBH,EAAMG,oBAEtF,CAEOG,UAAAA,GACH,MAAMC,oBAAEA,EAAmBC,QAAEA,EAAOC,cAAEA,EAAaC,QAAEA,EAAOC,WAAEA,GAAeC,KAAKC,MAAMC,MAAQ,CAAA,GACxFC,mBAAoBC,EAA+BC,sBAAEA,GAA0BL,KAAKZ,MAKtFkB,EAA4BN,KAAKZ,MAAMG,qBAAwBS,KAAKZ,MAAMI,SAAWY,EAE3F,GAAIC,EACA,MAAO,CACHE,cAAe,CACXC,KAAMvB,EAAWuB,KACjBH,0BAOZ,OAAOf,EAAA,CACHiB,cAAejB,EAAA,CACXkB,KAAMvB,EAAWuB,MACbZ,GAAW,CAAEA,WACbG,GAAc,CAAEA,cANMF,GAAiBC,GAOV,CAAED,gBAAeY,QAASX,KAE3DQ,GAA6B,CAAEH,mBAAoBC,GAAmCT,GAElG,CAEA,eAAIe,GACA,OAAIV,KAAKZ,MAAMiB,uBAAyBL,KAAKZ,MAAMqB,QACxCT,KAAKZ,MAAMqB,QAEfT,KAAKZ,MAAMuB,IACtB,CAEA,kBAAIC,GACA,OAAOZ,KAAKZ,MAAMiB,sBAAwB,eAAiB,EAC/D,CAgCA,WAAWQ,GACP,OAAO,CACX,CAamBC,iBAAAA,GAKD,IAAAC,EAJd,OAAOf,K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zD,WAGpB6C,EAAA/C,KAAQyC,kBAAmBmB,IACvB,MAAM1D,EAAOZ,EAAA,CAAA,EAAKU,KAAKC,MAAMC,KAAS0D,GACtC5D,KAAK2D,SAAS,CAAEzD,OAAM2D,MAAO,CAAA,EAAIC,OAAQ,CAAA,EAAIjD,SAAS,IACtDiC,MAAMhB,WAtHF9B,KAAKZ,MAAMG,oBAAsBS,KAAKZ,MAAMe,oBAC5C4D,QAAQC,KACJ,oJAIJhE,KAAKZ,MAAMiB,sBACX,OAGJ,MAAM4D,EAAY,IAAIC,EAAiB,CACnCC,YAAanE,KAAKZ,MAAM+E,YACxBC,UAAWpE,KAAKoE,YAGpBpE,KAAKkC,eAAiB,IAAImC,EAAeJ,EAAW,CAChD9D,mBAAoBH,KAAKZ,MAAMe,mBAC/BmE,mBAAoBtE,KAAKZ,MAAM8B,cAC/BiD,YAAanE,KAAKZ,MAAM+E,YACxBI,YAAavE,KAAKZ,MAAMmF,YACxBC,SAAkC,QAAxB5B,EAAA5C,KAAKZ,MAAMK,qBAAX,IAAAmD,OAAA,EAAAA,EAA0B4B,SACpCC,QAAiC,QAAxB5B,EAAA7C,KAAKZ,MAAMK,qBAAX,IAAAoD,OAAA,EAAAA,EAA0B4B,QACnCC,OAAQ1E,KAAKZ,MAAMsF,OACnBC,YAAa3E,KAAKZ,MAAMuF,aAEhC,EAlCA5B,EADS9D,EACcuB,OAAOoE,EAAWC,SAIzC9B,EALS9D,EAKiB6F,eAAeA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CashAppComponent.js","sources":["../../../../../src/components/CashAppPay/components/CashAppComponent.tsx"],"sourcesContent":["import { h, RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport Spinner from '../../internal/Spinner';\nimport { CashAppPayEvents, ICashAppService } from '../services/types';\nimport { CashAppPayEventData } from '../types';\nimport StoreDetails from '../../internal/StoreDetails';\nimport './CashAppComponent.scss';\nimport { UIElementStatus } from '../../internal/UIElement/types';\n\ninterface CashAppComponentProps {\n enableStoreDetails?: boolean;\n cashAppService: ICashAppService;\n onClick(): void;\n onChangeStoreDetails(data: any): void;\n onAuthorize(payEventData: CashAppPayEventData): void;\n onError(error: AdyenCheckoutError): void;\n ref(ref: RefObject<typeof CashAppComponent>): void;\n}\n\nexport function CashAppComponent({\n enableStoreDetails,\n cashAppService,\n onClick,\n onChangeStoreDetails,\n onAuthorize,\n onError\n}: CashAppComponentProps): h.JSX.Element {\n const cashAppRef = useRef<HTMLDivElement>(null);\n const [status, setStatus] = useState<UIElementStatus>('loading');\n const subscriptions = useRef<Function[]>([]);\n const [storePaymentMethod, setStorePaymentMethod] = useState<boolean>(false);\n\n this.setStatus = setStatus;\n\n const initializeCashAppSdk = useCallback(async () => {\n try {\n await cashAppService.initialize();\n\n subscriptions.current = [\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerDismissed, () => {\n onError(new AdyenCheckoutError('CANCEL', 'Customer dismissed the modal'));\n }),\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestDeclined, async () => {\n onError(new AdyenCheckoutError('ERROR', 'Payment declined by CashAppPay'));\n await cashAppService.restart();\n await cashAppService.renderButton(cashAppRef.current);\n }),\n\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestApproved, ({ customerProfile, grants }) => {\n const cashAppPaymentData: CashAppPayEventData = {\n ...(customerProfile?.id && { customerId: customerProfile.id }),\n ...(customerProfile?.cashtag && { cashTag: customerProfile.cashtag }),\n ...(grants?.payment?.grantId && { grantId: grants.payment.grantId }),\n ...(grants?.onFile?.grantId && { onFileGrantId: grants.onFile.grantId })\n };\n\n onAuthorize(cashAppPaymentData);\n }),\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestFailed, () => {\n onError(new AdyenCheckoutError('ERROR', 'Customer request failed'));\n })\n ];\n\n await cashAppService.renderButton(cashAppRef.current);\n\n setStatus('ready');\n } catch (error) {\n if (error instanceof AdyenCheckoutError) onError(error);\n else onError(new AdyenCheckoutError('ERROR', 'Error when initializing CashAppPay', { cause: error }));\n }\n }, [cashAppService, onError, onAuthorize]);\n\n useEffect(() => {\n if (enableStoreDetails) {\n cashAppService.setStorePaymentMethod(storePaymentMethod);\n onChangeStoreDetails(storePaymentMethod);\n }\n }, [enableStoreDetails, storePaymentMethod]);\n\n useEffect(() => {\n void initializeCashAppSdk();\n return () => {\n void cashAppService.restart();\n subscriptions.current.forEach(unsubscribeFn => unsubscribeFn());\n };\n }, [cashAppService, initializeCashAppSdk]);\n\n return (\n <div className=\"adyen-checkout__cashapp\" aria-live=\"polite\" aria-busy={status === 'loading'}>\n {status === 'loading' && <Spinner />}\n {status !== 'loading' && enableStoreDetails && <StoreDetails storeDetails={storePaymentMethod} onChange={setStorePaymentMethod} />}\n\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */}\n <div onClick={onClick} className={'adyen-checkout__cashapp-button'} ref={cashAppRef}></div>\n </div>\n );\n}\n"],"names":["CashAppComponent","enableStoreDetails","cashAppService","onClick","onChangeStoreDetails","onAuthorize","onError","cashAppRef","useRef","status","setStatus","useState","subscriptions","storePaymentMethod","setStorePaymentMethod","this","initializeCashAppSdk","useCallback","async","initialize","current","subscribeToEvent","CashAppPayEvents","CustomerDismissed","AdyenCheckoutError","CustomerRequestDeclined","restart","renderButton","CustomerRequestApproved","customerProfile","grants","cashAppPaymentData","_object_spread","id","customerId","cashtag","cashTag","payment","grantId","onFile","onFileGrantId","CustomerRequestFailed","error","cause","useEffect","forEach","unsubscribeFn","h","div","className","aria-live","aria-busy","Spinner","StoreDetails","storeDetails","onChange","ref"],"mappings":"khBAoBO,SAASA,GAAiBC,mBAC7BA,EAAkBC,eAClBA,EAAcC,QACdA,EAAOC,qBACPA,EAAoBC,YACpBA,EAAWC,QACXA,IAEA,MAAMC,EAAaC,EAAuB,OACnCC,EAAQC,GAAaC,EA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,EAAcQ,QAAQyB,QAAQC,GAAiBA,OAEpD,CAAC5C,EAAgBc,IAGhB+B,EAACC,MAAAA,CAAIC,UAAU,0BAA0BC,YAAU,SAASC,YAAsB,YAAX1C,GACvD,YAAXA,GAAwBsC,EAACK,EAAAA,MACd,YAAX3C,GAAwBR,GAAsB8C,EAACM,EAAAA,CAAaC,aAAczC,EAAoB0C,SAAUzC,IAGzGiC,EAACC,MAAAA,CAAI7C,QAASA,EAAS8C,UAAW,iCAAkCO,IAAKjD,IAGrF"}
|
|
1
|
+
{"version":3,"file":"CashAppComponent.js","sources":["../../../../../src/components/CashAppPay/components/CashAppComponent.tsx"],"sourcesContent":["import { h, RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport Spinner from '../../internal/Spinner';\nimport { CashAppPayEvents, ICashAppService } from '../services/types';\nimport { CashAppPayEventData } from '../types';\nimport StoreDetails from '../../internal/StoreDetails';\nimport './CashAppComponent.scss';\nimport { UIElementStatus } from '../../internal/UIElement/types';\n\ninterface CashAppComponentProps {\n enableStoreDetails?: boolean;\n cashAppService: ICashAppService;\n onClick(): void;\n onChangeStoreDetails(data: any): void;\n onAuthorize(payEventData: CashAppPayEventData): void;\n onError(error: AdyenCheckoutError): void;\n ref(ref: RefObject<typeof CashAppComponent>): void;\n}\n\nexport function CashAppComponent({\n enableStoreDetails,\n cashAppService,\n onClick,\n onChangeStoreDetails,\n onAuthorize,\n onError\n}: Readonly<CashAppComponentProps>): h.JSX.Element {\n const cashAppRef = useRef<HTMLDivElement>(null);\n const [status, setStatus] = useState<UIElementStatus>('loading');\n const subscriptions = useRef<Function[]>([]);\n const [storePaymentMethod, setStorePaymentMethod] = useState<boolean>(false);\n\n this.setStatus = setStatus;\n\n const initializeCashAppSdk = useCallback(async () => {\n try {\n await cashAppService.initialize();\n\n subscriptions.current = [\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerDismissed, () => {\n onError(new AdyenCheckoutError('CANCEL', 'Customer dismissed the modal'));\n }),\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestDeclined, async () => {\n onError(new AdyenCheckoutError('ERROR', 'Payment declined by CashAppPay'));\n await cashAppService.restart();\n await cashAppService.renderButton(cashAppRef.current);\n }),\n\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestApproved, ({ customerProfile, grants }) => {\n const cashAppPaymentData: CashAppPayEventData = {\n ...(customerProfile?.id && { customerId: customerProfile.id }),\n ...(customerProfile?.cashtag && { cashTag: customerProfile.cashtag }),\n ...(grants?.payment?.grantId && { grantId: grants.payment.grantId }),\n ...(grants?.onFile?.grantId && { onFileGrantId: grants.onFile.grantId })\n };\n\n onAuthorize(cashAppPaymentData);\n }),\n cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestFailed, () => {\n onError(new AdyenCheckoutError('ERROR', 'Customer request failed'));\n })\n ];\n\n await cashAppService.renderButton(cashAppRef.current);\n\n setStatus('ready');\n } catch (error) {\n if (error instanceof AdyenCheckoutError) onError(error);\n else onError(new AdyenCheckoutError('ERROR', 'Error when initializing CashAppPay', { cause: error }));\n }\n }, [cashAppService, onError, onAuthorize]);\n\n useEffect(() => {\n if (enableStoreDetails) {\n cashAppService.setStorePaymentMethod(storePaymentMethod);\n onChangeStoreDetails(storePaymentMethod);\n }\n }, [enableStoreDetails, storePaymentMethod]);\n\n useEffect(() => {\n void initializeCashAppSdk();\n return () => {\n void cashAppService.restart();\n subscriptions.current.forEach(unsubscribeFn => unsubscribeFn());\n };\n }, [cashAppService, initializeCashAppSdk]);\n\n return (\n <div className=\"adyen-checkout__cashapp\" aria-live=\"polite\" aria-busy={status === 'loading'}>\n {status === 'loading' && <Spinner />}\n {status !== 'loading' && enableStoreDetails && <StoreDetails storeDetails={storePaymentMethod} onChange={setStorePaymentMethod} />}\n\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */}\n <div onClick={onClick} className={'adyen-checkout__cashapp-button'} ref={cashAppRef}></div>\n </div>\n );\n}\n"],"names":["CashAppComponent","enableStoreDetails","cashAppService","onClick","onChangeStoreDetails","onAuthorize","onError","cashAppRef","useRef","status","setStatus","useState","subscriptions","storePaymentMethod","setStorePaymentMethod","this","initializeCashAppSdk","useCallback","async","initialize","current","subscribeToEvent","CashAppPayEvents","CustomerDismissed","AdyenCheckoutError","CustomerRequestDeclined","restart","renderButton","CustomerRequestApproved","customerProfile","grants","cashAppPaymentData","_object_spread","id","customerId","cashtag","cashTag","payment","grantId","onFile","onFileGrantId","CustomerRequestFailed","error","cause","useEffect","forEach","unsubscribeFn","h","div","className","aria-live","aria-busy","Spinner","StoreDetails","storeDetails","onChange","ref"],"mappings":"khBAoBO,SAASA,GAAiBC,mBAC7BA,EAAkBC,eAClBA,EAAcC,QACdA,EAAOC,qBACPA,EAAoBC,YACpBA,EAAWC,QACXA,IAEA,MAAMC,EAAaC,EAAuB,OACnCC,EAAQC,GAAaC,EAA0B,WAChDC,EAAgBJ,EAAmB,KAClCK,EAAoBC,GAAyBH,GAAkB,GAEtEI,KAAKL,UAAYA,EAEjB,MAAMM,EAAuBC,EAAYC,UACrC,UACUhB,EAAeiB,aAErBP,EAAcQ,QAAU,CACpBlB,EAAemB,iBAAiBC,EAAiBC,kBAAmB,KAChEjB,EAAQ,IAAIkB,EAAmB,SAAU,mCAE7CtB,EAAemB,iBAAiBC,EAAiBG,wBAAyBP,UACtEZ,EAAQ,IAAIkB,EAAmB,QAAS,yCAClCtB,EAAewB,gBACfxB,EAAeyB,aAAapB,EAAWa,WAGjDlB,EAAemB,iBAAiBC,EAAiBM,wBAAyB,EAAGC,kBAAiBC,iBAIlFA,EACAA,EAJR,MAAMC,oUAA0CC,CAAA,CAAA,GACxCH,aAAAA,EAAAA,EAAiBI,KAAM,CAAEC,WAAYL,EAAgBI,KACrDJ,aAAAA,EAAAA,EAAiBM,UAAW,CAAEC,QAASP,EAAgBM,UACvDL,SAAe,QAAfA,EAAAA,EAAQO,eAARP,IAAAA,OAAAA,EAAAA,EAAiBQ,UAAW,CAAEA,QAASR,EAAOO,QAAQC,UACtDR,SAAc,QAAdA,EAAAA,EAAQS,cAART,IAAAA,OAAAA,EAAAA,EAAgBQ,UAAW,CAAEE,cAAeV,EAAOS,OAAOD,UAGlEjC,EAAY0B,KAEhB7B,EAAemB,iBAAiBC,EAAiBmB,sBAAuB,KACpEnC,EAAQ,IAAIkB,EAAmB,QAAS,qCAI1CtB,EAAeyB,aAAapB,EAAWa,SAE7CV,EAAU,QACd,CAAE,MAAOgC,GACoCpC,EAArCoC,aAAiBlB,EAA4BkB,EACpC,IAAIlB,EAAmB,QAAS,qCAAsC,CAAEmB,MAAOD,IAChG,GACD,CAACxC,EAAgBI,EAASD,IAiB7B,OAfAuC,EAAU,KACF3C,IACAC,EAAeY,sBAAsBD,GACrCT,EAAqBS,KAE1B,CAACZ,EAAoBY,IAExB+B,EAAU,KACD5B,IACE,KACEd,EAAewB,UACpBd,EAAcQ,QAAQyB,QAAQC,GAAiBA,OAEpD,CAAC5C,EAAgBc,IAGhB+B,EAACC,MAAAA,CAAIC,UAAU,0BAA0BC,YAAU,SAASC,YAAsB,YAAX1C,GACvD,YAAXA,GAAwBsC,EAACK,EAAAA,MACd,YAAX3C,GAAwBR,GAAsB8C,EAACM,EAAAA,CAAaC,aAAczC,EAAoB0C,SAAUzC,IAGzGiC,EAACC,MAAAA,CAAI7C,QAASA,EAAS8C,UAAW,iCAAkCO,IAAKjD,IAGrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickToPay.js","sources":["../../../../src/components/ClickToPay/ClickToPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { ClickToPayConfiguration, ClickToPayPaymentData } from './types';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../internal/ClickToPay/services/types';\nimport { ClickToPayProps } from '../internal/ClickToPay/types';\nimport createClickToPayService from '../internal/ClickToPay/services/create-clicktopay-service';\nimport { CtpState } from '../internal/ClickToPay/services/ClickToPayService';\nimport ClickToPayProvider from '../internal/ClickToPay/context/ClickToPayProvider';\nimport ClickToPayComponent from '../internal/ClickToPay';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\n\nexport class ClickToPayElement extends UIElement<ClickToPayConfiguration> {\n public static type = TxVariants.clicktopay;\n\n private readonly clickToPayService: IClickToPayService | null;\n private readonly ctpConfiguration: ClickToPayProps;\n\n constructor(checkout: ICore, props?: ClickToPayConfiguration) {\n super(checkout, props);\n\n this.ctpConfiguration = {\n shopperEmail: this.props.shopperEmail,\n telephoneNumber: this.props.telephoneNumber,\n merchantDisplayName: this.props.merchantDisplayName,\n locale: this.props.locale,\n onReady: this.props.onReady,\n onTimeout: this.props.onTimeout\n };\n\n this.clickToPayService = createClickToPayService(this.props.configuration, this.ctpConfiguration, this.props.environment, this.analytics);\n\n this.clickToPayService?.initialize().catch(error => {\n this.handleError(new AdyenCheckoutError('ERROR', error.toString(), { cause: error }));\n });\n\n if (!this.clickToPayService) {\n console.warn('ClickToPay not initialized - Likely the payment method is not configured or its configuration is missing');\n }\n }\n\n get isValid() {\n return true;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n public formatData(): ClickToPayPaymentData {\n const { srcScheme, srcCorrelationId, srcTokenReference, srcCheckoutPayload, srcDigitalCardId } = this.state.data;\n return {\n paymentMethod: {\n type: ClickToPayElement.type,\n ...(srcScheme && { srcScheme }),\n ...(srcCorrelationId && { srcCorrelationId }),\n ...(srcTokenReference && { srcTokenReference }),\n ...(srcCheckoutPayload && { srcCheckoutPayload }),\n ...(srcDigitalCardId && { srcDigitalCardId })\n },\n browserInfo: this.browserInfo,\n origin: window?.location?.origin\n };\n }\n\n protected formatProps(props: ClickToPayConfiguration) {\n return {\n ...props,\n disableOtpAutoFocus: props.disableOtpAutoFocus || false,\n shopperEmail: props.shopperEmail || this.core.options?.session?.shopperEmail,\n telephoneNumber: props.telephoneNumber || this.core.options?.session?.telephoneNumber,\n locale: props.locale || props.i18n?.locale?.replace('-', '_')\n };\n }\n\n /**\n * Method used to let the merchant know if the shopper have a valid CtP accoubt\n *\n * Resolves Promise if the Shopper has cookies OR has valid CtP account\n * Rejects Promise if account isn't found or if Login screen is triggered\n */\n public override async isAvailable(): Promise<void> {\n if (!this.clickToPayService) {\n return Promise.reject();\n }\n\n if (this.clickToPayService.shopperAccountFound) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n this.clickToPayService.subscribeOnStateChange((state: CtpState) => {\n if (this.clickToPayService.shopperAccountFound) resolve();\n if (state === CtpState.NotAvailable || state === CtpState.Login || state === CtpState.Idle) reject();\n });\n });\n }\n\n private handleClickToPaySubmit = (payload: ClickToPayCheckoutPayload) => {\n this.setState({ data: { ...payload }, valid: {}, errors: {}, isValid: true });\n this.submit();\n };\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <ClickToPayProvider\n isStandaloneComponent={true}\n configuration={this.ctpConfiguration}\n clickToPayService={this.clickToPayService}\n setClickToPayRef={this.setComponentRef}\n onSetStatus={this.setElementStatus}\n onSubmit={this.handleClickToPaySubmit}\n onError={this.handleError}\n >\n <ClickToPayComponent />\n </ClickToPayProvider>\n );\n }\n}\n\nexport default ClickToPayElement;\n"],"names":["ClickToPayElement","UIElement","isValid","browserInfo","collectBrowserInfo","formatData","window","srcScheme","srcCorrelationId","srcTokenReference","srcCheckoutPayload","srcDigitalCardId","this","state","data","paymentMethod","_object_spread","type","origin","location","formatProps","props","_this_core_options_session","_this_core_options","_this_core_options_session1","_this_core_options1","_object_spread_props","disableOtpAutoFocus","shopperEmail","core","options","session","telephoneNumber","locale","i18n","replace","isAvailable","clickToPayService","shopperAccountFound","Promise","resolve","reject","subscribeOnStateChange","CtpState","NotAvailable","Login","Idle","componentToRender","h","ClickToPayProvider","isStandaloneComponent","configuration","ctpConfiguration","setClickToPayRef","setComponentRef","onSetStatus","setElementStatus","onSubmit","handleClickToPaySubmit","onError","handleError","ClickToPayComponent","constructor","checkout","_this_clickToPayService","super","_define_property","payload","setState","valid","errors","submit","merchantDisplayName","onReady","onTimeout","createClickToPayService","environment","analytics","initialize","catch","error","AdyenCheckoutError","toString","cause","console","warn","TxVariants","clicktopay"],"mappings":"01CAcO,MAAMA,UAA0BC,EA6BnC,WAAIC,GACA,OAAO,CACX,CAEA,eAAIC,GACA,OAAOC,GACX,CAEOC,UAAAA,OAYSC,EAAAA,EAXZ,MAAMC,UAAEA,EAASC,iBAAEA,EAAgBC,kBAAEA,EAAiBC,mBAAEA,EAAkBC,iBAAEA,GAAqBC,KAAKC,MAAMC,KAC5G,MAAO,CACHC,cAAeC,EAAA,CACXC,KAAMjB,EAAkBiB,MACpBV,GAAa,CAAEA,aACfC,GAAoB,CAAEA,oBACtBC,GAAqB,CAAEA,qBACvBC,GAAsB,CAAEA,sBACxBC,GAAoB,CAAEA,qBAE9BR,YAAaS,KAAKT,YAClBe,OAAQZ,QAAAA,EAAAA,cAAAA,IAAAA,GAAgB,QAAhBA,EAAAA,EAAQa,gBAARb,IAAAA,OAAAA,EAAAA,EAAkBY,OAElC,CAEUE,WAAAA,CAAYC,OAIsBC,EAAAC,EACMC,EAAAC,EAClBJ,EAAAA,EAL5B,OAAOK,EAAAV,EAAA,CAAA,EACAK,GAAAA,CACHM,oBAAqBN,EAAMM,sBAAuB,EAClDC,aAAcP,EAAMO,eAAiC,QAAjBL,EAAAX,KAAKiB,KAAKC,mBAAVP,GAA0B,QAA1BD,EAAAC,EAAmBQ,mBAAnBT,SAAAA,EAA4BM,cAChEI,gBAAiBX,EAAMW,kBAAoC,QAAjBP,EAAAb,KAAKiB,KAAKC,mBAAVL,GAA0B,QAA1BD,EAAAC,EAAmBM,mBAAnBP,SAAAA,EAA4BQ,iBACtEC,OAAQZ,EAAMY,SAAoB,Q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BxC,KAAKS,MAAMuD,YAAahE,KAAKiE,WAEzG,QAAtBb,EAAApD,KAAKyB,yBAAL,IAAA2B,GAAAA,EAAwBc,aAAaC,MAAMC,IACvCpE,KAAKgD,YAAY,IAAIqB,EAAmB,QAASD,EAAME,WAAY,CAAEC,MAAOH,OAG3EpE,KAAKyB,mBACN+C,QAAQC,KAAK,2GAErB,EA1BAnB,EADSlE,
|
|
1
|
+
{"version":3,"file":"ClickToPay.js","sources":["../../../../src/components/ClickToPay/ClickToPay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { ClickToPayConfiguration, ClickToPayPaymentData } from './types';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../internal/ClickToPay/services/types';\nimport { ClickToPayProps } from '../internal/ClickToPay/types';\nimport createClickToPayService from '../internal/ClickToPay/services/create-clicktopay-service';\nimport { CtpState } from '../internal/ClickToPay/services/ClickToPayService';\nimport ClickToPayProvider from '../internal/ClickToPay/context/ClickToPayProvider';\nimport ClickToPayComponent from '../internal/ClickToPay';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\n\nexport class ClickToPayElement extends UIElement<ClickToPayConfiguration> {\n public static readonly type = TxVariants.clicktopay;\n\n private readonly clickToPayService: IClickToPayService | null;\n private readonly ctpConfiguration: ClickToPayProps;\n\n constructor(checkout: ICore, props?: ClickToPayConfiguration) {\n super(checkout, props);\n\n this.ctpConfiguration = {\n shopperEmail: this.props.shopperEmail,\n telephoneNumber: this.props.telephoneNumber,\n merchantDisplayName: this.props.merchantDisplayName,\n locale: this.props.locale,\n onReady: this.props.onReady,\n onTimeout: this.props.onTimeout\n };\n\n this.clickToPayService = createClickToPayService(this.props.configuration, this.ctpConfiguration, this.props.environment, this.analytics);\n\n this.clickToPayService?.initialize().catch(error => {\n this.handleError(new AdyenCheckoutError('ERROR', error.toString(), { cause: error }));\n });\n\n if (!this.clickToPayService) {\n console.warn('ClickToPay not initialized - Likely the payment method is not configured or its configuration is missing');\n }\n }\n\n get isValid() {\n return true;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n public formatData(): ClickToPayPaymentData {\n const { srcScheme, srcCorrelationId, srcTokenReference, srcCheckoutPayload, srcDigitalCardId } = this.state.data;\n return {\n paymentMethod: {\n type: ClickToPayElement.type,\n ...(srcScheme && { srcScheme }),\n ...(srcCorrelationId && { srcCorrelationId }),\n ...(srcTokenReference && { srcTokenReference }),\n ...(srcCheckoutPayload && { srcCheckoutPayload }),\n ...(srcDigitalCardId && { srcDigitalCardId })\n },\n browserInfo: this.browserInfo,\n origin: window?.location?.origin\n };\n }\n\n protected formatProps(props: ClickToPayConfiguration) {\n return {\n ...props,\n disableOtpAutoFocus: props.disableOtpAutoFocus || false,\n shopperEmail: props.shopperEmail || this.core.options?.session?.shopperEmail,\n telephoneNumber: props.telephoneNumber || this.core.options?.session?.telephoneNumber,\n locale: props.locale || props.i18n?.locale?.replace('-', '_')\n };\n }\n\n /**\n * Method used to let the merchant know if the shopper have a valid CtP accoubt\n *\n * Resolves Promise if the Shopper has cookies OR has valid CtP account\n * Rejects Promise if account isn't found or if Login screen is triggered\n */\n public override async isAvailable(): Promise<void> {\n if (!this.clickToPayService) {\n return Promise.reject();\n }\n\n if (this.clickToPayService.shopperAccountFound) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n this.clickToPayService.subscribeOnStateChange((state: CtpState) => {\n if (this.clickToPayService.shopperAccountFound) resolve();\n if (state === CtpState.NotAvailable || state === CtpState.Login || state === CtpState.Idle) reject();\n });\n });\n }\n\n private handleClickToPaySubmit = (payload: ClickToPayCheckoutPayload) => {\n this.setState({ data: { ...payload }, valid: {}, errors: {}, isValid: true });\n this.submit();\n };\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <ClickToPayProvider\n isStandaloneComponent={true}\n configuration={this.ctpConfiguration}\n clickToPayService={this.clickToPayService}\n setClickToPayRef={this.setComponentRef}\n onSetStatus={this.setElementStatus}\n onSubmit={this.handleClickToPaySubmit}\n onError={this.handleError}\n >\n <ClickToPayComponent />\n </ClickToPayProvider>\n );\n }\n}\n\nexport default ClickToPayElement;\n"],"names":["ClickToPayElement","UIElement","isValid","browserInfo","collectBrowserInfo","formatData","window","srcScheme","srcCorrelationId","srcTokenReference","srcCheckoutPayload","srcDigitalCardId","this","state","data","paymentMethod","_object_spread","type","origin","location","formatProps","props","_this_core_options_session","_this_core_options","_this_core_options_session1","_this_core_options1","_object_spread_props","disableOtpAutoFocus","shopperEmail","core","options","session","telephoneNumber","locale","i18n","replace","isAvailable","clickToPayService","shopperAccountFound","Promise","resolve","reject","subscribeOnStateChange","CtpState","NotAvailable","Login","Idle","componentToRender","h","ClickToPayProvider","isStandaloneComponent","configuration","ctpConfiguration","setClickToPayRef","setComponentRef","onSetStatus","setElementStatus","onSubmit","handleClickToPaySubmit","onError","handleError","ClickToPayComponent","constructor","checkout","_this_clickToPayService","super","_define_property","payload","setState","valid","errors","submit","merchantDisplayName","onReady","onTimeout","createClickToPayService","environment","analytics","initialize","catch","error","AdyenCheckoutError","toString","cause","console","warn","TxVariants","clicktopay"],"mappings":"01CAcO,MAAMA,UAA0BC,EA6BnC,WAAIC,GACA,OAAO,CACX,CAEA,eAAIC,GACA,OAAOC,GACX,CAEOC,UAAAA,OAYSC,EAAAA,EAXZ,MAAMC,UAAEA,EAASC,iBAAEA,EAAgBC,kBAAEA,EAAiBC,mBAAEA,EAAkBC,iBAAEA,GAAqBC,KAAKC,MAAMC,KAC5G,MAAO,CACHC,cAAeC,EAAA,CACXC,KAAMjB,EAAkBiB,MACpBV,GAAa,CAAEA,aACfC,GAAoB,CAAEA,oBACtBC,GAAqB,CAAEA,qBACvBC,GAAsB,CAAEA,sBACxBC,GAAoB,CAAEA,qBAE9BR,YAAaS,KAAKT,YAClBe,OAAQZ,QAAAA,EAAAA,cAAAA,I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C,EAAAtD,KAAiByB,4BACjB6B,EAAAtD,KAAiBwC,2BAkFjBc,EAAAtD,KAAQ8C,yBAA0BS,IAC9BvD,KAAKwD,SAAS,CAAEtD,KAAME,EAAA,CAAA,EAAKmD,GAAWE,MAAO,CAAA,EAAIC,OAAQ,CAAA,EAAIpE,SAAS,IACtEU,KAAK2D,WA/EL3D,KAAKwC,iBAAmB,CACpBxB,aAAchB,KAAKS,MAAMO,aACzBI,gBAAiBpB,KAAKS,MAAMW,gBAC5BwC,oBAAqB5D,KAAKS,MAAMmD,oBAChCvC,OAAQrB,KAAKS,MAAMY,OACnBwC,QAAS7D,KAAKS,MAAMoD,QACpBC,UAAW9D,KAAKS,MAAMqD,WAG1B9D,KAAKyB,kBAAoBsC,EAAwB/D,KAAKS,MAAM8B,cAAevC,KAAKwC,iBAAkBxC,KAAKS,MAAMuD,YAAahE,KAAKiE,WAEzG,QAAtBb,EAAApD,KAAKyB,yBAAL,IAAA2B,GAAAA,EAAwBc,aAAaC,MAAMC,IACvCpE,KAAKgD,YAAY,IAAIqB,EAAmB,QAASD,EAAME,WAAY,CAAEC,MAAOH,OAG3EpE,KAAKyB,mBACN+C,QAAQC,KAAK,2GAErB,EA1BAnB,EADSlE,EACciB,OAAOqE,EAAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomCard.js","sources":["../../../../src/components/CustomCard/CustomCard.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement';\nimport CustomCardInput from './CustomCardInput';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport triggerBinLookUp from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { BrandObject } from '../Card/types';\nimport { getCardImageUrl, fieldTypeToSnakeCase } from '../internal/SecuredFields/utils';\nimport { TxVariants } from '../tx-variants';\nimport { CustomCardConfiguration } from './types';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class CustomCard extends UIElement<CustomCardConfiguration> {\n public static type = TxVariants.customCard;\n\n protected static defaultProps = {\n onBinLookup: () => {},\n brandsConfiguration: {}\n };\n\n private brand = TxVariants.card;\n\n formatProps(props: CustomCardConfiguration) {\n return {\n ...props,\n type: TxVariants.customCard\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n const sfBrand = this.state.selectedBrandValue;\n return {\n paymentMethod: {\n type: 'scheme',\n ...this.state.data,\n ...(sfBrand && { brand: sfBrand })\n },\n browserInfo: this.browserInfo,\n origin: !!window && window.location.origin\n };\n }\n\n updateStyles(stylesObj) {\n if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n return this;\n }\n\n setFocusOn(frame) {\n if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(frame);\n return this;\n }\n\n processBinLookupResponse(binLookupResponse) {\n if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse);\n return this;\n }\n\n dualBrandingChangeHandler(e: Event | string) {\n if (this.componentRef?.dualBrandingChangeHandler) this.componentRef.dualBrandingChangeHandler(e);\n return this;\n }\n\n handleUnsupportedCard(errObj) {\n if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n return this;\n }\n\n onBinLookup(obj: CardBinLookupData) {\n const nuObj = { ...obj };\n nuObj.rootNode = this._node;\n\n if (!nuObj.isReset) {\n // Add brandImage urls, first checking if the merchant has configured their own one for the brand\n nuObj.supportedBrandsRaw = obj.supportedBrandsRaw?.map((item: BrandObject) => {\n item.brandImageUrl = this.props.brandsConfiguration[item.brand]?.icon ?? getCardImageUrl(item.brand, this.resources);\n return item;\n });\n }\n\n this.props.onBinLookup(nuObj);\n }\n\n public onBinValue = triggerBinLookUp(this);\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n private onFocus = (obj: CardFocusData) => {\n const event = new AnalyticsInfoEvent({\n component: this.type,\n type: obj.focus === true ? InfoEventType.focus : InfoEventType.unfocus,\n target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n });\n\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n this.props.onFocus?.(obj);\n };\n\n protected onEnterKeyPressed = (activeElement: Element, component: UIElement) => {\n this.props.onEnterKeyPressed?.(activeElement, component);\n };\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <CustomCardInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n {...this.state}\n handleKeyPress={this.handleKeyPress}\n rootNode={this._node}\n onChange={this.setState}\n onBinValue={this.onBinValue}\n implementationType={'custom'}\n resources={this.resources}\n brand={this.brand}\n onFocus={this.onFocus}\n onSubmitAnalytics={this.submitAnalytics}\n />\n );\n }\n}\n\nexport default CustomCard;\n"],"names":["CustomCard","UIElement","formatProps","props","_object_spread_props","_object_spread","type","TxVariants","customCard","formatData","sfBrand","this","state","selectedBrandValue","paymentMethod","data","brand","browserInfo","origin","window","location","updateStyles","stylesObj","_this_componentRef","componentRef","setFocusOn","frame","processBinLookupResponse","binLookupResponse","dualBrandingChangeHandler","e","handleUnsupportedCard","errObj","onBinLookup","obj","nuObj","rootNode","_node","isReset","supportedBrandsRaw","map","item","_this_props_brandsConfiguration_item_brand","brandImageUrl","brandsConfiguration","icon","_ref","getCardImageUrl","resources","isValid","collectBrowserInfo","componentToRender","h","CustomCardInput","ref","handleKeyPress","onChange","setState","onBinValue","implementationType","onFocus","onSubmitAnalytics","submitAnalytics","super","args","_define_property","card","triggerBinLookUp","_this_props_onFocus","_this_props","event","AnalyticsInfoEvent","component","focus","InfoEventType","unfocus","target","fieldTypeToSnakeCase","fieldType","call","onEnterKeyPressed","activeElement","_this_props_onEnterKeyPressed","defaultProps"],"mappings":"00CAYO,MAAMA,UAAmBC,EAU5BC,WAAAA,CAAYC,GACR,OAAOC,EAAAC,EAAA,CAAA,EACAF,GAAAA,CACHG,KAAMC,EAAWC,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omCard/CustomCard.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement';\nimport CustomCardInput from './CustomCardInput';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport triggerBinLookUp from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { BrandObject } from '../Card/types';\nimport { getCardImageUrl, fieldTypeToSnakeCase } from '../internal/SecuredFields/utils';\nimport { TxVariants } from '../tx-variants';\nimport { CustomCardConfiguration } from './types';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class CustomCard extends UIElement<CustomCardConfiguration> {\n public static readonly type = TxVariants.customCard;\n\n protected static readonly defaultProps = {\n onBinLookup: () => {},\n brandsConfiguration: {}\n };\n\n private brand = TxVariants.card;\n\n formatProps(props: CustomCardConfiguration) {\n return {\n ...props,\n type: TxVariants.customCard\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n const sfBrand = this.state.selectedBrandValue;\n return {\n paymentMethod: {\n type: 'scheme',\n ...this.state.data,\n ...(sfBrand && { brand: sfBrand })\n },\n browserInfo: this.browserInfo,\n origin: !!window && window.location.origin\n };\n }\n\n updateStyles(stylesObj) {\n if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n return this;\n }\n\n setFocusOn(frame) {\n if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(frame);\n return this;\n }\n\n processBinLookupResponse(binLookupResponse) {\n if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse);\n return this;\n }\n\n dualBrandingChangeHandler(e: Event | string) {\n if (this.componentRef?.dualBrandingChangeHandler) this.componentRef.dualBrandingChangeHandler(e);\n return this;\n }\n\n handleUnsupportedCard(errObj) {\n if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n return this;\n }\n\n onBinLookup(obj: CardBinLookupData) {\n const nuObj = { ...obj };\n nuObj.rootNode = this._node;\n\n if (!nuObj.isReset) {\n // Add brandImage urls, first checking if the merchant has configured their own one for the brand\n nuObj.supportedBrandsRaw = obj.supportedBrandsRaw?.map((item: BrandObject) => {\n item.brandImageUrl = this.props.brandsConfiguration[item.brand]?.icon ?? getCardImageUrl(item.brand, this.resources);\n return item;\n });\n }\n\n this.props.onBinLookup(nuObj);\n }\n\n public onBinValue = triggerBinLookUp(this);\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n private onFocus = (obj: CardFocusData) => {\n const event = new AnalyticsInfoEvent({\n component: this.type,\n type: obj.focus === true ? InfoEventType.focus : InfoEventType.unfocus,\n target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n });\n\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n this.props.onFocus?.(obj);\n };\n\n protected onEnterKeyPressed = (activeElement: Element, component: UIElement) => {\n this.props.onEnterKeyPressed?.(activeElement, component);\n };\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <CustomCardInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n {...this.state}\n handleKeyPress={this.handleKeyPress}\n rootNode={this._node}\n onChange={this.setState}\n onBinValue={this.onBinValue}\n implementationType={'custom'}\n resources={this.resources}\n brand={this.brand}\n onFocus={this.onFocus}\n onSubmitAnalytics={this.submitAnalytics}\n />\n );\n }\n}\n\nexport default CustomCard;\n"],"names":["CustomCard","UIElement","formatProps","props","_object_spread_props","_object_spread","type","TxVariants","customCard","formatData","sfBrand","this","state","selectedBrandValue","paymentMethod","data","brand","browserInfo","origin","window","location","updateStyles","stylesObj","_this_componentRef","componentRef","setFocusOn","frame","processBinLookupResponse","binLookupResponse","dualBrandingChangeHandler","e","handleUnsupportedCard","errObj","onBinLookup","obj","nuObj","rootNode","_node","isReset","supportedBrandsRaw","map","item","_this_props_brandsConfiguration_item_brand","brandImageUrl","brandsConfiguration","icon","_ref","getCardImageUrl","resources","isValid","collectBrowserInfo","componentToRender","h","CustomCardInput","ref","handleKeyPress","onChange","setState","onBinValue","implementationType","onFocus","onSubmitAnalytics","submitAnalytics","super","args","_define_property","card","triggerBinLookUp","_this_props_onFocus","_this_props","event","AnalyticsInfoEvent","component","focus","InfoEventType","unfocus","target","fieldTypeToSnakeCase","fieldType","call","onEnterKeyPressed","activeElement","_this_props_onEnterKeyPressed","defaultProps"],"mappings":"00CAYO,MAAMA,UAAmBC,EAU5BC,WAAAA,CAAYC,GACR,OAAOC,EAAAC,EAAA,CAAA,EACAF,GAAAA,CACHG,KAAMC,EAAWC,YAEzB,CAKAC,UAAAA,GACI,MAAMC,EAAUC,KAAKC,MAAMC,mBAC3B,MAAO,CACHC,cAAeT,EAAA,CACXC,KAAM,UACHK,KAAKC,MAAMG,KACVL,GAAW,CAAEM,MAAON,IAE5BO,YAAaN,KAAKM,YAClBC,SAAUC,QAAUA,OAAOC,SAASF,OAE5C,CAEAG,YAAAA,CAAaC,GACL,IAAAC,EACJ,eADIA,EAAAZ,KAAKa,oBAAL,IAAAD,OAAA,EAAAA,EAAmBF,eAAcV,KAAKa,aAAaH,aAAaC,GAC7DX,IACX,CAEAc,UAAAA,CAAWC,GACH,IAAAH,EACJ,eADIA,EAAAZ,KAAKa,oBAAL,IAAAD,OAAA,EAAAA,EAAmBE,aAAYd,KAAKa,aAAaC,WAAWC,GACzDf,IACX,CAEAgB,wBAAAA,CAAyBC,GACjB,IAAAL,EACJ,eADIA,EAAAZ,KAAKa,oBAAL,IAAAD,OAAA,EAAAA,EAAmBI,2BAA0BhB,KAAKa,aAAaG,yBAAyBC,GACrFjB,IACX,CAEAkB,yBAAAA,CAA0BC,GAClB,IAAAP,EACJ,eADIA,EAAAZ,KAAKa,oBAAL,IAAAD,OAAA,EAAAA,EAAmBM,4BAA2BlB,KAAKa,aAAaK,0BAA0BC,GACvFnB,IACX,CAEAoB,qBAAAA,CAAsBC,GACd,IAAAT,EACJ,eADIA,EAAAZ,K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/DC,OAAQC,EAAqB3C,EAAI4C,aAGrCnE,KAAKmD,gBAAgBQ,GAGH,QAAlBF,GAAAC,EAAA1D,KAAKR,OAAMyD,eAAX,IAAAQ,GAAAA,EAAAW,KAAAV,EAAqBnC,KAGzB+B,EAAAtD,KAAUqE,oBAAoB,CAACC,EAAwBT,SACnDU,EAAAb,EAA4B,QAA5Ba,GAAAb,EAAA1D,KAAKR,OAAM6E,yBAAX,IAAAE,GAAAA,EAAAH,KAAAV,EAA+BY,EAAeT,MAhGlDP,EADSjE,EACcM,OAAOC,EAAWC,YAEzCyD,EAHSjE,EAGiBmF,eAAe,CACrClD,YAAa,OACbW,oBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomCardInput.js","sources":["../../../../../src/components/CustomCard/CustomCardInput/CustomCardInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useEffect, useRef, useMemo } from 'preact/hooks';\nimport Language from '../../../language/Language';\nimport SecuredFieldsProvider from '../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport { SFPState } from '../../internal/SecuredFields/SFP/types';\nimport { BinLookupResponse, CardBrandsConfiguration, CardPlaceholders } from '../../Card/types';\nimport SFExtensions from '../../internal/SecuredFields/binLookup/extensions';\nimport { StylesObject } from '../../internal/SecuredFields/lib/types';\nimport { Resources } from '../../../core/Context/Resources';\nimport { SFError } from '../../Card/components/CardInput/types';\nimport { ValidationError } from '../types';\nimport type { AbstractAnalyticsEvent } from '../../../core/Analytics/events/AbstractAnalyticsEvent';\n\ninterface SecuredFieldsProps {\n autoFocus?: boolean;\n brand?: string;\n brands?: string[];\n brandsConfiguration?: CardBrandsConfiguration;\n clientKey?: string;\n countryCode?: string;\n forceCompat?: boolean;\n i18n: Language;\n implementationType?: string;\n keypadFix?: boolean;\n loadingContext?: string;\n legacyInputMode?: boolean;\n minimumExpiryDate?: string;\n onAdditionalSFConfig?: () => {};\n onAdditionalSFRemoved?: () => {};\n onAllValid?: () => {};\n onAutoComplete?: () => {};\n onBinValue?: () => {};\n onBrand?: () => {};\n onConfigSuccess?: () => {};\n onChange: (data) => void;\n onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;\n handleKeyPress?: (obj: KeyboardEvent) => void;\n onError?: () => {};\n onFieldValid?: () => {};\n onFocus?: (e) => {};\n onLoad?: () => {};\n placeholders?: CardPlaceholders;\n rootNode: HTMLElement;\n resources: Resources;\n showWarnings?: boolean;\n styles?: StylesObject;\n trimTrailingSeparator?: boolean;\n type: string;\n maskSecurityCode?: boolean;\n}\n\nconst defaultProps = {\n onChange: () => {},\n onError: () => {},\n onValidationError: () => {}\n};\n\nfunction CustomCardInput(props: SecuredFieldsProps) {\n const sfp = useRef(null);\n\n const [errors, setErrors] = useState({});\n const [valid, setValid] = useState({});\n const [data, setData] = useState({});\n\n const [isSfpValid, setIsSfpValid] = useState(false);\n\n const [issuingCountryCode, setIssuingCountryCode] = useState(null);\n\n const [dualBrandSelectElements, setDualBrandSelectElements] = useState([]);\n const [selectedBrandValue, setSelectedBrandValue] = useState('');\n\n const handleSecuredFieldsChange = (sfState: SFPState): void => {\n setData({ ...data, ...sfState.data });\n setErrors({ ...errors, ...sfState.errors });\n setValid({ ...valid, ...sfState.valid });\n\n setIsSfpValid(sfState.isSfpValid);\n };\n\n // Farm the handlers for binLookup related functionality out to another 'extensions' file\n const extensions = useMemo(\n () =>\n SFExtensions(\n props,\n { sfp },\n { dualBrandSelectElements, setDualBrandSelectElements, setSelectedBrandValue, issuingCountryCode, setIssuingCountryCode }\n ),\n [dualBrandSelectElements, issuingCountryCode]\n );\n\n /**\n * EXPECTED METHODS ON SecuredFields.this\n */\n this.processBinLookupResponse = (binLookupResponse: BinLookupResponse, isReset: boolean) => {\n extensions.processBinLookup(binLookupResponse, isReset);\n };\n\n this.dualBrandingChangeHandler = extensions.handleDualBrandSelection;\n\n /**\n * EFFECT HOOKS\n */\n useEffect(() => {\n // componentDidMount\n this.setFocusOn = sfp.current.setFocusOn;\n this.updateStyles = sfp.current.updateStyles;\n this.showValidation = sfp.current.showValidation;\n this.handleUnsupportedCard = sfp.current.handleUnsupportedCard;\n\n // componentWillUnmount\n return () => {\n sfp.current.destroy();\n };\n }, []);\n\n /**\n * Main 'componentDidUpdate' handler\n */\n useEffect(() => {\n const sfStateErrorsObj = sfp.current.mapErrorsToValidationRuleResult();\n\n const mappedErrors = { ...errors, ...sfStateErrorsObj }; // maps sfErrors\n\n props.onChange({\n data,\n valid,\n errors: mappedErrors,\n isValid: isSfpValid,\n selectedBrandValue\n });\n\n // Create an array of Validation error objects and send to callback\n if (Object.keys(mappedErrors).length) {\n const validationErrors: ValidationError[] = Object.entries(mappedErrors).map(([fieldType, error]) => {\n const valErr: ValidationError = {\n fieldType,\n ...(error ? (error as SFError) : { error: '', rootNode: this.props.rootNode })\n };\n return valErr;\n });\n this.props.onValidationError?.(validationErrors);\n }\n }, [data, valid, errors, selectedBrandValue]);\n\n /**\n * RENDER\n */\n // prettier-ignore\n return (\n <SecuredFieldsProvider\n ref={sfp}\n {...extractPropsForSFP(props)}\n type={props.brand}\n componentType={props.type}\n onChange={handleSecuredFieldsChange}\n onSubmitAnalytics={props.onSubmitAnalytics}\n render={() => null}\n />\n );\n}\n\nCustomCardInput.defaultProps = defaultProps;\n\nexport default CustomCardInput;\n\nconst extractPropsForSFP = (props: SecuredFieldsProps) => {\n return {\n autoFocus: props.autoFocus,\n brands: props.brands,\n brandsConfiguration: props.brandsConfiguration,\n clientKey: props.clientKey,\n forceCompat: props.forceCompat,\n // countryCode: props.countryCode, // only used for korean cards when koreanAuthenticationRequired is true\n i18n: props.i18n,\n implementationType: props.implementationType,\n keypadFix: props.keypadFix,\n legacyInputMode: props.legacyInputMode,\n loadingContext: props.loadingContext,\n minimumExpiryDate: props.minimumExpiryDate,\n onAdditionalSFConfig: props.onAdditionalSFConfig,\n onAdditionalSFRemoved: props.onAdditionalSFRemoved,\n onAllValid: props.onAllValid,\n onAutoComplete: props.onAutoComplete,\n onBinValue: props.onBinValue,\n onBrand: props.onBrand,\n // onChange // set directly\n onConfigSuccess: props.onConfigSuccess,\n handleKeyPress: props.handleKeyPress,\n onError: props.onError,\n onFieldValid: props.onFieldValid,\n onFocus: props.onFocus,\n onLoad: props.onLoad,\n // render // set directly\n rootNode: props.rootNode,\n showWarnings: props.showWarnings,\n styles: props.styles,\n trimTrailingSeparator: props.trimTrailingSeparator,\n resources: props.resources,\n maskSecurityCode: props.maskSecurityCode,\n placeholders: props.placeholders\n };\n};\n"],"names":["CustomCardInput","props","sfp","useRef","errors","setErrors","useState","valid","setValid","data","setData","isSfpValid","setIsSfpValid","issuingCountryCode","setIssuingCountryCode","dualBrandSelectElements","setDualBrandSelectElements","selectedBrandValue","setSelectedBrandValue","extensions","useMemo","SFExtensions","this","processBinLookupResponse","binLookupResponse","isReset","processBinLookup","dualBrandingChangeHandler","handleDualBrandSelection","useEffect","setFocusOn","current","updateStyles","showValidation","handleUnsupportedCard","destroy","sfStateErrorsObj","mapErrorsToValidationRuleResult","mappedErrors","_object_spread","onChange","isValid","Object","keys","length","_this_props_onValidationError","_this_props","validationErrors","entries","map","fieldType","error","rootNode","onValidationError","call","h","SecuredFieldsProvider","ref","extractPropsForSFP","type","brand","componentType","sfState","onSubmitAnalytics","render","defaultProps","onError","autoFocus","brands","brandsConfiguration","clientKey","forceCompat","i18n","implementationType","keypadFix","legacyInputMode","loadingContext","minimumExpiryDate","onAdditionalSFConfig","onAdditionalSFRemoved","onAllValid","onAutoComplete","onBinValue","onBrand","onConfigSuccess","handleKeyPress","onFieldValid","onFocus","onLoad","showWarnings","styles","trimTrailingSeparator","resources","maskSecurityCode","placeholders"],"mappings":"8mCAyDA,SAASA,EAAgBC,GACrB,MAAMC,EAAMC,EAAO,OAEZC,EAAQC,GAAaC,EAAS,CAAA,IAC9BC,EAAOC,GAAYF,EAAS,CAAA,IAC5BG,EAAMC,GAAWJ,EAAS,CAAA,IAE1BK,EAAYC,GAAiBN,GAAS,IAEtC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rD,OAC9BJ,EAAUkC,EAAA,CAAA,EAAKnC,EAAW0D,EAAQ1D,SAClCI,EAAS+B,EAAA,CAAA,EAAKhC,EAAUuD,EAAQvD,QAEhCK,EAAckD,EAAQnD,aA+ElBoD,kBAAmB9D,EAAM8D,kBACzBC,OAAQ,IAAM,OAG1B,CAEAhE,EAAgBiE,aA9GK,CACjBzB,SAAU,OACV0B,QAAS,OACTb,kBAAmB,QA+GvB,MAAMK,EAAsBzD,IACjB,CACHkE,UAAWlE,EAAMkE,UACjBC,OAAQnE,EAAMmE,OACdC,oBAAqBpE,EAAMoE,oBAC3BC,UAAWrE,EAAMqE,UACjBC,YAAatE,EAAMsE,YAEnBC,KAAMvE,EAAMuE,KACZC,mBAAoBxE,EAAMwE,mBAC1BC,UAAWzE,EAAMyE,UACjBC,gBAAiB1E,EAAM0E,gBACvBC,eAAgB3E,EAAM2E,eACtBC,kBAAmB5E,EAAM4E,kBACzBC,qBAAsB7E,EAAM6E,qBAC5BC,sBAAuB9E,EAAM8E,sBAC7BC,WAAY/E,EAAM+E,WAClBC,eAAgBhF,EAAMgF,eACtBC,WAAYjF,EAAMiF,WAClBC,QAASlF,EAAMkF,QAEfC,gBAAiBnF,EAAMmF,gBACvBC,eAAgBpF,EAAMoF,eACtBnB,QAASjE,EAAMiE,QACfoB,aAAcrF,EAAMqF,aACpBC,QAAStF,EAAMsF,QACfC,OAAQvF,EAAMuF,OAEdpC,SAAUnD,EAAMmD,SAChBqC,aAAcxF,EAAMwF,aACpBC,OAAQzF,EAAMyF,OACdC,sBAAuB1F,EAAM0F,sBAC7BC,UAAW3F,EAAM2F,UACjBC,iBAAkB5F,EAAM4F,iBACxBC,aAAc7F,EAAM6F"}
|
|
1
|
+
{"version":3,"file":"CustomCardInput.js","sources":["../../../../../src/components/CustomCard/CustomCardInput/CustomCardInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useEffect, useRef, useMemo } from 'preact/hooks';\nimport Language from '../../../language/Language';\nimport SecuredFieldsProvider from '../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport { SFPState } from '../../internal/SecuredFields/SFP/types';\nimport { BinLookupResponse, CardBrandsConfiguration, CardPlaceholders } from '../../Card/types';\nimport SFExtensions from '../../internal/SecuredFields/binLookup/extensions';\nimport { StylesObject } from '../../internal/SecuredFields/lib/types';\nimport { Resources } from '../../../core/Context/Resources';\nimport { SFError } from '../../Card/components/CardInput/types';\nimport { ValidationError } from '../types';\nimport type { AbstractAnalyticsEvent } from '../../../core/Analytics/events/AbstractAnalyticsEvent';\n\ninterface SecuredFieldsProps {\n autoFocus?: boolean;\n brand?: string;\n brands?: string[];\n brandsConfiguration?: CardBrandsConfiguration;\n clientKey?: string;\n countryCode?: string;\n forceCompat?: boolean;\n i18n: Language;\n implementationType?: string;\n keypadFix?: boolean;\n loadingContext?: string;\n legacyInputMode?: boolean;\n minimumExpiryDate?: string;\n onAdditionalSFConfig?: () => {};\n onAdditionalSFRemoved?: () => {};\n onAllValid?: () => {};\n onAutoComplete?: () => {};\n onBinValue?: () => {};\n onBrand?: () => {};\n onConfigSuccess?: () => {};\n onChange: (data) => void;\n onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;\n handleKeyPress?: (obj: KeyboardEvent) => void;\n onError?: () => {};\n onFieldValid?: () => {};\n onFocus?: (e) => {};\n onLoad?: () => {};\n placeholders?: CardPlaceholders;\n rootNode: HTMLElement;\n resources: Resources;\n showWarnings?: boolean;\n styles?: StylesObject;\n trimTrailingSeparator?: boolean;\n type: string;\n maskSecurityCode?: boolean;\n}\n\nconst defaultProps = {\n onChange: () => {},\n onError: () => {},\n onValidationError: () => {}\n};\n\nfunction CustomCardInput(props: Readonly<SecuredFieldsProps>) {\n const sfp = useRef(null);\n\n const [errors, setErrors] = useState({});\n const [valid, setValid] = useState({});\n const [data, setData] = useState({});\n\n const [isSfpValid, setIsSfpValid] = useState(false);\n\n const [issuingCountryCode, setIssuingCountryCode] = useState(null);\n\n const [dualBrandSelectElements, setDualBrandSelectElements] = useState([]);\n const [selectedBrandValue, setSelectedBrandValue] = useState('');\n\n const handleSecuredFieldsChange = (sfState: SFPState): void => {\n setData({ ...data, ...sfState.data });\n setErrors({ ...errors, ...sfState.errors });\n setValid({ ...valid, ...sfState.valid });\n\n setIsSfpValid(sfState.isSfpValid);\n };\n\n // Farm the handlers for binLookup related functionality out to another 'extensions' file\n const extensions = useMemo(\n () =>\n SFExtensions(\n props,\n { sfp },\n { dualBrandSelectElements, setDualBrandSelectElements, setSelectedBrandValue, issuingCountryCode, setIssuingCountryCode }\n ),\n [dualBrandSelectElements, issuingCountryCode]\n );\n\n /**\n * EXPECTED METHODS ON SecuredFields.this\n */\n this.processBinLookupResponse = (binLookupResponse: BinLookupResponse, isReset: boolean) => {\n extensions.processBinLookup(binLookupResponse, isReset);\n };\n\n this.dualBrandingChangeHandler = extensions.handleDualBrandSelection;\n\n /**\n * EFFECT HOOKS\n */\n useEffect(() => {\n // componentDidMount\n this.setFocusOn = sfp.current.setFocusOn;\n this.updateStyles = sfp.current.updateStyles;\n this.showValidation = sfp.current.showValidation;\n this.handleUnsupportedCard = sfp.current.handleUnsupportedCard;\n\n // componentWillUnmount\n return () => {\n sfp.current.destroy();\n };\n }, []);\n\n /**\n * Main 'componentDidUpdate' handler\n */\n useEffect(() => {\n const sfStateErrorsObj = sfp.current.mapErrorsToValidationRuleResult();\n\n const mappedErrors = { ...errors, ...sfStateErrorsObj }; // maps sfErrors\n\n props.onChange({\n data,\n valid,\n errors: mappedErrors,\n isValid: isSfpValid,\n selectedBrandValue\n });\n\n // Create an array of Validation error objects and send to callback\n if (Object.keys(mappedErrors).length) {\n const validationErrors: ValidationError[] = Object.entries(mappedErrors).map(([fieldType, error]) => {\n const valErr: ValidationError = {\n fieldType,\n ...(error ? (error as SFError) : { error: '', rootNode: this.props.rootNode })\n };\n return valErr;\n });\n this.props.onValidationError?.(validationErrors);\n }\n }, [data, valid, errors, selectedBrandValue]);\n\n /**\n * RENDER\n */\n // prettier-ignore\n return (\n <SecuredFieldsProvider\n ref={sfp}\n {...extractPropsForSFP(props)}\n type={props.brand}\n componentType={props.type}\n onChange={handleSecuredFieldsChange}\n onSubmitAnalytics={props.onSubmitAnalytics}\n render={() => null}\n />\n );\n}\n\nCustomCardInput.defaultProps = defaultProps;\n\nexport default CustomCardInput;\n\nconst extractPropsForSFP = (props: SecuredFieldsProps) => {\n return {\n autoFocus: props.autoFocus,\n brands: props.brands,\n brandsConfiguration: props.brandsConfiguration,\n clientKey: props.clientKey,\n forceCompat: props.forceCompat,\n // countryCode: props.countryCode, // only used for korean cards when koreanAuthenticationRequired is true\n i18n: props.i18n,\n implementationType: props.implementationType,\n keypadFix: props.keypadFix,\n legacyInputMode: props.legacyInputMode,\n loadingContext: props.loadingContext,\n minimumExpiryDate: props.minimumExpiryDate,\n onAdditionalSFConfig: props.onAdditionalSFConfig,\n onAdditionalSFRemoved: props.onAdditionalSFRemoved,\n onAllValid: props.onAllValid,\n onAutoComplete: props.onAutoComplete,\n onBinValue: props.onBinValue,\n onBrand: props.onBrand,\n // onChange // set directly\n onConfigSuccess: props.onConfigSuccess,\n handleKeyPress: props.handleKeyPress,\n onError: props.onError,\n onFieldValid: props.onFieldValid,\n onFocus: props.onFocus,\n onLoad: props.onLoad,\n // render // set directly\n rootNode: props.rootNode,\n showWarnings: props.showWarnings,\n styles: props.styles,\n trimTrailingSeparator: props.trimTrailingSeparator,\n resources: props.resources,\n maskSecurityCode: props.maskSecurityCode,\n placeholders: props.placeholders\n };\n};\n"],"names":["CustomCardInput","props","sfp","useRef","errors","setErrors","useState","valid","setValid","data","setData","isSfpValid","setIsSfpValid","issuingCountryCode","setIssuingCountryCode","dualBrandSelectElements","setDualBrandSelectElements","selectedBrandValue","setSelectedBrandValue","extensions","useMemo","SFExtensions","this","processBinLookupResponse","binLookupResponse","isReset","processBinLookup","dualBrandingChangeHandler","handleDualBrandSelection","useEffect","setFocusOn","current","updateStyles","showValidation","handleUnsupportedCard","destroy","sfStateErrorsObj","mapErrorsToValidationRuleResult","mappedErrors","_object_spread","onChange","isValid","Object","keys","length","_this_props_onValidationError","_this_props","validationErrors","entries","map","fieldType","error","rootNode","onValidationError","call","h","SecuredFieldsProvider","ref","extractPropsForSFP","type","brand","componentType","sfState","onSubmitAnalytics","render","defaultProps","onError","autoFocus","brands","brandsConfiguration","clientKey","forceCompat","i18n","implementationType","keypadFix","legacyInputMode","loadingContext","minimumExpiryDate","onAdditionalSFConfig","onAdditionalSFRemoved","onAllValid","onAutoComplete","onBinValue","onBrand","onConfigSuccess","handleKeyPress","onFieldValid","onFocus","onLoad","showWarnings","styles","trimTrailingSeparator","resources","maskSecurityCode","placeholders"],"mappings":"8mCAyDA,SAASA,EAAgBC,GACrB,MAAMC,EAAMC,EAAO,OAEZC,EAAQC,GAAaC,EAAS,CAAA,IAC9BC,EAAOC,GAAYF,EAAS,CAAA,IAC5BG,EAAMC,GAAWJ,EAAS,CAAA,IAE1BK,EAAYC,GAAiBN,GAAS,IAEtCO,EAAoBC,GAAyBR,EAAS,OAEtDS,EAAyBC,GAA8BV,EAAS,KAChEW,EAAoBC,GAAyBZ,EAAS,IAWvDa,EAAaC,EACf,IACIC,EACIpB,EACA,CAAEC,OACF,CAAEa,0BAAyBC,6BAA4BE,wBAAuBL,qBAAoBC,0BAE1G,CAACC,EAAyBF,IA6D9B,OAvDAS,KAAKC,yBAA2B,CAACC,EAAsCC,KACnEN,EAAWO,iBAAiBF,EAAmBC,IAGnDH,KAAKK,0BAA4BR,EAAWS,yBAK5CC,EAAU,KAENP,KAAKQ,WAAa5B,EAAI6B,QAAQD,WAC9BR,KAAKU,aAAe9B,EAAI6B,QAAQC,aAChCV,KAAKW,eAAiB/B,EAAI6B,QAAQE,eAClCX,KAAKY,sBAAwBhC,EAAI6B,QAAQG,sBAGlC,KACHhC,EAAI6B,QAAQI,YAEjB,IAKHN,EAAU,KACN,MAAMO,EAAmBlC,EAAI6B,QAAQM,kCAE/BC,EAAeC,EAAA,CAAA,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sBAAuB9E,EAAM8E,sBAC7BC,WAAY/E,EAAM+E,WAClBC,eAAgBhF,EAAMgF,eACtBC,WAAYjF,EAAMiF,WAClBC,QAASlF,EAAMkF,QAEfC,gBAAiBnF,EAAMmF,gBACvBC,eAAgBpF,EAAMoF,eACtBnB,QAASjE,EAAMiE,QACfoB,aAAcrF,EAAMqF,aACpBC,QAAStF,EAAMsF,QACfC,OAAQvF,EAAMuF,OAEdpC,SAAUnD,EAAMmD,SAChBqC,aAAcxF,EAAMwF,aACpBC,OAAQzF,EAAMyF,OACdC,sBAAuB1F,EAAM0F,sBAC7BC,UAAW3F,EAAM2F,UACjBC,iBAAkB5F,EAAM4F,iBACxBC,aAAc7F,EAAM6F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Doku.js","sources":["../../../../src/components/Doku/Doku.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DokuInput from './components/DokuInput';\nimport DokuVoucherResult from './components/DokuVoucherResult';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class DokuElement extends UIElement<VoucherConfiguration> {\n public static type = TxVariants.doku;\n public static txVariants = [\n TxVariants.doku,\n TxVariants.doku_alfamart,\n TxVariants.doku_permata_lite_atm,\n TxVariants.doku_indomaret,\n TxVariants.doku_atm_mandiri_va,\n TxVariants.doku_sinarmas_va,\n TxVariants.doku_mandiri_va,\n TxVariants.doku_cimb_va,\n TxVariants.doku_danamon_va,\n TxVariants.doku_bri_va,\n TxVariants.doku_bni_va,\n TxVariants.doku_bca_va,\n TxVariants.doku_wallet\n ];\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n ...this.state.data,\n paymentMethod: {\n type: this.type\n }\n };\n }\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.reference ? (\n <DokuVoucherResult\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onActionHandled={this.onActionHandled}\n />\n ) : (\n <DokuInput\n setComponentRef={this.setComponentRef}\n {...this.props}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default DokuElement;\n"],"names":["DokuElement","UIElement","isValid","this","state","formatData","_object_spread_props","_object_spread","data","paymentMethod","type","componentToRender","props","reference","h","DokuVoucherResult","ref","componentRef","onActionHandled","DokuInput","setComponentRef","onChange","setState","onSubmit","submit","payButton","_define_property","TxVariants","doku","txVariants","doku_alfamart","doku_permata_lite_atm","doku_indomaret","doku_atm_mandiri_va","doku_sinarmas_va","doku_mandiri_va","doku_cimb_va","doku_danamon_va","doku_bri_va","doku_bni_va","doku_bca_va","doku_wallet"],"mappings":"klCAOO,MAAMA,UAAoBC,EAkB7B,WAAIC,GACA,QAASC,KAAKC,MAAMF,OACxB,CAKAG,UAAAA,GACI,OAAOC,EAAAC,EAAA,CAAA,EACAJ,KAAKC,MAAMI,MAAI,CAClBC,cAAe,CACXC,KAAMP,KAAKO,OAGvB,CAEmBC,iBAAAA,GACf,OAAOR,KAAKS,MAAMC,UACdC,EAACC,EAAAA,EAAAA,EAAAA,CACGC,IAAKA,IACDb,KAAKc,aAAeD,IAEpBb,KAAKS,OAAK,CACdM,gBAAiBf,KAAKe,mBAG1BJ,EAACK,EAAAA,EAAAA,EAAAA,CACGC,gBAAiBjB,KAAKiB,iBAClBjB,KAAKS,OAAK,CACdS,SAAUlB,KAAKmB,SACfC,SAAUpB,KAAKqB,OACfC,UAAWtB,KAAKsB,YAG5B,EAnDAC,EADS1B,
|
|
1
|
+
{"version":3,"file":"Doku.js","sources":["../../../../src/components/Doku/Doku.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DokuInput from './components/DokuInput';\nimport DokuVoucherResult from './components/DokuVoucherResult';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class DokuElement extends UIElement<VoucherConfiguration> {\n public static readonly type = TxVariants.doku;\n public static readonly txVariants = [\n TxVariants.doku,\n TxVariants.doku_alfamart,\n TxVariants.doku_permata_lite_atm,\n TxVariants.doku_indomaret,\n TxVariants.doku_atm_mandiri_va,\n TxVariants.doku_sinarmas_va,\n TxVariants.doku_mandiri_va,\n TxVariants.doku_cimb_va,\n TxVariants.doku_danamon_va,\n TxVariants.doku_bri_va,\n TxVariants.doku_bni_va,\n TxVariants.doku_bca_va,\n TxVariants.doku_wallet\n ];\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n ...this.state.data,\n paymentMethod: {\n type: this.type\n }\n };\n }\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.reference ? (\n <DokuVoucherResult\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onActionHandled={this.onActionHandled}\n />\n ) : (\n <DokuInput\n setComponentRef={this.setComponentRef}\n {...this.props}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default DokuElement;\n"],"names":["DokuElement","UIElement","isValid","this","state","formatData","_object_spread_props","_object_spread","data","paymentMethod","type","componentToRender","props","reference","h","DokuVoucherResult","ref","componentRef","onActionHandled","DokuInput","setComponentRef","onChange","setState","onSubmit","submit","payButton","_define_property","TxVariants","doku","txVariants","doku_alfamart","doku_permata_lite_atm","doku_indomaret","doku_atm_mandiri_va","doku_sinarmas_va","doku_mandiri_va","doku_cimb_va","doku_danamon_va","doku_bri_va","doku_bni_va","doku_bca_va","doku_wallet"],"mappings":"klCAOO,MAAMA,UAAoBC,EAkB7B,WAAIC,GACA,QAASC,KAAKC,MAAMF,OACxB,CAKAG,UAAAA,GACI,OAAOC,EAAAC,EAAA,CAAA,EACAJ,KAAKC,MAAMI,MAAI,CAClBC,cAAe,CACXC,KAAMP,KAAKO,OAGvB,CAEmBC,iBAAAA,GACf,OAAOR,KAAKS,MAAMC,UACdC,EAACC,EAAAA,EAAAA,EAAAA,CACGC,IAAKA,IACDb,KAAKc,aAAeD,IAEpBb,KAAKS,OAAK,CACdM,gBAAiBf,KAAKe,mBAG1BJ,EAACK,EAAAA,EAAAA,EAAAA,CACGC,gBAAiBjB,KAAKiB,iBAClBjB,KAAKS,OAAK,CACdS,SAAUlB,KAAKmB,SACfC,SAAUpB,KAAKqB,OACfC,UAAWtB,KAAKsB,YAG5B,EAnDAC,EADS1B,EACcU,OAAOiB,EAAWC,MACzCF,EAFS1B,EAEc6B,aAAa,CAChCF,EAAWC,KACXD,EAAWG,cACXH,EAAWI,sBACXJ,EAAWK,eACXL,EAAWM,oBACXN,EAAWO,iBACXP,EAAWQ,gBACXR,EAAWS,aACXT,EAAWU,gBACXV,EAAWW,YACXX,EAAWY,YACXZ,EAAWa,YACXb,EAAWc"}
|
package/dist/es-legacy/components/Doku/components/DokuVoucherResult/DokuVoucherResult.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DokuVoucherResult.js","sources":["../../../../../../src/components/Doku/components/DokuVoucherResult/DokuVoucherResult.tsx"],"sourcesContent":["import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DokuVoucherResultProps } from '../../types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst DokuVoucherResult = (props: DokuVoucherResultProps) => {\n const { expiresAt, instructionsUrl, shopperName, merchantName } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n\n return (\n <Voucher\n {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction.doku', getImage: getImage() })}\n instructionsUrl={instructionsUrl}\n voucherDetails={[\n { label: i18n.get('voucher.expirationDate'), value: i18n.date(expiresAt) },\n { label: i18n.get('voucher.shopperName'), value: shopperName },\n { label: i18n.get('voucher.merchantName'), value: merchantName }\n ]}\n copyBtn\n />\n );\n};\n\nexport default DokuVoucherResult;\n"],"names":["DokuVoucherResult","props","expiresAt","instructionsUrl","shopperName","merchantName","i18n","useCoreContext","getImage","useImage","h","Voucher","extractCommonPropsForVoucher","introKey","voucherDetails","label","get","value","date","copyBtn"],"mappings":"ozBAQA,MAAMA,EAAqBC,IACvB,MAAMC,UAAEA,EAASC,gBAAEA,EAAeC,YAAEA,EAAWC,aAAEA,GAAiBJ,GAC5DK,KAAEA,GAASC,IACXC,EAAWC,IAEjB,OACIC,EAACC,0UACOC,EAA6B,CAAEX,QAAOK,OAAMO,SAAU,4BAA6BL,SAAUA,OAAW,CAC5GL,gBAAiBA,EACjBW,eAAgB,CACZ,CAAEC,MAAOT,EAAKU,IAAI,0BAA2BC,MAAOX,EAAKY,KAAKhB,IAC9D,CAAEa,MAAOT,EAAKU,IAAI,uBAAwBC,MAAOb,GACjD,CAAEW,MAAOT,EAAKU,IAAI,wBAAyBC,MAAOZ,IAEtDc,SAAAA"}
|
|
1
|
+
{"version":3,"file":"DokuVoucherResult.js","sources":["../../../../../../src/components/Doku/components/DokuVoucherResult/DokuVoucherResult.tsx"],"sourcesContent":["import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DokuVoucherResultProps } from '../../types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst DokuVoucherResult = (props: Readonly<DokuVoucherResultProps>) => {\n const { expiresAt, instructionsUrl, shopperName, merchantName } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n\n return (\n <Voucher\n {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction.doku', getImage: getImage() })}\n instructionsUrl={instructionsUrl}\n voucherDetails={[\n { label: i18n.get('voucher.expirationDate'), value: i18n.date(expiresAt) },\n { label: i18n.get('voucher.shopperName'), value: shopperName },\n { label: i18n.get('voucher.merchantName'), value: merchantName }\n ]}\n copyBtn\n />\n );\n};\n\nexport default DokuVoucherResult;\n"],"names":["DokuVoucherResult","props","expiresAt","instructionsUrl","shopperName","merchantName","i18n","useCoreContext","getImage","useImage","h","Voucher","extractCommonPropsForVoucher","introKey","voucherDetails","label","get","value","date","copyBtn"],"mappings":"ozBAQA,MAAMA,EAAqBC,IACvB,MAAMC,UAAEA,EAASC,gBAAEA,EAAeC,YAAEA,EAAWC,aAAEA,GAAiBJ,GAC5DK,KAAEA,GAASC,IACXC,EAAWC,IAEjB,OACIC,EAACC,0UACOC,EAA6B,CAAEX,QAAOK,OAAMO,SAAU,4BAA6BL,SAAUA,OAAW,CAC5GL,gBAAiBA,EACjBW,eAAgB,CACZ,CAAEC,MAAOT,EAAKU,IAAI,0BAA2BC,MAAOX,EAAKY,KAAKhB,IAC9D,CAAEa,MAAOT,EAAKU,IAAI,uBAAwBC,MAAOb,GACjD,CAAEW,MAAOT,EAAKU,IAAI,wBAAyBC,MAAOZ,IAEtDc,SAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Donation.js","sources":["../../../../src/components/Donation/Donation.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DonationComponent from './components/DonationComponent';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\nimport type { DonationConfiguration } from './types';\n\nclass DonationElement extends UIElement<DonationConfiguration> {\n public static type = TxVariants.donation;\n\n constructor(checkout: ICore, props?: DonationConfiguration) {\n super(checkout, props);\n this.donate = this.donate.bind(this);\n }\n\n public static defaultProps = {\n onCancel: () => {},\n onDonate: () => {}\n };\n\n /**\n * Returns the component payment data ready to submit to the Checkout API\n */\n get data() {\n return this.state.data;\n }\n\n /**\n * Returns whether the component state is valid or not\n */\n get isValid() {\n return this.state.isValid;\n }\n\n setState(newState) {\n this.state = { ...this.state, ...newState };\n }\n\n donate() {\n const { data, isValid } = this;\n this.props.onDonate({ data, isValid }, this);\n }\n\n public handleRef = ref => {\n this.componentRef = ref;\n };\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <Fragment>\n {/*@ts-ignore ref*/}\n <DonationComponent {...this.props} ref={this.handleRef} onChange={this.setState} onDonate={this.donate} />\n </Fragment>\n );\n }\n}\n\nexport default DonationElement;\n"],"names":["DonationElement","UIElement","data","this","state","isValid","setState","newState","_object_spread","donate","props","onDonate","componentToRender","h","Fragment","DonationComponent","ref","handleRef","onChange","constructor","checkout","super","_define_property","componentRef","bind","type","TxVariants","donation","defaultProps","onCancel"],"mappings":"2hCAOA,MAAMA,UAAwBC,EAgB1B,QAAIC,GACA,OAAOC,KAAKC,MAAMF,IACtB,CAKA,WAAIG,GACA,OAAOF,KAAKC,MAAMC,OACtB,CAEAC,QAAAA,CAASC,GACLJ,KAAKC,MAAQI,KAAKL,KAAKC,MAAUG,EACrC,CAEAE,MAAAA,GACI,MAAMP,KAAEA,EAAIG,QAAEA,GAAYF,KAC1BA,KAAKO,MAAMC,SAAS,CAAET,OAAMG,WAAWF,KAC3C,CAMmBS,iBAAAA,GACf,OACIC,EAACC,EAAAA,KAEGD,EAACE,EAAAA,EAAAA,EAAAA,CAAAA,EAAsBZ,KAAKO,OAAK,CAAEM,IAAKb,KAAKc,UAAWC,SAAUf,KAAKG,SAAUK,SAAUR,KAAKM,UAG5G,CA5CA,WAAAU,CAAYC,EAAiBV,GACzBW,MAAMD,EAAUV,GAgCpBY,EAAAnB,KAAOc,YAAYD,IACfb,KAAKoB,aAAeP,IAhCpBb,KAAKM,OAASN,KAAKM,OAAOe,KAAKrB,KACnC,EALAmB,EADEtB,
|
|
1
|
+
{"version":3,"file":"Donation.js","sources":["../../../../src/components/Donation/Donation.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DonationComponent from './components/DonationComponent';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\nimport type { DonationConfiguration } from './types';\n\nclass DonationElement extends UIElement<DonationConfiguration> {\n public static readonly type = TxVariants.donation;\n\n constructor(checkout: ICore, props?: DonationConfiguration) {\n super(checkout, props);\n this.donate = this.donate.bind(this);\n }\n\n public static readonly defaultProps = {\n onCancel: () => {},\n onDonate: () => {}\n };\n\n /**\n * Returns the component payment data ready to submit to the Checkout API\n */\n get data() {\n return this.state.data;\n }\n\n /**\n * Returns whether the component state is valid or not\n */\n get isValid() {\n return this.state.isValid;\n }\n\n setState(newState) {\n this.state = { ...this.state, ...newState };\n }\n\n donate() {\n const { data, isValid } = this;\n this.props.onDonate({ data, isValid }, this);\n }\n\n public handleRef = ref => {\n this.componentRef = ref;\n };\n\n protected override componentToRender(): h.JSX.Element {\n return (\n <Fragment>\n {/*@ts-ignore ref*/}\n <DonationComponent {...this.props} ref={this.handleRef} onChange={this.setState} onDonate={this.donate} />\n </Fragment>\n );\n }\n}\n\nexport default DonationElement;\n"],"names":["DonationElement","UIElement","data","this","state","isValid","setState","newState","_object_spread","donate","props","onDonate","componentToRender","h","Fragment","DonationComponent","ref","handleRef","onChange","constructor","checkout","super","_define_property","componentRef","bind","type","TxVariants","donation","defaultProps","onCancel"],"mappings":"2hCAOA,MAAMA,UAAwBC,EAgB1B,QAAIC,GACA,OAAOC,KAAKC,MAAMF,IACtB,CAKA,WAAIG,GACA,OAAOF,KAAKC,MAAMC,OACtB,CAEAC,QAAAA,CAASC,GACLJ,KAAKC,MAAQI,KAAKL,KAAKC,MAAUG,EACrC,CAEAE,MAAAA,GACI,MAAMP,KAAEA,EAAIG,QAAEA,GAAYF,KAC1BA,KAAKO,MAAMC,SAAS,CAAET,OAAMG,WAAWF,KAC3C,CAMmBS,iBAAAA,GACf,OACIC,EAACC,EAAAA,KAEGD,EAACE,EAAAA,EAAAA,EAAAA,CAAAA,EAAsBZ,KAAKO,OAAK,CAAEM,IAAKb,KAAKc,UAAWC,SAAUf,KAAKG,SAAUK,SAAUR,KAAKM,UAG5G,CA5CA,WAAAU,CAAYC,EAAiBV,GACzBW,MAAMD,EAAUV,GAgCpBY,EAAAnB,KAAOc,YAAYD,IACfb,KAAKoB,aAAeP,IAhCpBb,KAAKM,OAASN,KAAKM,OAAOe,KAAKrB,KACnC,EALAmB,EADEtB,EACqByB,OAAOC,EAAWC,UAOzCL,EAREtB,EAQqB4B,eAAe,CAClCC,SAAU,OACVlB,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignContent.js","sources":["../../../../../src/components/Donation/components/CampaignContent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CampaignInfo from './CampaignInfo';\n\nexport interface CampaignContentProps {\n logoUrl?: string;\n nonprofitDescription?: string;\n nonprofitName?: string;\n causeName?: string;\n nonprofitUrl?: string;\n bannerUrl?: string;\n}\n\nexport default function CampaignContent({\n logoUrl = '',\n nonprofitDescription = '',\n nonprofitName = '',\n causeName = '',\n nonprofitUrl = '',\n bannerUrl = ''\n}: CampaignContentProps) {\n return (\n <div className=\"adyen-checkout__campaign\">\n {nonprofitUrl ? (\n <a href={nonprofitUrl} className=\"adyen-checkout__campaign-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n <CampaignInfo logoUrl={logoUrl} nonprofitName={nonprofitName} causeName={causeName} bannerUrl={bannerUrl} />\n </a>\n ) : (\n <CampaignInfo logoUrl={logoUrl} nonprofitName={nonprofitName} causeName={causeName} bannerUrl={bannerUrl} />\n )}\n\n {nonprofitDescription && <div className=\"adyen-checkout__campaign-description\">{nonprofitDescription}</div>}\n </div>\n );\n}\n"],"names":["CampaignContent","logoUrl","nonprofitDescription","nonprofitName","causeName","nonprofitUrl","bannerUrl","h","div","className","a","href","target","rel","CampaignInfo"],"mappings":"yGAYe,SAASA,GAAgBC,QACpCA,EAAU,GAAEC,qBACZA,EAAuB,GAAEC,cACzBA,EAAgB,GAAEC,UAClBA,EAAY,GAAEC,aACdA,EAAe,GAAEC,UACjBA,EAAY,KAEZ,OACIC,EAACC,MAAAA,CAAIC,UAAU,4BACVJ,EACGE,EAACG,IAAAA,CAAEC,KAAMN,EAAcI,UAAU,gCAAgCG,OAAO,SAASC,IAAI,uBACjFN,EAACO,EAAAA,CAAab,QAASA,EAASE,cAAeA,EAAeC,UAAWA,EAAWE,UAAWA,KAGnGC,EAACO,EAAAA,CAAab,QAASA,EAASE,cAAeA,EAAeC,UAAWA,EAAWE,UAAWA,IAGlGJ,GAAwBK,EAACC,MAAAA,CAAIC,UAAU,wCAAwCP,GAG5F"}
|
|
1
|
+
{"version":3,"file":"CampaignContent.js","sources":["../../../../../src/components/Donation/components/CampaignContent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CampaignInfo from './CampaignInfo';\n\nexport interface CampaignContentProps {\n logoUrl?: string;\n nonprofitDescription?: string;\n nonprofitName?: string;\n causeName?: string;\n nonprofitUrl?: string;\n bannerUrl?: string;\n}\n\nexport default function CampaignContent({\n logoUrl = '',\n nonprofitDescription = '',\n nonprofitName = '',\n causeName = '',\n nonprofitUrl = '',\n bannerUrl = ''\n}: Readonly<CampaignContentProps>) {\n return (\n <div className=\"adyen-checkout__campaign\">\n {nonprofitUrl ? (\n <a href={nonprofitUrl} className=\"adyen-checkout__campaign-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n <CampaignInfo logoUrl={logoUrl} nonprofitName={nonprofitName} causeName={causeName} bannerUrl={bannerUrl} />\n </a>\n ) : (\n <CampaignInfo logoUrl={logoUrl} nonprofitName={nonprofitName} causeName={causeName} bannerUrl={bannerUrl} />\n )}\n\n {nonprofitDescription && <div className=\"adyen-checkout__campaign-description\">{nonprofitDescription}</div>}\n </div>\n );\n}\n"],"names":["CampaignContent","logoUrl","nonprofitDescription","nonprofitName","causeName","nonprofitUrl","bannerUrl","h","div","className","a","href","target","rel","CampaignInfo"],"mappings":"yGAYe,SAASA,GAAgBC,QACpCA,EAAU,GAAEC,qBACZA,EAAuB,GAAEC,cACzBA,EAAgB,GAAEC,UAClBA,EAAY,GAAEC,aACdA,EAAe,GAAEC,UACjBA,EAAY,KAEZ,OACIC,EAACC,MAAAA,CAAIC,UAAU,4BACVJ,EACGE,EAACG,IAAAA,CAAEC,KAAMN,EAAcI,UAAU,gCAAgCG,OAAO,SAASC,IAAI,uBACjFN,EAACO,EAAAA,CAAab,QAASA,EAASE,cAAeA,EAAeC,UAAWA,EAAWE,UAAWA,KAGnGC,EAACO,EAAAA,CAAab,QAASA,EAASE,cAAeA,EAAeC,UAAWA,EAAWE,UAAWA,IAGlGJ,GAAwBK,EAACC,MAAAA,CAAIC,UAAU,wCAAwCP,GAG5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignInfo.js","sources":["../../../../../src/components/Donation/components/CampaignInfo.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport Img from '../../internal/Img';\n\nexport interface CampaignInfoProps {\n logoUrl?: string;\n nonprofitName?: string;\n causeName?: string;\n bannerUrl?: string;\n}\n\nexport default function CampaignInfo({ logoUrl = '', nonprofitName = '', causeName = '', bannerUrl = '' }: CampaignInfoProps) {\n const backgroundImage = `url(${bannerUrl})`;\n\n return (\n <Fragment>\n <Img className=\"adyen-checkout__campaign-background-image\" style={{ backgroundImage }} backgroundUrl={bannerUrl} />\n\n <div className=\"adyen-checkout__campaign-content\">\n {logoUrl && <img src={logoUrl} className=\"adyen-checkout__campaign-logo\" alt={nonprofitName} />}\n <div>\n {nonprofitName && <div className=\"adyen-checkout__campaign-title\">{nonprofitName}</div>}\n {causeName && <div className=\"adyen-checkout__campaign-cause\">{causeName}</div>}\n </div>\n </div>\n </Fragment>\n );\n}\n"],"names":["CampaignInfo","logoUrl","nonprofitName","causeName","bannerUrl","h","Fragment","Img","className","style","backgroundImage","backgroundUrl","div","img","src","alt"],"mappings":"+HAUe,SAASA,GAAaC,QAAEA,EAAU,GAAEC,cAAEA,EAAgB,GAAEC,UAAEA,EAAY,GAAEC,UAAEA,EAAY,KAGjG,OACIC,EAACC,OACGD,EAACE,EAAAA,CAAIC,UAAU,4CAA4CC,MAAO,CAAEC,gBAJpD,OAAON,MAIgEO,cAAeP,IAEtGC,EAACO,MAAAA,CAAIJ,UAAU,oCACVP,GAAWI,EAACQ,MAAAA,CAAIC,IAAKb,EAASO,UAAU,gCAAgCO,IAAKb,IAC9EG,EAACO,MAAAA,KACIV,GAAiBG,EAACO,MAAAA,CAAIJ,UAAU,kCAAkCN,GAClEC,GAAaE,EAACO,MAAAA,CAAIJ,UAAU,kCAAkCL,KAKnF"}
|
|
1
|
+
{"version":3,"file":"CampaignInfo.js","sources":["../../../../../src/components/Donation/components/CampaignInfo.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport Img from '../../internal/Img';\n\nexport interface CampaignInfoProps {\n logoUrl?: string;\n nonprofitName?: string;\n causeName?: string;\n bannerUrl?: string;\n}\n\nexport default function CampaignInfo({ logoUrl = '', nonprofitName = '', causeName = '', bannerUrl = '' }: Readonly<CampaignInfoProps>) {\n const backgroundImage = `url(${bannerUrl})`;\n\n return (\n <Fragment>\n <Img className=\"adyen-checkout__campaign-background-image\" style={{ backgroundImage }} backgroundUrl={bannerUrl} />\n\n <div className=\"adyen-checkout__campaign-content\">\n {logoUrl && <img src={logoUrl} className=\"adyen-checkout__campaign-logo\" alt={nonprofitName} />}\n <div>\n {nonprofitName && <div className=\"adyen-checkout__campaign-title\">{nonprofitName}</div>}\n {causeName && <div className=\"adyen-checkout__campaign-cause\">{causeName}</div>}\n </div>\n </div>\n </Fragment>\n );\n}\n"],"names":["CampaignInfo","logoUrl","nonprofitName","causeName","bannerUrl","h","Fragment","Img","className","style","backgroundImage","backgroundUrl","div","img","src","alt"],"mappings":"+HAUe,SAASA,GAAaC,QAAEA,EAAU,GAAEC,cAAEA,EAAgB,GAAEC,UAAEA,EAAY,GAAEC,UAAEA,EAAY,KAGjG,OACIC,EAACC,OACGD,EAACE,EAAAA,CAAIC,UAAU,4CAA4CC,MAAO,CAAEC,gBAJpD,OAAON,MAIgEO,cAAeP,IAEtGC,EAACO,MAAAA,CAAIJ,UAAU,oCACVP,GAAWI,EAACQ,MAAAA,CAAIC,IAAKb,EAASO,UAAU,gCAAgCO,IAAKb,IAC9EG,EAACO,MAAAA,KACIV,GAAiBG,EAACO,MAAAA,CAAIJ,UAAU,kCAAkCN,GAClEC,GAAaE,EAACO,MAAAA,CAAIJ,UAAU,kCAAkCL,KAKnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonationComponent.js","sources":["../../../../../src/components/Donation/components/DonationComponent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport CampaignContent from './CampaignContent';\nimport Button from '../../internal/Button';\nimport Img from '../../internal/Img';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport '../Donation.scss';\nimport DisclaimerMessage from '../../internal/DisclaimerMessage';\nimport { DonationAmount, DonationComponentProps, Status } from './types';\nimport useImage from '../../../core/Context/useImage';\nimport FixedAmounts from './FixedAmounts';\nimport Roundup from './Roundup';\nimport { getAmountLabel, getRoundupAmount, getRoundupAmountLabel } from './utils';\n\nexport default function DonationComponent(props: DonationComponentProps) {\n const { donation, commercialTxAmount, onCancel, onDonate, showCancelButton = true, termsAndConditionsUrl } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const { currency, type } = donation;\n const isRoundupDonation = type === 'roundup';\n const [status, setStatus] = useState<Status>('ready');\n const [isValid, setIsValid] = useState<boolean>(isRoundupDonation);\n const [amount, setAmount] = useState<DonationAmount>({\n currency,\n value: isRoundupDonation ? getRoundupAmount(donation.maxRoundupAmount, commercialTxAmount) : null\n });\n\n this.setStatus = (status: Status) => {\n setStatus(status);\n };\n\n const handleAmountSelected = ({ target }) => {\n const value = parseInt(target.value, 10);\n setIsValid(true);\n setAmount((amount: DonationAmount) => ({ ...amount, value }));\n };\n\n const handleDonate = () => {\n setStatus('loading');\n onDonate({ data: { amount } });\n };\n\n const handleDecline = () => {\n setStatus('ready');\n onCancel({ data: { amount }, isValid });\n };\n\n useEffect(() => {\n props.onChange({ data: { amount }, isValid });\n }, [amount, isValid]);\n\n if (status === 'error') {\n return (\n <div className=\"adyen-checkout__adyen-giving\">\n <Img\n className=\"adyen-checkout__status__icon adyen-checkout__status__icon--error\"\n src={getImage({ imageFolder: 'components/' })('error')}\n alt={i18n.get('error.message.unknown')}\n />\n <div className=\"adyen-checkout__status__text\">{i18n.get('error.message.unknown')}</div>\n </div>\n );\n }\n\n if (status === 'success') {\n return (\n <div className=\"adyen-checkout__adyen-giving\">\n <Img\n className=\"adyen-checkout__status__icon adyen-checkout__status__icon--success\"\n src={getImage({ imageFolder: 'components/' })('heart')}\n alt={i18n.get('thanksForYourSupport')}\n />\n\n <div className=\"adyen-checkout__status__text\">{i18n.get('thanksForYourSupport')}</div>\n </div>\n );\n }\n\n return (\n <div className=\"adyen-checkout__adyen-giving\">\n <CampaignContent {...props} />\n\n <div className=\"adyen-checkout__adyen-giving-actions\">\n {termsAndConditionsUrl && <DisclaimerMessage message={i18n.get('donationTermsCondition')} urls={[termsAndConditionsUrl]} />}\n {isRoundupDonation ? (\n <Roundup\n donationAmount={getRoundupAmountLabel(i18n, { maxRoundupAmount: donation.maxRoundupAmount, commercialTxAmount, currency })}\n originalPaymentAmount={getAmountLabel(i18n, { value: commercialTxAmount, currency })}\n status={status}\n onDonateButtonClicked={handleDonate}\n ></Roundup>\n ) : (\n <FixedAmounts\n selectedAmount={amount.value}\n values={donation.values}\n currency={currency}\n status={status}\n onAmountSelected={handleAmountSelected}\n onDonateButtonClicked={handleDonate}\n ></FixedAmounts>\n )}\n {showCancelButton && (\n <Button\n classNameModifiers={['decline']}\n variant=\"ghost\"\n onClick={handleDecline}\n disabled={status === 'loading'}\n label={`${i18n.get('notNowButton')} ›`}\n />\n )}\n </div>\n </div>\n );\n}\n\nDonationComponent.defaultProps = {\n onCancel: () => {},\n onChange: () => {},\n onDonate: () => {},\n donation: {},\n showCancelButton: true\n};\n"],"names":["DonationComponent","props","donation","commercialTxAmount","onCancel","onDonate","showCancelButton","termsAndConditionsUrl","i18n","useCoreContext","getImage","useImage","currency","type","isRoundupDonation","status","setStatus","useState","isValid","setIsValid","amount","setAmount","value","getRoundupAmount","maxRoundupAmount","this","handleDonate","data","useEffect","onChange","h","div","className","Img","src","imageFolder","alt","get","CampaignContent","DisclaimerMessage","message","urls","Roundup","donationAmount","getRoundupAmountLabel","originalPaymentAmount","getAmountLabel","onDonateButtonClicked","FixedAmounts","selectedAmount","values","onAmountSelected","target","parseInt","_object_spread_props","_object_spread","Button","classNameModifiers","variant","onClick","disabled","label","defaultProps"],"mappings":"ulCAce,SAASA,EAAkBC,GACtC,MAAMC,SAAEA,EAAQC,mBAAEA,EAAkBC,SAAEA,EAAQC,SAAEA,EAAQC,iBAAEA,GAAmB,EAAIC,sBAAEA,GAA0BN,GACvGO,KAAEA,GAASC,IACXC,EAAWC,KACXC,SAAEA,EAAQC,KAAEA,GAASX,EACrBY,EAA6B,YAATD,GACnBE,EAAQC,GAAaC,EAAiB,UACtCC,EAASC,GAAcF,EAAkBH,IACzCM,EAAQC,GAAaJ,EAAyB,CACjDL,WACAU,MAAOR,EAAoBS,EAAiBrB,EAASsB,iBAAkBrB,GAAsB,OAGjGsB,KAAKT,UAAaD,IACdC,EAAUD,IAGd,MAMMW,EAAe,KACjBV,EAAU,WACVX,EAAS,CAAEsB,KAAM,CAAEP,aAYvB,OAJAQ,EAAU,KACN3B,EAAM4B,SAAS,CAAEF,KAAM,CAAEP,UAAUF,aACpC,CAACE,EAAQF,IAEG,UAAXH,EAEIe,EAACC,MAAAA,CAAIC,UAAU,gCACXF,EAACG,EAAAA,CACGD,UAAU,mEACVE,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,SAC9C0B,IAAK5B,EAAK6B,IAAI,2BAElBP,EAACC,MAAAA,CAAIC,UAAU,gCAAgCxB,EAAK6B,IAAI,2BAKrD,YAAXtB,EAEIe,EAACC,MAAAA,CAAIC,UAAU,gCACXF,EAACG,EAAAA,CACGD,UAAU,qEACVE,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,SAC9C0B,IAAK5B,EAAK6B,IAAI,0BAGlBP,EAACC,MAAAA,CAAIC,UAAU,gCAAgCxB,EAAK6B,IAAI,0BAMhEP,EAACC,MAAAA,CAAIC,UAAU,gCACXF,EAACQ,EAAoBrC,GAErB6B,EAACC,MAAAA,CAAIC,UAAU,wCACVzB,GAAyBuB,EAACS,EAAAA,CAAkBC,QAAShC,EAAK6B,IAAI,0BAA2BI,KAAM,CAAClC,KAChGO,EACGgB,EAACY,EAAAA,CACGC,eAAgBC,EAAsBpC,EAAM,CAAEgB,iBAAkBtB,EAASsB,iBAAkBrB,qBAAoBS,aAC/GiC,sBAAuBC,EAAetC,EAAM,CAAEc,MAAOnB,EAAoBS,aACzEG,OAAQA,EACRgC,sBAAuBrB,IAG3BI,EAACkB,EAAAA,CACGC,eAAgB7B,EAAOE,MACvB4B,OAAQhD,EAASgD,OACjBtC,SAAUA,EACVG,OAAQA,EACRoC,iBAlES,EAAGC,aAC5B,MAAM9B,EAAQ+B,SAASD,EAAO9B,MAAO,IACrCH,GAAW,GACXE,EAAWD,GAA4BkC,oUAAAC,CAAA,CAAA,EAAKnC,GAAAA,CAAQE,YAgEpCyB,sBAAuBrB,IAG9BpB,GACGwB,EAAC0B,EAAAA,CACGC,mBAAoB,CAAC,WACrBC,QAAQ,QACRC,QA/DE,KAClB3C,EAAU,SACVZ,EAAS,CAAEuB,KAAM,CAAEP,UAAUF,aA8Db0C,SAAqB,YAAX7C,EACV8C,MAAO,GAAGrD,EAAK6B,IAAI,uBAM3C,CAEArC,EAAkB8D,aAAe,CAC7B1D,SAAU,OACVyB,SAAU,OACVxB,SAAU,OACVH,SAAU,CAAA,EACVI,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"DonationComponent.js","sources":["../../../../../src/components/Donation/components/DonationComponent.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport CampaignContent from './CampaignContent';\nimport Button from '../../internal/Button';\nimport Img from '../../internal/Img';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport '../Donation.scss';\nimport DisclaimerMessage from '../../internal/DisclaimerMessage';\nimport { DonationAmount, DonationComponentProps, Status } from './types';\nimport useImage from '../../../core/Context/useImage';\nimport FixedAmounts from './FixedAmounts';\nimport Roundup from './Roundup';\nimport { getAmountLabel, getRoundupAmount, getRoundupAmountLabel } from './utils';\n\nexport default function DonationComponent(props: Readonly<DonationComponentProps>) {\n const { donation, commercialTxAmount, onCancel, onDonate, showCancelButton = true, termsAndConditionsUrl } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const { currency, type } = donation;\n const isRoundupDonation = type === 'roundup';\n const [status, setStatus] = useState<Status>('ready');\n const [isValid, setIsValid] = useState<boolean>(isRoundupDonation);\n const [amount, setAmount] = useState<DonationAmount>({\n currency,\n value: isRoundupDonation ? getRoundupAmount(donation.maxRoundupAmount, commercialTxAmount) : null\n });\n\n this.setStatus = (status: Status) => {\n setStatus(status);\n };\n\n const handleAmountSelected = ({ target }) => {\n const value = parseInt(target.value, 10);\n setIsValid(true);\n setAmount((amount: DonationAmount) => ({ ...amount, value }));\n };\n\n const handleDonate = () => {\n setStatus('loading');\n onDonate({ data: { amount } });\n };\n\n const handleDecline = () => {\n setStatus('ready');\n onCancel({ data: { amount }, isValid });\n };\n\n useEffect(() => {\n props.onChange({ data: { amount }, isValid });\n }, [amount, isValid]);\n\n if (status === 'error') {\n return (\n <div className=\"adyen-checkout__adyen-giving\">\n <Img\n className=\"adyen-checkout__status__icon adyen-checkout__status__icon--error\"\n src={getImage({ imageFolder: 'components/' })('error')}\n alt={i18n.get('error.message.unknown')}\n />\n <div className=\"adyen-checkout__status__text\">{i18n.get('error.message.unknown')}</div>\n </div>\n );\n }\n\n if (status === 'success') {\n return (\n <div className=\"adyen-checkout__adyen-giving\">\n <Img\n className=\"adyen-checkout__status__icon adyen-checkout__status__icon--success\"\n src={getImage({ imageFolder: 'components/' })('heart')}\n alt={i18n.get('thanksForYourSupport')}\n />\n\n <div className=\"adyen-checkout__status__text\">{i18n.get('thanksForYourSupport')}</div>\n </div>\n );\n }\n\n return (\n <div className=\"adyen-checkout__adyen-giving\">\n <CampaignContent {...props} />\n\n <div className=\"adyen-checkout__adyen-giving-actions\">\n {termsAndConditionsUrl && <DisclaimerMessage message={i18n.get('donationTermsCondition')} urls={[termsAndConditionsUrl]} />}\n {isRoundupDonation ? (\n <Roundup\n donationAmount={getRoundupAmountLabel(i18n, { maxRoundupAmount: donation.maxRoundupAmount, commercialTxAmount, currency })}\n originalPaymentAmount={getAmountLabel(i18n, { value: commercialTxAmount, currency })}\n status={status}\n onDonateButtonClicked={handleDonate}\n ></Roundup>\n ) : (\n <FixedAmounts\n selectedAmount={amount.value}\n values={donation.values}\n currency={currency}\n status={status}\n onAmountSelected={handleAmountSelected}\n onDonateButtonClicked={handleDonate}\n ></FixedAmounts>\n )}\n {showCancelButton && (\n <Button\n classNameModifiers={['decline']}\n variant=\"ghost\"\n onClick={handleDecline}\n disabled={status === 'loading'}\n label={`${i18n.get('notNowButton')} ›`}\n />\n )}\n </div>\n </div>\n );\n}\n\nDonationComponent.defaultProps = {\n onCancel: () => {},\n onChange: () => {},\n onDonate: () => {},\n donation: {},\n showCancelButton: true\n};\n"],"names":["DonationComponent","props","donation","commercialTxAmount","onCancel","onDonate","showCancelButton","termsAndConditionsUrl","i18n","useCoreContext","getImage","useImage","currency","type","isRoundupDonation","status","setStatus","useState","isValid","setIsValid","amount","setAmount","value","getRoundupAmount","maxRoundupAmount","this","handleDonate","data","useEffect","onChange","h","div","className","Img","src","imageFolder","alt","get","CampaignContent","DisclaimerMessage","message","urls","Roundup","donationAmount","getRoundupAmountLabel","originalPaymentAmount","getAmountLabel","onDonateButtonClicked","FixedAmounts","selectedAmount","values","onAmountSelected","target","parseInt","_object_spread_props","_object_spread","Button","classNameModifiers","variant","onClick","disabled","label","defaultProps"],"mappings":"ulCAce,SAASA,EAAkBC,GACtC,MAAMC,SA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BAAkBtB,EAASsB,iBAAkBrB,qBAAoBS,aAC/GiC,sBAAuBC,EAAetC,EAAM,CAAEc,MAAOnB,EAAoBS,aACzEG,OAAQA,EACRgC,sBAAuBrB,IAG3BI,EAACkB,EAAAA,CACGC,eAAgB7B,EAAOE,MACvB4B,OAAQhD,EAASgD,OACjBtC,SAAUA,EACVG,OAAQA,EACRoC,iBAlES,EAAGC,aAC5B,MAAM9B,EAAQ+B,SAASD,EAAO9B,MAAO,IACrCH,GAAW,GACXE,EAAWD,GAA4BkC,oUAAAC,CAAA,CAAA,EAAKnC,GAAAA,CAAQE,YAgEpCyB,sBAAuBrB,IAG9BpB,GACGwB,EAAC0B,EAAAA,CACGC,mBAAoB,CAAC,WACrBC,QAAQ,QACRC,QA/DE,KAClB3C,EAAU,SACVZ,EAAS,CAAEuB,KAAM,CAAEP,UAAUF,aA8Db0C,SAAqB,YAAX7C,EACV8C,MAAO,GAAGrD,EAAK6B,IAAI,uBAM3C,CAEArC,EAAkB8D,aAAe,CAC7B1D,SAAU,OACVyB,SAAU,OACVxB,SAAU,OACVH,SAAU,CAAA,EACVI,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixedAmounts.js","sources":["../../../../../src/components/Donation/components/FixedAmounts.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport ButtonGroup from '../../internal/ButtonGroup';\nimport Button from '../../internal/Button';\nimport { getAmountLabel } from './utils';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { Status } from './types';\n\ninterface FixedAmountsProps {\n selectedAmount: number;\n currency: string;\n values: Array<number>;\n status: Status;\n onAmountSelected: ({ target }) => void;\n onDonateButtonClicked: () => void;\n}\nexport default function FixedAmounts(props: FixedAmountsProps) {\n const { currency, values, selectedAmount, status, onAmountSelected, onDonateButtonClicked } = props;\n const { i18n } = useCoreContext();\n\n return (\n <Fragment>\n <div className=\"adyen-checkout__amounts\">\n <ButtonGroup\n options={values.map(value => ({\n value,\n label: getAmountLabel(i18n, { value, currency }),\n disabled: status === 'loading',\n selected: value === selectedAmount\n }))}\n name=\"amount\"\n onChange={onAmountSelected}\n />\n </div>\n <Button\n classNameModifiers={['donate']}\n onClick={onDonateButtonClicked}\n label={i18n.get('donateButton')}\n disabled={selectedAmount === null}\n status={status}\n />\n </Fragment>\n );\n}\n"],"names":["FixedAmounts","props","currency","values","selectedAmount","status","onAmountSelected","onDonateButtonClicked","i18n","useCoreContext","h","Fragment","div","className","ButtonGroup","options","map","value","label","getAmountLabel","disabled","selected","name","onChange","Button","classNameModifiers","onClick","get"],"mappings":"iTAee,SAASA,EAAaC,GACjC,MAAMC,SAAEA,EAAQC,OAAEA,EAAMC,eAAEA,EAAcC,OAAEA,EAAMC,iBAAEA,EAAgBC,sBAAEA,GAA0BN,GACxFO,KAAEA,GAASC,IAEjB,OACIC,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,2BACXH,EAACI,EAAAA,CACGC,QAASZ,EAAOa,IAAIC,KAChBA,QACAC,MAAOC,EAAeX,EAAM,CAAES,QAAOf,aACrCkB,SAAqB,YAAXf,EACVgB,SAAUJ,IAAUb,KAExBkB,KAAK,SACLC,SAAUjB,KAGlBI,EAACc,EAAAA,CACGC,mBAAoB,CAAC,UACrBC,QAASnB,EACTW,MAAOV,EAAKmB,IAAI,gBAChBP,SAA6B,OAAnBhB,EACVC,OAAQA,IAIxB"}
|
|
1
|
+
{"version":3,"file":"FixedAmounts.js","sources":["../../../../../src/components/Donation/components/FixedAmounts.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport ButtonGroup from '../../internal/ButtonGroup';\nimport Button from '../../internal/Button';\nimport { getAmountLabel } from './utils';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { Status } from './types';\n\ninterface FixedAmountsProps {\n selectedAmount: number;\n currency: string;\n values: Array<number>;\n status: Status;\n onAmountSelected: ({ target }) => void;\n onDonateButtonClicked: () => void;\n}\nexport default function FixedAmounts(props: Readonly<FixedAmountsProps>) {\n const { currency, values, selectedAmount, status, onAmountSelected, onDonateButtonClicked } = props;\n const { i18n } = useCoreContext();\n\n return (\n <Fragment>\n <div className=\"adyen-checkout__amounts\">\n <ButtonGroup\n options={values.map(value => ({\n value,\n label: getAmountLabel(i18n, { value, currency }),\n disabled: status === 'loading',\n selected: value === selectedAmount\n }))}\n name=\"amount\"\n onChange={onAmountSelected}\n />\n </div>\n <Button\n classNameModifiers={['donate']}\n onClick={onDonateButtonClicked}\n label={i18n.get('donateButton')}\n disabled={selectedAmount === null}\n status={status}\n />\n </Fragment>\n );\n}\n"],"names":["FixedAmounts","props","currency","values","selectedAmount","status","onAmountSelected","onDonateButtonClicked","i18n","useCoreContext","h","Fragment","div","className","ButtonGroup","options","map","value","label","getAmountLabel","disabled","selected","name","onChange","Button","classNameModifiers","onClick","get"],"mappings":"iTAee,SAASA,EAAaC,GACjC,MAAMC,SAAEA,EAAQC,OAAEA,EAAMC,eAAEA,EAAcC,OAAEA,EAAMC,iBAAEA,EAAgBC,sBAAEA,GAA0BN,GACxFO,KAAEA,GAASC,IAEjB,OACIC,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,2BACXH,EAACI,EAAAA,CACGC,QAASZ,EAAOa,IAAIC,KAChBA,QACAC,MAAOC,EAAeX,EAAM,CAAES,QAAOf,aACrCkB,SAAqB,YAAXf,EACVgB,SAAUJ,IAAUb,KAExBkB,KAAK,SACLC,SAAUjB,KAGlBI,EAACc,EAAAA,CACGC,mBAAoB,CAAC,UACrBC,QAASnB,EACTW,MAAOV,EAAKmB,IAAI,gBAChBP,SAA6B,OAAnBhB,EACVC,OAAQA,IAIxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Roundup.js","sources":["../../../../../src/components/Donation/components/Roundup.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Button from '../../internal/Button';\n\ninterface RoundupProps {\n status: string;\n donationAmount: string;\n originalPaymentAmount: string;\n onDonateButtonClicked: () => void;\n}\n\nexport default function Roundup(props: RoundupProps) {\n const { status, donationAmount, originalPaymentAmount, onDonateButtonClicked } = props;\n const { i18n } = useCoreContext();\n\n return (\n <Fragment>\n <Button\n classNameModifiers={['donate']}\n onClick={onDonateButtonClicked}\n label={`${i18n.get('donateButton')} ${donationAmount}`}\n status={status}\n />\n <span className=\"adyen-checkout-roundup-description\">\n {i18n.get('donationRoundUpDescription', { values: { donationAmount, originalPaymentAmount } })}\n </span>\n </Fragment>\n );\n}\n"],"names":["Roundup","props","status","donationAmount","originalPaymentAmount","onDonateButtonClicked","i18n","useCoreContext","h","Fragment","Button","classNameModifiers","onClick","label","get","span","className","values"],"mappings":"4MAWe,SAASA,EAAQC,GAC5B,MAAMC,OAAEA,EAAMC,eAAEA,EAAcC,sBAAEA,EAAqBC,sBAAEA,GAA0BJ,GAC3EK,KAAEA,GAASC,IAEjB,OACIC,EAACC,OACGD,EAACE,EAAAA,CACGC,mBAAoB,CAAC,UACrBC,QAASP,EACTQ,MAAO,GAAGP,EAAKQ,IAAI,mBAAmBX,IACtCD,OAAQA,IAEZM,EAACO,OAAAA,CAAKC,UAAU,sCACXV,EAAKQ,IAAI,6BAA8B,CAAEG,OAAQ,CAAEd,iBAAgBC,4BAIpF"}
|
|
1
|
+
{"version":3,"file":"Roundup.js","sources":["../../../../../src/components/Donation/components/Roundup.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Button from '../../internal/Button';\n\ninterface RoundupProps {\n status: string;\n donationAmount: string;\n originalPaymentAmount: string;\n onDonateButtonClicked: () => void;\n}\n\nexport default function Roundup(props: Readonly<RoundupProps>) {\n const { status, donationAmount, originalPaymentAmount, onDonateButtonClicked } = props;\n const { i18n } = useCoreContext();\n\n return (\n <Fragment>\n <Button\n classNameModifiers={['donate']}\n onClick={onDonateButtonClicked}\n label={`${i18n.get('donateButton')} ${donationAmount}`}\n status={status}\n />\n <span className=\"adyen-checkout-roundup-description\">\n {i18n.get('donationRoundUpDescription', { values: { donationAmount, originalPaymentAmount } })}\n </span>\n </Fragment>\n );\n}\n"],"names":["Roundup","props","status","donationAmount","originalPaymentAmount","onDonateButtonClicked","i18n","useCoreContext","h","Fragment","Button","classNameModifiers","onClick","label","get","span","className","values"],"mappings":"4MAWe,SAASA,EAAQC,GAC5B,MAAMC,OAAEA,EAAMC,eAAEA,EAAcC,sBAAEA,EAAqBC,sBAAEA,GAA0BJ,GAC3EK,KAAEA,GAASC,IAEjB,OACIC,EAACC,OACGD,EAACE,EAAAA,CACGC,mBAAoB,CAAC,UACrBC,QAASP,EACTQ,MAAO,GAAGP,EAAKQ,IAAI,mBAAmBX,IACtCD,OAAQA,IAEZM,EAACO,OAAAA,CAAKC,UAAU,sCACXV,EAAKQ,IAAI,6BAA8B,CAAEG,OAAQ,CAAEd,iBAAgBC,4BAIpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Dotpay/index.ts"],"sourcesContent":["import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass DotpayElement extends IssuerListContainer {\n public static type = TxVariants.dotpay;\n}\n\nexport default DotpayElement;\n"],"names":["DotpayElement","IssuerListContainer","type","TxVariants","dotpay"],"mappings":"oHAGA,MAAMA,UAAsBC,eAAtBD,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Dotpay/index.ts"],"sourcesContent":["import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass DotpayElement extends IssuerListContainer {\n public static readonly type = TxVariants.dotpay;\n}\n\nexport default DotpayElement;\n"],"names":["DotpayElement","IssuerListContainer","type","TxVariants","dotpay"],"mappings":"oHAGA,MAAMA,UAAsBC,eAAtBD,IACqBE,SAAOC,EAAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dragonpay.js","sources":["../../../../src/components/Dragonpay/Dragonpay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DragonpayInput from './components/DragonpayInput';\nimport DragonpayVoucherResult from './components/DragonpayVoucherResult';\nimport { DragonpayConfiguraton } from './types';\nimport { TxVariants } from '../tx-variants';\n\nexport class DragonpayElement extends UIElement<DragonpayConfiguraton> {\n public static type = TxVariants.dragonpay;\n\n public static txVariants = [\n TxVariants.dragonpay,\n TxVariants.dragonpay_ebanking,\n TxVariants.dragonpay_otc_banking,\n TxVariants.dragonpay_otc_non_banking,\n TxVariants.dragonpay_otc_philippines\n ];\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n const { issuer, shopperEmail } = this.state.data;\n\n return {\n ...(shopperEmail && { shopperEmail }),\n paymentMethod: {\n ...(issuer && { issuer }),\n type: this.type\n }\n };\n }\n\n protected formatProps(props: DragonpayConfiguraton) {\n return {\n ...props,\n issuers: props.details?.find(detail => detail.key === 'issuer')?.items ?? props.issuers\n };\n }\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.reference ? (\n <DragonpayVoucherResult\n ref={ref => {\n this.componentRef = ref;\n }}\n icon={this.icon}\n {...this.props}\n onActionHandled={this.onActionHandled}\n />\n ) : (\n <DragonpayInput\n ref={ref => {\n this.componentRef = ref;\n }}\n items={this.props.issuers}\n {...this.props}\n showPayButton={this.props.showPayButton}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default DragonpayElement;\n"],"names":["DragonpayElement","UIElement","isValid","this","state","formatData","issuer","shopperEmail","data","_object_spread_props","paymentMethod","type","formatProps","props","_object_spread","issuers","_ref","details","find","detail","key","items","componentToRender","reference","h","DragonpayVoucherResult","ref","componentRef","icon","onActionHandled","DragonpayInput","showPayButton","onChange","setState","onSubmit","submit","payButton","_define_property","TxVariants","dragonpay","txVariants","dragonpay_ebanking","dragonpay_otc_banking","dragonpay_otc_non_banking","dragonpay_otc_philippines"],"mappings":"smCAOO,MAAMA,UAAyBC,EAWlC,WAAIC,GACA,QAASC,KAAKC,MAAMF,OACxB,CAKAG,UAAAA,GACI,MAAMC,OAAEA,EAAMC,aAAEA,GAAiBJ,KAAKC,MAAMI,KAE5C,OAAOC,OACCF,GAAgB,CAAEA,iBAAa,CACnCG,cAAeD,OACPH,GAAU,CAAEA,WAAO,CACvBK,KAAMR,KAAKQ,QAGvB,CAEUC,WAAAA,CAAYC,SAGLA,EAAAA,EAFb,OAAOJ,EAAAK,EAAA,CAAA,EACAD,GAAAA,CACHE,QAAsE,QAA/DC,UAAEH,EAAAA,EAAMI,eAANJ,IAAAA,GAA6C,QAA7CA,EAAAA,EAAeK,KAAKC,GAAyB,WAAfA,EAAOC,gBAArCP,OAAAA,EAAAA,EAAwDQ,aAAK,IAAAL,EAAAA,EAAIH,EAAME,SAExF,CAEmBO,iBAAAA,GACf,OAAOnB,KAAKU,MAAMU,UACdC,EAACC,EAAAA,EAAAA,EAAAA,CACGC,IAAKA,IACDvB,KAAKwB,aAAeD,GAExBE,KAAMzB,KAAKyB,MACPzB,KAAKU,OAAK,CACdgB,gBAAiB1B,KAAK0B,mBAG1BL,EAACM,EAAAA,EAAAA,EAAAA,CACGJ,IAAKA,IACDvB,KAAKwB,aAAeD,GAExBL,MAAOlB,KAAKU,MAAME,SACdZ,KAAKU,OAAK,CACdkB,cAAe5B,KAAKU,MAAMkB,cAC1BC,SAAU7B,KAAK8B,SACfC,SAAU/B,KAAKgC,OACfC,UAAWjC,KAAKiC,YAG5B,EA3DAC,EADSrC,
|
|
1
|
+
{"version":3,"file":"Dragonpay.js","sources":["../../../../src/components/Dragonpay/Dragonpay.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DragonpayInput from './components/DragonpayInput';\nimport DragonpayVoucherResult from './components/DragonpayVoucherResult';\nimport { DragonpayConfiguraton } from './types';\nimport { TxVariants } from '../tx-variants';\n\nexport class DragonpayElement extends UIElement<DragonpayConfiguraton> {\n public static readonly type = TxVariants.dragonpay;\n\n public static readonly txVariants = [\n TxVariants.dragonpay,\n TxVariants.dragonpay_ebanking,\n TxVariants.dragonpay_otc_banking,\n TxVariants.dragonpay_otc_non_banking,\n TxVariants.dragonpay_otc_philippines\n ];\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n const { issuer, shopperEmail } = this.state.data;\n\n return {\n ...(shopperEmail && { shopperEmail }),\n paymentMethod: {\n ...(issuer && { issuer }),\n type: this.type\n }\n };\n }\n\n protected formatProps(props: DragonpayConfiguraton) {\n return {\n ...props,\n issuers: props.details?.find(detail => detail.key === 'issuer')?.items ?? props.issuers\n };\n }\n\n protected override componentToRender(): h.JSX.Element {\n return this.props.reference ? (\n <DragonpayVoucherResult\n ref={ref => {\n this.componentRef = ref;\n }}\n icon={this.icon}\n {...this.props}\n onActionHandled={this.onActionHandled}\n />\n ) : (\n <DragonpayInput\n ref={ref => {\n this.componentRef = ref;\n }}\n items={this.props.issuers}\n {...this.props}\n showPayButton={this.props.showPayButton}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default DragonpayElement;\n"],"names":["DragonpayElement","UIElement","isValid","this","state","formatData","issuer","shopperEmail","data","_object_spread_props","paymentMethod","type","formatProps","props","_object_spread","issuers","_ref","details","find","detail","key","items","componentToRender","reference","h","DragonpayVoucherResult","ref","componentRef","icon","onActionHandled","DragonpayInput","showPayButton","onChange","setState","onSubmit","submit","payButton","_define_property","TxVariants","dragonpay","txVariants","dragonpay_ebanking","dragonpay_otc_banking","dragonpay_otc_non_banking","dragonpay_otc_philippines"],"mappings":"smCAOO,MAAMA,UAAyBC,EAWlC,WAAIC,GACA,QAASC,KAAKC,MAAMF,OACxB,CAKAG,UAAAA,GACI,MAAMC,OAAEA,EAAMC,aAAEA,GAAiBJ,KAAKC,MAAMI,KAE5C,OAAOC,OACCF,GAAgB,CAAEA,iBAAa,CACnCG,cAAeD,OACPH,GAAU,CAAEA,WAAO,CACvBK,KAAMR,KAAKQ,QAGvB,CAEUC,WAAAA,CAAYC,SAGLA,EAAAA,EAFb,OAAOJ,EAAAK,EAAA,CAAA,EACAD,GAAAA,CACHE,QAAsE,QAA/DC,UAAEH,EAAAA,EAAMI,eAANJ,IAAAA,GAA6C,QAA7CA,EAAAA,EAAeK,KAAKC,GAAyB,WAAfA,EAAOC,gBAArCP,OAAAA,EAAAA,EAAwDQ,aAAK,IAAAL,EAAAA,EAAIH,EAAME,SAExF,CAEmBO,iBAAAA,GACf,OAAOnB,KAAKU,MAAMU,UACdC,EAACC,EAAAA,EAAAA,EAAAA,CACGC,IAAKA,IACDvB,KAAKwB,aAAeD,GAExBE,KAAMzB,KAAKyB,MACPzB,KAAKU,OAAK,CACdgB,gBAAiB1B,KAAK0B,mBAG1BL,EAACM,EAAAA,EAAAA,EAAAA,CACGJ,IAAKA,IACDvB,KAAKwB,aAAeD,GAExBL,MAAOlB,KAAKU,MAAME,SACdZ,KAAKU,OAAK,CACdkB,cAAe5B,KAAKU,MAAMkB,cAC1BC,SAAU7B,KAAK8B,SACfC,SAAU/B,KAAKgC,OACfC,UAAWjC,KAAKiC,YAG5B,EA3DAC,EADSrC,EACcW,OAAO2B,EAAWC,WAEzCF,EAHSrC,EAGcwC,aAAa,CAChCF,EAAWC,UACXD,EAAWG,mBACXH,EAAWI,sBACXJ,EAAWK,0BACXL,EAAWM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragonpayInput.js","sources":["../../../../../../src/components/Dragonpay/components/DragonpayInput/DragonpayInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport useForm from '../../../../utils/useForm';\nimport Field from '../../../internal/FormFields/Field';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps } from '../../types';\nimport InputEmail from '../../../internal/FormFields/InputEmail';\nimport Select from '../../../internal/FormFields/Select';\nimport useImage from '../../../../core/Context/useImage';\nimport { validationRules } from '../../../../utils/Validator/defaultRules';\nimport { getErrorMessage } from '../../../../utils/getErrorMessage';\n\nexport default function DragonpayInput(props: DragonpayInputProps) {\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const isIssuerRequired = () => {\n const typesRequiringIssuers = ['dragonpay_ebanking', 'dragonpay_otc_banking', 'dragonpay_otc_non_banking'];\n return typesRequiringIssuers.indexOf(props.type) > -1;\n };\n\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<DragonpayInputData>({\n schema: [...(isIssuerRequired() ? ['issuer'] : []), 'shopperEmail'],\n rules: {\n issuer: {\n validate: issuer => isIssuerRequired() && !!issuer,\n modes: ['input', 'blur']\n },\n shopperEmail: validationRules.emailRule\n }\n });\n\n const getIssuerIcon = getIssuerImageUrl({}, props.type, getImage);\n const items = props.items.map(\n (item: DragonpayInputIssuerItem): DragonpayInputIssuerItem => ({\n ...item,\n icon: getIssuerIcon(item.id && item.id.toLowerCase())\n })\n );\n\n const getIssuerSelectFieldKey = type => {\n if (type === 'dragonpay_otc_non_banking') {\n return 'dragonpayVoucher.selectField.contextualText.nonBank';\n }\n return 'dragonpayVoucher.selectField.contextualText.bank';\n };\n\n useEffect(() => {\n props.onChange({ isValid, data, valid, errors });\n }, [isValid, data, valid, errors]);\n\n const [status, setStatus] = useState('ready');\n this.setStatus = setStatus;\n this.showValidation = triggerValidation;\n\n return (\n <div className=\"adyen-checkout__dragonpay-input__field\">\n <Field\n label={i18n.get('shopperEmail')}\n errorMessage={getErrorMessage(i18n, errors.shopperEmail, i18n.get('shopperEmail'))}\n name={'dragonpay-shopperEmail'}\n >\n <InputEmail\n name={'dragonpay-shopperEmail'}\n autoCorrect={'off'}\n value={data.shopperEmail}\n className={'adyen-checkout__input--large'}\n spellcheck={false}\n onInput={handleChangeFor('shopperEmail', 'input')}\n onBlur={handleChangeFor('shopperEmail', 'blur')}\n />\n </Field>\n\n {isIssuerRequired() && (\n <Field label={i18n.get(getIssuerSelectFieldKey(props.type))} errorMessage={!!errors.issuer} name={'issuer'}>\n <Select\n items={items}\n selectedValue={data.issuer}\n name={'issuer'}\n className={'adyen-checkout__dropdown--large adyen-checkout__issuer-list__dropdown'}\n onChange={handleChangeFor('issuer')}\n />\n </Field>\n )}\n\n {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })}\n </div>\n );\n}\n\nDragonpayInput.defaultProps = {\n data: {},\n items: [],\n onChange: () => {}\n};\n"],"names":["DragonpayInput","props","i18n","useCoreContext","getImage","useImage","isIssuerRequired","indexOf","type","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","issuer","validate","modes","shopperEmail","validationRules","emailRule","getIssuerIcon","getIssuerImageUrl","items","map","item","_object_spread_props","_object_spread","icon","id","toLowerCase","useEffect","onChange","status","setStatus","useState","this","showValidation","h","div","className","Field","label","get","errorMessage","getErrorMessage","name","InputEmail","autoCorrect","value","spellcheck","onInput","onBlur","Select","selectedValue","showPayButton","payButton","defaultProps"],"mappings":"wrCAae,SAASA,EAAeC,GACnC,MAAMC,KAAEA,GAASC,IACXC,EAAWC,IACXC,EAAmB,IACS,CAAC,qBAAsB,wBAAyB,6BACjDC,QAAQN,EAAMO,OAAQ,GAGjDC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA4B,CACrGC,OAAQ,IAAKV,IAAqB,CAAC,UAAY,GAAK,gBACpDW,MAAO,CACHC,OAAQ,CACJC,SAAUD,GAAUZ,OAAwBY,EAC5CE,MAAO,CAAC,QAAS,SAErBC,aAAcC,EAAgBC,aAIhCC,EAAgBC,EAAkB,CAAA,EAAIxB,EAAMO,KAAMJ,GAClDsB,EAAQzB,EAAMyB,MAAMC,IACrBC,GAA8DC,oUAAAC,CAAA,GACxDF,GAAAA,CACHG,KAAMP,EAAcI,EAAKI,IAAMJ,EAAKI,GAAGC,kBAW/CC,EAAU,KACNjC,EAAMkC,SAAS,CAAErB,UAASH,OAAMC,QAAOC,YACxC,CAACC,EAASH,EAAMC,EAAOC,IAE1B,MAAOuB,EAAQC,GAAaC,EAAS,SAIrC,OAHAC,KAAKF,UAAYA,EACjBE,KAAKC,eAAiB9B,EAGlB+B,EAACC,MAAAA,CAAIC,UAAU,0CACXF,EAACG,EAAAA,CACGC,MAAO3C,EAAK4C,IAAI,gBAChBC,aAAcC,EAAgB9C,EAAMW,EAAOQ,aAAcnB,EAAK4C,IAAI,iBAClEG,KAAM,0BAENR,EAACS,EAAAA,CACGD,KAAM,yBACNE,YAAa,MACbC,MAAOzC,EAAKU,aACZsB,UAAW,+BACXU,YAAY,EACZC,QAAS7C,EAAgB,eAAgB,SACzC8C,OAAQ9C,EAAgB,eAAgB,WAI/CH,KACGmC,EAACG,EAAAA,CAAMC,MAAO3C,EAAK4C,KAlCCtC,EAkC2BP,EAAMO,KAjChD,8BAATA,EACO,sDAEJ,qDA8B8DuC,eAAgBlC,EAAOK,OAAQ+B,KAAM,UAC9FR,EAACe,EAAAA,CACG9B,MAAOA,EACP+B,cAAe9C,EAAKO,OACpB+B,KAAM,SACNN,UAAW,wEACXR,SAAU1B,EAAgB,aAKrCR,EAAMyD,eAAiBzD,EAAM0D,UAAU,CAAEvB,SAAQS,MAAO3C,EAAK4C,IAAI,sBA7C1CtC,IAAAA,CAgDpC,CAEAR,EAAe4D,aAAe,CAC1BjD,KAAM,CAAA,EACNe,MAAO,GACPS,SAAU"}
|
|
1
|
+
{"version":3,"file":"DragonpayInput.js","sources":["../../../../../../src/components/Dragonpay/components/DragonpayInput/DragonpayInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport useForm from '../../../../utils/useForm';\nimport Field from '../../../internal/FormFields/Field';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps } from '../../types';\nimport InputEmail from '../../../internal/FormFields/InputEmail';\nimport Select from '../../../internal/FormFields/Select';\nimport useImage from '../../../../core/Context/useImage';\nimport { validationRules } from '../../../../utils/Validator/defaultRules';\nimport { getErrorMessage } from '../../../../utils/getErrorMessage';\n\nexport default function DragonpayInput(props: Readonly<DragonpayInputProps>) {\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const isIssuerRequired = () => {\n const typesRequiringIssuers = ['dragonpay_ebanking', 'dragonpay_otc_banking', 'dragonpay_otc_non_banking'];\n return typesRequiringIssuers.indexOf(props.type) > -1;\n };\n\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<DragonpayInputData>({\n schema: [...(isIssuerRequired() ? ['issuer'] : []), 'shopperEmail'],\n rules: {\n issuer: {\n validate: issuer => isIssuerRequired() && !!issuer,\n modes: ['input', 'blur']\n },\n shopperEmail: validationRules.emailRule\n }\n });\n\n const getIssuerIcon = getIssuerImageUrl({}, props.type, getImage);\n const items = props.items.map(\n (item: DragonpayInputIssuerItem): DragonpayInputIssuerItem => ({\n ...item,\n icon: getIssuerIcon(item.id && item.id.toLowerCase())\n })\n );\n\n const getIssuerSelectFieldKey = type => {\n if (type === 'dragonpay_otc_non_banking') {\n return 'dragonpayVoucher.selectField.contextualText.nonBank';\n }\n return 'dragonpayVoucher.selectField.contextualText.bank';\n };\n\n useEffect(() => {\n props.onChange({ isValid, data, valid, errors });\n }, [isValid, data, valid, errors]);\n\n const [status, setStatus] = useState('ready');\n this.setStatus = setStatus;\n this.showValidation = triggerValidation;\n\n return (\n <div className=\"adyen-checkout__dragonpay-input__field\">\n <Field\n label={i18n.get('shopperEmail')}\n errorMessage={getErrorMessage(i18n, errors.shopperEmail, i18n.get('shopperEmail'))}\n name={'dragonpay-shopperEmail'}\n >\n <InputEmail\n name={'dragonpay-shopperEmail'}\n autoCorrect={'off'}\n value={data.shopperEmail}\n className={'adyen-checkout__input--large'}\n spellcheck={false}\n onInput={handleChangeFor('shopperEmail', 'input')}\n onBlur={handleChangeFor('shopperEmail', 'blur')}\n />\n </Field>\n\n {isIssuerRequired() && (\n <Field label={i18n.get(getIssuerSelectFieldKey(props.type))} errorMessage={!!errors.issuer} name={'issuer'}>\n <Select\n items={items}\n selectedValue={data.issuer}\n name={'issuer'}\n className={'adyen-checkout__dropdown--large adyen-checkout__issuer-list__dropdown'}\n onChange={handleChangeFor('issuer')}\n />\n </Field>\n )}\n\n {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })}\n </div>\n );\n}\n\nDragonpayInput.defaultProps = {\n data: {},\n items: [],\n onChange: () => {}\n};\n"],"names":["DragonpayInput","props","i18n","useCoreContext","getImage","useImage","isIssuerRequired","indexOf","type","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","issuer","validate","modes","shopperEmail","validationRules","emailRule","getIssuerIcon","getIssuerImageUrl","items","map","item","_object_spread_props","_object_spread","icon","id","toLowerCase","useEffect","onChange","status","setStatus","useState","this","showValidation","h","div","className","Field","label","get","errorMessage","getErrorMessage","name","InputEmail","autoCorrect","value","spellcheck","onInput","onBlur","Select","selectedValue","showPayButton","payButton","defaultProps"],"mappings":"wrCAae,SAASA,EAAeC,GACnC,MAAMC,KAAEA,GAASC,IACXC,EAAWC,IACXC,EAAmB,IACS,CAAC,qBAAsB,wBAAyB,6BACjDC,QAAQN,EAAMO,OAAQ,GAGjDC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA4B,CACrGC,OAAQ,IAAKV,IAAqB,CAAC,UAAY,GAAK,gBACpDW,MAAO,CACHC,OAAQ,CACJC,SAAUD,GAAUZ,OAAwBY,EAC5CE,MAAO,CAAC,QAAS,SA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components/DragonpayVoucherResult/DragonpayVoucherResult.tsx"],"sourcesContent":["import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DragonpayVoucherResultProps } from '../../types';\nimport { VoucherDetail } from '../../../internal/Voucher/types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nexport default function DragonpayVoucherResult(props: DragonpayVoucherResultProps) {\n const { surcharge, expiresAt, alternativeReference, instructionsUrl, icon, issuer, paymentMethodType } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const issuerImageUrl =\n paymentMethodType !== 'dragonpay_otc_philippines' ? getIssuerImageUrl({}, paymentMethodType, getImage)(issuer.toLowerCase()) : null;\n\n return (\n <Voucher\n {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction', getImage: getImage() })}\n imageUrl={icon} // Can this url be different to the one generated by using the paymentMethodType?\n issuerImageUrl={issuerImageUrl}\n instructionsUrl={instructionsUrl}\n surcharge={surcharge && i18n.amount(surcharge.value, surcharge.currency)}\n voucherDetails={\n [\n { label: i18n.get('voucher.expirationDate'), value: i18n.dateTime(expiresAt) },\n { label: i18n.get('voucher.alternativeReference'), value: alternativeReference }\n ] as VoucherDetail[]\n }\n copyBtn\n />\n );\n}\n"],"names":["DragonpayVoucherResult","props","surcharge","expiresAt","alternativeReference","instructionsUrl","icon","issuer","paymentMethodType","i18n","useCoreContext","getImage","useImage","issuerImageUrl","getIssuerImageUrl","toLowerCase","h","Voucher","extractCommonPropsForVoucher","introKey","imageUrl","amount","value","currency","voucherDetails","label","get","dateTime","copyBtn"],"mappings":"y2BASe,SAASA,EAAuBC,GAC3C,MAAMC,UAAEA,EAASC,UAAEA,EAASC,qBAAEA,EAAoBC,gBAAEA,EAAeC,KAAEA,EAAIC,OAAEA,EAAMC,kBAAEA,GAAsBP,GACnGQ,KAAEA,GAASC,IACXC,EAAWC,IACXC,EACoB,8BAAtBL,EAAoDM,EAAkB,CAAA,EAAIN,EAAmBG,EAAzCG,CAAmDP,EAAOQ,eAAiB,KAEnI,OACIC,EAACC,0UACOC,EAA6B,CAAEjB,QAAOQ,OAAMU,SAAU,uBAAwBR,SAAUA,OAAW,CACvGS,SAAUd,EACVO,eAAgBA,EAChBR,gBAAiBA,EACjBH,UAAWA,GAAaO,EAAKY,OAAOnB,EAAUoB,MAAOpB,EAAUqB,UAC/DC,eACI,CACI,CAAEC,MAAOhB,EAAKiB,IAAI,0BAA2BJ,MAAOb,EAAKkB,SAASxB,IAClE,CAAEsB,MAAOhB,EAAKiB,IAAI,gCAAiCJ,MAAOlB,IAGlEwB,SAAAA,IAGZ"}
|
|
1
|
+
{"version":3,"file":"DragonpayVoucherResult.js","sources":["../../../../../../src/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.tsx"],"sourcesContent":["import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DragonpayVoucherResultProps } from '../../types';\nimport { VoucherDetail } from '../../../internal/Voucher/types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nexport default function DragonpayVoucherResult(props: Readonly<DragonpayVoucherResultProps>) {\n const { surcharge, expiresAt, alternativeReference, instructionsUrl, icon, issuer, paymentMethodType } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const issuerImageUrl =\n paymentMethodType !== 'dragonpay_otc_philippines' ? getIssuerImageUrl({}, paymentMethodType, getImage)(issuer.toLowerCase()) : null;\n\n return (\n <Voucher\n {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction', getImage: getImage() })}\n imageUrl={icon} // Can this url be different to the one generated by using the paymentMethodType?\n issuerImageUrl={issuerImageUrl}\n instructionsUrl={instructionsUrl}\n surcharge={surcharge && i18n.amount(surcharge.value, surcharge.currency)}\n voucherDetails={\n [\n { label: i18n.get('voucher.expirationDate'), value: i18n.dateTime(expiresAt) },\n { label: i18n.get('voucher.alternativeReference'), value: alternativeReference }\n ] as VoucherDetail[]\n }\n copyBtn\n />\n );\n}\n"],"names":["DragonpayVoucherResult","props","surcharge","expiresAt","alternativeReference","instructionsUrl","icon","issuer","paymentMethodType","i18n","useCoreContext","getImage","useImage","issuerImageUrl","getIssuerImageUrl","toLowerCase","h","Voucher","extractCommonPropsForVoucher","introKey","imageUrl","amount","value","currency","voucherDetails","label","get","dateTime","copyBtn"],"mappings":"y2BASe,SAASA,EAAuBC,GAC3C,MAAMC,UAAEA,EAASC,UAAEA,EAASC,qBAAEA,EAAoBC,gBAAEA,EAAeC,KAAEA,EAAIC,OAAEA,EAAMC,kBAAEA,GAAsBP,GACnGQ,KAAEA,GAASC,IACXC,EAAWC,IACXC,EACoB,8BAAtBL,EAAoDM,EAAkB,CAAA,EAAIN,EAAmBG,EAAzCG,CAAmDP,EAAOQ,eAAiB,KAEnI,OACIC,EAACC,0UACOC,EAA6B,CAAEjB,QAAOQ,OAAMU,SAAU,uBAAwBR,SAAUA,OAAW,CACvGS,SAAUd,EACVO,eAAgBA,EAChBR,gBAAiBA,EACjBH,UAAWA,GAAaO,EAAKY,OAAOnB,EAAUoB,MAAOpB,EAAUqB,UAC/DC,eACI,CACI,CAAEC,MAAOhB,EAAKiB,IAAI,0BAA2BJ,MAAOb,EAAKkB,SAASxB,IAClE,CAAEsB,MAAOhB,EAAKiB,IAAI,gCAAiCJ,MAAOlB,IAGlEwB,SAAAA,IAGZ"}
|