@paykka/card-checkout-ui 0.13.16 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/card-checkout-ui.js +54 -26
- package/dist/card-checkout-ui.umd.cjs +54 -26
- package/dist/es/api/modules/boost/index.js +5 -16
- package/dist/es/api/modules/gcash/index.js +5 -16
- package/dist/es/api/modules/get-browser-params.js +1 -4
- package/dist/es/api/modules/grab-pay/index.js +5 -16
- package/dist/es/api/modules/line-pay/index.js +5 -16
- package/dist/es/api/modules/may-bank-qr-pay/index.js +5 -16
- package/dist/es/api/modules/nine-pay/index.js +5 -16
- package/dist/es/api/modules/opay-wallet/index.js +5 -16
- package/dist/es/api/modules/paga-wallet/index.js +5 -16
- package/dist/es/api/modules/paymaya/index.js +5 -16
- package/dist/es/api/modules/shopee-pay/index.js +5 -16
- package/dist/es/api/modules/threeDS/index.js +16 -2
- package/dist/es/api/modules/tng-wallet/index.js +5 -16
- package/dist/es/api/modules/wallet/index.js +16 -0
- package/dist/es/api/modules/zalopay/index.js +5 -16
- package/dist/es/api/utils/index.js +2 -1
- package/dist/es/components/AccordionItem/AccordionItem.js +0 -2
- package/dist/es/components/AddressField/index.js +95 -85
- package/dist/es/components/AliPay/index.js +88 -76
- package/dist/es/components/ApplePay/index.js +61 -43
- package/dist/es/components/CPFField/index.js +2 -1
- package/dist/es/components/Card/index.js +182 -143
- package/dist/es/components/CardExpireDateField/index.js +2 -1
- package/dist/es/components/CardNo/index.js +2 -2
- package/dist/es/components/CardNumberField/index.js +2 -1
- package/dist/es/components/CardSecurityCodeField/index.js +2 -1
- package/dist/es/components/CardSelector/index.js +3 -2
- package/dist/es/components/DropIn/index.js +98 -31
- package/dist/es/components/GooglePay/index.js +190 -151
- package/dist/es/components/GuideCard/index.js +8 -1
- package/dist/es/components/PaymentButton/index.js +58 -0
- package/dist/es/components/RecurringTip/index.js +3 -3
- package/dist/es/components/SecuredFieldsProvider/index.js +81 -17
- package/dist/es/components/SecuredIframe/index.js +120 -52
- package/dist/es/components/Sepa/index.js +23 -25
- package/dist/es/components/SubmitButton/index.js +1 -1
- package/dist/es/components/ThreeDS/index.js +34 -15
- package/dist/es/components/WechatPay/index.js +94 -83
- package/dist/es/components/business/BlikCodeField/BlikCodeField.js +92 -0
- package/dist/es/components/business/BlikCodeField/blik-code-field.js +1 -0
- package/dist/es/components/business/BlikCodeField/index.js +13 -0
- package/dist/es/components/business/BlikConfirmModal/BlikConfirmModal.js +45 -0
- package/dist/es/components/business/BlikConfirmModal/blik-confirm-modal.js +1 -0
- package/dist/es/components/business/BlikConfirmModal/index.js +9 -0
- package/dist/es/components/business/BlikConfirmModal/type.js +1 -0
- package/dist/es/components/business/NameField/NameField.js +51 -0
- package/dist/es/components/business/NameField/index.js +11 -0
- package/dist/es/components/business/NameField/type.js +1 -0
- package/dist/es/components/business/PhoneField/PhoneField.js +125 -0
- package/dist/es/components/business/PhoneField/config.js +33 -0
- package/dist/es/components/business/PhoneField/index.js +14 -0
- package/dist/es/components/business/PhoneField/phone-field.js +1 -0
- package/dist/es/components/business/PhoneField/type.js +1 -0
- package/dist/es/components/business/SegmentedDigitInput/SegmentedDigitInput.js +80 -0
- package/dist/es/components/business/SegmentedDigitInput/format.js +26 -0
- package/dist/es/components/business/SegmentedDigitInput/index.js +5 -0
- package/dist/es/components/business/Tooltip/Tooltip.js +18 -0
- package/dist/es/components/business/Tooltip/index.js +6 -0
- package/dist/es/components/business/Tooltip/tooltip2.js +1 -0
- package/dist/es/components/business/index.js +14 -0
- package/dist/es/components/index.js +14 -7
- package/dist/es/components/internal/CheckBox/CheckBox.js +2 -2
- package/dist/es/components/internal/Input/Input.js +1 -1
- package/dist/es/components/internal/Select/Select.js +7 -1
- package/dist/es/components/internal/icons/IconArrowDown.js +4 -4
- package/dist/es/components/internal/icons/IconBancontact.js +95 -0
- package/dist/es/components/internal/icons/IconBlik.js +567 -0
- package/dist/es/components/internal/icons/IconIdeal.js +86 -0
- package/dist/es/components/internal/icons/IconOvo.js +47 -0
- package/dist/es/components/internal/icons/IconP24.js +40 -0
- package/dist/es/components/internal/icons/IconPhone.js +56 -0
- package/dist/es/components/internal/icons/IconSkrill.js +38 -0
- package/dist/es/components/internal/icons/IconTrustly.js +37 -0
- package/dist/es/components/wallets/Bancontact/Bancontact.js +201 -0
- package/dist/es/components/wallets/Bancontact/bancontact2.js +1 -0
- package/dist/es/components/wallets/Bancontact/index.js +1 -0
- package/dist/es/components/wallets/Bancontact/type.js +1 -0
- package/dist/es/components/wallets/Blik/Blik.js +232 -0
- package/dist/es/components/wallets/Blik/blik2.js +1 -0
- package/dist/es/components/wallets/Blik/index.js +1 -0
- package/dist/es/components/wallets/Blik/type.js +1 -0
- package/dist/es/components/wallets/Boost/Boost.js +183 -0
- package/dist/es/components/wallets/Boost/boost2.js +1 -0
- package/dist/es/components/wallets/Boost/index.js +1 -0
- package/dist/es/components/wallets/Boost/type.js +1 -0
- package/dist/es/components/wallets/GCash/GCash.js +74 -252
- package/dist/es/components/wallets/GrabPay/GrabPay.js +183 -0
- package/dist/es/components/wallets/GrabPay/grab-pay.js +1 -0
- package/dist/es/components/wallets/GrabPay/index.js +1 -0
- package/dist/es/components/wallets/GrabPay/type.js +1 -0
- package/dist/es/components/wallets/IDeal/IDeal.js +201 -0
- package/dist/es/components/wallets/IDeal/ideal2.js +1 -0
- package/dist/es/components/wallets/IDeal/index.js +1 -0
- package/dist/es/components/wallets/IDeal/type.js +1 -0
- package/dist/es/components/wallets/LinePay/LinePay.js +183 -0
- package/dist/es/components/wallets/LinePay/index.js +1 -0
- package/dist/es/components/wallets/LinePay/line-pay.js +1 -0
- package/dist/es/components/wallets/LinePay/type.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +187 -0
- package/dist/es/components/wallets/MayBankQRPay/index.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/may-bank-qr-pay.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/type.js +1 -0
- package/dist/es/components/wallets/NinePay/NinePay.js +185 -0
- package/dist/es/components/wallets/NinePay/index.js +1 -0
- package/dist/es/components/wallets/NinePay/nine-pay.js +1 -0
- package/dist/es/components/wallets/NinePay/type.js +1 -0
- package/dist/es/components/wallets/OVO/OVO.js +200 -0
- package/dist/es/components/wallets/OVO/index.js +1 -0
- package/dist/es/components/wallets/OVO/ovo2.js +1 -0
- package/dist/es/components/wallets/OVO/type.js +1 -0
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +57 -218
- package/dist/es/components/wallets/P24/P24.js +198 -0
- package/dist/es/components/wallets/P24/index.js +1 -0
- package/dist/es/components/wallets/P24/p242.js +1 -0
- package/dist/es/components/wallets/P24/type.js +1 -0
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +57 -218
- package/dist/es/components/wallets/Paymaya/Paymaya.js +57 -221
- package/dist/es/components/wallets/PicPay/PicPay.js +64 -55
- package/dist/es/components/wallets/Pix/Pix.js +58 -56
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +185 -0
- package/dist/es/components/wallets/ShopeePay/index.js +1 -0
- package/dist/es/components/wallets/ShopeePay/shopee-pay.js +1 -0
- package/dist/es/components/wallets/ShopeePay/type.js +1 -0
- package/dist/es/components/wallets/Skrill/Skrill.js +200 -0
- package/dist/es/components/wallets/Skrill/index.js +1 -0
- package/dist/es/components/wallets/Skrill/skrill2.js +1 -0
- package/dist/es/components/wallets/Skrill/type.js +1 -0
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +185 -0
- package/dist/es/components/wallets/TNGWallet/index.js +1 -0
- package/dist/es/components/wallets/TNGWallet/tng-wallet.js +1 -0
- package/dist/es/components/wallets/TNGWallet/type.js +1 -0
- package/dist/es/components/wallets/Trustly/Trustly.js +226 -0
- package/dist/es/components/wallets/Trustly/index.js +1 -0
- package/dist/es/components/wallets/Trustly/trustly2.js +1 -0
- package/dist/es/components/wallets/Trustly/type.js +1 -0
- package/dist/es/components/wallets/Vietqr/Vietqr.js +73 -242
- package/dist/es/components/wallets/Zalopay/Zalopay.js +73 -242
- package/dist/es/components/wallets/index.js +14 -0
- package/dist/es/constant.js +48 -2
- package/dist/es/core/address.js +7 -6
- package/dist/es/core/checkout.js +93 -41
- package/dist/es/core/create-child.js +68 -0
- package/dist/es/core/environment.js +23 -1
- package/dist/es/core/error.js +15 -2
- package/dist/es/core/logger.js +106 -0
- package/dist/es/core/payment.js +65 -0
- package/dist/es/fe-logger.min.js +1 -0
- package/dist/es/hooks/useBaseWallet.js +280 -0
- package/dist/es/hooks/usePayState.js +37 -25
- package/dist/es/hooks/usePayment.js +1 -14
- package/dist/es/hooks/useRetry.js +50 -26
- package/dist/es/i18n/locales/de-DE.js +24 -0
- package/dist/es/i18n/locales/en-GB.js +24 -0
- package/dist/es/i18n/locales/es-ES.js +24 -0
- package/dist/es/i18n/locales/fr-FR.js +24 -0
- package/dist/es/i18n/locales/ja-JP.js +24 -0
- package/dist/es/i18n/locales/ko-KR.js +24 -0
- package/dist/es/i18n/locales/nl-NL.js +24 -0
- package/dist/es/i18n/locales/pt-PT.js +24 -0
- package/dist/es/i18n/locales/ru-RU.js +24 -0
- package/dist/es/i18n/locales/zh-CN.js +24 -0
- package/dist/es/i18n/locales/zh-HK.js +24 -0
- package/dist/es/i18n/locales/zh-TW.js +24 -0
- package/dist/es/index.js +23 -8
- package/dist/es/out/base-fraud-detection.js +4 -1
- package/dist/es/out/config.js +10 -4
- package/dist/es/out/fraud-detection.js +12 -13
- package/dist/es/out/worldpay-ddc-manager.js +7 -14
- package/dist/es/out/worldpay-ddc.js +7 -5
- package/dist/es/polyfill.js +166 -0
- package/dist/es/style.css +1 -1
- package/dist/es/types/event.js +12 -3
- package/dist/es/types/message.js +3 -0
- package/dist/es/utils/iframe.js +1 -1
- package/dist/es/utils/location.js +0 -8
- package/dist/es/utils/payment.js +12 -12
- package/dist/es/utils/redirect.js +4 -5
- package/dist/es/utils/system-info/is-ua-webview.js +1 -20
- package/dist/fe-logger.min.js +1 -0
- package/dist/polyfill.js +166 -0
- package/dist/style.css +1 -1
- package/dist/types/api/modules/index.d.ts +1 -0
- package/dist/types/api/modules/threeDS/index.d.ts +7 -0
- package/dist/types/api/modules/type.d.ts +2 -0
- package/dist/types/api/modules/wallet/index.d.ts +18 -0
- package/dist/types/api/utils/index.d.ts +1 -0
- package/dist/types/components/AddressField/index.d.ts +1 -0
- package/dist/types/components/AddressField/type.d.ts +17 -2
- package/dist/types/components/AddressField/utils.d.ts +22 -0
- package/dist/types/components/AliPay/type.d.ts +11 -15
- package/dist/types/components/ApplePay/type.d.ts +5 -28
- package/dist/types/components/CPFField/type.d.ts +1 -1
- package/dist/types/components/Card/type.d.ts +22 -23
- package/dist/types/components/CardExpireDateField/type.d.ts +1 -1
- package/dist/types/components/CardNo/type.d.ts +3 -2
- package/dist/types/components/CardNumberField/type.d.ts +1 -1
- package/dist/types/components/CardSecurityCodeField/type.d.ts +1 -1
- package/dist/types/components/CardSelector/type.d.ts +4 -4
- package/dist/types/components/DropIn/type.d.ts +10 -22
- package/dist/types/components/GooglePay/createGooglePay.d.ts +4 -4
- package/dist/types/components/GooglePay/type.d.ts +10 -14
- package/dist/types/components/PaymentButton/PaymentButton.d.ts +3 -0
- package/dist/types/components/PaymentButton/index.d.ts +2 -0
- package/dist/types/components/PaymentButton/type.d.ts +13 -0
- package/dist/types/components/RecurringTip/RecurringTip.d.ts +1 -1
- package/dist/types/components/SecuredFieldsProvider/type.d.ts +7 -1
- package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +5 -0
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +0 -6
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/type.d.ts +2 -0
- package/dist/types/components/WechatPay/type.d.ts +11 -15
- package/dist/types/components/business/BlikCodeField/BlikCodeField.d.ts +6 -0
- package/dist/types/components/business/BlikCodeField/index.d.ts +2 -0
- package/dist/types/components/business/BlikCodeField/type.d.ts +9 -0
- package/dist/types/components/business/BlikConfirmModal/BlikConfirmModal.d.ts +6 -0
- package/dist/types/components/business/BlikConfirmModal/index.d.ts +2 -0
- package/dist/types/components/business/BlikConfirmModal/type.d.ts +8 -0
- package/dist/types/components/business/NameField/NameField.d.ts +5 -0
- package/dist/types/components/business/NameField/index.d.ts +2 -0
- package/dist/types/components/business/NameField/type.d.ts +7 -0
- package/dist/types/components/business/PhoneField/PhoneField.d.ts +6 -0
- package/dist/types/components/business/PhoneField/config.d.ts +22 -0
- package/dist/types/components/business/PhoneField/index.d.ts +2 -0
- package/dist/types/components/business/PhoneField/type.d.ts +9 -0
- package/dist/types/components/business/SegmentedDigitInput/SegmentedDigitInput.d.ts +5 -0
- package/dist/types/components/business/SegmentedDigitInput/format.d.ts +5 -0
- package/dist/types/components/business/SegmentedDigitInput/index.d.ts +3 -0
- package/dist/types/components/business/SegmentedDigitInput/type.d.ts +13 -0
- package/dist/types/components/business/Tooltip/Tooltip.d.ts +11 -0
- package/dist/types/components/business/Tooltip/index.d.ts +1 -0
- package/dist/types/components/business/index.d.ts +6 -0
- package/dist/types/components/index.d.ts +0 -7
- package/dist/types/components/internal/CheckBox/type.d.ts +2 -1
- package/dist/types/components/internal/Form/type.d.ts +2 -1
- package/dist/types/components/internal/Select/type.d.ts +1 -1
- package/dist/types/components/internal/icons/IconArrowDown.d.ts +1 -1
- package/dist/types/components/internal/icons/IconBancontact.d.ts +2 -0
- package/dist/types/components/internal/icons/IconBlik.d.ts +2 -0
- package/dist/types/components/internal/icons/IconIdeal.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOvo.d.ts +2 -0
- package/dist/types/components/internal/icons/IconP24.d.ts +2 -0
- package/dist/types/components/internal/icons/IconPhone.d.ts +2 -0
- package/dist/types/components/internal/icons/IconSkrill.d.ts +2 -0
- package/dist/types/components/internal/icons/IconTrustly.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +8 -0
- package/dist/types/components/type.d.ts +0 -0
- package/dist/types/components/wallets/Bancontact/Bancontact.d.ts +15 -0
- package/dist/types/components/wallets/Bancontact/index.d.ts +2 -0
- package/dist/types/components/{GrabPay → wallets/Bancontact}/type.d.ts +8 -18
- package/dist/types/components/wallets/Blik/Blik.d.ts +15 -0
- package/dist/types/components/wallets/Blik/index.d.ts +2 -0
- package/dist/types/components/wallets/Blik/type.d.ts +29 -0
- package/dist/types/components/{Boost → wallets/Boost}/Boost.d.ts +9 -4
- package/dist/types/components/{Boost → wallets/Boost}/type.d.ts +3 -14
- package/dist/types/components/wallets/GCash/GCash.d.ts +5 -0
- package/dist/types/components/wallets/GCash/type.d.ts +3 -14
- package/dist/types/components/{GrabPay → wallets/GrabPay}/GrabPay.d.ts +4 -4
- package/dist/types/components/wallets/GrabPay/type.d.ts +17 -0
- package/dist/types/components/wallets/IDeal/IDeal.d.ts +15 -0
- package/dist/types/components/wallets/IDeal/index.d.ts +2 -0
- package/dist/types/components/wallets/IDeal/type.d.ts +29 -0
- package/dist/types/components/{LinePay → wallets/LinePay}/LinePay.d.ts +9 -4
- package/dist/types/components/{LinePay → wallets/LinePay}/type.d.ts +3 -14
- package/dist/types/components/wallets/MayBankQRPay/MayBankQRPay.d.ts +15 -0
- package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/type.d.ts +3 -14
- package/dist/types/components/wallets/NinePay/NinePay.d.ts +15 -0
- package/dist/types/components/{NinePay → wallets/NinePay}/type.d.ts +3 -14
- package/dist/types/components/wallets/OVO/OVO.d.ts +15 -0
- package/dist/types/components/wallets/OVO/index.d.ts +2 -0
- package/dist/types/components/wallets/OVO/type.d.ts +29 -0
- package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +5 -0
- package/dist/types/components/wallets/OpayWallet/type.d.ts +4 -15
- package/dist/types/components/wallets/P24/P24.d.ts +15 -0
- package/dist/types/components/wallets/P24/index.d.ts +2 -0
- package/dist/types/components/wallets/P24/type.d.ts +29 -0
- package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +5 -0
- package/dist/types/components/wallets/PagaWallet/type.d.ts +5 -16
- package/dist/types/components/wallets/Paymaya/Paymaya.d.ts +5 -0
- package/dist/types/components/wallets/Paymaya/type.d.ts +3 -14
- package/dist/types/components/wallets/PicPay/type.d.ts +5 -16
- package/dist/types/components/wallets/Pix/type.d.ts +5 -16
- package/dist/types/components/{ShopeePay → wallets/ShopeePay}/ShopeePay.d.ts +9 -4
- package/dist/types/components/{ShopeePay → wallets/ShopeePay}/type.d.ts +3 -14
- package/dist/types/components/wallets/Skrill/Skrill.d.ts +15 -0
- package/dist/types/components/wallets/Skrill/index.d.ts +2 -0
- package/dist/types/components/wallets/Skrill/type.d.ts +17 -0
- package/dist/types/components/{TNGWallet → wallets/TNGWallet}/TNGWallet.d.ts +9 -4
- package/dist/types/components/{TNGWallet → wallets/TNGWallet}/type.d.ts +3 -14
- package/dist/types/components/wallets/Trustly/Trustly.d.ts +15 -0
- package/dist/types/components/wallets/Trustly/index.d.ts +2 -0
- package/dist/types/components/wallets/Trustly/type.d.ts +21 -0
- package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +5 -0
- package/dist/types/components/wallets/Vietqr/type.d.ts +3 -14
- package/dist/types/components/wallets/Zalopay/Zalopay.d.ts +5 -0
- package/dist/types/components/wallets/Zalopay/type.d.ts +3 -14
- package/dist/types/components/wallets/index.d.ts +14 -0
- package/dist/types/components/wallets/type.d.ts +18 -4
- package/dist/types/constant.d.ts +15 -1
- package/dist/types/core/address.d.ts +2 -5
- package/dist/types/core/checkout.d.ts +10 -10
- package/dist/types/core/create-child.d.ts +1 -0
- package/dist/types/core/environment.d.ts +5 -0
- package/dist/types/core/error.d.ts +9 -3
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/core/logger.d.ts +55 -0
- package/dist/types/core/payment.d.ts +21 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useBaseWallet.d.ts +54 -0
- package/dist/types/hooks/usePayState.d.ts +3 -1
- package/dist/types/hooks/useRetry.console-tests.d.ts +41 -0
- package/dist/types/hooks/useRetry.d.ts +22 -3
- package/dist/types/i18n/locales/de-DE.d.ts +23 -0
- package/dist/types/i18n/locales/en-GB.d.ts +23 -0
- package/dist/types/i18n/locales/es-ES.d.ts +23 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +23 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +23 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +23 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +23 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +23 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +23 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +23 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +23 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +23 -0
- package/dist/types/out/base-fraud-detection.d.ts +1 -0
- package/dist/types/out/config.d.ts +6 -1
- package/dist/types/out/fraud-detection.d.ts +2 -8
- package/dist/types/out/types.d.ts +3 -1
- package/dist/types/out/worldpay-ddc-manager.d.ts +6 -7
- package/dist/types/types/event.d.ts +46 -13
- package/dist/types/types/index.d.ts +8 -37
- package/dist/types/types/message.d.ts +48 -7
- package/dist/types/types/payment.d.ts +63 -0
- package/dist/types/utils/app-payment.d.ts +7 -3
- package/dist/types/utils/behavior-tracker.d.ts +36 -0
- package/dist/types/utils/env.d.ts +37 -0
- package/dist/types/utils/iframe.d.ts +1 -1
- package/dist/types/utils/payment.d.ts +10 -10
- package/package.json +12 -5
- package/dist/es/components/Boost/index.js +0 -348
- package/dist/es/components/GrabPay/index.js +0 -348
- package/dist/es/components/LinePay/index.js +0 -348
- package/dist/es/components/MayBankQRPay/index.js +0 -354
- package/dist/es/components/NinePay/index.js +0 -348
- package/dist/es/components/ShopeePay/index.js +0 -348
- package/dist/es/components/TNGWallet/index.js +0 -348
- package/dist/types/components/MayBankQRPay/MayBankQRPay.d.ts +0 -10
- package/dist/types/components/NinePay/NinePay.d.ts +0 -10
- package/dist/types/utils/logger.d.ts +0 -14
- /package/dist/types/components/{Boost → wallets/Boost}/index.d.ts +0 -0
- /package/dist/types/components/{GrabPay → wallets/GrabPay}/index.d.ts +0 -0
- /package/dist/types/components/{LinePay → wallets/LinePay}/index.d.ts +0 -0
- /package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/index.d.ts +0 -0
- /package/dist/types/components/{NinePay → wallets/NinePay}/index.d.ts +0 -0
- /package/dist/types/components/{ShopeePay → wallets/ShopeePay}/index.d.ts +0 -0
- /package/dist/types/components/{TNGWallet → wallets/TNGWallet}/index.d.ts +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { u } from "../../../core.js";
|
|
2
|
+
import "../../../utils/card-brand/brands.js";
|
|
3
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
4
|
+
import { useI18n } from "../../../hooks/useI18n.js";
|
|
5
|
+
import "../../../core/context.js";
|
|
6
|
+
import "../../../out/worldpay-jsc-origin.js";
|
|
7
|
+
import "../../internal/Form/type.js";
|
|
8
|
+
import "../../internal/Form/context.js";
|
|
9
|
+
import { FormItem } from "../../internal/Form/FormItem.js";
|
|
10
|
+
import "../../internal/Form/Form.js";
|
|
11
|
+
import { Input } from "../../internal/Input/Input.js";
|
|
12
|
+
import "../../internal/Input/type.js";
|
|
13
|
+
const NameField = (props) => {
|
|
14
|
+
const { className, maxLength = 50, style, disabled, label, placeholder, incompleteText } = props;
|
|
15
|
+
const { i18n } = useI18n();
|
|
16
|
+
const rule = {
|
|
17
|
+
trigger: ["blur", "submit"],
|
|
18
|
+
validator(value) {
|
|
19
|
+
if (!value) {
|
|
20
|
+
throw new Error(incompleteText || i18n.get("form.name.incomplete"));
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const onInput = (event) => {
|
|
26
|
+
var _a;
|
|
27
|
+
(_a = props.onInput) == null ? void 0 : _a.call(props, event);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ u(
|
|
30
|
+
FormItem,
|
|
31
|
+
{
|
|
32
|
+
label: label || i18n.get("form.name.label"),
|
|
33
|
+
path: "name",
|
|
34
|
+
rule,
|
|
35
|
+
className,
|
|
36
|
+
style,
|
|
37
|
+
children: /* @__PURE__ */ u(
|
|
38
|
+
Input,
|
|
39
|
+
{
|
|
40
|
+
maxLength,
|
|
41
|
+
placeholder: placeholder || i18n.get("form.name.placeholder"),
|
|
42
|
+
onInput,
|
|
43
|
+
disabled
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
NameField
|
|
51
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../../core.js";
|
|
2
|
+
import "../../../utils/card-brand/brands.js";
|
|
3
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
4
|
+
import "../../../core/context.js";
|
|
5
|
+
import "../../../out/worldpay-jsc-origin.js";
|
|
6
|
+
import "../../internal/Form/type.js";
|
|
7
|
+
import "../../internal/Form/context.js";
|
|
8
|
+
import "../../internal/Form/FormItem.js";
|
|
9
|
+
import "../../internal/Form/Form.js";
|
|
10
|
+
import "../../internal/Input/Input.js";
|
|
11
|
+
import "../../internal/Input/type.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { x, h, T, y, u } from "../../../core.js";
|
|
2
|
+
import { useBEM } from "../../../hooks/useBEM.js";
|
|
3
|
+
import { useI18n } from "../../../hooks/useI18n.js";
|
|
4
|
+
import "../../../utils/card-brand/brands.js";
|
|
5
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
+
import { trimAll, normalizedClass } from "../../../utils/format.js";
|
|
7
|
+
import "../../../core/context.js";
|
|
8
|
+
import "../../../out/worldpay-jsc-origin.js";
|
|
9
|
+
import "../../internal/Form/type.js";
|
|
10
|
+
import { FormContext, FormItemContext } from "../../internal/Form/context.js";
|
|
11
|
+
import { FormItem } from "../../internal/Form/FormItem.js";
|
|
12
|
+
import "../../internal/Form/Form.js";
|
|
13
|
+
import { Select } from "../../internal/Select/Select.js";
|
|
14
|
+
import { SegmentedDigitInput } from "../SegmentedDigitInput/SegmentedDigitInput.js";
|
|
15
|
+
import { phoneList, phoneConfigByAreaCode, formatPhoneDigits } from "./config.js";
|
|
16
|
+
import "./phone-field.js";
|
|
17
|
+
const FALLBACK_DIGIT_GROUPS = [3, 4, 4];
|
|
18
|
+
const PhoneField = (props) => {
|
|
19
|
+
var _a;
|
|
20
|
+
const {
|
|
21
|
+
className,
|
|
22
|
+
style,
|
|
23
|
+
disabled,
|
|
24
|
+
label,
|
|
25
|
+
placeholder,
|
|
26
|
+
incompleteText,
|
|
27
|
+
invalidText,
|
|
28
|
+
areaCode,
|
|
29
|
+
areaCodeDisabled,
|
|
30
|
+
onValidationStatusChange
|
|
31
|
+
} = props;
|
|
32
|
+
const { i18n } = useI18n();
|
|
33
|
+
const { bem } = useBEM("phone-field");
|
|
34
|
+
const formContext = x(FormContext);
|
|
35
|
+
const [value, setValue] = h("");
|
|
36
|
+
const resolvedAreaCode = T(() => {
|
|
37
|
+
var _a2, _b;
|
|
38
|
+
const fromForm = (_a2 = formContext == null ? void 0 : formContext.form) == null ? void 0 : _a2.areaCode;
|
|
39
|
+
const raw = fromForm ?? areaCode ?? ((_b = phoneList[0]) == null ? void 0 : _b.value) ?? "";
|
|
40
|
+
return String(raw);
|
|
41
|
+
}, [(_a = formContext == null ? void 0 : formContext.form) == null ? void 0 : _a.areaCode, areaCode]);
|
|
42
|
+
const phoneCfg = T(
|
|
43
|
+
() => phoneConfigByAreaCode(resolvedAreaCode),
|
|
44
|
+
[resolvedAreaCode]
|
|
45
|
+
);
|
|
46
|
+
const digitGroups = (phoneCfg == null ? void 0 : phoneCfg.digitGroups) ?? FALLBACK_DIGIT_GROUPS;
|
|
47
|
+
const maxDigits = (phoneCfg == null ? void 0 : phoneCfg.maxDigits) ?? 12;
|
|
48
|
+
y(() => {
|
|
49
|
+
var _a2, _b;
|
|
50
|
+
if (!formContext || areaCodeDisabled)
|
|
51
|
+
return;
|
|
52
|
+
const initial = areaCode ?? ((_a2 = phoneList[0]) == null ? void 0 : _a2.value);
|
|
53
|
+
const current = (_b = formContext.form) == null ? void 0 : _b.areaCode;
|
|
54
|
+
if (initial != null && initial !== "" && (current === void 0 || current === "")) {
|
|
55
|
+
formContext.setForm((prev) => ({ ...prev, areaCode: String(initial) }));
|
|
56
|
+
}
|
|
57
|
+
}, [formContext, areaCode, areaCodeDisabled]);
|
|
58
|
+
y(() => {
|
|
59
|
+
setValue((v) => formatPhoneDigits(trimAll(v), digitGroups, maxDigits));
|
|
60
|
+
}, [resolvedAreaCode, digitGroups, maxDigits]);
|
|
61
|
+
const rule = {
|
|
62
|
+
trigger: ["blur", "submit"],
|
|
63
|
+
validator(val) {
|
|
64
|
+
var _a2, _b;
|
|
65
|
+
const code = ((_a2 = formContext == null ? void 0 : formContext.form) == null ? void 0 : _a2.areaCode) ?? areaCode ?? ((_b = phoneList[0]) == null ? void 0 : _b.value) ?? "";
|
|
66
|
+
const cfg = phoneConfigByAreaCode(String(code));
|
|
67
|
+
const digits = trimAll(val ?? "");
|
|
68
|
+
if (!digits) {
|
|
69
|
+
throw new Error(incompleteText || i18n.get("form.phone.incomplete"));
|
|
70
|
+
}
|
|
71
|
+
if (!(cfg == null ? void 0 : cfg.regex.test(digits))) {
|
|
72
|
+
throw new Error(invalidText || i18n.get("form.phone.invalid"));
|
|
73
|
+
}
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const onNumberInput = (event) => {
|
|
78
|
+
var _a2;
|
|
79
|
+
setValue(event.currentTarget.value);
|
|
80
|
+
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, event);
|
|
81
|
+
};
|
|
82
|
+
const placeholderText = placeholder ?? (phoneCfg == null ? void 0 : phoneCfg.placeholder) ?? i18n.get("form.phone.placeholder");
|
|
83
|
+
const areaCodeLocked = disabled || areaCodeDisabled;
|
|
84
|
+
return /* @__PURE__ */ u(
|
|
85
|
+
FormItem,
|
|
86
|
+
{
|
|
87
|
+
label: label || i18n.get("form.phone.label"),
|
|
88
|
+
path: "phoneNumber",
|
|
89
|
+
rule,
|
|
90
|
+
className: normalizedClass(bem(), className),
|
|
91
|
+
style,
|
|
92
|
+
onValidationStatusChange,
|
|
93
|
+
children: /* @__PURE__ */ u("div", { className: bem("row"), children: [
|
|
94
|
+
/* @__PURE__ */ u("div", { className: normalizedClass(bem("areaCode"), areaCodeLocked ? bem("areaCode--disabled") : void 0), children: /* @__PURE__ */ u(FormItemContext.Provider, { value: null, children: /* @__PURE__ */ u(
|
|
95
|
+
Select,
|
|
96
|
+
{
|
|
97
|
+
value: resolvedAreaCode,
|
|
98
|
+
options: phoneList,
|
|
99
|
+
filterable: false,
|
|
100
|
+
inputClassName: bem("areaCode-input"),
|
|
101
|
+
disabled,
|
|
102
|
+
onSelect: (v) => {
|
|
103
|
+
formContext == null ? void 0 : formContext.setForm((prev) => ({ ...prev, areaCode: String(v) }));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
) }) }),
|
|
107
|
+
/* @__PURE__ */ u("div", { className: bem("number"), children: /* @__PURE__ */ u(
|
|
108
|
+
SegmentedDigitInput,
|
|
109
|
+
{
|
|
110
|
+
value,
|
|
111
|
+
digitGroups,
|
|
112
|
+
maxDigits,
|
|
113
|
+
separator: " ",
|
|
114
|
+
onInput: onNumberInput,
|
|
115
|
+
placeholder: placeholderText,
|
|
116
|
+
disabled
|
|
117
|
+
}
|
|
118
|
+
) })
|
|
119
|
+
] })
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
PhoneField
|
|
125
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { formatDigitsByGroups } from "../SegmentedDigitInput/format.js";
|
|
2
|
+
const phoneType2ConfigMap = {
|
|
3
|
+
[
|
|
4
|
+
"IDN"
|
|
5
|
+
/* IDN */
|
|
6
|
+
]: {
|
|
7
|
+
areaCode: "+62",
|
|
8
|
+
placeholder: "812 3456 7890",
|
|
9
|
+
regex: /^8[1-9]\d{7,11}$/,
|
|
10
|
+
digitGroups: [3, 4, 6],
|
|
11
|
+
maxDigits: 13
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const phoneList = Object.keys(phoneType2ConfigMap).map((type) => {
|
|
15
|
+
const config = phoneType2ConfigMap[type];
|
|
16
|
+
return {
|
|
17
|
+
label: config.areaCode,
|
|
18
|
+
value: config.areaCode,
|
|
19
|
+
...config
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
const formatPhoneDigits = (rawDigits, groups, maxDigits) => {
|
|
23
|
+
return formatDigitsByGroups(rawDigits, groups, maxDigits, " ");
|
|
24
|
+
};
|
|
25
|
+
const phoneConfigByAreaCode = (areaCode) => {
|
|
26
|
+
const p = String(areaCode);
|
|
27
|
+
return phoneList.find((item) => item.areaCode === p || String(item.value) === p);
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
formatPhoneDigits,
|
|
31
|
+
phoneConfigByAreaCode,
|
|
32
|
+
phoneList
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../../../core.js";
|
|
2
|
+
import "../../../utils/card-brand/brands.js";
|
|
3
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
4
|
+
import "../../../core/context.js";
|
|
5
|
+
import "../../../out/worldpay-jsc-origin.js";
|
|
6
|
+
import "../../internal/Form/type.js";
|
|
7
|
+
import "../../internal/Form/context.js";
|
|
8
|
+
import "../../internal/Form/FormItem.js";
|
|
9
|
+
import "../../internal/Form/Form.js";
|
|
10
|
+
import "../../internal/Select/Select.js";
|
|
11
|
+
import "../../internal/Input/Input.js";
|
|
12
|
+
import "../../internal/Input/type.js";
|
|
13
|
+
import "./config.js";
|
|
14
|
+
import "./phone-field.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { T, u } from "../../../core.js";
|
|
2
|
+
import { clamp } from "../../../utils/index.js";
|
|
3
|
+
import { Input } from "../../internal/Input/Input.js";
|
|
4
|
+
import "../../internal/Input/type.js";
|
|
5
|
+
import { maxFormattedLength, formatDigitsByGroups } from "./format.js";
|
|
6
|
+
import { trimAll, limitedToNumber } from "../../../utils/format.js";
|
|
7
|
+
function cursorPosAfterDigitCount(formatted, digitCount) {
|
|
8
|
+
if (digitCount <= 0)
|
|
9
|
+
return 0;
|
|
10
|
+
let seen = 0;
|
|
11
|
+
for (let i = 0; i < formatted.length; i++) {
|
|
12
|
+
if (/\d/.test(formatted[i])) {
|
|
13
|
+
seen++;
|
|
14
|
+
if (seen === digitCount)
|
|
15
|
+
return i + 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return formatted.length;
|
|
19
|
+
}
|
|
20
|
+
const SegmentedDigitInput = (props) => {
|
|
21
|
+
const {
|
|
22
|
+
value,
|
|
23
|
+
digitGroups,
|
|
24
|
+
maxDigits,
|
|
25
|
+
separator = " ",
|
|
26
|
+
onInput,
|
|
27
|
+
placeholder,
|
|
28
|
+
disabled,
|
|
29
|
+
inputClassName,
|
|
30
|
+
style,
|
|
31
|
+
onFocus,
|
|
32
|
+
onBlur,
|
|
33
|
+
leftIcon,
|
|
34
|
+
rightIcon
|
|
35
|
+
} = props;
|
|
36
|
+
const maxLen = T(
|
|
37
|
+
() => maxFormattedLength(digitGroups, maxDigits, separator),
|
|
38
|
+
[digitGroups, maxDigits, separator]
|
|
39
|
+
);
|
|
40
|
+
const onInnerInput = (event) => {
|
|
41
|
+
const { currentTarget, inputType } = event;
|
|
42
|
+
const selectionStart = currentTarget.selectionStart ?? 0;
|
|
43
|
+
const oldVal = currentTarget.value;
|
|
44
|
+
const sep = separator;
|
|
45
|
+
const digitsBeforeCursor = trimAll(oldVal.slice(0, selectionStart)).length;
|
|
46
|
+
let digits = limitedToNumber(currentTarget.value).slice(0, maxDigits);
|
|
47
|
+
const newVal = formatDigitsByGroups(digits, digitGroups, maxDigits, sep);
|
|
48
|
+
let newPos = cursorPosAfterDigitCount(newVal, digitsBeforeCursor);
|
|
49
|
+
if (inputType === "insertText" && newPos > 0 && newVal[newPos - 1] === sep) {
|
|
50
|
+
newPos = clamp(newPos + 1, 0, newVal.length);
|
|
51
|
+
}
|
|
52
|
+
if (inputType === "deleteContentBackward" && newPos > 0 && newVal[newPos - 1] === sep) {
|
|
53
|
+
newPos = clamp(newPos - 1, 0, newVal.length);
|
|
54
|
+
}
|
|
55
|
+
currentTarget.value = newVal;
|
|
56
|
+
currentTarget.setSelectionRange(newPos, newPos);
|
|
57
|
+
onInput == null ? void 0 : onInput(event);
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ u(
|
|
60
|
+
Input,
|
|
61
|
+
{
|
|
62
|
+
type: "text",
|
|
63
|
+
inputmode: "numeric",
|
|
64
|
+
maxLength: maxLen,
|
|
65
|
+
value,
|
|
66
|
+
onInput: onInnerInput,
|
|
67
|
+
placeholder,
|
|
68
|
+
disabled,
|
|
69
|
+
inputClassName,
|
|
70
|
+
style,
|
|
71
|
+
onFocus,
|
|
72
|
+
onBlur,
|
|
73
|
+
leftIcon,
|
|
74
|
+
rightIcon
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
SegmentedDigitInput
|
|
80
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "../../../utils/card-brand/brands.js";
|
|
2
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
3
|
+
import { limitedToNumber } from "../../../utils/format.js";
|
|
4
|
+
function formatDigitsByGroups(rawDigits, groups, maxDigits, separator = " ") {
|
|
5
|
+
const d = limitedToNumber(rawDigits).slice(0, maxDigits);
|
|
6
|
+
if (!d)
|
|
7
|
+
return "";
|
|
8
|
+
const parts = [];
|
|
9
|
+
let i = 0;
|
|
10
|
+
for (let g = 0; g < groups.length && i < d.length; g++) {
|
|
11
|
+
const len = groups[g];
|
|
12
|
+
parts.push(d.slice(i, i + len));
|
|
13
|
+
i += len;
|
|
14
|
+
}
|
|
15
|
+
if (i < d.length) {
|
|
16
|
+
parts.push(d.slice(i));
|
|
17
|
+
}
|
|
18
|
+
return parts.join(separator);
|
|
19
|
+
}
|
|
20
|
+
function maxFormattedLength(groups, maxDigits, separator = " ") {
|
|
21
|
+
return formatDigitsByGroups("0".repeat(maxDigits), groups, maxDigits, separator).length;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
formatDigitsByGroups,
|
|
25
|
+
maxFormattedLength
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { u } from "../../../core.js";
|
|
2
|
+
import { useBEM } from "../../../hooks/useBEM.js";
|
|
3
|
+
import "../../../core/context.js";
|
|
4
|
+
import "../../../utils/card-brand/brands.js";
|
|
5
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
+
import "../../../out/worldpay-jsc-origin.js";
|
|
7
|
+
import "./tooltip2.js";
|
|
8
|
+
const Tooltip = (props) => {
|
|
9
|
+
const { content, children } = props;
|
|
10
|
+
const { bem } = useBEM("tooltip");
|
|
11
|
+
return /* @__PURE__ */ u("div", { className: bem(), children: [
|
|
12
|
+
/* @__PURE__ */ u("div", { className: bem("trigger"), children }),
|
|
13
|
+
/* @__PURE__ */ u("div", { className: bem("popup"), role: "tooltip", children: content })
|
|
14
|
+
] });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
Tooltip
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -5,3 +5,17 @@ import "../../core/context.js";
|
|
|
5
5
|
import "../../out/worldpay-jsc-origin.js";
|
|
6
6
|
import "../internal/Modal/Modal.js";
|
|
7
7
|
import "./QRCodeModal/qr-code-modal.js";
|
|
8
|
+
import "../internal/Form/type.js";
|
|
9
|
+
import "../internal/Form/context.js";
|
|
10
|
+
import "../internal/Form/FormItem.js";
|
|
11
|
+
import "../internal/Form/Form.js";
|
|
12
|
+
import "../internal/Input/Input.js";
|
|
13
|
+
import "../internal/Input/type.js";
|
|
14
|
+
import "../internal/Select/Select.js";
|
|
15
|
+
import "./PhoneField/config.js";
|
|
16
|
+
import "./PhoneField/phone-field.js";
|
|
17
|
+
import "./Tooltip/tooltip2.js";
|
|
18
|
+
import "./BlikCodeField/blik-code-field.js";
|
|
19
|
+
import "../internal/Button/button2.js";
|
|
20
|
+
import "./BlikConfirmModal/blik-confirm-modal.js";
|
|
21
|
+
import "../internal/LoadingCheck/loading-check.js";
|
|
@@ -29,13 +29,13 @@ import "./Sepa/index.js";
|
|
|
29
29
|
import "./EncryptedCard/index.js";
|
|
30
30
|
import "./CombinedCardInfo/index.js";
|
|
31
31
|
import "./DropIn/index.js";
|
|
32
|
-
import "./Boost/
|
|
33
|
-
import "./
|
|
34
|
-
import "./
|
|
35
|
-
import "./NinePay/
|
|
36
|
-
import "./
|
|
37
|
-
import "./
|
|
38
|
-
import "./
|
|
32
|
+
import "./wallets/Boost/Boost.js";
|
|
33
|
+
import "./wallets/GrabPay/GrabPay.js";
|
|
34
|
+
import "./wallets/LinePay/LinePay.js";
|
|
35
|
+
import "./wallets/NinePay/NinePay.js";
|
|
36
|
+
import "./wallets/MayBankQRPay/MayBankQRPay.js";
|
|
37
|
+
import "./wallets/ShopeePay/ShopeePay.js";
|
|
38
|
+
import "./wallets/TNGWallet/TNGWallet.js";
|
|
39
39
|
import "./wallets/GCash/GCash.js";
|
|
40
40
|
import "./wallets/Paymaya/Paymaya.js";
|
|
41
41
|
import "./wallets/Zalopay/Zalopay.js";
|
|
@@ -44,3 +44,10 @@ import "./wallets/Pix/Pix.js";
|
|
|
44
44
|
import "./wallets/PicPay/PicPay.js";
|
|
45
45
|
import "./wallets/PagaWallet/PagaWallet.js";
|
|
46
46
|
import "./wallets/OpayWallet/OpayWallet.js";
|
|
47
|
+
import "./wallets/OVO/OVO.js";
|
|
48
|
+
import "./wallets/Bancontact/Bancontact.js";
|
|
49
|
+
import "./wallets/Blik/Blik.js";
|
|
50
|
+
import "./wallets/IDeal/IDeal.js";
|
|
51
|
+
import "./wallets/Skrill/Skrill.js";
|
|
52
|
+
import "./wallets/P24/P24.js";
|
|
53
|
+
import "./wallets/Trustly/Trustly.js";
|
|
@@ -10,14 +10,14 @@ import "../../../out/worldpay-jsc-origin.js";
|
|
|
10
10
|
import { IconChecked } from "../icons/iconChecked.js";
|
|
11
11
|
const { bem } = useBEM("check-box");
|
|
12
12
|
const CheckBox = (props) => {
|
|
13
|
-
const { checked, onChange, label, style } = props;
|
|
13
|
+
const { checked, onChange, label, style, disabled } = props;
|
|
14
14
|
const handleChange = () => {
|
|
15
15
|
onChange == null ? void 0 : onChange(!checked);
|
|
16
16
|
};
|
|
17
17
|
return /* @__PURE__ */ u(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
className: normalizedClass(COMMON_CLASS_NAME, bem({ checked })),
|
|
20
|
+
className: normalizedClass(COMMON_CLASS_NAME, bem({ checked, disabled })),
|
|
21
21
|
onClick: handleChange,
|
|
22
22
|
style,
|
|
23
23
|
children: [
|
|
@@ -108,7 +108,7 @@ const Input = w((props, ref) => {
|
|
|
108
108
|
autocomplete: "off"
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
|
-
!!rightIcon && /* @__PURE__ */ u("div", { class: inputBEM.bem("right-icon"), children: rightIcon })
|
|
111
|
+
!!rightIcon && /* @__PURE__ */ u("div", { class: inputBEM.bem("right-icon", { disabled }), children: rightIcon })
|
|
112
112
|
] }) });
|
|
113
113
|
});
|
|
114
114
|
export {
|
|
@@ -16,6 +16,7 @@ import { SelectMenu } from "./SelectMenu.js";
|
|
|
16
16
|
import { SelectMenuItem } from "./SelectMenuItem.js";
|
|
17
17
|
const { bem } = useBEM("select");
|
|
18
18
|
const Select = w((props, ref) => {
|
|
19
|
+
const { disabled } = props;
|
|
19
20
|
const formItemContext = x(FormItemContext);
|
|
20
21
|
let status = props.status ?? (formItemContext == null ? void 0 : formItemContext.validationResult.status);
|
|
21
22
|
if (status === "unValidate")
|
|
@@ -107,6 +108,9 @@ const Select = w((props, ref) => {
|
|
|
107
108
|
setDropMenuVisible(false);
|
|
108
109
|
setIsInputChange(false);
|
|
109
110
|
(_c = (_b = inputRef.current) == null ? void 0 : _b.input) == null ? void 0 : _c.blur();
|
|
111
|
+
if (callCallBack) {
|
|
112
|
+
formItemContext == null ? void 0 : formItemContext.setValue(selectedValue);
|
|
113
|
+
}
|
|
110
114
|
callCallBack && ((_d = props == null ? void 0 : props.onSelect) == null ? void 0 : _d.call(props, selectedValue, option));
|
|
111
115
|
}
|
|
112
116
|
function onInputChange(event) {
|
|
@@ -157,6 +161,7 @@ const Select = w((props, ref) => {
|
|
|
157
161
|
/* @__PURE__ */ u(FormItemContext.Provider, { value: null, children: /* @__PURE__ */ u(
|
|
158
162
|
Input,
|
|
159
163
|
{
|
|
164
|
+
disabled,
|
|
160
165
|
ref: inputRef,
|
|
161
166
|
value: inputValue,
|
|
162
167
|
status,
|
|
@@ -177,7 +182,8 @@ const Select = w((props, ref) => {
|
|
|
177
182
|
class: bem("render-label", [
|
|
178
183
|
{
|
|
179
184
|
placeholder: isFocus,
|
|
180
|
-
hidden: isInputChange
|
|
185
|
+
hidden: isInputChange,
|
|
186
|
+
disabled
|
|
181
187
|
}
|
|
182
188
|
]),
|
|
183
189
|
onClick: onClickDisplay,
|
|
@@ -4,7 +4,7 @@ import { isUndefined } from "../../../utils/is.js";
|
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
6
|
import { normalizedClass } from "../../../utils/format.js";
|
|
7
|
-
|
|
7
|
+
const IconArrowDown = ({ size, style, className }) => {
|
|
8
8
|
const computedSize = !isUndefined(size) ? `${size}px` : "1em";
|
|
9
9
|
return /* @__PURE__ */ u(
|
|
10
10
|
"svg",
|
|
@@ -12,17 +12,17 @@ function IconArrowDown({ size, style, className }) {
|
|
|
12
12
|
width: computedSize,
|
|
13
13
|
height: computedSize,
|
|
14
14
|
viewBox: "0 0 16 16",
|
|
15
|
-
fill: "
|
|
15
|
+
fill: "currentColor",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
17
|
style,
|
|
18
18
|
className: normalizedClass(COMMON_CLASS_NAME, className),
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */ u("g", { id: "icon-wrapper", "clip-path": "url(#clip0_543_1600)", children: /* @__PURE__ */ u("g", { id: "direction/down", children: /* @__PURE__ */ u("path", { id: "Vector", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.6719 6.28589L12.7291 5.34308L8.01502 10.0571L3.30098 5.34308L2.35817 6.28589L7.54358 11.4713C7.54358 11.4713 7.54362 11.4713 8.01502 10.9999L7.54358 11.4713L8.01502 11.9427L13.6719 6.28589Z", fill: "
|
|
20
|
+
/* @__PURE__ */ u("g", { id: "icon-wrapper", "clip-path": "url(#clip0_543_1600)", children: /* @__PURE__ */ u("g", { id: "direction/down", children: /* @__PURE__ */ u("path", { id: "Vector", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.6719 6.28589L12.7291 5.34308L8.01502 10.0571L3.30098 5.34308L2.35817 6.28589L7.54358 11.4713C7.54358 11.4713 7.54362 11.4713 8.01502 10.9999L7.54358 11.4713L8.01502 11.9427L13.6719 6.28589Z", fill: "currentColor" }) }) }),
|
|
21
21
|
/* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_543_1600", children: /* @__PURE__ */ u("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
export {
|
|
27
27
|
IconArrowDown
|
|
28
28
|
};
|