@adyen/adyen-web 6.8.0 → 6.9.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 (374) hide show
  1. package/dist/cjs/adyen.css +11 -7
  2. package/dist/cjs/adyen.css.map +1 -1
  3. package/dist/cjs/index.cjs +2 -2
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/cjs/index.d.cts +212 -49
  6. package/dist/es/_virtual/index.js +1 -1
  7. package/dist/es/_virtual/index2.js +2 -0
  8. package/dist/es/_virtual/index2.js.map +1 -0
  9. package/dist/es/adyen.css +11 -7
  10. package/dist/es/adyen.css.map +1 -1
  11. package/dist/es/components/Ach/components/AchInput/AchInput.js +1 -1
  12. package/dist/es/components/Ach/components/AchInput/AchInput.js.map +1 -1
  13. package/dist/es/components/Ach/components/AchInput/components/AchSFInput.js +1 -1
  14. package/dist/es/components/Ach/components/AchInput/components/AchSFInput.js.map +1 -1
  15. package/dist/es/components/ApplePay/components/ApplePayButton.js +1 -1
  16. package/dist/es/components/ApplePay/components/ApplePayButton.js.map +1 -1
  17. package/dist/es/components/BacsDD/components/BacsInput.js +1 -1
  18. package/dist/es/components/BacsDD/components/BacsInput.js.map +1 -1
  19. package/dist/es/components/Boleto/Boleto.js.map +1 -1
  20. package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
  21. package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
  22. package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js +1 -1
  23. package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
  24. package/dist/es/components/Card/components/CardInput/components/BrandIcon.js +1 -1
  25. package/dist/es/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
  26. package/dist/es/components/Card/components/CardInput/components/CVC.js +1 -1
  27. package/dist/es/components/Card/components/CardInput/components/CVC.js.map +1 -1
  28. package/dist/es/components/Card/components/CardInput/components/CVCHint.js +1 -1
  29. package/dist/es/components/Card/components/CardInput/components/CVCHint.js.map +1 -1
  30. package/dist/es/components/Card/components/CardInput/components/CardFields.js +1 -1
  31. package/dist/es/components/Card/components/CardInput/components/CardFields.js.map +1 -1
  32. package/dist/es/components/Card/components/CardInput/components/CardNumber.js +1 -1
  33. package/dist/es/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
  34. package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js +1 -1
  35. package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
  36. package/dist/es/components/Card/components/CardInput/components/KCPAuthentication.js +1 -1
  37. package/dist/es/components/Card/components/CardInput/components/KCPAuthentication.js.map +1 -1
  38. package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
  39. package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
  40. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js +1 -1
  41. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js.map +1 -1
  42. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
  43. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
  44. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodName.js +1 -1
  45. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodName.js.map +1 -1
  46. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
  47. package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
  48. package/dist/es/components/Giftcard/Giftcard.js +1 -1
  49. package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
  50. package/dist/es/components/Giftcard/components/GiftcardComponent.js +1 -1
  51. package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
  52. package/dist/es/components/Giftcard/components/GiftcardNumberField.js +1 -1
  53. package/dist/es/components/Giftcard/components/GiftcardNumberField.js.map +1 -1
  54. package/dist/es/components/Giftcard/components/GiftcardPinField.js +1 -1
  55. package/dist/es/components/Giftcard/components/GiftcardPinField.js.map +1 -1
  56. package/dist/es/components/Giftcard/components/GiftcardResult.js +1 -1
  57. package/dist/es/components/Giftcard/components/GiftcardResult.js.map +1 -1
  58. package/dist/es/components/GooglePay/GooglePay.js +1 -1
  59. package/dist/es/components/GooglePay/GooglePay.js.map +1 -1
  60. package/dist/es/components/MBWay/MBWay.js +1 -1
  61. package/dist/es/components/MBWay/MBWay.js.map +1 -1
  62. package/dist/es/components/MBWay/components/MBWayInput/MBWayInput.js +1 -1
  63. package/dist/es/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
  64. package/dist/es/components/MealVoucherFR/components/MealVoucherExpiryField.js +1 -1
  65. package/dist/es/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
  66. package/dist/es/components/PayPal/components/PaypalButtons.js +1 -1
  67. package/dist/es/components/PayPal/components/PaypalButtons.js.map +1 -1
  68. package/dist/es/components/PayTo/PayTo.js +2 -0
  69. package/dist/es/components/PayTo/PayTo.js.map +1 -0
  70. package/dist/es/components/PayTo/components/BSBInput.js +2 -0
  71. package/dist/es/components/PayTo/components/BSBInput.js.map +1 -0
  72. package/dist/es/components/PayTo/components/IdentifierSelector.js +2 -0
  73. package/dist/es/components/PayTo/components/IdentifierSelector.js.map +1 -0
  74. package/dist/es/components/PayTo/components/MandateSummary.js +2 -0
  75. package/dist/es/components/PayTo/components/MandateSummary.js.map +1 -0
  76. package/dist/es/components/PayTo/components/PayIDInput.js +2 -0
  77. package/dist/es/components/PayTo/components/PayIDInput.js.map +1 -0
  78. package/dist/es/components/PayTo/components/PayToComponent.js +2 -0
  79. package/dist/es/components/PayTo/components/PayToComponent.js.map +1 -0
  80. package/dist/es/components/PayTo/components/PayToInstructions.js +2 -0
  81. package/dist/es/components/PayTo/components/PayToInstructions.js.map +1 -0
  82. package/dist/es/components/PayTo/components/PayToNameFields.js +2 -0
  83. package/dist/es/components/PayTo/components/PayToNameFields.js.map +1 -0
  84. package/dist/es/components/PayTo/components/PayToPhone.js +2 -0
  85. package/dist/es/components/PayTo/components/PayToPhone.js.map +1 -0
  86. package/dist/es/components/PayTo/components/validate.js +2 -0
  87. package/dist/es/components/PayTo/components/validate.js.map +1 -0
  88. package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js +1 -1
  89. package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
  90. package/dist/es/components/ThreeDS2/components/Form/ThreeDS2Form.js +1 -1
  91. package/dist/es/components/ThreeDS2/components/Form/ThreeDS2Form.js.map +1 -1
  92. package/dist/es/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.js.map +1 -1
  93. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js +1 -1
  94. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js.map +1 -1
  95. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js +1 -1
  96. package/dist/es/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js.map +1 -1
  97. package/dist/es/components/components-name-map.js +1 -1
  98. package/dist/es/components/components-name-map.js.map +1 -1
  99. package/dist/es/components/index.js +1 -1
  100. package/dist/es/components/internal/Alert/Alert.js +1 -1
  101. package/dist/es/components/internal/Alert/Alert.js.map +1 -1
  102. package/dist/es/components/internal/Await/Await.js +1 -1
  103. package/dist/es/components/internal/Await/Await.js.map +1 -1
  104. package/dist/es/components/internal/Button/Button.js +1 -1
  105. package/dist/es/components/internal/Button/Button.js.map +1 -1
  106. package/dist/es/components/internal/ButtonGroup/ButtonGroup.js +1 -1
  107. package/dist/es/components/internal/ButtonGroup/ButtonGroup.js.map +1 -1
  108. package/dist/es/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js +1 -1
  109. package/dist/es/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js.map +1 -1
  110. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js +1 -1
  111. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js.map +1 -1
  112. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
  113. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
  114. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js +1 -1
  115. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js.map +1 -1
  116. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js +1 -1
  117. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js.map +1 -1
  118. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
  119. package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
  120. package/dist/es/components/internal/CompanyDetails/CompanyDetails.js.map +1 -1
  121. package/dist/es/components/internal/ContentSeparator/ContentSeparator.js +1 -1
  122. package/dist/es/components/internal/ContentSeparator/ContentSeparator.js.map +1 -1
  123. package/dist/es/components/internal/DetailsTable/DetailsTable.js +2 -0
  124. package/dist/es/components/internal/DetailsTable/DetailsTable.js.map +1 -0
  125. package/dist/es/components/internal/ExpandButton/ExpandButton.js +1 -1
  126. package/dist/es/components/internal/ExpandButton/ExpandButton.js.map +1 -1
  127. package/dist/es/components/internal/FormFields/Checkbox/Checkbox.js +1 -1
  128. package/dist/es/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
  129. package/dist/es/components/internal/FormFields/Field/Field.js +1 -1
  130. package/dist/es/components/internal/FormFields/Field/Field.js.map +1 -1
  131. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  132. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  133. package/dist/es/components/internal/FormFields/InputBase.js +1 -1
  134. package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
  135. package/dist/es/components/internal/FormFields/RadioGroup/RadioGroup.js +1 -1
  136. package/dist/es/components/internal/FormFields/RadioGroup/RadioGroup.js.map +1 -1
  137. package/dist/es/components/internal/FormFields/Select/Select.js +1 -1
  138. package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
  139. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  140. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  141. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +1 -1
  142. package/dist/es/components/internal/FormFields/Select/components/SelectList.js.map +1 -1
  143. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +1 -1
  144. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
  145. package/dist/es/components/internal/IFrame/Iframe.js +1 -1
  146. package/dist/es/components/internal/IFrame/Iframe.js.map +1 -1
  147. package/dist/es/components/internal/Icon/Icon.js +1 -1
  148. package/dist/es/components/internal/Icon/Icon.js.map +1 -1
  149. package/dist/es/components/internal/Img/Img.js +1 -1
  150. package/dist/es/components/internal/Img/Img.js.map +1 -1
  151. package/dist/es/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.js +1 -1
  152. package/dist/es/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.js.map +1 -1
  153. package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js +1 -1
  154. package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
  155. package/dist/es/components/internal/Modal/Modal.js +1 -1
  156. package/dist/es/components/internal/Modal/Modal.js.map +1 -1
  157. package/dist/es/components/internal/OpenInvoice/OpenInvoice.js +1 -1
  158. package/dist/es/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
  159. package/dist/es/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
  160. package/dist/es/components/internal/PhoneInput/PhoneInputFields.js +2 -0
  161. package/dist/es/components/internal/PhoneInput/PhoneInputFields.js.map +1 -0
  162. package/dist/es/components/internal/PhoneInput/PhoneInputForm.js +2 -0
  163. package/dist/es/components/internal/PhoneInput/PhoneInputForm.js.map +1 -0
  164. package/dist/es/components/internal/PhoneInput/validate.js +1 -1
  165. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/cardType.js +1 -1
  166. package/dist/es/components/internal/SecuredFields/lib/CSF/utils/cardType.js.map +1 -1
  167. package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +1 -1
  168. package/dist/es/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
  169. package/dist/es/components/internal/SendCopyToEmail/SendCopyToEmail.js +1 -1
  170. package/dist/es/components/internal/SendCopyToEmail/SendCopyToEmail.js.map +1 -1
  171. package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
  172. package/dist/es/components/internal/Voucher/Voucher.js +1 -1
  173. package/dist/es/components/internal/Voucher/Voucher.js.map +1 -1
  174. package/dist/es/components/tx-variants.js +1 -1
  175. package/dist/es/components/tx-variants.js.map +1 -1
  176. package/dist/es/core/ProcessResponse/PaymentMethods/filters.js +1 -1
  177. package/dist/es/core/ProcessResponse/PaymentMethods/filters.js.map +1 -1
  178. package/dist/es/core/Services/analytics/collect-id.js +1 -1
  179. package/dist/es/core/core.js +1 -1
  180. package/dist/es/core/utils.js +1 -1
  181. package/dist/es/core/utils.js.map +1 -1
  182. package/dist/es/external/classnames/index.js +2 -2
  183. package/dist/es/external/classnames/index.js.map +1 -1
  184. package/dist/es/index.d.ts +212 -49
  185. package/dist/es/index.js +1 -1
  186. package/dist/es/utils/Validator/ValidationRuleResult.js.map +1 -1
  187. package/dist/es/utils/Validator/Validator.js.map +1 -1
  188. package/dist/es-legacy/_virtual/index.js +1 -1
  189. package/dist/es-legacy/_virtual/index2.js +2 -0
  190. package/dist/es-legacy/_virtual/index2.js.map +1 -0
  191. package/dist/es-legacy/adyen.css +11 -7
  192. package/dist/es-legacy/adyen.css.map +1 -1
  193. package/dist/es-legacy/components/Ach/components/AchInput/AchInput.js +1 -1
  194. package/dist/es-legacy/components/Ach/components/AchInput/AchInput.js.map +1 -1
  195. package/dist/es-legacy/components/Ach/components/AchInput/components/AchSFInput.js +1 -1
  196. package/dist/es-legacy/components/Ach/components/AchInput/components/AchSFInput.js.map +1 -1
  197. package/dist/es-legacy/components/ApplePay/components/ApplePayButton.js +1 -1
  198. package/dist/es-legacy/components/ApplePay/components/ApplePayButton.js.map +1 -1
  199. package/dist/es-legacy/components/BacsDD/components/BacsInput.js +1 -1
  200. package/dist/es-legacy/components/BacsDD/components/BacsInput.js.map +1 -1
  201. package/dist/es-legacy/components/Boleto/Boleto.js.map +1 -1
  202. package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
  203. package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
  204. package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js +1 -1
  205. package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
  206. package/dist/es-legacy/components/Card/components/CardInput/components/BrandIcon.js +1 -1
  207. package/dist/es-legacy/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
  208. package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js +1 -1
  209. package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js.map +1 -1
  210. package/dist/es-legacy/components/Card/components/CardInput/components/CVCHint.js +1 -1
  211. package/dist/es-legacy/components/Card/components/CardInput/components/CVCHint.js.map +1 -1
  212. package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js +1 -1
  213. package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js.map +1 -1
  214. package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js +1 -1
  215. package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
  216. package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js +1 -1
  217. package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
  218. package/dist/es-legacy/components/Card/components/CardInput/components/KCPAuthentication.js +1 -1
  219. package/dist/es-legacy/components/Card/components/CardInput/components/KCPAuthentication.js.map +1 -1
  220. package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
  221. package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
  222. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js +1 -1
  223. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js.map +1 -1
  224. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
  225. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
  226. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodName.js +1 -1
  227. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodName.js.map +1 -1
  228. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
  229. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
  230. package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
  231. package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
  232. package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js +1 -1
  233. package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
  234. package/dist/es-legacy/components/Giftcard/components/GiftcardNumberField.js +1 -1
  235. package/dist/es-legacy/components/Giftcard/components/GiftcardNumberField.js.map +1 -1
  236. package/dist/es-legacy/components/Giftcard/components/GiftcardPinField.js +1 -1
  237. package/dist/es-legacy/components/Giftcard/components/GiftcardPinField.js.map +1 -1
  238. package/dist/es-legacy/components/Giftcard/components/GiftcardResult.js +1 -1
  239. package/dist/es-legacy/components/Giftcard/components/GiftcardResult.js.map +1 -1
  240. package/dist/es-legacy/components/GooglePay/GooglePay.js +1 -1
  241. package/dist/es-legacy/components/GooglePay/GooglePay.js.map +1 -1
  242. package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
  243. package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
  244. package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js +1 -1
  245. package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
  246. package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherExpiryField.js +1 -1
  247. package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
  248. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js +1 -1
  249. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js.map +1 -1
  250. package/dist/es-legacy/components/PayTo/PayTo.js +2 -0
  251. package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -0
  252. package/dist/es-legacy/components/PayTo/components/BSBInput.js +2 -0
  253. package/dist/es-legacy/components/PayTo/components/BSBInput.js.map +1 -0
  254. package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js +2 -0
  255. package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js.map +1 -0
  256. package/dist/es-legacy/components/PayTo/components/MandateSummary.js +2 -0
  257. package/dist/es-legacy/components/PayTo/components/MandateSummary.js.map +1 -0
  258. package/dist/es-legacy/components/PayTo/components/PayIDInput.js +2 -0
  259. package/dist/es-legacy/components/PayTo/components/PayIDInput.js.map +1 -0
  260. package/dist/es-legacy/components/PayTo/components/PayToComponent.js +2 -0
  261. package/dist/es-legacy/components/PayTo/components/PayToComponent.js.map +1 -0
  262. package/dist/es-legacy/components/PayTo/components/PayToInstructions.js +2 -0
  263. package/dist/es-legacy/components/PayTo/components/PayToInstructions.js.map +1 -0
  264. package/dist/es-legacy/components/PayTo/components/PayToNameFields.js +2 -0
  265. package/dist/es-legacy/components/PayTo/components/PayToNameFields.js.map +1 -0
  266. package/dist/es-legacy/components/PayTo/components/PayToPhone.js +2 -0
  267. package/dist/es-legacy/components/PayTo/components/PayToPhone.js.map +1 -0
  268. package/dist/es-legacy/components/PayTo/components/validate.js +2 -0
  269. package/dist/es-legacy/components/PayTo/components/validate.js.map +1 -0
  270. package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js +1 -1
  271. package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
  272. package/dist/es-legacy/components/ThreeDS2/components/Form/ThreeDS2Form.js +1 -1
  273. package/dist/es-legacy/components/ThreeDS2/components/Form/ThreeDS2Form.js.map +1 -1
  274. package/dist/es-legacy/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.js.map +1 -1
  275. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js +1 -1
  276. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.js.map +1 -1
  277. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js +1 -1
  278. package/dist/es-legacy/components/UPI/components/UPIIntentAppList/UPIIntentAppList.js.map +1 -1
  279. package/dist/es-legacy/components/components-name-map.js +1 -1
  280. package/dist/es-legacy/components/components-name-map.js.map +1 -1
  281. package/dist/es-legacy/components/index.js +1 -1
  282. package/dist/es-legacy/components/internal/Alert/Alert.js +1 -1
  283. package/dist/es-legacy/components/internal/Alert/Alert.js.map +1 -1
  284. package/dist/es-legacy/components/internal/Await/Await.js +1 -1
  285. package/dist/es-legacy/components/internal/Await/Await.js.map +1 -1
  286. package/dist/es-legacy/components/internal/Button/Button.js +1 -1
  287. package/dist/es-legacy/components/internal/Button/Button.js.map +1 -1
  288. package/dist/es-legacy/components/internal/ButtonGroup/ButtonGroup.js +1 -1
  289. package/dist/es-legacy/components/internal/ButtonGroup/ButtonGroup.js.map +1 -1
  290. package/dist/es-legacy/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js +1 -1
  291. package/dist/es-legacy/components/internal/ClickToPay/components/CtPBrand/CtPBrand.js.map +1 -1
  292. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js +1 -1
  293. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.js.map +1 -1
  294. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
  295. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
  296. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js +1 -1
  297. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.js.map +1 -1
  298. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js +1 -1
  299. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.js.map +1 -1
  300. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
  301. package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
  302. package/dist/es-legacy/components/internal/CompanyDetails/CompanyDetails.js.map +1 -1
  303. package/dist/es-legacy/components/internal/ContentSeparator/ContentSeparator.js +1 -1
  304. package/dist/es-legacy/components/internal/ContentSeparator/ContentSeparator.js.map +1 -1
  305. package/dist/es-legacy/components/internal/DetailsTable/DetailsTable.js +2 -0
  306. package/dist/es-legacy/components/internal/DetailsTable/DetailsTable.js.map +1 -0
  307. package/dist/es-legacy/components/internal/ExpandButton/ExpandButton.js +1 -1
  308. package/dist/es-legacy/components/internal/ExpandButton/ExpandButton.js.map +1 -1
  309. package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js +1 -1
  310. package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
  311. package/dist/es-legacy/components/internal/FormFields/Field/Field.js +1 -1
  312. package/dist/es-legacy/components/internal/FormFields/Field/Field.js.map +1 -1
  313. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  314. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  315. package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
  316. package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
  317. package/dist/es-legacy/components/internal/FormFields/RadioGroup/RadioGroup.js +1 -1
  318. package/dist/es-legacy/components/internal/FormFields/RadioGroup/RadioGroup.js.map +1 -1
  319. package/dist/es-legacy/components/internal/FormFields/Select/Select.js +1 -1
  320. package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
  321. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  322. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  323. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectList.js +1 -1
  324. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectList.js.map +1 -1
  325. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js +1 -1
  326. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
  327. package/dist/es-legacy/components/internal/IFrame/Iframe.js +1 -1
  328. package/dist/es-legacy/components/internal/IFrame/Iframe.js.map +1 -1
  329. package/dist/es-legacy/components/internal/Icon/Icon.js +1 -1
  330. package/dist/es-legacy/components/internal/Icon/Icon.js.map +1 -1
  331. package/dist/es-legacy/components/internal/Img/Img.js +1 -1
  332. package/dist/es-legacy/components/internal/Img/Img.js.map +1 -1
  333. package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.js +1 -1
  334. package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.js.map +1 -1
  335. package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js +1 -1
  336. package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
  337. package/dist/es-legacy/components/internal/Modal/Modal.js +1 -1
  338. package/dist/es-legacy/components/internal/Modal/Modal.js.map +1 -1
  339. package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js +1 -1
  340. package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
  341. package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
  342. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputFields.js +2 -0
  343. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputFields.js.map +1 -0
  344. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js +2 -0
  345. package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js.map +1 -0
  346. package/dist/es-legacy/components/internal/PhoneInput/validate.js +1 -1
  347. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/cardType.js +1 -1
  348. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/utils/cardType.js.map +1 -1
  349. package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js +1 -1
  350. package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
  351. package/dist/es-legacy/components/internal/SendCopyToEmail/SendCopyToEmail.js +1 -1
  352. package/dist/es-legacy/components/internal/SendCopyToEmail/SendCopyToEmail.js.map +1 -1
  353. package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
  354. package/dist/es-legacy/components/internal/Voucher/Voucher.js +1 -1
  355. package/dist/es-legacy/components/internal/Voucher/Voucher.js.map +1 -1
  356. package/dist/es-legacy/components/tx-variants.js +1 -1
  357. package/dist/es-legacy/components/tx-variants.js.map +1 -1
  358. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/filters.js +1 -1
  359. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/filters.js.map +1 -1
  360. package/dist/es-legacy/core/Services/analytics/collect-id.js +1 -1
  361. package/dist/es-legacy/core/core.js +1 -1
  362. package/dist/es-legacy/core/utils.js +1 -1
  363. package/dist/es-legacy/core/utils.js.map +1 -1
  364. package/dist/es-legacy/external/classnames/index.js +2 -2
  365. package/dist/es-legacy/external/classnames/index.js.map +1 -1
  366. package/dist/es-legacy/index.js +1 -1
  367. package/dist/es-legacy/utils/Validator/ValidationRuleResult.js.map +1 -1
  368. package/dist/es-legacy/utils/Validator/Validator.js.map +1 -1
  369. package/package.json +20 -14
  370. package/styles/adyen.css +11 -7
  371. package/dist/es/components/internal/PhoneInput/PhoneInput.js +0 -2
  372. package/dist/es/components/internal/PhoneInput/PhoneInput.js.map +0 -1
  373. package/dist/es-legacy/components/internal/PhoneInput/PhoneInput.js +0 -2
  374. package/dist/es-legacy/components/internal/PhoneInput/PhoneInput.js.map +0 -1
