@commercelayer/react-components 4.7.5-beta.1 → 4.7.5-beta.2

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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SaveAddressesButton=void 0;const tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),Parent_1=tslib_1.__importDefault(require("../utils/Parent")),AddressContext_1=tslib_1.__importDefault(require("../../context/AddressContext")),addressesManager_1=require("../../utils/addressesManager"),OrderContext_1=tslib_1.__importDefault(require("../../context/OrderContext")),CustomerContext_1=tslib_1.__importDefault(require("../../context/CustomerContext")),isFunction_1=tslib_1.__importDefault(require("lodash/isFunction"));function SaveAddressesButton(props){const{children,label="Continue to delivery",resource,disabled=!1,addressId,onClick}=props,p=tslib_1.__rest(props,["children","label","resource","disabled","addressId","onClick"]),{errors,billing_address:billingAddress,shipToDifferentAddress,shipping_address:shippingAddress,saveAddresses,billingAddressId,shippingAddressId}=(0,react_1.useContext)(AddressContext_1.default),{order}=(0,react_1.useContext)(OrderContext_1.default),{customerEmail:email,addresses,isGuest,createCustomerAddress}=(0,react_1.useContext)(CustomerContext_1.default),[forceDisable,setForceDisable]=(0,react_1.useState)(disabled);let customerEmail=(isGuest===!0||typeof isGuest>"u")&&!order?.customer_email;email!=null&&email!==""&&(customerEmail=!1);const billingDisable=(0,addressesManager_1.billingAddressController)({billing_address:billingAddress,errors,billingAddressId,requiresBillingInfo:order?.requires_billing_info}),shippingDisable=(0,addressesManager_1.shippingAddressController)({billingDisable,errors,shipToDifferentAddress,shipping_address:shippingAddress,shippingAddressId}),countryLockDisable=(0,addressesManager_1.countryLockController)({countryCodeLock:order?.shipping_country_code_lock,addresses,shipToDifferentAddress,billingAddressId,billing_address:billingAddress,shipping_address:shippingAddress,shippingAddressId}),disable=disabled||customerEmail||billingDisable||shippingDisable||countryLockDisable,handleClick=()=>tslib_1.__awaiter(this,void 0,void 0,function*(){if(errors&&Object.keys(errors).length===0&&!disable){let response={success:!1};if(setForceDisable(!0),order&&saveAddresses!=null)response=yield saveAddresses(email);else if(createCustomerAddress&&billingAddress){const address=Object.assign({},billingAddress);addressId&&(address.id=addressId),createCustomerAddress(address),response={success:!0}}setForceDisable(!1),onClick&&response.success&&onClick(response)}}),parentProps=Object.assign(Object.assign({},p),{label,resource,handleClick,disabled:disable});return children?(0,jsx_runtime_1.jsx)(Parent_1.default,Object.assign({},parentProps,{children})):(0,jsx_runtime_1.jsx)("button",Object.assign({type:"button",disabled:disable||forceDisable,onClick:()=>{handleClick()}},p,{children:(0,isFunction_1.default)(label)?label():label}))}exports.SaveAddressesButton=SaveAddressesButton,exports.default=SaveAddressesButton;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SaveAddressesButton=void 0;const tslib_1=require("tslib"),jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),Parent_1=tslib_1.__importDefault(require("../utils/Parent")),AddressContext_1=tslib_1.__importDefault(require("../../context/AddressContext")),addressesManager_1=require("../../utils/addressesManager"),OrderContext_1=tslib_1.__importDefault(require("../../context/OrderContext")),CustomerContext_1=tslib_1.__importDefault(require("../../context/CustomerContext")),isFunction_1=tslib_1.__importDefault(require("lodash/isFunction"));function SaveAddressesButton(props){const{children,label="Continue to delivery",resource,disabled=!1,addressId,onClick}=props,p=tslib_1.__rest(props,["children","label","resource","disabled","addressId","onClick"]),{errors,billing_address:billingAddress,shipToDifferentAddress,shipping_address:shippingAddress,saveAddresses,billingAddressId,shippingAddressId}=(0,react_1.useContext)(AddressContext_1.default),{order}=(0,react_1.useContext)(OrderContext_1.default),{customerEmail:email,addresses,isGuest,createCustomerAddress}=(0,react_1.useContext)(CustomerContext_1.default),[forceDisable,setForceDisable]=(0,react_1.useState)(disabled);let customerEmail=(isGuest===!0||typeof isGuest>"u")&&!order?.customer_email;email!=null&&email!==""&&(customerEmail=!1);const billingDisable=(0,addressesManager_1.billingAddressController)({billing_address:billingAddress,errors,billingAddressId,requiresBillingInfo:order?.requires_billing_info}),shippingDisable=(0,addressesManager_1.shippingAddressController)({billingDisable,errors,shipToDifferentAddress,shipping_address:shippingAddress,shippingAddressId}),countryLockDisable=(0,addressesManager_1.countryLockController)({countryCodeLock:order?.shipping_country_code_lock,addresses,shipToDifferentAddress,billingAddressId,billing_address:billingAddress,shipping_address:shippingAddress,shippingAddressId,lineItems:order?.line_items}),disable=disabled||customerEmail||billingDisable||shippingDisable||countryLockDisable,handleClick=()=>tslib_1.__awaiter(this,void 0,void 0,function*(){if(errors&&Object.keys(errors).length===0&&!disable){let response={success:!1};if(setForceDisable(!0),order&&saveAddresses!=null)response=yield saveAddresses(email);else if(createCustomerAddress&&billingAddress){const address=Object.assign({},billingAddress);addressId&&(address.id=addressId),createCustomerAddress(address),response={success:!0}}setForceDisable(!1),onClick&&response.success&&onClick(response)}}),parentProps=Object.assign(Object.assign({},p),{label,resource,handleClick,disabled:disable});return children?(0,jsx_runtime_1.jsx)(Parent_1.default,Object.assign({},parentProps,{children})):(0,jsx_runtime_1.jsx)("button",Object.assign({type:"button",disabled:disable||forceDisable,onClick:()=>{handleClick()}},p,{children:(0,isFunction_1.default)(label)?label():label}))}exports.SaveAddressesButton=SaveAddressesButton,exports.default=SaveAddressesButton;
@@ -1,5 +1,5 @@
1
1
  import { type BaseError } from '../typings/errors';
