@adyen/adyen-web 6.40.1 → 6.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +54 -61
- package/dist/es/components/ANCV/ANCV.js +1 -1
- package/dist/es/components/ANCV/ANCV.js.map +1 -1
- package/dist/es/components/ANCV/components/ANCVInput.js +1 -1
- package/dist/es/components/ANCV/components/ANCVInput.js.map +1 -1
- package/dist/es/components/Blik/Blik.js +1 -1
- package/dist/es/components/Blik/Blik.js.map +1 -1
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCard.js +1 -1
- package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es/components/Dropin/Dropin.js +1 -1
- package/dist/es/components/Dropin/Dropin.js.map +1 -1
- package/dist/es/components/Dropin/components/DropinComponent.js +1 -1
- package/dist/es/components/Dropin/components/DropinComponent.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardPinField.js +1 -1
- package/dist/es/components/Giftcard/components/GiftcardPinField.js.map +1 -1
- package/dist/es/components/Iris/Iris.js +1 -1
- package/dist/es/components/Iris/Iris.js.map +1 -1
- package/dist/es/components/MBWay/MBWay.js +1 -1
- package/dist/es/components/MBWay/MBWay.js.map +1 -1
- package/dist/es/components/MealVoucherFR/components/MealVoucherExpiryField.js +1 -1
- package/dist/es/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
- package/dist/es/components/PayTo/PayTo.js +1 -1
- package/dist/es/components/PayTo/PayTo.js.map +1 -1
- package/dist/es/components/PayTo/components/BSBInput.js +1 -1
- package/dist/es/components/PayTo/components/BSBInput.js.map +1 -1
- package/dist/es/components/PayTo/components/IdentifierSelector.js +1 -1
- package/dist/es/components/PayTo/components/IdentifierSelector.js.map +1 -1
- package/dist/es/components/PayTo/components/PayIDInput.js +1 -1
- package/dist/es/components/PayTo/components/PayIDInput.js.map +1 -1
- package/dist/es/components/PayTo/components/validate.js +1 -1
- package/dist/es/components/PayTo/components/validate.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js.map +1 -1
- package/dist/es/components/UPI/UPI.js +1 -1
- package/dist/es/components/UPI/UPI.js.map +1 -1
- package/dist/es/components/internal/Await/Await.js +1 -1
- package/dist/es/components/internal/Await/Await.js.map +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es/components/internal/Button/Button.js +1 -1
- package/dist/es/components/internal/Button/Button.js.map +1 -1
- package/dist/es/components/internal/Button/CopyButton.js +1 -1
- package/dist/es/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
- package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +1 -1
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
- package/dist/es/components/internal/Modal/Modal.js +1 -1
- package/dist/es/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/binLookup/triggerBinLookUp.js +1 -1
- package/dist/es/components/internal/SecuredFields/binLookup/triggerBinLookUp.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/core/Analytics/events/AnalyticsErrorEvent.js +1 -1
- package/dist/es/core/Analytics/events/AnalyticsErrorEvent.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/index.d.ts +54 -61
- package/dist/es/language/utils.js +1 -1
- package/dist/es/language/utils.js.map +1 -1
- package/dist/es/packages/server/translations/en-US.json.js +1 -1
- package/dist/es/utils/commonUtils.js +1 -1
- package/dist/es/utils/commonUtils.js.map +1 -1
- package/dist/es/utils/get-process-message-handler.js +1 -1
- package/dist/es/utils/get-process-message-handler.js.map +1 -1
- package/dist/es/utils/promiseTimeout.js.map +1 -1
- package/dist/es-legacy/components/ANCV/ANCV.js +1 -1
- package/dist/es-legacy/components/ANCV/ANCV.js.map +1 -1
- package/dist/es-legacy/components/ANCV/components/ANCVInput.js +1 -1
- package/dist/es-legacy/components/ANCV/components/ANCVInput.js.map +1 -1
- package/dist/es-legacy/components/Blik/Blik.js +1 -1
- package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/DropinComponent.js +1 -1
- package/dist/es-legacy/components/Dropin/components/DropinComponent.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardPinField.js +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardPinField.js.map +1 -1
- package/dist/es-legacy/components/Iris/Iris.js +1 -1
- package/dist/es-legacy/components/Iris/Iris.js.map +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
- package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherExpiryField.js +1 -1
- package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/BSBInput.js +1 -1
- package/dist/es-legacy/components/PayTo/components/BSBInput.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js +1 -1
- package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayIDInput.js +1 -1
- package/dist/es-legacy/components/PayTo/components/PayIDInput.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/validate.js +1 -1
- package/dist/es-legacy/components/PayTo/components/validate.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.js.map +1 -1
- package/dist/es-legacy/components/UPI/UPI.js +1 -1
- package/dist/es-legacy/components/UPI/UPI.js.map +1 -1
- package/dist/es-legacy/components/internal/Await/Await.js +1 -1
- package/dist/es-legacy/components/internal/Await/Await.js.map +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/Button.js +1 -1
- package/dist/es-legacy/components/internal/Button/Button.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/binLookup/triggerBinLookUp.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/binLookup/triggerBinLookUp.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/core/Analytics/events/AnalyticsErrorEvent.js +1 -1
- package/dist/es-legacy/core/Analytics/events/AnalyticsErrorEvent.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/language/utils.js +1 -1
- package/dist/es-legacy/language/utils.js.map +1 -1
- package/dist/es-legacy/packages/server/translations/en-US.json.js +1 -1
- package/dist/es-legacy/utils/commonUtils.js +1 -1
- package/dist/es-legacy/utils/commonUtils.js.map +1 -1
- package/dist/es-legacy/utils/get-process-message-handler.js +1 -1
- package/dist/es-legacy/utils/get-process-message-handler.js.map +1 -1
- package/dist/es-legacy/utils/promiseTimeout.js.map +1 -1
- package/package.json +19 -19
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="applepayjs" />
|
|
2
2
|
/// <reference types="googlepay" />
|
|
3
3
|
import * as preact from 'preact';
|
|
4
|
-
import { h, TargetedMouseEvent, Ref, RefObject, Component, ComponentChildren, FunctionComponent, ComponentChild } from 'preact';
|
|
4
|
+
import { h, TargetedMouseEvent, Ref, RefObject, Component, ComponentChildren, FunctionComponent, ComponentChild, TargetedKeyboardEvent } from 'preact';
|
|
5
5
|
import { OrderResponseBody, OnShippingAddressChangeData, OnShippingOptionsChangeData, OnInitActions } from '@paypal/paypal-js';
|
|
6
6
|
|
|
7
7
|
interface ILanguageService {
|
|
@@ -290,7 +290,6 @@ interface ButtonProps {
|
|
|
290
290
|
complete?: () => void;
|
|
291
291
|
}) => void;
|
|
292
292
|
onKeyDown?: (event: KeyboardEvent) => void;
|
|
293
|
-
onKeyPress?: (event: KeyboardEvent) => void;
|
|
294
293
|
buttonRef?: Ref<HTMLButtonElement>;
|
|
295
294
|
onMouseEnter?: (event: MouseEvent) => void;
|
|
296
295
|
onMouseLeave?: (event: MouseEvent) => void;
|
|
@@ -813,10 +812,10 @@ interface Restrictions {
|
|
|
813
812
|
}
|
|
814
813
|
|
|
815
814
|
interface ANCVConfiguration extends UIElementProps {
|
|
816
|
-
paymentData?:
|
|
815
|
+
paymentData?: string;
|
|
817
816
|
data: ANCVDataState;
|
|
818
|
-
onOrderRequest?:
|
|
819
|
-
onOrderUpdated?:
|
|
817
|
+
onOrderRequest?: onOrderRequestCallbackType;
|
|
818
|
+
onOrderUpdated?: onOrderUpdatedCallbackType;
|
|
820
819
|
}
|
|
821
820
|
interface ANCVDataState {
|
|
822
821
|
beneficiaryId: string;
|
|
@@ -1466,24 +1465,24 @@ type GiftcardFieldsProps = {
|
|
|
1466
1465
|
*/
|
|
1467
1466
|
declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
1468
1467
|
private csfLoadFailTimeout;
|
|
1469
|
-
private csfLoadFailTimeoutMS;
|
|
1470
|
-
private csfConfigFailTimeout;
|
|
1471
|
-
private csfConfigFailTimeoutMS;
|
|
1468
|
+
private readonly csfLoadFailTimeoutMS;
|
|
1469
|
+
private readonly csfConfigFailTimeout;
|
|
1470
|
+
private readonly csfConfigFailTimeoutMS;
|
|
1472
1471
|
private numCharsInField;
|
|
1473
1472
|
private rootNode;
|
|
1474
1473
|
private numDateFields;
|
|
1475
1474
|
private csf;
|
|
1476
|
-
private handleOnLoad;
|
|
1477
|
-
private handleOnConfigSuccess;
|
|
1478
|
-
private handleOnFieldValid;
|
|
1479
|
-
private handleOnAllValid;
|
|
1480
|
-
private handleOnBrand;
|
|
1481
|
-
private handleFocus;
|
|
1482
|
-
private handleOnError;
|
|
1483
|
-
private handleOnAutoComplete;
|
|
1484
|
-
private handleOnNoDataRequired;
|
|
1485
|
-
private handleOnTouchstartIOS;
|
|
1486
|
-
private
|
|
1475
|
+
private readonly handleOnLoad;
|
|
1476
|
+
private readonly handleOnConfigSuccess;
|
|
1477
|
+
private readonly handleOnFieldValid;
|
|
1478
|
+
private readonly handleOnAllValid;
|
|
1479
|
+
private readonly handleOnBrand;
|
|
1480
|
+
private readonly handleFocus;
|
|
1481
|
+
private readonly handleOnError;
|
|
1482
|
+
private readonly handleOnAutoComplete;
|
|
1483
|
+
private readonly handleOnNoDataRequired;
|
|
1484
|
+
private readonly handleOnTouchstartIOS;
|
|
1485
|
+
private readonly handleKeyDown;
|
|
1487
1486
|
state: SFPState;
|
|
1488
1487
|
props: SFPProps;
|
|
1489
1488
|
private issuingCountryCode;
|
|
@@ -1507,7 +1506,7 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
|
1507
1506
|
onBinValue: () => void;
|
|
1508
1507
|
onFocus: () => void;
|
|
1509
1508
|
onAutoComplete: () => void;
|
|
1510
|
-
|
|
1509
|
+
handleKeyDown: () => void;
|
|
1511
1510
|
styles: {};
|
|
1512
1511
|
};
|
|
1513
1512
|
componentDidMount(): void;
|
|
@@ -1567,7 +1566,7 @@ interface SFPProps {
|
|
|
1567
1566
|
onLoad?: (cbObj: CardLoadData) => void;
|
|
1568
1567
|
onStateUpdate?: (obj: SFPState) => void;
|
|
1569
1568
|
onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;
|
|
1570
|
-
|
|
1569
|
+
handleKeyDown?: (event: KeyboardEvent) => void;
|
|
1571
1570
|
rootNode?: HTMLElement;
|
|
1572
1571
|
showWarnings?: boolean;
|
|
1573
1572
|
styles?: StylesObject;
|
|
@@ -1690,6 +1689,7 @@ interface CardBinLookupData {
|
|
|
1690
1689
|
supportedBrands?: string[];
|
|
1691
1690
|
brands?: string[];
|
|
1692
1691
|
issuingCountryCode?: string;
|
|
1692
|
+
healthcare?: Record<string, boolean>[];
|
|
1693
1693
|
supportedBrandsRaw?: BrandObject[];
|
|
1694
1694
|
rootNode?: HTMLElement;
|
|
1695
1695
|
isReset?: boolean;
|
|
@@ -1752,6 +1752,13 @@ interface CardLoadData {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
type CVCPolicyType = typeof REQUIRED | typeof OPTIONAL | typeof HIDDEN;
|
|
1754
1754
|
type DatePolicyType = typeof REQUIRED | typeof OPTIONAL | typeof HIDDEN;
|
|
1755
|
+
interface BrandConfiguration {
|
|
1756
|
+
name?: string;
|
|
1757
|
+
icon?: string;
|
|
1758
|
+
}
|
|
1759
|
+
interface CardBrandsConfiguration {
|
|
1760
|
+
[key: string]: BrandConfiguration;
|
|
1761
|
+
}
|
|
1755
1762
|
|
|
1756
1763
|
declare enum ErrorEventCode {
|
|
1757
1764
|
/** Trying to initialise a securedField iframe, but the iframe.contentWindow is undefined (meaning the containing element is not in the DOM */
|
|
@@ -1798,7 +1805,9 @@ declare enum ErrorEventCode {
|
|
|
1798
1805
|
/** callSubmit3DS2Fingerprint has received a response indicating a "challenge" but without an action object */
|
|
1799
1806
|
THREEDS2_NO_ACTION_FOR_CHALLENGE = "804",
|
|
1800
1807
|
/** The challenge process has happened, an object has been returned, parsed & accepted as legit, but the result prop on that object is either missing or doesn't have a transStatus prop */
|
|
1801
|
-
THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = "805"
|
|
1808
|
+
THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = "805",
|
|
1809
|
+
/** Decoded challenge token is missing a valid threeDSNotificationURL property. This means any challenge iframe that is presented will not be able to postMessage back to finalise the process, and trigger an onAdditionalDetails call. */
|
|
1810
|
+
THREEDS2_CHALLENGE_TOKEN_IS_MISSING_THREEDSNOTIFICATIONURL = "806"
|
|
1802
1811
|
}
|
|
1803
1812
|
|
|
1804
1813
|
/**
|
|
@@ -1825,7 +1834,7 @@ interface ThreeDS2Configuration extends UIElementProps {
|
|
|
1825
1834
|
};
|
|
1826
1835
|
notificationURL?: string;
|
|
1827
1836
|
onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
|
|
1828
|
-
on3DS2RedirectFlowComplete?: (state:
|
|
1837
|
+
on3DS2RedirectFlowComplete?: (state: ChallengeResolveData | FingerprintResolveData, component: UIElement) => void;
|
|
1829
1838
|
onError?: (error: AdyenCheckoutError, element?: UIElement) => void;
|
|
1830
1839
|
paymentData?: string;
|
|
1831
1840
|
token?: string;
|
|
@@ -1916,14 +1925,6 @@ interface FingerprintResolveData {
|
|
|
1916
1925
|
paymentData: string;
|
|
1917
1926
|
};
|
|
1918
1927
|
}
|
|
1919
|
-
interface LegacyFingerprintResolveData {
|
|
1920
|
-
data: {
|
|
1921
|
-
details: {
|
|
1922
|
-
[key: string]: string;
|
|
1923
|
-
};
|
|
1924
|
-
paymentData: string;
|
|
1925
|
-
};
|
|
1926
|
-
}
|
|
1927
1928
|
interface ChallengeResolveData {
|
|
1928
1929
|
data: {
|
|
1929
1930
|
details: {
|
|
@@ -1931,14 +1932,6 @@ interface ChallengeResolveData {
|
|
|
1931
1932
|
};
|
|
1932
1933
|
};
|
|
1933
1934
|
}
|
|
1934
|
-
interface LegacyChallengeResolveData {
|
|
1935
|
-
data: {
|
|
1936
|
-
details: {
|
|
1937
|
-
[key: string]: string;
|
|
1938
|
-
};
|
|
1939
|
-
paymentData: string;
|
|
1940
|
-
};
|
|
1941
|
-
}
|
|
1942
1935
|
interface ErrorCodeObject {
|
|
1943
1936
|
errorCode: string | ErrorEventCode;
|
|
1944
1937
|
message: string;
|
|
@@ -1954,7 +1947,7 @@ type ThreeDS2ConfigProps = {
|
|
|
1954
1947
|
readonly token: string;
|
|
1955
1948
|
readonly paymentData: string;
|
|
1956
1949
|
readonly onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
|
|
1957
|
-
readonly on3DS2RedirectFlowComplete?: (state:
|
|
1950
|
+
readonly on3DS2RedirectFlowComplete?: (state: ChallengeResolveData | FingerprintResolveData, component: UIElement) => void;
|
|
1958
1951
|
readonly onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
|
|
1959
1952
|
readonly onError?: (error: AdyenCheckoutError, element?: UIElement) => void;
|
|
1960
1953
|
readonly isDropin?: boolean;
|
|
@@ -4281,14 +4274,17 @@ type balanceCheckResponseType = {
|
|
|
4281
4274
|
transactionLimit?: PaymentAmount;
|
|
4282
4275
|
};
|
|
4283
4276
|
type onBalanceCheckCallbackType = (resolve: (res: balanceCheckResponseType) => void, reject: (error: Error) => void, data: GiftCardElementData) => Promise<void>;
|
|
4277
|
+
type onOrderUpdatedCallbackType = (data: {
|
|
4278
|
+
order: Order;
|
|
4279
|
+
}) => void;
|
|
4284
4280
|
type onRequiringConfirmationCallbackType = (resolve: () => void, reject: (error: Error) => void) => Promise<void>;
|
|
4285
4281
|
type onOrderRequestCallbackType = (resolve: (order: Order) => void, reject: (error: Error) => void, data: PaymentData) => Promise<void>;
|
|
4286
4282
|
interface GiftCardConfiguration extends UIElementProps {
|
|
4287
4283
|
pinRequired?: boolean;
|
|
4288
4284
|
expiryDateRequired?: boolean;
|
|
4289
|
-
brandsConfiguration?:
|
|
4285
|
+
brandsConfiguration?: CardBrandsConfiguration;
|
|
4290
4286
|
brand?: string;
|
|
4291
|
-
onOrderUpdated?:
|
|
4287
|
+
onOrderUpdated?: onOrderUpdatedCallbackType;
|
|
4292
4288
|
onBalanceCheck?: onBalanceCheckCallbackType;
|
|
4293
4289
|
onOrderRequest?: onOrderRequestCallbackType;
|
|
4294
4290
|
onRequiringConfirmation?: onRequiringConfirmationCallbackType;
|
|
@@ -4320,7 +4316,7 @@ interface GiftcardComponentProps extends Partial<Pick<SFPProps, 'clientKey' | 'l
|
|
|
4320
4316
|
expiryDateRequired?: boolean;
|
|
4321
4317
|
fieldsLayoutComponent: FunctionComponent<GiftcardFieldsProps>;
|
|
4322
4318
|
placeholders?: Placeholders$1;
|
|
4323
|
-
|
|
4319
|
+
handleKeyDown?: (event: KeyboardEvent) => void;
|
|
4324
4320
|
onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;
|
|
4325
4321
|
}
|
|
4326
4322
|
declare class Giftcard extends Component<Readonly<GiftcardComponentProps>> {
|
|
@@ -4388,8 +4384,8 @@ declare class GiftcardElement extends UIElement<GiftCardConfiguration> {
|
|
|
4388
4384
|
formatProps(props: any): any;
|
|
4389
4385
|
formatData(): GiftCardElementData;
|
|
4390
4386
|
get isValid(): boolean;
|
|
4391
|
-
get icon():
|
|
4392
|
-
get displayName():
|
|
4387
|
+
get icon(): string;
|
|
4388
|
+
get displayName(): string;
|
|
4393
4389
|
private setBalanceCheckError;
|
|
4394
4390
|
private handleBalanceCheck;
|
|
4395
4391
|
private onOrderRequest;
|
|
@@ -4714,6 +4710,7 @@ interface AwaitComponentProps {
|
|
|
4714
4710
|
onError: (error: AdyenCheckoutError) => void;
|
|
4715
4711
|
onComplete: (status: AdditionalDetailsData) => void;
|
|
4716
4712
|
brandLogo?: string;
|
|
4713
|
+
brandName?: string;
|
|
4717
4714
|
messageText?: string;
|
|
4718
4715
|
awaitText: string;
|
|
4719
4716
|
onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
|
|
@@ -6474,9 +6471,10 @@ type onOrderCancelType = (data: onOrderCancelData, actions: {
|
|
|
6474
6471
|
}) => void;
|
|
6475
6472
|
reject: (error: string) => void;
|
|
6476
6473
|
}) => void;
|
|
6474
|
+
type onOrderCancelInternalCallback = ((data: onOrderCancelData) => void) | null;
|
|
6477
6475
|
interface DropinComponentProps extends DropinConfiguration {
|
|
6478
6476
|
core: ICore;
|
|
6479
|
-
onCreateElements():
|
|
6477
|
+
onCreateElements(): [Promise<UIElement[]>, Promise<UIElement[]>, Promise<UIElement[]>, Promise<UIElement[]> | []];
|
|
6480
6478
|
onElementsCreated(elements: UIElement[]): void;
|
|
6481
6479
|
onOrderCancel?: onOrderCancelType;
|
|
6482
6480
|
}
|
|
@@ -7159,8 +7157,8 @@ declare abstract class BaseElement<P extends BaseElementProps> implements IBaseE
|
|
|
7159
7157
|
* Returns the component data necessary for the /payments request
|
|
7160
7158
|
*/
|
|
7161
7159
|
protected formatData(): any;
|
|
7162
|
-
protected submitAnalytics(
|
|
7163
|
-
protected
|
|
7160
|
+
protected submitAnalytics(_analyticsObj?: AbstractAnalyticsEvent): any;
|
|
7161
|
+
protected handleKeyDown(_e: TargetedKeyboardEvent<HTMLInputElement>): any;
|
|
7164
7162
|
protected setState(newState: object): void;
|
|
7165
7163
|
/**
|
|
7166
7164
|
* Returns the component payment data ready to submit to the Checkout API
|
|
@@ -7301,9 +7299,9 @@ declare abstract class UIElement<P extends UIElementProps = UIElementProps> exte
|
|
|
7301
7299
|
* @param response -
|
|
7302
7300
|
*/
|
|
7303
7301
|
protected handleResponse(response: PaymentResponseData): void;
|
|
7304
|
-
protected
|
|
7302
|
+
protected handleKeyDown(e: TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent): void;
|
|
7305
7303
|
/**
|
|
7306
|
-
* Handle Enter key pressed from a UIElement (called via
|
|
7304
|
+
* Handle Enter key pressed from a UIElement (called via handleKeyDown)
|
|
7307
7305
|
* @param obj
|
|
7308
7306
|
*/
|
|
7309
7307
|
protected onEnterKeyPressed(activeElement: Element, component: UIElement): void;
|
|
@@ -8046,13 +8044,7 @@ interface CardBackendConfiguration {
|
|
|
8046
8044
|
icon?: string;
|
|
8047
8045
|
brandsConfiguration?: CardBrandsConfiguration;
|
|
8048
8046
|
}
|
|
8049
|
-
|
|
8050
|
-
name?: string;
|
|
8051
|
-
icon?: string;
|
|
8052
|
-
}
|
|
8053
|
-
interface CardBrandsConfiguration {
|
|
8054
|
-
[key: string]: BrandConfiguration;
|
|
8055
|
-
}
|
|
8047
|
+
|
|
8056
8048
|
interface CardPaymentMethodData {
|
|
8057
8049
|
type: string;
|
|
8058
8050
|
brand?: string;
|
|
@@ -8086,6 +8078,7 @@ interface BrandObject {
|
|
|
8086
8078
|
brandImageUrl?: string;
|
|
8087
8079
|
panLength?: number;
|
|
8088
8080
|
paymentMethodVariant?: string;
|
|
8081
|
+
healthcare?: boolean;
|
|
8089
8082
|
}
|
|
8090
8083
|
interface BinLookupResponseRaw {
|
|
8091
8084
|
requestId: string;
|
|
@@ -8177,7 +8170,7 @@ declare class ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration
|
|
|
8177
8170
|
* However, if the action to create this component came from the 3DS2InMDFlow process it will instead equal a call to the onComplete callback
|
|
8178
8171
|
* (as defined in the 3DS2InMDFlow and passed in as a config prop).
|
|
8179
8172
|
*/
|
|
8180
|
-
onComplete(state:
|
|
8173
|
+
onComplete(state: ChallengeResolveData): void;
|
|
8181
8174
|
protected componentToRender(): h.JSX.Element;
|
|
8182
8175
|
}
|
|
8183
8176
|
|
|
@@ -8193,7 +8186,7 @@ declare class ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerpr
|
|
|
8193
8186
|
/**
|
|
8194
8187
|
* Can be called directly from PrepareFingerprint (MDFlow) or after the call to /submitThreeDS2Fingerprint endpoint (native flow)
|
|
8195
8188
|
*/
|
|
8196
|
-
onComplete(state:
|
|
8189
|
+
onComplete(state: FingerprintResolveData): void;
|
|
8197
8190
|
protected componentToRender(): h.JSX.Element;
|
|
8198
8191
|
}
|
|
8199
8192
|
|
|
@@ -8402,7 +8395,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8402
8395
|
*/
|
|
8403
8396
|
protected handleOrder: ({ order }: PaymentResponseData) => void;
|
|
8404
8397
|
closeActivePaymentMethod(): void;
|
|
8405
|
-
protected
|
|
8398
|
+
protected handleKeyDown(e: TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent): void;
|
|
8406
8399
|
protected onEnterKeyPressed(activeElement: Element, component: UIElement): void;
|
|
8407
8400
|
protected componentToRender(): h.JSX.Element;
|
|
8408
8401
|
}
|
|
@@ -8728,4 +8721,4 @@ declare namespace AdyenCheckout {
|
|
|
8728
8721
|
}
|
|
8729
8722
|
|
|
8730
8723
|
export { ANCVElement as ANCV, AchElement as Ach, AddressElement as Address, AdyenCheckout, AdyenCheckoutError, Affirm, AfterPay, AfterPayB2B, AmazonPayElement as AmazonPay, ApplePayElement as ApplePay, Atome, BacsElement as BacsDirectDebit, BancontactElement as Bancontact, BankTransferElement as BankTransfer, BCMCMobileElement as BcmcMobile, BillDeskOnlineElement as BillDeskOnline, BillDeskWalletElement as BillDeskWallet, BlikElement as Blik, BoletoElement as Boleto, CardElement as Card, CashAppPay, ClickToPayElement as ClickToPay, Core, CustomCard, DokuElement as Doku, DonationElement as Donation, DotpayElement as Dotpay, DragonpayElement as Dragonpay, DropinElement as Dropin, DuitNowElement as DuitNow, EPSElement as EPS, EcontextElement as Econtext, FacilyPay10x as FacilPay10x, FacilyPay12x as FacilPay12x, FacilyPay3x as FacilPay3x, FacilyPay4x as FacilPay4x, FacilyPay6x as FacilPay6x, Fastlane, FastlaneSDK, GiftcardElement as Giftcard, GiropayElement as Giropay, GooglePay, Iris, IrisMode, KlarnaPayments as Klarna, MBWayElement as MBWay, MealVoucherFRElement as MealVoucherFR, MolPayEBankingMYElement as MolPayEBankingMY, MolPayEBankingTHElement as MolPayEBankingTH, MolPayEbankingVNElement as MolPayEBankingVN, MultibancoElement as Multibanco, OnlineBankingCZElement as OnlineBankingCZ, OnlineBankingFI, OnlineBankingINElement as OnlineBankingIN, OnlineBankingPL, OnlineBankingSKElement as OnlineBankingSK, OxxoElement as Oxxo, PayByBank, PayByBankPixElement as PayByBankPix, PayByBankUS, PayMeElement as PayMe, PayNowElement as PayNow, PaypalElement as PayPal, PayToElement as PayTo, PayuNetCashcardElement as PayuCashcard, PayuNetBankingElement as PayuNetBanking, PersonalDetailsElement as PersonalDetails, PixElement as Pix, PreAuthorizedDebitCanada, PromptPayElement as PromptPay, RatePay, RatePayDirectDebit, RedirectElement as Redirect, Riverty, SepaElement as SepaDirectDebit, SwishElement as Swish, ThreeDS2Challenge, ThreeDS2DeviceFingerprint, TrustlyElement as Trustly, TwintElement as Twint, UIElement, UPI, VippsElement as Vipps, WalletINElement as WalletIN, WeChatPayElement as WeChat, index_d as components, initializeFastlane };
|
|
8731
|
-
export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies,
|
|
8724
|
+
export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies, MandateFrequencyType, MandateType, OnChangeData, OpenInvoiceActiveFieldsets, OpenInvoiceConfiguration, OpenInvoiceFieldsetsRefs, OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError, OpenInvoiceStateValid, OpenInvoiceVisibility, Order, OrderButtonProps, OrderStatus, PayPalConfiguration, PayToConfiguration, PayToData, PayToPlaceholdersType, PayloadJSON, PaymentAction, PaymentActionsType, PaymentAmount, PaymentCompletedData, PaymentData, PaymentFailedData, PaymentMethodBrand, PaymentMethodData, PaymentMethodGroup, PaymentMethodOptions, PaymentMethods, PaymentMethodsConfiguration, PaymentMethodsRequestData, PaymentMethodsResponse, PaymentResponseData, PersonalDetailsSchema, PixConfiguration, PixElementData, PostMsgParseErrorObject, PreAuthorizedDebitCanadaConfiguration, PreAuthorizedDebitCanadaPlaceholders, ProcessedPaymentStatusResponse, QRLoaderConfiguration, RawPaymentMethod, RawPaymentResponse, RawPaymentStatusResponse, RawStoredPaymentMethod, RecurringMetadata, RedirectConfiguration, Region, ResultCode, ResultObject, ResultValue, SepaConfiguration, SepaElementData, SessionsResponse, SignOutButtonProps, SocialSecurityMode, StatusFromAction, SubmitActions, SubmitData, SupportedLocale, SupportedPayPalFundingSources, ThreeDS2ActionProps, ThreeDS2ChallengeConfiguration, ThreeDS2ConfigProps, ThreeDS2DeviceFingerprintConfiguration, ThreeDS2FingerprintResponse, ThreeDS2FlowObject, ThreeDS2FlowProps, ThreeDS2Token, UIElementProps, UIElementStatus, UPIAppList, UPIConfiguration, UpdateAmazonCheckoutSessionRequest, UpiMode, UpiPaymentData, UpiType, ValidationError, VoucherConfiguration, VoucherDetail, VoucherProps, balanceCheckResponseType, onBalanceCheckCallbackType, onOrderCancelData, onOrderCancelInternalCallback, onOrderCancelType, onOrderRequestCallbackType, onOrderUpdatedCallbackType, onRequiringConfirmationCallbackType };
|
|
@@ -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/ANCVInput.js";import
|
|
1
|
+
import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"./components/ANCVInput.js";import s from"./components/ANCVAwait/config.js";import{Await as o}from"../internal/Await/Await.js";import n from"../../core/Errors/AdyenCheckoutError.js";import i from"../internal/PayButton/PayButton.js";import{sanitizeResponse as a,verifyPaymentDidNotFail as p}from"../internal/UIElement/utils.js";function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class m extends e{formatData(){return{paymentMethod:{type:m.type,beneficiaryId:this.state.data?.beneficiaryId}}}submit(){if(!this.isValid)return this.showValidation(),!1;this.createOrder().then(this.makePaymentsCall).then(a).then(p).then(this.handleResponse).catch(this.handleFailedResult)}get isValid(){return!!this.state.isValid}get displayName(){return this.props.name}componentToRender(){return this.props.paymentData?t(o,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,brandName:this.displayName,type:this.constructor.type,messageText:this.props.i18n.get("ancv.confirmPayment"),awaitText:this.props.i18n.get("await.waitForConfirmation"),showCountdownTimer:s.showCountdownTimer,throttleTime:s.THROTTLE_TIME,throttleInterval:s.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):t(r,{...this.props,setComponentRef:this.setComponentRef,onSubmit:this.submit,onChange:this.setState,payButton:this.payButton,showPayButton:this.props.showPayButton})}constructor(...e){super(...e),h(this,"onOrderRequest",t=>this.props.onOrderRequest?new Promise((e,r)=>{this.props.onOrderRequest(e,r,t)}):this.props.session?this.props.session.createOrder():void 0),h(this,"createOrder",()=>(this.setStatus("loading"),this.props.order?Promise.resolve():this.onOrderRequest(this.data).then(t=>{const e={order:{orderData:t.orderData,pspReference:t.pspReference}};return this.setState(e),Promise.resolve()}).catch(t=>{t instanceof n?this.handleError(t):this.handleError(new n("ERROR",t))}))),h(this,"payButton",e=>t(i,e))}}h(m,"type","ancv");export{m as ANCVElement,m as default};
|
|
2
2
|
//# sourceMappingURL=ANCV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANCV.js","sources":["../../../../src/components/ANCV/ANCV.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n public static readonly type = 'ancv';\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n paymentMethod: {\n type: ANCVElement.type,\n beneficiaryId: this.state.data?.beneficiaryId\n }\n };\n }\n\n private onOrderRequest = data => {\n if (this.props.onOrderRequest)\n return new Promise((resolve, reject) => {\n this.props.onOrderRequest(resolve, reject, data);\n });\n\n if (this.props.session) {\n return this.props.session.createOrder();\n }\n };\n\n /**\n * Check if order exists, if it does Resolve.\n * Otherwise createOrder and then Resolve.\n */\n public createOrder = (): Promise<void> => {\n this.setStatus('loading');\n\n // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n if (this.props.order) {\n return Promise.resolve();\n }\n\n return this.onOrderRequest(this.data)\n .then((order: { orderData: string; pspReference: string }) => {\n const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n this.setState(stateOrder);\n return Promise.resolve();\n })\n .catch(error => {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', error));\n }\n });\n };\n\n public submit() {\n if (!this.isValid) {\n this.showValidation();\n return false;\n }\n\n this.createOrder()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n // Reimplement payButton similar to GiftCard to allow to set onClick\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n return <PayButton {...props} />;\n };\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n get displayName(): string {\n return this.props.name;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.props.onError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n type={this.constructor['type']}\n messageText={this.props.i18n.get('ancv.confirmPayment')}\n awaitText={this.props.i18n.get('await.waitForConfirmation')}\n showCountdownTimer={config.showCountdownTimer}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return (\n <ANCVInput\n
|
|
1
|
+
{"version":3,"file":"ANCV.js","sources":["../../../../src/components/ANCV/ANCV.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n public static readonly type = 'ancv';\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n paymentMethod: {\n type: ANCVElement.type,\n beneficiaryId: this.state.data?.beneficiaryId\n }\n };\n }\n\n private onOrderRequest = data => {\n if (this.props.onOrderRequest)\n return new Promise((resolve, reject) => {\n void this.props.onOrderRequest(resolve, reject, data);\n });\n\n if (this.props.session) {\n return this.props.session.createOrder();\n }\n };\n\n /**\n * Check if order exists, if it does Resolve.\n * Otherwise createOrder and then Resolve.\n */\n public createOrder = (): Promise<void> => {\n this.setStatus('loading');\n\n // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n if (this.props.order) {\n return Promise.resolve();\n }\n\n return this.onOrderRequest(this.data)\n .then((order: { orderData: string; pspReference: string }) => {\n const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n this.setState(stateOrder);\n return Promise.resolve();\n })\n .catch(error => {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', error));\n }\n });\n };\n\n public submit() {\n if (!this.isValid) {\n this.showValidation();\n return false;\n }\n\n this.createOrder()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n // Reimplement payButton similar to GiftCard to allow to set onClick\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n return <PayButton {...props} />;\n };\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n get displayName(): string {\n return this.props.name;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.props.onError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n brandName={this.displayName}\n type={this.constructor['type']}\n messageText={this.props.i18n.get('ancv.confirmPayment')}\n awaitText={this.props.i18n.get('await.waitForConfirmation')}\n showCountdownTimer={config.showCountdownTimer}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return (\n <ANCVInput\n {...this.props}\n setComponentRef={this.setComponentRef}\n onSubmit={this.submit}\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n />\n );\n }\n}\n\nexport default ANCVElement;\n"],"names":["ANCVElement","UIElement","formatData","paymentMethod","type","beneficiaryId","this","state","data","submit","isValid","showValidation","createOrder","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","catch","handleFailedResult","displayName","props","name","componentToRender","paymentData","h","Await","clientKey","onError","onComplete","brandLogo","icon","brandName","constructor","messageText","i18n","get","awaitText","showCountdownTimer","config","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","ANCVInput","setComponentRef","onSubmit","onChange","setState","payButton","showPayButton","super","args","_define_property","onOrderRequest","Promise","resolve","reject","session","setStatus","order","stateOrder","orderData","pspReference","error","AdyenCheckoutError","handleError","PayButton"],"mappings":"glBAWO,MAAMA,UAAoBC,EAM7BC,UAAAA,GACI,MAAO,CACHC,cAAe,CACXC,KAAMJ,EAAYI,KAClBC,cAAeC,KAAKC,MAAMC,MAAMH,eAG5C,CAwCOI,MAAAA,GACH,IAAKH,KAAKI,QAEN,OADAJ,KAAKK,kBACE,EAGXL,KAAKM,cACAC,KAAKP,KAAKQ,kBACVD,KAAKE,GACLF,KAAKG,GACLH,KAAKP,KAAKW,gBACVC,MAAMZ,KAAKa,mBACpB,CAOA,WAAIT,GACA,QAASJ,KAAKC,MAAMG,OACxB,CAEA,eAAIU,GACA,OAAOd,KAAKe,MAAMC,IACtB,CAEmBC,iBAAAA,GACf,OAAIjB,KAAKe,MAAMG,YAEPC,EAACC,EAAAA,CACGC,UAAWrB,KAAKe,MAAMM,UACtBH,YAAalB,KAAKe,MAAMG,YACxBI,QAAStB,KAAKe,MAAMO,QACpBC,WAAYvB,KAAKuB,WACjBC,UAAWxB,KAAKyB,KAChBC,UAAW1B,KAAKc,YAChBhB,KAAME,KAAK2B,YAAY,KACvBC,YAAa5B,KAAKe,MAAMc,KAAKC,IAAI,uBACjCC,UAAW/B,KAAKe,MAAMc,KAAKC,IAAI,6BAC/BE,mBAAoBC,EAAOD,mBAC3BE,aAAcD,EAAOE,cACrBC,iBAAkBH,EAAOI,kBACzBC,gBAAiBtC,KAAKsC,kBAM9BnB,EAACoB,EAAAA,IACOvC,KAAKe,MACTyB,gBAAiBxC,KAAKwC,gBACtBC,SAAUzC,KAAKG,OACfuC,SAAU1C,KAAK2C,SACfC,UAAW5C,KAAK4C,UAChBC,cAAe7C,KAAKe,MAAM8B,eAGtC,mBA/GGC,SAAAC,GAeHC,EAAAhD,KAAQiD,iBAAiB/C,GACjBF,KAAKe,MAAMkC,eACJ,IAAIC,QAAQ,CAACC,EAASC,KACpBpD,KAAKe,MAAMkC,eAAeE,EAASC,EAAQlD,KAGpDF,KAAKe,MAAMsC,QACJrD,KAAKe,MAAMsC,QAAQ/C,mBAD9B,GASJ0C,OAAO1C,cAAc,KACjBN,KAAKsD,UAAU,WAGXtD,KAAKe,MAAMwC,MACJL,QAAQC,UAGZnD,KAAKiD,eAAejD,KAAKE,MAC3BK,KAAMgD,IACH,MAAMC,EAAa,CAAED,MAAO,CAAEE,UAAWF,EAAME,UAAWC,aAAcH,EAAMG,eAE9E,OADA1D,KAAK2C,SAASa,GACPN,QAAQC,YAElBvC,MAAM+C,IACCA,aAAiBC,EACjB5D,KAAK6D,YAAYF,GAEjB3D,KAAK6D,YAAY,IAAID,EAAmB,QAASD,QAoBjEX,EAAAhD,KAAmB4C,YAAa7B,GACrBI,EAAC2C,EAAc/C,KApE1BiC,EADStD,EACcI,OAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createElement as e}from"../../../external/preact/dist/preact.js";import{useEffect as r,useState as
|
|
1
|
+
import{createElement as e}from"../../../external/preact/dist/preact.js";import{useEffect as r,useState as a,useRef as t}from"../../../external/preact/hooks/dist/hooks.js";import{useCoreContext as i}from"../../../core/Context/CoreProvider.js";import o from"../../internal/LoadingWrapper/LoadingWrapper.js";import n from"../../internal/FormFields/InputText.js";import s from"../../internal/FormFields/Field/Field.js";import l from"../../../utils/useForm/useForm.js";import"../../internal/SecuredFields/lib/CSF/utils/userAgent.js";import{ancvValidationRules as c}from"../validate.js";function d({showPayButton:d,payButton:u,onChange:m,onSubmit:f,setComponentRef:p}){const{i18n:b}=i(),{handleChangeFor:y,triggerValidation:g,data:h,valid:F,errors:I,isValid:v}=l({schema:["beneficiaryId"],rules:c});r(()=>{m({data:h,errors:I,valid:F,isValid:v})},[m,h,F,I,v]);const[j,C]=a("ready"),k=t({setStatus:C,showValidation:g});return r(()=>{p(k.current)},[p,k.current]),e(o,null,e("div",{className:"adyen-checkout__ancv"},e("p",{className:"adyen-checkout-form-instruction"},b.get("ancv.form.instruction")),e(s,{errorMessage:!!I.beneficiaryId&&b.get(I.beneficiaryId.errorMessage),label:b.get("ancv.input.label"),isValid:F.beneficiaryId,name:"beneficiaryId"},e(n,{value:h.beneficiaryId,name:"beneficiaryId",spellcheck:!0,required:!0,onInput:y("beneficiaryId","input"),onBlur:y("beneficiaryId","blur"),autocomplete:void 0})),d&&u({status:j,label:b.get("confirmPurchase"),onClick:f})))}d.defaultProps={};export{d as default};
|
|
2
2
|
//# sourceMappingURL=ANCVInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANCVInput.js","sources":["../../../../../src/components/ANCV/components/ANCVInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport LoadingWrapper from '../../internal/LoadingWrapper';\nimport InputText from '../../internal/FormFields/InputText';\nimport Field from '../../internal/FormFields/Field';\nimport useForm from '../../../utils/useForm';\nimport { ancvValidationRules } from '../validate';\nimport { ANCVDataState } from '../types';\nimport {
|
|
1
|
+
{"version":3,"file":"ANCVInput.js","sources":["../../../../../src/components/ANCV/components/ANCVInput.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport LoadingWrapper from '../../internal/LoadingWrapper';\nimport InputText from '../../internal/FormFields/InputText';\nimport Field from '../../internal/FormFields/Field';\nimport useForm from '../../../utils/useForm';\nimport { ancvValidationRules } from '../validate';\nimport { ANCVDataState } from '../types';\nimport { ComponentMethodsRef } from '../../internal/UIElement/types';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport { ValidationRuleResult } from '../../../utils/Validator/ValidationRuleResult';\n\nexport interface ANCVInputProps {\n setComponentRef: (ref: ComponentMethodsRef) => void;\n showPayButton: boolean;\n onSubmit: () => void;\n payButton: (props: PayButtonProps) => h.JSX.Element;\n onChange: (data: {\n data: ANCVDataState;\n errors: { [key: string]: ValidationRuleResult };\n valid: { [key: string]: boolean };\n isValid: boolean;\n }) => void;\n}\n\ntype ANCVInputDataState = ANCVDataState;\n\nfunction ANCVInput({ showPayButton, payButton, onChange, onSubmit, setComponentRef }: Readonly<ANCVInputProps>) {\n const { i18n } = useCoreContext();\n\n const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<ANCVInputDataState>({\n schema: ['beneficiaryId'],\n rules: ancvValidationRules\n });\n\n useEffect(() => {\n onChange({ data, errors, valid, isValid });\n }, [onChange, data, valid, errors, isValid]);\n\n const [status, setStatus] = useState<string>('ready');\n\n const ancvRef = useRef<ComponentMethodsRef>({\n setStatus,\n showValidation: triggerValidation\n });\n\n useEffect(() => {\n setComponentRef(ancvRef.current);\n }, [setComponentRef, ancvRef.current]);\n\n return (\n <LoadingWrapper>\n <div className=\"adyen-checkout__ancv\">\n <p className=\"adyen-checkout-form-instruction\">{i18n.get('ancv.form.instruction')}</p>\n <Field\n errorMessage={!!errors.beneficiaryId && i18n.get(errors.beneficiaryId.errorMessage)}\n label={i18n.get('ancv.input.label')}\n isValid={valid.beneficiaryId}\n name={'beneficiaryId'}\n >\n <InputText\n value={data.beneficiaryId}\n name={'beneficiaryId'}\n spellcheck={true}\n required={true}\n onInput={handleChangeFor('beneficiaryId', 'input')}\n onBlur={handleChangeFor('beneficiaryId', 'blur')}\n autocomplete={undefined}\n />\n </Field>\n {showPayButton && payButton({ status, label: i18n.get('confirmPurchase'), onClick: onSubmit })}\n </div>\n </LoadingWrapper>\n );\n}\n\nANCVInput.defaultProps = {};\n\nexport default ANCVInput;\n"],"names":["ANCVInput","showPayButton","payButton","onChange","onSubmit","setComponentRef","i18n","useCoreContext","handleChangeFor","triggerValidation","data","valid","errors","isValid","useForm","schema","rules","ancvValidationRules","useEffect","status","setStatus","useState","ancvRef","useRef","showValidation","current","h","LoadingWrapper","div","className","p","get","Field","errorMessage","beneficiaryId","label","name","InputText","value","spellcheck","required","onInput","onBlur","autocomplete","undefined","onClick","defaultProps"],"mappings":"qkBA4BA,SAASA,GAAUC,cAAEA,EAAaC,UAAEA,EAASC,SAAEA,EAAQC,SAAEA,EAAQC,gBAAEA,IAC/D,MAAMC,KAAEA,GAASC,KAEXC,gBAAEA,EAAeC,kBAAEA,EAAiBC,KAAEA,EAAIC,MAAEA,EAAKC,OAAEA,EAAMC,QAAEA,GAAYC,EAA4B,CACrGC,OAAQ,CAAC,iBACTC,MAAOC,IAGXC,EAAU,KACNf,EAAS,CAAEO,OAAME,SAAQD,QAAOE,aACjC,CAACV,EAAUO,EAAMC,EAAOC,EAAQC,IAEnC,MAAOM,EAAQC,GAAaC,EAAiB,SAEvCC,EAAUC,EAA4B,CACxCH,YACAI,eAAgBf,IAOpB,OAJAS,EAAU,KACNb,EAAgBiB,EAAQG,UACzB,CAACpB,EAAiBiB,EAAQG,UAGzBC,EAACC,OACGD,EAACE,MAAAA,CAAIC,UAAU,wBACXH,EAACI,IAAAA,CAAED,UAAU,mCAAmCvB,EAAKyB,IAAI,0BACzDL,EAACM,EAAAA,CACGC,eAAgBrB,EAAOsB,eAAiB5B,EAAKyB,IAAInB,EAAOsB,cAAcD,cACtEE,MAAO7B,EAAKyB,IAAI,oBAChBlB,QAASF,EAAMuB,cACfE,KAAM,iBAENV,EAACW,EAAAA,CACGC,MAAO5B,EAAKwB,cACZE,KAAM,gBACNG,YAAY,EACZC,UAAU,EACVC,QAASjC,EAAgB,gBAAiB,SAC1CkC,OAAQlC,EAAgB,gBAAiB,QACzCmC,kBAAcC,KAGrB3C,GAAiBC,EAAU,CAAEiB,SAAQgB,MAAO7B,EAAKyB,IAAI,mBAAoBc,QAASzC,KAInG,CAEAJ,EAAU8C,aAAe,CAAA"}
|
|
@@ -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/BlikInput.js";import{Await as s}from"../internal/Await/Await.js";import n from"./config.js";import i from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as r}from"../tx-variants.js";class a extends e{formatData(){const t=!!this.props.storedPaymentMethodId;return{paymentMethod:{type:a.type,...!t&&{blikCode:this.state?.data?.blikCode},...t&&{storedPaymentMethodId:this.props.storedPaymentMethodId}}}}get isValid(){return!!this.props.storedPaymentMethodId||!!this.state.isValid}get displayName(){return this.props.storedPaymentMethodId&&this.props.label?this.props.label:this.props.name}get additionalInfo(){return this.props.storedPaymentMethodId&&this.props.label?this.props.name:null}componentToRender(){return this.props.paymentData?t(s,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.handleError,onComplete:this.onComplete,brandLogo:this.icon,type:n.type,messageText:this.props.i18n.get(n.messageTextId),awaitText:this.props.i18n.get(n.awaitTextId),showCountdownTimer:n.showCountdownTimer,delay:n.STATUS_INTERVAL,countdownTime:n.COUNTDOWN_MINUTES,throttleTime:n.THROTTLE_TIME,throttleInterval:n.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):this.props.storedPaymentMethodId?t(i,{showPayButton:this.props.showPayButton,name:this.displayName,payButton:this.payButton,onSubmit:this.submit,ref:t=>{this.componentRef=t}}):t(o,{ref:t=>{this.componentRef=t},...this.props,onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})}}var p,m,d;p=a,m="type",d=r.blik,m in p?Object.defineProperty(p,m,{value:d,enumerable:!0,configurable:!0,writable:!0}):p[m]=d;export{a 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/BlikInput.js";import{Await as s}from"../internal/Await/Await.js";import n from"./config.js";import i from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as r}from"../tx-variants.js";class a extends e{formatData(){const t=!!this.props.storedPaymentMethodId;return{paymentMethod:{type:a.type,...!t&&{blikCode:this.state?.data?.blikCode},...t&&{storedPaymentMethodId:this.props.storedPaymentMethodId}}}}get isValid(){return!!this.props.storedPaymentMethodId||!!this.state.isValid}get displayName(){return this.props.storedPaymentMethodId&&this.props.label?this.props.label:this.props.name}get additionalInfo(){return this.props.storedPaymentMethodId&&this.props.label?this.props.name:null}componentToRender(){return this.props.paymentData?t(s,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.handleError,onComplete:this.onComplete,brandLogo:this.icon,brandName:this.displayName,type:n.type,messageText:this.props.i18n.get(n.messageTextId),awaitText:this.props.i18n.get(n.awaitTextId),showCountdownTimer:n.showCountdownTimer,delay:n.STATUS_INTERVAL,countdownTime:n.COUNTDOWN_MINUTES,throttleTime:n.THROTTLE_TIME,throttleInterval:n.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):this.props.storedPaymentMethodId?t(i,{showPayButton:this.props.showPayButton,name:this.displayName,payButton:this.payButton,onSubmit:this.submit,ref:t=>{this.componentRef=t}}):t(o,{ref:t=>{this.componentRef=t},...this.props,onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})}}var p,m,d;p=a,m="type",d=r.blik,m in p?Object.defineProperty(p,m,{value:d,enumerable:!0,configurable:!0,writable:!0}):p[m]=d;export{a as default};
|
|
2
2
|
//# sourceMappingURL=Blik.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blik.js","sources":["../../../../src/components/Blik/Blik.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BlikInput from '../../components/Blik/components/BlikInput';\nimport { Await } from '../internal/Await';\nimport config from './config';\nimport RedirectButton from '../../components/internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\ninterface BlikElementData {\n paymentMethod: {\n type: string;\n blikCode: string;\n };\n}\n\nclass BlikElement extends UIElement<AwaitConfiguration> {\n public static readonly type = TxVariants.blik;\n\n formatData(): BlikElementData {\n const recurringPayment = !!this.props.storedPaymentMethodId;\n\n return {\n paymentMethod: {\n type: BlikElement.type,\n ...(!recurringPayment && { blikCode: this.state?.data?.blikCode }),\n ...(recurringPayment && { storedPaymentMethodId: this.props.storedPaymentMethodId })\n }\n };\n }\n\n get isValid(): boolean {\n if (this.props.storedPaymentMethodId) {\n return true;\n }\n\n return !!this.state.isValid;\n }\n\n get displayName() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.label;\n }\n return this.props.name;\n }\n\n get additionalInfo() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.name;\n }\n return null;\n }\n\n /**\n * NOTE: for future reference:\n * this.props.onComplete (which is called from this.onComplete) equates to the merchant defined onAdditionalDetails callback\n * (the initial /payments response defines an \"await\" action, actionTypes.ts translates this to \"onComplete: props.onAdditionalDetails\")\n */\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.handleError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n type={config.type}\n messageText={this.props.i18n.get(config.messageTextId)}\n awaitText={this.props.i18n.get(config.awaitTextId)}\n showCountdownTimer={config.showCountdownTimer}\n delay={config.STATUS_INTERVAL}\n countdownTime={config.COUNTDOWN_MINUTES}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <BlikInput\n // @ts-ignore Ref is used by preact component\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default BlikElement;\n"],"names":["BlikElement","UIElement","formatData","recurringPayment","this","props","storedPaymentMethodId","paymentMethod","type","blikCode","state","data","isValid","displayName","label","name","additionalInfo","componentToRender","paymentData","h","Await","clientKey","onError","handleError","onComplete","brandLogo","icon","config","messageText","i18n","get","messageTextId","awaitText","awaitTextId","showCountdownTimer","delay","STATUS_INTERVAL","countdownTime","COUNTDOWN_MINUTES","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","RedirectButton","showPayButton","payButton","onSubmit","submit","ref","componentRef","BlikInput","onChange","setState","TxVariants","blik"],"mappings":"sWAgBA,MAAMA,UAAoBC,EAGtBC,UAAAA,GACI,MAAMC,IAAqBC,KAAKC,MAAMC,sBAEtC,MAAO,CACHC,cAAe,CACXC,KAAMR,EAAYQ,SACbL,GAAoB,CAAEM,SAAUL,KAAKM,OAAOC,MAAMF,aACnDN,GAAoB,CAAEG,sBAAuBF,KAAKC,MAAMC,wBAGxE,CAEA,WAAIM,GACA,QAAIR,KAAKC,MAAMC,yBAINF,KAAKM,MAAME,OACxB,CAEA,eAAIC,GACA,OAAIT,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMS,MACxCV,KAAKC,MAAMS,MAEfV,KAAKC,MAAMU,IACtB,CAEA,kBAAIC,GACA,OAAIZ,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMS,MACxCV,KAAKC,MAAMU,KAEf,IACX,CAOA,iBAAAE,GACI,OAAIb,KAAKC,MAAMa,YAEPC,EAACC,EAAAA,CACGC,UAAWjB,KAAKC,MAAMgB,UACtBH,YAAad,KAAKC,MAAMa,YACxBI,QAASlB,KAAKmB,YACdC,WAAYpB,KAAKoB,WACjBC,UAAWrB,KAAKsB,
|
|
1
|
+
{"version":3,"file":"Blik.js","sources":["../../../../src/components/Blik/Blik.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BlikInput from '../../components/Blik/components/BlikInput';\nimport { Await } from '../internal/Await';\nimport config from './config';\nimport RedirectButton from '../../components/internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\ninterface BlikElementData {\n paymentMethod: {\n type: string;\n blikCode: string;\n };\n}\n\nclass BlikElement extends UIElement<AwaitConfiguration> {\n public static readonly type = TxVariants.blik;\n\n formatData(): BlikElementData {\n const recurringPayment = !!this.props.storedPaymentMethodId;\n\n return {\n paymentMethod: {\n type: BlikElement.type,\n ...(!recurringPayment && { blikCode: this.state?.data?.blikCode }),\n ...(recurringPayment && { storedPaymentMethodId: this.props.storedPaymentMethodId })\n }\n };\n }\n\n get isValid(): boolean {\n if (this.props.storedPaymentMethodId) {\n return true;\n }\n\n return !!this.state.isValid;\n }\n\n get displayName() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.label;\n }\n return this.props.name;\n }\n\n get additionalInfo() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.name;\n }\n return null;\n }\n\n /**\n * NOTE: for future reference:\n * this.props.onComplete (which is called from this.onComplete) equates to the merchant defined onAdditionalDetails callback\n * (the initial /payments response defines an \"await\" action, actionTypes.ts translates this to \"onComplete: props.onAdditionalDetails\")\n */\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.handleError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n brandName={this.displayName}\n type={config.type}\n messageText={this.props.i18n.get(config.messageTextId)}\n awaitText={this.props.i18n.get(config.awaitTextId)}\n showCountdownTimer={config.showCountdownTimer}\n delay={config.STATUS_INTERVAL}\n countdownTime={config.COUNTDOWN_MINUTES}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <BlikInput\n // @ts-ignore Ref is used by preact component\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default BlikElement;\n"],"names":["BlikElement","UIElement","formatData","recurringPayment","this","props","storedPaymentMethodId","paymentMethod","type","blikCode","state","data","isValid","displayName","label","name","additionalInfo","componentToRender","paymentData","h","Await","clientKey","onError","handleError","onComplete","brandLogo","icon","brandName","config","messageText","i18n","get","messageTextId","awaitText","awaitTextId","showCountdownTimer","delay","STATUS_INTERVAL","countdownTime","COUNTDOWN_MINUTES","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","RedirectButton","showPayButton","payButton","onSubmit","submit","ref","componentRef","BlikInput","onChange","setState","TxVariants","blik"],"mappings":"sWAgBA,MAAMA,UAAoBC,EAGtBC,UAAAA,GACI,MAAMC,IAAqBC,KAAKC,MAAMC,sBAEtC,MAAO,CACHC,cAAe,CACXC,KAAMR,EAAYQ,SACbL,GAAoB,CAAEM,SAAUL,KAAKM,OAAOC,MAAMF,aACnDN,GAAoB,CAAEG,sBAAuBF,KAAKC,MAAMC,wBAGxE,CAEA,WAAIM,GACA,QAAIR,KAAKC,MAAMC,yBAINF,KAAKM,MAAME,OACxB,CAEA,eAAIC,GACA,OAAIT,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMS,MACxCV,KAAKC,MAAMS,MAEfV,KAAKC,MAAMU,IACtB,CAEA,kBAAIC,GACA,OAAIZ,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMS,MACxCV,KAAKC,MAAMU,KAEf,IACX,CAOA,iBAAAE,GACI,OAAIb,KAAKC,MAAMa,YAEPC,EAACC,EAAAA,CACGC,UAAWjB,KAAKC,MAAMgB,UACtBH,YAAad,KAAKC,MAAMa,YACxBI,QAASlB,KAAKmB,YACdC,WAAYpB,KAAKoB,WACjBC,UAAWrB,KAAKsB,KAChBC,UAAWvB,KAAKS,YAChBL,KAAMoB,EAAOpB,KACbqB,YAAazB,KAAKC,MAAMyB,KAAKC,IAAIH,EAAOI,eACxCC,UAAW7B,KAAKC,MAAMyB,KAAKC,IAAIH,EAAOM,aACtCC,mBAAoBP,EAAOO,mBAC3BC,MAAOR,EAAOS,gBACdC,cAAeV,EAAOW,kBACtBC,aAAcZ,EAAOa,cACrBC,iBAAkBd,EAAOe,kBACzBC,gBAAiBxC,KAAKwC,kBAK3BxC,KAAKC,MAAMC,sBACda,EAAC0B,EAAAA,CACGC,cAAe1C,KAAKC,MAAMyC,cAC1B/B,KAAMX,KAAKS,YACXkC,UAAW3C,KAAK2C,UAChBC,SAAU5C,KAAK6C,OACfC,IAAKA,IACD9C,KAAK+C,aAAeD,KAI5B/B,EAACiC,EAAAA,CAEGF,IAAKA,IACD9C,KAAK+C,aAAeD,MAEpB9C,KAAKC,MACTgD,SAAUjD,KAAKkD,SACfN,SAAU5C,KAAK6C,OACfF,UAAW3C,KAAK2C,WAG5B,cAvFE/C,IACqBQ,SAAO+C,EAAWC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createElement as t}from"../../external/preact/dist/preact.js";import e from"./components/CardInput/CardInput.js";import o from"../../utils/browserInfo.js";import s from"../internal/SecuredFields/binLookup/triggerBinLookUp.js";import{fieldTypeToSnakeCase as n,isSecuredField as i}from"../internal/SecuredFields/utils.js";import{reject as r}from"../../utils/commonUtils.js";import{shouldIncludeInstallmentsInPaymentData as
|
|
1
|
+
import{createElement as t}from"../../external/preact/dist/preact.js";import e from"./components/CardInput/CardInput.js";import o from"../../utils/browserInfo.js";import s from"../internal/SecuredFields/binLookup/triggerBinLookUp.js";import{fieldTypeToSnakeCase as n,isSecuredField as i}from"../internal/SecuredFields/utils.js";import{reject as r,notFalsy as a}from"../../utils/commonUtils.js";import{shouldIncludeInstallmentsInPaymentData as p}from"./components/CardInput/utils.js";import c from"../internal/ClickToPay/services/create-clicktopay-service.js";import u from"./components/ClickToPayWrapper.js";import{TxVariants as d}from"../tx-variants.js";import{UIElement as l}from"../internal/UIElement/UIElement.js";import h from"../internal/PayButton/PayButton.js";import m,{IMPLEMENTATION_ERROR as y}from"../../core/Errors/AdyenCheckoutError.js";import f from"./components/CardInput/defaultProps.js";import{AnalyticsInfoEvent as g,InfoEventType as b}from"../../core/Analytics/events/AnalyticsInfoEvent.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}class P extends l{setStatus(t,e){return this.componentRef?.setStatus&&this.componentRef.setStatus(t,e),this.clickToPayRef?.setStatus&&this.clickToPayRef.setStatus(t,e),this}getPaymentMethodConfigFromResponse(t){return t?.fundingSource?this.core.paymentMethodsResponse?.findByFundingSource(t.type,t.fundingSource):super.getPaymentMethodConfigFromResponse(t)}formatProps(t){const e=t.session?.configuration?.enableStoreDetails??t.enableStoreDetails,o=!(0===t.amount?.value)&&e,s=t.storedPaymentMethodId||t.id,n=s&&t?.supportedShopperInteractions?.includes("Ecommerce");if(s&&!n)throw new m(y,"You are trying to create a storedCard from a stored PM that does not support Ecommerce interactions");const i=t.installmentOptions;t.session&&a(i)&&console.warn("WARNING: You have defined installments configuration on the Card component, but you are using a /sessions integration.\nWith this integration, installments configuration must be defined when you create the session. Any configuration defined elsewhere will be ignored.\n\n");const r=t.session?t.session?.configuration?.installmentOptions??f.installmentOptions:i;return{...t,holderNameRequired:!!t.hasHolderName&&t.holderNameRequired,hasCVC:!(t.brand&&"bcmc"===t.brand||t.hideCVC),billingAddressRequired:!t.storedPaymentMethodId&&t.billingAddressRequired,billingAddressMode:t.onAddressLookup?f.billingAddressMode:t.billingAddressMode,brand:t.brand??d.card,countryCode:t.countryCode?t.countryCode.toLowerCase():null,configuration:{...t.configuration,socialSecurityNumberMode:t.configuration?.socialSecurityNumberMode??"auto"},brandsConfiguration:t.brandsConfiguration||t.configuration?.brandsConfiguration||{},icon:t.icon||t.configuration?.icon,installmentOptions:r,enableStoreDetails:e,showStoreDetailsCheckbox:o,clickToPayConfiguration:{...t.clickToPayConfiguration,disableOtpAutoFocus:t.clickToPayConfiguration?.disableOtpAutoFocus||!1,shopperEmail:t.clickToPayConfiguration?.shopperEmail||this.core.options?.session?.shopperEmail,telephoneNumber:t.clickToPayConfiguration?.telephoneNumber||this.core.options?.session?.telephoneNumber,locale:t.clickToPayConfiguration?.locale||t.i18n?.locale?.replace("-","_")},...s&&{storedPaymentMethodId:s}}}formatData(){const t=this.state.selectedBrandValue;return{paymentMethod:{type:P.type,...this.state.data,...this.props.storedPaymentMethodId&&{storedPaymentMethodId:this.props.storedPaymentMethodId,holderName:this.props.holderName??""},...t&&{brand:t},...this.props.fundingSource&&{fundingSource:this.props.fundingSource},...this.state.fastlaneData&&{fastlaneData:btoa(JSON.stringify(this.state.fastlaneData))}},...this.state.billingAddress&&{billingAddress:this.state.billingAddress},...this.state.socialSecurityNumber&&{socialSecurityNumber:this.state.socialSecurityNumber},...this.storePaymentMethodPayload,...p(this.state.installments)&&{installments:this.state.installments},browserInfo:this.browserInfo,origin:!!window&&window.location.origin}}beforeRender(t){if(t?.originalAction)return;const e=new g({type:b.rendered,component:this.type,configData:{...t,showPayButton:this.props.showPayButton},...t?.oneClick&&{isStoredPaymentMethod:!0,brand:t.brand}});this.analytics.sendAnalytics(e)}updateStyles(t){return this.componentRef?.updateStyles&&this.componentRef.updateStyles(t),this}setFocusOn(t){return this.componentRef?.setFocusOn&&this.componentRef.setFocusOn(t),this}processBinLookupResponse(t,e=!1){return this.componentRef?.processBinLookupResponse&&this.componentRef.processBinLookupResponse(t,e),this}handleUnsupportedCard(t){return this.componentRef?.handleUnsupportedCard&&this.componentRef.handleUnsupportedCard(t),this}onBinLookup(t){if(!t.isReset){const e=r("supportedBrandsRaw").from(t);this.props.onBinLookup?.(e)}}get storePaymentMethodPayload(){if(this.props.storedPaymentMethodId?.length>0)return{};if(0===this.props.amount?.value)return this.props.enableStoreDetails?{storePaymentMethod:!0}:{};return this.props.showStoreDetailsCheckbox&&void 0!==this.state.storePaymentMethod?{storePaymentMethod:Boolean(this.state.storePaymentMethod)}:{}}get isValid(){return!!this.state.isValid}get icon(){return this.props.icon??this.resources.getImage()(this.props.brand)}get brands(){const{brands:t,brandsConfiguration:e}=this.props;return t?t.map(t=>({icon:e?.[t]?.icon??this.props.modules.resources.getImage()(t),name:t})):[]}get displayName(){return this.props.storedPaymentMethodId?`•••• ${this.props.lastFour}`:this.props.name||P.type}get accessibleName(){return(this.props.name||P.type)+(this.props.storedPaymentMethodId?" "+this.props.i18n.get("creditCard.storedCard.description.ariaLabel").replace("%@",this.props.lastFour):"")}get browserInfo(){return o()}renderCardInput(o=!0){return t(e,{setComponentRef:this.setComponentRef,...this.props,...this.state,onSubmitAnalytics:this.submitAnalytics,onChange:this.setState,onSubmit:this.submit,handleKeyDown:this.handleKeyDown,payButton:this.payButton,onBrand:this.onBrand,onBinValue:this.onBinValue,brand:this.props.brand,brandsIcons:this.brands,isPayButtonPrimaryVariant:o,resources:this.resources,onFocus:this.onFocus,onBlur:this.onBlur,onConfigSuccess:this.onConfigSuccess})}componentToRender(){return t(u,{configuration:this.props.clickToPayConfiguration,clickToPayService:this.clickToPayService,isStandaloneComponent:!1,setClickToPayRef:this.setClickToPayRef,onSetStatus:this.setElementStatus,onSubmit:this.handleClickToPaySubmit,onError:this.handleError},t=>this.renderCardInput(t))}constructor(e,o){super(e,o),C(this,"clickToPayService",void 0),C(this,"clickToPayRef",null),C(this,"setClickToPayRef",t=>{this.clickToPayRef=t}),C(this,"onBrand",t=>{this.props.onBrand?.(t)}),C(this,"handleClickToPaySubmit",t=>{this.setState({data:{...t},valid:{},errors:{},isValid:!0}),this.submit()}),C(this,"onConfigSuccess",t=>{const e=new g({component:this.type,type:b.configured});this.submitAnalytics(e),this.props.onConfigSuccess?.(t)}),C(this,"onFocus",t=>{const e=new g({component:this.type,type:b.focus,target:n(t.fieldType)});this.submitAnalytics(e),i(t.fieldType)?this.props.onFocus?.(t.event):this.props.onFocus?.(t)}),C(this,"onBlur",t=>{const e=new g({component:this.type,type:b.unfocus,target:n(t.fieldType)});this.submitAnalytics(e),i(t.fieldType)?this.props.onBlur?.(t.event):this.props.onBlur?.(t)}),C(this,"onBinValue",s(this)),C(this,"payButton",e=>{const o=0===this.props.amount?.value,s=this.props.storedPaymentMethodId?.length>0;return t(h,{...e,label:o&&!s?this.props.i18n.get("payButton.saveDetails"):"",onClick:this.submit})}),o&&!o._disableClickToPay&&"prepaid"!==this.props.fundingSource&&(this.clickToPayService=c(this.props.configuration,this.props.clickToPayConfiguration,this.props.environment,this.analytics),this.clickToPayService?.initialize())}}C(P,"type",d.scheme),C(P,"defaultProps",{showFormInstruction:!0,_disableClickToPay:!1,doBinLookup:!0,...r(["type","setComponentRef"]).from(f)});export{P as CardElement,P as default};
|
|
2
2
|
//# sourceMappingURL=Card.js.map
|