@adyen/adyen-web 6.40.2 → 6.41.1
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 +35 -25
- 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/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.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/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/OrderPaymentMethods.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.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/MealVoucherFR/components/MealVoucherExpiryField.js +1 -1
- package/dist/es/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js +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/internal/Address/validate.formats.js +1 -1
- package/dist/es/components/internal/Address/validate.formats.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/context/ClickToPayProvider.js +1 -1
- package/dist/es/components/internal/ClickToPay/context/ClickToPayProvider.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/OpenInvoice/OpenInvoice.js +1 -1
- package/dist/es/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
- package/dist/es/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js +1 -1
- package/dist/es/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.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/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 +35 -25
- package/dist/es/utils/commonUtils.js +1 -1
- package/dist/es/utils/commonUtils.js.map +1 -1
- package/dist/es/utils/promiseTimeout.js.map +1 -1
- package/dist/es/utils/validator-utils.js +1 -1
- package/dist/es/utils/validator-utils.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/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.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/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/OrderPaymentMethods.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.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/MealVoucherFR/components/MealVoucherExpiryField.js +1 -1
- package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherExpiryField.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js +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/internal/Address/validate.formats.js +1 -1
- package/dist/es-legacy/components/internal/Address/validate.formats.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/context/ClickToPayProvider.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/context/ClickToPayProvider.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/OpenInvoice/OpenInvoice.js +1 -1
- package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
- package/dist/es-legacy/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js +1 -1
- package/dist/es-legacy/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.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/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/utils/commonUtils.js +1 -1
- package/dist/es-legacy/utils/commonUtils.js.map +1 -1
- package/dist/es-legacy/utils/promiseTimeout.js.map +1 -1
- package/dist/es-legacy/utils/validator-utils.js +1 -1
- package/dist/es-legacy/utils/validator-utils.js.map +1 -1
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsErrorEvent.js","sources":["../../../../../src/core/Analytics/events/AnalyticsErrorEvent.ts"],"sourcesContent":["import { AbstractAnalyticsEvent, AnalyticsEventCategory } from './AbstractAnalyticsEvent';\n\ntype AnalyticsErrorEventProps = {\n component: string;\n errorType: ErrorEventType;\n code: string;\n message?: string;\n};\n\nexport enum ErrorEventType {\n network = 'Network',\n implementation = 'Implementation',\n internal = 'Internal',\n apiError = 'ApiError',\n sdkError = 'SdkError',\n thirdParty = 'ThirdParty',\n generic = 'Generic',\n redirect = 'Redirect',\n threeDS2 = 'ThreeDS2'\n}\n\nexport enum ErrorEventCode {\n /** Trying to initialise a securedField iframe, but the iframe.contentWindow is undefined (meaning the containing element is not in the DOM */\n SECURED_FIELDS_IFRAME_CONTENT_WINDOW_NOT_FOUND = '500',\n /** */\n REDIRECT = '600',\n /**\n * Key not present in served securedFields asset\n */\n SECURED_FIELDS_KEY_NOT_FOUND = '608',\n /**\n * Encryption key generation failed in securedField\n */\n SECURED_FIELDS_ENCRYPTION_KEY_GEN_FAILED = '609',\n /**\n * Encryption failed in securedField\n */\n SECURED_FIELDS_ENCRYPTION_ERROR = '610',\n\n /** See also API_ERROR_CODE object in /src/core/Services/sessions/constants.ts which uses codes in the range 620-628 */\n\n /** Missing 'paymentData' property from threeDS2 action */\n THREEDS2_ACTION_IS_MISSING_PAYMENT_DATA = '700',\n\n /** Missing 'token' property from threeDS2 action */\n THREEDS2_ACTION_IS_MISSING_TOKEN = '701',\n\n /** Decoded token is missing a valid threeDSMethodURL property */\n THREEDS2_TOKEN_IS_MISSING_THREEDSMETHODURL = '702',\n /**\n * Decoded token is missing one or more of the following properties:\n * fingerprint: (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)\n * challenge: (acsTransID | messageVersion | threeDSServerTransID)\n */\n THREEDS2_TOKEN_IS_MISSING_OTHER_PROPS = '703',\n\n /** Token decoding or parsing has failed. ('not base64', 'malformed URI sequence' or 'Could not JSON parse token') */\n THREEDS2_TOKEN_DECODE_OR_PARSING_FAILED = '704',\n\n /** 3DS2 process has timed out */\n THREEDS2_TIMEOUT = '710',\n\n /** Decoded token is missing a valid acsURL property */\n THREEDS2_TOKEN_IS_MISSING_ACSURL = '800',\n\n /** Challenge has resulted in an error (no transStatus could be retrieved by the backend) */\n THREEDS2_NO_TRANSSTATUS = '801',\n\n /** callSubmit3DS2Fingerprint has received a response indicating either a \"frictionless\" flow, or a \"refused\" response, but without a details object */\n THREEDS2_NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED = '802',\n\n /** callSubmit3DS2Fingerprint cannot find a component to handle the action response */\n THREEDS2_NO_COMPONENT_FOR_ACTION = '803',\n\n /** callSubmit3DS2Fingerprint has received a response indicating a \"challenge\" but without an action object */\n THREEDS2_NO_ACTION_FOR_CHALLENGE = '804',\n\n /** 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 */\n THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = '805'\n}\n\nexport class AnalyticsErrorEvent extends AbstractAnalyticsEvent {\n private readonly errorType: ErrorEventType;\n private readonly code: string;\n\n private readonly message?: string;\n\n constructor(props: AnalyticsErrorEventProps) {\n super(props.component);\n\n this.errorType = props.errorType;\n this.code = props.code;\n\n if (props.message) this.message = props.message;\n }\n\n public getEventCategory(): AnalyticsEventCategory {\n return AnalyticsEventCategory.error;\n }\n}\n"],"names":["ErrorEventType","ErrorEventCode","AnalyticsErrorEvent","AbstractAnalyticsEvent","getEventCategory","AnalyticsEventCategory","error","constructor","props","super","component","_define_property","errorType","this","code","message"],"mappings":"yNASO,IAAAA,EAAKA,SAAAA,GAAAA,yNAAAA,CAUX,CAVWA,CAUX,CAAA,GAEMC,EAAKA,SAAAA,GAAAA,OACoIA,EAAA,+CAAA,MAExIA,EAAA,SAAA,MAIHA,EAAA,6BAAA,MAIAA,EAAA,yCAAA,MAIAA,EAAA,gCAAA,MAKwDA,EAAA,wCAAA,MAGPA,EAAA,iCAAA,MAGaA,EAAA,2CAAA,MAM9DA,EAAA,sCAAA,MAGkHA,EAAA,wCAAA,MAGpFA,EAAA,iBAAA,MAGsBA,EAAA,iCAAA,MAGqCA,EAAA,wBAAA,MAG2DA,EAAA,gDAAA,MAGjEA,EAAA,iCAAA,MAGwBA,EAAA,iCAAA,MAG6EA,EAAA,gDAAA,
|
|
1
|
+
{"version":3,"file":"AnalyticsErrorEvent.js","sources":["../../../../../src/core/Analytics/events/AnalyticsErrorEvent.ts"],"sourcesContent":["import { AbstractAnalyticsEvent, AnalyticsEventCategory } from './AbstractAnalyticsEvent';\n\ntype AnalyticsErrorEventProps = {\n component: string;\n errorType: ErrorEventType;\n code: string;\n message?: string;\n};\n\nexport enum ErrorEventType {\n network = 'Network',\n implementation = 'Implementation',\n internal = 'Internal',\n apiError = 'ApiError',\n sdkError = 'SdkError',\n thirdParty = 'ThirdParty',\n generic = 'Generic',\n redirect = 'Redirect',\n threeDS2 = 'ThreeDS2'\n}\n\nexport enum ErrorEventCode {\n /** Trying to initialise a securedField iframe, but the iframe.contentWindow is undefined (meaning the containing element is not in the DOM */\n SECURED_FIELDS_IFRAME_CONTENT_WINDOW_NOT_FOUND = '500',\n /** */\n REDIRECT = '600',\n /**\n * Key not present in served securedFields asset\n */\n SECURED_FIELDS_KEY_NOT_FOUND = '608',\n /**\n * Encryption key generation failed in securedField\n */\n SECURED_FIELDS_ENCRYPTION_KEY_GEN_FAILED = '609',\n /**\n * Encryption failed in securedField\n */\n SECURED_FIELDS_ENCRYPTION_ERROR = '610',\n\n /** See also API_ERROR_CODE object in /src/core/Services/sessions/constants.ts which uses codes in the range 620-628 */\n\n /** Missing 'paymentData' property from threeDS2 action */\n THREEDS2_ACTION_IS_MISSING_PAYMENT_DATA = '700',\n\n /** Missing 'token' property from threeDS2 action */\n THREEDS2_ACTION_IS_MISSING_TOKEN = '701',\n\n /** Decoded token is missing a valid threeDSMethodURL property */\n THREEDS2_TOKEN_IS_MISSING_THREEDSMETHODURL = '702',\n /**\n * Decoded token is missing one or more of the following properties:\n * fingerprint: (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)\n * challenge: (acsTransID | messageVersion | threeDSServerTransID)\n */\n THREEDS2_TOKEN_IS_MISSING_OTHER_PROPS = '703',\n\n /** Token decoding or parsing has failed. ('not base64', 'malformed URI sequence' or 'Could not JSON parse token') */\n THREEDS2_TOKEN_DECODE_OR_PARSING_FAILED = '704',\n\n /** 3DS2 process has timed out */\n THREEDS2_TIMEOUT = '710',\n\n /** Decoded token is missing a valid acsURL property */\n THREEDS2_TOKEN_IS_MISSING_ACSURL = '800',\n\n /** Challenge has resulted in an error (no transStatus could be retrieved by the backend) */\n THREEDS2_NO_TRANSSTATUS = '801',\n\n /** callSubmit3DS2Fingerprint has received a response indicating either a \"frictionless\" flow, or a \"refused\" response, but without a details object */\n THREEDS2_NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED = '802',\n\n /** callSubmit3DS2Fingerprint cannot find a component to handle the action response */\n THREEDS2_NO_COMPONENT_FOR_ACTION = '803',\n\n /** callSubmit3DS2Fingerprint has received a response indicating a \"challenge\" but without an action object */\n THREEDS2_NO_ACTION_FOR_CHALLENGE = '804',\n\n /** 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 */\n THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = '805',\n\n /** 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. */\n THREEDS2_CHALLENGE_TOKEN_IS_MISSING_THREEDSNOTIFICATIONURL = '806'\n}\n\nexport class AnalyticsErrorEvent extends AbstractAnalyticsEvent {\n private readonly errorType: ErrorEventType;\n private readonly code: string;\n\n private readonly message?: string;\n\n constructor(props: AnalyticsErrorEventProps) {\n super(props.component);\n\n this.errorType = props.errorType;\n this.code = props.code;\n\n if (props.message) this.message = props.message;\n }\n\n public getEventCategory(): AnalyticsEventCategory {\n return AnalyticsEventCategory.error;\n }\n}\n"],"names":["ErrorEventType","ErrorEventCode","AnalyticsErrorEvent","AbstractAnalyticsEvent","getEventCategory","AnalyticsEventCategory","error","constructor","props","super","component","_define_property","errorType","this","code","message"],"mappings":"yNASO,IAAAA,EAAKA,SAAAA,GAAAA,yNAAAA,CAUX,CAVWA,CAUX,CAAA,GAEMC,EAAKA,SAAAA,GAAAA,OACoIA,EAAA,+CAAA,MAExIA,EAAA,SAAA,MAIHA,EAAA,6BAAA,MAIAA,EAAA,yCAAA,MAIAA,EAAA,gCAAA,MAKwDA,EAAA,wCAAA,MAGPA,EAAA,iCAAA,MAGaA,EAAA,2CAAA,MAM9DA,EAAA,sCAAA,MAGkHA,EAAA,wCAAA,MAGpFA,EAAA,iBAAA,MAGsBA,EAAA,iCAAA,MAGqCA,EAAA,wBAAA,MAG2DA,EAAA,gDAAA,MAGjEA,EAAA,iCAAA,MAGwBA,EAAA,iCAAA,MAG6EA,EAAA,gDAAA,MAGgDA,EAAA,2DAAA,MA3DjOA,CA6DX,CA7DWA,CA6DX,CAAA,GAEM,MAAMC,UAA4BC,EAe9BC,gBAAAA,GACH,OAAOC,EAAuBC,KAClC,CAXA,WAAAC,CAAYC,GACRC,MAAMD,EAAME,WANhBC,OAAiBC,oBACjBD,EAAAE,KAAiBC,eAEjBH,EAAAE,KAAiBE,kBAKbF,KAAKD,UAAYJ,EAAMI,UACvBC,KAAKC,KAAON,EAAMM,KAEdN,EAAMO,UAASF,KAAKE,QAAUP,EAAMO,QAC5C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e,n){if(null==e)throw new Error(n);return e}const n="https://checkoutshopper-live.adyen.com/checkoutshopper/",o=e("6.
|
|
1
|
+
function e(e,n){if(null==e)throw new Error(n);return e}const n="https://checkoutshopper-live.adyen.com/checkoutshopper/",o=e("6.41.1","LIBRARY_VERSION is not defined"),t=e("eslegacy","BUNDLE_TYPE is not defined"),r=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","donation","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"],i=6e4;var d=function(e){return e.WEB="web",e}({});const a="web";var c=function(e){return e.NATIVE="nativeComponent",e.GENERIC="genericComponent",e}({});export{d as CHANNEL,i as DEFAULT_HTTP_TIMEOUT,n as FALLBACK_CONTEXT,r as GENERIC_OPTIONS,t as LIBRARY_BUNDLE_TYPE,o as LIBRARY_VERSION,c as PAYMENT_METHOD_BEHAVIOR,a as PLATFORM};
|
|
2
2
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const e=Object.prototype.toString;function n(t){return"object"==typeof t&&null!==t&&"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t}function o(t){return!1!==t&&r(t)}function c(t){return!!t&&"object"==typeof t}function u(t){return!o(t)||(!(!("number"==typeof(r=t)||c(r)&&"[object Number]"===e.call(r))||0!==t&&!Number.isNaN(t))||(!(!n(t)&&!function(t){return"string"==typeof t||c(t)&&"[object String]"===e.call(t)}(t)||0!==t.length)||!(!c(t)||0!==Object.keys(t).length)));var r}function f(...e){const r=n(e[0])?e[0]:e;return{from:e=>r.map(t=>t in e?{[t]:e[t]}:{}).reduce((e,n)=>function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(n){t(e,n,r[n])})}return e}({},e,n),{})}}function
|
|
1
|
+
function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const e=Object.prototype.toString;function n(t){return"object"==typeof t&&null!==t&&"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t}function o(t){return!1!==t&&r(t)}function c(t){return!!t&&"object"==typeof t}function u(t){return!o(t)||(!(!("number"==typeof(r=t)||c(r)&&"[object Number]"===e.call(r))||0!==t&&!Number.isNaN(t))||(!(!n(t)&&!function(t){return"string"==typeof t||c(t)&&"[object String]"===e.call(t)}(t)||0!==t.length)||!(!c(t)||0!==Object.keys(t).length)));var r}function f(t){return!u(t)}function i(...e){const r=n(e[0])?e[0]:e;return{from:e=>r.map(t=>t in e?{[t]:e[t]}:{}).reduce((e,n)=>function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(n){t(e,n,r[n])})}return e}({},e,n),{})}}function l(...t){const e=n(t[0])?t[0]:t;return{from:t=>i(...Object.keys(t).filter(t=>!e.includes(t))).from(t)}}export{r as existy,u as falsy,n as isArray,f as notFalsy,i as pick,l as reject,o as truthy};
|
|
2
2
|
//# sourceMappingURL=commonUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonUtils.js","sources":["../../../src/utils/commonUtils.ts"],"sourcesContent":["/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n * @internal\n */\nconst objToString = Object.prototype.toString;\n\n/**\n * Checks if `prop` is classified as an `Array` primitive or object.\n * @internal\n * @param prop - The value to check.\n * @returns Returns `true` if `prop` is correctly classified, else `false`.\n * @example\n * ```\n * isArray([1, 2, 3]);\n * // => true\n *\n * isArray(1);\n * // => false\n * ```\n */\nexport function isArray(prop) {\n return typeof prop === 'object' && prop !== null && Object.prototype.toString.call(prop) === '[object Array]';\n}\n\n/**\n * The function existy is meant to define the existence of something.\n * Using the loose inequality operator (!=), it is possible to distinguish between null, undefined, and everything else.\n * @internal\n * @param x -\n * @returns\n */\nexport function existy(x) {\n return x != null;\n}\n\n/**\n * Used to determine if something should be considered a synonym for true\n * NOTE: The number zero is considered “truthy” by design as is '' & `{}`.\n * If you wish to retain the behavior where 0 is a synonym for false, then do not use truthy where you might expect 0\n * So - returns true if something is not false, undefined or null\n * @internal\n * @param x -\n * @returns\n */\nexport function truthy(x) {\n return x !== false && existy(x);\n}\n\n/**\n * Checks if `value` is object-like.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * @internal\n * Checks if `value` is classified as a `Number` primitive or object.\n * NOTE: `Infinity`, `-Infinity`, and `NaN` are classified as numbers\n * (FROM lodash.3.10.1)\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isNumber(8.4);\n * // => true\n *\n * isNumber(NaN);\n * // => true\n *\n * isNumber('8.4');\n * // => false\n * ```\n */\nfunction isNumber(value) {\n const numberTag = '[object Number]';\n return typeof value === 'number' || (isObjectLike(value) && objToString.call(value) === numberTag);\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isString('abc');\n * // => true\n *\n * isString(1);\n * // => false\n * ```\n */\nfunction isString(value) {\n const stringTag = '[object String]';\n return typeof value === 'string' || (isObjectLike(value) && objToString.call(value) === stringTag);\n}\n\n/**\n * Returns true if x is:\n * null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n * @example\n * ```\n * falsy(0) // => true\n * falsy('') // => true\n * falsy({}) // => true\n * falsy([]) // => true\n * falsy(false) // => true\n * falsy(NaN) // => true\n * falsy(null) // => true\n * falsy(undefined) // => true\n *\n * falsy(1) // => false\n * falsy('d') // => false\n * falsy({type:\"kin\"}) // => false\n * falsy([6]) // => false\n * falsy(true) // => false\n * ```\n */\nexport function falsy(x) {\n // Is null, undefined or false\n if (!truthy(x)) {\n return true;\n }\n\n // = 0 || NaN\n if (isNumber(x)) {\n if (x === 0 || Number.isNaN(x)) {\n return true;\n }\n }\n\n // empty array or string\n if ((isArray(x) || isString(x)) && x.length === 0) {\n return true;\n }\n\n // empty object\n if (isObjectLike(x) && Object.keys(x).length === 0) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Inverse of falsy - returns true if x is NOT null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n */\nexport function notFalsy(x) {\n return !falsy(x);\n}\n\n/**\n * 'Destructures' properties from object - returns a new object only containing those properties that were asked for (including if those properties\n * have values that are falsy: null, undefined, false, '').\n *\n * @param args - property names to select: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to choose properties.\n * This function returns a new object - a copy of the original but only including the desired properties\n *\n * @example const strippedObj = pick('cardType', 'securityCode').from(cardObject);\n * @example const strippedObj = pick(['cardType', 'securityCode']).from(cardObject);\n */\nexport function pick(...args) {\n const myArgs = isArray(args[0]) ? args[0] : args;\n return {\n from: obj => {\n return myArgs.map(k => (k in obj ? { [k]: obj[k] } : {})).reduce((res, o) => ({ ...res, ...o }), {});\n }\n };\n}\n\n/**\n *'Destructures' properties from object, returning a new object containing all the original objects properties except those that were specifically rejected\n *\n * @param args - property names to reject: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to reject properties.\n * This function returns a new object - a copy of the original but excluding the selected properties\n *\n * @example const strippedObj = reject('permittedLengths', 'pattern', 'startingRules').from(cardObject);\n * @example const strippedObj = reject(['permittedLengths', 'pattern', 'startingRules']).from(cardObject);\n */\nexport function reject(...args) {\n const myArgs = isArray(args[0]) ? args[0] : args;\n return {\n from: obj => {\n const vkeys = Object.keys(obj).filter(k => !myArgs.includes(k));\n return pick(...vkeys).from(obj);\n }\n };\n}\n"],"names":["objToString","Object","prototype","toString","isArray","prop","call","existy","x","truthy","isObjectLike","value","falsy","Number","isNaN","isString","length","keys","pick","args","myArgs","from","obj","map","k","reduce","res","o","_object_spread","reject","filter","includes"],"mappings":"wHAKA,MAAMA,EAAcC,OAAOC,UAAUC,SAgB9B,SAASC,EAAQC,GACpB,MAAuB,iBAATA,GAA8B,OAATA,GAA0D,mBAAzCJ,OAAOC,UAAUC,SAASG,KAAKD,EACvF,CASO,SAASE,EAAOC,GACnB,OAAY,MAALA,CACX,CAWO,SAASC,EAAOD,GACnB,OAAa,IAANA,GAAeD,EAAOC,EACjC,CASA,SAASE,EAAaC,GAClB,QAASA,GAA0B,iBAAVA,CAC7B,CAoEO,SAASC,EAAMJ,GAElB,OAAKC,EAAOD,SA/CY,iBAFVG,EAsDDH,IApDwBE,EAAaC,IADhC,oBAC0CX,EAAYM,KAAKK,KAqD/D,IAANH,IAAWK,OAAOC,MAAMN,SAM3BJ,EAAQI,KAzCjB,SAAkBG,GAEd,MAAwB,iBAAVA,GAAuBD,EAAaC,IADhC,oBAC0CX,EAAYM,KAAKK,EACjF,CAsCuBI,CAASP,IAAoB,IAAbA,EAAEQ,YAKjCN,EAAaF,IAAgC,IAA1BP,OAAOgB,KAAKT,GAAGQ,UAlE1C,IAAkBL,CAuElB,
|
|
1
|
+
{"version":3,"file":"commonUtils.js","sources":["../../../src/utils/commonUtils.ts"],"sourcesContent":["/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n * @internal\n */\nconst objToString = Object.prototype.toString;\n\n/**\n * Checks if `prop` is classified as an `Array` primitive or object.\n * @internal\n * @param prop - The value to check.\n * @returns Returns `true` if `prop` is correctly classified, else `false`.\n * @example\n * ```\n * isArray([1, 2, 3]);\n * // => true\n *\n * isArray(1);\n * // => false\n * ```\n */\nexport function isArray(prop) {\n return typeof prop === 'object' && prop !== null && Object.prototype.toString.call(prop) === '[object Array]';\n}\n\n/**\n * The function existy is meant to define the existence of something.\n * Using the loose inequality operator (!=), it is possible to distinguish between null, undefined, and everything else.\n * @internal\n * @param x -\n * @returns\n */\nexport function existy(x) {\n return x != null;\n}\n\n/**\n * Used to determine if something should be considered a synonym for true\n * NOTE: The number zero is considered “truthy” by design as is '' & `{}`.\n * If you wish to retain the behavior where 0 is a synonym for false, then do not use truthy where you might expect 0\n * So - returns true if something is not false, undefined or null\n * @internal\n * @param x -\n * @returns\n */\nexport function truthy(x) {\n return x !== false && existy(x);\n}\n\n/**\n * Checks if `value` is object-like.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * @internal\n * Checks if `value` is classified as a `Number` primitive or object.\n * NOTE: `Infinity`, `-Infinity`, and `NaN` are classified as numbers\n * (FROM lodash.3.10.1)\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isNumber(8.4);\n * // => true\n *\n * isNumber(NaN);\n * // => true\n *\n * isNumber('8.4');\n * // => false\n * ```\n */\nfunction isNumber(value) {\n const numberTag = '[object Number]';\n return typeof value === 'number' || (isObjectLike(value) && objToString.call(value) === numberTag);\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isString('abc');\n * // => true\n *\n * isString(1);\n * // => false\n * ```\n */\nfunction isString(value) {\n const stringTag = '[object String]';\n return typeof value === 'string' || (isObjectLike(value) && objToString.call(value) === stringTag);\n}\n\n/**\n * Returns true if x is:\n * null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n * @example\n * ```\n * falsy(0) // => true\n * falsy('') // => true\n * falsy({}) // => true\n * falsy([]) // => true\n * falsy(false) // => true\n * falsy(NaN) // => true\n * falsy(null) // => true\n * falsy(undefined) // => true\n *\n * falsy(1) // => false\n * falsy('d') // => false\n * falsy({type:\"kin\"}) // => false\n * falsy([6]) // => false\n * falsy(true) // => false\n * ```\n */\nexport function falsy(x) {\n // Is null, undefined or false\n if (!truthy(x)) {\n return true;\n }\n\n // = 0 || NaN\n if (isNumber(x)) {\n if (x === 0 || Number.isNaN(x)) {\n return true;\n }\n }\n\n // empty array or string\n if ((isArray(x) || isString(x)) && x.length === 0) {\n return true;\n }\n\n // empty object\n if (isObjectLike(x) && Object.keys(x).length === 0) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Inverse of falsy - returns true if x is NOT null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n */\nexport function notFalsy(x) {\n return !falsy(x);\n}\n\n/**\n * 'Destructures' properties from object - returns a new object only containing those properties that were asked for (including if those properties\n * have values that are falsy: null, undefined, false, '').\n *\n * @param args - property names to select: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to choose properties.\n * This function returns a new object - a copy of the original but only including the desired properties\n *\n * @example const strippedObj = pick('cardType', 'securityCode').from(cardObject);\n * @example const strippedObj = pick(['cardType', 'securityCode']).from(cardObject);\n */\nexport function pick(...args) {\n const myArgs = isArray(args[0]) ? args[0] : args;\n return {\n from: obj => {\n return myArgs.map(k => (k in obj ? { [k]: obj[k] } : {})).reduce((res, o) => ({ ...res, ...o }), {});\n }\n };\n}\n\n/**\n *'Destructures' properties from object, returning a new object containing all the original objects properties except those that were specifically rejected\n *\n * @param args - property names to reject: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to reject properties.\n * This function returns a new object - a copy of the original but excluding the selected properties\n *\n * @example const strippedObj = reject('permittedLengths', 'pattern', 'startingRules').from(cardObject);\n * @example const strippedObj = reject(['permittedLengths', 'pattern', 'startingRules']).from(cardObject);\n */\nexport function reject(...args) {\n const myArgs = isArray(args[0]) ? args[0] : args;\n return {\n from: obj => {\n const vkeys = Object.keys(obj).filter(k => !myArgs.includes(k));\n return pick(...vkeys).from(obj);\n }\n };\n}\n"],"names":["objToString","Object","prototype","toString","isArray","prop","call","existy","x","truthy","isObjectLike","value","falsy","Number","isNaN","isString","length","keys","notFalsy","pick","args","myArgs","from","obj","map","k","reduce","res","o","_object_spread","reject","filter","includes"],"mappings":"wHAKA,MAAMA,EAAcC,OAAOC,UAAUC,SAgB9B,SAASC,EAAQC,GACpB,MAAuB,iBAATA,GAA8B,OAATA,GAA0D,mBAAzCJ,OAAOC,UAAUC,SAASG,KAAKD,EACvF,CASO,SAASE,EAAOC,GACnB,OAAY,MAALA,CACX,CAWO,SAASC,EAAOD,GACnB,OAAa,IAANA,GAAeD,EAAOC,EACjC,CASA,SAASE,EAAaC,GAClB,QAASA,GAA0B,iBAAVA,CAC7B,CAoEO,SAASC,EAAMJ,GAElB,OAAKC,EAAOD,SA/CY,iBAFVG,EAsDDH,IApDwBE,EAAaC,IADhC,oBAC0CX,EAAYM,KAAKK,KAqD/D,IAANH,IAAWK,OAAOC,MAAMN,SAM3BJ,EAAQI,KAzCjB,SAAkBG,GAEd,MAAwB,iBAAVA,GAAuBD,EAAaC,IADhC,oBAC0CX,EAAYM,KAAKK,EACjF,CAsCuBI,CAASP,IAAoB,IAAbA,EAAEQ,YAKjCN,EAAaF,IAAgC,IAA1BP,OAAOgB,KAAKT,GAAGQ,UAlE1C,IAAkBL,CAuElB,CAMO,SAASO,EAASV,GACrB,OAAQI,EAAMJ,EAClB,CAaO,SAASW,KAAQC,GACpB,MAAMC,EAASjB,EAAQgB,EAAK,IAAMA,EAAK,GAAKA,EAC5C,MAAO,CACHE,KAAMC,GACKF,EAAOG,IAAIC,GAAMA,KAAKF,EAAM,CAAEE,CAACA,GAAIF,EAAIE,IAAO,IAAKC,OAAO,CAACC,EAAKC,sUAAOC,CAAA,GAAKF,EAAQC,GAAM,CAAA,GAG7G,CAYO,SAASE,KAAUV,GACtB,MAAMC,EAASjB,EAAQgB,EAAK,IAAMA,EAAK,GAAKA,EAC5C,MAAO,CACHE,KAAMC,GAEKJ,KADOlB,OAAOgB,KAAKM,GAAKQ,OAAON,IAAMJ,EAAOW,SAASP,KACtCH,KAAKC,GAGvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promiseTimeout.js","sources":["../../../src/utils/promiseTimeout.ts"],"sourcesContent":["/**\n * Tests if a passed promise settles before a certain amount of time has elapsed\n *\n * @param ms - number of milliseconds the passed promise has to settle\n * @param promise - the passed promise\n * @param timeOutObject - the object that the promiseTimeout will reject with if the passed promise doesn't settle in time\n */\nconst promiseTimeout = <T>(ms: number, promise: Promise<T>, timeOutObject: object) => {\n let timer: NodeJS.Timeout | null;\n\n const promiseTimer: Promise<T> = new Promise((resolve, reject): void => {\n // Create a timeout to reject promise if not resolved\n timer = setTimeout((): void => {\n reject(timeOutObject);\n }, ms);\n\n promise\n .then((res): void => {\n clearTimeout(timer);\n resolve(res);\n })\n .catch((err): void => {\n clearTimeout(timer);\n reject(err);\n });\n });\n\n const cancelTimer = (): void => {\n clearTimeout(timer);\n };\n\n return {\n promise: promiseTimer,\n cancel: cancelTimer\n };\n};\n\nexport default promiseTimeout;\n"],"names":["promiseTimeout","ms","promise","timeOutObject","timer","Promise","resolve","reject","setTimeout","then","res","clearTimeout","catch","err","cancel"],"mappings":"AAOA,MAAMA,EAAiB,CAAIC,EAAYC,EAAqBC,KACxD,IAAIC,EAuBJ,MAAO,CACHF,QAtB6B,IAAIG,QAAQ,CAACC,EAASC,KAEnDH,EAAQI,WAAW,KACfD,EAAOJ,IACRF,GAEHC,EACKO,KAAMC,IACHC,aAAaP,GACbE,EAAQI,KAEXE,MAAOC,IACJF,aAAaP,GACbG,EAAOM,OAUfC,OANgB,KAChBH,aAAaP"}
|
|
1
|
+
{"version":3,"file":"promiseTimeout.js","sources":["../../../src/utils/promiseTimeout.ts"],"sourcesContent":["/**\n * Tests if a passed promise settles before a certain amount of time has elapsed\n *\n * @param ms - number of milliseconds the passed promise has to settle\n * @param promise - the passed promise\n * @param timeOutObject - the object that the promiseTimeout will reject with if the passed promise doesn't settle in time\n */\nconst promiseTimeout = <T>(ms: number, promise: Promise<T>, timeOutObject: object): { promise: Promise<T>; cancel: () => void } => {\n let timer: NodeJS.Timeout | null;\n\n const promiseTimer: Promise<T> = new Promise((resolve, reject): void => {\n // Create a timeout to reject promise if not resolved\n timer = setTimeout((): void => {\n reject(timeOutObject);\n }, ms);\n\n promise\n .then((res): void => {\n clearTimeout(timer);\n resolve(res);\n })\n .catch((err): void => {\n clearTimeout(timer);\n reject(err);\n });\n });\n\n const cancelTimer = (): void => {\n clearTimeout(timer);\n };\n\n return {\n promise: promiseTimer,\n cancel: cancelTimer\n };\n};\n\nexport default promiseTimeout;\n"],"names":["promiseTimeout","ms","promise","timeOutObject","timer","Promise","resolve","reject","setTimeout","then","res","clearTimeout","catch","err","cancel"],"mappings":"AAOA,MAAMA,EAAiB,CAAIC,EAAYC,EAAqBC,KACxD,IAAIC,EAuBJ,MAAO,CACHF,QAtB6B,IAAIG,QAAQ,CAACC,EAASC,KAEnDH,EAAQI,WAAW,KACfD,EAAOJ,IACRF,GAEHC,EACKO,KAAMC,IACHC,aAAaP,GACbE,EAAQI,KAEXE,MAAOC,IACJF,aAAaP,GACbG,EAAOM,OAUfC,OANgB,KAChBH,aAAaP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const l=(l,n,t,
|
|
1
|
+
const l=(l,n,t,e)=>{var o,r,i,u;if(null===(r=l[t])||void 0===r||null===(o=r[n])||void 0===o?void 0:o.formatterFn)return null;const v=null===(u=l[t])||void 0===u||null===(i=u[n])||void 0===i?void 0:i.maxlength;return v||30},n=l=>!(null!=l&&!/^[\s]*$/.test(l)),t="?\\+_=!@#$%^&*(){}~<>\\[\\]\\\\",e=(l,n="g")=>new RegExp(`[${l}]`,n),o=l=>l.trim().replace(/\s+/g," ");export{t as SPECIAL_CHARS,e as getFormattingRegEx,l as getMaxLengthByFieldAndCountry,n as isEmpty,o as trimValWithOneSpace};
|
|
2
2
|
//# sourceMappingURL=validator-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator-utils.js","sources":["../../../src/utils/validator-utils.ts"],"sourcesContent":["import { CountryFormatRules } from './Validator/types';\n\nconst MAX_LENGTH = 30;\n\nexport const getMaxLengthByFieldAndCountry = (\n formattingRules: CountryFormatRules,\n field: string,\n country: string,\n ignoreIfFormatterExists: boolean\n): number | null => {\n // In ignoreIfFormatterExists is true we expect the formatter function to also act to limit length\n if (ignoreIfFormatterExists && formattingRules[country]?.[field]?.formatterFn) {\n return null;\n }\n const maxLength = formattingRules[country]?.[field]?.maxlength;\n return maxLength ? maxLength : MAX_LENGTH;\n};\n\n// Not null or undefined or only spaces\nexport const isEmpty = (input: string) => !!(input == null || /^[\\s]*$/.test(input));\n\nexport const isString = (input: unknown) => typeof input === 'string' || input instanceof String;\nexport const hasText = (input: string) => isString(input) && !isEmpty(input);\n\nexport const SPECIAL_CHARS = '?\\\\+_=!@#$%^&*(){}~<>\\\\[\\\\]\\\\\\\\'; // N.B. difficulty escaping \\ (takes 3 backslashes!)\n\n// Generates a regEx ideal for use in a String.replace call for use in a formatter\n// e.g. getFormattingRegEx('^\\\\d', 'g') will generate: /[^\\d]/g which is a regEx to match anything that is not a digit\nexport const getFormattingRegEx = (specChars: string, flags = 'g') => new RegExp(`[${specChars}]`, flags);\n\n// Creates a regEx ideal for use in a RegExp.test call for use in a validator\nexport const getValidatingRegEx = (specChars: string, exclude: boolean) => new RegExp(`^[${exclude ? '^' : ''}${specChars}]+$`);\n\nexport const CHARACTER_PATTERNS: { [key: string]: RegExp } = {\n digitsHyphen: /^[\\d-]+$/,\n noHtml: /^[^<>&]+$/,\n alphaNum: /^\\d[a-zA-Z0-9]{6,11}$/,\n noSpecialChars: getValidatingRegEx(SPECIAL_CHARS, true)\n};\n\nexport const exactLength = (input: string, length: number) => {\n if (isEmpty(input)) {\n return true;\n }\n return input.length === length;\n};\n\nexport const validateForSpecialChars = (name: string) => {\n const hasNoLength = !name.length;\n // RegEx .test, if run against empty string, will return false\n return CHARACTER_PATTERNS.noSpecialChars.test(name) || hasNoLength;\n};\n\n// Trim
|
|
1
|
+
{"version":3,"file":"validator-utils.js","sources":["../../../src/utils/validator-utils.ts"],"sourcesContent":["import { CountryFormatRules } from './Validator/types';\n\nconst MAX_LENGTH = 30;\n\nexport const getMaxLengthByFieldAndCountry = (\n formattingRules: CountryFormatRules,\n field: string,\n country: string,\n ignoreIfFormatterExists: boolean\n): number | null => {\n // In ignoreIfFormatterExists is true we expect the formatter function to also act to limit length\n if (ignoreIfFormatterExists && formattingRules[country]?.[field]?.formatterFn) {\n return null;\n }\n const maxLength = formattingRules[country]?.[field]?.maxlength;\n return maxLength ? maxLength : MAX_LENGTH;\n};\n\n// Not null or undefined or only spaces\nexport const isEmpty = (input: string) => !!(input == null || /^[\\s]*$/.test(input));\n\nexport const isString = (input: unknown) => typeof input === 'string' || input instanceof String;\nexport const hasText = (input: string) => isString(input) && !isEmpty(input);\n\nexport const SPECIAL_CHARS = '?\\\\+_=!@#$%^&*(){}~<>\\\\[\\\\]\\\\\\\\'; // N.B. difficulty escaping \\ (takes 3 backslashes!)\n\n// Generates a regEx ideal for use in a String.replace call for use in a formatter\n// e.g. getFormattingRegEx('^\\\\d', 'g') will generate: /[^\\d]/g which is a regEx to match anything that is not a digit\nexport const getFormattingRegEx = (specChars: string, flags = 'g') => new RegExp(`[${specChars}]`, flags);\n\n// Creates a regEx ideal for use in a RegExp.test call for use in a validator\nexport const getValidatingRegEx = (specChars: string, exclude: boolean) => new RegExp(`^[${exclude ? '^' : ''}${specChars}]+$`);\n\nexport const CHARACTER_PATTERNS: { [key: string]: RegExp } = {\n digitsHyphen: /^[\\d-]+$/,\n noHtml: /^[^<>&]+$/,\n alphaNum: /^\\d[a-zA-Z0-9]{6,11}$/,\n noSpecialChars: getValidatingRegEx(SPECIAL_CHARS, true)\n};\n\nexport const exactLength = (input: string, length: number) => {\n if (isEmpty(input)) {\n return true;\n }\n return input.length === length;\n};\n\nexport const validateForSpecialChars = (name: string) => {\n const hasNoLength = !name.length;\n // RegEx .test, if run against empty string, will return false\n return CHARACTER_PATTERNS.noSpecialChars.test(name) || hasNoLength;\n};\n\n// Trim both ends and never allow more than 1 space in between\nexport const trimValWithOneSpace = (val: string) => val.trim().replace(/\\s+/g, ' ');\n"],"names":["getMaxLengthByFieldAndCountry","formattingRules","field","country","ignoreIfFormatterExists","formatterFn","maxLength","maxlength","isEmpty","input","test","SPECIAL_CHARS","getFormattingRegEx","specChars","flags","RegExp","trimValWithOneSpace","val","trim","replace"],"mappings":"AAEA,MAEaA,EAAgC,CACzCC,EACAC,EACAC,EACAC,KAG+BH,IAAAA,EAAAA,EAGbA,EAAAA,EAHlB,GAAuD,QAAxBA,EAAAA,EAAgBE,UAAhBF,IAAAA,GAAiC,QAAjCA,EAAAA,EAA2BC,UAA3BD,IAAAA,SAAAA,EAAmCI,YAC9D,OAAO,KAEX,MAAMC,EAAoC,QAAxBL,EAAAA,EAAgBE,cAAhBF,GAAiC,QAAjCA,EAAAA,EAA2BC,UAA3BD,IAAAA,OAAAA,EAAAA,EAAmCM,UACrD,OAAOD,GAbQ,IAiBNE,EAAWC,KAA8B,MAATA,IAAiB,UAAUC,KAAKD,IAKhEE,EAAgB,kCAIhBC,EAAqB,CAACC,EAAmBC,EAAQ,MAAQ,IAAIC,OAAO,IAAIF,KAAcC,GA0BtFE,EAAuBC,GAAgBA,EAAIC,OAAOC,QAAQ,OAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/adyen-web",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.41.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://docs.adyen.com/checkout",
|
|
6
6
|
"type": "module",
|
|
@@ -92,54 +92,54 @@
|
|
|
92
92
|
"@rollup/plugin-replace": "6.0.3",
|
|
93
93
|
"@rollup/plugin-terser": "1.0.0",
|
|
94
94
|
"@size-limit/preset-big-lib": "12.1.0",
|
|
95
|
-
"@storybook/addon-a11y": "10.4.
|
|
96
|
-
"@storybook/addon-docs": "10.4.
|
|
97
|
-
"@storybook/preact-vite": "10.4.
|
|
98
|
-
"@swc/core": "1.15.
|
|
95
|
+
"@storybook/addon-a11y": "10.4.6",
|
|
96
|
+
"@storybook/addon-docs": "10.4.6",
|
|
97
|
+
"@storybook/preact-vite": "10.4.6",
|
|
98
|
+
"@swc/core": "1.15.43",
|
|
99
99
|
"@testing-library/jest-dom": "6.9.1",
|
|
100
100
|
"@testing-library/preact": "3.2.4",
|
|
101
101
|
"@testing-library/preact-hooks": "1.1.0",
|
|
102
102
|
"@testing-library/user-event": "14.6.1",
|
|
103
103
|
"@types/jest": "30.0.0",
|
|
104
|
-
"autoprefixer": "10.5.
|
|
105
|
-
"cssnano": "8.0.
|
|
104
|
+
"autoprefixer": "10.5.2",
|
|
105
|
+
"cssnano": "8.0.2",
|
|
106
106
|
"dotenv": "17.4.2",
|
|
107
|
-
"eslint": "10.
|
|
107
|
+
"eslint": "10.6.0",
|
|
108
108
|
"eslint-plugin-import": "2.32.0",
|
|
109
109
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
110
110
|
"eslint-plugin-react": "7.37.5",
|
|
111
|
-
"eslint-plugin-storybook": "10.4.
|
|
111
|
+
"eslint-plugin-storybook": "10.4.6",
|
|
112
112
|
"eslint-plugin-testing-library": "7.16.2",
|
|
113
|
-
"globals": "17.
|
|
113
|
+
"globals": "17.7.0",
|
|
114
114
|
"jest": "30.4.2",
|
|
115
115
|
"jest-environment-jsdom": "30.4.1",
|
|
116
116
|
"jest-fixed-jsdom": "^0.0.11",
|
|
117
117
|
"jest-mock-extended": "4.0.1",
|
|
118
118
|
"msw": "2.14.6",
|
|
119
119
|
"msw-storybook-addon": "2.0.7",
|
|
120
|
-
"postcss": "8.5.
|
|
121
|
-
"rollup": "4.
|
|
120
|
+
"postcss": "8.5.16",
|
|
121
|
+
"rollup": "4.62.2",
|
|
122
122
|
"rollup-plugin-dts": "6.4.1",
|
|
123
123
|
"rollup-plugin-postcss": "4.0.2",
|
|
124
124
|
"rollup-plugin-stylelint": "1.0.0",
|
|
125
125
|
"rollup-plugin-swc3": "0.12.1",
|
|
126
|
-
"sass": "1.
|
|
126
|
+
"sass": "1.101.0",
|
|
127
127
|
"size-limit": "12.1.0",
|
|
128
|
-
"storybook": "10.4.
|
|
129
|
-
"stylelint": "17.
|
|
128
|
+
"storybook": "10.4.6",
|
|
129
|
+
"stylelint": "17.14.0",
|
|
130
130
|
"stylelint-config-standard-scss": "17.0.0",
|
|
131
131
|
"ts-jest": "29.4.11",
|
|
132
132
|
"tslib": "2.8.1",
|
|
133
133
|
"typescript": "6.0.3",
|
|
134
|
-
"typescript-eslint": "8.
|
|
134
|
+
"typescript-eslint": "8.62.1",
|
|
135
135
|
"vite": "6.4.3",
|
|
136
|
-
"vite-plugin-stylelint": "6.
|
|
136
|
+
"vite-plugin-stylelint": "6.3.0",
|
|
137
137
|
"whatwg-fetch": "3.6.20"
|
|
138
138
|
},
|
|
139
139
|
"dependencies": {
|
|
140
|
-
"@paypal/paypal-js": "10.0.
|
|
140
|
+
"@paypal/paypal-js": "10.0.2",
|
|
141
141
|
"@types/applepayjs": "14.0.9",
|
|
142
|
-
"@types/googlepay": "0.7.
|
|
142
|
+
"@types/googlepay": "0.7.11",
|
|
143
143
|
"classnames": "2.5.1",
|
|
144
144
|
"preact": "10.29.2"
|
|
145
145
|
},
|