@adyen/adyen-web 6.18.0 → 6.19.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.
Files changed (1425) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/adyen.css +6 -3
  3. package/dist/cjs/adyen.css.map +1 -1
  4. package/dist/cjs/index.cjs +2 -2
  5. package/dist/cjs/index.cjs.map +1 -1
  6. package/dist/cjs/index.d.cts +14 -3
  7. package/dist/es/adyen.css +6 -3
  8. package/dist/es/adyen.css.map +1 -1
  9. package/dist/es/components/ANCV/ANCV.js +1 -1
  10. package/dist/es/components/ANCV/ANCV.js.map +1 -1
  11. package/dist/es/components/ANCV/components/ANCVAwait/config.js.map +1 -1
  12. package/dist/es/components/ANCV/components/ANCVInput.js +1 -1
  13. package/dist/es/components/ANCV/components/ANCVInput.js.map +1 -1
  14. package/dist/es/components/Ach/Ach.js.map +1 -1
  15. package/dist/es/components/Ach/components/AccountTypeSelector.js +1 -1
  16. package/dist/es/components/Ach/components/AccountTypeSelector.js.map +1 -1
  17. package/dist/es/components/Ach/components/AchComponent.js +1 -1
  18. package/dist/es/components/Ach/components/AchComponent.js.map +1 -1
  19. package/dist/es/components/Ach/components/useSRPanelForACHErrors.js +1 -1
  20. package/dist/es/components/Ach/components/useSRPanelForACHErrors.js.map +1 -1
  21. package/dist/es/components/Ach/components/validate.js.map +1 -1
  22. package/dist/es/components/AfterPay/AfterPayB2B.js.map +1 -1
  23. package/dist/es/components/AmazonPay/AmazonPay.js +1 -1
  24. package/dist/es/components/AmazonPay/AmazonPay.js.map +1 -1
  25. package/dist/es/components/AmazonPay/components/AmazonPayButton.js +1 -1
  26. package/dist/es/components/AmazonPay/components/AmazonPayButton.js.map +1 -1
  27. package/dist/es/components/AmazonPay/components/AmazonPayComponent.js +1 -1
  28. package/dist/es/components/AmazonPay/components/AmazonPayComponent.js.map +1 -1
  29. package/dist/es/components/AmazonPay/components/ChangePaymentDetailsButton.js +1 -1
  30. package/dist/es/components/AmazonPay/components/ChangePaymentDetailsButton.js.map +1 -1
  31. package/dist/es/components/AmazonPay/components/OrderButton.js +1 -1
  32. package/dist/es/components/AmazonPay/components/OrderButton.js.map +1 -1
  33. package/dist/es/components/AmazonPay/components/SignOutButton.js +1 -1
  34. package/dist/es/components/AmazonPay/components/SignOutButton.js.map +1 -1
  35. package/dist/es/components/AmazonPay/defaultProps.js.map +1 -1
  36. package/dist/es/components/ApplePay/ApplePay.js +1 -1
  37. package/dist/es/components/ApplePay/ApplePay.js.map +1 -1
  38. package/dist/es/components/ApplePay/components/ApplePayButton.js.map +1 -1
  39. package/dist/es/components/ApplePay/services/ApplePayService.js +1 -1
  40. package/dist/es/components/ApplePay/services/ApplePayService.js.map +1 -1
  41. package/dist/es/components/ApplePay/utils/map-adyen-brands-to-applepay-brands.js +1 -1
  42. package/dist/es/components/ApplePay/utils/map-adyen-brands-to-applepay-brands.js.map +1 -1
  43. package/dist/es/components/ApplePay/utils/payment-request.js.map +1 -1
  44. package/dist/es/components/Atome/config.js +1 -1
  45. package/dist/es/components/Atome/config.js.map +1 -1
  46. package/dist/es/components/BacsDD/BacsDD.js +1 -1
  47. package/dist/es/components/BacsDD/BacsDD.js.map +1 -1
  48. package/dist/es/components/BacsDD/components/BacsInput.js +1 -1
  49. package/dist/es/components/BacsDD/components/BacsInput.js.map +1 -1
  50. package/dist/es/components/BankTransfer/BankTransfer.js +1 -1
  51. package/dist/es/components/BankTransfer/BankTransfer.js.map +1 -1
  52. package/dist/es/components/BankTransfer/components/BankTransferInput/BankTransferInput.js +1 -1
  53. package/dist/es/components/BankTransfer/components/BankTransferInput/BankTransferInput.js.map +1 -1
  54. package/dist/es/components/BankTransfer/components/BankTransferInput/validationRule.js +2 -0
  55. package/dist/es/components/BankTransfer/components/BankTransferInput/validationRule.js.map +1 -0
  56. package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferResult.js +1 -1
  57. package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferResult.js.map +1 -1
  58. package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferResultInstructions.js +2 -0
  59. package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferResultInstructions.js.map +1 -0
  60. package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferVoucher.js +2 -0
  61. package/dist/es/components/BankTransfer/components/BankTransferResult/BankTransferVoucher.js.map +1 -0
  62. package/dist/es/components/BcmcMobile/config.js.map +1 -1
  63. package/dist/es/components/Blik/Blik.js.map +1 -1
  64. package/dist/es/components/Blik/components/BlikInput.js +1 -1
  65. package/dist/es/components/Blik/components/BlikInput.js.map +1 -1
  66. package/dist/es/components/Blik/config.js.map +1 -1
  67. package/dist/es/components/Boleto/Boleto.js +1 -1
  68. package/dist/es/components/Boleto/Boleto.js.map +1 -1
  69. package/dist/es/components/Boleto/components/BoletoInput/BoletoInput.js +1 -1
  70. package/dist/es/components/Boleto/components/BoletoInput/BoletoInput.js.map +1 -1
  71. package/dist/es/components/Card/Bancontact.js +1 -1
  72. package/dist/es/components/Card/Bancontact.js.map +1 -1
  73. package/dist/es/components/Card/Card.js +1 -1
  74. package/dist/es/components/Card/Card.js.map +1 -1
  75. package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
  76. package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
  77. package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js +1 -1
  78. package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
  79. package/dist/es/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
  80. package/dist/es/components/Card/components/CardInput/components/CVC.js.map +1 -1
  81. package/dist/es/components/Card/components/CardInput/components/CardFields.js +1 -1
  82. package/dist/es/components/Card/components/CardInput/components/CardFields.js.map +1 -1
  83. package/dist/es/components/Card/components/CardInput/components/CardFieldsWrapper.js +1 -1
  84. package/dist/es/components/Card/components/CardInput/components/CardFieldsWrapper.js.map +1 -1
  85. package/dist/es/components/Card/components/CardInput/components/CardNumber.js +1 -1
  86. package/dist/es/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
  87. package/dist/es/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.js.map +1 -1
  88. package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
  89. package/dist/es/components/Card/components/CardInput/components/Installments/Installments.js +1 -1
  90. package/dist/es/components/Card/components/CardInput/components/Installments/Installments.js.map +1 -1
  91. package/dist/es/components/Card/components/CardInput/components/KCPAuthentication.js +1 -1
  92. package/dist/es/components/Card/components/CardInput/components/KCPAuthentication.js.map +1 -1
  93. package/dist/es/components/Card/components/CardInput/components/StoredCardFieldsWrapper.js.map +1 -1
  94. package/dist/es/components/Card/components/CardInput/defaultProps.js.map +1 -1
  95. package/dist/es/components/Card/components/CardInput/handlers.js +1 -1
  96. package/dist/es/components/Card/components/CardInput/handlers.js.map +1 -1
  97. package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.js +1 -1
  98. package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.js.map +1 -1
  99. package/dist/es/components/Card/components/CardInput/utils.js +1 -1
  100. package/dist/es/components/Card/components/CardInput/utils.js.map +1 -1
  101. package/dist/es/components/Card/components/CardInput/validate.js +1 -1
  102. package/dist/es/components/Card/components/CardInput/validate.js.map +1 -1
  103. package/dist/es/components/Card/components/ClickToPayHolder.js +1 -1
  104. package/dist/es/components/Card/components/ClickToPayHolder.js.map +1 -1
  105. package/dist/es/components/Card/components/ClickToPayWrapper.js.map +1 -1
  106. package/dist/es/components/Card/components/Fastlane/FastlaneSignup.js +1 -1
  107. package/dist/es/components/Card/components/Fastlane/FastlaneSignup.js.map +1 -1
  108. package/dist/es/components/Card/components/Fastlane/InfoButton.js +1 -1
  109. package/dist/es/components/Card/components/Fastlane/InfoButton.js.map +1 -1
  110. package/dist/es/components/Card/components/Fastlane/InfoModal.js +1 -1
  111. package/dist/es/components/Card/components/Fastlane/InfoModal.js.map +1 -1
  112. package/dist/es/components/Card/components/Fastlane/USOnlyPhoneInput.js +1 -1
  113. package/dist/es/components/Card/components/Fastlane/USOnlyPhoneInput.js.map +1 -1
  114. package/dist/es/components/Card/components/Fastlane/utils/validate-configuration.js +1 -1
  115. package/dist/es/components/Card/components/Fastlane/utils/validate-configuration.js.map +1 -1
  116. package/dist/es/components/CashAppPay/CashAppPay.js +1 -1
  117. package/dist/es/components/CashAppPay/CashAppPay.js.map +1 -1
  118. package/dist/es/components/CashAppPay/components/CashAppComponent.js +1 -1
  119. package/dist/es/components/CashAppPay/components/CashAppComponent.js.map +1 -1
  120. package/dist/es/components/CashAppPay/defaultProps.js.map +1 -1
  121. package/dist/es/components/CashAppPay/services/CashAppService.js.map +1 -1
  122. package/dist/es/components/ClickToPay/ClickToPay.js +1 -1
  123. package/dist/es/components/ClickToPay/ClickToPay.js.map +1 -1
  124. package/dist/es/components/CustomCard/CustomCard.js +1 -1
  125. package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
  126. package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
  127. package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
  128. package/dist/es/components/Doku/Doku.js.map +1 -1
  129. package/dist/es/components/Doku/components/DokuInput/DokuInput.js.map +1 -1
  130. package/dist/es/components/Donation/Donation.js +1 -1
  131. package/dist/es/components/Donation/Donation.js.map +1 -1
  132. package/dist/es/components/Donation/components/DonationComponent.js +1 -1
  133. package/dist/es/components/Donation/components/DonationComponent.js.map +1 -1
  134. package/dist/es/components/Donation/components/FixedAmounts.js +1 -1
  135. package/dist/es/components/Donation/components/FixedAmounts.js.map +1 -1
  136. package/dist/es/components/Dragonpay/Dragonpay.js +1 -1
  137. package/dist/es/components/Dragonpay/Dragonpay.js.map +1 -1
  138. package/dist/es/components/Dragonpay/components/DragonpayInput/DragonpayInput.js +1 -1
  139. package/dist/es/components/Dragonpay/components/DragonpayInput/DragonpayInput.js.map +1 -1
  140. package/dist/es/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.js.map +1 -1
  141. package/dist/es/components/Dropin/Dropin.js +1 -1
  142. package/dist/es/components/Dropin/Dropin.js.map +1 -1
  143. package/dist/es/components/Dropin/components/DropinComponent.js +1 -1
  144. package/dist/es/components/Dropin/components/DropinComponent.js.map +1 -1
  145. package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
  146. package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js +1 -1
  147. package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
  148. package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
  149. package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
  150. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js +1 -1
  151. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js.map +1 -1
  152. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
  153. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
  154. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
  155. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
  156. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodName.js.map +1 -1
  157. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
  158. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
  159. package/dist/es/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.js +1 -1
  160. package/dist/es/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.js.map +1 -1
  161. package/dist/es/components/Dropin/components/status/Error.js.map +1 -1
  162. package/dist/es/components/Dropin/components/status/Success.js.map +1 -1
  163. package/dist/es/components/Dropin/components/status/index.js.map +1 -1
  164. package/dist/es/components/Dropin/defaultProps.js.map +1 -1
  165. package/dist/es/components/Dropin/elements/createElements.js +1 -1
  166. package/dist/es/components/Dropin/elements/createElements.js.map +1 -1
  167. package/dist/es/components/Dropin/elements/filters.js +1 -1
  168. package/dist/es/components/Dropin/elements/filters.js.map +1 -1
  169. package/dist/es/components/Dropin/elements/getComponentConfiguration.js.map +1 -1
  170. package/dist/es/components/Dropin/elements/splitPaymentMethods.js +1 -1
  171. package/dist/es/components/Dropin/elements/splitPaymentMethods.js.map +1 -1
  172. package/dist/es/components/DuitNow/config.js.map +1 -1
  173. package/dist/es/components/Econtext/Econtext.js.map +1 -1
  174. package/dist/es/components/Econtext/components/EcontextInput/EcontextInput.js.map +1 -1
  175. package/dist/es/components/Giftcard/Giftcard.js +1 -1
  176. package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
  177. package/dist/es/components/Giftcard/components/GiftcardComponent.js +1 -1
  178. package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
  179. package/dist/es/components/Giftcard/components/GiftcardNumberField.js.map +1 -1
  180. package/dist/es/components/Giftcard/components/useSRPanelForGiftcardErrors.js +1 -1
  181. package/dist/es/components/Giftcard/components/useSRPanelForGiftcardErrors.js.map +1 -1
  182. package/dist/es/components/Giropay/Giropay.js.map +1 -1
  183. package/dist/es/components/GooglePay/GooglePay.js +1 -1
  184. package/dist/es/components/GooglePay/GooglePay.js.map +1 -1
  185. package/dist/es/components/GooglePay/GooglePayService.js +1 -1
  186. package/dist/es/components/GooglePay/GooglePayService.js.map +1 -1
  187. package/dist/es/components/GooglePay/components/GooglePayButton.js +1 -1
  188. package/dist/es/components/GooglePay/components/GooglePayButton.js.map +1 -1
  189. package/dist/es/components/GooglePay/config.js.map +1 -1
  190. package/dist/es/components/GooglePay/requests.js.map +1 -1
  191. package/dist/es/components/Klarna/KlarnaPayments.js +1 -1
  192. package/dist/es/components/Klarna/KlarnaPayments.js.map +1 -1
  193. package/dist/es/components/Klarna/components/KlarnaContainer/KlarnaContainer.js +1 -1
  194. package/dist/es/components/Klarna/components/KlarnaContainer/KlarnaContainer.js.map +1 -1
  195. package/dist/es/components/Klarna/components/KlarnaWidget/KlarnaWidget.js +1 -1
  196. package/dist/es/components/Klarna/components/KlarnaWidget/KlarnaWidget.js.map +1 -1
  197. package/dist/es/components/MBWay/MBWay.js.map +1 -1
  198. package/dist/es/components/MBWay/components/MBWayAwait/config.js.map +1 -1
  199. package/dist/es/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
  200. package/dist/es/components/MealVoucherFR/MealVoucherFR.js.map +1 -1
  201. package/dist/es/components/Multibanco/Multibanco.js +1 -1
  202. package/dist/es/components/Multibanco/Multibanco.js.map +1 -1
  203. package/dist/es/components/OnlineBankingPL/OnlineBankingPL.js.map +1 -1
  204. package/dist/es/components/Oxxo/Oxxo.js +1 -1
  205. package/dist/es/components/Oxxo/Oxxo.js.map +1 -1
  206. package/dist/es/components/PayByBank/PayByBank.js.map +1 -1
  207. package/dist/es/components/PayByBankPix/PayByBankPix.js +1 -1
  208. package/dist/es/components/PayByBankPix/PayByBankPix.js.map +1 -1
  209. package/dist/es/components/PayByBankPix/components/Enrollment/Enrollment.js +1 -1
  210. package/dist/es/components/PayByBankPix/components/Enrollment/Enrollment.js.map +1 -1
  211. package/dist/es/components/PayByBankPix/components/Enrollment/components/AwaitLogoContainer.js +1 -1
  212. package/dist/es/components/PayByBankPix/components/Enrollment/components/AwaitLogoContainer.js.map +1 -1
  213. package/dist/es/components/PayByBankPix/components/Enrollment/useIssuerWithLogo.js +1 -1
  214. package/dist/es/components/PayByBankPix/components/Enrollment/useIssuerWithLogo.js.map +1 -1
  215. package/dist/es/components/PayByBankPix/components/StoredPayment/StoredPayment.js +1 -1
  216. package/dist/es/components/PayByBankPix/components/StoredPayment/StoredPayment.js.map +1 -1
  217. package/dist/es/components/PayByBankPix/services/PasskeyService.js +1 -1
  218. package/dist/es/components/PayByBankPix/services/PasskeyService.js.map +1 -1
  219. package/dist/es/components/PayByBankUS/PayByBankUS.js +1 -1
  220. package/dist/es/components/PayByBankUS/PayByBankUS.js.map +1 -1
  221. package/dist/es/components/PayMe/components/PayMeIntroduction.js.map +1 -1
  222. package/dist/es/components/PayNow/components/PayNowInstructions.js.map +1 -1
  223. package/dist/es/components/PayNow/components/PayNowIntroduction.js.map +1 -1
  224. package/dist/es/components/PayNow/config.js.map +1 -1
  225. package/dist/es/components/PayPal/Paypal.js +1 -1
  226. package/dist/es/components/PayPal/Paypal.js.map +1 -1
  227. package/dist/es/components/PayPal/components/PaypalButtons.js +1 -1
  228. package/dist/es/components/PayPal/components/PaypalButtons.js.map +1 -1
  229. package/dist/es/components/PayPal/components/PaypalComponent.js +1 -1
  230. package/dist/es/components/PayPal/components/PaypalComponent.js.map +1 -1
  231. package/dist/es/components/PayPal/utils/format-paypal-order-contact-to-adyen-format.js.map +1 -1
  232. package/dist/es/components/PayPal/utils/get-paypal-locale.js.map +1 -1
  233. package/dist/es/components/PayPal/utils/get-paypal-settings.js.map +1 -1
  234. package/dist/es/components/PayPal/utils/get-paypal-styles.js +1 -1
  235. package/dist/es/components/PayPal/utils/get-paypal-styles.js.map +1 -1
  236. package/dist/es/components/PayPal/utils/get-paypal-url.js +1 -1
  237. package/dist/es/components/PayPal/utils/get-paypal-url.js.map +1 -1
  238. package/dist/es/components/PayPalFastlane/Fastlane.js +1 -1
  239. package/dist/es/components/PayPalFastlane/Fastlane.js.map +1 -1
  240. package/dist/es/components/PayPalFastlane/FastlaneSDK.js.map +1 -1
  241. package/dist/es/components/PayPalFastlane/components/FastlaneComponent.js +1 -1
  242. package/dist/es/components/PayPalFastlane/components/FastlaneComponent.js.map +1 -1
  243. package/dist/es/components/PayTo/PayTo.js.map +1 -1
  244. package/dist/es/components/PayTo/components/BSBInput.js +1 -1
  245. package/dist/es/components/PayTo/components/BSBInput.js.map +1 -1
  246. package/dist/es/components/PayTo/components/IdentifierSelector.js +1 -1
  247. package/dist/es/components/PayTo/components/IdentifierSelector.js.map +1 -1
  248. package/dist/es/components/PayTo/components/MandateSummary.js +1 -1
  249. package/dist/es/components/PayTo/components/MandateSummary.js.map +1 -1
  250. package/dist/es/components/PayTo/components/PayIDInput.js +1 -1
  251. package/dist/es/components/PayTo/components/PayIDInput.js.map +1 -1
  252. package/dist/es/components/PayTo/components/PayToComponent.js +1 -1
  253. package/dist/es/components/PayTo/components/PayToComponent.js.map +1 -1
  254. package/dist/es/components/PayTo/components/PayToPhone.js +1 -1
  255. package/dist/es/components/PayTo/components/PayToPhone.js.map +1 -1
  256. package/dist/es/components/Pix/Pix.js.map +1 -1
  257. package/dist/es/components/Pix/PixInput/PixInput.js +1 -1
  258. package/dist/es/components/Pix/PixInput/PixInput.js.map +1 -1
  259. package/dist/es/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
  260. package/dist/es/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js +1 -1
  261. package/dist/es/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js.map +1 -1
  262. package/dist/es/components/PreAuthorizedDebitCanada/components/SettlementInfo.js.map +1 -1
  263. package/dist/es/components/PromptPay/config.js.map +1 -1
  264. package/dist/es/components/Redirect/Redirect.js +1 -1
  265. package/dist/es/components/Redirect/Redirect.js.map +1 -1
  266. package/dist/es/components/Redirect/components/RedirectShopper/RedirectShopper.js +1 -1
  267. package/dist/es/components/Redirect/components/RedirectShopper/RedirectShopper.js.map +1 -1
  268. package/dist/es/components/Sepa/Sepa.js.map +1 -1
  269. package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
  270. package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  271. package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
  272. package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  273. package/dist/es/components/ThreeDS2/callSubmit3DS2Fingerprint.js +1 -1
  274. package/dist/es/components/ThreeDS2/callSubmit3DS2Fingerprint.js.map +1 -1
  275. package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js +1 -1
  276. package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
  277. package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
  278. package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
  279. package/dist/es/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js +1 -1
  280. package/dist/es/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js.map +1 -1
  281. package/dist/es/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js +1 -1
  282. package/dist/es/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
  283. package/dist/es/components/ThreeDS2/components/Form/ThreeDS2Form.js.map +1 -1
  284. package/dist/es/components/ThreeDS2/components/utils.js.map +1 -1
  285. package/dist/es/components/Trustly/Trustly.js.map +1 -1
  286. package/dist/es/components/Twint/Twint.js +1 -1
  287. package/dist/es/components/Twint/Twint.js.map +1 -1
  288. package/dist/es/components/UPI/UPI.js +1 -1
  289. package/dist/es/components/UPI/UPI.js.map +1 -1
  290. package/dist/es/components/UPI/components/UPIComponent/UPIComponent.js +1 -1
  291. package/dist/es/components/UPI/components/UPIComponent/UPIComponent.js.map +1 -1
  292. package/dist/es/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.js +1 -1
  293. package/dist/es/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.js.map +1 -1
  294. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js.map +1 -1
  295. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js +1 -1
  296. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js.map +1 -1
  297. package/dist/es/components/UPI/components/VpaInput/VpaInput.js +1 -1
  298. package/dist/es/components/UPI/components/VpaInput/VpaInput.js.map +1 -1
  299. package/dist/es/components/WeChat/config.js.map +1 -1
  300. package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
  301. package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
  302. package/dist/es/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
  303. package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
  304. package/dist/es/components/internal/Address/Address.js +1 -1
  305. package/dist/es/components/internal/Address/Address.js.map +1 -1
  306. package/dist/es/components/internal/Address/Specifications.js +1 -1
  307. package/dist/es/components/internal/Address/Specifications.js.map +1 -1
  308. package/dist/es/components/internal/Address/components/AddressSearch.js +1 -1
  309. package/dist/es/components/internal/Address/components/AddressSearch.js.map +1 -1
  310. package/dist/es/components/internal/Address/components/CountryField.js +1 -1
  311. package/dist/es/components/internal/Address/components/CountryField.js.map +1 -1
  312. package/dist/es/components/internal/Address/components/ReadOnlyAddress.js.map +1 -1
  313. package/dist/es/components/internal/Address/components/StateField.js +1 -1
  314. package/dist/es/components/internal/Address/components/StateField.js.map +1 -1
  315. package/dist/es/components/internal/Address/validate.formats.js.map +1 -1
  316. package/dist/es/components/internal/Address/validate.js.map +1 -1
  317. package/dist/es/components/internal/Await/Await.js +1 -1
  318. package/dist/es/components/internal/Await/Await.js.map +1 -1
  319. package/dist/es/components/internal/BaseElement/BaseElement.js +1 -1
  320. package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
  321. package/dist/es/components/internal/Button/Button.js +1 -1
  322. package/dist/es/components/internal/Button/Button.js.map +1 -1
  323. package/dist/es/components/internal/Button/CopyIconButton.js +2 -0
  324. package/dist/es/components/internal/Button/CopyIconButton.js.map +1 -0
  325. package/dist/es/components/internal/ButtonGroup/ButtonGroup.js +1 -1
  326. package/dist/es/components/internal/ButtonGroup/ButtonGroup.js.map +1 -1
  327. package/dist/es/components/internal/ClickToPay/ClickToPayComponent.js +1 -1
  328. package/dist/es/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
  329. package/dist/es/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js +1 -1
  330. package/dist/es/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js.map +1 -1
  331. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js +1 -1
  332. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
  333. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js +1 -1
  334. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js.map +1 -1
  335. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js.map +1 -1
  336. package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js +1 -1
  337. package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js.map +1 -1
  338. package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.js +1 -1
  339. package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.js.map +1 -1
  340. package/dist/es/components/internal/ClickToPay/components/CtPLoader/CtPLoader.js.map +1 -1
  341. package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js +1 -1
  342. package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js.map +1 -1
  343. package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
  344. package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
  345. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js +1 -1
  346. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js.map +1 -1
  347. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
  348. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
  349. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
  350. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
  351. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js +1 -1
  352. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js.map +1 -1
  353. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js +1 -1
  354. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js.map +1 -1
  355. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
  356. package/dist/es/components/internal/ClickToPay/context/ClickToPayProvider.js +1 -1
  357. package/dist/es/components/internal/ClickToPay/context/ClickToPayProvider.js.map +1 -1
  358. package/dist/es/components/internal/ClickToPay/errors/TimeoutError.js.map +1 -1
  359. package/dist/es/components/internal/ClickToPay/models/ShopperCard.js.map +1 -1
  360. package/dist/es/components/internal/ClickToPay/services/ClickToPayService.js +1 -1
  361. package/dist/es/components/internal/ClickToPay/services/ClickToPayService.js.map +1 -1
  362. package/dist/es/components/internal/ClickToPay/services/create-clicktopay-service.js.map +1 -1
  363. package/dist/es/components/internal/ClickToPay/services/execute-with-timeout.js +1 -1
  364. package/dist/es/components/internal/ClickToPay/services/execute-with-timeout.js.map +1 -1
  365. package/dist/es/components/internal/ClickToPay/services/sdks/MastercardSdk.js.map +1 -1
  366. package/dist/es/components/internal/ClickToPay/services/sdks/SrcSdkLoader.js +1 -1
  367. package/dist/es/components/internal/ClickToPay/services/sdks/SrcSdkLoader.js.map +1 -1
  368. package/dist/es/components/internal/ClickToPay/services/sdks/SrciError.js.map +1 -1
  369. package/dist/es/components/internal/ClickToPay/services/sdks/VisaSdk.js.map +1 -1
  370. package/dist/es/components/internal/ClickToPay/services/sdks/config.js.map +1 -1
  371. package/dist/es/components/internal/ClickToPay/services/utils.js +1 -1
  372. package/dist/es/components/internal/ClickToPay/services/utils.js.map +1 -1
  373. package/dist/es/components/internal/CompanyDetails/CompanyDetails.js +1 -1
  374. package/dist/es/components/internal/CompanyDetails/CompanyDetails.js.map +1 -1
  375. package/dist/es/components/internal/CompanyDetails/ReadOnlyCompanyDetails.js.map +1 -1
  376. package/dist/es/components/internal/CompanyDetails/utils.js.map +1 -1
  377. package/dist/es/components/internal/ConsentCheckboxLabel/ConsentCheckboxLabel.js.map +1 -1
  378. package/dist/es/components/internal/Countdown/CountdownA11yReporter.js +1 -1
  379. package/dist/es/components/internal/Countdown/CountdownA11yReporter.js.map +1 -1
  380. package/dist/es/components/internal/Countdown/index.js +1 -1
  381. package/dist/es/components/internal/Countdown/index.js.map +1 -1
  382. package/dist/es/components/internal/Countdown/useCountdownA11yReporter.js +1 -1
  383. package/dist/es/components/internal/Countdown/useCountdownA11yReporter.js.map +1 -1
  384. package/dist/es/components/internal/Countdown/utils.js.map +1 -1
  385. package/dist/es/components/internal/DetailsTable/DetailsTable.js +1 -1
  386. package/dist/es/components/internal/DetailsTable/DetailsTable.js.map +1 -1
  387. package/dist/es/components/internal/DisclaimerMessage/DisclaimerMessage.js +1 -1
  388. package/dist/es/components/internal/DisclaimerMessage/DisclaimerMessage.js.map +1 -1
  389. package/dist/es/components/internal/ExpandButton/ExpandButton.js +1 -1
  390. package/dist/es/components/internal/ExpandButton/ExpandButton.js.map +1 -1
  391. package/dist/es/components/internal/FormFields/Checkbox/Checkbox.js +1 -1
  392. package/dist/es/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
  393. package/dist/es/components/internal/FormFields/Field/Field.js +1 -1
  394. package/dist/es/components/internal/FormFields/Field/Field.js.map +1 -1
  395. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  396. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  397. package/dist/es/components/internal/FormFields/InputBase.js +1 -1
  398. package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
  399. package/dist/es/components/internal/FormFields/InputDate/InputDate.js.map +1 -1
  400. package/dist/es/components/internal/FormFields/InputDate/utils.js.map +1 -1
  401. package/dist/es/components/internal/FormFields/RadioGroup/RadioGroup.js +1 -1
  402. package/dist/es/components/internal/FormFields/RadioGroup/RadioGroup.js.map +1 -1
  403. package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioButtonIcon.js.map +1 -1
  404. package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js +1 -1
  405. package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js.map +1 -1
  406. package/dist/es/components/internal/FormFields/Select/Select.js +1 -1
  407. package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
  408. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  409. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  410. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +1 -1
  411. package/dist/es/components/internal/FormFields/Select/components/SelectList.js.map +1 -1
  412. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
  413. package/dist/es/components/internal/FormFields/utils.js.map +1 -1
  414. package/dist/es/components/internal/FormInstruction/FormInstruction.js.map +1 -1
  415. package/dist/es/components/internal/IFrame/Iframe.js +1 -1
  416. package/dist/es/components/internal/IFrame/Iframe.js.map +1 -1
  417. package/dist/es/components/internal/IbanInput/IbanInput.js +1 -1
  418. package/dist/es/components/internal/IbanInput/IbanInput.js.map +1 -1
  419. package/dist/es/components/internal/IbanInput/utils.js +1 -1
  420. package/dist/es/components/internal/IbanInput/utils.js.map +1 -1
  421. package/dist/es/components/internal/IbanInput/validate.js.map +1 -1
  422. package/dist/es/components/internal/Img/Img.js +1 -1
  423. package/dist/es/components/internal/Img/Img.js.map +1 -1
  424. package/dist/es/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js +1 -1
  425. package/dist/es/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js.map +1 -1
  426. package/dist/es/components/internal/IssuerList/IssuerList.js +1 -1
  427. package/dist/es/components/internal/IssuerList/IssuerList.js.map +1 -1
  428. package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
  429. package/dist/es/components/internal/Modal/Modal.js +1 -1
  430. package/dist/es/components/internal/Modal/Modal.js.map +1 -1
  431. package/dist/es/components/internal/Modal/useModal.js +1 -1
  432. package/dist/es/components/internal/Modal/useModal.js.map +1 -1
  433. package/dist/es/components/internal/Modal/useTrapFocus.js +1 -1
  434. package/dist/es/components/internal/Modal/useTrapFocus.js.map +1 -1
  435. package/dist/es/components/internal/OpenInvoice/OpenInvoice.js +1 -1
  436. package/dist/es/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
  437. package/dist/es/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js +1 -1
  438. package/dist/es/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js.map +1 -1
  439. package/dist/es/components/internal/OpenInvoice/utils.js +1 -1
  440. package/dist/es/components/internal/OpenInvoice/utils.js.map +1 -1
  441. package/dist/es/components/internal/PayButton/utils.js.map +1 -1
  442. package/dist/es/components/internal/PersonalDetails/PersonalDetails.js +1 -1
  443. package/dist/es/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
  444. package/dist/es/components/internal/PersonalDetails/ReadOnlyPersonalDetails.js.map +1 -1
  445. package/dist/es/components/internal/PersonalDetails/utils.js.map +1 -1
  446. package/dist/es/components/internal/PhoneInput/PhoneInputFields.js +1 -1
  447. package/dist/es/components/internal/PhoneInput/PhoneInputFields.js.map +1 -1
  448. package/dist/es/components/internal/PhoneInput/PhoneInputForm.js +1 -1
  449. package/dist/es/components/internal/PhoneInput/PhoneInputForm.js.map +1 -1
  450. package/dist/es/components/internal/PhoneInput/usePhonePrefixes.js +1 -1
  451. package/dist/es/components/internal/PhoneInput/usePhonePrefixes.js.map +1 -1
  452. package/dist/es/components/internal/PhoneInput/validate.js.map +1 -1
  453. package/dist/es/components/internal/QRLoader/QRLoader.js +1 -1
  454. package/dist/es/components/internal/QRLoader/QRLoader.js.map +1 -1
  455. package/dist/es/components/internal/RedirectButton/RedirectButton.js.map +1 -1
  456. package/dist/es/components/internal/SecuredFields/SFP/SFPUtils.js +1 -1
  457. package/dist/es/components/internal/SecuredFields/SFP/SFPUtils.js.map +1 -1
  458. package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
  459. package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
  460. package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
  461. package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
  462. package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
  463. package/dist/es/components/internal/SecuredFields/binLookup/extensions.js +1 -1
  464. package/dist/es/components/internal/SecuredFields/binLookup/extensions.js.map +1 -1
  465. package/dist/es/components/internal/SecuredFields/binLookup/triggerBinLookUp.js +1 -1
  466. package/dist/es/components/internal/SecuredFields/binLookup/triggerBinLookUp.js.map +1 -1
  467. package/dist/es/components/internal/SecuredFields/lib/CSF/AbstractCSF.js.map +1 -1
  468. package/dist/es/components/internal/SecuredFields/lib/CSF/CSF.js.map +1 -1
  469. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
  470. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
  471. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.js +1 -1
  472. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.js.map +1 -1
  473. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/handleConfig.js.map +1 -1
  474. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/handleIOSTouchEvents.js +1 -1
  475. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/handleIOSTouchEvents.js.map +1 -1
  476. package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/handleTab.js.map +1 -1
  477. package/dist/es/components/internal/SecuredFields/lib/CSF/initCSF.js.map +1 -1
  478. package/dist/es/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.js +1 -1
  479. package/dist/es/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.js.map +1 -1
  480. package/dist/es/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.js +1 -1
  481. package/dist/es/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.js.map +1 -1
  482. package/dist/es/components/internal/SecuredFields/lib/CSF/partials/validateForm.js.map +1 -1
  483. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/callbackUtils.js.map +1 -1
  484. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/cardType.js +1 -1
  485. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/cardType.js.map +1 -1
  486. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/destroySecuredFields.js +1 -1
  487. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/destroySecuredFields.js.map +1 -1
  488. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageToIframe.js.map +1 -1
  489. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageValidation.js.map +1 -1
  490. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/processErrors.js.map +1 -1
  491. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.js +1 -1
  492. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.js.map +1 -1
  493. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/userAgent.js.map +1 -1
  494. package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
  495. package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
  496. package/dist/es/components/internal/SecuredFields/lib/utilities/addContextTranslations.js.map +1 -1
  497. package/dist/es/components/internal/SecuredFields/lib/utilities/commonUtils.js +1 -1
  498. package/dist/es/components/internal/SecuredFields/lib/utilities/commonUtils.js.map +1 -1
  499. package/dist/es/components/internal/SecuredFields/lib/utilities/dom.js.map +1 -1
  500. package/dist/es/components/internal/SecuredFields/lib/utilities/logger.js.map +1 -1
  501. package/dist/es/components/internal/SecuredFields/utils.js.map +1 -1
  502. package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +1 -1
  503. package/dist/es/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
  504. package/dist/es/components/internal/SendCopyToEmail/SendCopyToEmail.js.map +1 -1
  505. package/dist/es/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.js.map +1 -1
  506. package/dist/es/components/internal/SocialSecurityNumberBrazil/utils.js +1 -1
  507. package/dist/es/components/internal/SocialSecurityNumberBrazil/utils.js.map +1 -1
  508. package/dist/es/components/internal/SocialSecurityNumberBrazil/validate.js.map +1 -1
  509. package/dist/es/components/internal/StoreDetails/StoreDetails.js +1 -1
  510. package/dist/es/components/internal/StoreDetails/StoreDetails.js.map +1 -1
  511. package/dist/es/components/internal/Timeline/Timeline.js +1 -1
  512. package/dist/es/components/internal/Timeline/Timeline.js.map +1 -1
  513. package/dist/es/components/internal/Toggle/Toggle.js +1 -1
  514. package/dist/es/components/internal/Toggle/Toggle.js.map +1 -1
  515. package/dist/es/components/internal/Tooltip/SingletonTooltipProvider.js +2 -0
  516. package/dist/es/components/internal/Tooltip/SingletonTooltipProvider.js.map +1 -0
  517. package/dist/es/components/internal/Tooltip/Tooltip.js +2 -0
  518. package/dist/es/components/internal/Tooltip/Tooltip.js.map +1 -0
  519. package/dist/es/components/internal/Tooltip/TooltipController.js +2 -0
  520. package/dist/es/components/internal/Tooltip/TooltipController.js.map +1 -0
  521. package/dist/es/components/internal/UIElement/UIElement.js +1 -1
  522. package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
  523. package/dist/es/components/internal/UIElement/utils.js +1 -1
  524. package/dist/es/components/internal/UIElement/utils.js.map +1 -1
  525. package/dist/es/components/internal/Voucher/Voucher.js.map +1 -1
  526. package/dist/es/components/internal/Voucher/utils.js.map +1 -1
  527. package/dist/es/core/AdyenCheckout.js.map +1 -1
  528. package/dist/es/core/Analytics/Analytics.js +1 -1
  529. package/dist/es/core/Analytics/Analytics.js.map +1 -1
  530. package/dist/es/core/Analytics/AnalyticsErrorEvent.js.map +1 -1
  531. package/dist/es/core/Analytics/AnalyticsEvent.js.map +1 -1
  532. package/dist/es/core/Analytics/AnalyticsInfoEvent.js.map +1 -1
  533. package/dist/es/core/Analytics/AnalyticsLogEvent.js.map +1 -1
  534. package/dist/es/core/Analytics/EventsQueue.js +1 -1
  535. package/dist/es/core/Analytics/EventsQueue.js.map +1 -1
  536. package/dist/es/core/Analytics/constants.js.map +1 -1
  537. package/dist/es/core/Analytics/utils.js +1 -1
  538. package/dist/es/core/Analytics/utils.js.map +1 -1
  539. package/dist/es/core/CheckoutSession/CheckoutSession.js +1 -1
  540. package/dist/es/core/CheckoutSession/CheckoutSession.js.map +1 -1
  541. package/dist/es/core/CheckoutSession/utils.js.map +1 -1
  542. package/dist/es/core/Context/CoreProvider.js +1 -1
  543. package/dist/es/core/Context/CoreProvider.js.map +1 -1
  544. package/dist/es/core/Context/Resources.js +1 -1
  545. package/dist/es/core/Context/Resources.js.map +1 -1
  546. package/dist/es/core/Context/useImage.js +1 -1
  547. package/dist/es/core/Context/useImage.js.map +1 -1
  548. package/dist/es/core/Environment/Environment.js.map +1 -1
  549. package/dist/es/core/Errors/AdyenCheckoutError.js.map +1 -1
  550. package/dist/es/core/Errors/CancelError.js.map +1 -1
  551. package/dist/es/core/Errors/SRMessages.js +1 -1
  552. package/dist/es/core/Errors/SRMessages.js.map +1 -1
  553. package/dist/es/core/Errors/SRPanel.js +1 -1
  554. package/dist/es/core/Errors/SRPanel.js.map +1 -1
  555. package/dist/es/core/Errors/SRPanelProvider.js.map +1 -1
  556. package/dist/es/core/Errors/useA11yReporter.js +1 -1
  557. package/dist/es/core/Errors/useA11yReporter.js.map +1 -1
  558. package/dist/es/core/Errors/utils.js +1 -1
  559. package/dist/es/core/Errors/utils.js.map +1 -1
  560. package/dist/es/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
  561. package/dist/es/core/ProcessResponse/PaymentMethods/PaymentMethods.js +1 -1
  562. package/dist/es/core/ProcessResponse/PaymentMethods/PaymentMethods.js.map +1 -1
  563. package/dist/es/core/ProcessResponse/PaymentMethods/filters.js.map +1 -1
  564. package/dist/es/core/ProcessResponse/PaymentMethods/utils.js.map +1 -1
  565. package/dist/es/core/ProcessResponse/process-response.js.map +1 -1
  566. package/dist/es/core/RiskModule/RiskModule.js +1 -1
  567. package/dist/es/core/RiskModule/RiskModule.js.map +1 -1
  568. package/dist/es/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.js +1 -1
  569. package/dist/es/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.js.map +1 -1
  570. package/dist/es/core/RiskModule/components/DeviceFingerprint/GetDeviceFingerprint.js +1 -1
  571. package/dist/es/core/RiskModule/components/DeviceFingerprint/GetDeviceFingerprint.js.map +1 -1
  572. package/dist/es/core/RiskModule/components/DeviceFingerprint/utils.js.map +1 -1
  573. package/dist/es/core/Services/analytics/collect-id.js +1 -1
  574. package/dist/es/core/Services/analytics/collect-id.js.map +1 -1
  575. package/dist/es/core/Services/http.js +1 -1
  576. package/dist/es/core/Services/http.js.map +1 -1
  577. package/dist/es/core/config.js.map +1 -1
  578. package/dist/es/core/core.js +1 -1
  579. package/dist/es/core/core.js.map +1 -1
  580. package/dist/es/core/core.registry.js +1 -1
  581. package/dist/es/core/core.registry.js.map +1 -1
  582. package/dist/es/core/utils.js +1 -1
  583. package/dist/es/core/utils.js.map +1 -1
  584. package/dist/es/external/classnames/index.js.map +1 -1
  585. package/dist/es/external/preact/compat/dist/compat.js +2 -0
  586. package/dist/es/external/preact/compat/dist/compat.js.map +1 -0
  587. package/dist/es/external/preact/dist/preact.js +1 -1
  588. package/dist/es/external/preact/dist/preact.js.map +1 -1
  589. package/dist/es/external/preact/hooks/dist/hooks.js +1 -1
  590. package/dist/es/external/preact/hooks/dist/hooks.js.map +1 -1
  591. package/dist/es/index.d.ts +14 -3
  592. package/dist/es/language/Language.js.map +1 -1
  593. package/dist/es/language/utils.js +1 -1
  594. package/dist/es/language/utils.js.map +1 -1
  595. package/dist/es/utils/Script.js +1 -1
  596. package/dist/es/utils/Script.js.map +1 -1
  597. package/dist/es/utils/Storage.js.map +1 -1
  598. package/dist/es/utils/Validator/ValidationRuleResult.js.map +1 -1
  599. package/dist/es/utils/Validator/Validator.js +1 -1
  600. package/dist/es/utils/Validator/Validator.js.map +1 -1
  601. package/dist/es/utils/Validator/defaultRules.js.map +1 -1
  602. package/dist/es/utils/amount-util.js.map +1 -1
  603. package/dist/es/utils/arrayUtils.js +1 -1
  604. package/dist/es/utils/arrayUtils.js.map +1 -1
  605. package/dist/es/utils/base64.js +1 -1
  606. package/dist/es/utils/base64.js.map +1 -1
  607. package/dist/es/utils/clipboard.js +1 -1
  608. package/dist/es/utils/clipboard.js.map +1 -1
  609. package/dist/es/utils/commonUtils.js +1 -1
  610. package/dist/es/utils/commonUtils.js.map +1 -1
  611. package/dist/es/utils/debounce.js +1 -1
  612. package/dist/es/utils/debounce.js.map +1 -1
  613. package/dist/es/utils/detectInIframe.js.map +1 -1
  614. package/dist/es/utils/get-issuer-image.js.map +1 -1
  615. package/dist/es/utils/get-process-message-handler.js.map +1 -1
  616. package/dist/es/utils/getErrorMessage.js.map +1 -1
  617. package/dist/es/utils/getOrigin.js.map +1 -1
  618. package/dist/es/utils/getProp.js +1 -1
  619. package/dist/es/utils/getProp.js.map +1 -1
  620. package/dist/es/utils/hasOwnProperty.js.map +1 -1
  621. package/dist/es/utils/hookUtils.js +1 -1
  622. package/dist/es/utils/hookUtils.js.map +1 -1
  623. package/dist/es/utils/idGenerator.js.map +1 -1
  624. package/dist/es/utils/isValidURL.js.map +1 -1
  625. package/dist/es/utils/promiseTimeout.js +1 -1
  626. package/dist/es/utils/promiseTimeout.js.map +1 -1
  627. package/dist/es/utils/regex.js.map +1 -1
  628. package/dist/es/utils/setFocus.js.map +1 -1
  629. package/dist/es/utils/useAutoFocus.js +1 -1
  630. package/dist/es/utils/useAutoFocus.js.map +1 -1
  631. package/dist/es/utils/useForm/reducer.js +1 -1
  632. package/dist/es/utils/useForm/reducer.js.map +1 -1
  633. package/dist/es/utils/useForm/useForm.js +1 -1
  634. package/dist/es/utils/useForm/useForm.js.map +1 -1
  635. package/dist/es/utils/useIsMobile.js +1 -1
  636. package/dist/es/utils/useIsMobile.js.map +1 -1
  637. package/dist/es/utils/uuid.js +1 -1
  638. package/dist/es/utils/uuid.js.map +1 -1
  639. package/dist/es/utils/validator-utils.js.map +1 -1
  640. package/dist/es-legacy/adyen.css +6 -3
  641. package/dist/es-legacy/adyen.css.map +1 -1
  642. package/dist/es-legacy/components/ANCV/ANCV.js +1 -1
  643. package/dist/es-legacy/components/ANCV/ANCV.js.map +1 -1
  644. package/dist/es-legacy/components/ANCV/components/ANCVAwait/config.js.map +1 -1
  645. package/dist/es-legacy/components/ANCV/components/ANCVInput.js +1 -1
  646. package/dist/es-legacy/components/ANCV/components/ANCVInput.js.map +1 -1
  647. package/dist/es-legacy/components/Ach/Ach.js +1 -1
  648. package/dist/es-legacy/components/Ach/Ach.js.map +1 -1
  649. package/dist/es-legacy/components/Ach/components/AccountTypeSelector.js +1 -1
  650. package/dist/es-legacy/components/Ach/components/AccountTypeSelector.js.map +1 -1
  651. package/dist/es-legacy/components/Ach/components/AchComponent.js +1 -1
  652. package/dist/es-legacy/components/Ach/components/AchComponent.js.map +1 -1
  653. package/dist/es-legacy/components/Ach/components/useSRPanelForACHErrors.js +1 -1
  654. package/dist/es-legacy/components/Ach/components/useSRPanelForACHErrors.js.map +1 -1
  655. package/dist/es-legacy/components/Ach/components/validate.js.map +1 -1
  656. package/dist/es-legacy/components/Address/Address.js +1 -1
  657. package/dist/es-legacy/components/Address/Address.js.map +1 -1
  658. package/dist/es-legacy/components/Affirm/Affirm.js +1 -1
  659. package/dist/es-legacy/components/Affirm/Affirm.js.map +1 -1
  660. package/dist/es-legacy/components/AfterPay/AfterPay.js +1 -1
  661. package/dist/es-legacy/components/AfterPay/AfterPay.js.map +1 -1
  662. package/dist/es-legacy/components/AfterPay/AfterPayB2B.js +1 -1
  663. package/dist/es-legacy/components/AfterPay/AfterPayB2B.js.map +1 -1
  664. package/dist/es-legacy/components/AmazonPay/AmazonPay.js +1 -1
  665. package/dist/es-legacy/components/AmazonPay/AmazonPay.js.map +1 -1
  666. package/dist/es-legacy/components/AmazonPay/components/AmazonPayButton.js +1 -1
  667. package/dist/es-legacy/components/AmazonPay/components/AmazonPayButton.js.map +1 -1
  668. package/dist/es-legacy/components/AmazonPay/components/AmazonPayComponent.js +1 -1
  669. package/dist/es-legacy/components/AmazonPay/components/AmazonPayComponent.js.map +1 -1
  670. package/dist/es-legacy/components/AmazonPay/components/ChangePaymentDetailsButton.js +1 -1
  671. package/dist/es-legacy/components/AmazonPay/components/ChangePaymentDetailsButton.js.map +1 -1
  672. package/dist/es-legacy/components/AmazonPay/components/OrderButton.js +1 -1
  673. package/dist/es-legacy/components/AmazonPay/components/OrderButton.js.map +1 -1
  674. package/dist/es-legacy/components/AmazonPay/components/SignOutButton.js +1 -1
  675. package/dist/es-legacy/components/AmazonPay/components/SignOutButton.js.map +1 -1
  676. package/dist/es-legacy/components/AmazonPay/defaultProps.js.map +1 -1
  677. package/dist/es-legacy/components/AmazonPay/utils.js +1 -1
  678. package/dist/es-legacy/components/AmazonPay/utils.js.map +1 -1
  679. package/dist/es-legacy/components/ApplePay/ApplePay.js +1 -1
  680. package/dist/es-legacy/components/ApplePay/ApplePay.js.map +1 -1
  681. package/dist/es-legacy/components/ApplePay/components/ApplePayButton.js.map +1 -1
  682. package/dist/es-legacy/components/ApplePay/services/ApplePayService.js +1 -1
  683. package/dist/es-legacy/components/ApplePay/services/ApplePayService.js.map +1 -1
  684. package/dist/es-legacy/components/ApplePay/utils/format-applepay-contact-to-adyen-format.js +1 -1
  685. package/dist/es-legacy/components/ApplePay/utils/format-applepay-contact-to-adyen-format.js.map +1 -1
  686. package/dist/es-legacy/components/ApplePay/utils/map-adyen-brands-to-applepay-brands.js +1 -1
  687. package/dist/es-legacy/components/ApplePay/utils/map-adyen-brands-to-applepay-brands.js.map +1 -1
  688. package/dist/es-legacy/components/ApplePay/utils/payment-request.js.map +1 -1
  689. package/dist/es-legacy/components/Atome/Atome.js +1 -1
  690. package/dist/es-legacy/components/Atome/Atome.js.map +1 -1
  691. package/dist/es-legacy/components/Atome/config.js +1 -1
  692. package/dist/es-legacy/components/Atome/config.js.map +1 -1
  693. package/dist/es-legacy/components/BacsDD/BacsDD.js +1 -1
  694. package/dist/es-legacy/components/BacsDD/BacsDD.js.map +1 -1
  695. package/dist/es-legacy/components/BacsDD/components/BacsInput.js +1 -1
  696. package/dist/es-legacy/components/BacsDD/components/BacsInput.js.map +1 -1
  697. package/dist/es-legacy/components/BacsDD/components/BacsResult.js +1 -1
  698. package/dist/es-legacy/components/BacsDD/components/BacsResult.js.map +1 -1
  699. package/dist/es-legacy/components/BankTransfer/BankTransfer.js +1 -1
  700. package/dist/es-legacy/components/BankTransfer/BankTransfer.js.map +1 -1
  701. package/dist/es-legacy/components/BankTransfer/components/BankTransferInput/BankTransferInput.js +1 -1
  702. package/dist/es-legacy/components/BankTransfer/components/BankTransferInput/BankTransferInput.js.map +1 -1
  703. package/dist/es-legacy/components/BankTransfer/components/BankTransferInput/validationRule.js +2 -0
  704. package/dist/es-legacy/components/BankTransfer/components/BankTransferInput/validationRule.js.map +1 -0
  705. package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferResult.js +1 -1
  706. package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferResult.js.map +1 -1
  707. package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferResultInstructions.js +2 -0
  708. package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferResultInstructions.js.map +1 -0
  709. package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferVoucher.js +2 -0
  710. package/dist/es-legacy/components/BankTransfer/components/BankTransferResult/BankTransferVoucher.js.map +1 -0
  711. package/dist/es-legacy/components/BcmcMobile/BcmcMobile.js +1 -1
  712. package/dist/es-legacy/components/BcmcMobile/BcmcMobile.js.map +1 -1
  713. package/dist/es-legacy/components/BcmcMobile/config.js.map +1 -1
  714. package/dist/es-legacy/components/BillDesk/BillDeskOnline.js +1 -1
  715. package/dist/es-legacy/components/BillDesk/BillDeskOnline.js.map +1 -1
  716. package/dist/es-legacy/components/BillDesk/BillDeskWallet.js +1 -1
  717. package/dist/es-legacy/components/BillDesk/BillDeskWallet.js.map +1 -1
  718. package/dist/es-legacy/components/Blik/Blik.js +1 -1
  719. package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
  720. package/dist/es-legacy/components/Blik/components/BlikInput.js +1 -1
  721. package/dist/es-legacy/components/Blik/components/BlikInput.js.map +1 -1
  722. package/dist/es-legacy/components/Blik/config.js.map +1 -1
  723. package/dist/es-legacy/components/Boleto/Boleto.js +1 -1
  724. package/dist/es-legacy/components/Boleto/Boleto.js.map +1 -1
  725. package/dist/es-legacy/components/Boleto/components/BoletoInput/BoletoInput.js +1 -1
  726. package/dist/es-legacy/components/Boleto/components/BoletoInput/BoletoInput.js.map +1 -1
  727. package/dist/es-legacy/components/Boleto/components/BoletoVoucherResult/BoletoVoucherResult.js +1 -1
  728. package/dist/es-legacy/components/Boleto/components/BoletoVoucherResult/BoletoVoucherResult.js.map +1 -1
  729. package/dist/es-legacy/components/Card/Bancontact.js +1 -1
  730. package/dist/es-legacy/components/Card/Bancontact.js.map +1 -1
  731. package/dist/es-legacy/components/Card/Card.js +1 -1
  732. package/dist/es-legacy/components/Card/Card.js.map +1 -1
  733. package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
  734. package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
  735. package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js +1 -1
  736. package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
  737. package/dist/es-legacy/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
  738. package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js.map +1 -1
  739. package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js +1 -1
  740. package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js.map +1 -1
  741. package/dist/es-legacy/components/Card/components/CardInput/components/CardFieldsWrapper.js +1 -1
  742. package/dist/es-legacy/components/Card/components/CardInput/components/CardFieldsWrapper.js.map +1 -1
  743. package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js +1 -1
  744. package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
  745. package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.js.map +1 -1
  746. package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
  747. package/dist/es-legacy/components/Card/components/CardInput/components/FieldLabelAlternative.js +1 -1
  748. package/dist/es-legacy/components/Card/components/CardInput/components/FieldLabelAlternative.js.map +1 -1
  749. package/dist/es-legacy/components/Card/components/CardInput/components/Installments/Installments.js +1 -1
  750. package/dist/es-legacy/components/Card/components/CardInput/components/Installments/Installments.js.map +1 -1
  751. package/dist/es-legacy/components/Card/components/CardInput/components/KCPAuthentication.js +1 -1
  752. package/dist/es-legacy/components/Card/components/CardInput/components/KCPAuthentication.js.map +1 -1
  753. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
  754. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
  755. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFieldsWrapper.js.map +1 -1
  756. package/dist/es-legacy/components/Card/components/CardInput/defaultProps.js.map +1 -1
  757. package/dist/es-legacy/components/Card/components/CardInput/handlers.js +1 -1
  758. package/dist/es-legacy/components/Card/components/CardInput/handlers.js.map +1 -1
  759. package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.js +1 -1
  760. package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.js.map +1 -1
  761. package/dist/es-legacy/components/Card/components/CardInput/utils.js +1 -1
  762. package/dist/es-legacy/components/Card/components/CardInput/utils.js.map +1 -1
  763. package/dist/es-legacy/components/Card/components/CardInput/validate.js +1 -1
  764. package/dist/es-legacy/components/Card/components/CardInput/validate.js.map +1 -1
  765. package/dist/es-legacy/components/Card/components/ClickToPayHolder.js +1 -1
  766. package/dist/es-legacy/components/Card/components/ClickToPayHolder.js.map +1 -1
  767. package/dist/es-legacy/components/Card/components/ClickToPayWrapper.js.map +1 -1
  768. package/dist/es-legacy/components/Card/components/Fastlane/FastlaneSignup.js +1 -1
  769. package/dist/es-legacy/components/Card/components/Fastlane/FastlaneSignup.js.map +1 -1
  770. package/dist/es-legacy/components/Card/components/Fastlane/InfoButton.js +1 -1
  771. package/dist/es-legacy/components/Card/components/Fastlane/InfoButton.js.map +1 -1
  772. package/dist/es-legacy/components/Card/components/Fastlane/InfoModal.js +1 -1
  773. package/dist/es-legacy/components/Card/components/Fastlane/InfoModal.js.map +1 -1
  774. package/dist/es-legacy/components/Card/components/Fastlane/USOnlyPhoneInput.js +1 -1
  775. package/dist/es-legacy/components/Card/components/Fastlane/USOnlyPhoneInput.js.map +1 -1
  776. package/dist/es-legacy/components/Card/components/Fastlane/utils/validate-configuration.js +1 -1
  777. package/dist/es-legacy/components/Card/components/Fastlane/utils/validate-configuration.js.map +1 -1
  778. package/dist/es-legacy/components/CashAppPay/CashAppPay.js +1 -1
  779. package/dist/es-legacy/components/CashAppPay/CashAppPay.js.map +1 -1
  780. package/dist/es-legacy/components/CashAppPay/components/CashAppComponent.js +1 -1
  781. package/dist/es-legacy/components/CashAppPay/components/CashAppComponent.js.map +1 -1
  782. package/dist/es-legacy/components/CashAppPay/defaultProps.js.map +1 -1
  783. package/dist/es-legacy/components/CashAppPay/services/CashAppService.js +1 -1
  784. package/dist/es-legacy/components/CashAppPay/services/CashAppService.js.map +1 -1
  785. package/dist/es-legacy/components/ClickToPay/ClickToPay.js +1 -1
  786. package/dist/es-legacy/components/ClickToPay/ClickToPay.js.map +1 -1
  787. package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
  788. package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
  789. package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
  790. package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
  791. package/dist/es-legacy/components/Doku/Doku.js +1 -1
  792. package/dist/es-legacy/components/Doku/Doku.js.map +1 -1
  793. package/dist/es-legacy/components/Doku/components/DokuInput/DokuInput.js.map +1 -1
  794. package/dist/es-legacy/components/Doku/components/DokuVoucherResult/DokuVoucherResult.js +1 -1
  795. package/dist/es-legacy/components/Doku/components/DokuVoucherResult/DokuVoucherResult.js.map +1 -1
  796. package/dist/es-legacy/components/Donation/Donation.js +1 -1
  797. package/dist/es-legacy/components/Donation/Donation.js.map +1 -1
  798. package/dist/es-legacy/components/Donation/components/DonationComponent.js +1 -1
  799. package/dist/es-legacy/components/Donation/components/DonationComponent.js.map +1 -1
  800. package/dist/es-legacy/components/Donation/components/FixedAmounts.js +1 -1
  801. package/dist/es-legacy/components/Donation/components/FixedAmounts.js.map +1 -1
  802. package/dist/es-legacy/components/Dragonpay/Dragonpay.js +1 -1
  803. package/dist/es-legacy/components/Dragonpay/Dragonpay.js.map +1 -1
  804. package/dist/es-legacy/components/Dragonpay/components/DragonpayInput/DragonpayInput.js +1 -1
  805. package/dist/es-legacy/components/Dragonpay/components/DragonpayInput/DragonpayInput.js.map +1 -1
  806. package/dist/es-legacy/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.js +1 -1
  807. package/dist/es-legacy/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.js.map +1 -1
  808. package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
  809. package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
  810. package/dist/es-legacy/components/Dropin/components/DropinComponent.js +1 -1
  811. package/dist/es-legacy/components/Dropin/components/DropinComponent.js.map +1 -1
  812. package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
  813. package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js +1 -1
  814. package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
  815. package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
  816. package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
  817. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js +1 -1
  818. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js.map +1 -1
  819. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
  820. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
  821. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
  822. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
  823. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodName.js.map +1 -1
  824. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
  825. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
  826. package/dist/es-legacy/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.js +1 -1
  827. package/dist/es-legacy/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.js.map +1 -1
  828. package/dist/es-legacy/components/Dropin/components/status/Error.js.map +1 -1
  829. package/dist/es-legacy/components/Dropin/components/status/Success.js.map +1 -1
  830. package/dist/es-legacy/components/Dropin/components/status/index.js.map +1 -1
  831. package/dist/es-legacy/components/Dropin/defaultProps.js.map +1 -1
  832. package/dist/es-legacy/components/Dropin/elements/createElements.js +1 -1
  833. package/dist/es-legacy/components/Dropin/elements/createElements.js.map +1 -1
  834. package/dist/es-legacy/components/Dropin/elements/createInstantPaymentElements.js +1 -1
  835. package/dist/es-legacy/components/Dropin/elements/createInstantPaymentElements.js.map +1 -1
  836. package/dist/es-legacy/components/Dropin/elements/createStoredElements.js +1 -1
  837. package/dist/es-legacy/components/Dropin/elements/createStoredElements.js.map +1 -1
  838. package/dist/es-legacy/components/Dropin/elements/filters.js +1 -1
  839. package/dist/es-legacy/components/Dropin/elements/filters.js.map +1 -1
  840. package/dist/es-legacy/components/Dropin/elements/getComponentConfiguration.js.map +1 -1
  841. package/dist/es-legacy/components/Dropin/elements/splitPaymentMethods.js +1 -1
  842. package/dist/es-legacy/components/Dropin/elements/splitPaymentMethods.js.map +1 -1
  843. package/dist/es-legacy/components/DuitNow/DuitNow.js +1 -1
  844. package/dist/es-legacy/components/DuitNow/DuitNow.js.map +1 -1
  845. package/dist/es-legacy/components/DuitNow/config.js.map +1 -1
  846. package/dist/es-legacy/components/EPS/index.js +1 -1
  847. package/dist/es-legacy/components/EPS/index.js.map +1 -1
  848. package/dist/es-legacy/components/Econtext/Econtext.js +1 -1
  849. package/dist/es-legacy/components/Econtext/Econtext.js.map +1 -1
  850. package/dist/es-legacy/components/Econtext/components/EcontextInput/EcontextInput.js.map +1 -1
  851. package/dist/es-legacy/components/Econtext/components/EcontextVoucherResult/EcontextVoucherResult.js +1 -1
  852. package/dist/es-legacy/components/Econtext/components/EcontextVoucherResult/EcontextVoucherResult.js.map +1 -1
  853. package/dist/es-legacy/components/FacilyPay/FacilyPay10x.js +1 -1
  854. package/dist/es-legacy/components/FacilyPay/FacilyPay10x.js.map +1 -1
  855. package/dist/es-legacy/components/FacilyPay/FacilyPay12x.js +1 -1
  856. package/dist/es-legacy/components/FacilyPay/FacilyPay12x.js.map +1 -1
  857. package/dist/es-legacy/components/FacilyPay/FacilyPay3x.js +1 -1
  858. package/dist/es-legacy/components/FacilyPay/FacilyPay3x.js.map +1 -1
  859. package/dist/es-legacy/components/FacilyPay/FacilyPay4x.js +1 -1
  860. package/dist/es-legacy/components/FacilyPay/FacilyPay4x.js.map +1 -1
  861. package/dist/es-legacy/components/FacilyPay/FacilyPay6x.js +1 -1
  862. package/dist/es-legacy/components/FacilyPay/FacilyPay6x.js.map +1 -1
  863. package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
  864. package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
  865. package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js +1 -1
  866. package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
  867. package/dist/es-legacy/components/Giftcard/components/GiftcardFields.js +1 -1
  868. package/dist/es-legacy/components/Giftcard/components/GiftcardFields.js.map +1 -1
  869. package/dist/es-legacy/components/Giftcard/components/GiftcardNumberField.js.map +1 -1
  870. package/dist/es-legacy/components/Giftcard/components/useSRPanelForGiftcardErrors.js +1 -1
  871. package/dist/es-legacy/components/Giftcard/components/useSRPanelForGiftcardErrors.js.map +1 -1
  872. package/dist/es-legacy/components/Giropay/Giropay.js +1 -1
  873. package/dist/es-legacy/components/Giropay/Giropay.js.map +1 -1
  874. package/dist/es-legacy/components/GooglePay/GooglePay.js +1 -1
  875. package/dist/es-legacy/components/GooglePay/GooglePay.js.map +1 -1
  876. package/dist/es-legacy/components/GooglePay/GooglePayService.js +1 -1
  877. package/dist/es-legacy/components/GooglePay/GooglePayService.js.map +1 -1
  878. package/dist/es-legacy/components/GooglePay/components/GooglePayButton.js +1 -1
  879. package/dist/es-legacy/components/GooglePay/components/GooglePayButton.js.map +1 -1
  880. package/dist/es-legacy/components/GooglePay/config.js.map +1 -1
  881. package/dist/es-legacy/components/GooglePay/requests.js +1 -1
  882. package/dist/es-legacy/components/GooglePay/requests.js.map +1 -1
  883. package/dist/es-legacy/components/GooglePay/utils.js +1 -1
  884. package/dist/es-legacy/components/GooglePay/utils.js.map +1 -1
  885. package/dist/es-legacy/components/Klarna/KlarnaPayments.js +1 -1
  886. package/dist/es-legacy/components/Klarna/KlarnaPayments.js.map +1 -1
  887. package/dist/es-legacy/components/Klarna/components/KlarnaContainer/KlarnaContainer.js +1 -1
  888. package/dist/es-legacy/components/Klarna/components/KlarnaContainer/KlarnaContainer.js.map +1 -1
  889. package/dist/es-legacy/components/Klarna/components/KlarnaWidget/KlarnaWidget.js +1 -1
  890. package/dist/es-legacy/components/Klarna/components/KlarnaWidget/KlarnaWidget.js.map +1 -1
  891. package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
  892. package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
  893. package/dist/es-legacy/components/MBWay/components/MBWayAwait/config.js.map +1 -1
  894. package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js +1 -1
  895. package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
  896. package/dist/es-legacy/components/MealVoucherFR/MealVoucherFR.js +1 -1
  897. package/dist/es-legacy/components/MealVoucherFR/MealVoucherFR.js.map +1 -1
  898. package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherFields.js +1 -1
  899. package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherFields.js.map +1 -1
  900. package/dist/es-legacy/components/Multibanco/Multibanco.js +1 -1
  901. package/dist/es-legacy/components/Multibanco/Multibanco.js.map +1 -1
  902. package/dist/es-legacy/components/Multibanco/components/MultibancoVoucherResult/MultibancoVoucherResult.js +1 -1
  903. package/dist/es-legacy/components/Multibanco/components/MultibancoVoucherResult/MultibancoVoucherResult.js.map +1 -1
  904. package/dist/es-legacy/components/OnlineBankingCZ/index.js +1 -1
  905. package/dist/es-legacy/components/OnlineBankingCZ/index.js.map +1 -1
  906. package/dist/es-legacy/components/OnlineBankingIN/index.js +1 -1
  907. package/dist/es-legacy/components/OnlineBankingIN/index.js.map +1 -1
  908. package/dist/es-legacy/components/OnlineBankingPL/OnlineBankingPL.js +1 -1
  909. package/dist/es-legacy/components/OnlineBankingPL/OnlineBankingPL.js.map +1 -1
  910. package/dist/es-legacy/components/OnlineBankingSK/index.js +1 -1
  911. package/dist/es-legacy/components/OnlineBankingSK/index.js.map +1 -1
  912. package/dist/es-legacy/components/Oxxo/Oxxo.js +1 -1
  913. package/dist/es-legacy/components/Oxxo/Oxxo.js.map +1 -1
  914. package/dist/es-legacy/components/Oxxo/components/OxxoVoucherResult/OxxoVoucherResult.js +1 -1
  915. package/dist/es-legacy/components/Oxxo/components/OxxoVoucherResult/OxxoVoucherResult.js.map +1 -1
  916. package/dist/es-legacy/components/PayByBank/PayByBank.js +1 -1
  917. package/dist/es-legacy/components/PayByBank/PayByBank.js.map +1 -1
  918. package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js +1 -1
  919. package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js.map +1 -1
  920. package/dist/es-legacy/components/PayByBankPix/components/Enrollment/Enrollment.js +1 -1
  921. package/dist/es-legacy/components/PayByBankPix/components/Enrollment/Enrollment.js.map +1 -1
  922. package/dist/es-legacy/components/PayByBankPix/components/Enrollment/components/AwaitLogoContainer.js +1 -1
  923. package/dist/es-legacy/components/PayByBankPix/components/Enrollment/components/AwaitLogoContainer.js.map +1 -1
  924. package/dist/es-legacy/components/PayByBankPix/components/Enrollment/useIssuerWithLogo.js +1 -1
  925. package/dist/es-legacy/components/PayByBankPix/components/Enrollment/useIssuerWithLogo.js.map +1 -1
  926. package/dist/es-legacy/components/PayByBankPix/components/StoredPayment/StoredPayment.js +1 -1
  927. package/dist/es-legacy/components/PayByBankPix/components/StoredPayment/StoredPayment.js.map +1 -1
  928. package/dist/es-legacy/components/PayByBankPix/services/PasskeyService.js +1 -1
  929. package/dist/es-legacy/components/PayByBankPix/services/PasskeyService.js.map +1 -1
  930. package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js +1 -1
  931. package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js.map +1 -1
  932. package/dist/es-legacy/components/PayMe/PayMe.js +1 -1
  933. package/dist/es-legacy/components/PayMe/PayMe.js.map +1 -1
  934. package/dist/es-legacy/components/PayMe/components/PayMeIntroduction.js.map +1 -1
  935. package/dist/es-legacy/components/PayNow/PayNow.js +1 -1
  936. package/dist/es-legacy/components/PayNow/PayNow.js.map +1 -1
  937. package/dist/es-legacy/components/PayNow/components/PayNowInstructions.js.map +1 -1
  938. package/dist/es-legacy/components/PayNow/components/PayNowIntroduction.js.map +1 -1
  939. package/dist/es-legacy/components/PayNow/config.js.map +1 -1
  940. package/dist/es-legacy/components/PayPal/Paypal.js +1 -1
  941. package/dist/es-legacy/components/PayPal/Paypal.js.map +1 -1
  942. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js +1 -1
  943. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js.map +1 -1
  944. package/dist/es-legacy/components/PayPal/components/PaypalComponent.js +1 -1
  945. package/dist/es-legacy/components/PayPal/components/PaypalComponent.js.map +1 -1
  946. package/dist/es-legacy/components/PayPal/utils/format-paypal-order-contact-to-adyen-format.js +1 -1
  947. package/dist/es-legacy/components/PayPal/utils/format-paypal-order-contact-to-adyen-format.js.map +1 -1
  948. package/dist/es-legacy/components/PayPal/utils/get-paypal-locale.js.map +1 -1
  949. package/dist/es-legacy/components/PayPal/utils/get-paypal-settings.js +1 -1
  950. package/dist/es-legacy/components/PayPal/utils/get-paypal-settings.js.map +1 -1
  951. package/dist/es-legacy/components/PayPal/utils/get-paypal-styles.js +1 -1
  952. package/dist/es-legacy/components/PayPal/utils/get-paypal-styles.js.map +1 -1
  953. package/dist/es-legacy/components/PayPal/utils/get-paypal-url.js +1 -1
  954. package/dist/es-legacy/components/PayPal/utils/get-paypal-url.js.map +1 -1
  955. package/dist/es-legacy/components/PayPalFastlane/Fastlane.js +1 -1
  956. package/dist/es-legacy/components/PayPalFastlane/Fastlane.js.map +1 -1
  957. package/dist/es-legacy/components/PayPalFastlane/FastlaneSDK.js +1 -1
  958. package/dist/es-legacy/components/PayPalFastlane/FastlaneSDK.js.map +1 -1
  959. package/dist/es-legacy/components/PayPalFastlane/components/FastlaneComponent.js +1 -1
  960. package/dist/es-legacy/components/PayPalFastlane/components/FastlaneComponent.js.map +1 -1
  961. package/dist/es-legacy/components/PayTo/PayTo.js +1 -1
  962. package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -1
  963. package/dist/es-legacy/components/PayTo/components/BSBInput.js +1 -1
  964. package/dist/es-legacy/components/PayTo/components/BSBInput.js.map +1 -1
  965. package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js +1 -1
  966. package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js.map +1 -1
  967. package/dist/es-legacy/components/PayTo/components/MandateSummary.js +1 -1
  968. package/dist/es-legacy/components/PayTo/components/MandateSummary.js.map +1 -1
  969. package/dist/es-legacy/components/PayTo/components/PayIDInput.js +1 -1
  970. package/dist/es-legacy/components/PayTo/components/PayIDInput.js.map +1 -1
  971. package/dist/es-legacy/components/PayTo/components/PayToComponent.js +1 -1
  972. package/dist/es-legacy/components/PayTo/components/PayToComponent.js.map +1 -1
  973. package/dist/es-legacy/components/PayTo/components/PayToPhone.js +1 -1
  974. package/dist/es-legacy/components/PayTo/components/PayToPhone.js.map +1 -1
  975. package/dist/es-legacy/components/PayU/PayuCashcard.js +1 -1
  976. package/dist/es-legacy/components/PayU/PayuCashcard.js.map +1 -1
  977. package/dist/es-legacy/components/PayU/PayuNetBanking.js +1 -1
  978. package/dist/es-legacy/components/PayU/PayuNetBanking.js.map +1 -1
  979. package/dist/es-legacy/components/PersonalDetails/PersonalDetails.js +1 -1
  980. package/dist/es-legacy/components/PersonalDetails/PersonalDetails.js.map +1 -1
  981. package/dist/es-legacy/components/Pix/Pix.js +1 -1
  982. package/dist/es-legacy/components/Pix/Pix.js.map +1 -1
  983. package/dist/es-legacy/components/Pix/PixInput/PixInput.js +1 -1
  984. package/dist/es-legacy/components/Pix/PixInput/PixInput.js.map +1 -1
  985. package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js +1 -1
  986. package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
  987. package/dist/es-legacy/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js +1 -1
  988. package/dist/es-legacy/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js.map +1 -1
  989. package/dist/es-legacy/components/PreAuthorizedDebitCanada/components/SettlementInfo.js.map +1 -1
  990. package/dist/es-legacy/components/PromptPay/PromptPay.js +1 -1
  991. package/dist/es-legacy/components/PromptPay/PromptPay.js.map +1 -1
  992. package/dist/es-legacy/components/PromptPay/config.js.map +1 -1
  993. package/dist/es-legacy/components/RatePay/RatePay.js +1 -1
  994. package/dist/es-legacy/components/RatePay/RatePay.js.map +1 -1
  995. package/dist/es-legacy/components/RatePay/RatePayDirectDebit.js +1 -1
  996. package/dist/es-legacy/components/RatePay/RatePayDirectDebit.js.map +1 -1
  997. package/dist/es-legacy/components/Redirect/Redirect.js +1 -1
  998. package/dist/es-legacy/components/Redirect/Redirect.js.map +1 -1
  999. package/dist/es-legacy/components/Redirect/components/RedirectShopper/RedirectShopper.js +1 -1
  1000. package/dist/es-legacy/components/Redirect/components/RedirectShopper/RedirectShopper.js.map +1 -1
  1001. package/dist/es-legacy/components/Sepa/Sepa.js +1 -1
  1002. package/dist/es-legacy/components/Sepa/Sepa.js.map +1 -1
  1003. package/dist/es-legacy/components/Swish/Swish.js +1 -1
  1004. package/dist/es-legacy/components/Swish/Swish.js.map +1 -1
  1005. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
  1006. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  1007. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
  1008. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  1009. package/dist/es-legacy/components/ThreeDS2/callSubmit3DS2Fingerprint.js +1 -1
  1010. package/dist/es-legacy/components/ThreeDS2/callSubmit3DS2Fingerprint.js.map +1 -1
  1011. package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js +1 -1
  1012. package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
  1013. package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
  1014. package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
  1015. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js +1 -1
  1016. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js.map +1 -1
  1017. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js +1 -1
  1018. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
  1019. package/dist/es-legacy/components/ThreeDS2/components/Form/ThreeDS2Form.js.map +1 -1
  1020. package/dist/es-legacy/components/ThreeDS2/components/utils.js.map +1 -1
  1021. package/dist/es-legacy/components/Trustly/Trustly.js +1 -1
  1022. package/dist/es-legacy/components/Trustly/Trustly.js.map +1 -1
  1023. package/dist/es-legacy/components/Twint/Twint.js +1 -1
  1024. package/dist/es-legacy/components/Twint/Twint.js.map +1 -1
  1025. package/dist/es-legacy/components/UPI/UPI.js +1 -1
  1026. package/dist/es-legacy/components/UPI/UPI.js.map +1 -1
  1027. package/dist/es-legacy/components/UPI/components/UPIComponent/UPIComponent.js +1 -1
  1028. package/dist/es-legacy/components/UPI/components/UPIComponent/UPIComponent.js.map +1 -1
  1029. package/dist/es-legacy/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.js +1 -1
  1030. package/dist/es-legacy/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.js.map +1 -1
  1031. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js.map +1 -1
  1032. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js +1 -1
  1033. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js.map +1 -1
  1034. package/dist/es-legacy/components/UPI/components/VpaInput/VpaInput.js +1 -1
  1035. package/dist/es-legacy/components/UPI/components/VpaInput/VpaInput.js.map +1 -1
  1036. package/dist/es-legacy/components/WalletIN/index.js +1 -1
  1037. package/dist/es-legacy/components/WalletIN/index.js.map +1 -1
  1038. package/dist/es-legacy/components/WeChat/WeChat.js +1 -1
  1039. package/dist/es-legacy/components/WeChat/WeChat.js.map +1 -1
  1040. package/dist/es-legacy/components/WeChat/config.js.map +1 -1
  1041. package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
  1042. package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
  1043. package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js +1 -1
  1044. package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
  1045. package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
  1046. package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
  1047. package/dist/es-legacy/components/internal/Address/Address.js +1 -1
  1048. package/dist/es-legacy/components/internal/Address/Address.js.map +1 -1
  1049. package/dist/es-legacy/components/internal/Address/Specifications.js +1 -1
  1050. package/dist/es-legacy/components/internal/Address/Specifications.js.map +1 -1
  1051. package/dist/es-legacy/components/internal/Address/components/AddressSearch.js +1 -1
  1052. package/dist/es-legacy/components/internal/Address/components/AddressSearch.js.map +1 -1
  1053. package/dist/es-legacy/components/internal/Address/components/CountryField.js +1 -1
  1054. package/dist/es-legacy/components/internal/Address/components/CountryField.js.map +1 -1
  1055. package/dist/es-legacy/components/internal/Address/components/FieldContainer.js.map +1 -1
  1056. package/dist/es-legacy/components/internal/Address/components/ReadOnlyAddress.js.map +1 -1
  1057. package/dist/es-legacy/components/internal/Address/components/StateField.js +1 -1
  1058. package/dist/es-legacy/components/internal/Address/components/StateField.js.map +1 -1
  1059. package/dist/es-legacy/components/internal/Address/validate.formats.js.map +1 -1
  1060. package/dist/es-legacy/components/internal/Address/validate.js.map +1 -1
  1061. package/dist/es-legacy/components/internal/Await/Await.js +1 -1
  1062. package/dist/es-legacy/components/internal/Await/Await.js.map +1 -1
  1063. package/dist/es-legacy/components/internal/BaseElement/BaseElement.js +1 -1
  1064. package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
  1065. package/dist/es-legacy/components/internal/Button/Button.js +1 -1
  1066. package/dist/es-legacy/components/internal/Button/Button.js.map +1 -1
  1067. package/dist/es-legacy/components/internal/Button/CopyIconButton.js +2 -0
  1068. package/dist/es-legacy/components/internal/Button/CopyIconButton.js.map +1 -0
  1069. package/dist/es-legacy/components/internal/ButtonGroup/ButtonGroup.js +1 -1
  1070. package/dist/es-legacy/components/internal/ButtonGroup/ButtonGroup.js.map +1 -1
  1071. package/dist/es-legacy/components/internal/ClickToPay/ClickToPayComponent.js +1 -1
  1072. package/dist/es-legacy/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
  1073. package/dist/es-legacy/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js +1 -1
  1074. package/dist/es-legacy/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js.map +1 -1
  1075. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js +1 -1
  1076. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
  1077. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js +1 -1
  1078. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js.map +1 -1
  1079. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js.map +1 -1
  1080. package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js +1 -1
  1081. package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js.map +1 -1
  1082. package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.js +1 -1
  1083. package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.js.map +1 -1
  1084. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLoader/CtPLoader.js.map +1 -1
  1085. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js +1 -1
  1086. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js.map +1 -1
  1087. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
  1088. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
  1089. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js +1 -1
  1090. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js.map +1 -1
  1091. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
  1092. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
  1093. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
  1094. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
  1095. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js +1 -1
  1096. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js.map +1 -1
  1097. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js +1 -1
  1098. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js.map +1 -1
  1099. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
  1100. package/dist/es-legacy/components/internal/ClickToPay/context/ClickToPayProvider.js +1 -1
  1101. package/dist/es-legacy/components/internal/ClickToPay/context/ClickToPayProvider.js.map +1 -1
  1102. package/dist/es-legacy/components/internal/ClickToPay/errors/TimeoutError.js.map +1 -1
  1103. package/dist/es-legacy/components/internal/ClickToPay/models/ShopperCard.js.map +1 -1
  1104. package/dist/es-legacy/components/internal/ClickToPay/services/ClickToPayService.js +1 -1
  1105. package/dist/es-legacy/components/internal/ClickToPay/services/ClickToPayService.js.map +1 -1
  1106. package/dist/es-legacy/components/internal/ClickToPay/services/create-clicktopay-service.js +1 -1
  1107. package/dist/es-legacy/components/internal/ClickToPay/services/create-clicktopay-service.js.map +1 -1
  1108. package/dist/es-legacy/components/internal/ClickToPay/services/execute-with-timeout.js +1 -1
  1109. package/dist/es-legacy/components/internal/ClickToPay/services/execute-with-timeout.js.map +1 -1
  1110. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/MastercardSdk.js +1 -1
  1111. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/MastercardSdk.js.map +1 -1
  1112. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/SrcSdkLoader.js +1 -1
  1113. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/SrcSdkLoader.js.map +1 -1
  1114. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/SrciError.js.map +1 -1
  1115. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/VisaSdk.js +1 -1
  1116. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/VisaSdk.js.map +1 -1
  1117. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/config.js.map +1 -1
  1118. package/dist/es-legacy/components/internal/ClickToPay/services/utils.js +1 -1
  1119. package/dist/es-legacy/components/internal/ClickToPay/services/utils.js.map +1 -1
  1120. package/dist/es-legacy/components/internal/CompanyDetails/CompanyDetails.js +1 -1
  1121. package/dist/es-legacy/components/internal/CompanyDetails/CompanyDetails.js.map +1 -1
  1122. package/dist/es-legacy/components/internal/CompanyDetails/ReadOnlyCompanyDetails.js.map +1 -1
  1123. package/dist/es-legacy/components/internal/CompanyDetails/utils.js +1 -1
  1124. package/dist/es-legacy/components/internal/CompanyDetails/utils.js.map +1 -1
  1125. package/dist/es-legacy/components/internal/ConsentCheckboxLabel/ConsentCheckboxLabel.js.map +1 -1
  1126. package/dist/es-legacy/components/internal/Countdown/CountdownA11yReporter.js +1 -1
  1127. package/dist/es-legacy/components/internal/Countdown/CountdownA11yReporter.js.map +1 -1
  1128. package/dist/es-legacy/components/internal/Countdown/index.js +1 -1
  1129. package/dist/es-legacy/components/internal/Countdown/index.js.map +1 -1
  1130. package/dist/es-legacy/components/internal/Countdown/useCountdownA11yReporter.js +1 -1
  1131. package/dist/es-legacy/components/internal/Countdown/useCountdownA11yReporter.js.map +1 -1
  1132. package/dist/es-legacy/components/internal/Countdown/utils.js.map +1 -1
  1133. package/dist/es-legacy/components/internal/DetailsTable/DetailsTable.js +1 -1
  1134. package/dist/es-legacy/components/internal/DetailsTable/DetailsTable.js.map +1 -1
  1135. package/dist/es-legacy/components/internal/DisclaimerMessage/DisclaimerMessage.js +1 -1
  1136. package/dist/es-legacy/components/internal/DisclaimerMessage/DisclaimerMessage.js.map +1 -1
  1137. package/dist/es-legacy/components/internal/ExpandButton/ExpandButton.js +1 -1
  1138. package/dist/es-legacy/components/internal/ExpandButton/ExpandButton.js.map +1 -1
  1139. package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js +1 -1
  1140. package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
  1141. package/dist/es-legacy/components/internal/FormFields/ConsentCheckbox/ConsentCheckbox.js.map +1 -1
  1142. package/dist/es-legacy/components/internal/FormFields/Field/Field.js +1 -1
  1143. package/dist/es-legacy/components/internal/FormFields/Field/Field.js.map +1 -1
  1144. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  1145. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  1146. package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
  1147. package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
  1148. package/dist/es-legacy/components/internal/FormFields/InputDate/InputDate.js +1 -1
  1149. package/dist/es-legacy/components/internal/FormFields/InputDate/InputDate.js.map +1 -1
  1150. package/dist/es-legacy/components/internal/FormFields/InputDate/utils.js.map +1 -1
  1151. package/dist/es-legacy/components/internal/FormFields/InputEmail.js +1 -1
  1152. package/dist/es-legacy/components/internal/FormFields/InputEmail.js.map +1 -1
  1153. package/dist/es-legacy/components/internal/FormFields/InputTelephone.js +1 -1
  1154. package/dist/es-legacy/components/internal/FormFields/InputTelephone.js.map +1 -1
  1155. package/dist/es-legacy/components/internal/FormFields/InputText.js +1 -1
  1156. package/dist/es-legacy/components/internal/FormFields/InputText.js.map +1 -1
  1157. package/dist/es-legacy/components/internal/FormFields/RadioGroup/RadioGroup.js +1 -1
  1158. package/dist/es-legacy/components/internal/FormFields/RadioGroup/RadioGroup.js.map +1 -1
  1159. package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioButtonIcon.js.map +1 -1
  1160. package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js +1 -1
  1161. package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js.map +1 -1
  1162. package/dist/es-legacy/components/internal/FormFields/Select/Select.js +1 -1
  1163. package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
  1164. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  1165. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  1166. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectList.js +1 -1
  1167. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectList.js.map +1 -1
  1168. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
  1169. package/dist/es-legacy/components/internal/FormFields/utils.js.map +1 -1
  1170. package/dist/es-legacy/components/internal/FormInstruction/FormInstruction.js.map +1 -1
  1171. package/dist/es-legacy/components/internal/IFrame/Iframe.js +1 -1
  1172. package/dist/es-legacy/components/internal/IFrame/Iframe.js.map +1 -1
  1173. package/dist/es-legacy/components/internal/IbanInput/IbanInput.js +1 -1
  1174. package/dist/es-legacy/components/internal/IbanInput/IbanInput.js.map +1 -1
  1175. package/dist/es-legacy/components/internal/IbanInput/utils.js +1 -1
  1176. package/dist/es-legacy/components/internal/IbanInput/utils.js.map +1 -1
  1177. package/dist/es-legacy/components/internal/IbanInput/validate.js.map +1 -1
  1178. package/dist/es-legacy/components/internal/Img/Img.js +1 -1
  1179. package/dist/es-legacy/components/internal/Img/Img.js.map +1 -1
  1180. package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js +1 -1
  1181. package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js.map +1 -1
  1182. package/dist/es-legacy/components/internal/IssuerList/IssuerList.js +1 -1
  1183. package/dist/es-legacy/components/internal/IssuerList/IssuerList.js.map +1 -1
  1184. package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
  1185. package/dist/es-legacy/components/internal/Modal/Modal.js +1 -1
  1186. package/dist/es-legacy/components/internal/Modal/Modal.js.map +1 -1
  1187. package/dist/es-legacy/components/internal/Modal/useModal.js +1 -1
  1188. package/dist/es-legacy/components/internal/Modal/useModal.js.map +1 -1
  1189. package/dist/es-legacy/components/internal/Modal/useTrapFocus.js +1 -1
  1190. package/dist/es-legacy/components/internal/Modal/useTrapFocus.js.map +1 -1
  1191. package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js +1 -1
  1192. package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
  1193. package/dist/es-legacy/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js +1 -1
  1194. package/dist/es-legacy/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js.map +1 -1
  1195. package/dist/es-legacy/components/internal/OpenInvoice/utils.js +1 -1
  1196. package/dist/es-legacy/components/internal/OpenInvoice/utils.js.map +1 -1
  1197. package/dist/es-legacy/components/internal/PayButton/PayButton.js +1 -1
  1198. package/dist/es-legacy/components/internal/PayButton/PayButton.js.map +1 -1
  1199. package/dist/es-legacy/components/internal/PayButton/utils.js.map +1 -1
  1200. package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js +1 -1
  1201. package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
  1202. package/dist/es-legacy/components/internal/PersonalDetails/ReadOnlyPersonalDetails.js.map +1 -1
  1203. package/dist/es-legacy/components/internal/PersonalDetails/utils.js +1 -1
  1204. package/dist/es-legacy/components/internal/PersonalDetails/utils.js.map +1 -1
  1205. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputFields.js +1 -1
  1206. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputFields.js.map +1 -1
  1207. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js +1 -1
  1208. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js.map +1 -1
  1209. package/dist/es-legacy/components/internal/PhoneInput/usePhonePrefixes.js +1 -1
  1210. package/dist/es-legacy/components/internal/PhoneInput/usePhonePrefixes.js.map +1 -1
  1211. package/dist/es-legacy/components/internal/PhoneInput/validate.js.map +1 -1
  1212. package/dist/es-legacy/components/internal/QRLoader/QRLoader.js +1 -1
  1213. package/dist/es-legacy/components/internal/QRLoader/QRLoader.js.map +1 -1
  1214. package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js +1 -1
  1215. package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js.map +1 -1
  1216. package/dist/es-legacy/components/internal/SecuredFields/SFP/SFPUtils.js +1 -1
  1217. package/dist/es-legacy/components/internal/SecuredFields/SFP/SFPUtils.js.map +1 -1
  1218. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
  1219. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
  1220. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
  1221. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
  1222. package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
  1223. package/dist/es-legacy/components/internal/SecuredFields/binLookup/extensions.js +1 -1
  1224. package/dist/es-legacy/components/internal/SecuredFields/binLookup/extensions.js.map +1 -1
  1225. package/dist/es-legacy/components/internal/SecuredFields/binLookup/triggerBinLookUp.js +1 -1
  1226. package/dist/es-legacy/components/internal/SecuredFields/binLookup/triggerBinLookUp.js.map +1 -1
  1227. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/AbstractCSF.js.map +1 -1
  1228. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/CSF.js.map +1 -1
  1229. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
  1230. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
  1231. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.js +1 -1
  1232. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.js.map +1 -1
  1233. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleConfig.js.map +1 -1
  1234. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleIOSTouchEvents.js +1 -1
  1235. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleIOSTouchEvents.js.map +1 -1
  1236. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleTab.js.map +1 -1
  1237. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/initCSF.js +1 -1
  1238. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/initCSF.js.map +1 -1
  1239. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/handleFocus.js +1 -1
  1240. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/handleFocus.js.map +1 -1
  1241. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.js +1 -1
  1242. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.js.map +1 -1
  1243. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.js +1 -1
  1244. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.js.map +1 -1
  1245. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/partials/validateForm.js.map +1 -1
  1246. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/callbackUtils.js.map +1 -1
  1247. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/cardType.js +1 -1
  1248. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/cardType.js.map +1 -1
  1249. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/destroySecuredFields.js +1 -1
  1250. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/destroySecuredFields.js.map +1 -1
  1251. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/iframes/getIframeContentWin.js.map +1 -1
  1252. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageToIframe.js.map +1 -1
  1253. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageValidation.js.map +1 -1
  1254. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/processErrors.js.map +1 -1
  1255. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.js +1 -1
  1256. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.js.map +1 -1
  1257. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/userAgent.js.map +1 -1
  1258. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
  1259. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
  1260. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
  1261. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js +1 -1
  1262. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js.map +1 -1
  1263. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processPlaceholders.js.map +1 -1
  1264. package/dist/es-legacy/components/internal/SecuredFields/lib/utilities/addContextTranslations.js +1 -1
  1265. package/dist/es-legacy/components/internal/SecuredFields/lib/utilities/addContextTranslations.js.map +1 -1
  1266. package/dist/es-legacy/components/internal/SecuredFields/lib/utilities/commonUtils.js +1 -1
  1267. package/dist/es-legacy/components/internal/SecuredFields/lib/utilities/commonUtils.js.map +1 -1
  1268. package/dist/es-legacy/components/internal/SecuredFields/lib/utilities/dom.js.map +1 -1
  1269. package/dist/es-legacy/components/internal/SecuredFields/lib/utilities/logger.js.map +1 -1
  1270. package/dist/es-legacy/components/internal/SecuredFields/utils.js.map +1 -1
  1271. package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js +1 -1
  1272. package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
  1273. package/dist/es-legacy/components/internal/SendCopyToEmail/SendCopyToEmail.js.map +1 -1
  1274. package/dist/es-legacy/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.js.map +1 -1
  1275. package/dist/es-legacy/components/internal/SocialSecurityNumberBrazil/utils.js +1 -1
  1276. package/dist/es-legacy/components/internal/SocialSecurityNumberBrazil/utils.js.map +1 -1
  1277. package/dist/es-legacy/components/internal/SocialSecurityNumberBrazil/validate.js.map +1 -1
  1278. package/dist/es-legacy/components/internal/StoreDetails/StoreDetails.js +1 -1
  1279. package/dist/es-legacy/components/internal/StoreDetails/StoreDetails.js.map +1 -1
  1280. package/dist/es-legacy/components/internal/Timeline/Timeline.js +1 -1
  1281. package/dist/es-legacy/components/internal/Timeline/Timeline.js.map +1 -1
  1282. package/dist/es-legacy/components/internal/Toggle/Toggle.js +1 -1
  1283. package/dist/es-legacy/components/internal/Toggle/Toggle.js.map +1 -1
  1284. package/dist/es-legacy/components/internal/Tooltip/SingletonTooltipProvider.js +2 -0
  1285. package/dist/es-legacy/components/internal/Tooltip/SingletonTooltipProvider.js.map +1 -0
  1286. package/dist/es-legacy/components/internal/Tooltip/Tooltip.js +2 -0
  1287. package/dist/es-legacy/components/internal/Tooltip/Tooltip.js.map +1 -0
  1288. package/dist/es-legacy/components/internal/Tooltip/TooltipController.js +2 -0
  1289. package/dist/es-legacy/components/internal/Tooltip/TooltipController.js.map +1 -0
  1290. package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
  1291. package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
  1292. package/dist/es-legacy/components/internal/UIElement/utils.js +1 -1
  1293. package/dist/es-legacy/components/internal/UIElement/utils.js.map +1 -1
  1294. package/dist/es-legacy/components/internal/Voucher/Voucher.js.map +1 -1
  1295. package/dist/es-legacy/components/internal/Voucher/utils.js +1 -1
  1296. package/dist/es-legacy/components/internal/Voucher/utils.js.map +1 -1
  1297. package/dist/es-legacy/core/AdyenCheckout.js.map +1 -1
  1298. package/dist/es-legacy/core/Analytics/Analytics.js +1 -1
  1299. package/dist/es-legacy/core/Analytics/Analytics.js.map +1 -1
  1300. package/dist/es-legacy/core/Analytics/AnalyticsErrorEvent.js.map +1 -1
  1301. package/dist/es-legacy/core/Analytics/AnalyticsEvent.js.map +1 -1
  1302. package/dist/es-legacy/core/Analytics/AnalyticsInfoEvent.js.map +1 -1
  1303. package/dist/es-legacy/core/Analytics/AnalyticsLogEvent.js.map +1 -1
  1304. package/dist/es-legacy/core/Analytics/EventsQueue.js +1 -1
  1305. package/dist/es-legacy/core/Analytics/EventsQueue.js.map +1 -1
  1306. package/dist/es-legacy/core/Analytics/constants.js.map +1 -1
  1307. package/dist/es-legacy/core/Analytics/utils.js +1 -1
  1308. package/dist/es-legacy/core/Analytics/utils.js.map +1 -1
  1309. package/dist/es-legacy/core/CheckoutSession/CheckoutSession.js +1 -1
  1310. package/dist/es-legacy/core/CheckoutSession/CheckoutSession.js.map +1 -1
  1311. package/dist/es-legacy/core/CheckoutSession/utils.js +1 -1
  1312. package/dist/es-legacy/core/CheckoutSession/utils.js.map +1 -1
  1313. package/dist/es-legacy/core/Context/CoreProvider.js +1 -1
  1314. package/dist/es-legacy/core/Context/CoreProvider.js.map +1 -1
  1315. package/dist/es-legacy/core/Context/Resources.js +1 -1
  1316. package/dist/es-legacy/core/Context/Resources.js.map +1 -1
  1317. package/dist/es-legacy/core/Context/useImage.js +1 -1
  1318. package/dist/es-legacy/core/Context/useImage.js.map +1 -1
  1319. package/dist/es-legacy/core/Environment/Environment.js.map +1 -1
  1320. package/dist/es-legacy/core/Errors/AdyenCheckoutError.js.map +1 -1
  1321. package/dist/es-legacy/core/Errors/CancelError.js.map +1 -1
  1322. package/dist/es-legacy/core/Errors/SRMessages.js +1 -1
  1323. package/dist/es-legacy/core/Errors/SRMessages.js.map +1 -1
  1324. package/dist/es-legacy/core/Errors/SRPanel.js +1 -1
  1325. package/dist/es-legacy/core/Errors/SRPanel.js.map +1 -1
  1326. package/dist/es-legacy/core/Errors/SRPanelProvider.js.map +1 -1
  1327. package/dist/es-legacy/core/Errors/useA11yReporter.js +1 -1
  1328. package/dist/es-legacy/core/Errors/useA11yReporter.js.map +1 -1
  1329. package/dist/es-legacy/core/Errors/utils.js +1 -1
  1330. package/dist/es-legacy/core/Errors/utils.js.map +1 -1
  1331. package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js +1 -1
  1332. package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
  1333. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/PaymentMethods.js +1 -1
  1334. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/PaymentMethods.js.map +1 -1
  1335. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/filters.js.map +1 -1
  1336. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/utils.js +1 -1
  1337. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/utils.js.map +1 -1
  1338. package/dist/es-legacy/core/ProcessResponse/process-response.js +1 -1
  1339. package/dist/es-legacy/core/ProcessResponse/process-response.js.map +1 -1
  1340. package/dist/es-legacy/core/RiskModule/RiskModule.js +1 -1
  1341. package/dist/es-legacy/core/RiskModule/RiskModule.js.map +1 -1
  1342. package/dist/es-legacy/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.js +1 -1
  1343. package/dist/es-legacy/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.js.map +1 -1
  1344. package/dist/es-legacy/core/RiskModule/components/DeviceFingerprint/GetDeviceFingerprint.js +1 -1
  1345. package/dist/es-legacy/core/RiskModule/components/DeviceFingerprint/GetDeviceFingerprint.js.map +1 -1
  1346. package/dist/es-legacy/core/RiskModule/components/DeviceFingerprint/utils.js.map +1 -1
  1347. package/dist/es-legacy/core/Services/analytics/collect-id.js +1 -1
  1348. package/dist/es-legacy/core/Services/analytics/collect-id.js.map +1 -1
  1349. package/dist/es-legacy/core/Services/http.js +1 -1
  1350. package/dist/es-legacy/core/Services/http.js.map +1 -1
  1351. package/dist/es-legacy/core/Services/sessions/check-balance.js +1 -1
  1352. package/dist/es-legacy/core/Services/sessions/check-balance.js.map +1 -1
  1353. package/dist/es-legacy/core/Services/sessions/make-payment.js +1 -1
  1354. package/dist/es-legacy/core/Services/sessions/make-payment.js.map +1 -1
  1355. package/dist/es-legacy/core/Services/sessions/setup-session.js +1 -1
  1356. package/dist/es-legacy/core/Services/sessions/setup-session.js.map +1 -1
  1357. package/dist/es-legacy/core/Services/sessions/submit-details.js +1 -1
  1358. package/dist/es-legacy/core/Services/sessions/submit-details.js.map +1 -1
  1359. package/dist/es-legacy/core/config.js.map +1 -1
  1360. package/dist/es-legacy/core/core.js +1 -1
  1361. package/dist/es-legacy/core/core.js.map +1 -1
  1362. package/dist/es-legacy/core/core.registry.js +1 -1
  1363. package/dist/es-legacy/core/core.registry.js.map +1 -1
  1364. package/dist/es-legacy/core/utils.js +1 -1
  1365. package/dist/es-legacy/core/utils.js.map +1 -1
  1366. package/dist/es-legacy/external/classnames/index.js.map +1 -1
  1367. package/dist/es-legacy/external/preact/compat/dist/compat.js +2 -0
  1368. package/dist/es-legacy/external/preact/compat/dist/compat.js.map +1 -0
  1369. package/dist/es-legacy/external/preact/dist/preact.js +1 -1
  1370. package/dist/es-legacy/external/preact/dist/preact.js.map +1 -1
  1371. package/dist/es-legacy/external/preact/hooks/dist/hooks.js +1 -1
  1372. package/dist/es-legacy/external/preact/hooks/dist/hooks.js.map +1 -1
  1373. package/dist/es-legacy/language/Language.js +1 -1
  1374. package/dist/es-legacy/language/Language.js.map +1 -1
  1375. package/dist/es-legacy/language/utils.js +1 -1
  1376. package/dist/es-legacy/language/utils.js.map +1 -1
  1377. package/dist/es-legacy/utils/Script.js +1 -1
  1378. package/dist/es-legacy/utils/Script.js.map +1 -1
  1379. package/dist/es-legacy/utils/Storage.js.map +1 -1
  1380. package/dist/es-legacy/utils/Validator/ValidationRuleResult.js.map +1 -1
  1381. package/dist/es-legacy/utils/Validator/Validator.js +1 -1
  1382. package/dist/es-legacy/utils/Validator/Validator.js.map +1 -1
  1383. package/dist/es-legacy/utils/Validator/defaultRules.js.map +1 -1
  1384. package/dist/es-legacy/utils/amount-util.js +1 -1
  1385. package/dist/es-legacy/utils/amount-util.js.map +1 -1
  1386. package/dist/es-legacy/utils/arrayUtils.js +1 -1
  1387. package/dist/es-legacy/utils/arrayUtils.js.map +1 -1
  1388. package/dist/es-legacy/utils/base64.js +1 -1
  1389. package/dist/es-legacy/utils/base64.js.map +1 -1
  1390. package/dist/es-legacy/utils/clipboard.js +1 -1
  1391. package/dist/es-legacy/utils/clipboard.js.map +1 -1
  1392. package/dist/es-legacy/utils/commonUtils.js +1 -1
  1393. package/dist/es-legacy/utils/commonUtils.js.map +1 -1
  1394. package/dist/es-legacy/utils/debounce.js +1 -1
  1395. package/dist/es-legacy/utils/debounce.js.map +1 -1
  1396. package/dist/es-legacy/utils/detectInIframe.js.map +1 -1
  1397. package/dist/es-legacy/utils/get-issuer-image.js +1 -1
  1398. package/dist/es-legacy/utils/get-issuer-image.js.map +1 -1
  1399. package/dist/es-legacy/utils/get-process-message-handler.js.map +1 -1
  1400. package/dist/es-legacy/utils/getErrorMessage.js.map +1 -1
  1401. package/dist/es-legacy/utils/getOrigin.js.map +1 -1
  1402. package/dist/es-legacy/utils/getProp.js +1 -1
  1403. package/dist/es-legacy/utils/getProp.js.map +1 -1
  1404. package/dist/es-legacy/utils/hasOwnProperty.js.map +1 -1
  1405. package/dist/es-legacy/utils/hookUtils.js +1 -1
  1406. package/dist/es-legacy/utils/hookUtils.js.map +1 -1
  1407. package/dist/es-legacy/utils/idGenerator.js.map +1 -1
  1408. package/dist/es-legacy/utils/isValidURL.js.map +1 -1
  1409. package/dist/es-legacy/utils/promiseTimeout.js +1 -1
  1410. package/dist/es-legacy/utils/promiseTimeout.js.map +1 -1
  1411. package/dist/es-legacy/utils/regex.js.map +1 -1
  1412. package/dist/es-legacy/utils/setFocus.js.map +1 -1
  1413. package/dist/es-legacy/utils/useAutoFocus.js +1 -1
  1414. package/dist/es-legacy/utils/useAutoFocus.js.map +1 -1
  1415. package/dist/es-legacy/utils/useForm/reducer.js +1 -1
  1416. package/dist/es-legacy/utils/useForm/reducer.js.map +1 -1
  1417. package/dist/es-legacy/utils/useForm/useForm.js +1 -1
  1418. package/dist/es-legacy/utils/useForm/useForm.js.map +1 -1
  1419. package/dist/es-legacy/utils/useIsMobile.js +1 -1
  1420. package/dist/es-legacy/utils/useIsMobile.js.map +1 -1
  1421. package/dist/es-legacy/utils/uuid.js +1 -1
  1422. package/dist/es-legacy/utils/uuid.js.map +1 -1
  1423. package/dist/es-legacy/utils/validator-utils.js.map +1 -1
  1424. package/package.json +7 -8
  1425. package/styles/adyen.css +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"AddressSearch.js","sources":["../../../../../../src/components/internal/Address/components/AddressSearch.tsx"],"sourcesContent":["import Field from '../../FormFields/Field';\nimport { h } from 'preact';\nimport { AddressLookupItem } from '../types';\nimport { useCallback, useEffect, useState, useMemo } from 'preact/hooks';\nimport './AddressSearch.scss';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { debounce } from '../../../../utils/debounce';\nimport Select from '../../FormFields/Select';\nimport { AddressData } from '../../../../types';\n\nexport type OnAddressLookupType = (\n value: string,\n actions: {\n resolve: (value: Array<AddressLookupItem>) => void;\n reject: (reason?: any) => void;\n }\n) => Promise<void>;\n\nexport type OnAddressSelectedType = (\n value: string,\n actions: {\n resolve: (value: AddressLookupItem) => void;\n reject: (reason?: any) => void;\n }\n) => Promise<void>;\n\ninterface AddressSearchProps {\n onAddressLookup?: OnAddressLookupType;\n onAddressSelected?: OnAddressSelectedType;\n onSelect: (addressItem: AddressData) => void;\n onManualAddress: any;\n externalErrorMessage: string;\n hideManualButton: boolean;\n showContextualElement?: boolean;\n contextualText?: string;\n placeholder?: string;\n addressSearchDebounceMs?: number;\n}\n\ninterface RejectionReason {\n errorMessage: string;\n}\n\nexport default function AddressSearch({\n onAddressLookup,\n onAddressSelected,\n onSelect,\n onManualAddress,\n externalErrorMessage,\n hideManualButton,\n showContextualElement,\n contextualText,\n placeholder,\n addressSearchDebounceMs\n}: Readonly<AddressSearchProps>) {\n const [formattedData, setFormattedData] = useState([]);\n const [originalData, setOriginalData] = useState([]);\n\n const [errorMessage, setErrorMessage] = useState('');\n\n const { i18n } = useCoreContext();\n const mapDataToSelect = data => data.map(({ id, name }) => ({ id, name }));\n\n const handlePromiseReject = useCallback((reason: RejectionReason) => {\n if (reason?.errorMessage) {\n setErrorMessage(reason.errorMessage);\n }\n }, []);\n\n const onTextInput = useCallback(\n (inputValue: string) => {\n new Promise<Array<AddressLookupItem>>((resolve, reject) => {\n void onAddressLookup(inputValue, { resolve, reject });\n })\n .then(searchArray => {\n setOriginalData(searchArray);\n setFormattedData(mapDataToSelect(searchArray));\n setErrorMessage('');\n })\n .catch(reason => handlePromiseReject(reason));\n },\n [onAddressLookup]\n );\n\n // update error message when there's a new one\n useEffect(() => {\n setErrorMessage(externalErrorMessage);\n }, [externalErrorMessage]);\n\n const onSelectItem = event => {\n if (!event.target.value) {\n setErrorMessage(i18n.get('address.errors.incomplete'));\n return;\n }\n const value = originalData.find(item => item.id === event.target.value);\n\n // 1. in case we don't get a function just select item\n if (typeof onAddressSelected !== 'function') {\n onSelect(value);\n setFormattedData([]);\n return;\n }\n\n // 2. in case callback is provided, create and call onAddressSelected\n new Promise<AddressLookupItem>((resolve, reject) => {\n void onAddressSelected(value, { resolve, reject });\n })\n .then(fullData => {\n onSelect(fullData);\n setFormattedData([]);\n })\n .catch(reason => handlePromiseReject(reason));\n };\n\n const debounceInputHandler = useMemo(() => debounce(onTextInput, addressSearchDebounceMs), []);\n\n return (\n <div className={'adyen-checkout__address-search adyen-checkout__field-group'}>\n <Field\n label={i18n.get('address')}\n classNameModifiers={['address-search']}\n errorMessage={errorMessage}\n name={'address-search'}\n showContextualElement={showContextualElement}\n contextualText={contextualText}\n >\n <Select\n name={'address-search'}\n className={'adyen-checkout__address-search__dropdown'}\n placeholder={placeholder}\n onInput={debounceInputHandler}\n items={formattedData}\n onChange={onSelectItem}\n disableTextFilter={true}\n blurOnClose={true}\n />\n </Field>\n {!hideManualButton && (\n <span className=\"adyen-checkout__address-search__manual-add\">\n <button\n type=\"button\"\n className=\"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link adyen-checkout__address-search__manual-add__button\"\n onClick={onManualAddress}\n >\n {'+ ' + i18n.get('address.enterManually')}\n </button>\n </span>\n )}\n </div>\n );\n}\n"],"names":["AddressSearch","onAddressLookup","onAddressSelected","onSelect","onManualAddress","externalErrorMessage","hideManualButton","showContextualElement","contextualText","placeholder","addressSearchDebounceMs","formattedData","setFormattedData","useState","originalData","setOriginalData","errorMessage","setErrorMessage","i18n","useCoreContext","handlePromiseReject","useCallback","reason","onTextInput","inputValue","Promise","resolve","reject","then","searchArray","map","id","name","catch","useEffect","debounceInputHandler","useMemo","debounce","h","div","className","Field","label","get","classNameModifiers","Select","onInput","items","onChange","event","target","value","find","item","fullData","disableTextFilter","blurOnClose","span","button","type","onClick"],"mappings":"saA2Ce,SAASA,GAAcC,gBAClCA,EAAeC,kBACfA,EAAiBC,SACjBA,EAAQC,gBACRA,EAAeC,qBACfA,EAAoBC,iBACpBA,EAAgBC,sBAChBA,EAAqBC,eACrBA,EAAcC,YACdA,EAAWC,wBACXA,IAEA,MAAOC,EAAeC,GAAoBC,EAAS,KAC5CC,EAAcC,GAAmBF,EAAS,KAE1CG,EAAcC,GAAmBJ,EAAS,KAE3CK,KAAEA,GAASC,IAGXC,EAAsBC,GAAaC,KACjCA,aAAAA,EAAAA,EAAQN,eACRC,EAAgBK,EAAON,aAC3B,GACD,IAEGO,EAAcF,GACfG,IACG,IAAIC,SAAkC,CAACC,EAASC,KACvC1B,EAAgBuB,EAAY,CAAEE,UAASC,UAAO,IAElDC,MAAKC,IACFd,EAAgBc,GAChBjB,EAAiCiB,EAfZC,KAAI,EAAGC,KAAIC,WAAY,CAAED,KAAIC,YAgBlDf,EAAgB,GAAA,IAEnBgB,OAAMX,GAAUF,EAAoBE,IAAAA,GAE7C,CAACrB,IAILiC,GAAU,KACNjB,EAAgBZ,EAAAA,GACjB,CAACA,IAEJ,MAyBM8B,EAAuBC,GAAQ,IAAMC,EAASd,EAAab,IAA0B,IAE3F,OACI4B,EAACC,MAAAA,CAAIC,UAAW,8DACZF,EAACG,EAAAA,CACGC,MAAOxB,EAAKyB,IAAI,WAChBC,mBAAoB,CAAC,kBACrB5B,aAAcA,EACdgB,KAAM,iBACNzB,sBAAuBA,EACvBC,eAAgBA,GAEhB8B,EAACO,EAAAA,CACGb,KAAM,iBACNQ,UAAW,2CACX/B,YAAaA,EACbqC,QAASX,EACTY,MAAOpC,EACPqC,SA3CKC,IACjB,IAAKA,EAAMC,OAAOC,MAEd,YADAlC,EAAgBC,EAAKyB,IAAI,8BAG7B,MAAMQ,EAAQrC,EAAasC,MAAKC,GAAQA,EAAKtB,KAAOkB,EAAMC,OAAOC,QAGjE,GAAiC,mBAAtBjD,EAGP,OAFAC,EAASgD,QACTvC,EAAiB,IAKrB,IAAIa,SAA2B,CAACC,EAASC,KAChCzB,EAAkBiD,EAAO,CAAEzB,UAASC,UAAO,IAE/CC,MAAK0B,IACFnD,EAASmD,GACT1C,EAAiB,GAAE,IAEtBqB,OAAMX,GAAUF,EAAoBE,IAAAA,EAsB7BiC,mBAAmB,EACnBC,aAAa,MAGnBlD,GACEgC,EAACmB,OAAAA,CAAKjB,UAAU,8CACZF,EAACoB,SAAAA,CACGC,KAAK,SACLnB,UAAU,wIACVoB,QAASxD,GAER,KAAOc,EAAKyB,IAAI,2BAMzC"}
