@adyen/adyen-web 6.23.0 → 6.24.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 (83) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/adyen.css +3 -1
  3. package/dist/cjs/adyen.css.map +1 -1
  4. package/dist/cjs/index.cjs +1 -1
  5. package/dist/cjs/index.cjs.map +1 -1
  6. package/dist/cjs/index.d.cts +24 -5
  7. package/dist/es/adyen.css +3 -1
  8. package/dist/es/adyen.css.map +1 -1
  9. package/dist/es/components/Card/components/CardInput/components/CardFields.js +1 -1
  10. package/dist/es/components/Card/components/CardInput/components/CardFields.js.map +1 -1
  11. package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js +1 -1
  12. package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
  13. package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
  14. package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
  15. package/dist/es/components/Dropin/Dropin.js +1 -1
  16. package/dist/es/components/Dropin/Dropin.js.map +1 -1
  17. package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js +1 -1
  18. package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
  19. package/dist/es/components/PayPal/components/PaypalButtons.js +1 -1
  20. package/dist/es/components/PayPal/components/PaypalButtons.js.map +1 -1
  21. package/dist/es/components/PayPal/defaultProps.js +1 -1
  22. package/dist/es/components/PayPal/defaultProps.js.map +1 -1
  23. package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
  24. package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  25. package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
  26. package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  27. package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
  28. package/dist/es/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
  29. package/dist/es/components/ThreeDS2/components/utils.js +1 -1
  30. package/dist/es/components/ThreeDS2/components/utils.js.map +1 -1
  31. package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
  32. package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
  33. package/dist/es/components/internal/Address/Address.js +1 -1
  34. package/dist/es/components/internal/Address/Address.js.map +1 -1
  35. package/dist/es/components/internal/FormFields/Field/Field.js +1 -1
  36. package/dist/es/components/internal/FormFields/Field/Field.js.map +1 -1
  37. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  38. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  39. package/dist/es/components/internal/UIElement/UIElement.js +1 -1
  40. package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
  41. package/dist/es/core/ProcessResponse/PaymentAction/actionTypes.js +1 -1
  42. package/dist/es/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
  43. package/dist/es/core/config.js +1 -1
  44. package/dist/es/index.d.ts +24 -5
  45. package/dist/es-legacy/adyen.css +3 -1
  46. package/dist/es-legacy/adyen.css.map +1 -1
  47. package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js +1 -1
  48. package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js.map +1 -1
  49. package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js +1 -1
  50. package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
  51. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
  52. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
  53. package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
  54. package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
  55. package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js +1 -1
  56. package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
  57. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js +1 -1
  58. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js.map +1 -1
  59. package/dist/es-legacy/components/PayPal/defaultProps.js +1 -1
  60. package/dist/es-legacy/components/PayPal/defaultProps.js.map +1 -1
  61. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
  62. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  63. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
  64. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  65. package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
  66. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
  67. package/dist/es-legacy/components/ThreeDS2/components/utils.js +1 -1
  68. package/dist/es-legacy/components/ThreeDS2/components/utils.js.map +1 -1
  69. package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
  70. package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
  71. package/dist/es-legacy/components/internal/Address/Address.js +1 -1
  72. package/dist/es-legacy/components/internal/Address/Address.js.map +1 -1
  73. package/dist/es-legacy/components/internal/FormFields/Field/Field.js +1 -1
  74. package/dist/es-legacy/components/internal/FormFields/Field/Field.js.map +1 -1
  75. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  76. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  77. package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
  78. package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
  79. package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js +1 -1
  80. package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
  81. package/dist/es-legacy/core/config.js +1 -1
  82. package/package.json +149 -157
  83. package/styles/adyen.css +3 -1
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../../external/preact/dist/preact.js";import r from"./CardNumber.js";import t from"./CVC.js";import a from"./ExpirationDate.js";import{useCoreContext as d}from"../../../../../core/Context/CoreProvider.js";import c from"../../../../../_virtual/index.js";import{BRAND_ICON_UI_EXCLUSION_LIST as o,ENCRYPTED_CARD_NUMBER as i,DATE_POLICY_HIDDEN as n,ENCRYPTED_EXPIRY_DATE as l,ENCRYPTED_SECURITY_CODE as s}from"../../../../internal/SecuredFields/lib/constants.js";import u from"./AvailableBrands/AvailableBrands.js";function p({brand:p,brandsIcons:m,brandsConfiguration:y,dualBrandingElements:x,errors:C,focusedElement:f,hasCVC:_,cvcPolicy:b,expiryDatePolicy:h,onFocusField:g,showBrandIcon:v,valid:E,showContextualElement:F}){const{i18n:N}=d(),j=(e,r)=>e[r]?N.get(e[r]):null,B=m?.filter(e=>!o?.includes(e.name)),k="amex"===p,w=k?N.get("creditCard.securityCode.contextualText.4digits"):N.get("creditCard.securityCode.contextualText.3digits");return e("div",{className:"adyen-checkout__card__form"},e(r,{brand:p,brandsConfiguration:y,error:j(C,i),focused:f===i,isValid:!!E.encryptedCardNumber,label:N.get("creditCard.cardNumber.label"),onFocusField:g,filled:!!C.encryptedCardNumber||!!E.encryptedCardNumber,showBrandIcon:v,dualBrandingElements:x}),e(u,{activeBrand:p,brands:B}),e("div",{className:c("adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper",{"adyen-checkout__card__exp-cvc__exp-date__input--hidden":h===n})},e(a,{error:j(C,l),focused:f===l,isValid:!!E.encryptedExpiryMonth&&!!E.encryptedExpiryYear,filled:!!C.encryptedExpiryDate||!!E.encryptedExpiryYear,label:N.get("creditCard.expiryDate.label"),onFocusField:g,className:"adyen-checkout__field--50",expiryDatePolicy:h,showContextualElement:F,contextualText:N.get("creditCard.expiryDate.contextualText")}),_&&e(t,{error:j(C,s),focused:f===s,cvcPolicy:b,isValid:!!E.encryptedSecurityCode,filled:!!C.encryptedSecurityCode||!!E.encryptedSecurityCode,label:N.get("creditCard.securityCode.label"),onFocusField:g,className:"adyen-checkout__field--50",frontCVC:k,showContextualElement:F,contextualText:w})))}export{p as default};
1
+ import{createElement as e}from"../../../../../external/preact/dist/preact.js";import r from"./CardNumber.js";import t from"./CVC.js";import a from"./ExpirationDate.js";import{useCoreContext as d}from"../../../../../core/Context/CoreProvider.js";import o from"../../../../../_virtual/index.js";import{BRAND_ICON_UI_EXCLUSION_LIST as i,ENCRYPTED_CARD_NUMBER as c,DATE_POLICY_HIDDEN as n,ENCRYPTED_EXPIRY_DATE as l,ENCRYPTED_SECURITY_CODE as s}from"../../../../internal/SecuredFields/lib/constants.js";import u from"./AvailableBrands/AvailableBrands.js";function m({brand:m,brandsIcons:p,brandsConfiguration:y,dualBrandingElements:x,errors:C,focusedElement:f,hasCVC:b,cvcPolicy:_,expiryDatePolicy:g,onFocusField:v,showBrandIcon:E,valid:h,showContextualElement:F}){const{i18n:N}=d(),j=(e,r)=>e[r]?N.get(e[r]):null,B=p?.filter(e=>!i?.includes(e.name)),D="amex"===m,V=D?N.get("creditCard.securityCode.contextualText.4digits"):N.get("creditCard.securityCode.contextualText.3digits");return e("div",{className:"adyen-checkout__card__form"},e(r,{brand:m,brandsConfiguration:y,error:j(C,c),focused:f===c,isValid:!!h.encryptedCardNumber,label:N.get("creditCard.cardNumber.label"),onFocusField:v,filled:!!C.encryptedCardNumber||!!h.encryptedCardNumber,showBrandIcon:E,dualBrandingElements:x}),e(u,{activeBrand:m,brands:B}),e("div",{className:o("adyen-checkout__card__exp-cvc",{"adyen-checkout__card__exp-cvc__exp-date__input--hidden":g===n})},e(a,{classNameModifiers:["col-50"],error:j(C,l),focused:f===l,isValid:!!h.encryptedExpiryMonth&&!!h.encryptedExpiryYear,filled:!!C.encryptedExpiryDate||!!h.encryptedExpiryYear,label:N.get("creditCard.expiryDate.label"),onFocusField:v,expiryDatePolicy:g,showContextualElement:F,contextualText:N.get("creditCard.expiryDate.contextualText")}),b&&e(t,{classNameModifiers:["col-50"],error:j(C,s),focused:f===s,cvcPolicy:_,isValid:!!h.encryptedSecurityCode,filled:!!C.encryptedSecurityCode||!!h.encryptedSecurityCode,label:N.get("creditCard.securityCode.label"),onFocusField:v,frontCVC:D,showContextualElement:F,contextualText:V})))}export{m as default};
2
2
  //# sourceMappingURL=CardFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardFields.js","sources":["../../../../../../../src/components/Card/components/CardInput/components/CardFields.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CardNumber from './CardNumber';\nimport CVC from './CVC';\nimport ExpirationDate from './ExpirationDate';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { CardFieldsProps } from './types';\nimport classNames from 'classnames';\nimport {\n BRAND_ICON_UI_EXCLUSION_LIST,\n DATE_POLICY_HIDDEN,\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_SECURITY_CODE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport AvailableBrands from './AvailableBrands';\n\nexport default function CardFields({\n brand,\n brandsIcons,\n brandsConfiguration,\n dualBrandingElements,\n errors,\n focusedElement,\n hasCVC,\n cvcPolicy,\n expiryDatePolicy,\n onFocusField,\n showBrandIcon,\n valid,\n showContextualElement\n}: CardFieldsProps) {\n const { i18n } = useCoreContext();\n\n const getError = (errors, fieldType) => {\n return errors[fieldType] ? i18n.get(errors[fieldType]) : null;\n };\n\n // A set of brands filtered to exclude those that can never appear in the UI\n const allowedBrands = brandsIcons?.filter(brandsIcons => !BRAND_ICON_UI_EXCLUSION_LIST?.includes(brandsIcons.name));\n const isAmex = brand === 'amex';\n const cvcContextualText = isAmex\n ? i18n.get('creditCard.securityCode.contextualText.4digits')\n : i18n.get('creditCard.securityCode.contextualText.3digits');\n\n return (\n <div className=\"adyen-checkout__card__form\">\n <CardNumber\n brand={brand}\n brandsConfiguration={brandsConfiguration}\n error={getError(errors, ENCRYPTED_CARD_NUMBER)}\n focused={focusedElement === ENCRYPTED_CARD_NUMBER}\n isValid={!!valid.encryptedCardNumber}\n label={i18n.get('creditCard.cardNumber.label')}\n onFocusField={onFocusField}\n filled={!!errors.encryptedCardNumber || !!valid.encryptedCardNumber}\n showBrandIcon={showBrandIcon}\n dualBrandingElements={dualBrandingElements}\n />\n\n <AvailableBrands activeBrand={brand} brands={allowedBrands} />\n\n <div\n className={classNames('adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper', {\n 'adyen-checkout__card__exp-cvc__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN\n })}\n >\n <ExpirationDate\n error={getError(errors, ENCRYPTED_EXPIRY_DATE)}\n focused={focusedElement === ENCRYPTED_EXPIRY_DATE}\n isValid={!!valid.encryptedExpiryMonth && !!valid.encryptedExpiryYear}\n filled={!!errors.encryptedExpiryDate || !!valid.encryptedExpiryYear}\n label={i18n.get('creditCard.expiryDate.label')}\n onFocusField={onFocusField}\n className={'adyen-checkout__field--50'}\n expiryDatePolicy={expiryDatePolicy}\n showContextualElement={showContextualElement}\n contextualText={i18n.get('creditCard.expiryDate.contextualText')}\n />\n\n {hasCVC && (\n <CVC\n error={getError(errors, ENCRYPTED_SECURITY_CODE)}\n focused={focusedElement === ENCRYPTED_SECURITY_CODE}\n cvcPolicy={cvcPolicy}\n isValid={!!valid.encryptedSecurityCode}\n filled={!!errors.encryptedSecurityCode || !!valid.encryptedSecurityCode}\n label={i18n.get('creditCard.securityCode.label')}\n onFocusField={onFocusField}\n className={'adyen-checkout__field--50'}\n frontCVC={isAmex}\n showContextualElement={showContextualElement}\n contextualText={cvcContextualText}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["CardFields","brand","brandsIcons","brandsConfiguration","dualBrandingElements","errors","focusedElement","hasCVC","cvcPolicy","expiryDatePolicy","onFocusField","showBrandIcon","valid","showContextualElement","i18n","useCoreContext","getError","fieldType","get","allowedBrands","filter","BRAND_ICON_UI_EXCLUSION_LIST","includes","name","isAmex","cvcContextualText","h","div","className","CardNumber","error","ENCRYPTED_CARD_NUMBER","focused","isValid","encryptedCardNumber","label","filled","AvailableBrands","activeBrand","brands","classNames","DATE_POLICY_HIDDEN","ExpirationDate","ENCRYPTED_EXPIRY_DATE","encryptedExpiryMonth","encryptedExpiryYear","encryptedExpiryDate","contextualText","CVC","ENCRYPTED_SECURITY_CODE","encryptedSecurityCode","frontCVC"],"mappings":"uiBAgBe,SAASA,GAAWC,MAC/BA,EAAKC,YACLA,EAAWC,oBACXA,EAAmBC,qBACnBA,EAAoBC,OACpBA,EAAMC,eACNA,EAAcC,OACdA,EAAMC,UACNA,EAASC,iBACTA,EAAgBC,aAChBA,EAAYC,cACZA,EAAaC,MACbA,EAAKC,sBACLA,IAEA,MAAMC,KAAEA,GAASC,IAEXC,EAAW,CAACX,EAAQY,IACfZ,EAAOY,GAAaH,EAAKI,IAAIb,EAAOY,IAAc,KAIvDE,EAAgBjB,GAAakB,OAAOlB,IAAgBmB,GAA8BC,SAASpB,EAAYqB,OACvGC,EAAmB,SAAVvB,EACTwB,EAAoBD,EACpBV,EAAKI,IAAI,kDACTJ,EAAKI,IAAI,kDAEf,OACIQ,EAACC,MAAAA,CAAIC,UAAU,8BACXF,EAACG,EAAAA,CACG5B,MAAOA,EACPE,oBAAqBA,EACrB2B,MAAOd,EAASX,EAAQ0B,GACxBC,QAAS1B,IAAmByB,EAC5BE,UAAWrB,EAAMsB,oBACjBC,MAAOrB,EAAKI,IAAI,+BAChBR,aAAcA,EACd0B,SAAU/B,EAAO6B,uBAAyBtB,EAAMsB,oBAChDvB,cAAeA,EACfP,qBAAsBA,IAG1BsB,EAACW,EAAAA,CAAgBC,YAAarC,EAAOsC,OAAQpB,IAE7CO,EAACC,MAAAA,CACGC,UAAWY,EAAW,8DAA+D,CACjF,yDAA0D/B,IAAqBgC,KAGnFf,EAACgB,EAAAA,CACGZ,MAAOd,EAASX,EAAQsC,GACxBX,QAAS1B,IAAmBqC,EAC5BV,UAAWrB,EAAMgC,wBAA0BhC,EAAMiC,oBACjDT,SAAU/B,EAAOyC,uBAAyBlC,EAAMiC,oBAChDV,MAAOrB,EAAKI,IAAI,+BAChBR,aAAcA,EACdkB,UAAW,4BACXnB,iBAAkBA,EAClBI,sBAAuBA,EACvBkC,eAAgBjC,EAAKI,IAAI,0CAG5BX,GACGmB,EAACsB,EAAAA,CACGlB,MAAOd,EAASX,EAAQ4C,GACxBjB,QAAS1B,IAAmB2C,EAC5BzC,UAAWA,EACXyB,UAAWrB,EAAMsC,sBACjBd,SAAU/B,EAAO6C,yBAA2BtC,EAAMsC,sBAClDf,MAAOrB,EAAKI,IAAI,iCAChBR,aAAcA,EACdkB,UAAW,4BACXuB,SAAU3B,EACVX,sBAAuBA,EACvBkC,eAAgBtB,KAMxC"}