2
- import { type Address, type AddressCreate } from '@commercelayer/sdk';
2
+ import { type LineItem, type Address, type AddressCreate } from '@commercelayer/sdk';
3
3
  import { type TCustomerAddress } from '../reducers/CustomerReducer';
4
4
  type BillingAddressController = (params: {
5
5
  billing_address?: AddressCreate;
@@ -16,7 +16,7 @@ type ShippingAddressController = (params: {
16
16
  shippingAddressId?: string;
17
17
  }) => boolean;
18
18
  export declare const shippingAddressController: ShippingAddressController;
19
- type CountryLockController = (params: {
19
+ interface CountryLockControllerProps {
20
20
  addresses?: Address[] | null;
21
21
  billing_address?: TCustomerAddress;
22
22
  billingAddressId?: string;
@@ -24,6 +24,7 @@ type CountryLockController = (params: {
24
24
  shipToDifferentAddress?: boolean;
25
25
  shipping_address?: AddressCreate;
26
26
  shippingAddressId?: string;
27
- }) => boolean;
28
- export declare const countryLockController: CountryLockController;
27
+ lineItems?: LineItem[] | null;
28
+ }
29
+ export declare function countryLockController({ addresses, billing_address, billingAddressId, countryCodeLock, shipToDifferentAddress, shipping_address, shippingAddressId, lineItems }: CountryLockControllerProps): boolean;
29
30
  export {};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.countryLockController=exports.shippingAddressController=exports.billingAddressController=void 0;const tslib_1=require("tslib"),isEmpty_1=tslib_1.__importDefault(require("lodash/isEmpty")),validateFormFields_1=require("./validateFormFields"),AddressReducer_1=require("../reducers/AddressReducer"),billingAddressController=({billing_address,billingAddressId,errors,requiresBillingInfo=!1})=>{let billingDisable=!(0,isEmpty_1.default)(errors)||(0,isEmpty_1.default)(billing_address);if((0,isEmpty_1.default)(errors)&&!(0,isEmpty_1.default)(billing_address)){let billingInfo=[...AddressReducer_1.addressFields];requiresBillingInfo&&(billingInfo=[...billingInfo,"billing_info"]),billingDisable=!!(billing_address&&(0,validateFormFields_1.fieldsExist)(billing_address,billingInfo))}return billingDisable&&!(0,isEmpty_1.default)(billingAddressId)&&(0,isEmpty_1.default)(billing_address)&&(billingDisable=!1),billingDisable};exports.billingAddressController=billingAddressController;const shippingAddressController=({billingDisable,errors,shipToDifferentAddress,shipping_address,shippingAddressId})=>{let shippingDisable=!!(!billingDisable&&shipToDifferentAddress);return shippingDisable&&(0,isEmpty_1.default)(errors)&&!(0,isEmpty_1.default)(shipping_address)&&(shippingDisable=!!(shipping_address&&(0,validateFormFields_1.fieldsExist)(shipping_address))),shippingDisable&&!(0,isEmpty_1.default)(shippingAddressId)&&(0,isEmpty_1.default)(shipping_address)&&(shippingDisable=!1),shippingDisable};exports.shippingAddressController=shippingAddressController;const countryLockController=({addresses,billing_address,billingAddressId,countryCodeLock,shipToDifferentAddress,shipping_address,shippingAddressId})=>{if(countryCodeLock&&!(0,isEmpty_1.default)(addresses)&&billingAddressId&&!shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===billingAddressId||a?.reference===billingAddressId)&&a?.country_code!==countryCodeLock);if(!(0,isEmpty_1.default)(addressLocked))return!0}if(countryCodeLock&&!(0,isEmpty_1.default)(billing_address)&&!shipToDifferentAddress)return billing_address?.country_code!==countryCodeLock;if(countryCodeLock&&!(0,isEmpty_1.default)(shipping_address)&&shipToDifferentAddress)return shipping_address?.country_code!==countryCodeLock;if(countryCodeLock&&!(0,isEmpty_1.default)(addresses)&&shippingAddressId&&shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===shippingAddressId||a?.reference===shippingAddressId)&&a?.country_code!==countryCodeLock);if(!(0,isEmpty_1.default)(addressLocked))return!0}return!1};exports.countryLockController=countryLockController;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.countryLockController=exports.shippingAddressController=exports.billingAddressController=void 0;const tslib_1=require("tslib"),isEmpty_1=tslib_1.__importDefault(require("lodash/isEmpty")),validateFormFields_1=require("./validateFormFields"),AddressReducer_1=require("../reducers/AddressReducer"),billingAddressController=({billing_address,billingAddressId,errors,requiresBillingInfo=!1})=>{let billingDisable=!(0,isEmpty_1.default)(errors)||(0,isEmpty_1.default)(billing_address);if((0,isEmpty_1.default)(errors)&&!(0,isEmpty_1.default)(billing_address)){let billingInfo=[...AddressReducer_1.addressFields];requiresBillingInfo&&(billingInfo=[...billingInfo,"billing_info"]),billingDisable=!!(billing_address&&(0,validateFormFields_1.fieldsExist)(billing_address,billingInfo))}return billingDisable&&!(0,isEmpty_1.default)(billingAddressId)&&(0,isEmpty_1.default)(billing_address)&&(billingDisable=!1),billingDisable};exports.billingAddressController=billingAddressController;const shippingAddressController=({billingDisable,errors,shipToDifferentAddress,shipping_address,shippingAddressId})=>{let shippingDisable=!!(!billingDisable&&shipToDifferentAddress);return shippingDisable&&(0,isEmpty_1.default)(errors)&&!(0,isEmpty_1.default)(shipping_address)&&(shippingDisable=!!(shipping_address&&(0,validateFormFields_1.fieldsExist)(shipping_address))),shippingDisable&&!(0,isEmpty_1.default)(shippingAddressId)&&(0,isEmpty_1.default)(shipping_address)&&(shippingDisable=!1),shippingDisable};exports.shippingAddressController=shippingAddressController;function countryLockController({addresses,billing_address,billingAddressId,countryCodeLock,shipToDifferentAddress,shipping_address,shippingAddressId,lineItems}){if(lineItems?.every(lineItem=>{var _a;return((_a=lineItem?.item)===null||_a===void 0?void 0:_a.do_not_ship)===!0}))return!1;if(countryCodeLock&&!(0,isEmpty_1.default)(addresses)&&billingAddressId&&!shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===billingAddressId||a?.reference===billingAddressId)&&a?.country_code!==countryCodeLock);if(!(0,isEmpty_1.default)(addressLocked))return!0}if(countryCodeLock&&!(0,isEmpty_1.default)(billing_address)&&!shipToDifferentAddress)return billing_address?.country_code!==countryCodeLock;if(countryCodeLock&&!(0,isEmpty_1.default)(shipping_address)&&shipToDifferentAddress)return shipping_address?.country_code!==countryCodeLock;if(countryCodeLock&&!(0,isEmpty_1.default)(addresses)&&shippingAddressId&&shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===shippingAddressId||a?.reference===shippingAddressId)&&a?.country_code!==countryCodeLock);if(!(0,isEmpty_1.default)(addressLocked))return!0}return!1}exports.countryLockController=countryLockController;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useState}from"react";import Parent from"../utils/Parent";import AddressContext from"../../context/AddressContext";import{shippingAddressController,countryLockController,billingAddressController}from"../../utils/addressesManager";import OrderContext from"../../context/OrderContext";import CustomerContext from"../../context/CustomerContext";import isFunction from"lodash/isFunction";export function SaveAddressesButton(props){const{children,label="Continue to delivery",resource,disabled=!1,addressId,onClick,...p}=props,{errors,billing_address:billingAddress,shipToDifferentAddress,shipping_address:shippingAddress,saveAddresses,billingAddressId,shippingAddressId}=useContext(AddressContext),{order}=useContext(OrderContext),{customerEmail:email,addresses,isGuest,createCustomerAddress}=useContext(CustomerContext),[forceDisable,setForceDisable]=useState(disabled);let customerEmail=(isGuest===!0||typeof isGuest>"u")&&!order?.customer_email;email!=null&&email!==""&&(customerEmail=!1);const billingDisable=billingAddressController({billing_address:billingAddress,errors,billingAddressId,requiresBillingInfo:order?.requires_billing_info}),shippingDisable=shippingAddressController({billingDisable,errors,shipToDifferentAddress,shipping_address:shippingAddress,shippingAddressId}),countryLockDisable=countryLockController({countryCodeLock:order?.shipping_country_code_lock,addresses,shipToDifferentAddress,billingAddressId,billing_address:billingAddress,shipping_address:shippingAddress,shippingAddressId}),disable=disabled||customerEmail||billingDisable||shippingDisable||countryLockDisable,handleClick=async()=>{if(errors&&Object.keys(errors).length===0&&!disable){let response={success:!1};if(setForceDisable(!0),order&&saveAddresses!=null)response=await saveAddresses(email);else if(createCustomerAddress&&billingAddress){const address={...billingAddress};addressId&&(address.id=addressId),createCustomerAddress(address),response={success:!0}}setForceDisable(!1),onClick&&response.success&&onClick(response)}},parentProps={...p,label,resource,handleClick,disabled:disable};return children?_jsx(Parent,{...parentProps,children}):_jsx("button",{type:"button",disabled:disable||forceDisable,onClick:()=>{handleClick()},...p,children:isFunction(label)?label():label})}export default SaveAddressesButton;
