@odus/checkout 1.6.0 → 1.7.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/api/createApplePaySession.mutation.d.ts +9 -0
- package/dist/api/createApplePaySession.mutation.d.ts.map +1 -0
- package/dist/api/getCheckoutDetails.query.d.ts +18 -0
- package/dist/api/getCheckoutDetails.query.d.ts.map +1 -0
- package/dist/api/getSupportedPaymentMethods.query.d.ts +7 -0
- package/dist/api/getSupportedPaymentMethods.query.d.ts.map +1 -0
- package/dist/checkout.es.js +65 -65
- package/dist/components/Component.d.ts +70 -0
- package/dist/components/Component.d.ts.map +1 -0
- package/dist/components/ComponentFactory.d.ts +48 -0
- package/dist/components/ComponentFactory.d.ts.map +1 -0
- package/dist/components/checkout/card-elements/CardCvvElement.d.ts +28 -0
- package/dist/components/checkout/card-elements/CardCvvElement.d.ts.map +1 -0
- package/dist/components/checkout/card-elements/CardNumberElement.d.ts +32 -0
- package/dist/components/checkout/card-elements/CardNumberElement.d.ts.map +1 -0
- package/dist/components/checkout/card-elements/index.d.ts +3 -0
- package/dist/components/checkout/card-elements/index.d.ts.map +1 -0
- package/dist/components/checkout/form/AddressSection.d.ts +53 -0
- package/dist/components/checkout/form/AddressSection.d.ts.map +1 -0
- package/dist/components/checkout/form/CardSection.d.ts +113 -0
- package/dist/components/checkout/form/CardSection.d.ts.map +1 -0
- package/dist/components/checkout/form/CardholderSection.d.ts +42 -0
- package/dist/components/checkout/form/CardholderSection.d.ts.map +1 -0
- package/dist/components/checkout/form/EmailField.d.ts +27 -0
- package/dist/components/checkout/form/EmailField.d.ts.map +1 -0
- package/dist/components/checkout/form/Form.d.ts +88 -0
- package/dist/components/checkout/form/Form.d.ts.map +1 -0
- package/dist/components/checkout/form/FormComponentManager.d.ts +116 -0
- package/dist/components/checkout/form/FormComponentManager.d.ts.map +1 -0
- package/dist/components/checkout/form/FormEventHandler.d.ts +34 -0
- package/dist/components/checkout/form/FormEventHandler.d.ts.map +1 -0
- package/dist/components/checkout/form/FormStateCoordinator.d.ts +60 -0
- package/dist/components/checkout/form/FormStateCoordinator.d.ts.map +1 -0
- package/dist/components/checkout/form/FormUIManager.d.ts +34 -0
- package/dist/components/checkout/form/FormUIManager.d.ts.map +1 -0
- package/dist/components/checkout/form/PaymentMethods.d.ts +42 -0
- package/dist/components/checkout/form/PaymentMethods.d.ts.map +1 -0
- package/dist/components/checkout/form/PaymentSeparator.d.ts +11 -0
- package/dist/components/checkout/form/PaymentSeparator.d.ts.map +1 -0
- package/dist/components/checkout/form/PhoneCountrySelector.d.ts +25 -0
- package/dist/components/checkout/form/PhoneCountrySelector.d.ts.map +1 -0
- package/dist/components/checkout/form/PhoneNumberField.d.ts +51 -0
- package/dist/components/checkout/form/PhoneNumberField.d.ts.map +1 -0
- package/dist/components/checkout/form/SubmitButton.d.ts +16 -0
- package/dist/components/checkout/form/SubmitButton.d.ts.map +1 -0
- package/dist/components/checkout/form/index.d.ts +10 -0
- package/dist/components/checkout/form/index.d.ts.map +1 -0
- package/dist/components/checkout/index.d.ts +2 -0
- package/dist/components/checkout/index.d.ts.map +1 -0
- package/dist/components/common/Alert.d.ts +12 -0
- package/dist/components/common/Alert.d.ts.map +1 -0
- package/dist/components/common/Button.d.ts +24 -0
- package/dist/components/common/Button.d.ts.map +1 -0
- package/dist/components/common/CountryDialCodeDropdown.d.ts +45 -0
- package/dist/components/common/CountryDialCodeDropdown.d.ts.map +1 -0
- package/dist/components/common/FormSkeleton.d.ts +8 -0
- package/dist/components/common/FormSkeleton.d.ts.map +1 -0
- package/dist/components/common/HelperText.d.ts +15 -0
- package/dist/components/common/HelperText.d.ts.map +1 -0
- package/dist/components/common/Input.d.ts +37 -0
- package/dist/components/common/Input.d.ts.map +1 -0
- package/dist/components/common/InputLabel.d.ts +15 -0
- package/dist/components/common/InputLabel.d.ts.map +1 -0
- package/dist/components/common/Select.d.ts +54 -0
- package/dist/components/common/Select.d.ts.map +1 -0
- package/dist/components/common/Spinner.d.ts +11 -0
- package/dist/components/common/Spinner.d.ts.map +1 -0
- package/dist/components/common/index.d.ts +8 -0
- package/dist/components/common/index.d.ts.map +1 -0
- package/dist/components/payment-methods/applePay/ApplePayButton.d.ts +43 -0
- package/dist/components/payment-methods/applePay/ApplePayButton.d.ts.map +1 -0
- package/dist/components/payment-methods/index.d.ts +3 -0
- package/dist/components/payment-methods/index.d.ts.map +1 -0
- package/dist/components/payment-methods/paypal/PaypalButton.d.ts +21 -0
- package/dist/components/payment-methods/paypal/PaypalButton.d.ts.map +1 -0
- package/dist/core/api/CheckoutAPI.service.d.ts +36 -0
- package/dist/core/api/CheckoutAPI.service.d.ts.map +1 -0
- package/dist/core/constants/emailDomains.constant.d.ts +2 -0
- package/dist/core/constants/emailDomains.constant.d.ts.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/state/CheckoutState.service.d.ts +13 -0
- package/dist/core/state/CheckoutState.service.d.ts.map +1 -0
- package/dist/core/validation/index.d.ts +2 -0
- package/dist/core/validation/index.d.ts.map +1 -0
- package/dist/core/vgs/VGSCollectService.d.ts +102 -0
- package/dist/core/vgs/VGSCollectService.d.ts.map +1 -0
- package/dist/core/vgs/index.d.ts +4 -0
- package/dist/core/vgs/index.d.ts.map +1 -0
- package/dist/core/vgs/vgs.constants.d.ts +4 -0
- package/dist/core/vgs/vgs.constants.d.ts.map +1 -0
- package/dist/core/vgs/vgsFieldErrors.d.ts +8 -0
- package/dist/core/vgs/vgsFieldErrors.d.ts.map +1 -0
- package/dist/elements/AddressCityElement.d.ts +12 -0
- package/dist/elements/AddressCityElement.d.ts.map +1 -0
- package/dist/elements/AddressCountryElement.d.ts +14 -0
- package/dist/elements/AddressCountryElement.d.ts.map +1 -0
- package/dist/elements/AddressFirstNameElement.d.ts +12 -0
- package/dist/elements/AddressFirstNameElement.d.ts.map +1 -0
- package/dist/elements/AddressLastNameElement.d.ts +12 -0
- package/dist/elements/AddressLastNameElement.d.ts.map +1 -0
- package/dist/elements/AddressStateElement.d.ts +16 -0
- package/dist/elements/AddressStateElement.d.ts.map +1 -0
- package/dist/elements/AddressStreetElement.d.ts +12 -0
- package/dist/elements/AddressStreetElement.d.ts.map +1 -0
- package/dist/elements/AddressZipCodeElement.d.ts +12 -0
- package/dist/elements/AddressZipCodeElement.d.ts.map +1 -0
- package/dist/elements/ApplePayElement.d.ts +41 -0
- package/dist/elements/ApplePayElement.d.ts.map +1 -0
- package/dist/elements/BaseElement.d.ts +28 -0
- package/dist/elements/BaseElement.d.ts.map +1 -0
- package/dist/elements/CardElement.d.ts +32 -0
- package/dist/elements/CardElement.d.ts.map +1 -0
- package/dist/elements/CardholderElement.d.ts +12 -0
- package/dist/elements/CardholderElement.d.ts.map +1 -0
- package/dist/elements/EmailElement.d.ts +12 -0
- package/dist/elements/EmailElement.d.ts.map +1 -0
- package/dist/elements/ErrorElement.d.ts +13 -0
- package/dist/elements/ErrorElement.d.ts.map +1 -0
- package/dist/elements/OdusElements.d.ts +79 -0
- package/dist/elements/OdusElements.d.ts.map +1 -0
- package/dist/elements/PayPalElement.d.ts +17 -0
- package/dist/elements/PayPalElement.d.ts.map +1 -0
- package/dist/elements/PhoneElement.d.ts +13 -0
- package/dist/elements/PhoneElement.d.ts.map +1 -0
- package/dist/elements/card/NativeCardAdapter.d.ts +35 -0
- package/dist/elements/card/NativeCardAdapter.d.ts.map +1 -0
- package/dist/elements/card/VgsCardAdapter.d.ts +31 -0
- package/dist/elements/card/VgsCardAdapter.d.ts.map +1 -0
- package/dist/elements/cardElement.constants.d.ts +5 -0
- package/dist/elements/cardElement.constants.d.ts.map +1 -0
- package/dist/elements/index.d.ts +19 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/theme/index.d.ts +26 -0
- package/dist/elements/theme/index.d.ts.map +1 -0
- package/dist/elements/types/CardPayload.type.d.ts +13 -0
- package/dist/elements/types/CardPayload.type.d.ts.map +1 -0
- package/dist/elements/types/index.d.ts +65 -0
- package/dist/elements/types/index.d.ts.map +1 -0
- package/dist/elements.es.js +278 -223
- package/dist/factories/createCheckoutProfile.d.ts +25 -0
- package/dist/factories/createCheckoutProfile.d.ts.map +1 -0
- package/dist/factories/createForm.d.ts +21 -0
- package/dist/factories/createForm.d.ts.map +1 -0
- package/dist/factories/createTranslation.d.ts +13 -0
- package/dist/factories/createTranslation.d.ts.map +1 -0
- package/dist/factories/index.d.ts +4 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/locales/cs.json.d.ts +77 -0
- package/dist/locales/de.json.d.ts +77 -0
- package/dist/locales/en.json.d.ts +77 -0
- package/dist/locales/es.json.d.ts +77 -0
- package/dist/locales/fr.json.d.ts +77 -0
- package/dist/locales/it.json.d.ts +77 -0
- package/dist/locales/nl.json.d.ts +77 -0
- package/dist/locales/pl.json.d.ts +77 -0
- package/dist/locales/pt.json.d.ts +77 -0
- package/dist/locales/sk.json.d.ts +77 -0
- package/dist/locales/tr.json.d.ts +77 -0
- package/dist/package.json +2 -2
- package/dist/phone.js +588 -613
- package/dist/services/checkout/Checkout.service.d.ts +30 -0
- package/dist/services/checkout/Checkout.service.d.ts.map +1 -0
- package/dist/services/checkout/CheckoutAPI.service.d.ts +2 -0
- package/dist/services/checkout/CheckoutAPI.service.d.ts.map +1 -0
- package/dist/services/checkout/CheckoutForm.service.d.ts +53 -0
- package/dist/services/checkout/CheckoutForm.service.d.ts.map +1 -0
- package/dist/services/checkout/CheckoutState.service.d.ts +2 -0
- package/dist/services/checkout/CheckoutState.service.d.ts.map +1 -0
- package/dist/services/i18n/Translation.service.d.ts +15 -0
- package/dist/services/i18n/Translation.service.d.ts.map +1 -0
- package/dist/services/telemetry/Telemetry.service.d.ts +15 -0
- package/dist/services/telemetry/Telemetry.service.d.ts.map +1 -0
- package/dist/shared.js +28 -25
- package/dist/state/EventBus.d.ts +33 -0
- package/dist/state/EventBus.d.ts.map +1 -0
- package/dist/state/Store.d.ts +42 -0
- package/dist/state/Store.d.ts.map +1 -0
- package/dist/state/TranslationStore.d.ts +28 -0
- package/dist/state/TranslationStore.d.ts.map +1 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/types/api/ApiError.type.d.ts +7 -0
- package/dist/types/api/ApiError.type.d.ts.map +1 -0
- package/dist/types/checkout/CheckoutCallback.type.d.ts +8 -0
- package/dist/types/checkout/CheckoutCallback.type.d.ts.map +1 -0
- package/dist/types/checkout/CheckoutConfig.type.d.ts +128 -0
- package/dist/types/checkout/CheckoutConfig.type.d.ts.map +1 -0
- package/dist/types/checkout/CheckoutInstance.type.d.ts +16 -0
- package/dist/types/checkout/CheckoutInstance.type.d.ts.map +1 -0
- package/dist/types/checkout/CheckoutProfile.type.d.ts +77 -0
- package/dist/types/checkout/CheckoutProfile.type.d.ts.map +1 -0
- package/dist/types/checkout/CheckoutState.type.d.ts +5 -0
- package/dist/types/checkout/CheckoutState.type.d.ts.map +1 -0
- package/dist/types/common/FormData.type.d.ts +42 -0
- package/dist/types/common/FormData.type.d.ts.map +1 -0
- package/dist/types/common/FormErrors.type.d.ts +9 -0
- package/dist/types/common/FormErrors.type.d.ts.map +1 -0
- package/dist/types/common/FormTouched.type.d.ts +9 -0
- package/dist/types/common/FormTouched.type.d.ts.map +1 -0
- package/dist/types/common/Locale.type.d.ts +2 -0
- package/dist/types/common/Locale.type.d.ts.map +1 -0
- package/dist/types/common/createIframeConfig.type.d.ts +2 -0
- package/dist/types/common/createIframeConfig.type.d.ts.map +1 -0
- package/dist/types/payment/CardType.type.d.ts +2 -0
- package/dist/types/payment/CardType.type.d.ts.map +1 -0
- package/dist/types/payment/Payment.type.d.ts +126 -0
- package/dist/types/payment/Payment.type.d.ts.map +1 -0
- package/dist/types/payment/PaymentMethod.type.d.ts +15 -0
- package/dist/types/payment/PaymentMethod.type.d.ts.map +1 -0
- package/dist/types/payment/PaymentResult.type.d.ts +2 -0
- package/dist/types/payment/PaymentResult.type.d.ts.map +1 -0
- package/dist/types/telemetry/TelemetryEvents.type.d.ts +62 -0
- package/dist/types/telemetry/TelemetryEvents.type.d.ts.map +1 -0
- package/dist/utils/applePay/isApplePayAvailable.util.d.ts +2 -0
- package/dist/utils/applePay/isApplePayAvailable.util.d.ts.map +1 -0
- package/dist/utils/card/detectCardBrand.d.ts +3 -0
- package/dist/utils/card/detectCardBrand.d.ts.map +1 -0
- package/dist/utils/card/luhnCheck.d.ts +7 -0
- package/dist/utils/card/luhnCheck.d.ts.map +1 -0
- package/dist/utils/country/countryNames.d.ts +36 -0
- package/dist/utils/country/countryNames.d.ts.map +1 -0
- package/dist/utils/dom/appendGoogleFont.d.ts +7 -0
- package/dist/utils/dom/appendGoogleFont.d.ts.map +1 -0
- package/dist/utils/dom/createSyntheticEvent.util.d.ts +12 -0
- package/dist/utils/dom/createSyntheticEvent.util.d.ts.map +1 -0
- package/dist/utils/dom/fetchGoogleFontFace.d.ts +2 -0
- package/dist/utils/dom/fetchGoogleFontFace.d.ts.map +1 -0
- package/dist/utils/dom/index.d.ts +5 -0
- package/dist/utils/dom/index.d.ts.map +1 -0
- package/dist/utils/dom/restoreCursorAfterFormat.util.d.ts +2 -0
- package/dist/utils/dom/restoreCursorAfterFormat.util.d.ts.map +1 -0
- package/dist/utils/focus/FocusManager.d.ts +57 -0
- package/dist/utils/focus/FocusManager.d.ts.map +1 -0
- package/dist/utils/focus/index.d.ts +2 -0
- package/dist/utils/focus/index.d.ts.map +1 -0
- package/dist/utils/formatters/formatters.d.ts +6 -0
- package/dist/utils/formatters/formatters.d.ts.map +1 -0
- package/dist/utils/helpers/checkForMissingDot.util.d.ts +2 -0
- package/dist/utils/helpers/checkForMissingDot.util.d.ts.map +1 -0
- package/dist/utils/helpers/environments/getBaseUrl.dev.d.ts +2 -0
- package/dist/utils/helpers/environments/getBaseUrl.dev.d.ts.map +1 -0
- package/dist/utils/helpers/environments/getBaseUrl.prod.d.ts +3 -0
- package/dist/utils/helpers/environments/getBaseUrl.prod.d.ts.map +1 -0
- package/dist/utils/helpers/findSimilarDomains.util.d.ts +2 -0
- package/dist/utils/helpers/findSimilarDomains.util.d.ts.map +1 -0
- package/dist/utils/helpers/getBaseUrl.util.d.ts +3 -0
- package/dist/utils/helpers/getBaseUrl.util.d.ts.map +1 -0
- package/dist/utils/helpers/getTelemetryUrl.util.d.ts +3 -0
- package/dist/utils/helpers/getTelemetryUrl.util.d.ts.map +1 -0
- package/dist/utils/helpers/hasAddressConfiguration.util.d.ts +10 -0
- package/dist/utils/helpers/hasAddressConfiguration.util.d.ts.map +1 -0
- package/dist/utils/helpers/isLocalhost.util.d.ts +2 -0
- package/dist/utils/helpers/isLocalhost.util.d.ts.map +1 -0
- package/dist/utils/helpers/levenshteinDistance.util.d.ts +2 -0
- package/dist/utils/helpers/levenshteinDistance.util.d.ts.map +1 -0
- package/dist/utils/helpers/styleUtils.d.ts +20 -0
- package/dist/utils/helpers/styleUtils.d.ts.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/phone/countryDialCodes.d.ts +23 -0
- package/dist/utils/phone/countryDialCodes.d.ts.map +1 -0
- package/dist/utils/phone/lazyPhoneModule.d.ts +6 -0
- package/dist/utils/phone/lazyPhoneModule.d.ts.map +1 -0
- package/dist/utils/phone/phoneBundle.d.ts +4 -0
- package/dist/utils/phone/phoneBundle.d.ts.map +1 -0
- package/dist/utils/phone/phoneFormatter.d.ts +32 -0
- package/dist/utils/phone/phoneFormatter.d.ts.map +1 -0
- package/dist/utils/state/stateNames.d.ts +20 -0
- package/dist/utils/state/stateNames.d.ts.map +1 -0
- package/dist/utils/validation/createValidationSchema.d.ts +21 -0
- package/dist/utils/validation/createValidationSchema.d.ts.map +1 -0
- package/dist/utils/validation/emailValidator.d.ts +15 -0
- package/dist/utils/validation/emailValidator.d.ts.map +1 -0
- package/dist/utils/validation/index.d.ts +3 -0
- package/dist/utils/validation/index.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/focus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/utils/formatters/formatters.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;wBACD,MAAM,KAAG,MAAM;wBAMf,MAAM,KAAG,MAAM;qBAelB,MAAM,yBAAkB,MAAM;CAOhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkForMissingDot.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/checkForMissingDot.util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,IAyB3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBaseUrl.dev.d.ts","sourceRoot":"","sources":["../../../../src/utils/helpers/environments/getBaseUrl.dev.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,QAAO,MAE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBaseUrl.prod.d.ts","sourceRoot":"","sources":["../../../../src/utils/helpers/environments/getBaseUrl.prod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE/E,eAAO,MAAM,UAAU,GAAI,aAAa,WAAW,KAAG,MAWrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findSimilarDomains.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/findSimilarDomains.util.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAmB3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBaseUrl.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/getBaseUrl.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E,eAAO,MAAM,UAAU,GAAI,aAAa,WAAW,KAAG,MAWrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTelemetryUrl.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/getTelemetryUrl.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E,eAAO,MAAM,eAAe,GAAI,aAAa,WAAW,KAAG,MAM1D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutType } from '../../types/checkout/CheckoutProfile.type';
|
|
2
|
+
type LayoutWithAddressFields = Pick<LayoutType, 'billingFields' | 'shippingFields'>;
|
|
3
|
+
/**
|
|
4
|
+
* Checks if address fields (billing or shipping) are configured and enabled.
|
|
5
|
+
* Returns true if at least one address field is enabled in either billing or shipping config.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasAddressConfiguration(layout?: LayoutWithAddressFields): boolean;
|
|
8
|
+
export declare function hasNameFieldsConfiguration(layout?: LayoutWithAddressFields): boolean;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=hasAddressConfiguration.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasAddressConfiguration.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/hasAddressConfiguration.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAE5E,KAAK,uBAAuB,GAAG,IAAI,CACjC,UAAU,EACV,eAAe,GAAG,gBAAgB,CACnC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAcT;AAED,wBAAgB,0BAA0B,CACxC,MAAM,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAYT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isLocalhost.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/isLocalhost.util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,eAevB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"levenshteinDistance.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/levenshteinDistance.util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MA2B1D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CheckoutProfile } from '../../types/checkout/CheckoutProfile.type';
|
|
2
|
+
interface CSSProperties {
|
|
3
|
+
[key: string]: string | number;
|
|
4
|
+
}
|
|
5
|
+
export declare const styleObjectToString: (styleObject: CSSProperties) => string;
|
|
6
|
+
export declare function getCheckoutFormStyles(checkoutProfile?: CheckoutProfile): {
|
|
7
|
+
formContainerStyle: CSSProperties;
|
|
8
|
+
baseStyles: CSSProperties;
|
|
9
|
+
placeholderStyles: CSSProperties;
|
|
10
|
+
errorStyles: CSSProperties;
|
|
11
|
+
focusStyles: CSSProperties;
|
|
12
|
+
inputStyles: {
|
|
13
|
+
base: string;
|
|
14
|
+
error: string;
|
|
15
|
+
focus: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=styleUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/styleUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAEjF,UAAU,aAAa;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,mBAAmB,GAAI,aAAa,aAAa,KAAG,MAQhE,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,eAAe,CAAC,EAAE,eAAe;;;;;;;;;;;;EAiEtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type CountryDialCode = {
|
|
2
|
+
code: string;
|
|
3
|
+
name: string;
|
|
4
|
+
dialCode: string;
|
|
5
|
+
flag: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Generate flag emoji from country code
|
|
9
|
+
* Converts ISO alpha-2 country code to flag emoji
|
|
10
|
+
* E.g., 'US' → '🇺🇸', 'ID' → '🇮🇩'
|
|
11
|
+
*/
|
|
12
|
+
export declare const getFlagEmoji: (countryCode: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Get all countries with dial codes for the selector.
|
|
15
|
+
* When a locale is provided, country names are translated using Intl.DisplayNames.
|
|
16
|
+
* Returns countries sorted alphabetically by name.
|
|
17
|
+
*/
|
|
18
|
+
export declare const getCountriesForDialSelector: (allowedCountries?: string[], locale?: string) => CountryDialCode[];
|
|
19
|
+
/**
|
|
20
|
+
* Get country dial code info by country code
|
|
21
|
+
*/
|
|
22
|
+
export declare const getCountryDialCodeInfo: (countryCode: string) => CountryDialCode | null;
|
|
23
|
+
//# sourceMappingURL=countryDialCodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countryDialCodes.d.ts","sourceRoot":"","sources":["../../../src/utils/phone/countryDialCodes.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,KAAG,MAMlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,mBAAmB,MAAM,EAAE,EAC3B,SAAS,MAAM,KACd,eAAe,EA2BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,KAClB,eAAe,GAAG,IAapB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as PhoneBundle from './phoneBundle';
|
|
2
|
+
type PhoneModule = typeof PhoneBundle;
|
|
3
|
+
export declare function loadPhoneModule(): Promise<PhoneModule>;
|
|
4
|
+
export declare function getPhoneModule(): PhoneModule | null;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=lazyPhoneModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazyPhoneModule.d.ts","sourceRoot":"","sources":["../../../src/utils/phone/lazyPhoneModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,WAAW,MAAM,eAAe,CAAC;AAElD,KAAK,WAAW,GAAG,OAAO,WAAW,CAAC;AAKtC,wBAAgB,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,CAUtD;AAED,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAEnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phoneBundle.d.ts","sourceRoot":"","sources":["../../../src/utils/phone/phoneBundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format phone number as the user types with international format
|
|
3
|
+
* Applies country-specific formatting rules and includes dial code
|
|
4
|
+
*/
|
|
5
|
+
export declare const formatPhoneAsYouType: (value: string, countryCode: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Convert national number to E.164 format
|
|
8
|
+
* Returns null if the number is invalid
|
|
9
|
+
*/
|
|
10
|
+
export declare const toE164: (nationalNumber: string, countryCode: string) => string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Parse E.164 number and extract country code and national number
|
|
13
|
+
*/
|
|
14
|
+
export declare const parseE164: (e164Number: string) => {
|
|
15
|
+
countryCode: string;
|
|
16
|
+
nationalNumber: string;
|
|
17
|
+
} | null;
|
|
18
|
+
/**
|
|
19
|
+
* Get example formatted phone number for a country in international format
|
|
20
|
+
* Returns a placeholder string for the input field with dial code
|
|
21
|
+
*/
|
|
22
|
+
export declare const getPlaceholder: (countryCode: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Validate if a phone number is valid for a given country
|
|
25
|
+
*/
|
|
26
|
+
export declare const isValidPhoneNumber: (value: string, countryCode: string) => boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get the expected national number digit length for a country.
|
|
29
|
+
* Derived from the example mobile number. Returns Infinity when unknown.
|
|
30
|
+
*/
|
|
31
|
+
export declare const getExpectedDigitLength: (countryCode: string) => number;
|
|
32
|
+
//# sourceMappingURL=phoneFormatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phoneFormatter.d.ts","sourceRoot":"","sources":["../../../src/utils/phone/phoneFormatter.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,aAAa,MAAM,KAClB,MAcF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,GACjB,gBAAgB,MAAM,EACtB,aAAa,MAAM,KAClB,MAAM,GAAG,IAUX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GACpB,YAAY,MAAM,KACjB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG,IAapD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,KAAG,MAapD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EACb,aAAa,MAAM,KAClB,OAeF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,aAAa,MAAM,KAAG,MAU5D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Country = 'US' | 'CA';
|
|
2
|
+
/**
|
|
3
|
+
* Get all region codes for a country
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAllStateCodes: (country?: Country) => string[];
|
|
6
|
+
/**
|
|
7
|
+
* Get human-readable region name from code
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStateName: (stateCode: string, country?: Country) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Get state/province options for dropdown
|
|
12
|
+
* @param country Country code ('US' or 'CA'). Defaults to 'US'.
|
|
13
|
+
* @returns Array of options with value (code) and text (name)
|
|
14
|
+
*/
|
|
15
|
+
export declare const getStateOptions: (country?: Country) => Array<{
|
|
16
|
+
value: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=stateNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateNames.d.ts","sourceRoot":"","sources":["../../../src/utils/state/stateNames.ts"],"names":[],"mappings":"AAEA,KAAK,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;AA6B3B;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAS,OAAc,KAAG,MAAM,EACd,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,YAAY,GACvB,WAAW,MAAM,EACjB,UAAS,OAAc,KACtB,MAAuE,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAS,OAAc,KACtB,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CASvC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation schema factory
|
|
3
|
+
* Creates validation rules for form fields
|
|
4
|
+
* @returns Object containing validation functions for each field
|
|
5
|
+
*/
|
|
6
|
+
export declare const createValidationSchema: () => {
|
|
7
|
+
email: (value: string) => string | undefined;
|
|
8
|
+
phoneNumber: (value: string, countryCode?: string) => string | undefined;
|
|
9
|
+
name: (value: string) => string | undefined;
|
|
10
|
+
cardExpiry: (value: string) => string | undefined;
|
|
11
|
+
cardNumber: (value: string) => string | undefined;
|
|
12
|
+
cardCvv: (value: string, cardNumber?: string) => string | undefined;
|
|
13
|
+
street: (value: string) => string | undefined;
|
|
14
|
+
firstName: (value: string) => string | undefined;
|
|
15
|
+
lastName: (value: string) => string | undefined;
|
|
16
|
+
city: (value: string) => string | undefined;
|
|
17
|
+
state: (value: string, country?: string) => string | undefined;
|
|
18
|
+
zipCode: (value: string) => string | undefined;
|
|
19
|
+
country: (value: string) => string | undefined;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=createValidationSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createValidationSchema.d.ts","sourceRoot":"","sources":["../../../src/utils/validation/createValidationSchema.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;mBAKhB,MAAM,KAAG,MAAM,GAAG,SAAS;yBAKrB,MAAM,gBAAgB,MAAM,KAAG,MAAM,GAAG,SAAS;kBAiCxD,MAAM,KAAG,MAAM,GAAG,SAAS;wBAOrB,MAAM,KAAG,MAAM,GAAG,SAAS;wBA8B3B,MAAM,KAAG,MAAM,GAAG,SAAS;qBA0B9B,MAAM,eAAe,MAAM,KAAG,MAAM,GAAG,SAAS;oBAsBjD,MAAM,KAAG,MAAM,GAAG,SAAS;uBAOxB,MAAM,KAAG,MAAM,GAAG,SAAS;sBAO5B,MAAM,KAAG,MAAM,GAAG,SAAS;kBAO/B,MAAM,KAAG,MAAM,GAAG,SAAS;mBAO1B,MAAM,YAAY,MAAM,KAAG,MAAM,GAAG,SAAS;qBAU3C,MAAM,KAAG,MAAM,GAAG,SAAS;qBAO3B,MAAM,KAAG,MAAM,GAAG,SAAS;CAO/C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface EmailValidationResult {
|
|
2
|
+
isValid: boolean;
|
|
3
|
+
message: string;
|
|
4
|
+
suggestion: string | null;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Email validation utility
|
|
8
|
+
* Provides email validation functionality
|
|
9
|
+
* @returns Object with validateEmail function
|
|
10
|
+
*/
|
|
11
|
+
export declare const emailValidator: () => {
|
|
12
|
+
validateEmail: (email: string) => EmailValidationResult;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=emailValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailValidator.d.ts","sourceRoot":"","sources":["../../../src/utils/validation/emailValidator.ts"],"names":[],"mappings":"AAMA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc;2BAGK,MAAM,KAAG,qBAAqB;CAuF7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odus/checkout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"displayName": "Odus Checkout SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"odus",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"@vgs/collect-js": "^0.8.0",
|
|
128
128
|
"jsencrypt": "^3.5.4",
|
|
129
|
-
"libphonenumber-js": "^1.13.
|
|
129
|
+
"libphonenumber-js": "^1.13.7"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
132
|
"@types/applepayjs": "^14.0.9"
|