@paykka/card-checkout-ui 0.17.0 → 0.18.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 +21 -21
- package/dist/card-checkout-ui.umd.cjs +21 -21
- package/dist/es/api/http.js +1 -0
- package/dist/es/api/index.js +1 -0
- package/dist/es/api/modules/checkout/map.js +11 -14
- package/dist/es/api/modules/get-browser-params.js +1 -1
- package/dist/es/api/modules/index.js +1 -0
- package/dist/es/api/utils/index.js +1 -0
- package/dist/es/components/AccordionItem/AccordionItem.js +1 -0
- package/dist/es/components/AddressField/index.js +1 -0
- package/dist/es/components/ApplePay/index.js +1 -0
- package/dist/es/components/CPFField/index.js +1 -0
- package/dist/es/components/Card/index.js +16 -17
- package/dist/es/components/CardBrands/index.js +1 -0
- package/dist/es/components/CardExpireDateField/index.js +1 -0
- package/dist/es/components/CardHolderNameField/index.js +1 -0
- package/dist/es/components/CardNo/index.js +1 -0
- package/dist/es/components/CardNumberField/index.js +1 -0
- package/dist/es/components/CardSecurityCodeField/index.js +1 -0
- package/dist/es/components/CardSelector/index.js +1 -0
- package/dist/es/components/CombinedCardInfo/index.js +1 -0
- package/dist/es/components/DropIn/index.js +67 -3
- package/dist/es/components/EmailField/EmailField.js +11 -1
- package/dist/es/components/EncryptedCard/index.js +1 -0
- package/dist/es/components/GooglePay/index.js +1 -0
- package/dist/es/components/GuideCard/index.js +9 -1
- package/dist/es/components/{CardIBANField → IBANField}/index.js +7 -5
- package/dist/es/components/PaymentButton/index.js +1 -0
- package/dist/es/components/RecurringTip/index.js +1 -0
- package/dist/es/components/SecuredFieldsProvider/index.js +1 -0
- package/dist/es/components/Sepa/index.js +141 -250
- package/dist/es/components/SubmitButton/index.js +1 -0
- package/dist/es/components/ThreeDS/index.js +1 -0
- package/dist/es/components/Tip/index.js +1 -0
- package/dist/es/components/business/BlikCodeField/BlikCodeField.js +2 -1
- package/dist/es/components/business/BlikCodeField/index.js +2 -1
- package/dist/es/components/business/NameField/NameField.js +1 -0
- package/dist/es/components/business/NameField/index.js +1 -0
- package/dist/es/components/business/{BlikConfirmModal/BlikConfirmModal.js → PaymentConfirmModal/PaymentConfirmModal.js} +8 -7
- package/dist/es/components/business/{BlikConfirmModal → PaymentConfirmModal}/index.js +2 -1
- package/dist/es/components/business/PhoneField/PhoneField.js +52 -27
- package/dist/es/components/business/PhoneField/area-codes.js +458 -0
- package/dist/es/components/business/PhoneField/config.js +2 -1
- package/dist/es/components/business/PhoneField/index.js +1 -0
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +1 -0
- package/dist/es/components/business/QRCodeModal/index.js +1 -0
- package/dist/es/components/business/SegmentedDigitInput/format.js +1 -0
- package/dist/es/components/business/SegmentedDigitInput/index.js +1 -0
- package/dist/es/components/business/Tooltip/{Tooltip.js → Tooltip2.js} +2 -1
- package/dist/es/components/business/Tooltip/index.js +2 -1
- package/dist/es/components/business/index.js +3 -2
- package/dist/es/components/index.js +8 -0
- package/dist/es/components/internal/Accordion/accordionTransition.js +1 -0
- package/dist/es/components/internal/Accordion/index.js +1 -0
- package/dist/es/components/internal/Button/Button2.js +1 -0
- package/dist/es/components/internal/Button/index.js +1 -0
- package/dist/es/components/internal/CheckBox/CheckBox.js +1 -0
- package/dist/es/components/internal/CheckBox/index.js +1 -0
- package/dist/es/components/internal/Form/Form.js +1 -0
- package/dist/es/components/internal/Form/FormItem.js +1 -0
- package/dist/es/components/internal/Form/type.js +1 -0
- package/dist/es/components/internal/Info/Info.js +1 -0
- package/dist/es/components/internal/Info/index.js +1 -0
- package/dist/es/components/internal/Input/Input.js +1 -0
- package/dist/es/components/internal/Input/type.js +1 -0
- package/dist/es/components/internal/Loading/Loading2.js +1 -0
- package/dist/es/components/internal/Loading/index.js +1 -0
- package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +1 -0
- package/dist/es/components/internal/LoadingCheck/index.js +1 -0
- package/dist/es/components/internal/Modal/Modal.js +1 -0
- package/dist/es/components/internal/QRCode/QRCode.js +1 -0
- package/dist/es/components/internal/QRCode/index.js +1 -0
- package/dist/es/components/internal/Select/Select.js +1 -0
- package/dist/es/components/internal/Select/SelectMenu.js +1 -0
- package/dist/es/components/internal/Select/SelectMenuItem.js +1 -0
- package/dist/es/components/internal/icons/Icon3DSFail.js +1 -0
- package/dist/es/components/internal/icons/Icon3DSInfo.js +1 -0
- package/dist/es/components/internal/icons/Icon3DSSuccess.js +1 -0
- package/dist/es/components/internal/icons/IconAdd.js +1 -0
- package/dist/es/components/internal/icons/IconAlipayPlus.js +1 -0
- package/dist/es/components/internal/icons/IconAmex.js +1 -0
- package/dist/es/components/internal/icons/IconArrowDown.js +1 -0
- package/dist/es/components/internal/icons/IconBancomatPay.js +1 -0
- package/dist/es/components/internal/icons/IconBancontact.js +16 -71
- package/dist/es/components/internal/icons/IconBizum.js +1 -0
- package/dist/es/components/internal/icons/IconBlik.js +60 -542
- package/dist/es/components/internal/icons/IconBoost.js +14 -40
- package/dist/es/components/internal/icons/IconCard.js +1 -0
- package/dist/es/components/internal/icons/IconCard2.js +1 -0
- package/dist/es/components/internal/icons/IconCardNo.js +1 -0
- package/dist/es/components/internal/icons/IconDinnersClub.js +1 -0
- package/dist/es/components/internal/icons/IconDiscover.js +1 -0
- package/dist/es/components/internal/icons/IconDoku.js +31 -0
- package/dist/es/components/internal/icons/IconDragonPay.js +1 -0
- package/dist/es/components/internal/icons/IconEPS.js +1 -0
- package/dist/es/components/internal/icons/IconError.js +1 -0
- package/dist/es/components/internal/icons/IconFpx.js +31 -15
- package/dist/es/components/internal/icons/IconGCash.js +1 -0
- package/dist/es/components/internal/icons/IconGcashComplete.js +1 -0
- package/dist/es/components/internal/icons/IconGoPay.js +31 -0
- package/dist/es/components/internal/icons/IconGrabPay.js +1 -0
- package/dist/es/components/internal/icons/IconIdeal.js +1 -0
- package/dist/es/components/internal/icons/IconInfo.js +1 -0
- package/dist/es/components/internal/icons/IconJcb.js +1 -0
- package/dist/es/components/internal/icons/IconJenius.js +28 -0
- package/dist/es/components/internal/icons/IconLinePay.js +1 -0
- package/dist/es/components/internal/icons/IconLinkAja.js +44 -0
- package/dist/es/components/internal/icons/IconMasterCard.js +1 -0
- package/dist/es/components/internal/icons/IconMayBankQRPay.js +1 -0
- package/dist/es/components/internal/icons/IconMbWay.js +1 -0
- package/dist/es/components/internal/icons/IconMultibanco.js +1 -0
- package/dist/es/components/internal/icons/IconMyBank.js +2 -1
- package/dist/es/components/internal/icons/IconNinePay.js +1 -0
- package/dist/es/components/internal/icons/IconNuPay.js +31 -0
- package/dist/es/components/internal/icons/IconOnlineBankingEstonia.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingFinland.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingIndonesia.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingLatvia.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingLithuania.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingThailand.js +1 -0
- package/dist/es/components/internal/icons/IconOpayWallet.js +1 -0
- package/dist/es/components/internal/icons/IconOvo.js +1 -0
- package/dist/es/components/internal/icons/IconP24.js +1 -0
- package/dist/es/components/internal/icons/IconPagaWallet.js +1 -0
- package/dist/es/components/internal/icons/IconPayByBank.js +3 -17
- package/dist/es/components/internal/icons/IconPayU.js +1 -0
- package/dist/es/components/internal/icons/IconPaymaya.js +1 -0
- package/dist/es/components/internal/icons/IconPhone.js +1 -0
- package/dist/es/components/internal/icons/IconPicPay.js +1 -0
- package/dist/es/components/internal/icons/IconPix.js +1 -0
- package/dist/es/components/internal/icons/IconRedirect.js +1 -0
- package/dist/es/components/internal/icons/IconSafe.js +1 -0
- package/dist/es/components/internal/icons/IconSatispay.js +1 -0
- package/dist/es/components/internal/icons/IconScan.js +1 -0
- package/dist/es/components/internal/icons/IconSepa.js +36 -0
- package/dist/es/components/internal/icons/IconShopeePay.js +1 -0
- package/dist/es/components/internal/icons/IconSkrill.js +1 -0
- package/dist/es/components/internal/icons/IconSuccess.js +1 -0
- package/dist/es/components/internal/icons/IconSwish.js +35 -0
- package/dist/es/components/internal/icons/IconSwitch.js +1 -0
- package/dist/es/components/internal/icons/IconTNGWallet.js +1 -0
- package/dist/es/components/internal/icons/IconTick.js +1 -0
- package/dist/es/components/internal/icons/IconTrustly.js +1 -0
- package/dist/es/components/internal/icons/IconTwint.js +54 -0
- package/dist/es/components/internal/icons/IconUnionPay.js +1 -0
- package/dist/es/components/internal/icons/IconUpi.js +6 -15
- package/dist/es/components/internal/icons/IconVietqr.js +1 -0
- package/dist/es/components/internal/icons/IconVietqrComplete.js +1 -0
- package/dist/es/components/internal/icons/IconVisa.js +1 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobal.js +1 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobalComplete.js +1 -0
- package/dist/es/components/internal/icons/IconZalopay.js +1 -0
- package/dist/es/components/internal/icons/IconZalopayComplete.js +1 -0
- package/dist/es/components/internal/icons/iconChecked.js +1 -0
- package/dist/es/components/internal/icons/index.js +1 -0
- package/dist/es/components/wallets/AliPay/AliPay.js +5 -4
- package/dist/es/components/wallets/BancomatPay/BancomatPay.js +9 -9
- package/dist/es/components/wallets/Bancontact/Bancontact.js +14 -14
- package/dist/es/components/wallets/Bizum/Bizum.js +9 -9
- package/dist/es/components/wallets/Blik/Blik.js +16 -16
- package/dist/es/components/wallets/Boost/Boost.js +10 -10
- package/dist/es/components/wallets/Doku/Doku.js +207 -0
- package/dist/es/components/wallets/Doku/doku2.js +1 -0
- package/dist/es/components/wallets/Doku/index.js +1 -0
- package/dist/es/components/wallets/Doku/type.js +1 -0
- package/dist/es/components/wallets/DragonPay/DragonPay.js +10 -10
- package/dist/es/components/wallets/EPS/EPS.js +20 -26
- package/dist/es/components/wallets/Fpx/Fpx.js +10 -10
- package/dist/es/components/wallets/GCash/GCash.js +13 -13
- package/dist/es/components/wallets/GoPay/GoPay.js +196 -0
- package/dist/es/components/wallets/GoPay/go-pay.js +1 -0
- package/dist/es/components/wallets/GoPay/index.js +1 -0
- package/dist/es/components/wallets/GoPay/type.js +1 -0
- package/dist/es/components/wallets/GrabPay/GrabPay.js +10 -10
- package/dist/es/components/wallets/IDeal/IDeal.js +18 -17
- package/dist/es/components/wallets/Jenius/Jenius.js +207 -0
- package/dist/es/components/wallets/Jenius/index.js +1 -0
- package/dist/es/components/wallets/Jenius/jenius2.js +1 -0
- package/dist/es/components/wallets/Jenius/type.js +1 -0
- package/dist/es/components/wallets/LinePay/LinePay.js +10 -10
- package/dist/es/components/wallets/LinkAja/LinkAja.js +207 -0
- package/dist/es/components/wallets/LinkAja/index.js +1 -0
- package/dist/es/components/wallets/LinkAja/link-aja.js +1 -0
- package/dist/es/components/wallets/LinkAja/type.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +10 -10
- package/dist/es/components/wallets/MbWay/MbWay.js +10 -10
- package/dist/es/components/wallets/Multibanco/Multibanco.js +10 -10
- package/dist/es/components/wallets/MyBank/MyBank.js +11 -11
- package/dist/es/components/wallets/NinePay/NinePay.js +10 -10
- package/dist/es/components/wallets/NuPay/NuPay.js +297 -0
- package/dist/es/components/wallets/NuPay/index.js +1 -0
- package/dist/es/components/wallets/NuPay/nu-pay.js +1 -0
- package/dist/es/components/wallets/NuPay/type.js +1 -0
- package/dist/es/components/wallets/OVO/OVO.js +19 -18
- package/dist/es/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.js +10 -10
- package/dist/es/components/wallets/OnlineBankingFinland/OnlineBankingFinland.js +10 -10
- package/dist/es/components/wallets/OnlineBankingIndonesia/OnlineBankingIndonesia.js +10 -10
- package/dist/es/components/wallets/OnlineBankingLatvia/OnlineBankingLatvia.js +10 -10
- package/dist/es/components/wallets/OnlineBankingLithuania/OnlineBankingLithuania.js +10 -10
- package/dist/es/components/wallets/OnlineBankingThailand/OnlineBankingThailand.js +10 -10
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +10 -10
- package/dist/es/components/wallets/P24/P24.js +14 -14
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +10 -10
- package/dist/es/components/wallets/PayByBank/PayByBank.js +15 -20
- package/dist/es/components/wallets/PayU/PayU.js +17 -20
- package/dist/es/components/wallets/Paymaya/Paymaya.js +10 -10
- package/dist/es/components/wallets/PicPay/PicPay.js +11 -11
- package/dist/es/components/wallets/Pix/Pix.js +11 -11
- package/dist/es/components/wallets/Satispay/Satispay.js +10 -10
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +9 -9
- package/dist/es/components/wallets/Skrill/Skrill.js +13 -13
- package/dist/es/components/wallets/Swish/Swish.js +180 -0
- package/dist/es/components/wallets/Swish/index.js +1 -0
- package/dist/es/components/wallets/Swish/swish2.js +1 -0
- package/dist/es/components/wallets/Swish/type.js +1 -0
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +9 -9
- package/dist/es/components/wallets/Trustly/Trustly.js +12 -12
- package/dist/es/components/wallets/Twint/Twint.js +196 -0
- package/dist/es/components/wallets/Twint/index.js +1 -0
- package/dist/es/components/wallets/Twint/twint2.js +1 -0
- package/dist/es/components/wallets/Twint/type.js +1 -0
- package/dist/es/components/wallets/Upi/Upi.js +10 -10
- package/dist/es/components/wallets/Vietqr/Vietqr.js +13 -13
- package/dist/es/components/wallets/WechatPay/WechatPay.js +13 -13
- package/dist/es/components/wallets/Zalopay/Zalopay.js +13 -13
- package/dist/es/components/wallets/index.js +7 -0
- package/dist/es/config.js +1 -0
- package/dist/es/constant.js +48 -4
- package/dist/es/core/address.js +1 -0
- package/dist/es/core/create.js +1 -0
- package/dist/es/core/index.js +1 -0
- package/dist/es/core/logger.js +27 -12
- package/dist/es/core/payment.js +1 -0
- package/dist/es/core/theme.js +1 -0
- package/dist/es/core.js +30 -30
- package/dist/es/hooks/index.js +1 -0
- package/dist/es/hooks/useBEM.js +1 -0
- package/dist/es/hooks/useBaseWallet.js +8 -2
- package/dist/es/hooks/useI18n.js +1 -0
- package/dist/es/hooks/usePayState.js +1 -0
- package/dist/es/i18n/I18n.js +1 -0
- package/dist/es/i18n/index.js +1 -0
- package/dist/es/i18n/locales/cs-CZ.js +146 -0
- package/dist/es/i18n/locales/da-DK.js +146 -0
- package/dist/es/i18n/locales/de-DE.js +13 -17
- package/dist/es/i18n/locales/en-GB.js +13 -17
- package/dist/es/i18n/locales/es-ES.js +13 -17
- package/dist/es/i18n/locales/fi-FI.js +146 -0
- package/dist/es/i18n/locales/fil-PH.js +146 -0
- package/dist/es/i18n/locales/fr-FR.js +13 -17
- package/dist/es/i18n/locales/hi-IN.js +146 -0
- package/dist/es/i18n/locales/id-ID.js +146 -0
- package/dist/es/i18n/locales/index.js +30 -3
- package/dist/es/i18n/locales/it-IT.js +146 -0
- package/dist/es/i18n/locales/ja-JP.js +13 -17
- package/dist/es/i18n/locales/ko-KR.js +13 -17
- package/dist/es/i18n/locales/ms-MY.js +146 -0
- package/dist/es/i18n/locales/nb-NO.js +146 -0
- package/dist/es/i18n/locales/nl-NL.js +13 -17
- package/dist/es/i18n/locales/pl-PL.js +146 -0
- package/dist/es/i18n/locales/pt-PT.js +13 -17
- package/dist/es/i18n/locales/ru-RU.js +13 -17
- package/dist/es/i18n/locales/sv-SE.js +146 -0
- package/dist/es/i18n/locales/th-TH.js +146 -0
- package/dist/es/i18n/locales/zh-CN.js +13 -17
- package/dist/es/i18n/locales/zh-HK.js +13 -17
- package/dist/es/i18n/locales/zh-TW.js +13 -17
- package/dist/es/i18n/util.js +12 -8
- package/dist/es/index.js +16 -1
- package/dist/es/out/base-fraud-detection.js +1 -0
- package/dist/es/out/config.js +2 -2
- package/dist/es/out/paykka-detection.js +1 -0
- package/dist/es/out/stripe-radar.js +2 -1
- package/dist/es/out/worldpay-ddc.js +1 -0
- package/dist/es/style.css +1 -1
- package/dist/es/utils/bem.js +1 -0
- package/dist/es/utils/card-brand/brands.js +1 -0
- package/dist/es/utils/index.js +1 -0
- package/dist/style.css +1 -1
- package/dist/types/api/modules/checkout/map.d.ts +7 -0
- package/dist/types/api/modules/checkout/type.d.ts +2 -1
- package/dist/types/components/ApplePay/hooks/useApplePay.d.ts +1 -0
- package/dist/types/components/ApplePay/type.d.ts +1 -0
- package/dist/types/components/DropIn/type.d.ts +1 -1
- package/dist/types/components/EmailField/type.d.ts +1 -1
- package/dist/types/components/IBANField/IBANField.d.ts +2 -0
- package/dist/types/components/{CardIBANField → IBANField}/type.d.ts +1 -1
- package/dist/types/components/Sepa/Sepa.d.ts +5 -0
- package/dist/types/components/Sepa/type.d.ts +4 -12
- package/dist/types/components/business/PaymentConfirmModal/PaymentConfirmModal.d.ts +6 -0
- package/dist/types/components/business/PaymentConfirmModal/index.d.ts +2 -0
- package/dist/types/components/business/{BlikConfirmModal → PaymentConfirmModal}/type.d.ts +1 -1
- package/dist/types/components/business/PhoneField/area-codes.d.ts +253 -0
- package/dist/types/components/business/PhoneField/index.d.ts +1 -0
- package/dist/types/components/business/PhoneField/type.d.ts +4 -0
- package/dist/types/components/business/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/internal/icons/IconDoku.d.ts +2 -0
- package/dist/types/components/internal/icons/IconGoPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconJenius.d.ts +2 -0
- package/dist/types/components/internal/icons/IconLinkAja.d.ts +2 -0
- package/dist/types/components/internal/icons/IconNuPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconSepa.d.ts +2 -0
- package/dist/types/components/internal/icons/IconSwish.d.ts +2 -0
- package/dist/types/components/internal/icons/IconTwint.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +8 -0
- package/dist/types/components/wallets/Doku/Doku.d.ts +15 -0
- package/dist/types/components/wallets/Doku/index.d.ts +2 -0
- package/dist/types/components/wallets/Doku/type.d.ts +7 -0
- package/dist/types/components/wallets/DragonPay/DragonPay.d.ts +1 -1
- package/dist/types/components/wallets/EPS/EPS.d.ts +1 -1
- package/dist/types/components/wallets/GoPay/GoPay.d.ts +16 -0
- package/dist/types/components/wallets/GoPay/index.d.ts +2 -0
- package/dist/types/components/wallets/GoPay/type.d.ts +7 -0
- package/dist/types/components/wallets/IDeal/IDeal.d.ts +1 -1
- package/dist/types/components/wallets/Jenius/Jenius.d.ts +15 -0
- package/dist/types/components/wallets/Jenius/index.d.ts +2 -0
- package/dist/types/components/wallets/Jenius/type.d.ts +7 -0
- package/dist/types/components/wallets/LinkAja/LinkAja.d.ts +15 -0
- package/dist/types/components/wallets/LinkAja/index.d.ts +2 -0
- package/dist/types/components/wallets/LinkAja/type.d.ts +7 -0
- package/dist/types/components/wallets/MyBank/MyBank.d.ts +1 -0
- package/dist/types/components/wallets/NuPay/NuPay.d.ts +15 -0
- package/dist/types/components/wallets/NuPay/index.d.ts +2 -0
- package/dist/types/components/wallets/NuPay/type.d.ts +7 -0
- package/dist/types/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.d.ts +1 -0
- package/dist/types/components/wallets/OnlineBankingFinland/OnlineBankingFinland.d.ts +1 -0
- package/dist/types/components/wallets/PayByBank/PayByBank.d.ts +1 -1
- package/dist/types/components/wallets/PayU/PayU.d.ts +2 -2
- package/dist/types/components/wallets/Swish/Swish.d.ts +15 -0
- package/dist/types/components/wallets/Swish/index.d.ts +2 -0
- package/dist/types/components/wallets/Swish/type.d.ts +7 -0
- package/dist/types/components/wallets/Twint/Twint.d.ts +16 -0
- package/dist/types/components/wallets/Twint/index.d.ts +2 -0
- package/dist/types/components/wallets/Twint/type.d.ts +7 -0
- package/dist/types/components/wallets/index.d.ts +7 -0
- package/dist/types/constant.d.ts +21 -7
- package/dist/types/core/logger.d.ts +1 -0
- package/dist/types/hooks/useBaseWallet.d.ts +6 -1
- package/dist/types/i18n/locales/cs-CZ.d.ts +128 -0
- package/dist/types/i18n/locales/da-DK.d.ts +128 -0
- package/dist/types/i18n/locales/de-DE.d.ts +12 -15
- package/dist/types/i18n/locales/en-GB.d.ts +12 -15
- package/dist/types/i18n/locales/es-ES.d.ts +12 -15
- package/dist/types/i18n/locales/fi-FI.d.ts +128 -0
- package/dist/types/i18n/locales/fil-PH.d.ts +128 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +12 -15
- package/dist/types/i18n/locales/hi-IN.d.ts +128 -0
- package/dist/types/i18n/locales/id-ID.d.ts +128 -0
- package/dist/types/i18n/locales/index.d.ts +24 -0
- package/dist/types/i18n/locales/it-IT.d.ts +128 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +12 -15
- package/dist/types/i18n/locales/ko-KR.d.ts +12 -15
- package/dist/types/i18n/locales/ms-MY.d.ts +128 -0
- package/dist/types/i18n/locales/nb-NO.d.ts +128 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +12 -15
- package/dist/types/i18n/locales/pl-PL.d.ts +128 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +12 -15
- package/dist/types/i18n/locales/ru-RU.d.ts +12 -15
- package/dist/types/i18n/locales/sv-SE.d.ts +128 -0
- package/dist/types/i18n/locales/th-TH.d.ts +128 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +12 -15
- package/dist/types/i18n/locales/zh-HK.d.ts +12 -15
- package/dist/types/i18n/locales/zh-TW.d.ts +12 -15
- package/dist/types/i18n/util.d.ts +1 -1
- package/dist/types/out/config.d.ts +4 -4
- package/package.json +1 -1
- package/dist/es/components/AccountNameField/index.js +0 -50
- package/dist/types/components/AccountNameField/AccountNameField.d.ts +0 -2
- package/dist/types/components/AccountNameField/index.d.ts +0 -2
- package/dist/types/components/AccountNameField/type.d.ts +0 -4
- package/dist/types/components/CardIBANField/IBANField.d.ts +0 -2
- package/dist/types/components/business/BlikConfirmModal/BlikConfirmModal.d.ts +0 -6
- package/dist/types/components/business/BlikConfirmModal/index.d.ts +0 -2
- /package/dist/es/components/business/{BlikConfirmModal/blik-confirm-modal.js → PaymentConfirmModal/payment-confirm-modal.js} +0 -0
- /package/dist/es/components/business/{BlikConfirmModal → PaymentConfirmModal}/type.js +0 -0
- /package/dist/es/components/business/Tooltip/{tooltip2.js → tooltip.js} +0 -0
- /package/dist/types/components/{CardIBANField → IBANField}/index.d.ts +0 -0
|
@@ -6,17 +6,24 @@ import "../../../utils/card-brand/brands.js";
|
|
|
6
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
7
7
|
import { trimAll, normalizedClass } from "../../../utils/format.js";
|
|
8
8
|
import "../../../core/context.js";
|
|
9
|
+
import "../../../core/logger.js";
|
|
9
10
|
import "../../internal/Form/type.js";
|
|
10
11
|
import { FormContext, FormItemContext } from "../../internal/Form/context.js";
|
|
11
12
|
import { FormItem } from "../../internal/Form/FormItem.js";
|
|
12
13
|
import "../../internal/Form/Form.js";
|
|
13
14
|
import { Select } from "../../internal/Select/Select.js";
|
|
14
15
|
import { SegmentedDigitInput } from "../SegmentedDigitInput/SegmentedDigitInput.js";
|
|
15
|
-
import {
|
|
16
|
+
import { areaCodes } from "./area-codes.js";
|
|
17
|
+
import { phoneConfigByAreaCode, formatPhoneDigits, phoneList } from "./config.js";
|
|
16
18
|
import "./phone-field.js";
|
|
17
|
-
const
|
|
19
|
+
const FALLBACK_MAX_DIGITS = 20;
|
|
20
|
+
const FALLBACK_DIGIT_GROUPS = [FALLBACK_MAX_DIGITS];
|
|
21
|
+
const allAreaCodeOptions = areaCodes.map((areaCode) => ({
|
|
22
|
+
label: areaCode,
|
|
23
|
+
value: areaCode
|
|
24
|
+
}));
|
|
18
25
|
const PhoneField = (props) => {
|
|
19
|
-
var _a;
|
|
26
|
+
var _a, _b;
|
|
20
27
|
const {
|
|
21
28
|
className,
|
|
22
29
|
style,
|
|
@@ -27,47 +34,53 @@ const PhoneField = (props) => {
|
|
|
27
34
|
invalidText,
|
|
28
35
|
areaCode,
|
|
29
36
|
areaCodeDisabled,
|
|
37
|
+
allAreaCodes = false,
|
|
38
|
+
validatePhoneNumber = true,
|
|
30
39
|
onValidationStatusChange
|
|
31
40
|
} = props;
|
|
32
41
|
const { i18n } = useI18n();
|
|
33
42
|
const { bem } = useBEM("phone-field");
|
|
34
43
|
const formContext = x(FormContext);
|
|
35
44
|
const [value, setValue] = h("");
|
|
45
|
+
const areaCodeOptions = allAreaCodes ? allAreaCodeOptions : phoneList;
|
|
46
|
+
const defaultAreaCode = String(((_a = areaCodeOptions[0]) == null ? void 0 : _a.value) ?? "");
|
|
36
47
|
const resolvedAreaCode = T(() => {
|
|
37
|
-
var _a2
|
|
48
|
+
var _a2;
|
|
38
49
|
const fromForm = (_a2 = formContext == null ? void 0 : formContext.form) == null ? void 0 : _a2.areaCode;
|
|
39
|
-
const raw = fromForm ?? areaCode ??
|
|
50
|
+
const raw = fromForm ?? areaCode ?? defaultAreaCode;
|
|
40
51
|
return String(raw);
|
|
41
|
-
}, [(
|
|
42
|
-
const
|
|
52
|
+
}, [(_b = formContext == null ? void 0 : formContext.form) == null ? void 0 : _b.areaCode, areaCode, defaultAreaCode]);
|
|
53
|
+
const phoneConfig = T(
|
|
43
54
|
() => phoneConfigByAreaCode(resolvedAreaCode),
|
|
44
55
|
[resolvedAreaCode]
|
|
45
56
|
);
|
|
46
|
-
const digitGroups = (
|
|
47
|
-
const maxDigits = (
|
|
57
|
+
const digitGroups = validatePhoneNumber ? (phoneConfig == null ? void 0 : phoneConfig.digitGroups) ?? FALLBACK_DIGIT_GROUPS : FALLBACK_DIGIT_GROUPS;
|
|
58
|
+
const maxDigits = validatePhoneNumber ? (phoneConfig == null ? void 0 : phoneConfig.maxDigits) ?? FALLBACK_MAX_DIGITS : FALLBACK_MAX_DIGITS;
|
|
48
59
|
y(() => {
|
|
49
|
-
var _a2
|
|
60
|
+
var _a2;
|
|
50
61
|
if (!formContext || areaCodeDisabled)
|
|
51
62
|
return;
|
|
52
|
-
const initial = areaCode ??
|
|
53
|
-
const current = (
|
|
63
|
+
const initial = areaCode ?? defaultAreaCode;
|
|
64
|
+
const current = (_a2 = formContext.form) == null ? void 0 : _a2.areaCode;
|
|
54
65
|
if (initial != null && initial !== "" && (current === void 0 || current === "")) {
|
|
55
66
|
formContext.setForm((prev) => ({ ...prev, areaCode: String(initial) }));
|
|
56
67
|
}
|
|
57
|
-
}, [formContext, areaCode, areaCodeDisabled]);
|
|
68
|
+
}, [formContext, areaCode, areaCodeDisabled, defaultAreaCode]);
|
|
58
69
|
y(() => {
|
|
59
70
|
setValue((v) => formatPhoneDigits(trimAll(v), digitGroups, maxDigits));
|
|
60
71
|
}, [resolvedAreaCode, digitGroups, maxDigits]);
|
|
61
72
|
const rule = {
|
|
62
73
|
trigger: ["blur", "submit"],
|
|
63
74
|
validator(val) {
|
|
64
|
-
var _a2
|
|
65
|
-
const code = ((_a2 = formContext == null ? void 0 : formContext.form) == null ? void 0 : _a2.areaCode) ?? areaCode ??
|
|
75
|
+
var _a2;
|
|
76
|
+
const code = ((_a2 = formContext == null ? void 0 : formContext.form) == null ? void 0 : _a2.areaCode) ?? areaCode ?? defaultAreaCode ?? "";
|
|
66
77
|
const cfg = phoneConfigByAreaCode(String(code));
|
|
67
78
|
const digits = trimAll(val ?? "");
|
|
68
79
|
if (!digits) {
|
|
69
80
|
throw new Error(incompleteText || i18n.get("form.phone.incomplete"));
|
|
70
81
|
}
|
|
82
|
+
if (!validatePhoneNumber)
|
|
83
|
+
return true;
|
|
71
84
|
if (!(cfg == null ? void 0 : cfg.regex.test(digits))) {
|
|
72
85
|
throw new Error(invalidText || i18n.get("form.phone.invalid"));
|
|
73
86
|
}
|
|
@@ -79,7 +92,7 @@ const PhoneField = (props) => {
|
|
|
79
92
|
setValue(event.currentTarget.value);
|
|
80
93
|
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, event);
|
|
81
94
|
};
|
|
82
|
-
const placeholderText = placeholder ?? (
|
|
95
|
+
const placeholderText = placeholder ?? (validatePhoneNumber ? phoneConfig == null ? void 0 : phoneConfig.placeholder : void 0) ?? i18n.get("form.phone.placeholder");
|
|
83
96
|
const areaCodeLocked = disabled || areaCodeDisabled;
|
|
84
97
|
return /* @__PURE__ */ u(
|
|
85
98
|
FormItem,
|
|
@@ -91,19 +104,31 @@ const PhoneField = (props) => {
|
|
|
91
104
|
style,
|
|
92
105
|
onValidationStatusChange,
|
|
93
106
|
children: /* @__PURE__ */ u("div", { className: bem("row"), children: [
|
|
94
|
-
/* @__PURE__ */ u(
|
|
95
|
-
|
|
107
|
+
/* @__PURE__ */ u(
|
|
108
|
+
"div",
|
|
96
109
|
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
className: normalizedClass(
|
|
111
|
+
bem("areaCode"),
|
|
112
|
+
areaCodeLocked ? bem("areaCode--disabled") : void 0
|
|
113
|
+
),
|
|
114
|
+
children: /* @__PURE__ */ u(FormItemContext.Provider, { value: null, children: /* @__PURE__ */ u(
|
|
115
|
+
Select,
|
|
116
|
+
{
|
|
117
|
+
value: resolvedAreaCode,
|
|
118
|
+
options: areaCodeOptions,
|
|
119
|
+
filterable: allAreaCodes,
|
|
120
|
+
inputClassName: bem("areaCode-input"),
|
|
121
|
+
disabled: areaCodeLocked,
|
|
122
|
+
onSelect: (v) => {
|
|
123
|
+
formContext == null ? void 0 : formContext.setForm((prev) => ({
|
|
124
|
+
...prev,
|
|
125
|
+
areaCode: String(v)
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
) })
|
|
105
130
|
}
|
|
106
|
-
)
|
|
131
|
+
),
|
|
107
132
|
/* @__PURE__ */ u("div", { className: bem("number"), children: /* @__PURE__ */ u(
|
|
108
133
|
SegmentedDigitInput,
|
|
109
134
|
{
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
const AREA_CODE_AF = "+93";
|
|
2
|
+
const AREA_CODE_AX = "+358";
|
|
3
|
+
const AREA_CODE_AL = "+355";
|
|
4
|
+
const AREA_CODE_DZ = "+213";
|
|
5
|
+
const AREA_CODE_AS = "+1684";
|
|
6
|
+
const AREA_CODE_AD = "+376";
|
|
7
|
+
const AREA_CODE_AO = "+244";
|
|
8
|
+
const AREA_CODE_AI = "+1264";
|
|
9
|
+
const AREA_CODE_AQ = "+672";
|
|
10
|
+
const AREA_CODE_AG = "+1268";
|
|
11
|
+
const AREA_CODE_AR = "+54";
|
|
12
|
+
const AREA_CODE_AM = "+374";
|
|
13
|
+
const AREA_CODE_AW = "+297";
|
|
14
|
+
const AREA_CODE_AU = "+61";
|
|
15
|
+
const AREA_CODE_AT = "+43";
|
|
16
|
+
const AREA_CODE_AZ = "+994";
|
|
17
|
+
const AREA_CODE_BS = "+1242";
|
|
18
|
+
const AREA_CODE_BH = "+973";
|
|
19
|
+
const AREA_CODE_BD = "+880";
|
|
20
|
+
const AREA_CODE_BB = "+1246";
|
|
21
|
+
const AREA_CODE_BY = "+375";
|
|
22
|
+
const AREA_CODE_BE = "+32";
|
|
23
|
+
const AREA_CODE_BZ = "+501";
|
|
24
|
+
const AREA_CODE_BJ = "+229";
|
|
25
|
+
const AREA_CODE_BM = "+1441";
|
|
26
|
+
const AREA_CODE_BT = "+975";
|
|
27
|
+
const AREA_CODE_BO = "+591";
|
|
28
|
+
const AREA_CODE_BA = "+387";
|
|
29
|
+
const AREA_CODE_BW = "+267";
|
|
30
|
+
const AREA_CODE_BV = "+47";
|
|
31
|
+
const AREA_CODE_BR = "+55";
|
|
32
|
+
const AREA_CODE_IO = "+246";
|
|
33
|
+
const AREA_CODE_VG = "+1284";
|
|
34
|
+
const AREA_CODE_BN = "+673";
|
|
35
|
+
const AREA_CODE_BG = "+359";
|
|
36
|
+
const AREA_CODE_BF = "+226";
|
|
37
|
+
const AREA_CODE_BI = "+257";
|
|
38
|
+
const AREA_CODE_KH = "+855";
|
|
39
|
+
const AREA_CODE_CM = "+237";
|
|
40
|
+
const AREA_CODE_CA = "+1";
|
|
41
|
+
const AREA_CODE_CV = "+238";
|
|
42
|
+
const AREA_CODE_BQ = "+599";
|
|
43
|
+
const AREA_CODE_KY = "+1345";
|
|
44
|
+
const AREA_CODE_CF = "+236";
|
|
45
|
+
const AREA_CODE_TD = "+235";
|
|
46
|
+
const AREA_CODE_CL = "+56";
|
|
47
|
+
const AREA_CODE_CN = "+86";
|
|
48
|
+
const AREA_CODE_CO = "+57";
|
|
49
|
+
const AREA_CODE_KM = "+269";
|
|
50
|
+
const AREA_CODE_CD = "+243";
|
|
51
|
+
const AREA_CODE_CG = "+242";
|
|
52
|
+
const AREA_CODE_CK = "+682";
|
|
53
|
+
const AREA_CODE_CR = "+506";
|
|
54
|
+
const AREA_CODE_CI = "+225";
|
|
55
|
+
const AREA_CODE_HR = "+385";
|
|
56
|
+
const AREA_CODE_CU = "+53";
|
|
57
|
+
const AREA_CODE_CY = "+357";
|
|
58
|
+
const AREA_CODE_CZ = "+420";
|
|
59
|
+
const AREA_CODE_DK = "+45";
|
|
60
|
+
const AREA_CODE_DJ = "+253";
|
|
61
|
+
const AREA_CODE_DM = "+1767";
|
|
62
|
+
const AREA_CODE_EC = "+593";
|
|
63
|
+
const AREA_CODE_EG = "+20";
|
|
64
|
+
const AREA_CODE_SV = "+503";
|
|
65
|
+
const AREA_CODE_GQ = "+240";
|
|
66
|
+
const AREA_CODE_ER = "+291";
|
|
67
|
+
const AREA_CODE_EE = "+372";
|
|
68
|
+
const AREA_CODE_ET = "+251";
|
|
69
|
+
const AREA_CODE_FK = "+500";
|
|
70
|
+
const AREA_CODE_FO = "+298";
|
|
71
|
+
const AREA_CODE_FJ = "+679";
|
|
72
|
+
const AREA_CODE_FR = "+33";
|
|
73
|
+
const AREA_CODE_GF = "+594";
|
|
74
|
+
const AREA_CODE_PF = "+689";
|
|
75
|
+
const AREA_CODE_TF = "+262";
|
|
76
|
+
const AREA_CODE_GA = "+241";
|
|
77
|
+
const AREA_CODE_GM = "+220";
|
|
78
|
+
const AREA_CODE_GE = "+995";
|
|
79
|
+
const AREA_CODE_DE = "+49";
|
|
80
|
+
const AREA_CODE_GH = "+233";
|
|
81
|
+
const AREA_CODE_GI = "+350";
|
|
82
|
+
const AREA_CODE_GR = "+30";
|
|
83
|
+
const AREA_CODE_GL = "+299";
|
|
84
|
+
const AREA_CODE_GD = "+1473";
|
|
85
|
+
const AREA_CODE_GP = "+590";
|
|
86
|
+
const AREA_CODE_GU = "+1671";
|
|
87
|
+
const AREA_CODE_GT = "+502";
|
|
88
|
+
const AREA_CODE_GG = "+44";
|
|
89
|
+
const AREA_CODE_GN = "+224";
|
|
90
|
+
const AREA_CODE_GW = "+245";
|
|
91
|
+
const AREA_CODE_GY = "+592";
|
|
92
|
+
const AREA_CODE_HT = "+509";
|
|
93
|
+
const AREA_CODE_HN = "+504";
|
|
94
|
+
const AREA_CODE_HK = "+852";
|
|
95
|
+
const AREA_CODE_HU = "+36";
|
|
96
|
+
const AREA_CODE_IS = "+354";
|
|
97
|
+
const AREA_CODE_IN = "+91";
|
|
98
|
+
const AREA_CODE_ID = "+62";
|
|
99
|
+
const AREA_CODE_IR = "+98";
|
|
100
|
+
const AREA_CODE_IQ = "+964";
|
|
101
|
+
const AREA_CODE_IE = "+353";
|
|
102
|
+
const AREA_CODE_IL = "+972";
|
|
103
|
+
const AREA_CODE_IT = "+39";
|
|
104
|
+
const AREA_CODE_JM = "+1876";
|
|
105
|
+
const AREA_CODE_JP = "+81";
|
|
106
|
+
const AREA_CODE_JO = "+962";
|
|
107
|
+
const AREA_CODE_KZ = "+7";
|
|
108
|
+
const AREA_CODE_KE = "+254";
|
|
109
|
+
const AREA_CODE_KI = "+686";
|
|
110
|
+
const AREA_CODE_XK = "+383";
|
|
111
|
+
const AREA_CODE_KW = "+965";
|
|
112
|
+
const AREA_CODE_KG = "+996";
|
|
113
|
+
const AREA_CODE_LA = "+856";
|
|
114
|
+
const AREA_CODE_LV = "+371";
|
|
115
|
+
const AREA_CODE_LB = "+961";
|
|
116
|
+
const AREA_CODE_LS = "+266";
|
|
117
|
+
const AREA_CODE_LR = "+231";
|
|
118
|
+
const AREA_CODE_LY = "+218";
|
|
119
|
+
const AREA_CODE_LI = "+423";
|
|
120
|
+
const AREA_CODE_LT = "+370";
|
|
121
|
+
const AREA_CODE_LU = "+352";
|
|
122
|
+
const AREA_CODE_MO = "+853";
|
|
123
|
+
const AREA_CODE_MK = "+389";
|
|
124
|
+
const AREA_CODE_MG = "+261";
|
|
125
|
+
const AREA_CODE_MW = "+265";
|
|
126
|
+
const AREA_CODE_MY = "+60";
|
|
127
|
+
const AREA_CODE_MV = "+960";
|
|
128
|
+
const AREA_CODE_ML = "+223";
|
|
129
|
+
const AREA_CODE_MT = "+356";
|
|
130
|
+
const AREA_CODE_MH = "+692";
|
|
131
|
+
const AREA_CODE_MQ = "+596";
|
|
132
|
+
const AREA_CODE_MR = "+222";
|
|
133
|
+
const AREA_CODE_MU = "+230";
|
|
134
|
+
const AREA_CODE_MX = "+52";
|
|
135
|
+
const AREA_CODE_FM = "+691";
|
|
136
|
+
const AREA_CODE_MD = "+373";
|
|
137
|
+
const AREA_CODE_MC = "+377";
|
|
138
|
+
const AREA_CODE_MN = "+976";
|
|
139
|
+
const AREA_CODE_ME = "+382";
|
|
140
|
+
const AREA_CODE_MS = "+1664";
|
|
141
|
+
const AREA_CODE_MA = "+212";
|
|
142
|
+
const AREA_CODE_MZ = "+258";
|
|
143
|
+
const AREA_CODE_MM = "+95";
|
|
144
|
+
const AREA_CODE_NA = "+264";
|
|
145
|
+
const AREA_CODE_NR = "+674";
|
|
146
|
+
const AREA_CODE_NP = "+977";
|
|
147
|
+
const AREA_CODE_NL = "+31";
|
|
148
|
+
const AREA_CODE_NC = "+687";
|
|
149
|
+
const AREA_CODE_NZ = "+64";
|
|
150
|
+
const AREA_CODE_NI = "+505";
|
|
151
|
+
const AREA_CODE_NE = "+227";
|
|
152
|
+
const AREA_CODE_NG = "+234";
|
|
153
|
+
const AREA_CODE_NU = "+683";
|
|
154
|
+
const AREA_CODE_KP = "+850";
|
|
155
|
+
const AREA_CODE_MP = "+1670";
|
|
156
|
+
const AREA_CODE_OM = "+968";
|
|
157
|
+
const AREA_CODE_PK = "+92";
|
|
158
|
+
const AREA_CODE_PW = "+680";
|
|
159
|
+
const AREA_CODE_PS = "+970";
|
|
160
|
+
const AREA_CODE_PA = "+507";
|
|
161
|
+
const AREA_CODE_PG = "+675";
|
|
162
|
+
const AREA_CODE_PY = "+595";
|
|
163
|
+
const AREA_CODE_PE = "+51";
|
|
164
|
+
const AREA_CODE_PH = "+63";
|
|
165
|
+
const AREA_CODE_PL = "+48";
|
|
166
|
+
const AREA_CODE_PT = "+351";
|
|
167
|
+
const AREA_CODE_QA = "+974";
|
|
168
|
+
const AREA_CODE_RO = "+40";
|
|
169
|
+
const AREA_CODE_RW = "+250";
|
|
170
|
+
const AREA_CODE_SH = "+290";
|
|
171
|
+
const AREA_CODE_KN = "+1869";
|
|
172
|
+
const AREA_CODE_LC = "+1758";
|
|
173
|
+
const AREA_CODE_PM = "+508";
|
|
174
|
+
const AREA_CODE_VC = "+1784";
|
|
175
|
+
const AREA_CODE_WS = "+685";
|
|
176
|
+
const AREA_CODE_SM = "+378";
|
|
177
|
+
const AREA_CODE_ST = "+239";
|
|
178
|
+
const AREA_CODE_SA = "+966";
|
|
179
|
+
const AREA_CODE_SN = "+221";
|
|
180
|
+
const AREA_CODE_RS = "+381";
|
|
181
|
+
const AREA_CODE_SC = "+248";
|
|
182
|
+
const AREA_CODE_SL = "+232";
|
|
183
|
+
const AREA_CODE_SG = "+65";
|
|
184
|
+
const AREA_CODE_SX = "+1721";
|
|
185
|
+
const AREA_CODE_SK = "+421";
|
|
186
|
+
const AREA_CODE_SI = "+386";
|
|
187
|
+
const AREA_CODE_SB = "+677";
|
|
188
|
+
const AREA_CODE_SO = "+252";
|
|
189
|
+
const AREA_CODE_ZA = "+27";
|
|
190
|
+
const AREA_CODE_KR = "+82";
|
|
191
|
+
const AREA_CODE_SS = "+211";
|
|
192
|
+
const AREA_CODE_ES = "+34";
|
|
193
|
+
const AREA_CODE_LK = "+94";
|
|
194
|
+
const AREA_CODE_SD = "+249";
|
|
195
|
+
const AREA_CODE_SR = "+597";
|
|
196
|
+
const AREA_CODE_SZ = "+268";
|
|
197
|
+
const AREA_CODE_SE = "+46";
|
|
198
|
+
const AREA_CODE_CH = "+41";
|
|
199
|
+
const AREA_CODE_SY = "+963";
|
|
200
|
+
const AREA_CODE_TW = "+886";
|
|
201
|
+
const AREA_CODE_TJ = "+992";
|
|
202
|
+
const AREA_CODE_TZ = "+255";
|
|
203
|
+
const AREA_CODE_TH = "+66";
|
|
204
|
+
const AREA_CODE_TL = "+670";
|
|
205
|
+
const AREA_CODE_TG = "+228";
|
|
206
|
+
const AREA_CODE_TK = "+690";
|
|
207
|
+
const AREA_CODE_TO = "+676";
|
|
208
|
+
const AREA_CODE_TT = "+1868";
|
|
209
|
+
const AREA_CODE_TN = "+216";
|
|
210
|
+
const AREA_CODE_TR = "+90";
|
|
211
|
+
const AREA_CODE_TM = "+993";
|
|
212
|
+
const AREA_CODE_TC = "+1649";
|
|
213
|
+
const AREA_CODE_TV = "+688";
|
|
214
|
+
const AREA_CODE_VI = "+1340";
|
|
215
|
+
const AREA_CODE_UG = "+256";
|
|
216
|
+
const AREA_CODE_UA = "+380";
|
|
217
|
+
const AREA_CODE_AE = "+971";
|
|
218
|
+
const AREA_CODE_UY = "+598";
|
|
219
|
+
const AREA_CODE_UZ = "+998";
|
|
220
|
+
const AREA_CODE_VU = "+678";
|
|
221
|
+
const AREA_CODE_VE = "+58";
|
|
222
|
+
const AREA_CODE_VN = "+84";
|
|
223
|
+
const AREA_CODE_WF = "+681";
|
|
224
|
+
const AREA_CODE_YE = "+967";
|
|
225
|
+
const AREA_CODE_ZM = "+260";
|
|
226
|
+
const AREA_CODE_ZW = "+263";
|
|
227
|
+
const areaCodes = [
|
|
228
|
+
AREA_CODE_AF,
|
|
229
|
+
AREA_CODE_AX,
|
|
230
|
+
AREA_CODE_AL,
|
|
231
|
+
AREA_CODE_DZ,
|
|
232
|
+
AREA_CODE_AS,
|
|
233
|
+
AREA_CODE_AD,
|
|
234
|
+
AREA_CODE_AO,
|
|
235
|
+
AREA_CODE_AI,
|
|
236
|
+
AREA_CODE_AQ,
|
|
237
|
+
AREA_CODE_AG,
|
|
238
|
+
AREA_CODE_AR,
|
|
239
|
+
AREA_CODE_AM,
|
|
240
|
+
AREA_CODE_AW,
|
|
241
|
+
AREA_CODE_AU,
|
|
242
|
+
AREA_CODE_AT,
|
|
243
|
+
AREA_CODE_AZ,
|
|
244
|
+
AREA_CODE_BS,
|
|
245
|
+
AREA_CODE_BH,
|
|
246
|
+
AREA_CODE_BD,
|
|
247
|
+
AREA_CODE_BB,
|
|
248
|
+
AREA_CODE_BY,
|
|
249
|
+
AREA_CODE_BE,
|
|
250
|
+
AREA_CODE_BZ,
|
|
251
|
+
AREA_CODE_BJ,
|
|
252
|
+
AREA_CODE_BM,
|
|
253
|
+
AREA_CODE_BT,
|
|
254
|
+
AREA_CODE_BO,
|
|
255
|
+
AREA_CODE_BA,
|
|
256
|
+
AREA_CODE_BW,
|
|
257
|
+
AREA_CODE_BV,
|
|
258
|
+
AREA_CODE_BR,
|
|
259
|
+
AREA_CODE_IO,
|
|
260
|
+
AREA_CODE_VG,
|
|
261
|
+
AREA_CODE_BN,
|
|
262
|
+
AREA_CODE_BG,
|
|
263
|
+
AREA_CODE_BF,
|
|
264
|
+
AREA_CODE_BI,
|
|
265
|
+
AREA_CODE_KH,
|
|
266
|
+
AREA_CODE_CM,
|
|
267
|
+
AREA_CODE_CA,
|
|
268
|
+
AREA_CODE_CV,
|
|
269
|
+
AREA_CODE_BQ,
|
|
270
|
+
AREA_CODE_KY,
|
|
271
|
+
AREA_CODE_CF,
|
|
272
|
+
AREA_CODE_TD,
|
|
273
|
+
AREA_CODE_CL,
|
|
274
|
+
AREA_CODE_CN,
|
|
275
|
+
AREA_CODE_CO,
|
|
276
|
+
AREA_CODE_KM,
|
|
277
|
+
AREA_CODE_CD,
|
|
278
|
+
AREA_CODE_CG,
|
|
279
|
+
AREA_CODE_CK,
|
|
280
|
+
AREA_CODE_CR,
|
|
281
|
+
AREA_CODE_CI,
|
|
282
|
+
AREA_CODE_HR,
|
|
283
|
+
AREA_CODE_CU,
|
|
284
|
+
AREA_CODE_CY,
|
|
285
|
+
AREA_CODE_CZ,
|
|
286
|
+
AREA_CODE_DK,
|
|
287
|
+
AREA_CODE_DJ,
|
|
288
|
+
AREA_CODE_DM,
|
|
289
|
+
AREA_CODE_EC,
|
|
290
|
+
AREA_CODE_EG,
|
|
291
|
+
AREA_CODE_SV,
|
|
292
|
+
AREA_CODE_GQ,
|
|
293
|
+
AREA_CODE_ER,
|
|
294
|
+
AREA_CODE_EE,
|
|
295
|
+
AREA_CODE_ET,
|
|
296
|
+
AREA_CODE_FK,
|
|
297
|
+
AREA_CODE_FO,
|
|
298
|
+
AREA_CODE_FJ,
|
|
299
|
+
AREA_CODE_FR,
|
|
300
|
+
AREA_CODE_GF,
|
|
301
|
+
AREA_CODE_PF,
|
|
302
|
+
AREA_CODE_TF,
|
|
303
|
+
AREA_CODE_GA,
|
|
304
|
+
AREA_CODE_GM,
|
|
305
|
+
AREA_CODE_GE,
|
|
306
|
+
AREA_CODE_DE,
|
|
307
|
+
AREA_CODE_GH,
|
|
308
|
+
AREA_CODE_GI,
|
|
309
|
+
AREA_CODE_GR,
|
|
310
|
+
AREA_CODE_GL,
|
|
311
|
+
AREA_CODE_GD,
|
|
312
|
+
AREA_CODE_GP,
|
|
313
|
+
AREA_CODE_GU,
|
|
314
|
+
AREA_CODE_GT,
|
|
315
|
+
AREA_CODE_GG,
|
|
316
|
+
AREA_CODE_GN,
|
|
317
|
+
AREA_CODE_GW,
|
|
318
|
+
AREA_CODE_GY,
|
|
319
|
+
AREA_CODE_HT,
|
|
320
|
+
AREA_CODE_HN,
|
|
321
|
+
AREA_CODE_HK,
|
|
322
|
+
AREA_CODE_HU,
|
|
323
|
+
AREA_CODE_IS,
|
|
324
|
+
AREA_CODE_IN,
|
|
325
|
+
AREA_CODE_ID,
|
|
326
|
+
AREA_CODE_IR,
|
|
327
|
+
AREA_CODE_IQ,
|
|
328
|
+
AREA_CODE_IE,
|
|
329
|
+
AREA_CODE_IL,
|
|
330
|
+
AREA_CODE_IT,
|
|
331
|
+
AREA_CODE_JM,
|
|
332
|
+
AREA_CODE_JP,
|
|
333
|
+
AREA_CODE_JO,
|
|
334
|
+
AREA_CODE_KZ,
|
|
335
|
+
AREA_CODE_KE,
|
|
336
|
+
AREA_CODE_KI,
|
|
337
|
+
AREA_CODE_XK,
|
|
338
|
+
AREA_CODE_KW,
|
|
339
|
+
AREA_CODE_KG,
|
|
340
|
+
AREA_CODE_LA,
|
|
341
|
+
AREA_CODE_LV,
|
|
342
|
+
AREA_CODE_LB,
|
|
343
|
+
AREA_CODE_LS,
|
|
344
|
+
AREA_CODE_LR,
|
|
345
|
+
AREA_CODE_LY,
|
|
346
|
+
AREA_CODE_LI,
|
|
347
|
+
AREA_CODE_LT,
|
|
348
|
+
AREA_CODE_LU,
|
|
349
|
+
AREA_CODE_MO,
|
|
350
|
+
AREA_CODE_MK,
|
|
351
|
+
AREA_CODE_MG,
|
|
352
|
+
AREA_CODE_MW,
|
|
353
|
+
AREA_CODE_MY,
|
|
354
|
+
AREA_CODE_MV,
|
|
355
|
+
AREA_CODE_ML,
|
|
356
|
+
AREA_CODE_MT,
|
|
357
|
+
AREA_CODE_MH,
|
|
358
|
+
AREA_CODE_MQ,
|
|
359
|
+
AREA_CODE_MR,
|
|
360
|
+
AREA_CODE_MU,
|
|
361
|
+
AREA_CODE_MX,
|
|
362
|
+
AREA_CODE_FM,
|
|
363
|
+
AREA_CODE_MD,
|
|
364
|
+
AREA_CODE_MC,
|
|
365
|
+
AREA_CODE_MN,
|
|
366
|
+
AREA_CODE_ME,
|
|
367
|
+
AREA_CODE_MS,
|
|
368
|
+
AREA_CODE_MA,
|
|
369
|
+
AREA_CODE_MZ,
|
|
370
|
+
AREA_CODE_MM,
|
|
371
|
+
AREA_CODE_NA,
|
|
372
|
+
AREA_CODE_NR,
|
|
373
|
+
AREA_CODE_NP,
|
|
374
|
+
AREA_CODE_NL,
|
|
375
|
+
AREA_CODE_NC,
|
|
376
|
+
AREA_CODE_NZ,
|
|
377
|
+
AREA_CODE_NI,
|
|
378
|
+
AREA_CODE_NE,
|
|
379
|
+
AREA_CODE_NG,
|
|
380
|
+
AREA_CODE_NU,
|
|
381
|
+
AREA_CODE_KP,
|
|
382
|
+
AREA_CODE_MP,
|
|
383
|
+
AREA_CODE_OM,
|
|
384
|
+
AREA_CODE_PK,
|
|
385
|
+
AREA_CODE_PW,
|
|
386
|
+
AREA_CODE_PS,
|
|
387
|
+
AREA_CODE_PA,
|
|
388
|
+
AREA_CODE_PG,
|
|
389
|
+
AREA_CODE_PY,
|
|
390
|
+
AREA_CODE_PE,
|
|
391
|
+
AREA_CODE_PH,
|
|
392
|
+
AREA_CODE_PL,
|
|
393
|
+
AREA_CODE_PT,
|
|
394
|
+
AREA_CODE_QA,
|
|
395
|
+
AREA_CODE_RO,
|
|
396
|
+
AREA_CODE_RW,
|
|
397
|
+
AREA_CODE_SH,
|
|
398
|
+
AREA_CODE_KN,
|
|
399
|
+
AREA_CODE_LC,
|
|
400
|
+
AREA_CODE_PM,
|
|
401
|
+
AREA_CODE_VC,
|
|
402
|
+
AREA_CODE_WS,
|
|
403
|
+
AREA_CODE_SM,
|
|
404
|
+
AREA_CODE_ST,
|
|
405
|
+
AREA_CODE_SA,
|
|
406
|
+
AREA_CODE_SN,
|
|
407
|
+
AREA_CODE_RS,
|
|
408
|
+
AREA_CODE_SC,
|
|
409
|
+
AREA_CODE_SL,
|
|
410
|
+
AREA_CODE_SG,
|
|
411
|
+
AREA_CODE_SX,
|
|
412
|
+
AREA_CODE_SK,
|
|
413
|
+
AREA_CODE_SI,
|
|
414
|
+
AREA_CODE_SB,
|
|
415
|
+
AREA_CODE_SO,
|
|
416
|
+
AREA_CODE_ZA,
|
|
417
|
+
AREA_CODE_KR,
|
|
418
|
+
AREA_CODE_SS,
|
|
419
|
+
AREA_CODE_ES,
|
|
420
|
+
AREA_CODE_LK,
|
|
421
|
+
AREA_CODE_SD,
|
|
422
|
+
AREA_CODE_SR,
|
|
423
|
+
AREA_CODE_SZ,
|
|
424
|
+
AREA_CODE_SE,
|
|
425
|
+
AREA_CODE_CH,
|
|
426
|
+
AREA_CODE_SY,
|
|
427
|
+
AREA_CODE_TW,
|
|
428
|
+
AREA_CODE_TJ,
|
|
429
|
+
AREA_CODE_TZ,
|
|
430
|
+
AREA_CODE_TH,
|
|
431
|
+
AREA_CODE_TL,
|
|
432
|
+
AREA_CODE_TG,
|
|
433
|
+
AREA_CODE_TK,
|
|
434
|
+
AREA_CODE_TO,
|
|
435
|
+
AREA_CODE_TT,
|
|
436
|
+
AREA_CODE_TN,
|
|
437
|
+
AREA_CODE_TR,
|
|
438
|
+
AREA_CODE_TM,
|
|
439
|
+
AREA_CODE_TC,
|
|
440
|
+
AREA_CODE_TV,
|
|
441
|
+
AREA_CODE_VI,
|
|
442
|
+
AREA_CODE_UG,
|
|
443
|
+
AREA_CODE_UA,
|
|
444
|
+
AREA_CODE_AE,
|
|
445
|
+
AREA_CODE_UY,
|
|
446
|
+
AREA_CODE_UZ,
|
|
447
|
+
AREA_CODE_VU,
|
|
448
|
+
AREA_CODE_VE,
|
|
449
|
+
AREA_CODE_VN,
|
|
450
|
+
AREA_CODE_WF,
|
|
451
|
+
AREA_CODE_YE,
|
|
452
|
+
AREA_CODE_ZM,
|
|
453
|
+
AREA_CODE_ZW
|
|
454
|
+
];
|
|
455
|
+
export {
|
|
456
|
+
AREA_CODE_ID,
|
|
457
|
+
areaCodes
|
|
458
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { formatDigitsByGroups } from "../SegmentedDigitInput/format.js";
|
|
2
|
+
import { AREA_CODE_ID } from "./area-codes.js";
|
|
2
3
|
const phoneType2ConfigMap = {
|
|
3
4
|
[
|
|
4
5
|
"IDN"
|
|
5
6
|
/* IDN */
|
|
6
7
|
]: {
|
|
7
|
-
areaCode:
|
|
8
|
+
areaCode: AREA_CODE_ID,
|
|
8
9
|
placeholder: "812 3456 7890",
|
|
9
10
|
regex: /^8[1-9]\d{7,11}$/,
|
|
10
11
|
digitGroups: [3, 4, 6],
|
|
@@ -3,6 +3,7 @@ import "../../../utils/card-brand/brands.js";
|
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
5
|
import "../../../out/fraud-detection.js";
|
|
6
|
+
import "../../../core/logger.js";
|
|
6
7
|
import "../../internal/Form/type.js";
|
|
7
8
|
import "../../internal/Form/context.js";
|
|
8
9
|
import "../../internal/Form/FormItem.js";
|
|
@@ -7,6 +7,7 @@ import "../../../utils/system-info/get-browser-info.js";
|
|
|
7
7
|
import { formatAmount } from "../../../utils/format.js";
|
|
8
8
|
import { formatTime } from "../../../utils/date.js";
|
|
9
9
|
import "../../../core/context.js";
|
|
10
|
+
import "../../../core/logger.js";
|
|
10
11
|
import { useBreakpoints } from "../../../hooks/useBreakpoints.js";
|
|
11
12
|
import { Modal } from "../../internal/Modal/Modal.js";
|
|
12
13
|
import "./qr-code-modal.js";
|
|
@@ -3,5 +3,6 @@ import "../../../utils/card-brand/brands.js";
|
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
5
|
import "../../../out/fraud-detection.js";
|
|
6
|
+
import "../../../core/logger.js";
|
|
6
7
|
import "../../internal/Modal/Modal.js";
|
|
7
8
|
import "./qr-code-modal.js";
|
|
@@ -4,6 +4,7 @@ import { limitedToNumber } from "../../../utils/format.js";
|
|
|
4
4
|
import "../../../core.js";
|
|
5
5
|
import "../../../core/context.js";
|
|
6
6
|
import "../../../out/fraud-detection.js";
|
|
7
|
+
import "../../../core/logger.js";
|
|
7
8
|
function formatDigitsByGroups(rawDigits, groups, maxDigits, separator = " ") {
|
|
8
9
|
const d = limitedToNumber(rawDigits).slice(0, maxDigits);
|
|
9
10
|
if (!d)
|
|
@@ -3,5 +3,6 @@ import "../../../utils/card-brand/brands.js";
|
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
5
|
import "../../../out/fraud-detection.js";
|
|
6
|
+
import "../../../core/logger.js";
|
|
6
7
|
import "../../internal/Input/Input.js";
|
|
7
8
|
import "../../internal/Input/type.js";
|
|
@@ -4,7 +4,8 @@ import "../../../core/context.js";
|
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
6
|
import "../../../out/fraud-detection.js";
|
|
7
|
-
import "
|
|
7
|
+
import "../../../core/logger.js";
|
|
8
|
+
import "./tooltip.js";
|
|
8
9
|
const Tooltip = (props) => {
|
|
9
10
|
const { content, children } = props;
|
|
10
11
|
const { bem } = useBEM("tooltip");
|
|
@@ -3,4 +3,5 @@ import "../../../utils/card-brand/brands.js";
|
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
5
|
import "../../../out/fraud-detection.js";
|
|
6
|
-
import "
|
|
6
|
+
import "../../../core/logger.js";
|
|
7
|
+
import "./tooltip.js";
|