2
+ import{jsx as _jsx}from"react/jsx-runtime";import{useContext,useState}from"react";import Parent from"../utils/Parent";import AddressContext from"../../context/AddressContext";import{shippingAddressController,countryLockController,billingAddressController}from"../../utils/addressesManager";import OrderContext from"../../context/OrderContext";import CustomerContext from"../../context/CustomerContext";import isFunction from"lodash/isFunction";export function SaveAddressesButton(props){const{children,label="Continue to delivery",resource,disabled=!1,addressId,onClick,...p}=props,{errors,billing_address:billingAddress,shipToDifferentAddress,shipping_address:shippingAddress,saveAddresses,billingAddressId,shippingAddressId}=useContext(AddressContext),{order}=useContext(OrderContext),{customerEmail:email,addresses,isGuest,createCustomerAddress}=useContext(CustomerContext),[forceDisable,setForceDisable]=useState(disabled);let customerEmail=(isGuest===!0||typeof isGuest>"u")&&!order?.customer_email;email!=null&&email!==""&&(customerEmail=!1);const billingDisable=billingAddressController({billing_address:billingAddress,errors,billingAddressId,requiresBillingInfo:order?.requires_billing_info}),shippingDisable=shippingAddressController({billingDisable,errors,shipToDifferentAddress,shipping_address:shippingAddress,shippingAddressId}),countryLockDisable=countryLockController({countryCodeLock:order?.shipping_country_code_lock,addresses,shipToDifferentAddress,billingAddressId,billing_address:billingAddress,shipping_address:shippingAddress,shippingAddressId,lineItems:order?.line_items}),disable=disabled||customerEmail||billingDisable||shippingDisable||countryLockDisable,handleClick=async()=>{if(errors&&Object.keys(errors).length===0&&!disable){let response={success:!1};if(setForceDisable(!0),order&&saveAddresses!=null)response=await saveAddresses(email);else if(createCustomerAddress&&billingAddress){const address={...billingAddress};addressId&&(address.id=addressId),createCustomerAddress(address),response={success:!0}}setForceDisable(!1),onClick&&response.success&&onClick(response)}},parentProps={...p,label,resource,handleClick,disabled:disable};return children?_jsx(Parent,{...parentProps,children}):_jsx("button",{type:"button",disabled:disable||forceDisable,onClick:()=>{handleClick()},...p,children:isFunction(label)?label():label})}export default SaveAddressesButton;
@@ -1,5 +1,5 @@
1
1
  import { type BaseError } from '../typings/errors';
