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WACN7nB,IAGJ1B,EAAMu0B,cAAe,CACrB,MAAMiwB,EAjIiBC,EAAClwB,EAA+B71B,KAC3D,MAGMgmD,GAAsBnwB,EAAcowB,iBAAmB,IAAI5rB,QAHzC6rB,CAAC5rB,EAAe5D,IAC7B4D,GAAS5D,EAASyvB,SAAW,IAEiD,GACnFC,GAAUpmD,EAAKszC,aAAe,GAAK+Q,EAAuBxuB,GAChE,OAAOwwB,KAAKC,IAAIN,EAAoBI,IA2HTL,CAAuBzkD,EAAMu0B,cAAev0B,EAAMtB,MACnEskD,EAAgBD,EAAuB/iD,EAAMu0B,eAC7C0wB,GAA4BjT,GAAe,GAAKwS,EAAiBxB,EAEnEA,EAAgB,IAChBpyC,EAAWykB,QAAUytB,EAA0B9iD,GAAQgjD,EAAe,UAAWhjD,EAAMo8B,cAAgB,mBAGvGooB,EAAiB,IACjB5zC,EAAWwkB,SAAW0tB,EAA0B9iD,GAAQwkD,EAAgB,YAAaxkD,EAAMq8B,eAAiB,qBAGhHzrB,EAAWkY,WAAag6B,EAAyBvhC,EAAAA,EAAC,GACzCvhB,GAAK,IAAEkpB,cAAU9sB,IACtB6oD,EACA,QACAjlD,EAAM0nB,iBAId,OAAO9W","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/customProxy/calenderDaysOff/DataServiceEntities.g.ts?5ab0","webpack://Msdyn365.Commerce.Online/./src/actions/customProxy/calenderDaysOff/DataActionExtension.g.ts?a975","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/actions/get-pickup-options-for-cartlines.ts?dfbb","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/components/krannich-c-cart-pick-up-in-store.tsx?c3ac","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/components/krannich-c-cart-line-items.tsx?486c","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/components/krannich-c-cart-line-groups.tsx?a5ee","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/utils/get-promotion-in-krannich-c-cart.ts?a1f4","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/krannich-c-cart.tsx?1da4","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/components/krannich-c-cart-line-items-promotion.tsx?0081","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-cart/krannich-c-cart.view.tsx?182d","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/alert.tsx?4572","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/get-invoice-payment-summary.tsx?10e6","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/get-line-items.tsx?e517","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/get-order-summary.tsx?d7ab","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/address-format.data.ts?3c40","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/guided-card.tsx?4040","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/guided-form.tsx?b094","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/components/place-order-button.tsx?0e44","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/krannich-c-checkout.tsx?aeb7","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/methods/place-order.ts?1555","webpack://Msdyn365.Commerce.Online/./src/modules/krannich-c-checkout/krannich-c-checkout.view.tsx?62f1","webpack://Msdyn365.Commerce.Online/./src/themes/krannich/views/components/promocode.component.tsx?d4b5","webpack://Msdyn365.Commerce.Online/./src/utils/ATP/atpHelper.tsx?b736","webpack://Msdyn365.Commerce.Online/./src/utils/Kits/kits.tsx?777d","webpack://Msdyn365.Commerce.Online/./src/utils/order-summary/order-summary-lineitem.tsx?0ce0"],"sourcesContent":["// @ts-ignore -- Unused import\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n// @ts-ignore -- Unused import\r\nimport { jsonLightReadStringPropertyValue } from '@msdyn365-commerce/retail-proxy/dist/externals';\r\n\r\n/**\r\n * KRV_AddressResponseEntity entity interface.\r\n */\r\nexport interface IKRV_AddressResponseEntity {\r\n Id: string;\r\n AddressList?: IKRV_AddressEntity[];\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_ProspectProperties entity interface.\r\n */\r\nexport interface IKRV_ProspectProperties {\r\n ProspectEmail: string;\r\n Status?: boolean;\r\n}\r\n\r\n/**\r\n * KRV_CMSDocument entity interface.\r\n */\r\nexport interface IKRV_CMSDocument {\r\n OUN?: string;\r\n FileName: string;\r\n FileURL?: string;\r\n ItemNumber?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_SubscribeNewsLetter entity interface.\r\n */\r\nexport interface IKRV_SubscribeNewsLetter {\r\n Company?: string;\r\n FirstName?: string;\r\n LastName?: string;\r\n ZipCode?: string;\r\n EmailAddress: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_CalendarOffDaysEntity entity interface.\r\n */\r\nexport interface IKRV_CalendarOffDaysEntity {\r\n FromDate: string;\r\n ToDate?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesDate entity interface.\r\n */\r\nexport interface IKRV_ATPLeadTimePropertiesDate {\r\n Id: number;\r\n ATPDate?: string;\r\n Quantity: number;\r\n Message?: string;\r\n PODate?: string;\r\n POQuantity: number;\r\n POMessage?: string;\r\n PurchaseLeadTimeDate?: string;\r\n PurchaseLeadTimeQuantity: number;\r\n PurchaseLeadTimeMessage?: string;\r\n ItemStatusMessage?: string;\r\n StatusCode?: string;\r\n TrafficLight?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_AddressEntity entity interface.\r\n */\r\nexport interface IKRV_AddressEntity {\r\n AddressName?: string;\r\n Street?: string;\r\n City?: string;\r\n State?: string;\r\n PostalCode?: string;\r\n Country?: string;\r\n CountryRegion?: string;\r\n FullAddress?: string;\r\n}\r\n\r\n/**\r\n * KRV_SaveCMSDocumentResponseEntity entity interface.\r\n */\r\nexport interface IKRV_SaveCMSDocumentResponseEntity {\r\n Status?: string;\r\n StatusCode?: string;\r\n Message?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_DownloadCMSDocumentResponseEntity entity interface.\r\n */\r\nexport interface IKRV_DownloadCMSDocumentResponseEntity {\r\n File?: string;\r\n FileName?: string;\r\n FileURL?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_SubscribeNewsLetterResponseEntity entity interface.\r\n */\r\nexport interface IKRV_SubscribeNewsLetterResponseEntity {\r\n Status?: string;\r\n StatusCode?: string;\r\n Message?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesQuantityRequestEntity entity interface.\r\n */\r\nexport interface IKRV_ATPLeadTimePropertiesQuantityRequestEntity {\r\n itemID?: string;\r\n Qty: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesQuantityResponseEntity entity interface.\r\n */\r\nexport interface IKRV_ATPLeadTimePropertiesQuantityResponseEntity {\r\n ItemId?: string;\r\n ATPDate?: string;\r\n Message?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesDateRequestEntity entity interface.\r\n */\r\nexport interface IKRV_ATPLeadTimePropertiesDateRequestEntity {\r\n itemID?: string;\r\n requestedDate?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimeTrafficLightResponseEntity entity interface.\r\n */\r\nexport interface IKRV_ATPLeadTimeTrafficLightResponseEntity {\r\n ItemId?: string;\r\n TrafficLight?: string;\r\n StatusCode?: string;\r\n JsonResponseObject?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * KRV_GetATPLeadTimeResponseQuantity entity interface.\r\n */\r\nexport interface IKRV_GetATPLeadTimeResponseQuantity {\r\n ATPLeadTimePropertiesQuantityResponseEntityList?: IKRV_ATPLeadTimePropertiesQuantityResponseEntity[];\r\n HighestDate?: string;\r\n}\r\n\r\n/**\r\n * KRV_GetMultipleATPLeadTimeResponseDate entity interface.\r\n */\r\nexport interface IKRV_GetMultipleATPLeadTimeResponseDate {\r\n ATPTrafficLights?: IKRV_ATPLeadTimeTrafficLightResponseEntity[];\r\n}\r\n\r\n/**\r\n * KRV_AddressResponseEntity entity class.\r\n */\r\nexport class KRV_AddressResponseEntityExtensionClass implements IKRV_AddressResponseEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public AddressList: IKRV_AddressEntity[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.AddressList = undefined;\r\n if (odataObject.AddressList) {\r\n this.AddressList = [];\r\n for (var i = 0; i < odataObject.AddressList.length; i++) {\r\n if (odataObject.AddressList[Number(i)]) {\r\n if (odataObject.AddressList[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.AddressList[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.AddressList[Number(i)] = new EntityClasses[String(className)](odataObject.AddressList[Number(i)]);\r\n }\r\n } else {\r\n this.AddressList[Number(i)] = new KRV_AddressEntityExtensionClass(odataObject.AddressList[Number(i)]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.AddressList[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_ProspectProperties entity class.\r\n */\r\nexport class KRV_ProspectPropertiesExtensionClass implements IKRV_ProspectProperties {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ProspectEmail: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Status: boolean;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ProspectEmail = odataObject.ProspectEmail;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Status = odataObject.Status;\r\n }\r\n}\r\n\r\n/**\r\n * KRV_CMSDocument entity class.\r\n */\r\nexport class KRV_CMSDocumentExtensionClass implements IKRV_CMSDocument {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public OUN: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FileName: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FileURL: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemNumber: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.OUN = odataObject.OUN;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FileName = odataObject.FileName;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FileURL = odataObject.FileURL;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemNumber = odataObject.ItemNumber;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_SubscribeNewsLetter entity class.\r\n */\r\nexport class KRV_SubscribeNewsLetterExtensionClass implements IKRV_SubscribeNewsLetter {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Company: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FirstName: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public LastName: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ZipCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public EmailAddress: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Company = odataObject.Company;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FirstName = odataObject.FirstName;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.LastName = odataObject.LastName;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ZipCode = odataObject.ZipCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.EmailAddress = odataObject.EmailAddress;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_CalendarOffDaysEntity entity class.\r\n */\r\nexport class KRV_CalendarOffDaysEntityExtensionClass implements IKRV_CalendarOffDaysEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FromDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ToDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FromDate = odataObject.FromDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ToDate = odataObject.ToDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesDate entity class.\r\n */\r\nexport class KRV_ATPLeadTimePropertiesDateExtensionClass implements IKRV_ATPLeadTimePropertiesDate {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ATPDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Quantity: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PODate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public POQuantity: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public POMessage: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PurchaseLeadTimeDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PurchaseLeadTimeQuantity: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PurchaseLeadTimeMessage: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemStatusMessage: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StatusCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TrafficLight: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id ? parseInt(odataObject.Id, 10) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ATPDate = odataObject.ATPDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Quantity = odataObject.Quantity ? parseFloat(odataObject.Quantity) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PODate = odataObject.PODate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.POQuantity = odataObject.POQuantity ? parseFloat(odataObject.POQuantity) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.POMessage = odataObject.POMessage;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PurchaseLeadTimeDate = odataObject.PurchaseLeadTimeDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PurchaseLeadTimeQuantity = odataObject.PurchaseLeadTimeQuantity ? parseFloat(odataObject.PurchaseLeadTimeQuantity) : 0;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PurchaseLeadTimeMessage = odataObject.PurchaseLeadTimeMessage;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemStatusMessage = odataObject.ItemStatusMessage;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StatusCode = odataObject.StatusCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TrafficLight = odataObject.TrafficLight;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_AddressEntity entity class.\r\n */\r\nexport class KRV_AddressEntityExtensionClass implements IKRV_AddressEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public AddressName: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Street: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public City: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public State: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PostalCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Country: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public CountryRegion: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FullAddress: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.AddressName = odataObject.AddressName;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Street = odataObject.Street;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.City = odataObject.City;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.State = odataObject.State;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PostalCode = odataObject.PostalCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Country = odataObject.Country;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.CountryRegion = odataObject.CountryRegion;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FullAddress = odataObject.FullAddress;\r\n }\r\n}\r\n\r\n/**\r\n * KRV_SaveCMSDocumentResponseEntity entity class.\r\n */\r\nexport class KRV_SaveCMSDocumentResponseEntityExtensionClass implements IKRV_SaveCMSDocumentResponseEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Status: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StatusCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Status = odataObject.Status;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StatusCode = odataObject.StatusCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_DownloadCMSDocumentResponseEntity entity class.\r\n */\r\nexport class KRV_DownloadCMSDocumentResponseEntityExtensionClass implements IKRV_DownloadCMSDocumentResponseEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public File: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FileName: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public FileURL: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.File = odataObject.File;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FileName = odataObject.FileName;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.FileURL = odataObject.FileURL;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_SubscribeNewsLetterResponseEntity entity class.\r\n */\r\nexport class KRV_SubscribeNewsLetterResponseEntityExtensionClass implements IKRV_SubscribeNewsLetterResponseEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Status: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StatusCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Status = odataObject.Status;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StatusCode = odataObject.StatusCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesQuantityRequestEntity entity class.\r\n */\r\nexport class KRV_ATPLeadTimePropertiesQuantityRequestEntityExtensionClass implements IKRV_ATPLeadTimePropertiesQuantityRequestEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public itemID: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Qty: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.itemID = odataObject.itemID;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Qty = odataObject.Qty;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesQuantityResponseEntity entity class.\r\n */\r\nexport class KRV_ATPLeadTimePropertiesQuantityResponseEntityExtensionClass implements IKRV_ATPLeadTimePropertiesQuantityResponseEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ATPDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ATPDate = odataObject.ATPDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimePropertiesDateRequestEntity entity class.\r\n */\r\nexport class KRV_ATPLeadTimePropertiesDateRequestEntityExtensionClass implements IKRV_ATPLeadTimePropertiesDateRequestEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public itemID: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public requestedDate: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.itemID = odataObject.itemID;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.requestedDate = odataObject.requestedDate;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_ATPLeadTimeTrafficLightResponseEntity entity class.\r\n */\r\nexport class KRV_ATPLeadTimeTrafficLightResponseEntityExtensionClass implements IKRV_ATPLeadTimeTrafficLightResponseEntity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public TrafficLight: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StatusCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public JsonResponseObject: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.TrafficLight = odataObject.TrafficLight;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StatusCode = odataObject.StatusCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.JsonResponseObject = odataObject.JsonResponseObject;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[Number(i)]) {\r\n if (odataObject.ExtensionProperties[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ExtensionProperties[Number(i)] = new EntityClasses.CommercePropertyClass(\r\n odataObject.ExtensionProperties[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * KRV_GetATPLeadTimeResponseQuantity entity class.\r\n */\r\nexport class KRV_GetATPLeadTimeResponseQuantityExtensionClass implements IKRV_GetATPLeadTimeResponseQuantity {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ATPLeadTimePropertiesQuantityResponseEntityList: IKRV_ATPLeadTimePropertiesQuantityResponseEntity[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public HighestDate: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ATPLeadTimePropertiesQuantityResponseEntityList = undefined;\r\n if (odataObject.ATPLeadTimePropertiesQuantityResponseEntityList) {\r\n this.ATPLeadTimePropertiesQuantityResponseEntityList = [];\r\n for (var i = 0; i < odataObject.ATPLeadTimePropertiesQuantityResponseEntityList.length; i++) {\r\n if (odataObject.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)]) {\r\n if (odataObject.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ATPLeadTimePropertiesQuantityResponseEntityList[\r\n Number(i)\r\n ] = new KRV_ATPLeadTimePropertiesQuantityResponseEntityExtensionClass(\r\n odataObject.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ATPLeadTimePropertiesQuantityResponseEntityList[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.HighestDate = odataObject.HighestDate;\r\n }\r\n}\r\n\r\n/**\r\n * KRV_GetMultipleATPLeadTimeResponseDate entity class.\r\n */\r\nexport class KRV_GetMultipleATPLeadTimeResponseDateExtensionClass implements IKRV_GetMultipleATPLeadTimeResponseDate {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ATPTrafficLights: IKRV_ATPLeadTimeTrafficLightResponseEntity[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ATPTrafficLights = undefined;\r\n if (odataObject.ATPTrafficLights) {\r\n this.ATPTrafficLights = [];\r\n for (var i = 0; i < odataObject.ATPTrafficLights.length; i++) {\r\n if (odataObject.ATPTrafficLights[Number(i)]) {\r\n if (odataObject.ATPTrafficLights[Number(i)]['@odata.type']) {\r\n var className: string = odataObject.ATPTrafficLights[Number(i)]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[String(className)]) {\r\n this.ATPTrafficLights[Number(i)] = new EntityClasses[String(className)](\r\n odataObject.ATPTrafficLights[Number(i)]\r\n );\r\n }\r\n } else {\r\n this.ATPTrafficLights[Number(i)] = new KRV_ATPLeadTimeTrafficLightResponseEntityExtensionClass(\r\n odataObject.ATPTrafficLights[Number(i)]\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ATPTrafficLights[Number(i)] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\nimport {\r\n AsyncResult,\r\n callActionOrExecute,\r\n DataServiceQuery,\r\n IContext,\r\n IDataServiceRequest,\r\n IQueryResultSettings,\r\n // @ts-ignore -- Unused import\r\n NullResult\r\n} from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore -- Unused import\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n// @ts-ignore -- Unused import\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport * as DataServiceEntities from './DataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction kRV_BillingAddressQuery(id?: string): DataServiceQuery {\r\n const key = id ? { Id: id } : null;\r\n return new DataServiceQuery(\r\n 'KRV_BillingAddress',\r\n 'KRV_AddressResponseEntity',\r\n DataServiceEntities.KRV_AddressResponseEntityExtensionClass,\r\n key\r\n );\r\n}\r\n\r\nexport function createKRV_GetAddressInput(queryResultSettings: IQueryResultSettings, customerAccountNumber: string): IDataServiceRequest {\r\n const query = kRV_BillingAddressQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_GetAddress',\r\n true,\r\n DataServiceEntities.KRV_AddressEntityExtensionClass,\r\n 'true',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_AddressEntity'\r\n },\r\n { customerAccountNumber: customerAccountNumber }\r\n );\r\n}\r\n\r\nexport function kRV_GetAddressAsync(\r\n context: IContext,\r\n customerAccountNumber: string\r\n): AsyncResult {\r\n const request = createKRV_GetAddressInput(context.queryResultSettings || {}, customerAccountNumber);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction kRV_ProspectQuery(prospectEmail?: string): DataServiceQuery {\r\n const key = prospectEmail ? { ProspectEmail: prospectEmail } : null;\r\n return new DataServiceQuery('KRV_Prospect', 'KRV_ProspectProperties', DataServiceEntities.KRV_ProspectPropertiesExtensionClass, key);\r\n}\r\n\r\nexport function createKRV_GetProspectStatusInput(email: string): IDataServiceRequest {\r\n const query = kRV_ProspectQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_GetProspectStatus',\r\n true,\r\n DataServiceEntities.KRV_ProspectPropertiesExtensionClass,\r\n 'false',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_ProspectProperties'\r\n },\r\n { email: email }\r\n );\r\n}\r\n\r\nexport function kRV_GetProspectStatusAsync(context: IContext, email: string): AsyncResult {\r\n const request = createKRV_GetProspectStatusInput(email);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction kRV_CMSDocumentsQuery(fileName?: string): DataServiceQuery {\r\n const key = fileName ? { FileName: fileName } : null;\r\n return new DataServiceQuery('KRV_CMSDocuments', 'KRV_CMSDocument', DataServiceEntities.KRV_CMSDocumentExtensionClass, key);\r\n}\r\n\r\nexport function createKRV_SaveCMSDocumentInput(kRV_CMSDocument: DataServiceEntities.IKRV_CMSDocument): IDataServiceRequest {\r\n const query = kRV_CMSDocumentsQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_SaveCMSDocument',\r\n true,\r\n DataServiceEntities.KRV_SaveCMSDocumentResponseEntityExtensionClass,\r\n 'false',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_SaveCMSDocumentResponseEntity'\r\n },\r\n { kRV_CMSDocument: kRV_CMSDocument }\r\n );\r\n}\r\n\r\nexport function kRV_SaveCMSDocumentAsync(\r\n context: IContext,\r\n kRV_CMSDocument: DataServiceEntities.IKRV_CMSDocument\r\n): AsyncResult {\r\n const request = createKRV_SaveCMSDocumentInput(kRV_CMSDocument);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createKRV_DownloadCMSDocumentInput(\r\n queryResultSettings: IQueryResultSettings,\r\n itemNumber: string,\r\n oun: string\r\n): IDataServiceRequest {\r\n const query = kRV_CMSDocumentsQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_DownloadCMSDocument',\r\n true,\r\n DataServiceEntities.KRV_DownloadCMSDocumentResponseEntityExtensionClass,\r\n 'true',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_DownloadCMSDocumentResponseEntity'\r\n },\r\n { itemNumber: itemNumber, oun: oun }\r\n );\r\n}\r\n\r\nexport function kRV_DownloadCMSDocumentAsync(\r\n context: IContext,\r\n itemNumber: string,\r\n oun: string\r\n): AsyncResult {\r\n const request = createKRV_DownloadCMSDocumentInput(context.queryResultSettings || {}, itemNumber, oun);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction kRV_NewsLetterQuery(emailAddress?: string): DataServiceQuery {\r\n const key = emailAddress ? { EmailAddress: emailAddress } : null;\r\n return new DataServiceQuery(\r\n 'KRV_NewsLetter',\r\n 'KRV_SubscribeNewsLetter',\r\n DataServiceEntities.KRV_SubscribeNewsLetterExtensionClass,\r\n key\r\n );\r\n}\r\n\r\nexport function createKRV_SubscribeNewsLetterInput(subscribeNewsLetter: DataServiceEntities.IKRV_SubscribeNewsLetter): IDataServiceRequest {\r\n const query = kRV_NewsLetterQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_SubscribeNewsLetter',\r\n true,\r\n DataServiceEntities.KRV_SubscribeNewsLetterResponseEntityExtensionClass,\r\n 'false',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_SubscribeNewsLetterResponseEntity'\r\n },\r\n { subscribeNewsLetter: subscribeNewsLetter }\r\n );\r\n}\r\n\r\nexport function kRV_SubscribeNewsLetterAsync(\r\n context: IContext,\r\n subscribeNewsLetter: DataServiceEntities.IKRV_SubscribeNewsLetter\r\n): AsyncResult {\r\n const request = createKRV_SubscribeNewsLetterInput(subscribeNewsLetter);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction kRV_CalendarOffDaysQuery(fromDate?: string): DataServiceQuery {\r\n const key = fromDate ? { FromDate: fromDate } : null;\r\n return new DataServiceQuery(\r\n 'KRV_CalendarOffDays',\r\n 'KRV_CalendarOffDaysEntity',\r\n DataServiceEntities.KRV_CalendarOffDaysEntityExtensionClass,\r\n key\r\n );\r\n}\r\n\r\nexport function createFetchInput(queryResultSettings: IQueryResultSettings, requestedDate: string): IDataServiceRequest {\r\n const query = kRV_CalendarOffDaysQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'Fetch',\r\n true,\r\n '',\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IKRV_CalendarOffDaysEntity' },\r\n { requestedDate: requestedDate }\r\n );\r\n}\r\n\r\nexport function fetchAsync(context: IContext, requestedDate: string): AsyncResult {\r\n const request = createFetchInput(context.queryResultSettings || {}, requestedDate);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\n// @ts-ignore\r\nfunction kRV_ATPQuery(id?: number): DataServiceQuery {\r\n const key = id ? { Id: id } : null;\r\n return new DataServiceQuery(\r\n 'KRV_ATP',\r\n 'KRV_ATPLeadTimePropertiesDate',\r\n DataServiceEntities.KRV_ATPLeadTimePropertiesDateExtensionClass,\r\n key\r\n );\r\n}\r\n\r\nexport function createKRV_GetATPLeadTimeWithDateInput(itemId: string, requestedDate: string): IDataServiceRequest {\r\n const query = kRV_ATPQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_GetATPLeadTimeWithDate',\r\n true,\r\n DataServiceEntities.KRV_ATPLeadTimePropertiesDateExtensionClass,\r\n 'false',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_ATPLeadTimePropertiesDate'\r\n },\r\n { itemId: itemId, requestedDate: requestedDate }\r\n );\r\n}\r\n\r\nexport function kRV_GetATPLeadTimeWithDateAsync(\r\n context: IContext,\r\n itemId: string,\r\n requestedDate: string\r\n): AsyncResult {\r\n const request = createKRV_GetATPLeadTimeWithDateInput(itemId, requestedDate);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createKRV_GetATPLeadTimeWithQuantityInput(\r\n kRVATPLeadTimeQuantity: DataServiceEntities.IKRV_ATPLeadTimePropertiesQuantityRequestEntity[]\r\n): IDataServiceRequest {\r\n const query = kRV_ATPQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_GetATPLeadTimeWithQuantity',\r\n true,\r\n DataServiceEntities.KRV_GetATPLeadTimeResponseQuantityExtensionClass,\r\n 'false',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_GetATPLeadTimeResponseQuantity'\r\n },\r\n { KRVATPLeadTimeQuantity: kRVATPLeadTimeQuantity }\r\n );\r\n}\r\n\r\nexport function kRV_GetATPLeadTimeWithQuantityAsync(\r\n context: IContext,\r\n kRVATPLeadTimeQuantity: DataServiceEntities.IKRV_ATPLeadTimePropertiesQuantityRequestEntity[]\r\n): AsyncResult {\r\n const request = createKRV_GetATPLeadTimeWithQuantityInput(kRVATPLeadTimeQuantity);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n\r\nexport function createKRV_GetMultipleATPLeadTimeDateInput(\r\n kRVATPLeadTimeDate: DataServiceEntities.IKRV_ATPLeadTimePropertiesDateRequestEntity[]\r\n): IDataServiceRequest {\r\n const query = kRV_ATPQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'KRV_GetMultipleATPLeadTimeDate',\r\n true,\r\n DataServiceEntities.KRV_GetMultipleATPLeadTimeResponseDateExtensionClass,\r\n 'false',\r\n {\r\n bypassCache: 'get',\r\n returnEntity: 'DataServiceEntities.IKRV_GetMultipleATPLeadTimeResponseDate'\r\n },\r\n { KRVATPLeadTimeDate: kRVATPLeadTimeDate }\r\n );\r\n}\r\n\r\nexport function kRV_GetMultipleATPLeadTimeDateAsync(\r\n context: IContext,\r\n kRVATPLeadTimeDate: DataServiceEntities.IKRV_ATPLeadTimePropertiesDateRequestEntity[]\r\n): AsyncResult {\r\n const request = createKRV_GetMultipleATPLeadTimeDateInput(kRVATPLeadTimeDate);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport { ProductDeliveryOptions, ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n ActiveCartProductsInput,\r\n QueryResultSettingsProxy,\r\n buildCacheKey,\r\n getActiveCartProductsAction\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * Input class for pickup delivery options for items in cart.\r\n */\r\nexport class ProductPickUpOptionsForCartLineItems implements IActionInput {\r\n public readonly apiSettings: ICommerceApiSettings;\r\n\r\n public constructor(apiSettings: ICommerceApiSettings) {\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n /**\r\n * Get Cache Key.\r\n * @returns - Cache key string.\r\n */\r\n public getCacheKey = (): string => buildCacheKey('ActiveCartLineItemsPickUpOptions', this.apiSettings);\r\n\r\n /**\r\n * Get Cachetype Name.\r\n * @returns - Cache name string.\r\n */\r\n public getCacheObjectType = (): string => 'ActiveCartLineItemsPickUpOptions';\r\n\r\n /**\r\n * Get Cachetype.\r\n * @returns - CacheType enum.\r\n */\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the GetPickUpOptionCartLineItems method.\r\n * @param inputData - The input data passed to the createInput method.\r\n * @returns - Input for data action.\r\n */\r\nconst createInput = (inputData: ICreateActionContext>) => {\r\n return new ProductPickUpOptionsForCartLineItems(inputData.requestContext.apiSettings);\r\n};\r\n\r\n/**\r\n * The action method for the GetPickUpOptionCartLineItems data action.\r\n * @param input - The action input.\r\n * @param context - The action context.\r\n * @returns - Order Template object.\r\n */\r\nexport async function getPickUpOptionsForCartLineItems(\r\n input: ProductPickUpOptionsForCartLineItems,\r\n context: IActionContext\r\n): Promise {\r\n // If no input is provided fail out\r\n if (!input.apiSettings.channelId) {\r\n throw new Error('[getPickUpOptionsForCartLineItems]No valid Input was provided, failing');\r\n }\r\n const cartState = await getCartState(context);\r\n const cart = cartState.cart;\r\n const products = await getActiveCartProductsAction(new ActiveCartProductsInput(), context);\r\n const filterOption = 4;\r\n const response: ProductDeliveryOptions[] = [];\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- existing code.\r\n if (cart === undefined || !ArrayExtensions.hasElements(products)) {\r\n return Promise.resolve(response);\r\n }\r\n\r\n const pickupoptions = await ProductsDataActions.getDeliveryOptionsAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\r\n },\r\n products.map(product => product.RecordId),\r\n {},\r\n filterOption\r\n );\r\n\r\n return pickupoptions;\r\n}\r\n\r\n/**\r\n * The GetPickupOptionCartLineItems Data Action\r\n * Returns pickup options.\r\n */\r\nexport const getPickUpOptionsForCartLineItemsDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-pickup-options-for-cartlines',\r\n action: getPickUpOptionsForCartLineItems as IAction,\r\n input: createInput\r\n});\r\n\r\nexport default getPickUpOptionsForCartLineItemsDataAction;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n DeliveryOption,\r\n OrgUnitLocation,\r\n ProductDeliveryOptions,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IPickUpInStoreViewProps {\r\n callbacks: {\r\n toggleBopis(isBopisSelected: boolean): void;\r\n };\r\n defaultComponent?: React.ReactNode;\r\n orgUnitName?: string;\r\n isBopisSelected: boolean;\r\n ContainerProps: INodeProps;\r\n deliveryOption?: string;\r\n}\r\n\r\nexport interface IPickUpInStoreProps {\r\n cartline: CartLine;\r\n product: SimpleProduct;\r\n shipitText: string;\r\n pickUpInStoreText: string;\r\n changeStoreText: string;\r\n cartState: ICartState | undefined;\r\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\r\n orgUnitLocations?: OrgUnitLocation[] | undefined;\r\n deliveryOptions?: ProductDeliveryOptions;\r\n pickupDeliveryModeCode?: string;\r\n storeSelectorModuleId?: string;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n retailMulitplePickupFeatureState?: boolean;\r\n locationChangedHandler(): void;\r\n}\r\n\r\nexport const PickUpInStore = (props: IPickUpInStoreProps): IPickUpInStoreViewProps | undefined => {\r\n const _onLocationChangedCallback = async (\r\n orgUnitLocation: OrgUnitLocation,\r\n cartState: ICartState | undefined,\r\n cartline: CartLine,\r\n deliveryMode?: string\r\n ) => {\r\n if (!cartState) {\r\n return Promise.resolve();\r\n }\r\n return cartState\r\n .updateCartLinePickupLocation({ cartLineId: cartline.LineId!, location: orgUnitLocation, deliveryMode })\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n props.locationChangedHandler();\r\n }\r\n })\r\n .catch(error => {});\r\n };\r\n\r\n const _toggleBOPIS = (isBopisSelected: boolean) => {\r\n const { storeSelectorStateManager, product, cartline, cartState, storeSelectorModuleId } = props;\r\n\r\n if (isBopisSelected) {\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n storeSelectorStateManager\r\n .openDialog({\r\n id: storeSelectorModuleId,\r\n product,\r\n alreadySelectedLocation: {\r\n OrgUnitNumber: cartline.FulfillmentStoreId\r\n },\r\n deliveryOptions: props.deliveryOptions,\r\n onLocationSelected: async (orgUnitLocation, deliveryMode: string | undefined) => {\r\n return _onLocationChangedCallback(orgUnitLocation, cartState, cartline, deliveryMode);\r\n }\r\n })\r\n .catch(error => {});\r\n } else {\r\n if (!cartState) {\r\n return;\r\n }\r\n cartline.DeliveryMode = '';\r\n cartline.FulfillmentStoreId = '';\r\n cartline.ShippingAddress = {};\r\n cartState\r\n .clearCartLinePickupLocation({ cartLineId: cartline.LineId! })\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n props.locationChangedHandler();\r\n }\r\n })\r\n .catch(error => {});\r\n }\r\n };\r\n\r\n const _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\r\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\r\n return '';\r\n }\r\n\r\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\r\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\r\n });\r\n\r\n if (foundLocation) {\r\n return foundLocation.OrgUnitName;\r\n }\r\n return fulfillmentStoreId;\r\n };\r\n\r\n const _renderShippingMethod = (\r\n cartLine: CartLine,\r\n shipItText: string,\r\n pickupInStoretext: string,\r\n changeStoreText: string,\r\n orgUnitLocations: OrgUnitLocation[] | undefined\r\n ): JSX.Element => {\r\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, orgUnitLocations);\r\n const bopisSelected = !!cartLine.FulfillmentStoreId;\r\n\r\n const toggleBOPIS = (isBopisSelected: boolean) => {\r\n return () => {\r\n _toggleBOPIS(isBopisSelected);\r\n };\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n {cartLine.FulfillmentStoreId ? (\r\n
\r\n {orgUnitName}\r\n \r\n
\r\n ) : null}\r\n \r\n );\r\n };\r\n\r\n const _getDeliveryOption = (pickupStore: IPickUpInStoreProps, deliveryOptions: ProductDeliveryOptions) => {\r\n const delivery = deliveryOptions?.DeliveryOptions?.find(option => option.Code === pickupStore.pickupDeliveryModeCode);\r\n return delivery?.Description;\r\n };\r\n\r\n /**\r\n * Method to check if we have atleast one common delivery code between product and channel.\r\n * @param productdeliveryOptions - Product DeliveryOption List.\r\n * @param storePickUpOptionList - Channel DeliveryOption List.\r\n * @returns Boolean flag.\r\n */\r\n const matchDeliveryOptions = (\r\n productdeliveryOptions: DeliveryOption[] | undefined,\r\n storePickUpOptionList: string[] | undefined\r\n ): boolean => {\r\n const deliveryOption: string[] = [];\r\n productdeliveryOptions?.map(delivery => {\r\n const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\r\n if (pickup) {\r\n deliveryOption.push(pickup);\r\n }\r\n return deliveryOption;\r\n });\r\n\r\n return ArrayExtensions.hasElements(deliveryOption);\r\n };\r\n\r\n // If no delivery options present on the product, or none of the delivery options\r\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\r\n if (!props.deliveryOptions || !props.deliveryOptions.DeliveryOptions) {\r\n return undefined;\r\n }\r\n\r\n if (props.retailMulitplePickupFeatureState && props.channelDeliveryOptionConfig) {\r\n if (!matchDeliveryOptions(props.deliveryOptions.DeliveryOptions, props.channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\r\n return undefined;\r\n }\r\n } else if (\r\n !props.pickupDeliveryModeCode ||\r\n !props.deliveryOptions.DeliveryOptions.find(option => option.Code === props.pickupDeliveryModeCode)\r\n ) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n callbacks: {\r\n toggleBopis: _toggleBOPIS\r\n },\r\n defaultComponent: _renderShippingMethod(\r\n props.cartline,\r\n props.shipitText,\r\n props.pickUpInStoreText,\r\n props.changeStoreText,\r\n props.orgUnitLocations\r\n ),\r\n orgUnitName: _getOrgUnitName(props.cartline.FulfillmentStoreId, props.orgUnitLocations),\r\n isBopisSelected: !!props.cartline.FulfillmentStoreId,\r\n deliveryOption: _getDeliveryOption(props, props.deliveryOptions),\r\n ContainerProps: {\r\n className: 'msc-cart-line__bopis-container'\r\n }\r\n };\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n AddToOrderTemplateComponent,\r\n AddToWishlistComponent,\r\n IAddToOrderTemplateDialogResources,\r\n ICartlineResourceString,\r\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n IItemAddedToOrderTemplateDialogResources,\r\n IOrderTemplateNameDialogResources,\r\n IWishlistActionSuccessResult\r\n} from '@msdyn365-commerce/components';\r\nimport { CartLineItemComponent } from '../../../themes/krannich/views/components/cartlineitem.component';\r\nimport MsDyn365, {\r\n IAny,\r\n ICoreContext,\r\n IGeneric,\r\n IGridSettings,\r\n IImageSettings,\r\n ITelemetry,\r\n TelemetryEvent,\r\n isChannelTypeB2B\r\n} from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n AsyncResult,\r\n CartLine,\r\n CartLineValidationResultsByLineId,\r\n ChannelDeliveryOptionConfiguration,\r\n CommerceList,\r\n Customer,\r\n OrgUnitLocation,\r\n ProductDeliveryOptions,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ProductCatalog, ProductDimensionType, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\r\nimport {\r\n ArrayExtensions,\r\n getInvoiceDetailsPageUrlSync,\r\n IProductInventoryInformation,\r\n isCartLineItemPickUpType,\r\n ObjectExtensions,\r\n OrderTemplate,\r\n StringExtensions\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '@msdyn365-commerce-modules/cart';\r\nimport { IPickUpInStoreViewProps, PickUpInStore } from './krannich-c-cart-pick-up-in-store';\r\nimport { formatUrlPath, taxPercentage } from '../../../utils/helper';\r\n\r\nexport interface ICartLineItemsProps {\r\n cartlines: CartLine[];\r\n cartlinesErrors: CartLineValidationResultsByLineId;\r\n cartState: ICartState | undefined;\r\n orgUnitLocations: OrgUnitLocation[] | undefined;\r\n resources: ICartlineResourceString;\r\n productAvailabilites: IProductInventoryInformation[] | undefined;\r\n products: SimpleProduct[] | undefined;\r\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\r\n pickupDeliveryModeCode?: string;\r\n catalogs?: ProductCatalog[];\r\n retailMulitplePickupFeatureState?: boolean;\r\n\r\n /* GridSettings for the product image in cartline */\r\n gridSettings: IGridSettings;\r\n\r\n /* ImageSettings for the product image in cartline */\r\n imageSettings: IImageSettings;\r\n id: string;\r\n typeName: string;\r\n context: ICoreContext>;\r\n telemetry: ITelemetry;\r\n removeButtonText: string;\r\n addToWishlistButtonText: string;\r\n removeFromWishlistButtonText: string;\r\n shipItText: string;\r\n pickitUpText: string;\r\n changeStoreText: string;\r\n outOfStockText: string;\r\n outOfRangeOneText: string;\r\n outOfRangeFormatText: string;\r\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\r\n isStockCheckEnabled: boolean;\r\n wishlists: CommerceList[] | undefined;\r\n defaultWishlistName: string;\r\n maxCartlineQuantity: number;\r\n includeErrors?: boolean;\r\n showShippingChargesForLineItems?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n isQuantityLimitsFeatureEnabled: boolean;\r\n hasInvoiceLine?: boolean;\r\n storeSelectorModuleId?: string;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\r\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\r\n itemAddedToOrderTemplateDialogResources: IItemAddedToOrderTemplateDialogResources;\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\r\n\r\n addToOrderTemplateButtonText: string;\r\n addToOrderTemplateButtonTooltip: string;\r\n addToOrderTemplateMessage: string;\r\n addItemToOrderTemplateError: string;\r\n orderTemplates: OrderTemplate[] | undefined;\r\n customerInformation: Customer | undefined;\r\n shouldIgnoreWarehouse: boolean | undefined;\r\n productAvailability?: AsyncResult;\r\n productPickUpOptions?: ProductDeliveryOptions[] | undefined;\r\n isMultipleCatalogFeatureEnabledInHq: boolean;\r\n catalogId?: number;\r\n productsAttributes?: any[];\r\n\r\n removeItemClickHandler(cartlineToRemove: CartLine): void;\r\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\r\n updateCartLinesQuantitySuccessHandler(cartline: CartLine, quantity: number, lineIndex?: number): boolean;\r\n locationChangedHandler(): void;\r\n}\r\n\r\nexport interface ICartlinesViewProps {\r\n cartline: React.ReactNode;\r\n pickUpInStore?: IPickUpInStoreViewProps;\r\n remove: React.ReactNode;\r\n addToWishlist: React.ReactNode | undefined;\r\n addToOrderTemplate: React.ReactNode | undefined;\r\n\r\n error?: string;\r\n cartlineId?: string;\r\n hasError?: boolean;\r\n data?: {\r\n product?: SimpleProduct;\r\n cartline: CartLine;\r\n };\r\n}\r\n\r\nconst _getCartItemAvailableQuantity = (\r\n isStockCheckEnabled: boolean,\r\n productAvailability: IProductInventoryInformation | undefined\r\n): number => {\r\n if (\r\n !isStockCheckEnabled ||\r\n !productAvailability ||\r\n !productAvailability.ProductAvailableQuantity ||\r\n !productAvailability.IsProductAvailable ||\r\n !productAvailability.ProductAvailableQuantity.AvailableQuantity\r\n ) {\r\n return 0;\r\n }\r\n\r\n return productAvailability.ProductAvailableQuantity.AvailableQuantity;\r\n};\r\n\r\nconst _getCartItemMaxQuantity = (\r\n maxQuantityByConfig: number,\r\n isStockCheckEnabled: boolean,\r\n availableQuantityInStock: number,\r\n isQuantityLimitsFeatureEnabled: boolean,\r\n maxByQuantityLimitsFeature: number\r\n) => {\r\n if (isQuantityLimitsFeatureEnabled) {\r\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\r\n\r\n // If max by feature in not defined when feature is on then we suggest that there no max by feature\r\n // and consider available qty if stock check enabled and max from config in site settings.\r\n if (!maxByQuantityLimitsFeature) {\r\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\r\n }\r\n\r\n return isStockCheckEnabled\r\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\r\n ? maxByQuantityLimitsFeatureResult\r\n : availableQuantityInStock\r\n : maxByQuantityLimitsFeatureResult;\r\n }\r\n if (isStockCheckEnabled) {\r\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\r\n }\r\n return maxQuantityByConfig;\r\n};\r\n\r\nconst _getErrorMessage = (\r\n availableQuantityInStock: number,\r\n currentQuantity: number,\r\n props: ICartLineItemsProps,\r\n shouldSkipStockCheck: boolean,\r\n cartLine: CartLine,\r\n lineId: string | undefined,\r\n foundProductAvailability?: IProductInventoryInformation\r\n): string | undefined => {\r\n const finalErrorMessages: string[] = [];\r\n\r\n const isLoadingDeliveryOptions = props.productAvailability?.status === 'LOADING';\r\n if (isLoadingDeliveryOptions) {\r\n return undefined;\r\n }\r\n\r\n // check availability passed as prop for each cartline\r\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\r\n if (foundProductAvailability === undefined) {\r\n finalErrorMessages.push(props.outOfStockText);\r\n return finalErrorMessages.toString();\r\n }\r\n }\r\n ``;\r\n\r\n if (props.includeErrors && props.isStockCheckEnabled && !shouldSkipStockCheck) {\r\n if (availableQuantityInStock <= 0) {\r\n finalErrorMessages.push(props.outOfStockText);\r\n } else if (availableQuantityInStock < currentQuantity) {\r\n if (availableQuantityInStock === 1) {\r\n finalErrorMessages.push(props.outOfRangeOneText);\r\n } else {\r\n finalErrorMessages.push(props.outOfRangeFormatText.replace('{numLeft}', availableQuantityInStock.toString()));\r\n }\r\n }\r\n }\r\n\r\n // Server-side validation\r\n const checkForErrors = props.cartlinesErrors.ValidationResultsPairs;\r\n const errorsFoundByLineId = checkForErrors?.filter(index => index.LineId === lineId);\r\n if (errorsFoundByLineId !== undefined) {\r\n for (const i of errorsFoundByLineId) {\r\n if (ArrayExtensions.hasElements(i.ValidationFailures)) {\r\n i.ValidationFailures.forEach(validation => {\r\n if (validation.ErrorContext !== undefined) {\r\n finalErrorMessages.push(validation.ErrorContext);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (ArrayExtensions.hasElements(finalErrorMessages)) {\r\n return finalErrorMessages.join(' ');\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\n/**\r\n * On Remove Click functionality.\r\n * @param removeItemClickHandler -Remove item click function.\r\n * @param cartline -CartLine.\r\n * @returns Remove change value.\r\n */\r\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\r\n removeItemClickHandler(cartline);\r\n};\r\n\r\n// eslint-disable-next-line complexity -- Auto-suppressed.\r\nconst _assembleNode = (\r\n cartline: CartLine,\r\n product: SimpleProduct | undefined,\r\n props: ICartLineItemsProps,\r\n index: number,\r\n foundProductAvailability?: IProductInventoryInformation,\r\n productPickUpOptions?: ProductDeliveryOptions,\r\n productsAttributes?: any[] | undefined\r\n): ICartlinesViewProps => {\r\n const {\r\n imageSettings,\r\n gridSettings,\r\n id,\r\n typeName,\r\n context,\r\n resources,\r\n removeButtonText,\r\n removeItemClickHandler,\r\n moveToWishlistSuccessHandler,\r\n addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip,\r\n addToOrderTemplateDialogResources,\r\n createOrderTemplateDialogResources,\r\n itemAddedToOrderTemplateDialogResources,\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n addToWishlistButtonText,\r\n removeFromWishlistButtonText,\r\n orderTemplates,\r\n customerInformation,\r\n wishlists,\r\n defaultWishlistName,\r\n isMultipleCatalogFeatureEnabledInHq,\r\n storeSelectorModuleId\r\n } = props;\r\n\r\n const isAuthenticated = context.request.user.isAuthenticated;\r\n const nameOfWishlist = wishlists && wishlists.length > 0 && wishlists[0].Name ? wishlists[0].Name : defaultWishlistName;\r\n const availableQuantityInStock = _getCartItemAvailableQuantity(props.isStockCheckEnabled, foundProductAvailability);\r\n\r\n const maxQuantity =\r\n product &&\r\n _getCartItemMaxQuantity(\r\n props.maxCartlineQuantity,\r\n props.isStockCheckEnabled,\r\n availableQuantityInStock,\r\n props.isQuantityLimitsFeatureEnabled,\r\n product?.Behavior?.MaximumQuantity || 0\r\n );\r\n\r\n // Skip stock check if the cart line is a service item or an invoice line\r\n const shouldSkipStockCheck = product?.ItemTypeValue === ReleasedProductType.Service || !!cartline.IsInvoiceLine;\r\n\r\n const errorMessage = ObjectExtensions.isNullOrUndefined(maxQuantity)\r\n ? undefined\r\n : _getErrorMessage(\r\n availableQuantityInStock,\r\n cartline.Quantity!,\r\n props,\r\n shouldSkipStockCheck,\r\n cartline,\r\n cartline.LineId,\r\n foundProductAvailability\r\n );\r\n\r\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\r\n\r\n const payload = getPayloadObject(TelemetryEvent.RemoveFromCart, props.telemetryContent!, removeButtonText, '');\r\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\r\n\r\n const inventoryLbl = foundProductAvailability?.StockLevelLabel;\r\n const inventoryCode = foundProductAvailability\r\n ? `ms-cart-line__inventory-code-${foundProductAvailability.StockLevelCode?.toLowerCase()}`\r\n : undefined;\r\n const productDimension = 4;\r\n const customPriceDimensionType = productDimension as ProductDimensionType.Style;\r\n const isCustomPriceSelected =\r\n product?.Dimensions?.find(dimension => dimension.DimensionTypeValue === customPriceDimensionType)?.DimensionValue?.Value ===\r\n 'Custom';\r\n const productAttributesArr = productsAttributes?.find(attr => attr?.recordId === product?.RecordId)?.attributes;\r\n const _getManufacturerName = (productAttributes: any[]): string => {\r\n if (!productAttributes) {\r\n return '';\r\n }\r\n const lookupAttributeKey = props.context?.app?.config?.productManufacturarAttribute || 'Manufacturer';\r\n return productAttributes?.find((attr: { Name: string }) => attr.Name === lookupAttributeKey)?.TextValue || '';\r\n };\r\n const getManufacturerItemTypeName = (prod: SimpleProduct): string => {\r\n if (!prod) {\r\n return '';\r\n }\r\n return prod?.ExtensionProperties?.find(extension => extension.Key === 'ManufItemTypeName')?.Value?.StringValue || '';\r\n };\r\n const urlPath = formatUrlPath(_getManufacturerName(productAttributesArr), getManufacturerItemTypeName(product!));\r\n const pathName = context.actionContext.requestContext.url.requestUrl.pathname.split('/');\r\n const isAddingPathWithUrl = context.actionContext.requestContext.app.config.addPathWithUrl ?? false;\r\n let productUrl: string | undefined;\r\n\r\n if (product) {\r\n productUrl =\r\n productAttributesArr !== undefined && isAddingPathWithUrl\r\n ? `${context.actionContext.requestContext.url.requestUrl.origin}/${pathName[1]}/${urlPath}/${product.RecordId}.p`\r\n : `${context.actionContext.requestContext.url.requestUrl.origin}/${urlPath}/${product.RecordId}.p`;\r\n\r\n if (MsDyn365.isBrowser && isChannelTypeB2B(props.context.actionContext.requestContext)) {\r\n const fullUrl = new URL(productUrl, window.location.href);\r\n fullUrl.searchParams.set('catalogid', `${cartline.CatalogId ?? 0}`);\r\n productUrl = fullUrl.href;\r\n }\r\n } else {\r\n productUrl = getInvoiceDetailsPageUrlSync(cartline.Description || '', props.context.actionContext);\r\n }\r\n const customerTaxPercentage = taxPercentage(props.customerInformation!);\r\n\r\n return {\r\n data: {\r\n product,\r\n cartline\r\n },\r\n cartlineId: cartline.LineId,\r\n error: errorMessage,\r\n hasError:\r\n (!shouldSkipStockCheck && props.isStockCheckEnabled ? cartline.Quantity! > (maxQuantity ?? 0) : false) ||\r\n (!ObjectExtensions.isNullOrUndefined(errorMessage) && !StringExtensions.isNullOrEmpty(errorMessage)),\r\n cartline: (\r\n \r\n ),\r\n pickUpInStore: product\r\n ? PickUpInStore({\r\n storeSelectorModuleId,\r\n cartState: props.cartState,\r\n cartline,\r\n product,\r\n shipitText: props.shipItText,\r\n pickUpInStoreText: props.pickitUpText,\r\n changeStoreText: props.changeStoreText,\r\n storeSelectorStateManager: props.storeSelectorStateManager,\r\n orgUnitLocations: props.orgUnitLocations,\r\n deliveryOptions: productPickUpOptions,\r\n pickupDeliveryModeCode:\r\n cartline.DeliveryMode !== (undefined || '') ? cartline.DeliveryMode : props.pickupDeliveryModeCode,\r\n retailMulitplePickupFeatureState: props.retailMulitplePickupFeatureState,\r\n channelDeliveryOptionConfig: props.channelDeliveryOptionConfig,\r\n locationChangedHandler: props.locationChangedHandler\r\n })\r\n : undefined,\r\n remove: (\r\n \r\n ),\r\n addToWishlist:\r\n isAuthenticated && product && !isCustomPriceSelected ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n addToOrderTemplate:\r\n isAuthenticated && orderTemplates && product ? (\r\n \r\n ) : (\r\n undefined\r\n )\r\n };\r\n};\r\n\r\nexport const assembleCartlines = (\r\n cartlines: CartLine[],\r\n products: SimpleProduct[] | undefined,\r\n props: ICartLineItemsProps,\r\n productsAttributes: any[] | undefined\r\n): ICartlinesViewProps[] | null => {\r\n const reactNodes: ICartlinesViewProps[] = [];\r\n\r\n cartlines.map((cartline, index) => {\r\n let product;\r\n if (props.isQuantityLimitsFeatureEnabled) {\r\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\r\n // to check productId and WarehouseId for identification.\r\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\r\n } else {\r\n product = getProductByProductId(cartline.ProductId, products);\r\n }\r\n let foundProductAvailability;\r\n // check if cartlineitem is pickup item\r\n const isPickUpItem = isCartLineItemPickUpType(\r\n cartline,\r\n props.retailMulitplePickupFeatureState,\r\n props.channelDeliveryOptionConfig,\r\n props.pickupDeliveryModeCode\r\n );\r\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\r\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\r\n if (!props.shouldIgnoreWarehouse && isPickUpItem) {\r\n // check warehouse only if siteBuilder setting is not \"Based on aggregate for shipping and pickup warehouses\" and cartlineitem is pickupitem\r\n return (\r\n productAvailability.ProductAvailableQuantity?.ProductId === cartline.ProductId &&\r\n productAvailability.InventLocationId?.toUpperCase() === cartline.WarehouseId?.toUpperCase()\r\n );\r\n }\r\n return productAvailability.ProductAvailableQuantity.ProductId === cartline.ProductId;\r\n });\r\n }\r\n\r\n let productPickUpOptions;\r\n if (props.productPickUpOptions !== undefined && ArrayExtensions.hasElements(props.productPickUpOptions)) {\r\n productPickUpOptions = props.productPickUpOptions.find(deliveryOption => {\r\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\r\n });\r\n }\r\n reactNodes.push(_assembleNode(cartline, product, props, index, foundProductAvailability, productPickUpOptions, productsAttributes));\r\n });\r\n\r\n return reactNodes;\r\n};\r\n\r\n/**\r\n * CartLineItems component.\r\n * @param props\r\n */\r\nexport const CartLineItems = (props: ICartLineItemsProps) => {\r\n const { products, cartlines, productsAttributes } = props;\r\n return assembleCartlines(cartlines, products, props, productsAttributes);\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport groupBy from 'lodash/groupBy';\r\n\r\nimport { assembleCartlines, ICartLineItemsProps, ICartlinesViewProps } from './krannich-c-cart-line-items';\r\n\r\nconst _assembleGroupCartlines = (\r\n cartlines: CartLine[],\r\n products: SimpleProduct[] | undefined,\r\n props: ICartLineItemsProps\r\n): ICartlinesViewProps[][] | null => {\r\n const reactNodes: ICartlinesViewProps[][] = [];\r\n if (!products || products.length === 0) {\r\n props.context.telemetry.error('Products content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\r\n const groupDelivery = getGroupByDelivery(cartlines);\r\n const cartLinesGroup: CartLine[] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryType, groupByDeliveryType]) => {\r\n // @ts-expect-error\r\n groupDelivery[String(deliveryType)] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n // 2) Create cartlines group\r\n Object.keys(cartLinesGroup).forEach((key: string) => {\r\n const cartLines = cartLinesGroup[String(key)];\r\n Object.keys(cartLines).forEach((index: string) => {\r\n const cartLine = cartLines[String(index)];\r\n const carLineViewProps = assembleCartlines(cartLine, products, props, props.productsAttributes);\r\n if (carLineViewProps !== null) {\r\n reactNodes.push(carLineViewProps);\r\n }\r\n });\r\n });\r\n\r\n return reactNodes;\r\n};\r\n\r\nconst _assembleGroupInvoiceCartlines = (\r\n cartLines: CartLine[],\r\n products: SimpleProduct[] | undefined,\r\n props: ICartLineItemsProps\r\n): ICartlinesViewProps[][] | null => {\r\n const reactNodes: ICartlinesViewProps[][] = [];\r\n if (cartLines && cartLines.length > 0) {\r\n // Create invoice cartLines group\r\n const carLineViewProps = assembleCartlines(cartLines, products, props, props.productsAttributes);\r\n if (carLineViewProps !== null) {\r\n reactNodes.push(carLineViewProps);\r\n }\r\n }\r\n return reactNodes;\r\n};\r\n\r\n/**\r\n * CartLine Group component.\r\n * @param props\r\n */\r\nexport const CartLineGroupItems = (props: ICartLineItemsProps) => {\r\n const { products, cartlines, hasInvoiceLine } = props;\r\n return hasInvoiceLine\r\n ? _assembleGroupInvoiceCartlines(cartlines, products, props)\r\n : _assembleGroupCartlines(cartlines, products, props);\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { getPromotionOptionsForCartLineItems, PromotionOptionsForCartLineItems } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * IPromotionData entity interface.\r\n */\r\nexport interface IPromotionData {\r\n promotionOptions?: CartPromotionLine[];\r\n}\r\n\r\n/**\r\n * Calls the Retail API and returns a promotion data.\r\n * @param ctx\r\n */\r\nexport async function getPromotionData(ctx: IActionContext): Promise {\r\n const promotionData: IPromotionData = {};\r\n\r\n await getPromotionOptionsForCartLineItems(new PromotionOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\r\n .then(promotionOptions => {\r\n if (promotionOptions) {\r\n promotionData.promotionOptions = promotionOptions;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n return {};\r\n });\r\n\r\n return promotionData;\r\n}\r\n","/* eslint-disable security/detect-object-injection */\r\n/* eslint-disable security/detect-unsafe-regex */\r\n/* eslint-disable react/jsx-key */\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n IAddToOrderTemplateDialogResources,\r\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n IItemAddedToOrderTemplateDialogResources,\r\n ILinesAddedToOrderTemplateDialogResources,\r\n IOrderTemplateNameDialogResources,\r\n IWishlistActionSuccessResult,\r\n SaveCartToOrderTemplateComponent\r\n} from '@msdyn365-commerce/components';\r\nimport PromoCodeComponent from '../../themes/krannich/views/components/promocode.component';\r\nimport MsDyn365, { getCatalogId, getUrlSync, IImageSettings, isChannelTypeB2B } from '@msdyn365-commerce/core';\r\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\r\nimport { AsyncResult, CartLine, CartLineValidationResultsByLineId, LineValidationResult } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n AttributeValueBase,\r\n FeatureState,\r\n ProductDeliveryOptions,\r\n ReleasedProductType\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { cartLineQuantityUpdatedAsync, validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\r\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport { IOrderSummaryLines, OrderSummary } from '../../utils/order-summary/order-summary-lineitem';\r\nimport {\r\n ActiveCartProductsInput,\r\n ArrayExtensions,\r\n getActiveCartProductsAction,\r\n ICartLineInventoryValidationResult,\r\n ObjectExtensions,\r\n validateCartLinesInventory,\r\n ProductPickUpOptionsForCartLineItems,\r\n validateCatalogId\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Alert,\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n INodeProps,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n Waiting,\r\n updateMaxQuantityForCartLineItem,\r\n urlCheck\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport React from 'react';\r\nimport { getPickUpOptionsForCartLineItems } from './actions/get-pickup-options-for-cartlines';\r\n\r\nimport { IKrannichCCartData } from './krannich-c-cart.data';\r\nimport { IKrannichCCartProps, IKrannichCCartResources } from './krannich-c-cart.props.autogenerated';\r\nimport { CartLineGroupItems } from './components/krannich-c-cart-line-groups';\r\nimport { CartLineItems, ICartlinesViewProps } from './components/krannich-c-cart-line-items';\r\nimport { cartPromotions, ICartLineItemViewProps } from './components/krannich-c-cart-line-items-promotion';\r\nimport { getPromotionData, IPromotionData } from './utils/get-promotion-in-krannich-c-cart';\r\nimport { convertDateFormatToMMDDYYY, dateFormatByLocale, findAttribute, setNameAttribute, taxPercentage } from '../../utils/helper';\r\nimport { getDateWithOnePlus } from '../../utils/ATP/atpHelper';\r\nimport {\r\n kRV_GetATPLeadTimeWithQuantityAsync,\r\n kRV_GetMultipleATPLeadTimeDateAsync\r\n} from '../../actions/customProxy/ATP-update/DataActionExtension.g';\r\nimport { IKRV_GetATPLeadTimeResponseQuantity } from '../../actions/customProxy/ATP-update/DataServiceEntities.g';\r\nimport DatePicker, { registerLocale } from 'react-datepicker';\r\nimport enGb from 'date-fns/locale/en-GB';\r\nimport enUS from 'date-fns/locale/en-US';\r\nimport enAU from 'date-fns/locale/en-AU';\r\nimport { fetchAsync } from '../../actions/customProxy/calenderDaysOff/DataActionExtension.g';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nregisterLocale('enGb', enGb);\r\nregisterLocale('enUS', enUS);\r\nregisterLocale('enAU', enAU);\r\n\r\n/**\r\n * Cart view props interface.\r\n */\r\nexport interface ICartViewProps extends IKrannichCCartProps {\r\n className: string;\r\n title?: React.ReactNode;\r\n CartlinesWrapper: INodeProps;\r\n cartlines?: ICartlinesViewProps[];\r\n cartLinesGroup?: ICartlinesViewProps[][];\r\n cart: ICartState | undefined;\r\n orderSummaryHeading: React.ReactNode;\r\n orderSummaryLineitems?: IOrderSummaryLines;\r\n invoiceSummaryLineitems?: IInvoiceSummaryLines;\r\n OrderSummaryWrapper: INodeProps;\r\n OrderSummaryItems: INodeProps;\r\n OrderSummaryErrors?: IOrderSummaryErrors;\r\n checkoutAsGuestButton: React.ReactNode;\r\n checkoutAsSignInUserButton: React.ReactNode;\r\n storeSelector?: React.ReactNode;\r\n expressCheckoutButton?: React.ReactNode[];\r\n ExpressCheckoutSectionWrapper: INodeProps;\r\n backToShoppingButton: React.ReactNode;\r\n waitingComponent: React.ReactNode;\r\n promotionOptions?: ICartLineItemViewProps;\r\n promoCode: React.ReactNode;\r\n cartLoadingStatus: string;\r\n cartDataResult: boolean;\r\n multiplePickUpEnabled?: boolean;\r\n createTemplateFromCartButton: React.ReactNode;\r\n telemetryContent?: ITelemetryContent;\r\n checkoutBlockedDueToUnavailableFunds?: React.ReactNode;\r\n removeItemClickHandler(cartlineToRemove: CartLine): void;\r\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\r\n requestDate: React.ReactNode;\r\n isCheckoutBtnLoading?: boolean;\r\n shipDate: IKRV_GetATPLeadTimeResponseQuantity;\r\n showAtpStockAlert: boolean;\r\n atpCartlineResults: any[];\r\n}\r\n\r\n/**\r\n * Order summary errors interface.\r\n */\r\nexport interface IOrderSummaryErrors {\r\n Wrapper: INodeProps;\r\n header: React.ReactNode;\r\n errors: React.ReactNode[];\r\n}\r\n\r\n/**\r\n * Cart component state interface.\r\n */\r\ninterface ICartComponentState {\r\n showPromotionDialog: boolean;\r\n cartlinesErrors: CartLineValidationResultsByLineId;\r\n promotionData: IPromotionData;\r\n isCartValid: boolean;\r\n RequestedDeliveryDate: string;\r\n isRedirect?: boolean;\r\n isCheckoutBtnLoading?: boolean;\r\n atpOrderShipDateArr?: IKRV_GetATPLeadTimeResponseQuantity;\r\n orderShipdate: any;\r\n startDate?: Date;\r\n productPickUpOptions?: ProductDeliveryOptions[];\r\n calenderdDaysOff?: any[];\r\n showAtpStockAlert: boolean;\r\n atpCartlineResults: any[];\r\n productsAttributes: any[];\r\n}\r\n\r\n/**\r\n * Cart component.\r\n * @extends {React.PureComponent>}\r\n */\r\n@observer\r\nclass Cart extends React.Component> {\r\n public state: ICartComponentState;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private isQuantityLimitsFeatureEnabled: boolean = false;\r\n\r\n private _isMounted: boolean = false;\r\n\r\n private readonly promotionPopupId: string = 'cart-promotion-popup';\r\n\r\n public constructor(props: IKrannichCCartProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\r\n this.promotionLinkClick = this.promotionLinkClick.bind(this);\r\n this.promotionCloseButtonclick = this.promotionCloseButtonclick.bind(this);\r\n this.state = {\r\n showPromotionDialog: false,\r\n promotionData: {},\r\n isCartValid: true,\r\n RequestedDeliveryDate: '',\r\n isRedirect: true,\r\n isCheckoutBtnLoading: true,\r\n atpOrderShipDateArr: undefined,\r\n orderShipdate: '',\r\n startDate: undefined,\r\n productPickUpOptions: undefined,\r\n cartlinesErrors: {},\r\n showAtpStockAlert: false,\r\n atpCartlineResults: [],\r\n productsAttributes: []\r\n };\r\n }\r\n\r\n /**\r\n * Component did mount function.\r\n */\r\n public async componentDidMount(): Promise {\r\n this._isMounted = true;\r\n const {\r\n config,\r\n context: { actionContext }\r\n } = this.props;\r\n\r\n this.isQuantityLimitsFeatureEnabled =\r\n (await this.getOrderQuantityLimitsFeatureFlag()) || (await this._isChannelLimitsFeatureEnabled());\r\n if (this.isQuantityLimitsFeatureEnabled) {\r\n await this.validateCart();\r\n }\r\n\r\n if (config.showAvailablePromotions) {\r\n if (this._isMounted && this.props.data.cart.result?.cart.CartLines) {\r\n this.setState({ promotionData: await getPromotionData(actionContext) });\r\n }\r\n\r\n reaction(\r\n () => this.props.data.cart.result?.cart.CartLines,\r\n async () => {\r\n if (this._isMounted) {\r\n this.setState({ promotionData: await getPromotionData(actionContext) });\r\n }\r\n }\r\n );\r\n reaction(\r\n () => this.props.data.cart.result?.cart.CartLines,\r\n async () => {\r\n if (this._isMounted) {\r\n const input = new ProductPickUpOptionsForCartLineItems(actionContext.requestContext.apiSettings);\r\n this.setState({ productPickUpOptions: await getPickUpOptionsForCartLineItems(input, actionContext) });\r\n }\r\n }\r\n );\r\n }\r\n if (\r\n this.state.cartlinesErrors &&\r\n this.state.cartlinesErrors.LineIdToProductBehaviorMap?.length !== 0 &&\r\n this.state.cartlinesErrors.ValidationResultsPairs?.length !== 0\r\n ) {\r\n this.setState({\r\n isCheckoutBtnLoading: true\r\n });\r\n } else {\r\n this.setState({\r\n isCheckoutBtnLoading: false\r\n });\r\n }\r\n // ************ VSI CUSTOMIZATION Calculate to Greatest ATP Ship Date Call Our Own Custom Function to get Greatest Date ************ //\r\n void this._atpShipDate();\r\n void this._calenderDaysOff();\r\n void this.getProductAttributes();\r\n }\r\n public async getProductAttributes(): Promise {\r\n const {\r\n context: { actionContext }\r\n } = this.props;\r\n const productsAttributes: any[] = [];\r\n await Promise.all(\r\n (this.props.data.products.result ?? []).map(async product => {\r\n const attributes = await getAttributeValuesAsync(\r\n { callerContext: actionContext, queryResultSettings: {} },\r\n product.RecordId,\r\n actionContext.requestContext.apiSettings.channelId,\r\n actionContext.requestContext.apiSettings.catalogId\r\n );\r\n productsAttributes.push({ recordId: product.RecordId, attributes: attributes });\r\n })\r\n );\r\n\r\n this.setState({ productsAttributes: productsAttributes });\r\n }\r\n\r\n public UNSAFE_componentWillReceiveProps(nextProps: Readonly>, nextContext: any): void {\r\n if (\r\n this.props.data.cart.result?.cart.CartLines?.length !==\r\n this.state.atpOrderShipDateArr?.ATPLeadTimePropertiesQuantityResponseEntityList?.length\r\n ) {\r\n void this._atpShipDate();\r\n }\r\n }\r\n\r\n private _getCartLinesAtpDetails = async (cartLines: any[] | undefined) => {\r\n const KRVATPLeadTimeDate: any[] = [];\r\n const cartlinesAtpRes: any[] = [];\r\n\r\n //Create date according to API\r\n const objectDate = new Date();\r\n const day = objectDate.getDate();\r\n const month = objectDate.getMonth();\r\n const year = objectDate.getFullYear();\r\n const requestedDate = `${day}/${month + 1}/${year}`;\r\n\r\n if (cartLines!.length > 0) {\r\n cartLines?.map((e: any) => {\r\n KRVATPLeadTimeDate.push({\r\n itemID: e.ItemId,\r\n requestedDate: requestedDate\r\n });\r\n });\r\n }\r\n const ctx = { callerContext: this.props.context.actionContext };\r\n try {\r\n if (KRVATPLeadTimeDate.length === 0) {\r\n return;\r\n } else {\r\n const response = await kRV_GetMultipleATPLeadTimeDateAsync(ctx, KRVATPLeadTimeDate);\r\n response?.ATPTrafficLights?.map((item: any) => {\r\n const atpMsgRes = item?.JsonResponseObject;\r\n const atpMsgResParsed = atpMsgRes && JSON.parse(atpMsgRes);\r\n cartlinesAtpRes.push(atpMsgResParsed);\r\n });\r\n return cartlinesAtpRes;\r\n }\r\n } catch (err) {\r\n console.error(err, 'ERR');\r\n }\r\n return null;\r\n };\r\n\r\n private validateCartLinesWithAtp = async (): Promise => {\r\n const atpCartlineResults: any[] = [];\r\n const cartLines = this.props.data.cart.result?.cart.CartLines;\r\n const atpReserves = cartLines?.length! > 0 && (await this._getCartLinesAtpDetails(cartLines));\r\n for (let i = 0; i < cartLines?.length!; i++) {\r\n const cartLine = cartLines![i];\r\n const atpReserve = atpReserves![i];\r\n if (\r\n atpReserve?.StatusCode === '500' ||\r\n atpReserve?.StatusCode === '501' ||\r\n atpReserve?.StatusCode === '502' ||\r\n atpReserve?.StatusCode === '503' ||\r\n atpReserve?.StatusCode === '205'\r\n ) {\r\n atpCartlineResults.push({\r\n ItemId: cartLine?.ItemId,\r\n Quantity: cartLine?.Quantity,\r\n ErrorMessage: this.props.resources.atpQuantityErrorMsg5xx\r\n });\r\n } else if (cartLine?.Quantity! > atpReserve?.Quantity!) {\r\n if (\r\n atpReserve?.StatusCode === '200' ||\r\n atpReserve?.StatusCode === '201' ||\r\n atpReserve?.StatusCode === '202' ||\r\n atpReserve?.StatusCode === '203'\r\n ) {\r\n atpCartlineResults.push({\r\n ItemId: cartLine?.ItemId,\r\n Quantity: cartLine?.Quantity,\r\n ErrorMessage: ''\r\n });\r\n } else if (atpReserve.StatusCode === '204') {\r\n atpCartlineResults.push({\r\n ItemId: cartLine?.ItemId,\r\n Quantity: cartLine?.Quantity,\r\n ErrorMessage: this.props.resources.atpQuantityErrorMsg204.replace('{x}', atpReserve.Quantity!)\r\n });\r\n } else {\r\n atpCartlineResults.push({\r\n ItemId: cartLine?.ItemId,\r\n Quantity: cartLine?.Quantity,\r\n ErrorMessage: atpReserve.Message\r\n });\r\n }\r\n }\r\n }\r\n this.setState({ atpCartlineResults: atpCartlineResults });\r\n };\r\n\r\n private validateWithAtpAndCheckout = async (checkoutURL: string): Promise => {\r\n this.setState({\r\n isCheckoutBtnLoading: true\r\n });\r\n let hasAtpQuantityError = false;\r\n const cartLines = this.props.data.cart.result?.cart.CartLines;\r\n const atpReserves = cartLines?.length! > 0 && (await this._getCartLinesAtpDetails(cartLines));\r\n void this.validateCartLinesWithAtp();\r\n for (let i = 0; i < cartLines?.length!; i++) {\r\n const cartLine = cartLines![i];\r\n const atpReserve = atpReserves![i];\r\n if (\r\n atpReserve?.StatusCode === '500' ||\r\n atpReserve?.StatusCode === '501' ||\r\n atpReserve?.StatusCode === '502' ||\r\n atpReserve?.StatusCode === '503' ||\r\n atpReserve?.StatusCode === '205'\r\n ) {\r\n hasAtpQuantityError = true;\r\n break;\r\n } else if (cartLine?.Quantity! > atpReserve?.Quantity!) {\r\n if (\r\n atpReserve?.StatusCode === '200' ||\r\n atpReserve?.StatusCode === '201' ||\r\n atpReserve?.StatusCode === '202' ||\r\n atpReserve?.StatusCode === '203'\r\n ) {\r\n hasAtpQuantityError = false;\r\n } else if (atpReserve.StatusCode === '204') {\r\n hasAtpQuantityError = true;\r\n break;\r\n } else {\r\n hasAtpQuantityError = true;\r\n break;\r\n }\r\n }\r\n }\r\n void this._atpShipDate();\r\n if (hasAtpQuantityError) {\r\n this.setState({ showAtpStockAlert: true }, () => {\r\n setTimeout(() => {\r\n this.setState({ showAtpStockAlert: false, isCheckoutBtnLoading: false });\r\n }, 3000);\r\n });\r\n } else {\r\n await this.updateAttr(checkoutURL);\r\n }\r\n };\r\n\r\n private readonly updateAttr = async (checkoutURL: string): Promise => {\r\n this.setState({\r\n orderShipdate: this.state.atpOrderShipDateArr?.HighestDate\r\n });\r\n const {\r\n data: {\r\n cart: { result: cart }\r\n }\r\n } = this.props;\r\n\r\n let currentAttributes: AttributeValueBase[] = cart?.attributeValues || [];\r\n\r\n const requestdeliverydateAttribute = this.props.context.app.config.requestdeliverydateAttribute || 'Request a delivery date';\r\n const lineIdRequestdeliverydateAttr = setNameAttribute(requestdeliverydateAttribute, this.state.RequestedDeliveryDate);\r\n\r\n currentAttributes = await findAttribute(currentAttributes, lineIdRequestdeliverydateAttr);\r\n\r\n //VSI CUSTOMIZATION TO SET ATTR\r\n const orderShippingdateAttribute = this.props.context.app.config.orderShippingdateAttribute || 'Estimated ship date';\r\n const formattedDate = convertDateFormatToMMDDYYY(this.state.orderShipdate) ?? this.state.orderShipdate;\r\n const lineIdOrderShippingdateAttr = setNameAttribute(orderShippingdateAttribute, formattedDate);\r\n currentAttributes = await findAttribute(currentAttributes, lineIdOrderShippingdateAttr);\r\n\r\n await cart\r\n ?.updateAttributeValues({\r\n newAttributeValues: currentAttributes\r\n })\r\n .then(async res => {\r\n if (res.status === 'SUCCESS') {\r\n await this.props.data.cart?.result?.refreshCart({});\r\n window.location.replace(checkoutURL);\r\n }\r\n })\r\n .catch(e => {\r\n window.location.replace(checkoutURL);\r\n });\r\n };\r\n\r\n // ************ VSI CUSTOMIZATION TO START ATP ORDER SHIP AND REQUEST DATE ************//\r\n private requestDateComponent = (): React.ReactNode => {\r\n // Sort in Decending order (High to Low)\r\n const newSplitDateArr = this.state.atpOrderShipDateArr?.HighestDate?.toString()?.split('/');\r\n let minDate = '';\r\n if (newSplitDateArr && newSplitDateArr?.length) {\r\n minDate = `${newSplitDateArr[2]}-${newSplitDateArr[1]}-${newSplitDateArr[0]}`;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n const requestDeliveryDateMin = getDateWithOnePlus(minDate!);\r\n // eslint-disable-next-line react/no-direct-mutation-state\r\n this.state.orderShipdate = this.state.atpOrderShipDateArr?.HighestDate;\r\n // this.setState({\r\n // orderShipdate: this.state.atpOrderShipDateArr?.HighestDate\r\n // });\r\n registerLocale('enGb', enGb);\r\n\r\n const dateObjects = this.state.calenderdDaysOff?.map(dateString => new Date(dateString));\r\n let atpOrderShipDateArrDisplayByLocale = this.state.atpOrderShipDateArr?.HighestDate;\r\n if (\r\n atpOrderShipDateArrDisplayByLocale &&\r\n this.props.context.app.config.dateFormat &&\r\n this.props.context.request.channel?.Currency\r\n ) {\r\n atpOrderShipDateArrDisplayByLocale = dateFormatByLocale(\r\n this.props.context.app.config.dateFormat,\r\n this.props.context.request.channel?.Currency,\r\n atpOrderShipDateArrDisplayByLocale\r\n );\r\n }\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n {\r\n this.setState({ startDate: date, RequestedDeliveryDate: date });\r\n }}\r\n minDate={requestDeliveryDateMin ? new Date(requestDeliveryDateMin) : new Date()}\r\n placeholderText={`${this.props.context.app.config.dateFormat === 'en-US' ? 'MM-DD-YYYY' : 'DD-MM-YYYY'}`}\r\n locale={`${this.props.context.app.config.dateFormat === 'en-US' ? 'enUS' : 'enAU'}`}\r\n showTimeSelect={false}\r\n excludeDates={dateObjects}\r\n calendarStartDay={1}\r\n dateFormat={`${this.props.context.app.config.dateFormat === 'en-US' ? 'MM/dd/yyyy' : 'dd/MM/yyyy'}`}\r\n />\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n // Function to get response of API and set response of ATP Ship Date Response\r\n private _atpShipDate = async () => {\r\n const KRVATPLeadTimeQuantity: any = [];\r\n\r\n if (this.props.data.cart.result?.cart.CartLines?.length! > 0) {\r\n for (let i = 0; i < this.props.data?.products?.result?.length!; i++) {\r\n if (this.props.data?.products?.result?.[i].Components?.length! > 0) {\r\n this.props.data?.products?.result?.[i].Components?.map((e: any) => {\r\n KRVATPLeadTimeQuantity.push({\r\n itemID: e.ItemId,\r\n Qty: e.Quantity * this.props.data.cart.result?.cart.CartLines?.[i].Quantity!\r\n });\r\n });\r\n } else {\r\n this.props.data.cart.result?.cart.CartLines?.map((e: any) => {\r\n KRVATPLeadTimeQuantity.push({\r\n itemID: e.ItemId,\r\n Qty: e.Quantity\r\n });\r\n });\r\n }\r\n }\r\n }\r\n const context1 = { callerContext: this.props.context.actionContext };\r\n await kRV_GetATPLeadTimeWithQuantityAsync(context1, KRVATPLeadTimeQuantity)\r\n .then((res: any) => {\r\n this.setState({\r\n atpOrderShipDateArr: res,\r\n orderShipdate: res?.HighestDate ?? ''\r\n });\r\n })\r\n .catch(err => {\r\n console.error(err, 'ERR');\r\n });\r\n };\r\n // Function to get calender days off Response\r\n private _calenderDaysOff = async () => {\r\n //const today = new Date().toISOString().split('T')[0];\r\n const context1 = { callerContext: this.props.context.actionContext };\r\n await fetchAsync(context1, '')\r\n .then((res: any) => {\r\n this.setState({\r\n calenderdDaysOff: res\r\n });\r\n })\r\n .catch(err => {\r\n console.error(err, 'ERR');\r\n });\r\n };\r\n // ************ VSI CUSTOMIZATION END TO ATP ORDER SHIP AND REQUEST DATE ************ //\r\n\r\n /**\r\n * Component will unmount function.\r\n */\r\n public componentWillUnmount(): void {\r\n this._isMounted = false;\r\n }\r\n\r\n /**\r\n * Should component update function.\r\n * @param nextProps - Next props.\r\n * @param nextState - Next state.\r\n * @returns True if component should update, false otherwise.\r\n */\r\n public shouldComponentUpdate(nextProps: IKrannichCCartProps, nextState: ICartComponentState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /* eslint-disable complexity -- Disabling complexity for render method */\r\n public render(): JSX.Element | null {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n products: { result: products }\r\n },\r\n context: {\r\n request: {\r\n user: { isAuthenticated, signInUrl }\r\n }\r\n },\r\n resources\r\n } = this.props;\r\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\r\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\r\n const checkoutURL = this.getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\r\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\r\n const cartLines = this._getCartLines();\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n const validInventoryAcrossCartLines = validateCartLinesInventory(\r\n cart?.cart.CartLines ?? [],\r\n this.props.data.productAvailabilites.result ?? [],\r\n this.props.context.actionContext,\r\n products ?? [],\r\n emailDeliveryModeCode\r\n );\r\n\r\n const hasError =\r\n !validInventoryAcrossCartLines?.isValid ||\r\n (!validInventoryAcrossCartLines && !this.state.isCartValid) ||\r\n (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\r\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\r\n );\r\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\r\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\r\n const { featureState } = this.props.data;\r\n const isMultipleCatalogsFeatureEnabled =\r\n featureState.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled || false;\r\n const currentCatalogId = getCatalogId(this.props.context.request);\r\n validateCatalogId(currentCatalogId);\r\n const cartLinesGroup = cart?.hasInvoiceLine || multiplePickUpEnabled ? this.getCartLinesGroup() : null;\r\n this.payLoad.contentAction.etext = TelemetryConstant.Checkout;\r\n const checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.GuestCheckout;\r\n const checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.BackToShopping;\r\n const backtoShoppingAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n\r\n // If there's inventory issues across multiple cart lines then update the error and display as part of the order summary\r\n if (validInventoryAcrossCartLines && !validInventoryAcrossCartLines.isValid) {\r\n if (multiplePickUpEnabled && cartLinesGroup !== null) {\r\n for (const cartLineGroup of cartLinesGroup) {\r\n this._updateCartLineErrorForInvalidInventory(cartLineGroup, validInventoryAcrossCartLines);\r\n }\r\n }\r\n\r\n this._updateCartLineErrorForInvalidInventory(cartLines, validInventoryAcrossCartLines);\r\n }\r\n let noProductsWithZeroPriceCheck = false;\r\n if (cartLines) {\r\n cartLines.map(cartLine => {\r\n const unitPrice = cartLine.data?.cartline.ExtendedPrice\r\n ? cartLine.data?.cartline.ExtendedPrice / cartLine.data?.cartline.Quantity!\r\n : cartLine.data?.cartline.Price;\r\n if (unitPrice === 0) {\r\n noProductsWithZeroPriceCheck = true;\r\n }\r\n });\r\n }\r\n const viewProps = {\r\n ...this.props,\r\n className: classnames('ms-cart'),\r\n title:

{resources.cartTitle}

,\r\n cart: this.props.data.cart.result,\r\n CartlinesWrapper: { className: 'msc-cartline-wraper' },\r\n OrderSummaryWrapper: { className: cart?.hasInvoiceLine ? 'msc-invoice-summary-wrapper' : 'msc-order-summary-wrapper' },\r\n OrderSummaryItems: { className: cart?.hasInvoiceLine ? 'msc-invoice-summary__items' : 'msc-order-summary__items' },\r\n cartlines: cartLines,\r\n cartLinesGroup,\r\n promoCode: this._getPromoCode(),\r\n promotionOptions: this._getPromotions(),\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n telemetry: this.props.telemetry,\r\n id: this.props.id,\r\n multiplePickUpEnabled,\r\n removePromoAriaLabelFormat: resources.removePromoAriaLabelFormat,\r\n orderSummaryHeading: ArrayExtensions.hasElements(cart?.cart.CartLines) ? (\r\n cart?.hasInvoiceLine ? (\r\n

{resources.invoiceSummaryTitle}

\r\n ) : (\r\n

{resources.orderSummaryTitle}

\r\n )\r\n ) : null,\r\n orderSummaryLineitems: this._getOrderSummaryLineItems(),\r\n invoiceSummaryLineitems: this._getInvoiceSummaryLineItems(),\r\n checkoutAsSignInUserButton: !isCartEmpty ? (\r\n this.validateWithAtpAndCheckout(checkoutURL)}\r\n {...checkoutBySignInAttributes}\r\n >\r\n {resources.checkoutButtonTitle}\r\n \r\n ) : null,\r\n checkoutAsGuestButton:\r\n !isCartEmpty && !isAuthenticated && this.props.config.showGuestCheckoutButton ? (\r\n \r\n {resources.guestCheckoutButtonTitle}\r\n \r\n ) : null,\r\n expressCheckoutButton: !isCartEmpty ? this.props.slots.paymentExpress : null,\r\n ExpressCheckoutSectionWrapper: { className: 'msc-express-payment-container-in-cart-page' },\r\n backToShoppingButton: (\r\n \r\n {resources.backToShoppingButtonTitle}\r\n \r\n ),\r\n createTemplateFromCartButton:\r\n this._displayAddCartToTemplate() && products ? (\r\n \r\n ) : null,\r\n checkoutBlockedDueToUnavailableFunds: null,\r\n storeSelector:\r\n this.props.slots.storeSelector && this.props.slots.storeSelector.length > 0 ? this.props.slots.storeSelector[0] : null,\r\n removeItemClickHandler: this.removeItemFromCartHandler,\r\n moveToWishlistSuccessHandler: this.moveToWishlistSuccessHandler,\r\n waitingComponent: ,\r\n cartLoadingStatus: this.props.data.cart.status === 'FAILED' ? this.props.resources.cartLoadingErrorMessage : null,\r\n cartDataResult: this.props.data.cart.result && this.props.data.cart.result.isEmpty,\r\n OrderSummaryErrors: this._getOrderSummaryErrors(cartLines),\r\n telemetryContent: this.telemetryContent,\r\n requestDate: this.requestDateComponent(),\r\n isCheckoutBtnLoading: this.state.isCheckoutBtnLoading,\r\n shipDate: this.state.atpOrderShipDateArr, //VSI CUSTOMIZATION ATP\r\n showAtpStockAlert: this.state.showAtpStockAlert,\r\n atpCartlineResults: this.state.atpCartlineResults\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n /* eslint-enable complexity -- Disabling complexity for render method */\r\n\r\n /**\r\n * Promotion click event handler.\r\n * @param event - The mouse event.\r\n */\r\n private readonly promotionLinkClick = (event: React.MouseEvent) => {\r\n this.setState({\r\n showPromotionDialog: !this.state.showPromotionDialog\r\n });\r\n };\r\n\r\n /**\r\n * Promotion close button click.\r\n */\r\n private readonly promotionCloseButtonclick = () => {\r\n this._hidePromotionDialog();\r\n };\r\n\r\n /**\r\n * Hide promotion dialog.\r\n */\r\n private _hidePromotionDialog(): void {\r\n this.setState({\r\n showPromotionDialog: false\r\n });\r\n }\r\n\r\n /**\r\n * Display add to cart template.\r\n * @returns True if should display, false otherwise.\r\n */\r\n private _displayAddCartToTemplate(): boolean {\r\n const cart = this.props.data.cart?.result;\r\n if (ObjectExtensions.isNullOrUndefined(cart) || cart.hasInvoiceLine) {\r\n return false;\r\n }\r\n\r\n if (\r\n isChannelTypeB2B(this.props.context.actionContext.requestContext) &&\r\n this.props.data.orderTemplates.result &&\r\n ArrayExtensions.hasElements(cart.cart?.CartLines) &&\r\n this.props.data.customerInformation.result\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Get promotions.\r\n * @returns React node with the promotions.\r\n */\r\n private _getPromotions(): React.ReactNode {\r\n return (\r\n this.props.config.showAvailablePromotions &&\r\n cartPromotions({\r\n id: this.promotionPopupId,\r\n showPromotionPopup: this.state.showPromotionDialog,\r\n onSeeAllClick: this.promotionLinkClick,\r\n onCloseButtonClick: this.promotionCloseButtonclick,\r\n promotions: this.state.promotionData.promotionOptions,\r\n resources: {\r\n promotionStringHeading: this.props.resources.promotionStringHeading,\r\n promotionLinkText: this.props.resources.promotionLinkText,\r\n promotionPopupHeading: this.props.resources.promotionPopupHeading,\r\n promotionCloseButtonAriaLabel: this.props.resources.promotionCloseButtonAriaLabel\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Add error message in cart line in case the quantity exceeds the current inventory.\r\n * @param cartLines - The cart lines.\r\n * @param cartLineInventoryValidationResult - The cart line inventory result.\r\n */\r\n private _updateCartLineErrorForInvalidInventory(\r\n cartLines: ICartlinesViewProps[] | null,\r\n cartLineInventoryValidationResult: ICartLineInventoryValidationResult\r\n ) {\r\n const { resources } = this.props;\r\n\r\n if (\r\n ArrayExtensions.hasElements(cartLines) &&\r\n !cartLineInventoryValidationResult.isValid &&\r\n ArrayExtensions.hasElements(cartLineInventoryValidationResult.productIdWithErrors)\r\n ) {\r\n for (const productIdWithError of cartLineInventoryValidationResult.productIdWithErrors) {\r\n const cartLine = cartLines?.find(element => element.data?.cartline.ProductId === productIdWithError);\r\n if (cartLine) {\r\n cartLine.error = resources.outOfStockErrorMessage;\r\n cartLine.hasError = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Get order summary errors.\r\n * @param cartLines - The cart lines.\r\n * @returns Order summary errors.\r\n */\r\n private _getOrderSummaryErrors(cartLines: ICartlinesViewProps[] | null): IOrderSummaryErrors | undefined {\r\n const allErrors =\r\n (cartLines &&\r\n cartLines\r\n .map(cartline => {\r\n // Check if the product is service or not by product type\r\n const isServiceItem = cartline.data?.product?.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n if (!isServiceItem && cartline.error) {\r\n const fullError =\r\n cartline.data && cartline.data.product?.Name\r\n ? `${cartline.data.product.Name}: ${cartline.error}`\r\n : cartline.error;\r\n\r\n return (\r\n
\r\n {fullError}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n })\r\n .filter((line): line is JSX.Element => !!line)) ||\r\n [];\r\n\r\n return {\r\n Wrapper: {\r\n tag: Alert,\r\n className: 'msc-alert',\r\n isOpen: allErrors.length > 0,\r\n color: 'danger',\r\n assertive: true,\r\n 'aria-label': this.props.resources.outOfStockErrorMessageHeader\r\n },\r\n header: (\r\n \r\n ),\r\n errors: allErrors\r\n };\r\n }\r\n\r\n /**\r\n * Gets invoice summary line items.\r\n * @returns Invoice summary lines.\r\n */\r\n private _getInvoiceSummaryLineItems(): IInvoiceSummaryLines | undefined {\r\n const {\r\n data: {\r\n cart: { result: cart }\r\n },\r\n telemetry,\r\n resources\r\n } = this.props;\r\n\r\n return cart?.hasInvoiceLine\r\n ? InvoiceSummary({\r\n orderTotalLabel: resources.totalAmountLabel,\r\n invoiceLabel: resources.invoiceLabel,\r\n cart: cart.cart,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n telemetry,\r\n id: this.props.id\r\n })\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Gets order summary line items.\r\n * @returns Order summary lines.\r\n */\r\n private _getOrderSummaryLineItems(): IOrderSummaryLines | undefined {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n channelDeliveryOptionConfig\r\n },\r\n telemetry,\r\n resources\r\n } = this.props;\r\n\r\n const channelConfiguration = this.props.context && this.props.context.request && this.props.context.request.channel;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const featureState = this.props?.data?.featureState;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\r\n const isShowOrHideTaxEnabled = this.props.context.request.app.config?.isEnableShowOrHideSalesTaxECommerceEnabled === true;\r\n const customerTaxPercentage = taxPercentage(this.props.data.customerInformation?.result!);\r\n return channelConfiguration && ArrayExtensions.hasElements(cart?.cart.CartLines) && !cart?.hasInvoiceLine\r\n ? OrderSummary({\r\n cart: cart!.cart,\r\n subTotalLabel: resources.itemsWithCountLabel,\r\n shippingLabel: resources.estimatedShippingLabel,\r\n otherChargeLabel: resources.otherCharges,\r\n taxLabel: resources.estimatedTaxLabel,\r\n orderTotalLabel: resources.orderTotal,\r\n totalDiscountsLabel: resources.totalDiscountsLabel,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n toBeCalculatedText: resources.yetToBeCalculatedText,\r\n freeText: resources.priceFree,\r\n channelConfiguration,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\r\n telemetry,\r\n isTaxIncludedInPrice: cart!.cart.IsTaxIncludedInPrice,\r\n isShowTaxBreakup: isShowOrHideTaxEnabled,\r\n freightMsg: this.props.config.freightMsg,\r\n customerTaxPercentage: customerTaxPercentage\r\n })\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Gets promo code.\r\n * @returns React node with the promo code.\r\n */\r\n private _getPromoCode(): React.ReactNode {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n customerInformation: { result: customerInformation }\r\n },\r\n resources\r\n } = this.props;\r\n\r\n return (\r\n cart && (\r\n \r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Generate add to order template dialog resources.\r\n * @param resources - The resources.\r\n * @returns IAddToOrderTemplateDialogResources.\r\n */\r\n private _generateAddToOrderTemplateDialogResources(resources: IKrannichCCartResources): IAddToOrderTemplateDialogResources {\r\n return {\r\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\r\n\r\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\r\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\r\n\r\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\r\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\r\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\r\n\r\n selectTemplatesText: resources.selectTemplatesText,\r\n addToTemplateButtonText: resources.addToTemplateButtonText,\r\n lineItemsText: resources.lineItemsText\r\n };\r\n }\r\n\r\n /**\r\n * Generate item added to order template dialog resources.\r\n * @param resources - The resources.\r\n * @returns IItemAddedToOrderTemplateDialogResources.\r\n */\r\n private _generateItemAddedToOrderTemplateDialogResources(resources: IKrannichCCartResources): IItemAddedToOrderTemplateDialogResources {\r\n return {\r\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\r\n continueShoppingButtonText: resources.continueShoppingButtonText,\r\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\r\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\r\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\r\n freePriceText: resources.freePriceText,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText\r\n };\r\n }\r\n\r\n /**\r\n * Generate lines added to order template dialog resources.\r\n * @param resources - The resources.\r\n * @returns ILinesAddedToOrderTemplateDialogResources.\r\n */\r\n private _generateLinesAddedToOrderTemplateDialogResources(\r\n resources: IKrannichCCartResources\r\n ): ILinesAddedToOrderTemplateDialogResources {\r\n return {\r\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\r\n continueShoppingButtonText: resources.continueShoppingButtonText,\r\n linesAddedToOrderTemplateHeaderItemsOneText: resources.linesAddedToOrderTemplateHeaderItemsOneText,\r\n linesAddedToOrderTemplateHeaderItemsFormatText: resources.linesAddedToOrderTemplateHeaderItemsFormatText,\r\n linesAddedToOrderTemplateHeaderLinesOneText: resources.linesAddedToOrderTemplateHeaderLinesOneText,\r\n linesAddedToOrderTemplateHeaderLinesFormatText: resources.linesAddedToOrderTemplateHeaderLinesFormatText,\r\n linesAddedToOrderTemplateHeaderMessageText: resources.linesAddedToOrderTemplateHeaderMessageText,\r\n linesAddedToOrderTemplateCustomPriceAlertMessageText: resources.linesAddedToOrderTemplateCustomPriceAlertMessageText\r\n };\r\n }\r\n\r\n /**\r\n * Generate duplicate items when adding to order template dialog resources.\r\n * @param resources - The resources.\r\n * @returns IDuplicateItemsWhenAddingToOrderTemplateDialogResources.\r\n */\r\n private _generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\r\n resources: IKrannichCCartResources\r\n ): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\r\n return {\r\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\r\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\r\n updateQuantityButtonText: resources.updateQuantityButtonText,\r\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\r\n };\r\n }\r\n\r\n /**\r\n * Generate order template name dialog resources.\r\n * @param resources - The resources.\r\n * @returns IOrderTemplateNameDialogResources.\r\n */\r\n private _generateOrderTemplateNameDialogResources(resources: IKrannichCCartResources): IOrderTemplateNameDialogResources {\r\n return {\r\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\r\n orderTemplateTitleLabel: resources.orderTemplateTitle,\r\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\r\n orderTemplateDescription: resources.createOrderTemplateDescription,\r\n\r\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\r\n\r\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\r\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\r\n };\r\n }\r\n\r\n /**\r\n * Gets the cart lines view props.\r\n * @returns ICartlinesViewProps [].\r\n */\r\n private _getCartLines(): ICartlinesViewProps[] | null {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n wishlists: { result: wishlists },\r\n orderTemplates: { result: orderTemplates },\r\n customerInformation: { result: customerInformation }\r\n },\r\n context: {\r\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\r\n },\r\n config,\r\n telemetry,\r\n resources,\r\n modules\r\n } = this.props;\r\n\r\n const imageSettings = this.getImageSettings(config.imageSettings);\r\n\r\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\r\n );\r\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\r\n\r\n const cartlinesErrors: CartLineValidationResultsByLineId = this.state.cartlinesErrors;\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\r\n const isMultipleCatalogsFeatureEnabled =\r\n this.props.data.featureState.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled ||\r\n false;\r\n return ArrayExtensions.hasElements(cart?.cart?.CartLines)\r\n ? CartLineItems({\r\n cartlines: cart!.cart?.CartLines,\r\n storeSelectorModuleId: storeSelectorId,\r\n cartlinesErrors,\r\n products: this.props.data.products.result,\r\n productAvailabilites: this.props.data.productAvailabilites.result,\r\n productDeliveryOptions: this.props.data.deliveryOptions.result,\r\n productsAttributes: this.state.productsAttributes || [],\r\n catalogs: this.props.data.catalogs?.result,\r\n imageSettings,\r\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\r\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\r\n shouldIgnoreWarehouse: this.props.context.app.config.warehouseAggregation === 'multiple',\r\n gridSettings: this.props.context.request.gridSettings!,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n retailMulitplePickupFeatureState: multiplePickUpEnabled,\r\n resources: {\r\n sizeString: resources.productDimensionTypeSize,\r\n colorString: resources.productDimensionTypeColor,\r\n configString: resources.productDimensionTypeConfiguration,\r\n styleString: resources.productDimensionTypeStyle,\r\n amountString: resources.productDimensionTypeAmount,\r\n quantityDisplayString: resources.quantityDisplayText,\r\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\r\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\r\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\r\n discountStringText: resources.discountStringText,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n shippingChargesText: resources.shippingCharges,\r\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\r\n priceEditorResources: {\r\n ...resources\r\n }\r\n },\r\n telemetry,\r\n addToWishlistButtonText: resources.addToWishlistButtonText,\r\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\r\n removeButtonText: resources.removeCartButtonText,\r\n shipItText: resources.shipInsteadDisplayText,\r\n pickitUpText: resources.pickItUpDisplayText,\r\n changeStoreText: resources.changeStoreDisplayText,\r\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\r\n outOfStockText: resources.outOfStockErrorMessage,\r\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\r\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\r\n cartState: this.props.data.cart.result,\r\n orgUnitLocations: this.props.data.orgUnitLocations.result,\r\n removeItemClickHandler: this.removeItemFromCartHandler,\r\n moveToWishlistSuccessHandler: this.moveToWishlistSuccessHandler,\r\n updateCartLinesQuantitySuccessHandler: this.updateCartlineQuantity,\r\n locationChangedHandler: this.fulfillmentStoreIdUpdated,\r\n wishlists,\r\n defaultWishlistName: resources.defaultWishlistName,\r\n pickupDeliveryModeCode: PickupDeliveryModeCode,\r\n includeErrors: config.showOutOfStockErrors,\r\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\r\n telemetryContent: this.telemetryContent,\r\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\r\n\r\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\r\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\r\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\r\n resources\r\n ),\r\n\r\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip,\r\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\r\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\r\n orderTemplates,\r\n customerInformation,\r\n productAvailability: this.props.data.productAvailabilites,\r\n isMultipleCatalogFeatureEnabledInHq: isMultipleCatalogsFeatureEnabled || false\r\n })\r\n : null;\r\n }\r\n\r\n /**\r\n * Gets the checkout URL.\r\n * @param isAuthenticated - Is authenticated flag.\r\n * @param guestCheckoutUrl - Guest checkout URL.\r\n * @param signInUrl -The sign in URL.\r\n * @returns The checkout URL.\r\n */\r\n private getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\r\n if (isAuthenticated) {\r\n return guestCheckoutUrl;\r\n }\r\n\r\n const isAbsoluteUrl = urlCheck(guestCheckoutUrl);\r\n let returnURL = guestCheckoutUrl;\r\n if (MsDyn365.isBrowser && !isAbsoluteUrl) {\r\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\r\n }\r\n\r\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\r\n }\r\n\r\n /**\r\n * Gets the image settings.\r\n * @param imageSettings - Image settings.\r\n * @returns IImageSettings.\r\n */\r\n private readonly getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\r\n return (\r\n imageSettings || {\r\n viewports: {\r\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\r\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n }\r\n );\r\n };\r\n\r\n /**\r\n * Remove item from krannich-c-cart handler.\r\n * @param cartlineToRemove - The cart line to remove.\r\n */\r\n private readonly removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\r\n if (this.props.data.cart.result) {\r\n const input = {\r\n cartLineIds: [cartlineToRemove.LineId!.toString()]\r\n };\r\n this.props.data.cart.result\r\n .removeCartLines(input)\r\n .then(() => {\r\n this.validateCart().catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n });\r\n void this._atpShipDate();\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to Remove Cart Line');\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Move to wish list handler.\r\n * @param result - The wish list action success result.\r\n * @param cartline - The cart line.\r\n */\r\n private readonly moveToWishlistSuccessHandler = (result: IWishlistActionSuccessResult, cartline?: CartLine) => {\r\n if (result.status === 'ADDED' && cartline) {\r\n this.removeItemFromCartHandler(cartline);\r\n }\r\n };\r\n\r\n /**\r\n * Updates the cart line quantity.\r\n * @param cartlineToUpdate - The cart line.\r\n * @param quantity - The quantity.\r\n * @param lineIndex - The line index.\r\n * @returns True if the cart line was updated, false otherwise.\r\n */\r\n private readonly updateCartlineQuantity = (cartlineToUpdate: CartLine, quantity: number, lineIndex?: number): boolean => {\r\n this.setState({\r\n isCheckoutBtnLoading: true\r\n });\r\n cartLineQuantityUpdatedAsync(\r\n this.isQuantityLimitsFeatureEnabled,\r\n this.props.data.cart.result,\r\n this.props.telemetry,\r\n this.props.data.products.result,\r\n cartlineToUpdate,\r\n quantity\r\n )\r\n .then((cartActionResult: ICartActionResult | undefined): boolean => {\r\n if (cartActionResult?.status === 'SUCCESS') {\r\n void this._atpShipDate();\r\n void this.validateCartLinesWithAtp();\r\n this.validateCart().catch(error => {\r\n this.props.telemetry.warning((error as Error).message);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n });\r\n setTimeout(() => {\r\n this.setState({\r\n isCheckoutBtnLoading: false\r\n });\r\n }, 700);\r\n\r\n return true;\r\n }\r\n\r\n if (!ObjectExtensions.isNullOrUndefined(cartActionResult)) {\r\n // Show update line error message.\r\n const lineUpdateFailure: LineValidationResult = {\r\n LineId: ObjectExtensions.isNullOrUndefined(cartlineToUpdate.LineId) ? '0' : cartlineToUpdate.LineId,\r\n ValidationFailures: [\r\n {\r\n ErrorContext: ArrayExtensions.hasElements(cartActionResult.validationResults)\r\n ? cartActionResult.validationResults[0].ErrorContext\r\n : '',\r\n LocalizedMessage: cartActionResult.errorDetails?.LocalizedMessage\r\n }\r\n ]\r\n };\r\n\r\n this.setState({\r\n cartlinesErrors: { ValidationResultsPairs: [lineUpdateFailure] }\r\n });\r\n setTimeout(() => {\r\n this.setState({\r\n isCheckoutBtnLoading: false\r\n });\r\n }, 700);\r\n }\r\n\r\n return false;\r\n })\r\n .catch(() => {\r\n setTimeout(() => {\r\n this.setState({\r\n isCheckoutBtnLoading: false\r\n });\r\n }, 700);\r\n return false;\r\n });\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Fulfillment store id is updated.\r\n */\r\n private readonly fulfillmentStoreIdUpdated = () => {\r\n if (this.isQuantityLimitsFeatureEnabled) {\r\n // Refresh products (in props.data) based on latest cart.\r\n getActiveCartProductsAction(new ActiveCartProductsInput(), this.props.context.actionContext)\r\n .then(async () => this.validateCart())\r\n .catch((error: Error) => {\r\n this.props.telemetry.warning(error.message);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Validates cart.\r\n * @returns Void promise.\r\n */\r\n private async validateCart(): Promise {\r\n if (!this.isQuantityLimitsFeatureEnabled) {\r\n this.setState({ isCartValid: true });\r\n return AsyncResult.resolve();\r\n }\r\n\r\n const {\r\n data: { cart },\r\n telemetry,\r\n context\r\n } = this.props;\r\n\r\n const validationResults: CartLineValidationResultsByLineId | undefined = await validateCartAsync(cart, telemetry, context, true);\r\n\r\n if (validationResults) {\r\n const isValid = !ArrayExtensions.hasElements(validationResults.ValidationResultsPairs);\r\n this.setState({\r\n cartlinesErrors: validationResults,\r\n isCartValid: isValid\r\n });\r\n } else {\r\n this.setState({ isCartValid: true });\r\n }\r\n\r\n return AsyncResult.resolve();\r\n }\r\n\r\n /**\r\n * Get order quantity limit feature flag.\r\n * @returns True if flag is enabled, false otherwise.\r\n */\r\n private async getOrderQuantityLimitsFeatureFlag(): Promise {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n try {\r\n const featureStatuses = await this.props.data.featureState;\r\n const isQuantityLimitsFeatureEnabledInHq =\r\n featureStatuses.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n if (!isQuantityLimitsFeatureEnabledInHq) {\r\n return false;\r\n }\r\n } catch (error) {\r\n this.props.telemetry.warning('error');\r\n this.props.telemetry.debug('Unable to get feature states');\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n try {\r\n const customerInfo = await this.props.data.customerInformation;\r\n return (\r\n !!customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n } catch (error) {\r\n this.props.telemetry.warning('error');\r\n this.props.telemetry.debug('Unable to get customer info');\r\n return false;\r\n }\r\n }\r\n\r\n private async _isChannelLimitsFeatureEnabled(): Promise {\r\n const featureStatuses = await this.props.data.featureState;\r\n\r\n const isChannelLimitsFeatureEnabledInHq = featureStatuses?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\r\n )?.IsEnabled;\r\n\r\n return isChannelLimitsFeatureEnabledInHq ?? false;\r\n }\r\n\r\n /**\r\n * Gets the cart lines group.\r\n * @returns ICartlinesViewProps [][].\r\n */\r\n private getCartLinesGroup(): ICartlinesViewProps[][] | null {\r\n const {\r\n data: {\r\n cart: { result: cart },\r\n wishlists: { result: wishlists },\r\n orderTemplates: { result: orderTemplates },\r\n customerInformation: { result: customerInformation }\r\n },\r\n context: {\r\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\r\n },\r\n config,\r\n telemetry,\r\n resources,\r\n modules\r\n } = this.props;\r\n\r\n const imageSettings = this.getImageSettings(config.imageSettings);\r\n const cartlinesErrors: CartLineValidationResultsByLineId = this.state.cartlinesErrors;\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n\r\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\r\n );\r\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\r\n const { featureState } = this.props.data;\r\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\r\n const isMultipleCatalogsFeatureEnabled =\r\n featureState.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled || false;\r\n\r\n return this.props.data.products &&\r\n (cart?.hasInvoiceLine || this.props.data.products.result) &&\r\n cart &&\r\n cart.cart.CartLines &&\r\n cart.cart.CartLines.length > 0 &&\r\n this.props.data.channelDeliveryOptionConfig?.result\r\n ? CartLineGroupItems({\r\n cartlines: cart.cart.CartLines,\r\n storeSelectorModuleId: storeSelectorId,\r\n cartlinesErrors,\r\n products: this.props.data.products.result,\r\n productAvailabilites: this.props.data.productAvailabilites.result,\r\n productsAttributes: this.state.productsAttributes || [],\r\n productDeliveryOptions: this.props.data.deliveryOptions.result,\r\n catalogs: this.props.data.catalogs?.result,\r\n imageSettings,\r\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\r\n hasInvoiceLine: cart?.hasInvoiceLine || false,\r\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\r\n gridSettings: this.props.context.request.gridSettings!,\r\n context: this.props.context,\r\n retailMulitplePickupFeatureState: multiplePickUpEnabled,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n resources: {\r\n sizeString: resources.productDimensionTypeSize,\r\n colorString: resources.productDimensionTypeColor,\r\n configString: resources.productDimensionTypeConfiguration,\r\n styleString: resources.productDimensionTypeStyle,\r\n amountString: resources.productDimensionTypeAmount,\r\n quantityDisplayString: resources.quantityDisplayText,\r\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\r\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\r\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\r\n discountStringText: resources.discountStringText,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n shippingChargesText: resources.shippingCharges,\r\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\r\n priceEditorResources: {\r\n ...resources\r\n }\r\n },\r\n telemetry,\r\n addToWishlistButtonText: resources.addToWishlistButtonText,\r\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\r\n removeButtonText: resources.removeCartButtonText,\r\n shipItText: resources.shipInsteadDisplayText,\r\n pickitUpText: resources.pickItUpDisplayText,\r\n changeStoreText: resources.changeStoreDisplayText,\r\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\r\n outOfStockText: resources.outOfStockErrorMessage,\r\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\r\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\r\n cartState: this.props.data.cart.result,\r\n orgUnitLocations: this.props.data.orgUnitLocations.result,\r\n removeItemClickHandler: this.removeItemFromCartHandler,\r\n moveToWishlistSuccessHandler: this.moveToWishlistSuccessHandler,\r\n updateCartLinesQuantitySuccessHandler: this.updateCartlineQuantity,\r\n locationChangedHandler: this.fulfillmentStoreIdUpdated,\r\n wishlists,\r\n defaultWishlistName: resources.defaultWishlistName,\r\n pickupDeliveryModeCode: PickupDeliveryModeCode,\r\n includeErrors: config.showOutOfStockErrors,\r\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\r\n telemetryContent: this.telemetryContent,\r\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\r\n\r\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\r\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\r\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\r\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\r\n resources\r\n ),\r\n\r\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip,\r\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\r\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\r\n orderTemplates,\r\n customerInformation,\r\n channelDeliveryOptionConfig: this.props.data.channelDeliveryOptionConfig?.result,\r\n shouldIgnoreWarehouse: this.props.context.app.config.warehouseAggregation === 'multiple',\r\n productAvailability: this.props.data.productAvailabilites,\r\n productPickUpOptions: this.state.productPickUpOptions || this.props.data.cartLinesPickUpOptions?.result,\r\n isMultipleCatalogFeatureEnabledInHq: isMultipleCatalogsFeatureEnabled || false\r\n })\r\n : null;\r\n }\r\n}\r\n\r\nexport default Cart;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { INodeProps, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface ICartLineItemPromotion {\r\n id: string;\r\n showPromotionPopup: boolean;\r\n promotions: CartPromotionLine[] | undefined;\r\n resources: ICartLineItemPromotionResourceString;\r\n onSeeAllClick(event: React.MouseEvent): void;\r\n onCloseButtonClick(): void;\r\n}\r\n\r\nexport interface ICartLineItemViewProps {\r\n promotionMessageWrapper: INodeProps;\r\n promotionMessage: React.ReactNode;\r\n promotionSeeAllLink: React.ReactElement;\r\n promotionDialog: React.ReactNode;\r\n}\r\n\r\nexport interface ICartLineItemPromotionResourceString {\r\n promotionLinkText: string;\r\n promotionStringHeading: string;\r\n promotionPopupHeading: string;\r\n promotionCloseButtonAriaLabel: string;\r\n}\r\n\r\nexport const cartPromotions = (props: ICartLineItemPromotion): ICartLineItemViewProps | undefined => {\r\n const {\r\n id,\r\n showPromotionPopup,\r\n promotions,\r\n resources: { promotionLinkText, promotionPopupHeading },\r\n onCloseButtonClick,\r\n onSeeAllClick\r\n } = props;\r\n\r\n if (!ArrayExtensions.hasElements(promotions)) {\r\n return;\r\n }\r\n\r\n const titleId = `${id}_title`;\r\n const className = 'msc-cart__promotion';\r\n return {\r\n promotionMessageWrapper: {\r\n className: 'msc-cart__promotion'\r\n },\r\n promotionMessage: (\r\n <>\r\n \r\n {props.resources.promotionStringHeading}\r\n \r\n ),\r\n promotionSeeAllLink: (\r\n \r\n {` `}\r\n {promotionLinkText} {` `}\r\n \r\n ),\r\n promotionDialog: (\r\n \r\n \r\n
\r\n {promotionPopupHeading}\r\n
\r\n
\r\n \r\n
    \r\n {promotions.map(_promotion => {\r\n return (\r\n
  • \r\n {_promotion.Promotion?.OfferName} {` `}\r\n
  • \r\n );\r\n })}\r\n
\r\n
\r\n \r\n
\r\n )\r\n };\r\n};\r\n","/* eslint-disable security/detect-object-injection */\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICartViewProps } from './krannich-c-cart';\r\nimport { ICartlinesViewProps } from './components/krannich-c-cart-line-items';\r\nimport { ICartLineItemViewProps } from './components/krannich-c-cart-line-items-promotion';\r\nimport { IInvoiceSummaryLines } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport { IOrderSummaryLines } from '@msdyn365-commerce-modules/order-summary-utilities';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { INodeProps, Node, Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { getCartState, getCheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { IKrannichCCartResources } from './krannich-c-cart.props.autogenerated';\r\nimport { currencyFormat, dateFormatByLocale, incExcPriceFormat, taxPercentage } from '../../utils/helper';\r\nimport { IKRV_GetATPLeadTimeResponseQuantity } from '../../actions/customProxy/ATP1/DataServiceEntities.g';\r\nimport { KitProduct } from '../../utils/Kits/kits';\r\n\r\n/* VSI CUSTOMIZATION | DATE FORMAT | START */\r\nconst getCartLineShipDate = (shipDate: IKRV_GetATPLeadTimeResponseQuantity, itemId?: string, locale?: string, currency?: string) => {\r\n let date = shipDate?.ATPLeadTimePropertiesQuantityResponseEntityList?.find(e => e.ItemId === itemId)?.ATPDate;\r\n if (locale && currency && date) {\r\n date = dateFormatByLocale(locale, currency, date);\r\n }\r\n return ;\r\n};\r\n/* VSI CUSTOMIZATION | DATE FORMAT | END */\r\nconst _renderCartlines = (\r\n cartLines: ICartlinesViewProps[] | undefined,\r\n cartEmptyText: string,\r\n CartlinesWrapper: INodeProps,\r\n storeSelector: React.ReactNode | undefined,\r\n backToShoppingButton: React.ReactNode,\r\n waitingComponent: React.ReactNode,\r\n cartLoadingStatus: string,\r\n cartDataResult: boolean,\r\n resources: IKrannichCCartResources,\r\n shipDate: IKRV_GetATPLeadTimeResponseQuantity,\r\n props: ICartViewProps\r\n): JSX.Element[] | JSX.Element => {\r\n if (cartLoadingStatus) {\r\n return <>{cartLoadingStatus};\r\n }\r\n const { enabledIncExPrices } = props.context.app.config;\r\n if (cartLines) {\r\n return cartLines.map((cartLine: ICartlinesViewProps, index: number) => {\r\n const atpErrorMsg = props.atpCartlineResults?.find(e => e?.ItemId?.toString() === cartLine?.data?.cartline?.ItemId)\r\n ?.ErrorMessage;\r\n const linkedProducts: any[] | undefined = cartLine?.data?.product?.Components;\r\n const unitPrice = cartLine.data?.cartline.ExtendedPrice\r\n ? cartLine.data?.cartline.ExtendedPrice / cartLine.data?.cartline.Quantity!\r\n : cartLine.data?.cartline.Price;\r\n const customerTaxPercentage = taxPercentage(props.data.customerInformation?.result!);\r\n return (\r\n
\r\n {cartLine.cartline}\r\n\r\n
\r\n {resources.productUnitPrice}\r\n \r\n {unitPrice === 0 ? (\r\n
\r\n {resources.requestPriceText}\r\n
\r\n \r\n {resources.zeroPriceProductText}\r\n
\r\n
\r\n ) : (\r\n incExcPriceFormat(unitPrice!, props.context, enabledIncExPrices, customerTaxPercentage)\r\n )}\r\n
\r\n
\r\n
\r\n {resources.productItemNumber}\r\n {cartLine.data?.product?.ItemId}\r\n
\r\n {/* VSI CUSTOMIZATION START ATP */}\r\n
\r\n {shipDate && (\r\n <>\r\n \r\n {/* VSI CUSTOMIZATION | DATE FORMAT | START */}\r\n {getCartLineShipDate(\r\n shipDate,\r\n cartLine.data?.product?.ItemId,\r\n props.context.app.config.dateFormat,\r\n props.context.request.channel?.Currency\r\n )}\r\n {/* VSI CUSTOMIZATION | DATE FORMAT | END */}\r\n \r\n )}\r\n
\r\n
{atpErrorMsg?.length > 0 && { atpErrorMsg }}
\r\n {linkedProducts?.length !== 0 ? : null}\r\n {/* VSI CUSTOMIZATION END ATP */}\r\n\r\n {/* {cartLine.data?.cartline.DiscountLines?.map(discountLine => {\r\n if (discountLine.OfferName?.toLowerCase().trim() === 'Product Discount'.toLowerCase().trim()) {\r\n return
{resources.productDiscountAppliedText}
;\r\n }\r\n return null;\r\n })} */}\r\n {/* {cartLine.data?.cartline.DiscountAmount !== 0 ? (\r\n
{resources.productDiscountAppliedText}
\r\n ) : null} */}\r\n {storeSelector && cartLine.pickUpInStore ? (\r\n {cartLine.pickUpInStore.defaultComponent}\r\n ) : null}\r\n
\r\n {cartLine.addToOrderTemplate ? (\r\n \r\n {cartLine.remove}\r\n {/* {cartLine.addToWishlist} */}\r\n {cartLine.addToOrderTemplate}\r\n \r\n ) : (\r\n <>\r\n {cartLine.remove}\r\n {/* {cartLine.addToWishlist} */}\r\n \r\n )}\r\n
\r\n
\r\n );\r\n });\r\n }\r\n return cartDataResult ? (\r\n
\r\n

{cartEmptyText}

\r\n {backToShoppingButton}\r\n
\r\n ) : (\r\n <>{waitingComponent}\r\n );\r\n};\r\n\r\n/**\r\n * Method will render error block.\r\n * @param errorData -The order summary errors interface.\r\n * @returns Jsx element.\r\n */\r\n// const _renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\r\n// if (!errorData || !ArrayExtensions.hasElements(errorData.errors)) {\r\n// return null;\r\n// }\r\n// return (\r\n// \r\n// {errorData.header}\r\n// {errorData.errors}\r\n// \r\n// );\r\n// };\r\n\r\n/**\r\n * Method will render invoice summary lines.\r\n * @param invoiceSummaryLines -The invoicesummary lines interface.\r\n * @param OrderSummaryItems -The order summary items props.\r\n * @param props -The cartview props.\r\n * @returns Jsx element.\r\n */\r\nconst _renderInvoiceSummarylines = (\r\n invoiceSummaryLines: IInvoiceSummaryLines | undefined,\r\n OrderSummaryItems: INodeProps,\r\n props: ICartViewProps\r\n): JSX.Element | null => {\r\n if (!invoiceSummaryLines) {\r\n props.context.telemetry.error('InvoiceSummary content is empty, module wont render');\r\n return null;\r\n }\r\n return (\r\n \r\n {invoiceSummaryLines.invoices}\r\n {invoiceSummaryLines.giftCard}\r\n {invoiceSummaryLines.loyalty}\r\n {invoiceSummaryLines.orderTotal}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Method will render order summary lines.\r\n * @param orderSummaryLines -The ordersummary lines interface.\r\n * @param OrderSummaryItems -The order summary items props.\r\n * @param props -The cartview props.\r\n * @returns Jsx element.\r\n */\r\nconst _renderOrderSummarylines = (\r\n orderSummaryLines: IOrderSummaryLines | undefined,\r\n OrderSummaryItems: INodeProps,\r\n props: ICartViewProps\r\n): JSX.Element | null => {\r\n const {\r\n config: { lessOrderSummaryCartInfoMessage, lessOrderSummaryCartInfoMessageMX },\r\n data: {\r\n cart: { result: cartData }\r\n },\r\n context,\r\n resources\r\n } = props;\r\n if (!orderSummaryLines) {\r\n props.context.telemetry.error('OrderSummary content is empty, module wont render');\r\n return null;\r\n }\r\n const subTotal = cartData?.cart.SubtotalAmount;\r\n const usSiteFlag = props?.context?.actionContext?.requestContext?.apiSettings?.oun === props.context.app.config.ounNumberForUsSite;\r\n const mexicoSiteFlag =\r\n props?.context?.actionContext?.requestContext?.apiSettings?.oun === props.context.app.config.ounNumberForMexicoSite;\r\n return (\r\n \r\n {props.promoCode}\r\n {/* {orderSummaryLines.subtotal} */}\r\n {mexicoSiteFlag}\r\n {!mexicoSiteFlag && subTotal && subTotal < 1000\r\n ? lessOrderSummaryCartInfoMessage &&\r\n !usSiteFlag && (\r\n
\r\n {lessOrderSummaryCartInfoMessage}\r\n
\r\n )\r\n : mexicoSiteFlag &&\r\n subTotal &&\r\n subTotal < 500 &&\r\n lessOrderSummaryCartInfoMessageMX && (\r\n
\r\n {lessOrderSummaryCartInfoMessageMX}\r\n
\r\n )}\r\n {\r\n

\r\n {resources.subtotalLabel}\r\n \r\n {currencyFormat(subTotal, context)}\r\n {usSiteFlag && props.config.subTotalToolTipMessageForUsSite && (\r\n

\r\n \r\n {props.config.subTotalToolTipMessageForUsSite}\r\n
\r\n )}\r\n
\r\n

\r\n }\r\n {/* {orderSummaryLines.subtotal} */}\r\n {orderSummaryLines.shipping}\r\n {orderSummaryLines.otherCharge}\r\n {orderSummaryLines.tax}\r\n {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null}\r\n