1
+ {"version":3,"file":"AddressSearch.js","sources":["../../../../../../src/components/internal/Address/components/AddressSearch.tsx"],"sourcesContent":["import Field from '../../FormFields/Field';\nimport { h } from 'preact';\nimport { AddressLookupItem } from '../types';\nimport { useCallback, useEffect, useState, useMemo } from 'preact/hooks';\nimport './AddressSearch.scss';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { debounce } from '../../../../utils/debounce';\nimport Select from '../../FormFields/Select';\nimport { AddressData } from '../../../../types';\n\nexport type OnAddressLookupType = (\n value: string,\n actions: {\n resolve: (value: Array<AddressLookupItem>) => void;\n reject: (reason?: any) => void;\n }\n) => Promise<void>;\n\nexport type OnAddressSelectedType = (\n value: string,\n actions: {\n resolve: (value: AddressLookupItem) => void;\n reject: (reason?: any) => void;\n }\n) => Promise<void>;\n\ninterface AddressSearchProps {\n onAddressLookup?: OnAddressLookupType;\n onAddressSelected?: OnAddressSelectedType;\n onSelect: (addressItem: AddressData) => void;\n onManualAddress: any;\n externalErrorMessage: string;\n hideManualButton: boolean;\n showContextualElement?: boolean;\n contextualText?: string;\n placeholder?: string;\n addressSearchDebounceMs?: number;\n}\n\ninterface RejectionReason {\n errorMessage: string;\n}\n\nexport default function AddressSearch({\n onAddressLookup,\n onAddressSelected,\n onSelect,\n onManualAddress,\n externalErrorMessage,\n hideManualButton,\n showContextualElement,\n contextualText,\n placeholder,\n addressSearchDebounceMs\n}: Readonly<AddressSearchProps>) {\n const [formattedData, setFormattedData] = useState([]);\n const [originalData, setOriginalData] = useState([]);\n\n const [errorMessage, setErrorMessage] = useState('');\n\n const { i18n } = useCoreContext();\n const mapDataToSelect = data => data.map(({ id, name }) => ({ id, name }));\n\n const handlePromiseReject = useCallback((reason: RejectionReason) => {\n if (reason?.errorMessage) {\n setErrorMessage(reason.errorMessage);\n }\n }, []);\n\n const onTextInput = useCallback(\n (inputValue: string) => {\n new Promise<Array<AddressLookupItem>>((resolve, reject) => {\n void onAddressLookup(inputValue, { resolve, reject });\n })\n .then(searchArray => {\n setOriginalData(searchArray);\n setFormattedData(mapDataToSelect(searchArray));\n setErrorMessage('');\n })\n .catch(reason => handlePromiseReject(reason));\n },\n [onAddressLookup]\n );\n\n // update error message when there's a new one\n useEffect(() => {\n setErrorMessage(externalErrorMessage);\n }, [externalErrorMessage]);\n\n const onSelectItem = event => {\n if (!event.target.value) {\n setErrorMessage(i18n.get('address.errors.incomplete'));\n return;\n }\n const value = originalData.find(item => item.id === event.target.value);\n\n // 1. in case we don't get a function just select item\n if (typeof onAddressSelected !== 'function') {\n onSelect(value);\n setFormattedData([]);\n return;\n }\n\n // 2. in case callback is provided, create and call onAddressSelected\n new Promise<AddressLookupItem>((resolve, reject) => {\n void onAddressSelected(value, { resolve, reject });\n })\n .then(fullData => {\n onSelect(fullData);\n setFormattedData([]);\n })\n .catch(reason => handlePromiseReject(reason));\n };\n\n const debounceInputHandler = useMemo(() => debounce(onTextInput, addressSearchDebounceMs), []);\n\n return (\n <div className={'adyen-checkout__address-search adyen-checkout__field-group'}>\n <Field\n label={i18n.get('address')}\n classNameModifiers={['address-search']}\n errorMessage={errorMessage}\n name={'address-search'}\n showContextualElement={showContextualElement}\n contextualText={contextualText}\n >\n <Select\n name={'address-search'}\n className={'adyen-checkout__address-search__dropdown'}\n placeholder={placeholder}\n onInput={debounceInputHandler}\n items={formattedData}\n onChange={onSelectItem}\n disableTextFilter={true}\n blurOnClose={true}\n />\n </Field>\n {!hideManualButton && (\n <span className=\"adyen-checkout__address-search__manual-add\">\n <button\n type=\"button\"\n className=\"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link adyen-checkout__address-search__manual-add__button\"\n onClick={onManualAddress}\n >\n {'+ ' + i18n.get('address.enterManually')}\n </button>\n </span>\n )}\n </div>\n );\n}\n"],"names":["AddressSearch","onAddressLookup","onAddressSelected","onSelect","onManualAddress","externalErrorMessage","hideManualButton","showContextualElement","contextualText","placeholder","addressSearchDebounceMs","formattedData","setFormattedData","useState","originalData","setOriginalData","errorMessage","setErrorMessage","i18n","useCoreContext","handlePromiseReject","useCallback","reason","onTextInput","inputValue","Promise","resolve","reject","then","searchArray","map","id","name","catch","useEffect","debounceInputHandler","useMemo","debounce","h","div","className","Field","label","get","classNameModifiers","Select","onInput","items","onChange","event","target","value","find","item","fullData","disableTextFilter","blurOnClose","span","button","type","onClick"],"mappings":"saA2Ce,SAASA,GAAcC,gBAClCA,EAAeC,kBACfA,EAAiBC,SACjBA,EAAQC,gBACRA,EAAeC,qBACfA,EAAoBC,iBACpBA,EAAgBC,sBAChBA,EAAqBC,eACrBA,EAAcC,YACdA,EAAWC,wBACXA,IAEA,MAAOC,EAAeC,GAAoBC,EAAS,KAC5CC,EAAcC,GAAmBF,EAAS,KAE1CG,EAAcC,GAAmBJ,EAAS,KAE3CK,KAAEA,GAASC,IAGXC,EAAsBC,EAAaC,KACjCA,aAAAA,EAAAA,EAAQN,eACRC,EAAgBK,EAAON,eAE5B,IAEGO,EAAcF,EACfG,IACG,IAAIC,QAAkC,CAACC,EAASC,KACvC1B,EAAgBuB,EAAY,CAAEE,UAASC,aAE3CC,KAAKC,IACFd,EAAgBc,GAChBjB,EAAiCiB,EAfZC,IAAI,EAAGC,KAAIC,WAAM,CAAQD,KAAIC,WAgBlDf,EAAgB,MAEnBgB,MAAMX,GAAUF,EAAoBE,KAE7C,CAACrB,IAILiC,EAAU,KACNjB,EAAgBZ,IACjB,CAACA,IAEJ,MAyBM8B,EAAuBC,EAAQ,IAAMC,EAASd,EAAab,GAA0B,IAE3F,OACI4B,EAACC,MAAAA,CAAIC,UAAW,8DACZF,EAACG,EAAAA,CACGC,MAAOxB,EAAKyB,IAAI,WAChBC,mBAAoB,CAAC,kBACrB5B,aAAcA,EACdgB,KAAM,iBACNzB,sBAAuBA,EACvBC,eAAgBA,GAEhB8B,EAACO,EAAAA,CACGb,KAAM,iBACNQ,UAAW,2CACX/B,YAAaA,EACbqC,QAASX,EACTY,MAAOpC,EACPqC,SA3CKC,IACjB,IAAKA,EAAMC,OAAOC,MAEd,YADAlC,EAAgBC,EAAKyB,IAAI,8BAG7B,MAAMQ,EAAQrC,EAAasC,KAAKC,GAAQA,EAAKtB,KAAOkB,EAAMC,OAAOC,OAGjE,GAAiC,mBAAtBjD,EAGP,OAFAC,EAASgD,QACTvC,EAAiB,IAKrB,IAAIa,QAA2B,CAACC,EAASC,KAChCzB,EAAkBiD,EAAO,CAAEzB,UAASC,aAExCC,KAAK0B,IACFnD,EAASmD,GACT1C,EAAiB,MAEpBqB,MAAMX,GAAUF,EAAoBE,KAsB7BiC,mBAAmB,EACnBC,aAAa,MAGnBlD,GACEgC,EAACmB,OAAAA,CAAKjB,UAAU,8CACZF,EAACoB,SAAAA,CACGC,KAAK,SACLnB,UAAU,wIACVoB,QAASxD,GAER,KAAOc,EAAKyB,IAAI,2BAMzC"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../external/preact/dist/preact.js";import{useState as r,useLayoutEffect as t}from"../../../../external/preact/hooks/dist/hooks.js";import o from"../../FormFields/Field/Field.js";import{useCoreContext as n}from"../../../../core/Context/CoreProvider.js";import c from"../../../../core/Services/get-dataset.js";import s from"../../FormFields/Select/Select.js";function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}const l=(e,r)=>{const t=e=>i(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){a(e,r,t[r])}))}return e}({},e),{name:e.name,selectedOptionName:e.name});return r.length?e.filter((e=>r.includes(e.id))).map(t):e.map(t)};function u(a){const{allowedCountries:i=[],classNameModifiers:u=[],errorMessage:p,onDropdownChange:m,value:f,required:d}=a,{i18n:y,loadingContext:O}=n(),[b,j]=r([]),[g,h]=r(!1),[w,P]=r(a.readOnly);return t((()=>{c("countries",O,y.locale).then((e=>{const r=l(e,i);j(r||[]),P(1===r.length||w),h(!0)})).catch((e=>{console.error(e),j([]),h(!0)}))}),[]),g?e(o,{name:"country",label:y.get("country"),errorMessage:p,classNameModifiers:u,isValid:!!f,showValidIcon:!1,i18n:y,readOnly:w&&!!f},e(s,{onChange:m,name:"country",selectedValue:f,items:b,readonly:w&&!!f,required:d})):null}export{u as default};
1
+ import{createElement as e}from"../../../../external/preact/dist/preact.js";import{useState as r,useLayoutEffect as t}from"../../../../external/preact/hooks/dist/hooks.js";import o from"../../FormFields/Field/Field.js";import{useCoreContext as n}from"../../../../core/Context/CoreProvider.js";import c from"../../../../core/Services/get-dataset.js";import s from"../../FormFields/Select/Select.js";function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}const l=(e,r)=>{const t=e=>i(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.forEach(function(r){a(e,r,t[r])})}return e}({},e),{name:e.name,selectedOptionName:e.name});return r.length?e.filter(e=>r.includes(e.id)).map(t):e.map(t)};function u(a){const{allowedCountries:i=[],classNameModifiers:u=[],errorMessage:p,onDropdownChange:m,value:f,required:d}=a,{i18n:y,loadingContext:O}=n(),[b,j]=r([]),[g,h]=r(!1),[w,P]=r(a.readOnly);return t(()=>{c("countries",O,y.locale).then(e=>{const r=l(e,i);j(r||[]),P(1===r.length||w),h(!0)}).catch(e=>{console.error(e),j([]),h(!0)})},[]),g?e(o,{name:"country",label:y.get("country"),errorMessage:p,classNameModifiers:u,isValid:!!f,showValidIcon:!1,i18n:y,readOnly:w&&!!f},e(s,{onChange:m,name:"country",selectedValue:f,items:b,readonly:w&&!!f,required:d})):null}export{u as default};
2
2
  //# sourceMappingURL=CountryField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CountryField.js","sources":["../../../../../../src/components/internal/Address/components/CountryField.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useLayoutEffect, useState } from 'preact/hooks';\nimport Field from '../../FormFields/Field';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport getDataset from '../../../../core/Services/get-dataset';\nimport { CountryFieldProps, CountryFieldItem } from '../types';\nimport Select from '../../FormFields/Select';\n\nconst formatCountries = (countries: Array<CountryFieldItem>, allowedCountries: string[]) => {\n const applyFilter = (country: CountryFieldItem) => allowedCountries.includes(country.id);\n const applyMapper = (country: CountryFieldItem) => {\n return {\n ...country,\n name: country.name,\n selectedOptionName: country.name\n };\n };\n return allowedCountries.length ? countries.filter(applyFilter).map(applyMapper) : countries.map(applyMapper);\n};\n\nexport default function CountryField(props: CountryFieldProps) {\n const { allowedCountries = [], classNameModifiers = [], errorMessage, onDropdownChange, value, required } = props;\n const { i18n, loadingContext } = useCoreContext();\n const [countries, setCountries] = useState<CountryFieldItem[]>([]);\n const [loaded, setLoaded] = useState<boolean>(false);\n const [readOnly, setReadOnly] = useState(props.readOnly);\n\n useLayoutEffect(() => {\n getDataset('countries', loadingContext, i18n.locale)\n .then(response => {\n const newCountries = formatCountries(response, allowedCountries);\n setCountries(newCountries || []);\n setReadOnly(newCountries.length === 1 || readOnly);\n setLoaded(true);\n })\n .catch(error => {\n console.error(error);\n setCountries([]);\n setLoaded(true);\n });\n }, []);\n\n if (!loaded) return null;\n\n return (\n <Field\n name={'country'}\n label={i18n.get('country')}\n errorMessage={errorMessage}\n classNameModifiers={classNameModifiers}\n isValid={!!value}\n showValidIcon={false}\n i18n={i18n}\n readOnly={readOnly && !!value}\n >\n <Select\n onChange={onDropdownChange}\n name={'country'}\n selectedValue={value}\n items={countries}\n readonly={readOnly && !!value}\n required={required}\n />\n </Field>\n );\n}\n"],"names":["formatCountries","countries","allowedCountries","applyMapper","country","_object_spread_props","name","selectedOptionName","length","filter","includes","id","map","CountryField","props","classNameModifiers","errorMessage","onDropdownChange","value","required","i18n","loadingContext","useCoreContext","setCountries","useState","loaded","setLoaded","readOnly","setReadOnly","useLayoutEffect","getDataset","locale","then","response","newCountries","catch","error","console","h","Field","label","get","isValid","showValidIcon","Select","onChange","selectedValue","items","readonly"],"mappings":"o3BAQA,MAAMA,EAAkB,CAACC,EAAoCC,KACzD,MACMC,EAAeC,GACVC,wUACAD,CAAAA,CAAAA,EAAAA,GAAAA,CACHE,KAAMF,EAAQE,KACdC,mBAAoBH,EAAQE,OAGpC,OAAOJ,EAAiBM,OAASP,EAAUQ,QARtBL,GAA8BF,EAAiBQ,SAASN,EAAQO,MAQtBC,IAAIT,GAAeF,EAAUW,IAAIT,EAAAA,EAGrF,SAASU,EAAaC,GACjC,MAAMZ,iBAAEA,EAAmB,GAAEa,mBAAEA,EAAqB,GAAEC,aAAEA,EAAYC,iBAAEA,EAAgBC,MAAEA,EAAKC,SAAEA,GAAaL,GACtGM,KAAEA,EAAIC,eAAEA,GAAmBC,KAC1BrB,EAAWsB,GAAgBC,EAA6B,KACxDC,EAAQC,GAAaF,GAAkB,IACvCG,EAAUC,GAAeJ,EAASV,EAAMa,UAiB/C,OAfAE,GAAgB,KACZC,EAAW,YAAaT,EAAgBD,EAAKW,QACxCC,MAAKC,IACF,MAAMC,EAAelC,EAAgBiC,EAAU/B,GAC/CqB,EAAaW,GAAgB,IAC7BN,EAAoC,IAAxBM,EAAa1B,QAAgBmB,GACzCD,GAAU,EAAA,IAEbS,OAAMC,IACHC,QAAQD,MAAMA,GACdb,EAAa,IACbG,GAAU,EAAA,GACd,GACL,IAEED,EAGDa,EAACC,EAAAA,CACGjC,KAAM,UACNkC,MAAOpB,EAAKqB,IAAI,WAChBzB,aAAcA,EACdD,mBAAoBA,EACpB2B,UAAWxB,EACXyB,eAAe,EACfvB,KAAMA,EACNO,SAAUA,KAAcT,GAExBoB,EAACM,EAAAA,CACGC,SAAU5B,EACVX,KAAM,UACNwC,cAAe5B,EACf6B,MAAO9C,EACP+C,SAAUrB,KAAcT,EACxBC,SAAUA,KAnBF,IAuBxB"}