2
- import { type Address, type AddressCreate } from '@commercelayer/sdk';
2
+ import { type LineItem, type Address, type AddressCreate } from '@commercelayer/sdk';
3
3
  import { type TCustomerAddress } from '../reducers/CustomerReducer';
4
4
  type BillingAddressController = (params: {
5
5
  billing_address?: AddressCreate;
@@ -16,7 +16,7 @@ type ShippingAddressController = (params: {
16
16
  shippingAddressId?: string;
17
17
  }) => boolean;
18
18
  export declare const shippingAddressController: ShippingAddressController;
19
- type CountryLockController = (params: {
19
+ interface CountryLockControllerProps {
20
20
  addresses?: Address[] | null;
21
21
  billing_address?: TCustomerAddress;
22
22
  billingAddressId?: string;
@@ -24,6 +24,7 @@ type CountryLockController = (params: {
24
24
  shipToDifferentAddress?: boolean;
25
25
  shipping_address?: AddressCreate;
26
26
  shippingAddressId?: string;
27
- }) => boolean;
28
- export declare const countryLockController: CountryLockController;
27
+ lineItems?: LineItem[] | null;
28
+ }
29
+ export declare function countryLockController({ addresses, billing_address, billingAddressId, countryCodeLock, shipToDifferentAddress, shipping_address, shippingAddressId, lineItems }: CountryLockControllerProps): boolean;
29
30
  export {};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import isEmpty from"lodash/isEmpty";import{fieldsExist}from"./validateFormFields";import{addressFields}from"../reducers/AddressReducer";export const billingAddressController=({billing_address,billingAddressId,errors,requiresBillingInfo=!1})=>{let billingDisable=!isEmpty(errors)||isEmpty(billing_address);if(isEmpty(errors)&&!isEmpty(billing_address)){let billingInfo=[...addressFields];requiresBillingInfo&&(billingInfo=[...billingInfo,"billing_info"]),billingDisable=!!(billing_address&&fieldsExist(billing_address,billingInfo))}return billingDisable&&!isEmpty(billingAddressId)&&isEmpty(billing_address)&&(billingDisable=!1),billingDisable},shippingAddressController=({billingDisable,errors,shipToDifferentAddress,shipping_address,shippingAddressId})=>{let shippingDisable=!!(!billingDisable&&shipToDifferentAddress);return shippingDisable&&isEmpty(errors)&&!isEmpty(shipping_address)&&(shippingDisable=!!(shipping_address&&fieldsExist(shipping_address))),shippingDisable&&!isEmpty(shippingAddressId)&&isEmpty(shipping_address)&&(shippingDisable=!1),shippingDisable},countryLockController=({addresses,billing_address,billingAddressId,countryCodeLock,shipToDifferentAddress,shipping_address,shippingAddressId})=>{if(countryCodeLock&&!isEmpty(addresses)&&billingAddressId&&!shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===billingAddressId||a?.reference===billingAddressId)&&a?.country_code!==countryCodeLock);if(!isEmpty(addressLocked))return!0}if(countryCodeLock&&!isEmpty(billing_address)&&!shipToDifferentAddress)return billing_address?.country_code!==countryCodeLock;if(countryCodeLock&&!isEmpty(shipping_address)&&shipToDifferentAddress)return shipping_address?.country_code!==countryCodeLock;if(countryCodeLock&&!isEmpty(addresses)&&shippingAddressId&&shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===shippingAddressId||a?.reference===shippingAddressId)&&a?.country_code!==countryCodeLock);if(!isEmpty(addressLocked))return!0}return!1};