\r\n Total\r\n \r\n \r\n {currencyFormat(subTotal, context)}\r\n \r\n \r\n

\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Method will render cart promotions.\r\n * @param promotions -The cartline item view props.\r\n * @returns Jsx element.\r\n */\r\nconst _renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\r\n return (\r\n <>\r\n \r\n {promotions.promotionMessage}\r\n {promotions.promotionSeeAllLink}\r\n {promotions.promotionDialog}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Method will render cartlines group title.\r\n * @param cartLine -The cartline view props.\r\n * @param titleSeparate -The title separate.\r\n * @returns Jsx element.\r\n */\r\n// const renderCartLinesGroupTitle = (cartLine: ICartlinesViewProps, titleSeparate: string) => {\r\n// const isBopisSelected: boolean | undefined = cartLine.pickUpInStore?.isBopisSelected;\r\n// return (\r\n// <>\r\n// \r\n// {isBopisSelected ? (\r\n//

\r\n// {cartLine.pickUpInStore?.deliveryOption}\r\n// {titleSeparate}\r\n// {cartLine.pickUpInStore?.orgUnitName}\r\n//

\r\n// ) : null}\r\n//
\r\n// \r\n// );\r\n// };\r\n\r\n/**\r\n * Method will render cartlines groups header title.\r\n * @param pickUpText -The pickup text for group.\r\n * @param shippingText -The shipping text for group.\r\n * @param emailShippingText -The email shipping text for group.\r\n * @param titleSeparate -The title separator.\r\n * @param cartLine -The cartline view props.\r\n * @param emailDeliveryModeCode -The email delivery code from channel.\r\n * @returns Jsx element.\r\n */\r\nconst renderCartLinesGroupHeader = (\r\n pickUpText: string,\r\n shippingText: string,\r\n emailShippingText: string,\r\n titleSeparate: string,\r\n cartLine: ICartlinesViewProps,\r\n emailDeliveryModeCode?: string\r\n) => {\r\n const isBopisSelected: boolean | undefined = cartLine.pickUpInStore?.isBopisSelected;\r\n let groupTitle: string;\r\n\r\n groupTitle = isBopisSelected ? pickUpText : shippingText;\r\n if (!StringExtensions.isNullOrEmpty(emailDeliveryModeCode)) {\r\n groupTitle = cartLine.data && cartLine.data.cartline.DeliveryMode === emailDeliveryModeCode ? emailShippingText : groupTitle;\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n {/*
\r\n

\r\n

{groupTitle}

\r\n {renderCartLinesGroupTitle(cartLine, titleSeparate)}\r\n
*/}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Method will render cartlines in groups.\r\n * @param props -The cartline.\r\n * @returns Jsx element.\r\n */\r\nconst renderCartLinesGroup = (props: ICartViewProps): JSX.Element | undefined => {\r\n if (props.cartLinesGroup && ArrayExtensions.hasElements(props.cartLinesGroup)) {\r\n return (\r\n
\r\n {props.cartLinesGroup.map(cartlines => {\r\n return (\r\n
\r\n {renderCartLinesGroupHeader(\r\n props.resources.pickUpText,\r\n props.resources.shippingText,\r\n props.resources.emailshippingText,\r\n props.resources.titleSeparate,\r\n cartlines[0],\r\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode\r\n )}\r\n {\r\n <>\r\n
\r\n {_renderCartlines(\r\n cartlines,\r\n props.resources.emptyCartText,\r\n props.CartlinesWrapper,\r\n props.storeSelector,\r\n props.backToShoppingButton,\r\n props.waitingComponent,\r\n props.cartLoadingStatus,\r\n props.cartDataResult,\r\n props.resources,\r\n props.shipDate,\r\n props\r\n )}\r\n
\r\n
\r\n {' '}\r\n {props.cartDataResult ? null : props.backToShoppingButton} {props.createTemplateFromCartButton}\r\n {!props.cartDataResult && props.requestDate}\r\n
\r\n \r\n }\r\n
\r\n );\r\n })}\r\n
\r\n );\r\n }\r\n return props.cartDataResult ? (\r\n
\r\n
\r\n

{props.resources.emptyCartText}

\r\n {props.backToShoppingButton}\r\n
\r\n
\r\n ) : (\r\n <>{props.waitingComponent}\r\n );\r\n};\r\nconst _renderCheckoutButton = (error: number, checkoutButton: React.ReactNode, buttonLabel: string, isCheckoutBtnLoading: boolean) => {\r\n if (error || isCheckoutBtnLoading) {\r\n return (\r\n \r\n {buttonLabel}\r\n \r\n );\r\n } else {\r\n return checkoutButton;\r\n }\r\n};\r\nconst CartView: React.FC = (props: ICartViewProps) => {\r\n const [showAlert, setShowAlert] = React.useState(false);\r\n const toggleAlert = () => {\r\n setShowAlert(!showAlert);\r\n };\r\n async function emptyActiveCart(ctx: IActionContext): Promise {\r\n let cartState;\r\n let checkoutState;\r\n const lineItemIdsToRemove: string[] | undefined = [];\r\n\r\n try {\r\n cartState = await getCartState(ctx);\r\n checkoutState = await getCheckoutState(ctx);\r\n } catch (error) {\r\n throw error;\r\n }\r\n\r\n if (!cartState || !cartState.cart) {\r\n throw new Error('Fail to fetch active cart');\r\n }\r\n\r\n if (!checkoutState || !checkoutState.checkoutCart) {\r\n throw new Error('Fail to fetch checkoutCart cart');\r\n }\r\n\r\n const activeCart = cartState.cart;\r\n // const checkoutCart = checkoutState.checkoutCart.cart;\r\n activeCart.CartLines?.map(e => {\r\n lineItemIdsToRemove.push(e?.LineId!);\r\n });\r\n // for (const activeCartLine of activeCart.CartLines || []) {\r\n // for (const checkoutCartLine of checkoutCart.CartLines || []) {\r\n // if (activeCartLine.LineId && activeCartLine.LineId === checkoutCartLine.LineId) {\r\n // lineItemIdsToRemove.push(activeCartLine.LineId);\r\n // }\r\n // }\r\n // }\r\n\r\n try {\r\n await cartState.removeCartLines({ cartLineIds: lineItemIdsToRemove });\r\n await cartState.removeAllPromoCodes({});\r\n await checkoutState.removeCheckoutCartId({});\r\n } catch (error) {\r\n throw error;\r\n }\r\n toggleAlert();\r\n }\r\n\r\n return (\r\n
\r\n {props.title}\r\n {props.cartlines && props.cartlines?.length > 0 && (\r\n
\r\n \r\n
\r\n )}\r\n {showAlert && (\r\n \r\n
\r\n {props.resources.alertLabel}\r\n \r\n {props.resources.removeAllProductsDialogueBox}\r\n
\r\n await emptyActiveCart(props.context.actionContext)}\r\n >\r\n {props.resources.removeAllProductsConfirmButton}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n {props.showAtpStockAlert && (\r\n \r\n
\r\n {props.resources.alertLabel}\r\n \r\n {props.resources.atpQuantityErrorGeneralMsg}\r\n \r\n
\r\n \r\n )}\r\n\r\n {!props.cart?.hasInvoiceLine && props.promotionOptions && _renderPromotions(props.promotionOptions)}\r\n {props.multiplePickUpEnabled ? (\r\n renderCartLinesGroup(props)\r\n ) : (\r\n \r\n
\r\n {_renderCartlines(\r\n props.cartlines,\r\n props.resources.emptyCartText,\r\n props.CartlinesWrapper,\r\n props.storeSelector,\r\n props.backToShoppingButton,\r\n props.waitingComponent,\r\n props.cartLoadingStatus,\r\n props.cartDataResult,\r\n props.resources,\r\n props.shipDate,\r\n props\r\n )}\r\n
\r\n\r\n
\r\n {' '}\r\n {props.cartDataResult ? null : props.backToShoppingButton} {props.createTemplateFromCartButton}\r\n {!props.cartDataResult && props.requestDate}\r\n
\r\n
\r\n )}\r\n {props.orderSummaryHeading && (\r\n \r\n
\r\n {props.orderSummaryHeading}\r\n {props.cart?.hasInvoiceLine\r\n ? _renderInvoiceSummarylines(props.invoiceSummaryLineitems, props.OrderSummaryItems, props)\r\n : _renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\r\n {/* {_renderErrorBlock(props.OrderSummaryErrors)} */}\r\n
\r\n {props.OrderSummaryErrors &&\r\n _renderCheckoutButton(\r\n props.OrderSummaryErrors?.errors.length,\r\n props.checkoutAsSignInUserButton,\r\n props?.resources?.checkoutButtonTitle,\r\n props?.isCheckoutBtnLoading!\r\n )}\r\n
\r\n {/* {props.checkoutAsGuestButton} */}\r\n {props.expressCheckoutButton && ArrayExtensions.hasElements(props.expressCheckoutButton) ? (\r\n {props.expressCheckoutButton}\r\n ) : null}\r\n {/* {props.backToShoppingButton}\r\n {props.createTemplateFromCartButton} */}\r\n
\r\n
\r\n )}\r\n {props.storeSelector}\r\n
\r\n );\r\n};\r\n\r\nexport default CartView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface IAlertProps {\r\n message: string;\r\n}\r\n\r\nconst CheckoutAlert: React.FC = ({ message }) => (\r\n

\r\n {message}\r\n

\r\n);\r\n\r\nexport default CheckoutAlert;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { IKrannichCCheckoutData } from '../krannich-c-checkout.data';\r\nimport { IKrannichCCheckoutProps } from '../krannich-c-checkout.props.autogenerated';\r\n\r\nexport interface IInvoicePaymentSummary {\r\n heading?: React.ReactNode;\r\n lines?: IInvoiceSummaryLines;\r\n}\r\nexport const getInvoicePaymentSummary = (input: IKrannichCCheckoutProps): IInvoicePaymentSummary => {\r\n const {\r\n data: { checkout },\r\n resources: { totalAmountLabel, invoiceLabel, invoiceSummaryTitle },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutCart = get(checkout, 'result.checkoutCart');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n\r\n return {\r\n heading:

{invoiceSummaryTitle}

,\r\n lines: checkoutCart?.hasInvoiceLine\r\n ? InvoiceSummary({\r\n orderTotalLabel: totalAmountLabel,\r\n invoiceLabel,\r\n cart,\r\n context,\r\n typeName,\r\n telemetry,\r\n id,\r\n checkoutState: checkout.result\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLineItemComponent } from '../../../themes/krannich/views/components/cartlineitem.component';\r\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\r\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport get from 'lodash/get';\r\nimport groupBy from 'lodash/groupBy';\r\nimport * as React from 'react';\r\n\r\nimport { IKrannichCCheckoutData } from '../krannich-c-checkout.data';\r\nimport { IKrannichCCheckoutProps } from '../krannich-c-checkout.props.autogenerated';\r\nimport { taxPercentage } from '../../../utils/helper';\r\n\r\ntype deliveryType = 'pickup' | 'ship' | 'email';\r\n\r\nexport interface IPickUpAtStore {\r\n PickUpAtStore: INodeProps;\r\n label: React.ReactNode;\r\n location: React.ReactNode;\r\n}\r\n\r\nexport interface IEmailDelivery {\r\n EmailDelivery: INodeProps;\r\n label: React.ReactNode;\r\n}\r\n\r\nexport interface ILineItem {\r\n LineId: string;\r\n LineItem: INodeProps;\r\n item?: React.ReactNode;\r\n pickUpAtStore?: IPickUpAtStore;\r\n emailDelivery?: IEmailDelivery;\r\n}\r\n\r\nexport interface ILineItemDeliveryGroup {\r\n LineItemDeliveryGroup: INodeProps;\r\n LineItemList: INodeProps;\r\n heading: React.ReactNode;\r\n lineItemWraper?: React.ReactNode;\r\n lineItemWraperIcon?: React.ReactNode;\r\n lineItems: ILineItem[];\r\n}\r\n\r\nexport interface ILineItems {\r\n LineItems: INodeProps;\r\n Header: INodeProps;\r\n heading: React.ReactNode;\r\n editLink: React.ReactNode;\r\n itemsForPickup?: ILineItemDeliveryGroup;\r\n itemsForShip?: ILineItemDeliveryGroup;\r\n itemsForEmail?: ILineItemDeliveryGroup;\r\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\r\n}\r\n\r\nexport const getLineItems = (\r\n input: IKrannichCCheckoutProps,\r\n telemetryContent?: ITelemetryContent\r\n): ILineItems | undefined => {\r\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\r\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n\r\n const _getDeliveryLocation = (cartLine: CartLine): string => {\r\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\r\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\r\n return '';\r\n }\r\n\r\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\r\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\r\n });\r\n\r\n return locationMatch && locationMatch.OrgUnitName;\r\n };\r\n\r\n const _getProduct = (productId: number): SimpleProduct | undefined => {\r\n const products = get(input, 'data.products.result') || [];\r\n return products.find((_product: SimpleProduct) => {\r\n return productId === _product.RecordId;\r\n });\r\n };\r\n\r\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\r\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n config: { imageSettings, showShippingChargesForLineItems },\r\n resources: {\r\n quantityDisplayString,\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle,\r\n productDimensionTypeAmount,\r\n configString,\r\n inputQuantityAriaLabel,\r\n discountStringText,\r\n shippingCharges\r\n },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = input;\r\n const catalogs = input.data.catalogs?.result;\r\n if (!product) {\r\n return;\r\n }\r\n\r\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\r\n if (MsDyn365.isBrowser && isChannelTypeB2B(context.actionContext.requestContext)) {\r\n const fullUrl = new URL(productUrl, window.location.href);\r\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\r\n productUrl = fullUrl.href;\r\n }\r\n const currencyCode = get(input, 'context.request.channel.Currency');\r\n const customerTaxPercentage = taxPercentage(input.data.customerInformation.result!);\r\n return (\r\n \r\n );\r\n };\r\n\r\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\r\n const {\r\n resources: { pickUpAtStoreWithLocationText }\r\n } = input;\r\n\r\n return {\r\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\r\n label: {pickUpAtStoreWithLocationText},\r\n location:
{pickupDeliveryLocation}
\r\n };\r\n };\r\n\r\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\r\n const {\r\n resources: { emailDeliveryText }\r\n } = input;\r\n\r\n return {\r\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\r\n label: {emailDeliveryText}\r\n };\r\n };\r\n\r\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\r\n return items.map(cartLine => {\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const isPickUp = _getCartPickDeliveryMode(cartLine);\r\n const isEmailDelivery =\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\r\n return {\r\n LineId: cartLine.LineId || '',\r\n LineItem: { className: 'ms-checkout__line-item' },\r\n item: _getLineItemComponent(cartLine),\r\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\r\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\r\n };\r\n });\r\n };\r\n\r\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode ===\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode !==\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? shippingCountCheckoutLineItem\r\n : type === 'pickup'\r\n ? inStorePickUpLabel\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _countItems = (items: CartLine[]): number => {\r\n return items.reduce((count, item) => {\r\n return count + (item.Quantity || 0);\r\n }, 0);\r\n };\r\n\r\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n if (type === 'ship') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n } else if (type === 'pickup') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\r\n );\r\n }\r\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\r\n };\r\n\r\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\r\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\r\n return;\r\n }\r\n\r\n const items = _filterItemsByDiliveryType(type);\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const count = _countItems(items);\r\n const title = _getGroupTitleComponent(count, type);\r\n\r\n return {\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(items)\r\n };\r\n };\r\n\r\n const _getLineItems = (): ILineItems | undefined => {\r\n const {\r\n context,\r\n config: { lineItemsHeading },\r\n data: { products },\r\n resources: { editCartText }\r\n } = input;\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\r\n Header: { className: 'ms-checkout__line-items-header' },\r\n heading: lineItemsHeading && lineItemsHeading.text && (\r\n \r\n ),\r\n editLink: (\r\n \r\n {editCartText}\r\n \r\n ),\r\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\r\n itemsForShip: _getLineItemsByDeliveryType('ship'),\r\n itemsForEmail: _getLineItemsByDeliveryType('email'),\r\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\r\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\r\n : undefined\r\n };\r\n };\r\n\r\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { lineItemsHeading }\r\n } = input;\r\n if (lineItemsHeading) {\r\n lineItemsHeading.text = event.target.value;\r\n }\r\n };\r\n\r\n const _getGroupTitleComponentWithMultiplePickUp = (\r\n count: number,\r\n type: deliveryType,\r\n deliveryMode?: string,\r\n fulFillmentStoreId?: string\r\n ): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n let pickupDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\r\n ? pickupDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\r\n });\r\n\r\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? `(${count} ${suffix})`\r\n : type === 'pickup'\r\n ? `${pickupTitle} (${count} ${suffix})`\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\r\n const groupDelivery = getGroupByDelivery(cart.CartLines);\r\n const cartLinesGroup: CartLine[] = [];\r\n const cartLinesGrp: CartLine[][] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\r\n // @ts-expect-error\r\n groupDelivery[String(deliveryMode)] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n Object.keys(cartLinesGroup).forEach((key: string) => {\r\n const cartLines = cartLinesGroup[String(key)];\r\n Object.keys(cartLines).forEach((index: string) => {\r\n const cartLine = cartLines[String(index)];\r\n cartLinesGrp.push(cartLine);\r\n });\r\n });\r\n\r\n return cartLinesGrp;\r\n };\r\n\r\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\r\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\r\n return;\r\n }\r\n\r\n const {\r\n resources: { multiplePickUpLabel, shippingLable }\r\n } = input;\r\n\r\n const items = _filterItemsByMultiplePickupMode();\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\r\n items.map(item => {\r\n const count = _countItems(item);\r\n const cartLine = item[0];\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const type: deliveryType =\r\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\r\n ? 'pickup'\r\n : cartLine.FulfillmentStoreId === '' &&\r\n cartLine.DeliveryMode === emailDeliveryModeCode &&\r\n !StringExtensions.isNullOrEmpty(emailDeliveryModeCode)\r\n ? 'email'\r\n : 'ship';\r\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\r\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\r\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\r\n lineItemDeliveryGroup.push({\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n lineItemWraperIcon:
,\r\n lineItemWraper:
{groupTitle}
,\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(item)\r\n });\r\n });\r\n\r\n return lineItemDeliveryGroup;\r\n };\r\n\r\n return _getLineItems();\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IOrderSummaryLines, OrderSummary } from '../../../utils/order-summary/order-summary-lineitem';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { IKrannichCCheckoutData } from '../krannich-c-checkout.data';\r\nimport { IKrannichCCheckoutProps } from '../krannich-c-checkout.props.autogenerated';\r\nimport { taxPercentage } from '../../../utils/helper';\r\n\r\nexport interface IOrderSummary {\r\n orderSummaryProps: INodeProps;\r\n heading?: React.ReactNode;\r\n lines?: IOrderSummaryLines;\r\n}\r\nexport const getOrderSummary = (input: IKrannichCCheckoutProps): IOrderSummary => {\r\n const {\r\n config: { freightMsg, orderSummaryHeading },\r\n data: { checkout, customerInformation },\r\n resources: {\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n otherCharges,\r\n customerAccountLabel\r\n },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutState = get(checkout, 'result');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\r\n const channelConfiguration = context.request.channel!;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\r\n const isShowOrHideTaxEnabled = context.request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\r\n\r\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { orderSummaryHeading }\r\n } = input;\r\n if (orderSummaryHeading) {\r\n orderSummaryHeading.text = event.target.value;\r\n }\r\n };\r\n const customerTaxPercentage = taxPercentage(customerInformation.result!);\r\n\r\n return {\r\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n heading: orderSummaryHeading && orderSummaryHeading.text && (\r\n \r\n ),\r\n lines: showLineItems\r\n ? OrderSummary({\r\n checkoutState,\r\n cart,\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n context,\r\n typeName,\r\n id,\r\n channelConfiguration,\r\n telemetry,\r\n otherChargeLabel: otherCharges,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- existing property.\r\n isTaxIncludedInPrice: cart.IsTaxIncludedInPrice,\r\n isShowTaxBreakup: isShowOrHideTaxEnabled,\r\n customerAccountLabel,\r\n freightMsg,\r\n customerTaxPercentage: customerTaxPercentage || 0\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport enum AddressItemDisplayType {\n Input = 'Input',\n Dropdown = 'Dropdown',\n Checkbox = 'Checkbox'\n}\n\nexport enum AddressValidationRuleType {\n Required = 'Required',\n Format = 'Format'\n}\n\nexport enum AddressItemType {\n Name = 1001,\n Phone = 1002,\n IsPrimary = 1003,\n AddressTypeValue = 1004,\n ZipCode = 1,\n City = 2,\n County = 3,\n State = 4,\n ThreeLetterISORegionName = 5,\n Street = 6,\n DistrictName = 7,\n StreetNumber = 8,\n BuildingCompliment = 9,\n Postbox = 10,\n House_RU = 21,\n Flat_RU = 22,\n CountryOKSMCode_RU = 23\n}\n\nexport interface IAddressItem {\n name: string;\n type: AddressItemType;\n label: string;\n maxLength: number;\n displayType: AddressItemDisplayType;\n validationRules?: IAddressValidationRule[];\n isNewLine: boolean;\n}\n\nexport interface IAddressValidationRule {\n type: AddressValidationRuleType;\n regEx: string;\n message: string;\n}\n\nexport interface IAddressDropdownsData {\n [index: string]: { key?: string | number; value?: string }[];\n}\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport classname from 'classnames';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\nimport { focusOnCheckoutError, setCheckoutErrorFocus } from '@msdyn365-commerce-modules/checkout';\r\n\r\nexport interface ICheckoutGuidedCardProps {\r\n id?: string;\r\n step: number;\r\n title?: HeadingType;\r\n disabled?: boolean; // Module is not available\r\n isActive?: boolean; // Step === currentStep\r\n isVisted?: boolean; // Step < currentStep\r\n isExpanded?: boolean;\r\n isReady?: boolean;\r\n isPending?: boolean;\r\n isUpdating?: boolean;\r\n isSubmitting?: boolean;\r\n isCancelAllowed?: boolean;\r\n isMobile?: boolean;\r\n hasInitialized?: boolean;\r\n hasControlGroup?: boolean;\r\n shouldFocus?: boolean;\r\n children: React.ReactNode;\r\n moduleState?: IModuleStateManager;\r\n actionContext?: IActionContext;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n onEdit?(): void;\r\n onCancel?(): void;\r\n onSubmit?(): void;\r\n onNext(): void;\r\n paymentTitleToHide?: string;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedCard component.\r\n * @extends {React.Component}\r\n */\r\nclass CheckoutGuidedCard extends React.PureComponent {\r\n private readonly editButtonRef: React.RefObject = React.createRef();\r\n\r\n private readonly formCardRef: React.RefObject = React.createRef();\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n constructor(props: ICheckoutGuidedCardProps) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n }\r\n\r\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\r\n /**\r\n * Move to next step when current step is ready.\r\n */\r\n const { isActive, isReady, onNext, isVisted, onEdit, shouldFocus, children, moduleState, actionContext } = this.props;\r\n\r\n // Move to next step after completing the current step\r\n if (isActive && isReady) {\r\n onNext();\r\n }\r\n\r\n // Set the focus to Edit button once edit button appear\r\n // (It happens when current step switch to isReady status)\r\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\r\n const canEdit = isReady && isVisted && !!onEdit;\r\n if (!prevCanEdit && canEdit) {\r\n this.focusOnEditButton();\r\n this.scrollToTitle();\r\n }\r\n\r\n // Set the focus to the first focusable element\r\n // (It happens when current step switch to isUpdating status)\r\n if (prevProps.isReady && !isReady) {\r\n this.focusOnFirstFocusableElement();\r\n }\r\n\r\n // Set the focus for the checkout error\r\n if (shouldFocus && actionContext) {\r\n const childrenModules = this._getModules(children);\r\n\r\n // Set the focus for the module within the checkout section container\r\n if (childrenModules.length > 0) {\r\n for (const childModule of childrenModules) {\r\n const childId = this._getId(childModule);\r\n const childState = moduleState?.getModule(childId);\r\n\r\n if (childState?.hasError) {\r\n setCheckoutErrorFocus(childId, actionContext).catch(error => {\r\n console.error(error);\r\n });\r\n return;\r\n }\r\n }\r\n } else {\r\n focusOnCheckoutError(this.formCardRef, actionContext).catch(error => {\r\n console.error(error);\r\n });\r\n }\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n title,\r\n disabled,\r\n isExpanded,\r\n isActive,\r\n isVisted,\r\n children,\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n hasInitialized,\r\n hasControlGroup,\r\n onEdit,\r\n resource,\r\n paymentTitleToHide\r\n } = this.props;\r\n const { changeBtnLabel } = resource;\r\n\r\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\r\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\r\n //VSI CUSTOMIZATION START\r\n const getPermissionToDisplayCTA = () => {\r\n const configValue = paymentTitleToHide ? paymentTitleToHide : 'PAYMENT METHOD';\r\n if (title?.text?.trim()?.toLocaleLowerCase() !== configValue?.trim()?.toLocaleLowerCase()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n const getPermissionToDisplaySection = () => {\r\n const configValue = 'CONTACT INFORMATION';\r\n if (title?.text?.trim()?.toLocaleLowerCase() === configValue?.trim()?.toLocaleLowerCase()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n //VSI CUSTOMIZATION END\r\n return (\r\n \r\n
\r\n {this.getTitle()}\r\n\r\n {canEdit && getPermissionToDisplayCTA() && (\r\n \r\n {changeBtnLabel}\r\n \r\n )}\r\n
\r\n\r\n \r\n
{children}
\r\n\r\n {this.renderFooder()}\r\n
\r\n \r\n );\r\n }\r\n\r\n private readonly renderFooder = (): JSX.Element | null => {\r\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\r\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\r\n\r\n const canSubmit = !isReady && onSubmit;\r\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\r\n\r\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\r\n return null;\r\n }\r\n\r\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\r\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\r\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n return (\r\n
\r\n {canSubmit && (\r\n \r\n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\r\n \r\n )}\r\n {canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n private readonly focusOnFirstFocusableElement = (): void => {\r\n const node = this.formCardRef.current as HTMLElement;\r\n const focussableElements = `\r\n a:not([disabled]),\r\n button:not([disabled]),\r\n input[type=submit]:not([disabled]),\r\n input[type=checkbox]:not([disabled]),\r\n input[type=text]:not([disabled]),\r\n input[type=radio]:not([disabled]),\r\n input[type=password]:not([disabled]),\r\n select:not([disabled]),\r\n textarea:not([disabled]),\r\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\r\n `;\r\n\r\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\r\n child && child.focus && child.focus();\r\n };\r\n\r\n private readonly focusOnEditButton = (): void => {\r\n // Focus on edit button\r\n const editButton =\r\n this.editButtonRef &&\r\n this.editButtonRef.current &&\r\n // this.editButtonRef.current.focus &&\r\n (this.editButtonRef.current as HTMLElement);\r\n editButton && editButton.focus();\r\n };\r\n\r\n private readonly scrollToTitle = (): void => {\r\n // Scroll window to the title of the step that was just completed only in mobile viewport\r\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\r\n formCard && formCard.scrollIntoView();\r\n };\r\n\r\n private readonly getTitle = (): JSX.Element => {\r\n const { step, title } = this.props;\r\n const { headingTag: Tag = 'h2', text = '' } = title || {};\r\n return (\r\n \r\n {step + 1}. \r\n {text && {text}}\r\n \r\n );\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private readonly _getModules = (item: React.ReactNode): any[] => {\r\n return get(item, 'props.modules.primary') || [];\r\n };\r\n\r\n private readonly _getId = (item: React.ReactNode): string => {\r\n return get(item, 'id') || '';\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedCard;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport get from 'lodash/get';\r\nimport { computed } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport GuidedCard from './guided-card';\r\n\r\nexport interface ICheckoutGuidedFormProps {\r\n items: React.ReactNode[];\r\n moduleState: IModuleStateManager;\r\n disableGuidedCheckoutFlow?: boolean;\r\n isMobile?: boolean;\r\n isEditor?: boolean;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n requestContext?: ICoreContext;\r\n telemetryContent?: ITelemetryContent;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n hasError?: boolean;\r\n hasShippingAddress?: boolean | undefined;\r\n hasCartDeliveryMode?: boolean | undefined;\r\n hasGuestCheckoutEmail?: boolean | undefined;\r\n isTermsAndConditionAccepted?: boolean | undefined;\r\n paymentTitleToHide?: string;\r\n setCurrentStep: (value: number) => void;\r\n shouldEnableCheckoutErrorDisplayMessaging?: boolean;\r\n shouldFocusOnCheckoutError?: boolean | undefined;\r\n}\r\n\r\ninterface ICheckoutGuidedFormState {\r\n currentStep: number;\r\n}\r\n\r\nconst paymentInstrumentModuleId = 'payment-instrument';\r\n\r\n/**\r\n *\r\n * CheckoutGuidedForm component.\r\n * @extends {React.Component}\r\n */\r\n@observer\r\nclass CheckoutGuidedForm extends React.PureComponent {\r\n @computed public get hasMissingInfo(): boolean {\r\n if (\r\n this.props.hasShippingAddress === false ||\r\n this.props.hasCartDeliveryMode === false ||\r\n this.props.hasGuestCheckoutEmail === false ||\r\n this.props.isTermsAndConditionAccepted === false\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n @computed public get hasOrderError(): boolean {\r\n for (const item of this.props.items) {\r\n const childId = this.getId(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n state.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (!isPaymentSectionContainer && !state.isDisabled && state.hasError) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public state: ICheckoutGuidedFormState = {\r\n currentStep: 0\r\n };\r\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\r\n handleClick = () => {\r\n this.props.setCurrentStep(this.state.currentStep);\r\n };\r\n public componentDidMount(): void {\r\n /**\r\n * Append child modules.\r\n */\r\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\r\n this.props.moduleState.init({ childIds });\r\n this.handleClick();\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n setTimeout(() => {\r\n this.handleClick();\r\n }, 100);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n // VSI CUSTOMIZATION ADD PROP OF paymentTitleToHide\r\n\r\n const { moduleState, items, resource, paymentTitleToHide } = this.props;\r\n if (!items || !moduleState) {\r\n return null;\r\n }\r\n\r\n const shouldCollapseAfterRedirect =\r\n this.props.isPaymentVerificationRedirection &&\r\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n !this.props.hasError &&\r\n !this.hasMissingInfo &&\r\n !this.hasOrderError;\r\n\r\n let previousModuleHasError = false;\r\n const childModule = this._enableAfterModule();\r\n return (\r\n
\r\n {items.map((item: React.ReactNode) => {\r\n const childId = this.getId(item);\r\n const step = this.getStep(childId);\r\n const title = this.getHeading(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n const {\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n isDisabled,\r\n isCancelAllowed,\r\n onEdit,\r\n onCancel,\r\n onSubmit,\r\n hasModuleState,\r\n hasInitialized,\r\n hasError\r\n } = state || ({} as IModuleStateManager);\r\n\r\n const shouldFocus =\r\n !!this.props.shouldEnableCheckoutErrorDisplayMessaging &&\r\n !!this.props.shouldFocusOnCheckoutError &&\r\n !previousModuleHasError &&\r\n hasError;\r\n previousModuleHasError = previousModuleHasError || shouldFocus;\r\n\r\n return (\r\n \r\n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n private readonly getEnabledModules = (): string[] => {\r\n const {\r\n moduleState: { childIds, getModule }\r\n } = this.props;\r\n return childIds.filter((childId: string) => {\r\n const state = getModule(childId);\r\n return !!state && !state.isDisabled;\r\n });\r\n };\r\n /**\r\n * Check if it is a section container with payment module.\r\n * @param moduleId -- The id of the module.\r\n * @returns If it is a section container with payment module.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private readonly _enableAfterModule = (): string => {\r\n const childIds: string[] = this.props.items.map((item: React.ReactNode) => get(item, 'props.id')).filter(Boolean);\r\n let id: string = '';\r\n for (let i = 0; i < childIds.length - 1; i++) {\r\n const childId = childIds[Number(i)];\r\n const nextChildId = childIds[Number(i + 1)];\r\n if (this._isPaymentSectionContainer(childId) && nextChildId) {\r\n id = nextChildId;\r\n }\r\n }\r\n return id;\r\n };\r\n /**\r\n * Check if it is a section container with payment module.\r\n * @param moduleId -- The id of the module.\r\n * @returns If it is a section container with payment module.\r\n */\r\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\r\n const sectionState = this.props.moduleState.getModule(moduleId);\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n sectionState.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\r\n );\r\n if (isPaymentSectionContainer) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n private readonly getStep = (id: string): number => {\r\n return this.getEnabledModules().indexOf(id);\r\n };\r\n\r\n private readonly getId = (item: React.ReactNode): string => {\r\n return get(item, 'props.id') || '';\r\n };\r\n\r\n private readonly getHeading = (item: React.ReactNode): Heading => {\r\n return get(item, 'props.config.heading') || '';\r\n };\r\n\r\n private readonly isExpanded = (step: number, moduleChildId: string, childId: string): boolean => {\r\n if (this.props.isEditor) {\r\n // Editorial mode: Expand all the drawers\r\n return true;\r\n }\r\n if (this.props.shouldEnableSinglePaymentAuthorizationCheckout && moduleChildId === childId) {\r\n return true;\r\n }\r\n return step > -1 && step <= this.state.currentStep;\r\n };\r\n\r\n private readonly isActive = (step: number): boolean => {\r\n return step === this.state.currentStep;\r\n };\r\n\r\n private readonly isVisted = (step: number): boolean => {\r\n return step > -1 && step < this.state.currentStep;\r\n };\r\n\r\n private readonly onNext = (): void => {\r\n this.setState({\r\n currentStep: this.state.currentStep + 1\r\n });\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedForm;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\ninterface ICheckoutPlaceOrderButtonProps {\r\n canPlaceOrder: boolean;\r\n checkoutBtnText: string;\r\n telemetryContent?: ITelemetryContent;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n isExpressCheckoutApplied?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n placeOrder(): Promise;\r\n isTermsConditionCheck: boolean;\r\n}\r\n\r\nconst buttonsStates: React.Dispatch>[] = [];\r\n\r\n/**\r\n * On place order function.\r\n * @param isBusy -Check is busy.\r\n * @param canPlaceOrder -Check can place order.\r\n * @param placeOrder -Place order function.\r\n * @returns Set state of button.\r\n */\r\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\r\n if (isBusy || !canPlaceOrder) {\r\n return;\r\n }\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(true);\r\n return true;\r\n });\r\n await placeOrder();\r\n};\r\n\r\nconst CheckoutPlaceOrderButton: React.FC = ({\r\n checkoutBtnText,\r\n canPlaceOrder,\r\n placeOrder,\r\n telemetryContent,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n isPlaceOrderLoading,\r\n isExpressCheckoutApplied,\r\n isPaymentVerificationRedirection,\r\n isTermsConditionCheck\r\n}) => {\r\n const [isBusy, setIsBusy] = useState(false);\r\n buttonsStates.push(setIsBusy);\r\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\r\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && (!isExpressCheckoutApplied || isPaymentVerificationRedirection)) {\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutPlaceOrderButton;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AsyncResultStatus, Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n updateCartLinesAsync,\r\n updateLineDeliverySpecificationsAsync,\r\n validateForCheckoutAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\r\nimport {\r\n Address,\r\n AttributeValue,\r\n AttributeValueBase,\r\n CartLine,\r\n DeliveryPreferenceType,\r\n LineDeliverySpecification,\r\n SimpleProduct,\r\n TokenizedPaymentCard\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport {\r\n ArrayExtensions,\r\n getAvailabilitiesForCartLineItems,\r\n IProductInventoryInformation,\r\n ProductAvailabilitiesForCartLineItems,\r\n validateCartLinesInventory\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n Waiting\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { ErrorCode, ErrorLocation } from '@msdyn365-commerce/global-state';\r\nimport classnames from 'classnames';\r\nimport isEmpty from 'lodash/isEmpty';\r\nimport { action, computed, get, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IKrannichCCheckoutData } from './krannich-c-checkout.data';\r\nimport { ICheckoutHeadingData, IKrannichCCheckoutProps } from './krannich-c-checkout.props.autogenerated';\r\nimport AlertComponent from './components/alert';\r\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\nimport { getLineItems, ILineItems } from './components/get-line-items';\r\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\r\nimport GuidedFormComponent from './components/guided-form';\r\nimport PlaceOrderButtonComponent from './components/place-order-button';\r\nimport placeOrder from './methods/place-order';\r\nimport { focusOnCheckoutError, setCheckoutErrors } from '@msdyn365-commerce-modules/checkout';\r\nimport { AsyncResultStatusCode, IExpressPaymentDetails } from '@msdyn365-commerce-modules/checkout';\r\nimport PromoCodeComponent from '../../themes/krannich/views/components/promocode.component';\r\nimport { filteredProductAttributeList, findAttribute, setNameAttribute } from '../../utils/helper';\r\nimport { fetchAsync } from '../../actions/customProxy/calenderDaysOff/DataActionExtension.g';\r\n// Todo: disabled fullstory events\r\n// import { eventFullStoryAPISuccess, eventFullStoryFailAPI } from '../../utils/fullStoryTrack';\r\n\r\nexport * from './components/get-line-items';\r\nexport * from './components/get-order-summary';\r\n\r\n/**\r\n * Device type.\r\n */\r\ntype DeviceType = 'Mobile';\r\n\r\n/**\r\n * The Checkout state.\r\n */\r\ninterface ICheckoutState {\r\n errorMessage: string;\r\n isValidationPassed: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n isPlaceOrderClicked?: boolean;\r\n customerRefID: string;\r\n commission: string;\r\n promoError: string;\r\n customerComments: string;\r\n requestAShippingDate: string;\r\n estShipDate: string;\r\n currentStep?: number;\r\n isUpdateCall: boolean;\r\n isTermsConditionCheck: boolean;\r\n calenderdDaysOff?: any[];\r\n}\r\n\r\n/**\r\n * The Checkout view props.\r\n * @extends IKrannichCCheckoutProps\r\n */\r\nexport interface ICheckoutViewProps extends IKrannichCCheckoutProps {\r\n className: string;\r\n canShow?: boolean;\r\n isEmptyCart?: boolean;\r\n isConsentGiven?: boolean;\r\n hasError?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n cartStatus?: string;\r\n isMobile?: boolean;\r\n isEditorialMode?: boolean;\r\n backToShoppingUrl?: string;\r\n editCartLink?: string;\r\n hasSalesOrder: boolean;\r\n hasInvoiceLine?: boolean;\r\n\r\n checkoutProps: IModuleProps;\r\n headerProps: INodeProps;\r\n bodyProps: INodeProps;\r\n mainProps: INodeProps;\r\n mainControlProps: INodeProps;\r\n sideProps: INodeProps;\r\n sideControlFirstProps: INodeProps;\r\n sideControlSecondProps: INodeProps;\r\n termsAndConditionsProps: INodeProps;\r\n\r\n guidedForm?: React.ReactNode;\r\n title?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n orderSummary?: IOrderSummary;\r\n invoicePaymentSummary?: IInvoicePaymentSummary;\r\n lineItems?: ILineItems;\r\n placeOrderButton?: React.ReactNode;\r\n termsAndConditions?: React.ReactNode;\r\n termsAndConditionsLine?: React.ReactNode;\r\n keepShoppingButton?: React.ReactNode;\r\n orderConfirmation?: React.ReactNode;\r\n\r\n checkoutExpressPaymentContainer?: React.ReactNode;\r\n checkoutErrorRef?: React.RefObject;\r\n onChange: (event: React.ChangeEvent) => void;\r\n onTextAreaChange: (event: React.ChangeEvent) => void;\r\n promoCodeComponent: React.ReactNode;\r\n currentStep: number;\r\n reqDate: Date | string;\r\n estShipDate: Date | string;\r\n onChangeRequestDeliveryDate: (customDate: Date | null) => void;\r\n calenderDaysOff: any[];\r\n}\r\n\r\n/**\r\n * The checkout module props interface.\r\n */\r\nexport interface ICheckoutModuleProps extends IKrannichCCheckoutProps, IModuleStateProps {}\r\n\r\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\r\n\r\n/**\r\n *\r\n * CheckoutContainer component.\r\n * @extends {React.Component}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass Checkout extends React.PureComponent {\r\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\r\n return this.props.data.checkout?.status;\r\n }\r\n\r\n @computed get isEmptyCart(): boolean {\r\n if (this.isEditorialMode) {\r\n // Editorial mode: Ignore empty cart\r\n return false;\r\n }\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\r\n }\r\n\r\n @computed get hasError(): boolean {\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\r\n }\r\n\r\n @computed get isEditorialMode(): boolean {\r\n return this.props.context.request.params.isEditor;\r\n }\r\n\r\n @computed get canPlaceOrder(): boolean {\r\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\r\n\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n const disableForOBO = Msdyn365.isOboRequest(this.props.context.request) && !this.isPaidOffByCustomerAccount;\r\n\r\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\r\n return (\r\n this.props.moduleState.isReady &&\r\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\r\n (this.state.errorMessage === '' ||\r\n shouldEnableSinglePaymentAuthorizationCheckout ||\r\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false)) &&\r\n !(shouldEnableSinglePaymentAuthorizationCheckout && disableForOBO)\r\n );\r\n }\r\n\r\n @computed get isPaidOffByCustomerAccount(): boolean {\r\n const amountDue = this.props.data.checkout.result?.checkoutCart.cart.TotalAmount ?? 0;\r\n const customerAccountAmount = this.props.data.checkout.result?.customerAccountAmount ?? 0;\r\n\r\n return customerAccountAmount === amountDue;\r\n }\r\n\r\n @computed get isCartReady(): boolean {\r\n return (\r\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\r\n this.props.data.customerInformation.status !== 'LOADING' &&\r\n this.props.data.featureState.status !== 'LOADING'\r\n );\r\n }\r\n\r\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\r\n const properties =\r\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\r\n property => property.Key === 'expressPaymentDetails'\r\n )?.Value?.StringValue ?? '';\r\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\r\n }\r\n\r\n public state: ICheckoutState = {\r\n errorMessage: '',\r\n isValidationPassed: false,\r\n isPlaceOrderLoading: false,\r\n isPlaceOrderClicked: false,\r\n customerRefID: '',\r\n commission: '',\r\n promoError: '',\r\n customerComments: '',\r\n requestAShippingDate: '',\r\n estShipDate: '',\r\n currentStep: 0,\r\n isUpdateCall: false,\r\n isTermsConditionCheck: true,\r\n calenderdDaysOff: []\r\n };\r\n\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\r\n public UNSAFE_componentWillReceiveProps(newProps: any): void {\r\n // Action you want to execute\r\n // VSI CUSTOMIZATION Start\r\n this._getDateAttribute();\r\n //VSI Customization END\r\n }\r\n public async componentDidMount(): Promise {\r\n const {\r\n resources: { genericErrorMessage }\r\n } = this.props;\r\n //VSI Customization to call function and set attributes and create cartline with attributes\r\n void this._setCartItemAttribute();\r\n if (this.state.calenderdDaysOff?.length === 0) {\r\n void this._calenderDaysOff();\r\n }\r\n when(\r\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\r\n async () => {\r\n if (this.expressPaymentDetailsFromCartPage) {\r\n const {\r\n email,\r\n tenderLine,\r\n tokenizedPaymentCard,\r\n paymentTenderType: paymentTenderTypeFromCartPage,\r\n isExpressCheckoutAppliedInCartPage,\r\n isExpressAddressAppliedInCartPage,\r\n cardPaymentAcceptResult,\r\n address\r\n } = this.expressPaymentDetailsFromCartPage;\r\n\r\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\r\n newEmailAddressFromExpressCheckout: email ?? '',\r\n newTenderLine: tenderLine,\r\n newTokenizedPaymentCard: tokenizedPaymentCard,\r\n newPaymentTenderType: paymentTenderTypeFromCartPage,\r\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\r\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\r\n newCardPaymentAcceptResult: cardPaymentAcceptResult\r\n });\r\n\r\n if (isExpressAddressAppliedInCartPage && address) {\r\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\r\n newBillingAddressFromExpressCheckout: address\r\n });\r\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\r\n newShippingAddressFromExpressCheckout: address\r\n });\r\n } else {\r\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\r\n }\r\n\r\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\r\n newExtensionProperties: [\r\n {\r\n Key: 'expressPaymentDetails',\r\n Value: { StringValue: '' }\r\n }\r\n ]\r\n });\r\n }\r\n }\r\n );\r\n\r\n when(\r\n () => this.hasError,\r\n () => {\r\n this.setState({\r\n errorMessage: genericErrorMessage\r\n });\r\n this.props.context.telemetry.error('Failed to get cart');\r\n }\r\n );\r\n\r\n when(\r\n () => {\r\n return this.isEmptyCart;\r\n },\r\n () => {\r\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\r\n }\r\n );\r\n\r\n when(\r\n () => this.isCartReady,\r\n () => {\r\n this.validateForCheckout();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n () => {\r\n this.onContainerReady();\r\n }\r\n );\r\n\r\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\r\n async isReady => {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n isReady &&\r\n !this.props.data.checkout.result?.redirectAdditionalContext &&\r\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\r\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\r\n ) {\r\n if (!this.state.isPlaceOrderLoading) {\r\n this.setState({ isPlaceOrderLoading: true });\r\n }\r\n\r\n this.props.telemetry.information(\r\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\r\n );\r\n\r\n await this.onPlaceOrder();\r\n\r\n // If 3D authentication redirection, don't update isPlaceOrderLoading\r\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n\r\n this.props.telemetry.information(\r\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\r\n );\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.isBillingAddressHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n\r\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\r\n\r\n this.props.telemetry.information(\r\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\r\n );\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when redirection is true for new checkout flow.\r\n reaction(\r\n () => this.canPlaceOrder,\r\n async () => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\r\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\r\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\r\n newIsPlaceOrderEnabledInRedirection: true\r\n });\r\n\r\n this.props.telemetry.information(\r\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\r\n );\r\n this.props.telemetry.information(\r\n `isOBORequest is ${Msdyn365.isOboRequest(this.props.context.request)} and canPlaceOrder is ${\r\n this.canPlaceOrder\r\n }.`\r\n );\r\n }\r\n } else {\r\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\r\n }\r\n }\r\n );\r\n\r\n // Reaction to update the error message when there is a checkout error.\r\n reaction(\r\n () => this.props.data.checkout.result?.checkoutError,\r\n checkoutError => {\r\n const checkoutErrorLocation: boolean = checkoutError?.errorLocation === ErrorLocation.Checkout;\r\n // If there is an Error in CheckoutPaymentInstrument module, checkout error location will be updated.\r\n const checkoutPaymentErrorLocation: boolean =\r\n checkoutError?.errorCode === ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment\r\n ? checkoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument\r\n : checkoutErrorLocation;\r\n if (\r\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\r\n checkoutError &&\r\n checkoutError.errorMessage &&\r\n (checkoutErrorLocation ? checkoutErrorLocation : checkoutPaymentErrorLocation)\r\n ) {\r\n this._setErrorMessage(checkoutError.errorMessage);\r\n }\r\n }\r\n );\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\r\n this.props.data.checkout.result?.shouldFocusOnCheckoutError &&\r\n this.state.errorMessage\r\n ) {\r\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext).catch(error => {\r\n console.error('error', error);\r\n });\r\n }\r\n }\r\n\r\n public _setCurrentStep = (value: number) => {\r\n this.setState({\r\n currentStep: value\r\n });\r\n };\r\n\r\n //VSI CUSTOMIZATION START\r\n // VSI CUSTOMIZATION START\r\n public _setCartItemAttribute = async () => {\r\n const cartState = (await this.props.data.checkout).checkoutCart;\r\n const findedAttrArray: any = [];\r\n const updatedCartLines: CartLine[] = [];\r\n\r\n const productWeightAttribute = this.props.context.app.config.productWeightAttribute || 'Weight (kg)';\r\n cartState.cart.CartLines?.map(async (cartLine, index) => {\r\n const productAttributes = filteredProductAttributeList(\r\n this.props.data.getAttributesForCartLineItems?.result &&\r\n this.props?.data?.getAttributesForCartLineItems.result[index].attributeValue,\r\n this.props.context.app.config.kcProductAttribute\r\n );\r\n const manufacturerAttributeValue = productAttributes?.find(e => e.identifier === 'Manufacturer');\r\n const productAttrWeightValue =\r\n this.props.data.getAttributesForCartLineItems?.result &&\r\n this.props?.data?.getAttributesForCartLineItems.result[Number(index)].attributeValue?.find(\r\n (item: AttributeValue) => item.Name === productWeightAttribute\r\n );\r\n const lineIdManufacturAttr = setNameAttribute(\r\n manufacturerAttributeValue?.Name! || 'Manufacturer',\r\n manufacturerAttributeValue?.TextValue || ''\r\n );\r\n const lineIdWeightAttr = setNameAttribute(productWeightAttribute, productAttrWeightValue?.FloatValue?.toString() || '');\r\n let currentAttributes: AttributeValueBase[] = cartLine.AttributeValues || [];\r\n currentAttributes = await findAttribute(currentAttributes, lineIdManufacturAttr);\r\n currentAttributes = await findAttribute(currentAttributes, lineIdWeightAttr);\r\n\r\n findedAttrArray.push(currentAttributes);\r\n updatedCartLines.push({\r\n Quantity: cartLine.Quantity,\r\n LineId: cartLine.LineId,\r\n AttributeValues: currentAttributes\r\n });\r\n });\r\n const cartId = (await this.props.data.checkout).checkoutCart.cart.Id;\r\n await updateCartLinesAsync({ callerContext: this.props.context.actionContext }, cartId, updatedCartLines);\r\n };\r\n // VSI CUSTOMIZATION END\r\n //Function use to set date attribute sended through cart on checkout\r\n public _getDateAttribute = () => {\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n const attributes: AttributeValue[] = cart?.AttributeValues || [];\r\n const requestdeliverydateAttribute = this.props.context.app.config.requestdeliverydateAttribute || 'Request a delivery date';\r\n const reqAttr = attributes?.find(attr => attr.Name === requestdeliverydateAttribute)?.TextValue || undefined;\r\n const orderShippingdateAttribute = this.props.context.app.config.orderShippingdateAttribute || 'Estimated Ship Date';\r\n const estimatedShippingDateArr = attributes?.find(attr => attr.Name === orderShippingdateAttribute)?.TextValue || undefined;\r\n // Todo: need to remove it after validation\r\n this.setState({\r\n requestAShippingDate: reqAttr,\r\n estShipDate: estimatedShippingDateArr\r\n });\r\n };\r\n //VSI CUSTOMIZATION END\r\n\r\n // eslint-disable-next-line complexity -- ignore the complexity.\r\n public render(): JSX.Element {\r\n //VSI CUSTOMIZATION TO RECIVE EXTRA PROP paymentTitleToHide\r\n const {\r\n moduleState,\r\n config: { className, checkoutHeading, disableGuidedCheckoutFlow, paymentTitleToHide },\r\n resources,\r\n context: {\r\n request: {\r\n user: { isAuthenticated }\r\n }\r\n }\r\n } = this.props;\r\n const { errorMessage, isTermsConditionCheck, calenderdDaysOff } = this.state;\r\n const {\r\n backToShopping,\r\n placeOrderText,\r\n placeOrderTextRequest,\r\n confirmPaymentText,\r\n cookieConsentRequiredMessage,\r\n genericErrorMessage\r\n } = resources;\r\n const checkoutClass = classnames('ms-checkout', className);\r\n const allCheckoutInformation = this.getSlotItems('checkoutInformation');\r\n\r\n // @ts-expect-error - check the key of slot\r\n const checkoutInformation = allCheckoutInformation?.filter(info => !info?.key.includes('express-payment'));\r\n\r\n // @ts-expect-error - check the key of slot\r\n const checkoutExpressPaymentContainer = allCheckoutInformation?.find(info => info?.key.includes('express-payment'));\r\n\r\n const isConsentGiven =\r\n this.props.context.request &&\r\n this.props.context.request.cookies &&\r\n this.props.context.request.cookies.isConsentGiven &&\r\n this.props.context.request.cookies.isConsentGiven();\r\n\r\n const isMobile =\r\n this.props.context.request &&\r\n this.props.context.request.device &&\r\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\r\n\r\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n\r\n const termsAndConditions =\r\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\r\n const termsAndConditionsLine = (\r\n
\r\n this.setState({ isTermsConditionCheck: !this.state.isTermsConditionCheck })}\r\n />\r\n
\r\n {this.props.resources.termsandConditionStatementFirstPart}\r\n {\r\n <>\r\n {this.props.config.termsandConditions && this.props.config.termsandConditions.linkText && (\r\n \r\n )}{' '}\r\n  \r\n \r\n {this.props.resources.termsandConditions}\r\n \r\n \r\n }\r\n {this.props?.context?.actionContext?.requestContext?.apiSettings?.oun !==\r\n this.props.context.app.config.ounNumberForUsSite\r\n ? this.props.resources.termsandConditionStatementSecondPart\r\n : this.props.resources.termsandConditionStatementSecondPartUsa}\r\n
\r\n
\r\n );\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\r\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n\r\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n const placeOrderBtnText =\r\n this.props?.context?.actionContext?.requestContext?.apiSettings?.oun !== this.props.context.app.config.ounNumberForUsSite\r\n ? placeOrderText\r\n : placeOrderTextRequest;\r\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderBtnText;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isExpressCheckoutApplied = this.props.data.checkout?.result?.isExpressCheckoutApplied ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasCartDeliveryMode = this.props.data.checkout?.result?.hasCartDeliveryMode;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasGuestCheckoutEmail = this.props.data.checkout?.result?.hasGuestCheckoutEmail;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isTermsAndConditionAccepted = this.props.data.checkout?.result?.isTermsAndConditionAccepted;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isPaymentVerificationRedirection = this.props.data.checkout?.result?.isPaymentVerificationRedirection ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const shouldEnableCheckoutErrorDisplayMessaging =\r\n this.props.data.checkout?.result?.shouldEnableCheckoutErrorDisplayMessaging ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const shouldFocusOnCheckoutError = this.props.data.checkout?.result?.shouldFocusOnCheckoutError;\r\n\r\n let hasExpressPaymentContainer = false;\r\n\r\n if (\r\n typeof window !== 'undefined' &&\r\n (document?.getElementsByClassName(expressPaymentSectionClassName) as HTMLCollectionOf)[0]?.style.display === ''\r\n ) {\r\n hasExpressPaymentContainer = true;\r\n }\r\n\r\n let viewProps: ICheckoutViewProps = {\r\n ...this.props,\r\n className: checkoutClass,\r\n checkoutErrorRef: this.checkoutErrorRef,\r\n isEmptyCart: this.isEmptyCart,\r\n isConsentGiven,\r\n hasError: this.hasError,\r\n isPaymentVerificationRedirection: this.props.data.checkout?.result?.isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n hasSalesOrder:\r\n this.props.data.checkout &&\r\n this.props.data.checkout.result !== undefined &&\r\n this.props.data.checkout.result.salesOrder !== undefined,\r\n hasInvoiceLine,\r\n cartStatus: this.cartStatus,\r\n isMobile,\r\n backToShoppingUrl,\r\n editCartLink,\r\n isEditorialMode: this.isEditorialMode,\r\n orderConfirmation:\r\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\r\n ? this.props.slots.orderConfirmation[0]\r\n : undefined,\r\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\r\n headerProps: { className: 'ms-checkout__head' },\r\n bodyProps: { className: 'ms-checkout__body' },\r\n mainProps: { className: 'ms-checkout__main' },\r\n mainControlProps: { className: 'ms-checkout__main-control' },\r\n sideProps: { className: hasExpressPaymentContainer ? 'ms-checkout__has-express-side' : 'ms-checkout__side' },\r\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\r\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\r\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\r\n termsAndConditions,\r\n termsAndConditionsLine,\r\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading),\r\n checkoutExpressPaymentContainer,\r\n onChange: this.onChangeFields,\r\n onTextAreaChange: this.onChangeTextAreaFields,\r\n promoCodeComponent: this._getPromoCode(),\r\n onChangeRequestDeliveryDate: this.onChangeDate,\r\n currentStep: this.state.currentStep!,\r\n reqDate: this.state.requestAShippingDate,\r\n estShipDate: this.state.estShipDate,\r\n calenderDaysOff: calenderdDaysOff!\r\n };\r\n\r\n if ((this.props.config.chcekoutWithOutCooikes, !isConsentGiven && isAuthenticated)) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else if (this.isLoading()) {\r\n viewProps = {\r\n ...viewProps,\r\n loading: \r\n };\r\n } else if (this.hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else {\r\n viewProps = {\r\n ...viewProps,\r\n alert: errorMessage && ,\r\n canShow: true,\r\n guidedForm: checkoutInformation ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n orderSummary: getOrderSummary(this.props),\r\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\r\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\r\n placeOrderButton: (\r\n \r\n ),\r\n termsAndConditions,\r\n keepShoppingButton: backToShoppingUrl && (\r\n \r\n {backToShopping}\r\n \r\n ),\r\n onChange: this.onChangeFields,\r\n onChangeRequestDeliveryDate: this.onChangeDate,\r\n onTextAreaChange: this.onChangeTextAreaFields,\r\n promoCodeComponent: this._getPromoCode(),\r\n reqDate: this.state.requestAShippingDate,\r\n estShipDate: this.state.estShipDate\r\n };\r\n }\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n @computed public get asyncResultStatus(): AsyncResultStatus | undefined {\r\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\r\n if (isLoading) {\r\n return AsyncResultStatusCode.LOADING;\r\n }\r\n\r\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\r\n if (isSuccess) {\r\n return AsyncResultStatusCode.SUCCESS;\r\n }\r\n\r\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\r\n if (isFailed) {\r\n return AsyncResultStatusCode.FAILED;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Renders heading.\r\n * @param checkoutHeading - The checkout heading.\r\n * @returns React node.\r\n */\r\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Event handler for heading change event.\r\n * @param event - The content change event in heading element.\r\n * @returns The new heading value.\r\n */\r\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\r\n (this.props.config.checkoutHeading!.text = event.target.value);\r\n\r\n private _calenderDaysOff = async () => {\r\n const context1 = { callerContext: this.props.context.actionContext };\r\n await fetchAsync(context1, '')\r\n .then((res: any) => {\r\n this.setState({\r\n calenderdDaysOff: res\r\n });\r\n })\r\n .catch(err => {\r\n console.error(err, 'ERR');\r\n });\r\n };\r\n /**\r\n * Checks if cart is loading.\r\n * @returns True if is loading, false otherwise.\r\n */\r\n private readonly isLoading = (): boolean => {\r\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\r\n };\r\n\r\n /**\r\n * Get slot items.\r\n * @param key - The slot key.\r\n * @returns React node or undefined.\r\n */\r\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\r\n const { slots } = this.props;\r\n return slots && slots[String(key)] && slots[String(key)].length > 0 ? slots[String(key)] : undefined;\r\n };\r\n\r\n /**\r\n * Trigger the payment section container submit when placing order.\r\n */\r\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\r\n this.setState({ isPlaceOrderLoading: true });\r\n\r\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\r\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\r\n });\r\n };\r\n /* VSI Customization - START */\r\n\r\n private readonly onChangeFields = (event?: React.ChangeEvent, customDate?: Date) => {\r\n if (event) {\r\n const { name, value } = event.target;\r\n this.setState({ [name]: value });\r\n }\r\n };\r\n\r\n private readonly onChangeDate = (customDate?: Date | null) => {\r\n if (customDate instanceof Date && !isNaN(customDate.getTime())) {\r\n this.setState({\r\n requestAShippingDate: customDate\r\n });\r\n if (customDate !== undefined || customDate !== 'Invalid Date/Invalid Date/Invalid Date') {\r\n const converedStringDate = new Date(customDate!);\r\n converedStringDate.setDate(converedStringDate.getDate());\r\n // Get year, month, and day part from the date\r\n const updatedYear = converedStringDate.toLocaleString('default', { year: 'numeric' });\r\n const updatedMonth = converedStringDate.toLocaleString('default', { month: '2-digit' });\r\n const updatedDay = converedStringDate.toLocaleString('default', { day: '2-digit' });\r\n // Generate yyyy-mm-dd date string\r\n const formatedDate = `${updatedMonth}/${updatedDay}/${updatedYear}`.trim();\r\n localStorage.setItem('reqId', formatedDate);\r\n }\r\n } else if (customDate === null) {\r\n this.setState({\r\n requestAShippingDate: null\r\n });\r\n }\r\n };\r\n\r\n private readonly onChangeTextAreaFields = (event: React.ChangeEvent) => {\r\n const { name, value } = event.target;\r\n this.setState({ [name]: value });\r\n };\r\n private readonly getHeaderAttribute = (): AttributeValueBase[] => {\r\n const attributeArr: AttributeValueBase[] = [];\r\n let reqId = this.state.estShipDate;\r\n if (this.state.requestAShippingDate !== undefined && this.state.requestAShippingDate !== 'Invalid Date/Invalid Date/Invalid Date') {\r\n reqId = this.state.requestAShippingDate;\r\n } else if (localStorage.getItem('reqId') !== null && localStorage.getItem('reqId') !== String(null)) {\r\n reqId = localStorage.getItem('reqId')!;\r\n } else if (\r\n (localStorage.getItem('reqId') === null || localStorage.getItem('reqId') === String(null)) &&\r\n (this.state.requestAShippingDate === undefined || this.state.requestAShippingDate === 'Invalid Date/Invalid Date/Invalid Date')\r\n ) {\r\n reqId = this.state.estShipDate;\r\n }\r\n const customerReferenceAttribute = this.props.context.app.config.customerReferenceAttribute || 'Customer reference';\r\n const commissionAttribute = this.props.context.app.config.commissionAttribute || 'Commission';\r\n const commentsAttribute = this.props.context.app.config.commentsAttribute || 'comments';\r\n const requestdeliverydateAttribute = this.props.context.app.config.requestdeliverydateAttribute || 'Request a delivery date';\r\n const orderShippingdateAttribute = this.props.context.app.config.orderShippingdateAttribute || 'Estimated ship date';\r\n const lineIdCustomerReferenceAttr = setNameAttribute(customerReferenceAttribute, this.state.customerRefID);\r\n const lineIdCommissionAttr = setNameAttribute(commissionAttribute, this.state.commission);\r\n const lineIdCommentsAttr = setNameAttribute(commentsAttribute, this.state.customerComments);\r\n const lineIdRequestdeliverydateAttr = setNameAttribute(requestdeliverydateAttribute, reqId);\r\n const lineIdOrderShippingdateAttr = setNameAttribute(orderShippingdateAttribute, this.state.estShipDate);\r\n attributeArr.push(\r\n lineIdCustomerReferenceAttr,\r\n lineIdCommissionAttr,\r\n lineIdCommentsAttr,\r\n lineIdRequestdeliverydateAttr,\r\n lineIdOrderShippingdateAttr\r\n );\r\n return attributeArr;\r\n };\r\n /**\r\n * On place order.\r\n * @returns Void promise.\r\n */\r\n // Function use to convert date and add one plus day\r\n private readonly getMinimumDate = async () => {\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n const converedStringDate = new Date(this.state.requestAShippingDate!);\r\n converedStringDate.setDate(converedStringDate.getDate());\r\n\r\n // Get year, month, and day part from the date\r\n const updatedYear = converedStringDate.toLocaleString('default', { year: 'numeric' });\r\n const updatedMonth = converedStringDate.toLocaleString('default', { month: '2-digit' });\r\n const updatedDay = converedStringDate.toLocaleString('default', { day: '2-digit' });\r\n // Generate yyyy-mm-dd date string\r\n const formatedDate = `${updatedMonth}/${updatedDay}/${updatedYear}`.trim();\r\n this.setState({ requestAShippingDate: formatedDate });\r\n };\r\n\r\n private readonly onPlaceOrder = async (): Promise => {\r\n await this.getMinimumDate();\r\n const phnRcdId = this.props?.data?.checkout?.result?.checkoutCart?.cart?.ShippingAddress?.PhoneRecordId!;\r\n localStorage.setItem('phnRcdId', JSON.stringify(phnRcdId));\r\n\r\n const {\r\n resources: { checkoutOutOfStockErrorMessage },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { enableStockCheck = false }\r\n }\r\n },\r\n slots: { orderConfirmation },\r\n data: { checkout, products }\r\n } = this.props;\r\n\r\n this.props.telemetry.information('Checkout onPlaceOrder is called.');\r\n this.setState({ isPlaceOrderClicked: true });\r\n\r\n // If hasInvoiceLine is true, no inventory check\r\n if (\r\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\r\n enableStockCheck &&\r\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\r\n ) {\r\n this.setState({\r\n errorMessage: checkoutOutOfStockErrorMessage\r\n });\r\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\r\n } else {\r\n /* VSI Customization - START */\r\n await this.props.data.checkout.result?.checkoutCart\r\n .updateAttributeValues({ newAttributeValues: this.getHeaderAttribute() })\r\n .then(async res => {\r\n localStorage.setItem('reqId', String(null));\r\n await this.props.data.checkout.result?.checkoutCart.refreshCart({});\r\n })\r\n .catch();\r\n /* VSI Customization - END */\r\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\r\n\r\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\r\n // Todo: disabled fullstory events\r\n // void eventFullStoryAPISuccess('checkout_place_order place_order_api_call_success', 'krannich-checkout');\r\n await placeOrder(\r\n actionContext,\r\n this.props.data.checkout.result,\r\n this.props.data.products.result,\r\n !hasOrderConfirmation,\r\n updatedCartVersion,\r\n this.props.data.checkout.result?.isPaymentVerificationRedirection\r\n ).catch(error => {\r\n // Todo: disabled fullstory events\r\n // void eventFullStoryFailAPI('checkout_place_order place_order_api_call_fail', 'krannich-checkout', error);\r\n this.handleCheckoutError(error);\r\n });\r\n // Todo: disabled fullstory events\r\n // void eventFullStoryAPISuccess('checkout_place_order place_order_api_call_success2', 'krannich-checkout');\r\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\r\n }\r\n };\r\n\r\n /**\r\n * Update receipt email address for electronic cart line.\r\n * @param newGuestCheckoutEmail - The guest checkout email.\r\n * @returns The updated cart version.\r\n */\r\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\r\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n );\r\n\r\n let updatedCartVersion: number | undefined;\r\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\r\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\r\n return {\r\n LineId: line.LineId,\r\n DeliverySpecification: {\r\n DeliveryModeId: emailDeliveryModeCode,\r\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\r\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\r\n }\r\n };\r\n });\r\n\r\n await updateLineDeliverySpecificationsAsync(\r\n { callerContext: this.props.context.actionContext },\r\n (await this.props.data.checkout).checkoutCart.cart.Id,\r\n lineDeliverySpecifications\r\n )\r\n .then(updatedCart => {\r\n updatedCartVersion = updatedCart.Version;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\r\n });\r\n }\r\n\r\n return updatedCartVersion;\r\n };\r\n\r\n /**\r\n * Return true if any product in the cart is over its max quantity.\r\n * @param cart -- The checkout cart.\r\n * @param products -- The checkout products.\r\n * @returns - Is any product in the cart is over max quantity.\r\n */\r\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\r\n let isOverMaxQuantity = false;\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n await getAvailabilitiesForCartLineItems(\r\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\r\n this.props.context.actionContext\r\n )\r\n .then(productInventoryInformation => {\r\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\r\n\r\n cart.CartLines?.map(cartline => {\r\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\r\n\r\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\r\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\r\n const isEmailDelivery =\r\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\r\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\r\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\r\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\r\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\r\n });\r\n if (foundProductAvailability) {\r\n productsThatShouldValidateInventory.push(foundProductAvailability);\r\n }\r\n }\r\n });\r\n\r\n const cartLinesInventoryValidation = validateCartLinesInventory(\r\n cart.CartLines ?? [],\r\n productsThatShouldValidateInventory,\r\n this.props.context.actionContext,\r\n products,\r\n emailDeliveryModeCode\r\n );\r\n\r\n // If is invalid then exceeds the available quantity\r\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\r\n return isOverMaxQuantity;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\r\n });\r\n\r\n return isOverMaxQuantity;\r\n };\r\n\r\n /**\r\n * Gets active child in module state.\r\n * @returns - The module state manager collection.\r\n */\r\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\r\n const { childIds, getModule } = this.props.moduleState;\r\n return childIds\r\n .map(getModule)\r\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\r\n };\r\n\r\n /**\r\n * On container ready.\r\n */\r\n private readonly onContainerReady = (): void => {\r\n this.props.telemetry.information('Checkout onContainerReady is called.');\r\n\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.isReady && state.onContainerReady && state.onContainerReady();\r\n });\r\n };\r\n\r\n /**\r\n * Redirects to cart page.\r\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\r\n */\r\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n if (window && editCartLink) {\r\n window.location.assign(editCartLink);\r\n } else {\r\n this.setState({\r\n errorMessage: this.props.resources.genericErrorMessage\r\n });\r\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\r\n }\r\n };\r\n\r\n /**\r\n * Validates for checkout.\r\n * @param retry - Retry flag.\r\n */\r\n private readonly validateForCheckout = (retry: boolean = true): void => {\r\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\r\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\r\n const { Id, Version } = cart;\r\n const isOrderQuantityLimitsFeatureEnabledInHq =\r\n this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n const isEcommerceQuantityLimitsFeatureEnabledInHq =\r\n this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\r\n )?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n const isB2BSite = isChannelTypeB2B(this.props.context.actionContext.requestContext);\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\r\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\r\n (customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && isB2BSite) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !isB2BSite)));\r\n if (\r\n (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) ||\r\n isEcommerceQuantityLimitsFeatureEnabledInHq\r\n ) {\r\n if (Version && Id) {\r\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\r\n .then((result: CartLineValidationResults) => {\r\n if (result.ValidationFailuresByCartLines?.length !== 0) {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n cartState\r\n ?.refreshCart({})\r\n .then(() => {\r\n this.validateForCheckout(false);\r\n })\r\n .catch((refreshError: Error) => {\r\n this.props.telemetry.warning(refreshError.message);\r\n this.props.telemetry.debug('Unable to refresh Cart');\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n };\r\n public _upatePromoError = (value: boolean) => {\r\n return () =>\r\n this.setState({\r\n promoError: value\r\n });\r\n };\r\n public _getPromoCode = (): React.ReactNode => {\r\n const {\r\n context,\r\n resources,\r\n data: {\r\n cart: { result: cart },\r\n customerInformation: { result: customerInformation }\r\n }\r\n } = this.props;\r\n return (\r\n cart && (\r\n this._upatePromoError}\r\n promoError={this.state.promoError}\r\n customerInformation={customerInformation!}\r\n />\r\n )\r\n );\r\n };\r\n @action\r\n private readonly _setErrorMessage = (errorMessage: string): void => {\r\n this.props.telemetry.error(errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.props.moduleState.onUpdating();\r\n this.setState({\r\n errorMessage\r\n });\r\n };\r\n\r\n /**\r\n * Save the address as Shipping and Billing address.\r\n * @param tokenizedPaymentCard - Tokenized payment card.\r\n */\r\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\r\n const checkoutState = this.props.data.checkout.result;\r\n\r\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\r\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\r\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\r\n\r\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\r\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\r\n }\r\n };\r\n\r\n /**\r\n * Get address from tokenizedPaymentCard.\r\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\r\n * @returns The address.\r\n */\r\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\r\n const address: Address = {\r\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\r\n Name: tokenizedPaymentCard.NameOnCard,\r\n Street: tokenizedPaymentCard.Address1,\r\n StreetNumber: tokenizedPaymentCard.Address2,\r\n City: tokenizedPaymentCard.City,\r\n State: tokenizedPaymentCard.State,\r\n ZipCode: tokenizedPaymentCard.Zip,\r\n Phone: tokenizedPaymentCard.Phone\r\n };\r\n\r\n return address;\r\n };\r\n /**\r\n * Handle checkout errors.\r\n * @param error -- The error on checkout api failure.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private readonly handleCheckoutError = (error: any) => {\r\n const {\r\n resources: {\r\n genericErrorMessage,\r\n invalidCartVersionErrorMessage,\r\n missingRequiredCartTenderLinesErrorMessage,\r\n timeoutErrorMessage\r\n },\r\n context: { actionContext }\r\n } = this.props;\r\n const checkoutResult = this.props.data.checkout.result;\r\n const apiError = error && error.message;\r\n if (error?.statusCode === 500) {\r\n const errorMessage = timeoutErrorMessage;\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n this.setState({ isPlaceOrderLoading: false });\r\n return;\r\n }\r\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\r\n const errorCode = error && error.name ? error.name : '';\r\n // apiError message will be used if errorcode resource/enums is unavailable\r\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext, apiError).catch(\r\n error => {\r\n console.error('error', error);\r\n }\r\n );\r\n } else {\r\n let errorMessage = genericErrorMessage;\r\n this.setState({ isPlaceOrderClicked: false });\r\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n errorMessage = invalidCartVersionErrorMessage;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\r\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\r\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_ExclusiveCouponCannotBeAppliedWithOtherCoupons') {\r\n // If api error is not available show generic message\r\n errorMessage = apiError || genericErrorMessage;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n error.data?.AdditionalContext &&\r\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\r\n ) {\r\n return;\r\n }\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n }\r\n };\r\n}\r\n\r\nexport default Checkout;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { PlaceOrder } from '@msdyn365-commerce-modules/checkout';\r\n\r\nexport default async (\r\n ctx: IActionContext,\r\n checkoutState: ICheckoutState | undefined,\r\n orderedProducts: SimpleProduct[] | undefined,\r\n redirect: boolean,\r\n updatedCartVersion?: number,\r\n isPaymentVerificationRedirection?: boolean\r\n) => {\r\n return PlaceOrder(ctx, checkoutState, orderedProducts, redirect, updatedCartVersion, isPaymentVerificationRedirection);\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './krannich-c-checkout';\r\nimport { IEmailDelivery } from './components';\r\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\nimport { IKrannichCCheckoutResources } from './krannich-c-checkout.props.autogenerated';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { getDateWithOnePlus } from '../../utils/ATP/atpHelper';\r\nimport DatePicker, { registerLocale } from 'react-datepicker';\r\nimport enGb from 'date-fns/locale/en-GB';\r\nimport enUS from 'date-fns/locale/en-US';\r\nimport enAU from 'date-fns/locale/en-AU';\r\nimport { currencyFormat, dateFormatByLocale } from '../../utils/helper';\r\nregisterLocale('enGb', enGb);\r\nregisterLocale('enUS', enUS);\r\nregisterLocale('enAU', enAU);\r\ninterface IOrderSummaryExtended {\r\n orderSummary: IOrderSummary;\r\n promoCodeComponent: React.ReactNode;\r\n lessOrderMessage?: string;\r\n lessOrderMessageMX?: string;\r\n freightAndGSTMessage?: string;\r\n freightAndGSTMessageFromResources?: string;\r\n siteOun?: boolean;\r\n formatter?: any;\r\n subTotalToolTipMessage?: string;\r\n mexicoSiteFlag?: boolean;\r\n context?: any;\r\n}\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\r\n \r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n lineItemWraper,\r\n lineItemWraperIcon\r\n}) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({\r\n LineItems,\r\n Header,\r\n heading,\r\n editLink,\r\n itemsForPickup,\r\n itemsForShip,\r\n itemsForEmail,\r\n itemsGroupWithMulitplePickupMode\r\n}) => (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\r\n {itemsGroupWithMulitplePickupMode !== undefined\r\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n })\r\n : null}\r\n \r\n);\r\n\r\nconst OrderSummaryComponent: React.FC = ({\r\n orderSummary,\r\n promoCodeComponent,\r\n lessOrderMessage,\r\n freightAndGSTMessage,\r\n freightAndGSTMessageFromResources,\r\n siteOun,\r\n formatter,\r\n subTotalToolTipMessage,\r\n mexicoSiteFlag,\r\n lessOrderMessageMX,\r\n context\r\n}) => {\r\n const { heading, lines } = orderSummary;\r\n const subTotalProps = lines?.subtotal as JSX.Element;\r\n const subtotal = subTotalProps.props.price;\r\n const shippingProps = lines?.shipping as JSX.Element;\r\n const totalBeforeTax = Number(subTotalProps?.props?.price) + Number(shippingProps?.props?.price);\r\n const taxProps = lines?.tax as JSX.Element;\r\n const tax = taxProps.props.price;\r\n const orderTotalProps = lines?.orderTotal as JSX.Element;\r\n const orderTotal = orderTotalProps.props.price;\r\n\r\n return (\r\n
\r\n {heading}\r\n
\r\n {promoCodeComponent}\r\n {lines && (\r\n <>\r\n {!mexicoSiteFlag && subTotalProps?.props?.price < 1000\r\n ? siteOun && (\r\n
\r\n {lessOrderMessage}\r\n
\r\n )\r\n : mexicoSiteFlag &&\r\n subTotalProps?.props?.price < 500 && (\r\n
\r\n {lessOrderMessageMX}\r\n
\r\n )}\r\n
\r\n

\r\n Subtotal\r\n \r\n \r\n {currencyFormat(subtotal, context)}\r\n \r\n \r\n

\r\n {!siteOun && subTotalToolTipMessage && (\r\n
\r\n \r\n {subTotalToolTipMessage}\r\n
\r\n )}\r\n
\r\n\r\n {lines.shipping}\r\n {\r\n
\r\n \r\n \r\n {/* {isNaN(totalBeforeTax) ? 'To be calculated' : `${'A$'}${totalBeforeTax}`} */}\r\n {isNaN(totalBeforeTax) ? 'To be calculated' : currencyFormat(Number(totalBeforeTax), context)}\r\n \r\n
\r\n }\r\n {lines.otherCharge}\r\n

\r\n Tax\r\n \r\n \r\n {currencyFormat(tax, context)}\r\n \r\n \r\n

\r\n {lines.totalDiscounts}\r\n {lines.loyalty}\r\n {lines.customerAccount}\r\n {lines.giftCard}\r\n

\r\n Amount Due\r\n \r\n \r\n {currencyFormat(orderTotal, context)}\r\n \r\n \r\n

\r\n
\r\n {freightAndGSTMessage ? freightAndGSTMessage : freightAndGSTMessageFromResources}\r\n
\r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst CheckoutView: React.FC = props => {\r\n const {\r\n isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n // lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n termsAndConditionsLine,\r\n // keepShoppingButton,\r\n promoCodeComponent,\r\n currentStep,\r\n checkoutExpressPaymentContainer,\r\n checkoutErrorRef,\r\n reqDate,\r\n calenderDaysOff\r\n } = props;\r\n const cart = props.data.checkout?.result?.checkoutCart?.cart;\r\n\r\n const attributes: AttributeValue[] = cart?.AttributeValues || [];\r\n const requestdeliverydateAttribute = props.context.app.config.requestdeliverydateAttribute || 'Request a delivery date';\r\n const reqAttr = attributes?.find(attr => attr.Name === requestdeliverydateAttribute)?.TextValue || undefined;\r\n const orderShippingdateAttribute = props.context.app.config.orderShippingdateAttribute || 'Estimated ship date';\r\n const shipDateAttr = attributes?.find(attr => attr.Name === orderShippingdateAttribute)?.TextValue || undefined;\r\n const formattedShipDate = new Date(shipDateAttr!).toLocaleDateString('en-GB') ?? shipDateAttr;\r\n const newSplitDateArr = formattedShipDate?.toString()?.split('/');\r\n let minDate = '';\r\n if (newSplitDateArr && newSplitDateArr?.length) {\r\n minDate = `${newSplitDateArr[2]}-${newSplitDateArr[1]}-${newSplitDateArr[0]}`;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n const requestDeliveryDateMin = getDateWithOnePlus(minDate!);\r\n\r\n const [shipDateAttrState, shipDateAttrUseState] = React.useState();\r\n const [selectedDate, setSelectedDate] = React.useState(null);\r\n\r\n React.useEffect(() => {\r\n if (formattedShipDate) {\r\n shipDateAttrUseState(formattedShipDate);\r\n }\r\n }, [formattedShipDate]);\r\n\r\n React.useEffect(() => {\r\n if (reqDate !== undefined && reqDate && reqDate !== 'Invalid Date/Invalid Date/Invalid Date') {\r\n setSelectedDate(new Date(reqDate!));\r\n }\r\n /*if (reqDate === undefined) {\r\n const day = parseInt(newSplitDateArr[0], 10);\r\n const month = parseInt(newSplitDateArr[1], 10) - 1; // Months are 0-indexed in JavaScript (0 for January, 1 for February, etc.)\r\n const year = parseInt(newSplitDateArr[2], 10);\r\n const date = new Date(year, month, day);\r\n if (newSplitDateArr[0] !== 'Invalid Date') {\r\n setSelectedDate(date);\r\n props.onChangeRequestDeliveryDate(date);\r\n }\r\n }*/\r\n }, [newSplitDateArr]);\r\n\r\n React.useEffect(() => {\r\n if (reqDate !== undefined && reqDate && reqDate !== 'Invalid Date/Invalid Date/Invalid Date') {\r\n setSelectedDate(new Date(reqDate!));\r\n //props.onChangeRequestDeliveryDate(new Date(reqDate!));\r\n }\r\n }, [reqDate]);\r\n\r\n // const converDateFormat = (date: string | undefined) => {\r\n // if (date) {\r\n // // ✅ DD/MM/YYYY\r\n // const convertedDate = new Date(date).toLocaleDateString('en-GB');\r\n // return convertedDate; // 👉️ 24/02/2023\r\n // }\r\n // return null;\r\n // };\r\n\r\n // VSI CUSTOMIZATION for hanlding the clear date\r\n const handleChange = (date: Date | null) => {\r\n if (date instanceof Date && !isNaN(date.getTime())) {\r\n setSelectedDate(date);\r\n props.onChangeRequestDeliveryDate(date);\r\n } else {\r\n setSelectedDate(null);\r\n }\r\n };\r\n\r\n registerLocale('enGb', enGb);\r\n const dateObjects = calenderDaysOff?.map(dateString => new Date(dateString));\r\n const currency = props.context.request.channel?.Currency;\r\n const dateLocale = props.context.app.config.dateFormat;\r\n return (\r\n <>\r\n \r\n {!hasSalesOrder && !checkoutExpressPaymentContainer && {title}}\r\n {!hasSalesOrder &&\r\n isPaymentVerificationRedirection &&\r\n shouldEnableSinglePaymentAuthorizationCheckout &&\r\n !alert &&\r\n !loading && }\r\n {!hasSalesOrder && (\r\n \r\n {loading}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {checkoutExpressPaymentContainer}\r\n {guidedForm}\r\n {termsAndConditions}\r\n \r\n {_customFields(\r\n props,\r\n props.resources,\r\n props.onChange,\r\n props.onTextAreaChange,\r\n reqAttr,\r\n currentStep\r\n )}\r\n {/*keepShoppingButton*/}\r\n \r\n
\r\n
\r\n
\r\n \r\n {/* VSI CUSTOMIZATION | DATE FORMAT | START */}\r\n \r\n {/* VSI CUSTOMIZATION | DATE FORMAT | END */}\r\n
\r\n
\r\n \r\n {/* */}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {!hasInvoiceLine\r\n ? orderSummary && (\r\n \r\n )\r\n : invoicePaymentSummary && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {/* {keepShoppingButton} */}\r\n \r\n {/* {lineItems && } */}\r\n \r\n {termsAndConditions}\r\n {/* {placeOrderButton} */}\r\n {/* {keepShoppingButton} */}\r\n \r\n \r\n
\r\n {termsAndConditionsLine}\r\n
{placeOrderButton}
\r\n \r\n )}\r\n
\r\n )}\r\n {hasSalesOrder && orderConfirmation}\r\n
\r\n \r\n );\r\n};\r\nconst _customFields = (\r\n props: ICheckoutViewProps,\r\n resources: IKrannichCCheckoutResources,\r\n onChange: (event: React.ChangeEvent) => void,\r\n onTextAreaChange: (event: React.ChangeEvent) => void,\r\n value?: string,\r\n currentStep?: number\r\n) => (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {props.context.actionContext?.requestContext?.apiSettings?.oun !== props.context.app.config.ounNumberForUsSite && (\r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n);\r\n\r\nexport default CheckoutView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { PriceComponent } from '../../../../themes/krannich/views/components/price.component';\r\nimport { IComponent, IComponentProps, msdyn365Commerce, IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICartState, getCheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { Coupon, Customer } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport {\r\n Button,\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { taxPercentage } from '../../../../utils/helper';\r\n\r\nexport interface IPromoCodeProps extends IComponentProps<{}> {\r\n cart: ICartState | undefined;\r\n promoCodeHeadingText: string;\r\n appliedPromoCodeHeadingText: string;\r\n removePromoAriaLabelFormat: string;\r\n promoPlaceholderText: string;\r\n promoCodeApplyButtonText: string;\r\n collapseTimeOut: number;\r\n removePromoText: string;\r\n invalidPromoCodeErrorText: string;\r\n failedToAddPromoCodeErrorText: string;\r\n duplicatePromoCodeErrorText: string;\r\n failedToRemovePromoCodeErrorText: string;\r\n //these below upatePromoError & promoError props are defined to use this component in checkout and to resolve error message issue\r\n // we use these two props and these props are passed through checkout and set the error state for checkout only\r\n upatePromoError?: (err: string) => void;\r\n promoError?: string;\r\n customerInformation: Customer;\r\n\r\n /**\r\n * The telemetry content\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n promoCodeApplyCallback?(): void;\r\n}\r\n\r\nexport interface IPromoCodeComponent extends IComponent {}\r\n\r\nconst PromoCodeComponentActions = {};\r\n\r\ninterface IPromoCodeState {\r\n isCollapseOpen: boolean;\r\n promoCodeInputValue: string;\r\n error: string;\r\n canApply: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * The PromoCode component renders the promocode section.\r\n * @extends {React.PureComponent}\r\n */\r\nclass PromoCode extends React.Component {\r\n private readonly payLoad: IPayLoad;\r\n\r\n constructor(props: IPromoCodeProps, state: IPromoCodeState) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, TelemetryConstant.ApplyPromoCode);\r\n this.state = {\r\n isCollapseOpen: false,\r\n promoCodeInputValue: '',\r\n error: this.props.promoError || '',\r\n canApply: false\r\n };\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IPromoCodeProps, nextState: IPromoCodeState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
\r\n
{this.props.promoCodeHeadingText}
\r\n
\r\n INFORMATIOMN ICONs\r\n
\r\n
\r\n {this._renderForm(this.props.promoPlaceholderText, this.props.promoCodeApplyButtonText, this.props.cart)}\r\n

\r\n {this.state.error}\r\n

\r\n {this._renderAppliedPromoCode(this.props)}\r\n
\r\n );\r\n }\r\n\r\n private readonly _onInputChange = (e: React.ChangeEvent) => {\r\n const error = e.target.value === '' ? '' : this.state.error;\r\n this.setState({\r\n promoCodeInputValue: e.target.value,\r\n error,\r\n canApply: !!e.target.value\r\n });\r\n };\r\n\r\n private readonly _applyPromotion = (cartState: ICartState | undefined) => {\r\n const { upatePromoError } = this.props;\r\n if (!cartState || !cartState.cart) {\r\n return;\r\n }\r\n const appliedPromo = this.state.promoCodeInputValue;\r\n\r\n cartState\r\n .addPromoCode({ promoCode: appliedPromo })\r\n .then(async result => {\r\n if (result.status === 'SUCCESS') {\r\n // Show success text\r\n this.setState({ promoCodeInputValue: '', error: '', canApply: false });\r\n await cartState.refreshCart({});\r\n const checkoutState = await getCheckoutState(this.props.context.actionContext);\r\n await checkoutState.checkoutCart.addPromoCode({ promoCode: appliedPromo }).then(async result => {\r\n if (result.status === 'SUCCESS') {\r\n this.setState({ error: '' });\r\n }\r\n await checkoutState.checkoutCart.refreshCart({});\r\n });\r\n } else if (result.substatus === 'ALREADYADDED') {\r\n upatePromoError && upatePromoError(this.props.duplicatePromoCodeErrorText);\r\n this.setState({ error: this.props.duplicatePromoCodeErrorText });\r\n } else if (result.status === 'FAILED' && result.substatus !== 'INVALIDPROMOCODE') {\r\n const multipleValidPromoCodeError = result.errorDetails?.LocalizedMessage;\r\n upatePromoError && upatePromoError(multipleValidPromoCodeError!);\r\n this.setState({ error: multipleValidPromoCodeError! });\r\n } else {\r\n upatePromoError && upatePromoError(this.props.invalidPromoCodeErrorText);\r\n this.setState({ error: this.props.invalidPromoCodeErrorText });\r\n }\r\n })\r\n .catch(error => {\r\n upatePromoError && upatePromoError(this.props.failedToAddPromoCodeErrorText);\r\n this.setState({ error: this.props.failedToAddPromoCodeErrorText });\r\n });\r\n };\r\n\r\n private readonly _renderForm = (promoPlaceholderText: string, promoCodeApplyButtonText: string, cartState: ICartState | undefined) => {\r\n const _onSubmit = (event: React.FormEvent) => {\r\n event.preventDefault();\r\n this._applyPromotion(cartState);\r\n };\r\n const _applyPromotion = (event: React.MouseEvent) => {\r\n this._applyPromotion(cartState);\r\n };\r\n const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {promoCodeApplyButtonText}\r\n \r\n
\r\n
\r\n );\r\n };\r\n\r\n private readonly _removePromotion = (cartState: ICartState | undefined, event: React.MouseEvent, ctx: IActionContext) => {\r\n if (!cartState) {\r\n return;\r\n }\r\n const code = event.currentTarget.getAttribute('data-value') || '';\r\n cartState\r\n .removePromoCodes({\r\n promoCodes: [code]\r\n })\r\n .then(async result => {\r\n const checkoutState = await getCheckoutState(ctx);\r\n if (result.status === 'SUCCESS') {\r\n this.setState({ error: '' });\r\n await cartState.refreshCart({});\r\n await checkoutState.checkoutCart.removePromoCodes({ promoCodes: [code] }).then(async result => {\r\n if (result.status === 'SUCCESS') {\r\n this.setState({ error: '' });\r\n }\r\n await checkoutState.checkoutCart.refreshCart({});\r\n });\r\n }\r\n })\r\n .catch(() => {\r\n this.setState({ error: this.props.failedToRemovePromoCodeErrorText });\r\n });\r\n };\r\n\r\n private readonly _calculateDiscount = (code: string, cartState: ICartState | undefined) => {\r\n if (!cartState || !cartState.cart || !cartState.cart.CartLines || cartState.cart.CartLines.length === 0 || !code) {\r\n return;\r\n }\r\n let discountAmount = 0;\r\n for (const line of cartState.cart.CartLines) {\r\n if (line.DiscountLines) {\r\n for (const discountLine of line.DiscountLines) {\r\n if (discountLine.DiscountCode === code) {\r\n discountAmount += discountLine.DiscountCost!;\r\n }\r\n }\r\n }\r\n }\r\n return discountAmount * -1;\r\n };\r\n\r\n private readonly _renderAppliedPromoCode = (props: IPromoCodeProps) => {\r\n if (!props.cart || !props.cart.cart || !props.cart.cart.Coupons || props.cart.cart.Coupons.length === 0) {\r\n return;\r\n }\r\n\r\n const _removePromotion = (event: React.MouseEvent) => {\r\n this._removePromotion(props.cart, event, props.context.actionContext);\r\n };\r\n const customerTaxPercentage = taxPercentage(props.customerInformation);\r\n\r\n for (const coupon of props.cart.cart.Coupons) {\r\n const discountAmount = this._calculateDiscount(coupon.Code ?? '', props.cart);\r\n let totalCouponDiscountAmount = 0;\r\n if (discountAmount) {\r\n totalCouponDiscountAmount = totalCouponDiscountAmount + discountAmount;\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
{this.props.appliedPromoCodeHeadingText}
\r\n {props.cart.cart.Coupons.map((coupon: Coupon) => {\r\n const ariaLabel = props.removePromoAriaLabelFormat\r\n ? format(props.removePromoAriaLabelFormat, props.removePromoText, coupon.Code)\r\n : '';\r\n\r\n return (\r\n
\r\n
\r\n {coupon.Code}\r\n \r\n
\r\n \r\n {props.removePromoText}\r\n \r\n
\r\n );\r\n })}\r\n \r\n );\r\n };\r\n}\r\n\r\n// @ts-expect-error\r\nexport const PromoCodeComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'PromoCode',\r\n { component: PromoCode, ...PromoCodeComponentActions }\r\n);\r\n\r\nexport default PromoCodeComponent;\r\n","// Function use to convert date and add one plus day\r\nexport const getDateWithOnePlus = (cartLineMinDate: string) => {\r\n if (cartLineMinDate === '') {\r\n return null;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n const converedStringDate = new Date(cartLineMinDate!);\r\n converedStringDate.setDate(converedStringDate.getDate() + 1);\r\n\r\n // Get year, month, and day part from the date\r\n const updatedYear = converedStringDate.toLocaleString('default', { year: 'numeric' });\r\n const updatedMonth = converedStringDate.toLocaleString('default', { month: '2-digit' });\r\n const updatedDay = converedStringDate.toLocaleString('default', { day: '2-digit' });\r\n // Generate yyyy-mm-dd date string\r\n const formatedDate = `${updatedYear}-${updatedMonth}-${updatedDay}`.trim();\r\n\r\n return formatedDate;\r\n};\r\n\r\n// Function use to convert date and add one plus day\r\nexport const getMinimumDate = (atpOrderShipDateArr: any[]) => {\r\n if (atpOrderShipDateArr.length) {\r\n return null;\r\n }\r\n\r\n const arr: any[] = [];\r\n\r\n atpOrderShipDateArr?.map(e => {\r\n arr.push({ date: new Date(e.response.ATPDate) });\r\n });\r\n\r\n // Sort in Decending order (High to Low)\r\n const sortedDesc = arr.sort((objA, objB) => Number(objB.date) - Number(objA.date));\r\n\r\n const date = sortedDesc && sortedDesc.length && sortedDesc[0]?.date;\r\n // Create a date object from a date string\r\n\r\n // Get year, month, and day part from the date\r\n const year = date.toLocaleString('default', { year: 'numeric' });\r\n const month = date.toLocaleString('default', { month: '2-digit' });\r\n const day = date.toLocaleString('default', { day: '2-digit' });\r\n\r\n // eslint-disable-next-line react/no-direct-mutation-state\r\n return `${year}-${month}-${day}`.trim();\r\n};\r\n","import React, { PropsWithChildren } from 'react';\r\nimport { IBuyboxData, IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IQuickviewViewProps } from '@msdyn365-commerce-modules/buybox/src/modules/quickview/./quickview';\r\nimport { IBuyboxProps } from '../../themes/krannich/definition-extensions/buybox.ext.props.autogenerated';\r\nimport { ProductAvailableQuantity } from '@msdyn365-commerce/retail-proxy';\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ICartViewProps } from '../../modules/krannich-c-cart/krannich-c-cart';\r\ninterface CommercePropertyValue {\r\n BooleanValue?: boolean;\r\n ByteValue?: number;\r\n DateTimeOffsetValue?: Date;\r\n DecimalValue?: number;\r\n IntegerValue?: number;\r\n LongValue?: number;\r\n StringValue?: string;\r\n}\r\n\r\ninterface CommerceProperty {\r\n Key?: string;\r\n Value?: CommercePropertyValue;\r\n}\r\ninterface AttributeSwatch {\r\n SwatchValue?: string;\r\n SwatchImageUrl?: string;\r\n SwatchColorHexCode?: string;\r\n IsDefault?: boolean;\r\n ProductImageUrls?: string[];\r\n ExtensionProperties?: CommerceProperty[];\r\n}\r\ninterface AttributeValue {\r\n Name?: string;\r\n KeyName?: string;\r\n UnitOfMeasureSymbol?: string;\r\n DataTypeValue?: number;\r\n BooleanValue?: boolean;\r\n DateTimeOffsetValue?: Date;\r\n FloatValue?: number;\r\n IntegerValue?: number;\r\n TextValue?: string;\r\n CurrencyValue?: number;\r\n CurrencyCode?: string;\r\n AttributeValueId?: number;\r\n RecordId?: number;\r\n Swatches?: AttributeSwatch[];\r\n ExtensionProperties?: CommerceProperty[];\r\n}\r\ninterface customAttribute {\r\n attributevalues?: AttributeValue[];\r\n}\r\nexport const KitProduct = ({\r\n linkedProducts,\r\n props\r\n}: {\r\n linkedProducts: any[] | undefined;\r\n props:\r\n | PropsWithChildren & ProductAvailableQuantity>\r\n | (IQuickviewViewProps & customAttribute)\r\n | ICartViewProps;\r\n}) => {\r\n return (\r\n
\r\n
\r\n

Bundle Contains

\r\n {linkedProducts?.length.toString()} Items\r\n
\r\n
\r\n {linkedProducts &&\r\n linkedProducts?.map((e: any, index: number) => {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n

{e.Name!}

\r\n
\r\n
\r\n
\r\n {'Item number: '}\r\n {e.ItemId!}\r\n
\r\n {/*
\r\n {'Price:'} \r\n \r\n {props.context.cultureFormatter.formatCurrency(Number(e.Product?.Price!))}\r\n \r\n
*/}\r\n
\r\n {'Quantity: '}\r\n {e.Quantity!}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n );\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { PriceComponent } from '../../themes/krannich/views/components/price.component';\r\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\r\nimport { Cart, ChannelConfiguration, ChannelDeliveryOptionConfiguration } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\n\r\nexport interface IOrderSummaryProps {\r\n subTotalLabel: string;\r\n shippingLabel: string;\r\n taxLabel: string;\r\n orderTotalLabel: string;\r\n loyaltyLabel?: string;\r\n giftcardLabel?: string;\r\n totalDiscountsLabel: string;\r\n context: ICoreContext;\r\n telemetry: ITelemetry;\r\n cart: Cart;\r\n channelConfiguration: ChannelConfiguration;\r\n id: string;\r\n typeName: string;\r\n otherChargeLabel?: string;\r\n freeText?: string;\r\n toBeCalculatedText?: string;\r\n checkoutState?: ICheckoutState;\r\n retailMultiplePickUpOptionEnabled?: boolean;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n isTaxIncludedInPrice?: boolean;\r\n isShowTaxBreakup?: boolean;\r\n customerAccountLabel?: string;\r\n freightMsg?: string;\r\n deliveryMode?: string;\r\n customerTaxPercentage: number;\r\n}\r\n\r\nexport interface IOrderSummaryLines {\r\n subtotal: React.ReactNode;\r\n shipping?: React.ReactNode;\r\n otherCharge?: React.ReactNode;\r\n tax: React.ReactNode;\r\n orderTotal: React.ReactNode;\r\n totalDiscounts?: React.ReactNode;\r\n giftCard?: React.ReactNode;\r\n loyalty?: React.ReactNode;\r\n freightMsg?: string;\r\n customerAccount?: string;\r\n deliveryMode?: string;\r\n customerTaxPercentage: number;\r\n}\r\n\r\ninterface IOrderSummaryLineProps {\r\n label: string;\r\n context: ICoreContext;\r\n telemetry: ITelemetry;\r\n price?: number;\r\n freeText?: string;\r\n toBeCalculatedText?: string;\r\n id: string;\r\n typeName: string;\r\n cssLabel: string;\r\n freightMsg?: string;\r\n deliveryMode?: string;\r\n customerTaxPercentage?: number;\r\n}\r\n\r\ninterface IShippingOrderLine {\r\n cart: Cart;\r\n channelConfiguration: ChannelConfiguration;\r\n canShip?: boolean;\r\n hasDeliveryMethod?: boolean;\r\n hasShippingMethod?: boolean;\r\n freightFee?: number;\r\n}\r\n\r\nconst OrderSummaryLine: React.FC = ({\r\n price,\r\n label,\r\n context,\r\n id,\r\n typeName,\r\n toBeCalculatedText,\r\n freeText,\r\n cssLabel,\r\n freightMsg,\r\n deliveryMode,\r\n customerTaxPercentage\r\n}) => {\r\n return (\r\n

\r\n {label}\r\n {price || deliveryMode === 'Collection' ? (\r\n <>\r\n \r\n {freightMsg && price !== 0 && (\r\n

\r\n \r\n {freightMsg}\r\n
\r\n )}\r\n \r\n ) : (\r\n <>\r\n {toBeCalculatedText}\r\n {freightMsg && (\r\n
\r\n \r\n {freightMsg}\r\n
\r\n )}\r\n \r\n )}\r\n

\r\n );\r\n};\r\n\r\nconst _buildOrderSummarySection = (\r\n props: IOrderSummaryProps,\r\n price: number | undefined,\r\n cssLabel: string,\r\n label: string = '',\r\n freightMsg: string = '',\r\n deliveryMode?: string | undefined\r\n): React.ReactNode => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\r\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\r\n};\r\n\r\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\r\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\r\n return count + (giftCard.Balance || 0);\r\n };\r\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\r\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\r\n return Math.min(giftCardTotalValue, amount);\r\n};\r\n\r\nconst getDeliveryConfiguration = (\r\n cart: Cart,\r\n channelConfiguration: ChannelConfiguration,\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\r\n retailMultiplePickUpOptionEnabled?: boolean,\r\n isTaxIncludedInPrice?: boolean,\r\n isShowTaxBreakup?: boolean\r\n): IShippingOrderLine => {\r\n const pickupDeliveryModeCode = channelConfiguration && channelConfiguration.PickupDeliveryModeCode;\r\n const emailDeliveryModeCode = channelConfiguration && channelConfiguration.EmailDeliveryModeCode;\r\n const cartLines = cart.CartLines || [];\r\n const deliveryModes = cartLines.map(cartLine => cartLine.DeliveryMode);\r\n const taxOnShippingCharge = cart.TaxOnShippingCharge !== undefined ? cart.TaxOnShippingCharge : 0;\r\n const shippingChargeAmount = cart.ShippingChargeAmount !== undefined ? cart.ShippingChargeAmount : 0;\r\n\r\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\r\n // False False/True shippingChargeAmount\r\n // True True shippingChargeAmount\r\n // True false shippingChargeAmount + taxOnShippingCharge\r\n const freightFee = isTaxIncludedInPrice && !isShowTaxBreakup ? shippingChargeAmount + taxOnShippingCharge : cart.ShippingChargeAmount;\r\n\r\n const canShip = deliveryModes.some(\r\n deliveryMode =>\r\n !(\r\n deliveryMode !== '' &&\r\n (deliveryMode ===\r\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) ||\r\n deliveryMode === emailDeliveryModeCode)\r\n )\r\n );\r\n const hasDeliveryMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== emailDeliveryModeCode);\r\n const hasShippingMethod = deliveryModes.some(\r\n deliveryMode =>\r\n !!deliveryMode &&\r\n deliveryMode !==\r\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) &&\r\n deliveryMode !== emailDeliveryModeCode\r\n );\r\n return {\r\n canShip,\r\n hasDeliveryMethod,\r\n hasShippingMethod,\r\n freightFee\r\n } as IShippingOrderLine;\r\n};\r\n\r\nconst getDeliveryMode = (\r\n deliveryMode?: string,\r\n featureSate: boolean = false,\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\r\n pickupDeliveryMode?: string\r\n) => {\r\n if (!featureSate) {\r\n return pickupDeliveryMode;\r\n }\r\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === deliveryMode);\r\n};\r\n\r\nexport const OrderSummary = (props: IOrderSummaryProps) => {\r\n const {\r\n SubtotalAmount,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\r\n SubtotalAmountWithoutTax,\r\n TaxAmount,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\r\n TaxOnNonShippingCharges,\r\n TotalAmount,\r\n OtherChargeAmount,\r\n DeliveryMode\r\n } = props.cart;\r\n const { canShip, hasDeliveryMethod, hasShippingMethod, freightFee } = getDeliveryConfiguration(\r\n props.cart,\r\n props.channelConfiguration,\r\n props.channelDeliveryOptionConfig,\r\n props.retailMultiplePickUpOptionEnabled,\r\n props.isTaxIncludedInPrice,\r\n props.isShowTaxBreakup\r\n );\r\n\r\n const otherChargeAmount = OtherChargeAmount !== undefined ? OtherChargeAmount : 0;\r\n const taxOnNonShippingCharges = TaxOnNonShippingCharges !== undefined ? TaxOnNonShippingCharges : 0;\r\n const isTaxGreaterThanZero = TaxAmount !== undefined && TaxAmount > 0;\r\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\r\n // False False/True otherChargeAmount\r\n // True True otherChargeAmount\r\n // True false otherChargeAmount+TaxOnNonShippingCharges\r\n\r\n const otherChargeAmountTotal =\r\n props.isTaxIncludedInPrice && !props.isShowTaxBreakup ? otherChargeAmount + taxOnNonShippingCharges : otherChargeAmount;\r\n\r\n const subtotalAmountActual = props.isTaxIncludedInPrice && props.isShowTaxBreakup ? SubtotalAmountWithoutTax : SubtotalAmount;\r\n\r\n const reactNodes: IOrderSummaryLines = {\r\n subtotal: _buildOrderSummarySection(props, subtotalAmountActual, 'sub-total', props.subTotalLabel),\r\n tax: props.isShowTaxBreakup\r\n ? _buildOrderSummarySection(\r\n props,\r\n hasDeliveryMethod || isTaxGreaterThanZero ? TaxAmount : undefined,\r\n 'tax-amount',\r\n props.taxLabel\r\n )\r\n : '',\r\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\r\n otherCharge:\r\n (OtherChargeAmount && _buildOrderSummarySection(props, otherChargeAmountTotal, 'other-charges', props.otherChargeLabel)) ||\r\n undefined,\r\n customerTaxPercentage: props.customerTaxPercentage\r\n };\r\n\r\n if (canShip) {\r\n reactNodes.shipping = _buildOrderSummarySection(\r\n props,\r\n hasShippingMethod ? freightFee : undefined,\r\n 'shipping',\r\n props.shippingLabel,\r\n props.freightMsg,\r\n DeliveryMode\r\n );\r\n }\r\n if (props.checkoutState) {\r\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\r\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\r\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount;\r\n\r\n if (loyaltyAmount > 0) {\r\n reactNodes.loyalty = _buildOrderSummarySection(props, -loyaltyAmount, 'loyalty', props.loyaltyLabel || 'Loyalty amount');\r\n }\r\n\r\n if (giftCardAmount > 0) {\r\n reactNodes.giftCard = _buildOrderSummarySection(props, -giftCardAmount, 'gift-card', props.giftcardLabel || 'Gift card amount');\r\n }\r\n\r\n reactNodes.orderTotal = _buildOrderSummarySection(\r\n { ...props, freeText: undefined },\r\n totalAmountAfterGiftCard,\r\n 'total',\r\n props.orderTotalLabel\r\n );\r\n }\r\n\r\n return reactNodes;\r\n};\r\n"],"names":["KRV_CalendarOffDaysEntityExtensionClass","constructor","odataObject","this","FromDate","ToDate","ExtensionProperties","undefined","i","length","Number","className","substr","lastIndexOf","concat","EntityClasses","String","createFetchInput","queryResultSettings","requestedDate","fromDate","key","DataServiceQuery","DataServiceEntities","kRV_CalendarOffDaysQuery","resultSettings","createDataServiceRequestForOperation","bypassCache","returnEntity","fetchAsync","context","request","callActionOrExecute","callerContext","ProductPickUpOptionsForCartLineItems","apiSettings","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","async","getPickUpOptionsForCartLineItems","input","channelId","Error","cart","getCartState","products","getActiveCartProductsAction","ActiveCartProductsInput","response","ArrayExtensions","hasElements","Promise","resolve","ProductsDataActions","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","map","product","RecordId","createObservableDataAction","id","action","inputData","requestContext","PickUpInStore","props","_toggleBOPIS","isBopisSelected","storeSelectorStateManager","cartline","cartState","storeSelectorModuleId","openDialog","alreadySelectedLocation","OrgUnitNumber","FulfillmentStoreId","deliveryOptions","onLocationSelected","orgUnitLocation","deliveryMode","updateCartLinePickupLocation","cartLineId","LineId","location","then","result","status","locationChangedHandler","catch","error","_onLocationChangedCallback","DeliveryMode","ShippingAddress","clearCartLinePickupLocation","_getOrgUnitName","fulfillmentStoreId","orgUnitLocations","foundLocation","find","OrgUnitName","DeliveryOptions","_props$channelDeliver","retailMulitplePickupFeatureState","channelDeliveryOptionConfig","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","delivery","pickup","deliveryCode","Code","push","PickupDeliveryModeCodes","pickupDeliveryModeCode","option","callbacks","toggleBopis","defaultComponent","_renderShippingMethod","cartLine","shipItText","pickupInStoretext","changeStoreText","orgUnitName","bopisSelected","toggleBOPIS","React","type","name","onChange","value","checked","onClick","shipitText","pickUpInStoreText","_getDeliveryOption","pickupStore","_deliveryOptions$Deli","Description","ContainerProps","_assembleNode","index","foundProductAvailability","productPickUpOptions","productsAttributes","_product$Behavior","_foundProductAvailabi","_product$Dimensions","_productsAttributes$f","_context$actionContex","_props$cartState","_context$request$chan","imageSettings","gridSettings","typeName","resources","removeButtonText","removeItemClickHandler","moveToWishlistSuccessHandler","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","addToWishlistButtonText","removeFromWishlistButtonText","orderTemplates","customerInformation","wishlists","defaultWishlistName","isMultipleCatalogFeatureEnabledInHq","isAuthenticated","user","nameOfWishlist","Name","availableQuantityInStock","isStockCheckEnabled","productAvailability","ProductAvailableQuantity","IsProductAvailable","AvailableQuantity","_getCartItemAvailableQuantity","maxQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","isQuantityLimitsFeatureEnabled","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","maxCartlineQuantity","Behavior","MaximumQuantity","shouldSkipStockCheck","ItemTypeValue","ReleasedProductType","Service","IsInvoiceLine","errorMessage","ObjectExtensions","isNullOrUndefined","_getErrorMessage","currentQuantity","lineId","_props$productAvailab","finalErrorMessages","productAvailabilites","outOfStockText","toString","includeErrors","outOfRangeOneText","outOfRangeFormatText","replace","checkForErrors","cartlinesErrors","ValidationResultsPairs","errorsFoundByLineId","filter","ValidationFailures","forEach","validation","ErrorContext","join","Quantity","onRemoveClickHandler","onRemoveClickFunction","payload","getPayloadObject","TelemetryEvent","RemoveFromCart","telemetryContent","attributes","getTelemetryAttributes","inventoryLbl","StockLevelLabel","inventoryCode","StockLevelCode","toLowerCase","isCustomPriceSelected","Dimensions","dimension","DimensionTypeValue","DimensionValue","Value","productAttributesArr","attr","recordId","urlPath","formatUrlPath","productAttributes","_props$context","_productAttributes$fi","lookupAttributeKey","app","config","productManufacturarAttribute","TextValue","_getManufacturerName","prod","_prod$ExtensionProper","extension","Key","StringValue","pathName","actionContext","url","requestUrl","pathname","split","isAddingPathWithUrl","addPathWithUrl","productUrl","origin","MsDyn365","isBrowser","isChannelTypeB2B","_cartline$CatalogId","fullUrl","URL","window","href","searchParams","set","CatalogId","getInvoiceDetailsPageUrlSync","customerTaxPercentage","taxPercentage","data","cartlineId","hasError","StringExtensions","isNullOrEmpty","CartLineItemComponent","catalogs","isOutOfStock","lineIndex","isQuantityEditable","quantityOnChange","updateCartLinesQuantitySuccessHandler","primaryImageUrl","PrimaryImageUrl","inventoryInformationLabel","inventoryLabelClassName","isCartStateReady","showShippingChargesForLineItems","priceCurrency","channel","Currency","pickUpInStore","pickitUpText","remove","Button","Object","assign","title","addToWishlist","AddToWishlistComponent","showButtonText","showStatusMessage","showRemoveButton","showButtonTooltip","ariaRole","onSuccess","addToOrderTemplate","AddToOrderTemplateComponent","classnames","quantity","shouldShowButtonFailedTooltip","disableButton","disableTooltip","catalogId","assembleCartlines","cartlines","reactNodes","getProductByProductIdAndWarehouse","ProductId","WarehouseId","getProductByProductId","isPickUpItem","isCartLineItemPickUpType","_productAvailability$","_productAvailability$2","_cartline$WarehouseId","shouldIgnoreWarehouse","InventLocationId","toUpperCase","CartLineGroupItems","hasInvoiceLine","_assembleGroupInvoiceCartlines","cartLines","carLineViewProps","_assembleGroupCartlines","telemetry","getGroupByStorePickup","items","groupBy","item","groupDelivery","cartLinesGroup","entries","_ref","deliveryType","groupByDeliveryType","keys","getPromotionData","ctx","promotionData","getPromotionOptionsForCartLineItems","PromotionOptionsForCartLineItems","promotionOptions","exception","registerLocale","enGb","enUS","enAU","Cart","super","_isMounted","promotionPopupId","_getCartLinesAtpDetails","KRVATPLeadTimeDate","cartlinesAtpRes","objectDate","Date","getDate","getMonth","getFullYear","e","itemID","ItemId","_response$ATPTrafficL","kRV_GetMultipleATPLeadTimeDateAsync","ATPTrafficLights","atpMsgRes","JsonResponseObject","atpMsgResParsed","JSON","parse","err","console","validateCartLinesWithAtp","_this$props$data$cart","atpCartlineResults","CartLines","atpReserves","atpReserve","StatusCode","ErrorMessage","atpQuantityErrorMsg5xx","atpQuantityErrorMsg204","Message","setState","validateWithAtpAndCheckout","_this$props$data$cart2","isCheckoutBtnLoading","hasAtpQuantityError","_atpShipDate","showAtpStockAlert","setTimeout","updateAttr","checkoutURL","_this$state$atpOrderS","_convertDateFormatToM","orderShipdate","state","atpOrderShipDateArr","HighestDate","currentAttributes","attributeValues","requestdeliverydateAttribute","lineIdRequestdeliverydateAttr","setNameAttribute","RequestedDeliveryDate","findAttribute","orderShippingdateAttribute","formattedDate","convertDateFormatToMMDDYYY","lineIdOrderShippingdateAttr","updateAttributeValues","newAttributeValues","_this$props$data$cart3","res","refreshCart","requestDateComponent","_this$state$atpOrderS2","_this$state$atpOrderS3","_this$state$calenderd","_this$state$atpOrderS4","_this$props$context$r","_this$props","newSplitDateArr","minDate","requestDeliveryDateMin","getDateWithOnePlus","dateObjects","calenderdDaysOff","dateString","atpOrderShipDateArrDisplayByLocale","_this$props$context$r2","dateFormat","dateFormatByLocale","oun","ounNumberForUsSite","shipDateText","shipDateTextUS","trim","htmlFor","requestAShippingDate","DatePicker","showIcon","selected","startDate","date","placeholderText","locale","showTimeSelect","excludeDates","calendarStartDay","_this$props$data$cart4","KRVATPLeadTimeQuantity","_this$props$data","_this$props$data2","_this$props$data3","_this$props$data$cart6","Components","_this$props$data$cart5","Qty","context1","kRV_GetATPLeadTimeWithQuantityAsync","_res$HighestDate","_calenderDaysOff","promotionLinkClick","event","showPromotionDialog","promotionCloseButtonclick","_hidePromotionDialog","getImageSettings","viewports","xs","q","w","h","sm","lg","lazyload","removeItemFromCartHandler","cartlineToRemove","cartLineIds","removeCartLines","validateCart","warning","debug","updateCartlineQuantity","cartlineToUpdate","cartLineQuantityUpdatedAsync","cartActionResult","message","_cartActionResult$err","lineUpdateFailure","validationResults","LocalizedMessage","errorDetails","fulfillmentStoreIdUpdated","getTelemetryObject","telemetryPageName","friendlyName","payLoad","bind","isCartValid","isRedirect","_this$state$cartlines","_this$state$cartlines2","_this$props$data$cart7","getOrderQuantityLimitsFeatureFlag","_isChannelLimitsFeatureEnabled","showAvailablePromotions","reaction","_this$props$data$cart8","_this$props$data$cart9","LineIdToProductBehaviorMap","getProductAttributes","_this$props$data$prod","all","getAttributeValuesAsync","UNSAFE_componentWillReceiveProps","nextProps","nextContext","_this$props$data$cart10","_this$state$atpOrderS5","ATPLeadTimePropertiesQuantityResponseEntityList","componentWillUnmount","shouldComponentUpdate","nextState","render","_this$props$context$r3","_cart$cart$CartLines","_this$props$data$prod2","_this$props$data$feat","_featureState$result","signInUrl","guestCheckoutUrl","getUrlSync","backToShoppingUrl","getCheckoutURL","isCartEmpty","_getCartLines","emailDeliveryModeCode","EmailDeliveryModeCode","validInventoryAcrossCartLines","validateCartLinesInventory","isValid","some","RetailMultiplePickupFeatureState","featureState","multiplePickUpEnabled","IsEnabled","isMultipleCatalogsFeatureEnabled","currentCatalogId","getCatalogId","validateCatalogId","getCartLinesGroup","contentAction","etext","TelemetryConstant","Checkout","checkoutBySignInAttributes","GuestCheckout","checkoutByGuestAttributes","BackToShopping","backtoShoppingAttributes","cartLineGroup","_updateCartLineErrorForInvalidInventory","noProductsWithZeroPriceCheck","_cartLine$data","_cartLine$data2","_cartLine$data3","_cartLine$data4","ExtendedPrice","Price","viewProps","_objectSpread","cartTitle","CartlinesWrapper","OrderSummaryWrapper","OrderSummaryItems","promoCode","_getPromoCode","_getPromotions","removePromoAriaLabelFormat","orderSummaryHeading","invoiceSummaryTitle","orderSummaryTitle","orderSummaryLineitems","_getOrderSummaryLineItems","invoiceSummaryLineitems","_getInvoiceSummaryLineItems","checkoutAsSignInUserButton","disabled","checkoutButtonTitle","checkoutAsGuestButton","showGuestCheckoutButton","guestCheckoutButtonTitle","expressCheckoutButton","slots","paymentExpress","ExpressCheckoutSectionWrapper","backToShoppingButton","backToShoppingButtonTitle","createTemplateFromCartButton","_displayAddCartToTemplate","SaveCartToOrderTemplateComponent","_generateAddToOrderTemplateDialogResources","_generateOrderTemplateNameDialogResources","linesAddedToOrderTemplateDialogResources","_generateLinesAddedToOrderTemplateDialogResources","_generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","createOrderTemplateFromCartButton","createOrderTemplateFromCartButtonTooltip","checkoutBlockedDueToUnavailableFunds","storeSelector","waitingComponent","Waiting","cartLoadingStatus","cartLoadingErrorMessage","cartDataResult","isEmpty","OrderSummaryErrors","_getOrderSummaryErrors","requestDate","shipDate","renderView","_this$props$data$cart11","_cart$cart","showPromotionPopup","promotions","promotionLinkText","promotionPopupHeading","onCloseButtonClick","onSeeAllClick","titleId","promotionMessageWrapper","promotionMessage","promotionStringHeading","promotionSeeAllLink","tabIndex","role","promotionDialog","Modal","isOpen","toggle","ModalHeader","ModalBody","_promotion","_promotion$Promotion","Promotion","OfferName","ModalFooter","cartPromotions","promotionCloseButtonAriaLabel","cartLineInventoryValidationResult","productIdWithErrors","productIdWithError","element","_element$data","outOfStockErrorMessage","allErrors","_cartline$data","_cartline$data$produc","fullError","line","Wrapper","tag","Alert","color","assertive","outOfStockErrorMessageHeader","header","errors","InvoiceSummary","orderTotalLabel","totalAmountLabel","invoiceLabel","_this$props2","_featureState$result2","_this$props$context$r4","_this$props$data$cust","channelConfiguration","retailMultiplePickUpOptionEnabled","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","OrderSummary","subTotalLabel","itemsWithCountLabel","shippingLabel","estimatedShippingLabel","otherChargeLabel","otherCharges","taxLabel","estimatedTaxLabel","orderTotal","totalDiscountsLabel","toBeCalculatedText","yetToBeCalculatedText","freeText","priceFree","isTaxIncludedInPrice","IsTaxIncludedInPrice","isShowTaxBreakup","freightMsg","PromoCodeComponent","promoCodeHeadingText","promoPlaceholderText","promoCodeApplyButtonText","appliedPromoCodeHeadingText","collapseTimeOut","removePromoText","invalidPromoCodeErrorText","failedToAddPromoCodeErrorText","failedToRemovePromoCodeErrorText","duplicatePromoCodeErrorText","duplicatePromotionErrorText","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","_generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","freePriceText","originalPriceText","currentPriceText","linesAddedToOrderTemplateHeaderItemsOneText","linesAddedToOrderTemplateHeaderItemsFormatText","linesAddedToOrderTemplateHeaderLinesOneText","linesAddedToOrderTemplateHeaderLinesFormatText","linesAddedToOrderTemplateHeaderMessageText","linesAddedToOrderTemplateCustomPriceAlertMessageText","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","_this$props$data$feat2","_this$props$data$feat3","_cart$cart2","_cart$cart3","_this$props$data$cata","PickupDeliveryModeCode","modules","storeSelectorId","CartLineItems","productDeliveryOptions","enableStockCheck","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","warehouseAggregation","sizeString","productDimensionTypeSize","colorString","productDimensionTypeColor","configString","productDimensionTypeConfiguration","styleString","productDimensionTypeStyle","amountString","productDimensionTypeAmount","quantityDisplayString","quantityDisplayText","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","discountStringText","shippingChargesText","shippingCharges","salesAgreementPricePrompt","priceEditorResources","removeCartButtonText","shipInsteadDisplayText","pickItUpDisplayText","changeStoreDisplayText","errorMessageOutOfRangeOneLeft","errorMessageOutOfRangeFormat","showOutOfStockErrors","addToOrderTemplateMessage","addItemToOrderTemplateError","isAbsoluteUrl","urlCheck","returnURL","includes","AsyncResult","validateCartAsync","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","_featureStatuses$find","featureStatuses","customerInfo","IsB2b","_featureStatuses$find2","isChannelLimitsFeatureEnabledInHq","_this$props$data$feat4","_featureState$result3","_this$props$data$chan","_this$props$data$cata2","_this$props$data$chan2","_this$props$data$cart12","cartLinesPickUpOptions","__decorate","observer","_renderCartlines","cartEmptyText","enabledIncExPrices","_props$atpCartlineRes","_cartLine$data5","_cartLine$data6","_props$data$customerI","_cartLine$cartlineId","_cartLine$data7","_cartLine$data8","_props$context$reques","atpErrorMsg","_e$ItemId","linkedProducts","unitPrice","productUnitPrice","requestPriceText","zeroPriceProductText","incExcPriceFormat","productItemNumber","getCartLineShipDate","itemId","currency","_shipDate$ATPLeadTime","ATPDate","KitProduct","Node","renderCartLinesGroup","_props$context$action","renderCartLinesGroupHeader","pickUpText","shippingText","emailShippingText","titleSeparate","_cartLine$pickUpInSto","groupTitle","emailshippingText","emptyCartText","_props$cartlines","_props$cart","_props$cart2","_props$OrderSummaryEr","_props$resources","showAlert","setShowAlert","toggleAlert","renderModuleAttributes","removeAllProductsButton","wrapClassName","autoFocus","fade","applicationNode","alertLabel","removeAllProductsDialogueBox","_activeCart$CartLines","checkoutState","lineItemIdsToRemove","getCheckoutState","checkoutCart","removeAllPromoCodes","removeCheckoutCartId","emptyActiveCart","removeAllProductsConfirmButton","removeAllProductsCancelButton","atpQuantityErrorGeneralMsg","_renderInvoiceSummarylines","invoiceSummaryLines","invoices","giftCard","loyalty","_renderOrderSummarylines","orderSummaryLines","_props$context2","lessOrderSummaryCartInfoMessage","lessOrderSummaryCartInfoMessageMX","cartData","subTotal","SubtotalAmount","usSiteFlag","mexicoSiteFlag","ounNumberForMexicoSite","subtotalLabel","currencyFormat","subTotalToolTipMessageForUsSite","shipping","otherCharge","tax","totalDiscounts","itemProp","checkoutButton","buttonLabel","_renderCheckoutButton","getInvoicePaymentSummary","checkout","get","heading","lines","getLineItems","feature","_getDeliveryLocation","locationMatch","_getLineItemComponent","_input$data$catalogs","productId","_product","getProductUrlSync","_cartLine$CatalogId","currencyCode","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","PickUpAtStore","label","_getEmailDeliveryComponents","emailDeliveryText","EmailDelivery","_getLineItemsComponents","isPickUp","_getCartPickDeliveryMode","isEmailDelivery","LineItem","pickUpAtStore","emailDelivery","cartLineItem","_channelDeliveryOptio","isNullOrWhitespace","_countItems","reduce","count","_filterItemsByDiliveryType","_channelDeliveryOptio2","_getLineItemsByDeliveryType","_getGroupTitleComponent","_input$data$deliveryO","itemLabel","itemsLabel","inStorePickUpLabel","shippingCountCheckoutLineItem","emailDeliveryModeDesc","_productDeliveryOptio","suffix","LineItemDeliveryGroup","LineItemList","lineItems","handleLineItemHeadingChange","lineItemsHeading","text","target","_getLineItemsByDeliveryTypeWithMulitplePickupMode","multiplePickUpLabel","shippingLable","_filterItemsByMultiplePickupMode","cartLinesGrp","lineItemDeliveryGroup","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","iconClass","lineItemWraperIcon","lineItemWraper","_getLineItems","editCartText","EditCart","attribute","groupClass","LineItems","Header","Msdyn365","editProps","onEdit","editLink","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","getOrderSummary","loyaltyLabel","giftcardLabel","customerAccountLabel","showLineItems","orderSummaryProps","AddressItemDisplayType","AddressValidationRuleType","AddressItemType","CheckoutGuidedCard","editButtonRef","formCardRef","renderFooder","isVisted","isReady","isSubmitting","isCancelAllowed","hasControlGroup","onCancel","onSubmit","resource","saveBtnLabel","cancelBtnLabel","saveAndContinueBtnLabel","canSubmit","canCancel","Save","SaveContinue","saveBtnAttributes","Cancel","cancelBtnAttributes","classname","focusOnFirstFocusableElement","node","current","child","querySelector","focus","focusOnEditButton","editButton","scrollToTitle","formCard","isMobile","scrollIntoView","getTitle","step","headingTag","Tag","_getModules","_getId","componentDidUpdate","prevProps","isActive","onNext","shouldFocus","children","moduleState","childrenModules","childModule","childId","childState","getModule","setCheckoutErrorFocus","focusOnCheckoutError","isExpanded","isPending","isUpdating","hasInitialized","paymentTitleToHide","changeBtnLabel","CheckoutChange","changeBtnAttributes","canEdit","active","expanded","closed","visted","hidden","initialized","ready","pending","updating","hideContact","getPermissionToDisplaySection","_title$text2","_configValue$trim2","configValue","toLocaleLowerCase","ref","getPermissionToDisplayCTA","_title$text","_configValue$trim","innerRef","paymentInstrumentModuleId","CheckoutGuidedForm","currentStep","handleClick","setCurrentStep","getEnabledModules","childIds","isDisabled","_enableAfterModule","Boolean","nextChildId","_isPaymentSectionContainer","moduleId","_sectionState$childId","sectionState","currentId","getStep","indexOf","getId","getHeading","moduleChildId","isEditor","shouldEnableSinglePaymentAuthorizationCheckout","hasShippingAddress","hasCartDeliveryMode","hasGuestCheckoutEmail","isTermsAndConditionAccepted","_state$childIds","componentDidMount","init","shouldCollapseAfterRedirect","isPaymentVerificationRedirection","hasMissingInfo","hasOrderError","previousModuleHasError","_this$props$requestCo","hasModuleState","shouldEnableCheckoutErrorDisplayMessaging","shouldFocusOnCheckoutError","GuidedCard","disableGuidedCheckoutFlow","enableControl","computed","buttonsStates","onPlaceOrderHandler","isBusy","canPlaceOrder","placeOrder","buttonSetState","checkoutBtnText","isPlaceOrderLoading","isExpressCheckoutApplied","isTermsConditionCheck","setIsBusy","useState","Purchase","_this","isValidationPassed","isPlaceOrderClicked","customerRefID","commission","promoError","customerComments","estShipDate","isUpdateCall","checkoutErrorRef","_setCurrentStep","_setCartItemAttribute","_cartState$cart$CartL","findedAttrArray","updatedCartLines","productWeightAttribute","_this$props$data$getA","_this$props$data$getA2","_productAttrWeightVal","filteredProductAttributeList","getAttributesForCartLineItems","attributeValue","kcProductAttribute","manufacturerAttributeValue","identifier","productAttrWeightValue","lineIdManufacturAttr","lineIdWeightAttr","FloatValue","AttributeValues","cartId","Id","updateCartLinesAsync","_getDateAttribute","_this$props$data$chec","_attributes$find","_attributes$find2","reqAttr","estimatedShippingDateArr","handleCheckoutHeadingChange","checkoutHeading","isLoading","cartStatus","isEmptyCart","getSlotItems","triggerPaymentWithPlaceOrder","_this$props$data$chec2","updateShouldTriggerPaymentWithPlaceOrder","newShouldTriggerPaymentWithPlaceOrder","shouldTriggerPaymentWithPlaceOrder","onChangeFields","customDate","onChangeDate","isNaN","getTime","converedStringDate","setDate","updatedYear","toLocaleString","year","formatedDate","month","day","localStorage","setItem","onChangeTextAreaFields","getHeaderAttribute","attributeArr","reqId","getItem","customerReferenceAttribute","commissionAttribute","commentsAttribute","lineIdCustomerReferenceAttr","lineIdCommissionAttr","lineIdCommentsAttr","getMinimumDate","onPlaceOrder","_this$props3","_this$props$data$chec3","phnRcdId","PhoneRecordId","stringify","checkoutOutOfStockErrorMessage","orderConfirmation","information","isOverMaxQuantity","_this$props$data$chec4","_this$props$data$chec6","_this$props$data$chec7","_checkout$result","_this$props$data$chec5","hasOrderConfirmation","updatedCartVersion","updateCartLineEmailAddress","guestCheckoutEmail","orderedProducts","redirect","PlaceOrder","handleCheckoutError","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","_this$props$data$chec8","emailDeliveryCartLines","lineDeliverySpecifications","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","updatedCart","Version","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","productInventoryInformation","_cart$CartLines","_cart$CartLines2","productsThatShouldValidateInventory","_cartlineProduct$Beha","cartlineProduct","isStockedItem","IsStockedProduct","productInventory","_productInventory$Pro","cartLinesInventoryValidation","getActiveChildModuleStates","onContainerReady","redirectToCartPage","notFoundEditCartLinkMessage","editCartLink","genericErrorMessage","validateForCheckout","retry","arguments","isOrderQuantityLimitsFeatureEnabledInHq","isEcommerceQuantityLimitsFeatureEnabledInHq","isB2BSite","isOrderQuantityLimitsFeatureEnabledInSiteSettings","validateForCheckoutAsync","_result$ValidationFai","ValidationFailuresByCartLines","_this$props$data$chec9","refreshError","_upatePromoError","upatePromoError","_setErrorMessage","setHasError","onUpdating","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","address","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Street","Address1","StreetNumber","Address2","City","State","ZipCode","Phone","invalidCartVersionErrorMessage","missingRequiredCartTenderLinesErrorMessage","timeoutErrorMessage","checkoutResult","apiError","statusCode","errorCode","setCheckoutErrors","_this$props$data$chec10","_error$data","_this$props$data$chec11","AdditionalContext","_this$props$data$chec12","_this$props$data$chec13","isEditorialMode","_this$props$data$chec14","params","_this$props$data$chec15","_this$props$data$chec16","_this$props$data$chec17","_this$props$data$chec18","_this$props$data$chec19","disableForOBO","isPaidOffByCustomerAccount","_this$props$data$chec20","_this$props$data$chec21","_this$props$data$chec22","_this$props$data$chec23","amountDue","TotalAmount","customerAccountAmount","_this$props$data$chec24","_this$props$data$chec25","_this$props$data$chec26","properties","property","newProps","when","asyncResultStatus","AsyncResultStatusCode","LOADING","expressPaymentDetailsFromCartPage","_this$props$data$chec27","_this$props$data$chec30","email","tenderLine","paymentTenderType","paymentTenderTypeFromCartPage","isExpressCheckoutAppliedInCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","_this$props$data$chec28","_this$props$data$chec29","updateExpressCheckoutDetails","newEmailAddressFromExpressCheckout","newTenderLine","newTokenizedPaymentCard","newPaymentTenderType","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newCardPaymentAcceptResult","updateExtensionProperties","newExtensionProperties","isCartReady","_this$props$data$chec31","isPaymentSectionContainerReady","_this$props$data$chec32","_this$props$data$chec33","_this$props$data$chec34","_this$props$data$chec35","redirectAdditionalContext","isPaymentVerificationRequired","_this$props$data$chec36","isPaymentSectionContainerHasError","_this$props$data$chec37","_this$props$data$chec38","isBillingAddressHasError","_this$props$data$chec39","_this$props$data$chec40","updateIsBillingAddressHasError","newIsBillingAddressHasError","_this$props$data$chec41","_this$props$data$chec42","updateIsPlaceOrderEnabledInRedirection","newIsPlaceOrderEnabledInRedirection","_this$props$data$chec43","checkoutError","_this$props$data$chec44","checkoutErrorLocation","errorLocation","ErrorLocation","checkoutPaymentErrorLocation","ErrorCode","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","CheckoutPaymentInstrument","_this$props$data$chec45","_this$props$data$chec46","_this$props$config$te","_this$props4","_this$props$data$chec47","_this$props5","_this$props$data$chec48","_this$props$data$chec49","_this$props$data$chec50","_this$props$data$chec51","_this$props$data$chec52","_this$props$data$chec53","_this$props$data$chec54","_this$props$data$chec55","_this$props$data$chec56","_this$props$data$chec57","_this$props$data$chec58","_this$props$data$chec59","_this$props$data$chec60","_document","_this$props$data$chec61","backToShopping","placeOrderText","placeOrderTextRequest","confirmPaymentText","cookieConsentRequiredMessage","checkoutClass","allCheckoutInformation","checkoutInformation","info","checkoutExpressPaymentContainer","isConsentGiven","cookies","device","Type","termsAndConditions","termsAndConditionsLine","required","defaultChecked","termsandConditionStatementFirstPart","termsandConditions","linkText","linkUrl","destinationUrl","openInNewTab","rel","termsandConditionStatementSecondPart","termsandConditionStatementSecondPartUsa","backToShoppingAttributes","placeOrderBtnText","hasExpressPaymentContainer","document","getElementsByClassName","style","display","hasSalesOrder","salesOrder","checkoutProps","moduleProps","headerProps","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","renderMsdyn365Text","onTextAreaChange","promoCodeComponent","onChangeRequestDeliveryDate","reqDate","calenderDaysOff","chcekoutWithOutCooikes","alert","AlertComponent","loading","_this$props$data$chec62","_this$props$data$chec63","canShow","guidedForm","GuidedFormComponent","orderSummary","invoicePaymentSummary","placeOrderButton","PlaceOrderButtonComponent","keepShoppingButton","values","every","SUCCESS","FAILED","withModuleState","PickUpAtStoreComponent","EmailDeliveryComponent","_ref2","LineItemComponent","_ref3","LineItemGroupComponent","_ref4","lineItem","LineItemGroupComponentWithMultiplePickUp","_ref5","LineItemComponentWithMultiplePickUp","_ref6","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","OrderSummaryComponent","_ref9","_subTotalProps$props","_shippingProps$props","_subTotalProps$props2","_subTotalProps$props3","lessOrderMessage","freightAndGSTMessage","freightAndGSTMessageFromResources","siteOun","formatter","subTotalToolTipMessage","lessOrderMessageMX","subTotalProps","subtotal","price","shippingProps","totalBeforeTax","customerAccount","PaymentSummaryComponent","_ref10","_customFields","attributeSectionHeading","customerReference","placeholder","maxLength","commision","_props$data$checkout","_Date$toLocaleDateStr","_formattedShipDate$to","_props$context3","shipDateAttr","formattedShipDate","toLocaleDateString","shipDateAttrState","shipDateAttrUseState","selectedDate","setSelectedDate","dateLocale","Module","orderShipDate","orderShipDateUS","requestedShippingDate","lessOrderSummaryCheckoutInfoMessage","lessOrderSummaryCheckoutInfoMessageMX","freightAndGSTMessageResources","cultureFormatter","subtotalToolTipMessage","PromoCode","_onInputChange","promoCodeInputValue","canApply","_applyPromotion","appliedPromo","addPromoCode","substatus","_result$errorDetails","multipleValidPromoCodeError","_renderForm","preventDefault","_removePromotion","code","currentTarget","getAttribute","removePromoCodes","promoCodes","_calculateDiscount","discountAmount","DiscountLines","discountLine","DiscountCode","DiscountCost","_renderAppliedPromoCode","Coupons","coupon","_coupon$Code","totalCouponDiscountAmount","ariaLabel","format","PriceComponent","CustomerContextualPrice","ApplyPromoCode","isCollapseOpen","promoCodeInformationMessage","msdyn365Commerce","createComponentOverride","component","cartLineMinDate","_e$Product","src","generateImageUrl","Product","alt","OrderSummaryLine","cssLabel","isIncExPriceFormatEnabled","_buildOrderSummarySection","_computedLoyaltyAmount","loyaltyAmount","getDeliveryMode","featureSate","pickupDeliveryMode","dM","SubtotalAmountWithoutTax","TaxAmount","TaxOnNonShippingCharges","OtherChargeAmount","canShip","hasDeliveryMethod","hasShippingMethod","freightFee","getDeliveryConfiguration","deliveryModes","taxOnShippingCharge","TaxOnShippingCharge","shippingChargeAmount","ShippingChargeAmount","otherChargeAmount","taxOnNonShippingCharges","isTaxGreaterThanZero","otherChargeAmountTotal","subtotalAmountActual","giftCardAmount","_computeGiftCardAmount","giftCardTotalValue","giftCardExtends","giftCardCounter","Balance","amount","Math","min","totalAmountAfterGiftCard"],"sourceRoot":""}