1
+ {"version":3,"file":"CardFields.js","sources":["../../../../../../../src/components/Card/components/CardInput/components/CardFields.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CardNumber from './CardNumber';\nimport CVC from './CVC';\nimport ExpirationDate from './ExpirationDate';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { CardFieldsProps } from './types';\nimport classNames from 'classnames';\nimport {\n BRAND_ICON_UI_EXCLUSION_LIST,\n DATE_POLICY_HIDDEN,\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_SECURITY_CODE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport AvailableBrands from './AvailableBrands';\nimport './CardFields.scss';\n\nexport default function CardFields({\n brand,\n brandsIcons,\n brandsConfiguration,\n dualBrandingElements,\n errors,\n focusedElement,\n hasCVC,\n cvcPolicy,\n expiryDatePolicy,\n onFocusField,\n showBrandIcon,\n valid,\n showContextualElement\n}: CardFieldsProps) {\n const { i18n } = useCoreContext();\n\n const getError = (errors, fieldType) => {\n return errors[fieldType] ? i18n.get(errors[fieldType]) : null;\n };\n\n // A set of brands filtered to exclude those that can never appear in the UI\n const allowedBrands = brandsIcons?.filter(brandsIcons => !BRAND_ICON_UI_EXCLUSION_LIST?.includes(brandsIcons.name));\n const isAmex = brand === 'amex';\n const cvcContextualText = isAmex\n ? i18n.get('creditCard.securityCode.contextualText.4digits')\n : i18n.get('creditCard.securityCode.contextualText.3digits');\n\n return (\n <div className=\"adyen-checkout__card__form\">\n <CardNumber\n brand={brand}\n brandsConfiguration={brandsConfiguration}\n error={getError(errors, ENCRYPTED_CARD_NUMBER)}\n focused={focusedElement === ENCRYPTED_CARD_NUMBER}\n isValid={!!valid.encryptedCardNumber}\n label={i18n.get('creditCard.cardNumber.label')}\n onFocusField={onFocusField}\n filled={!!errors.encryptedCardNumber || !!valid.encryptedCardNumber}\n showBrandIcon={showBrandIcon}\n dualBrandingElements={dualBrandingElements}\n />\n\n <AvailableBrands activeBrand={brand} brands={allowedBrands} />\n\n <div\n className={classNames('adyen-checkout__card__exp-cvc', {\n 'adyen-checkout__card__exp-cvc__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN\n })}\n >\n <ExpirationDate\n classNameModifiers={['col-50']}\n error={getError(errors, ENCRYPTED_EXPIRY_DATE)}\n focused={focusedElement === ENCRYPTED_EXPIRY_DATE}\n isValid={!!valid.encryptedExpiryMonth && !!valid.encryptedExpiryYear}\n filled={!!errors.encryptedExpiryDate || !!valid.encryptedExpiryYear}\n label={i18n.get('creditCard.expiryDate.label')}\n onFocusField={onFocusField}\n expiryDatePolicy={expiryDatePolicy}\n showContextualElement={showContextualElement}\n contextualText={i18n.get('creditCard.expiryDate.contextualText')}\n />\n\n {hasCVC && (\n <CVC\n classNameModifiers={['col-50']}\n error={getError(errors, ENCRYPTED_SECURITY_CODE)}\n focused={focusedElement === ENCRYPTED_SECURITY_CODE}\n cvcPolicy={cvcPolicy}\n isValid={!!valid.encryptedSecurityCode}\n filled={!!errors.encryptedSecurityCode || !!valid.encryptedSecurityCode}\n label={i18n.get('creditCard.securityCode.label')}\n onFocusField={onFocusField}\n frontCVC={isAmex}\n showContextualElement={showContextualElement}\n contextualText={cvcContextualText}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["CardFields","brand","brandsIcons","brandsConfiguration","dualBrandingElements","errors","focusedElement","hasCVC","cvcPolicy","expiryDatePolicy","onFocusField","showBrandIcon","valid","showContextualElement","i18n","useCoreContext","getError","fieldType","get","allowedBrands","filter","BRAND_ICON_UI_EXCLUSION_LIST","includes","name","isAmex","cvcContextualText","h","div","className","CardNumber","error","ENCRYPTED_CARD_NUMBER","focused","isValid","encryptedCardNumber","label","filled","AvailableBrands","activeBrand","brands","classNames","DATE_POLICY_HIDDEN","ExpirationDate","classNameModifiers","ENCRYPTED_EXPIRY_DATE","encryptedExpiryMonth","encryptedExpiryYear","encryptedExpiryDate","contextualText","CVC","ENCRYPTED_SECURITY_CODE","encryptedSecurityCode","frontCVC"],"mappings":"uiBAiBe,SAASA,GAAWC,MAC/BA,EAAKC,YACLA,EAAWC,oBACXA,EAAmBC,qBACnBA,EAAoBC,OACpBA,EAAMC,eACNA,EAAcC,OACdA,EAAMC,UACNA,EAASC,iBACTA,EAAgBC,aAChBA,EAAYC,cACZA,EAAaC,MACbA,EAAKC,sBACLA,IAEA,MAAMC,KAAEA,GAASC,IAEXC,EAAW,CAACX,EAAQY,IACfZ,EAAOY,GAAaH,EAAKI,IAAIb,EAAOY,IAAc,KAIvDE,EAAgBjB,GAAakB,OAAOlB,IAAgBmB,GAA8BC,SAASpB,EAAYqB,OACvGC,EAAmB,SAAVvB,EACTwB,EAAoBD,EACpBV,EAAKI,IAAI,kDACTJ,EAAKI,IAAI,kDAEf,OACIQ,EAACC,MAAAA,CAAIC,UAAU,8BACXF,EAACG,EAAAA,CACG5B,MAAOA,EACPE,oBAAqBA,EACrB2B,MAAOd,EAASX,EAAQ0B,GACxBC,QAAS1B,IAAmByB,EAC5BE,UAAWrB,EAAMsB,oBACjBC,MAAOrB,EAAKI,IAAI,+BAChBR,aAAcA,EACd0B,SAAU/B,EAAO6B,uBAAyBtB,EAAMsB,oBAChDvB,cAAeA,EACfP,qBAAsBA,IAG1BsB,EAACW,EAAAA,CAAgBC,YAAarC,EAAOsC,OAAQpB,IAE7CO,EAACC,MAAAA,CACGC,UAAWY,EAAW,gCAAiC,CACnD,yDAA0D/B,IAAqBgC,KAGnFf,EAACgB,EAAAA,CACGC,mBAAoB,CAAC,UACrBb,MAAOd,EAASX,EAAQuC,GACxBZ,QAAS1B,IAAmBsC,EAC5BX,UAAWrB,EAAMiC,wBAA0BjC,EAAMkC,oBACjDV,SAAU/B,EAAO0C,uBAAyBnC,EAAMkC,oBAChDX,MAAOrB,EAAKI,IAAI,+BAChBR,aAAcA,EACdD,iBAAkBA,EAClBI,sBAAuBA,EACvBmC,eAAgBlC,EAAKI,IAAI,0CAG5BX,GACGmB,EAACuB,EAAAA,CACGN,mBAAoB,CAAC,UACrBb,MAAOd,EAASX,EAAQ6C,GACxBlB,QAAS1B,IAAmB4C,EAC5B1C,UAAWA,EACXyB,UAAWrB,EAAMuC,sBACjBf,SAAU/B,EAAO8C,yBAA2BvC,EAAMuC,sBAClDhB,MAAOrB,EAAKI,IAAI,iCAChBR,aAAcA,EACd0C,SAAU5B,EACVX,sBAAuBA,EACvBmC,eAAgBvB,KAMxC"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"../../../../../_virtual/index.js";import a from"../../../../internal/FormFields/Field/Field.js";import{useCoreContext as i}from"../../../../../core/Context/CoreProvider.js";import o from"./DataSfSpan.js";import{DATE_POLICY_REQUIRED as n,DATE_POLICY_OPTIONAL as r,DATE_POLICY_HIDDEN as l,ENCRYPTED_EXPIRY_DATE as d}from"../../../../internal/SecuredFields/lib/constants.js";import c from"../../../../../core/Context/useImage.js";import{alternativeLabelContent as _}from"./FieldLabelAlternative.js";function s(s){const{label:p,focused:u,filled:m,onFocusField:f,className:x="",error:h="",isValid:y=!1,expiryDatePolicy:k=n,showContextualElement:F,contextualText:j}=s,{i18n:b}=i(),C=c(),N=t(x,{"adyen-checkout__field__exp-date":!0,"adyen-checkout__card__exp-date__input--hidden":k===l,"adyen-checkout__field__exp-date--optional":k===r}),g=k!==r?p:`${p} ${b.get("field.title.optional")}`,v=`${g} ${j}`;return e(a,{label:g,classNameModifiers:["expiryDate"],className:N,focused:u,filled:m,onFocusField:()=>f(d),errorMessage:h,isValid:y,dir:"ltr",name:"encryptedExpiryDate",i18n:b,contextVisibleToScreenReader:!1,useLabelElement:!1,renderAlternativeToLabel:_,showContextualElement:F,contextualText:j},e(o,{encryptedFieldType:d,className:t("adyen-checkout__input","adyen-checkout__input--small","adyen-checkout__card__exp-date__input",{"adyen-checkout__input--error":h,"adyen-checkout__input--focus":u,"adyen-checkout__input--valid":y})}),e("span",{className:t("adyen-checkout__field__exp-date_hint_wrapper",{"adyen-checkout__field__exp-date_hint_wrapper--hidden":h||y})},e("img",{src:C({imageFolder:"components/"})("expiry_date_hint"),className:"adyen-checkout__field__exp-date_hint",alt:v,onClick:()=>{f(d)}})))}export{s as default};
1
+ import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"../../../../../_virtual/index.js";import a from"../../../../internal/FormFields/Field/Field.js";import{useCoreContext as i}from"../../../../../core/Context/CoreProvider.js";import o from"./DataSfSpan.js";import{DATE_POLICY_REQUIRED as n,DATE_POLICY_OPTIONAL as r,DATE_POLICY_HIDDEN as l,ENCRYPTED_EXPIRY_DATE as d}from"../../../../internal/SecuredFields/lib/constants.js";import c from"../../../../../core/Context/useImage.js";import{alternativeLabelContent as s}from"./FieldLabelAlternative.js";function _(_){const{label:p,focused:u,filled:m,onFocusField:f,className:x="",classNameModifiers:h=[],error:y="",isValid:k=!1,expiryDatePolicy:F=n,showContextualElement:j,contextualText:b}=_,{i18n:N}=i(),C=c(),g=t(x,{"adyen-checkout__field__exp-date":!0,"adyen-checkout__card__exp-date__input--hidden":F===l,"adyen-checkout__field__exp-date--optional":F===r}),v=F!==r?p:`${p} ${N.get("field.title.optional")}`,E=`${v} ${b}`;return e(a,{label:v,classNameModifiers:[...h,"expiryDate"],className:g,focused:u,filled:m,onFocusField:()=>f(d),errorMessage:y,isValid:k,dir:"ltr",name:"encryptedExpiryDate",i18n:N,contextVisibleToScreenReader:!1,useLabelElement:!1,renderAlternativeToLabel:s,showContextualElement:j,contextualText:b},e(o,{encryptedFieldType:d,className:t("adyen-checkout__input","adyen-checkout__input--small","adyen-checkout__card__exp-date__input",{"adyen-checkout__input--error":y,"adyen-checkout__input--focus":u,"adyen-checkout__input--valid":k})}),e("span",{className:t("adyen-checkout__field__exp-date_hint_wrapper",{"adyen-checkout__field__exp-date_hint_wrapper--hidden":y||k})},e("img",{src:C({imageFolder:"components/"})("expiry_date_hint"),className:"adyen-checkout__field__exp-date_hint",alt:E,onClick:()=>{f(d)}})))}export{_ as default};
2
2
  //# sourceMappingURL=ExpirationDate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpirationDate.js","sources":["../../../../../../../src/components/Card/components/CardInput/components/ExpirationDate.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classNames from 'classnames';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { ExpirationDateProps } from './types';\nimport DataSfSpan from './DataSfSpan';\n\nimport {\n DATE_POLICY_HIDDEN,\n DATE_POLICY_OPTIONAL,\n DATE_POLICY_REQUIRED,\n ENCRYPTED_EXPIRY_DATE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport useImage from '../../../../../core/Context/useImage';\nimport { alternativeLabelContent } from './FieldLabelAlternative';\n\nexport default function ExpirationDate(props: ExpirationDateProps) {\n const {\n label,\n focused,\n filled,\n onFocusField,\n className = '',\n error = '',\n isValid = false,\n expiryDatePolicy = DATE_POLICY_REQUIRED,\n showContextualElement,\n contextualText\n } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n\n const fieldClassnames = classNames(className, {\n 'adyen-checkout__field__exp-date': true,\n 'adyen-checkout__card__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN,\n 'adyen-checkout__field__exp-date--optional': expiryDatePolicy === DATE_POLICY_OPTIONAL\n });\n\n const fieldLabel = expiryDatePolicy !== DATE_POLICY_OPTIONAL ? label : `${label} ${i18n.get('field.title.optional')}`;\n\n const handleIconClick = () => {\n onFocusField(ENCRYPTED_EXPIRY_DATE);\n };\n\n const imageDescription = `${fieldLabel} ${contextualText}`;\n\n return (\n <Field\n label={fieldLabel}\n classNameModifiers={['expiryDate']}\n className={fieldClassnames}\n focused={focused}\n filled={filled}\n onFocusField={() => onFocusField(ENCRYPTED_EXPIRY_DATE)}\n errorMessage={error}\n isValid={isValid}\n dir={'ltr'}\n name={'encryptedExpiryDate'}\n i18n={i18n}\n contextVisibleToScreenReader={false}\n useLabelElement={false}\n renderAlternativeToLabel={alternativeLabelContent}\n showContextualElement={showContextualElement}\n contextualText={contextualText}\n >\n <DataSfSpan\n encryptedFieldType={ENCRYPTED_EXPIRY_DATE}\n className={classNames('adyen-checkout__input', 'adyen-checkout__input--small', 'adyen-checkout__card__exp-date__input', {\n 'adyen-checkout__input--error': error,\n 'adyen-checkout__input--focus': focused,\n 'adyen-checkout__input--valid': isValid\n })}\n />\n <span\n className={classNames('adyen-checkout__field__exp-date_hint_wrapper', {\n 'adyen-checkout__field__exp-date_hint_wrapper--hidden': error || isValid\n })}\n >\n {/*eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions*/}\n <img\n src={getImage({ imageFolder: 'components/' })('expiry_date_hint')}\n className=\"adyen-checkout__field__exp-date_hint\"\n alt={imageDescription}\n onClick={handleIconClick}\n />\n </span>\n </Field>\n );\n}\n"],"names":["ExpirationDate","props","label","focused","filled","onFocusField","className","error","isValid","expiryDatePolicy","DATE_POLICY_REQUIRED","showContextualElement","contextualText","i18n","useCoreContext","getImage","useImage","fieldClassnames","classNames","DATE_POLICY_HIDDEN","DATE_POLICY_OPTIONAL","fieldLabel","get","imageDescription","h","Field","classNameModifiers","ENCRYPTED_EXPIRY_DATE","errorMessage","dir","name","contextVisibleToScreenReader","useLabelElement","renderAlternativeToLabel","alternativeLabelContent","DataSfSpan","encryptedFieldType","span","img","src","imageFolder","alt","onClick"],"mappings":"4kBAgBe,SAASA,EAAeC,GACnC,MAAMC,MACFA,EAAKC,QACLA,EAAOC,OACPA,EAAMC,aACNA,EAAYC,UACZA,EAAY,GAAEC,MACdA,EAAQ,GAAEC,QACVA,GAAU,EAAKC,iBACfA,EAAmBC,EAAoBC,sBACvCA,EAAqBC,eACrBA,GACAX,GACEY,KAAEA,GAASC,IACXC,EAAWC,IAEXC,EAAkBC,EAAWZ,EAAW,CAC1C,mCAAmC,EACnC,gDAAiDG,IAAqBU,EACtE,4CAA6CV,IAAqBW,IAGhEC,EAAaZ,IAAqBW,EAAuBlB,EAAQ,GAAGA,KAASW,EAAKS,IAAI,0BAMtFC,EAAmB,GAAGF,KAAcT,IAE1C,OACIY,EAACC,EAAAA,CACGvB,MAAOmB,EACPK,mBAAoB,CAAC,cACrBpB,UAAWW,EACXd,QAASA,EACTC,OAAQA,EACRC,aAAc,IAAMA,EAAasB,GACjCC,aAAcrB,EACdC,QAASA,EACTqB,IAAK,MACLC,KAAM,sBACNjB,KAAMA,EACNkB,8BAA8B,EAC9BC,iBAAiB,EACjBC,yBAA0BC,EAC1BvB,sBAAuBA,EACvBC,eAAgBA,GAEhBY,EAACW,EAAAA,CACGC,mBAAoBT,EACpBrB,UAAWY,EAAW,wBAAyB,+BAAgC,wCAAyC,CACpH,+BAAgCX,EAChC,+BAAgCJ,EAChC,+BAAgCK,MAGxCgB,EAACa,OAAAA,CACG/B,UAAWY,EAAW,+CAAgD,CAClE,uDAAwDX,GAASC,KAIrEgB,EAACc,MAAAA,CACGC,IAAKxB,EAAS,CAAEyB,YAAa,eAAxBzB,CAAyC,oBAC9CT,UAAU,uCACVmC,IAAKlB,EACLmB,QA3CQ,KACpBrC,EAAasB,OA+CrB"}
1
+ {"version":3,"file":"ExpirationDate.js","sources":["../../../../../../../src/components/Card/components/CardInput/components/ExpirationDate.tsx"],"sourcesContent":["import { h } from 'preact';\nimport classNames from 'classnames';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { ExpirationDateProps } from './types';\nimport DataSfSpan from './DataSfSpan';\n\nimport {\n DATE_POLICY_HIDDEN,\n DATE_POLICY_OPTIONAL,\n DATE_POLICY_REQUIRED,\n ENCRYPTED_EXPIRY_DATE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport useImage from '../../../../../core/Context/useImage';\nimport { alternativeLabelContent } from './FieldLabelAlternative';\n\nexport default function ExpirationDate(props: ExpirationDateProps) {\n const {\n label,\n focused,\n filled,\n onFocusField,\n className = '',\n classNameModifiers = [],\n error = '',\n isValid = false,\n expiryDatePolicy = DATE_POLICY_REQUIRED,\n showContextualElement,\n contextualText\n } = props;\n const { i18n } = useCoreContext();\n const getImage = useImage();\n\n const fieldClassnames = classNames(className, {\n 'adyen-checkout__field__exp-date': true,\n 'adyen-checkout__card__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN,\n 'adyen-checkout__field__exp-date--optional': expiryDatePolicy === DATE_POLICY_OPTIONAL\n });\n\n const fieldLabel = expiryDatePolicy !== DATE_POLICY_OPTIONAL ? label : `${label} ${i18n.get('field.title.optional')}`;\n\n const handleIconClick = () => {\n onFocusField(ENCRYPTED_EXPIRY_DATE);\n };\n\n const imageDescription = `${fieldLabel} ${contextualText}`;\n\n return (\n <Field\n label={fieldLabel}\n classNameModifiers={[...classNameModifiers, 'expiryDate']}\n className={fieldClassnames}\n focused={focused}\n filled={filled}\n onFocusField={() => onFocusField(ENCRYPTED_EXPIRY_DATE)}\n errorMessage={error}\n isValid={isValid}\n dir={'ltr'}\n name={'encryptedExpiryDate'}\n i18n={i18n}\n contextVisibleToScreenReader={false}\n useLabelElement={false}\n renderAlternativeToLabel={alternativeLabelContent}\n showContextualElement={showContextualElement}\n contextualText={contextualText}\n >\n <DataSfSpan\n encryptedFieldType={ENCRYPTED_EXPIRY_DATE}\n className={classNames('adyen-checkout__input', 'adyen-checkout__input--small', 'adyen-checkout__card__exp-date__input', {\n 'adyen-checkout__input--error': error,\n 'adyen-checkout__input--focus': focused,\n 'adyen-checkout__input--valid': isValid\n })}\n />\n <span\n className={classNames('adyen-checkout__field__exp-date_hint_wrapper', {\n 'adyen-checkout__field__exp-date_hint_wrapper--hidden': error || isValid\n })}\n >\n {/*eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions*/}\n <img\n src={getImage({ imageFolder: 'components/' })('expiry_date_hint')}\n className=\"adyen-checkout__field__exp-date_hint\"\n alt={imageDescription}\n onClick={handleIconClick}\n />\n </span>\n </Field>\n );\n}\n"],"names":["ExpirationDate","props","label","focused","filled","onFocusField","className","classNameModifiers","error","isValid","expiryDatePolicy","DATE_POLICY_REQUIRED","showContextualElement","contextualText","i18n","useCoreContext","getImage","useImage","fieldClassnames","classNames","DATE_POLICY_HIDDEN","DATE_POLICY_OPTIONAL","fieldLabel","get","imageDescription","h","Field","ENCRYPTED_EXPIRY_DATE","errorMessage","dir","name","contextVisibleToScreenReader","useLabelElement","renderAlternativeToLabel","alternativeLabelContent","DataSfSpan","encryptedFieldType","span","img","src","imageFolder","alt","onClick"],"mappings":"4kBAgBe,SAASA,EAAeC,GACnC,MAAMC,MACFA,EAAKC,QACLA,EAAOC,OACPA,EAAMC,aACNA,EAAYC,UACZA,EAAY,GAAEC,mBACdA,EAAqB,GAAEC,MACvBA,EAAQ,GAAEC,QACVA,GAAU,EAAKC,iBACfA,EAAmBC,EAAoBC,sBACvCA,EAAqBC,eACrBA,GACAZ,GACEa,KAAEA,GAASC,IACXC,EAAWC,IAEXC,EAAkBC,EAAWb,EAAW,CAC1C,mCAAmC,EACnC,gDAAiDI,IAAqBU,EACtE,4CAA6CV,IAAqBW,IAGhEC,EAAaZ,IAAqBW,EAAuBnB,EAAQ,GAAGA,KAASY,EAAKS,IAAI,0BAMtFC,EAAmB,GAAGF,KAAcT,IAE1C,OACIY,EAACC,EAAAA,CACGxB,MAAOoB,EACPf,mBAAoB,IAAIA,EAAoB,cAC5CD,UAAWY,EACXf,QAASA,EACTC,OAAQA,EACRC,aAAc,IAAMA,EAAasB,GACjCC,aAAcpB,EACdC,QAASA,EACToB,IAAK,MACLC,KAAM,sBACNhB,KAAMA,EACNiB,8BAA8B,EAC9BC,iBAAiB,EACjBC,yBAA0BC,EAC1BtB,sBAAuBA,EACvBC,eAAgBA,GAEhBY,EAACU,EAAAA,CACGC,mBAAoBT,EACpBrB,UAAWa,EAAW,wBAAyB,+BAAgC,wCAAyC,CACpH,+BAAgCX,EAChC,+BAAgCL,EAChC,+BAAgCM,MAGxCgB,EAACY,OAAAA,CACG/B,UAAWa,EAAW,+CAAgD,CAClE,uDAAwDX,GAASC,KAIrEgB,EAACa,MAAAA,CACGC,IAAKvB,EAAS,CAAEwB,YAAa,eAAxBxB,CAAyC,oBAC9CV,UAAU,uCACVmC,IAAKjB,EACLkB,QA3CQ,KACpBrC,EAAasB,OA+CrB"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"./CVC.js";import r from"../../../../internal/FormFields/Field/Field.js";import{useCoreContext as a}from"../../../../../core/Context/CoreProvider.js";import{ENCRYPTED_SECURITY_CODE as d}from"../../../../internal/SecuredFields/lib/constants.js";import c from"../../../../internal/FormFields/InputText.js";function i({brand:i,hasCVC:o,onFocusField:l,errors:s,valid:n,cvcPolicy:u,focusedElement:m,lastFour:p,expiryMonth:y,expiryYear:_,showContextualElement:C}){const{i18n:x}=a(),f=`${x.get("creditCard.storedCard.description.ariaLabel").replace("%@",p)}${y&&_?` ${x.get("creditCard.expiryDate.label")} ${y}/${_}`:""}`,F="amex"===i,h=F?x.get("creditCard.securityCode.contextualText.4digits"):x.get("creditCard.securityCode.contextualText.3digits");return e("div",{className:"adyen-checkout__card__form adyen-checkout__card__form--oneClick","aria-label":f},e("div",{className:"adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper"},y&&_&&e(r,{label:x.get("creditCard.expiryDate.label"),className:"adyen-checkout__field--50",classNameModifiers:["storedCard"],name:"expiryDateField",disabled:!0},e(c,{name:"expiryDateField",className:"adyen-checkout__input adyen-checkout__input--disabled adyen-checkout__card__exp-date__input--oneclick",value:`${y} / ${_}`,disabled:!0,dir:"ltr"})),o&&e(t,{cvcPolicy:u,error:((e,t)=>e[t]?x.get(e[t]):null)(s,d),focused:"encryptedSecurityCode"===m,filled:!!n.encryptedSecurityCode||!!s.encryptedSecurityCode,isValid:!!n.encryptedSecurityCode,label:x.get("creditCard.securityCode.label"),onFocusField:l,...y&&_&&{className:"adyen-checkout__field--50"},classNameModifiers:["storedCard"],frontCVC:F,showContextualElement:C,contextualText:h})))}export{i as default};
1
+ import{createElement as e}from"../../../../../external/preact/dist/preact.js";import t from"./CVC.js";import r from"../../../../internal/FormFields/Field/Field.js";import{useCoreContext as d}from"../../../../../core/Context/CoreProvider.js";import{ENCRYPTED_SECURITY_CODE as a}from"../../../../internal/SecuredFields/lib/constants.js";import i from"../../../../internal/FormFields/InputText.js";import o from"../../../../internal/FormFields/Fieldset/Fieldset.js";function c({brand:c,hasCVC:l,onFocusField:s,errors:n,valid:u,cvcPolicy:m,focusedElement:p,lastFour:C,expiryMonth:y,expiryYear:_,showContextualElement:x}){const{i18n:F}=d(),f=`${F.get("creditCard.storedCard.description.ariaLabel").replace("%@",C)}${y&&_?` ${F.get("creditCard.expiryDate.label")} ${y}/${_}`:""}`,b="amex"===c,h=b?F.get("creditCard.securityCode.contextualText.4digits"):F.get("creditCard.securityCode.contextualText.3digits");return e("div",{className:"adyen-checkout__card__form adyen-checkout__card__form--oneClick","aria-label":f},e(o,{classNamesFields:["adyen-checkout__card__exp-cvc"]},y&&_&&e(r,{label:F.get("creditCard.expiryDate.label"),classNameModifiers:["col-50","storedCard"],name:"expiryDateField",disabled:!0},e(i,{name:"expiryDateField",className:"adyen-checkout__input adyen-checkout__input--disabled adyen-checkout__card__exp-date__input--oneclick",value:`${y} / ${_}`,disabled:!0,dir:"ltr"})),l&&e(t,{cvcPolicy:m,error:((e,t)=>e[t]?F.get(e[t]):null)(n,a),focused:"encryptedSecurityCode"===p,filled:!!u.encryptedSecurityCode||!!n.encryptedSecurityCode,isValid:!!u.encryptedSecurityCode,label:F.get("creditCard.securityCode.label"),onFocusField:s,classNameModifiers:[...y&&_?["col-50","storedCard"]:["storedCard"]],frontCVC:b,showContextualElement:x,contextualText:h})))}export{c as default};
2
2
  //# sourceMappingURL=StoredCardFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StoredCardFields.js","sources":["../../../../../../../src/components/Card/components/CardInput/components/StoredCardFields.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CVC from './CVC';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { StoredCardFieldsProps } from './types';\nimport { ENCRYPTED_SECURITY_CODE } from '../../../../internal/SecuredFields/lib/constants';\nimport InputText from '../../../../internal/FormFields/InputText';\n\nexport default function StoredCardFields({\n brand,\n hasCVC,\n onFocusField,\n errors,\n valid,\n cvcPolicy,\n focusedElement,\n lastFour,\n expiryMonth,\n expiryYear,\n showContextualElement\n}: StoredCardFieldsProps) {\n const { i18n } = useCoreContext();\n const storedCardDescription = i18n.get('creditCard.storedCard.description.ariaLabel').replace('%@', lastFour);\n const storedCardDescriptionSuffix = expiryMonth && expiryYear ? ` ${i18n.get('creditCard.expiryDate.label')} ${expiryMonth}/${expiryYear}` : '';\n const ariaLabel = `${storedCardDescription}${storedCardDescriptionSuffix}`;\n const isAmex = brand === 'amex';\n const cvcContextualText = isAmex\n ? i18n.get('creditCard.securityCode.contextualText.4digits')\n : i18n.get('creditCard.securityCode.contextualText.3digits');\n\n const getError = (errors, fieldType) => {\n return errors[fieldType] ? i18n.get(errors[fieldType]) : null;\n };\n\n return (\n <div className=\"adyen-checkout__card__form adyen-checkout__card__form--oneClick\" aria-label={ariaLabel}>\n <div className=\"adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper\">\n {expiryMonth && expiryYear && (\n <Field\n label={i18n.get('creditCard.expiryDate.label')}\n className=\"adyen-checkout__field--50\"\n classNameModifiers={['storedCard']}\n name={'expiryDateField'}\n disabled\n >\n <InputText\n name={'expiryDateField'}\n className={'adyen-checkout__input adyen-checkout__input--disabled adyen-checkout__card__exp-date__input--oneclick'}\n value={`${expiryMonth} / ${expiryYear}`}\n disabled={true}\n dir={'ltr'}\n />\n </Field>\n )}\n\n {hasCVC && (\n <CVC\n cvcPolicy={cvcPolicy}\n error={getError(errors, ENCRYPTED_SECURITY_CODE)}\n focused={focusedElement === 'encryptedSecurityCode'}\n filled={!!valid.encryptedSecurityCode || !!errors.encryptedSecurityCode}\n isValid={!!valid.encryptedSecurityCode}\n label={i18n.get('creditCard.securityCode.label')}\n onFocusField={onFocusField}\n {...(expiryMonth && expiryYear && { className: 'adyen-checkout__field--50' })}\n classNameModifiers={['storedCard']}\n frontCVC={isAmex}\n showContextualElement={showContextualElement}\n contextualText={cvcContextualText}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["StoredCardFields","brand","hasCVC","onFocusField","errors","valid","cvcPolicy","focusedElement","lastFour","expiryMonth","expiryYear","showContextualElement","i18n","useCoreContext","ariaLabel","get","replace","isAmex","cvcContextualText","h","div","className","aria-label","Field","label","classNameModifiers","name","disabled","InputText","value","dir","CVC","error","fieldType","getError","ENCRYPTED_SECURITY_CODE","focused","filled","encryptedSecurityCode","isValid","frontCVC","contextualText"],"mappings":"2YAQe,SAASA,GAAiBC,MACrCA,EAAKC,OACLA,EAAMC,aACNA,EAAYC,OACZA,EAAMC,MACNA,EAAKC,UACLA,EAASC,eACTA,EAAcC,SACdA,EAAQC,YACRA,EAAWC,WACXA,EAAUC,sBACVA,IAEA,MAAMC,KAAEA,GAASC,IAGXC,EAAY,GAFYF,EAAKG,IAAI,+CAA+CC,QAAQ,KAAMR,KAChEC,GAAeC,EAAa,IAAIE,EAAKG,IAAI,kCAAkCN,KAAeC,IAAe,KAEvIO,EAAmB,SAAVhB,EACTiB,EAAoBD,EACpBL,EAAKG,IAAI,kDACTH,EAAKG,IAAI,kDAMf,OACII,EAACC,MAAAA,CAAIC,UAAU,kEAAkEC,aAAYR,GACzFK,EAACC,MAAAA,CAAIC,UAAU,+DACVZ,GAAeC,GACZS,EAACI,EAAAA,CACGC,MAAOZ,EAAKG,IAAI,+BAChBM,UAAU,4BACVI,mBAAoB,CAAC,cACrBC,KAAM,kBACNC,UAAAA,GAEAR,EAACS,EAAAA,CACGF,KAAM,kBACNL,UAAW,wGACXQ,MAAO,GAAGpB,OAAiBC,IAC3BiB,UAAU,EACVG,IAAK,SAKhB5B,GACGiB,EAACY,EAAAA,CACGzB,UAAWA,EACX0B,MA5BH,EAAC5B,EAAQ6B,IACf7B,EAAO6B,GAAarB,EAAKG,IAAIX,EAAO6B,IAAc,KA2BlCC,CAAS9B,EAAQ+B,GACxBC,QAA4B,0BAAnB7B,EACT8B,SAAUhC,EAAMiC,yBAA2BlC,EAAOkC,sBAClDC,UAAWlC,EAAMiC,sBACjBd,MAAOZ,EAAKG,IAAI,iCAChBZ,aAAcA,KACTM,GAAeC,GAAc,CAAEW,UAAW,6BAC/CI,mBAAoB,CAAC,cACrBe,SAAUvB,EACVN,sBAAuBA,EACvB8B,eAAgBvB,KAMxC"}
1
+ {"version":3,"file":"StoredCardFields.js","sources":["../../../../../../../src/components/Card/components/CardInput/components/StoredCardFields.tsx"],"sourcesContent":["import { h } from 'preact';\nimport CVC from './CVC';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { StoredCardFieldsProps } from './types';\nimport { ENCRYPTED_SECURITY_CODE } from '../../../../internal/SecuredFields/lib/constants';\nimport InputText from '../../../../internal/FormFields/InputText';\nimport Fieldset from '../../../../internal/FormFields/Fieldset';\n\nexport default function StoredCardFields({\n brand,\n hasCVC,\n onFocusField,\n errors,\n valid,\n cvcPolicy,\n focusedElement,\n lastFour,\n expiryMonth,\n expiryYear,\n showContextualElement\n}: StoredCardFieldsProps) {\n const { i18n } = useCoreContext();\n const storedCardDescription = i18n.get('creditCard.storedCard.description.ariaLabel').replace('%@', lastFour);\n const storedCardDescriptionSuffix = expiryMonth && expiryYear ? ` ${i18n.get('creditCard.expiryDate.label')} ${expiryMonth}/${expiryYear}` : '';\n const ariaLabel = `${storedCardDescription}${storedCardDescriptionSuffix}`;\n const isAmex = brand === 'amex';\n const cvcContextualText = isAmex\n ? i18n.get('creditCard.securityCode.contextualText.4digits')\n : i18n.get('creditCard.securityCode.contextualText.3digits');\n\n const getError = (errors, fieldType) => {\n return errors[fieldType] ? i18n.get(errors[fieldType]) : null;\n };\n\n return (\n <div className=\"adyen-checkout__card__form adyen-checkout__card__form--oneClick\" aria-label={ariaLabel}>\n <Fieldset classNamesFields={['adyen-checkout__card__exp-cvc']}>\n {expiryMonth && expiryYear && (\n <Field\n label={i18n.get('creditCard.expiryDate.label')}\n classNameModifiers={['col-50', 'storedCard']}\n name={'expiryDateField'}\n disabled\n >\n <InputText\n name={'expiryDateField'}\n className={'adyen-checkout__input adyen-checkout__input--disabled adyen-checkout__card__exp-date__input--oneclick'}\n value={`${expiryMonth} / ${expiryYear}`}\n disabled={true}\n dir={'ltr'}\n />\n </Field>\n )}\n\n {hasCVC && (\n <CVC\n cvcPolicy={cvcPolicy}\n error={getError(errors, ENCRYPTED_SECURITY_CODE)}\n focused={focusedElement === 'encryptedSecurityCode'}\n filled={!!valid.encryptedSecurityCode || !!errors.encryptedSecurityCode}\n isValid={!!valid.encryptedSecurityCode}\n label={i18n.get('creditCard.securityCode.label')}\n onFocusField={onFocusField}\n classNameModifiers={[...(expiryMonth && expiryYear ? ['col-50', 'storedCard'] : ['storedCard'])]}\n frontCVC={isAmex}\n showContextualElement={showContextualElement}\n contextualText={cvcContextualText}\n />\n )}\n </Fieldset>\n </div>\n );\n}\n"],"names":["StoredCardFields","brand","hasCVC","onFocusField","errors","valid","cvcPolicy","focusedElement","lastFour","expiryMonth","expiryYear","showContextualElement","i18n","useCoreContext","ariaLabel","get","replace","isAmex","cvcContextualText","h","div","className","aria-label","Fieldset","classNamesFields","Field","label","classNameModifiers","name","disabled","InputText","value","dir","CVC","error","fieldType","getError","ENCRYPTED_SECURITY_CODE","focused","filled","encryptedSecurityCode","isValid","frontCVC","contextualText"],"mappings":"+cASe,SAASA,GAAiBC,MACrCA,EAAKC,OACLA,EAAMC,aACNA,EAAYC,OACZA,EAAMC,MACNA,EAAKC,UACLA,EAASC,eACTA,EAAcC,SACdA,EAAQC,YACRA,EAAWC,WACXA,EAAUC,sBACVA,IAEA,MAAMC,KAAEA,GAASC,IAGXC,EAAY,GAFYF,EAAKG,IAAI,+CAA+CC,QAAQ,KAAMR,KAChEC,GAAeC,EAAa,IAAIE,EAAKG,IAAI,kCAAkCN,KAAeC,IAAe,KAEvIO,EAAmB,SAAVhB,EACTiB,EAAoBD,EACpBL,EAAKG,IAAI,kDACTH,EAAKG,IAAI,kDAMf,OACII,EAACC,MAAAA,CAAIC,UAAU,kEAAkEC,aAAYR,GACzFK,EAACI,EAAAA,CAASC,iBAAkB,CAAC,kCACxBf,GAAeC,GACZS,EAACM,EAAAA,CACGC,MAAOd,EAAKG,IAAI,+BAChBY,mBAAoB,CAAC,SAAU,cAC/BC,KAAM,kBACNC,UAAAA,GAEAV,EAACW,EAAAA,CACGF,KAAM,kBACNP,UAAW,wGACXU,MAAO,GAAGtB,OAAiBC,IAC3BmB,UAAU,EACVG,IAAK,SAKhB9B,GACGiB,EAACc,EAAAA,CACG3B,UAAWA,EACX4B,MA3BH,EAAC9B,EAAQ+B,IACf/B,EAAO+B,GAAavB,EAAKG,IAAIX,EAAO+B,IAAc,KA0BlCC,CAAShC,EAAQiC,GACxBC,QAA4B,0BAAnB/B,EACTgC,SAAUlC,EAAMmC,yBAA2BpC,EAAOoC,sBAClDC,UAAWpC,EAAMmC,sBACjBd,MAAOd,EAAKG,IAAI,iCAChBZ,aAAcA,EACdwB,mBAAoB,IAAKlB,GAAeC,EAAa,CAAC,SAAU,cAAgB,CAAC,eACjFgC,SAAUzB,EACVN,sBAAuBA,EACvBgC,eAAgBzB,KAMxC"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./defaultProps.js";import{DropinComponent as i}from"./components/DropinComponent.js";import{CoreProvider as n}from"../../core/Context/CoreProvider.js";import{getCommonProps as s}from"./components/utils.js";import r from"./elements/createElements.js";import a from"./elements/createStoredElements.js";import h from"./elements/createInstantPaymentElements.js";import{hasOwnProperty as d}from"../../utils/hasOwnProperty.js";import m from"../../core/Errors/SRPanelProvider.js";import p from"./elements/splitPaymentMethods.js";import{TxVariants as l}from"../tx-variants.js";function c(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const y=["paywithgoogle","googlepay","applepay"];class f extends e{storeElementRefOnCore(){this.core.storeElementReference(this)}formatProps(t){return{type:"dropin",...super.formatProps(t),instantPaymentTypes:Array.from(new Set(t.instantPaymentTypes)).filter(t=>y.includes(t))}}get isValid(){return!!this.dropinRef&&!!this.dropinRef.state.activePaymentMethod&&!!this.dropinRef.state.activePaymentMethod.isValid}showValidation(){return this.dropinRef.state.activePaymentMethod&&this.dropinRef.state.activePaymentMethod.showValidation(),this}setStatus(t,e={}){return this.dropinRef?.setStatus(t,e),this}get activePaymentMethod(){return this.dropinRef?.state||this.dropinRef?.state.activePaymentMethod?this.dropinRef.state.activePaymentMethod:null}get data(){return this.activePaymentMethod?this.dropinRef.state.activePaymentMethod.data:null}displayFinalAnimation(t){this.props.disableFinalAnimation||this.dropinRef?.setStatus(t)}submit(){if(!this.activePaymentMethod)throw new Error("No active payment method.");this.activePaymentMethod.isValid||this.activePaymentMethod.showValidation(),this.activePaymentMethod.isInstantPayment&&this.closeActivePaymentMethod(),this.activePaymentMethod.submit()}handleAction(t,e={}){if(!t||!t.type){if(d(t,"action")&&d(t,"resultCode"))throw new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?');throw new Error('handleAction::Invalid Action - the passed action object does not have a "type" property')}if("redirect"!==t.type&&this.activePaymentMethod?.updateWithAction)return this.activePaymentMethod.updateWithAction(t);this.elementRef instanceof f&&(e={...this.elementRef.activePaymentMethod?.props,...e});const o=this.core.createFromAction(t,{...e,elementRef:this.elementRef,onAdditionalDetails:this.handleAdditionalDetails,isDropin:!0});return o?(this.setStatus(o.props.statusType,{component:o}),this.componentFromAction=o,this):null}closeActivePaymentMethod(){this.dropinRef.closeActivePaymentMethod()}handleKeyPress(t){if("Enter"===t.key||"Enter"===t.code){if("radio"===document?.activeElement?.getAttribute("role"))return;super.handleKeyPress(t)}}onEnterKeyPressed(t,e){const o=this.activePaymentMethod??e;this.activePaymentMethod?.onEnterKeyPressed(t,o)}render(){return t(n,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(m,{srPanel:this.props.modules.srPanel},t(i,{...this.props,core:this.core,elementRef:this.elementRef,onCreateElements:this.handleCreate,ref:t=>{this.dropinRef=t}})))}constructor(t,e){super(t,e),c(this,"dropinRef",null),c(this,"paymentMethodsConfiguration",void 0),c(this,"componentFromAction",void 0),c(this,"handleCreate",()=>{const{paymentMethodsConfiguration:t,showStoredPaymentMethods:e,showPaymentMethods:o,instantPaymentTypes:i}=this.props,{paymentMethods:n,storedPaymentMethods:d,instantPaymentMethods:m,fastlanePaymentMethod:l}=p(this.core.paymentMethodsResponse,i),c=s({...this.props,elementRef:this.elementRef}),y=o?r(n,t,c,this.core):[],f=h(m,t,c,this.core);return[e?a(this.props.filterStoredPaymentMethods?.(d)??d,t,c,this.core):[],y,f,l?r([l],t,c,this.core):[]]}),c(this,"handleOrder",({order:t})=>{this.updateParent({order:t})}),this.submit=this.submit.bind(this),this.handleAction=this.handleAction.bind(this),this.props.paymentMethodComponents.forEach(t=>this.core.register(t)),this.paymentMethodsConfiguration=this.props.paymentMethodsConfiguration||{}}}c(f,"type",l.dropin),c(f,"defaultProps",o);export{f as default};
1
+ import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./defaultProps.js";import{DropinComponent as s}from"./components/DropinComponent.js";import{CoreProvider as n}from"../../core/Context/CoreProvider.js";import{getCommonProps as i}from"./components/utils.js";import r from"./elements/createElements.js";import a from"./elements/createStoredElements.js";import h from"./elements/createInstantPaymentElements.js";import{hasOwnProperty as d}from"../../utils/hasOwnProperty.js";import m from"../../core/Errors/SRPanelProvider.js";import p from"./elements/splitPaymentMethods.js";import{TxVariants as c}from"../tx-variants.js";function l(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const y=["paywithgoogle","googlepay","applepay"];class f extends e{storeElementRefOnCore(){this.core.storeElementReference(this)}formatProps(t){return{type:"dropin",...super.formatProps(t),instantPaymentTypes:Array.from(new Set(t.instantPaymentTypes)).filter(t=>y.includes(t))}}get isValid(){return!!this.dropinRef&&!!this.dropinRef.state.activePaymentMethod&&!!this.dropinRef.state.activePaymentMethod.isValid}showValidation(){return this.dropinRef.state.activePaymentMethod&&this.dropinRef.state.activePaymentMethod.showValidation(),this}setStatus(t,e={}){return this.dropinRef?.setStatus(t,e),this}get activePaymentMethod(){return this.dropinRef?.state||this.dropinRef?.state.activePaymentMethod?this.dropinRef.state.activePaymentMethod:null}get data(){return this.activePaymentMethod?this.dropinRef.state.activePaymentMethod.data:null}displayFinalAnimation(t){this.props.disableFinalAnimation||this.dropinRef?.setStatus(t)}submit(){if(!this.activePaymentMethod)throw new Error("No active payment method.");this.activePaymentMethod.isValid||this.activePaymentMethod.showValidation(),this.activePaymentMethod.isInstantPayment&&this.closeActivePaymentMethod(),this.activePaymentMethod.submit()}handleAction(t,e={}){if(!t||!t.type){if(d(t,"action")&&d(t,"resultCode"))throw new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?');throw new Error('handleAction::Invalid Action - the passed action object does not have a "type" property')}if("redirect"!==t.type&&this.activePaymentMethod?.updateWithAction)return this.activePaymentMethod.updateWithAction(t);this.elementRef instanceof f&&(e={...this.elementRef.activePaymentMethod?.props,...e});const o=this.core.createFromAction(t,{...e,elementRef:this.elementRef,isDropin:!0});return o?(this.setStatus(o.props.statusType,{component:o}),this.componentFromAction=o,this):null}closeActivePaymentMethod(){this.dropinRef.closeActivePaymentMethod()}handleKeyPress(t){if("Enter"===t.key||"Enter"===t.code){if("radio"===document?.activeElement?.getAttribute("role"))return;super.handleKeyPress(t)}}onEnterKeyPressed(t,e){const o=this.activePaymentMethod??e;this.activePaymentMethod?.onEnterKeyPressed(t,o)}render(){return t(n,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(m,{srPanel:this.props.modules.srPanel},t(s,{...this.props,core:this.core,elementRef:this.elementRef,onCreateElements:this.handleCreate,ref:t=>{this.dropinRef=t}})))}constructor(t,e){super(t,e),l(this,"dropinRef",null),l(this,"paymentMethodsConfiguration",void 0),l(this,"componentFromAction",void 0),l(this,"handleCreate",()=>{const{paymentMethodsConfiguration:t,showStoredPaymentMethods:e,showPaymentMethods:o,instantPaymentTypes:s}=this.props,{paymentMethods:n,storedPaymentMethods:d,instantPaymentMethods:m,fastlanePaymentMethod:c}=p(this.core.paymentMethodsResponse,s),l=i({...this.props,elementRef:this.elementRef}),y=o?r(n,t,l,this.core):[],f=h(m,t,l,this.core);return[e?a(this.props.filterStoredPaymentMethods?.(d)??d,t,l,this.core):[],y,f,c?r([c],t,l,this.core):[]]}),l(this,"handleOrder",({order:t})=>{this.updateParent({order:t})}),this.submit=this.submit.bind(this),this.handleAction=this.handleAction.bind(this),this.props.paymentMethodComponents.forEach(t=>this.core.register(t)),this.paymentMethodsConfiguration=this.props.paymentMethodsConfiguration||{}}}l(f,"type",c.dropin),l(f,"defaultProps",o);export{f as default};
2
2
  //# sourceMappingURL=Dropin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropin.js","sources":["../../../../src/components/Dropin/Dropin.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport defaultProps from './defaultProps';\nimport DropinComponent from '../../components/Dropin/components/DropinComponent';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { getCommonProps } from './components/utils';\nimport { createElements, createStoredElements } from './elements';\nimport createInstantPaymentElements from './elements/createInstantPaymentElements';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport splitPaymentMethods from './elements/splitPaymentMethods';\nimport { TxVariants } from '../tx-variants';\n\nimport type { DropinConfiguration, InstantPaymentTypes, PaymentMethodsConfiguration } from './types';\nimport type { PaymentAction, PaymentResponseData } from '../../types/global-types';\nimport type { ICore } from '../../core/types';\nimport type { IDropin } from './types';\n\nconst SUPPORTED_INSTANT_PAYMENTS = ['paywithgoogle', 'googlepay', 'applepay'];\n\nclass DropinElement extends UIElement<DropinConfiguration> implements IDropin {\n public static type = TxVariants.dropin;\n\n protected static defaultProps = defaultProps;\n\n public dropinRef = null;\n\n private paymentMethodsConfiguration: PaymentMethodsConfiguration;\n /**\n * Reference to the component created from `handleAction` (Ex.: ThreeDS2Challenge)\n */\n public componentFromAction?: UIElement;\n\n constructor(checkout: ICore, props?: DropinConfiguration) {\n super(checkout, props);\n this.submit = this.submit.bind(this);\n this.handleAction = this.handleAction.bind(this);\n\n this.props.paymentMethodComponents.forEach(PaymentMethod => this.core.register(PaymentMethod));\n this.paymentMethodsConfiguration = this.props.paymentMethodsConfiguration || {};\n }\n\n protected override storeElementRefOnCore() {\n this.core.storeElementReference(this);\n }\n\n formatProps(props) {\n return {\n type: 'dropin', // for analytics\n ...super.formatProps(props),\n instantPaymentTypes: Array.from<InstantPaymentTypes>(new Set(props.instantPaymentTypes)).filter(value =>\n SUPPORTED_INSTANT_PAYMENTS.includes(value)\n )\n };\n }\n\n get isValid() {\n return !!this.dropinRef && !!this.dropinRef.state.activePaymentMethod && !!this.dropinRef.state.activePaymentMethod.isValid;\n }\n\n showValidation() {\n if (this.dropinRef.state.activePaymentMethod) {\n this.dropinRef.state.activePaymentMethod.showValidation();\n }\n\n return this;\n }\n\n public setStatus(status, props = {}): this {\n this.dropinRef?.setStatus(status, props);\n return this;\n }\n\n get activePaymentMethod() {\n if (!this.dropinRef?.state && !this.dropinRef?.state.activePaymentMethod) {\n return null;\n }\n\n return this.dropinRef.state.activePaymentMethod;\n }\n\n get data() {\n if (!this.activePaymentMethod) {\n return null;\n }\n\n return this.dropinRef.state.activePaymentMethod.data;\n }\n\n public displayFinalAnimation(type: 'success' | 'error') {\n if (this.props.disableFinalAnimation) return;\n\n this.dropinRef?.setStatus(type);\n }\n\n /**\n * Calls the onSubmit event with the state of the activePaymentMethod\n */\n public override submit(): void {\n if (!this.activePaymentMethod) {\n throw new Error('No active payment method.');\n }\n\n if (!this.activePaymentMethod.isValid) {\n this.activePaymentMethod.showValidation();\n }\n\n if (this.activePaymentMethod.isInstantPayment) {\n this.closeActivePaymentMethod();\n }\n\n this.activePaymentMethod.submit();\n }\n\n /**\n * Creates the Drop-in elements\n */\n private handleCreate = () => {\n const { paymentMethodsConfiguration, showStoredPaymentMethods, showPaymentMethods, instantPaymentTypes } = this.props;\n\n const { paymentMethods, storedPaymentMethods, instantPaymentMethods, fastlanePaymentMethod } = splitPaymentMethods(\n this.core.paymentMethodsResponse,\n instantPaymentTypes\n );\n\n const commonProps = getCommonProps({ ...this.props, elementRef: this.elementRef });\n\n const elements = showPaymentMethods ? createElements(paymentMethods, paymentMethodsConfiguration, commonProps, this.core) : [];\n const instantPaymentElements = createInstantPaymentElements(instantPaymentMethods, paymentMethodsConfiguration, commonProps, this.core);\n const storedElements = showStoredPaymentMethods\n ? createStoredElements(\n this.props.filterStoredPaymentMethods?.(storedPaymentMethods) ?? storedPaymentMethods,\n paymentMethodsConfiguration,\n commonProps,\n this.core\n )\n : [];\n const fastlanePaymentElement = fastlanePaymentMethod\n ? createElements([fastlanePaymentMethod], paymentMethodsConfiguration, commonProps, this.core)\n : [];\n\n return [storedElements, elements, instantPaymentElements, fastlanePaymentElement];\n };\n\n public handleAction(action: PaymentAction, props = {}): this | null {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'handleAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('handleAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type !== 'redirect' && this.activePaymentMethod?.updateWithAction) {\n return this.activePaymentMethod.updateWithAction(action);\n }\n\n if (this.elementRef instanceof DropinElement) {\n props = {\n ...this.elementRef.activePaymentMethod?.props,\n ...props\n };\n }\n\n const paymentAction: UIElement = this.core.createFromAction(action, {\n ...props,\n elementRef: this.elementRef, // maintain elementRef for 3DS2 flow\n onAdditionalDetails: this.handleAdditionalDetails,\n isDropin: true\n });\n\n if (paymentAction) {\n this.setStatus(paymentAction.props.statusType, { component: paymentAction });\n this.componentFromAction = paymentAction;\n return this;\n }\n\n return null;\n }\n\n /**\n * handleOrder is implemented so we don't trigger a callback like in the components\n * @param response - PaymentResponse\n */\n protected handleOrder = ({ order }: PaymentResponseData): void => {\n void this.updateParent({ order });\n };\n\n closeActivePaymentMethod() {\n this.dropinRef.closeActivePaymentMethod();\n }\n\n protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent) {\n if (e.key === 'Enter' || e.code === 'Enter') {\n // If the active element has role=\"radio\", we're on a header in the PMList, in which case we don't want to validate the form, or, prevent the default behaviour\n const isPMHeader = document?.activeElement?.getAttribute('role') === 'radio';\n if (isPMHeader) {\n return;\n }\n super.handleKeyPress(e);\n }\n }\n\n protected onEnterKeyPressed(activeElement: Element, component: UIElement) {\n // We want to have a ref to the activePM, if we can; not a ref to the Dropin\n const pmComponent = this.activePaymentMethod ?? component;\n this.activePaymentMethod?.onEnterKeyPressed(activeElement, pmComponent);\n }\n\n render() {\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <SRPanelProvider srPanel={this.props.modules.srPanel}>\n <DropinComponent\n {...this.props}\n core={this.core}\n elementRef={this.elementRef}\n onCreateElements={this.handleCreate}\n ref={dropinRef => {\n this.dropinRef = dropinRef;\n }}\n />\n </SRPanelProvider>\n </CoreProvider>\n );\n }\n}\n\nexport default DropinElement;\n"],"names":["SUPPORTED_INSTANT_PAYMENTS","DropinElement","UIElement","storeElementRefOnCore","this","core","storeElementReference","formatProps","props","type","super","instantPaymentTypes","Array","from","Set","filter","value","includes","isValid","dropinRef","state","activePaymentMethod","showValidation","setStatus","status","data","displayFinalAnimation","disableFinalAnimation","submit","Error","isInstantPayment","closeActivePaymentMethod","handleAction","action","hasOwnProperty","updateWithAction","elementRef","paymentAction","createFromAction","onAdditionalDetails","handleAdditionalDetails","isDropin","statusType","component","componentFromAction","handleKeyPress","e","key","code","document","activeElement","getAttribute","onEnterKeyPressed","pmComponent","render","h","CoreProvider","i18n","loadingContext","resources","SRPanelProvider","srPanel","modules","DropinComponent","onCreateElements","handleCreate","ref","constructor","checkout","_define_property","paymentMethodsConfiguration","showStoredPaymentMethods","showPaymentMethods","paymentMethods","storedPaymentMethods","instantPaymentMethods","fastlanePaymentMethod","splitPaymentMethods","paymentMethodsResponse","commonProps","getCommonProps","elements","createElements","instantPaymentElements","createInstantPaymentElements","createStoredElements","filterStoredPaymentMethods","handleOrder","order","updateParent","bind","paymentMethodComponents","forEach","PaymentMethod","register","TxVariants","dropin","defaultProps"],"mappings":"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"}
1
+ {"version":3,"file":"Dropin.js","sources":["../../../../src/components/Dropin/Dropin.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport defaultProps from './defaultProps';\nimport DropinComponent from '../../components/Dropin/components/DropinComponent';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { getCommonProps } from './components/utils';\nimport { createElements, createStoredElements } from './elements';\nimport createInstantPaymentElements from './elements/createInstantPaymentElements';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport splitPaymentMethods from './elements/splitPaymentMethods';\nimport { TxVariants } from '../tx-variants';\n\nimport type { DropinConfiguration, InstantPaymentTypes, PaymentMethodsConfiguration } from './types';\nimport type { PaymentAction, PaymentResponseData } from '../../types/global-types';\nimport type { ICore } from '../../core/types';\nimport type { IDropin } from './types';\n\nconst SUPPORTED_INSTANT_PAYMENTS = ['paywithgoogle', 'googlepay', 'applepay'];\n\nclass DropinElement extends UIElement<DropinConfiguration> implements IDropin {\n public static type = TxVariants.dropin;\n\n protected static defaultProps = defaultProps;\n\n public dropinRef = null;\n\n private paymentMethodsConfiguration: PaymentMethodsConfiguration;\n /**\n * Reference to the component created from `handleAction` (Ex.: ThreeDS2Challenge)\n */\n public componentFromAction?: UIElement;\n\n constructor(checkout: ICore, props?: DropinConfiguration) {\n super(checkout, props);\n this.submit = this.submit.bind(this);\n this.handleAction = this.handleAction.bind(this);\n\n this.props.paymentMethodComponents.forEach(PaymentMethod => this.core.register(PaymentMethod));\n this.paymentMethodsConfiguration = this.props.paymentMethodsConfiguration || {};\n }\n\n protected override storeElementRefOnCore() {\n this.core.storeElementReference(this);\n }\n\n formatProps(props) {\n return {\n type: 'dropin', // for analytics\n ...super.formatProps(props),\n instantPaymentTypes: Array.from<InstantPaymentTypes>(new Set(props.instantPaymentTypes)).filter(value =>\n SUPPORTED_INSTANT_PAYMENTS.includes(value)\n )\n };\n }\n\n get isValid() {\n return !!this.dropinRef && !!this.dropinRef.state.activePaymentMethod && !!this.dropinRef.state.activePaymentMethod.isValid;\n }\n\n showValidation() {\n if (this.dropinRef.state.activePaymentMethod) {\n this.dropinRef.state.activePaymentMethod.showValidation();\n }\n\n return this;\n }\n\n public setStatus(status, props = {}): this {\n this.dropinRef?.setStatus(status, props);\n return this;\n }\n\n get activePaymentMethod() {\n if (!this.dropinRef?.state && !this.dropinRef?.state.activePaymentMethod) {\n return null;\n }\n\n return this.dropinRef.state.activePaymentMethod;\n }\n\n get data() {\n if (!this.activePaymentMethod) {\n return null;\n }\n\n return this.dropinRef.state.activePaymentMethod.data;\n }\n\n public displayFinalAnimation(type: 'success' | 'error') {\n if (this.props.disableFinalAnimation) return;\n\n this.dropinRef?.setStatus(type);\n }\n\n /**\n * Calls the onSubmit event with the state of the activePaymentMethod\n */\n public override submit(): void {\n if (!this.activePaymentMethod) {\n throw new Error('No active payment method.');\n }\n\n if (!this.activePaymentMethod.isValid) {\n this.activePaymentMethod.showValidation();\n }\n\n if (this.activePaymentMethod.isInstantPayment) {\n this.closeActivePaymentMethod();\n }\n\n this.activePaymentMethod.submit();\n }\n\n /**\n * Creates the Drop-in elements\n */\n private handleCreate = () => {\n const { paymentMethodsConfiguration, showStoredPaymentMethods, showPaymentMethods, instantPaymentTypes } = this.props;\n\n const { paymentMethods, storedPaymentMethods, instantPaymentMethods, fastlanePaymentMethod } = splitPaymentMethods(\n this.core.paymentMethodsResponse,\n instantPaymentTypes\n );\n\n const commonProps = getCommonProps({ ...this.props, elementRef: this.elementRef });\n\n const elements = showPaymentMethods ? createElements(paymentMethods, paymentMethodsConfiguration, commonProps, this.core) : [];\n const instantPaymentElements = createInstantPaymentElements(instantPaymentMethods, paymentMethodsConfiguration, commonProps, this.core);\n const storedElements = showStoredPaymentMethods\n ? createStoredElements(\n this.props.filterStoredPaymentMethods?.(storedPaymentMethods) ?? storedPaymentMethods,\n paymentMethodsConfiguration,\n commonProps,\n this.core\n )\n : [];\n const fastlanePaymentElement = fastlanePaymentMethod\n ? createElements([fastlanePaymentMethod], paymentMethodsConfiguration, commonProps, this.core)\n : [];\n\n return [storedElements, elements, instantPaymentElements, fastlanePaymentElement];\n };\n\n public handleAction(action: PaymentAction, props = {}): this | null {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'handleAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('handleAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type !== 'redirect' && this.activePaymentMethod?.updateWithAction) {\n return this.activePaymentMethod.updateWithAction(action);\n }\n\n if (this.elementRef instanceof DropinElement) {\n props = {\n ...this.elementRef.activePaymentMethod?.props,\n ...props\n };\n }\n\n const paymentAction: UIElement = this.core.createFromAction(action, {\n ...props,\n elementRef: this.elementRef, // maintain elementRef for 3DS2 flow\n isDropin: true\n });\n\n if (paymentAction) {\n this.setStatus(paymentAction.props.statusType, { component: paymentAction });\n this.componentFromAction = paymentAction;\n return this;\n }\n\n return null;\n }\n\n /**\n * handleOrder is implemented so we don't trigger a callback like in the components\n * @param response - PaymentResponse\n */\n protected handleOrder = ({ order }: PaymentResponseData): void => {\n void this.updateParent({ order });\n };\n\n closeActivePaymentMethod() {\n this.dropinRef.closeActivePaymentMethod();\n }\n\n protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent) {\n if (e.key === 'Enter' || e.code === 'Enter') {\n // If the active element has role=\"radio\", we're on a header in the PMList, in which case we don't want to validate the form, or, prevent the default behaviour\n const isPMHeader = document?.activeElement?.getAttribute('role') === 'radio';\n if (isPMHeader) {\n return;\n }\n super.handleKeyPress(e);\n }\n }\n\n protected onEnterKeyPressed(activeElement: Element, component: UIElement) {\n // We want to have a ref to the activePM, if we can; not a ref to the Dropin\n const pmComponent = this.activePaymentMethod ?? component;\n this.activePaymentMethod?.onEnterKeyPressed(activeElement, pmComponent);\n }\n\n render() {\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <SRPanelProvider srPanel={this.props.modules.srPanel}>\n <DropinComponent\n {...this.props}\n core={this.core}\n elementRef={this.elementRef}\n onCreateElements={this.handleCreate}\n ref={dropinRef => {\n this.dropinRef = dropinRef;\n }}\n />\n </SRPanelProvider>\n </CoreProvider>\n );\n }\n}\n\nexport default DropinElement;\n"],"names":["SUPPORTED_INSTANT_PAYMENTS","DropinElement","UIElement","storeElementRefOnCore","this","core","storeElementReference","formatProps","props","type","super","instantPaymentTypes","Array","from","Set","filter","value","includes","isValid","dropinRef","state","activePaymentMethod","showValidation","setStatus","status","data","displayFinalAnimation","disableFinalAnimation","submit","Error","isInstantPayment","closeActivePaymentMethod","handleAction","action","hasOwnProperty","updateWithAction","elementRef","paymentAction","createFromAction","isDropin","statusType","component","componentFromAction","handleKeyPress","e","key","code","document","activeElement","getAttribute","onEnterKeyPressed","pmComponent","render","h","CoreProvider","i18n","loadingContext","resources","SRPanelProvider","srPanel","modules","DropinComponent","onCreateElements","handleCreate","ref","constructor","checkout","_define_property","paymentMethodsConfiguration","showStoredPaymentMethods","showPaymentMethods","paymentMethods","storedPaymentMethods","instantPaymentMethods","fastlanePaymentMethod","splitPaymentMethods","paymentMethodsResponse","commonProps","getCommonProps","elements","createElements","instantPaymentElements","createInstantPaymentElements","createStoredElements","filterStoredPaymentMethods","handleOrder","order","updateParent","bind","paymentMethodComponents","forEach","PaymentMethod","register","TxVariants","dropin","defaultProps"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../../external/preact/dist/preact.js";function t({paymentMethods:t,onSelect:a}){return e("ul",{className:"adyen-checkout__instant-payment-methods-list"},t.map(t=>e("li",{key:t._id,"data-testid":t.type,onClick:()=>a(t)},t.render())))}export{t as default};
1
+ import{createElement as e}from"../../../../external/preact/dist/preact.js";function t({paymentMethods:t,onSelect:a}){return e("ul",{className:"adyen-checkout__instant-payment-methods-list"},t.map(t=>e("li",{key:t._id,"data-testid":t.type,onClickCapture:()=>a(t)},t.render())))}export{t as default};
2
2
  //# sourceMappingURL=InstantPaymentMethods.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InstantPaymentMethods.js","sources":["../../../../../../src/components/Dropin/components/PaymentMethod/InstantPaymentMethods.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../../../internal/UIElement/UIElement';\nimport './InstantPaymentMethods.scss';\n\ninterface InstantPaymentMethodsProps {\n paymentMethods: UIElement[];\n onSelect: (paymentMethod: UIElement) => void;\n}\n\nfunction InstantPaymentMethods({ paymentMethods, onSelect }: InstantPaymentMethodsProps) {\n return (\n <ul className=\"adyen-checkout__instant-payment-methods-list\">\n {paymentMethods.map(pm => (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n <li key={pm._id} data-testid={pm.type} onClick={() => onSelect(pm)}>\n {pm.render()}\n </li>\n ))}\n </ul>\n );\n}\n\nexport default InstantPaymentMethods;\n"],"names":["InstantPaymentMethods","paymentMethods","onSelect","h","ul","className","map","pm","li","key","_id","data-testid","type","onClick","render"],"mappings":"2EASA,SAASA,GAAsBC,eAAEA,EAAcC,SAAEA,IAC7C,OACIC,EAACC,KAAAA,CAAGC,UAAU,gDACTJ,EAAeK,IAAIC,GAEhBJ,EAACK,KAAAA,CAAGC,IAAKF,EAAGG,IAAKC,cAAaJ,EAAGK,KAAMC,QAAS,IAAMX,EAASK,IAC1DA,EAAGO,WAKxB"}
1
+ {"version":3,"file":"InstantPaymentMethods.js","sources":["../../../../../../src/components/Dropin/components/PaymentMethod/InstantPaymentMethods.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../../../internal/UIElement/UIElement';\nimport './InstantPaymentMethods.scss';\n\ninterface InstantPaymentMethodsProps {\n paymentMethods: UIElement[];\n onSelect: (paymentMethod: UIElement) => void;\n}\n\nfunction InstantPaymentMethods({ paymentMethods, onSelect }: InstantPaymentMethodsProps) {\n return (\n <ul className=\"adyen-checkout__instant-payment-methods-list\">\n {paymentMethods.map(pm => (\n /**\n * Apple Pay button click event does not bubble up, therefore we need to use 'onClickCapture' here\n * to capture the button interaction\n */\n <li key={pm._id} data-testid={pm.type} onClickCapture={() => onSelect(pm)}>\n {pm.render()}\n </li>\n ))}\n </ul>\n );\n}\n\nexport default InstantPaymentMethods;\n"],"names":["InstantPaymentMethods","paymentMethods","onSelect","h","ul","className","map","pm","li","key","_id","data-testid","type","onClickCapture","render"],"mappings":"2EASA,SAASA,GAAsBC,eAAEA,EAAcC,SAAEA,IAC7C,OACIC,EAACC,KAAAA,CAAGC,UAAU,gDACTJ,EAAeK,IAAIC,GAKhBJ,EAACK,KAAAA,CAAGC,IAAKF,EAAGG,IAAKC,cAAaJ,EAAGK,KAAMC,eAAgB,IAAMX,EAASK,IACjEA,EAAGO,WAKxB"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../../external/preact/dist/preact.js";import{useRef as n,useEffect as a}from"../../../external/preact/hooks/dist/hooks.js";import t from"../../../_virtual/index.js";import{getStyle as o}from"../utils/get-paypal-styles.js";import p from"../../internal/Spinner/Spinner.js";import{useCoreContext as c}from"../../../core/Context/CoreProvider.js";function r({onInit:r,onApprove:s,onClick:i,onCancel:l,onError:_,onShippingAddressChange:u,onShippingOptionsChange:y,onSubmit:d,isProcessingPayment:m,paypalRef:h,style:k,...g}){const{i18n:f}=c(),b="tokenize"===g.configuration?.intent,v=n(null),P=n(null),C=n(null),N=n(null),A=(e,n)=>{const a={...b&&{createBillingAgreement:d},...!b&&{createOrder:d},...!b&&"venmo"!==e&&u&&{onShippingAddressChange:u},...!b&&"venmo"!==e&&y&&{onShippingOptionsChange:y},fundingSource:e,style:o(e,k),onInit:r,onClick:i,onCancel:l,onError:_,onApprove:s},t=h.Buttons(a);t.isEligible()&&t.render(n.current)};a(()=>{const{PAYPAL:e,CREDIT:n,PAYLATER:a,VENMO:t}=h.FUNDING;A(e,v),g.blockPayPalCreditButton||A(n,P),g.blockPayPalPayLaterButton||A(a,C),g.blockPayPalVenmoButton||A(t,N)},[]);const E=!0===g.commit;return e("div",{className:t("adyen-checkout__paypal__buttons",{"adyen-checkout__paypal-processing":m})},e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--paypal",ref:v}),e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--credit",ref:P}),e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--pay-later",ref:C}),e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--venmo",ref:N}),m&&e("div",{className:"adyen-checkout__paypal"},e("div",{className:"adyen-checkout__paypal__status adyen-checkout__paypal__status--processing"},e(p,{size:"medium",inline:!0}),E&&f.get("paypal.processingPayment"))))}export{r as default};
1
+ import{createElement as e}from"../../../external/preact/dist/preact.js";import{useRef as n,useEffect as a}from"../../../external/preact/hooks/dist/hooks.js";import t from"../../../_virtual/index.js";import{getStyle as o}from"../utils/get-paypal-styles.js";import p from"../../internal/Spinner/Spinner.js";import{useCoreContext as c}from"../../../core/Context/CoreProvider.js";function r({onInit:r,onApprove:s,onClick:i,onCancel:l,onError:_,onShippingAddressChange:u,onShippingOptionsChange:y,onSubmit:d,isProcessingPayment:m,paypalRef:h,style:k,...g}){const{i18n:f}=c(),P="tokenize"===g.configuration?.intent,b=n(null),v=n(null),C=n(null),N=n(null),A=(e,n)=>{const a={...P&&{createBillingAgreement:d},...!P&&{createOrder:d},...!P&&"venmo"!==e&&u&&{onShippingAddressChange:u},...!P&&"venmo"!==e&&y&&{onShippingOptionsChange:y},fundingSource:e,style:o(e,k),onInit:r,onClick:i,onCancel:l,onError:_,onApprove:s},t=h.Buttons(a);t.isEligible()&&t.render(n.current)};a(()=>{const{PAYPAL:e,CREDIT:n,PAYLATER:a,VENMO:t}=h.FUNDING;g.blockPayPalButton||A(e,b),g.blockPayPalCreditButton||A(n,v),g.blockPayPalPayLaterButton||A(a,C),g.blockPayPalVenmoButton||A(t,N)},[]);const E=!0===g.commit;return e("div",{className:t("adyen-checkout__paypal__buttons",{"adyen-checkout__paypal-processing":m})},e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--paypal",ref:b}),e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--credit",ref:v}),e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--pay-later",ref:C}),e("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--venmo",ref:N}),m&&e("div",{className:"adyen-checkout__paypal"},e("div",{className:"adyen-checkout__paypal__status adyen-checkout__paypal__status--processing"},e(p,{size:"medium",inline:!0}),E&&f.get("paypal.processingPayment"))))}export{r as default};
2
2
  //# sourceMappingURL=PaypalButtons.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaypalButtons.js","sources":["../../../../../src/components/PayPal/components/PaypalButtons.tsx"],"sourcesContent":["import { h, RefObject } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport classnames from 'classnames';\nimport { getStyle } from '../utils/get-paypal-styles';\nimport Spinner from '../../internal/Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\nimport type { PayPalButtonsProps } from './types';\nimport type { FundingSource } from '../types';\n\nexport default function PaypalButtons({\n onInit,\n onApprove,\n onClick,\n onCancel,\n onError,\n onShippingAddressChange,\n onShippingOptionsChange,\n onSubmit,\n isProcessingPayment,\n paypalRef,\n style,\n ...props\n}: PayPalButtonsProps) {\n const { i18n } = useCoreContext();\n const isTokenize = props.configuration?.intent === 'tokenize';\n const paypalButtonRef = useRef<HTMLDivElement>(null);\n const creditButtonRef = useRef<HTMLDivElement>(null);\n const payLaterButtonRef = useRef<HTMLDivElement>(null);\n const venmoButtonRef = useRef<HTMLDivElement>(null);\n\n const createButton = (fundingSource: FundingSource, buttonRef: RefObject<HTMLDivElement>) => {\n const configuration = {\n ...(isTokenize && { createBillingAgreement: onSubmit }),\n ...(!isTokenize && { createOrder: onSubmit }),\n ...(!isTokenize && fundingSource !== 'venmo' && onShippingAddressChange && { onShippingAddressChange }),\n ...(!isTokenize && fundingSource !== 'venmo' && onShippingOptionsChange && { onShippingOptionsChange }),\n fundingSource,\n style: getStyle(fundingSource, style),\n onInit,\n onClick,\n onCancel,\n onError,\n onApprove\n };\n\n const button = paypalRef.Buttons(configuration);\n\n if (button.isEligible()) {\n button.render(buttonRef.current);\n }\n };\n\n useEffect(() => {\n const { PAYPAL, CREDIT, PAYLATER, VENMO } = paypalRef.FUNDING;\n\n createButton(PAYPAL, paypalButtonRef);\n\n if (!props.blockPayPalCreditButton) createButton(CREDIT, creditButtonRef);\n if (!props.blockPayPalPayLaterButton) createButton(PAYLATER, payLaterButtonRef);\n if (!props.blockPayPalVenmoButton) createButton(VENMO, venmoButtonRef);\n }, []);\n\n const isProcessingPaymentWithoutReviewPage = props.commit === true;\n\n return (\n <div className={classnames('adyen-checkout__paypal__buttons', { 'adyen-checkout__paypal-processing': isProcessingPayment })}>\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--paypal\" ref={paypalButtonRef} />\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--credit\" ref={creditButtonRef} />\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--pay-later\" ref={payLaterButtonRef} />\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--venmo\" ref={venmoButtonRef} />\n\n {isProcessingPayment && (\n <div className=\"adyen-checkout__paypal\">\n <div className=\"adyen-checkout__paypal__status adyen-checkout__paypal__status--processing\">\n <Spinner size=\"medium\" inline />\n {isProcessingPaymentWithoutReviewPage && i18n.get('paypal.processingPayment')}\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"names":["PaypalButtons","onInit","onApprove","onClick","onCancel","onError","onShippingAddressChange","onShippingOptionsChange","onSubmit","isProcessingPayment","paypalRef","style","props","i18n","useCoreContext","isTokenize","configuration","intent","paypalButtonRef","useRef","creditButtonRef","payLaterButtonRef","venmoButtonRef","createButton","fundingSource","buttonRef","createBillingAgreement","createOrder","getStyle","button","Buttons","isEligible","render","current","useEffect","PAYPAL","CREDIT","PAYLATER","VENMO","FUNDING","blockPayPalCreditButton","blockPayPalPayLaterButton","blockPayPalVenmoButton","isProcessingPaymentWithoutReviewPage","commit","h","div","className","classnames","ref","Spinner","size","inline","get"],"mappings":"wXAUe,SAASA,GAAcC,OAClCA,EAAMC,UACNA,EAASC,QACTA,EAAOC,SACPA,EAAQC,QACRA,EAAOC,wBACPA,EAAuBC,wBACvBA,EAAuBC,SACvBA,EAAQC,oBACRA,EAAmBC,UACnBA,EAASC,MACTA,KACGC,IAEH,MAAMC,KAAEA,GAASC,IACXC,EAA6C,aAAhCH,EAAMI,eAAeC,OAClCC,EAAkBC,EAAuB,MACzCC,EAAkBD,EAAuB,MACzCE,EAAoBF,EAAuB,MAC3CG,EAAiBH,EAAuB,MAExCI,EAAe,CAACC,EAA8BC,KAChD,MAAMT,EAAgB,IACdD,GAAc,CAAEW,uBAAwBlB,OACvCO,GAAc,CAAEY,YAAanB,OAC7BO,GAAgC,UAAlBS,GAA6BlB,GAA2B,CAAEA,+BACxES,GAAgC,UAAlBS,GAA6BjB,GAA2B,CAAEA,2BAC7EiB,gBACAb,MAAOiB,EAASJ,EAAeb,GAC/BV,SACAE,UACAC,WACAC,UACAH,aAGE2B,EAASnB,EAAUoB,QAAQd,GAE7Ba,EAAOE,cACPF,EAAOG,OAAOP,EAAUQ,UAIhCC,EAAU,KACN,MAAMC,OAAEA,EAAMC,OAAEA,EAAMC,SAAEA,EAAQC,MAAEA,GAAU5B,EAAU6B,QAEtDhB,EAAaY,EAAQjB,GAEhBN,EAAM4B,yBAAyBjB,EAAaa,EAAQhB,GACpDR,EAAM6B,2BAA2BlB,EAAac,EAAUhB,GACxDT,EAAM8B,wBAAwBnB,EAAae,EAAOhB,IACxD,IAEH,MAAMqB,GAAwD,IAAjB/B,EAAMgC,OAEnD,OACIC,EAACC,MAAAA,CAAIC,UAAWC,EAAW,kCAAmC,CAAE,oCAAqCvC,KACjGoC,EAACC,MAAAA,CAAIC,UAAU,wEAAwEE,IAAK/B,IAC5F2B,EAACC,MAAAA,CAAIC,UAAU,wEAAwEE,IAAK7B,IAC5FyB,EAACC,MAAAA,CAAIC,UAAU,2EAA2EE,IAAK5B,IAC/FwB,EAACC,MAAAA,CAAIC,UAAU,uEAAuEE,IAAK3B,IAE1Fb,GACGoC,EAACC,MAAAA,CAAIC,UAAU,0BACXF,EAACC,MAAAA,CAAIC,UAAU,6EACXF,EAACK,EAAAA,CAAQC,KAAK,SAASC,QAAAA,IACtBT,GAAwC9B,EAAKwC,IAAI,8BAM1E"}
1
+ {"version":3,"file":"PaypalButtons.js","sources":["../../../../../src/components/PayPal/components/PaypalButtons.tsx"],"sourcesContent":["import { h, RefObject } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport classnames from 'classnames';\nimport { getStyle } from '../utils/get-paypal-styles';\nimport Spinner from '../../internal/Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\nimport type { PayPalButtonsProps } from './types';\nimport type { FundingSource } from '../types';\n\nexport default function PaypalButtons({\n onInit,\n onApprove,\n onClick,\n onCancel,\n onError,\n onShippingAddressChange,\n onShippingOptionsChange,\n onSubmit,\n isProcessingPayment,\n paypalRef,\n style,\n ...props\n}: PayPalButtonsProps) {\n const { i18n } = useCoreContext();\n const isTokenize = props.configuration?.intent === 'tokenize';\n const paypalButtonRef = useRef<HTMLDivElement>(null);\n const creditButtonRef = useRef<HTMLDivElement>(null);\n const payLaterButtonRef = useRef<HTMLDivElement>(null);\n const venmoButtonRef = useRef<HTMLDivElement>(null);\n\n const createButton = (fundingSource: FundingSource, buttonRef: RefObject<HTMLDivElement>) => {\n const configuration = {\n ...(isTokenize && { createBillingAgreement: onSubmit }),\n ...(!isTokenize && { createOrder: onSubmit }),\n ...(!isTokenize && fundingSource !== 'venmo' && onShippingAddressChange && { onShippingAddressChange }),\n ...(!isTokenize && fundingSource !== 'venmo' && onShippingOptionsChange && { onShippingOptionsChange }),\n fundingSource,\n style: getStyle(fundingSource, style),\n onInit,\n onClick,\n onCancel,\n onError,\n onApprove\n };\n\n const button = paypalRef.Buttons(configuration);\n\n if (button.isEligible()) {\n button.render(buttonRef.current);\n }\n };\n\n useEffect(() => {\n const { PAYPAL, CREDIT, PAYLATER, VENMO } = paypalRef.FUNDING;\n\n if (!props.blockPayPalButton) createButton(PAYPAL, paypalButtonRef);\n if (!props.blockPayPalCreditButton) createButton(CREDIT, creditButtonRef);\n if (!props.blockPayPalPayLaterButton) createButton(PAYLATER, payLaterButtonRef);\n if (!props.blockPayPalVenmoButton) createButton(VENMO, venmoButtonRef);\n }, []);\n\n const isProcessingPaymentWithoutReviewPage = props.commit === true;\n\n return (\n <div className={classnames('adyen-checkout__paypal__buttons', { 'adyen-checkout__paypal-processing': isProcessingPayment })}>\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--paypal\" ref={paypalButtonRef} />\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--credit\" ref={creditButtonRef} />\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--pay-later\" ref={payLaterButtonRef} />\n <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--venmo\" ref={venmoButtonRef} />\n\n {isProcessingPayment && (\n <div className=\"adyen-checkout__paypal\">\n <div className=\"adyen-checkout__paypal__status adyen-checkout__paypal__status--processing\">\n <Spinner size=\"medium\" inline />\n {isProcessingPaymentWithoutReviewPage && i18n.get('paypal.processingPayment')}\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"names":["PaypalButtons","onInit","onApprove","onClick","onCancel","onError","onShippingAddressChange","onShippingOptionsChange","onSubmit","isProcessingPayment","paypalRef","style","props","i18n","useCoreContext","isTokenize","configuration","intent","paypalButtonRef","useRef","creditButtonRef","payLaterButtonRef","venmoButtonRef","createButton","fundingSource","buttonRef","createBillingAgreement","createOrder","getStyle","button","Buttons","isEligible","render","current","useEffect","PAYPAL","CREDIT","PAYLATER","VENMO","FUNDING","blockPayPalButton","blockPayPalCreditButton","blockPayPalPayLaterButton","blockPayPalVenmoButton","isProcessingPaymentWithoutReviewPage","commit","h","div","className","classnames","ref","Spinner","size","inline","get"],"mappings":"wXAUe,SAASA,GAAcC,OAClCA,EAAMC,UACNA,EAASC,QACTA,EAAOC,SACPA,EAAQC,QACRA,EAAOC,wBACPA,EAAuBC,wBACvBA,EAAuBC,SACvBA,EAAQC,oBACRA,EAAmBC,UACnBA,EAASC,MACTA,KACGC,IAEH,MAAMC,KAAEA,GAASC,IACXC,EAA6C,aAAhCH,EAAMI,eAAeC,OAClCC,EAAkBC,EAAuB,MACzCC,EAAkBD,EAAuB,MACzCE,EAAoBF,EAAuB,MAC3CG,EAAiBH,EAAuB,MAExCI,EAAe,CAACC,EAA8BC,KAChD,MAAMT,EAAgB,IACdD,GAAc,CAAEW,uBAAwBlB,OACvCO,GAAc,CAAEY,YAAanB,OAC7BO,GAAgC,UAAlBS,GAA6BlB,GAA2B,CAAEA,+BACxES,GAAgC,UAAlBS,GAA6BjB,GAA2B,CAAEA,2BAC7EiB,gBACAb,MAAOiB,EAASJ,EAAeb,GAC/BV,SACAE,UACAC,WACAC,UACAH,aAGE2B,EAASnB,EAAUoB,QAAQd,GAE7Ba,EAAOE,cACPF,EAAOG,OAAOP,EAAUQ,UAIhCC,EAAU,KACN,MAAMC,OAAEA,EAAMC,OAAEA,EAAMC,SAAEA,EAAQC,MAAEA,GAAU5B,EAAU6B,QAEjD3B,EAAM4B,mBAAmBjB,EAAaY,EAAQjB,GAC9CN,EAAM6B,yBAAyBlB,EAAaa,EAAQhB,GACpDR,EAAM8B,2BAA2BnB,EAAac,EAAUhB,GACxDT,EAAM+B,wBAAwBpB,EAAae,EAAOhB,IACxD,IAEH,MAAMsB,GAAwD,IAAjBhC,EAAMiC,OAEnD,OACIC,EAACC,MAAAA,CAAIC,UAAWC,EAAW,kCAAmC,CAAE,oCAAqCxC,KACjGqC,EAACC,MAAAA,CAAIC,UAAU,wEAAwEE,IAAKhC,IAC5F4B,EAACC,MAAAA,CAAIC,UAAU,wEAAwEE,IAAK9B,IAC5F0B,EAACC,MAAAA,CAAIC,UAAU,2EAA2EE,IAAK7B,IAC/FyB,EAACC,MAAAA,CAAIC,UAAU,uEAAuEE,IAAK5B,IAE1Fb,GACGqC,EAACC,MAAAA,CAAIC,UAAU,0BACXF,EAACC,MAAAA,CAAIC,UAAU,6EACXF,EAACK,EAAAA,CAAQC,KAAK,SAASC,QAAAA,IACtBT,GAAwC/B,EAAKyC,IAAI,8BAM1E"}
@@ -1,2 +1,2 @@
1
- const t={isExpress:!1,userAction:"pay",commit:!0,vault:!1,enableMessages:!1,style:{height:50},blockPayPalCreditButton:!1,blockPayPalPayLaterButton:!1,blockPayPalVenmoButton:!1};export{t as default};
1
+ const t={isExpress:!1,userAction:"pay",commit:!0,vault:!1,enableMessages:!1,style:{height:50},blockPayPalButton:!1,blockPayPalCreditButton:!1,blockPayPalPayLaterButton:!1,blockPayPalVenmoButton:!1};export{t as default};
2
2
  //# sourceMappingURL=defaultProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultProps.js","sources":["../../../../src/components/PayPal/defaultProps.ts"],"sourcesContent":["import { PayPalConfiguration } from './types';\n\nconst defaultProps: Partial<PayPalConfiguration> = {\n isExpress: false,\n userAction: 'pay',\n commit: true,\n vault: false,\n enableMessages: false,\n style: {\n height: 50 // The height of the buttons is set to 50px to align with the default size of our Pay buttons.\n },\n blockPayPalCreditButton: false,\n blockPayPalPayLaterButton: false,\n blockPayPalVenmoButton: false\n};\n\nexport default defaultProps;\n"],"names":["defaultProps","isExpress","userAction","commit","vault","enableMessages","style","height","blockPayPalCreditButton","blockPayPalPayLaterButton","blockPayPalVenmoButton"],"mappings":"AAEA,MAAMA,EAA6C,CAC/CC,WAAW,EACXC,WAAY,MACZC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,MAAO,CACHC,OAAQ,IAEZC,yBAAyB,EACzBC,2BAA2B,EAC3BC,wBAAwB"}
1
+ {"version":3,"file":"defaultProps.js","sources":["../../../../src/components/PayPal/defaultProps.ts"],"sourcesContent":["import { PayPalConfiguration } from './types';\n\nconst defaultProps: Partial<PayPalConfiguration> = {\n isExpress: false,\n userAction: 'pay',\n commit: true,\n vault: false,\n enableMessages: false,\n style: {\n height: 50 // The height of the buttons is set to 50px to align with the default size of our Pay buttons.\n },\n blockPayPalButton: false,\n blockPayPalCreditButton: false,\n blockPayPalPayLaterButton: false,\n blockPayPalVenmoButton: false\n};\n\nexport default defaultProps;\n"],"names":["defaultProps","isExpress","userAction","commit","vault","enableMessages","style","height","blockPayPalButton","blockPayPalCreditButton","blockPayPalPayLaterButton","blockPayPalVenmoButton"],"mappings":"AAEA,MAAMA,EAA6C,CAC/CC,WAAW,EACXC,WAAY,MACZC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,MAAO,CACHC,OAAQ,IAEZC,mBAAmB,EACnBC,yBAAyB,EACzBC,2BAA2B,EAC3BC,wBAAwB"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./components/Challenge/PrepareChallenge3DS2.js";import{THREEDS2_CHALLENGE_ERROR as r,THREEDS2_FULL as n,THREEDS2_CHALLENGE as s,DEFAULT_CHALLENGE_WINDOW_SIZE as i}from"./constants.js";import{existy as a}from"../../utils/commonUtils.js";import{hasOwnProperty as p}from"../../utils/hasOwnProperty.js";import{TxVariants as l}from"../tx-variants.js";import m,{API_ERROR as c}from"../../core/Errors/AdyenCheckoutError.js";import{ANALYTICS_ERROR_TYPE as u,Analytics3DS2Errors as y,ANALYTICS_RENDERED_STR as h,Analytics3DS2Events as A}from"../../core/Analytics/constants.js";import{CoreProvider as d}from"../../core/Context/CoreProvider.js";import{AnalyticsLogEvent as f}from"../../core/Analytics/AnalyticsLogEvent.js";import{AnalyticsInfoEvent as E}from"../../core/Analytics/AnalyticsInfoEvent.js";import{AnalyticsErrorEvent as C}from"../../core/Analytics/AnalyticsErrorEvent.js";function D(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class j extends e{onComplete(t){t&&super.onComplete(t),this.unmount()}render(){if(!a(this.props.paymentData)){const t=p(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new m(c,`No ${t} received. 3DS2 Challenge cannot proceed`));const e=new C({code:y.ACTION_IS_MISSING_PAYMENT_DATA,errorType:u.apiError,message:`${r}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return t(d,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(o,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...t){super(...t),D(this,"submitAnalytics",t=>{t instanceof E&&t.type===h||super.submitAnalytics(t)}),D(this,"onActionHandled",t=>{const e=new f({type:n,message:t.actionDescription,subType:A.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(e),super.onActionHandled(t)})}}D(j,"type",l.threeDS2Challenge),D(j,"defaultProps",{dataKey:"threeDSResult",size:i,type:s});export{j as default};
1
+ import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./components/Challenge/PrepareChallenge3DS2.js";import{THREEDS2_CHALLENGE_ERROR as r,THREEDS2_FULL as s,THREEDS2_CHALLENGE as n,DEFAULT_CHALLENGE_WINDOW_SIZE as i}from"./constants.js";import{existy as a}from"../../utils/commonUtils.js";import{hasOwnProperty as p}from"../../utils/hasOwnProperty.js";import{TxVariants as l}from"../tx-variants.js";import m,{API_ERROR as c}from"../../core/Errors/AdyenCheckoutError.js";import{ANALYTICS_ERROR_TYPE as u,Analytics3DS2Errors as h,ANALYTICS_RENDERED_STR as y,Analytics3DS2Events as A}from"../../core/Analytics/constants.js";import{CoreProvider as f}from"../../core/Context/CoreProvider.js";import{AnalyticsLogEvent as d}from"../../core/Analytics/AnalyticsLogEvent.js";import{AnalyticsInfoEvent as C}from"../../core/Analytics/AnalyticsInfoEvent.js";import{AnalyticsErrorEvent as E}from"../../core/Analytics/AnalyticsErrorEvent.js";function D(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class j extends e{onComplete(t){this.props.onComplete?this.props.onComplete(t,this.elementRef):super.onComplete(t),this.unmount()}render(){if(!a(this.props.paymentData)){const t=p(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new m(c,`No ${t} received. 3DS2 Challenge cannot proceed`));const e=new E({code:h.ACTION_IS_MISSING_PAYMENT_DATA,errorType:u.apiError,message:`${r}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return t(f,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},t(o,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...t){super(...t),D(this,"submitAnalytics",t=>{t instanceof C&&t.type===y||super.submitAnalytics(t)}),D(this,"onActionHandled",t=>{const e=new d({type:s,message:t.actionDescription,subType:A.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(e),super.onActionHandled(t)})}}D(j,"type",l.threeDS2Challenge),D(j,"defaultProps",{dataKey:"threeDSResult",size:i,type:n});export{j as default};
2
2
  //# sourceMappingURL=ThreeDS2Challenge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThreeDS2Challenge.js","sources":["../../../../src/components/ThreeDS2/ThreeDS2Challenge.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareChallenge from './components/Challenge';\nimport { DEFAULT_CHALLENGE_WINDOW_SIZE, THREEDS2_CHALLENGE, THREEDS2_CHALLENGE_ERROR, THREEDS2_FULL } from './constants';\nimport { existy } from '../../utils/commonUtils';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport { TxVariants } from '../tx-variants';\nimport { ThreeDS2ChallengeConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration> {\n public static type = TxVariants.threeDS2Challenge;\n\n public static defaultProps = {\n dataKey: 'threeDSResult',\n size: DEFAULT_CHALLENGE_WINDOW_SIZE,\n type: THREEDS2_CHALLENGE\n };\n\n protected submitAnalytics = (aObj: AnalyticsEvent) => {\n if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"creq sent\" event)\n\n super.submitAnalytics(aObj);\n };\n\n protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: rtnObj.actionDescription,\n subType: Analytics3DS2Events.CHALLENGE_IFRAME_LOADED\n });\n\n this.submitAnalytics(event);\n\n super.onActionHandled(rtnObj);\n };\n\n onComplete(state) {\n /**\n * Equals a call to onAdditionalDetails (as set in actionTypes.ts) for the regular, \"native\" flow.\n * However, if the action to create this component came from the 3DS2InMDFlow process it will instead equal a call to the onComplete callback\n * (as defined in the 3DS2InMDFlow and passed in as a config prop).\n */\n if (state) super.onComplete(state);\n this.unmount(); // re. fixing issue around back to back challenge calls\n }\n\n render() {\n // existy used because threeds2InMDFlow will send empty string for paymentData and we should be allowed to proceed with this\n if (!existy(this.props.paymentData)) {\n /**\n * The presence of props.isMDFlow indicates the action to create this component came from the threeds2InMDFlow process which passes (an empty) paymentsData.\n * The regular, \"native\" flow uses the authorisationToken from the 3DS2 action, which actionTypes.ts assigns to a property called paymentData\n */\n const dataTypeForError = hasOwnProperty(this.props, 'isMDFlow') ? 'paymentData' : 'authorisationToken';\n\n this.props.onError(new AdyenCheckoutError(API_ERROR, `No ${dataTypeForError} received. 3DS2 Challenge cannot proceed`));\n\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: Missing 'paymentData' property from threeDS2 action`\n });\n\n this.submitAnalytics(event);\n\n return null;\n }\n\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <PrepareChallenge\n {...this.props}\n onComplete={this.onComplete}\n onSubmitAnalytics={this.submitAnalytics}\n isMDFlow={this.props.paymentData.length < 15}\n onActionHandled={this.onActionHandled}\n />\n </CoreProvider>\n );\n }\n}\n\nexport default ThreeDS2Challenge;\n"],"names":["ThreeDS2Challenge","UIElement","onComplete","state","super","this","unmount","render","existy","props","paymentData","dataTypeForError","hasOwnProperty","onError","AdyenCheckoutError","API_ERROR","event","AnalyticsErrorEvent","code","Analytics3DS2Errors","ACTION_IS_MISSING_PAYMENT_DATA","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_CHALLENGE_ERROR","submitAnalytics","h","CoreProvider","i18n","loadingContext","resources","PrepareChallenge","onSubmitAnalytics","isMDFlow","length","onActionHandled","args","_define_property","aObj","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","rtnObj","AnalyticsLogEvent","THREEDS2_FULL","actionDescription","subType","Analytics3DS2Events","CHALLENGE_IFRAME_LOADED","TxVariants","threeDS2Challenge","defaultProps","dataKey","size","DEFAULT_CHALLENGE_WINDOW_SIZE","THREEDS2_CHALLENGE"],"mappings":"onCAiBA,MAAMA,UAA0BC,EA2B5BC,UAAAA,CAAWC,GAMHA,GAAOC,MAAMF,WAAWC,GAC5BE,KAAKC,SACT,CAEAC,MAAAA,GAEI,IAAKC,EAAOH,KAAKI,MAAMC,aAAc,CAKjC,MAAMC,EAAmBC,EAAeP,KAAKI,MAAO,YAAc,cAAgB,qBAElFJ,KAAKI,MAAMI,QAAQ,IAAIC,EAAmBC,EAAW,MAAMJ,8CAE3D,MAAMK,EAAQ,IAAIC,EAAoB,CAClCC,KAAMC,EAAoBC,+BAC1BC,UAAWC,EAAqBC,SAChCC,QAAS,GAAGC,2DAKhB,OAFApB,KAAKqB,gBAAgBV,GAEd,IACX,CAEA,OACIW,EAACC,EAAAA,CAAaC,KAAMxB,KAAKI,MAAMoB,KAAMC,eAAgBzB,KAAKI,MAAMqB,eAAgBC,UAAW1B,KAAK0B,WAC5FJ,EAACK,EAAAA,IACO3B,KAAKI,MACTP,WAAYG,KAAKH,WACjB+B,kBAAmB5B,KAAKqB,gBACxBQ,SAAU7B,KAAKI,MAAMC,YAAYyB,OAAS,GAC1CC,gBAAiB/B,KAAK+B,kBAItC,mBAtEJhC,SAAAiC,GASIC,EAAAjC,KAAUqB,kBAAmBa,IACrBA,aAAgBC,GAAsBD,EAAKE,OAASC,GAExDtC,MAAMsB,gBAAgBa,KAG1BD,EAAAjC,KAAU+B,kBAAmBO,IACzB,MAAM3B,EAAQ,IAAI4B,EAAkB,CAChCH,KAAMI,EACNrB,QAASmB,EAAOG,kBAChBC,QAASC,EAAoBC,0BAGjC5C,KAAKqB,gBAAgBV,GAErBZ,MAAMgC,gBAAgBO,MAvB1BL,EADEtC,EACYyC,OAAOS,EAAWC,mBAEhCb,EAHEtC,EAGYoD,eAAe,CACzBC,QAAS,gBACTC,KAAMC,EACNd,KAAMe"}
1
+ {"version":3,"file":"ThreeDS2Challenge.js","sources":["../../../../src/components/ThreeDS2/ThreeDS2Challenge.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareChallenge from './components/Challenge';\nimport { DEFAULT_CHALLENGE_WINDOW_SIZE, THREEDS2_CHALLENGE, THREEDS2_CHALLENGE_ERROR, THREEDS2_FULL } from './constants';\nimport { existy } from '../../utils/commonUtils';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport { TxVariants } from '../tx-variants';\nimport { ChallengeResolveData, LegacyChallengeResolveData, ThreeDS2ChallengeConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration> {\n public static type = TxVariants.threeDS2Challenge;\n\n public static defaultProps = {\n dataKey: 'threeDSResult',\n size: DEFAULT_CHALLENGE_WINDOW_SIZE,\n type: THREEDS2_CHALLENGE\n };\n\n protected submitAnalytics = (aObj: AnalyticsEvent) => {\n if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"creq sent\" event)\n\n super.submitAnalytics(aObj);\n };\n\n protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: rtnObj.actionDescription,\n subType: Analytics3DS2Events.CHALLENGE_IFRAME_LOADED\n });\n\n this.submitAnalytics(event);\n\n super.onActionHandled(rtnObj);\n };\n\n onComplete(state: LegacyChallengeResolveData | ChallengeResolveData) {\n /**\n * Equals a call to onAdditionalDetails (as set in actionTypes.ts) for the regular, \"native\" flow.\n * However, if the action to create this component came from the 3DS2InMDFlow process it will instead equal a call to the onComplete callback\n * (as defined in the 3DS2InMDFlow and passed in as a config prop).\n */\n if (this.props.onComplete) {\n this.props.onComplete(state, this.elementRef);\n } else {\n super.onComplete(state);\n }\n\n this.unmount(); // re. fixing issue around back to back challenge calls\n }\n\n render() {\n // existy used because threeds2InMDFlow will send empty string for paymentData and we should be allowed to proceed with this\n if (!existy(this.props.paymentData)) {\n /**\n * The presence of props.isMDFlow indicates the action to create this component came from the threeds2InMDFlow process which passes (an empty) paymentsData.\n * The regular, \"native\" flow uses the authorisationToken from the 3DS2 action, which actionTypes.ts assigns to a property called paymentData\n */\n const dataTypeForError = hasOwnProperty(this.props, 'isMDFlow') ? 'paymentData' : 'authorisationToken';\n\n this.props.onError(new AdyenCheckoutError(API_ERROR, `No ${dataTypeForError} received. 3DS2 Challenge cannot proceed`));\n\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: Missing 'paymentData' property from threeDS2 action`\n });\n\n this.submitAnalytics(event);\n\n return null;\n }\n\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <PrepareChallenge\n {...this.props}\n onComplete={this.onComplete}\n onSubmitAnalytics={this.submitAnalytics}\n isMDFlow={this.props.paymentData.length < 15}\n onActionHandled={this.onActionHandled}\n />\n </CoreProvider>\n );\n }\n}\n\nexport default ThreeDS2Challenge;\n"],"names":["ThreeDS2Challenge","UIElement","onComplete","state","this","props","elementRef","super","unmount","render","existy","paymentData","dataTypeForError","hasOwnProperty","onError","AdyenCheckoutError","API_ERROR","event","AnalyticsErrorEvent","code","Analytics3DS2Errors","ACTION_IS_MISSING_PAYMENT_DATA","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_CHALLENGE_ERROR","submitAnalytics","h","CoreProvider","i18n","loadingContext","resources","PrepareChallenge","onSubmitAnalytics","isMDFlow","length","onActionHandled","args","_define_property","aObj","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","rtnObj","AnalyticsLogEvent","THREEDS2_FULL","actionDescription","subType","Analytics3DS2Events","CHALLENGE_IFRAME_LOADED","TxVariants","threeDS2Challenge","defaultProps","dataKey","size","DEFAULT_CHALLENGE_WINDOW_SIZE","THREEDS2_CHALLENGE"],"mappings":"onCAiBA,MAAMA,UAA0BC,EA2B5BC,UAAAA,CAAWC,GAMHC,KAAKC,MAAMH,WACXE,KAAKC,MAAMH,WAAWC,EAAOC,KAAKE,YAElCC,MAAML,WAAWC,GAGrBC,KAAKI,SACT,CAEAC,MAAAA,GAEI,IAAKC,EAAON,KAAKC,MAAMM,aAAc,CAKjC,MAAMC,EAAmBC,EAAeT,KAAKC,MAAO,YAAc,cAAgB,qBAElFD,KAAKC,MAAMS,QAAQ,IAAIC,EAAmBC,EAAW,MAAMJ,8CAE3D,MAAMK,EAAQ,IAAIC,EAAoB,CAClCC,KAAMC,EAAoBC,+BAC1BC,UAAWC,EAAqBC,SAChCC,QAAS,GAAGC,2DAKhB,OAFAtB,KAAKuB,gBAAgBV,GAEd,IACX,CAEA,OACIW,EAACC,EAAAA,CAAaC,KAAM1B,KAAKC,MAAMyB,KAAMC,eAAgB3B,KAAKC,MAAM0B,eAAgBC,UAAW5B,KAAK4B,WAC5FJ,EAACK,EAAAA,IACO7B,KAAKC,MACTH,WAAYE,KAAKF,WACjBgC,kBAAmB9B,KAAKuB,gBACxBQ,SAAU/B,KAAKC,MAAMM,YAAYyB,OAAS,GAC1CC,gBAAiBjC,KAAKiC,kBAItC,mBA3EJ9B,SAAA+B,GASIC,EAAAnC,KAAUuB,kBAAmBa,IACrBA,aAAgBC,GAAsBD,EAAKE,OAASC,GAExDpC,MAAMoB,gBAAgBa,KAG1BD,EAAAnC,KAAUiC,kBAAmBO,IACzB,MAAM3B,EAAQ,IAAI4B,EAAkB,CAChCH,KAAMI,EACNrB,QAASmB,EAAOG,kBAChBC,QAASC,EAAoBC,0BAGjC9C,KAAKuB,gBAAgBV,GAErBV,MAAM8B,gBAAgBO,MAvB1BL,EADEvC,EACY0C,OAAOS,EAAWC,mBAEhCb,EAHEvC,EAGYqD,eAAe,CACzBC,QAAS,gBACTC,KAAMC,EACNd,KAAMe"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"./components/DeviceFingerprint/PrepareFingerprint3DS2.js";import n from"./callSubmit3DS2Fingerprint.js";import{existy as i}from"../../utils/commonUtils.js";import{TxVariants as o}from"../tx-variants.js";import s,{API_ERROR as a}from"../../core/Errors/AdyenCheckoutError.js";import{ANALYTICS_ERROR_TYPE as p,Analytics3DS2Errors as m,ANALYTICS_RENDERED_STR as c,Analytics3DS2Events as l}from"../../core/Analytics/constants.js";import{THREEDS2_FINGERPRINT_ERROR as u,THREEDS2_FULL as y,THREEDS2_FINGERPRINT as A}from"./constants.js";import{AnalyticsLogEvent as f}from"../../core/Analytics/AnalyticsLogEvent.js";import{AnalyticsInfoEvent as d}from"../../core/Analytics/AnalyticsInfoEvent.js";import{AnalyticsErrorEvent as h}from"../../core/Analytics/AnalyticsErrorEvent.js";function D(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class b extends e{onComplete(t){super.onComplete(t),this.unmount()}render(){if(!i(this.props.paymentData)){this.props.onError(new s(a,"No paymentData received. 3DS2 Fingerprint cannot proceed"));const t=new h({code:m.ACTION_IS_MISSING_PAYMENT_DATA,errorType:p.apiError,message:`${u}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(t),null}return t(r,{...this.props,onComplete:this.props.isMDFlow?this.onComplete:this.callSubmit3DS2Fingerprint,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled})}constructor(...t){super(...t),D(this,"callSubmit3DS2Fingerprint",n.bind(this)),D(this,"submitAnalytics",t=>{t instanceof d&&t.type===c||super.submitAnalytics(t)}),D(this,"onActionHandled",t=>{const e=new f({type:y,message:t.actionDescription,subType:l.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(e),super.onActionHandled(t)})}}D(b,"type",o.threeDS2Fingerprint),D(b,"defaultProps",{dataKey:"fingerprintResult",type:A});export{b as default};
1
+ import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"./components/DeviceFingerprint/PrepareFingerprint3DS2.js";import n from"./callSubmit3DS2Fingerprint.js";import{existy as i}from"../../utils/commonUtils.js";import{TxVariants as o}from"../tx-variants.js";import s,{API_ERROR as p}from"../../core/Errors/AdyenCheckoutError.js";import{ANALYTICS_ERROR_TYPE as a,Analytics3DS2Errors as m,ANALYTICS_RENDERED_STR as c,Analytics3DS2Events as l}from"../../core/Analytics/constants.js";import{THREEDS2_FINGERPRINT_ERROR as u,THREEDS2_FULL as y,THREEDS2_FINGERPRINT as A}from"./constants.js";import{AnalyticsLogEvent as f}from"../../core/Analytics/AnalyticsLogEvent.js";import{AnalyticsInfoEvent as h}from"../../core/Analytics/AnalyticsInfoEvent.js";import{AnalyticsErrorEvent as d}from"../../core/Analytics/AnalyticsErrorEvent.js";function D(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class b extends e{onComplete(t){this.props.onComplete?this.props.onComplete(t,this.elementRef):super.onComplete(t),this.unmount()}render(){if(!i(this.props.paymentData)){this.props.onError(new s(p,"No paymentData received. 3DS2 Fingerprint cannot proceed"));const t=new d({code:m.ACTION_IS_MISSING_PAYMENT_DATA,errorType:a.apiError,message:`${u}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(t),null}return t(r,{...this.props,onComplete:this.props.isMDFlow?this.onComplete:this.callSubmit3DS2Fingerprint,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled})}constructor(...t){super(...t),D(this,"callSubmit3DS2Fingerprint",n.bind(this)),D(this,"submitAnalytics",t=>{t instanceof h&&t.type===c||super.submitAnalytics(t)}),D(this,"onActionHandled",t=>{const e=new f({type:y,message:t.actionDescription,subType:l.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(e),super.onActionHandled(t)})}}D(b,"type",o.threeDS2Fingerprint),D(b,"defaultProps",{dataKey:"fingerprintResult",type:A});export{b as default};
2
2
  //# sourceMappingURL=ThreeDS2DeviceFingerprint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThreeDS2DeviceFingerprint.js","sources":["../../../../src/components/ThreeDS2/ThreeDS2DeviceFingerprint.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareFingerprint from './components/DeviceFingerprint';\nimport callSubmit3DS2Fingerprint from './callSubmit3DS2Fingerprint';\nimport { existy } from '../../utils/commonUtils';\nimport { TxVariants } from '../tx-variants';\nimport { ThreeDS2DeviceFingerprintConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_FULL } from './constants';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintConfiguration> {\n public static type = TxVariants.threeDS2Fingerprint;\n\n public static defaultProps = {\n dataKey: 'fingerprintResult',\n type: THREEDS2_FINGERPRINT\n };\n\n private callSubmit3DS2Fingerprint = callSubmit3DS2Fingerprint.bind(this); // New 3DS2 flow\n\n protected submitAnalytics = (aObj: AnalyticsEvent) => {\n if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"threeDSMethodData sent\" event)\n\n super.submitAnalytics(aObj);\n };\n\n protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: rtnObj.actionDescription,\n subType: Analytics3DS2Events.FINGERPRINT_IFRAME_LOADED\n });\n\n this.submitAnalytics(event);\n\n super.onActionHandled(rtnObj);\n };\n\n onComplete(state) {\n super.onComplete(state);\n this.unmount(); // re. fixing issue around back to back fingerprinting calls\n }\n\n render() {\n /**\n * In the regular components (aka \"native\") flow we can't proceed because something has gone wrong with the payment if paymentData is missing from the threeDS2 action.\n * In the MDFlow the paymentData is always present (albeit an empty string, which is why we use 'existy' since we should be allowed to proceed with this)\n */\n if (!existy(this.props.paymentData)) {\n this.props.onError(new AdyenCheckoutError(API_ERROR, `No paymentData received. 3DS2 Fingerprint cannot proceed`));\n\n // TODO - check logs to see if this *ever* happens\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_FINGERPRINT_ERROR}: Missing 'paymentData' property from threeDS2 action`\n });\n\n this.submitAnalytics(event);\n\n return null;\n }\n\n /**\n * this.props.isMDFlow indicates the action to create this component came from the 3DS2InMDFlow process and upon completion should call the\n * passed onComplete callback (as defined in the 3DS2InMDFlow) instead of the /submitThreeDS2Fingerprint endpoint for the regular, \"native\" flow\n */\n return (\n <PrepareFingerprint\n {...this.props}\n onComplete={this.props.isMDFlow ? this.onComplete : this.callSubmit3DS2Fingerprint}\n onSubmitAnalytics={this.submitAnalytics}\n isMDFlow={this.props.paymentData.length < 15}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n}\n\nexport default ThreeDS2DeviceFingerprint;\n"],"names":["ThreeDS2DeviceFingerprint","UIElement","onComplete","state","super","this","unmount","render","existy","props","paymentData","onError","AdyenCheckoutError","API_ERROR","event","AnalyticsErrorEvent","code","Analytics3DS2Errors","ACTION_IS_MISSING_PAYMENT_DATA","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_FINGERPRINT_ERROR","submitAnalytics","h","PrepareFingerprint","isMDFlow","callSubmit3DS2Fingerprint","onSubmitAnalytics","length","onActionHandled","args","_define_property","bind","aObj","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","rtnObj","AnalyticsLogEvent","THREEDS2_FULL","actionDescription","subType","Analytics3DS2Events","FINGERPRINT_IFRAME_LOADED","TxVariants","threeDS2Fingerprint","defaultProps","dataKey","THREEDS2_FINGERPRINT"],"mappings":"4gCAgBA,MAAMA,UAAkCC,EA4BpCC,UAAAA,CAAWC,GACPC,MAAMF,WAAWC,GACjBE,KAAKC,SACT,CAEAC,MAAAA,GAKI,IAAKC,EAAOH,KAAKI,MAAMC,aAAc,CACjCL,KAAKI,MAAME,QAAQ,IAAIC,EAAmBC,EAAW,6DAGrD,MAAMC,EAAQ,IAAIC,EAAoB,CAClCC,KAAMC,EAAoBC,+BAC1BC,UAAWC,EAAqBC,SAChCC,QAAS,GAAGC,2DAKhB,OAFAlB,KAAKmB,gBAAgBV,GAEd,IACX,CAMA,OACIW,EAACC,EAAAA,IACOrB,KAAKI,MACTP,WAAYG,KAAKI,MAAMkB,SAAWtB,KAAKH,WAAaG,KAAKuB,0BACzDC,kBAAmBxB,KAAKmB,gBACxBG,SAAUtB,KAAKI,MAAMC,YAAYoB,OAAS,GAC1CC,gBAAiB1B,KAAK0B,iBAGlC,mBAlEJ3B,SAAA4B,GAQIC,OAAQL,4BAA4BA,EAA0BM,KAAK7B,OAEnE4B,EAAA5B,KAAUmB,kBAAmBW,IACrBA,aAAgBC,GAAsBD,EAAKE,OAASC,GAExDlC,MAAMoB,gBAAgBW,KAG1BF,EAAA5B,KAAU0B,kBAAmBQ,IACzB,MAAMzB,EAAQ,IAAI0B,EAAkB,CAChCH,KAAMI,EACNnB,QAASiB,EAAOG,kBAChBC,QAASC,EAAoBC,4BAGjCxC,KAAKmB,gBAAgBV,GAErBV,MAAM2B,gBAAgBQ,MAxB1BN,EADEjC,EACYqC,OAAOS,EAAWC,qBAEhCd,EAHEjC,EAGYgD,eAAe,CACzBC,QAAS,oBACTZ,KAAMa"}
1
+ {"version":3,"file":"ThreeDS2DeviceFingerprint.js","sources":["../../../../src/components/ThreeDS2/ThreeDS2DeviceFingerprint.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareFingerprint from './components/DeviceFingerprint';\nimport callSubmit3DS2Fingerprint from './callSubmit3DS2Fingerprint';\nimport { existy } from '../../utils/commonUtils';\nimport { TxVariants } from '../tx-variants';\nimport { FingerprintResolveData, LegacyFingerprintResolveData, ThreeDS2DeviceFingerprintConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_FULL } from './constants';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintConfiguration> {\n public static type = TxVariants.threeDS2Fingerprint;\n\n public static defaultProps = {\n dataKey: 'fingerprintResult',\n type: THREEDS2_FINGERPRINT\n };\n\n private callSubmit3DS2Fingerprint = callSubmit3DS2Fingerprint.bind(this); // New 3DS2 flow\n\n protected submitAnalytics = (aObj: AnalyticsEvent) => {\n if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"threeDSMethodData sent\" event)\n\n super.submitAnalytics(aObj);\n };\n\n protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: rtnObj.actionDescription,\n subType: Analytics3DS2Events.FINGERPRINT_IFRAME_LOADED\n });\n\n this.submitAnalytics(event);\n\n super.onActionHandled(rtnObj);\n };\n\n onComplete(state: LegacyFingerprintResolveData | FingerprintResolveData) {\n if (this.props.onComplete) {\n this.props.onComplete(state, this.elementRef);\n } else {\n super.onComplete(state);\n }\n\n this.unmount(); // re. fixing issue around back to back fingerprinting calls\n }\n\n render() {\n /**\n * In the regular components (aka \"native\") flow we can't proceed because something has gone wrong with the payment if paymentData is missing from the threeDS2 action.\n * In the MDFlow the paymentData is always present (albeit an empty string, which is why we use 'existy' since we should be allowed to proceed with this)\n */\n if (!existy(this.props.paymentData)) {\n this.props.onError(new AdyenCheckoutError(API_ERROR, `No paymentData received. 3DS2 Fingerprint cannot proceed`));\n\n // TODO - check logs to see if this *ever* happens\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_FINGERPRINT_ERROR}: Missing 'paymentData' property from threeDS2 action`\n });\n\n this.submitAnalytics(event);\n\n return null;\n }\n\n /**\n * this.props.isMDFlow indicates the action to create this component came from the 3DS2InMDFlow process and upon completion should call the\n * passed onComplete callback (as defined in the 3DS2InMDFlow) instead of the /submitThreeDS2Fingerprint endpoint for the regular, \"native\" flow\n */\n return (\n <PrepareFingerprint\n {...this.props}\n onComplete={this.props.isMDFlow ? this.onComplete : this.callSubmit3DS2Fingerprint}\n onSubmitAnalytics={this.submitAnalytics}\n isMDFlow={this.props.paymentData.length < 15}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n}\n\nexport default ThreeDS2DeviceFingerprint;\n"],"names":["ThreeDS2DeviceFingerprint","UIElement","onComplete","state","this","props","elementRef","super","unmount","render","existy","paymentData","onError","AdyenCheckoutError","API_ERROR","event","AnalyticsErrorEvent","code","Analytics3DS2Errors","ACTION_IS_MISSING_PAYMENT_DATA","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_FINGERPRINT_ERROR","submitAnalytics","h","PrepareFingerprint","isMDFlow","callSubmit3DS2Fingerprint","onSubmitAnalytics","length","onActionHandled","args","_define_property","bind","aObj","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","rtnObj","AnalyticsLogEvent","THREEDS2_FULL","actionDescription","subType","Analytics3DS2Events","FINGERPRINT_IFRAME_LOADED","TxVariants","threeDS2Fingerprint","defaultProps","dataKey","THREEDS2_FINGERPRINT"],"mappings":"4gCAgBA,MAAMA,UAAkCC,EA4BpCC,UAAAA,CAAWC,GACHC,KAAKC,MAAMH,WACXE,KAAKC,MAAMH,WAAWC,EAAOC,KAAKE,YAElCC,MAAML,WAAWC,GAGrBC,KAAKI,SACT,CAEAC,MAAAA,GAKI,IAAKC,EAAON,KAAKC,MAAMM,aAAc,CACjCP,KAAKC,MAAMO,QAAQ,IAAIC,EAAmBC,EAAW,6DAGrD,MAAMC,EAAQ,IAAIC,EAAoB,CAClCC,KAAMC,EAAoBC,+BAC1BC,UAAWC,EAAqBC,SAChCC,QAAS,GAAGC,2DAKhB,OAFApB,KAAKqB,gBAAgBV,GAEd,IACX,CAMA,OACIW,EAACC,EAAAA,IACOvB,KAAKC,MACTH,WAAYE,KAAKC,MAAMuB,SAAWxB,KAAKF,WAAaE,KAAKyB,0BACzDC,kBAAmB1B,KAAKqB,gBACxBG,SAAUxB,KAAKC,MAAMM,YAAYoB,OAAS,GAC1CC,gBAAiB5B,KAAK4B,iBAGlC,mBAvEJzB,SAAA0B,GAQIC,OAAQL,4BAA4BA,EAA0BM,KAAK/B,OAEnE8B,EAAA9B,KAAUqB,kBAAmBW,IACrBA,aAAgBC,GAAsBD,EAAKE,OAASC,GAExDhC,MAAMkB,gBAAgBW,KAG1BF,EAAA9B,KAAU4B,kBAAmBQ,IACzB,MAAMzB,EAAQ,IAAI0B,EAAkB,CAChCH,KAAMI,EACNnB,QAASiB,EAAOG,kBAChBC,QAASC,EAAoBC,4BAGjC1C,KAAKqB,gBAAgBV,GAErBR,MAAMyB,gBAAgBQ,MAxB1BN,EADElC,EACYsC,OAAOS,EAAWC,qBAEhCd,EAHElC,EAGYiD,eAAe,CACzBC,QAAS,oBACTZ,KAAMa"}