2
+ import isEmpty from"lodash/isEmpty";import{fieldsExist}from"./validateFormFields";import{addressFields}from"../reducers/AddressReducer";export const billingAddressController=({billing_address,billingAddressId,errors,requiresBillingInfo=!1})=>{let billingDisable=!isEmpty(errors)||isEmpty(billing_address);if(isEmpty(errors)&&!isEmpty(billing_address)){let billingInfo=[...addressFields];requiresBillingInfo&&(billingInfo=[...billingInfo,"billing_info"]),billingDisable=!!(billing_address&&fieldsExist(billing_address,billingInfo))}return billingDisable&&!isEmpty(billingAddressId)&&isEmpty(billing_address)&&(billingDisable=!1),billingDisable},shippingAddressController=({billingDisable,errors,shipToDifferentAddress,shipping_address,shippingAddressId})=>{let shippingDisable=!!(!billingDisable&&shipToDifferentAddress);return shippingDisable&&isEmpty(errors)&&!isEmpty(shipping_address)&&(shippingDisable=!!(shipping_address&&fieldsExist(shipping_address))),shippingDisable&&!isEmpty(shippingAddressId)&&isEmpty(shipping_address)&&(shippingDisable=!1),shippingDisable};export function countryLockController({addresses,billing_address,billingAddressId,countryCodeLock,shipToDifferentAddress,shipping_address,shippingAddressId,lineItems}){if(lineItems?.every(lineItem=>lineItem?.item?.do_not_ship===!0))return!1;if(countryCodeLock&&!isEmpty(addresses)&&billingAddressId&&!shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===billingAddressId||a?.reference===billingAddressId)&&a?.country_code!==countryCodeLock);if(!isEmpty(addressLocked))return!0}if(countryCodeLock&&!isEmpty(billing_address)&&!shipToDifferentAddress)return billing_address?.country_code!==countryCodeLock;if(countryCodeLock&&!isEmpty(shipping_address)&&shipToDifferentAddress)return shipping_address?.country_code!==countryCodeLock;if(countryCodeLock&&!isEmpty(addresses)&&shippingAddressId&&shipToDifferentAddress){const addressLocked=addresses?.find(a=>(a?.id===shippingAddressId||a?.reference===shippingAddressId)&&a?.country_code!==countryCodeLock);if(!isEmpty(addressLocked))return!0}return!1}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/react-components",
3
- "version": "4.7.5-beta.1",
3
+ "version": "4.7.5-beta.2",
4
4
  "description": "The Official Commerce Layer React Components",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.js",