@@ -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({ classNameModifiers = [], disabled, href, icon, inline, label, status, variant }, { completed }) {\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 className={buttonClasses} type=\"button\" disabled={disabled} onClick={this.onClick} onKeyDown={this.onKeyDown}>\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","status","variant","completed","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","this","props","rel","button","type","onClick","onKeyDown","children","super","args","_define_property","e","preventDefault","complete","delay","setState","setTimeout","event","defaultProps"],"mappings":"gXAOA,MAAMA,UAAeC,EA8BjBC,MAAAA,EAAOC,mBAAEA,EAAqB,GAAEC,SAAEA,EAAQC,KAAEA,EAAIC,KAAEA,EAAIC,OAAEA,EAAMC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,IAAWC,UAAEA,IACxF,MAAMC,KAAEA,GAASC,IAEXC,EAAaR,EAAOS,EAACC,MAAAA,CAAIC,UAAU,+BAA+BC,IAAKZ,EAAMa,IAAI,GAAGC,cAAY,SAAY,GAE5GC,EAAY,IACXlB,KACa,YAAZO,EAAwB,CAACA,GAAW,MACpCH,EAAS,CAAC,UAAY,MACtBI,EAAY,CAAC,aAAe,MACjB,YAAXF,GAAmC,aAAXA,EAAwB,CAAC,WAAa,IAGhEa,EAAgBC,EAAW,CAAC,4BAA6BF,EAAUG,KAAIC,GAAK,2BAA2BA,QAEvGC,EAAe,CACjBC,QACIZ,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAASvB,QAAAA,IACvBQ,EAACa,OAAAA,CAAKX,UAAW,yCAA0CL,EAAKmB,IAAI,aAG5EC,SACIjB,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAASvB,QAAAA,IACtBK,EAAKmB,IAAI,0BAGlBE,QACIlB,EAACa,OAAAA,CAAKX,UAAU,mCACXH,EACDC,EAACa,OAAAA,CAAKX,UAAU,gCAAgCT,KAKtD0B,EAAaR,EAAajB,IAAWiB,EAAaO,QAExD,OAAI5B,EAEIU,EAACoB,IAAAA,CAAElB,UAAWK,EAAejB,KAAMA,EAAMD,SAAUA,EAAUgC,OAAQC,KAAKC,MAAMF,OAAQG,IAAKF,KAAKC,MAAMC,KACnGL,GAMTnB,EAACyB,SAAAA,CAAOvB,UAAWK,EAAemB,KAAK,SAASrC,SAAUA,EAAUsC,QAASL,KAAKK,QAASC,UAAWN,KAAKM,WACtGT,EACW,YAAXzB,GAAmC,aAAXA,GAAyB4B,KAAKC,MAAMM,SAGzE,mBAlFJC,SAWIC,GAAAC,EAAAV,KAAOK,WAAUM,IACbA,EAAEC,iBAEGZ,KAAKC,MAAMlC,UACZiC,KAAKC,MAAMI,QAAQM,EAAG,CAAEE,SAAUb,KAAKa,UAC3C,IAGJH,EAAOG,KAAAA,YAAW,CAACC,EAAQ,OACvBd,KAAKe,SAAS,CAAEzC,WAAW,IAC3B0C,YAAW,KACPhB,KAAKe,SAAS,CAAEzC,WAAW,GAAM,GAClCwC,EAAAA,IAGPJ,EAAAV,KAAOM,aAAaW,IAChBjB,KAAKC,MAAMK,YAAYW,EAAAA,KA1B3BP,EADE/C,EACYuD,eAAe,CACzB9C,OAAQ,UACRC,QAAS,UACTN,UAAU,EACVI,MAAO,GACPD,QAAQ,EACR6B,OAAQ,QACRM,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 };\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({ classNameModifiers = [], disabled, href, icon, inline, label, status, variant }, { completed }) {\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 className={buttonClasses} type=\"button\" disabled={disabled} onClick={this.onClick} onKeyDown={this.onKeyDown}>\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","status","variant","completed","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","this","props","rel","button","type","onClick","onKeyDown","children","super","args","_define_property","e","preventDefault","complete","delay","setState","setTimeout","event","defaultProps"],"mappings":"qWAOA,MAAMA,UAAeC,EA8BjBC,MAAAA,EAAOC,mBAAEA,EAAqB,GAAEC,SAAEA,EAAQC,KAAEA,EAAIC,KAAEA,EAAIC,OAAEA,EAAMC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,IAAWC,UAAEA,IACxF,MAAMC,KAAEA,GAASC,IAEXC,EAAaR,EAAOS,EAACC,MAAAA,CAAIC,UAAU,+BAA+BC,IAAKZ,EAAMa,IAAI,GAAGC,cAAY,SAAY,GAE5GC,EAAY,IACXlB,KACa,YAAZO,EAAwB,CAACA,GAAW,MACpCH,EAAS,CAAC,UAAY,MACtBI,EAAY,CAAC,aAAe,MACjB,YAAXF,GAAmC,aAAXA,EAAwB,CAAC,WAAa,IAGhEa,EAAgBC,EAAW,CAAC,4BAA6BF,EAAUG,KAAIC,GAAK,2BAA2BA,QAEvGC,EAAe,CACjBC,QACIZ,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAASvB,QAAAA,IACvBQ,EAACa,OAAAA,CAAKX,UAAW,yCAA0CL,EAAKmB,IAAI,aAG5EC,SACIjB,EAACa,OAAAA,CAAKX,UAAU,mCACZF,EAACc,EAAAA,CAAQC,KAAK,SAASvB,QAAAA,IACtBK,EAAKmB,IAAI,0BAGlBE,QACIlB,EAACa,OAAAA,CAAKX,UAAU,mCACXH,EACDC,EAACa,OAAAA,CAAKX,UAAU,gCAAgCT,KAKtD0B,EAAaR,EAAajB,IAAWiB,EAAaO,QAExD,OAAI5B,EAEIU,EAACoB,IAAAA,CAAElB,UAAWK,EAAejB,KAAMA,EAAMD,SAAUA,EAAUgC,OAAQC,KAAKC,MAAMF,OAAQG,IAAKF,KAAKC,MAAMC,KACnGL,GAMTnB,EAACyB,SAAAA,CAAOvB,UAAWK,EAAemB,KAAK,SAASrC,SAAUA,EAAUsC,QAASL,KAAKK,QAASC,UAAWN,KAAKM,WACtGT,EACW,YAAXzB,GAAmC,aAAXA,GAAyB4B,KAAKC,MAAMM,SAGzE,mBAlFJC,SAWIC,GAAAC,EAAAV,KAAOK,WAAUM,IACbA,EAAEC,iBAEGZ,KAAKC,MAAMlC,UACZiC,KAAKC,MAAMI,QAAQM,EAAG,CAAEE,SAAUb,KAAKa,UAC3C,IAGJH,EAAOG,KAAAA,YAAW,CAACC,EAAQ,OACvBd,KAAKe,SAAS,CAAEzC,WAAW,IAC3B0C,YAAW,KACPhB,KAAKe,SAAS,CAAEzC,WAAW,GAAM,GAClCwC,EAAAA,IAGPJ,EAAAV,KAAOM,aAAaW,IAChBjB,KAAKC,MAAMK,YAAYW,EAAAA,KA1B3BP,EADE/C,EACYuD,eAAe,CACzB9C,OAAQ,UACRC,QAAS,UACTN,UAAU,EACVI,MAAO,GACPD,QAAQ,EACR6B,OAAQ,QACRM,QAAS"}
@@ -1,2 +1,2 @@
1
- import e from"../../../external/classnames/index.js";import{createElement as t}from"../../../external/preact/dist/preact.js";const a=({options:a=[],name:n,onChange:c})=>t("div",{className:"adyen-checkout__button-group"},a.map((({label:a,selected:o,value:s,disabled:d},l)=>t("label",{key:`${n}${l}`,className:e({"adyen-checkout__button":!0,"adyen-checkout__button--selected":o,"adyen-checkout__button--disabled":d})},t("input",{type:"radio",className:"adyen-checkout__button-group__input",value:s,checked:o,onChange:c,disabled:d}),t("span",{className:"adyen-checkout__button-text"},a)))));export{a as default};
1
+ import e from"../../../_virtual/index.js";import{createElement as t}from"../../../external/preact/dist/preact.js";const a=({options:a=[],name:n,onChange:o})=>t("div",{className:"adyen-checkout__button-group"},a.map((({label:a,selected:c,value:s,disabled:d},u)=>t("label",{key:`${n}${u}`,className:e({"adyen-checkout__button":!0,"adyen-checkout__button--selected":c,"adyen-checkout__button--disabled":d})},t("input",{type:"radio",className:"adyen-checkout__button-group__input",value:s,checked:c,onChange:o,disabled:d}),t("span",{className:"adyen-checkout__button-text"},a)))));export{a as default};
2
2
  //# sourceMappingURL=ButtonGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.js","sources":["../../../../../src/components/internal/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import cx from 'classnames';\nimport './ButtonGroup.scss';\nimport { h } from 'preact';\n\nconst ButtonGroup = ({ options = [], name, onChange }) => (\n <div className=\"adyen-checkout__button-group\">\n {options.map(({ label, selected, value, disabled }, index) => (\n <label\n key={`${name}${index}`}\n className={cx({\n 'adyen-checkout__button': true,\n 'adyen-checkout__button--selected': selected,\n 'adyen-checkout__button--disabled': disabled\n })}\n >\n <input\n type=\"radio\"\n className=\"adyen-checkout__button-group__input\"\n value={value}\n checked={selected}\n onChange={onChange}\n disabled={disabled}\n />\n <span className=\"adyen-checkout__button-text\">{label}</span>\n </label>\n ))}\n </div>\n);\n\nexport default ButtonGroup;\n"],"names":["ButtonGroup","options","name","onChange","h","div","className","map","label","selected","value","disabled","index","key","cx","input","type","checked","span"],"mappings":"6HAIMA,MAAAA,EAAc,EAAGC,UAAU,GAAIC,OAAMC,cACvCC,EAACC,MAAAA,CAAIC,UAAU,gCACVL,EAAQM,KAAI,EAAGC,QAAOC,WAAUC,QAAOC,YAAYC,IAChDR,EAACI,QAAAA,CACGK,IAAK,GAAGX,IAAOU,IACfN,UAAWQ,EAAG,CACV,0BAA0B,EAC1B,mCAAoCL,EACpC,mCAAoCE,KAGxCP,EAACW,QAAAA,CACGC,KAAK,QACLV,UAAU,sCACVI,MAAOA,EACPO,QAASR,EACTN,SAAUA,EACVQ,SAAUA,IAEdP,EAACc,OAAAA,CAAKZ,UAAU,+BAA+BE"}