1
+ {"version":3,"file":"CountryField.js","sources":["../../../../../../src/components/internal/Address/components/CountryField.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useLayoutEffect, useState } from 'preact/hooks';\nimport Field from '../../FormFields/Field';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport getDataset from '../../../../core/Services/get-dataset';\nimport { CountryFieldProps, CountryFieldItem } from '../types';\nimport Select from '../../FormFields/Select';\n\nconst formatCountries = (countries: Array<CountryFieldItem>, allowedCountries: string[]) => {\n const applyFilter = (country: CountryFieldItem) => allowedCountries.includes(country.id);\n const applyMapper = (country: CountryFieldItem) => {\n return {\n ...country,\n name: country.name,\n selectedOptionName: country.name\n };\n };\n return allowedCountries.length ? countries.filter(applyFilter).map(applyMapper) : countries.map(applyMapper);\n};\n\nexport default function CountryField(props: CountryFieldProps) {\n const { allowedCountries = [], classNameModifiers = [], errorMessage, onDropdownChange, value, required } = props;\n const { i18n, loadingContext } = useCoreContext();\n const [countries, setCountries] = useState<CountryFieldItem[]>([]);\n const [loaded, setLoaded] = useState<boolean>(false);\n const [readOnly, setReadOnly] = useState(props.readOnly);\n\n useLayoutEffect(() => {\n getDataset('countries', loadingContext, i18n.locale)\n .then(response => {\n const newCountries = formatCountries(response, allowedCountries);\n setCountries(newCountries || []);\n setReadOnly(newCountries.length === 1 || readOnly);\n setLoaded(true);\n })\n .catch(error => {\n console.error(error);\n setCountries([]);\n setLoaded(true);\n });\n }, []);\n\n if (!loaded) return null;\n\n return (\n <Field\n name={'country'}\n label={i18n.get('country')}\n errorMessage={errorMessage}\n classNameModifiers={classNameModifiers}\n isValid={!!value}\n showValidIcon={false}\n i18n={i18n}\n readOnly={readOnly && !!value}\n >\n <Select\n onChange={onDropdownChange}\n name={'country'}\n selectedValue={value}\n items={countries}\n readonly={readOnly && !!value}\n required={required}\n />\n </Field>\n );\n}\n"],"names":["formatCountries","countries","allowedCountries","applyMapper","country","_object_spread_props","_object_spread","name","selectedOptionName","length","filter","includes","id","map","CountryField","props","classNameModifiers","errorMessage","onDropdownChange","value","required","i18n","loadingContext","useCoreContext","setCountries","useState","loaded","setLoaded","readOnly","setReadOnly","useLayoutEffect","getDataset","locale","then","response","newCountries","catch","error","console","h","Field","label","get","isValid","showValidIcon","Select","onChange","selectedValue","items","readonly"],"mappings":"k3BAQA,MAAMA,EAAkB,CAACC,EAAoCC,KACzD,MACMC,EAAeC,GACVC,oUAAAC,CAAA,CAAA,EACAF,GAAAA,CACHG,KAAMH,EAAQG,KACdC,mBAAoBJ,EAAQG,OAGpC,OAAOL,EAAiBO,OAASR,EAAUS,OARtBN,GAA8BF,EAAiBS,SAASP,EAAQQ,KAQtBC,IAAIV,GAAeF,EAAUY,IAAIV,IAGrF,SAASW,EAAaC,GACjC,MAAMb,iBAAEA,EAAmB,GAAEc,mBAAEA,EAAqB,GAAEC,aAAEA,EAAYC,iBAAEA,EAAgBC,MAAEA,EAAKC,SAAEA,GAAaL,GACtGM,KAAEA,EAAIC,eAAEA,GAAmBC,KAC1BtB,EAAWuB,GAAgBC,EAA6B,KACxDC,EAAQC,GAAaF,GAAkB,IACvCG,EAAUC,GAAeJ,EAASV,EAAMa,UAiB/C,OAfAE,EAAgB,KACZC,EAAW,YAAaT,EAAgBD,EAAKW,QACxCC,KAAKC,IACF,MAAMC,EAAenC,EAAgBkC,EAAUhC,GAC/CsB,EAAaW,GAAgB,IAC7BN,EAAoC,IAAxBM,EAAa1B,QAAgBmB,GACzCD,GAAU,KAEbS,MAAMC,IACHC,QAAQD,MAAMA,GACdb,EAAa,IACbG,GAAU,MAEnB,IAEED,EAGDa,EAACC,EAAAA,CACGjC,KAAM,UACNkC,MAAOpB,EAAKqB,IAAI,WAChBzB,aAAcA,EACdD,mBAAoBA,EACpB2B,UAAWxB,EACXyB,eAAe,EACfvB,KAAMA,EACNO,SAAUA,KAAcT,GAExBoB,EAACM,EAAAA,CACGC,SAAU5B,EACVX,KAAM,UACNwC,cAAe5B,EACf6B,MAAO/C,EACPgD,SAAUrB,KAAcT,EACxBC,SAAUA,KAnBF,IAuBxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContainer.js","sources":["../../../../../../src/components/internal/Address/components/FieldContainer.tsx"],"sourcesContent":["import { h } from 'preact';\nimport Field from '../../FormFields/Field';\nimport StateField from './StateField';\nimport CountryField from './CountryField';\nimport { AddressStateError, FieldContainerProps } from '../types';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport Language from '../../../../language/Language';\nimport InputText from '../../FormFields/InputText';\n\nfunction getErrorMessage(errors: AddressStateError, fieldName: string, i18n: Language, label: string): string | boolean {\n if (typeof errors[fieldName]?.errorMessage === 'object') {\n const { translationKey, translationObject } = errors[fieldName].errorMessage;\n return i18n.get(translationKey, translationObject);\n }\n // Default error msg: Enter the [label name]\n const errorMsg = i18n.get(errors[fieldName]?.errorMessage, { values: { label: label.toLowerCase() } });\n return errorMsg || !!errors[fieldName];\n}\n\n/**\n * USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component\n *\n * NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component\n * - then you should implement <CountryField> or <StateField> directly\n */\nfunction FieldContainer(props: FieldContainerProps) {\n const { i18n } = useCoreContext();\n const { classNameModifiers = [], data, errors, valid, fieldName, onInput, onBlur, trimOnBlur, maxLength, disabled } = props;\n\n const value: string = data[fieldName];\n const selectedCountry: string = data.country;\n const isOptional: boolean = props.specifications.countryHasOptionalField(selectedCountry, fieldName);\n const labelKey: string = props.specifications.getKeyForField(fieldName, selectedCountry);\n const optionalLabel = isOptional ? ` ${i18n.get('field.title.optional')}` : '';\n const label = `${i18n.get(labelKey)}${optionalLabel}`;\n const errorMessage = getErrorMessage(errors, fieldName, i18n, label);\n\n switch (fieldName) {\n case 'country':\n return (\n <CountryField\n allowedCountries={props.allowedCountries}\n classNameModifiers={classNameModifiers}\n label={label}\n errorMessage={errorMessage}\n onDropdownChange={props.onDropdownChange}\n value={value}\n required={!isOptional}\n />\n );\n case 'stateOrProvince':\n return (\n <StateField\n classNameModifiers={classNameModifiers}\n label={label}\n errorMessage={errorMessage}\n onDropdownChange={props.onDropdownChange}\n selectedCountry={selectedCountry}\n specifications={props.specifications}\n value={value}\n required={!isOptional}\n />\n );\n default:\n return (\n <Field\n label={label}\n classNameModifiers={classNameModifiers}\n errorMessage={errorMessage}\n isValid={valid[fieldName]}\n name={fieldName}\n i18n={i18n}\n onFocus={e => props.onFieldFocusAnalytics(fieldName, e)}\n onBlur={e => props.onFieldBlurAnalytics(fieldName, e)}\n >\n <InputText\n name={fieldName}\n classNameModifiers={classNameModifiers}\n value={value}\n onInput={onInput}\n onBlur={onBlur}\n maxlength={maxLength}\n trimOnBlur={trimOnBlur}\n disabled={disabled}\n required={!isOptional}\n />\n </Field>\n );\n }\n}\n\nexport default FieldContainer;\n"],"names":["FieldContainer","props","i18n","useCoreContext","classNameModifiers","data","errors","valid","fieldName","onInput","onBlur","trimOnBlur","maxLength","disabled","value","selectedCountry","country","isOptional","specifications","countryHasOptionalField","labelKey","getKeyForField","optionalLabel","get","label","errorMessage","translationKey","translationObject","values","toLowerCase","getErrorMessage","h","CountryField","allowedCountries","onDropdownChange","required","StateField","Field","isValid","name","onFocus","e","onFieldFocusAnalytics","onFieldBlurAnalytics","InputText","maxlength"],"mappings":"iTAyBA,SAASA,EAAeC,GACpB,MAAMC,KAAEA,GAASC,KACXC,mBAAEA,EAAqB,GAAEC,KAAEA,EAAIC,OAAEA,EAAMC,MAAEA,EAAKC,UAAEA,EAASC,QAAEA,EAAOC,OAAEA,EAAMC,WAAEA,EAAUC,UAAEA,EAASC,SAAEA,GAAaZ,EAEhHa,EAAgBT,EAAKG,GACrBO,EAA0BV,EAAKW,QAC/BC,EAAsBhB,EAAMiB,eAAeC,wBAAwBJ,EAAiBP,GACpFY,EAAmBnB,EAAMiB,eAAeG,eAAeb,EAAWO,GAClEO,EAAgBL,EAAa,IAAIf,EAAKqB,IAAI,0BAA4B,GACtEC,EAAQ,GAAGtB,EAAKqB,IAAIH,KAAYE,IAChCG,EA1BV,SAAyBnB,EAA2BE,EAAmBN,EAAgBsB,OACxElB,EAKeA,EAL1B,GAA+C,yBAApCA,EAAAA,EAAOE,UAAPF,IAAAA,OAAAA,EAAAA,EAAmBmB,cAA2B,CACrD,MAAMC,eAAEA,EAAcC,kBAAEA,GAAsBrB,EAAOE,GAAWiB,aAChE,OAAOvB,EAAKqB,IAAIG,EAAgBC,EACpC,CAGA,OADiBzB,EAAKqB,IAAIjB,QAAAA,EAAAA,EAAOE,UAAPF,IAAAA,OAAAA,EAAAA,EAAmBmB,aAAc,CAAEG,OAAQ,CAAEJ,MAAOA,EAAMK,oBAC/DvB,EAAOE,EAChC,CAkByBsB,CAAgBxB,EAAQE,EAAWN,EAAMsB,GAE9D,OAAQhB,GACJ,IAAK,UACD,OACIuB,EAACC,EAAAA,CACGC,iBAAkBhC,EAAMgC,iBACxB7B,mBAAoBA,EACpBoB,MAAOA,EACPC,aAAcA,EACdS,iBAAkBjC,EAAMiC,iBACxBpB,MAAOA,EACPqB,UAAWlB,IAGvB,IAAK,kBACD,OACIc,EAACK,EAAAA,CACGhC,mBAAoBA,EACpBoB,MAAOA,EACPC,aAAcA,EACdS,iBAAkBjC,EAAMiC,iBACxBnB,gBAAiBA,EACjBG,eAAgBjB,EAAMiB,eACtBJ,MAAOA,EACPqB,UAAWlB,IAGvB,QACI,OACIc,EAACM,EAAAA,CACGb,MAAOA,EACPpB,mBAAoBA,EACpBqB,aAAcA,EACda,QAAS/B,EAAMC,GACf+B,KAAM/B,EACNN,KAAMA,EACNsC,QAASC,GAAKxC,EAAMyC,sBAAsBlC,EAAWiC,GACrD/B,OAAQ+B,GAAKxC,EAAM0C,qBAAqBnC,EAAWiC,IAEnDV,EAACa,EAAAA,CACGL,KAAM/B,EACNJ,mBAAoBA,EACpBU,MAAOA,EACPL,QAASA,EACTC,OAAQA,EACRmC,UAAWjC,EACXD,WAAYA,EACZE,SAAUA,EACVsB,UAAWlB,KAKnC"}
1
+ {"version":3,"file":"FieldContainer.js","sources":["../../../../../../src/components/internal/Address/components/FieldContainer.tsx"],"sourcesContent":["import { h } from 'preact';\nimport Field from '../../FormFields/Field';\nimport StateField from './StateField';\nimport CountryField from './CountryField';\nimport { AddressStateError, FieldContainerProps } from '../types';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport Language from '../../../../language/Language';\nimport InputText from '../../FormFields/InputText';\n\nfunction getErrorMessage(errors: AddressStateError, fieldName: string, i18n: Language, label: string): string | boolean {\n if (typeof errors[fieldName]?.errorMessage === 'object') {\n const { translationKey, translationObject } = errors[fieldName].errorMessage;\n return i18n.get(translationKey, translationObject);\n }\n // Default error msg: Enter the [label name]\n const errorMsg = i18n.get(errors[fieldName]?.errorMessage, { values: { label: label.toLowerCase() } });\n return errorMsg || !!errors[fieldName];\n}\n\n/**\n * USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component\n *\n * NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component\n * - then you should implement <CountryField> or <StateField> directly\n */\nfunction FieldContainer(props: FieldContainerProps) {\n const { i18n } = useCoreContext();\n const { classNameModifiers = [], data, errors, valid, fieldName, onInput, onBlur, trimOnBlur, maxLength, disabled } = props;\n\n const value: string = data[fieldName];\n const selectedCountry: string = data.country;\n const isOptional: boolean = props.specifications.countryHasOptionalField(selectedCountry, fieldName);\n const labelKey: string = props.specifications.getKeyForField(fieldName, selectedCountry);\n const optionalLabel = isOptional ? ` ${i18n.get('field.title.optional')}` : '';\n const label = `${i18n.get(labelKey)}${optionalLabel}`;\n const errorMessage = getErrorMessage(errors, fieldName, i18n, label);\n\n switch (fieldName) {\n case 'country':\n return (\n <CountryField\n allowedCountries={props.allowedCountries}\n classNameModifiers={classNameModifiers}\n label={label}\n errorMessage={errorMessage}\n onDropdownChange={props.onDropdownChange}\n value={value}\n required={!isOptional}\n />\n );\n case 'stateOrProvince':\n return (\n <StateField\n classNameModifiers={classNameModifiers}\n label={label}\n errorMessage={errorMessage}\n onDropdownChange={props.onDropdownChange}\n selectedCountry={selectedCountry}\n specifications={props.specifications}\n value={value}\n required={!isOptional}\n />\n );\n default:\n return (\n <Field\n label={label}\n classNameModifiers={classNameModifiers}\n errorMessage={errorMessage}\n isValid={valid[fieldName]}\n name={fieldName}\n i18n={i18n}\n onFocus={e => props.onFieldFocusAnalytics(fieldName, e)}\n onBlur={e => props.onFieldBlurAnalytics(fieldName, e)}\n >\n <InputText\n name={fieldName}\n classNameModifiers={classNameModifiers}\n value={value}\n onInput={onInput}\n onBlur={onBlur}\n maxlength={maxLength}\n trimOnBlur={trimOnBlur}\n disabled={disabled}\n required={!isOptional}\n />\n </Field>\n );\n }\n}\n\nexport default FieldContainer;\n"],"names":["FieldContainer","props","i18n","useCoreContext","classNameModifiers","data","errors","valid","fieldName","onInput","onBlur","trimOnBlur","maxLength","disabled","value","selectedCountry","country","isOptional","specifications","countryHasOptionalField","labelKey","getKeyForField","optionalLabel","get","label","errorMessage","translationKey","translationObject","values","toLowerCase","getErrorMessage","h","CountryField","allowedCountries","onDropdownChange","required","StateField","Field","isValid","name","onFocus","e","onFieldFocusAnalytics","onFieldBlurAnalytics","InputText","maxlength"],"mappings":"iTAyBA,SAASA,EAAeC,GACpB,MAAMC,KAAEA,GAASC,KACXC,mBAAEA,EAAqB,GAAEC,KAAEA,EAAIC,OAAEA,EAAMC,MAAEA,EAAKC,UAAEA,EAASC,QAAEA,EAAOC,OAAEA,EAAMC,WAAEA,EAAUC,UAAEA,EAASC,SAAEA,GAAaZ,EAEhHa,EAAgBT,EAAKG,GACrBO,EAA0BV,EAAKW,QAC/BC,EAAsBhB,EAAMiB,eAAeC,wBAAwBJ,EAAiBP,GACpFY,EAAmBnB,EAAMiB,eAAeG,eAAeb,EAAWO,GAClEO,EAAgBL,EAAa,IAAIf,EAAKqB,IAAI,0BAA4B,GACtEC,EAAQ,GAAGtB,EAAKqB,IAAIH,KAAYE,IAChCG,EA1BV,SAAyBnB,EAA2BE,EAAmBN,EAAgBsB,OACxElB,EAKeA,EAL1B,GAA+C,yBAApCA,EAAAA,EAAOE,UAAPF,IAAAA,OAAAA,EAAAA,EAAmBmB,cAA2B,CACrD,MAAMC,eAAEA,EAAcC,kBAAEA,GAAsBrB,EAAOE,GAAWiB,aAChE,OAAOvB,EAAKqB,IAAIG,EAAgBC,EACpC,CAGA,OADiBzB,EAAKqB,IAAqB,QAAjBjB,EAAAA,EAAOE,UAAPF,IAAAA,OAAAA,EAAAA,EAAmBmB,aAAc,CAAEG,OAAQ,CAAEJ,MAAOA,EAAMK,oBAC/DvB,EAAOE,EAChC,CAkByBsB,CAAgBxB,EAAQE,EAAWN,EAAMsB,GAE9D,OAAQhB,GACJ,IAAK,UACD,OACIuB,EAACC,EAAAA,CACGC,iBAAkBhC,EAAMgC,iBACxB7B,mBAAoBA,EACpBoB,MAAOA,EACPC,aAAcA,EACdS,iBAAkBjC,EAAMiC,iBACxBpB,MAAOA,EACPqB,UAAWlB,IAGvB,IAAK,kBACD,OACIc,EAACK,EAAAA,CACGhC,mBAAoBA,EACpBoB,MAAOA,EACPC,aAAcA,EACdS,iBAAkBjC,EAAMiC,iBACxBnB,gBAAiBA,EACjBG,eAAgBjB,EAAMiB,eACtBJ,MAAOA,EACPqB,UAAWlB,IAGvB,QACI,OACIc,EAACM,EAAAA,CACGb,MAAOA,EACPpB,mBAAoBA,EACpBqB,aAAcA,EACda,QAAS/B,EAAMC,GACf+B,KAAM/B,EACNN,KAAMA,EACNsC,QAASC,GAAKxC,EAAMyC,sBAAsBlC,EAAWiC,GACrD/B,OAAQ+B,GAAKxC,EAAM0C,qBAAqBnC,EAAWiC,IAEnDV,EAACa,EAAAA,CACGL,KAAM/B,EACNJ,mBAAoBA,EACpBU,MAAOA,EACPL,QAASA,EACTC,OAAQA,EACRmC,UAAWjC,EACXD,WAAYA,EACZE,SAAUA,EACVsB,UAAWlB,KAKnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReadOnlyAddress.js","sources":["../../../../../../src/components/internal/Address/components/ReadOnlyAddress.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport Fieldset from '../../FormFields/Fieldset';\nimport { ReadOnlyAddressProps } from '../types';\nimport { FALLBACK_VALUE } from '../constants';\n\nconst ReadOnlyAddress = ({ data, label }: ReadOnlyAddressProps) => {\n const { street, houseNumberOrName, city, postalCode, stateOrProvince, country } = data;\n\n return (\n <Fieldset classNameModifiers={[label]} label={label} readonly>\n <Fragment>\n {!!street && street}\n {houseNumberOrName && `, ${houseNumberOrName},`}\n <br />\n {postalCode && `${postalCode}`}\n {city && `, ${city}`}\n {stateOrProvince && stateOrProvince !== FALLBACK_VALUE && `, ${stateOrProvince}`}\n {country && `, ${country} `}\n </Fragment>\n </Fieldset>\n );\n};\n\nexport default ReadOnlyAddress;\n"],"names":["ReadOnlyAddress","data","label","street","houseNumberOrName","city","postalCode","stateOrProvince","country","h","Fieldset","classNameModifiers","readonly","Fragment","br","FALLBACK_VALUE"],"mappings":"+LAKA,MAAMA,EAAkB,EAAGC,OAAMC,YAC7B,MAAMC,OAAEA,EAAMC,kBAAEA,EAAiBC,KAAEA,EAAIC,WAAEA,EAAUC,gBAAEA,EAAeC,QAAEA,GAAYP,EAElF,OACIQ,EAACC,EAAAA,CAASC,mBAAoB,CAACT,GAAQA,MAAOA,EAAOU,UAAAA,GACjDH,EAACI,SACMV,GAAUA,EACZC,GAAqB,KAAKA,KAC3BK,EAACK,KACAR,MAAAA,GAAc,GAAGA,IACjBD,GAAQ,KAAKA,IACbE,GAAmBA,IAAoBQ,GAAkB,KAAKR,IAC9DC,GAAW,KAAKA,MAAU"}
1
+ {"version":3,"file":"ReadOnlyAddress.js","sources":["../../../../../../src/components/internal/Address/components/ReadOnlyAddress.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport Fieldset from '../../FormFields/Fieldset';\nimport { ReadOnlyAddressProps } from '../types';\nimport { FALLBACK_VALUE } from '../constants';\n\nconst ReadOnlyAddress = ({ data, label }: ReadOnlyAddressProps) => {\n const { street, houseNumberOrName, city, postalCode, stateOrProvince, country } = data;\n\n return (\n <Fieldset classNameModifiers={[label]} label={label} readonly>\n <Fragment>\n {!!street && street}\n {houseNumberOrName && `, ${houseNumberOrName},`}\n <br />\n {postalCode && `${postalCode}`}\n {city && `, ${city}`}\n {stateOrProvince && stateOrProvince !== FALLBACK_VALUE && `, ${stateOrProvince}`}\n {country && `, ${country} `}\n </Fragment>\n </Fieldset>\n );\n};\n\nexport default ReadOnlyAddress;\n"],"names":["ReadOnlyAddress","data","label","street","houseNumberOrName","city","postalCode","stateOrProvince","country","h","Fieldset","classNameModifiers","readonly","Fragment","br","FALLBACK_VALUE"],"mappings":"+LAKA,MAAMA,EAAkB,EAAGC,OAAMC,YAC7B,MAAMC,OAAEA,EAAMC,kBAAEA,EAAiBC,KAAEA,EAAIC,WAAEA,EAAUC,gBAAEA,EAAeC,QAAEA,GAAYP,EAElF,OACIQ,EAACC,EAAAA,CAASC,mBAAoB,CAACT,GAAQA,MAAOA,EAAOU,UAAAA,GACjDH,EAACI,SACMV,GAAUA,EACZC,GAAqB,KAAKA,KAC3BK,EAACK,KAAAA,MACAR,GAAc,GAAGA,IACjBD,GAAQ,KAAKA,IACbE,GAAmBA,IAAoBQ,GAAkB,KAAKR,IAC9DC,GAAW,KAAKA"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../external/preact/dist/preact.js";import{useState as r,useLayoutEffect as t}from"../../../../external/preact/hooks/dist/hooks.js";import o from"../../FormFields/Field/Field.js";import{useCoreContext as s}from"../../../../core/Context/CoreProvider.js";import a from"../../../../core/Services/get-dataset.js";import i from"../../FormFields/Select/Select.js";function n(n){const{classNameModifiers:l,label:c,onDropdownChange:d,readOnly:m,selectedCountry:f,specifications:u,value:p,required:h}=n,{i18n:g,loadingContext:j}=s(),[v,y]=r([]),[C,F]=r(!1);return t((()=>{if(!f||!u.countryHasDataset(f))return y([]),void F(!0);a(`states/${f}`,j,g.locale).then((e=>{const r=e&&e.length?e:[];y(r),F(!0)})).catch((()=>{y([]),F(!0)}))}),[f]),C&&v.length?e(o,{label:c,classNameModifiers:l,errorMessage:n.errorMessage,isValid:!!p,showValidIcon:!1,name:"stateOrProvince",i18n:g,readOnly:m&&!!p},e(i,{name:"stateOrProvince",onChange:d,selectedValue:p,items:v,required:h,readonly:m&&!!p})):null}export{n as default};
1
+ import{createElement as e}from"../../../../external/preact/dist/preact.js";import{useState as r,useLayoutEffect as t}from"../../../../external/preact/hooks/dist/hooks.js";import o from"../../FormFields/Field/Field.js";import{useCoreContext as s}from"../../../../core/Context/CoreProvider.js";import a from"../../../../core/Services/get-dataset.js";import i from"../../FormFields/Select/Select.js";function n(n){const{classNameModifiers:l,label:c,onDropdownChange:d,readOnly:m,selectedCountry:f,specifications:u,value:p,required:h}=n,{i18n:g,loadingContext:j}=s(),[v,y]=r([]),[C,F]=r(!1);return t(()=>{if(!f||!u.countryHasDataset(f))return y([]),void F(!0);a(`states/${f}`,j,g.locale).then(e=>{const r=e&&e.length?e:[];y(r),F(!0)}).catch(()=>{y([]),F(!0)})},[f]),C&&v.length?e(o,{label:c,classNameModifiers:l,errorMessage:n.errorMessage,isValid:!!p,showValidIcon:!1,name:"stateOrProvince",i18n:g,readOnly:m&&!!p},e(i,{name:"stateOrProvince",onChange:d,selectedValue:p,items:v,required:h,readonly:m&&!!p})):null}export{n as default};
2
2
  //# sourceMappingURL=StateField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StateField.js","sources":["../../../../../../src/components/internal/Address/components/StateField.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useLayoutEffect } from 'preact/hooks';\nimport Field from '../../FormFields/Field';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport getDataset from '../../../../core/Services/get-dataset';\nimport { StateFieldItem, StateFieldProps } from '../types';\nimport Select from '../../FormFields/Select';\n\nexport default function StateField(props: StateFieldProps) {\n const { classNameModifiers, label, onDropdownChange, readOnly, selectedCountry, specifications, value, required } = props;\n const { i18n, loadingContext } = useCoreContext();\n const [states, setStates] = useState<StateFieldItem[]>([]);\n const [loaded, setLoaded] = useState<boolean>(false);\n\n useLayoutEffect(() => {\n if (!selectedCountry || !specifications.countryHasDataset(selectedCountry)) {\n setStates([]);\n setLoaded(true);\n return;\n }\n\n getDataset(`states/${selectedCountry}`, loadingContext, i18n.locale)\n .then(response => {\n const newStates = response && response.length ? response : [];\n setStates(newStates);\n setLoaded(true);\n })\n .catch(() => {\n setStates([]);\n setLoaded(true);\n });\n }, [selectedCountry]);\n\n if (!loaded || !states.length) return null;\n\n return (\n <Field\n label={label}\n classNameModifiers={classNameModifiers}\n errorMessage={props.errorMessage}\n isValid={!!value}\n showValidIcon={false}\n name={'stateOrProvince'}\n i18n={i18n}\n readOnly={readOnly && !!value}\n >\n <Select\n name={'stateOrProvince'}\n onChange={onDropdownChange}\n selectedValue={value}\n items={states}\n required={required}\n readonly={readOnly && !!value}\n />\n </Field>\n );\n}\n"],"names":["StateField","props","classNameModifiers","label","onDropdownChange","readOnly","selectedCountry","specifications","value","required","i18n","loadingContext","useCoreContext","states","setStates","useState","loaded","setLoaded","useLayoutEffect","countryHasDataset","getDataset","locale","then","response","newStates","length","catch","h","Field","errorMessage","isValid","showValidIcon","name","Select","onChange","selectedValue","items","readonly"],"mappings":"6YAQe,SAASA,EAAWC,GAC/B,MAAMC,mBAAEA,EAAkBC,MAAEA,EAAKC,iBAAEA,EAAgBC,SAAEA,EAAQC,gBAAEA,EAAeC,eAAEA,EAAcC,MAAEA,EAAKC,SAAEA,GAAaR,GAC9GS,KAAEA,EAAIC,eAAEA,GAAmBC,KAC1BC,EAAQC,GAAaC,EAA2B,KAChDC,EAAQC,GAAaF,GAAkB,GAqB9C,OAnBAG,GAAgB,KACZ,IAAKZ,IAAoBC,EAAeY,kBAAkBb,GAGtD,OAFAQ,EAAU,SACVG,GAAU,GAIdG,EAAW,UAAUd,IAAmBK,EAAgBD,EAAKW,QACxDC,MAAKC,IACF,MAAMC,EAAYD,GAAYA,EAASE,OAASF,EAAW,GAC3DT,EAAUU,GACVP,GAAU,EAAA,IAEbS,OAAM,KACHZ,EAAU,IACVG,GAAU,EAAA,GACd,GACL,CAACX,IAECU,GAAWH,EAAOY,OAGnBE,EAACC,EAAAA,CACGzB,MAAOA,EACPD,mBAAoBA,EACpB2B,aAAc5B,EAAM4B,aACpBC,UAAWtB,EACXuB,eAAe,EACfC,KAAM,kBACNtB,KAAMA,EACNL,SAAUA,KAAcG,GAExBmB,EAACM,EAAAA,CACGD,KAAM,kBACNE,SAAU9B,EACV+B,cAAe3B,EACf4B,MAAOvB,EACPJ,SAAUA,EACV4B,SAAUhC,KAAcG,KAnBE,IAuB1C"}
1
+ {"version":3,"file":"StateField.js","sources":["../../../../../../src/components/internal/Address/components/StateField.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useLayoutEffect } from 'preact/hooks';\nimport Field from '../../FormFields/Field';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport getDataset from '../../../../core/Services/get-dataset';\nimport { StateFieldItem, StateFieldProps } from '../types';\nimport Select from '../../FormFields/Select';\n\nexport default function StateField(props: StateFieldProps) {\n const { classNameModifiers, label, onDropdownChange, readOnly, selectedCountry, specifications, value, required } = props;\n const { i18n, loadingContext } = useCoreContext();\n const [states, setStates] = useState<StateFieldItem[]>([]);\n const [loaded, setLoaded] = useState<boolean>(false);\n\n useLayoutEffect(() => {\n if (!selectedCountry || !specifications.countryHasDataset(selectedCountry)) {\n setStates([]);\n setLoaded(true);\n return;\n }\n\n getDataset(`states/${selectedCountry}`, loadingContext, i18n.locale)\n .then(response => {\n const newStates = response && response.length ? response : [];\n setStates(newStates);\n setLoaded(true);\n })\n .catch(() => {\n setStates([]);\n setLoaded(true);\n });\n }, [selectedCountry]);\n\n if (!loaded || !states.length) return null;\n\n return (\n <Field\n label={label}\n classNameModifiers={classNameModifiers}\n errorMessage={props.errorMessage}\n isValid={!!value}\n showValidIcon={false}\n name={'stateOrProvince'}\n i18n={i18n}\n readOnly={readOnly && !!value}\n >\n <Select\n name={'stateOrProvince'}\n onChange={onDropdownChange}\n selectedValue={value}\n items={states}\n required={required}\n readonly={readOnly && !!value}\n />\n </Field>\n );\n}\n"],"names":["StateField","props","classNameModifiers","label","onDropdownChange","readOnly","selectedCountry","specifications","value","required","i18n","loadingContext","useCoreContext","states","setStates","useState","loaded","setLoaded","useLayoutEffect","countryHasDataset","getDataset","locale","then","response","newStates","length","catch","h","Field","errorMessage","isValid","showValidIcon","name","Select","onChange","selectedValue","items","readonly"],"mappings":"6YAQe,SAASA,EAAWC,GAC/B,MAAMC,mBAAEA,EAAkBC,MAAEA,EAAKC,iBAAEA,EAAgBC,SAAEA,EAAQC,gBAAEA,EAAeC,eAAEA,EAAcC,MAAEA,EAAKC,SAAEA,GAAaR,GAC9GS,KAAEA,EAAIC,eAAEA,GAAmBC,KAC1BC,EAAQC,GAAaC,EAA2B,KAChDC,EAAQC,GAAaF,GAAkB,GAqB9C,OAnBAG,EAAgB,KACZ,IAAKZ,IAAoBC,EAAeY,kBAAkBb,GAGtD,OAFAQ,EAAU,SACVG,GAAU,GAIdG,EAAW,UAAUd,IAAmBK,EAAgBD,EAAKW,QACxDC,KAAKC,IACF,MAAMC,EAAYD,GAAYA,EAASE,OAASF,EAAW,GAC3DT,EAAUU,GACVP,GAAU,KAEbS,MAAM,KACHZ,EAAU,IACVG,GAAU,MAEnB,CAACX,IAECU,GAAWH,EAAOY,OAGnBE,EAACC,EAAAA,CACGzB,MAAOA,EACPD,mBAAoBA,EACpB2B,aAAc5B,EAAM4B,aACpBC,UAAWtB,EACXuB,eAAe,EACfC,KAAM,kBACNtB,KAAMA,EACNL,SAAUA,KAAcG,GAExBmB,EAACM,EAAAA,CACGD,KAAM,kBACNE,SAAU9B,EACV+B,cAAe3B,EACf4B,MAAOvB,EACPJ,SAAUA,EACV4B,SAAUhC,KAAcG,KAnBE,IAuB1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.formats.js","sources":["../../../../../src/components/internal/Address/validate.formats.ts"],"sourcesContent":["import { CountryFormatRules, FormatRules } from '../../../utils/Validator/types';\nimport { Formatter } from '../../../utils/useForm/types';\nimport { getFormattingRegEx, SPECIAL_CHARS, trimValWithOneSpace } from '../../../utils/validator-utils';\n\nconst createFormatByDigits = (digits: number): Formatter => {\n const format = new Array(digits).fill('9').join('');\n return {\n // Formatter - excludes non digits and limits to maxlength\n formatterFn: val => val.replace(getFormattingRegEx('^\\\\d', 'g'), '').substring(0, digits),\n format,\n maxlength: digits\n };\n};\n\nconst specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS);\nconst formattingFn = val => trimValWithOneSpace(val).replace(specialCharsRegEx, '');\n\nexport const addressFormatters: FormatRules = {\n postalCode: {\n formatterFn: (val, context) => {\n const country = context.state.data.country;\n\n // Country specific formatting rule\n const specificRule = countrySpecificFormatters[country]?.postalCode.formatterFn;\n if (specificRule) {\n return specificRule(val);\n }\n\n // Default formatting rule: allow anything\n return val;\n }\n },\n street: {\n formatterFn: formattingFn\n },\n houseNumberOrName: {\n formatterFn: formattingFn\n },\n city: {\n formatterFn: formattingFn\n }\n};\n\n// TODO make proper formatter fns for those entries that don't just have a straightforward, x number of digits, no spaces, format\n// check against our internal documentation on address postal code\n// which, for example, says BR isn't just 8 digits (it can be spilt by a hyphen) & CZ can also be 5 digits, no spaces\nexport const countrySpecificFormatters: CountryFormatRules = {\n AT: {\n postalCode: createFormatByDigits(4)\n },\n AU: {\n postalCode: createFormatByDigits(4)\n },\n BE: {\n postalCode: createFormatByDigits(4)\n },\n BG: {\n postalCode: createFormatByDigits(4)\n },\n BR: {\n postalCode: {\n // Formatter - excludes non digits, but allows hyphens, and limits to a maxlength that varies depending on whether a hyphen is present or not\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n const maxlength = nuVal.indexOf('-') > -1 ? 9 : 8;\n return nuVal.substring(0, maxlength);\n },\n format: '12345678 or 12345-678',\n maxlength: 9\n }\n },\n CA: {\n postalCode: {\n format: 'A9A 9A9 or A9A9A9',\n maxlength: 7\n }\n },\n CH: {\n postalCode: createFormatByDigits(4)\n },\n CY: {\n postalCode: createFormatByDigits(4)\n },\n CZ: {\n postalCode: {\n format: '999 99',\n maxlength: 6\n }\n },\n DE: {\n postalCode: createFormatByDigits(5)\n },\n DK: {\n postalCode: {\n format: '9999',\n maxlength: 7\n }\n },\n EE: {\n postalCode: createFormatByDigits(5)\n },\n ES: {\n postalCode: createFormatByDigits(5)\n },\n FI: {\n postalCode: createFormatByDigits(5)\n },\n FR: {\n postalCode: createFormatByDigits(5)\n },\n GB: {\n postalCode: {\n // Disallow special chars & set to maxlength\n formatterFn: val => val.replace(getFormattingRegEx(SPECIAL_CHARS), '').substring(0, 8),\n format: 'AA99 9AA or A99 9AA or A9 9AA',\n maxlength: 8\n }\n },\n GR: {\n postalCode: {\n format: '999 99',\n maxlength: 6\n }\n },\n HR: {\n postalCode: {\n format: '[1-5]9999',\n maxlength: 5\n }\n },\n HU: {\n postalCode: createFormatByDigits(4)\n },\n IE: {\n postalCode: {\n format: 'A99 A999',\n maxlength: 8\n }\n },\n IS: {\n postalCode: createFormatByDigits(3)\n },\n IT: {\n postalCode: createFormatByDigits(5)\n },\n LI: {\n postalCode: createFormatByDigits(4)\n },\n LT: {\n postalCode: {\n format: '9999 or 99999 or LT-99999',\n maxlength: 8\n }\n },\n LU: {\n postalCode: createFormatByDigits(4)\n },\n LV: {\n postalCode: {\n format: '9999 or LV-9999',\n maxlength: 7\n }\n },\n MC: {\n postalCode: {\n format: '980NN',\n maxlength: 5\n }\n },\n MT: {\n postalCode: {\n format: 'AA99 or AAA99 or AA9999 or AAA9999',\n maxlength: 8\n }\n },\n MY: {\n postalCode: createFormatByDigits(5)\n },\n NL: {\n postalCode: {\n format: '9999AA',\n maxlength: 7\n }\n },\n NZ: {\n postalCode: createFormatByDigits(4)\n },\n NO: {\n postalCode: createFormatByDigits(4)\n },\n PL: {\n postalCode: {\n // Formatter - excludes non digits, but allows hyphens, and limits to a maxlength that varies depending on whether a hyphen is present or not\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n const maxlength = nuVal.indexOf('-') > -1 ? 6 : 5;\n return nuVal.substring(0, maxlength);\n },\n format: '99999 or 99-999',\n maxlength: 6\n }\n },\n PT: {\n postalCode: {\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n return nuVal.substring(0, 8);\n },\n format: '9999-999',\n maxlength: 8\n }\n },\n RO: {\n postalCode: createFormatByDigits(6)\n },\n SI: {\n postalCode: {\n format: '9999 or SI-9999',\n maxlength: 7\n }\n },\n SE: {\n postalCode: createFormatByDigits(5)\n },\n SG: {\n postalCode: createFormatByDigits(6)\n },\n SK: {\n postalCode: {\n format: '99999 or SK-99999',\n maxlength: 8\n }\n },\n JP: {\n postalCode: {\n format: '999-9999',\n maxlength: 8\n }\n },\n US: {\n postalCode: {\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n const maxlength = nuVal.indexOf('-') > -1 ? 10 : 5;\n return nuVal.substring(0, maxlength);\n },\n format: '99999 or 99999-9999'\n }\n }\n};\n"],"names":["createFormatByDigits","digits","formatterFn","val","replace","getFormattingRegEx","substring","format","Array","fill","join","maxlength","specialCharsRegEx","SPECIAL_CHARS","formattingFn","trimValWithOneSpace","addressFormatters","postalCode","context","countrySpecificFormatters","country","state","data","specificRule","street","houseNumberOrName","city","AT","AU","BE","BG","BR","nuVal","indexOf","CA","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","MY","NL","NZ","NO","PL","PT","RO","SI","SE","SG","SK","JP","US"],"mappings":"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"}
1
+ {"version":3,"file":"validate.formats.js","sources":["../../../../../src/components/internal/Address/validate.formats.ts"],"sourcesContent":["import { CountryFormatRules, FormatRules } from '../../../utils/Validator/types';\nimport { Formatter } from '../../../utils/useForm/types';\nimport { getFormattingRegEx, SPECIAL_CHARS, trimValWithOneSpace } from '../../../utils/validator-utils';\n\nconst createFormatByDigits = (digits: number): Formatter => {\n const format = new Array(digits).fill('9').join('');\n return {\n // Formatter - excludes non digits and limits to maxlength\n formatterFn: val => val.replace(getFormattingRegEx('^\\\\d', 'g'), '').substring(0, digits),\n format,\n maxlength: digits\n };\n};\n\nconst specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS);\nconst formattingFn = val => trimValWithOneSpace(val).replace(specialCharsRegEx, '');\n\nexport const addressFormatters: FormatRules = {\n postalCode: {\n formatterFn: (val, context) => {\n const country = context.state.data.country;\n\n // Country specific formatting rule\n const specificRule = countrySpecificFormatters[country]?.postalCode.formatterFn;\n if (specificRule) {\n return specificRule(val);\n }\n\n // Default formatting rule: allow anything\n return val;\n }\n },\n street: {\n formatterFn: formattingFn\n },\n houseNumberOrName: {\n formatterFn: formattingFn\n },\n city: {\n formatterFn: formattingFn\n }\n};\n\n// TODO make proper formatter fns for those entries that don't just have a straightforward, x number of digits, no spaces, format\n// check against our internal documentation on address postal code\n// which, for example, says BR isn't just 8 digits (it can be spilt by a hyphen) & CZ can also be 5 digits, no spaces\nexport const countrySpecificFormatters: CountryFormatRules = {\n AT: {\n postalCode: createFormatByDigits(4)\n },\n AU: {\n postalCode: createFormatByDigits(4)\n },\n BE: {\n postalCode: createFormatByDigits(4)\n },\n BG: {\n postalCode: createFormatByDigits(4)\n },\n BR: {\n postalCode: {\n // Formatter - excludes non digits, but allows hyphens, and limits to a maxlength that varies depending on whether a hyphen is present or not\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n const maxlength = nuVal.indexOf('-') > -1 ? 9 : 8;\n return nuVal.substring(0, maxlength);\n },\n format: '12345678 or 12345-678',\n maxlength: 9\n }\n },\n CA: {\n postalCode: {\n format: 'A9A 9A9 or A9A9A9',\n maxlength: 7\n }\n },\n CH: {\n postalCode: createFormatByDigits(4)\n },\n CY: {\n postalCode: createFormatByDigits(4)\n },\n CZ: {\n postalCode: {\n format: '999 99',\n maxlength: 6\n }\n },\n DE: {\n postalCode: createFormatByDigits(5)\n },\n DK: {\n postalCode: {\n format: '9999',\n maxlength: 7\n }\n },\n EE: {\n postalCode: createFormatByDigits(5)\n },\n ES: {\n postalCode: createFormatByDigits(5)\n },\n FI: {\n postalCode: createFormatByDigits(5)\n },\n FR: {\n postalCode: createFormatByDigits(5)\n },\n GB: {\n postalCode: {\n // Disallow special chars & set to maxlength\n formatterFn: val => val.replace(getFormattingRegEx(SPECIAL_CHARS), '').substring(0, 8),\n format: 'AA99 9AA or A99 9AA or A9 9AA',\n maxlength: 8\n }\n },\n GR: {\n postalCode: {\n format: '999 99',\n maxlength: 6\n }\n },\n HR: {\n postalCode: {\n format: '[1-5]9999',\n maxlength: 5\n }\n },\n HU: {\n postalCode: createFormatByDigits(4)\n },\n IE: {\n postalCode: {\n format: 'A99 A999',\n maxlength: 8\n }\n },\n IS: {\n postalCode: createFormatByDigits(3)\n },\n IT: {\n postalCode: createFormatByDigits(5)\n },\n LI: {\n postalCode: createFormatByDigits(4)\n },\n LT: {\n postalCode: {\n format: '9999 or 99999 or LT-99999',\n maxlength: 8\n }\n },\n LU: {\n postalCode: createFormatByDigits(4)\n },\n LV: {\n postalCode: {\n format: '9999 or LV-9999',\n maxlength: 7\n }\n },\n MC: {\n postalCode: {\n format: '980NN',\n maxlength: 5\n }\n },\n MT: {\n postalCode: {\n format: 'AA99 or AAA99 or AA9999 or AAA9999',\n maxlength: 8\n }\n },\n MY: {\n postalCode: createFormatByDigits(5)\n },\n NL: {\n postalCode: {\n format: '9999AA',\n maxlength: 7\n }\n },\n NZ: {\n postalCode: createFormatByDigits(4)\n },\n NO: {\n postalCode: createFormatByDigits(4)\n },\n PL: {\n postalCode: {\n // Formatter - excludes non digits, but allows hyphens, and limits to a maxlength that varies depending on whether a hyphen is present or not\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n const maxlength = nuVal.indexOf('-') > -1 ? 6 : 5;\n return nuVal.substring(0, maxlength);\n },\n format: '99999 or 99-999',\n maxlength: 6\n }\n },\n PT: {\n postalCode: {\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n return nuVal.substring(0, 8);\n },\n format: '9999-999',\n maxlength: 8\n }\n },\n RO: {\n postalCode: createFormatByDigits(6)\n },\n SI: {\n postalCode: {\n format: '9999 or SI-9999',\n maxlength: 7\n }\n },\n SE: {\n postalCode: createFormatByDigits(5)\n },\n SG: {\n postalCode: createFormatByDigits(6)\n },\n SK: {\n postalCode: {\n format: '99999 or SK-99999',\n maxlength: 8\n }\n },\n JP: {\n postalCode: {\n format: '999-9999',\n maxlength: 8\n }\n },\n US: {\n postalCode: {\n formatterFn: val => {\n const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n const maxlength = nuVal.indexOf('-') > -1 ? 10 : 5;\n return nuVal.substring(0, maxlength);\n },\n format: '99999 or 99999-9999'\n }\n }\n};\n"],"names":["createFormatByDigits","digits","formatterFn","val","replace","getFormattingRegEx","substring","format","Array","fill","join","maxlength","specialCharsRegEx","SPECIAL_CHARS","formattingFn","trimValWithOneSpace","addressFormatters","postalCode","context","countrySpecificFormatters","country","state","data","specificRule","street","houseNumberOrName","city","AT","AU","BE","BG","BR","nuVal","indexOf","CA","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","MY","NL","NZ","NO","PL","PT","RO","SI","SE","SG","SK","JP","US"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sources":["../../../../../src/components/internal/Address/validate.ts"],"sourcesContent":["import { ValidatorRules, ValidatorRule } from '../../../utils/Validator/types';\nimport { countrySpecificFormatters } from './validate.formats';\nimport { ERROR_FIELD_REQUIRED, ERROR_INVALID_FORMAT_EXPECTS } from '../../../core/Errors/constants';\nimport { isEmpty } from '../../../utils/validator-utils';\n\nconst createPatternByDigits = (digits: number) => {\n return {\n pattern: new RegExp(`\\\\d{${digits}}`)\n };\n};\n\nexport const validatePostalCode = (val: string, countryCode: string, validatorRules: ValidatorRules) => {\n if (countryCode) {\n // If there is no value, we display the 'required' error message\n if (isEmpty(val)) return null;\n\n // Dynamically create errorMessage\n (validatorRules.postalCode as ValidatorRule).errorMessage = {\n translationKey: ERROR_INVALID_FORMAT_EXPECTS,\n translationObject: {\n values: {\n format: countrySpecificFormatters[countryCode]?.postalCode.format || null\n }\n }\n };\n\n const pattern = postalCodePatterns[countryCode]?.pattern;\n return pattern ? pattern.test(val) : !!val; // No pattern? Accept any, filled, value.\n }\n // Default rule\n return isEmpty(val) ? null : true;\n};\n\nconst postalCodePatterns = {\n AT: createPatternByDigits(4),\n AU: createPatternByDigits(4),\n BE: { pattern: /(?:(?:[1-9])(?:\\d{3}))/ },\n BG: createPatternByDigits(4),\n BR: { pattern: /^\\d{5}-?\\d{3}$/ },\n CA: { pattern: /(?:[ABCEGHJ-NPRSTVXY]\\d[A-Z][ -]?\\d[A-Z]\\d)/ },\n CH: { pattern: /[1-9]\\d{3}/ },\n CY: createPatternByDigits(4),\n CZ: { pattern: /\\d{3}\\s?\\d{2}/ },\n DE: createPatternByDigits(5),\n DK: createPatternByDigits(4),\n EE: createPatternByDigits(5),\n ES: { pattern: /(?:0[1-9]|[1-4]\\d|5[0-2])\\d{3}/ },\n FI: createPatternByDigits(5),\n FR: createPatternByDigits(5),\n GB: { pattern: /^([A-Za-z][A-Ha-hK-Yk-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/ },\n GE: createPatternByDigits(4),\n GR: { pattern: /^\\d{3}\\s{0,1}\\d{2}$/ },\n HR: { pattern: /^([1-5])[0-9]{4}$/ },\n HU: createPatternByDigits(4),\n IE: { pattern: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/ },\n IS: createPatternByDigits(3),\n IT: createPatternByDigits(5),\n LI: createPatternByDigits(4),\n LT: { pattern: /^(LT-\\d{5}|\\d{4,5})$/ },\n LU: createPatternByDigits(4),\n LV: { pattern: /^(LV-)[0-9]{4}$/ },\n MC: { pattern: /^980\\d{2}$/ },\n MT: { pattern: /^[A-Za-z]{3}\\d{4}$/ },\n MY: createPatternByDigits(5),\n NL: { pattern: /(?:NL-)?(?:[1-9]\\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/ },\n NO: createPatternByDigits(4),\n PL: { pattern: /^\\d{2}[-]{0,1}\\d{3}$/ },\n PT: { pattern: /^([1-9]\\d{3})([- ]?(\\d{3})? *)$/ },\n RO: createPatternByDigits(6),\n SI: createPatternByDigits(4),\n SE: createPatternByDigits(5),\n SG: createPatternByDigits(6),\n SK: createPatternByDigits(5),\n US: createPatternByDigits(5)\n};\n\n/**\n * Validates only postalCode property. As the partial address form does not have the country selector, the country value\n * must be informed beforehand and can't be picked up from the form context\n *\n * @param country - Country that will be used to validate postal code\n */\nexport const getPartialAddressValidationRules = (country: string): ValidatorRules => {\n const validationRules: ValidatorRules = {\n postalCode: {\n modes: ['blur'],\n validate: val => {\n return validatePostalCode(val, country, validationRules);\n },\n errorMessage: ERROR_FIELD_REQUIRED\n }\n };\n return validationRules;\n};\n\nexport const getAddressValidationRules = (specifications): ValidatorRules => {\n const addressValidationRules: ValidatorRules = {\n postalCode: {\n modes: ['blur'],\n validate: (val, context) => {\n const country = context.state.data.country;\n return validatePostalCode(val, country, addressValidationRules);\n },\n errorMessage: ERROR_FIELD_REQUIRED\n },\n houseNumberOrName: {\n validate: (value, context) => {\n const selectedCountry = context.state?.data?.country;\n const isOptional = selectedCountry && specifications.countryHasOptionalField(selectedCountry, 'houseNumberOrName');\n return isOptional || (isEmpty(value) ? null : true);\n },\n modes: ['blur'],\n errorMessage: ERROR_FIELD_REQUIRED\n },\n default: {\n validate: value => (isEmpty(value) ? null : true), // true, if there are chars other than spaces\n modes: ['blur'],\n errorMessage: ERROR_FIELD_REQUIRED\n }\n };\n return addressValidationRules;\n};\n"],"names":["createPatternByDigits","digits","pattern","RegExp","validatePostalCode","val","countryCode","validatorRules","countrySpecificFormatters","postalCodePatterns","isEmpty","postalCode","errorMessage","translationKey","ERROR_INVALID_FORMAT_EXPECTS","translationObject","values","format","test","AT","AU","BE","BG","BR","CA","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","MY","NL","NO","PL","PT","RO","SI","SE","SG","SK","US","getPartialAddressValidationRules","country","validationRules","modes","validate","ERROR_FIELD_REQUIRED","getAddressValidationRules","specifications","addressValidationRules","context","state","data","houseNumberOrName","value","selectedCountry","countryHasOptionalField","default"],"mappings":"yOAKA,MAAMA,EAAyBC,IACpB,CACHC,QAAS,IAAIC,OAAO,OAAOF,QAItBG,EAAqB,CAACC,EAAaC,EAAqBC,KACjE,GAAID,EAAa,KASOE,EAKJC,EAZhB,GAAIC,EAAQL,GAAM,OAAO,KAGxBE,EAAeI,WAA6BC,aAAe,CACxDC,eAAgBC,EAChBC,kBAAmB,CACfC,OAAQ,CACJC,QAAQT,QAAAA,EAAAA,EAA0BF,UAA1BE,IAAAA,OAAAA,EAAAA,EAAwCG,WAAWM,SAAU,QAKjF,MAAMf,EAAUO,QAAAA,EAAAA,EAAmBH,UAAnBG,IAAAA,OAAAA,EAAAA,EAAiCP,QACjD,OAAOA,EAAUA,EAAQgB,KAAKb,KAASA,CAC3C,CAEA,OAAOK,EAAQL,IAAO,IAAO,EAG3BI,EAAqB,CACvBU,GAAInB,EAAsB,GAC1BoB,GAAIpB,EAAsB,GAC1BqB,GAAI,CAAEnB,QAAS,0BACfoB,GAAItB,EAAsB,GAC1BuB,GAAI,CAAErB,QAAS,kBACfsB,GAAI,CAAEtB,QAAS,+CACfuB,GAAI,CAAEvB,QAAS,cACfwB,GAAI1B,EAAsB,GAC1B2B,GAAI,CAAEzB,QAAS,iBACf0B,GAAI5B,EAAsB,GAC1B6B,GAAI7B,EAAsB,GAC1B8B,GAAI9B,EAAsB,GAC1B+B,GAAI,CAAE7B,QAAS,kCACf8B,GAAIhC,EAAsB,GAC1BiC,GAAIjC,EAAsB,GAC1BkC,GAAI,CAAEhC,QAAS,yFACfiC,GAAInC,EAAsB,GAC1BoC,GAAI,CAAElC,QAAS,uBACfmC,GAAI,CAAEnC,QAAS,qBACfoC,GAAItC,EAAsB,GAC1BuC,GAAI,CAAErC,QAAS,8DACfsC,GAAIxC,EAAsB,GAC1ByC,GAAIzC,EAAsB,GAC1B0C,GAAI1C,EAAsB,GAC1B2C,GAAI,CAAEzC,QAAS,wBACf0C,GAAI5C,EAAsB,GAC1B6C,GAAI,CAAE3C,QAAS,mBACf4C,GAAI,CAAE5C,QAAS,cACf6C,GAAI,CAAE7C,QAAS,sBACf8C,GAAIhD,EAAsB,GAC1BiD,GAAI,CAAE/C,QAAS,sFACfgD,GAAIlD,EAAsB,GAC1BmD,GAAI,CAAEjD,QAAS,wBACfkD,GAAI,CAAElD,QAAS,mCACfmD,GAAIrD,EAAsB,GAC1BsD,GAAItD,EAAsB,GAC1BuD,GAAIvD,EAAsB,GAC1BwD,GAAIxD,EAAsB,GAC1ByD,GAAIzD,EAAsB,GAC1B0D,GAAI1D,EAAsB,IASjB2D,EAAoCC,IAC7C,MAAMC,EAAkC,CACpClD,WAAY,CACRmD,MAAO,CAAC,QACRC,SAAU1D,GACCD,EAAmBC,EAAKuD,EAASC,GAE5CjD,aAAcoD,IAGtB,OAAOH,CAAAA,EAGEI,EAA6BC,IACtC,MAAMC,EAAyC,CAC3CxD,WAAY,CACRmD,MAAO,CAAC,QACRC,SAAU,CAAC1D,EAAK+D,KACZ,MAAMR,EAAUQ,EAAQC,MAAMC,KAAKV,QACnC,OAAOxD,EAAmBC,EAAKuD,EAASO,EAAAA,EAE5CvD,aAAcoD,GAElBO,kBAAmB,CACfR,SAAU,CAACS,EAAOJ,SACUA,EAAAA,EAAxB,MAAMK,EAAkBL,QAAAA,EAAAA,EAAQC,aAARD,IAAAA,GAAmB,QAAnBA,EAAAA,EAAeE,YAAfF,IAAAA,OAAAA,EAAAA,EAAqBR,QAE7C,OADmBa,GAAmBP,EAAeQ,wBAAwBD,EAAiB,uBACxE/D,EAAQ8D,IAAS,IAAU,EAErDV,MAAO,CAAC,QACRlD,aAAcoD,GAElBW,QAAS,CACLZ,SAAUS,IAAU9D,EAAQ8D,IAAS,KACrCV,MAAO,CAAC,QACRlD,aAAcoD,IAGtB,OAAOG,CAAAA"}
1
+ {"version":3,"file":"validate.js","sources":["../../../../../src/components/internal/Address/validate.ts"],"sourcesContent":["import { ValidatorRules, ValidatorRule } from '../../../utils/Validator/types';\nimport { countrySpecificFormatters } from './validate.formats';\nimport { ERROR_FIELD_REQUIRED, ERROR_INVALID_FORMAT_EXPECTS } from '../../../core/Errors/constants';\nimport { isEmpty } from '../../../utils/validator-utils';\n\nconst createPatternByDigits = (digits: number) => {\n return {\n pattern: new RegExp(`\\\\d{${digits}}`)\n };\n};\n\nexport const validatePostalCode = (val: string, countryCode: string, validatorRules: ValidatorRules) => {\n if (countryCode) {\n // If there is no value, we display the 'required' error message\n if (isEmpty(val)) return null;\n\n // Dynamically create errorMessage\n (validatorRules.postalCode as ValidatorRule).errorMessage = {\n translationKey: ERROR_INVALID_FORMAT_EXPECTS,\n translationObject: {\n values: {\n format: countrySpecificFormatters[countryCode]?.postalCode.format || null\n }\n }\n };\n\n const pattern = postalCodePatterns[countryCode]?.pattern;\n return pattern ? pattern.test(val) : !!val; // No pattern? Accept any, filled, value.\n }\n // Default rule\n return isEmpty(val) ? null : true;\n};\n\nconst postalCodePatterns = {\n AT: createPatternByDigits(4),\n AU: createPatternByDigits(4),\n BE: { pattern: /(?:(?:[1-9])(?:\\d{3}))/ },\n BG: createPatternByDigits(4),\n BR: { pattern: /^\\d{5}-?\\d{3}$/ },\n CA: { pattern: /(?:[ABCEGHJ-NPRSTVXY]\\d[A-Z][ -]?\\d[A-Z]\\d)/ },\n CH: { pattern: /[1-9]\\d{3}/ },\n CY: createPatternByDigits(4),\n CZ: { pattern: /\\d{3}\\s?\\d{2}/ },\n DE: createPatternByDigits(5),\n DK: createPatternByDigits(4),\n EE: createPatternByDigits(5),\n ES: { pattern: /(?:0[1-9]|[1-4]\\d|5[0-2])\\d{3}/ },\n FI: createPatternByDigits(5),\n FR: createPatternByDigits(5),\n GB: { pattern: /^([A-Za-z][A-Ha-hK-Yk-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/ },\n GE: createPatternByDigits(4),\n GR: { pattern: /^\\d{3}\\s{0,1}\\d{2}$/ },\n HR: { pattern: /^([1-5])[0-9]{4}$/ },\n HU: createPatternByDigits(4),\n IE: { pattern: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/ },\n IS: createPatternByDigits(3),\n IT: createPatternByDigits(5),\n LI: createPatternByDigits(4),\n LT: { pattern: /^(LT-\\d{5}|\\d{4,5})$/ },\n LU: createPatternByDigits(4),\n LV: { pattern: /^(LV-)[0-9]{4}$/ },\n MC: { pattern: /^980\\d{2}$/ },\n MT: { pattern: /^[A-Za-z]{3}\\d{4}$/ },\n MY: createPatternByDigits(5),\n NL: { pattern: /(?:NL-)?(?:[1-9]\\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/ },\n NO: createPatternByDigits(4),\n PL: { pattern: /^\\d{2}[-]{0,1}\\d{3}$/ },\n PT: { pattern: /^([1-9]\\d{3})([- ]?(\\d{3})? *)$/ },\n RO: createPatternByDigits(6),\n SI: createPatternByDigits(4),\n SE: createPatternByDigits(5),\n SG: createPatternByDigits(6),\n SK: createPatternByDigits(5),\n US: createPatternByDigits(5)\n};\n\n/**\n * Validates only postalCode property. As the partial address form does not have the country selector, the country value\n * must be informed beforehand and can't be picked up from the form context\n *\n * @param country - Country that will be used to validate postal code\n */\nexport const getPartialAddressValidationRules = (country: string): ValidatorRules => {\n const validationRules: ValidatorRules = {\n postalCode: {\n modes: ['blur'],\n validate: val => {\n return validatePostalCode(val, country, validationRules);\n },\n errorMessage: ERROR_FIELD_REQUIRED\n }\n };\n return validationRules;\n};\n\nexport const getAddressValidationRules = (specifications): ValidatorRules => {\n const addressValidationRules: ValidatorRules = {\n postalCode: {\n modes: ['blur'],\n validate: (val, context) => {\n const country = context.state.data.country;\n return validatePostalCode(val, country, addressValidationRules);\n },\n errorMessage: ERROR_FIELD_REQUIRED\n },\n houseNumberOrName: {\n validate: (value, context) => {\n const selectedCountry = context.state?.data?.country;\n const isOptional = selectedCountry && specifications.countryHasOptionalField(selectedCountry, 'houseNumberOrName');\n return isOptional || (isEmpty(value) ? null : true);\n },\n modes: ['blur'],\n errorMessage: ERROR_FIELD_REQUIRED\n },\n default: {\n validate: value => (isEmpty(value) ? null : true), // true, if there are chars other than spaces\n modes: ['blur'],\n errorMessage: ERROR_FIELD_REQUIRED\n }\n };\n return addressValidationRules;\n};\n"],"names":["createPatternByDigits","digits","pattern","RegExp","validatePostalCode","val","countryCode","validatorRules","countrySpecificFormatters","postalCodePatterns","isEmpty","postalCode","errorMessage","translationKey","ERROR_INVALID_FORMAT_EXPECTS","translationObject","values","format","test","AT","AU","BE","BG","BR","CA","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","MY","NL","NO","PL","PT","RO","SI","SE","SG","SK","US","getPartialAddressValidationRules","country","validationRules","modes","validate","ERROR_FIELD_REQUIRED","getAddressValidationRules","specifications","addressValidationRules","context","state","data","houseNumberOrName","value","selectedCountry","countryHasOptionalField","default"],"mappings":"yOAKA,MAAMA,EAAyBC,IACpB,CACHC,QAAS,IAAIC,OAAO,OAAOF,QAItBG,EAAqB,CAACC,EAAaC,EAAqBC,KACjE,GAAID,EAAa,KASOE,EAKJC,EAZhB,GAAIC,EAAQL,GAAM,OAAO,KAGxBE,EAAeI,WAA6BC,aAAe,CACxDC,eAAgBC,EAChBC,kBAAmB,CACfC,OAAQ,CACJC,QAA8C,QAAtCT,EAAAA,EAA0BF,UAA1BE,IAAAA,OAAAA,EAAAA,EAAwCG,WAAWM,SAAU,QAKjF,MAAMf,EAAyC,QAA/BO,EAAAA,EAAmBH,UAAnBG,IAAAA,OAAAA,EAAAA,EAAiCP,QACjD,OAAOA,EAAUA,EAAQgB,KAAKb,KAASA,CAC3C,CAEA,OAAOK,EAAQL,IAAO,MAGpBI,EAAqB,CACvBU,GAAInB,EAAsB,GAC1BoB,GAAIpB,EAAsB,GAC1BqB,GAAI,CAAEnB,QAAS,0BACfoB,GAAItB,EAAsB,GAC1BuB,GAAI,CAAErB,QAAS,kBACfsB,GAAI,CAAEtB,QAAS,+CACfuB,GAAI,CAAEvB,QAAS,cACfwB,GAAI1B,EAAsB,GAC1B2B,GAAI,CAAEzB,QAAS,iBACf0B,GAAI5B,EAAsB,GAC1B6B,GAAI7B,EAAsB,GAC1B8B,GAAI9B,EAAsB,GAC1B+B,GAAI,CAAE7B,QAAS,kCACf8B,GAAIhC,EAAsB,GAC1BiC,GAAIjC,EAAsB,GAC1BkC,GAAI,CAAEhC,QAAS,yFACfiC,GAAInC,EAAsB,GAC1BoC,GAAI,CAAElC,QAAS,uBACfmC,GAAI,CAAEnC,QAAS,qBACfoC,GAAItC,EAAsB,GAC1BuC,GAAI,CAAErC,QAAS,8DACfsC,GAAIxC,EAAsB,GAC1ByC,GAAIzC,EAAsB,GAC1B0C,GAAI1C,EAAsB,GAC1B2C,GAAI,CAAEzC,QAAS,wBACf0C,GAAI5C,EAAsB,GAC1B6C,GAAI,CAAE3C,QAAS,mBACf4C,GAAI,CAAE5C,QAAS,cACf6C,GAAI,CAAE7C,QAAS,sBACf8C,GAAIhD,EAAsB,GAC1BiD,GAAI,CAAE/C,QAAS,sFACfgD,GAAIlD,EAAsB,GAC1BmD,GAAI,CAAEjD,QAAS,wBACfkD,GAAI,CAAElD,QAAS,mCACfmD,GAAIrD,EAAsB,GAC1BsD,GAAItD,EAAsB,GAC1BuD,GAAIvD,EAAsB,GAC1BwD,GAAIxD,EAAsB,GAC1ByD,GAAIzD,EAAsB,GAC1B0D,GAAI1D,EAAsB,IASjB2D,EAAoCC,IAC7C,MAAMC,EAAkC,CACpClD,WAAY,CACRmD,MAAO,CAAC,QACRC,SAAU1D,GACCD,EAAmBC,EAAKuD,EAASC,GAE5CjD,aAAcoD,IAGtB,OAAOH,GAGEI,EAA6BC,IACtC,MAAMC,EAAyC,CAC3CxD,WAAY,CACRmD,MAAO,CAAC,QACRC,SAAU,CAAC1D,EAAK+D,KACZ,MAAMR,EAAUQ,EAAQC,MAAMC,KAAKV,QACnC,OAAOxD,EAAmBC,EAAKuD,EAASO,IAE5CvD,aAAcoD,GAElBO,kBAAmB,CACfR,SAAU,CAACS,EAAOJ,SACUA,EAAAA,EAAxB,MAAMK,EAA+B,QAAbL,EAAAA,EAAQC,aAARD,IAAAA,GAAmB,QAAnBA,EAAAA,EAAeE,YAAfF,IAAAA,OAAAA,EAAAA,EAAqBR,QAE7C,OADmBa,GAAmBP,EAAeQ,wBAAwBD,EAAiB,uBACxE/D,EAAQ8D,IAAS,MAE3CV,MAAO,CAAC,QACRlD,aAAcoD,GAElBW,QAAS,CACLZ,SAAUS,IAAU9D,EAAQ8D,IAAS,KACrCV,MAAO,CAAC,QACRlD,aAAcoD,IAGtB,OAAOG"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../external/preact/dist/preact.js";import{useState as t,useEffect as a}from"../../../external/preact/hooks/dist/hooks.js";import o from"../../../_virtual/index.js";import r from"../../../core/Services/payment-status.js";import{processResponse as n}from"../../../core/ProcessResponse/process-response.js";import s from"../Spinner/Spinner.js";import i from"../Countdown/index.js";import c from"../Button/Button.js";import{useCoreContext as l}from"../../../core/Context/CoreProvider.js";import u from"../../../core/Errors/AdyenCheckoutError.js";import d from"../ContentSeparator/ContentSeparator.js";import m from"../../../core/Context/useImage.js";function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},o=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),o.forEach((function(t){p(e,t,a[t])}))}return e}function y(e,t){if(null==e)return{};var a,o,r=function(e,t){if(null==e)return{};var a,o,r={},n=Object.keys(e);for(o=0;o<n.length;o++)a=n[o],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)a=n[o],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function w(p){var w;const{i18n:h,loadingContext:f}=l(),g=m(),[v,k]=t(!1),[b,N]=t(!1),[j,O]=t(!0),[C,T]=t(!1),[x,E]=t(p.delay),[R,S]=t(100),[P,A]=t(0),[D,I]=t(!1),[L,M]=t(null),{amount:$}=p,z=e=>{if(e.props.payload){k(!0);const t={data:{details:{payload:e.props.payload},paymentData:p.paymentData}};return p.onComplete(t,this)}N(!0),p.onError(new u("ERROR","successful result, but no payload in response"))},B=e=>{if(N(!0),e.props.payload){const t={data:{details:{payload:e.props.payload},paymentData:p.paymentData}};return p.onComplete(t,this)}p.onError(new u("ERROR","error result with no payload in response"))},F=async()=>{const{paymentData:e,clientKey:t,throttleInterval:a,pollStatus:o}=p,s=null!=o?o:()=>r(e,t,f,a);var i;C||(null===(i=p.onActionHandled)||void 0===i||i.call(p,{componentType:p.type,actionDescription:"polling-started"}),T(!0));return s().then(n).catch((e=>{var{message:t}=e,a=y(e,["message"]);return{type:"network-error",props:_({},t&&{message:h.get(t)},a)}})).then((e=>{switch(e.type){case"success":z(e);break;case"error":B(e);break;default:O(!1)}}))},H=e=>{window.location.assign(e)};a((()=>{p.shouldRedirectAutomatically&&p.url&&H(p.url)}),[p.shouldRedirectAutomatically,p.url]),a((()=>(F(),()=>{clearTimeout(L)})),[]),a((()=>{if(b)return clearTimeout(L);if(v)return clearTimeout(L);if(!j){const e=async()=>{await F();const e=P+x;A(e),e>=p.throttleTime&&!D&&(E(p.throttleInterval),I(!0))};M(setTimeout((()=>{e()}),x))}}),[j,b,v,P]);const K=(t,a)=>e("div",{className:"adyen-checkout__await adyen-checkout__await--result"},e("img",{className:"adyen-checkout__await__icon adyen-checkout__await__icon--result",src:g({imageFolder:"components/"})(t),alt:h.get(a)}),e("div",{className:"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result"},h.get(a)));if(b)return K("error","error.subtitle.payment");if(v)return K("success","creditCard.success");if(j)return e("div",{className:"adyen-checkout__await"},p.brandLogo&&e("img",{src:p.brandLogo,alt:p.type,className:"adyen-checkout__await__brand-logo"}),e(s,{inline:!1,size:"large"}));const q=h.get("wechatpay.timetopay").split("%@");return e("div",{className:o("adyen-checkout__await",`adyen-checkout__await--${p.type}`,p.classNameModifiers.map((e=>`adyen-checkout__await--${e}`)))},p.brandLogo&&e("img",{src:p.brandLogo,alt:p.type,className:"adyen-checkout__await__brand-logo"}),!!(p.showAmount&&(null==$?void 0:$.value)&&(null==$?void 0:$.currency))&&e("div",{className:"adyen-checkout__await__amount"},h.amount($.value,$.currency)),null!=p.messageText&&e("div",{className:"adyen-checkout__await__subtitle"},p.messageText),e("div",{className:"adyen-checkout__await__indicator-holder"},e("div",{className:"adyen-checkout__await__indicator-spinner"},e(s,{inline:!1,size:"medium"})),e("div",{className:"adyen-checkout__await__indicator-text"},p.awaitText)),p.showCountdownTimer&&e("div",{className:"adyen-checkout__await__countdown-holder"},e("div",{className:"adyen-checkout__await__progress"},e("span",{className:"adyen-checkout__await__percentage",style:{width:`${R}%`}})),e("div",{className:"adyen-checkout__await__countdown"},q[0]," ",e(i,{minutesFromNow:p.countdownTime,onTick:e=>{S(e.percentage)},onCompleted:()=>{N(!0),clearTimeout(L),p.onError(new u("ERROR","Payment Expired"))}})," ",q[1])),p.url&&!p.shouldRedirectAutomatically&&e("div",{className:"adyen-checkout__await__app-link"},e(d,null),e(c,{classNameModifiers:["await"],onClick:()=>H(p.url),label:h.get("openApp")})),p.instructions&&e("div",{className:"adyen-checkout__await__instructions"},"string"==typeof p.instructions?h.get(p.instructions):null===(w=p.instructions)||void 0===w?void 0:w.call(p)),p.endSlot&&e("div",{className:"adyen-checkout__await__end-slot"},p.endSlot()))}w.defaultProps={countdownTime:15,onError:()=>{},onComplete:()=>{},delay:2e3,throttleTime:6e4,throttleInterval:1e4,showCountdownTimer:!0,classNameModifiers:[],url:null};export{w as default};
1
+ import{createElement as e}from"../../../external/preact/dist/preact.js";import{useState as t,useEffect as a}from"../../../external/preact/hooks/dist/hooks.js";import o from"../../../_virtual/index.js";import r from"../../../core/Services/payment-status.js";import{processResponse as n}from"../../../core/ProcessResponse/process-response.js";import s from"../Spinner/Spinner.js";import i from"../Countdown/index.js";import c from"../Button/Button.js";import{useCoreContext as l}from"../../../core/Context/CoreProvider.js";import u from"../../../core/Errors/AdyenCheckoutError.js";import d from"../ContentSeparator/ContentSeparator.js";import m from"../../../core/Context/useImage.js";function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},o=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),o.forEach(function(t){p(e,t,a[t])})}return e}function y(e,t){if(null==e)return{};var a,o,r=function(e,t){if(null==e)return{};var a,o,r={},n=Object.keys(e);for(o=0;o<n.length;o++)a=n[o],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)a=n[o],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function w(p){var w;const{i18n:h,loadingContext:f}=l(),g=m(),[v,k]=t(!1),[b,N]=t(!1),[j,O]=t(!0),[C,T]=t(!1),[x,E]=t(p.delay),[R,S]=t(100),[P,A]=t(0),[D,I]=t(!1),[L,M]=t(null),{amount:$}=p,z=e=>{if(e.props.payload){k(!0);const t={data:{details:{payload:e.props.payload},paymentData:p.paymentData}};return p.onComplete(t,this)}N(!0),p.onError(new u("ERROR","successful result, but no payload in response"))},B=e=>{if(N(!0),e.props.payload){const t={data:{details:{payload:e.props.payload},paymentData:p.paymentData}};return p.onComplete(t,this)}p.onError(new u("ERROR","error result with no payload in response"))},F=async()=>{const{paymentData:e,clientKey:t,throttleInterval:a,pollStatus:o}=p,s=null!=o?o:()=>r(e,t,f,a);var i;C||(null===(i=p.onActionHandled)||void 0===i||i.call(p,{componentType:p.type,actionDescription:"polling-started"}),T(!0));return s().then(n).catch(e=>{var{message:t}=e,a=y(e,["message"]);return{type:"network-error",props:_({},t&&{message:h.get(t)},a)}}).then(e=>{switch(e.type){case"success":z(e);break;case"error":B(e);break;default:O(!1)}})},H=e=>{window.location.assign(e)};a(()=>{p.shouldRedirectAutomatically&&p.url&&H(p.url)},[p.shouldRedirectAutomatically,p.url]),a(()=>(F(),()=>{clearTimeout(L)}),[]),a(()=>{if(b)return clearTimeout(L);if(v)return clearTimeout(L);if(!j){const e=async()=>{await F();const e=P+x;A(e),e>=p.throttleTime&&!D&&(E(p.throttleInterval),I(!0))};M(setTimeout(()=>{e()},x))}},[j,b,v,P]);const K=(t,a)=>e("div",{className:"adyen-checkout__await adyen-checkout__await--result"},e("img",{className:"adyen-checkout__await__icon adyen-checkout__await__icon--result",src:g({imageFolder:"components/"})(t),alt:h.get(a)}),e("div",{className:"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result"},h.get(a)));if(b)return K("error","error.subtitle.payment");if(v)return K("success","creditCard.success");if(j)return e("div",{className:"adyen-checkout__await"},p.brandLogo&&e("img",{src:p.brandLogo,alt:p.type,className:"adyen-checkout__await__brand-logo"}),e(s,{inline:!1,size:"large"}));const q=h.get("wechatpay.timetopay").split("%@");return e("div",{className:o("adyen-checkout__await",`adyen-checkout__await--${p.type}`,p.classNameModifiers.map(e=>`adyen-checkout__await--${e}`))},p.brandLogo&&e("img",{src:p.brandLogo,alt:p.type,className:"adyen-checkout__await__brand-logo"}),!!(p.showAmount&&(null==$?void 0:$.value)&&(null==$?void 0:$.currency))&&e("div",{className:"adyen-checkout__await__amount"},h.amount($.value,$.currency)),null!=p.messageText&&e("div",{className:"adyen-checkout__await__subtitle"},p.messageText),e("div",{className:"adyen-checkout__await__indicator-holder"},e("div",{className:"adyen-checkout__await__indicator-spinner"},e(s,{inline:!1,size:"medium"})),e("div",{className:"adyen-checkout__await__indicator-text"},p.awaitText)),p.showCountdownTimer&&e("div",{className:"adyen-checkout__await__countdown-holder"},e("div",{className:"adyen-checkout__await__progress"},e("span",{className:"adyen-checkout__await__percentage",style:{width:`${R}%`}})),e("div",{className:"adyen-checkout__await__countdown"},q[0]," ",e(i,{minutesFromNow:p.countdownTime,onTick:e=>{S(e.percentage)},onCompleted:()=>{N(!0),clearTimeout(L),p.onError(new u("ERROR","Payment Expired"))}})," ",q[1])),p.url&&!p.shouldRedirectAutomatically&&e("div",{className:"adyen-checkout__await__app-link"},e(d,null),e(c,{classNameModifiers:["await"],onClick:()=>H(p.url),label:h.get("openApp")})),p.instructions&&e("div",{className:"adyen-checkout__await__instructions"},"string"==typeof p.instructions?h.get(p.instructions):null===(w=p.instructions)||void 0===w?void 0:w.call(p)),p.endSlot&&e("div",{className:"adyen-checkout__await__end-slot"},p.endSlot()))}w.defaultProps={countdownTime:15,onError:()=>{},onComplete:()=>{},delay:2e3,throttleTime:6e4,throttleInterval:1e4,showCountdownTimer:!0,classNameModifiers:[],url:null};export{w as default};
2
2
  //# sourceMappingURL=Await.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Await.js","sources":["../../../../../src/components/internal/Await/Await.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport classnames from 'classnames';\nimport checkPaymentStatus from '../../../core/Services/payment-status';\nimport processResponse from '../../../core/ProcessResponse';\n\nimport Spinner from '../../internal/Spinner';\nimport Countdown from '../Countdown';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { AwaitComponentProps, StatusObject } from './types';\nimport './Await.scss';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport ContentSeparator from '../ContentSeparator';\nimport useImage from '../../../core/Context/useImage';\n\nfunction Await(props: AwaitComponentProps) {\n const { i18n, loadingContext } = useCoreContext();\n const getImage = useImage();\n const [completed, setCompleted] = useState(false);\n const [expired, setExpired] = useState(false);\n const [loading, setLoading] = useState(true);\n const [hasCalledActionHandled, setHasCalledActionHandled] = useState(false);\n const [delay, setDelay] = useState(props.delay);\n const [percentage, setPercentage] = useState(100);\n const [timePassed, setTimePassed] = useState(0);\n const [hasAdjustedTime, setHasAdjustedTime] = useState(false);\n const [storedTimeout, setStoredTimeout] = useState(null);\n const { amount } = props;\n\n const onTimeUp = (): void => {\n setExpired(true);\n clearTimeout(storedTimeout);\n props.onError(new AdyenCheckoutError('ERROR', 'Payment Expired'));\n };\n\n const onTick = (time): void => {\n setPercentage(time.percentage);\n };\n\n const onComplete = (status: StatusObject): void => {\n // Only make details call if we have a payload\n if (status.props.payload) {\n setCompleted(true);\n const state = {\n data: {\n details: { payload: status.props.payload },\n paymentData: props.paymentData\n }\n };\n // Send success response to onAdditionalDetails\n return props.onComplete(state, this);\n }\n\n // Show error state & call merchant defined error callback if we do not have a payload\n setExpired(true);\n props.onError(new AdyenCheckoutError('ERROR', 'successful result, but no payload in response'));\n };\n\n const onError = (status: StatusObject): void => {\n setExpired(true);\n\n // Only make details call if we have a payload\n if (status.props.payload) {\n const state = {\n data: {\n details: { payload: status.props.payload },\n paymentData: props.paymentData\n }\n };\n // Send error response to onAdditionalDetails\n return props.onComplete(state, this);\n }\n\n // Call merchant defined error callback if we do not have a payload\n props.onError(new AdyenCheckoutError('ERROR', 'error result with no payload in response'));\n };\n\n const checkStatus = async (): Promise<void> => {\n const { paymentData, clientKey, throttleInterval, pollStatus } = props;\n\n // If there's a custom pollStatus function, call it.\n // Otherwise, call the default one.\n const pollStatusFunction = pollStatus ?? (() => checkPaymentStatus(paymentData, clientKey, loadingContext, throttleInterval));\n\n if (!hasCalledActionHandled) {\n props.onActionHandled?.({ componentType: props.type, actionDescription: 'polling-started' });\n setHasCalledActionHandled(true);\n }\n\n return pollStatusFunction()\n .then(processResponse)\n .catch(({ message, ...response }) => ({\n type: 'network-error',\n props: {\n ...(message && { message: i18n.get(message) }),\n ...response\n }\n }))\n .then((status: StatusObject) => {\n switch (status.type) {\n case 'success':\n onComplete(status);\n break;\n\n case 'error':\n onError(status);\n break;\n\n default:\n setLoading(false);\n }\n });\n };\n\n const redirectToApp = (url): void => {\n window.location.assign(url);\n };\n\n useEffect(() => {\n if (props.shouldRedirectAutomatically && props.url) {\n redirectToApp(props.url);\n }\n }, [props.shouldRedirectAutomatically, props.url]);\n\n useEffect(() => {\n void checkStatus();\n return (): void => {\n clearTimeout(storedTimeout);\n };\n }, []);\n\n useEffect(() => {\n if (expired) return clearTimeout(storedTimeout);\n\n if (completed) return clearTimeout(storedTimeout);\n\n if (!loading) {\n // Retry until getting a complete response from the server OR it times out\n // Changes setTimeout time to new value (throttleInterval) after a certain amount of time (throttleTime) has passed\n const statusInterval = async (): Promise<void> => {\n await checkStatus();\n\n const actualTimePassed = timePassed + delay;\n // timePassed is the value that is the main \"engine\" that drives this useEffect/polling\n setTimePassed(actualTimePassed);\n\n if (actualTimePassed >= props.throttleTime && !hasAdjustedTime) {\n setDelay(props.throttleInterval);\n setHasAdjustedTime(true);\n }\n };\n\n // Create (another) interval to poll for a result\n setStoredTimeout(setTimeout(() => void statusInterval(), delay));\n }\n }, [loading, expired, completed, timePassed]);\n\n const finalState = (image, message) => (\n <div className=\"adyen-checkout__await adyen-checkout__await--result\">\n <img\n className=\"adyen-checkout__await__icon adyen-checkout__await__icon--result\"\n src={getImage({ imageFolder: 'components/' })(image)}\n alt={i18n.get(message)}\n />\n <div className=\"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result\">{i18n.get(message)}</div>\n </div>\n );\n\n if (expired) {\n return finalState('error', 'error.subtitle.payment');\n }\n\n if (completed) {\n return finalState('success', 'creditCard.success');\n }\n\n if (loading) {\n return (\n <div className=\"adyen-checkout__await\">\n {props.brandLogo && <img src={props.brandLogo} alt={props.type} className=\"adyen-checkout__await__brand-logo\" />}\n <Spinner inline={false} size=\"large\" />\n </div>\n );\n }\n\n const timeToPayString = i18n.get('wechatpay.timetopay').split('%@');\n\n return (\n <div\n className={classnames(\n 'adyen-checkout__await',\n `adyen-checkout__await--${props.type}`,\n props.classNameModifiers.map(m => `adyen-checkout__await--${m}`)\n )}\n >\n {props.brandLogo && <img src={props.brandLogo} alt={props.type} className=\"adyen-checkout__await__brand-logo\" />}\n\n {/* Everything is wrapped in !! so we evaluate the result as boolean,\n otherwise we might just print the value or object as mistake */}\n {!!(props.showAmount && amount?.value && amount?.currency) && (\n <div className=\"adyen-checkout__await__amount\">{i18n.amount(amount.value, amount.currency)}</div>\n )}\n\n {props.messageText != null && <div className=\"adyen-checkout__await__subtitle\">{props.messageText}</div>}\n\n <div className=\"adyen-checkout__await__indicator-holder\">\n <div className=\"adyen-checkout__await__indicator-spinner\">\n <Spinner inline={false} size=\"medium\" />\n </div>\n <div className=\"adyen-checkout__await__indicator-text\">{props.awaitText}</div>\n </div>\n\n {props.showCountdownTimer && (\n <div className=\"adyen-checkout__await__countdown-holder\">\n <div className=\"adyen-checkout__await__progress\">\n <span className=\"adyen-checkout__await__percentage\" style={{ width: `${percentage}%` }} />\n </div>\n\n <div className=\"adyen-checkout__await__countdown\">\n {timeToPayString[0]}&nbsp;\n <Countdown minutesFromNow={props.countdownTime} onTick={onTick} onCompleted={onTimeUp} />\n &nbsp;{timeToPayString[1]}\n </div>\n </div>\n )}\n\n {props.url && !props.shouldRedirectAutomatically && (\n <div className=\"adyen-checkout__await__app-link\">\n <ContentSeparator />\n <Button classNameModifiers={['await']} onClick={() => redirectToApp(props.url)} label={i18n.get('openApp')} />\n </div>\n )}\n\n {props.instructions && (\n <div className=\"adyen-checkout__await__instructions\">\n {typeof props.instructions === 'string' ? i18n.get(props.instructions) : props.instructions?.()}\n </div>\n )}\n\n {props.endSlot && <div className=\"adyen-checkout__await__end-slot\">{props.endSlot()}</div>}\n </div>\n );\n}\n\nAwait.defaultProps = {\n countdownTime: 15,\n onError: () => {},\n onComplete: () => {},\n delay: 2000,\n throttleTime: 60000,\n throttleInterval: 10000,\n showCountdownTimer: true,\n classNameModifiers: [],\n url: null\n};\n\nexport default Await;\n"],"names":["Await","props","i18n","loadingContext","useCoreContext","getImage","useImage","completed","setCompleted","useState","expired","setExpired","loading","setLoading","hasCalledActionHandled","setHasCalledActionHandled","delay","setDelay","percentage","setPercentage","timePassed","setTimePassed","hasAdjustedTime","setHasAdjustedTime","storedTimeout","setStoredTimeout","amount","onComplete","status","payload","state","data","details","paymentData","this","onError","AdyenCheckoutError","checkStatus","async","clientKey","throttleInterval","pollStatus","pollStatusFunction","checkPaymentStatus","onActionHandled","componentType","type","actionDescription","then","processResponse","catch","_param","message","response","_object_spread","get","redirectToApp","url","window","location","assign","useEffect","shouldRedirectAutomatically","clearTimeout","statusInterval","actualTimePassed","throttleTime","setTimeout","finalState","image","h","div","className","img","src","imageFolder","alt","brandLogo","Spinner","inline","size","timeToPayString","split","classnames","classNameModifiers","map","m","showAmount","value","currency","messageText","awaitText","showCountdownTimer","span","style","width","Countdown","minutesFromNow","countdownTime","onTick","time","onCompleted","ContentSeparator","Button","onClick","label","instructions","endSlot","defaultProps"],"mappings":"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"}
1
+ {"version":3,"file":"Await.js","sources":["../../../../../src/components/internal/Await/Await.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport classnames from 'classnames';\nimport checkPaymentStatus from '../../../core/Services/payment-status';\nimport processResponse from '../../../core/ProcessResponse';\n\nimport Spinner from '../../internal/Spinner';\nimport Countdown from '../Countdown';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { AwaitComponentProps, StatusObject } from './types';\nimport './Await.scss';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport ContentSeparator from '../ContentSeparator';\nimport useImage from '../../../core/Context/useImage';\n\nfunction Await(props: AwaitComponentProps) {\n const { i18n, loadingContext } = useCoreContext();\n const getImage = useImage();\n const [completed, setCompleted] = useState(false);\n const [expired, setExpired] = useState(false);\n const [loading, setLoading] = useState(true);\n const [hasCalledActionHandled, setHasCalledActionHandled] = useState(false);\n const [delay, setDelay] = useState(props.delay);\n const [percentage, setPercentage] = useState(100);\n const [timePassed, setTimePassed] = useState(0);\n const [hasAdjustedTime, setHasAdjustedTime] = useState(false);\n const [storedTimeout, setStoredTimeout] = useState(null);\n const { amount } = props;\n\n const onTimeUp = (): void => {\n setExpired(true);\n clearTimeout(storedTimeout);\n props.onError(new AdyenCheckoutError('ERROR', 'Payment Expired'));\n };\n\n const onTick = (time): void => {\n setPercentage(time.percentage);\n };\n\n const onComplete = (status: StatusObject): void => {\n // Only make details call if we have a payload\n if (status.props.payload) {\n setCompleted(true);\n const state = {\n data: {\n details: { payload: status.props.payload },\n paymentData: props.paymentData\n }\n };\n // Send success response to onAdditionalDetails\n return props.onComplete(state, this);\n }\n\n // Show error state & call merchant defined error callback if we do not have a payload\n setExpired(true);\n props.onError(new AdyenCheckoutError('ERROR', 'successful result, but no payload in response'));\n };\n\n const onError = (status: StatusObject): void => {\n setExpired(true);\n\n // Only make details call if we have a payload\n if (status.props.payload) {\n const state = {\n data: {\n details: { payload: status.props.payload },\n paymentData: props.paymentData\n }\n };\n // Send error response to onAdditionalDetails\n return props.onComplete(state, this);\n }\n\n // Call merchant defined error callback if we do not have a payload\n props.onError(new AdyenCheckoutError('ERROR', 'error result with no payload in response'));\n };\n\n const checkStatus = async (): Promise<void> => {\n const { paymentData, clientKey, throttleInterval, pollStatus } = props;\n\n // If there's a custom pollStatus function, call it.\n // Otherwise, call the default one.\n const pollStatusFunction = pollStatus ?? (() => checkPaymentStatus(paymentData, clientKey, loadingContext, throttleInterval));\n\n if (!hasCalledActionHandled) {\n props.onActionHandled?.({ componentType: props.type, actionDescription: 'polling-started' });\n setHasCalledActionHandled(true);\n }\n\n return pollStatusFunction()\n .then(processResponse)\n .catch(({ message, ...response }) => ({\n type: 'network-error',\n props: {\n ...(message && { message: i18n.get(message) }),\n ...response\n }\n }))\n .then((status: StatusObject) => {\n switch (status.type) {\n case 'success':\n onComplete(status);\n break;\n\n case 'error':\n onError(status);\n break;\n\n default:\n setLoading(false);\n }\n });\n };\n\n const redirectToApp = (url): void => {\n window.location.assign(url);\n };\n\n useEffect(() => {\n if (props.shouldRedirectAutomatically && props.url) {\n redirectToApp(props.url);\n }\n }, [props.shouldRedirectAutomatically, props.url]);\n\n useEffect(() => {\n void checkStatus();\n return (): void => {\n clearTimeout(storedTimeout);\n };\n }, []);\n\n useEffect(() => {\n if (expired) return clearTimeout(storedTimeout);\n\n if (completed) return clearTimeout(storedTimeout);\n\n if (!loading) {\n // Retry until getting a complete response from the server OR it times out\n // Changes setTimeout time to new value (throttleInterval) after a certain amount of time (throttleTime) has passed\n const statusInterval = async (): Promise<void> => {\n await checkStatus();\n\n const actualTimePassed = timePassed + delay;\n // timePassed is the value that is the main \"engine\" that drives this useEffect/polling\n setTimePassed(actualTimePassed);\n\n if (actualTimePassed >= props.throttleTime && !hasAdjustedTime) {\n setDelay(props.throttleInterval);\n setHasAdjustedTime(true);\n }\n };\n\n // Create (another) interval to poll for a result\n setStoredTimeout(setTimeout(() => void statusInterval(), delay));\n }\n }, [loading, expired, completed, timePassed]);\n\n const finalState = (image, message) => (\n <div className=\"adyen-checkout__await adyen-checkout__await--result\">\n <img\n className=\"adyen-checkout__await__icon adyen-checkout__await__icon--result\"\n src={getImage({ imageFolder: 'components/' })(image)}\n alt={i18n.get(message)}\n />\n <div className=\"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result\">{i18n.get(message)}</div>\n </div>\n );\n\n if (expired) {\n return finalState('error', 'error.subtitle.payment');\n }\n\n if (completed) {\n return finalState('success', 'creditCard.success');\n }\n\n if (loading) {\n return (\n <div className=\"adyen-checkout__await\">\n {props.brandLogo && <img src={props.brandLogo} alt={props.type} className=\"adyen-checkout__await__brand-logo\" />}\n <Spinner inline={false} size=\"large\" />\n </div>\n );\n }\n\n const timeToPayString = i18n.get('wechatpay.timetopay').split('%@');\n\n return (\n <div\n className={classnames(\n 'adyen-checkout__await',\n `adyen-checkout__await--${props.type}`,\n props.classNameModifiers.map(m => `adyen-checkout__await--${m}`)\n )}\n >\n {props.brandLogo && <img src={props.brandLogo} alt={props.type} className=\"adyen-checkout__await__brand-logo\" />}\n\n {/* Everything is wrapped in !! so we evaluate the result as boolean,\n otherwise we might just print the value or object as mistake */}\n {!!(props.showAmount && amount?.value && amount?.currency) && (\n <div className=\"adyen-checkout__await__amount\">{i18n.amount(amount.value, amount.currency)}</div>\n )}\n\n {props.messageText != null && <div className=\"adyen-checkout__await__subtitle\">{props.messageText}</div>}\n\n <div className=\"adyen-checkout__await__indicator-holder\">\n <div className=\"adyen-checkout__await__indicator-spinner\">\n <Spinner inline={false} size=\"medium\" />\n </div>\n <div className=\"adyen-checkout__await__indicator-text\">{props.awaitText}</div>\n </div>\n\n {props.showCountdownTimer && (\n <div className=\"adyen-checkout__await__countdown-holder\">\n <div className=\"adyen-checkout__await__progress\">\n <span className=\"adyen-checkout__await__percentage\" style={{ width: `${percentage}%` }} />\n </div>\n\n <div className=\"adyen-checkout__await__countdown\">\n {timeToPayString[0]}&nbsp;\n <Countdown minutesFromNow={props.countdownTime} onTick={onTick} onCompleted={onTimeUp} />\n &nbsp;{timeToPayString[1]}\n </div>\n </div>\n )}\n\n {props.url && !props.shouldRedirectAutomatically && (\n <div className=\"adyen-checkout__await__app-link\">\n <ContentSeparator />\n <Button classNameModifiers={['await']} onClick={() => redirectToApp(props.url)} label={i18n.get('openApp')} />\n </div>\n )}\n\n {props.instructions && (\n <div className=\"adyen-checkout__await__instructions\">\n {typeof props.instructions === 'string' ? i18n.get(props.instructions) : props.instructions?.()}\n </div>\n )}\n\n {props.endSlot && <div className=\"adyen-checkout__await__end-slot\">{props.endSlot()}</div>}\n </div>\n );\n}\n\nAwait.defaultProps = {\n countdownTime: 15,\n onError: () => {},\n onComplete: () => {},\n delay: 2000,\n throttleTime: 60000,\n throttleInterval: 10000,\n showCountdownTimer: true,\n classNameModifiers: [],\n url: null\n};\n\nexport default Await;\n"],"names":["Await","props","i18n","loadingContext","useCoreContext","getImage","useImage","completed","setCompleted","useState","expired","setExpired","loading","setLoading","hasCalledActionHandled","setHasCalledActionHandled","delay","setDelay","percentage","setPercentage","timePassed","setTimePassed","hasAdjustedTime","setHasAdjustedTime","storedTimeout","setStoredTimeout","amount","onComplete","status","payload","state","data","details","paymentData","this","onError","AdyenCheckoutError","checkStatus","async","clientKey","throttleInterval","pollStatus","pollStatusFunction","checkPaymentStatus","onActionHandled","componentType","type","actionDescription","then","processResponse","catch","_param","message","response","_object_spread","get","redirectToApp","url","window","location","assign","useEffect","shouldRedirectAutomatically","clearTimeout","statusInterval","actualTimePassed","throttleTime","setTimeout","finalState","image","h","div","className","img","src","imageFolder","alt","brandLogo","Spinner","inline","size","timeToPayString","split","classnames","classNameModifiers","map","m","showAmount","value","currency","messageText","awaitText","showCountdownTimer","span","style","width","Countdown","minutesFromNow","countdownTime","onTick","time","onCompleted","ContentSeparator","Button","onClick","label","instructions","endSlot","defaultProps"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{render as t}from"../../../external/preact/dist/preact.js";import e from"../../../utils/getProp.js";import r from"../../../utils/uuid.js";import o from"../../../core/Errors/AdyenCheckoutError.js";import{NO_CHECKOUT_ATTEMPT_ID as n,ANALYTICS_RENDERED_STR as s}from"../../../core/Analytics/constants.js";import{on as i,off as c}from"../../../utils/listenerUtils.js";import{AnalyticsInfoEvent as p}from"../../../core/Analytics/AnalyticsInfoEvent.js";function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){a(t,e,r[e])}))}return t}function h(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}class l{buildElementProps(t){this.props=this.formatProps(u({},this.constructor.defaultProps,t))}formatProps(t){return t}formatData(){return{}}setUpAnalytics(t){return null}submitAnalytics(t){return null}handleKeyPress(t){return null}setState(t){this.state=u({},this.state,t)}get data(){var t;const r=e(this.props,"modules.risk.data");var o;const s=null!==(o=null===(t=e(this.props,"modules.analytics.getCheckoutAttemptId"))||void 0===t?void 0:t())&&void 0!==o?o:n,i=this.state.order||this.props.order,c=this.formatData();return c.paymentMethod&&s&&(c.paymentMethod.checkoutAttemptId=s),h(u({},r&&{riskData:{clientData:r}},i&&{order:{orderData:i.orderData,pspReference:i.pspReference}},c),{clientStateDataIndicator:!0})}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){const r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");const o=!this._node;var n;(this._node&&this.unmount(),this._node=r,i(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),t(this._component,r),o)&&(this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:r&&r.offsetWidth,component:this.props.isDropin?"dropin":null!==(n=this.constructor.analyticsType)&&void 0!==n?n:this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then((()=>{if(!this.props.isDropin){const t=new p({type:s});this.submitAnalytics(t)}})));return this}update(t){return this.props=this.formatProps(u({},this.props,t)),this.state={},this.unmount().mount(this._node)}unmount(){return c(this._node,"keypress",this.handleKeyPress),this._node&&t(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(t,e){a(this,"_id",`${this.constructor.type}-${r()}`),a(this,"core",void 0),a(this,"props",void 0),a(this,"state",{}),a(this,"_component",void 0),a(this,"_node",null);const n=function(t){return!!t&&("function"==typeof t.initialize&&"function"==typeof t.createFromAction)}(t);if(!n)throw new o("IMPLEMENTATION_ERROR",`Trying to initialise the component '${this.constructor.type}' without a reference to an instance of AdyenCheckout`);this.core=t,this.buildElementProps(e),this.handleKeyPress=this.handleKeyPress.bind(this)}}a(l,"defaultProps",{});export{l as default};
1
+ import{render as t}from"../../../external/preact/dist/preact.js";import e from"../../../utils/getProp.js";import r from"../../../utils/uuid.js";import o from"../../../core/Errors/AdyenCheckoutError.js";import{NO_CHECKOUT_ATTEMPT_ID as n,ANALYTICS_RENDERED_STR as s}from"../../../core/Analytics/constants.js";import{on as i,off as c}from"../../../utils/listenerUtils.js";import{AnalyticsInfoEvent as p}from"../../../core/Analytics/AnalyticsInfoEvent.js";function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){a(t,e,r[e])})}return t}function h(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}class l{buildElementProps(t){this.props=this.formatProps(u({},this.constructor.defaultProps,t))}formatProps(t){return t}formatData(){return{}}setUpAnalytics(t){return null}submitAnalytics(t){return null}handleKeyPress(t){return null}setState(t){this.state=u({},this.state,t)}get data(){var t;const r=e(this.props,"modules.risk.data");var o;const s=null!==(o=null===(t=e(this.props,"modules.analytics.getCheckoutAttemptId"))||void 0===t?void 0:t())&&void 0!==o?o:n,i=this.state.order||this.props.order,c=this.formatData();return c.paymentMethod&&s&&(c.paymentMethod.checkoutAttemptId=s),h(u({},r&&{riskData:{clientData:r}},i&&{order:{orderData:i.orderData,pspReference:i.pspReference}},c),{clientStateDataIndicator:!0})}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){const r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");const o=!this._node;var n;(this._node&&this.unmount(),this._node=r,i(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),t(this._component,r),o)&&(this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:r&&r.offsetWidth,component:this.props.isDropin?"dropin":null!==(n=this.constructor.analyticsType)&&void 0!==n?n:this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then(()=>{if(!this.props.isDropin){const t=new p({type:s});this.submitAnalytics(t)}}));return this}update(t){return this.props=this.formatProps(u({},this.props,t)),this.state={},this.unmount().mount(this._node)}unmount(){return c(this._node,"keypress",this.handleKeyPress),this._node&&t(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(t,e){a(this,"_id",`${this.constructor.type}-${r()}`),a(this,"core",void 0),a(this,"props",void 0),a(this,"state",{}),a(this,"_component",void 0),a(this,"_node",null);const n=function(t){return!!t&&("function"==typeof t.initialize&&"function"==typeof t.createFromAction)}(t);if(!n)throw new o("IMPLEMENTATION_ERROR",`Trying to initialise the component '${this.constructor.type}' without a reference to an instance of AdyenCheckout`);this.core=t,this.buildElementProps(e),this.handleKeyPress=this.handleKeyPress.bind(this)}}a(l,"defaultProps",{});export{l as default};
2
2
  //# sourceMappingURL=BaseElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseElement.js","sources":["../../../../../src/components/internal/BaseElement/BaseElement.ts"],"sourcesContent":["import { ComponentChild, h, render } from 'preact';\nimport getProp from '../../../utils/getProp';\nimport uuid from '../../../utils/uuid';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_RENDERED_STR, NO_CHECKOUT_ATTEMPT_ID } from '../../../core/Analytics/constants';\n\nimport type { ICore } from '../../../core/types';\nimport type { BaseElementProps, IBaseElement } from './types';\nimport type { PaymentData } from '../../../types/global-types';\nimport { AnalyticsInitialEvent } from '../../../core/Analytics/types';\nimport { off, on } from '../../../utils/listenerUtils';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../../core/Analytics/AnalyticsEvent';\n\n/**\n * Verify if the first parameter is instance of Core.\n * We do not use 'instanceof' to avoid importing the Core class directly into this class.\n * @param checkout\n */\nfunction assertIsCoreInstance(checkout: ICore): checkout is ICore {\n if (!checkout) return false;\n const isCoreObject = typeof checkout.initialize === 'function' && typeof checkout.createFromAction === 'function';\n return isCoreObject;\n}\n\nabstract class BaseElement<P extends BaseElementProps> implements IBaseElement {\n public readonly _id = `${this.constructor['type']}-${uuid()}`;\n public readonly core: ICore;\n\n public props: P;\n public state: any = {};\n public _component;\n\n protected _node: HTMLElement = null;\n\n protected static defaultProps = {};\n\n constructor(checkout: ICore, props?: P) {\n const isCoreInstance = assertIsCoreInstance(checkout);\n\n if (!isCoreInstance) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Trying to initialise the component '${this.constructor['type']}' without a reference to an instance of AdyenCheckout`\n );\n }\n\n this.core = checkout;\n this.buildElementProps(props);\n\n this.handleKeyPress = this.handleKeyPress.bind(this);\n }\n\n protected buildElementProps(componentProps?: P) {\n this.props = this.formatProps({ ...this.constructor['defaultProps'], ...componentProps });\n }\n\n /**\n * Executed during creation of any payment element.\n * Gives a chance to any paymentMethod to format the props we're receiving.\n */\n protected formatProps(props: P) {\n return props;\n }\n\n /**\n * Executed on the `data` getter.\n * Returns the component data necessary for the /payments request\n */\n protected formatData(): any {\n return {};\n }\n\n /* eslint-disable-next-line */\n protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent) {\n return null;\n }\n\n /* eslint-disable-next-line */\n protected submitAnalytics(analyticsObj?: AnalyticsEvent) {\n return null;\n }\n\n /* eslint-disable-next-line */\n protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) {\n return null;\n }\n\n protected setState(newState: object): void {\n this.state = { ...this.state, ...newState };\n }\n\n /**\n * Returns the component payment data ready to submit to the Checkout API\n * Note: this does not ensure validity, check isValid first\n */\n public get data(): PaymentData {\n const clientData = getProp(this.props, 'modules.risk.data');\n const checkoutAttemptId = getProp(this.props, 'modules.analytics.getCheckoutAttemptId')?.() ?? NO_CHECKOUT_ATTEMPT_ID; // NOTE: we never expect to see this \"failed\" value, but, just in case...\n const order = this.state.order || this.props.order;\n const componentData = this.formatData();\n\n if (componentData.paymentMethod && checkoutAttemptId) {\n componentData.paymentMethod.checkoutAttemptId = checkoutAttemptId;\n }\n\n return {\n ...(clientData && { riskData: { clientData } }),\n ...(order && { order: { orderData: order.orderData, pspReference: order.pspReference } }),\n ...componentData,\n clientStateDataIndicator: true\n };\n }\n\n /**\n * Method used to make the payment method active\n * (Useful when there are different payment methods available and activating one PM must trigger a specific task)\n */\n public activate(): void {\n return;\n }\n\n public render(): ComponentChild | Error {\n // render() not implemented in the element\n throw new Error('Payment method cannot be rendered.');\n }\n\n /**\n * Mounts an element into the dom\n * @param domNode - Node (or selector) where we will mount the payment element\n * @returns this - the payment element instance we mounted\n */\n public mount(domNode: HTMLElement | string): this {\n const node = typeof domNode === 'string' ? document.querySelector<HTMLElement>(domNode) : domNode;\n\n if (!node) {\n throw new Error('Component could not mount. Root node was not found.');\n }\n\n const setupAnalytics = !this._node;\n\n if (this._node) {\n this.unmount(); // new, if this._node exists then we are \"remounting\" so we first need to unmount if it's not already been done\n }\n\n this._node = node;\n\n // Add listener for key press events, notably 'Enter' key presses\n on(this._node, 'keypress', this.handleKeyPress, false);\n\n this._component = this.render();\n\n render(this._component, node);\n\n // Set up analytics (once, since this._node is currently undefined) now that we have mounted and rendered\n if (setupAnalytics) {\n if (this.props.modules && this.props.modules.analytics) {\n this.setUpAnalytics({\n containerWidth: node && node.offsetWidth,\n component: !this.props.isDropin ? (this.constructor['analyticsType'] ?? this.constructor['type']) : 'dropin',\n flavor: !this.props.isDropin ? 'components' : 'dropin'\n }).then(() => {\n // Once the initial analytics set up call has been made...\n // ...create an analytics event declaring that the component has been rendered\n // (The dropin will do this itself from DropinComponent once the PM list has rendered)\n if (!this.props.isDropin) {\n const event = new AnalyticsInfoEvent({ type: ANALYTICS_RENDERED_STR });\n this.submitAnalytics(event);\n }\n });\n }\n }\n\n return this;\n }\n\n /**\n * Updates props, resets the internal state and remounts the element.\n *\n * @param props - props to update\n * @returns this - the element instance\n */\n public update(props: Partial<P>): this {\n this.props = this.formatProps({ ...this.props, ...props });\n this.state = {};\n\n return this.unmount().mount(this._node); // for new mount fny\n }\n\n /**\n * Unmounts a payment element from the DOM\n */\n public unmount(): this {\n // Remove listener\n off(this._node, 'keypress', this.handleKeyPress);\n\n if (this._node) {\n render(null, this._node);\n }\n\n return this;\n }\n\n /**\n * Unmounts an element and removes it from the parent instance\n * For \"destroy\" type cleanup - when you don't intend to use the component again\n */\n public remove() {\n this.unmount();\n\n if (this.core) {\n this.core.remove(this);\n }\n }\n}\n\nexport default BaseElement;\n"],"names":["BaseElement","buildElementProps","componentProps","this","props","formatProps","_object_spread","constructor","formatData","setUpAnalytics","setUpAnalyticsObj","submitAnalytics","analyticsObj","handleKeyPress","e","setState","newState","state","data","getProp","clientData","checkoutAttemptId","NO_CHECKOUT_ATTEMPT_ID","order","componentData","paymentMethod","_object_spread_props","riskData","orderData","pspReference","clientStateDataIndicator","activate","render","Error","mount","domNode","node","document","querySelector","setupAnalytics","_node","_this_constructor_analyticsType","unmount","on","_component","modules","analytics","containerWidth","offsetWidth","component","isDropin","flavor","then","event","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","update","off","remove","core","checkout","_define_property","_id","uuid","isCoreInstance","initialize","createFromAction","assertIsCoreInstance","AdyenCheckoutError","bind","defaultProps"],"mappings":"ovCAyBA,MAAeA,EA4BDC,iBAAAA,CAAkBC,GACxBC,KAAKC,MAAQD,KAAKE,YAAYC,EAAA,GAAKH,KAAKI,yBAAgCL,GAC5E,CAMUG,WAAAA,CAAYD,GAClB,OAAOA,CACX,CAMA,UAAAI,GACI,MAAO,CAAC,CACZ,CAGUC,cAAAA,CAAeC,GACrB,OAAO,IACX,CAGUC,eAAAA,CAAgBC,GACtB,OAAO,IACX,CAGUC,cAAAA,CAAeC,GACrB,OAAO,IACX,CAEUC,QAAAA,CAASC,GACfb,KAAKc,MAAQX,KAAKH,KAAKc,MAAUD,EACrC,CAMA,QAAWE,GAEmBC,IAAAA,EAD1B,MAAMC,EAAaD,EAAQhB,KAAKC,MAAO,qBACbe,IAAAA,EAA1B,MAAME,EAAoBF,QAAAA,UAAAA,EAAAA,EAAQhB,KAAKC,MAAO,iDAApBe,IAAAA,OAAAA,EAAAA,WAAAA,IAAAA,EAAAA,EAAqEG,EACzFC,EAAQpB,KAAKc,MAAMM,OAASpB,KAAKC,MAAMmB,MACvCC,EAAgBrB,KAAKK,aAM3B,OAJIgB,EAAcC,eAAiBJ,IAC/BG,EAAcC,cAAcJ,kBAAoBA,GAG7CK,OACCN,GAAc,CAAEO,SAAU,CAAEP,eAC5BG,GAAS,CAAEA,MAAO,CAAEK,UAAWL,EAAMK,UAAWC,aAAcN,EAAMM,eACrEL,GAAAA,CACHM,0BAA0B,GAElC,CAMA,QAAAC,GAEA,CAEOC,MAAAA,GAEH,MAAM,IAAIC,MAAM,qCACpB,CAOOC,KAAAA,CAAMC,GACT,MAAMC,EAA0B,iBAAZD,EAAuBE,SAASC,cAA2BH,GAAWA,EAE1F,IAAKC,EACD,MAAM,IAAIH,MAAM,uDAGpB,MAAMM,GAAkBpC,KAAKqC,MAoBkB,IAAAC,GAlB3CtC,KAAKqC,OACLrC,KAAKuC,UAGTvC,KAAKqC,MAAQJ,EAGbO,EAAGxC,KAAKqC,MAAO,WAAYrC,KAAKU,gBAAgB,GAEhDV,KAAKyC,WAAazC,KAAK6B,SAEvBA,EAAO7B,KAAKyC,WAAYR,GAGpBG,KACIpC,KAAKC,MAAMyC,SAAW1C,KAAKC,MAAMyC,QAAQC,WACzC3C,KAAKM,eAAe,CAChBsC,eAAgBX,GAAQA,EAAKY,YAC7BC,UAAY9C,KAAKC,MAAM8C,SAA6E,iBAAjET,EAAAtC,KAAKI,YAAY,qBAAjB,IAAAkC,EAAAA,EAAqCtC,KAAKI,YAAY,KACzF4C,OAAShD,KAAKC,MAAM8C,SAA0B,SAAf,eAChCE,MAAK,KAIJ,IAAKjD,KAAKC,MAAM8C,SAAU,CACtB,MAAMG,EAAQ,IAAIC,EAAmB,CAAEC,KAAMC,IAC7CrD,KAAKQ,gBAAgB0C,EACzB,MAKZ,OAAOlD,IACX,CAQOsD,MAAAA,CAAOrD,GAIV,OAHAD,KAAKC,MAAQD,KAAKE,YAAYC,EAAK,CAAA,EAAAH,KAAKC,MAAUA,IAClDD,KAAKc,MAAQ,CAAC,EAEPd,KAAKuC,UAAUR,MAAM/B,KAAKqC,MACrC,CAKA,OAAAE,GAQI,OANAgB,EAAIvD,KAAKqC,MAAO,WAAYrC,KAAKU,gBAE7BV,KAAKqC,OACLR,EAAO,KAAM7B,KAAKqC,OAGfrC,IACX,CAMA,MAAAwD,GACIxD,KAAKuC,UAEDvC,KAAKyD,MACLzD,KAAKyD,KAAKD,OAAOxD,KAEzB,CAhLAI,WAAAA,CAAYsD,EAAiBzD,GAX7B0D,EAAgBC,KAAAA,MAAM,GAAG5D,KAAKI,YAAmB,QAAIyD,OACrDF,EAAA3D,KAAgByD,YAAhB,GAEAE,EAAA3D,KAAOC,aAAP,GACA0D,EAAA3D,KAAOc,QAAa,IACpB6C,EAAA3D,KAAOyC,kBAAP,GAEAkB,EAAA3D,KAAUqC,QAAqB,MAK3B,MAAMyB,EAnBd,SAA8BJ,GAC1B,QAAKA,IAC+C,mBAAxBA,EAASK,YAAkE,mBAA9BL,EAASM,iBAEtF,CAe+BC,CAAqBP,GAE5C,IAAKI,EACD,MAAM,IAAII,EACN,uBACA,uCAAuClE,KAAKI,YAAmB,6DAIvEJ,KAAKyD,KAAOC,EACZ1D,KAAKF,kBAAkBG,GAEvBD,KAAKU,eAAiBV,KAAKU,eAAeyD,KAAKnE,KACnD,EAhBA2D,EAVW9D,EAUMuE,eAAe"}
1
+ {"version":3,"file":"BaseElement.js","sources":["../../../../../src/components/internal/BaseElement/BaseElement.ts"],"sourcesContent":["import { ComponentChild, h, render } from 'preact';\nimport getProp from '../../../utils/getProp';\nimport uuid from '../../../utils/uuid';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_RENDERED_STR, NO_CHECKOUT_ATTEMPT_ID } from '../../../core/Analytics/constants';\n\nimport type { ICore } from '../../../core/types';\nimport type { BaseElementProps, IBaseElement } from './types';\nimport type { PaymentData } from '../../../types/global-types';\nimport { AnalyticsInitialEvent } from '../../../core/Analytics/types';\nimport { off, on } from '../../../utils/listenerUtils';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../../core/Analytics/AnalyticsEvent';\n\n/**\n * Verify if the first parameter is instance of Core.\n * We do not use 'instanceof' to avoid importing the Core class directly into this class.\n * @param checkout\n */\nfunction assertIsCoreInstance(checkout: ICore): checkout is ICore {\n if (!checkout) return false;\n const isCoreObject = typeof checkout.initialize === 'function' && typeof checkout.createFromAction === 'function';\n return isCoreObject;\n}\n\nabstract class BaseElement<P extends BaseElementProps> implements IBaseElement {\n public readonly _id = `${this.constructor['type']}-${uuid()}`;\n public readonly core: ICore;\n\n public props: P;\n public state: any = {};\n public _component;\n\n protected _node: HTMLElement = null;\n\n protected static defaultProps = {};\n\n constructor(checkout: ICore, props?: P) {\n const isCoreInstance = assertIsCoreInstance(checkout);\n\n if (!isCoreInstance) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Trying to initialise the component '${this.constructor['type']}' without a reference to an instance of AdyenCheckout`\n );\n }\n\n this.core = checkout;\n this.buildElementProps(props);\n\n this.handleKeyPress = this.handleKeyPress.bind(this);\n }\n\n protected buildElementProps(componentProps?: P) {\n this.props = this.formatProps({ ...this.constructor['defaultProps'], ...componentProps });\n }\n\n /**\n * Executed during creation of any payment element.\n * Gives a chance to any paymentMethod to format the props we're receiving.\n */\n protected formatProps(props: P) {\n return props;\n }\n\n /**\n * Executed on the `data` getter.\n * Returns the component data necessary for the /payments request\n */\n protected formatData(): any {\n return {};\n }\n\n /* eslint-disable-next-line */\n protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent) {\n return null;\n }\n\n /* eslint-disable-next-line */\n protected submitAnalytics(analyticsObj?: AnalyticsEvent) {\n return null;\n }\n\n /* eslint-disable-next-line */\n protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) {\n return null;\n }\n\n protected setState(newState: object): void {\n this.state = { ...this.state, ...newState };\n }\n\n /**\n * Returns the component payment data ready to submit to the Checkout API\n * Note: this does not ensure validity, check isValid first\n */\n public get data(): PaymentData {\n const clientData = getProp(this.props, 'modules.risk.data');\n const checkoutAttemptId = getProp(this.props, 'modules.analytics.getCheckoutAttemptId')?.() ?? NO_CHECKOUT_ATTEMPT_ID; // NOTE: we never expect to see this \"failed\" value, but, just in case...\n const order = this.state.order || this.props.order;\n const componentData = this.formatData();\n\n if (componentData.paymentMethod && checkoutAttemptId) {\n componentData.paymentMethod.checkoutAttemptId = checkoutAttemptId;\n }\n\n return {\n ...(clientData && { riskData: { clientData } }),\n ...(order && { order: { orderData: order.orderData, pspReference: order.pspReference } }),\n ...componentData,\n clientStateDataIndicator: true\n };\n }\n\n /**\n * Method used to make the payment method active\n * (Useful when there are different payment methods available and activating one PM must trigger a specific task)\n */\n public activate(): void {\n return;\n }\n\n public render(): ComponentChild | Error {\n // render() not implemented in the element\n throw new Error('Payment method cannot be rendered.');\n }\n\n /**\n * Mounts an element into the dom\n * @param domNode - Node (or selector) where we will mount the payment element\n * @returns this - the payment element instance we mounted\n */\n public mount(domNode: HTMLElement | string): this {\n const node = typeof domNode === 'string' ? document.querySelector<HTMLElement>(domNode) : domNode;\n\n if (!node) {\n throw new Error('Component could not mount. Root node was not found.');\n }\n\n const setupAnalytics = !this._node;\n\n if (this._node) {\n this.unmount(); // new, if this._node exists then we are \"remounting\" so we first need to unmount if it's not already been done\n }\n\n this._node = node;\n\n // Add listener for key press events, notably 'Enter' key presses\n on(this._node, 'keypress', this.handleKeyPress, false);\n\n this._component = this.render();\n\n render(this._component, node);\n\n // Set up analytics (once, since this._node is currently undefined) now that we have mounted and rendered\n if (setupAnalytics) {\n if (this.props.modules && this.props.modules.analytics) {\n this.setUpAnalytics({\n containerWidth: node && node.offsetWidth,\n component: !this.props.isDropin ? (this.constructor['analyticsType'] ?? this.constructor['type']) : 'dropin',\n flavor: !this.props.isDropin ? 'components' : 'dropin'\n }).then(() => {\n // Once the initial analytics set up call has been made...\n // ...create an analytics event declaring that the component has been rendered\n // (The dropin will do this itself from DropinComponent once the PM list has rendered)\n if (!this.props.isDropin) {\n const event = new AnalyticsInfoEvent({ type: ANALYTICS_RENDERED_STR });\n this.submitAnalytics(event);\n }\n });\n }\n }\n\n return this;\n }\n\n /**\n * Updates props, resets the internal state and remounts the element.\n *\n * @param props - props to update\n * @returns this - the element instance\n */\n public update(props: Partial<P>): this {\n this.props = this.formatProps({ ...this.props, ...props });\n this.state = {};\n\n return this.unmount().mount(this._node); // for new mount fny\n }\n\n /**\n * Unmounts a payment element from the DOM\n */\n public unmount(): this {\n // Remove listener\n off(this._node, 'keypress', this.handleKeyPress);\n\n if (this._node) {\n render(null, this._node);\n }\n\n return this;\n }\n\n /**\n * Unmounts an element and removes it from the parent instance\n * For \"destroy\" type cleanup - when you don't intend to use the component again\n */\n public remove() {\n this.unmount();\n\n if (this.core) {\n this.core.remove(this);\n }\n }\n}\n\nexport default BaseElement;\n"],"names":["BaseElement","buildElementProps","componentProps","this","props","formatProps","_object_spread","constructor","formatData","setUpAnalytics","setUpAnalyticsObj","submitAnalytics","analyticsObj","handleKeyPress","e","setState","newState","state","data","getProp","clientData","checkoutAttemptId","NO_CHECKOUT_ATTEMPT_ID","order","componentData","paymentMethod","_object_spread_props","riskData","orderData","pspReference","clientStateDataIndicator","activate","render","Error","mount","domNode","node","document","querySelector","setupAnalytics","_node","_this_constructor_analyticsType","unmount","on","_component","modules","analytics","containerWidth","offsetWidth","component","isDropin","flavor","then","event","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","update","off","remove","core","checkout","_define_property","_id","uuid","isCoreInstance","initialize","createFromAction","assertIsCoreInstance","AdyenCheckoutError","bind","defaultProps"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{Component as e,createElement as t}from"../../../external/preact/dist/preact.js";import n from"../../../_virtual/index.js";import a from"../Spinner/Spinner.js";import{useCoreContext as o}from"../../../core/Context/CoreProvider.js";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class s extends e{render(){const{classNameModifiers:e=[],disabled:i,href:s,icon:r,inline:l,label:c,ariaLabel:d,status:p,variant:u,buttonRef:m}=this.props,{completed:_}=this.state,{i18n:h}=o(),b=r?t("img",{className:"adyen-checkout__button__icon",src:r,alt:"","aria-hidden":"true"}):"",f=[...e,..."primary"!==u?[u]:[],...l?["inline"]:[],..._?["completed"]:[],..."loading"===p||"redirect"===p?["loading"]:[]],y=n(["adyen-checkout__button",...f.map((e=>`adyen-checkout__button--${e}`))]),g={loading:t("span",{className:"adyen-checkout__button__content"},t(a,{size:"medium",inline:!0}),t("span",{className:"adyen-checkout__button__text--sr-only"},h.get("loading"))),redirect:t("span",{className:"adyen-checkout__button__content"},t(a,{size:"medium",inline:!0}),h.get("payButton.redirecting")),default:t("span",{className:"adyen-checkout__button__content"},b,t("span",{className:"adyen-checkout__button__text"},c))},k=g[p]||g.default;return s?t("a",{className:y,href:s,disabled:i,target:this.props.target,rel:this.props.rel},k):t("button",{ref:m,className:y,type:"button",disabled:i,onClick:this.onClick,onKeyDown:this.onKeyDown,"aria-label":d},k,"loading"!==p&&"redirect"!==p&&this.props.children)}constructor(...e){super(...e),i(this,"onClick",(e=>{e.preventDefault(),this.props.disabled||this.props.onClick(e,{complete:this.complete})})),i(this,"complete",((e=1e3)=>{this.setState({completed:!0}),setTimeout((()=>{this.setState({completed:!1})}),e)})),i(this,"onKeyDown",(e=>{var t,n;null===(t=(n=this.props).onKeyDown)||void 0===t||t.call(n,e)}))}}i(s,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self",onClick:()=>{}});export{s as default};
1
+ import{Component as e,createElement as t}from"../../../external/preact/dist/preact.js";import n from"../../../_virtual/index.js";import o from"../Spinner/Spinner.js";import{useCoreContext as a}from"../../../core/Context/CoreProvider.js";function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class r extends e{render(){const{classNameModifiers:e=[],disabled:s,href:r,icon:i,inline:l,label:c,ariaLabel:u,ariaDescribedBy:d,status:p,variant:m,buttonRef:_,onMouseEnter:h,onMouseLeave:b,onFocus:y,onBlur:f,onKeyPress:g}=this.props,{completed:k}=this.state,{i18n:v}=a(),N=i?t("img",{className:"adyen-checkout__button__icon",src:i,alt:"","aria-hidden":"true"}):"",C=[...e,..."primary"!==m?[m]:[],...l?["inline"]:[],...k?["completed"]:[],..."loading"===p||"redirect"===p?["loading"]:[]],x=n(["adyen-checkout__button",...C.map(e=>`adyen-checkout__button--${e}`)]),K={loading:t("span",{className:"adyen-checkout__button__content"},t(o,{size:"medium",inline:!0}),t("span",{className:"adyen-checkout__button__text--sr-only"},v.get("loading"))),redirect:t("span",{className:"adyen-checkout__button__content"},t(o,{size:"medium",inline:!0}),v.get("payButton.redirecting")),default:t("span",{className:"adyen-checkout__button__content"},N,t("span",{className:"adyen-checkout__button__text"},c))},M=K[p]||K.default;return r?t("a",{className:x,href:r,disabled:s,target:this.props.target,rel:this.props.rel},M):t("button",{ref:_,className:x,type:"button",disabled:s,onClick:this.onClick,onKeyDown:this.onKeyDown,"aria-label":u,"aria-describedby":d,onMouseEnter:h,onMouseLeave:b,onFocus:y,onBlur:f,onKeyPress:g},M,"loading"!==p&&"redirect"!==p&&this.props.children)}constructor(...e){super(...e),s(this,"onClick",e=>{e.preventDefault(),this.props.disabled||this.props.onClick(e,{complete:this.complete})}),s(this,"complete",(e=1e3)=>{this.setState({completed:!0}),setTimeout(()=>{this.setState({completed:!1})},e)}),s(this,"onKeyDown",e=>{var t,n;null===(t=(n=this.props).onKeyDown)||void 0===t||t.call(n,e)})}}s(r,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self",onClick:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},onFocus:()=>{},onBlur:()=>{},onKeyPress:()=>{}});export{r as default};
2
2
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../src/components/internal/Button/Button.tsx"],"sourcesContent":["import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './Button.scss';\nimport { ButtonProps, ButtonState } from './types';\n\nclass Button extends Component<ButtonProps, ButtonState> {\n public static defaultProps = {\n status: 'default',\n variant: 'primary',\n disabled: false,\n label: '',\n inline: false,\n target: '_self',\n onClick: () => {}\n };\n\n public onClick = e => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e, { complete: this.complete });\n }\n };\n\n public complete = (delay = 1000) => {\n this.setState({ completed: true });\n setTimeout(() => {\n this.setState({ completed: false });\n }, delay);\n };\n\n public onKeyDown = (event: KeyboardEvent) => {\n this.props.onKeyDown?.(event);\n };\n\n render() {\n const { classNameModifiers = [], disabled, href, icon, inline, label, ariaLabel, status, variant, buttonRef }: ButtonProps = this.props;\n const { completed } = this.state;\n const { i18n } = useCoreContext();\n\n const buttonIcon = icon ? <img className=\"adyen-checkout__button__icon\" src={icon} alt=\"\" aria-hidden=\"true\" /> : '';\n\n const modifiers = [\n ...classNameModifiers,\n ...(variant !== 'primary' ? [variant] : []),\n ...(inline ? ['inline'] : []),\n ...(completed ? ['completed'] : []),\n ...(status === 'loading' || status === 'redirect' ? ['loading'] : [])\n ];\n\n const buttonClasses = classNames(['adyen-checkout__button', ...modifiers.map(m => `adyen-checkout__button--${m}`)]);\n\n const buttonStates = {\n loading: (\n <span className=\"adyen-checkout__button__content\">\n <Spinner size=\"medium\" inline />\n <span className={'adyen-checkout__button__text--sr-only'}>{i18n.get('loading')}</span>\n </span>\n ),\n redirect: (\n <span className=\"adyen-checkout__button__content\">\n <Spinner size=\"medium\" inline />\n {i18n.get('payButton.redirecting')}\n </span>\n ),\n default: (\n <span className=\"adyen-checkout__button__content\">\n {buttonIcon}\n <span className=\"adyen-checkout__button__text\">{label}</span>\n </span>\n )\n };\n\n const buttonText = buttonStates[status] || buttonStates.default;\n\n if (href) {\n return (\n <a className={buttonClasses} href={href} disabled={disabled} target={this.props.target} rel={this.props.rel}>\n {buttonText}\n </a>\n );\n }\n\n return (\n <button\n ref={buttonRef}\n className={buttonClasses}\n type=\"button\"\n disabled={disabled}\n onClick={this.onClick}\n onKeyDown={this.onKeyDown}\n aria-label={ariaLabel}\n >\n {buttonText}\n {status !== 'loading' && status !== 'redirect' && this.props.children}\n </button>\n );\n }\n}\n\nexport default Button;\n"],"names":["Button","Component","render","classNameModifiers","disabled","href","icon","inline","label","ariaLabel","status","variant","buttonRef","this","props","completed","state","i18n","useCoreContext","buttonIcon","h","img","className","src","alt","aria-hidden","modifiers","buttonClasses","classNames","map","m","buttonStates","loading","span","Spinner","size","get","redirect","default","buttonText","a","target","rel","button","ref","type","onClick","onKeyDown","aria-label","children","super","args","_define_property","e","preventDefault","complete","delay","setState","setTimeout","event","_this_props_onKeyDown","_this_props","call","defaultProps"],"mappings":"qWAOA,MAAMA,UAAeC,EA8BjBC,MAAAA,GACI,MAAMC,mBAAEA,EAAqB,GAAEC,SAAEA,EAAQC,KAAEA,EAAIC,KAAEA,EAAIC,OAAEA,EAAMC,MAAEA,EAAKC,UAAEA,EAASC,OAAEA,EAAMC,QAAEA,EAAOC,UAAEA,GAA2BC,KAAKC,OAC5HC,UAAEA,GAAcF,KAAKG,OACrBC,KAAEA,GAASC,IAEXC,EAAab,EAAOc,EAACC,MAAAA,CAAIC,UAAU,+BAA+BC,IAAKjB,EAAMkB,IAAI,GAAGC,cAAY,SAAY,GAE5GC,EAAY,IACXvB,KACa,YAAZQ,EAAwB,CAACA,GAAW,MACpCJ,EAAS,CAAC,UAAY,MACtBQ,EAAY,CAAC,aAAe,MACjB,YAAXL,GAAmC,aAAXA,EAAwB,CAAC,WAAa,IAGhEiB,EAAgBC,EAAW,CAAC,4BAA6BF,EAAUG,KAAIC,GAAK,2BAA2BA,QAEvGC,EAAe,CACjBC,QACIZ,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAAS5B,QAAAA,IACvBa,EAACa,OAAAA,CAAKX,UAAW,yCAA0CL,EAAKmB,IAAI,aAG5EC,SACIjB,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAAS5B,QAAAA,IACtBU,EAAKmB,IAAI,0BAGlBE,QACIlB,EAACa,OAAAA,CAAKX,UAAU,mCACXH,EACDC,EAACa,OAAAA,CAAKX,UAAU,gCAAgCd,KAKtD+B,EAAaR,EAAarB,IAAWqB,EAAaO,QAExD,OAAIjC,EAEIe,EAACoB,IAAAA,CAAElB,UAAWK,EAAetB,KAAMA,EAAMD,SAAUA,EAAUqC,OAAQ5B,KAAKC,MAAM2B,OAAQC,IAAK7B,KAAKC,MAAM4B,KACnGH,GAMTnB,EAACuB,SAAAA,CACGC,IAAKhC,EACLU,UAAWK,EACXkB,KAAK,SACLzC,SAAUA,EACV0C,QAASjC,KAAKiC,QACdC,UAAWlC,KAAKkC,UAChBC,aAAYvC,GAEX8B,EACW,YAAX7B,GAAmC,aAAXA,GAAyBG,KAAKC,MAAMmC,SAGzE,mBA5FJC,SAWIC,GAAAC,EAAAvC,KAAOiC,WAAUO,IACbA,EAAEC,iBAEGzC,KAAKC,MAAMV,UACZS,KAAKC,MAAMgC,QAAQO,EAAG,CAAEE,SAAU1C,KAAK0C,UAC3C,IAGJH,EAAOG,KAAAA,YAAW,CAACC,EAAQ,OACvB3C,KAAK4C,SAAS,CAAE1C,WAAW,IAC3B2C,YAAW,KACP7C,KAAK4C,SAAS,CAAE1C,WAAW,GAAM,GAClCyC,EAAAA,IAGPJ,EAAAvC,KAAOkC,aAAaY,QAChBC,EAAAC,EAAoB,QAApBD,GAAAC,EAAAhD,KAAKC,OAAMiC,iBAAX,IAAAa,GAAAA,EAAAE,KAAAD,EAAuBF,EAAAA,KA1B3BP,EADEpD,EACY+D,eAAe,CACzBrD,OAAQ,UACRC,QAAS,UACTP,UAAU,EACVI,MAAO,GACPD,QAAQ,EACRkC,OAAQ,QACRK,QAAS"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../src/components/internal/Button/Button.tsx"],"sourcesContent":["import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './Button.scss';\nimport { ButtonProps, ButtonState } from './types';\n\nclass Button extends Component<ButtonProps, ButtonState> {\n public static defaultProps = {\n status: 'default',\n variant: 'primary',\n disabled: false,\n label: '',\n inline: false,\n target: '_self',\n onClick: () => {},\n onMouseEnter: () => {},\n onMouseLeave: () => {},\n onFocus: () => {},\n onBlur: () => {},\n onKeyPress: () => {}\n };\n\n public onClick = e => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e, { complete: this.complete });\n }\n };\n\n public complete = (delay = 1000) => {\n this.setState({ completed: true });\n setTimeout(() => {\n this.setState({ completed: false });\n }, delay);\n };\n\n public onKeyDown = (event: KeyboardEvent) => {\n this.props.onKeyDown?.(event);\n };\n\n render() {\n const {\n classNameModifiers = [],\n disabled,\n href,\n icon,\n inline,\n label,\n ariaLabel,\n ariaDescribedBy,\n status,\n variant,\n buttonRef,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n onKeyPress\n }: ButtonProps = this.props;\n const { completed } = this.state;\n const { i18n } = useCoreContext();\n\n const buttonIcon = icon ? <img className=\"adyen-checkout__button__icon\" src={icon} alt=\"\" aria-hidden=\"true\" /> : '';\n\n const modifiers = [\n ...classNameModifiers,\n ...(variant !== 'primary' ? [variant] : []),\n ...(inline ? ['inline'] : []),\n ...(completed ? ['completed'] : []),\n ...(status === 'loading' || status === 'redirect' ? ['loading'] : [])\n ];\n\n const buttonClasses = classNames(['adyen-checkout__button', ...modifiers.map(m => `adyen-checkout__button--${m}`)]);\n\n const buttonStates = {\n loading: (\n <span className=\"adyen-checkout__button__content\">\n <Spinner size=\"medium\" inline />\n <span className={'adyen-checkout__button__text--sr-only'}>{i18n.get('loading')}</span>\n </span>\n ),\n redirect: (\n <span className=\"adyen-checkout__button__content\">\n <Spinner size=\"medium\" inline />\n {i18n.get('payButton.redirecting')}\n </span>\n ),\n default: (\n <span className=\"adyen-checkout__button__content\">\n {buttonIcon}\n <span className=\"adyen-checkout__button__text\">{label}</span>\n </span>\n )\n };\n\n const buttonText = buttonStates[status] || buttonStates.default;\n\n if (href) {\n return (\n <a className={buttonClasses} href={href} disabled={disabled} target={this.props.target} rel={this.props.rel}>\n {buttonText}\n </a>\n );\n }\n\n return (\n <button\n ref={buttonRef}\n className={buttonClasses}\n type=\"button\"\n disabled={disabled}\n onClick={this.onClick}\n onKeyDown={this.onKeyDown}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={onKeyPress}\n >\n {buttonText}\n {status !== 'loading' && status !== 'redirect' && this.props.children}\n </button>\n );\n }\n}\n\nexport default Button;\n"],"names":["Button","Component","render","classNameModifiers","disabled","href","icon","inline","label","ariaLabel","ariaDescribedBy","status","variant","buttonRef","onMouseEnter","onMouseLeave","onFocus","onBlur","onKeyPress","this","props","completed","state","i18n","useCoreContext","buttonIcon","h","img","className","src","alt","aria-hidden","modifiers","buttonClasses","classNames","map","m","buttonStates","loading","span","Spinner","size","get","redirect","default","buttonText","a","target","rel","button","ref","type","onClick","onKeyDown","aria-label","aria-describedby","children","super","args","_define_property","e","preventDefault","complete","delay","setState","setTimeout","event","_this_props_onKeyDown","_this_props","call","defaultProps"],"mappings":"qWAOA,MAAMA,UAAeC,EAmCjBC,MAAAA,GACI,MAAMC,mBACFA,EAAqB,GAAEC,SACvBA,EAAQC,KACRA,EAAIC,KACJA,EAAIC,OACJA,EAAMC,MACNA,EAAKC,UACLA,EAASC,gBACTA,EAAeC,OACfA,EAAMC,QACNA,EAAOC,UACPA,EAASC,aACTA,EAAYC,aACZA,EAAYC,QACZA,EAAOC,OACPA,EAAMC,WACNA,GACaC,KAAKC,OAChBC,UAAEA,GAAcF,KAAKG,OACrBC,KAAEA,GAASC,IAEXC,EAAanB,EAAOoB,EAACC,MAAAA,CAAIC,UAAU,+BAA+BC,IAAKvB,EAAMwB,IAAI,GAAGC,cAAY,SAAY,GAE5GC,EAAY,IACX7B,KACa,YAAZS,EAAwB,CAACA,GAAW,MACpCL,EAAS,CAAC,UAAY,MACtBc,EAAY,CAAC,aAAe,MACjB,YAAXV,GAAmC,aAAXA,EAAwB,CAAC,WAAa,IAGhEsB,EAAgBC,EAAW,CAAC,4BAA6BF,EAAUG,IAAIC,GAAK,2BAA2BA,OAEvGC,EAAe,CACjBC,QACIZ,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAASlC,QAAAA,IACvBmB,EAACa,OAAAA,CAAKX,UAAW,yCAA0CL,EAAKmB,IAAI,aAG5EC,SACIjB,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAASlC,QAAAA,IACtBgB,EAAKmB,IAAI,0BAGlBE,QACIlB,EAACa,OAAAA,CAAKX,UAAU,mCACXH,EACDC,EAACa,OAAAA,CAAKX,UAAU,gCAAgCpB,KAKtDqC,EAAaR,EAAa1B,IAAW0B,EAAaO,QAExD,OAAIvC,EAEIqB,EAACoB,IAAAA,CAAElB,UAAWK,EAAe5B,KAAMA,EAAMD,SAAUA,EAAU2C,OAAQ5B,KAAKC,MAAM2B,OAAQC,IAAK7B,KAAKC,MAAM4B,KACnGH,GAMTnB,EAACuB,SAAAA,CACGC,IAAKrC,EACLe,UAAWK,EACXkB,KAAK,SACL/C,SAAUA,EACVgD,QAASjC,KAAKiC,QACdC,UAAWlC,KAAKkC,UAChBC,aAAY7C,EACZ8C,mBAAkB7C,EAClBI,aAAcA,EACdC,aAAcA,EACdC,QAASA,EACTC,OAAQA,EACRC,WAAYA,GAEX2B,EACW,YAAXlC,GAAmC,aAAXA,GAAyBQ,KAAKC,MAAMoC,SAGzE,mBAxHJC,SAAAC,GAgBIC,EAAAxC,KAAOiC,UAAUQ,IACbA,EAAEC,iBAEG1C,KAAKC,MAAMhB,UACZe,KAAKC,MAAMgC,QAAQQ,EAAG,CAAEE,SAAU3C,KAAK2C,aAI/CH,EAAAxC,KAAO2C,WAAW,CAACC,EAAQ,OACvB5C,KAAK6C,SAAS,CAAE3C,WAAW,IAC3B4C,WAAW,KACP9C,KAAK6C,SAAS,CAAE3C,WAAW,KAC5B0C,KAGPJ,EAAAxC,KAAOkC,YAAaa,QAChBC,EAAAC,EAAoB,QAApBD,GAAAC,EAAAjD,KAAKC,OAAMiC,iBAAX,IAAAc,GAAAA,EAAAE,KAAAD,EAAuBF,MA/B3BP,EADE3D,EACYsE,eAAe,CACzB3D,OAAQ,UACRC,QAAS,UACTR,UAAU,EACVI,MAAO,GACPD,QAAQ,EACRwC,OAAQ,QACRK,QAAS,OACTtC,aAAc,OACdC,aAAc,OACdC,QAAS,OACTC,OAAQ,OACRC,WAAY"}
@@ -0,0 +1,2 @@
1
+ import{createElement as e}from"../../../external/preact/dist/preact.js";import{useRef as t,useCallback as o}from"../../../external/preact/hooks/dist/hooks.js";import r from"./Button.js";import{useCoreContext as n}from"../../../core/Context/CoreProvider.js";import{copyToClipboard as c}from"../../../utils/clipboard.js";import{SingletonTooltipProvider as i,useTooltip as a}from"../Tooltip/SingletonTooltipProvider.js";function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t.push.apply(t,o)}return t}(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}),e}const l=i=>{const{i18n:l}=n(),u=t(null),{showTooltip:b,hideTooltip:y}=a(),f=o(()=>{c(i.text),b({anchorRef:u,text:l.get("button.copied")})},[i.text,l,b]),O=o(e=>{"Enter"!==e.key&&"Enter"!==e.code&&" "!==e.key&&"Space"!==e.code||e.stopPropagation()},[y]),g=o(e=>{"Enter"!==e.key&&"Enter"!==e.code&&" "!==e.key&&"Space"!==e.code||e.stopPropagation(),"Escape"!==e.key&&"Escape"!==e.code||(e.stopPropagation(),y())},[y]),m=o(()=>{b({anchorRef:u,text:l.get("button.copy")})},[u,l,b]);var j;return e(r,s(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),r.forEach(function(t){p(e,t,o[t])})}return e}({},i),{variant:"iconOnly",buttonRef:u,ariaLabel:null!==(j=i.ariaLabel)&&void 0!==j?j:l.get("button.copy"),onMouseEnter:m,onMouseLeave:y,onFocus:m,onBlur:y,onClick:f,onKeyPress:O,onKeyDown:g}),e("svg",{className:"adyen-checkout__button--iconOnly__icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e("path",{d:"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25H7.5C6.25736 5.25 5.25 6.25736 5.25 7.5V9.25H3.5C3.08579 9.25 2.75 8.91421 2.75 8.5V3.5C2.75 3.08579 3.08579 2.75 3.5 2.75H8.5C8.91421 2.75 9.25 3.08579 9.25 3.5V5.25ZM6.75 12.5V7.5C6.75 7.08579 7.08579 6.75 7.5 6.75H12.5C12.9142 6.75 13.25 7.08579 13.25 7.5V12.5C13.25 12.9142 12.9142 13.25 12.5 13.25H7.5C7.08579 13.25 6.75 12.9142 6.75 12.5Z"})))},u=t=>e(i,null,e(l,t));export{u as CopyIconButton};
2
+ //# sourceMappingURL=CopyIconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyIconButton.js","sources":["../../../../../src/components/internal/Button/CopyIconButton.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useRef } from 'preact/hooks';\nimport Button from './Button';\nimport { ButtonProps } from './types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport copyToClipboard from '../../../utils/clipboard';\nimport { SingletonTooltipProvider, useTooltip } from '../Tooltip/SingletonTooltipProvider';\nimport './CopyIconButton.scss';\n\nexport interface CopyIconButtonProps extends ButtonProps {\n /**\n * String that will get copied to the clipboard\n */\n text: string;\n}\n\nconst CopyIconButton = (props: CopyIconButtonProps) => {\n const { i18n } = useCoreContext();\n const anchorRef = useRef<HTMLButtonElement>(null);\n const { showTooltip, hideTooltip } = useTooltip();\n\n const onClick = useCallback(() => {\n void copyToClipboard(props.text);\n showTooltip({ anchorRef, text: i18n.get('button.copied') });\n }, [props.text, i18n, showTooltip]);\n\n // todo: remove it: onKeyPress is deprecated\n const onKeyPress = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.code === 'Enter' || event.key === ' ' || event.code === 'Space') {\n event.stopPropagation();\n }\n },\n [hideTooltip]\n );\n\n // We need it because onKeyPress does not trigger for Esc key\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.code === 'Enter' || event.key === ' ' || event.code === 'Space') {\n event.stopPropagation();\n }\n\n if (event.key === 'Escape' || event.code === 'Escape') {\n event.stopPropagation();\n hideTooltip();\n }\n },\n [hideTooltip]\n );\n\n const handleShowTooltip = useCallback(() => {\n showTooltip({ anchorRef, text: i18n.get('button.copy') });\n }, [anchorRef, i18n, showTooltip]);\n\n return (\n <Button\n {...props}\n variant=\"iconOnly\"\n buttonRef={anchorRef}\n ariaLabel={props.ariaLabel ?? i18n.get('button.copy')}\n onMouseEnter={handleShowTooltip}\n onMouseLeave={hideTooltip}\n onFocus={handleShowTooltip}\n onBlur={hideTooltip}\n onClick={onClick}\n // It's ok to have both, browsers will fire only one click event for enter/space key pressed.\n onKeyPress={onKeyPress}\n onKeyDown={onKeyDown}\n >\n <svg\n className=\"adyen-checkout__button--iconOnly__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n >\n <path d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25H7.5C6.25736 5.25 5.25 6.25736 5.25 7.5V9.25H3.5C3.08579 9.25 2.75 8.91421 2.75 8.5V3.5C2.75 3.08579 3.08579 2.75 3.5 2.75H8.5C8.91421 2.75 9.25 3.08579 9.25 3.5V5.25ZM6.75 12.5V7.5C6.75 7.08579 7.08579 6.75 7.5 6.75H12.5C12.9142 6.75 13.25 7.08579 13.25 7.5V12.5C13.25 12.9142 12.9142 13.25 12.5 13.25H7.5C7.08579 13.25 6.75 12.9142 6.75 12.5Z\" />\n </svg>\n </Button>\n );\n};\n\nconst withTooltip = (props: CopyIconButtonProps) => {\n return (\n <SingletonTooltipProvider>\n <CopyIconButton {...props} />\n </SingletonTooltipProvider>\n );\n};\n\nexport { withTooltip as CopyIconButton };\n"],"names":["CopyIconButton","props","i18n","useCoreContext","anchorRef","useRef","showTooltip","hideTooltip","useTooltip","onClick","useCallback","copyToClipboard","text","get","onKeyPress","event","key","code","stopPropagation","onKeyDown","handleShowTooltip","h","Button","variant","buttonRef","ariaLabel","onMouseEnter","onMouseLeave","onFocus","onBlur","svg","className","xmlns","width","height","viewBox","fill","path","d","withTooltip","SingletonTooltipProvider"],"mappings":"s4BAgBA,MAAMA,EAAkBC,IACpB,MAAMC,KAAEA,GAASC,IACXC,EAAYC,EAA0B,OACtCC,YAAEA,EAAWC,YAAEA,GAAgBC,IAE/BC,EAAUC,EAAY,KACnBC,EAAgBV,EAAMW,MAC3BN,EAAY,CAAEF,YAAWQ,KAAMV,EAAKW,IAAI,oBACzC,CAACZ,EAAMW,KAAMV,EAAMI,IAGhBQ,EAAaJ,EACdK,IACqB,UAAdA,EAAMC,KAAkC,UAAfD,EAAME,MAAkC,MAAdF,EAAMC,KAA8B,UAAfD,EAAME,MAC9EF,EAAMG,mBAGd,CAACX,IAICY,EAAYT,EACbK,IACqB,UAAdA,EAAMC,KAAkC,UAAfD,EAAME,MAAkC,MAAdF,EAAMC,KAA8B,UAAfD,EAAME,MAC9EF,EAAMG,kBAGQ,WAAdH,EAAMC,KAAmC,WAAfD,EAAME,OAChCF,EAAMG,kBACNX,MAGR,CAACA,IAGCa,EAAoBV,EAAY,KAClCJ,EAAY,CAAEF,YAAWQ,KAAMV,EAAKW,IAAI,kBACzC,CAACT,EAAWF,EAAMI,IAOFL,IAAAA,EALnB,OACIoB,EAACC,EAAAA,oUAAAA,CAAAA,CAAAA,EACOrB,GAAAA,CACJsB,QAAQ,WACRC,UAAWpB,EACXqB,kBAAWxB,EAAAA,EAAMwB,iBAANxB,IAAAA,EAAAA,EAAmBC,EAAKW,IAAI,eACvCa,aAAcN,EACdO,aAAcpB,EACdqB,QAASR,EACTS,OAAQtB,EACRE,QAASA,EAETK,WAAYA,EACZK,UAAWA,IAEXE,EAACS,MAAAA,CACGC,UAAU,yCACVC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,QAELf,EAACgB,OAAAA,CAAKC,EAAE,snBAMlBC,EAAetC,GAEboB,EAACmB,EAAAA,KACGnB,EAACrB,EAAmBC"}