1
+ {"version":3,"file":"ButtonGroup.js","sources":["../../../../../src/components/internal/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import cx from 'classnames';\nimport './ButtonGroup.scss';\nimport { h } from 'preact';\n\nconst ButtonGroup = ({ options = [], name, onChange }) => (\n <div className=\"adyen-checkout__button-group\">\n {options.map(({ label, selected, value, disabled }, index) => (\n <label\n key={`${name}${index}`}\n className={cx({\n 'adyen-checkout__button': true,\n 'adyen-checkout__button--selected': selected,\n 'adyen-checkout__button--disabled': disabled\n })}\n >\n <input\n type=\"radio\"\n className=\"adyen-checkout__button-group__input\"\n value={value}\n checked={selected}\n onChange={onChange}\n disabled={disabled}\n />\n <span className=\"adyen-checkout__button-text\">{label}</span>\n </label>\n ))}\n </div>\n);\n\nexport default ButtonGroup;\n"],"names":["ButtonGroup","options","name","onChange","h","div","className","map","label","selected","value","disabled","index","key","cx","input","type","checked","span"],"mappings":"kHAIMA,MAAAA,EAAc,EAAGC,UAAU,GAAIC,OAAMC,cACvCC,EAACC,MAAAA,CAAIC,UAAU,gCACVL,EAAQM,KAAI,EAAGC,QAAOC,WAAUC,QAAOC,YAAYC,IAChDR,EAACI,QAAAA,CACGK,IAAK,GAAGX,IAAOU,IACfN,UAAWQ,EAAG,CACV,0BAA0B,EAC1B,mCAAoCL,EACpC,mCAAoCE,KAGxCP,EAACW,QAAAA,CACGC,KAAK,QACLV,UAAU,sCACVI,MAAOA,EACPO,QAASR,EACTN,SAAUA,EACVQ,SAAUA,IAEdP,EAACc,OAAAA,CAAKZ,UAAU,+BAA+BE"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../../external/preact/dist/preact.js";import c from"../../../../../external/classnames/index.js";import t from"../../../Img/Img.js";import{SchemeNames as a}from"../../services/sdks/utils.js";import o from"../../context/useClickToPayContext.js";import s from"../../../../../core/Context/useImage.js";const r=({classNameModifiers:r=[]})=>{const m=s(),{schemes:p}=o(),n=m()("ctp"),d=m({imageFolder:"components/"})("pipe");return e("div",{className:c("adyen_checkout-ctp__brand-wrapper",r.map((e=>`adyen_checkout-ctp__brand-wrapper--${e}`)))},e(t,{className:"adyen_checkout-ctp__brand-logo",src:n,alt:"Logo of Click to Pay"}),e(t,{className:"adyen_checkout-ctp__brand-pipe",src:d,alt:""}),p.map((o=>e(t,{key:o,className:c("adyen_checkout-ctp__brand-scheme",`adyen_checkout-ctp__brand-scheme-${o}`),src:m()(o),alt:`Logo of ${a[o]}`}))))};export{r as CtPBrand};
1
+ import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"../../../../../_virtual/index.js";import c from"../../../Img/Img.js";import{SchemeNames as a}from"../../services/sdks/utils.js";import o from"../../context/useClickToPayContext.js";import r from"../../../../../core/Context/useImage.js";const s=({classNameModifiers:s=[]})=>{const m=r(),{schemes:p}=o(),n=m()("ctp"),i=m({imageFolder:"components/"})("pipe");return e("div",{className:t("adyen_checkout-ctp__brand-wrapper",s.map((e=>`adyen_checkout-ctp__brand-wrapper--${e}`)))},e(c,{className:"adyen_checkout-ctp__brand-logo",src:n,alt:"Logo of Click to Pay"}),e(c,{className:"adyen_checkout-ctp__brand-pipe",src:i,alt:""}),p.map((o=>e(c,{key:o,className:t("adyen_checkout-ctp__brand-scheme",`adyen_checkout-ctp__brand-scheme-${o}`),src:m()(o),alt:`Logo of ${a[o]}`}))))};export{s as CtPBrand};
2
2
  //# sourceMappingURL=CtPBrand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CtPBrand.js","sources":["../../../../../../../src/components/internal/ClickToPay/components/CtPBrand/CtPBrand.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classnames from 'classnames';\nimport Img from '../../../Img';\nimport { SchemeNames } from '../../services/sdks/utils';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport useImage from '../../../../../core/Context/useImage';\nimport './CtPBrand.scss';\n\ntype CtPBrandProps = {\n classNameModifiers?: string[];\n};\n\nconst CtPBrand = ({ classNameModifiers = [] }: CtPBrandProps) => {\n const getImage = useImage();\n const { schemes } = useClickToPayContext();\n\n const ctpImageUrl = getImage()('ctp');\n const pipeImageUrl = getImage({ imageFolder: 'components/' })('pipe');\n\n return (\n <div\n className={classnames(\n 'adyen_checkout-ctp__brand-wrapper',\n classNameModifiers.map(m => `adyen_checkout-ctp__brand-wrapper--${m}`)\n )}\n >\n <Img className=\"adyen_checkout-ctp__brand-logo\" src={ctpImageUrl} alt={'Logo of Click to Pay'} />\n <Img className=\"adyen_checkout-ctp__brand-pipe\" src={pipeImageUrl} alt=\"\" />\n\n {schemes.map(brand => (\n <Img\n key={brand}\n className={classnames('adyen_checkout-ctp__brand-scheme', `adyen_checkout-ctp__brand-scheme-${brand}`)}\n src={getImage()(brand)}\n alt={`Logo of ${SchemeNames[brand]}`}\n />\n ))}\n </div>\n );\n};\n\nexport { CtPBrand };\n"],"names":["CtPBrand","classNameModifiers","getImage","useImage","schemes","useClickToPayContext","ctpImageUrl","pipeImageUrl","imageFolder","h","div","className","classnames","map","m","Img","src","alt","brand","key","SchemeNames"],"mappings":"mVAYA,MAAMA,EAAW,EAAGC,qBAAqB,OACrC,MAAMC,EAAWC,KACXC,QAAEA,GAAYC,IAEdC,EAAcJ,IAAW,OACzBK,EAAeL,EAAS,CAAEM,YAAa,eAAxBN,CAAyC,QAE9D,OACIO,EAACC,MAAAA,CACGC,UAAWC,EACP,oCACAX,EAAmBY,KAAIC,GAAK,sCAAsCA,QAGtEL,EAACM,EAAAA,CAAIJ,UAAU,iCAAiCK,IAAKV,EAAaW,IAAK,yBACvER,EAACM,EAAAA,CAAIJ,UAAU,iCAAiCK,IAAKT,EAAcU,IAAI,KAEtEb,EAAQS,KAAIK,GACTT,EAACM,EAAAA,CACGI,IAAKD,EACLP,UAAWC,EAAW,mCAAoC,oCAAoCM,KAC9FF,IAAKd,IAAWgB,GAChBD,IAAK,WAAWG,EAAYF"}
1
+ {"version":3,"file":"CtPBrand.js","sources":["../../../../../../../src/components/internal/ClickToPay/components/CtPBrand/CtPBrand.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classnames from 'classnames';\nimport Img from '../../../Img';\nimport { SchemeNames } from '../../services/sdks/utils';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport useImage from '../../../../../core/Context/useImage';\nimport './CtPBrand.scss';\n\ntype CtPBrandProps = {\n classNameModifiers?: string[];\n};\n\nconst CtPBrand = ({ classNameModifiers = [] }: CtPBrandProps) => {\n const getImage = useImage();\n const { schemes } = useClickToPayContext();\n\n const ctpImageUrl = getImage()('ctp');\n const pipeImageUrl = getImage({ imageFolder: 'components/' })('pipe');\n\n return (\n <div\n className={classnames(\n 'adyen_checkout-ctp__brand-wrapper',\n classNameModifiers.map(m => `adyen_checkout-ctp__brand-wrapper--${m}`)\n )}\n >\n <Img className=\"adyen_checkout-ctp__brand-logo\" src={ctpImageUrl} alt={'Logo of Click to Pay'} />\n <Img className=\"adyen_checkout-ctp__brand-pipe\" src={pipeImageUrl} alt=\"\" />\n\n {schemes.map(brand => (\n <Img\n key={brand}\n className={classnames('adyen_checkout-ctp__brand-scheme', `adyen_checkout-ctp__brand-scheme-${brand}`)}\n src={getImage()(brand)}\n alt={`Logo of ${SchemeNames[brand]}`}\n />\n ))}\n </div>\n );\n};\n\nexport { CtPBrand };\n"],"names":["CtPBrand","classNameModifiers","getImage","useImage","schemes","useClickToPayContext","ctpImageUrl","pipeImageUrl","imageFolder","h","div","className","classnames","map","m","Img","src","alt","brand","key","SchemeNames"],"mappings":"wUAYA,MAAMA,EAAW,EAAGC,qBAAqB,OACrC,MAAMC,EAAWC,KACXC,QAAEA,GAAYC,IAEdC,EAAcJ,IAAW,OACzBK,EAAeL,EAAS,CAAEM,YAAa,eAAxBN,CAAyC,QAE9D,OACIO,EAACC,MAAAA,CACGC,UAAWC,EACP,oCACAX,EAAmBY,KAAIC,GAAK,sCAAsCA,QAGtEL,EAACM,EAAAA,CAAIJ,UAAU,iCAAiCK,IAAKV,EAAaW,IAAK,yBACvER,EAACM,EAAAA,CAAIJ,UAAU,iCAAiCK,IAAKT,EAAcU,IAAI,KAEtEb,EAAQS,KAAIK,GACTT,EAACM,EAAAA,CACGI,IAAKD,EACLP,UAAWC,EAAW,mCAAoC,oCAAoCM,KAC9FF,IAAKd,IAAWgB,GAChBD,IAAK,WAAWG,EAAYF"}
@@ -1,2 +1,2 @@
1
- import{createElement as e,Fragment as r}from"../../../../../../external/preact/dist/preact.js";import a from"../../../../../../external/classnames/index.js";import t from"../../../../Img/Img.js";import{useCoreContext as s}from"../../../../../../core/Context/CoreProvider.js";import c from"../../../../../../core/Context/useImage.js";const o=({card:o,errorMessage:i})=>{const{i18n:d}=s(),n=c(),m=o.artUri||n()(o.scheme);return e(r,null,e("div",{className:"adyen-checkout-ctp__card-list-single-card"},e(t,{src:m,height:24,className:"adyen-checkout-ctp__card-image"}),e("span",{className:a({"adyen-checkout-ctp__card-list-single-card-expired":o.isExpired})},o.title," ",`•••• ${o.panLastFour}`),o.isExpired&&e("span",{className:"adyen-checkout-ctp__expired-label"},d.get("ctp.cards.expiredCard"))),i&&e("div",{className:"adyen-checkout-contextual-text--error"},i))};export{o as default};
1
+ import{createElement as e,Fragment as r}from"../../../../../../external/preact/dist/preact.js";import t from"../../../../../../_virtual/index.js";import a from"../../../../Img/Img.js";import{useCoreContext as c}from"../../../../../../core/Context/CoreProvider.js";import s from"../../../../../../core/Context/useImage.js";const o=({card:o,errorMessage:i})=>{const{i18n:d}=c(),m=s(),n=o.artUri||m()(o.scheme);return e(r,null,e("div",{className:"adyen-checkout-ctp__card-list-single-card"},e(a,{src:n,height:24,className:"adyen-checkout-ctp__card-image"}),e("span",{className:t({"adyen-checkout-ctp__card-list-single-card-expired":o.isExpired})},o.title," ",`•••• ${o.panLastFour}`),o.isExpired&&e("span",{className:"adyen-checkout-ctp__expired-label"},d.get("ctp.cards.expiredCard"))),i&&e("div",{className:"adyen-checkout-contextual-text--error"},i))};export{o as default};
2
2
  //# sourceMappingURL=CtPSingleCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CtPSingleCard.js","sources":["../../../../../../../../src/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport classnames from 'classnames';\nimport Img from '../../../../Img';\nimport ShopperCard from '../../../models/ShopperCard';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport useImage from '../../../../../../core/Context/useImage';\nimport './CtPSingleCard.scss';\n\ntype CtPSingleCardProps = {\n card: ShopperCard;\n errorMessage?: string;\n};\n\nconst CtPSingleCard = ({ card, errorMessage }: CtPSingleCardProps) => {\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const cardImage = card.artUri || getImage()(card.scheme);\n\n return (\n <Fragment>\n <div className=\"adyen-checkout-ctp__card-list-single-card\">\n <Img src={cardImage} height={24} className={'adyen-checkout-ctp__card-image'} />\n\n <span className={classnames({ 'adyen-checkout-ctp__card-list-single-card-expired': card.isExpired })}>\n {card.title} {`•••• ${card.panLastFour}`}\n </span>\n\n {card.isExpired && <span className=\"adyen-checkout-ctp__expired-label\">{i18n.get('ctp.cards.expiredCard')}</span>}\n </div>\n\n {errorMessage && <div className=\"adyen-checkout-contextual-text--error\">{errorMessage}</div>}\n </Fragment>\n );\n};\n\nexport default CtPSingleCard;\n"],"names":["CtPSingleCard","card","errorMessage","i18n","useCoreContext","getImage","useImage","cardImage","artUri","scheme","h","Fragment","div","className","Img","src","height","span","classnames","isExpired","title","panLastFour","get"],"mappings":"6UAaA,MAAMA,EAAgB,EAAGC,OAAMC,mBAC3B,MAAMC,KAAEA,GAASC,IACXC,EAAWC,IACXC,EAAYN,EAAKO,QAAUH,IAAWJ,EAAKQ,QAEjD,OACIC,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,6CACXH,EAACI,EAAAA,CAAIC,IAAKR,EAAWS,OAAQ,GAAIH,UAAW,mCAE5CH,EAACO,OAAAA,CAAKJ,UAAWK,EAAW,CAAE,oDAAqDjB,EAAKkB,aACnFlB,EAAKmB,MAAM,IAAE,QAAQnB,EAAKoB,eAG9BpB,EAAKkB,WAAaT,EAACO,OAAAA,CAAKJ,UAAU,qCAAqCV,EAAKmB,IAAI,2BAGpFpB,GAAgBQ,EAACE,MAAAA,CAAIC,UAAU,yCAAyCX,GAAAA"}
1
+ {"version":3,"file":"CtPSingleCard.js","sources":["../../../../../../../../src/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.tsx"],"sourcesContent":["import { Fragment, h } from 'preact';\nimport classnames from 'classnames';\nimport Img from '../../../../Img';\nimport ShopperCard from '../../../models/ShopperCard';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport useImage from '../../../../../../core/Context/useImage';\nimport './CtPSingleCard.scss';\n\ntype CtPSingleCardProps = {\n card: ShopperCard;\n errorMessage?: string;\n};\n\nconst CtPSingleCard = ({ card, errorMessage }: CtPSingleCardProps) => {\n const { i18n } = useCoreContext();\n const getImage = useImage();\n const cardImage = card.artUri || getImage()(card.scheme);\n\n return (\n <Fragment>\n <div className=\"adyen-checkout-ctp__card-list-single-card\">\n <Img src={cardImage} height={24} className={'adyen-checkout-ctp__card-image'} />\n\n <span className={classnames({ 'adyen-checkout-ctp__card-list-single-card-expired': card.isExpired })}>\n {card.title} {`•••• ${card.panLastFour}`}\n </span>\n\n {card.isExpired && <span className=\"adyen-checkout-ctp__expired-label\">{i18n.get('ctp.cards.expiredCard')}</span>}\n </div>\n\n {errorMessage && <div className=\"adyen-checkout-contextual-text--error\">{errorMessage}</div>}\n </Fragment>\n );\n};\n\nexport default CtPSingleCard;\n"],"names":["CtPSingleCard","card","errorMessage","i18n","useCoreContext","getImage","useImage","cardImage","artUri","scheme","h","Fragment","div","className","Img","src","height","span","classnames","isExpired","title","panLastFour","get"],"mappings":"kUAaA,MAAMA,EAAgB,EAAGC,OAAMC,mBAC3B,MAAMC,KAAEA,GAASC,IACXC,EAAWC,IACXC,EAAYN,EAAKO,QAAUH,IAAWJ,EAAKQ,QAEjD,OACIC,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,6CACXH,EAACI,EAAAA,CAAIC,IAAKR,EAAWS,OAAQ,GAAIH,UAAW,mCAE5CH,EAACO,OAAAA,CAAKJ,UAAWK,EAAW,CAAE,oDAAqDjB,EAAKkB,aACnFlB,EAAKmB,MAAM,IAAE,QAAQnB,EAAKoB,eAG9BpB,EAAKkB,WAAaT,EAACO,OAAAA,CAAKJ,UAAU,qCAAqCV,EAAKmB,IAAI,2BAGpFpB,GAAgBQ,EAACE,MAAAA,CAAIC,UAAU,yCAAyCX,GAAAA"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../../../external/preact/dist/preact.js";import{useState as t,useEffect as o,useCallback as r}from"../../../../../../external/preact/hooks/dist/hooks.js";import s from"../../../context/useClickToPayContext.js";import n from"../../../../../../external/classnames/index.js";import{useCoreContext as a}from"../../../../../../core/Context/CoreProvider.js";import c from"../../../../Icon/Icon.js";import{isSrciError as i}from"../../../services/utils.js";import{PREFIX as d}from"../../../../Icon/constants.js";import l from"../../../../Button/Button.js";const m=({onError:m,onResendCode:p,disabled:u})=>{const[f,k]=t(null),[h,j]=t(!1),{i18n:C}=a(),{startIdentityValidation:x}=s();o((()=>{let e=null;return f>0&&(e=setTimeout((()=>k(f-1)),1e3)),()=>clearTimeout(e)}),[f]),o((()=>{let e=null;return h&&(e=setTimeout((()=>{j(!1),k(60)}),2e3)),()=>clearTimeout(e)}),[h]);const y=r((async e=>{e.preventDefault();try{p(),j(!0),await x()}catch(e){if(k(0),j(!1),!i(e))return void console.error(e);m(e.reason)}}),[x,m,p]);return h?e("div",{className:"adyen-checkout-ctp__otp-resend-code--confirmation"},C.get("ctp.otp.codeResent"),e(c,{type:`${d}checkmark`,height:14,width:14})):f>0?e("div",{className:"adyen-checkout-ctp__otp-resend-code--disabled"},C.get("ctp.otp.resendCode")," -"," ",e("span",{className:"adyen-checkout-ctp__otp-resend-code-counter"}," ",f>0&&`${f}s`," ")):e(l,{classNameModifiers:[n("otp-resend-code",{"otp-resend-code--disabled":u})],onClick:y,variant:"link",inline:!0,disabled:u},C.get("ctp.otp.resendCode"))};export{m as default};
1
+ import{createElement as e}from"../../../../../../external/preact/dist/preact.js";import{useState as t,useEffect as o,useCallback as r}from"../../../../../../external/preact/hooks/dist/hooks.js";import s from"../../../context/useClickToPayContext.js";import n from"../../../../../../_virtual/index.js";import{useCoreContext as c}from"../../../../../../core/Context/CoreProvider.js";import a from"../../../../Icon/Icon.js";import{isSrciError as i}from"../../../services/utils.js";import{PREFIX as d}from"../../../../Icon/constants.js";import l from"../../../../Button/Button.js";const p=({onError:p,onResendCode:m,disabled:u})=>{const[f,k]=t(null),[h,j]=t(!1),{i18n:C}=c(),{startIdentityValidation:v}=s();o((()=>{let e=null;return f>0&&(e=setTimeout((()=>k(f-1)),1e3)),()=>clearTimeout(e)}),[f]),o((()=>{let e=null;return h&&(e=setTimeout((()=>{j(!1),k(60)}),2e3)),()=>clearTimeout(e)}),[h]);const y=r((async e=>{e.preventDefault();try{m(),j(!0),await v()}catch(e){if(k(0),j(!1),!i(e))return void console.error(e);p(e.reason)}}),[v,p,m]);return h?e("div",{className:"adyen-checkout-ctp__otp-resend-code--confirmation"},C.get("ctp.otp.codeResent"),e(a,{type:`${d}checkmark`,height:14,width:14})):f>0?e("div",{className:"adyen-checkout-ctp__otp-resend-code--disabled"},C.get("ctp.otp.resendCode")," -"," ",e("span",{className:"adyen-checkout-ctp__otp-resend-code-counter"}," ",f>0&&`${f}s`," ")):e(l,{classNameModifiers:[n("otp-resend-code",{"otp-resend-code--disabled":u})],onClick:y,variant:"link",inline:!0,disabled:u},C.get("ctp.otp.resendCode"))};export{p as default};
2
2
  //# sourceMappingURL=CtPResendOtpLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CtPResendOtpLink.js","sources":["../../../../../../../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport classnames from 'classnames';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport Icon from '../../../../Icon';\nimport { isSrciError } from '../../../services/utils';\nimport { PREFIX } from '../../../../Icon/constants';\nimport Button from '../../../../Button';\n\nconst CONFIRMATION_SHOWING_TIME = 2000;\n\ninterface CtPResendOtpLinkProps {\n onError(errorCode: string): void;\n onResendCode(): void;\n disabled: boolean;\n}\n\nconst CtPResendOtpLink = ({ onError, onResendCode, disabled }: CtPResendOtpLinkProps): h.JSX.Element => {\n const [counter, setCounter] = useState<number>(null);\n const [showConfirmation, setShowConfirmation] = useState<boolean>(false);\n const { i18n } = useCoreContext();\n const { startIdentityValidation } = useClickToPayContext();\n\n useEffect(() => {\n let timeout = null;\n if (counter > 0) {\n timeout = setTimeout(() => setCounter(counter - 1), 1000);\n }\n return () => clearTimeout(timeout);\n }, [counter]);\n\n useEffect(() => {\n let timeout = null;\n\n if (showConfirmation) {\n timeout = setTimeout(() => {\n setShowConfirmation(false);\n setCounter(60);\n }, CONFIRMATION_SHOWING_TIME);\n }\n return () => clearTimeout(timeout);\n }, [showConfirmation]);\n\n const handleResendCodeClick = useCallback(\n async event => {\n event.preventDefault();\n\n try {\n onResendCode();\n setShowConfirmation(true);\n await startIdentityValidation();\n } catch (error: unknown) {\n setCounter(0);\n setShowConfirmation(false);\n\n if (!isSrciError(error)) {\n console.error(error);\n return;\n }\n\n onError(error.reason);\n }\n },\n [startIdentityValidation, onError, onResendCode]\n );\n\n if (showConfirmation) {\n return (\n <div className=\"adyen-checkout-ctp__otp-resend-code--confirmation\">\n {i18n.get('ctp.otp.codeResent')}\n <Icon type={`${PREFIX}checkmark`} height={14} width={14} />\n </div>\n );\n }\n\n if (counter > 0) {\n return (\n <div className=\"adyen-checkout-ctp__otp-resend-code--disabled\">\n {i18n.get('ctp.otp.resendCode')} -{' '}\n <span className=\"adyen-checkout-ctp__otp-resend-code-counter\"> {counter > 0 && `${counter}s`} </span>\n </div>\n );\n }\n\n return (\n <Button\n classNameModifiers={[classnames('otp-resend-code', { 'otp-resend-code--disabled': disabled })]}\n onClick={handleResendCodeClick}\n variant=\"link\"\n inline={true}\n disabled={disabled}\n >\n {i18n.get('ctp.otp.resendCode')}\n </Button>\n );\n};\n\nexport default CtPResendOtpLink;\n"],"names":["CtPResendOtpLink","onError","onResendCode","disabled","counter","setCounter","useState","showConfirmation","setShowConfirmation","i18n","useCoreContext","startIdentityValidation","useClickToPayContext","useEffect","timeout","setTimeout","clearTimeout","handleResendCodeClick","useCallback","async","event","preventDefault","error","isSrciError","console","reason","h","div","className","get","Icon","type","PREFIX","height","width","span","Button","classNameModifiers","classnames","onClick","variant","inline"],"mappings":"4kBAUA,MAQMA,EAAmB,EAAGC,UAASC,eAAcC,eAC/C,MAAOC,EAASC,GAAcC,EAAiB,OACxCC,EAAkBC,GAAuBF,GAAkB,IAC5DG,KAAEA,GAASC,KACXC,wBAAEA,GAA4BC,IAEpCC,GAAU,KACN,IAAIC,EAAU,KAId,OAHIV,EAAU,IACVU,EAAUC,YAAW,IAAMV,EAAWD,EAAU,IAAI,MAEjD,IAAMY,aAAaF,EAAAA,GAC3B,CAACV,IAEJS,GAAU,KACN,IAAIC,EAAU,KAQd,OANIP,IACAO,EAAUC,YAAW,KACjBP,GAAoB,GACpBH,EAAW,GAAA,GA5BO,MA+BnB,IAAMW,aAAaF,EAAAA,GAC3B,CAACP,IAEJ,MAAMU,EAAwBC,GAC1BC,MAAMC,IACFA,EAAMC,iBAEN,IACInB,IACAM,GAAoB,SACdG,GACV,CAAE,MAAOW,GAIL,GAHAjB,EAAW,GACXG,GAAoB,IAEfe,EAAYD,GAEb,YADAE,QAAQF,MAAMA,GAIlBrB,EAAQqB,EAAMG,OAClB,IAEJ,CAACd,EAAyBV,EAASC,IAGvC,OAAIK,EAEImB,EAACC,MAAAA,CAAIC,UAAU,qDACVnB,EAAKoB,IAAI,sBACVH,EAACI,EAAAA,CAAKC,KAAM,GAAGC,aAAmBC,OAAQ,GAAIC,MAAO,MAK7D9B,EAAU,EAENsB,EAACC,MAAAA,CAAIC,UAAU,iDACVnB,EAAKoB,IAAI,sBAAsB,KAAG,IACnCH,EAACS,OAAAA,CAAKP,UAAU,+CAA8C,IAAExB,EAAU,GAAK,GAAGA,KAAW,MAMrGsB,EAACU,EAAAA,CACGC,mBAAoB,CAACC,EAAW,kBAAmB,CAAE,4BAA6BnC,KAClFoC,QAAStB,EACTuB,QAAQ,OACRC,QAAQ,EACRtC,SAAUA,GAETM,EAAKoB,IAAI,sBAAA"}
1
+ {"version":3,"file":"CtPResendOtpLink.js","sources":["../../../../../../../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport classnames from 'classnames';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport Icon from '../../../../Icon';\nimport { isSrciError } from '../../../services/utils';\nimport { PREFIX } from '../../../../Icon/constants';\nimport Button from '../../../../Button';\n\nconst CONFIRMATION_SHOWING_TIME = 2000;\n\ninterface CtPResendOtpLinkProps {\n onError(errorCode: string): void;\n onResendCode(): void;\n disabled: boolean;\n}\n\nconst CtPResendOtpLink = ({ onError, onResendCode, disabled }: CtPResendOtpLinkProps): h.JSX.Element => {\n const [counter, setCounter] = useState<number>(null);\n const [showConfirmation, setShowConfirmation] = useState<boolean>(false);\n const { i18n } = useCoreContext();\n const { startIdentityValidation } = useClickToPayContext();\n\n useEffect(() => {\n let timeout = null;\n if (counter > 0) {\n timeout = setTimeout(() => setCounter(counter - 1), 1000);\n }\n return () => clearTimeout(timeout);\n }, [counter]);\n\n useEffect(() => {\n let timeout = null;\n\n if (showConfirmation) {\n timeout = setTimeout(() => {\n setShowConfirmation(false);\n setCounter(60);\n }, CONFIRMATION_SHOWING_TIME);\n }\n return () => clearTimeout(timeout);\n }, [showConfirmation]);\n\n const handleResendCodeClick = useCallback(\n async event => {\n event.preventDefault();\n\n try {\n onResendCode();\n setShowConfirmation(true);\n await startIdentityValidation();\n } catch (error: unknown) {\n setCounter(0);\n setShowConfirmation(false);\n\n if (!isSrciError(error)) {\n console.error(error);\n return;\n }\n\n onError(error.reason);\n }\n },\n [startIdentityValidation, onError, onResendCode]\n );\n\n if (showConfirmation) {\n return (\n <div className=\"adyen-checkout-ctp__otp-resend-code--confirmation\">\n {i18n.get('ctp.otp.codeResent')}\n <Icon type={`${PREFIX}checkmark`} height={14} width={14} />\n </div>\n );\n }\n\n if (counter > 0) {\n return (\n <div className=\"adyen-checkout-ctp__otp-resend-code--disabled\">\n {i18n.get('ctp.otp.resendCode')} -{' '}\n <span className=\"adyen-checkout-ctp__otp-resend-code-counter\"> {counter > 0 && `${counter}s`} </span>\n </div>\n );\n }\n\n return (\n <Button\n classNameModifiers={[classnames('otp-resend-code', { 'otp-resend-code--disabled': disabled })]}\n onClick={handleResendCodeClick}\n variant=\"link\"\n inline={true}\n disabled={disabled}\n >\n {i18n.get('ctp.otp.resendCode')}\n </Button>\n );\n};\n\nexport default CtPResendOtpLink;\n"],"names":["CtPResendOtpLink","onError","onResendCode","disabled","counter","setCounter","useState","showConfirmation","setShowConfirmation","i18n","useCoreContext","startIdentityValidation","useClickToPayContext","useEffect","timeout","setTimeout","clearTimeout","handleResendCodeClick","useCallback","async","event","preventDefault","error","isSrciError","console","reason","h","div","className","get","Icon","type","PREFIX","height","width","span","Button","classNameModifiers","classnames","onClick","variant","inline"],"mappings":"ikBAUA,MAQMA,EAAmB,EAAGC,UAASC,eAAcC,eAC/C,MAAOC,EAASC,GAAcC,EAAiB,OACxCC,EAAkBC,GAAuBF,GAAkB,IAC5DG,KAAEA,GAASC,KACXC,wBAAEA,GAA4BC,IAEpCC,GAAU,KACN,IAAIC,EAAU,KAId,OAHIV,EAAU,IACVU,EAAUC,YAAW,IAAMV,EAAWD,EAAU,IAAI,MAEjD,IAAMY,aAAaF,EAAAA,GAC3B,CAACV,IAEJS,GAAU,KACN,IAAIC,EAAU,KAQd,OANIP,IACAO,EAAUC,YAAW,KACjBP,GAAoB,GACpBH,EAAW,GAAA,GA5BO,MA+BnB,IAAMW,aAAaF,EAAAA,GAC3B,CAACP,IAEJ,MAAMU,EAAwBC,GAC1BC,MAAMC,IACFA,EAAMC,iBAEN,IACInB,IACAM,GAAoB,SACdG,GACV,CAAE,MAAOW,GAIL,GAHAjB,EAAW,GACXG,GAAoB,IAEfe,EAAYD,GAEb,YADAE,QAAQF,MAAMA,GAIlBrB,EAAQqB,EAAMG,OAClB,IAEJ,CAACd,EAAyBV,EAASC,IAGvC,OAAIK,EAEImB,EAACC,MAAAA,CAAIC,UAAU,qDACVnB,EAAKoB,IAAI,sBACVH,EAACI,EAAAA,CAAKC,KAAM,GAAGC,aAAmBC,OAAQ,GAAIC,MAAO,MAK7D9B,EAAU,EAENsB,EAACC,MAAAA,CAAIC,UAAU,iDACVnB,EAAKoB,IAAI,sBAAsB,KAAG,IACnCH,EAACS,OAAAA,CAAKP,UAAU,+CAA8C,IAAExB,EAAU,GAAK,GAAGA,KAAW,MAMrGsB,EAACU,EAAAA,CACGC,mBAAoB,CAACC,EAAW,kBAAmB,CAAE,4BAA6BnC,KAClFoC,QAAStB,EACTuB,QAAQ,OACRC,QAAQ,EACRtC,SAAUA,GAETM,EAAKoB,IAAI,sBAAA"}
@@ -1,2 +1,2 @@
1
- import{createElement as e,Fragment as o}from"../../../../../../external/preact/dist/preact.js";import t from"../../../../../../external/classnames/index.js";import c from"../../../../FormFields/Field/Field.js";import s from"../../../../FormFields/Checkbox/Checkbox.js";import{useCoreContext as a}from"../../../../../../core/Context/CoreProvider.js";import{useState as n,useCallback as i}from"../../../../../../external/preact/hooks/dist/hooks.js";import r from"../../../context/useClickToPayContext.js";import k from"../../../../../../utils/isScreenSmall.js";function p(){const{i18n:p}=a(),{updateStoreCookiesConsent:l,isStoringCookies:m}=r(),[d,C]=n(m),[h,x]=n(k()),b=i((()=>{const e=!d;C(e),l(e)}),[l,C,d]);return e("div",{className:t("adyen-checkout-ctp__otp-checkbox-container",{"adyen-checkout-ctp__otp-checkbox-container--checked":d})},e(c,{classNameModifiers:["consentCheckbox"],name:"clickToPayCookiesCheckbox",showContextualElement:!1,useLabelElement:!1,i18n:p},e(s,{name:"clickToPayCookiesCheckbox",onInput:b,label:p.get("ctp.otp.saveCookiesCheckbox.label"),checked:d,"aria-describedby":"adyen-ctp-cookies-info"})),e("p",{className:"adyen-checkout-ctp__otp-checkbox-info"},h?e(o,null,e("span",{id:"adyen-ctp-cookies-info"},p.get("ctp.otp.saveCookiesCheckbox.shorterInfo")," "),e("button",{className:"adyen-checkout-ctp__otp-readmore-button",onClick:()=>x(!1)},p.get("readMore"),"..")):e("span",{id:"adyen-ctp-cookies-info"},p.get("ctp.otp.saveCookiesCheckbox.information"))))}export{p as default};
1
+ import{createElement as e,Fragment as o}from"../../../../../../external/preact/dist/preact.js";import t from"../../../../../../_virtual/index.js";import c from"../../../../FormFields/Field/Field.js";import s from"../../../../FormFields/Checkbox/Checkbox.js";import{useCoreContext as a}from"../../../../../../core/Context/CoreProvider.js";import{useState as i,useCallback as n}from"../../../../../../external/preact/hooks/dist/hooks.js";import r from"../../../context/useClickToPayContext.js";import k from"../../../../../../utils/isScreenSmall.js";function p(){const{i18n:p}=a(),{updateStoreCookiesConsent:l,isStoringCookies:m}=r(),[d,C]=i(m),[h,b]=i(k()),u=n((()=>{const e=!d;C(e),l(e)}),[l,C,d]);return e("div",{className:t("adyen-checkout-ctp__otp-checkbox-container",{"adyen-checkout-ctp__otp-checkbox-container--checked":d})},e(c,{classNameModifiers:["consentCheckbox"],name:"clickToPayCookiesCheckbox",showContextualElement:!1,useLabelElement:!1,i18n:p},e(s,{name:"clickToPayCookiesCheckbox",onInput:u,label:p.get("ctp.otp.saveCookiesCheckbox.label"),checked:d,"aria-describedby":"adyen-ctp-cookies-info"})),e("p",{className:"adyen-checkout-ctp__otp-checkbox-info"},h?e(o,null,e("span",{id:"adyen-ctp-cookies-info"},p.get("ctp.otp.saveCookiesCheckbox.shorterInfo")," "),e("button",{className:"adyen-checkout-ctp__otp-readmore-button",onClick:()=>b(!1)},p.get("readMore"),"..")):e("span",{id:"adyen-ctp-cookies-info"},p.get("ctp.otp.saveCookiesCheckbox.information"))))}export{p as default};
2
2
  //# sourceMappingURL=CtPSaveCookiesCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CtPSaveCookiesCheckbox.js","sources":["../../../../../../../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport classnames from 'classnames';\nimport Field from '../../../../FormFields/Field';\nimport Checkbox from '../../../../FormFields/Checkbox';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport { useState, useCallback } from 'preact/hooks';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport isScreenSmall from '../../../../../../utils/isScreenSmall';\nimport './CtPSaveCookiesCheckbox.scss';\n\nfunction CtPSaveCookiesCheckbox() {\n const { i18n } = useCoreContext();\n const { updateStoreCookiesConsent, isStoringCookies } = useClickToPayContext();\n const [checked, setIsChecked] = useState(isStoringCookies);\n const [isTextTruncated, setIsTextTruncated] = useState<boolean>(isScreenSmall());\n\n const handleOnChange = useCallback(() => {\n const newChecked = !checked;\n setIsChecked(newChecked);\n updateStoreCookiesConsent(newChecked);\n }, [updateStoreCookiesConsent, setIsChecked, checked]);\n\n return (\n <div\n className={classnames('adyen-checkout-ctp__otp-checkbox-container', {\n 'adyen-checkout-ctp__otp-checkbox-container--checked': checked\n })}\n >\n <Field\n classNameModifiers={['consentCheckbox']}\n name={'clickToPayCookiesCheckbox'}\n showContextualElement={false}\n useLabelElement={false}\n i18n={i18n}\n >\n <Checkbox\n name={'clickToPayCookiesCheckbox'}\n onInput={handleOnChange}\n label={i18n.get('ctp.otp.saveCookiesCheckbox.label')}\n checked={checked}\n aria-describedby={'adyen-ctp-cookies-info'}\n />\n </Field>\n\n <p className=\"adyen-checkout-ctp__otp-checkbox-info\">\n {isTextTruncated ? (\n <Fragment>\n <span id=\"adyen-ctp-cookies-info\">{i18n.get('ctp.otp.saveCookiesCheckbox.shorterInfo')} </span>\n <button className=\"adyen-checkout-ctp__otp-readmore-button\" onClick={() => setIsTextTruncated(false)}>\n {i18n.get('readMore')}..\n </button>\n </Fragment>\n ) : (\n <span id=\"adyen-ctp-cookies-info\">{i18n.get('ctp.otp.saveCookiesCheckbox.information')}</span>\n )}\n </p>\n </div>\n );\n}\n\nexport default CtPSaveCookiesCheckbox;\n"],"names":["CtPSaveCookiesCheckbox","i18n","useCoreContext","updateStoreCookiesConsent","isStoringCookies","useClickToPayContext","checked","setIsChecked","useState","isTextTruncated","setIsTextTruncated","isScreenSmall","handleOnChange","useCallback","newChecked","h","div","className","classnames","Field","classNameModifiers","name","showContextualElement","useLabelElement","Checkbox","onInput","label","get","aria-describedby","p","Fragment","span","id","button","onClick"],"mappings":"+iBAUA,SAASA,IACL,MAAMC,KAAEA,GAASC,KACXC,0BAAEA,EAAyBC,iBAAEA,GAAqBC,KACjDC,EAASC,GAAgBC,EAASJ,IAClCK,EAAiBC,GAAsBF,EAAkBG,KAE1DC,EAAiBC,GAAY,KAC/B,MAAMC,GAAcR,EACpBC,EAAaO,GACbX,EAA0BW,EAAAA,GAC3B,CAACX,EAA2BI,EAAcD,IAE7C,OACIS,EAACC,MAAAA,CACGC,UAAWC,EAAW,6CAA8C,CAChE,sDAAuDZ,KAG3DS,EAACI,EAAAA,CACGC,mBAAoB,CAAC,mBACrBC,KAAM,4BACNC,uBAAuB,EACvBC,iBAAiB,EACjBtB,KAAMA,GAENc,EAACS,EAAAA,CACGH,KAAM,4BACNI,QAASb,EACTc,MAAOzB,EAAK0B,IAAI,qCAChBrB,QAASA,EACTsB,mBAAkB,4BAI1Bb,EAACc,IAAAA,CAAEZ,UAAU,yCACRR,EACGM,EAACe,OACGf,EAACgB,OAAAA,CAAKC,GAAG,0BAA0B/B,EAAK0B,IAAI,2CAA2C,KACvFZ,EAACkB,SAAAA,CAAOhB,UAAU,0CAA0CiB,QAAS,IAAMxB,GAAmB,IACzFT,EAAK0B,IAAI,YAAY,OAI9BZ,EAACgB,OAAAA,CAAKC,GAAG,0BAA0B/B,EAAK0B,IAAI,6CAKhE"}
1
+ {"version":3,"file":"CtPSaveCookiesCheckbox.js","sources":["../../../../../../../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport classnames from 'classnames';\nimport Field from '../../../../FormFields/Field';\nimport Checkbox from '../../../../FormFields/Checkbox';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport { useState, useCallback } from 'preact/hooks';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport isScreenSmall from '../../../../../../utils/isScreenSmall';\nimport './CtPSaveCookiesCheckbox.scss';\n\nfunction CtPSaveCookiesCheckbox() {\n const { i18n } = useCoreContext();\n const { updateStoreCookiesConsent, isStoringCookies } = useClickToPayContext();\n const [checked, setIsChecked] = useState(isStoringCookies);\n const [isTextTruncated, setIsTextTruncated] = useState<boolean>(isScreenSmall());\n\n const handleOnChange = useCallback(() => {\n const newChecked = !checked;\n setIsChecked(newChecked);\n updateStoreCookiesConsent(newChecked);\n }, [updateStoreCookiesConsent, setIsChecked, checked]);\n\n return (\n <div\n className={classnames('adyen-checkout-ctp__otp-checkbox-container', {\n 'adyen-checkout-ctp__otp-checkbox-container--checked': checked\n })}\n >\n <Field\n classNameModifiers={['consentCheckbox']}\n name={'clickToPayCookiesCheckbox'}\n showContextualElement={false}\n useLabelElement={false}\n i18n={i18n}\n >\n <Checkbox\n name={'clickToPayCookiesCheckbox'}\n onInput={handleOnChange}\n label={i18n.get('ctp.otp.saveCookiesCheckbox.label')}\n checked={checked}\n aria-describedby={'adyen-ctp-cookies-info'}\n />\n </Field>\n\n <p className=\"adyen-checkout-ctp__otp-checkbox-info\">\n {isTextTruncated ? (\n <Fragment>\n <span id=\"adyen-ctp-cookies-info\">{i18n.get('ctp.otp.saveCookiesCheckbox.shorterInfo')} </span>\n <button className=\"adyen-checkout-ctp__otp-readmore-button\" onClick={() => setIsTextTruncated(false)}>\n {i18n.get('readMore')}..\n </button>\n </Fragment>\n ) : (\n <span id=\"adyen-ctp-cookies-info\">{i18n.get('ctp.otp.saveCookiesCheckbox.information')}</span>\n )}\n </p>\n </div>\n );\n}\n\nexport default CtPSaveCookiesCheckbox;\n"],"names":["CtPSaveCookiesCheckbox","i18n","useCoreContext","updateStoreCookiesConsent","isStoringCookies","useClickToPayContext","checked","setIsChecked","useState","isTextTruncated","setIsTextTruncated","isScreenSmall","handleOnChange","useCallback","newChecked","h","div","className","classnames","Field","classNameModifiers","name","showContextualElement","useLabelElement","Checkbox","onInput","label","get","aria-describedby","p","Fragment","span","id","button","onClick"],"mappings":"oiBAUA,SAASA,IACL,MAAMC,KAAEA,GAASC,KACXC,0BAAEA,EAAyBC,iBAAEA,GAAqBC,KACjDC,EAASC,GAAgBC,EAASJ,IAClCK,EAAiBC,GAAsBF,EAAkBG,KAE1DC,EAAiBC,GAAY,KAC/B,MAAMC,GAAcR,EACpBC,EAAaO,GACbX,EAA0BW,EAAAA,GAC3B,CAACX,EAA2BI,EAAcD,IAE7C,OACIS,EAACC,MAAAA,CACGC,UAAWC,EAAW,6CAA8C,CAChE,sDAAuDZ,KAG3DS,EAACI,EAAAA,CACGC,mBAAoB,CAAC,mBACrBC,KAAM,4BACNC,uBAAuB,EACvBC,iBAAiB,EACjBtB,KAAMA,GAENc,EAACS,EAAAA,CACGH,KAAM,4BACNI,QAASb,EACTc,MAAOzB,EAAK0B,IAAI,qCAChBrB,QAASA,EACTsB,mBAAkB,4BAI1Bb,EAACc,IAAAA,CAAEZ,UAAU,yCACRR,EACGM,EAACe,OACGf,EAACgB,OAAAA,CAAKC,GAAG,0BAA0B/B,EAAK0B,IAAI,2CAA2C,KACvFZ,EAACkB,SAAAA,CAAOhB,UAAU,0CAA0CiB,QAAS,IAAMxB,GAAmB,IACzFT,EAAK0B,IAAI,YAAY,OAI9BZ,EAACgB,OAAAA,CAAKC,GAAG,0BAA0B/B,EAAK0B,IAAI,6CAKhE"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../../../../external/preact/dist/preact.js";import o from"../../context/useClickToPayContext.js";import{CtpState as e}from"../../services/ClickToPayService.js";import r from"../../../../../external/classnames/index.js";import{useMemo as n}from"../../../../../external/preact/hooks/dist/hooks.js";import{useCoreContext as s}from"../../../../../core/Context/CoreProvider.js";import a from"../../../Button/Button.js";const i=()=>{const{ctpState:i,logoutShopper:l,status:c,cards:u}=o(),{i18n:d}=s();if(!1===[e.Ready,e.OneTimePassword].includes(i))return null;const m=n((()=>i===e.Ready&&u.length>1?d.get("ctp.logout.notYourCards"):i===e.Ready&&1===u.length?d.get("ctp.logout.notYourCard"):i===e.Ready&&0===u.length?d.get("ctp.logout.notYourProfile"):d.get("ctp.logout.notYou")),[d,i]);return t(a,{classNameModifiers:[r("section-logout-button",{"section-logout-button--disabled":"loading"===c})],disabled:"loading"===c,onClick:l,variant:"link",inline:!0},m)};export{i as default};
1
+ import{createElement as t}from"../../../../../external/preact/dist/preact.js";import o from"../../context/useClickToPayContext.js";import{CtpState as e}from"../../services/ClickToPayService.js";import r from"../../../../../_virtual/index.js";import{useMemo as n}from"../../../../../external/preact/hooks/dist/hooks.js";import{useCoreContext as s}from"../../../../../core/Context/CoreProvider.js";import i from"../../../Button/Button.js";const a=()=>{const{ctpState:a,logoutShopper:l,status:c,cards:u}=o(),{i18n:d}=s();if(!1===[e.Ready,e.OneTimePassword].includes(a))return null;const m=n((()=>a===e.Ready&&u.length>1?d.get("ctp.logout.notYourCards"):a===e.Ready&&1===u.length?d.get("ctp.logout.notYourCard"):a===e.Ready&&0===u.length?d.get("ctp.logout.notYourProfile"):d.get("ctp.logout.notYou")),[d,a]);return t(i,{classNameModifiers:[r("section-logout-button",{"section-logout-button--disabled":"loading"===c})],disabled:"loading"===c,onClick:l,variant:"link",inline:!0},m)};export{a as default};
2
2
  //# sourceMappingURL=CtPLogoutLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CtPLogoutLink.js","sources":["../../../../../../../src/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.tsx"],"sourcesContent":["import { h } from 'preact';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport { CtpState } from '../../services/ClickToPayService';\nimport classnames from 'classnames';\nimport { useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './CtPLogoutLink.scss';\nimport Button from '../../../Button';\n\nconst CtPLogoutLink = () => {\n const { ctpState, logoutShopper, status, cards } = useClickToPayContext();\n const { i18n } = useCoreContext();\n\n if ([CtpState.Ready, CtpState.OneTimePassword].includes(ctpState) === false) {\n return null;\n }\n\n const label = useMemo(() => {\n if (ctpState === CtpState.Ready && cards.length > 1) return i18n.get('ctp.logout.notYourCards');\n if (ctpState === CtpState.Ready && cards.length === 1) return i18n.get('ctp.logout.notYourCard');\n if (ctpState === CtpState.Ready && cards.length === 0) return i18n.get('ctp.logout.notYourProfile');\n return i18n.get('ctp.logout.notYou');\n }, [i18n, ctpState]);\n\n return (\n <Button\n classNameModifiers={[\n classnames('section-logout-button', {\n 'section-logout-button--disabled': status === 'loading'\n })\n ]}\n disabled={status === 'loading'}\n onClick={logoutShopper}\n variant=\"link\"\n inline={true}\n >\n {label}\n </Button>\n );\n};\n\nexport default CtPLogoutLink;\n"],"names":["CtPLogoutLink","ctpState","logoutShopper","status","cards","useClickToPayContext","i18n","useCoreContext","CtpState","Ready","OneTimePassword","includes","label","useMemo","length","get","h","Button","classNameModifiers","classnames","disabled","onClick","variant","inline"],"mappings":"gcASA,MAAMA,EAAgB,KAClB,MAAMC,SAAEA,EAAQC,cAAEA,EAAaC,OAAEA,EAAMC,MAAEA,GAAUC,KAC7CC,KAAEA,GAASC,IAEjB,IAAsE,IAAlE,CAACC,EAASC,MAAOD,EAASE,iBAAiBC,SAASV,GACpD,OAAO,KAGX,MAAMW,EAAQC,GAAQ,IACdZ,IAAaO,EAASC,OAASL,EAAMU,OAAS,EAAUR,EAAKS,IAAI,2BACjEd,IAAaO,EAASC,OAA0B,IAAjBL,EAAMU,OAAqBR,EAAKS,IAAI,0BACnEd,IAAaO,EAASC,OAA0B,IAAjBL,EAAMU,OAAqBR,EAAKS,IAAI,6BAChET,EAAKS,IAAI,sBACjB,CAACT,EAAML,IAEV,OACIe,EAACC,EAAAA,CACGC,mBAAoB,CAChBC,EAAW,wBAAyB,CAChC,kCAA8C,YAAXhB,KAG3CiB,SAAqB,YAAXjB,EACVkB,QAASnB,EACToB,QAAQ,OACRC,QAAQ,GAEPX,EAAAA"}
1
+ {"version":3,"file":"CtPLogoutLink.js","sources":["../../../../../../../src/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.tsx"],"sourcesContent":["import { h } from 'preact';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport { CtpState } from '../../services/ClickToPayService';\nimport classnames from 'classnames';\nimport { useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './CtPLogoutLink.scss';\nimport Button from '../../../Button';\n\nconst CtPLogoutLink = () => {\n const { ctpState, logoutShopper, status, cards } = useClickToPayContext();\n const { i18n } = useCoreContext();\n\n if ([CtpState.Ready, CtpState.OneTimePassword].includes(ctpState) === false) {\n return null;\n }\n\n const label = useMemo(() => {\n if (ctpState === CtpState.Ready && cards.length > 1) return i18n.get('ctp.logout.notYourCards');\n if (ctpState === CtpState.Ready && cards.length === 1) return i18n.get('ctp.logout.notYourCard');\n if (ctpState === CtpState.Ready && cards.length === 0) return i18n.get('ctp.logout.notYourProfile');\n return i18n.get('ctp.logout.notYou');\n }, [i18n, ctpState]);\n\n return (\n <Button\n classNameModifiers={[\n classnames('section-logout-button', {\n 'section-logout-button--disabled': status === 'loading'\n })\n ]}\n disabled={status === 'loading'}\n onClick={logoutShopper}\n variant=\"link\"\n inline={true}\n >\n {label}\n </Button>\n );\n};\n\nexport default CtPLogoutLink;\n"],"names":["CtPLogoutLink","ctpState","logoutShopper","status","cards","useClickToPayContext","i18n","useCoreContext","CtpState","Ready","OneTimePassword","includes","label","useMemo","length","get","h","Button","classNameModifiers","classnames","disabled","onClick","variant","inline"],"mappings":"qbASA,MAAMA,EAAgB,KAClB,MAAMC,SAAEA,EAAQC,cAAEA,EAAaC,OAAEA,EAAMC,MAAEA,GAAUC,KAC7CC,KAAEA,GAASC,IAEjB,IAAsE,IAAlE,CAACC,EAASC,MAAOD,EAASE,iBAAiBC,SAASV,GACpD,OAAO,KAGX,MAAMW,EAAQC,GAAQ,IACdZ,IAAaO,EAASC,OAASL,EAAMU,OAAS,EAAUR,EAAKS,IAAI,2BACjEd,IAAaO,EAASC,OAA0B,IAAjBL,EAAMU,OAAqBR,EAAKS,IAAI,0BACnEd,IAAaO,EAASC,OAA0B,IAAjBL,EAAMU,OAAqBR,EAAKS,IAAI,6BAChET,EAAKS,IAAI,sBACjB,CAACT,EAAML,IAEV,OACIe,EAACC,EAAAA,CACGC,mBAAoB,CAChBC,EAAW,wBAAyB,CAChC,kCAA8C,YAAXhB,KAG3CiB,SAAqB,YAAXjB,EACVkB,QAASnB,EACToB,QAAQ,OACRC,QAAQ,GAEPX,EAAAA"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"../../../../../external/classnames/index.js";import n from"./CtPLogoutLink.js";import{CtPBrand as c}from"../CtPBrand/CtPBrand.js";import a from"../../context/useClickToPayContext.js";const o=({children:o,onEnterKeyPress:s})=>{const{isStandaloneComponent:r}=a();return e("div",{className:t("adyen-checkout-ctp__section",{"adyen-checkout-ctp__section--standalone":r}),onKeyPress:s},e("div",{className:"adyen-checkout-ctp__section-brand"},e(c,null),e(n,null)),o)};o.Title=({endAdornment:t,children:n})=>e("div",{className:"adyen-checkout-ctp__section-header"},e("h1",{className:"adyen-checkout-ctp__section-header-title"},n),t&&e("span",{className:"adyen-checkout-ctp__section-header-adornment"},t)),o.Text=({children:t})=>e("p",{className:"adyen-checkout-ctp__section-text"},t);export{o as default};
1
+ import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"../../../../../_virtual/index.js";import n from"./CtPLogoutLink.js";import{CtPBrand as c}from"../CtPBrand/CtPBrand.js";import a from"../../context/useClickToPayContext.js";const o=({children:o,onEnterKeyPress:s})=>{const{isStandaloneComponent:r}=a();return e("div",{className:t("adyen-checkout-ctp__section",{"adyen-checkout-ctp__section--standalone":r}),onKeyPress:s},e("div",{className:"adyen-checkout-ctp__section-brand"},e(c,null),e(n,null)),o)};o.Title=({endAdornment:t,children:n})=>e("div",{className:"adyen-checkout-ctp__section-header"},e("h1",{className:"adyen-checkout-ctp__section-header-title"},n),t&&e("span",{className:"adyen-checkout-ctp__section-header-adornment"},t)),o.Text=({children:t})=>e("p",{className:"adyen-checkout-ctp__section-text"},t);export{o as default};
2
2
  //# sourceMappingURL=CtPSection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CtPSection.js","sources":["../../../../../../../src/components/internal/ClickToPay/components/CtPSection/CtPSection.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classnames from 'classnames';\nimport CtPLogoutLink from './CtPLogoutLink';\nimport { CtPBrand } from '../CtPBrand';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport './CtPSection.scss';\n\ninterface CtPSectionProps {\n onEnterKeyPress: (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => void;\n children?: h.JSX.Element[];\n}\n\nconst CtPSection = ({ children, onEnterKeyPress }: CtPSectionProps): h.JSX.Element => {\n const { isStandaloneComponent } = useClickToPayContext();\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={classnames('adyen-checkout-ctp__section', { 'adyen-checkout-ctp__section--standalone': isStandaloneComponent })}\n onKeyPress={onEnterKeyPress}\n >\n <div className=\"adyen-checkout-ctp__section-brand\">\n <CtPBrand />\n <CtPLogoutLink />\n </div>\n\n {children}\n </div>\n );\n};\n\nconst Title = ({ endAdornment, children }: { endAdornment?; children }) => (\n <div className=\"adyen-checkout-ctp__section-header\">\n <h1 className=\"adyen-checkout-ctp__section-header-title\">{children}</h1>\n {endAdornment && <span className=\"adyen-checkout-ctp__section-header-adornment\">{endAdornment}</span>}\n </div>\n);\nconst Text = ({ children }: { children }) => <p className=\"adyen-checkout-ctp__section-text\">{children}</p>;\n\nCtPSection.Title = Title;\nCtPSection.Text = Text;\n\nexport default CtPSection;\n"],"names":["CtPSection","children","onEnterKeyPress","isStandaloneComponent","useClickToPayContext","h","div","className","classnames","onKeyPress","CtPBrand","CtPLogoutLink","Title","endAdornment","h1","span","Text","p"],"mappings":"mRAYA,MAAMA,EAAa,EAAGC,WAAUC,sBAC5B,MAAMC,sBAAEA,GAA0BC,IAElC,OAEIC,EAACC,MAAAA,CACGC,UAAWC,EAAW,8BAA+B,CAAE,0CAA2CL,IAClGM,WAAYP,GAEZG,EAACC,MAAAA,CAAIC,UAAU,qCACXF,EAACK,EAAAA,MACDL,EAACM,EAGJV,OAAAA,EAAAA,EAabD,EAAWY,MARG,EAAGC,eAAcZ,cAC3BI,EAACC,MAAAA,CAAIC,UAAU,sCACXF,EAACS,KAAAA,CAAGP,UAAU,4CAA4CN,GACzDY,GAAgBR,EAACU,OAAAA,CAAKR,UAAU,gDAAgDM,IAMzFb,EAAWgB,KAHE,EAAGf,cAA6BI,EAACY,IAAAA,CAAEV,UAAU,oCAAoCN"}
1
+ {"version":3,"file":"CtPSection.js","sources":["../../../../../../../src/components/internal/ClickToPay/components/CtPSection/CtPSection.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classnames from 'classnames';\nimport CtPLogoutLink from './CtPLogoutLink';\nimport { CtPBrand } from '../CtPBrand';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport './CtPSection.scss';\n\ninterface CtPSectionProps {\n onEnterKeyPress: (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => void;\n children?: h.JSX.Element[];\n}\n\nconst CtPSection = ({ children, onEnterKeyPress }: CtPSectionProps): h.JSX.Element => {\n const { isStandaloneComponent } = useClickToPayContext();\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={classnames('adyen-checkout-ctp__section', { 'adyen-checkout-ctp__section--standalone': isStandaloneComponent })}\n onKeyPress={onEnterKeyPress}\n >\n <div className=\"adyen-checkout-ctp__section-brand\">\n <CtPBrand />\n <CtPLogoutLink />\n </div>\n\n {children}\n </div>\n );\n};\n\nconst Title = ({ endAdornment, children }: { endAdornment?; children }) => (\n <div className=\"adyen-checkout-ctp__section-header\">\n <h1 className=\"adyen-checkout-ctp__section-header-title\">{children}</h1>\n {endAdornment && <span className=\"adyen-checkout-ctp__section-header-adornment\">{endAdornment}</span>}\n </div>\n);\nconst Text = ({ children }: { children }) => <p className=\"adyen-checkout-ctp__section-text\">{children}</p>;\n\nCtPSection.Title = Title;\nCtPSection.Text = Text;\n\nexport default CtPSection;\n"],"names":["CtPSection","children","onEnterKeyPress","isStandaloneComponent","useClickToPayContext","h","div","className","classnames","onKeyPress","CtPBrand","CtPLogoutLink","Title","endAdornment","h1","span","Text","p"],"mappings":"wQAYA,MAAMA,EAAa,EAAGC,WAAUC,sBAC5B,MAAMC,sBAAEA,GAA0BC,IAElC,OAEIC,EAACC,MAAAA,CACGC,UAAWC,EAAW,8BAA+B,CAAE,0CAA2CL,IAClGM,WAAYP,GAEZG,EAACC,MAAAA,CAAIC,UAAU,qCACXF,EAACK,EAAAA,MACDL,EAACM,EAGJV,OAAAA,EAAAA,EAabD,EAAWY,MARG,EAAGC,eAAcZ,cAC3BI,EAACC,MAAAA,CAAIC,UAAU,sCACXF,EAACS,KAAAA,CAAGP,UAAU,4CAA4CN,GACzDY,GAAgBR,EAACU,OAAAA,CAAKR,UAAU,gDAAgDM,IAMzFb,EAAWgB,KAHE,EAAGf,cAA6BI,EAACY,IAAAA,CAAEV,UAAU,oCAAoCN"}
@@ -1 +1 @@
1
- {"version":3,"file":"CompanyDetails.js","sources":["../../../../../src/components/internal/CompanyDetails/CompanyDetails.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport Fieldset from '../FormFields/Fieldset';\nimport Field from '../FormFields/Field';\nimport ReadOnlyCompanyDetails from './ReadOnlyCompanyDetails';\nimport { companyDetailsValidationRules } from './validate';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { getFormattedData } from './utils';\nimport { CompanyDetailsSchema, CompanyDetailsProps } from './types';\nimport useForm from '../../../utils/useForm';\nimport InputText from '../FormFields/InputText';\nimport { ComponentMethodsRef } from '../UIElement/types';\n\nexport const COMPANY_DETAILS_SCHEMA = ['name', 'registrationNumber'];\n\nexport default function CompanyDetails(props: CompanyDetailsProps) {\n const { label = '', namePrefix, requiredFields, visibility } = props;\n const { i18n } = useCoreContext();\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<CompanyDetailsSchema>({\n schema: requiredFields,\n rules: { ...companyDetailsValidationRules, ...props.validationRules },\n defaultData: props.data\n });\n\n /** An object by which to expose 'public' members to the parent UIElement */\n const companyDetailsRef = useRef<ComponentMethodsRef>({});\n // Just call once\n if (!Object.keys(companyDetailsRef.current).length) {\n props.setComponentRef?.(companyDetailsRef.current);\n }\n\n // Expose method expected by (parent) Address.tsx\n companyDetailsRef.current.showValidation = () => {\n triggerValidation();\n };\n\n const generateFieldName = (name: string): string => `${namePrefix ? `${namePrefix}.` : ''}${name}`;\n\n const eventHandler =\n (mode: string): h.JSX.FocusEventHandler<HTMLInputElement> =>\n (e): void => {\n const { name } = e.target as HTMLInputElement;\n const key = name.split(`${namePrefix}.`).pop();\n\n handleChangeFor(key, mode)(e);\n };\n\n const inputEventHandler =\n (mode: string): h.JSX.InputEventHandler<HTMLInputElement> =>\n (e): void => {\n const { name } = e.target as HTMLInputElement;\n const key = name.split(`${namePrefix}.`).pop();\n\n handleChangeFor(key, mode)(e);\n };\n\n useEffect(() => {\n const formattedData = getFormattedData(data);\n props.onChange({ data: formattedData, valid, errors, isValid });\n }, [data, valid, errors, isValid]);\n\n if (visibility === 'hidden') return null;\n if (visibility === 'readOnly') return <ReadOnlyCompanyDetails {...props} data={data} />;\n\n return (\n <Fieldset classNameModifiers={[label]} label={label}>\n {requiredFields.includes('name') && (\n <Field\n label={i18n.get('companyDetails.name')}\n classNameModifiers={['name']}\n errorMessage={!!errors.name}\n i18n={i18n}\n name={generateFieldName('companyName')}\n >\n <InputText\n name={generateFieldName('name')}\n value={data.name}\n classNameModifiers={['name']}\n onInput={inputEventHandler('input')}\n onBlur={eventHandler('blur')}\n spellCheck={false}\n />\n </Field>\n )}\n\n {requiredFields.includes('registrationNumber') && (\n <Field\n label={i18n.get('companyDetails.registrationNumber')}\n classNameModifiers={['registrationNumber']}\n errorMessage={!!errors.registrationNumber}\n i18n={i18n}\n name={generateFieldName('registrationNumber')}\n >\n <InputText\n name={generateFieldName('registrationNumber')}\n value={data.registrationNumber}\n classNameModifiers={['registrationNumber']}\n onInput={inputEventHandler('input')}\n onBlur={eventHandler('blur')}\n spellCheck={false}\n />\n </Field>\n )}\n </Fieldset>\n );\n}\n\nCompanyDetails.defaultProps = {\n data: {},\n onChange: () => {},\n visibility: 'editable',\n requiredFields: COMPANY_DETAILS_SCHEMA,\n validationRules: companyDetailsValidationRules\n};\n"],"names":["COMPANY_DETAILS_SCHEMA","CompanyDetails","props","label","namePrefix","requiredFields","visibility","i18n","useCoreContext","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","companyDetailsValidationRules","validationRules","defaultData","companyDetailsRef","useRef","Object","keys","current","length","setComponentRef","showValidation","generateFieldName","name","eventHandler","mode","e","target","key","split","pop","inputEventHandler","useEffect","formattedData","getFormattedData","onChange","h","ReadOnlyCompanyDetails","Fieldset","classNameModifiers","includes","Field","get","errorMessage","InputText","value","onInput","onBlur","spellCheck","registrationNumber","defaultProps"],"mappings":"0jBAaaA,EAAyB,CAAC,OAAQ,sBAEhC,SAASC,EAAeC,GACnC,MAAMC,MAAEA,EAAQ,GAAEC,WAAEA,EAAUC,eAAEA,EAAcC,WAAEA,GAAeJ,GACzDK,KAAEA,GAASC,KACXC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA8B,CACvGC,OAAQX,EACRY,MAAO,IAAKC,KAAkChB,EAAMiB,iBACpDC,YAAalB,EAAMS,OAIjBU,EAAoBC,EAA4B,IAEjDC,OAAOC,KAAKH,EAAkBI,SAASC,QACxCxB,EAAMyB,kBAAkBN,EAAkBI,SAI9CJ,EAAkBI,QAAQG,eAAiB,KACvClB,GAAAA,EAGJ,MAAMmB,EAAqBC,GAAyB,GAAG1B,EAAa,GAAGA,KAAgB,KAAK0B,IAEtFC,EACDC,GACAC,IACG,MAAMH,KAAEA,GAASG,EAAEC,OACbC,EAAML,EAAKM,MAAM,GAAGhC,MAAeiC,MAEzC5B,EAAgB0B,EAAKH,EAArBvB,CAA2BwB,EAAAA,EAG7BK,EACDN,GACAC,IACG,MAAMH,KAAEA,GAASG,EAAEC,OACbC,EAAML,EAAKM,MAAM,GAAGhC,MAAeiC,MAEzC5B,EAAgB0B,EAAKH,EAArBvB,CAA2BwB,EAAAA,EAQnC,OALAM,GAAU,KACN,MAAMC,EAAgBC,EAAiB9B,GACvCT,EAAMwC,SAAS,CAAE/B,KAAM6B,EAAe5B,QAAOC,SAAQC,WAAQ,GAC9D,CAACH,EAAMC,EAAOC,EAAQC,IAEN,WAAfR,EAAgC,KACjB,aAAfA,EAAkCqC,EAACC,EAAAA,IAA2B1C,EAAOS,KAAMA,IAG3EgC,EAACE,EAAAA,CAASC,mBAAoB,CAAC3C,GAAQA,MAAOA,GACzCE,EAAe0C,SAAS,SACrBJ,EAACK,EAAAA,CACG7C,MAAOI,EAAK0C,IAAI,uBAChBH,mBAAoB,CAAC,QACrBI,eAAgBrC,EAAOiB,KACvBvB,KAAMA,EACNuB,KAAMD,EAAkB,gBAExBc,EAACQ,EAAAA,CACGrB,KAAMD,EAAkB,QACxBuB,MAAOzC,EAAKmB,KACZgB,mBAAoB,CAAC,QACrBO,QAASf,EAAkB,SAC3BgB,OAAQvB,EAAa,QACrBwB,YAAY,KAKvBlD,EAAe0C,SAAS,uBACrBJ,EAACK,EAAAA,CACG7C,MAAOI,EAAK0C,IAAI,qCAChBH,mBAAoB,CAAC,sBACrBI,eAAgBrC,EAAO2C,mBACvBjD,KAAMA,EACNuB,KAAMD,EAAkB,uBAExBc,EAACQ,EAAAA,CACGrB,KAAMD,EAAkB,sBACxBuB,MAAOzC,EAAK6C,mBACZV,mBAAoB,CAAC,sBACrBO,QAASf,EAAkB,SAC3BgB,OAAQvB,EAAa,QACrBwB,YAAY,KAMpC,CAEAtD,EAAewD,aAAe,CAC1B9C,KAAM,CAAC,EACP+B,SAAU,OACVpC,WAAY,WACZD,eAAgBL,EAChBmB,gBAAiBD"}
1
+ {"version":3,"file":"CompanyDetails.js","sources":["../../../../../src/components/internal/CompanyDetails/CompanyDetails.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport Fieldset from '../FormFields/Fieldset';\nimport Field from '../FormFields/Field';\nimport ReadOnlyCompanyDetails from './ReadOnlyCompanyDetails';\nimport { companyDetailsValidationRules } from './validate';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { getFormattedData } from './utils';\nimport { CompanyDetailsSchema, CompanyDetailsProps } from './types';\nimport useForm from '../../../utils/useForm';\nimport InputText from '../FormFields/InputText';\nimport { ComponentMethodsRef } from '../UIElement/types';\nimport { HandleChangeForModeType } from '../../../utils/useForm/types';\n\nexport const COMPANY_DETAILS_SCHEMA = ['name', 'registrationNumber'];\n\nexport default function CompanyDetails(props: CompanyDetailsProps) {\n const { label = '', namePrefix, requiredFields, visibility } = props;\n const { i18n } = useCoreContext();\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<CompanyDetailsSchema>({\n schema: requiredFields,\n rules: { ...companyDetailsValidationRules, ...props.validationRules },\n defaultData: props.data\n });\n\n /** An object by which to expose 'public' members to the parent UIElement */\n const companyDetailsRef = useRef<ComponentMethodsRef>({});\n // Just call once\n if (!Object.keys(companyDetailsRef.current).length) {\n props.setComponentRef?.(companyDetailsRef.current);\n }\n\n // Expose method expected by (parent) Address.tsx\n companyDetailsRef.current.showValidation = () => {\n triggerValidation();\n };\n\n const generateFieldName = (name: string): string => `${namePrefix ? `${namePrefix}.` : ''}${name}`;\n\n const eventHandler =\n (mode: HandleChangeForModeType): h.JSX.FocusEventHandler<HTMLInputElement> =>\n (e): void => {\n const { name } = e.target as HTMLInputElement;\n const key = name.split(`${namePrefix}.`).pop();\n\n handleChangeFor(key, mode)(e);\n };\n\n const inputEventHandler =\n (mode: HandleChangeForModeType): h.JSX.InputEventHandler<HTMLInputElement> =>\n (e): void => {\n const { name } = e.target as HTMLInputElement;\n const key = name.split(`${namePrefix}.`).pop();\n\n handleChangeFor(key, mode)(e);\n };\n\n useEffect(() => {\n const formattedData = getFormattedData(data);\n props.onChange({ data: formattedData, valid, errors, isValid });\n }, [data, valid, errors, isValid]);\n\n if (visibility === 'hidden') return null;\n if (visibility === 'readOnly') return <ReadOnlyCompanyDetails {...props} data={data} />;\n\n return (\n <Fieldset classNameModifiers={[label]} label={label}>\n {requiredFields.includes('name') && (\n <Field\n label={i18n.get('companyDetails.name')}\n classNameModifiers={['name']}\n errorMessage={!!errors.name}\n i18n={i18n}\n name={generateFieldName('companyName')}\n >\n <InputText\n name={generateFieldName('name')}\n value={data.name}\n classNameModifiers={['name']}\n onInput={inputEventHandler('input')}\n onBlur={eventHandler('blur')}\n spellCheck={false}\n />\n </Field>\n )}\n\n {requiredFields.includes('registrationNumber') && (\n <Field\n label={i18n.get('companyDetails.registrationNumber')}\n classNameModifiers={['registrationNumber']}\n errorMessage={!!errors.registrationNumber}\n i18n={i18n}\n name={generateFieldName('registrationNumber')}\n >\n <InputText\n name={generateFieldName('registrationNumber')}\n value={data.registrationNumber}\n classNameModifiers={['registrationNumber']}\n onInput={inputEventHandler('input')}\n onBlur={eventHandler('blur')}\n spellCheck={false}\n />\n </Field>\n )}\n </Fieldset>\n );\n}\n\nCompanyDetails.defaultProps = {\n data: {},\n onChange: () => {},\n visibility: 'editable',\n requiredFields: COMPANY_DETAILS_SCHEMA,\n validationRules: companyDetailsValidationRules\n};\n"],"names":["COMPANY_DETAILS_SCHEMA","CompanyDetails","props","label","namePrefix","requiredFields","visibility","i18n","useCoreContext","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","companyDetailsValidationRules","validationRules","defaultData","companyDetailsRef","useRef","Object","keys","current","length","setComponentRef","showValidation","generateFieldName","name","eventHandler","mode","e","target","key","split","pop","inputEventHandler","useEffect","formattedData","getFormattedData","onChange","h","ReadOnlyCompanyDetails","Fieldset","classNameModifiers","includes","Field","get","errorMessage","InputText","value","onInput","onBlur","spellCheck","registrationNumber","defaultProps"],"mappings":"0jBAcaA,EAAyB,CAAC,OAAQ,sBAEhC,SAASC,EAAeC,GACnC,MAAMC,MAAEA,EAAQ,GAAEC,WAAEA,EAAUC,eAAEA,EAAcC,WAAEA,GAAeJ,GACzDK,KAAEA,GAASC,KACXC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA8B,CACvGC,OAAQX,EACRY,MAAO,IAAKC,KAAkChB,EAAMiB,iBACpDC,YAAalB,EAAMS,OAIjBU,EAAoBC,EAA4B,IAEjDC,OAAOC,KAAKH,EAAkBI,SAASC,QACxCxB,EAAMyB,kBAAkBN,EAAkBI,SAI9CJ,EAAkBI,QAAQG,eAAiB,KACvClB,GAAAA,EAGJ,MAAMmB,EAAqBC,GAAyB,GAAG1B,EAAa,GAAGA,KAAgB,KAAK0B,IAEtFC,EACDC,GACAC,IACG,MAAMH,KAAEA,GAASG,EAAEC,OACbC,EAAML,EAAKM,MAAM,GAAGhC,MAAeiC,MAEzC5B,EAAgB0B,EAAKH,EAArBvB,CAA2BwB,EAAAA,EAG7BK,EACDN,GACAC,IACG,MAAMH,KAAEA,GAASG,EAAEC,OACbC,EAAML,EAAKM,MAAM,GAAGhC,MAAeiC,MAEzC5B,EAAgB0B,EAAKH,EAArBvB,CAA2BwB,EAAAA,EAQnC,OALAM,GAAU,KACN,MAAMC,EAAgBC,EAAiB9B,GACvCT,EAAMwC,SAAS,CAAE/B,KAAM6B,EAAe5B,QAAOC,SAAQC,WAAQ,GAC9D,CAACH,EAAMC,EAAOC,EAAQC,IAEN,WAAfR,EAAgC,KACjB,aAAfA,EAAkCqC,EAACC,EAAAA,IAA2B1C,EAAOS,KAAMA,IAG3EgC,EAACE,EAAAA,CAASC,mBAAoB,CAAC3C,GAAQA,MAAOA,GACzCE,EAAe0C,SAAS,SACrBJ,EAACK,EAAAA,CACG7C,MAAOI,EAAK0C,IAAI,uBAChBH,mBAAoB,CAAC,QACrBI,eAAgBrC,EAAOiB,KACvBvB,KAAMA,EACNuB,KAAMD,EAAkB,gBAExBc,EAACQ,EAAAA,CACGrB,KAAMD,EAAkB,QACxBuB,MAAOzC,EAAKmB,KACZgB,mBAAoB,CAAC,QACrBO,QAASf,EAAkB,SAC3BgB,OAAQvB,EAAa,QACrBwB,YAAY,KAKvBlD,EAAe0C,SAAS,uBACrBJ,EAACK,EAAAA,CACG7C,MAAOI,EAAK0C,IAAI,qCAChBH,mBAAoB,CAAC,sBACrBI,eAAgBrC,EAAO2C,mBACvBjD,KAAMA,EACNuB,KAAMD,EAAkB,uBAExBc,EAACQ,EAAAA,CACGrB,KAAMD,EAAkB,sBACxBuB,MAAOzC,EAAK6C,mBACZV,mBAAoB,CAAC,sBACrBO,QAASf,EAAkB,SAC3BgB,OAAQvB,EAAa,QACrBwB,YAAY,KAMpC,CAEAtD,EAAewD,aAAe,CAC1B9C,KAAM,CAAC,EACP+B,SAAU,OACVpC,WAAY,WACZD,eAAgBL,EAChBmB,gBAAiBD"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../external/preact/dist/preact.js";import r from"../../../external/classnames/index.js";import{useCoreContext as t}from"../../../core/Context/CoreProvider.js";function a({label:a="qrCodeOrApp",classNames:o=[]}){const{i18n:s}=t();return e("div",{className:r("adyen-checkout__content-separator",...o)},s.get(a))}export{a as default};
1
+ import{createElement as e}from"../../../external/preact/dist/preact.js";import r from"../../../_virtual/index.js";import{useCoreContext as t}from"../../../core/Context/CoreProvider.js";function o({label:o="qrCodeOrApp",classNames:a=[]}){const{i18n:s}=t();return e("div",{className:r("adyen-checkout__content-separator",...a)},s.get(o))}export{o as default};
2
2
  //# sourceMappingURL=ContentSeparator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentSeparator.js","sources":["../../../../../src/components/internal/ContentSeparator/ContentSeparator.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classnames from 'classnames';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './ContentSeparator.scss';\n\ninterface ContentSeparatorProps {\n label?: string;\n classNames?: string[];\n}\n\nfunction ContentSeparator({ label = 'qrCodeOrApp', classNames = [] }: ContentSeparatorProps) {\n const { i18n } = useCoreContext();\n return <div className={classnames('adyen-checkout__content-separator', ...classNames)}>{i18n.get(label)}</div>;\n}\n\nexport default ContentSeparator;\n"],"names":["ContentSeparator","label","classNames","i18n","useCoreContext","h","div","className","classnames","get"],"mappings":"oMAUA,SAASA,GAAiBC,MAAEA,EAAQ,cAAaC,WAAEA,EAAa,KAC5D,MAAMC,KAAEA,GAASC,IACjB,OAAOC,EAACC,MAAAA,CAAIC,UAAWC,EAAW,uCAAwCN,IAAcC,EAAKM,IAAIR,GACrG"}
1
+ {"version":3,"file":"ContentSeparator.js","sources":["../../../../../src/components/internal/ContentSeparator/ContentSeparator.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classnames from 'classnames';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './ContentSeparator.scss';\n\ninterface ContentSeparatorProps {\n label?: string;\n classNames?: string[];\n}\n\nfunction ContentSeparator({ label = 'qrCodeOrApp', classNames = [] }: ContentSeparatorProps) {\n const { i18n } = useCoreContext();\n return <div className={classnames('adyen-checkout__content-separator', ...classNames)}>{i18n.get(label)}</div>;\n}\n\nexport default ContentSeparator;\n"],"names":["ContentSeparator","label","classNames","i18n","useCoreContext","h","div","className","classnames","get"],"mappings":"yLAUA,SAASA,GAAiBC,MAAEA,EAAQ,cAAaC,WAAEA,EAAa,KAC5D,MAAMC,KAAEA,GAASC,IACjB,OAAOC,EAACC,MAAAA,CAAIC,UAAWC,EAAW,uCAAwCN,IAAcC,EAAKM,IAAIR,GACrG"}
@@ -0,0 +1,2 @@
1
+ import{createElement as e}from"../../../external/preact/dist/preact.js";function a({tableFields:a}){return e("dl",{className:"adyen-checkout__voucher-result__details adyen-checkout__details-table"},a.filter((e=>!!e)).filter((({label:e,value:a})=>!!e&&!!a)).map((({label:a,value:t})=>e("div",{key:`${a+t}`,className:"adyen-checkout__voucher-result__details__item adyen-checkout__details-table__item"},e("dt",{className:"adyen-checkout__voucher-result__details__label adyen-checkout__details-table__label"},a),e("dd",{className:"adyen-checkout__voucher-result__details__value adyen-checkout__details-table__value"},t)))))}export{a as default};
2
+ //# sourceMappingURL=DetailsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsTable.js","sources":["../../../../../src/components/internal/DetailsTable/DetailsTable.tsx"],"sourcesContent":["import { h } from 'preact';\nimport './DetailsTable.scss';\n\nexport interface DetailsTableData\n extends Array<{\n label: string;\n value: string;\n }> {}\n\nexport interface DetailsTableProps {\n tableFields: DetailsTableData;\n}\n\nexport default function DetailsTable({ tableFields }: DetailsTableProps) {\n // For context, this markup uses 2 classes for backwards compatibility\n // This was originally part of the voucher component and ported out\n // We can remove the voucher class names at point\n return (\n <dl className=\"adyen-checkout__voucher-result__details adyen-checkout__details-table\">\n {tableFields\n // first remove empty values\n .filter(item => !!item)\n // or objects without label and value\n .filter(({ label, value }) => !!label && !!value)\n .map(({ label, value }) => (\n <div key={`${label + value}`} className=\"adyen-checkout__voucher-result__details__item adyen-checkout__details-table__item\">\n <dt className=\"adyen-checkout__voucher-result__details__label adyen-checkout__details-table__label\">{label}</dt>\n <dd className=\"adyen-checkout__voucher-result__details__value adyen-checkout__details-table__value\">{value}</dd>\n </div>\n ))}\n </dl>\n );\n}\n"],"names":["DetailsTable","tableFields","h","dl","className","filter","item","label","value","map","div","key","dt","dd"],"mappings":"wEAae,SAASA,GAAaC,YAAEA,IAInC,OACIC,EAACC,KAAAA,CAAGC,UAAU,yEACTH,EAEII,QAAOC,KAAUA,IAEjBD,QAAO,EAAGE,QAAOC,aAAcD,KAAWC,IAC1CC,KAAI,EAAGF,QAAOC,WACXN,EAACQ,MAAAA,CAAIC,IAAK,GAAGJ,EAAQC,IAASJ,UAAU,qFACpCF,EAACU,KAAAA,CAAGR,UAAU,uFAAuFG,GACrGL,EAACW,KAAAA,CAAGT,UAAU,uFAAuFI,MAK7H"}
@@ -1,2 +1,2 @@
1
- import e from"../../../external/classnames/index.js";import{createElement as t}from"../../../external/preact/dist/preact.js";function a({buttonId:a,showRadioButton:d,isSelected:n,expandContentId:o,children:r,classNameModifiers:c=[]}){return t("button",{className:e("adyen-checkout__payment-method__header__title",...c.map((e=>`adyen-checkout-expand-button--${e}`))),id:a,role:"radio","aria-checked":n,"aria-expanded":n,"aria-controls":o,type:"button"},d&&t("span",{className:e({"adyen-checkout__payment-method__radio":!0,"adyen-checkout__payment-method__radio--selected":n}),"aria-hidden":"true"}),r)}export{a as default};
1
+ import e from"../../../_virtual/index.js";import{createElement as t}from"../../../external/preact/dist/preact.js";function a({buttonId:a,showRadioButton:d,isSelected:o,expandContentId:n,children:r,classNameModifiers:c=[]}){return t("button",{className:e("adyen-checkout__payment-method__header__title",...c.map((e=>`adyen-checkout-expand-button--${e}`))),id:a,role:"radio","aria-checked":o,"aria-expanded":o,"aria-controls":n,type:"button"},d&&t("span",{className:e({"adyen-checkout__payment-method__radio":!0,"adyen-checkout__payment-method__radio--selected":o}),"aria-hidden":"true"}),r)}export{a as default};
2
2
  //# sourceMappingURL=ExpandButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandButton.js","sources":["../../../../../src/components/internal/ExpandButton/ExpandButton.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { ComponentChildren, h } from 'preact';\nimport './ExpandButton.scss';\n\ninterface ExpandButton {\n buttonId: string;\n isSelected: boolean;\n expandContentId: string;\n children?: ComponentChildren;\n showRadioButton?: boolean;\n classNameModifiers?: string[];\n}\n\nfunction ExpandButton({ buttonId, showRadioButton, isSelected, expandContentId, children, classNameModifiers = [] }: Readonly<ExpandButton>) {\n return (\n // See discussion: https://github.com/w3c/aria/issues/1404\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <button\n className={classNames(\n 'adyen-checkout__payment-method__header__title',\n ...classNameModifiers.map(modifier => `adyen-checkout-expand-button--${modifier}`)\n )}\n id={buttonId}\n role={'radio'}\n aria-checked={isSelected}\n aria-expanded={isSelected}\n aria-controls={expandContentId}\n type=\"button\"\n >\n {showRadioButton && (\n <span\n className={classNames({\n 'adyen-checkout__payment-method__radio': true,\n 'adyen-checkout__payment-method__radio--selected': isSelected\n })}\n aria-hidden=\"true\"\n />\n )}\n {children}\n </button>\n );\n}\n\nexport default ExpandButton;\n"],"names":["ExpandButton","buttonId","showRadioButton","isSelected","expandContentId","children","classNameModifiers","h","button","className","classNames","map","modifier","id","role","aria-checked","aria-expanded","aria-controls","type","span","aria-hidden"],"mappings":"6HAaA,SAASA,GAAaC,SAAEA,EAAQC,gBAAEA,EAAeC,WAAEA,EAAUC,gBAAEA,EAAeC,SAAEA,EAAQC,mBAAEA,EAAqB,KAC3G,OAGIC,EAACC,SAAAA,CACGC,UAAWC,EACP,mDACGJ,EAAmBK,KAAIC,GAAY,iCAAiCA,OAE3EC,GAAIZ,EACJa,KAAM,QACNC,eAAcZ,EACda,gBAAeb,EACfc,gBAAeb,EACfc,KAAK,UAEJhB,GACGK,EAACY,OAAAA,CACGV,UAAWC,EAAW,CAClB,yCAAyC,EACzC,kDAAmDP,IAEvDiB,cAAY,SAGnBf,EAGb"}
1
+ {"version":3,"file":"ExpandButton.js","sources":["../../../../../src/components/internal/ExpandButton/ExpandButton.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { ComponentChildren, h } from 'preact';\nimport './ExpandButton.scss';\n\ninterface ExpandButton {\n buttonId: string;\n isSelected: boolean;\n expandContentId: string;\n children?: ComponentChildren;\n showRadioButton?: boolean;\n classNameModifiers?: string[];\n}\n\nfunction ExpandButton({ buttonId, showRadioButton, isSelected, expandContentId, children, classNameModifiers = [] }: Readonly<ExpandButton>) {\n return (\n // See discussion: https://github.com/w3c/aria/issues/1404\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <button\n className={classNames(\n 'adyen-checkout__payment-method__header__title',\n ...classNameModifiers.map(modifier => `adyen-checkout-expand-button--${modifier}`)\n )}\n id={buttonId}\n role={'radio'}\n aria-checked={isSelected}\n aria-expanded={isSelected}\n aria-controls={expandContentId}\n type=\"button\"\n >\n {showRadioButton && (\n <span\n className={classNames({\n 'adyen-checkout__payment-method__radio': true,\n 'adyen-checkout__payment-method__radio--selected': isSelected\n })}\n aria-hidden=\"true\"\n />\n )}\n {children}\n </button>\n );\n}\n\nexport default ExpandButton;\n"],"names":["ExpandButton","buttonId","showRadioButton","isSelected","expandContentId","children","classNameModifiers","h","button","className","classNames","map","modifier","id","role","aria-checked","aria-expanded","aria-controls","type","span","aria-hidden"],"mappings":"kHAaA,SAASA,GAAaC,SAAEA,EAAQC,gBAAEA,EAAeC,WAAEA,EAAUC,gBAAEA,EAAeC,SAAEA,EAAQC,mBAAEA,EAAqB,KAC3G,OAGIC,EAACC,SAAAA,CACGC,UAAWC,EACP,mDACGJ,EAAmBK,KAAIC,GAAY,iCAAiCA,OAE3EC,GAAIZ,EACJa,KAAM,QACNC,eAAcZ,EACda,gBAAeb,EACfc,gBAAeb,EACfc,KAAK,UAEJhB,GACGK,EAACY,OAAAA,CACGV,UAAWC,EAAW,CAClB,yCAAyC,EACzC,kDAAmDP,IAEvDiB,cAAY,SAGnBf,EAGb"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../external/preact/dist/preact.js";import a from"../../../../external/classnames/index.js";import{ARIA_ERROR_SUFFIX as c,ARIA_CONTEXT_SUFFIX as n}from"../../../../core/Errors/constants.js";function t({classNameModifiers:t=[],label:o,isInvalid:s,onChange:r,...l}){const{uniqueId:i,showErrorElement:d,showContextualElement:m,...h}=l;return e("label",{className:"adyen-checkout__checkbox",htmlFor:i},e("input",{id:i,...h,...d&&{"aria-describedby":`${i}${c}`},...m&&{"aria-describedby":`${i}${n}`},className:a(["adyen-checkout__checkbox__input",[l.className],{"adyen-checkout__checkbox__input--invalid":s},t.map((e=>`adyen-checkout__input--${e}`))]),type:"checkbox",onChange:r}),e("span",{className:"adyen-checkout__checkbox__label"},o))}t.defaultProps={onChange:()=>{}};export{t as default};
1
+ import{createElement as e}from"../../../../external/preact/dist/preact.js";import a from"../../../../_virtual/index.js";import{ARIA_ERROR_SUFFIX as c,ARIA_CONTEXT_SUFFIX as t}from"../../../../core/Errors/constants.js";function o({classNameModifiers:o=[],label:n,isInvalid:r,onChange:s,...i}){const{uniqueId:l,showErrorElement:d,showContextualElement:u,..._}=i;return e("label",{className:"adyen-checkout__checkbox",htmlFor:l},e("input",{id:l,..._,...d&&{"aria-describedby":`${l}${c}`},...u&&{"aria-describedby":`${l}${t}`},className:a(["adyen-checkout__checkbox__input",[i.className],{"adyen-checkout__checkbox__input--invalid":r},o.map((e=>`adyen-checkout__input--${e}`))]),type:"checkbox",onChange:s}),e("span",{className:"adyen-checkout__checkbox__label"},n))}o.defaultProps={onChange:()=>{}};export{o as default};
2
2
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../../../../src/components/internal/FormFields/Checkbox/Checkbox.tsx"],"sourcesContent":["import { ComponentChild, h } from 'preact';\nimport cx from 'classnames';\nimport './Checkbox.scss';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\n\ninterface CheckboxProps {\n checked?: boolean;\n classNameModifiers?: string[];\n label?: string | ComponentChild;\n name?: string;\n isInvalid?: boolean;\n onChange?;\n onInput?;\n className?: string;\n value?: string;\n uniqueId?: string;\n showErrorElement?: boolean;\n showContextualElement?: boolean;\n}\n\nexport default function Checkbox({ classNameModifiers = [], label, isInvalid, onChange, ...props }: CheckboxProps) {\n // Strip some values from props. We need to reference them but don't want to set them as attributes.\n const { uniqueId: uid, showErrorElement, showContextualElement, ...newProps } = props;\n\n return (\n <label className=\"adyen-checkout__checkbox\" htmlFor={uid}>\n <input\n id={uid}\n {...newProps}\n {...(showErrorElement && { 'aria-describedby': `${uid}${ARIA_ERROR_SUFFIX}` })}\n {...(showContextualElement && { 'aria-describedby': `${uid}${ARIA_CONTEXT_SUFFIX}` })}\n className={cx([\n 'adyen-checkout__checkbox__input',\n [props.className],\n { 'adyen-checkout__checkbox__input--invalid': isInvalid },\n classNameModifiers.map(m => `adyen-checkout__input--${m}`)\n ])}\n type=\"checkbox\"\n onChange={onChange}\n />\n <span className=\"adyen-checkout__checkbox__label\">{label}</span>\n </label>\n );\n}\n\nCheckbox.defaultProps = {\n onChange: () => {}\n};\n"],"names":["Checkbox","classNameModifiers","label","isInvalid","onChange","props","uniqueId","uid","showErrorElement","showContextualElement","newProps","h","className","htmlFor","input","id","ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","cx","map","m","type","span","defaultProps"],"mappings":"qOAoBe,SAASA,GAASC,mBAAEA,EAAqB,GAAEC,MAAEA,EAAKC,UAAEA,EAASC,SAAEA,KAAaC,IAEvF,MAAQC,SAAUC,EAAGC,iBAAEA,EAAgBC,sBAAEA,KAA0BC,GAAaL,EAEhF,OACIM,EAACT,QAAAA,CAAMU,UAAU,2BAA2BC,QAASN,GACjDI,EAACG,QAAAA,CACGC,GAAIR,KACAG,KACCF,GAAoB,CAAE,mBAAoB,GAAGD,IAAMS,QACnDP,GAAyB,CAAE,mBAAoB,GAAGF,IAAMU,KAC7DL,UAAWM,EAAG,CACV,kCACA,CAACb,EAAMO,WACP,CAAE,2CAA4CT,GAC9CF,EAAmBkB,KAAIC,GAAK,0BAA0BA,QAE1DC,KAAK,WACLjB,SAAUA,IAEdO,EAACW,OAAAA,CAAKV,UAAU,mCAAmCV,GAG/D,CAEAF,EAASuB,aAAe,CACpBnB,SAAU"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../../../../src/components/internal/FormFields/Checkbox/Checkbox.tsx"],"sourcesContent":["import { ComponentChild, h } from 'preact';\nimport cx from 'classnames';\nimport './Checkbox.scss';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\n\ninterface CheckboxProps {\n checked?: boolean;\n classNameModifiers?: string[];\n label?: string | ComponentChild;\n name?: string;\n isInvalid?: boolean;\n onChange?;\n onInput?;\n className?: string;\n value?: string;\n uniqueId?: string;\n showErrorElement?: boolean;\n showContextualElement?: boolean;\n}\n\nexport default function Checkbox({ classNameModifiers = [], label, isInvalid, onChange, ...props }: CheckboxProps) {\n // Strip some values from props. We need to reference them but don't want to set them as attributes.\n const { uniqueId: uid, showErrorElement, showContextualElement, ...newProps } = props;\n\n return (\n <label className=\"adyen-checkout__checkbox\" htmlFor={uid}>\n <input\n id={uid}\n {...newProps}\n {...(showErrorElement && { 'aria-describedby': `${uid}${ARIA_ERROR_SUFFIX}` })}\n {...(showContextualElement && { 'aria-describedby': `${uid}${ARIA_CONTEXT_SUFFIX}` })}\n className={cx([\n 'adyen-checkout__checkbox__input',\n [props.className],\n { 'adyen-checkout__checkbox__input--invalid': isInvalid },\n classNameModifiers.map(m => `adyen-checkout__input--${m}`)\n ])}\n type=\"checkbox\"\n onChange={onChange}\n />\n <span className=\"adyen-checkout__checkbox__label\">{label}</span>\n </label>\n );\n}\n\nCheckbox.defaultProps = {\n onChange: () => {}\n};\n"],"names":["Checkbox","classNameModifiers","label","isInvalid","onChange","props","uniqueId","uid","showErrorElement","showContextualElement","newProps","h","className","htmlFor","input","id","ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","cx","map","m","type","span","defaultProps"],"mappings":"0NAoBe,SAASA,GAASC,mBAAEA,EAAqB,GAAEC,MAAEA,EAAKC,UAAEA,EAASC,SAAEA,KAAaC,IAEvF,MAAQC,SAAUC,EAAGC,iBAAEA,EAAgBC,sBAAEA,KAA0BC,GAAaL,EAEhF,OACIM,EAACT,QAAAA,CAAMU,UAAU,2BAA2BC,QAASN,GACjDI,EAACG,QAAAA,CACGC,GAAIR,KACAG,KACCF,GAAoB,CAAE,mBAAoB,GAAGD,IAAMS,QACnDP,GAAyB,CAAE,mBAAoB,GAAGF,IAAMU,KAC7DL,UAAWM,EAAG,CACV,kCACA,CAACb,EAAMO,WACP,CAAE,2CAA4CT,GAC9CF,EAAmBkB,KAAIC,GAAK,0BAA0BA,QAE1DC,KAAK,WACLjB,SAAUA,IAEdO,EAACW,OAAAA,CAAKV,UAAU,mCAAmCV,GAG/D,CAEAF,EAASuB,aAAe,CACpBnB,SAAU"}
@@ -1,2 +1,2 @@
1
- import e from"../../../../external/classnames/index.js";import{createElement as a,Fragment as n,toChildArray as t,cloneElement as l}from"../../../../external/preact/dist/preact.js";import o from"../../Spinner/Spinner.js";import i from"../../Icon/Icon.js";import{ARIA_ERROR_SUFFIX as r,ARIA_CONTEXT_SUFFIX as d}from"../../../../core/Errors/constants.js";import{useRef as s,useState as c,useCallback as u}from"../../../../external/preact/hooks/dist/hooks.js";import{getUniqueId as m}from"../../../../utils/idGenerator.js";import{PREFIX as p}from"../../Icon/constants.js";const h=h=>{const{children:_,className:f,classNameModifiers:y,dir:k,disabled:b,readOnly:x,errorMessage:v,helper:E,inputWrapperModifiers:N,isLoading:F,isValid:g,label:L,labelEndAdornment:$,name:j,onBlur:w,onFieldBlur:I,onFocus:A,onFocusField:S,showValidIcon:T,useLabelElement:C,showErrorElement:M,showContextualElement:V,contextualText:q,filled:B,focused:H,i18n:R,contextVisibleToScreenReader:W,renderAlternativeToLabel:z}=h,G=W??!0,O=M&&"string"==typeof v&&v.length>0,P=V&&!O&&q?.length>0,D=s(m(`adyen-checkout-${j}`)),[J,K]=c(!1),[Q,U]=c(!1);null!=H&&K(!!H),null!=B&&U(!!B);const X=u((e=>{K(!0),A?.(e)}),[A]),Y=u((e=>{K(!1),w?.(e),I?.(e)}),[w,I]),Z=u((()=>a(n,null,"string"==typeof L&&a("span",{className:e({"adyen-checkout__label__text":!0,"adyen-checkout__label__text--error":v}),"data-id":j},L),"function"==typeof L&&L(),$&&a("span",{className:"adyen-checkout__label-adornment--end"},$),E&&a("span",{className:"adyen-checkout__helper-text"},E))),[L,v,$,E]),ee=u((()=>{const s=a("span",{className:e({"adyen-checkout-contextual-text--error":!0,"adyen-checkout-contextual-text--hidden":!O}),...G&&{id:`${D.current}${r}`},"aria-hidden":G?null:"true"},v),c=a("span",{className:e({"adyen-checkout-contextual-text":!0,"adyen-checkout-contextual-text--hidden":!P}),...G&&{id:`${D.current}${d}`},"aria-hidden":G?null:"true"},q);return a(n,null,a("div",{className:e(["adyen-checkout__input-wrapper",...N.map((e=>`adyen-checkout__input-wrapper--${e}`))]),dir:k},t(_).map((e=>{const a={isValid:g,onFocusHandler:X,onBlurHandler:Y,isInvalid:!!v,...j&&{uniqueId:D.current},showErrorElement:M};return l(e,a)})),F&&a("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--loading"},a(o,{size:"small"})),g&&!1!==T&&a("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--valid"},a(i,{type:`${p}checkmark`,alt:R?.get("field.valid")})),v&&a("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--invalid"},a(i,{type:`${p}field_error`,alt:R?.get("error.title")}))),s,c)}),[_,v,q,F,g,X,Y]),ae=u((({onFocusField:n,focused:t,filled:l,disabled:o,name:i,uniqueId:r,useLabelElement:d,isSecuredField:s,children:c,renderAlternativeToLabel:u})=>{const m={onClick:n,className:e({"adyen-checkout__label":!0,"adyen-checkout__label--focused":t,"adyen-checkout__label--filled":l,"adyen-checkout__label--disabled":o})};return d?a("label",{...m,...!s&&i&&{htmlFor:r}},c):u(m,c,r)}),[]);return a("div",{className:e("adyen-checkout__field",f,y.map((e=>`adyen-checkout__field--${e}`)),{"adyen-checkout__field--error":v,"adyen-checkout__field--valid":g,"adyen-checkout__field--inactive":x||b})},a(ae,{onFocusField:S,name:j,disabled:b,filled:Q,focused:J,useLabelElement:C,uniqueId:D.current,isSecuredField:!G,renderAlternativeToLabel:z},Z()),ee())};h.defaultProps={className:"",classNameModifiers:[],inputWrapperModifiers:[],useLabelElement:!0,showErrorElement:!0,showContextualElement:!0,renderAlternativeToLabel:()=>null};export{h as default};
1
+ import e from"../../../../_virtual/index.js";import{createElement as a,Fragment as n,toChildArray as t,cloneElement as l}from"../../../../external/preact/dist/preact.js";import i from"../../Spinner/Spinner.js";import o from"../../Icon/Icon.js";import{ARIA_ERROR_SUFFIX as r,ARIA_CONTEXT_SUFFIX as d}from"../../../../core/Errors/constants.js";import{useRef as c,useState as s,useCallback as u}from"../../../../external/preact/hooks/dist/hooks.js";import{getUniqueId as m}from"../../../../utils/idGenerator.js";import{PREFIX as p}from"../../Icon/constants.js";const _=_=>{const{children:h,className:f,classNameModifiers:y,dir:k,disabled:b,readOnly:x,errorMessage:v,helper:E,inputWrapperModifiers:N,isLoading:F,isValid:g,label:L,labelEndAdornment:$,name:j,onBlur:w,onFieldBlur:I,onFocus:A,onFocusField:S,showValidIcon:T,useLabelElement:C,showErrorElement:M,showContextualElement:V,contextualText:q,filled:B,focused:H,i18n:R,contextVisibleToScreenReader:W,renderAlternativeToLabel:z}=_,G=W??!0,O=M&&"string"==typeof v&&v.length>0,P=V&&!O&&q?.length>0,D=c(m(`adyen-checkout-${j}`)),[J,K]=s(!1),[Q,U]=s(!1);null!=H&&K(!!H),null!=B&&U(!!B);const X=u((e=>{K(!0),A?.(e)}),[A]),Y=u((e=>{K(!1),w?.(e),I?.(e)}),[w,I]),Z=u((()=>a(n,null,"string"==typeof L&&a("span",{className:e({"adyen-checkout__label__text":!0,"adyen-checkout__label__text--error":v}),"data-id":j},L),"function"==typeof L&&L(),$&&a("span",{className:"adyen-checkout__label-adornment--end"},$),E&&a("span",{className:"adyen-checkout__helper-text"},E))),[L,v,$,E]),ee=u((()=>{const c=a("span",{className:e({"adyen-checkout-contextual-text--error":!0,"adyen-checkout-contextual-text--hidden":!O}),...G&&{id:`${D.current}${r}`},"aria-hidden":G?null:"true"},v),s=a("span",{className:e({"adyen-checkout-contextual-text":!0,"adyen-checkout-contextual-text--hidden":!P}),...G&&{id:`${D.current}${d}`},"aria-hidden":G?null:"true"},q);return a(n,null,a("div",{className:e(["adyen-checkout__input-wrapper",...N.map((e=>`adyen-checkout__input-wrapper--${e}`))]),dir:k},t(h).map((e=>{const a={isValid:g,onFocusHandler:X,onBlurHandler:Y,isInvalid:!!v,...j&&{uniqueId:D.current},showErrorElement:M};return l(e,a)})),F&&a("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--loading"},a(i,{size:"small"})),g&&!1!==T&&a("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--valid"},a(o,{type:`${p}checkmark`,alt:R?.get("field.valid")})),v&&a("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--invalid"},a(o,{type:`${p}field_error`,alt:R?.get("error.title")}))),c,s)}),[h,v,q,F,g,X,Y]),ae=u((({onFocusField:n,focused:t,filled:l,disabled:i,name:o,uniqueId:r,useLabelElement:d,isSecuredField:c,children:s,renderAlternativeToLabel:u})=>{const m={onClick:n,className:e({"adyen-checkout__label":!0,"adyen-checkout__label--focused":t,"adyen-checkout__label--filled":l,"adyen-checkout__label--disabled":i})};return d?a("label",{...m,...!c&&o&&{htmlFor:r}},s):u(m,s,r)}),[]);return a("div",{className:e("adyen-checkout__field",f,y.map((e=>`adyen-checkout__field--${e}`)),{"adyen-checkout__field--error":v,"adyen-checkout__field--valid":g,"adyen-checkout__field--inactive":x||b})},a(ae,{onFocusField:S,name:j,disabled:b,filled:Q,focused:J,useLabelElement:C,uniqueId:D.current,isSecuredField:!G,renderAlternativeToLabel:z},Z()),ee())};_.defaultProps={className:"",classNameModifiers:[],inputWrapperModifiers:[],useLabelElement:!0,showErrorElement:!0,showContextualElement:!0,renderAlternativeToLabel:()=>null};export{_ as default};
2
2
  //# sourceMappingURL=Field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sources":["../../../../../../src/components/internal/FormFields/Field/Field.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { cloneElement, ComponentChild, Fragment, FunctionalComponent, h, toChildArray, VNode } from 'preact';\nimport Spinner from '../../Spinner';\nimport Icon from '../../Icon';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\nimport { useCallback, useRef, useState } from 'preact/hooks';\nimport { getUniqueId } from '../../../../utils/idGenerator';\nimport { FieldProps } from './types';\nimport './Field.scss';\nimport { PREFIX } from '../../Icon/constants';\n\nconst Field: FunctionalComponent<FieldProps> = props => {\n //\n const {\n children,\n className,\n classNameModifiers,\n dir,\n disabled,\n readOnly,\n errorMessage,\n helper,\n inputWrapperModifiers,\n isLoading,\n isValid,\n label,\n labelEndAdornment,\n name,\n onBlur,\n onFieldBlur,\n onFocus,\n // onFocusField is a securedField related function that allows a label click to set focus on a securedField (equates to CardInput setFocusOn)\n // TODO should rename it to make its purpose clear => setFocusOnSecuredField\n onFocusField,\n showValidIcon,\n useLabelElement,\n showErrorElement,\n showContextualElement,\n contextualText,\n // Redeclare prop names to avoid internal clashes\n filled: propsFilled,\n focused: propsFocused,\n i18n,\n contextVisibleToScreenReader,\n renderAlternativeToLabel\n } = props;\n\n // Controls whether any error element has an aria-hidden=\"true\" attr (which means it is the error for a securedField)\n // or whether it has an id attr that can be pointed to by an aria-describedby attr on an input element\n const contextVisibleToSR = contextVisibleToScreenReader ?? true;\n const showError = showErrorElement && typeof errorMessage === 'string' && errorMessage.length > 0;\n const showContext = showContextualElement && !showError && contextualText?.length > 0;\n\n const uniqueId = useRef(getUniqueId(`adyen-checkout-${name}`));\n const [focused, setFocused] = useState(false);\n const [filled, setFilled] = useState(false);\n\n // The means by which focussed/filled is set for securedFields\n if (propsFocused != null) setFocused(!!propsFocused);\n if (propsFilled != null) setFilled(!!propsFilled);\n\n // The means by which focussed/filled is set for other fields - this function is passed down to them and triggered\n const onFocusHandler = useCallback(\n (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n setFocused(true);\n onFocus?.(event);\n },\n [onFocus]\n );\n\n const onBlurHandler = useCallback(\n (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n // When we also need to fire a specific function when a field blurs // TODO - what is the use case?\n onFieldBlur?.(event);\n },\n [onBlur, onFieldBlur]\n );\n\n const renderLabelOrAlternativeContents = useCallback(() => {\n return (\n <Fragment>\n {typeof label === 'string' && (\n <span\n className={classNames({\n 'adyen-checkout__label__text': true,\n 'adyen-checkout__label__text--error': errorMessage\n })}\n data-id={name}\n >\n {label}\n </span>\n )}\n\n {/*TODO - in what scenario is label a function? */}\n {/*@ts-ignore - function is callable*/}\n {typeof label === 'function' && label()}\n\n {labelEndAdornment && <span className=\"adyen-checkout__label-adornment--end\">{labelEndAdornment}</span>}\n\n {helper && <span className={'adyen-checkout__helper-text'}>{helper}</span>}\n </Fragment>\n );\n }, [label, errorMessage, labelEndAdornment, helper]);\n\n const renderInputRelatedElements = useCallback(() => {\n const errorElem = (\n <span\n className={classNames({ 'adyen-checkout-contextual-text--error': true, 'adyen-checkout-contextual-text--hidden': !showError })}\n {...(contextVisibleToSR && { id: `${uniqueId.current}${ARIA_ERROR_SUFFIX}` })}\n aria-hidden={contextVisibleToSR ? null : 'true'}\n >\n {errorMessage}\n </span>\n );\n const contextualElem = (\n <span\n className={classNames({ 'adyen-checkout-contextual-text': true, 'adyen-checkout-contextual-text--hidden': !showContext })}\n {...(contextVisibleToSR && { id: `${uniqueId.current}${ARIA_CONTEXT_SUFFIX}` })}\n aria-hidden={contextVisibleToSR ? null : 'true'}\n >\n {contextualText}\n </span>\n );\n\n return (\n <Fragment>\n <div\n className={classNames([\n 'adyen-checkout__input-wrapper',\n ...inputWrapperModifiers.map(m => `adyen-checkout__input-wrapper--${m}`)\n ])}\n dir={dir}\n >\n {toChildArray(children).map((child: ComponentChild): ComponentChild => {\n const childProps = {\n isValid,\n onFocusHandler,\n onBlurHandler,\n isInvalid: !!errorMessage,\n ...(name && { uniqueId: uniqueId.current }),\n showErrorElement: showErrorElement\n };\n return cloneElement(child as VNode, childProps);\n })}\n\n {isLoading && (\n <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--loading\">\n <Spinner size=\"small\" />\n </span>\n )}\n\n {isValid && showValidIcon !== false && (\n <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--valid\">\n <Icon type={`${PREFIX}checkmark`} alt={i18n?.get('field.valid')} />\n </span>\n )}\n\n {errorMessage && (\n <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--invalid\">\n <Icon type={`${PREFIX}field_error`} alt={i18n?.get('error.title')} />\n </span>\n )}\n </div>\n {errorElem}\n {contextualElem}\n </Fragment>\n );\n }, [children, errorMessage, contextualText, isLoading, isValid, onFocusHandler, onBlurHandler]);\n\n /**\n * Use cases:\n * - Not all form controls want/need a label e.g. many checkboxes describe what they are in their own markup and don't need the wrapping Field to also generate a labelling element\n * - securedFields *can't* have a label (screen-reader's can make the association, over different browser contexts, between the label and the input)\n */\n const LabelOrAlternative = useCallback(\n ({ onFocusField, focused, filled, disabled, name, uniqueId, useLabelElement, isSecuredField, children, renderAlternativeToLabel }) => {\n const defaultWrapperProps = {\n onClick: onFocusField,\n className: classNames({\n 'adyen-checkout__label': true,\n 'adyen-checkout__label--focused': focused,\n 'adyen-checkout__label--filled': filled,\n 'adyen-checkout__label--disabled': disabled\n })\n };\n\n return useLabelElement ? (\n // if we are NOT dealing with the label for a securedField... we can give it a `for` attribute\n <label {...defaultWrapperProps} {...(!isSecuredField && name && { htmlFor: uniqueId })}>\n {children}\n </label>\n ) : (\n renderAlternativeToLabel(defaultWrapperProps, children, uniqueId) // defaults to null\n\n // Example usage:\n // const alternativeLabelContent = (defaultWrapperProps, children, uniqueId) => {\n // return (\n // <div {...defaultWrapperProps} role={'label'} htmlFor={uniqueId}>\n // {children}\n // </div>\n // );\n // };\n // <Field name={'myField'} useLabelElement={false} renderAlternativeToLabel={alternativeLabelContent}>\n );\n },\n []\n );\n\n /**\n * RENDER\n */\n return (\n <div\n className={classNames(\n 'adyen-checkout__field',\n className,\n classNameModifiers.map(m => `adyen-checkout__field--${m}`),\n {\n 'adyen-checkout__field--error': errorMessage,\n 'adyen-checkout__field--valid': isValid,\n 'adyen-checkout__field--inactive': readOnly || disabled\n }\n )}\n >\n <LabelOrAlternative\n onFocusField={onFocusField}\n name={name}\n disabled={disabled}\n filled={filled}\n focused={focused}\n useLabelElement={useLabelElement}\n uniqueId={uniqueId.current}\n isSecuredField={!contextVisibleToSR}\n renderAlternativeToLabel={renderAlternativeToLabel}\n >\n {renderLabelOrAlternativeContents()}\n </LabelOrAlternative>\n {renderInputRelatedElements()}\n </div>\n );\n};\n\nField.defaultProps = {\n className: '',\n classNameModifiers: [],\n inputWrapperModifiers: [],\n useLabelElement: true,\n showErrorElement: true,\n showContextualElement: true,\n renderAlternativeToLabel: () => null\n};\n\nexport default Field;\n"],"names":["Field","props","children","className","classNameModifiers","dir","disabled","readOnly","errorMessage","helper","inputWrapperModifiers","isLoading","isValid","label","labelEndAdornment","name","onBlur","onFieldBlur","onFocus","onFocusField","showValidIcon","useLabelElement","showErrorElement","showContextualElement","contextualText","filled","propsFilled","focused","propsFocused","i18n","contextVisibleToScreenReader","renderAlternativeToLabel","contextVisibleToSR","showError","length","showContext","uniqueId","useRef","getUniqueId","setFocused","useState","setFilled","onFocusHandler","useCallback","event","onBlurHandler","renderLabelOrAlternativeContents","h","Fragment","span","classNames","data-id","renderInputRelatedElements","errorElem","id","current","ARIA_ERROR_SUFFIX","aria-hidden","contextualElem","ARIA_CONTEXT_SUFFIX","div","map","m","toChildArray","child","childProps","isInvalid","cloneElement","Spinner","size","Icon","type","PREFIX","alt","get","LabelOrAlternative","isSecuredField","defaultWrapperProps","onClick","htmlFor","defaultProps"],"mappings":"yjBAWA,MAAMA,EAAyCC,IAE3C,MAAMC,SACFA,EAAQC,UACRA,EAASC,mBACTA,EAAkBC,IAClBA,EAAGC,SACHA,EAAQC,SACRA,EAAQC,aACRA,EAAYC,OACZA,EAAMC,sBACNA,EAAqBC,UACrBA,EAASC,QACTA,EAAOC,MACPA,EAAKC,kBACLA,EAAiBC,KACjBA,EAAIC,OACJA,EAAMC,YACNA,EAAWC,QACXA,EAAOC,aAGPA,EAAYC,cACZA,EAAaC,gBACbA,EAAeC,iBACfA,EAAgBC,sBAChBA,EAAqBC,eACrBA,EAEAC,OAAQC,EACRC,QAASC,EAAYC,KACrBA,EAAIC,6BACJA,EAA4BC,yBAC5BA,GACA9B,EAIE+B,EAAqBF,IAAgC,EACrDG,EAAYX,GAA4C,iBAAjBd,GAA6BA,EAAa0B,OAAS,EAC1FC,EAAcZ,IAA0BU,GAAaT,GAAgBU,OAAS,EAE9EE,EAAWC,EAAOC,EAAY,kBAAkBvB,OAC/CY,EAASY,GAAcC,GAAS,IAChCf,EAAQgB,GAAaD,GAAS,GAGjB,MAAhBZ,GAAsBW,IAAaX,GACpB,MAAfF,GAAqBe,IAAYf,GAGrC,MAAMgB,EAAiBC,GAClBC,IACGL,GAAW,GACXrB,IAAU0B,EAAAA,GAEd,CAAC1B,IAGC2B,EAAgBF,GACjBC,IACGL,GAAW,GACXvB,IAAS4B,GAET3B,IAAc2B,EAAAA,GAElB,CAAC5B,EAAQC,IAGP6B,EAAmCH,GAAY,IAE7CI,EAACC,EAAAA,KACqB,iBAAVnC,GACJkC,EAACE,OAAAA,CACG9C,UAAW+C,EAAW,CAClB,+BAA+B,EAC/B,qCAAsC1C,IAE1C2C,UAASpC,GAERF,GAMS,mBAAVA,GAAwBA,IAE/BC,GAAqBiC,EAACE,OAAAA,CAAK9C,UAAU,wCAAwCW,GAE7EL,GAAUsC,EAACE,OAAAA,CAAK9C,UAAW,+BAAgCM,KAGrE,CAACI,EAAOL,EAAcM,EAAmBL,IAEtC2C,GAA6BT,GAAY,KAC3C,MAAMU,EACFN,EAACE,OAAAA,CACG9C,UAAW+C,EAAW,CAAE,yCAAyC,EAAM,0CAA2CjB,OAC7GD,GAAsB,CAAEsB,GAAI,GAAGlB,EAASmB,UAAUC,KACvDC,cAAazB,EAAqB,KAAO,QAExCxB,GAGHkD,EACFX,EAACE,OAAAA,CACG9C,UAAW+C,EAAW,CAAE,kCAAkC,EAAM,0CAA2Cf,OACtGH,GAAsB,CAAEsB,GAAI,GAAGlB,EAASmB,UAAUI,KACvDF,cAAazB,EAAqB,KAAO,QAExCR,GAIT,OACIuB,EAACC,OACGD,EAACa,MAAAA,CACGzD,UAAW+C,EAAW,CAClB,mCACGxC,EAAsBmD,KAAIC,GAAK,kCAAkCA,QAExEzD,IAAKA,GAEJ0D,EAAa7D,GAAU2D,KAAKG,IACzB,MAAMC,EAAa,CACfrD,UACA8B,iBACAG,gBACAqB,YAAa1D,KACTO,GAAQ,CAAEqB,SAAUA,EAASmB,SACjCjC,iBAAkBA,GAEtB,OAAO6C,EAAaH,EAAgBC,EAAAA,IAGvCtD,GACGoC,EAACE,OAAAA,CAAK9C,UAAU,4FACZ4C,EAACqB,EAAAA,CAAQC,KAAK,WAIrBzD,IAA6B,IAAlBQ,GACR2B,EAACE,OAAAA,CAAK9C,UAAU,0FACZ4C,EAACuB,EAAAA,CAAKC,KAAM,GAAGC,aAAmBC,IAAK5C,GAAM6C,IAAI,kBAIxDlE,GACGuC,EAACE,OAAAA,CAAK9C,UAAU,4FACZ4C,EAACuB,EAAAA,CAAKC,KAAM,GAAGC,eAAqBC,IAAK5C,GAAM6C,IAAI,mBAI9DrB,EACAK,EAAAA,GAGV,CAACxD,EAAUM,EAAcgB,EAAgBb,EAAWC,EAAS8B,EAAgBG,IAO1E8B,GAAqBhC,GACvB,EAAGxB,eAAcQ,UAASF,SAAQnB,WAAUS,OAAMqB,WAAUf,kBAAiBuD,iBAAgB1E,WAAU6B,+BACnG,MAAM8C,EAAsB,CACxBC,QAAS3D,EACThB,UAAW+C,EAAW,CAClB,yBAAyB,EACzB,iCAAkCvB,EAClC,gCAAiCF,EACjC,kCAAmCnB,KAI3C,OAAOe,EAEH0B,EAAClC,QAAAA,IAAUgE,MAA2BD,GAAkB7D,GAAQ,CAAEgE,QAAS3C,IACtElC,GAGL6B,EAAyB8C,EAAqB3E,EAAUkC,KAahE,IAMJ,OACIW,EAACa,MAAAA,CACGzD,UAAW+C,EACP,wBACA/C,EACAC,EAAmByD,KAAIC,GAAK,0BAA0BA,MACtD,CACI,+BAAgCtD,EAChC,+BAAgCI,EAChC,kCAAmCL,GAAYD,KAIvDyC,EAAC4B,GAAAA,CACGxD,aAAcA,EACdJ,KAAMA,EACNT,SAAUA,EACVmB,OAAQA,EACRE,QAASA,EACTN,gBAAiBA,EACjBe,SAAUA,EAASmB,QACnBqB,gBAAiB5C,EACjBD,yBAA0BA,GAEzBe,KAEJM,KAAAA,EAKbpD,EAAMgF,aAAe,CACjB7E,UAAW,GACXC,mBAAoB,GACpBM,sBAAuB,GACvBW,iBAAiB,EACjBC,kBAAkB,EAClBC,uBAAuB,EACvBQ,yBAA0B,IAAM"}
1
+ {"version":3,"file":"Field.js","sources":["../../../../../../src/components/internal/FormFields/Field/Field.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { cloneElement, ComponentChild, Fragment, FunctionalComponent, h, toChildArray, VNode } from 'preact';\nimport Spinner from '../../Spinner';\nimport Icon from '../../Icon';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\nimport { useCallback, useRef, useState } from 'preact/hooks';\nimport { getUniqueId } from '../../../../utils/idGenerator';\nimport { FieldProps } from './types';\nimport './Field.scss';\nimport { PREFIX } from '../../Icon/constants';\n\nconst Field: FunctionalComponent<FieldProps> = props => {\n //\n const {\n children,\n className,\n classNameModifiers,\n dir,\n disabled,\n readOnly,\n errorMessage,\n helper,\n inputWrapperModifiers,\n isLoading,\n isValid,\n label,\n labelEndAdornment,\n name,\n onBlur,\n onFieldBlur,\n onFocus,\n // onFocusField is a securedField related function that allows a label click to set focus on a securedField (equates to CardInput setFocusOn)\n // TODO should rename it to make its purpose clear => setFocusOnSecuredField\n onFocusField,\n showValidIcon,\n useLabelElement,\n showErrorElement,\n showContextualElement,\n contextualText,\n // Redeclare prop names to avoid internal clashes\n filled: propsFilled,\n focused: propsFocused,\n i18n,\n contextVisibleToScreenReader,\n renderAlternativeToLabel\n } = props;\n\n // Controls whether any error element has an aria-hidden=\"true\" attr (which means it is the error for a securedField)\n // or whether it has an id attr that can be pointed to by an aria-describedby attr on an input element\n const contextVisibleToSR = contextVisibleToScreenReader ?? true;\n const showError = showErrorElement && typeof errorMessage === 'string' && errorMessage.length > 0;\n const showContext = showContextualElement && !showError && contextualText?.length > 0;\n\n const uniqueId = useRef(getUniqueId(`adyen-checkout-${name}`));\n const [focused, setFocused] = useState(false);\n const [filled, setFilled] = useState(false);\n\n // The means by which focussed/filled is set for securedFields\n if (propsFocused != null) setFocused(!!propsFocused);\n if (propsFilled != null) setFilled(!!propsFilled);\n\n // The means by which focussed/filled is set for other fields - this function is passed down to them and triggered\n const onFocusHandler = useCallback(\n (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n setFocused(true);\n onFocus?.(event);\n },\n [onFocus]\n );\n\n const onBlurHandler = useCallback(\n (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n // When we also need to fire a specific function when a field blurs // TODO - what is the use case?\n onFieldBlur?.(event);\n },\n [onBlur, onFieldBlur]\n );\n\n const renderLabelOrAlternativeContents = useCallback(() => {\n return (\n <Fragment>\n {typeof label === 'string' && (\n <span\n className={classNames({\n 'adyen-checkout__label__text': true,\n 'adyen-checkout__label__text--error': errorMessage\n })}\n data-id={name}\n >\n {label}\n </span>\n )}\n\n {/*TODO - in what scenario is label a function? */}\n {/*@ts-ignore - function is callable*/}\n {typeof label === 'function' && label()}\n\n {labelEndAdornment && <span className=\"adyen-checkout__label-adornment--end\">{labelEndAdornment}</span>}\n\n {helper && <span className={'adyen-checkout__helper-text'}>{helper}</span>}\n </Fragment>\n );\n }, [label, errorMessage, labelEndAdornment, helper]);\n\n const renderInputRelatedElements = useCallback(() => {\n const errorElem = (\n <span\n className={classNames({ 'adyen-checkout-contextual-text--error': true, 'adyen-checkout-contextual-text--hidden': !showError })}\n {...(contextVisibleToSR && { id: `${uniqueId.current}${ARIA_ERROR_SUFFIX}` })}\n aria-hidden={contextVisibleToSR ? null : 'true'}\n >\n {errorMessage}\n </span>\n );\n const contextualElem = (\n <span\n className={classNames({ 'adyen-checkout-contextual-text': true, 'adyen-checkout-contextual-text--hidden': !showContext })}\n {...(contextVisibleToSR && { id: `${uniqueId.current}${ARIA_CONTEXT_SUFFIX}` })}\n aria-hidden={contextVisibleToSR ? null : 'true'}\n >\n {contextualText}\n </span>\n );\n\n return (\n <Fragment>\n <div\n className={classNames([\n 'adyen-checkout__input-wrapper',\n ...inputWrapperModifiers.map(m => `adyen-checkout__input-wrapper--${m}`)\n ])}\n dir={dir}\n >\n {toChildArray(children).map((child: ComponentChild): ComponentChild => {\n const childProps = {\n isValid,\n onFocusHandler,\n onBlurHandler,\n isInvalid: !!errorMessage,\n ...(name && { uniqueId: uniqueId.current }),\n showErrorElement: showErrorElement\n };\n return cloneElement(child as VNode, childProps);\n })}\n\n {isLoading && (\n <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--loading\">\n <Spinner size=\"small\" />\n </span>\n )}\n\n {isValid && showValidIcon !== false && (\n <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--valid\">\n <Icon type={`${PREFIX}checkmark`} alt={i18n?.get('field.valid')} />\n </span>\n )}\n\n {errorMessage && (\n <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--invalid\">\n <Icon type={`${PREFIX}field_error`} alt={i18n?.get('error.title')} />\n </span>\n )}\n </div>\n {errorElem}\n {contextualElem}\n </Fragment>\n );\n }, [children, errorMessage, contextualText, isLoading, isValid, onFocusHandler, onBlurHandler]);\n\n /**\n * Use cases:\n * - Not all form controls want/need a label e.g. many checkboxes describe what they are in their own markup and don't need the wrapping Field to also generate a labelling element\n * - securedFields *can't* have a label (screen-reader's can make the association, over different browser contexts, between the label and the input)\n */\n const LabelOrAlternative = useCallback(\n ({ onFocusField, focused, filled, disabled, name, uniqueId, useLabelElement, isSecuredField, children, renderAlternativeToLabel }) => {\n const defaultWrapperProps = {\n onClick: onFocusField,\n className: classNames({\n 'adyen-checkout__label': true,\n 'adyen-checkout__label--focused': focused,\n 'adyen-checkout__label--filled': filled,\n 'adyen-checkout__label--disabled': disabled\n })\n };\n\n return useLabelElement ? (\n // if we are NOT dealing with the label for a securedField... we can give it a `for` attribute\n <label {...defaultWrapperProps} {...(!isSecuredField && name && { htmlFor: uniqueId })}>\n {children}\n </label>\n ) : (\n renderAlternativeToLabel(defaultWrapperProps, children, uniqueId) // defaults to null\n\n // Example usage:\n // const alternativeLabelContent = (defaultWrapperProps, children, uniqueId) => {\n // return (\n // <div {...defaultWrapperProps} role={'label'} htmlFor={uniqueId}>\n // {children}\n // </div>\n // );\n // };\n // <Field name={'myField'} useLabelElement={false} renderAlternativeToLabel={alternativeLabelContent}>\n );\n },\n []\n );\n\n /**\n * RENDER\n */\n return (\n <div\n className={classNames(\n 'adyen-checkout__field',\n className,\n classNameModifiers.map(m => `adyen-checkout__field--${m}`),\n {\n 'adyen-checkout__field--error': errorMessage,\n 'adyen-checkout__field--valid': isValid,\n 'adyen-checkout__field--inactive': readOnly || disabled\n }\n )}\n >\n <LabelOrAlternative\n onFocusField={onFocusField}\n name={name}\n disabled={disabled}\n filled={filled}\n focused={focused}\n useLabelElement={useLabelElement}\n uniqueId={uniqueId.current}\n isSecuredField={!contextVisibleToSR}\n renderAlternativeToLabel={renderAlternativeToLabel}\n >\n {renderLabelOrAlternativeContents()}\n </LabelOrAlternative>\n {renderInputRelatedElements()}\n </div>\n );\n};\n\nField.defaultProps = {\n className: '',\n classNameModifiers: [],\n inputWrapperModifiers: [],\n useLabelElement: true,\n showErrorElement: true,\n showContextualElement: true,\n renderAlternativeToLabel: () => null\n};\n\nexport default Field;\n"],"names":["Field","props","children","className","classNameModifiers","dir","disabled","readOnly","errorMessage","helper","inputWrapperModifiers","isLoading","isValid","label","labelEndAdornment","name","onBlur","onFieldBlur","onFocus","onFocusField","showValidIcon","useLabelElement","showErrorElement","showContextualElement","contextualText","filled","propsFilled","focused","propsFocused","i18n","contextVisibleToScreenReader","renderAlternativeToLabel","contextVisibleToSR","showError","length","showContext","uniqueId","useRef","getUniqueId","setFocused","useState","setFilled","onFocusHandler","useCallback","event","onBlurHandler","renderLabelOrAlternativeContents","h","Fragment","span","classNames","data-id","renderInputRelatedElements","errorElem","id","current","ARIA_ERROR_SUFFIX","aria-hidden","contextualElem","ARIA_CONTEXT_SUFFIX","div","map","m","toChildArray","child","childProps","isInvalid","cloneElement","Spinner","size","Icon","type","PREFIX","alt","get","LabelOrAlternative","isSecuredField","defaultWrapperProps","onClick","htmlFor","defaultProps"],"mappings":"8iBAWA,MAAMA,EAAyCC,IAE3C,MAAMC,SACFA,EAAQC,UACRA,EAASC,mBACTA,EAAkBC,IAClBA,EAAGC,SACHA,EAAQC,SACRA,EAAQC,aACRA,EAAYC,OACZA,EAAMC,sBACNA,EAAqBC,UACrBA,EAASC,QACTA,EAAOC,MACPA,EAAKC,kBACLA,EAAiBC,KACjBA,EAAIC,OACJA,EAAMC,YACNA,EAAWC,QACXA,EAAOC,aAGPA,EAAYC,cACZA,EAAaC,gBACbA,EAAeC,iBACfA,EAAgBC,sBAChBA,EAAqBC,eACrBA,EAEAC,OAAQC,EACRC,QAASC,EAAYC,KACrBA,EAAIC,6BACJA,EAA4BC,yBAC5BA,GACA9B,EAIE+B,EAAqBF,IAAgC,EACrDG,EAAYX,GAA4C,iBAAjBd,GAA6BA,EAAa0B,OAAS,EAC1FC,EAAcZ,IAA0BU,GAAaT,GAAgBU,OAAS,EAE9EE,EAAWC,EAAOC,EAAY,kBAAkBvB,OAC/CY,EAASY,GAAcC,GAAS,IAChCf,EAAQgB,GAAaD,GAAS,GAGjB,MAAhBZ,GAAsBW,IAAaX,GACpB,MAAfF,GAAqBe,IAAYf,GAGrC,MAAMgB,EAAiBC,GAClBC,IACGL,GAAW,GACXrB,IAAU0B,EAAAA,GAEd,CAAC1B,IAGC2B,EAAgBF,GACjBC,IACGL,GAAW,GACXvB,IAAS4B,GAET3B,IAAc2B,EAAAA,GAElB,CAAC5B,EAAQC,IAGP6B,EAAmCH,GAAY,IAE7CI,EAACC,EAAAA,KACqB,iBAAVnC,GACJkC,EAACE,OAAAA,CACG9C,UAAW+C,EAAW,CAClB,+BAA+B,EAC/B,qCAAsC1C,IAE1C2C,UAASpC,GAERF,GAMS,mBAAVA,GAAwBA,IAE/BC,GAAqBiC,EAACE,OAAAA,CAAK9C,UAAU,wCAAwCW,GAE7EL,GAAUsC,EAACE,OAAAA,CAAK9C,UAAW,+BAAgCM,KAGrE,CAACI,EAAOL,EAAcM,EAAmBL,IAEtC2C,GAA6BT,GAAY,KAC3C,MAAMU,EACFN,EAACE,OAAAA,CACG9C,UAAW+C,EAAW,CAAE,yCAAyC,EAAM,0CAA2CjB,OAC7GD,GAAsB,CAAEsB,GAAI,GAAGlB,EAASmB,UAAUC,KACvDC,cAAazB,EAAqB,KAAO,QAExCxB,GAGHkD,EACFX,EAACE,OAAAA,CACG9C,UAAW+C,EAAW,CAAE,kCAAkC,EAAM,0CAA2Cf,OACtGH,GAAsB,CAAEsB,GAAI,GAAGlB,EAASmB,UAAUI,KACvDF,cAAazB,EAAqB,KAAO,QAExCR,GAIT,OACIuB,EAACC,OACGD,EAACa,MAAAA,CACGzD,UAAW+C,EAAW,CAClB,mCACGxC,EAAsBmD,KAAIC,GAAK,kCAAkCA,QAExEzD,IAAKA,GAEJ0D,EAAa7D,GAAU2D,KAAKG,IACzB,MAAMC,EAAa,CACfrD,UACA8B,iBACAG,gBACAqB,YAAa1D,KACTO,GAAQ,CAAEqB,SAAUA,EAASmB,SACjCjC,iBAAkBA,GAEtB,OAAO6C,EAAaH,EAAgBC,EAAAA,IAGvCtD,GACGoC,EAACE,OAAAA,CAAK9C,UAAU,4FACZ4C,EAACqB,EAAAA,CAAQC,KAAK,WAIrBzD,IAA6B,IAAlBQ,GACR2B,EAACE,OAAAA,CAAK9C,UAAU,0FACZ4C,EAACuB,EAAAA,CAAKC,KAAM,GAAGC,aAAmBC,IAAK5C,GAAM6C,IAAI,kBAIxDlE,GACGuC,EAACE,OAAAA,CAAK9C,UAAU,4FACZ4C,EAACuB,EAAAA,CAAKC,KAAM,GAAGC,eAAqBC,IAAK5C,GAAM6C,IAAI,mBAI9DrB,EACAK,EAAAA,GAGV,CAACxD,EAAUM,EAAcgB,EAAgBb,EAAWC,EAAS8B,EAAgBG,IAO1E8B,GAAqBhC,GACvB,EAAGxB,eAAcQ,UAASF,SAAQnB,WAAUS,OAAMqB,WAAUf,kBAAiBuD,iBAAgB1E,WAAU6B,+BACnG,MAAM8C,EAAsB,CACxBC,QAAS3D,EACThB,UAAW+C,EAAW,CAClB,yBAAyB,EACzB,iCAAkCvB,EAClC,gCAAiCF,EACjC,kCAAmCnB,KAI3C,OAAOe,EAEH0B,EAAClC,QAAAA,IAAUgE,MAA2BD,GAAkB7D,GAAQ,CAAEgE,QAAS3C,IACtElC,GAGL6B,EAAyB8C,EAAqB3E,EAAUkC,KAahE,IAMJ,OACIW,EAACa,MAAAA,CACGzD,UAAW+C,EACP,wBACA/C,EACAC,EAAmByD,KAAIC,GAAK,0BAA0BA,MACtD,CACI,+BAAgCtD,EAChC,+BAAgCI,EAChC,kCAAmCL,GAAYD,KAIvDyC,EAAC4B,GAAAA,CACGxD,aAAcA,EACdJ,KAAMA,EACNT,SAAUA,EACVmB,OAAQA,EACRE,QAASA,EACTN,gBAAiBA,EACjBe,SAAUA,EAASmB,QACnBqB,gBAAiB5C,EACjBD,yBAA0BA,GAEzBe,KAEJM,KAAAA,EAKbpD,EAAMgF,aAAe,CACjB7E,UAAW,GACXC,mBAAoB,GACpBM,sBAAuB,GACvBW,iBAAiB,EACjBC,kBAAkB,EAClBC,uBAAuB,EACvBQ,yBAA0B,IAAM"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../external/preact/dist/preact.js";import t from"../../../../external/classnames/index.js";import{useCoreContext as a}from"../../../../core/Context/CoreProvider.js";function s({children:s,classNameModifiers:l=[],label:c,readonly:d=!1}){const{i18n:r}=a();return e("fieldset",{className:t(["adyen-checkout__fieldset",...l.map((e=>`adyen-checkout__fieldset--${e}`)),{"adyen-checkout__fieldset--readonly":d}])},c&&e("legend",{className:"adyen-checkout__fieldset__title"},r.get(c)),e("div",{className:"adyen-checkout__fieldset__fields"},s))}export{s as default};
1
+ import{createElement as e}from"../../../../external/preact/dist/preact.js";import t from"../../../../_virtual/index.js";import{useCoreContext as i}from"../../../../core/Context/CoreProvider.js";import{getUniqueId as a}from"../../../../utils/idGenerator.js";function d({children:d,classNameModifiers:s=[],label:r,readonly:c=!1,description:o}){const{i18n:l}=i(),n=a("payid-input-description");return e("fieldset",{className:t(["adyen-checkout__fieldset",...s.map((e=>`adyen-checkout__fieldset--${e}`)),{"adyen-checkout__fieldset--readonly":c}]),"aria-describedby":o?n:null},r&&e("legend",{className:"adyen-checkout__fieldset__title"},l.get(r)),o&&e("p",{id:n,className:"adyen-checkout__fieldset__description"},l.get(o)),e("div",{className:"adyen-checkout__fieldset__fields"},d))}export{d as default};
2
2
  //# sourceMappingURL=Fieldset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.js","sources":["../../../../../../src/components/internal/FormFields/Fieldset/Fieldset.tsx"],"sourcesContent":["import { h, ComponentChildren } from 'preact';\nimport cx from 'classnames';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './Fieldset.scss';\n\ninterface FieldsetProps {\n children: ComponentChildren;\n classNameModifiers: string[];\n label?: string;\n readonly?: boolean;\n}\n\nexport default function Fieldset({ children, classNameModifiers = [], label, readonly = false }: FieldsetProps) {\n const { i18n } = useCoreContext();\n\n return (\n <fieldset\n className={cx([\n 'adyen-checkout__fieldset',\n ...classNameModifiers.map(m => `adyen-checkout__fieldset--${m}`),\n { 'adyen-checkout__fieldset--readonly': readonly }\n ])}\n >\n {label && <legend className=\"adyen-checkout__fieldset__title\">{i18n.get(label)}</legend>}\n\n <div className=\"adyen-checkout__fieldset__fields\">{children}</div>\n </fieldset>\n );\n}\n"],"names":["Fieldset","children","classNameModifiers","label","readonly","i18n","useCoreContext","h","fieldset","className","cx","map","m","legend","get","div"],"mappings":"6MAYe,SAASA,GAASC,SAAEA,EAAQC,mBAAEA,EAAqB,GAAEC,MAAEA,EAAKC,SAAEA,GAAW,IACpF,MAAMC,KAAEA,GAASC,IAEjB,OACIC,EAACC,WAAAA,CACGC,UAAWC,EAAG,CACV,8BACGR,EAAmBS,KAAIC,GAAK,6BAA6BA,MAC5D,CAAE,qCAAsCR,MAG3CD,GAASI,EAACM,SAAAA,CAAOJ,UAAU,mCAAmCJ,EAAKS,IAAIX,IAExEI,EAACQ,MAAAA,CAAIN,UAAU,oCAAoCR,GAG/D"}
1
+ {"version":3,"file":"Fieldset.js","sources":["../../../../../../src/components/internal/FormFields/Fieldset/Fieldset.tsx"],"sourcesContent":["import { h, ComponentChildren } from 'preact';\nimport cx from 'classnames';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './Fieldset.scss';\nimport { getUniqueId } from '../../../../utils/idGenerator';\n\ninterface FieldsetProps {\n children: ComponentChildren;\n classNameModifiers: string[];\n label?: string;\n description?: string;\n readonly?: boolean;\n}\n\nexport default function Fieldset({ children, classNameModifiers = [], label, readonly = false, description }: FieldsetProps) {\n const { i18n } = useCoreContext();\n\n const describedById = getUniqueId('payid-input-description');\n\n return (\n <fieldset\n className={cx([\n 'adyen-checkout__fieldset',\n ...classNameModifiers.map(m => `adyen-checkout__fieldset--${m}`),\n { 'adyen-checkout__fieldset--readonly': readonly }\n ])}\n aria-describedby={description ? describedById : null}\n >\n {label && <legend className=\"adyen-checkout__fieldset__title\">{i18n.get(label)}</legend>}\n {description && (\n <p id={describedById} className=\"adyen-checkout__fieldset__description\">\n {i18n.get(description)}\n </p>\n )}\n <div className=\"adyen-checkout__fieldset__fields\">{children}</div>\n </fieldset>\n );\n}\n"],"names":["Fieldset","children","classNameModifiers","label","readonly","description","i18n","useCoreContext","describedById","getUniqueId","h","fieldset","className","cx","map","m","aria-describedby","legend","get","p","id","div"],"mappings":"iQAce,SAASA,GAASC,SAAEA,EAAQC,mBAAEA,EAAqB,GAAEC,MAAEA,EAAKC,SAAEA,GAAW,EAAKC,YAAEA,IAC3F,MAAMC,KAAEA,GAASC,IAEXC,EAAgBC,EAAY,2BAElC,OACIC,EAACC,WAAAA,CACGC,UAAWC,EAAG,CACV,8BACGX,EAAmBY,KAAIC,GAAK,6BAA6BA,MAC5D,CAAE,qCAAsCX,KAE5CY,mBAAkBX,EAAcG,EAAgB,MAE/CL,GAASO,EAACO,SAAAA,CAAOL,UAAU,mCAAmCN,EAAKY,IAAIf,IACvEE,GACGK,EAACS,IAAAA,CAAEC,GAAIZ,EAAeI,UAAU,yCAC3BN,EAAKY,IAAIb,IAGlBK,EAACW,MAAAA,CAAIT,UAAU,oCAAoCX,GAG/D"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../external/preact/dist/preact.js";import{useCallback as n}from"../../../external/preact/hooks/dist/hooks.js";import r from"../../../external/classnames/index.js";import{ARIA_ERROR_SUFFIX as a,ARIA_CONTEXT_SUFFIX as o}from"../../../core/Errors/constants.js";function t({setRef:t,...s}){const{autoCorrect:l,classNameModifiers:i,isInvalid:u,isValid:d,readonly:c=null,spellCheck:p,type:y,uniqueId:m,disabled:h}=s,f=s.className;Object.prototype.hasOwnProperty.call(s,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const k=n((e=>{s.onInput(e)}),[s.onInput]),_=n((e=>{s?.onKeyPress&&s.onKeyPress(e)}),[s?.onKeyPress]),v=n((e=>{s?.onKeyUp&&s.onKeyUp(e)}),[s?.onKeyUp]),C=n((e=>{s?.onBlurHandler?.(e),s.trimOnBlur&&(e.target.value=e.target.value.trim()),s?.onBlur?.(e)}),[s.onBlur,s.onBlurHandler]),I=n((e=>{s?.onFocusHandler?.(e)}),[s.onFocusHandler]),K=r("adyen-checkout__input",[`adyen-checkout__input--${y}`],f,{"adyen-checkout__input--invalid":u,"adyen-checkout__input--valid":d},i.map((e=>`adyen-checkout__input--${e}`))),{classNameModifiers:x,uniqueId:B,isInvalid:b,isValid:P,addContextualElement:j,...N}=s;return e("input",{id:m,...N,"aria-required":N.required,type:y,className:K,readOnly:c,spellCheck:p,autoCorrect:l,"aria-describedby":`${m}${u?a:o}`,"aria-invalid":u,onInput:k,onBlur:C,onFocus:I,onKeyUp:v,onKeyPress:_,disabled:h,ref:t})}t.defaultProps={type:"text",classNameModifiers:[]};export{t as default};
1
+ import{createElement as e}from"../../../external/preact/dist/preact.js";import{useCallback as r}from"../../../external/preact/hooks/dist/hooks.js";import n from"../../../_virtual/index.js";import{ARIA_ERROR_SUFFIX as a,ARIA_CONTEXT_SUFFIX as o}from"../../../core/Errors/constants.js";function t({setRef:t,...s}){const{autoCorrect:l,classNameModifiers:i,isInvalid:u,isValid:d,readonly:c=null,spellCheck:p,type:y,uniqueId:m,disabled:h}=s,f=s.className;Object.prototype.hasOwnProperty.call(s,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const _=r((e=>{s.onInput(e)}),[s.onInput]),k=r((e=>{s?.onKeyPress&&s.onKeyPress(e)}),[s?.onKeyPress]),v=r((e=>{s?.onKeyUp&&s.onKeyUp(e)}),[s?.onKeyUp]),C=r((e=>{s?.onBlurHandler?.(e),s.trimOnBlur&&(e.target.value=e.target.value.trim()),s?.onBlur?.(e)}),[s.onBlur,s.onBlurHandler]),I=r((e=>{s?.onFocusHandler?.(e)}),[s.onFocusHandler]),K=n("adyen-checkout__input",[`adyen-checkout__input--${y}`],f,{"adyen-checkout__input--invalid":u,"adyen-checkout__input--valid":d},i.map((e=>`adyen-checkout__input--${e}`))),{classNameModifiers:B,uniqueId:b,isInvalid:x,isValid:P,addContextualElement:j,...N}=s;return e("input",{id:m,...N,"aria-required":N.required,type:y,className:K,readOnly:c,spellCheck:p,autoCorrect:l,"aria-describedby":`${m}${u?a:o}`,"aria-invalid":u,onInput:_,onBlur:C,onFocus:I,onKeyUp:v,onKeyPress:k,disabled:h,ref:t})}t.defaultProps={type:"text",classNameModifiers:[]};export{t as default};
2
2
  //# sourceMappingURL=InputBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputBase.js","sources":["../../../../../src/components/internal/FormFields/InputBase.tsx"],"sourcesContent":["import { h, RefCallback } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport classNames from 'classnames';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../core/Errors/constants';\nimport Language from '../../../language';\nimport './FormFields.scss';\n\nexport interface InputBaseProps extends h.JSX.HTMLAttributes {\n classNameModifiers?: string[];\n isInvalid?: boolean;\n isValid?: boolean;\n readonly?: boolean;\n uniqueId?: string;\n disabled?: boolean;\n className?: string;\n placeholder?: string;\n value?: string;\n name?: string;\n checked?: boolean;\n setRef?: RefCallback<HTMLInputElement>;\n trimOnBlur?: boolean;\n i18n?: Language;\n label?: string;\n onBlurHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;\n onFocusHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;\n maxlength?: number | null;\n addContextualElement?: boolean;\n type?: string;\n}\n\nexport default function InputBase({ setRef, ...props }: InputBaseProps) {\n const { autoCorrect, classNameModifiers, isInvalid, isValid, readonly = null, spellCheck, type, uniqueId, disabled } = props;\n const className = props.className;\n\n /**\n * To avoid confusion with misplaced/misdirected onChange handlers - InputBase only accepts onInput, onBlur & onFocus handlers.\n * The first 2 being the means by which we expect useForm--handleChangeFor validation functionality to be applied.\n */\n if (Object.prototype.hasOwnProperty.call(props, 'onChange')) {\n console.error('Error: Form fields that rely on InputBase may not have an onChange property');\n }\n\n const handleInput = useCallback(\n (event: h.JSX.TargetedInputEvent<HTMLInputElement>) => {\n props.onInput(event);\n },\n [props.onInput]\n );\n\n /**\n * Event is fired when a key that produces a character value is pressed down.\n * ENTER keypress also triggers this event.\n *\n * TODO: 'keypress' event is deprecated\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/keypress_event\n */\n const handleKeyPress = useCallback(\n (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n if (props?.onKeyPress) props.onKeyPress(event);\n },\n [props?.onKeyPress]\n );\n\n /**\n * Event is fired when certain keys are pressed (keys that do not output characters):\n * Backspace, Arrow keys, Shift, Ctrl, Command, Option, Esc\n *\n * Exception: ENTER keypress triggers 'onKeyPress' AND 'onKeyUp'\n */\n const handleKeyUp = useCallback(\n (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n if (props?.onKeyUp) props.onKeyUp(event);\n },\n [props?.onKeyUp]\n );\n\n const handleBlur = useCallback(\n (event: h.JSX.TargetedFocusEvent<HTMLInputElement>) => {\n props?.onBlurHandler?.(event); // From Field component\n\n if (props.trimOnBlur) {\n (event.target as HTMLInputElement).value = (event.target as HTMLInputElement).value.trim(); // needed to trim trailing spaces in field (leading spaces can be done via formatting)\n }\n\n props?.onBlur?.(event);\n },\n [props.onBlur, props.onBlurHandler]\n );\n\n const handleFocus = useCallback(\n (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n props?.onFocusHandler?.(event); // From Field component\n },\n [props.onFocusHandler]\n );\n\n const inputClassNames = classNames(\n 'adyen-checkout__input',\n [`adyen-checkout__input--${type}`],\n className,\n {\n 'adyen-checkout__input--invalid': isInvalid,\n 'adyen-checkout__input--valid': isValid\n },\n classNameModifiers.map(m => `adyen-checkout__input--${m}`)\n );\n\n // Don't spread classNameModifiers etc to input element (it ends up as an attribute on the element itself)\n const { classNameModifiers: cnm, uniqueId: uid, isInvalid: iiv, isValid: iv, addContextualElement: ace, ...newProps } = props;\n\n return (\n <input\n id={uniqueId}\n {...newProps}\n aria-required={newProps.required}\n type={type}\n className={inputClassNames}\n readOnly={readonly}\n spellCheck={spellCheck}\n autoCorrect={autoCorrect}\n aria-describedby={`${uniqueId}${isInvalid ? ARIA_ERROR_SUFFIX : ARIA_CONTEXT_SUFFIX}`}\n aria-invalid={isInvalid}\n onInput={handleInput}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onKeyUp={handleKeyUp}\n onKeyPress={handleKeyPress}\n disabled={disabled}\n ref={setRef}\n />\n );\n}\n\nInputBase.defaultProps = {\n type: 'text',\n classNameModifiers: []\n};\n"],"names":["InputBase","setRef","props","autoCorrect","classNameModifiers","isInvalid","isValid","readonly","spellCheck","type","uniqueId","disabled","className","Object","prototype","hasOwnProperty","call","console","error","handleInput","useCallback","event","onInput","handleKeyPress","onKeyPress","handleKeyUp","onKeyUp","handleBlur","onBlurHandler","trimOnBlur","target","value","trim","onBlur","handleFocus","onFocusHandler","inputClassNames","classNames","map","m","cnm","uid","iiv","iv","addContextualElement","ace","newProps","h","input","id","aria-required","required","readOnly","aria-describedby","ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","aria-invalid","onFocus","ref","defaultProps"],"mappings":"uSA8Be,SAASA,GAAUC,OAAEA,KAAWC,IAC3C,MAAMC,YAAEA,EAAWC,mBAAEA,EAAkBC,UAAEA,EAASC,QAAEA,EAAOC,SAAEA,EAAW,KAAIC,WAAEA,EAAUC,KAAEA,EAAIC,SAAEA,EAAQC,SAAEA,GAAaT,EACjHU,EAAYV,EAAMU,UAMpBC,OAAOC,UAAUC,eAAeC,KAAKd,EAAO,aAC5Ce,QAAQC,MAAM,+EAGlB,MAAMC,EAAcC,GACfC,IACGnB,EAAMoB,QAAQD,EAAAA,GAElB,CAACnB,EAAMoB,UAULC,EAAiBH,GAClBC,IACOnB,GAAOsB,YAAYtB,EAAMsB,WAAWH,EAAAA,GAE5C,CAACnB,GAAOsB,aASNC,EAAcL,GACfC,IACOnB,GAAOwB,SAASxB,EAAMwB,QAAQL,EAAAA,GAEtC,CAACnB,GAAOwB,UAGNC,EAAaP,GACdC,IACGnB,GAAO0B,gBAAgBP,GAEnBnB,EAAM2B,aACLR,EAAMS,OAA4BC,MAAQV,EAAOS,OAA4BC,MAAMC,QAGxF9B,GAAO+B,SAASZ,EAAAA,GAEpB,CAACnB,EAAM+B,OAAQ/B,EAAM0B,gBAGnBM,EAAcd,GACfC,IACGnB,GAAOiC,iBAAiBd,KAE5B,CAACnB,EAAMiC,iBAGLC,EAAkBC,EACpB,wBACA,CAAC,0BAA0B5B,KAC3BG,EACA,CACI,iCAAkCP,EAClC,+BAAgCC,GAEpCF,EAAmBkC,KAAIC,GAAK,0BAA0BA,QAIlDnC,mBAAoBoC,EAAK9B,SAAU+B,EAAKpC,UAAWqC,EAAKpC,QAASqC,EAAIC,qBAAsBC,KAAQC,GAAa5C,EAExH,OACI6C,EAACC,QAAAA,CACGC,GAAIvC,KACAoC,EACJI,gBAAeJ,EAASK,SACxB1C,KAAMA,EACNG,UAAWwB,EACXgB,SAAU7C,EACVC,WAAYA,EACZL,YAAaA,EACbkD,mBAAkB,GAAG3C,IAAWL,EAAYiD,EAAoBC,IAChEC,eAAcnD,EACdiB,QAASH,EACTc,OAAQN,EACR8B,QAASvB,EACTR,QAASD,EACTD,WAAYD,EACZZ,SAAUA,EACV+C,IAAKzD,GAGjB,CAEAD,EAAU2D,aAAe,CACrBlD,KAAM,OACNL,mBAAoB"}
1
+ {"version":3,"file":"InputBase.js","sources":["../../../../../src/components/internal/FormFields/InputBase.tsx"],"sourcesContent":["import { h, RefCallback } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport classNames from 'classnames';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../core/Errors/constants';\nimport Language from '../../../language';\nimport './FormFields.scss';\n\nexport interface InputBaseProps extends h.JSX.HTMLAttributes {\n classNameModifiers?: string[];\n isInvalid?: boolean;\n isValid?: boolean;\n readonly?: boolean;\n uniqueId?: string;\n disabled?: boolean;\n className?: string;\n placeholder?: string;\n value?: string;\n name?: string;\n checked?: boolean;\n setRef?: RefCallback<HTMLInputElement>;\n trimOnBlur?: boolean;\n i18n?: Language;\n label?: string;\n onBlurHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;\n onFocusHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;\n maxlength?: number | null;\n addContextualElement?: boolean;\n type?: string;\n}\n\nexport default function InputBase({ setRef, ...props }: InputBaseProps) {\n const { autoCorrect, classNameModifiers, isInvalid, isValid, readonly = null, spellCheck, type, uniqueId, disabled } = props;\n const className = props.className;\n\n /**\n * To avoid confusion with misplaced/misdirected onChange handlers - InputBase only accepts onInput, onBlur & onFocus handlers.\n * The first 2 being the means by which we expect useForm--handleChangeFor validation functionality to be applied.\n */\n if (Object.prototype.hasOwnProperty.call(props, 'onChange')) {\n console.error('Error: Form fields that rely on InputBase may not have an onChange property');\n }\n\n const handleInput = useCallback(\n (event: h.JSX.TargetedInputEvent<HTMLInputElement>) => {\n props.onInput(event);\n },\n [props.onInput]\n );\n\n /**\n * Event is fired when a key that produces a character value is pressed down.\n * ENTER keypress also triggers this event.\n *\n * TODO: 'keypress' event is deprecated\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/keypress_event\n */\n const handleKeyPress = useCallback(\n (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n if (props?.onKeyPress) props.onKeyPress(event);\n },\n [props?.onKeyPress]\n );\n\n /**\n * Event is fired when certain keys are pressed (keys that do not output characters):\n * Backspace, Arrow keys, Shift, Ctrl, Command, Option, Esc\n *\n * Exception: ENTER keypress triggers 'onKeyPress' AND 'onKeyUp'\n */\n const handleKeyUp = useCallback(\n (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n if (props?.onKeyUp) props.onKeyUp(event);\n },\n [props?.onKeyUp]\n );\n\n const handleBlur = useCallback(\n (event: h.JSX.TargetedFocusEvent<HTMLInputElement>) => {\n props?.onBlurHandler?.(event); // From Field component\n\n if (props.trimOnBlur) {\n (event.target as HTMLInputElement).value = (event.target as HTMLInputElement).value.trim(); // needed to trim trailing spaces in field (leading spaces can be done via formatting)\n }\n\n props?.onBlur?.(event);\n },\n [props.onBlur, props.onBlurHandler]\n );\n\n const handleFocus = useCallback(\n (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n props?.onFocusHandler?.(event); // From Field component\n },\n [props.onFocusHandler]\n );\n\n const inputClassNames = classNames(\n 'adyen-checkout__input',\n [`adyen-checkout__input--${type}`],\n className,\n {\n 'adyen-checkout__input--invalid': isInvalid,\n 'adyen-checkout__input--valid': isValid\n },\n classNameModifiers.map(m => `adyen-checkout__input--${m}`)\n );\n\n // Don't spread classNameModifiers etc to input element (it ends up as an attribute on the element itself)\n const { classNameModifiers: cnm, uniqueId: uid, isInvalid: iiv, isValid: iv, addContextualElement: ace, ...newProps } = props;\n\n return (\n <input\n id={uniqueId}\n {...newProps}\n aria-required={newProps.required}\n type={type}\n className={inputClassNames}\n readOnly={readonly}\n spellCheck={spellCheck}\n autoCorrect={autoCorrect}\n aria-describedby={`${uniqueId}${isInvalid ? ARIA_ERROR_SUFFIX : ARIA_CONTEXT_SUFFIX}`}\n aria-invalid={isInvalid}\n onInput={handleInput}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onKeyUp={handleKeyUp}\n onKeyPress={handleKeyPress}\n disabled={disabled}\n ref={setRef}\n />\n );\n}\n\nInputBase.defaultProps = {\n type: 'text',\n classNameModifiers: []\n};\n"],"names":["InputBase","setRef","props","autoCorrect","classNameModifiers","isInvalid","isValid","readonly","spellCheck","type","uniqueId","disabled","className","Object","prototype","hasOwnProperty","call","console","error","handleInput","useCallback","event","onInput","handleKeyPress","onKeyPress","handleKeyUp","onKeyUp","handleBlur","onBlurHandler","trimOnBlur","target","value","trim","onBlur","handleFocus","onFocusHandler","inputClassNames","classNames","map","m","cnm","uid","iiv","iv","addContextualElement","ace","newProps","h","input","id","aria-required","required","readOnly","aria-describedby","ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","aria-invalid","onFocus","ref","defaultProps"],"mappings":"4RA8Be,SAASA,GAAUC,OAAEA,KAAWC,IAC3C,MAAMC,YAAEA,EAAWC,mBAAEA,EAAkBC,UAAEA,EAASC,QAAEA,EAAOC,SAAEA,EAAW,KAAIC,WAAEA,EAAUC,KAAEA,EAAIC,SAAEA,EAAQC,SAAEA,GAAaT,EACjHU,EAAYV,EAAMU,UAMpBC,OAAOC,UAAUC,eAAeC,KAAKd,EAAO,aAC5Ce,QAAQC,MAAM,+EAGlB,MAAMC,EAAcC,GACfC,IACGnB,EAAMoB,QAAQD,EAAAA,GAElB,CAACnB,EAAMoB,UAULC,EAAiBH,GAClBC,IACOnB,GAAOsB,YAAYtB,EAAMsB,WAAWH,EAAAA,GAE5C,CAACnB,GAAOsB,aASNC,EAAcL,GACfC,IACOnB,GAAOwB,SAASxB,EAAMwB,QAAQL,EAAAA,GAEtC,CAACnB,GAAOwB,UAGNC,EAAaP,GACdC,IACGnB,GAAO0B,gBAAgBP,GAEnBnB,EAAM2B,aACLR,EAAMS,OAA4BC,MAAQV,EAAOS,OAA4BC,MAAMC,QAGxF9B,GAAO+B,SAASZ,EAAAA,GAEpB,CAACnB,EAAM+B,OAAQ/B,EAAM0B,gBAGnBM,EAAcd,GACfC,IACGnB,GAAOiC,iBAAiBd,KAE5B,CAACnB,EAAMiC,iBAGLC,EAAkBC,EACpB,wBACA,CAAC,0BAA0B5B,KAC3BG,EACA,CACI,iCAAkCP,EAClC,+BAAgCC,GAEpCF,EAAmBkC,KAAIC,GAAK,0BAA0BA,QAIlDnC,mBAAoBoC,EAAK9B,SAAU+B,EAAKpC,UAAWqC,EAAKpC,QAASqC,EAAIC,qBAAsBC,KAAQC,GAAa5C,EAExH,OACI6C,EAACC,QAAAA,CACGC,GAAIvC,KACAoC,EACJI,gBAAeJ,EAASK,SACxB1C,KAAMA,EACNG,UAAWwB,EACXgB,SAAU7C,EACVC,WAAYA,EACZL,YAAaA,EACbkD,mBAAkB,GAAG3C,IAAWL,EAAYiD,EAAoBC,IAChEC,eAAcnD,EACdiB,QAASH,EACTc,OAAQN,EACR8B,QAASvB,EACTR,QAASD,EACTD,WAAYD,EACZZ,SAAUA,EACV+C,IAAKzD,GAGjB,CAEAD,EAAU2D,aAAe,CACrBlD,KAAM,OACNL,mBAAoB"}